All terms
Glossary · AI Product Development

Spec-Driven Development

Spec-Driven Development

Spec-driven development (SDD) is an approach to building software in which a reviewed specification of intended behavior guides implementation and verification. The specification is prepared before implementing the change, though exploratory work may be needed first to resolve uncertainty. In AI-assisted development, the spec becomes the shared source of truth for both the humans and the AI coding agents, replacing loose, one-off prompts.

How Spec-Driven Development Works

SDD workflows vary by tool and team. A common pattern moves through reviewed artifacts:

  • Specify: describe what is being built and why, in terms of users, journeys, behavior and success criteria. Focus on intended behavior and required constraints before choosing implementation details.

  • Plan: decide the technical approach, including architecture, stack, data flow and constraints.

  • Tasks: break the spec and plan into small, reviewable units of work that can be built and tested independently.

  • Implement: an agent or developer builds each task, checking the work against the spec.

Reviews at checkpoints can expose misunderstandings before they spread into implementation. They do not guarantee that the specification is complete or that generated code follows it.

A spec in this sense is a structured, behavior-focused document in natural language. It usually includes requirements, defined states, acceptance criteria, edge cases and what is out of scope. It differs from standing project instructions (sometimes called a memory bank or steering files), which apply to every task in a codebase. A spec is specific to the functionality it describes.

Writer and engineer Birgitta Boeckeler, writing on martinfowler.com, distinguishes three levels of commitment:

  • Spec-first: a spec is written before the task and used to guide the work; it is not necessarily maintained afterward.

  • Spec-anchored: the spec is kept and updated as the feature evolves.

  • Spec-as-source: the spec becomes the main maintained artifact, and humans edit the spec rather than the generated code.

Why Spec-Driven Development Matters

AI coding agents may misread instructions or fill gaps with plausible assumptions. Across tasks, those assumptions can drift from what the business approved. SDD moves the important thinking into a document people can review, so the agent has less to guess.

Keeping the specification current gives people and agents a common reference for intended behavior. When requirements change, review the spec, implementation and tests together rather than assuming the update propagates automatically. Linking those artifacts supports requirements-to-code traceability.

SDD has costs too. Writing and maintaining specs takes time, and an overly heavy spec process can slow down small changes. Teams usually match the depth of the spec to the size and risk of the change.

Spec-Driven Development Example

For example, a team needs a feature that lets customers export their invoices. Instead of prompting an agent with "add invoice export," the product manager writes a short spec: users can export invoices from a selected date range, formats are CSV and PDF, exports over 1,000 invoices run in the background and send an email, and deleted invoices are excluded. It also states that scheduled recurring exports are out of scope.

An engineer reviews it and adds a plan: reuse the existing reporting queue, store files for seven days. The agent then breaks the work into tasks, each tied to a line of the spec, and implements them one at a time with tests that check the stated rules. If the team later approves a policy to include previously deleted invoices in exports, they change the spec, and the affected task and test are updated from it. For the requirement side of this, see how to write a PRD an AI coding agent will not misinterpret, and for staging decisions before handing work to an agent, the multi-stage vibe coding architecture for Claude Code.

Spec-Driven Development vs. Vibe Coding

Vibe coding starts from a prompt and judges the result by running it. Spec-driven development starts from a reviewed description of intended behavior and judges the result against that description. In AI-assisted workflows, the difference is where decisions are made and recorded. Specification-led work can also be performed by human developers; using a spec does not itself require a particular AI tool. SDD also differs from test-driven development: TDD writes failing tests first at the code level, while SDD writes a human-readable specification first at the product and behavior level. The two are often combined.

Related terms
Product Specification
A detailed description of how a product or feature will behave: its flows, screens, states, rules and error handling.
Vibe Coding
Building software by describing what you want to an AI and accepting the code it generates, judging results by whether they work rather than by reading the code.
AI Coding Agent
Requirements-to-Code Traceability
The ability to trace implemented code back to the requirement and decision that authorized it, and forward from a requirement to its code and tests.
Test-Driven Development (TDD)
A practice of writing a failing automated test before the code that makes it pass, then refactoring, in short cycles.
Source of Truth
A source of truth is the designated, authoritative place where a specific piece of information is maintained and kept current.
Put the method into practice.
Prodstack is the AI product operating system that turns terms like this into shipped, evidence-backed work — from discovery to growth.
Start your 7 days free trial
// Newsletter
Field notes, in your inbox.

Evidence‑driven thinking on discovery, prioritization, specs, and shipping, plus new articles the moment they drop. No noise.