Course outline
The CTO's playbook for AI coding agents · Module 3: Spec-driven development at scale
Why specs become the source of truth
When agents can write code in minutes, the scarce artifact is clear intent. Here's why the spec, not the diff, becomes the thing your org reviews, versions and trusts.
Lesson 9 / 20 · ⏱ 8 min
For forty years, code was the expensive part. Specs were a formality you wrote once, skimmed, and let rot while the code became the real record. Coding agents flip that economics. Code is now cheap to produce and cheap to throw away. What stays scarce is a precise statement of what you want and why.
That makes the spec the artifact worth protecting: it’s the input agents consume, the reference reviewers check against, and the only record of intent that survives a rewrite.
The flow, end to end
- SpecProblem, constraints, acceptance criteria
- PlanApproach, touched areas, risks
- TasksAgent-sized, independently checkable
- CodeWritten by agents, owned by people
- VerifyTests and checks trace back to the spec
↺ When verification fails, fix the spec or the plan first, then regenerate
The key move is the loop. When an agent produces the wrong thing, the instinct is to patch the code. In a spec-driven org, you ask first: was the intent wrong, ambiguous or missing? If so, fix it upstream and regenerate. Otherwise the same misunderstanding resurfaces in the next task, the next team, the next agent.
Prompt-driven vs spec-driven
Most teams start prompt-driven, and that’s fine for a single developer on a Friday afternoon. It breaks at org scale.
✕ Prompt-driven
- –Intent lives in one person's chat history
- –Each developer re-explains the same constraints
- –Review starts at the diff, with no reference to check against
- –Rework means re-prompting until it looks right
- –Knowledge leaves when the session closes
- –Output quality tracks who is typing
✓ Spec-driven
- +Intent lives in a versioned file next to the code
- +Constraints are written once and reused by every agent
- +Review checks the diff against agreed acceptance criteria
- +Rework means fixing the spec, then regenerating
- +The spec outlives the session and the author
- +Output quality tracks how clear the team's intent is
What changes in the org
| Before agents | With spec-driven agents |
|---|---|
| Senior time goes into writing and reviewing code | Senior time goes into shaping and reviewing intent |
| Design docs for big projects only | A lightweight spec for anything above a risk threshold |
| The PR description explains the change after the fact | The spec explains it before; the PR links to it |
| Onboarding means reading code | Onboarding means reading specs, then code |
| Bugs are traced to a commit | Bugs are traced to a missing or wrong criterion |
None of this means heavyweight process. A good spec for a small change is a dozen lines. The point is that it exists, it’s written down, and someone other than the author agreed to it. Lesson 3-2 gives you the template.
Sort the signals
🎮 Prompt-driven or spec-driven?
1 / 7 · Score: 0
Which way is this team actually working?
For the broader lifecycle view, see the AI-native SDLC leader’s guide. For the developer-level version of writing task briefs, see task briefs with acceptance criteria.
Before you move on
✅ Key takeaways
0 / 4 completed