Map

Differential spec analysis

Wiki conceptagentic-codingsoftware-engineeringspec-driven-development โ†ณ show in map Markdown
title
Differential spec analysis
type
concept
summary
Build the same system with several independent agent loops, diff the finished implementations, and treat every divergence as a decision nobody specified
tags
agentic-coding, software-engineering, spec-driven-development
created
2026-07-21
updated
2026-07-21

Differential spec analysis is a technique for finding the holes in a specification by exploiting the fact that agents are cheap enough to build the whole thing more than once. Run several independent agent loops against the same brief, let each produce a complete implementation, then compare the results. Wherever they diverge, someone made a decision the spec didn't cover.

The name and the worked example come from Josh Bleecher Snyder, applied to exe.dev's distributed DNS server in claude-is-not-a-compiler; he'd written the technique up separately on commaok.xyz.

The observation that motivates it

Agents ask questions. Bleecher Snyder's loops raised them at every level, from structural approaches down to line-level concerns, and answering those questions is the obvious way to firm up a spec.

The problem is what they don't ask:

It was shocking how many important decisions the agents never asked about but simply made โ€” and made differently.

An agent that hits an ambiguity and resolves it silently produces working code and leaves no trace of the choice. You can't find those by reading one implementation, because in one implementation the decision looks like the only way it could have been. You find them by comparison โ€” divergence is the signal that a decision point existed at all.

The loop

  1. Settle the top-level strategy and architecture with humans first. This is the brief; the technique tests it, it doesn't produce it.
  2. Prompt multiple concurrent agent loops to build the entire system โ€” tests and adversarial review included, not a sketch.
  3. Ask fresh agents to compare the completed implementations and identify interesting deviations. The comparison is itself agent work.
  4. Work through the divergences: experiment, pick, and sometimes revert a pick that generated regret.
  5. Codify each settled decision as terse written guidance.
  6. Throw the implementations away and repeat.

Bleecher Snyder ran the full cycle three times before building a keeper, invoking Brooks ("plan to throw one away; you will, anyhow") and Craig Zerouni ("if you plan to throw one away, you will throw away two"). Total cost was about a week of one person's attention.

What comes out

The artifact is the guidance document, not any of the implementations. By the third pass it was empirically sufficient to steer an agent through the decisions that mattered โ€” goals, architecture, and the occasional low-level specific such as the exact data type for a load-bearing concurrent cache. "Empirically sufficient" is the useful standard here: the spec is done when a fresh agent following it stops diverging in ways you care about.

The canonical divergence from the DNS case: replication catches up by requesting all entries after the last known one, then long-polls for more. Database rollbacks are rare but real, and they violate the append-only assumption the whole scheme rests on. Every agent noticed the hazard; every agent handled it differently. The design that survived tags each row with a randomly generated timeline value, carries the edge's timeline for row N in every "entries since N" request, and treats a mismatch as proof that history was altered โ€” falling back to a full clean re-sync.

Style differences show up too, and are less actionable but not worthless: Claude and Codex both judged Claude's system more elegant and Codex's more thorough.

Why it works

Ambiguity in a spec is invisible from inside any single reading of it. Every other approach to finding gaps โ€” careful review, checklists, asking the implementer to flag unknowns โ€” depends on someone noticing that a choice was available. Differential analysis doesn't require noticing; it makes the gap mechanically observable as a diff. The cost is building N systems instead of one, which is exactly the cost agents collapsed.

This is the same logic as differential testing (run two implementations of a protocol against each other and investigate disagreements), lifted from behavior to design intent.

Limits

  • Correlated blind spots. Independent loops on the same model family share priors. A decision every agent gets wrong the same way produces no divergence and stays invisible. Bleecher Snyder's use of both Claude and Codex mitigates this partially.
  • Divergence isn't ranked. The diff tells you a decision existed, not whether it mattered. Sorting signal from style noise is human work, and it's the part that consumed his week.
  • It needs a real brief. With a vague enough starting point everything diverges and the output is noise rather than a decision list.
  • It presumes throwaway implementations are affordable. True for a scoped internal service; less obviously true for anything with migrations, data, or users already attached.

Cross-references