// track · 10 lessons
Spec before you generate
A prompt is a wish; a spec is a contract. The discipline that separates production from slop.
- 01Spec before you generateDecide what can't drift before the AI writes a line. The difference between shipping and rebuilding is a spec, not a better prompt.
- 02Why a prompt is not a specA prompt is a wish, a spec is a contract, and the model builds whichever one you actually hand it.
- 03The six things every spec pinsWhat, Why, Interface, Properties, Edge cases, Constraints.
- 04Invariants, or naming what must always be trueInvariants are the truths your code may never break, and declaring them up front is how you catch the bug before it's written instead of after it ships.
- 05Edge cases as first-class citizensThe happy path is the small part. Enumerate the failures up front and put them in the spec, so you meet your edge cases in a table, not production.
- 06Spec the invariants, vibe the restPin what breaks if it drifts and leave the rest to the model, because the invariants are yours to hold and the implementation is its to own.
- 07Approach validation, or proving the route before you drive itBetween the spec and the code, name the approaches and pick one on purpose, because a wrong route is cheap to reject on paper and expensive to unwind in a build.
- 08Lightweight spec vs full spec, or matching rigor to stakesMatch the spec's weight to the cost of being wrong. Full on high-stakes work, minimal on the throwaway. Rigor is a tool to aim, not a badge.
- 09The spec as the artifact that outlives everythingThe spec outlives the thread, the model, and the code. Write it down: it's the one artifact that turns a build into something you can return to.
- 10Writing a spec an agent can execute coldA spec is done when someone who never saw the problem could execute it right and could not execute it wrong. That is the bar for a real handoff.