Definition
Before any code, you write (often with the model's help) requirements, a design and a task list. The spec becomes the source of truth: the model implements one task at a time against it, and every change starts by updating the spec. It trades upfront time for predictability on larger features.
Example prompt
A short SPEC.md, then a prompt that points at one task.
# SPEC.md: Home carousel## RequirementsR1. Show the 5 most recent published images.R2. Advance every 5s; pause on hover or touch.R3. Lazy-load images outside the viewport.R4. Flash twice (2 x 150ms) on each transition.## Acceptance criteria- With 0 images, render nothing and log no errors.- If an image fails to load, skip to the next one.## Tasks1. Data hook useCarouselImages() (R1)2. Carousel component with timer (R2, R4)3. Lazy loading and error handling (R3)Implement task 1 from SPEC.md. Do not start task 2.If you find a gap in the spec, stop and propose an update.
What it reveals
- Engineering discipline and problem decomposition
- Ability to write unambiguous requirements and acceptance criteria
- Thinking about change: how the spec evolves with the code
Use it when
- Features that span many files or several days
- Work shared between several people or agents
- Domains where requirements must be auditable
Watch out for
- Over-specifying small tasks (waterfall in miniature)
- The spec and the code drifting apart
- Treating the spec as finished instead of as a living document
In an interview
Look for
- Is the spec testable (acceptance criteria), or just prose?
- Does the candidate implement in small steps and check each one against the spec?
Ask
- Which requirement was the hardest to state precisely?
- If product changes R2 tomorrow, what is your workflow?
Origin
Writing specifications before code is an old engineering practice, and the name "specification-driven development" appears in research as early as 2004. As an AI coding workflow, it was popularized in 2025 by AWS Kiro (July) and GitHub Spec Kit (September), tools that turn a spec into a plan and a task list for an agent.