← Back to Blog

Dec 3, 2026

Spec-Driven Development (SDD): A Learning Record

A systematic learning record on Spec-Driven Development: how SDD differs from Vibe Coding, the research workflow and the six core capabilities, open-source frameworks such as Spec Kit and OpenSpec, layered governance of spec files, token optimization, conflict resolution, cross-project orchestration, and the origins and rise of SDD.

Vibe Coding ProjectsSDDSpec-Driven DevelopmentSpec KitOpenSpecAI ProgrammingVibe CodingEngineering Governance
On this page (13 parts, 42 entries)
  1. 1. What is SDD, and How Does It Differ from Traditional Development and AI Development
  2. 2. What is the Research Workflow of SDD
  3. 3. What Capabilities Does SDD Provide in Software Development
  4. 4. Which Open Source Frameworks Can Be Learned
  5. Github Spec Kit (Recommended to Start with This)
  6. OpenSpec
  7. Cucumber / Gherkin
  8. Agent Skills
  9. 5. How to Learn SDD
  10. Learning How to Write High-Quality Specs
  11. Learning Constraint-Driven Development
  12. Learning Acceptance-Driven Development
  13. 6. Which Parts of the Specification Files Change Frequently During Iterations
  14. The Five Levels of Specification Files
  15. Frequency of Changes
  16. Workflow, Skill, Templates Will Change
  17. Specification File Modification Permissions
  18. 7. How Does SDD Function in Large and Complex Projects
  19. Complete Iteration Lifecycle of Requirements
  20. Recommended SDD Project Directory Structure
  21. Different Ways to Handle Various Types of Requirements in SDD
  22. Specification Files Should Follow Project Engineering Iterations
  23. Establish a Common Engineering Governance Repository
  24. Business Project Repositories
  25. 8. How to Avoid Consuming Large Token Amounts with Increasing Specification Files
  26. Adopt a Layered, On-Demand Loading Mechanism
  27. Add Specification Index File
  28. 9. How to Resolve Conflicts in Specification File Modifications
  29. Adopt Change Set Mechanism
  30. Each Requirement Independently Maintains Its Own Specifications
  31. Use Structured Format for Incremental Specifications
  32. Pitfalls of Git Conflicts and Semantic Conflicts
  33. 10. Is SDD Suitable for All Software Development Projects
  34. 11. How to Synchronize Specification Changes Across Different Versions
  35. 12. How to Use SDD for Large Requirements Spanning Multiple Projects and Engineering
  36. 13. When Did SDD Originate, and How Is It Related to the Enhancement of AI Programming Capabilities
  37. 13.1 Formal Methods: The Earliest Ideological Foundation
  38. 13.2 Model-Driven Development: Attempting to Automatically Generate Code
  39. 13.3 TDD and BDD: Direct Ideological Sources for Modern SDD
  40. 13.4 When Did SDD Really Take Off?
  41. 13.5 The Relationship Between Vibe Coding and SDD
  42. 13.6 Why Stronger AI Programming Capabilities Actually Drive SDD

Hello everyone. The idea of SDD has been very popular online lately, so I have been learning about it and wanted to share the core concepts with you here. The post is organized as a series of questions: what SDD is, how it works, and how to apply it in AI Vibe Coding to solve the problems that come up during software development.

1. What is SDD, and How Does It Differ from Traditional Development and AI Development

Comparison Table of Traditional Development, Ordinary AI Development, and Specification-Driven Development (SDD): Structured Requirement Sources, Driving Methods, Capability Transmission, Business and Technical Constraints, Acceptance Methods, Process Reuse, and Consistency in Delivery

2. What is the Research Workflow of SDD

SDD Research Workflow: A Complete Flow from Requirement Definition, Specification Definition, Technical Solution, Task Decomposition, Implementation to Verification, Including Feedback Loops for Validation and Controlled Specification Changes

3. What Capabilities Does SDD Provide in Software Development

SDD Six Capabilities and Outputs: SPEC, CONSTRAINTS, ACCEPTANCE, WORKFLOW, SKILL, and GOVERNANCE

