/spec-generator — Interview-driven spec generation
Interview the user in-depth using AskUserQuestion to produce a comprehensive, detailed specification file.
Workflow
- Read the user's instructions (passed as arguments)
- Begin an in-depth interview using AskUserQuestion
- Ask probing, non-obvious questions across all dimensions
- Continue interviewing until thorough coverage is achieved
- Write the final spec to a file
Interview Strategy
Phase 1: Core Vision
- What problem does this solve and for whom?
- What does success look like? What are the measurable outcomes?
- What existing solutions have been considered and why are they insufficient?
Phase 2: Technical Deep-Dive
- Architecture: monolith vs microservices, data flow, state management
- Data model: entities, relationships, constraints, migrations
- API design: endpoints, auth, rate limiting, versioning
- Infrastructure: hosting, scaling, caching, CDN, CI/CD
- Dependencies: third-party services, libraries, licensing concerns
Phase 3: UI & UX
- User flows: entry points, happy paths, error states
- Interaction patterns: real-time vs batch, optimistic updates
- Accessibility: screen readers, keyboard nav, color contrast
- Responsive behavior: breakpoints, mobile-first considerations
- Loading states, empty states, skeleton screens
Phase 4: Edge Cases & Constraints
- Concurrency: race conditions, optimistic locking, conflict resolution
- Failure modes: network errors, partial failures, retry strategies
- Security: auth model, data encryption, input validation, CSRF, XSS
- Performance budgets: load times, bundle sizes, database query limits
- Data volume: pagination, infinite scroll, search indexing
Phase 5: Tradeoffs & Decisions
- Build vs buy decisions
- Consistency vs availability tradeoffs
- Speed-to-market vs long-term maintainability
- Scope: what is explicitly out of scope for v1?
- Migration path: how to get from current state to target state
Phase 6: Operational Concerns
- Monitoring and alerting requirements
- Logging and debugging strategy
- Rollback and deployment strategy
- Testing strategy: unit, integration, e2e, visual regression
- Documentation needs: API docs, runbooks, onboarding
Interview Rules
- Ask ONE focused question at a time (never batch multiple questions)
- Do NOT ask obvious or surface-level questions
- Follow up on vague answers — push for specifics
- Challenge assumptions respectfully when they seem risky
- Adapt questions based on previous answers (skip irrelevant phases)
- If the user says "that's it" or "done", wrap up immediately
- Aim for 10-20 questions depending on project complexity
Output Format
Write the spec to SPEC.md (or a filename specified by the user) with this structure:
# [Project Name] — Specification
## Overview
[1-2 paragraph summary of what this is and why it exists]
## Goals & Success Criteria
- [Measurable outcome 1]
- [Measurable outcome 2]
## User Stories
- As a [role], I want [capability] so that [benefit]
## Technical Architecture
### System Design
[Architecture decisions, data flow diagrams in text]
### Data Model
[Entities, relationships, constraints]
### API Design
[Endpoints, auth, contracts]
## UI/UX Specification
### User Flows
[Step-by-step flows for key interactions]
### Wireframe Descriptions
[Text descriptions of key screens/components]
## Edge Cases & Error Handling
[Documented edge cases and how they're handled]
## Security Considerations
[Auth, encryption, validation, threat model]
## Performance Requirements
[Budgets, benchmarks, scaling expectations]
## Tradeoffs & Decisions
[Key decisions made during the interview with rationale]
## Out of Scope (v1)
[Explicitly excluded items]
## Open Questions
[Unresolved items that need further discussion]
Prompt
Follow the user instructions and interview me in detail using the AskUserQuestion tool about literally anything: technical implementation, UI & UX, concerns, tradeoffs, etc. Make sure the questions are not obvious — be very in-depth and continue interviewing me continually until it's complete. Then, write the spec to a file.
Guidelines
- Never skip the interview — always ask questions, even if instructions seem complete
- Prefer depth over breadth — 3 deep questions on architecture beats 10 shallow ones
- The spec should be detailed enough that another developer can implement from it alone
- Include direct quotes from user answers when they capture intent well
- Flag any contradictions discovered during the interview
1---2name: spec-generator3description: Interview user in-depth to create a detailed spec4---56# /spec-generator — Interview-driven spec generation78Interview the user in-depth using AskUserQuestion to produce a comprehensive, detailed specification file.910## Workflow11121. Read the user's instructions (passed as arguments)132. Begin an in-depth interview using AskUserQuestion143. Ask probing, non-obvious questions across all dimensions154. Continue interviewing until thorough coverage is achieved165. Write the final spec to a file1718## Interview Strategy1920### Phase 1: Core Vision2122- What problem does this solve and for whom?23- What does success look like? What are the measurable outcomes?24- What existing solutions have been considered and why are they insufficient?2526### Phase 2: Technical Deep-Dive2728- Architecture: monolith vs microservices, data flow, state management29- Data model: entities, relationships, constraints, migrations30- API design: endpoints, auth, rate limiting, versioning31- Infrastructure: hosting, scaling, caching, CDN, CI/CD32- Dependencies: third-party services, libraries, licensing concerns3334### Phase 3: UI & UX3536- User flows: entry points, happy paths, error states37- Interaction patterns: real-time vs batch, optimistic updates38- Accessibility: screen readers, keyboard nav, color contrast39- Responsive behavior: breakpoints, mobile-first considerations40- Loading states, empty states, skeleton screens4142### Phase 4: Edge Cases & Constraints4344- Concurrency: race conditions, optimistic locking, conflict resolution45- Failure modes: network errors, partial failures, retry strategies46- Security: auth model, data encryption, input validation, CSRF, XSS47- Performance budgets: load times, bundle sizes, database query limits48- Data volume: pagination, infinite scroll, search indexing4950### Phase 5: Tradeoffs & Decisions5152- Build vs buy decisions53- Consistency vs availability tradeoffs54- Speed-to-market vs long-term maintainability55- Scope: what is explicitly out of scope for v1?56- Migration path: how to get from current state to target state5758### Phase 6: Operational Concerns5960- Monitoring and alerting requirements61- Logging and debugging strategy62- Rollback and deployment strategy63- Testing strategy: unit, integration, e2e, visual regression64- Documentation needs: API docs, runbooks, onboarding6566## Interview Rules6768- Ask ONE focused question at a time (never batch multiple questions)69- Do NOT ask obvious or surface-level questions70- Follow up on vague answers — push for specifics71- Challenge assumptions respectfully when they seem risky72- Adapt questions based on previous answers (skip irrelevant phases)73- If the user says "that's it" or "done", wrap up immediately74- Aim for 10-20 questions depending on project complexity7576## Output Format7778Write the spec to `SPEC.md` (or a filename specified by the user) with this structure:7980```markdown81# [Project Name] — Specification8283## Overview84[1-2 paragraph summary of what this is and why it exists]8586## Goals & Success Criteria87- [Measurable outcome 1]88- [Measurable outcome 2]8990## User Stories91- As a [role], I want [capability] so that [benefit]9293## Technical Architecture94### System Design95[Architecture decisions, data flow diagrams in text]9697### Data Model98[Entities, relationships, constraints]99100### API Design101[Endpoints, auth, contracts]102103## UI/UX Specification104### User Flows105[Step-by-step flows for key interactions]106107### Wireframe Descriptions108[Text descriptions of key screens/components]109110## Edge Cases & Error Handling111[Documented edge cases and how they're handled]112113## Security Considerations114[Auth, encryption, validation, threat model]115116## Performance Requirements117[Budgets, benchmarks, scaling expectations]118119## Tradeoffs & Decisions120[Key decisions made during the interview with rationale]121122## Out of Scope (v1)123[Explicitly excluded items]124125## Open Questions126[Unresolved items that need further discussion]127```128129## Prompt130131Follow the user instructions and interview me in detail using the AskUserQuestion tool about literally anything: technical implementation, UI & UX, concerns, tradeoffs, etc. Make sure the questions are not obvious — be very in-depth and continue interviewing me continually until it's complete. Then, write the spec to a file.132133## Guidelines134135- Never skip the interview — always ask questions, even if instructions seem complete136- Prefer depth over breadth — 3 deep questions on architecture beats 10 shallow ones137- The spec should be detailed enough that another developer can implement from it alone138- Include direct quotes from user answers when they capture intent well139- Flag any contradictions discovered during the interview