codenav: code intelligence instead of code search
Problem
Every AI coding session was re-deriving patterns that already existed somewhere in the codebase — grep is fast but blind to structure, so agents kept rewriting working code instead of finding it.
Approach
We built a Rust code-intelligence engine that indexes a repository into a symbol graph (redb) and a full-text search index (Tantivy), then serves navigation, impact analysis and security audits over a single MCP tool surface any agent can call.
Outcome
codenav now runs indexing daily across our own toolchain: reuse-before-write is a standing rule, refactors ship with a measured blast radius, and the same engine backs the code intelligence in our client work.
Links
Part of
Related
Referenced by
codenav is the studio's own answer to a problem every AI-assisted codebase runs into: search finds text, not structure. A grep for a function name has no idea it's calling into three other modules, or that a "duplicate" helper is actually load-bearing.
We indexed the problem instead of working around it. codenav builds a symbol graph — definitions, callers, callees, trait implementors — backed by an embedded database, alongside a BM25 search index for the fuzzy cases grep is good at. One MCP server exposes both to any agent: navigate, explain, search, diff-impact, security audit.
The result changed how we build. Reuse-before-write stopped being a discipline we had to remember and became a tool call we make first. Refactors ship with an actual measured blast radius instead of a hopeful guess. And because the same engine now indexes Rust, TypeScript, Svelte and Python, it travels with every project in the studio's toolchain — including the one that renders this page.