Evidence-based documentation

Every claim, traceable to source.

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.

0.996
call-graph precision
2
languages: TS & Python
0
required LLM calls
MIT
open source
The principle

A missing edge is honest. A wrong edge is not.

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.

What it does

Evidence-grounded

Signatures from the AST, contracts from test assertions, history from git. Each function scored high to none by the evidence behind it.

Precision-measured

A TypeScript compiler oracle grades the call graph. Edges resolve only where the type is known, never by guessing a same-named method.

Typed resolution

Calls resolve through imports and receiver types: this.field.method() binds through the field's declared type, in TypeScript and Python.

Drift-aware

Snapshots flag new, removed, changed, and stale functions, including code whose behavior moved while its signature stayed the same.

Agent-ready

fossilize query returns evidence packs as JSON, with a confidence floor for a high-signal context pack built to be ingested.

Optional AI prose

Pass --ai for summaries grounded strictly in the evidence, capped by a monthly budget and cached. The deterministic core never needs it.

How it works

From source to evidence

1

Parse

Tree-sitter parses source and test files into syntax trees for TypeScript and Python.

2

Resolve

A scope graph links references across files through imports, barrel re-exports, and receiver types, refusing to guess when uncertain.

3

Gather evidence

Tests map to the functions they exercise, coverage attaches by line range, and git supplies authorship and churn.

4

Score

Each function gets a confidence level, high to none, from how many independent evidence sources back it.

5

Generate

Markdown, JSON, and a standalone HTML report, plus a queryable index and a mermaid architecture graph.

6

Detect drift

Snapshots compare against the last run to catch undocumented and silently-stale changes in CI.

Ask it what it knows

The query surface

fossilize query createUser
[
  {
    "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.

Reference

Commands

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.