MITupdated 7d ago
Spine reads a repository's Product Knowledge Graph β a deterministic, no-LLM index of its modules, types, functions, call sites, and blast radius, with every fact grounded to file:line. It covers Python, Java, TypeScript, C#, C, C++, Go and SQL. These MCP tools turn that graph into decisions, not just lookups: what a change breaks, what's untested, where work lands. They're read-only, need no credentials, and take a local repopath (default: the current repository).
What can you do with Understand Codebase?
name: understand-codebase description: >- Understand an unfamiliar codebase or plan a change safely, using Spine's deterministic knowledge-graph MCP tools. Reach for this before answering structural questions about a repo you don't know, before editing code, or when debugging β it hands you engineering decisions (what a change breaks, what's untested, where a ticket or bug lands), each grounded to file:line. Triggers: "how does this repo work", "what breaks if I change X", "where do I fix this / where does this land", "what's untested here", "explain this symbol", "map this codebase", "which docs cover this", "what depends on this in our other services". Tools: map_repo, blast_radius, explain_symbol, investigate, localize, regression_gaps, root_cause, docs_for, pkg_joins (all read-only, no credentials, from the Spine plugin).
Understand a codebase with Spine
Spine reads a repository's Product Knowledge Graph β a deterministic, no-LLM index of its
modules, types, functions, call sites, and blast radius, with every fact grounded to file:line.
It covers Python, Java, TypeScript, C#, C, C++, Go and SQL.
These MCP tools turn that graph into decisions, not just lookups: what a change breaks, what's
untested, where work lands. They're read-only, need no credentials, and take a local
repo_path (default: the current repository).
Use them before grepping or guessing about an unfamiliar repo β they're faster and more accurate, and they cite their sources.
Which tool for which question
| You want to⦠| Call |
|---|---|
| get oriented in a repo you don't know | map_repo β languages, components, call-hotspots, test-coverage gaps, prioritized recommendations |
| know what changing a symbol will affect | blast_radius(symbol=β¦) β direct callers + the cross-layer set a change ripples into, each file:line |
| understand one symbol | explain_symbol(symbol=β¦) β kind, location, who calls it, what it calls, what it contains |
| find where a feature/ticket lands | investigate(title=β¦, problem=β¦) β the real symbols to start from |
| pin a bug from a stack trace | localize(trace=β¦) β resolve each frame to the repo symbol; the likely fault site |
| see what a change could break silently | regression_gaps(symbol=β¦ or trace=β¦) β blast-radius symbols with no covering test |
| root-cause a bug (hypotheses + fix approach) | root_cause(bug=β¦) β fault site, ranked hypotheses with evidence, regression surface, fix approach; deterministic (add use_llm=true for richer hypotheses) |
| find which docs describe code (or how documented it is) | docs_for(symbol=β¦) β the doc pages that mention a symbol; call with no symbol for a doc-coverage summary + top drift. Ingests .md/.rst/.txt/PDF |
| ask any of the above across several repositories | blast_radius(repos=β¦) / investigate(repos=β¦) β pass a .spine/repos.yaml instead of repo_path |
| see or sanity-check the cross-repo topology | pkg_joins(config=β¦, mode="propose"|"check") β read-only; it never writes a config |
Read a repo's committed knowledge base with read_memory_bank when one exists (built by
orchestrator understand).
repo_path defaults to the current repository, and also accepts a git URL (e.g.
https://github.com/org/repo) β Spine shallow-clones it, extracts, and cleans up.
More than one repository
When a change's real blast radius leaves the repo, a single-repo answer is worse than no answer.
An HTTP handler reports 0 caller(s) β which is true, nothing in its own source calls it β
and reads as safe to change.
If the project declares its services in a .spine/repos.yaml, pass it as repos= to
blast_radius or investigate instead of repo_path. Every match then also reports the
dependents it has in other repositories:
- **billing** Β· `create_order` (Function, 0 caller(s), **1 dependent(s) in other repos**) β billing:app/routes.py:7
- The topology is declared, not guessed β a
joins:entry narrows the search; it does not invent the edge.pkg_joins(mode="propose")derives candidates from the evidence and prints them for review;pkg_joins(mode="check")reports the calls no declared join could place. Runcheckbefore trusting a quiet result: a missing join looks exactly like two services that aren't coupled, which reads as health. - Every multi-repo answer carries a
standingblock. Ifreproducibleisfalse, one of the declared repos has uncommitted work β say so rather than quoting a number nothing can reproduce. map_repois single-repo only; there's no merged profile behind it. Call it per repository.- If a single-repo answer comes back carrying
multi_repo_available, stop and re-ask. It means the repo you pointed at declares siblings in its own.spine/repos.yaml, so the answer you have covers one of them. Nothing errored β pointing a tool at a directory always works β which is exactly why the note is there. Re-run with therepos=path it gives you before telling anyone a symbol is safe to change.
How to work
- Orient first. For an unfamiliar repo, call
map_repobefore answering structural questions or planning a change β one call beats many greps. - Check the blast radius before editing.
blast_radius(symbol=β¦)shows who depends on what you're about to touch;regression_gapsshows what has no test, so you know what could break silently. - For a bug, go trace β fault β coverage.
localize(trace=β¦)finds the fault site; thenregression_gaps(trace=β¦)shows the coverage around it. - Cite
file:line. Every tool returns provenance and amarkdownfield you can show the user directly β ground your answer in it rather than paraphrasing.
Good to know
- Deterministic: same commit in β same answer out (a commit-keyed cache makes re-runs cheap).
- Structured + readable: each tool returns typed fields (symbols, counts,
file:line, gaps) and amarkdownrendering. - Understanding vs. changing: these tools only read. Between them and codegen sits a middle
tier β
sdlc_planwrites a twelve-section build document (still no model, no credentials: it's rendered from the graph, git and the tree) andsdlc_approverecords the decision on it. To actually change the code β spec β grounded codegen β tests β branch/PR β use Spine's gatedsdlc_feature, which requires an explicitconfirmfor any external write. Work down the tiers: comprehend, then plan and get the plan approved, then build.
Install
Add Understand Codebase to your client. Pick the one you use.
npx skills add synaptixs/spineInstalls every skill in the repository, then prompts for which to keep.
/plugin marketplace add synaptixs/spineAdds the repository as a plugin marketplace; install individual plugins with `/plugin install`.
git clone https://github.com/synaptixs/spine
cp -r plugins/spine/skills/understand-codebase ~/.claude/skills/A skill is a plain directory. Copy it into `.claude/skills/` in a project or in your home directory.
Score
78 / 100
Good