uscha.dev
the underlying thesis

Specs are the source code. Code is a build artifact.

Why closing the cycle with reverse discovery doesn't add a command — it inverts what the asset of a software system is.

the specs are the source code
the LLM is the compiler
reverse discovery is the decompiler — one that recovers intent, not just structure

01 · Before — the code is the truth

This is how almost every project works today: the asset is the code. The spec — if it exists — is documentation: written once, rotting in silence, because nothing forces it to move when the code moves. Six months in, nobody believes it, and rightly so. When the document and the code disagree, the code wins. Always.

intent in someone's head written once SPEC documentation rots in silence — nobody believes it, rightly implemented CODE the asset · the only truth in any conflict, it wins
The flow is one-way, and the stroke tells the story: the code is the solid box — the asset. The spec is dashed — dispensable, and decomposing from day one. A 25-year-old legacy system is this same drawing with the spec already gone.

Note the economic consequence: everything the organization knows about the system lives in an artifact that can only be read by executing it. When the one person who understands it retires, the knowledge retires too.

02 · The analogy — nobody edits the binary

Think of C. Nobody hand-patches the compiled binary — it would be madness: you edit the .c and recompile. The binary is disposable, regenerable; the .c is the asset. The thesis says: with good enough LLMs, source code moves into the binary's seat. You edit the spec and "recompile": the LLM generates the code.

A compiler alone, however, goes in one direction. While the methodology was forward-only (intent → spec → code), the spec was one more input — not the canonical representation — because the world is full of systems where only the code exists. The return trip was missing.

03 · After — the closed cycle inverts the asset

Reverse discovery adds the inverse direction: code → spec. It is the decompiler. And with both directions, any system — even the legacy with not a single document — can enter the canonical format. With one condition that does all the work: legacy code mixes intent with accident. Bugs customers already depend on, timeouts nobody decided. A naive decompiler photocopies the bugs as features. That is why the one step no automatic tool can perform is a human gate: the machine extracts evidenced candidates, and only a person rules on what was intent (preserve), what was a bug (fix), and what nobody ever decided (undefined).

SPEC PACKAGE + BEHAVIOR LEDGER the canonical asset CODE build artifact regenerable forward · the LLM compiles reverse discovery decompiles intent only what is judged gets promoted CURATION human verdict preserve·fix·undefined legacy system = 100% drift the asset appreciates with every model generation; the code is regenerated and depreciates — like a binary
The strokes have flipped: now the solid box — the asset — is the spec package plus the behavior ledger, and the code moved to a dashed line: disposable, regenerable. Every return path passes mandatorily through curation: no human verdict, no promotion — the gate is measured by the engine, not promised by prose.
Without curation in the middle, reverse discovery doesn't recover intent — it produces a tidier photocopy of the legacy, with the bugs fossilized as features.

04 · Corollaries — what follows on its own

The asset appreciates; the code depreciates. If the code is regenerable, every model improvement upgrades the "build" for free: the same spec package, recompiled with the 2027 LLM, produces better code. Specs are the only investment that doesn't age — and that is the commercial argument: you don't sell the rewrite, you sell the asset that also survives the next rewrite.

Fidelity becomes measurable. If you decompile what you compiled and the result matches what you had, the methodology is lossless — and that is a number, like the bootstrap test of a compiler that compiles itself:

specs forward code discovery specs′ specs? measurable today by ID coverage (uscha-spec) · the semantic version is still vision
The methodology's self-test: discovery(forward(specs)) ≈ specs. Nobody in the spec-driven space measures the fidelity of their own methodology; this cycle turns it into a publishable number.

Drift and migration are the same problem. A spec three weeks behind its code is 5% drift; a legacy with no document at all is 100% drift. The same question at different scales — with the honesty that today they are different instruments, not a shared engine.

05 · Truth-pass — what is real today, what is still vision

The pitch is beautiful, and precisely for that reason it deserves distrust. The house rule: under-claim, then wire, then re-claim. State as of today (kit 1.65.0):

ClaimStatusWhere
Curation with verdicts, measured gate, append-only auditable ledger REAL1.64.0 · ADR-009/010
Oracle distinguishing preserved behavior from declared fixes REAL1.65.0 · golden-diff
Round-trip by ID coverage (which specs are traceable in the code?) REAL1.65.0 · roundtrip, advisory
Semantic round-trip (does the code say the same thing as the spec?) VISIONdeferred with conditions · ADR-011
"The code is fully regenerable from the specs" VISIONthe bootstrap test is the pending experiment
"Drift = incremental reverse discovery, same engine" VISIONvalid idea, rejected as architecture · ADR-011

And note the elegant part: the piece of the diamond that is already real — the formal, traceable, blocking human-judgment layer — is exactly the one no tool in the space has. The part that remains vision is the one anyone could promise. The hard part is built and the glamorous part is missing: the right order.

06 · Why "diamond"

Because it isn't the feature. Reverse discovery — the command — is only the first materialization. What the closed cycle changes is the category of the whole project: from development methodology to canonical representation format for systems. Code comes and goes; the decisions — evidenced, judged, recorded — are the only thing worth migrating.

State verified against kit 1.65.0 · sources: ADR-009, ADR-010, ADR-011, CHANGELOG-1.64.0, CHANGELOG-1.65.0 · the REAL/VISION labels follow the repo's INV-TRUTH-01 rule.