Map the build graph
Codna resolves headers, includes, template instantiations, and the CMake target graph with full blast radius — deterministically, for zero LLM tokens.
Header includes, template instantiations, and a sprawling CMake build make C++ bugs hard for an agent to trace. Codna is an AI C++ pair programmer that builds the dependency graph deterministically, so each fix starts from facts, not guesses.
The problem
A failing assertion can trace back through a transitive header, a template specialization, or a translation unit the test never names directly. Engineers lose hours rebuilding, reading link errors, and chasing undefined behavior across files the directory layout doesn't reveal. Feeding the whole tree to a language model is slow and lossy, and the build graph rarely matches what you see on disk. Effective AI C++ debugging has to resolve the include and link paths first, then point at the one file that actually broke.
How Codna fixes it
Codna resolves headers, includes, template instantiations, and the CMake target graph with full blast radius — deterministically, for zero LLM tokens.
The agent receives the failing assertion, the call chain, and the suspect functions in about 600 tokens — 162x less context than reading the whole tree.
Codna rebuilds and re-runs your project's test target; the patch ships only after CTest, GoogleTest, or Catch2 goes green.
codna fix . --issue "Matrix::operator* gives wrong result for non-square inputs"
What you get
Codna maps headers, templates, and CMake targets with a deterministic engine — no embeddings, no RAG, and no LLM tokens spent just to understand the repo.
Instead of streaming 100k+ tokens of source, the AI coding agent gets a focused bundle — the failing test, call chain, and suspect translation units — 162x less context.
Each c++ ai bug fix is rebuilt and run against your existing test target before it lands, at a measured cost of about $0.04 per verified fix.
The proof
Yes — the deterministic graph follows your targets, includes, and link dependencies, so a fix accounts for the translation units it actually touches, not just the file you opened.
Codna rebuilds and runs your existing test target. The failing test is the oracle; the patch only ships once CTest, GoogleTest, or Catch2 passes.
Yes. Codna resolves template instantiations and transitive header includes, so the agent fixes the root cause instead of a symptom that surfaces downstream.
Yes. Codna ships as a CLI, an MCP server for Cursor and Claude, and a native GitHub App. It can self-host with your own keys (BYOK), fail-closed egress, and no training on your code.
Because Codna fixes from a ~600-token bundle rather than the whole repo, a verified fix costs about $0.04 at public model rates — a fraction of a typical agentic edit that reads the entire tree.
No. The repository map is built by a deterministic engine, so there is no index to stale, no vectors to maintain, and zero tokens spent on understanding before the fix begins.
Related