@@ -60,9 +60,9 @@ flowchart LR
6060 Artifact["Artifact nodes"] -->|documents| Subject["Subject nodes"]
6161 Work["Work nodes"] -->|touches| Artifact
6262 Subject -->|depends-on| Dependency["Dependency nodes"]
63- Assertion["Edge assertion "] -->|references| Evidence["Evidence artifact"]
63+ Evidence["doc:evidence "] -->|references| Artifact
6464 Reviewer["person:reviewer"] -->|references| Decision["decision:review"]
65- Decision -->|documents| Assertion
65+ Decision -->|references| Subject
6666```
6767
6868The local Git repository is the graph scope. In v1, the local repository itself
@@ -86,68 +86,154 @@ stable, human-readable, and derived from repo artifacts whenever possible.
8686
8787### Artifact Nodes
8888
89- | Prefix | Use | Example | Typical properties |
90- | --------| -----| ---------| --------------------|
91- | ` file: ` | Repo file path | ` file:src/graph.js ` | ` path ` , ` language ` , ` artifactKind ` , ` hash ` |
92- | ` doc: ` | General documentation artifact | ` doc:README ` | ` path ` , ` title ` , ` heading ` , ` artifactKind ` |
93- | ` adr: ` | Architecture decision record | ` adr:0006 ` | ` path ` , ` title ` , ` status ` , ` date ` |
94- | ` spec: ` | Product, API, schema, or behavior spec | ` spec:bootstrap-json ` | ` path ` , ` title ` , ` schemaVersion ` |
95- | ` commit: ` | Git commit discovered by history scan | ` commit:34636d3 ` | ` sha ` , ` author ` , ` date ` , ` summary ` |
96- | ` epoch: ` | System temporal marker for historical views | ` epoch:34636d3 ` | ` ref ` , ` tick ` , ` createdAt ` |
89+ - ` file: ` identifies a repo file path.
90+ Example: ` file:src/graph.js ` .
91+ Typical properties: ` path ` , ` language ` , ` artifactKind ` , ` hash ` .
92+ - ` doc: ` identifies a general documentation artifact.
93+ Example: ` doc:README ` .
94+ Typical properties: ` path ` , ` title ` , ` heading ` , ` artifactKind ` .
95+ - ` adr: ` identifies an architecture decision record.
96+ Example: ` adr:0006 ` .
97+ Typical properties: ` path ` , ` title ` , ` status ` , ` date ` .
98+ - ` spec: ` identifies a product, API, schema, or behavior spec.
99+ Example: ` spec:bootstrap-json ` .
100+ Typical properties: ` path ` , ` title ` , ` schemaVersion ` .
97101
98102### Subject Nodes
99103
100- | Prefix | Use | Example | Typical properties |
101- | --------| -----| ---------| --------------------|
102- | ` module: ` | Internal module or subsystem | ` module:bootstrap ` | ` name ` , ` path ` , ` package ` , ` owner ` |
103- | ` crate: ` | Internal package when the repo uses crate language | ` crate:git-mind-core ` | ` name ` , ` path ` , ` language ` |
104- | ` pkg: ` | External package or dependency | ` pkg:@git-stunts/git-warp ` | ` name ` , ` version ` , ` ecosystem ` |
105- | ` concept: ` | Named idea that appears across artifacts | ` concept:semantic-bootstrap ` | ` name ` , ` aliases ` |
106- | ` decision: ` | Review or architecture decision event | ` decision:bootstrap-contract ` | ` action ` , ` reviewer ` , ` timestamp ` |
104+ - ` module: ` identifies an internal module or subsystem.
105+ Example: ` module:bootstrap ` .
106+ Typical properties: ` name ` , ` path ` , ` package ` , ` owner ` .
107+ - ` crate: ` identifies an internal package when the repo uses crate language.
108+ Example: ` crate:git-mind-core ` .
109+ Typical properties: ` name ` , ` path ` , ` language ` .
110+ - ` pkg: ` identifies an external package or dependency.
111+ Example: ` pkg:@git-stunts/git-warp ` .
112+ Typical properties: ` name ` , ` version ` , ` ecosystem ` .
113+ - ` concept: ` identifies a named idea that appears across artifacts.
114+ Example: ` concept:semantic-bootstrap ` .
115+ Typical properties: ` name ` , ` aliases ` .
116+ - ` decision: ` identifies a review or architecture decision event.
117+ Example: ` decision:bootstrap-contract ` .
118+ Typical properties: ` action ` , ` reviewer ` , ` timestamp ` .
107119
108120### Work Nodes
109121
110- | Prefix | Use | Example | Typical properties |
111- | --------| -----| ---------| --------------------|
112- | ` issue: ` | GitHub or tracker issue | ` issue:322 ` | ` number ` , ` title ` , ` state ` , ` url ` |
113- | ` pr: ` | Pull request | ` pr:323 ` | ` number ` , ` title ` , ` state ` , ` url ` |
114- | ` task: ` | Local work item or actionable unit | ` task:h1-bootstrap-tests ` | ` title ` , ` status ` , ` owner ` |
115- | ` feature: ` | Product feature grouping | ` feature:query-receipts ` | ` title ` , ` hill ` , ` status ` |
116- | ` milestone: ` | Historical or release grouping | ` milestone:h1 ` | ` title ` , ` status ` |
117- | ` phase: ` | Phase alias used by legacy views | ` phase:stabilize ` | ` title ` , ` status ` |
122+ - ` issue: ` identifies a GitHub or tracker issue.
123+ Example: ` issue:322 ` .
124+ Typical properties: ` number ` , ` title ` , ` state ` , ` url ` .
125+ - ` pr: ` identifies a pull request.
126+ Example: ` pr:323 ` .
127+ Typical properties: ` number ` , ` title ` , ` state ` , ` url ` .
128+ - ` task: ` identifies a local work item or actionable unit.
129+ Example: ` task:h1-bootstrap-tests ` .
130+ Typical properties: ` title ` , ` status ` , ` owner ` .
131+ - ` feature: ` identifies a product feature grouping.
132+ Example: ` feature:query-receipts ` .
133+ Typical properties: ` title ` , ` hill ` , ` status ` .
134+ - ` milestone: ` identifies a historical or release grouping.
135+ Example: ` milestone:h1 ` .
136+ Typical properties: ` title ` , ` status ` .
137+ - ` phase: ` identifies a phase alias used by legacy views.
138+ Example: ` phase:stabilize ` .
139+ Typical properties: ` title ` , ` status ` .
118140
119141### Actor And Tool Nodes
120142
121- | Prefix | Use | Example | Typical properties |
122- | --------| -----| ---------| --------------------|
123- | ` person: ` | Human actor or reviewer | ` person:james ` | ` handle ` , ` displayName ` |
124- | ` tool: ` | Tool, agent, service, or local integration | ` tool:codex ` | ` name ` , ` version ` , ` capabilities ` |
125- | ` event: ` | Named event in repo history | ` event:bootstrap-playback ` | ` date ` , ` summary ` |
126- | ` metric: ` | Measured value or health indicator | ` metric:graph-density ` | ` name ` , ` unit ` , ` value ` |
143+ - ` person: ` identifies a human actor or reviewer.
144+ Example: ` person:james ` .
145+ Typical properties: ` handle ` , ` displayName ` .
146+ - ` tool: ` identifies a tool, agent, service, or local integration.
147+ Example: ` tool:codex ` .
148+ Typical properties: ` name ` , ` version ` , ` capabilities ` .
149+ - ` event: ` identifies a named event in repo history.
150+ Example: ` event:bootstrap-playback ` .
151+ Typical properties: ` date ` , ` summary ` .
152+ - ` metric: ` identifies a measured value or health indicator.
153+ Example: ` metric:graph-density ` .
154+ Typical properties: ` name ` , ` unit ` , ` value ` .
155+
156+ ### System-Owned Nodes
157+
158+ The schema reserves some prefixes for Git Mind system writers:
159+
160+ - ` commit: ` identifies a Git commit discovered through repository history.
161+ Example: ` commit:34636d3 ` .
162+ Typical properties: ` sha ` , ` author ` , ` date ` , ` summary ` .
163+ - ` epoch: ` identifies a system temporal marker for historical views.
164+ Example: ` epoch:34636d3 ` .
165+ Typical properties: ` ref ` , ` tick ` , ` createdAt ` .
166+
167+ Users and import files must not author ` commit: ` or ` epoch: ` nodes directly.
168+ Bootstrap and history-aware features may create them only through Git Mind's
169+ system-owned writers, with tests that also prove YAML/frontmatter import still
170+ rejects those prefixes where the schema requires rejection.
127171
128172## Canonical Edges
129173
130174Edges are directed. Direction matters because query receipts, views, and
131175review flows rely on it.
132176
133- | Edge | Direction | Use | Example |
134- | ------| -----------| -----| ---------|
135- | ` documents ` | explainer -> subject | Artifact explains a subject | ` doc:README -> module:cli ` |
136- | ` references ` | source -> referenced | Explicit citation or mention | ` doc:README -> issue:322 ` |
137- | ` implements ` | implementation -> spec or feature | Code or work realizes behavior | ` file:src/bootstrap.js -> spec:bootstrap-json ` |
138- | ` touches ` | change -> artifact | Commit, PR, or issue modifies or affects artifact | ` commit:34636d3 -> file:README.md ` |
139- | ` groups ` | parent -> child | Structural containment | ` module:cli -> file:bin/git-mind.js ` |
140- | ` belongs-to ` | member -> group | Planning membership | ` task:h1-bootstrap-tests -> feature:bootstrap ` |
141- | ` depends-on ` | dependent -> dependency | Requires dependency first | ` module:query -> module:graph ` |
142- | ` blocks ` | blocker -> blocked | Work cannot proceed until blocker changes | ` issue:310 -> issue:304 ` |
143- | ` consumed-by ` | resource -> consumer | Dependency is consumed by a module | ` pkg:@git-stunts/git-warp -> module:graph ` |
144- | ` augments ` | extension -> base | Adds capability to subject | ` tool:extension -> module:git-mind ` |
145- | ` relates-to ` | source -> related | Low-specificity association | ` concept:receipts -> concept:provenance ` |
177+ - ` documents ` : explainer -> subject.
178+ Use when an artifact explains a subject.
179+ Example: ` doc:README -> module:cli ` .
180+ - ` references ` : source -> referenced.
181+ Use for explicit citation, mention, or receipt evidence.
182+ Example: ` doc:README -> issue:322 ` .
183+ - ` implements ` : implementation -> spec or feature.
184+ Use when code or work realizes behavior.
185+ Example: ` file:src/bootstrap.js -> spec:bootstrap-json ` .
186+ - ` touches ` : change -> artifact.
187+ Use when a commit, PR, or issue modifies or affects an artifact.
188+ Example: ` commit:34636d3 -> file:README.md ` .
189+ - ` groups ` : parent -> child.
190+ Use for structural containment.
191+ Example: ` module:cli -> file:bin/git-mind.js ` .
192+ - ` belongs-to ` : member -> group.
193+ Use for planning membership.
194+ Example: ` task:h1-bootstrap-tests -> feature:bootstrap ` .
195+ - ` depends-on ` : dependent -> dependency.
196+ Use when one subject requires another first.
197+ Example: ` module:query -> module:graph ` .
198+ - ` blocks ` : blocker -> blocked.
199+ Use when work cannot proceed until blocker changes.
200+ Example: ` issue:310 -> issue:304 ` .
201+ - ` consumed-by ` : resource -> consumer.
202+ Use when a dependency is consumed by a module.
203+ Example: ` pkg:@git-stunts/git-warp -> module:graph ` .
204+ - ` augments ` : extension -> base.
205+ Use when one subject adds capability to another.
206+ Example: ` tool:extension -> module:git-mind ` .
207+ - ` relates-to ` : source -> related.
208+ Use only for low-specificity associations.
209+ Example: ` concept:receipts -> concept:provenance ` .
146210
147211Use ` relates-to ` only when a stronger edge would be dishonest. If the evidence
148212can justify ` documents ` , ` references ` , ` implements ` , ` groups ` , or ` touches ` ,
149213prefer the stronger type.
150214
215+ ## Assertion Identity
216+
217+ Git Mind does not currently model edges as first-class ` edge: ` nodes. The
218+ canonical identity for an assertion is the edge tuple:
219+
220+ ``` text
221+ (source, target, type)
222+ ```
223+
224+ Examples:
225+
226+ ``` text
227+ (file:src/bootstrap.js, spec:bootstrap-json, implements)
228+ (doc:README, issue:322, references)
229+ ```
230+
231+ Query receipts, import/export contracts, diagnostics, and review decisions
232+ should cite this tuple key unless a future schema version deliberately adds
233+ first-class assertion IDs. Do not invent synthetic graph nodes such as
234+ ` edge:abc123 ` or ` assertion:xyz ` without updating this model, the validators,
235+ and the affected feature profiles.
236+
151237## Assertion Properties
152238
153239The current runtime already uses these edge properties:
@@ -165,7 +251,7 @@ Feature work should converge on these additional conventions:
165251| ----------| ---------|
166252| ` origin ` | ` manual ` , ` import ` , ` bootstrap ` , ` inference ` , ` review ` , or ` extension ` |
167253| ` detector ` | Rule, parser, importer, or tool that produced the assertion |
168- | ` evidence ` | Stable evidence references such as paths, headings, line spans, commits, or URLs |
254+ | ` evidence ` | Stable paths, headings, line spans, commits, or URLs |
169255| ` observer ` | Trust or observer context used when the edge was read or written |
170256| ` schemaVersion ` | Machine contract version for structured edge metadata |
171257
@@ -202,8 +288,9 @@ flowchart LR
202288``` mermaid
203289flowchart LR
204290 Question["spec:query-question"] -->|references| Target["module:bootstrap"]
205- Answer["doc:answer-json"] -->|references| EdgeA["doc:README documents module:bootstrap"]
206- EdgeA -->|references| Evidence["file:README.md"]
291+ Doc["doc:README"] -->|documents| Target
292+ Answer["doc:answer-json"] -->|references| Doc
293+ Answer -->|references| Target
207294 Reviewer["person:maintainer"] -->|references| Answer
208295```
209296
@@ -212,7 +299,7 @@ flowchart LR
212299``` mermaid
213300flowchart LR
214301 Suggestion["file:src/bootstrap.js"] -->|implements| Contract["spec:bootstrap-json"]
215- Decision["decision:accept-bootstrap-edge"] -->|documents | Contract
302+ Decision["decision:accept-bootstrap-edge"] -->|references | Contract
216303 Decision -->|references| Suggestion
217304 Reviewer["person:reviewer"] -->|references| Decision
218305```
0 commit comments