4. Which Open Source Frameworks Can Be Learned

Official Website: https://github.github.com/spec-kit/quickstart

Source Code Address: https://github.com/github/spec-kit

How to Run a Demo Project

# Install uv
brew install uv

# Install Spec Kit
uv tool install specify-cli

# Check the installation environment
specify check

# Initialize an experimental project
specify init sdd-demo

cd sdd-demo

Spec Kit Command Guide

Spec Kit Command Guide: Defining Engineering Specifications, Generating Business Specifications, Clarifying Requirements, Generating Technical Solutions, Checking Specification Quality, Decomposing Tasks, Analyzing Consistency, Implementing Code and Converging Gaps

OpenSpec

Focuses on specification management for existing projects, requirement changes, incremental development, and change archiving. Suitable for long-term iterative business systems.

Source Code Address: https://github.com/Fission-AI/OpenSpec

Cucumber / Gherkin

Learn Behavior-Driven Development (BDD) to convert business requirements into executable acceptance scenarios, addressing how to prove that a feature meets the requirement.

Official Website: https://cucumber.io/docs/gherkin/

Agent Skills

Learn how to encapsulate team development experience, operational procedures, scripts, and standards into reusable AI capabilities.

Official Website: https://agentskills.io/home

5. How to Learn SDD

Learning How to Write High-Quality Specs

How: spell out every requirement completely rather than leaving it as a one-line description. A spec should list business rules, functional requirements, non-functional requirements, the scope of the feature (what is included and what is explicitly not), and the acceptance criteria, so it becomes a single spec document.

Learning Constraint-Driven Development

How: take a demo or real code project and lay out the files and folders that SDD needs, then manage requirements inside those folders.

Project Governance Directory:

project/
├── AGENTS.md
├── governance/
│   ├── constitution.md
│   ├── architecture.md
│   ├── coding-standard.md
│   ├── database-standard.md
│   ├── api-standard.md
│   ├── security-standard.md
│   └── testing-standard.md
├── specs/
│   └── 001-battery-management/
│       ├── spec.md
│       ├── design.md
│       ├── tasks.md
│       ├── acceptance.md
│       └── traceability.yaml
├── templates/
│   ├── spec-template.md
│   ├── design-template.md
│   └── acceptance-template.md
├── workflows/
│   ├── feature-development.yaml
│   ├── bug-fix.yaml
│   └── release.yaml
├── skills/
│   ├── spec-generation/
│   ├── backend-development/
│   ├── frontend-development/
│   ├── code-review/
│   └── acceptance-testing/
├── services/
├── frontend/
├── tests/
└── .github/workflows/

File Descriptions

Examples of Different Files Covering Different Dimensions of Constraints: Specific Terms for Architecture, Database, API, Security, and Testing Standards

Learning Acceptance-Driven Development

Note the concept here is that SDD is specification-driven development. Simply relying on specifications alone may not ensure that the software functions as expected after development. Therefore, BDD methods or ideas can be used to build a more complete workflow. In other words, acceptance criteria are both a specification and an expected behavior description, driving subsequent testing processes to ensure software quality.

From Business Requirements, Business Rules to Acceptance Criteria and Automated Testing, then CI Quality Gates and Delivery Evidence

6. Which Parts of the Specification Files Change Frequently During Iterations

The Five Levels of Specification Files

The Five Levels of Specification Files: Engineering Constitution, Architecture and Engineering Standards, System and Domain Specifications, Requirements and Change Specifications, Tasks and Execution Records

Frequency of Changes

Table Comparing Specification Types, Scope, and Frequency of Changes

Example Clauses in L1 Engineering Constitution File Defining Team Basic Principles

Timing for Modifying Files at Levels 2 to 4: Architecture and Engineering Standards, System-Level and Domain-Level Specifications, Requirements and Change Specifications, Task Records

Example Directory Structure of L3 System-Level and Domain-Level Specifications

L4 Requirement Change Specifications: Creating Independent Change Directories for Each Iteration and Their Functions

