← All posts
Code Intelligence

The AI code assistant that reads your whole repo

Codna maps your entire codebase in milliseconds, then hands a coding agent the exact context it needs.

How Codna works: map the repo, understand it, retrieve exact context, guide the agent.
How Codna works: map the repo, understand it, retrieve exact context, guide the agent.

Ask an AI code assistant to fix a bug in an unfamiliar service, and watch what it does first: it starts reading. It opens a file, then another, then greps for a function name and opens four more. Each pass costs tokens and time, and the agent still arrives at the edit half-blind — having sampled the codebase rather than understood it.

Codna inverts that order. It reads the entire repository before the agent writes a single line, building a structural map of the whole project in milliseconds. Agents read your code. Codna understands it.

Why an AI code assistant reads blind

A large repository is not a folder of text. It is a graph — of imports, call sites, type definitions, and the quiet conventions a team has accumulated over years. When an AI coding agent walks into that graph file by file, it pays twice: once in tokens spent re-reading what it has already seen, and once in mistakes it makes because it never saw the part that mattered.

The failure is rarely dramatic. The agent patches the symptom and misses the shared helper three directories over. It duplicates a utility that already exists. It changes a signature without noticing the seven callers downstream. None of these are reasoning failures. They are context failures — the model was never shown enough of the codebase to know better.

Most bad AI edits aren't reasoning errors. They're missing-context errors.

The usual fix is to send more text: stuff the prompt with files and hope the relevant lines are in there somewhere. That trades one problem for another. Context windows fill, costs climb, and the signal the agent actually needs gets buried under everything it doesn't.

Map first, then act

Codna's premise is that understanding a codebase and editing it are two different jobs, and they should run on two different engines. The mapping engine does the expensive structural work once and keeps it current. The coding agent does the writing, arriving with precise context instead of a reading list.

That mapping happens for zero tokens. Codna indexes the repository with static analysis rather than by feeding source code through a language model, so building and refreshing the map of a million-line project costs nothing in inference. The model's budget is spent where it earns its keep — on the change itself, not on rediscovering the project from scratch every session.

The result is an AI-powered coding assistant that treats codebase context as infrastructure. The map is always there, always fresh, and queryable in the instant before an agent needs it.

Understand. Fix. Evolve.

The loop has four steps, and they run in order every time the agent goes to work.

First, Codna maps the repo — parsing the project into a structural index of files, symbols, dependencies, and call graphs. Second, it understands that map, resolving how the pieces relate so a query about one function knows about the code that calls it and the code it depends on. Third, when a task arrives, Codna retrieves context — pulling the exact slice of the codebase the change touches, and nothing more. Fourth, it guides the agent, handing over that focused context so the coding agent edits with the same awareness a senior engineer would carry in their head.

Understand. Fix. Evolve. The naming is deliberate. Understanding comes before the fix because a fix without understanding is a guess, and evolution — refactors, migrations, the slow improvement of a system over time — is only safe when every change is grounded in the whole.

What precise context changes

When the agent stops reading blind, the difference shows up in the work, not the demo.

  • Edits land in the right place because the agent can see every caller of the function it's touching
  • Token spend drops because the model isn't paying to re-read files on every turn
  • Refactors get safer, since the map surfaces the full blast radius of a change before it ships
  • Onboarding to an unfamiliar repo stops being a guessing game — the structure is already charted

This is the line between an AI coding agent and genuine code intelligence. One reads as much as it can afford. The other knows what to read before it starts. Among AI code assistant tools, the distinction is easy to miss in a quick trial and impossible to miss across a quarter of real work — it is what separates a clever autocomplete from the best AI code assistant for a codebase you actually have to maintain.

Built for the repos you already have

Codna runs against real projects — the large, layered, partly-undocumented ones, not the tidy examples in a tutorial. It works alongside the coding agents teams already use, including as an AI code assistant for VS Code, so the map informs the tools developers reach for rather than replacing them. The point was never to add another window. It was to make the agent in the window you have arrive already knowing where it is.

As systems grow, the gap between reading code and understanding it only widens, and the assistants that close it will be the ones that map before they act. Codna is live, and it is built for that future — where understanding the codebase is the first thing your tools do, not the last.

Get updates →