Use case

Fix monorepo bugs with Codna

A shared package changes and three apps break. Codna maps the workspace for zero tokens, fixes with the consumers in view, and lists the tests the diff can affect.

The problem

In a monorepo the bug is rarely where it shows.

Codna builds a dependency and blast-radius graph of the repository from its import patterns. No model call, zero tokens. Cross-package imports are edges in that graph, so a change in a shared library carries its consumers into the blast radius, and the agent fixes with them in view.

How Codna fixes it

How Codna fixes it

1

Map the workspace

Codna builds a dependency and blast-radius graph of the repository from its import patterns. No model call, zero tokens.

2

Fix with consumers in view

The agent receives an evidence bundle scoped to the issue: the suspect files, the call paths, the failing test. Codna prints the raw-to-bundle token size on every run. Every fix reports root cause, confidence, blast radius and regression risk, and passes a risk gate before it is applied or a pull request opens.

3

Run the tests that matter

codna impact lists the tests a diff can affect, offline and for zero tokens. Run codna fix --tests --apply and Codna runs your tests in a sandbox and re-fixes until they pass, up to the iteration limit you set. Set fix.test_command in codna.yaml, or pass --test-cmd, when your runner is not pytest.

codna fix . --issue "auth token refresh broke after the shared http-client change"
codna impact --base origin/main --head HEAD

What you get

What you get

Blast radius across packages

Codna reports what the change reaches, including consumers in other packages.

Test selection

codna impact prints one test path per line, or ALL when the change touches shared core.

Any package manager

The map is built from imports, not from a workspace tool.

The proof

Fewer tokens. Faster. Verified.

Codna16K
Cursor81K
Average tokens per fix on 87 matched bug-fix cases: Codna and Cursor.

Frequently asked

Codna builds a dependency and blast-radius graph of the repository from its import patterns. No model call, zero tokens. The consumers of a changed package are in the blast radius, and Codna reports it on the fix.

Yes. The evidence bundle includes the call paths into the suspect package, and codna impact names the tests across the workspace the diff can affect.

Because the agent should start with the answer to "what does this reach". On 87 matched bug-fix cases against Cursor, Codna averaged 16,159 total tokens and about $0.02 of model spend per verified fix, 5× fewer tokens and 1.7× faster. With your own key you pay your provider directly.

The map comes from import patterns, so the workspace tool does not matter. Set fix.test_command to your workspace test command.

On 87 matched bug-fix cases against Cursor, Codna averaged 16,159 total tokens and about $0.02 of model spend per verified fix, 5× fewer tokens and 1.7× faster. With your own key you pay your provider directly.

Understanding runs on your machine and spends no tokens. Only the evidence bundle or the diff reaches your model provider, with your key from the OS keychain. Set privacy.egress to fail-closed in codna.yaml and Codna runs your tests only under kernel-level network denial. Secret redaction is always on.

Understand. Fix. Evolve.