Spec-driven development
Spec-driven development means writing a precise specification before generating any code, then using that spec as the prompt. With AI tools it has become a practical technique rather than a process ideal, because specification quality directly determines output quality.
The reason it matters more with AI than it did without: a human developer fills gaps by asking. A model fills gaps by guessing plausibly, and the guesses are invisible until they are wrong.
A useful spec names the screens or modules, the data and its shape, who can do what, the states nobody remembers (empty, loading, error, offline), and the constraints that do not appear in code — versions, forbidden patterns, conventions.
What this means in practice
This is the single biggest lever in app builders. A complete first prompt beats five rounds of steering, and it is cheaper too, since every scope change triggers regeneration. In assistants it matters most on multi-file work where the agent will make many unseen decisions.
A spec skeleton that generates well
Build: [one sentence — what and for whom] Pages: [every screen, including what each shows when it has no data] Data: [entities, fields, relations; where it persists] Roles: [who logs in, what each role can and cannot see] States nobody remembers: loading, empty, error, offline, 320px mobile. Define each for every page above. Stack constraints: [framework, versions, libraries you forbid] Non-goals: [features that must NOT be built, even if they seem obvious — this is what stops scope invention] Verify by: [what to click and what should happen]
Fill every bracket before the first prompt; the Non-goals line prevents more rework than any other.
Prompts for the tools this applies to
Related terms
- PRD for AI
A PRD for AI is a product requirements document written to be consumed by an AI coding tool rather than by a team.
- Meta-prompting
Meta-prompting is using a model to write or improve a prompt rather than to do the task directly.
- Plan mode
Plan mode makes an AI coding tool propose an approach before it edits anything.
- Text to app
Text to app describes tools that generate a working application from a written description — pages, data model, and often auth and deployment — without you writing the scaffolding.