Map the whole graph, not a budget
Codna builds the full dependency and blast-radius graph deterministically — no PageRank sample, no LLM, ~60ms per repo for zero tokens.
Both fix bugs from the command line. The difference is what they read first, and what they prove after. Aider ranks files into a token budget and reads them through the model. Codna maps the whole repo deterministically for zero tokens, then ships only fixes that pass your tests.
The problem
Aider is a strong open-source pair-programmer, and its repo map is genuinely clever: it parses your code with tree-sitter, builds a graph of symbol definitions and references, and runs a personalized PageRank to rank files by relevance — then trims that ranking to fit a token budget (about 1k tokens by default). It is a smart way to pick what to show the model. But it is a ranked sample, not the full dependency and blast-radius graph, so a cause that lives just outside the budget can be missed. From there the model reads the actual files and commits what it writes; auto-commit and auto-lint are on by default, but running your tests is opt-in (--auto-test), so by default nothing proves the change is correct before it lands.
How Codna fixes it
Codna builds the full dependency and blast-radius graph deterministically — no PageRank sample, no LLM, ~60ms per repo for zero tokens.
The agent receives a ~600-token bundle: the suspect files, the call paths, and the failing test — drawn from the real graph, not a token-budget cut.
The patch must pass your test suite. A fix that fails tests never ships — verification is the gate, not an opt-in flag.
codna fix . --issue "the checkout test is failing"
What you get
Codna maps the full dependency and blast-radius graph deterministically — no PageRank ranking trimmed to a ~1k-token budget, no embeddings, no LLM. Because it reasons over the whole graph, a cause that lives just outside the budget still gets found. The map runs in about 60ms per repo for zero tokens.
Every Codna fix has to pass your test suite before it ships; a patch that fails never lands. Aider can run tests with --auto-test, but by default it auto-commits without proving the change is correct.
Codna does the understanding for zero tokens and hands the agent a ~600-token evidence bundle instead of reading files through the model, so a verified fix costs pennies at public model rates. You still bring your own key and can self-host.
The proof
Either. Codna is the deterministic understanding layer plus a test gate, so it can run on its own from the CLI, or feed its evidence bundles through the MCP server to the agent and model you already drive in Aider. Many teams keep Aider for free-form pair-programming and add Codna where they need the full graph and a verified result.
It is built from one, but it is used as a ranked sample trimmed to a token budget — about 1k tokens by default — so the model reads the top-ranked files. Codna keeps the full dependency and blast-radius graph and reasons over it deterministically, so a cause that lives just outside the budget still gets found.
It can, if you opt in with --auto-test and a test command. By default Aider auto-commits and auto-lints but does not run your tests, so nothing proves the change is correct before it lands. Codna makes a passing suite the gate by default — a fix that fails tests never ships.
Codna is model-agnostic and bring-your-own-key, like Aider, so you point it at the frontier or local model you already use. The understanding tier is deterministic and language-agnostic — 130 repos across 110 languages mapped in 9.2s for zero LLM tokens in the benchmark — and verification runs against whatever test runner your project already has.
Aider's CLI is free and you pay only model API costs. Codna's argument isn't price, it's the deterministic understanding layer and the test gate: about $0.04 per verified fix, because it works from a ~600-token evidence bundle — roughly 162x less context than reading the repo through the model, versus around $1 for a typical agentic edit that reads the whole repo.
Yes. Codna supports self-hosting with your own keys, fail-closed egress, and no training on your code. It ships as a CLI, an MCP server, and a native GitHub App, so the deterministic graph and the test gate fit the workflow you already run with Aider.
Related