Prompt-to-Spec
Commands
- •
/spec <idea>— Start the 3-phase refinement process - •
/spec refine <path>— Refine an existing spec
Procedure
Phase 1: EXTRACT
Ask clarifying questions to expose hidden assumptions:
- •Who is the user/audience?
- •What problem does this solve?
- •What does success look like?
- •What are the constraints (time, tech, budget)?
- •What is explicitly out of scope?
- •Are there existing systems this must integrate with?
Do NOT proceed until all ambiguities are resolved. Ask follow-up questions if answers are vague.
Phase 2: STRUCTURE
Generate a structured spec document:
code
# Spec: {Title}
## Problem Statement
{1-2 sentences describing the problem}
## Solution Overview
{1-2 sentences describing the approach}
## User Stories
- As a {role}, I want {capability} so that {benefit}
## Requirements
### Functional
- FR-1: {requirement}
- FR-2: {requirement}
### Non-Functional
- NFR-1: {performance, security, scalability requirement}
## Acceptance Criteria
- AC-1: Given {context}, when {action}, then {expected result}
- AC-2: Given {context}, when {action}, then {expected result}
## Out of Scope
- {explicitly excluded items}
## Dependencies
- {systems, APIs, data sources needed}
## Open Questions
- {unresolved items that need answers before implementation}
Phase 3: VALIDATE
Present the spec to the user and ask:
- •Does this accurately capture what you want?
- •Are the acceptance criteria testable and complete?
- •Is anything missing from the requirements?
- •Is the scope right (not too big, not too small)?
Iterate until the user signs off, then save to docs/specs/{slug}.md.
Rules
- •NEVER skip Phase 1 — vague specs lead to wrong implementations
- •Every requirement MUST have at least one acceptance criterion
- •Acceptance criteria MUST be testable (given/when/then format)
- •Out of Scope section is mandatory — prevents scope creep