Skip to content

Commit c5cf956

Browse files
committed
docs: define graph data model (#322)
1 parent 34636d3 commit c5cf956

26 files changed

Lines changed: 558 additions & 0 deletions

GRAPH_SCHEMA.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
>
77
> This document is the graph contract, not the canonical product narrative.
88
> Some prefixes and examples reflect legacy manual-authoring and roadmap-oriented workflows that remain supported, but they are not the current center of the product story.
9+
> The product-level node and edge vocabulary lives in [docs/design/graph-data-model.md](docs/design/graph-data-model.md).
910
1011
---
1112

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ Canonical docs:
175175
- [docs/adr/ADR-0006.md](docs/adr/ADR-0006.md)
176176
- [docs/VISION_NORTH_STAR.md](docs/VISION_NORTH_STAR.md)
177177
- [docs/design/git-mind.md](docs/design/git-mind.md)
178+
- [docs/design/graph-data-model.md](docs/design/graph-data-model.md)
178179
- [docs/design/feature-profiles/README.md](docs/design/feature-profiles/README.md)
179180
- [docs/design/repo-fixture-strategy.md](docs/design/repo-fixture-strategy.md)
180181
- [docs/adr/](docs/adr/)

ROADMAP.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ Primary references:
147147

148148
- [docs/design/git-mind.md](docs/design/git-mind.md)
149149
- [docs/design/h1-semantic-bootstrap.md](docs/design/h1-semantic-bootstrap.md)
150+
- [docs/design/graph-data-model.md](docs/design/graph-data-model.md)
150151
- [docs/design/feature-profiles/README.md](docs/design/feature-profiles/README.md)
151152
- [docs/design/git-warp-upgrade-audit.md](docs/design/git-warp-upgrade-audit.md)
152153
- [docs/design/repo-fixture-strategy.md](docs/design/repo-fixture-strategy.md)

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ These describe what Git Mind is now and how work should be judged:
1212
- [ROADMAP.md](../ROADMAP.md) — active Hills, supporting lanes, and playback cadence
1313
- [Git Mind Product Frame](./design/git-mind.md) — IBM Design Thinking style product frame
1414
- [Hill 1 Semantic Bootstrap Spec](./design/h1-semantic-bootstrap.md) — first executable Hill 1 slice
15+
- [Graph Data Model](./design/graph-data-model.md) — canonical product node and edge vocabulary
1516
- [Feature Profiles](./design/feature-profiles/README.md) — per-feature IBM Design Thinking profiles with executable test plans
1617
- [git-warp Upgrade Audit](./design/git-warp-upgrade-audit.md) — next enabling cycle before major Hill 1 implementation
1718
- [Git Mind North Star](./VISION_NORTH_STAR.md) — longer-form strategic articulation

docs/design/feature-profiles/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ profile uses the same IBM Design Thinking frame:
1010
- relevant Hill or supporting lane
1111
- user stories
1212
- requirements
13+
- graph data model usage
1314
- playback evidence
1415
- test plan
1516

@@ -85,6 +86,18 @@ Each profile should name tests in these buckets.
8586
- Playback evidence: the human or agent demonstration that proves the Hill
8687
moved, not just that code ran.
8788

89+
## Shared Graph Model
90+
91+
All feature profiles use the canonical vocabulary in
92+
[Graph Data Model](../graph-data-model.md). Feature-specific graph sections
93+
should show:
94+
95+
- which node prefixes the feature reads or writes
96+
- which edge types the feature creates, updates, filters, or cites
97+
- where confidence, provenance, review, or observer metadata enters the model
98+
- a Mermaid example that a reviewer can compare against the feature's test
99+
fixtures and golden artifacts
100+
88101
## Fixture Strategy
89102

90103
Repository-shaped behavior should use the canonical fixture strategy:

docs/design/feature-profiles/agent-contracts.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,20 @@ Playback evidence:
5252
- Breaking changes require versioning.
5353
- Human formatting changes must not break JSON contracts.
5454

55+
## Graph Data Model Usage
56+
57+
Agent contracts expose [Graph Data Model](../graph-data-model.md) through
58+
machine-readable payloads. Agents should receive canonical node IDs, edge
59+
types, confidence, evidence, and graph refs rather than prose-only context.
60+
61+
```mermaid
62+
flowchart LR
63+
Agent["tool:codex"] -->|references| Contract["spec:agent-answer-contract"]
64+
Contract -->|documents| Query["feature:query-receipts"]
65+
Answer["doc:answer-json"] -->|references| Node["module:bootstrap"]
66+
Answer -->|references| Evidence["doc:h1-semantic-bootstrap"]
67+
```
68+
5569
## Test Plan
5670

5771
Fixtures:

docs/design/feature-profiles/artifact-inventory.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,22 @@ Initial artifact kinds:
7070
- `binary`
7171
- `unsupported`
7272

73+
## Graph Data Model Usage
74+
75+
Artifact inventory owns the first stable mapping from repository paths to
76+
canonical artifact and subject nodes in
77+
[Graph Data Model](../graph-data-model.md). It should classify what can become
78+
`file:`, `doc:`, `adr:`, `spec:`, `module:`, and `pkg:` nodes before inference
79+
tries to connect them.
80+
81+
```mermaid
82+
flowchart LR
83+
Package["pkg:@git-stunts/git-warp"] -->|consumed-by| Graph["module:graph"]
84+
Graph -->|groups| Source["file:src/graph.js"]
85+
Docs["doc:GRAPH_SCHEMA"] -->|documents| Schema["spec:graph-schema-v1"]
86+
Adr["adr:0006"] -->|documents| Fixture["module:fixtures"]
87+
```
88+
7389
## Test Plan
7490

7591
Fixtures:

docs/design/feature-profiles/bootstrap-command.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,22 @@ Initial JSON shape:
102102
- Cross-repo bootstrap.
103103
- Interactive terminal review UI.
104104

105+
## Graph Data Model Usage
106+
107+
This feature is the first producer of the canonical model in
108+
[Graph Data Model](../graph-data-model.md). Bootstrap creates artifact,
109+
subject, work, and concept nodes, then writes typed edges with confidence and
110+
evidence-oriented rationale.
111+
112+
```mermaid
113+
flowchart LR
114+
Readme["doc:README"] -->|documents| Cli["module:cli"]
115+
Cli -->|groups| Bin["file:bin/git-mind.js"]
116+
Adr["adr:0006"] -->|documents| Bootstrap["feature:semantic-bootstrap"]
117+
Commit["commit:34636d3"] -->|touches| Readme
118+
Readme -->|references| Issue["issue:322"]
119+
```
120+
105121
## Test Plan
106122

107123
Fixtures:

docs/design/feature-profiles/content-on-node.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,20 @@ Playback evidence:
5050
- Large content limits and warnings need explicit policy.
5151
- Binary content support needs explicit encoding policy before expansion.
5252

53+
## Graph Data Model Usage
54+
55+
Content-on-node attaches Git-backed content to canonical nodes from
56+
[Graph Data Model](../graph-data-model.md). The node identity remains the graph
57+
fact; content properties provide the payload and integrity metadata.
58+
59+
```mermaid
60+
flowchart LR
61+
Note["doc:design-note"] -->|documents| Module["module:bootstrap"]
62+
Note -->|references| Blob["metric:content-oid"]
63+
Module -->|groups| File["file:src/bootstrap.js"]
64+
Doctor["tool:doctor"] -->|references| Blob
65+
```
66+
5367
## Test Plan
5468

5569
Fixtures:

docs/design/feature-profiles/doctor-integrity.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,21 @@ Playback evidence:
5151
- Doctor must never hide unfixable issues.
5252
- Repair operations must be atomic.
5353

54+
## Graph Data Model Usage
55+
56+
Doctor and integrity checks validate that
57+
[Graph Data Model](../graph-data-model.md) remains coherent. The feature reads
58+
canonical nodes, edges, and assertion properties, then reports structural issues
59+
as actionable diagnostics.
60+
61+
```mermaid
62+
flowchart LR
63+
Doctor["tool:git-mind-doctor"] -->|references| Graph["module:graph"]
64+
Graph -->|groups| File["file:src/graph.js"]
65+
Edge["file:missing.js implements spec:bootstrap-json"] -->|references| Problem["event:dangling-edge"]
66+
Problem -->|blocks| Healthy["metric:graph-health"]
67+
```
68+
5469
## Test Plan
5570

5671
Fixtures:

0 commit comments

Comments
 (0)