Spec Driven Development (SDD)
A conceptual approach where executable specifications act as the central control and verification source for requirements, design, and tests.
Classification
- ComplexityMedium
- Impact areaOrganizational
- Decision typeOrganizational
- Organizational maturityIntermediate
Technical context
Principles & goals
Use cases & scenarios
Compromises
- Incorrect specifications lead to wrong implementation
- Excessive test fragility from poorly designed scenarios
- Resistance in organizations without shared ownership
- Small, focused scenarios instead of large monolithic tests
- Specifications as living artifacts in version control
- Clear separation between business logic and technical implementation details
I/O & resources
- Business requirements and examples
- Toolchain for executable specifications (e.g., Cucumber)
- CI/CD infrastructure for execution
- Versioned, executable specifications
- Automated test reports and metrics
- Fewer ambiguous requirements during handovers
Description
Spec Driven Development (SDD) is a conceptual approach where executable specifications serve as the central source for requirements, design, and tests. Teams write precise, domain-oriented specifications and use them for automated verification. SDD fosters shared responsibility and reduces misunderstandings between domain experts and developers.
✔Benefits
- Improved communication between domain and development teams
- Early bug detection via automated verification
- Clearly defined acceptance criteria reduce rework
✖Limitations
- Requires disciplined maintenance of specifications
- Effort to set up and automate can be high initially
- Not every technical detail belongs in the specification
Trade-offs
Metrics
- Specification coverage
Portion of functional requirements covered by executable specifications.
- Automated test pass rate
Percentage of successful executions of specification-based tests in the pipeline.
- Lead time for changes
Time from specification change to successful verification in CI.
Examples & implementations
E-commerce checkout
Checkout acceptance criteria as executable scenarios covering payments, coupons and shipping rules.
Bank transfer API
API behavior and error cases are specified and automatically tested against the implementation.
B2B contract logic
Business rules in readable language with examples used for automation and legal review tests.
Implementation steps
Introduce a unified specification format (e.g., Gherkin).
Train domain and development teams to write examples collaboratively.
Set up a minimal toolchain to execute specifications in CI.
Gradually migrate existing acceptance criteria into executable specifications.
Regular review cycles for maintenance and refinement of specifications.
⚠️ Technical debt & bottlenecks
Technical debt
- Unstructured specification collection without version control
- Outdated mock implementations that give false confidence
- Missing test data maintenance causing unstable CI runs
Known bottlenecks
Misuse examples
- Specifications written only by developers and not by domain experts.
- Specifications that prescribe every implementation decision and thus restrict agility.
- High automation coverage for volatile requirements, driving maintenance costs.
Typical traps
- Confusing test data with specification content
- Insufficient maintenance leading to outdated, misleading specifications
- Lack of visibility of specification failures to domain experts
Required skills
Architectural drivers
Constraints
- • Availability of stable test data
- • Use of agreed specification formats (e.g., Gherkin)
- • Organizational agreement on shared maintenance