Glossary · Repomap (Code Graph Retrieval)

Repomap (Code Graph Retrieval).

Who calls this, answered in tokens, not files.

The short answer

A repomap parses repositories into symbol graphs (tree-sitter + PageRank-style ranking) so agent questions (callers, dependencies, blast radius, covering tests) return short identifier lists instead of whole files.

Read the full answer

Retrieval by relationship beats retrieval by similarity for code: 'the definition plus three call sites' instead of '50 files mentioning the string.' Measured wins include multi-minute refactors collapsing to a few tool calls at double reward.

Repomap (Code Graph Retrieval), working

Session 1 asks. Session 47 already knows.

The same request twice: first the agent explores, later the Mind serves what earlier sessions settled.

anv · session replayillustrative
  1. add a --json flag to `ledger export`
  2. grep "export" src/: ok, 14 matches
  3. read_file src/main.rs: ok, 212 lines
  4. read_file src/cli/mod.rs: ok, 148 lines
  5. read_file src/export/csv.rs: ok, 96 lines
  6. Formats implement Render. Adding a Json renderer beside csv.
  7. rewrite_file src/export/json.rs: ok, +38
  8. edit_file src/cli/mod.rs: ok, +6
  9. run_command cargo test -p ledger: failed, E0432 unresolved import serde_json
  10. serde_json is optional in Cargo.toml, behind the json feature.
  11. run_command cargo test -p ledger --features json: ok, 42 passed
  12. done · 8 tool calls · 1 failed run
Illustrative transcript; each recalled weight uses its kind's shipped decay rate at the age shown.

In Anvaya

How we implement it.

Repomap (Code Graph Retrieval)The Anvaya repomap indexer: tree-sitter tags, PageRank slicing, multi-root, watcher-based incremental re-index, enriched tags feed Prism and plan mode.

Questions

Asked about Repomap (Code Graph Retrieval).

Graph vs vector search for code?

Both: vectors catch 'code that does similar things', graphs answer 'who calls/depends on this' exactly. Structure first, similarity second.

Why does grep-and-open fail agents?

Forty matches pasted in full cost tens of thousands of tokens and thin attention; a caller list costs hundreds and is exact.

What must the index guarantee?

Branch-awareness and freshness, an index trailing your edits curates wrong tokens with full confidence.

Run agents that fit on your laptop.

23.4 MB median own-process memory, measured across 1030 runs (994 verified) and fourteen harnesses. One command installs the harness and the Mind together. Nothing leaves your machine on the Ollama path.

Developer beta. macOS on Apple Silicon and Linux on x86_64 or arm64. Memory figure: --no-mind, macOS/ARM, n=3 per cell. Pre-1.0, pricing not set.