Spec-Driven Development
Comprehensive specification-driven development workflow that transforms vague ideas into production-ready implementations through structured planning, architecture design, and quality-gated execution.
Focused on:
Specification-first development - Define what to build before how to build it
Multi-agent architecture - Specialized agents for analysis, design, and implementation
Iterative refinement - Continuous validation and quality gates at each stage
Documentation-driven - Generate living documentation alongside implementation
Plugin Target
Reduce implementation rework - detailed specs catch issues before code is written
Improve architecture decisions - structured exploration of alternatives with trade-offs
Maintain project consistency - constitution and templates ensure uniform standards
Enable complex feature development - break down large features into manageable, testable tasks
Overview
The SDD plugin implements a structured software development methodology based on GitHub Spec Kit, OpenSpec, and the BMad Method. It uses specialized AI agents to guide you through the complete development lifecycle: from initial brainstorming through specification, architecture design, task breakdown, implementation, and documentation.
The workflow ensures that every feature is thoroughly specified, properly architected, and systematically implemented with quality gates at each stage. Each phase produces concrete artifacts (specification files, architecture documents, task lists) that serve as the source of truth for subsequent phases.
Quick Start
Workflow Diagram
Commands Overview
/sdd:00-setup - Project Constitution Setup
Create or update the project constitution that establishes development principles, coding standards, and governance rules for all subsequent development.
Purpose - Establish project-wide development standards and principles
Output -
specs/constitution.mdand template files for specs, plans, and tasks
Arguments
Optional principle inputs such as technology stack, architectural patterns, or development guidelines. Examples: "Use NestJS, follow SOLID and Clean Architecture" or "Python with FastAPI, prioritize type safety".
How It Works
Template Initialization: Downloads and creates the constitution template at
specs/constitution.mdalong with spec, plan, and tasks templates inspecs/templates/Value Collection: Gathers concrete values for template placeholders from:
User input (conversation)
Existing repo context (README, docs, CLAUDE.md)
Prior constitution versions if present
Constitution Drafting: Fills the template with:
Project name and description
Development principles (each with name, rules, and rationale)
Governance section with amendment procedures and versioning policy
Compliance review expectations
Consistency Propagation: Ensures all dependent templates align with updated principles:
specs/templates/plan-template.md- Architecture planning templatespecs/templates/spec-template.md- Feature specification templatespecs/templates/tasks-template.md- Task breakdown templatespecs/templates/spec-checklist.md- Specification quality checklist
Sync Impact Report: Documents version changes, modified principles, and any follow-up TODOs
Usage Examples
Best practices
Be specific about tech stack - Clear technology choices improve downstream decisions
Include architectural patterns - Patterns like Clean Architecture guide agent decisions
Review generated templates - Ensure templates align with your team's workflow
Version your constitution - Use semantic versioning for governance changes
/sdd:01-specify - Feature Specification
Transform a natural language feature description into a detailed, validated specification with business requirements, user scenarios, and success criteria.
Purpose - Create comprehensive feature specification from business requirements
Output -
specs/<feature-name>/spec.mdwith validated requirements
Arguments
Natural language description of the feature to build. Examples: "Add OAuth authentication with Google and GitHub providers" or "Create a dashboard for analytics with real-time data".
How It Works
Feature Naming: Generates a concise short name (2-4 words) for the feature branch and spec directory
Branch/Directory Management:
Checks for existing branches to determine the next available feature number
Creates
specs/<number>-<short-name>/directory (FEATURE_DIR)Copies spec template to
FEATURE_DIR/spec.md
Business Analysis: Launches
business-analystagent to:Perform requirements discovery and stakeholder analysis
Extract key concepts: actors, actions, data, constraints
Write specification following the template structure
Mark unclear aspects with [NEEDS CLARIFICATION] (max 3)
Specification Validation: Launches second
business-analystagent to:Fill in
spec-checklist.mdwith quality criteriaReview spec against each checklist item
Document specific issues with quoted spec sections
Iterate until all items pass (max 3 iterations)
Clarification Resolution: If [NEEDS CLARIFICATION] markers remain:
Presents max 3 questions with suggested answers in table format
Options include A, B, C choices plus Custom input
Updates spec with user's chosen answers
Re-validates after clarifications
Usage Examples
Best practices
Focus on WHAT and WHY - Describe the problem and user needs, not implementation
Be specific about scope - Clear boundaries prevent scope creep
Include success criteria - Measurable outcomes help validation
Answer clarification questions - User input improves spec quality
Review generated spec - Verify it captures your intent before proceeding
/sdd:02-plan - Architecture Planning
Design the technical architecture with multiple approaches, research unknowns, and create a comprehensive implementation plan with data models and API contracts.
Purpose - Create detailed architecture design with trade-off analysis
Output -
FEATURE_DIR/plan.md,design.md,research.md,data-model.md,contracts.md
Arguments
Optional architecture preferences or constraints. Examples: "Use libraries instead of direct integration" or "Prioritize simplicity over performance".
How It Works
Context Loading: Reads feature specification and project constitution
Research & Exploration (Stage 2):
Launches
researcheragent to investigate unknown technologies and dependenciesLaunches 2-3
code-exploreragents in parallel to:Find similar features in the codebase
Map architecture and abstractions
Identify UI patterns and testing approaches
Consolidates findings in
FEATURE_DIR/research.md
Clarifying Questions (Stage 3):
Reviews codebase findings and original requirements
Identifies underspecified aspects: edge cases, error handling, integration points
Presents questions and waits for user answers
Architecture Design (Stage 4):
Launches 2-3
software-architectagents with different focuses:Minimal changes: Smallest change, maximum reuse
Clean architecture: Maintainability, elegant abstractions
Pragmatic balance: Speed + quality trade-off
Each produces a design document with trade-offs
Final Plan (Stage 5):
User selects preferred approach
Launches
software-architectagent to create final designGenerates:
FEATURE_DIR/design.md- Final architecture documentFEATURE_DIR/plan.md- Implementation planFEATURE_DIR/data-model.md- Entity definitions, relationships, validation rulesFEATURE_DIR/contracts.md- API endpoints in OpenAPI/GraphQL format
Plan Review (Stage 6):
Reviews implementation plan for unclear areas
Resolves high-confidence issues automatically
Presents remaining uncertainties to user for clarification
Usage Examples
Best practices
Review research findings - Understand what exists before designing
Answer architecture questions - Your input shapes the design direction
Compare all approaches - Each has trade-offs worth considering
Validate data models early - Entity definitions drive implementation
Review API contracts - Contracts become the integration specification
/sdd:03-tasks - Task Generation
Generate an actionable, dependency-ordered task list organized by user stories with complexity analysis and parallel execution opportunities.
Purpose - Break down feature into executable tasks with clear dependencies
Output -
FEATURE_DIR/tasks.mdwith phased task list
Arguments
Optional guidance for task creation. Examples: "Use TDD approach and prioritize MVP features" or "Focus on backend first, then frontend".
How It Works
Context Loading: Reads from FEATURE_DIR:
Required: plan.md (tech stack, architecture), spec.md (user stories with priorities)
Optional: data-model.md, contracts.md, research.md
Task Generation: Launches
tech-leadagent to create tasks following:Implementation Strategy Selection:
Top-to-Bottom: Workflow-first when process is clear
Bottom-to-Top: Building-blocks-first when algorithms are complex
Mixed: Combine approaches for different parts
Phase Structure:
Phase 1: Setup (project initialization)
Phase 2: Foundational (blocking prerequisites)
Phase 3+: User Stories in priority order (P1, P2, P3...)
Final Phase: Polish & cross-cutting concerns
Complexity Analysis: Each task includes:
Clear goal and acceptance criteria
Technical approach and patterns to use
Dependencies and blocking relationships
Complexity Rating: Low/Medium/High
Uncertainty Rating: Low/Medium/High
Risk Review: After generation:
Lists all high-complexity or high-uncertainty tasks
Explains what makes each task risky
Asks if user wants further decomposition
Usage Examples
Best practices
Review high-risk tasks - Consider decomposing complex tasks further
Validate task dependencies - Ensure parallel tasks are truly independent
Check user story coverage - Each story should have complete task set
Estimate before starting - Use complexity ratings for planning
Keep tasks small - 1-2 day tasks are ideal
/sdd:04-implement - Feature Implementation
Execute the implementation plan by processing all tasks with TDD approach, quality review, and continuous progress tracking.
Purpose - Implement all tasks following the execution plan
Output - Working code with tests passing, updated tasks.md with completion status
Arguments
Optional implementation preferences. Examples: "Focus on test coverage and error handling" or "Prioritize performance optimization".
How It Works
Context Loading: Reads implementation context from FEATURE_DIR:
Required: tasks.md, plan.md
Optional: data-model.md, contracts.md, research.md
Phase Execution (Stage 8): For each phase in tasks.md:
Launches
developeragent to implement the phaseFollows execution rules:
Phase-by-phase: Complete each phase before next
Respect dependencies: Sequential tasks in order, parallel [P] tasks together
TDD approach: Tests before implementation
File coordination: Tasks affecting same files run sequentially
Progress Tracking:
Reports progress after each completed phase
Marks completed tasks as [X] in tasks.md
Halts on non-parallel task failures
Continues parallel tasks, reports failed ones
Completion Validation: Launches
developeragent to verify:All required tasks completed
Implementation matches specification
Tests pass and coverage meets requirements
Implementation follows technical plan
Quality Review (Stage 9):
Performs
/code-review:review-local-changesif availableOtherwise launches 3
developeragents focusing on:Simplicity/DRY/elegance
Bugs/functional correctness
Project conventions/abstractions
Consolidates findings and recommends fixes
User Decision: Presents findings and asks:
Fix now
Fix later
Proceed as-is
Usage Examples
Best practices
Address review findings - Quality issues compound over time
Monitor test failures - Fix tests before proceeding
Review progress regularly - Check tasks.md for completion status
Commit frequently - Save progress after each phase
/sdd:05-document - Feature Documentation
Document the completed feature implementation with API guides, architecture updates, usage examples, and lessons learned.
Purpose - Create comprehensive documentation for implemented feature
Output - Updated documentation in
docs/folder
Arguments
Optional focus areas for documentation. Examples: "Include API examples and integration guide" or "Focus on troubleshooting common issues".
How It Works
Context Loading: Reads from FEATURE_DIR:
Required: tasks.md (verify completion)
Optional: plan.md, spec.md, contracts.md, data-model.md
Implementation Verification (Stage 10):
Reviews tasks.md to confirm all tasks marked [X]
Identifies incomplete or partially implemented tasks
Reviews codebase for missing functionality
Presents issues to user: Fix now or later?
Documentation Update: Launches
tech-writeragent following workflow:Reads all FEATURE_DIR artifacts
Reviews files modified during implementation
Identifies documentation gaps in
docs/
Documentation Generation:
API guides and usage examples
Architecture updates reflecting implementation
README.md updates in affected folders
Development specifics for LLM navigation
Troubleshooting guidance for common issues
Output Summary:
Files updated
Major documentation changes
New best practices documented
Project status after this phase
Usage Examples
Best practices
Complete implementation first - Document working code, not plans
Include working examples - Test all code samples
Update architecture docs - Reflect actual implementation
Document gotchas - Share lessons learned during implementation
Cross-reference specs - Link to original requirements
/sdd:create-ideas - Idea Generation
Generate ideas in one shot using creative sampling. Based on Verbalized Sampling - a training-free prompting strategy to mitigate mode collapse in LLMs by requesting responses with probabilities. Achieves 2-3x diversity improvement while maintaining quality.
Different from /sdd:brainstorm, by much simpler and faster approach, but focused on generating ideas in one shot, don't include refinement, focuses on creativity. Can be used for any other purpose that include creative thinking.
Purpose - Generate responses which require high diversity and creativity, like brainstorming or creative writing
Output - List of ideas with text and probability scores
Arguments
Topic or problem to generate ideas for. Optionally specify the number of ideas to generate (defaults to 5).
How It Works
Creative Sampling: Uses verbalized probability sampling to generate diverse responses
Requests responses from the full distribution or distribution tails
Each response includes a probability score (< 0.10 for tail sampling)
Reduces mode collapse common in standard LLM generation
Output Format: Returns a list where each item contains:
Text: The generated idea or response
Probability: Numeric score indicating sampling position
Usage Examples
When to Use
Use
/sdd:create-ideaswhen you need quick, diverse ideas without refinementUse
/sdd:brainstormwhen you need thorough exploration with validation and documentation
Best practices
Be specific about the domain - "API error handling patterns" vs just "error handling"
Use for divergent thinking - Generate many options before converging on solutions
Review probability scores - Lower probabilities indicate more creative/unusual ideas
Combine with brainstorm - Use create-ideas for initial ideation, then brainstorm to refine
/sdd:brainstorm - Idea Refinement
Transform rough ideas into fully-formed designs through collaborative dialogue, incremental validation, and design documentation.
Purpose - Refine vague ideas into actionable designs
Output - Design document in
docs/plans/YYYY-MM-DD-<topic>-design.md
Arguments
Optional initial concept to explore. Can be vague: "something to help with user onboarding" or more specific: "real-time notification system".
How It Works
Context Understanding:
Reviews current project state (files, docs, recent commits)
Asks questions one at a time to refine the idea
Prefers multiple choice questions when possible
Focuses on: purpose, constraints, success criteria
Approach Exploration:
Proposes 2-3 different approaches with trade-offs
Leads with recommended option and reasoning
Presents options conversationally
Design Presentation:
Breaks design into 200-300 word sections
Asks after each section if it looks right
Covers: architecture, components, data flow, error handling, testing
Ready to clarify if something doesn't make sense
Documentation:
Writes validated design to
docs/plans/YYYY-MM-DD-<topic>-design.mdCommits the design document to git
Implementation Handoff (optional):
Asks if ready to set up for implementation
Can create isolated workspace with git worktrees
Can create detailed implementation plan
Key Principles
One question at a time - Don't overwhelm with multiple questions
Multiple choice preferred - Easier than open-ended when possible
YAGNI ruthlessly - Remove unnecessary features from designs
Explore alternatives - Always propose 2-3 approaches before settling
Incremental validation - Present design in sections, validate each
Usage Examples
Best practices
Start with the problem - Describe what you're trying to solve
Be open to alternatives - The first idea isn't always best
Engage with questions - Your answers shape the design
Validate incrementally - Catch issues early in design sections
Save the design - Use as input for
/sdd:01-specify
Available Agents
The SDD plugin uses specialized agents for different phases of development:
business-analyst
Requirements discovery, stakeholder analysis, specification writing
/sdd:01-specify
researcher
Technology research, dependency analysis, best practices
/sdd:02-plan
code-explorer
Codebase analysis, pattern identification, architecture mapping
/sdd:02-plan
software-architect
Architecture design, component design, implementation planning
/sdd:02-plan
tech-lead
Task decomposition, dependency mapping, sprint planning
/sdd:03-tasks
developer
Code implementation, TDD execution, quality review
/sdd:04-implement
tech-writer
Documentation creation, API guides, architecture docs
/sdd:05-document
Theoretical Foundation
The SDD plugin is based on established software engineering methodologies and research:
Core Methodologies
GitHub Spec Kit - Specification-driven development templates and workflows
OpenSpec - Open specification format for software requirements
BMad Method - Structured approach to breaking down complex features
Supporting Research
Specification-Driven Development - Design by contract and formal specification approaches
Agile Requirements Engineering - User stories, acceptance criteria, and iterative refinement
Test-Driven Development - Writing tests before implementation
Clean Architecture - Separation of concerns and dependency inversion
Vertical Slice Architecture - Feature-based organization for incremental delivery
Verbalized Sampling - Training-free prompting strategy for diverse idea generation. Achieves 2-3x diversity improvement while maintaining quality. Used for
create-ideas,brainstormandplancommands
Last updated