// Spec before you generate · lesson 09

Writing a spec an agent can execute cold

The final test of a spec, the one that tells you it's actually complete, is whether something that has never seen the problem could execute it correctly without you in the room. I call it a delegation-grade spec, because it's the standard a spec has to hit before I hand it to another agent, to Claude Code, or to a version of myself who's forgotten all the context.

Most specs are secretly propped up by everything in your head that you didn't write down. They read as complete to you because you're silently filling every gap with context the reader doesn't have. A delegation-grade spec has no such crutch. It carries its own context. The person or agent executing it has only the words on the page, and the words on the page have to be enough to build the right thing and impossible to build the wrong thing from.

What makes a spec executable cold?

Precision at the seams. My delegation format names the exact task in one sentence, the exact file, the exact code to find, the exact replacement with the reasoning baked in as comments, and how to verify it worked. No "you know what I mean," because the executor doesn't. The test I run before handing it off is simple and merciless: could someone build the wrong thing from this without violating a line I wrote? If yes, the spec has a hole, and the hole is exactly where the drift will enter. Close it, and the spec now constrains the outcome instead of hoping for it.

Why this is the capstone of the whole track

Because everything else in speccing was building toward a handoff. The What and Why aim it, the invariants fence it, the edge cases harden it, the approach routes it, and the calibration sizes it, all so that at the end you can hand the thing off and trust what comes back. A spec that can be executed cold is a spec that has fully externalized your intent, which means the model, another agent, or future-you can act on it with the same fidelity you would. That's the point of the whole discipline: not to write more, but to make your intent so clear it survives leaving your head.

The takeaway: a spec is done when something that's never seen the problem could execute it right and couldn't execute it wrong, because a spec that carries its own context is the one you can actually hand off and trust.