|
2 | 2 | description: Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec. |
3 | 3 | --- |
4 | 4 |
|
| 5 | +# Clarify |
| 6 | + |
5 | 7 | The user input to you can be provided directly by the agent or as a command argument - you **MUST** consider it before proceeding with the prompt (if not empty). |
6 | 8 |
|
7 | 9 | User input: |
@@ -79,24 +81,26 @@ Execution steps: |
79 | 81 | 3. Generate (internally) a prioritized queue of candidate clarification questions (maximum 5). Do NOT output them all at once. Apply these constraints: |
80 | 82 | - Maximum of 5 total questions across the whole session. |
81 | 83 | - Each question must be answerable with EITHER: |
82 | | - * A short multiple‑choice selection (2–5 distinct, mutually exclusive options), OR |
83 | | - * A one-word / short‑phrase answer (explicitly constrain: "Answer in <=5 words"). |
84 | | - - Only include questions whose answers materially impact architecture, data modeling, task decomposition, test design, UX behavior, operational readiness, or compliance validation. |
85 | | - - Ensure category coverage balance: attempt to cover the highest impact unresolved categories first; avoid asking two low-impact questions when a single high-impact area (e.g., security posture) is unresolved. |
86 | | - - Exclude questions already answered, trivial stylistic preferences, or plan-level execution details (unless blocking correctness). |
87 | | - - Favor clarifications that reduce downstream rework risk or prevent misaligned acceptance tests. |
88 | | - - If more than 5 categories remain unresolved, select the top 5 by (Impact * Uncertainty) heuristic. |
| 84 | + * A short multiple‑choice selection (2–5 distinct, mutually exclusive options), OR |
| 85 | + * A one-word / short‑phrase answer (explicitly constrain: "Answer in <=5 words"). |
| 86 | + - Only include questions whose answers materially impact architecture, data modeling, task decomposition, test design, UX behavior, operational readiness, or compliance validation. |
| 87 | + - Ensure category coverage balance: attempt to cover the highest impact unresolved categories first; avoid asking two low-impact questions when a single high-impact area (e.g., security posture) is unresolved. |
| 88 | + - Exclude questions already answered, trivial stylistic preferences, or plan-level execution details (unless blocking correctness). |
| 89 | + - Favor clarifications that reduce downstream rework risk or prevent misaligned acceptance tests. |
| 90 | + - If more than 5 categories remain unresolved, select the top 5 by (Impact * Uncertainty) heuristic. |
89 | 91 |
|
90 | 92 | 4. Sequential questioning loop (interactive): |
91 | 93 | - Present EXACTLY ONE question at a time. |
92 | 94 | - For multiple‑choice questions render options as a Markdown table: |
93 | 95 |
|
| 96 | + ```markdown |
94 | 97 | | Option | Description | |
95 | 98 | |--------|-------------| |
96 | 99 | | A | <Option A description> | |
97 | 100 | | B | <Option B description> | |
98 | | - | C | <Option C description> | (add D/E as needed up to 5) |
99 | | - | Short | Provide a different short answer (<=5 words) | (Include only if free-form alternative is appropriate) |
| 101 | + | C | <Option C description> (add D/E as needed up to 5) | |
| 102 | + | Short | Provide a different short answer (<=5 words) (Include only if free-form alternative is appropriate) | |
| 103 | + ``` |
100 | 104 |
|
101 | 105 | - For short‑answer style (no meaningful discrete options), output a single line after the question: `Format: Short answer (<=5 words)`. |
102 | 106 | - After the user answers: |
@@ -147,12 +151,13 @@ Execution steps: |
147 | 151 | - Suggested next command. |
148 | 152 |
|
149 | 153 | Behavior rules: |
| 154 | + |
150 | 155 | - If no meaningful ambiguities found (or all potential questions would be low-impact), respond: "No critical ambiguities detected worth formal clarification." and suggest proceeding. |
151 | 156 | - If spec file missing, instruct user to run `/specify` first (do not create a new spec here). |
152 | 157 | - Never exceed 5 total asked questions (clarification retries for a single question do not count as new questions). |
153 | 158 | - Avoid speculative tech stack questions unless the absence blocks functional clarity. |
154 | 159 | - Respect user early termination signals ("stop", "done", "proceed"). |
155 | | - - If no questions asked due to full coverage, output a compact coverage summary (all categories Clear) then suggest advancing. |
156 | | - - If quota reached with unresolved high-impact categories remaining, explicitly flag them under Deferred with rationale. |
| 160 | + - If no questions asked due to full coverage, output a compact coverage summary (all categories Clear) then suggest advancing. |
| 161 | + - If quota reached with unresolved high-impact categories remaining, explicitly flag them under Deferred with rationale. |
157 | 162 |
|
158 | 163 | Context for prioritization: $ARGUMENTS |
0 commit comments