Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion GRAPH_SCHEMA.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
> Ref: #180 (BDK-001)
>
> This document is the graph contract, not the canonical product narrative.
> 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.
> 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.
> The product-level node and edge vocabulary lives in
> [docs/design/graph-data-model.md](docs/design/graph-data-model.md).

---

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ Canonical docs:
- [docs/adr/ADR-0006.md](docs/adr/ADR-0006.md)
- [docs/VISION_NORTH_STAR.md](docs/VISION_NORTH_STAR.md)
- [docs/design/git-mind.md](docs/design/git-mind.md)
- [docs/design/graph-data-model.md](docs/design/graph-data-model.md)
- [docs/design/feature-profiles/README.md](docs/design/feature-profiles/README.md)
- [docs/design/repo-fixture-strategy.md](docs/design/repo-fixture-strategy.md)
- [docs/adr/](docs/adr/)

Expand Down
9 changes: 8 additions & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ Goal:

Deliverables:

- git-warp audit / upgrade cycle before major Hill 1 implementation (issue [#312](https://github.com/flyingrobots/git-mind/issues/312))
- bootstrap command contract with default write behavior and `--dry-run`
- canonical repo fixture substrate for repository-shaped bootstrap scenarios (issue [#311](https://github.com/flyingrobots/git-mind/issues/311))
- repo-local artifact inventory and scan boundaries
Expand All @@ -135,6 +134,12 @@ Deliverables:
- acceptance criteria translated into failing executable tests (issue [#310](https://github.com/flyingrobots/git-mind/issues/310))
- 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

Completed enabling work:

- git-warp audit and upgrade cycle completed in issue [#312](https://github.com/flyingrobots/git-mind/issues/312)
- isolated git-warp v17 upgrade fixture harness completed in issue
[#320](https://github.com/flyingrobots/git-mind/issues/320)

Exit criteria:

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

- [docs/design/git-mind.md](docs/design/git-mind.md)
- [docs/design/h1-semantic-bootstrap.md](docs/design/h1-semantic-bootstrap.md)
- [docs/design/graph-data-model.md](docs/design/graph-data-model.md)
- [docs/design/feature-profiles/README.md](docs/design/feature-profiles/README.md)
- [docs/design/git-warp-upgrade-audit.md](docs/design/git-warp-upgrade-audit.md)
- [docs/design/repo-fixture-strategy.md](docs/design/repo-fixture-strategy.md)
- issue [#303](https://github.com/flyingrobots/git-mind/issues/303)
Expand Down
7 changes: 6 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ These describe what Git Mind is now and how work should be judged:
- [ROADMAP.md](../ROADMAP.md) — active Hills, supporting lanes, and playback cadence
- [Git Mind Product Frame](./design/git-mind.md) — IBM Design Thinking style product frame
- [Hill 1 Semantic Bootstrap Spec](./design/h1-semantic-bootstrap.md) — first executable Hill 1 slice
- [git-warp Upgrade Audit](./design/git-warp-upgrade-audit.md) — next enabling cycle before major Hill 1 implementation
- [Graph Data Model](./design/graph-data-model.md) — canonical product node and edge vocabulary
- [Feature Profiles](./design/feature-profiles/README.md) — per-feature IBM
Design Thinking profiles with executable test plans
- [git-warp Upgrade Audit](./design/git-warp-upgrade-audit.md) — completed
enabling cycle before major Hill 1 implementation
Comment thread
flyingrobots marked this conversation as resolved.
- [Git Mind North Star](./VISION_NORTH_STAR.md) — longer-form strategic articulation
- [ADR-0005](./adr/ADR-0005.md) — official planning and governance model
- [ADR-0006](./adr/ADR-0006.md) — official delivery cycle and tests-as-spec model
Expand Down Expand Up @@ -80,6 +84,7 @@ When planning work, start with:
2. jobs to be done
3. Hills
4. playback evidence
5. the relevant feature profile and its test plan

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

Expand Down
131 changes: 131 additions & 0 deletions docs/design/feature-profiles/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Git Mind Feature Profiles

Status: draft planning set for issue #322

This directory breaks the Git Mind product surface into feature profiles. Each
profile uses the same IBM Design Thinking frame:

- sponsor user
- job to be done
- relevant Hill or supporting lane
- user stories
- requirements
- graph data model usage
- playback evidence
- test plan

The intent is to keep future implementation work from starting as an
architecture exercise. A feature is ready to implement only when the profile can
explain who it helps, what repository-understanding job it improves, and which
tests prove the claim.

## Sponsor User

The shared sponsor user for this profile set is a technical lead, staff
engineer, architect, or autonomous coding agent entering an unfamiliar
repository and needing a trustworthy semantic map quickly.

## Product Hills

- Hill 1: Zero-input semantic bootstrap
- Hill 2: Queryable answers with receipts
- Hill 3: Living map with low manual upkeep

Supporting lanes exist to strengthen those Hills. They are not product centers
by themselves.

## Profile Catalog

### Hill 1: Semantic Bootstrap

- [Bootstrap Command](./bootstrap-command.md)
- [Repo Fixture Builder](./repo-fixture-builder.md)
- [Artifact Inventory](./artifact-inventory.md)
- [Entity Extraction](./entity-extraction.md)
- [Relationship Inference](./relationship-inference.md)
- [Provenance And Confidence](./provenance-confidence.md)
- [Review Refinement](./review-refinement.md)

### Hill 2: Queryable Answers With Receipts

- [Query Receipts](./query-receipts.md)
- [Views And Lenses](./views-lenses.md)
- [Time Travel And Semantic Diff](./time-travel-diff.md)
- [Import Export Interchange](./import-export-interchange.md)
- [Agent Contracts](./agent-contracts.md)

### Hill 3: Living Map With Low Manual Upkeep

- [Living Map Updates](./living-map-updates.md)
- [Doctor And Integrity](./doctor-integrity.md)
- [Trust And Observer Contexts](./trust-observers.md)

### Supporting Lanes

- [Graph Substrate](./graph-substrate.md)
- [Content On Node](./content-on-node.md)
- [Extensions Runtime](./extensions-runtime.md)
- [Packaging And Adoption](./packaging-adoption.md)

## Common Test Plan Taxonomy

Each profile should name tests in these buckets.

- Fixtures: repository or graph shapes needed to test the feature.
- Golden path: expected behavior on representative clean inputs.
- Edge cases: valid but tricky inputs.
- Known failures: invalid inputs, ambiguity, missing dependencies, or blocked
features that must fail predictably.
- Regression cases: bugs or review findings that must not return.
- Fuzz cases: generated or randomized inputs that probe parser, scanner, or
graph assumptions.
- Stress cases: large or deep scenarios that protect performance and memory
behavior.
- Golden artifacts: stable snapshots, schema samples, or CLI output contracts
that can be compared over time.
- Playback evidence: the human or agent demonstration that proves the Hill
moved, not just that code ran.

## Shared Graph Model

All feature profiles use the canonical vocabulary in
[Graph Data Model](../graph-data-model.md). Feature-specific graph sections
should show:

- which node prefixes the feature reads or writes
- which edge types the feature creates, updates, filters, or cites
- where confidence, provenance, review, or observer metadata enters the model
- a Mermaid example that a reviewer can compare against the feature's test
fixtures and golden artifacts

## Fixture Strategy

Repository-shaped behavior should use the canonical fixture strategy:

1. fluent repo builder first
2. reusable base repos second
3. scenario overlays for history, ambiguity, and references
4. archived snapshots only when exact Git object state is the subject

Feature profiles may request new base repos or overlays. They should not
invent one-off setup patterns unless the risk is truly local to the test.

## Implementation Sequencing

The recommended next implementation sequence remains:

1. Bootstrap command contract and JSON output
2. Fixture builder support needed by bootstrap tests
3. Artifact inventory
4. Entity extraction
5. Relationship inference
6. Provenance and confidence surfacing
7. Review refinement and query receipts

That sequence keeps Hill 1 executable before expanding into richer query and
living-map work.

## Review Rule

When a feature profile and implementation disagree, update the profile or stop
the implementation. Silent divergence is product debt.
126 changes: 126 additions & 0 deletions docs/design/feature-profiles/agent-contracts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Feature Profile: Agent Contracts

Status: draft for Hill 2 implementation

Related:

- [CLI Contracts](../../contracts/CLI_CONTRACTS.md)
- [Git Mind Product Frame](../git-mind.md)

## IBM Design Thinking Frame

Sponsor user:

- An autonomous coding agent operating on repository knowledge.

Job to be done:

- When I use Git Mind as a machine-facing contract boundary, give me stable
commands, schemas, error behavior, and receipts I can trust.

Hill:

- Hill 2: Queryable answers with receipts.

Playback evidence:

- An agent can call Git Mind commands, parse JSON responses, handle typed
errors, and cite receipts without prompt-specific guesswork.

## User Stories

- As an agent, I can request JSON for every read-oriented command.
- As an agent, I can validate responses against schemas.
- As an agent, I can tell no-answer, low-confidence answer, and command failure
apart.
- As a maintainer, I can detect contract drift in CI.

## Requirements

### Functional

- Every machine-facing JSON output must include `schemaVersion`.
- CLI commands must have predictable exit codes and typed error envelopes.
- Schemas must exist for stable command families.
- Contract tests must exercise representative command output.
- Agent-facing docs must state which commands are stable, transitional, or
experimental.

### Non-Functional

- Contracts must be deterministic.
- Breaking changes require versioning.
- Human formatting changes must not break JSON contracts.

## Graph Data Model Usage

Agent contracts expose [Graph Data Model](../graph-data-model.md) through
machine-readable payloads. Agents should receive canonical node IDs, edge
types, confidence, evidence, and graph refs rather than prose-only context.

```mermaid
flowchart LR
Agent["tool:codex"] -->|references| Contract["spec:agent-answer-contract"]
Contract -->|documents| Query["feature:query-receipts"]
Answer["doc:answer-json"] -->|references| Node["module:bootstrap"]
Answer -->|references| Evidence["doc:h1-semantic-bootstrap"]
```

## Test Plan

Fixtures:

- `contract-canary-repo`
- `no-answer-repo`
- `invalid-command-repo`
- `large-output-repo`

Golden path:

- JSON outputs validate against schemas.
- Error outputs distinguish usage, validation, graph, and environment failures.
- Contract canaries cover status, nodes, views, export, import, review, diff,
content, and future query responses.

Edge cases:

- Empty graph.
- Large graph.
- No-answer query.
- Low-confidence answers.
- Observer/trust-filtered contexts.

Known failures:

- Missing `schemaVersion` fails CI.
- Unknown JSON field policy is explicit.
- Invalid command args return typed error.

Fuzz:

- Generate valid and invalid command arguments.
- Generate schema-valid and schema-invalid payloads.
- Generate random graph state and validate JSON stability.

Stress:

- Large JSON output with bounded memory.
- Repeated command invocation from clean environment.
- Parallel command reads.

Regression:

- Contract snapshots remain stable.
- Error taxonomy does not collapse into generic failures.
- JSON mode never prints decorative human text.

Golden artifacts:

- JSON schema files.
- Golden command outputs.
- Error envelope snapshots.

Playback:

- A coding agent can use Git Mind as a deterministic repo-knowledge API instead
of relying on fragile prompt context.
Loading
Loading