| description | Identify underspecified areas in feature spec, ask up to 5 targeted clarification questions, encode answers back into spec. | |||||||
|---|---|---|---|---|---|---|---|---|
| handoffs |
|
|||||||
| scripts |
|
$ARGUMENTS
Consider user input before proceeding (if not empty).
-
Run
{SCRIPT}, parse FEATURE_DIR and FEATURE_SPEC. Abort if JSON fails. -
Scan spec using taxonomy (mark Clear/Partial/Missing):
- Functional scope, domain/data model, UX flow, non-functional (perf/scale/security/observability), integrations, edge cases, constraints, terminology, completion signals, placeholders
-
Generate max 5 questions (prioritized by Impact*Uncertainty):
- Must be answerable via multiple-choice (2-5 options) or short answer (<=5 words)
- Only include if answer materially impacts architecture, testing, UX, or compliance
- Balance category coverage
-
Ask one at a time:
- Multiple-choice: show Recommended option with reasoning + options table. User can pick letter, say "yes"/"recommended", or custom answer
- Short-answer: show Suggested answer. User can accept or provide own
- Stop when: all resolved, user signals done, or 5 questions asked
-
Integrate each answer immediately:
- Add
## Clarifications>### Session YYYY-MM-DDif missing - Append
- Q: <question> → A: <answer> - Update appropriate spec section (requirements, stories, data model, success criteria, edge cases)
- Replace obsolete statements, save after each integration
- Add
-
Validate: No duplicates, <=5 questions, no lingering placeholders, consistent terminology.
-
Report: Questions asked/answered, path to updated spec, sections touched, coverage summary, next command suggestion.
- Never exceed 5 questions | Present one at a time | Never reveal future questions
- If no ambiguities: report "No critical ambiguities" and suggest proceeding
- If spec missing: instruct to run
/speckit.specifyfirst - Respect early termination ("done", "stop", "proceed")