Map the module graph
Imports, requires, dynamic loads, and blast radius — resolved deterministically in about 60ms for zero LLM tokens, with no RAG or embeddings.
Async timing, mixed CommonJS and ESM, and no compiler to catch a typo scatter a JavaScript bug across files. Codna is an AI coding agent that resolves the real module and call graph deterministically, so the fix starts from facts, not guesses.
The problem
A Node failure often traces back through a Promise that resolved out of order, a require that ran a side effect, or a value that quietly became undefined three callers away. There are no types to anchor the search, so engineers burn hours reading files, adding console.logs, and stepping through a stack trace that ends nowhere near the cause. Feeding the whole project to a chat model is slow, lossy, and expensive — it reads everything and still guesses. Codna takes a different path to AI JavaScript debugging: it walks the module graph and async call paths first, then points the agent straight at the suspect function.
How Codna fixes it
Imports, requires, dynamic loads, and blast radius — resolved deterministically in about 60ms for zero LLM tokens, with no RAG or embeddings.
The failing spec, the async call chain, and the suspect functions become a tight bundle of about 600 tokens — 162x less context than reading the whole project.
Codna re-runs your existing Jest, Vitest, or node:test suite; the patch ships only when the failing test passes.
npm i -g codna codna fix . --issue "uploads resolve out of order under load"
What you get
Codna maps your JavaScript and Node repo into a dependency and blast-radius graph in about 60ms — no LLM tokens, no RAG, no embeddings to maintain.
Instead of streaming 100,000+ tokens of source into a model, this JavaScript AI pair programmer fixes from a measured ~600-token bundle — 162x less context.
Each javascript ai bug fix is re-run against your Jest, Vitest, or node:test suite before it lands, at roughly $0.04 per verified fix.
The proof
Codna maps your repo into a dependency graph, hands the agent a ~600-token evidence bundle with the failing spec and async call chain, then verifies the fix against your test suite before it lands.
It is an AI coding agent built for debugging. Rather than suggesting lines as you type, Codna localizes the root cause from the dependency graph and proves the fix green by running your tests.
Yes. The deterministic graph follows both require and import, including dynamic imports, so the fix accounts for how your modules actually load.
All supported. Codna verifies every fix against your existing runner — the failing test is the oracle, so nothing ships unproven.
Codna maps the async call paths from the dependency graph, so it can localize an ordering or race issue even when the trace is shallow or missing.
Yes. Codna self-hosts with your own API key (BYOK), uses fail-closed egress, and never trains on your code. It works via CLI, an MCP server for Cursor or Claude, and a native GitHub App.
Related