Spec-Driven Development in Practice: From Requirements Clarification to Verified Delivery
Spec-driven development connects requirements, technical design, implementation tasks, and verification through explicit, traceable decisions. This article explains how to define testable requirements, validate designs, break work into actionable tasks, and guide AI coding tools without letting them make implicit product decisions. It also covers common pitfalls and how to assess whether the upfront effort is worthwhile.
1. What Spec-Driven Development Actually Changes
Spec-driven development, or SDD, is an approach in which explicit requirements guide technical design, implementation tasks, and code, with continuous verification keeping those stages aligned.
It does not mean that writing documentation automatically produces correct code. Nor does every project need extensive design documents before implementation begins. The core principle is to turn information that might otherwise be assumed, overlooked, or misunderstood into engineering constraints that can be discussed and verified.
This matters especially when working with AI coding tools. These tools can generate implementations from context, but a request such as “add an export feature” does not reliably establish export permissions, data scope, failure handling, file retention, or rules for duplicate submissions. The resulting code may look reasonable in isolation while failing to meet actual business requirements.
SDD therefore addresses three questions more fundamental than how to get a tool to write more code:
- What behavior must be implemented?
- What approach will satisfy that behavior and its constraints?
- How can we verify that the implementation has neither omitted nor deviated from those requirements?
A key observation from the practice reviewed here is that clarification and design often require more effort than expected. Requirements may take several rounds of discussion to stabilize, and designs need repeated validation. “Stable” does not mean permanently frozen: it means that key decisions are explicit and remaining uncertainties can be identified and managed.
SDD should not be treated as the opposite of agile development. Agile emphasizes feedback and adaptation; SDD emphasizes explicit constraints and verifiability. They can work together: define a specification for a small functional scope, complete design, implementation, and verification in a short cycle, then adjust subsequent work based on feedback.
2. Four Types of Artifacts, Four Distinct Responsibilities
A complete workflow typically includes a requirements specification, technical design, task list, and development verification records. The first three may be organized as spec.md, design.md, and tasks.md. Development then produces code, tests, review records, and any necessary operating instructions.
These filenames are conventions, not a universal standard. What matters is a clear division of responsibility.
| Stage | Core question | Main artifacts | Condition for moving forward |
|---|---|---|---|
| Requirements specification | What should be implemented, and what is out of scope? | Behavior, boundaries, acceptance criteria | Key business ambiguities have been resolved |
| Technical design | How will the requirements and constraints be satisfied? | Modules, data, interactions, risk handling | Major technical risks have a defined response |
| Task breakdown | In what order should the work be completed? | Tasks, dependencies, completion criteria | Each task can be implemented and verified |
| Development and verification | Does the implementation meet the agreed requirements? | Code, tests, reviews, delivery records | Acceptance criteria are met and outstanding issues are explicit |
If the requirements document is full of implementation details, the design merely repeats the requirements, and the task list copies the design headings, the documents may be complete without providing a useful progression of information.
A practical test is whether each artifact helps the team make a new decision. If it does not, it may simply add maintenance overhead.
3. Requirements: Resolve Ambiguity Before Pursuing Completeness
3.1 Move from Feature Names to Observable Behavior
“Support asynchronous exports” names a feature; it does not define it sufficiently.
A useful specification should answer:
- Who can create an export job?
- Which criteria determine the exported data?
- Must the submitted filter criteria be saved?
- At what point in time is the exported data determined?
- How can users check processing progress?
- How are failures communicated?
- Must permissions be checked again when downloading a file?
- Which capabilities are outside the current scope?
Time semantics are particularly easy to miss. If source data changes after a user submits a job, should the export reflect the data at submission time or processing time? Either choice may be valid, but each has different implications for consistency, implementation cost, and user expectations. The decision should not be left to implementation.
3.2 Replace Vague Adjectives with Acceptance Criteria
“Secure,” “fast,” and “reliable” express goals, but they are not directly usable as acceptance criteria.
A requirement can instead take this form:
Requirement ID: R-03Scenario: A user attempts to download an export file created by another user.Preconditions:The target job exists, and the current user does not have permissionto access it.Expected behavior:The system rejects the download and returns neither file contentsnor valid download credentials.The request does not change the job's status.
This defines a scenario, conditions, and expected results that can be translated directly into tests.
Where response-time targets, processing limits, or resource constraints are necessary, they should be grounded in business goals, historical data, and validation results—not arbitrary numbers that merely look precise.
3.3 Scope Specifications Around Independently Verifiable Functional Areas
An overly broad specification increases both the team’s comprehension burden and the context burden on AI coding tools. The problem is not just length: relationships between rules become harder to maintain.
A useful split generally meets three conditions:
- Each specification has a clear business goal.
- Its main behavior and acceptance criteria can be designed independently.
- Dependencies on other specifications can be described explicitly.
For example, data exports and notifications can have separate specifications connected through a job-completion event. But if each specification requires extensive external detail just to explain its own behavior, the split is too fine-grained.
The goal is to reduce coupling, not mechanically shorten documents.
3.4 Walkthroughs Reveal Gaps Better Than Solo Editing
In the reviewed practice, the requirements took more than three iterations to stabilize. The useful lesson is not the iteration count, but how discussion exposed ambiguity.
During reviews, ask questions from user, testing, and operations perspectives:
- What happens if the user leaves halfway through an operation?
- What happens if the same request is submitted repeatedly?
- What happens if an external dependency is temporarily unavailable?
- Which outcomes must be recorded for later troubleshooting?
These questions are more concrete than “Is the document clear?” and more likely to uncover genuine gaps.
4. Technical Design: Time-Consuming, but Critical to Reducing Rework
The reviewed practice recorded roughly one and a half to two days of design work and more than six validation rounds. These figures describe that particular effort, not a workload standard for every team. They illustrate that the main cost of design lies in reasoning, validation, and trade-offs—not document formatting.
4.1 Explain Why the Design Works
A technical design should cover at least:
- System boundaries and module responsibilities
- Key data and its lifecycle
- Interactions and dependencies between modules
- Normal and failure flows
- Concurrency, consistency, and permission constraints
- Deployment, monitoring, and rollback
- Rejected alternatives and the reasons for rejecting them
For an asynchronous export, “process the job in the background” is not enough. The design must explain how the job record connects to the execution request, how processing resumes after interruption, how repeated execution avoids conflicts, and what happens if file generation succeeds but the status update fails.
If a message queue is used, the design must not assume that each message will be processed exactly once. Duplicate-consumption handling, retries, and any necessary compensation should reflect the queue’s actual delivery semantics.
4.2 Validate Unfamiliar Technology Before Committing to It
When a design depends on unfamiliar technology, distinguish three activities:
- Learning its concepts and applicability limits
- Verifying that key behavior meets the requirements
- Producing an implementable design
Reading introductory material or accepting an AI coding tool’s explanation is usually insufficient for critical decisions. Questions involving concurrency control, failure recovery, or resource consumption should be investigated through small prototypes or targeted experiments.
A prototype does not need to be complete, but it must answer a specific question. For example: “If two workers attempt to process the same job simultaneously, can only one acquire valid execution ownership?”
Validation results should also state the conditions under which they apply. Success in one experiment is not a guarantee across all environments.
4.3 Give Each Review a Different Purpose
Repeated review should not mean rereading the same document without a defined objective. Reviews can focus on distinct dimensions:
- Requirements coverage: Confirm that every acceptance criterion is addressed.
- Data and state: Check that key state transitions have explicit rules.
- Failure paths: Check handling for timeouts, interruptions, and partial success.
- Security boundaries: Verify controls for permissions, sensitive data, and access credentials.
- Operating cost: Assess whether resource consumption fits the expected business scale.
- Implementation feasibility: Confirm that the design can be broken into bounded tasks.
Teams may combine or reduce review rounds, but “we have read it many times” is not a substitute for covering these dimensions.
5. Task Breakdown: Turn Design into Executable Work
The task list connects design to implementation. Entries such as “develop the API,” “implement backend logic,” or “add tests” do not provide enough guidance.
An effective task should include:
- Related requirement IDs
- Modules to add or modify
- Prerequisite dependencies
- Inputs, outputs, and boundaries
- Completion criteria
- Verification method
- Explicit exclusions
For example:
Task: Implement export job creationRelated requirements:Creation permissions, filter validation, and initial job state.Implementation scope:Validate the request, persist the job record, and return the job ID.Dependencies:The job data structure and state definitions have been confirmed.Completion criteria:Valid requests create a job.Requests with insufficient permissions or invalid filters are rejected.Required duplicate-submission handling follows the agreed design.Relevant automated tests pass.Out of scope:File generation, notification delivery, and file downloads.
Dependency order also matters. Data structures, state models, and shared constraints should generally be established first, followed by business processing and interaction entry points, and then integration verification.
Avoid splitting work into many fragments that cannot be accepted independently. A useful task is small enough to implement, review, and verify within a short cycle while producing a clear result.
6. Development: AI Coding Tools Should Execute Tasks, Not Guess Product Intent
6.1 Provide the Minimum Sufficient Context
Giving an AI coding tool every document at once does not ensure that all information will be used equally well. Excessive context can obscure the constraints that matter to the current task.
A more focused input includes:
- The current task description
- Relevant requirements
- Corresponding design sections
- Necessary existing code and tests
- Areas that must not be changed
- Acceptance criteria for the current iteration
“Minimum sufficient” does not mean “as little as possible.” Omitting the permission model or shared-state constraints can still produce an implementation that conflicts with the wider system.
6.2 Close the Verification Loop for Every Implementation
A development cycle can follow this sequence:
- Confirm the tool’s understanding of the task and its constraints.
- Review the proposed changes.
- Make a bounded set of code changes.
- Run relevant automated checks.
- Review the code diff and failure paths.
- Update task status and any necessary documentation.
For critical logic involving permissions, transactions, consistency, or data migrations, passing tests should not end the review. Tests cover scenarios that have already been identified; they do not automatically prove that unknown risks have been addressed.
6.3 Correct Upstream Artifacts When Design Problems Emerge
When implementation reveals a design flaw, changing only the code is dangerous. The feature may work in the short term, but the team is left with two conflicting accounts of how the system should behave.
Distinguish between:
- Implementation errors: The code does not follow an explicit design.
- Design flaws: The technical approach cannot satisfy the requirements or introduces a significant risk.
- Requirements changes: Business goals, boundaries, or acceptance criteria have changed.
Each issue should be addressed at the corresponding stage, with its impact on other tasks checked. A closed-loop SDD process does not prohibit change; it makes change justified, recorded, and traceable.
7. Common Pitfalls: Complete Documentation Does Not Guarantee an Effective Process
7.1 Treating Document Length as Quality
A long document may still omit failure behavior, while a short specification can be rigorous. Quality depends on whether key questions are answered, not whether a word-count target is met.
7.2 Treating a One-Time Freeze as Maturity
Key constraints should stabilize before implementation, but teams should not pretend that every issue can be resolved in advance. Unverified assumptions need explicit risks, validation methods, and decision points.
7.3 Letting AI Coding Tools Make Implicit Decisions
When a tool chooses retry counts, permission rules, or data-cleanup policies on its own, it is no longer merely writing code. It is making product and architecture decisions. Those choices require explicit confirmation.
7.4 Reviewing Only the Happy Path
Rework often comes from duplicate requests, partial failures, concurrency conflicts, resource exhaustion, and permission changes. Failure paths belong in design and acceptance criteria, not only in fixes after production incidents.
7.5 Ignoring Documentation Maintenance Costs
Specifications should be updated when important changes occur, but they need not capture every implementation detail. Excessive documentation can cost more to maintain than it provides in value and is more likely to become outdated. Prioritize requirements, interface contracts, key decisions, and acceptance criteria.
8. How to Decide Whether SDD Is Worth the Investment
The typical experience is that the first half of development feels slower while uncertainty decreases in the second half. This is not an unconditional promise of greater efficiency. If scope is uncontrolled, reviews lack objectives, or documents cannot guide implementation, upfront work may become pure overhead.
Evaluation should go beyond coding time and consider:
- Rework caused by ambiguous requirements
- When design defects are discovered: before or during development
- Traceability between acceptance criteria and tests
- Whether the impact of requirements changes is identified adequately
- How much additional explanation is needed during handover
- Whether documentation matches the actual implementation
Features involving privileged operations, complex business rules, cross-module coordination, or long-term maintenance are generally stronger candidates for the full workflow. Exploratory prototypes, low-risk changes, and experiments without a settled direction can use lightweight specifications to validate core assumptions first.
Ultimately, SDD is not about rigidly following a set of document templates. Its value lies in engineering discipline: bounded requirements, justified designs, executable tasks, verifiable implementations, and traceable changes.
When those principles run through the delivery process, documentation becomes more than a prerequisite to coding. It becomes a reliable foundation for team collaboration and AI-assisted development.
