Repo docs

Per-repo documentation — each repo's docs/ and README, ingested and associated with the repo. Rendered through the <<<RepoDocs>>> tag.

← source docs · spec_graph_mcp/README.md

spec-graph-mcp

The RFC→code provenance hub the tournament + topology analysis predicted, materialised as a real MCP service. It holds an id→node index (the load-bearing hub the corpus organises around) backed by a content-hash cache (so a rebuild re-scans only changed files and reports drift).

Built on the shared framework primitives (tournaments/arena.py).

Tools

| tool | returns | |---|---| | surface | overview: #requirements · #linked · #gaps · top code hubs | | link_requirement(req_id) | the code nodes implementing a requirement (provenance); fuzzy did_you_mean on miss | | gaps | requirement ids with NO implementing code (compliance gaps) | | atomic_read(path,start,end,max_tokens) | file/range with a token header; withholds over budget | | blame(path,n) | compact churn summary | | refresh | re-scan via content-hash cache; returns files whose content drifted |

Run

SPECGRAPH_RFC="/path/SPEC.md" SPECGRAPH_PKGS="/path/pkgA:/path/pkgB" python -m spec_graph_mcp
python tests/test_spec_graph.py     # self-verifying (temp fixture + drift)

Provenance

Predicted by the spec-ast-graph tournament (converged G3, F1 0.94, prec 1.0) and corroborated by the corpus topology (id-citation edges are the low-resistance bridge; the hub is an id-indexed module). This class IS that prediction, made testable. See tournaments/MANIFEST.md.