/speckit.specify command transforms natural language feature descriptions into structured, implementation-ready specifications.
Purpose
Generate complete feature specifications that:- Focus on what users need and why (not implementation details)
- Organize requirements by user journeys with clear priorities
- Include measurable success criteria
- Identify gaps and ambiguities for clarification
- Create numbered feature branches automatically
Specifications are technology-agnostic and written for business stakeholders, not developers. No code, frameworks, or implementation details.
Usage
How It Works
Generate Short Name
Analyzes your description and creates a 2-4 word branch name:
- “Add user authentication” →
user-auth - “Build analytics dashboard” →
analytics-dashboard - “Fix payment timeout bug” →
fix-payment-timeout
Check Existing Branches
Finds the next available number by checking:
- Remote branches:
git ls-remote --heads origin - Local branches:
git branch - Specs directories:
specs/###-*
user-auth already exists as 002-user-auth, creates 003-user-authCreate Branch and Structure
Runs initialization script to:
- Create branch
###-feature-name - Create directory
specs/###-feature-name/ - Initialize
spec.mdfrom template - Check out the new branch
Generate Specification
Fills the spec template with:
- User stories organized by priority (P1, P2, P3)
- Functional requirements (testable, unambiguous)
- Success criteria (measurable, technology-agnostic)
- Key entities (if data is involved)
- Edge cases
- Assumptions for reasonable defaults
[NEEDS CLARIFICATION]markers (max 3) for critical unknowns
Validate Quality
Creates
checklists/requirements.md and validates:- No implementation details leaked
- All requirements are testable
- Success criteria are measurable
- Acceptance scenarios defined
- No more than 3 clarification markers
Specification Structure
Metadata
User Scenarios & Testing
The core of every spec - user journeys ordered by priority:Edge Cases
Requirements
Success Criteria
Measurable, technology-agnostic outcomes:Clarification Workflow
If the AI identifies critical ambiguities, it marks them and asks questions:Clarification Limits
Validation Checklist
The command automatically generateschecklists/requirements.md:
Real-World Example
Best Practices
Write User-Focused Descriptions
Trust the AI for Defaults
The AI makes reasonable assumptions:- Data retention: Industry-standard practices
- Performance: Standard web app expectations
- Error handling: User-friendly messages
- Auth patterns: OAuth2 for web services, session-based for traditional apps
Prioritize User Stories Thoughtfully
- P1: Minimum viable product - delivers core value independently
- P2: Enhances UX but system works without it
- P3: Nice-to-have features for polish
Common Patterns
Web Services
- User stories for each operation (Create, Read, Update, Delete)
- Pagination requirements
- Search/filter capabilities
- Success criteria for response times
- API versioning assumptions
CLI Tools
- User stories for deploy, validate, rollback
- CLI argument requirements
- Output formatting expectations
- Success criteria for execution time
UI Features
- User stories for viewing, customizing, exporting
- Widget type requirements
- Real-time update expectations
- Success criteria for load times
Handoffs
After specification is complete:Clarify Requirements
Resolve ambiguities with targeted questions (if
[NEEDS CLARIFICATION] markers exist)Build Technical Plan
Generate architecture and design decisions (skip clarify if spec is clear)
File Structure
Next Steps
Clarify
Learn how to resolve specification ambiguities