/specify - Interactive Feature Specification Discovery
Given that feature description, do this:
Generate a concise short name (2-4 words) for the SPEC_FILE:
- Analyze the feature description and extract the most meaningful keywords
- Create a 2-4 word short name that captures the essence of the feature
- Use action-noun format when possible (e.g., "add-user-auth", "fix-payment-bug")
- Preserve technical terms and acronyms (OAuth2, API, JWT, etc.)
- Keep it concise but descriptive enough to understand the feature at a glance
- Examples:
- "I want to add user authentication" → "user-auth"
- "Implement OAuth2 integration for the API" → "oauth2-api-integration"
- "Create a dashboard for analytics" → "analytics-dashboard"
- "Fix payment processing timeout bug" → "fix-payment-timeout"
Load reference/spec-template.md to understand required sections.
Follow this execution flow:
- Parse user description from Input
If empty: ERROR "No feature description provided"
- Extract key concepts from description
Identify: actors, actions, data, constraints
- For unclear aspects:
- Make informed guesses based on context and industry standards
- Only mark with [NEEDS CLARIFICATION: specific question] if:
- The choice significantly impacts feature scope or user experience
- Multiple reasonable interpretations exist with different implications
- No reasonable default exists
- Prioritize clarifications by impact: scope > security/privacy > user experience > technical details
- Fill User Scenarios & Testing section
If no clear user flow: ERROR "Cannot determine user scenarios"
- Generate Functional Requirements
Each requirement must be testable
Use reasonable defaults for unspecified details (document assumptions in Assumptions section)
- Define Success Criteria
Create measurable, technology-agnostic outcomes
Include both quantitative metrics (time, performance, volume) and qualitative measures (user satisfaction, task completion)
Each criterion must be verifiable without implementation details
- Identify Key Entities (if data involved)
Write the specification to SPEC_FILE using the template structure, replacing placeholders with concrete details derived from the feature description (arguments) while preserving section order and headings.
Quick Guidelines
- Focus on WHAT users need and WHY.
- Avoid HOW to implement (no tech stack, APIs, code structure).
- Written for business stakeholders, not developers.
- DO NOT create any checklists that are embedded in the spec. That will be a separate command.
Section Requirements
- Mandatory sections: Must be completed for every feature
- Optional sections: Include only when relevant to the feature
- When a section doesn't apply, remove it entirely (don't leave as "N/A")
For AI Generation
When creating this spec from a user prompt:
- Make informed guesses: Use context, industry standards, and common patterns to fill gaps
- Document assumptions: Record reasonable defaults in the Assumptions section
- Prioritize clarifications: scope > security/privacy > user experience > technical details
- Think like a tester: Every vague requirement should fail the "testable and unambiguous" checklist item
- Common areas needing clarification (only if no reasonable default exists):
- Feature scope and boundaries (include/exclude specific use cases)
- User types and permissions (if multiple conflicting interpretations possible)
- Security/compliance requirements (when legally/financially significant)
Examples of reasonable defaults (don't ask about these):
- Data retention: Industry-standard practices for the domain
- Performance targets: Standard web/mobile app expectations unless specified
- Error handling: User-friendly messages with appropriate fallbacks
- Authentication method: Standard session-based or OAuth2 for web apps
- Integration patterns: RESTful APIs unless specified otherwise
Success Criteria Guidelines
Success criteria must be:
- Measurable: Include specific metrics (time, percentage, count, rate)
- Technology-agnostic: No mention of frameworks, languages, databases, or tools
- User-focused: Describe outcomes from user/business perspective, not system internals
- Verifiable: Can be tested/validated without knowing implementation details
Good examples:
- "Users can complete checkout in under 3 minutes"
- "System supports 10,000 concurrent users"
- "95% of searches return results in under 1 second"
- "Task completion rate improves by 40%"
Bad examples (implementation-focused):
- "API response time is under 200ms" (too technical, use "Users see results instantly")
- "Database can handle 1000 TPS" (implementation detail, use user-facing metric)
- "React components render efficiently" (framework-specific)
- "Redis cache hit rate above 80%" (technology-specific)
Next Step: After initial specification complete, interview user with all NEEDS CLARIFICATION questions.
1---2name: specify3description: Interactive feature specification discovery through Socratic dialogue and systematic exploration.4---56# /specify - Interactive Feature Specification Discovery78Given that feature description, do this:9101. **Generate a concise short name** (2-4 words) for the SPEC_FILE:11 - Analyze the feature description and extract the most meaningful keywords12 - Create a 2-4 word short name that captures the essence of the feature13 - Use action-noun format when possible (e.g., "add-user-auth", "fix-payment-bug")14 - Preserve technical terms and acronyms (OAuth2, API, JWT, etc.)15 - Keep it concise but descriptive enough to understand the feature at a glance16 - Examples:17 - "I want to add user authentication" → "user-auth"18 - "Implement OAuth2 integration for the API" → "oauth2-api-integration"19 - "Create a dashboard for analytics" → "analytics-dashboard"20 - "Fix payment processing timeout bug" → "fix-payment-timeout"21223. Load `reference/spec-template.md` to understand required sections.23244. Follow this execution flow:2526 1. Parse user description from Input27 If empty: ERROR "No feature description provided"28 2. Extract key concepts from description29 Identify: actors, actions, data, constraints30 3. For unclear aspects:31 - Make informed guesses based on context and industry standards32 - Only mark with [NEEDS CLARIFICATION: specific question] if:33 - The choice significantly impacts feature scope or user experience34 - Multiple reasonable interpretations exist with different implications35 - No reasonable default exists36 - Prioritize clarifications by impact: scope > security/privacy > user experience > technical details37 4. Fill User Scenarios & Testing section38 If no clear user flow: ERROR "Cannot determine user scenarios"39 5. Generate Functional Requirements40 Each requirement must be testable41 Use reasonable defaults for unspecified details (document assumptions in Assumptions section)42 6. Define Success Criteria43 Create measurable, technology-agnostic outcomes44 Include both quantitative metrics (time, performance, volume) and qualitative measures (user satisfaction, task completion)45 Each criterion must be verifiable without implementation details46 7. Identify Key Entities (if data involved)47485. Write the specification to SPEC_FILE using the template structure, replacing placeholders with concrete details derived from the feature description (arguments) while preserving section order and headings.4950## Quick Guidelines5152- Focus on **WHAT** users need and **WHY**.53- Avoid HOW to implement (no tech stack, APIs, code structure).54- Written for business stakeholders, not developers.55- DO NOT create any checklists that are embedded in the spec. That will be a separate command.5657### Section Requirements5859- **Mandatory sections**: Must be completed for every feature60- **Optional sections**: Include only when relevant to the feature61- When a section doesn't apply, remove it entirely (don't leave as "N/A")6263### For AI Generation6465When creating this spec from a user prompt:66671. **Make informed guesses**: Use context, industry standards, and common patterns to fill gaps682. **Document assumptions**: Record reasonable defaults in the Assumptions section694. **Prioritize clarifications**: scope > security/privacy > user experience > technical details705. **Think like a tester**: Every vague requirement should fail the "testable and unambiguous" checklist item716. **Common areas needing clarification** (only if no reasonable default exists):72 - Feature scope and boundaries (include/exclude specific use cases)73 - User types and permissions (if multiple conflicting interpretations possible)74 - Security/compliance requirements (when legally/financially significant)7576**Examples of reasonable defaults** (don't ask about these):7778- Data retention: Industry-standard practices for the domain79- Performance targets: Standard web/mobile app expectations unless specified80- Error handling: User-friendly messages with appropriate fallbacks81- Authentication method: Standard session-based or OAuth2 for web apps82- Integration patterns: RESTful APIs unless specified otherwise8384### Success Criteria Guidelines8586Success criteria must be:87881. **Measurable**: Include specific metrics (time, percentage, count, rate)892. **Technology-agnostic**: No mention of frameworks, languages, databases, or tools903. **User-focused**: Describe outcomes from user/business perspective, not system internals914. **Verifiable**: Can be tested/validated without knowing implementation details9293**Good examples**:9495- "Users can complete checkout in under 3 minutes"96- "System supports 10,000 concurrent users"97- "95% of searches return results in under 1 second"98- "Task completion rate improves by 40%"99100**Bad examples** (implementation-focused):101102- "API response time is under 200ms" (too technical, use "Users see results instantly")103- "Database can handle 1000 TPS" (implementation detail, use user-facing metric)104- "React components render efficiently" (framework-specific)105- "Redis cache hit rate above 80%" (technology-specific)106107Next Step: After initial specification complete, interview user with all NEEDS CLARIFICATION questions.