Workflow, Skill, Templates Will Change

Reasons and Frequency of Changes for Workflow, Skills, and Templates Files

Specification File Modification Permissions

AI Read, Modify, and Human Approval Permissions Table for Various Types of Specification Files

7. How Does SDD Function in Large and Complex Projects

Complete Iteration Lifecycle of Requirements

Complete Iteration Lifecycle of Requirements: Long-term Constraints, Current Specifications, Incremental Specifications, Design and Impact Analysis, Task Implementation, Verification and Acceptance, Merging and Archiving

Recommended SDD Project Directory Structure: GOVERNANCE, SPECS, CHANGES Etc., and Their Frequency of Changes

ARCHIVE Archiving, SKILLS Reusable Capabilities, WORKFLOWS Processes, TEMPLATES Templates Directory Structures

Different Ways to Handle Various Types of Requirements in SDD

Table Comparing How Different Types of Requirements Are Handled in SDD: Specifications, Solutions, Impact Analysis, Acceptance and Testing Requirements

Specification Files Should Follow Project Engineering Iterations

When multiple projects are being developed concurrently with different versions, specification documents will change frequently. These documents need to be consistent with the code. How to maintain this consistency depends on where the specification files are stored. There are three options.

Comparison of Three Options: Specification and Code in Same Repository, Independent Specification Repository, Mixed Management

Establish a Common Engineering Governance Repository

This actually implies that the common engineering governance repository can build project templates, similar to some code template files needed when creating a new project. This is like building a project scaffolding.

Directory Structure and Version Release Method of the Common Engineering Governance Repository

Business Project Repositories

Although these repositories contain personalized specification content for different projects and businesses, they still need governance mechanisms to update documents. Especially when using AI modifications, it is crucial to ensure the accuracy of document information.

Structure of Business Project Repositories and GOVERNANCE.LOCK Version Locking Mechanism Example

8. How to Avoid Consuming Large Token Amounts with Increasing Specification Files

Adopt a Layered, On-Demand Loading Mechanism

AI Context Layered, On-Demand Loading Strategy: Load by Scope Rather Than Full Read

Add Specification Index File

SPEC-INDEX.YAML Specification Index File Example: Automatically Select Relevant Business Specifications Based on Code Path

9. How to Resolve Conflicts in Specification File Modifications

Adopt Change Set Mechanism

Git Conflict and Semantic Conflict When Multiple Agents Simultaneously Modify the Same Specification File

Each Requirement Independently Maintains Its Own Specifications

There are two more points to note:

  1. Maintain code while maintaining specification files.
  2. The merged content of specifications should be consistent with the functionality of the code, otherwise there may be hallucinations or inconsistent business functions, which adds complexity.

Change Set Mechanism: Each Requirement Independently Maintains Incremental Specifications, Merged by a Detection Engine and Inclusive in Formal Specifications

Use Structured Format for Incremental Specifications

This makes the specification files more flexible. Also, using appropriate file formats can help manage documents better and make them more readable.

Example of Using YAML Structure for Incremental Specifications and Its Programmable Implementation Capabilities

Pitfalls of Git Conflicts and Semantic Conflicts

Git conflicts are technical issues, while semantic conflicts involve business issues, including business rules and functional intentions. These conflicts are harder to resolve, so it is not advisable to merge them casually; confirmation with business personnel or product managers should be sought.

Difference Between Textual Git Conflicts and Semantic Conflicts, and Three-Layered Check for Specification Merging

10. Is SDD Suitable for All Software Development Projects

This tests the AI Vibe Coding Agent’s technical capabilities. Different tasks with varying difficulty levels require different files to be added or changed, which needs joint judgment by development personnel and AI Agents.

Especially if using AI Vibe Coding, it is likely that a project or company will have dozens of requirement changes in a day, even hundreds. This goes beyond what SDD can handle alone; more workflows and platforms need to be integrated into the development process.

Three-Level Development Workflow: L1 Simple Changes, L2 Ordinary Requirements, L3 Major Requirements with Suggestions for Number of Files

11. How to Synchronize Specification Changes Across Different Versions

