Skip to content

Commit 6aeec3b

Browse files
authored
Merge pull request #323 from flyingrobots/docs/feature-profiles-test-plans
Add feature profiles and graph data model
2 parents ce1509a + 0380c43 commit 6aeec3b

28 files changed

Lines changed: 3142 additions & 25 deletions

GRAPH_SCHEMA.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
> Ref: #180 (BDK-001)
66
>
77
> This document is the graph contract, not the canonical product narrative.
8-
> 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.
8+
> Some prefixes and examples reflect legacy manual-authoring and roadmap-oriented
9+
> workflows that remain supported, but they are not the current center of the
10+
> product story.
11+
> The product-level node and edge vocabulary lives in
12+
> [docs/design/graph-data-model.md](docs/design/graph-data-model.md).
913
1014
---
1115

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ 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)
179+
- [docs/design/feature-profiles/README.md](docs/design/feature-profiles/README.md)
178180
- [docs/design/repo-fixture-strategy.md](docs/design/repo-fixture-strategy.md)
179181
- [docs/adr/](docs/adr/)
180182

ROADMAP.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ Goal:
124124

125125
Deliverables:
126126

127-
- git-warp audit / upgrade cycle before major Hill 1 implementation (issue [#312](https://github.com/flyingrobots/git-mind/issues/312))
128127
- bootstrap command contract with default write behavior and `--dry-run`
129128
- canonical repo fixture substrate for repository-shaped bootstrap scenarios (issue [#311](https://github.com/flyingrobots/git-mind/issues/311))
130129
- repo-local artifact inventory and scan boundaries
@@ -135,6 +134,12 @@ Deliverables:
135134
- acceptance criteria translated into failing executable tests (issue [#310](https://github.com/flyingrobots/git-mind/issues/310))
136135
- implementation issues `#304` through `#307`, plus enabling test issues [#310](https://github.com/flyingrobots/git-mind/issues/310) and [#311](https://github.com/flyingrobots/git-mind/issues/311), moved into merged runnable behavior
137136

137+
Completed enabling work:
138+
139+
- git-warp audit and upgrade cycle completed in issue [#312](https://github.com/flyingrobots/git-mind/issues/312)
140+
- isolated git-warp v17 upgrade fixture harness completed in issue
141+
[#320](https://github.com/flyingrobots/git-mind/issues/320)
142+
138143
Exit criteria:
139144

140145
- `git mind bootstrap` runs end-to-end on a representative unfamiliar repository
@@ -147,6 +152,8 @@ Primary references:
147152

148153
- [docs/design/git-mind.md](docs/design/git-mind.md)
149154
- [docs/design/h1-semantic-bootstrap.md](docs/design/h1-semantic-bootstrap.md)
155+
- [docs/design/graph-data-model.md](docs/design/graph-data-model.md)
156+
- [docs/design/feature-profiles/README.md](docs/design/feature-profiles/README.md)
150157
- [docs/design/git-warp-upgrade-audit.md](docs/design/git-warp-upgrade-audit.md)
151158
- [docs/design/repo-fixture-strategy.md](docs/design/repo-fixture-strategy.md)
152159
- issue [#303](https://github.com/flyingrobots/git-mind/issues/303)

docs/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ 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-
- [git-warp Upgrade Audit](./design/git-warp-upgrade-audit.md) — next enabling cycle before major Hill 1 implementation
15+
- [Graph Data Model](./design/graph-data-model.md) — canonical product node and edge vocabulary
16+
- [Feature Profiles](./design/feature-profiles/README.md) — per-feature IBM
17+
Design Thinking profiles with executable test plans
18+
- [git-warp Upgrade Audit](./design/git-warp-upgrade-audit.md) — completed
19+
enabling cycle before major Hill 1 implementation
1620
- [Git Mind North Star](./VISION_NORTH_STAR.md) — longer-form strategic articulation
1721
- [ADR-0005](./adr/ADR-0005.md) — official planning and governance model
1822
- [ADR-0006](./adr/ADR-0006.md) — official delivery cycle and tests-as-spec model
@@ -80,6 +84,7 @@ When planning work, start with:
8084
2. jobs to be done
8185
3. Hills
8286
4. playback evidence
87+
5. the relevant feature profile and its test plan
8388

8489
Do not start with architecture breadth, an old milestone, or a flat pile of backlog items.
8590

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# Git Mind Feature Profiles
2+
3+
Status: draft planning set for issue #322
4+
5+
This directory breaks the Git Mind product surface into feature profiles. Each
6+
profile uses the same IBM Design Thinking frame:
7+
8+
- sponsor user
9+
- job to be done
10+
- relevant Hill or supporting lane
11+
- user stories
12+
- requirements
13+
- graph data model usage
14+
- playback evidence
15+
- test plan
16+
17+
The intent is to keep future implementation work from starting as an
18+
architecture exercise. A feature is ready to implement only when the profile can
19+
explain who it helps, what repository-understanding job it improves, and which
20+
tests prove the claim.
21+
22+
## Sponsor User
23+
24+
The shared sponsor user for this profile set is a technical lead, staff
25+
engineer, architect, or autonomous coding agent entering an unfamiliar
26+
repository and needing a trustworthy semantic map quickly.
27+
28+
## Product Hills
29+
30+
- Hill 1: Zero-input semantic bootstrap
31+
- Hill 2: Queryable answers with receipts
32+
- Hill 3: Living map with low manual upkeep
33+
34+
Supporting lanes exist to strengthen those Hills. They are not product centers
35+
by themselves.
36+
37+
## Profile Catalog
38+
39+
### Hill 1: Semantic Bootstrap
40+
41+
- [Bootstrap Command](./bootstrap-command.md)
42+
- [Repo Fixture Builder](./repo-fixture-builder.md)
43+
- [Artifact Inventory](./artifact-inventory.md)
44+
- [Entity Extraction](./entity-extraction.md)
45+
- [Relationship Inference](./relationship-inference.md)
46+
- [Provenance And Confidence](./provenance-confidence.md)
47+
- [Review Refinement](./review-refinement.md)
48+
49+
### Hill 2: Queryable Answers With Receipts
50+
51+
- [Query Receipts](./query-receipts.md)
52+
- [Views And Lenses](./views-lenses.md)
53+
- [Time Travel And Semantic Diff](./time-travel-diff.md)
54+
- [Import Export Interchange](./import-export-interchange.md)
55+
- [Agent Contracts](./agent-contracts.md)
56+
57+
### Hill 3: Living Map With Low Manual Upkeep
58+
59+
- [Living Map Updates](./living-map-updates.md)
60+
- [Doctor And Integrity](./doctor-integrity.md)
61+
- [Trust And Observer Contexts](./trust-observers.md)
62+
63+
### Supporting Lanes
64+
65+
- [Graph Substrate](./graph-substrate.md)
66+
- [Content On Node](./content-on-node.md)
67+
- [Extensions Runtime](./extensions-runtime.md)
68+
- [Packaging And Adoption](./packaging-adoption.md)
69+
70+
## Common Test Plan Taxonomy
71+
72+
Each profile should name tests in these buckets.
73+
74+
- Fixtures: repository or graph shapes needed to test the feature.
75+
- Golden path: expected behavior on representative clean inputs.
76+
- Edge cases: valid but tricky inputs.
77+
- Known failures: invalid inputs, ambiguity, missing dependencies, or blocked
78+
features that must fail predictably.
79+
- Regression cases: bugs or review findings that must not return.
80+
- Fuzz cases: generated or randomized inputs that probe parser, scanner, or
81+
graph assumptions.
82+
- Stress cases: large or deep scenarios that protect performance and memory
83+
behavior.
84+
- Golden artifacts: stable snapshots, schema samples, or CLI output contracts
85+
that can be compared over time.
86+
- Playback evidence: the human or agent demonstration that proves the Hill
87+
moved, not just that code ran.
88+
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+
101+
## Fixture Strategy
102+
103+
Repository-shaped behavior should use the canonical fixture strategy:
104+
105+
1. fluent repo builder first
106+
2. reusable base repos second
107+
3. scenario overlays for history, ambiguity, and references
108+
4. archived snapshots only when exact Git object state is the subject
109+
110+
Feature profiles may request new base repos or overlays. They should not
111+
invent one-off setup patterns unless the risk is truly local to the test.
112+
113+
## Implementation Sequencing
114+
115+
The recommended next implementation sequence remains:
116+
117+
1. Bootstrap command contract and JSON output
118+
2. Fixture builder support needed by bootstrap tests
119+
3. Artifact inventory
120+
4. Entity extraction
121+
5. Relationship inference
122+
6. Provenance and confidence surfacing
123+
7. Review refinement and query receipts
124+
125+
That sequence keeps Hill 1 executable before expanding into richer query and
126+
living-map work.
127+
128+
## Review Rule
129+
130+
When a feature profile and implementation disagree, update the profile or stop
131+
the implementation. Silent divergence is product debt.
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Feature Profile: Agent Contracts
2+
3+
Status: draft for Hill 2 implementation
4+
5+
Related:
6+
7+
- [CLI Contracts](../../contracts/CLI_CONTRACTS.md)
8+
- [Git Mind Product Frame](../git-mind.md)
9+
10+
## IBM Design Thinking Frame
11+
12+
Sponsor user:
13+
14+
- An autonomous coding agent operating on repository knowledge.
15+
16+
Job to be done:
17+
18+
- When I use Git Mind as a machine-facing contract boundary, give me stable
19+
commands, schemas, error behavior, and receipts I can trust.
20+
21+
Hill:
22+
23+
- Hill 2: Queryable answers with receipts.
24+
25+
Playback evidence:
26+
27+
- An agent can call Git Mind commands, parse JSON responses, handle typed
28+
errors, and cite receipts without prompt-specific guesswork.
29+
30+
## User Stories
31+
32+
- As an agent, I can request JSON for every read-oriented command.
33+
- As an agent, I can validate responses against schemas.
34+
- As an agent, I can tell no-answer, low-confidence answer, and command failure
35+
apart.
36+
- As a maintainer, I can detect contract drift in CI.
37+
38+
## Requirements
39+
40+
### Functional
41+
42+
- Every machine-facing JSON output must include `schemaVersion`.
43+
- CLI commands must have predictable exit codes and typed error envelopes.
44+
- Schemas must exist for stable command families.
45+
- Contract tests must exercise representative command output.
46+
- Agent-facing docs must state which commands are stable, transitional, or
47+
experimental.
48+
49+
### Non-Functional
50+
51+
- Contracts must be deterministic.
52+
- Breaking changes require versioning.
53+
- Human formatting changes must not break JSON contracts.
54+
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+
69+
## Test Plan
70+
71+
Fixtures:
72+
73+
- `contract-canary-repo`
74+
- `no-answer-repo`
75+
- `invalid-command-repo`
76+
- `large-output-repo`
77+
78+
Golden path:
79+
80+
- JSON outputs validate against schemas.
81+
- Error outputs distinguish usage, validation, graph, and environment failures.
82+
- Contract canaries cover status, nodes, views, export, import, review, diff,
83+
content, and future query responses.
84+
85+
Edge cases:
86+
87+
- Empty graph.
88+
- Large graph.
89+
- No-answer query.
90+
- Low-confidence answers.
91+
- Observer/trust-filtered contexts.
92+
93+
Known failures:
94+
95+
- Missing `schemaVersion` fails CI.
96+
- Unknown JSON field policy is explicit.
97+
- Invalid command args return typed error.
98+
99+
Fuzz:
100+
101+
- Generate valid and invalid command arguments.
102+
- Generate schema-valid and schema-invalid payloads.
103+
- Generate random graph state and validate JSON stability.
104+
105+
Stress:
106+
107+
- Large JSON output with bounded memory.
108+
- Repeated command invocation from clean environment.
109+
- Parallel command reads.
110+
111+
Regression:
112+
113+
- Contract snapshots remain stable.
114+
- Error taxonomy does not collapse into generic failures.
115+
- JSON mode never prints decorative human text.
116+
117+
Golden artifacts:
118+
119+
- JSON schema files.
120+
- Golden command outputs.
121+
- Error envelope snapshots.
122+
123+
Playback:
124+
125+
- A coding agent can use Git Mind as a deterministic repo-knowledge API instead
126+
of relying on fragile prompt context.

0 commit comments

Comments
 (0)