Glossary · Repomap (Code Graph Retrieval)

Repomap (Code Graph Retrieval).

Who calls this, answered in tokens, not files.

Direct 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. 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.

In Anvaya

How We Implement It.

01Repomap (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).

Q

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.

Q

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.

Q

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.

25.6 MB median RSS. 25 agents ran in parallel on a Core 2 Duo with 4 GB RAM. Hundreds on your machine. Zero cloud required on the Ollama path.

Requires Rust/cargo to build from source. Linux and macOS today, Windows not yet supported. Pre-1.0, public beta. Pricing TBD.