/speckit.clarify command identifies underspecified areas in your feature specification and asks up to 5 highly targeted questions to eliminate ambiguity.
Purpose
Reduce implementation risk by:- Detecting missing decision points in requirements
- Asking strategic questions that impact architecture or UX
- Recording answers directly in the specification
- Ensuring the spec is implementation-ready
Clarification should run after
/speckit.specify and before /speckit.plan. It’s optional for well-understood features but critical for complex or novel requirements.Usage
How It Works
Load Prerequisites
Runs prerequisite check script to get:
FEATURE_DIR: Current feature directory pathFEATURE_SPEC: Path to spec.md file
/speckit.specify first)Scan for Ambiguities
Performs structured coverage analysis across taxonomy:
- Functional scope & behavior
- Domain & data model
- Interaction & UX flow
- Non-functional attributes (performance, security, reliability)
- Integration & dependencies
- Edge cases & failure handling
- Constraints & tradeoffs
- Terminology consistency
Prioritize Questions
Generates up to 5 questions based on:
- Impact: Will the answer change architecture, data modeling, or UX?
- Uncertainty: Are there multiple reasonable interpretations?
- Risk: Does ambiguity create downstream rework risk?
(Impact × Uncertainty) to rank candidatesAsk Sequentially
Presents one question at a time:
- Multiple choice with recommended option (based on best practices)
- Or short answer with suggested response
- User accepts recommendation or provides alternative
- After each answer, immediately updates spec.md
Integrate Incrementally
After each accepted answer:
- Creates
## Clarificationssection (if missing) - Adds
### Session YYYY-MM-DDsubsection - Records
- Q: <question> → A: <answer> - Updates appropriate spec sections
- Saves file immediately (atomic updates)
Question Format
Multiple Choice Questions
For decisions with discrete options:Short Answer Questions
For open-ended decisions:Ambiguity Taxonomy
The command scans for gaps in these categories:Functional Scope & Behavior
- Core user goals clearly defined?
- Explicit out-of-scope declarations?
- User roles/personas differentiated?
Domain & Data Model
- Entities, attributes, relationships specified?
- Identity & uniqueness rules clear?
- Lifecycle/state transitions defined?
- Data volume/scale assumptions documented?
Interaction & UX Flow
- Critical user journeys sequenced?
- Error/empty/loading states described?
- Accessibility or localization needs?
Non-Functional Quality Attributes
- Performance: Latency, throughput targets
- Scalability: Horizontal/vertical limits
- Reliability: Uptime, recovery expectations
- Observability: Logging, metrics, tracing
- Security: AuthN/Z, data protection, threats
- Compliance: Regulatory constraints
Integration & Dependencies
- External services/APIs and failure modes
- Data import/export formats
- Protocol/versioning assumptions
Edge Cases & Failure Handling
- Negative scenarios covered?
- Rate limiting/throttling defined?
- Conflict resolution (concurrent edits)?
Constraints & Tradeoffs
- Technical constraints explicit?
- Tradeoffs or rejected alternatives documented?
Terminology & Consistency
- Canonical glossary terms established?
- Synonyms/deprecated terms avoided?
Real-World Example
Clarifications Section
Answers are recorded in the spec with timestamps:Strategic Question Selection
The command asks about decisions that materially impact:Architecture
- Database choice (relational vs. document vs. cache)
- Stateful vs. stateless design
- Monolith vs. microservices
- Sync vs. async processing
Data Modeling
- Entity relationships
- State machine transitions
- Data retention policies
- Partitioning strategies
UX Behavior
- Real-time vs. polling updates
- Optimistic vs. pessimistic locking
- Offline support requirements
- Error recovery flows
Operational Readiness
- Performance SLAs
- Security posture
- Compliance obligations
- Monitoring/alerting needs
Question Limits
What Gets Asked
- Scope boundaries affecting architecture
- Security/privacy decisions with legal implications
- Performance targets driving technology choices
- User experience tradeoffs with competing solutions
What Gets Deferred
- Implementation details (framework selection)
- Code organization preferences
- Logging format specifics
- Variable naming conventions
Validation After Clarification
Ensures quality of updates:Structural Validity
Markdown structure intact, only allowed new headings are Clarifications sections
Early Termination
You can stop clarification at any time:- Questions answered so far
- Coverage status
- Whether to proceed to planning or clarify again later
No Ambiguities Detected
If the spec is already clear:Best Practices
Run Before Planning
Provide Context Hints
Help prioritize questions:Accept Recommendations
The AI suggests options based on:- Industry best practices
- Project type patterns
- Risk reduction strategies
- Alignment with existing spec context
Answer All Questions
Each question impacts implementation:- Skipping questions leaves ambiguity
- Ambiguity leads to rework
- Answer thoughtfully but don’t overthink
Handoffs
After clarification:Build Technical Plan
Generate architecture with all ambiguities resolved
Run Another Session
If deferred items remain and you want to address them now
File Updates
Next Steps
Plan
Create technical architecture and design decisions