Spec Kit Clarify
Resolve high-impact ambiguity in the active feature specification before planning.
When to Use
spec.md already exists but has high-impact uncertainty.
- You see unresolved placeholders (for example
[NEEDS CLARIFICATION], TODOs, or conflicting statements).
- Ambiguity could materially change architecture, data model, testing, UX behavior, operations, or compliance expectations.
When Not to Use
- No feature spec exists yet (
spec-kit-specify first).
- Work is design decomposition (
spec-kit-plan) or task generation (spec-kit-tasks).
- You only need read-only consistency analysis (
spec-kit-analyze).
- You are reconciling broader cross-artifact drift (
spec-kit-reconcile).
Router Fit
- Primary route from
spec-kit after spec-kit-specify and before spec-kit-plan when ambiguity is still blocking.
Key Rules
- Ask exactly one question at a time.
- Ask at most 5 accepted questions per run.
- Every question must materially influence architecture, data model, testing, UX, operations, or compliance.
- Integrate each accepted answer into
spec.md immediately.
Workflow
digraph clarify_workflow {
rankdir=TB;
node [fontname="Helvetica", fontsize=10];
edge [fontname="Helvetica", fontsize=9];
start [label="Invoke spec-kit-clarify", shape=doublecircle];
resolve_paths [label="Resolve FEATURE_SPEC path", shape=box];
has_spec [label="spec.md exists?", shape=diamond];
stop_specify [label="STOP: run spec-kit-specify first", shape=octagon, style=filled, fillcolor=red, fontcolor=white];
scan_taxonomy [label="Scan with clarification taxonomy", shape=box];
has_high_impact [label="High-impact ambiguity remains?", shape=diamond];
report_none [label="Report no critical ambiguity", shape=box];
build_queue [label="Build and rank up to 5 questions", shape=box];
ask_loop [label="Ask one question at a time\n(recommend/suggest, disambiguate if needed)", shape=box];
integrate [label="Integrate accepted answer into spec.md", shape=box];
validate [label="Validate update and consistency", shape=box];
continue_gate [label="Continue loop?", shape=diamond];
final_report [label="Report touched sections, coverage, next step", shape=box];
done [label="Clarify complete", shape=doublecircle];
start -> resolve_paths;
resolve_paths -> has_spec;
has_spec -> stop_specify [label="no"];
has_spec -> scan_taxonomy [label="yes"];
scan_taxonomy -> has_high_impact;
has_high_impact -> report_none [label="no"];
report_none -> done;
has_high_impact -> build_queue [label="yes"];
build_queue -> ask_loop;
ask_loop -> integrate;
integrate -> validate;
validate -> continue_gate;
continue_gate -> ask_loop [label="yes"];
continue_gate -> final_report [label="no"];
final_report -> done;
}
Resolve active spec path:
- Run
scripts/check-prerequisites.sh --paths-only --json.
- Read
FEATURE_SPEC from the JSON payload.
- If
FEATURE_SPEC is missing, stop and direct the user to spec-kit-specify.
Build an internal ambiguity coverage map from spec.md:
- Use
assets/clarification-taxonomy.md as the required category checklist.
- Score each category as
Clear, Partial, or Missing.
- Create candidate questions only for
Partial or Missing categories where clarification changes implementation or validation outcomes.
Prioritize up to 5 candidate questions:
- Rank by
Impact * Uncertainty.
- Exclude already-answered items, stylistic preferences, and low-impact plan-level details.
- Ensure each question is answerable by either:
- multiple choice with 2-5 mutually exclusive options, or
- short answer constrained to
<=5 words.
Run the interactive one-question loop:
- Follow the workflow chart above for branching and stop conditions.
- Ask exactly one question at a time.
- For multiple-choice questions, provide a recommendation and an options table.
- For short-answer questions, provide a suggested answer and enforce
<=5 words.
- Accept
yes, recommended, or suggested as confirmation of the current recommendation.
- Use disambiguation follow-ups when needed without consuming a new question slot.
Integrate each accepted answer immediately:
- Ensure
## Clarifications exists.
- Ensure a session heading exists:
### Session YYYY-MM-DD.
- Append:
- Q: <question> → A: <final answer>.
- Update the most relevant section(s) inline:
- functional behavior,
- user stories/actors,
- data model,
- non-functional metrics,
- edge/error handling,
- terminology normalization.
- Replace superseded contradictory statements instead of duplicating.
- Save
FEATURE_SPEC after each accepted answer.
Validate after each write and on final pass:
- Exactly one clarification bullet per accepted answer.
- Accepted questions count is
<=5.
- No contradiction remains for resolved decisions.
- No unresolved vague placeholder remains for resolved items.
- Only these new headings are introduced:
## Clarifications, ### Session YYYY-MM-DD.
- Canonical terminology is consistent across modified sections.
Report completion:
- Questions asked and answered.
- Updated
FEATURE_SPEC path.
- Sections touched.
- Coverage summary by category with status:
Resolved
Deferred
Clear
Outstanding
- Next-step recommendation: proceed to
spec-kit-plan or run clarify again later.
Behavior Rules
- If no high-impact ambiguity exists, respond:
No critical ambiguities detected worth formal clarification. and suggest proceeding.
- Never exceed 5 accepted questions (disambiguation retries do not count as new questions).
- Respect early termination signals:
stop, done, proceed.
- Avoid speculative tech-stack questions unless their absence blocks functional correctness.
- If quota is reached with unresolved high-impact items, mark them as
Deferred with rationale.
Output
- Updated
spec.md with embedded clarification history
- Summary of asked/answered questions, touched sections, and unresolved/deferred areas
Common Mistakes
- Low-impact questions.
Never ask about cosmetic or stylistic details.
Every question must materially affect architecture, data model, testing, UX, operations, or compliance.
- Asking multiple questions at once.
Ask one question at a time.
Batching questions overwhelms the user and produces shallow answers.
- Not updating spec inline.
Each accepted answer must be applied to the relevant spec sections immediately.
Never defer updates to a later pass.
- Redundant clarifications.
Check existing spec content and prior clarification sessions before asking.
Do not re-ask what is already resolved.
References
assets/clarification-taxonomy.md
references/spec-kit-workflow.dot for overall context of how the clarification fits into the Spec Kit process.
scripts/check-prerequisites.sh
https://github.com/github/spec-kit/blob/9111699cd27879e3e6301651a03e502ecb6dd65d/templates/commands/clarify.md
1---2name: spec-kit-clarify3description: Use when an existing Spec Kit `spec.md` has high-impact ambiguity (for example `[NEEDS CLARIFICATION]`, unresolved scope decisions, or unquantified requirements) that must be resolved before `spec-kit-plan`.4---5
6# Spec Kit Clarify
7
8Resolve high-impact ambiguity in the active feature specification before planning.
9
10## When to Use
11
12- `spec.md` already exists but has high-impact uncertainty.
13- You see unresolved placeholders (for example `[NEEDS CLARIFICATION]`, TODOs, or conflicting statements).
14- Ambiguity could materially change architecture, data model, testing, UX behavior, operations, or compliance expectations.
15
16## When Not to Use
17
18- No feature spec exists yet (`spec-kit-specify` first).
19- Work is design decomposition (`spec-kit-plan`) or task generation (`spec-kit-tasks`).
20- You only need read-only consistency analysis (`spec-kit-analyze`).
21- You are reconciling broader cross-artifact drift (`spec-kit-reconcile`).
22
23## Router Fit
24
25- Primary route from `spec-kit` after `spec-kit-specify` and before `spec-kit-plan` when ambiguity is still blocking.
26
27## Key Rules
28
29- Ask exactly one question at a time.
30- Ask at most 5 accepted questions per run.
31- Every question must materially influence architecture, data model, testing, UX, operations, or compliance.
32- Integrate each accepted answer into `spec.md` immediately.
33
34## Workflow
35
36```dot
37digraph clarify_workflow {
38 rankdir=TB;
39 node [fontname="Helvetica", fontsize=10];
40 edge [fontname="Helvetica", fontsize=9];
41
42 start [label="Invoke spec-kit-clarify", shape=doublecircle];
43 resolve_paths [label="Resolve FEATURE_SPEC path", shape=box];
44 has_spec [label="spec.md exists?", shape=diamond];
45 stop_specify [label="STOP: run spec-kit-specify first", shape=octagon, style=filled, fillcolor=red, fontcolor=white];
46
47 scan_taxonomy [label="Scan with clarification taxonomy", shape=box];
48 has_high_impact [label="High-impact ambiguity remains?", shape=diamond];
49 report_none [label="Report no critical ambiguity", shape=box];
50
51 build_queue [label="Build and rank up to 5 questions", shape=box];
52 ask_loop [label="Ask one question at a time\n(recommend/suggest, disambiguate if needed)", shape=box];
53 integrate [label="Integrate accepted answer into spec.md", shape=box];
54 validate [label="Validate update and consistency", shape=box];
55 continue_gate [label="Continue loop?", shape=diamond];
56 final_report [label="Report touched sections, coverage, next step", shape=box];
57 done [label="Clarify complete", shape=doublecircle];
58
59 start -> resolve_paths;
60 resolve_paths -> has_spec;
61 has_spec -> stop_specify [label="no"];
62 has_spec -> scan_taxonomy [label="yes"];
63 scan_taxonomy -> has_high_impact;
64 has_high_impact -> report_none [label="no"];
65 report_none -> done;
66 has_high_impact -> build_queue [label="yes"];
67 build_queue -> ask_loop;
68 ask_loop -> integrate;
69 integrate -> validate;
70 validate -> continue_gate;
71 continue_gate -> ask_loop [label="yes"];
72 continue_gate -> final_report [label="no"];
73 final_report -> done;
74}
75```
76
771. Resolve active spec path:
78
79 - Run `scripts/check-prerequisites.sh --paths-only --json`.
80 - Read `FEATURE_SPEC` from the JSON payload.
81 - If `FEATURE_SPEC` is missing, stop and direct the user to `spec-kit-specify`.
82
832. Build an internal ambiguity coverage map from `spec.md`:
84
85 - Use `assets/clarification-taxonomy.md` as the required category checklist.
86 - Score each category as `Clear`, `Partial`, or `Missing`.
87 - Create candidate questions only for `Partial` or `Missing` categories where clarification changes implementation or validation outcomes.
88
893. Prioritize up to 5 candidate questions:
90
91 - Rank by `Impact * Uncertainty`.
92 - Exclude already-answered items, stylistic preferences, and low-impact plan-level details.
93 - Ensure each question is answerable by either:
94 - multiple choice with 2-5 mutually exclusive options, or
95 - short answer constrained to `<=5 words`.
96
974. Run the interactive one-question loop:
98
99 - Follow the workflow chart above for branching and stop conditions.
100 - Ask exactly one question at a time.
101 - For multiple-choice questions, provide a recommendation and an options table.
102 - For short-answer questions, provide a suggested answer and enforce `<=5 words`.
103 - Accept `yes`, `recommended`, or `suggested` as confirmation of the current recommendation.
104 - Use disambiguation follow-ups when needed without consuming a new question slot.
105
1065. Integrate each accepted answer immediately:
107
108 - Ensure `## Clarifications` exists.
109 - Ensure a session heading exists: `### Session YYYY-MM-DD`.
110 - Append: `- Q: <question> → A: <final answer>`.
111 - Update the most relevant section(s) inline:
112 - functional behavior,
113 - user stories/actors,
114 - data model,
115 - non-functional metrics,
116 - edge/error handling,
117 - terminology normalization.
118 - Replace superseded contradictory statements instead of duplicating.
119 - Save `FEATURE_SPEC` after each accepted answer.
120
1216. Validate after each write and on final pass:
122
123 - Exactly one clarification bullet per accepted answer.
124 - Accepted questions count is `<=5`.
125 - No contradiction remains for resolved decisions.
126 - No unresolved vague placeholder remains for resolved items.
127 - Only these new headings are introduced: `## Clarifications`, `### Session YYYY-MM-DD`.
128 - Canonical terminology is consistent across modified sections.
129
1307. Report completion:
131
132 - Questions asked and answered.
133 - Updated `FEATURE_SPEC` path.
134 - Sections touched.
135 - Coverage summary by category with status:
136 - `Resolved`
137 - `Deferred`
138 - `Clear`
139 - `Outstanding`
140 - Next-step recommendation: proceed to `spec-kit-plan` or run clarify again later.
141
142## Behavior Rules
143
144- If no high-impact ambiguity exists, respond: `No critical ambiguities detected worth formal clarification.` and suggest proceeding.
145- Never exceed 5 accepted questions (disambiguation retries do not count as new questions).
146- Respect early termination signals: `stop`, `done`, `proceed`.
147- Avoid speculative tech-stack questions unless their absence blocks functional correctness.
148- If quota is reached with unresolved high-impact items, mark them as `Deferred` with rationale.
149
150## Output
151
152- Updated `spec.md` with embedded clarification history
153- Summary of asked/answered questions, touched sections, and unresolved/deferred areas
154
155## Common Mistakes
156
157- **Low-impact questions.**
158 Never ask about cosmetic or stylistic details.
159 Every question must materially affect architecture, data model, testing, UX, operations, or compliance.
160- **Asking multiple questions at once.**
161 Ask one question at a time.
162 Batching questions overwhelms the user and produces shallow answers.
163- **Not updating spec inline.**
164 Each accepted answer must be applied to the relevant spec sections immediately.
165 Never defer updates to a later pass.
166- **Redundant clarifications.**
167 Check existing spec content and prior clarification sessions before asking.
168 Do not re-ask what is already resolved.
169
170## References
171
172- `assets/clarification-taxonomy.md`
173- `references/spec-kit-workflow.dot` for overall context of how the clarification fits into the Spec Kit process.
174- `scripts/check-prerequisites.sh`
175- `https://github.com/github/spec-kit/blob/9111699cd27879e3e6301651a03e502ecb6dd65d/templates/commands/clarify.md`