Map the TypeScript repository
Codna builds a dependency and blast-radius graph of the repository from its import patterns. No model call, zero tokens.
Codna maps your TypeScript repository for zero tokens, fixes from evidence, and runs your test command until it passes.
The problem
A type error in one package often starts in another. Codna builds a dependency and blast-radius graph of the repository from its import patterns. No model call, zero tokens. Barrel files and re-exports are edges in that graph, so the agent follows them instead of guessing.
How Codna fixes it
Codna builds a dependency and blast-radius graph of the repository from its import patterns. No model call, zero tokens.
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.
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. With --open-pr, or through the GitHub App, the pull request states the issue, the root cause, the symbols touched and a confidence score, and asks for review before merging. Codna never merges.
pip install codna codna fix . --issue "ky: prefixUrl is dropped when baseUrl is set" codna fix . --tests --apply --test-cmd "npx vitest run --reporter=junit --outputFile=$CODNA_JUNIT"
What you get
Vitest, Jest or node:test: pass --test-cmd or set fix.test_command. The command writes JUnit to $CODNA_JUNIT.
On-device recall parses .ts and .tsx with tree-sitter. Zero cloud round-trips.
codna impact lists the tests a diff can affect across the workspace, offline and for zero tokens.
The proof
Install with pip, then codna fix . --issue "..." or codna fix . --tests --apply with your test command. 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.
Yes. The map spans the repository, and codna impact narrows a diff to the tests it can affect.
Any runner that can write a JUnit report. Set fix.test_command in codna.yaml or pass --test-cmd.
Both. Run codna fix from the terminal, or give Cursor or Claude the five Codna tools over MCP and work interactively.
Imports are the edges of the map, including re-exports through barrel files. Dynamic imports and reflection are a lower bound.
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.
Related