Skip to content

The knowledge graph

Everything Spine answers is grounded in a Provenance Knowledge Graph (PKG) — a deterministic fact model extracted from your code and your documentation.

Why a graph, not a chat log

Spine’s architecture forbids force-directed layouts: a picture that redraws differently for an identical commit can’t be diffed. Positions are computed once with a seeded layout, so the same commit renders the identical graph every time. Determinism is the feature, not a limitation.

7 node kinds

NodeWhat it is
Modulea file or package
Typeclass, struct, interface
Functiona callable unit
Fieldattribute or constant
EndpointHTTP route / handler
Entitydata-layer table
Docingested documentation

9 edge kinds

IMPORTS · CONTAINS · CALLS · IMPLEMENTS · READS · WRITES · EXPOSES · REFERENCES · MENTIONS

Every edge carries a location. For example:

auth.validate — CALLS → models.get_user
models.get_user — READS → password_hash
docs/auth.md — MENTIONS → auth.validate

Documentation is a first-class citizen

Spine ingests 9 document formats.md .markdown .rst .txt .html .htm .pdf .docx .xlsx — and turns each into a Doc node linked to the symbols it MENTIONS. That’s what powers doc drift: detecting when a document claims a symbol that no longer exists, or says code is tested when it isn’t.