Map the app deterministically
Codna traces classes, modules, mixins, the gem dependency graph, and each method's blast radius in about 59ms — for zero LLM tokens, no embeddings or RAG.
Metaprogramming, mixins, and method_missing make Ruby a joy to write and hard for an agent to trace. Codna is an AI Ruby pair programmer that builds the dependency graph deterministically, so every fix starts from facts about your app, not guesses.
The problem
A method called in a Rails controller might be defined three modules away — pulled in through an included concern, a gem's mixin, or a method conjured at load time by define_method. The call never looks like a call, so the line that breaks is rarely the line that's wrong. Most AI bug fix tools cope by stuffing the whole app and its gems into the model, which is slow, lossy, and expensive on a large Rails monorepo. Engineers then lose hours grepping through ancestors chains and bundle paths to find where behavior actually comes from.
How Codna fixes it
Codna traces classes, modules, mixins, the gem dependency graph, and each method's blast radius in about 59ms — for zero LLM tokens, no embeddings or RAG.
The agent gets the failing spec, the include chain, and the suspect methods — roughly 162x less context than reading the whole app, so it edits the real cause.
Codna re-runs RSpec or minitest against the patch and only lets the fix land when your suite passes.
gem install codna codna fix . --issue "OrdersController#create raises NoMethodError after concern refactor"
What you get
A deterministic dependency and blast-radius graph of your Ruby app — concerns, gem mixins, call paths — built in ~60ms with no LLM tokens, no embeddings, no RAG.
Instead of feeding the whole app to a model, Codna hands the agent the failing spec and suspect methods — about 162x less context than the naive approach.
The patch is re-run against RSpec or minitest before it ships, so a verified Ruby fix costs about $0.04, not a blind edit you have to babysit.
The proof
Codna maps your app's include chains, gem mixins, and call paths deterministically, hands the agent a ~600-token evidence bundle scoped to the failing spec, and verifies the patch with RSpec or minitest before it lands.
Yes. Codna builds the dependency graph locally for zero LLM tokens, so the agent only ever sees a tiny evidence bundle — about 162x less context than reading the whole app and its gems.
Yes — Codna verifies fixes against your existing test runner; the failing example is the oracle, whether you run RSpec or minitest.
Codna maps the static include and call structure first, so dynamically mixed-in behavior is anchored to the modules that define it rather than guessed at.
Because Codna fixes from a ~600-token bundle instead of the whole repo, a verified fix runs about $0.04 — versus roughly a dollar for a typical agentic edit that reads everything.
All three. Codna ships as a CLI (codna fix .), an MCP server for Cursor and Claude, and a native GitHub App that opens a verified fix PR with the evidence attached.
Related