Knowledge graphs

Graph model

The knowledge graph is a directed graph stored in SQLite and serialized to .genome/graph.json.

Incremental builds

After the first full scan, Codegenome can update only changed files. The scan cache at .genome/scan_cache.db avoids re-parsing unchanged content.

Use codegenome analyze . for a standard incremental build, or the legacy CLI:

python -m codegenome --workspace . --build
python -m codegenome --workspace . --build --full

Graph intelligence

Built-in analysis includes:

These power MCP tools like get_dead_code and get_god_nodes. See MCP tools.

Timeline snapshots

Each build can append a snapshot to .genome/watcher.db, enabling:

Query via legacy CLI flags: --dump-timeline, --dump-changes, --dump-churn.

Artifacts

All paths are relative to your workspace root (the project you analyze). Details: Workspace artifacts.