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)anv-repomap: tree-sitter tags, PageRank slicing, multi-root, FS-watcher 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.

Stop Starting From Zero.

One binary. 11+9 Rust crates. 545 tests. Hand-written HNSW index. Three transport modes. Four providers, Ollama, Anthropic, OpenAI, Siemens. Zero API keys required to start. Mind remembers everything after the first session.