It is not only about file content consistency but also business semantic consistency. Therefore, in addition to specification files, related Skills should be added to ensure the three are consistent.

Forward Port Illustration for Multi-Version Parallel Development: Repairing from Lower Version to Subsequent Development Versions

12. How to Use SDD for Large Requirements Spanning Multiple Projects and Engineering

As mentioned at the beginning, a single sentence requirement such as “Help me create an e-commerce shopping platform similar to Taobao.”

This is large enough or can be further detailed: The functionality doesn’t need to be complex; just login, browse products, and place orders.

In this case, requirements could be split across multiple projects based on business functions.

Core Issues in Cross-Project Specification-Driven Development (CROSS-PROJECT SDD)

Multi-Level Research Coordination of SDD Engineering Governance

Business Level, System Level, and Project Level Three Layers of Specification Division and Inter-project Collaboration

Responsibilities for L1 Business Specifications, L2 Cross-System Collaborative Specifications, and L3 Project Specifications

This might sound exaggerated, but large requirements spanning multiple projects do exist. However, enterprise-level engineering governance repositories are typically company-wide initiatives and are not commonly needed in most cases. The organizational structure of a company is related to its business, so the SDD or requirements for different business scenarios can vary significantly.

Responsibilities of Enterprise-Level Engineering Governance Repositories, Cross-Project Business Solutions, and Independent Business Project Repositories

SDD (Specification-Driven Development) is not a software engineering concept created solely by the AI era.

Its core ideas have existed in traditional software engineering for decades. However, modern SDD aimed at AI Agents began gaining widespread attention around 2025 and has become an important practice direction in AI Native software engineering.

There’s an interesting phenomenon here:

As AI code generation capabilities grow stronger, software development requires stricter specifications, constraints, processes, and acceptance standards.

This might seem contradictory but actually reflects a shift in the core bottleneck of software development: from how to write code to accurately describing software, constraining implementation behavior, and validating delivery results.

Historical Origins of SDD: Formal Methods, Contractual Design, Model-Driven Development, TDD/BDD, and Their Evolution in AI Programming Era

13.1 Formal Methods: The Earliest Ideological Foundation

Formal Methods: Describing Software Behavior Using Preconditions, Postconditions, and Business Invariants

13.2 Model-Driven Development: Attempting to Automatically Generate Code

Comparison Between Traditional MDA (Model-Driven Architecture) and AI Native SDD

13.3 TDD and BDD: Direct Ideological Sources for Modern SDD

Core Driving Objects of TDD, BDD, DDD, MDD, CONTRACT-FIRST, and SDD

13.4 When Did SDD Really Take Off?

Timeline of SDD’s Rise: Notable Events Such as Vibe Coding, AWS Kiro, Github Spec Kit

13.5 The Relationship Between Vibe Coding and SDD

This actually implies that the complexity in software development still exists. Although AI programming makes functionality implementation faster and better, it seems to lower the perceived difficulty of software development. However, from a human perspective, understanding software engineering is still quite complex.

Comparison Between Vibe Coding and Specification-Driven Development

13.6 Why Stronger AI Programming Capabilities Actually Drive SDD

Evolution of AI Programming Capabilities: From Code Completion to Conversational Programming, Multi-Agent Collaborative Development

AI’s Higher Autonomy and Larger Impact Range on Errors

Reducing the Cost of Specification Writing with AI: Comparison Between Traditional R&D and AI Native R&D Work Content

My additional understanding is that both specification-driven development and behavior-driven, test-driven development share a core concept: “Documentation as Code, Code as Documentation.” In the era of widespread AI programming, this concept becomes particularly important. Previously, many people complained about others not writing documentation because they themselves were in the habit of not doing so; maintaining documentation was as costly as maintaining code. With the ease of producing code, maintaining documentation naturally became easier.

There should be more practices and new ideas related to SDD in the future. Thank you for reading this article, and I will continue to learn and implement SDD practices.

Comments

Comments are powered by GitHub Discussions. Sign in with GitHub to join the discussion.