fossilize documents your code from three sources of truth, the AST, the tests, and git, and refuses to assert anything it cannot prove. A deterministic, evidence-linked record that agents and humans can trust.
Coding agents hallucinate about your own code. fossilize resolves calls through types and imports, declines to guess when it cannot prove a target, and grades its own call graph against the TypeScript compiler, so accuracy is a measurement, not a claim. Every fact is backed by evidence you can verify and scored by how much of it there is.
Signatures from the AST, contracts from test assertions, history from git. Each function scored high to none by the evidence behind it.
A TypeScript compiler oracle grades the call graph. Edges resolve only where the type is known, never by guessing a same-named method.
Calls resolve through imports and receiver types: this.field.method() binds through the field's declared type, in TypeScript and Python.
Snapshots flag new, removed, changed, and stale functions, including code whose behavior moved while its signature stayed the same.
fossilize query returns evidence packs as JSON, with a confidence floor for a high-signal context pack built to be ingested.
Pass --ai for summaries grounded strictly in the evidence, capped by a monthly budget and cached. The deterministic core never needs it.
Tree-sitter parses source and test files into syntax trees for TypeScript and Python.
A scope graph links references across files through imports, barrel re-exports, and receiver types, refusing to guess when uncertain.
Tests map to the functions they exercise, coverage attaches by line range, and git supplies authorship and churn.
Each function gets a confidence level, high to none, from how many independent evidence sources back it.
Markdown, JSON, and a standalone HTML report, plus a queryable index and a mermaid architecture graph.
Snapshots compare against the last run to catch undocumented and silently-stale changes in CI.
[
{
"name": "createUser",
"signature": "(email: string, password: string): Promise<User>",
"confidence": "high",
"callers": ["auth.ts::register"],
"tests": [{ "name": "rejects invalid email", "assertions": ["toThrow"] }],
"coverage": { "covered": true, "branches": "3/4" },
"unresolvedCallCount": 0
}
]unresolvedCallCount tells you whether a function’s call graph is complete, so an absence is never mistaken for certainty.
fossilize .Generate evidence-backed docs: markdown, JSON, HTML, snapshot, and an architecture diagram.
fossilize query <symbol>Emit the evidence packs for matching symbols as JSON on stdout, for agents and tooling.
fossilize drift .Compare against the last snapshot and flag new, removed, changed, and stale functions.
fossilize arch .Print the module dependency graph: entry points, leaf modules, cycles, and a mermaid diagram.
fossilize index .Build and save the function index without generating documents.
fossilize init .Create a .fossilize.json config, auto-detecting source and test directories.
Flags include --ai for prose summaries, --min-confidence for a high-signal context pack, --watch for incremental regeneration, and --quiet for machine-readable output.