Ghulam Mustafa Zafar

System design1 min read

Ariadne: finding the code your agent wrote but never wired in

Coding agents produce code that compiles, passes review and is never called. A runtime-aware code graph finds it far more reliably than static tools.

By Ghulam Mustafa Zafar

Cover: eight-pointed stars, a tile pattern generated for this post in the system design glaze.

Coding agents have a failure mode that is easy to miss. They write a function, a route or a component that looks finished, compiles and passes review, and then nothing in the product ever calls it. The work appears done. It isn’t.

Ariadne is my research project on catching this.

The approach

Ariadne builds a code graph that combines two views of the same codebase:

  1. Static analysis gives the structure: what is defined, what references what.
  2. Runtime tracing gives the behaviour: what actually executes when the product runs.

Code that exists in the first view but never shows up in the second, and has no plausible path to it, is a strong candidate for “written but never wired in”.

The evaluation

I pre-registered the evaluation before running it, so the metric and the comparison could not drift towards a flattering result.

ToolF1
Ariadne0.80
Closest open-source tool0.04

I also gave a coding agent tools built on the graph. Compared with a text-only baseline, it was 2 to 6 times more efficient at the same tasks.

What is next

The interesting question is whether agents can use the graph to avoid the problem rather than only detect it afterwards. That is what I am working on now.

Keep reading

The ship of Theseus and the legacy rewrite

If AI replaces every line of a legacy system, is it still the same system? A two-thousand-year-old puzzle about identity turns out to be a practical guide to modernisation.

Philosophy2 min read