olympus-ai 4.0.2 → 4.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/dist/features/workflow-engine/artifacts.d.ts.map +1 -1
- package/dist/features/workflow-engine/artifacts.js +13 -9
- package/dist/features/workflow-engine/artifacts.js.map +1 -1
- package/dist/features/workflow-engine/construction/nfr-requirements.js +1 -1
- package/dist/features/workflow-engine/construction/nfr-requirements.js.map +1 -1
- package/dist/features/workflow-engine/engine.d.ts +1 -1
- package/dist/features/workflow-engine/engine.js +2 -2
- package/dist/features/workflow-engine/engine.js.map +1 -1
- package/dist/features/workflow-engine/inception/stages/units-generation.d.ts.map +1 -1
- package/dist/features/workflow-engine/inception/stages/units-generation.js +7 -6
- package/dist/features/workflow-engine/inception/stages/units-generation.js.map +1 -1
- package/dist/features/workflow-engine/inception/stages/user-stories.d.ts.map +1 -1
- package/dist/features/workflow-engine/inception/stages/user-stories.js +5 -3
- package/dist/features/workflow-engine/inception/stages/user-stories.js.map +1 -1
- package/dist/features/workflow-engine/question-manager.d.ts.map +1 -1
- package/dist/features/workflow-engine/question-manager.js +5 -1
- package/dist/features/workflow-engine/question-manager.js.map +1 -1
- package/dist/features/workflow-engine/state-file.d.ts.map +1 -1
- package/dist/features/workflow-engine/state-file.js +4 -2
- package/dist/features/workflow-engine/state-file.js.map +1 -1
- package/dist/hooks/olympus-hooks.cjs +10 -10
- package/dist/installer/index.d.ts +1 -1
- package/dist/installer/index.js +1 -1
- package/dist/learning/__tests__/project-resolver.test.d.ts +2 -0
- package/dist/learning/__tests__/project-resolver.test.d.ts.map +1 -0
- package/dist/learning/__tests__/project-resolver.test.js +216 -0
- package/dist/learning/__tests__/project-resolver.test.js.map +1 -0
- package/dist/learning/hooks/success-detector.d.ts.map +1 -1
- package/dist/learning/hooks/success-detector.js +4 -26
- package/dist/learning/hooks/success-detector.js.map +1 -1
- package/dist/learning/pattern-extractor.js +1 -1
- package/dist/learning/pattern-extractor.js.map +1 -1
- package/dist/learning/project-resolver.d.ts +6 -0
- package/dist/learning/project-resolver.d.ts.map +1 -0
- package/dist/learning/project-resolver.js +65 -0
- package/dist/learning/project-resolver.js.map +1 -0
- package/dist/learning/storage.d.ts.map +1 -1
- package/dist/learning/storage.js +2 -1
- package/dist/learning/storage.js.map +1 -1
- package/package.json +1 -1
- package/resources/agents/frontend-engineer-high.md +112 -10
- package/resources/agents/frontend-engineer.md +136 -73
- package/resources/rules/common/depth-levels.md +73 -73
- package/resources/rules/common/question-format-guide.md +375 -375
- package/resources/rules/common/session-continuity.md +47 -47
- package/resources/rules/inception/requirements-analysis.md +247 -215
- package/resources/rules/inception/workflow-planning.md +487 -487
- package/resources/skills/continue/SKILL.md +3 -3
- package/resources/skills/plan/SKILL.md +35 -25
|
@@ -1,375 +1,375 @@
|
|
|
1
|
-
# Question Format Guide
|
|
2
|
-
|
|
3
|
-
## MANDATORY: All Questions Must Use This Format
|
|
4
|
-
|
|
5
|
-
### Rule: Never Ask Questions in Chat
|
|
6
|
-
**CRITICAL**: You must NEVER ask questions directly in the chat. ALL questions must be placed in dedicated question files.
|
|
7
|
-
|
|
8
|
-
### Question File Format
|
|
9
|
-
|
|
10
|
-
#### File Naming Convention
|
|
11
|
-
- Use descriptive names: `{phase-name}-questions.md`
|
|
12
|
-
- Examples:
|
|
13
|
-
- `classification-questions.md`
|
|
14
|
-
- `requirements-questions.md`
|
|
15
|
-
- `story-planning-questions.md`
|
|
16
|
-
- `design-questions.md`
|
|
17
|
-
|
|
18
|
-
#### Question Structure
|
|
19
|
-
Every question must include meaningful options plus "Other" as the last option:
|
|
20
|
-
|
|
21
|
-
```markdown
|
|
22
|
-
## Question [Number]
|
|
23
|
-
[Clear, specific question text] (select one | select all that apply)
|
|
24
|
-
|
|
25
|
-
A) [First meaningful option]
|
|
26
|
-
B) [Second meaningful option]
|
|
27
|
-
[...additional options as needed...]
|
|
28
|
-
X) Other (please describe after [Answer]: tag below)
|
|
29
|
-
|
|
30
|
-
[Recommendation]: [Letter(s)] — [Brief reasoning for this recommendation]
|
|
31
|
-
|
|
32
|
-
[Answer]:
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
**CRITICAL**:
|
|
36
|
-
- "Other" is MANDATORY as the LAST option for every question
|
|
37
|
-
- Only include meaningful options - don't make up options to fill slots
|
|
38
|
-
- Use as many or as few options as make sense (minimum 2 + Other)
|
|
39
|
-
|
|
40
|
-
#### Selection Type Indicator
|
|
41
|
-
Every question MUST include a selection type in parentheses after the question text:
|
|
42
|
-
- `(select one)` — Only one answer is valid
|
|
43
|
-
- `(select all that apply)` — Multiple answers can be selected
|
|
44
|
-
|
|
45
|
-
**Guidelines for choosing selection type:**
|
|
46
|
-
- Use `(select one)` when options are mutually exclusive (e.g., "greenfield vs brownfield")
|
|
47
|
-
- Use `(select all that apply)` when multiple options can coexist (e.g., motivations, features, concerns)
|
|
48
|
-
|
|
49
|
-
#### AI Recommendation
|
|
50
|
-
Every question MUST include a `[Recommendation]:` tag after the options and before `[Answer]:`:
|
|
51
|
-
- Provide the recommended letter(s) followed by a dash and brief reasoning
|
|
52
|
-
- For multi-select questions, list all recommended letters separated by commas
|
|
53
|
-
- Base recommendations on industry best practices, common patterns, and context from the user's input
|
|
54
|
-
- Keep reasoning to 1-2 sentences
|
|
55
|
-
- The recommendation helps the user make informed decisions but does NOT replace their choice
|
|
56
|
-
|
|
57
|
-
### Complete Example
|
|
58
|
-
|
|
59
|
-
```markdown
|
|
60
|
-
# Requirements Clarification Questions
|
|
61
|
-
|
|
62
|
-
Please answer the following questions to help clarify the requirements.
|
|
63
|
-
For multi-select questions, provide comma-separated letters (e.g., A, B, E).
|
|
64
|
-
|
|
65
|
-
## Question 1
|
|
66
|
-
What authentication methods should be supported? (select all that apply)
|
|
67
|
-
|
|
68
|
-
A) Username and password
|
|
69
|
-
B) Social media login (Google, Facebook)
|
|
70
|
-
C) Single Sign-On (SSO)
|
|
71
|
-
D) Multi-factor authentication
|
|
72
|
-
E) Other (please describe after [Answer]: tag below)
|
|
73
|
-
|
|
74
|
-
[Recommendation]: A, D — Username/password is the baseline expectation, and MFA is increasingly required for production applications.
|
|
75
|
-
|
|
76
|
-
[Answer]:
|
|
77
|
-
|
|
78
|
-
## Question 2
|
|
79
|
-
Will this be a web or mobile application? (select one)
|
|
80
|
-
|
|
81
|
-
A) Web application
|
|
82
|
-
B) Mobile application
|
|
83
|
-
C) Both web and mobile
|
|
84
|
-
D) Other (please describe after [Answer]: tag below)
|
|
85
|
-
|
|
86
|
-
[Recommendation]: A — Starting with web reduces initial complexity; mobile can be added later.
|
|
87
|
-
|
|
88
|
-
[Answer]:
|
|
89
|
-
|
|
90
|
-
## Question 3
|
|
91
|
-
Is this a new project or existing codebase? (select one)
|
|
92
|
-
|
|
93
|
-
A) New project (greenfield)
|
|
94
|
-
B) Existing codebase (brownfield)
|
|
95
|
-
C) Other (please describe after [Answer]: tag below)
|
|
96
|
-
|
|
97
|
-
[Recommendation]: No recommendation — this is a factual question about your current state.
|
|
98
|
-
|
|
99
|
-
[Answer]:
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### User Response Format
|
|
103
|
-
Users will answer by filling in the letter choice after [Answer]: tag.
|
|
104
|
-
For `(select all that apply)` questions, users provide comma-separated letters:
|
|
105
|
-
|
|
106
|
-
```markdown
|
|
107
|
-
## Question 1 (select one)
|
|
108
|
-
[Answer]: C
|
|
109
|
-
|
|
110
|
-
## Question 2 (select all that apply)
|
|
111
|
-
[Answer]: A, B, E
|
|
112
|
-
|
|
113
|
-
## Question 3 (select all that apply — with context)
|
|
114
|
-
[Answer]: A, D — We need password auth as baseline plus MFA for admin users
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Users may also add context after their letter choices. This is encouraged and should be preserved.
|
|
118
|
-
|
|
119
|
-
### Reading User Responses
|
|
120
|
-
After user confirms completion:
|
|
121
|
-
1. Read the question file
|
|
122
|
-
2. Extract answers after [Answer]: tags
|
|
123
|
-
3. Validate all questions are answered
|
|
124
|
-
4. Proceed with analysis based on responses
|
|
125
|
-
|
|
126
|
-
### Multiple Choice Guidelines
|
|
127
|
-
|
|
128
|
-
#### Option Count
|
|
129
|
-
- Minimum: 2 meaningful options + "Other" (A, B, C)
|
|
130
|
-
- Typical: 3-4 meaningful options + "Other" (A, B, C, D, E)
|
|
131
|
-
- Maximum: 5 meaningful options + "Other" (A, B, C, D, E, F)
|
|
132
|
-
- **CRITICAL**: Don't make up options just to fill slots - only include meaningful choices
|
|
133
|
-
|
|
134
|
-
#### Option Quality
|
|
135
|
-
- For `(select one)`: Make options mutually exclusive
|
|
136
|
-
- For `(select all that apply)`: Options may overlap or coexist
|
|
137
|
-
- Cover the most common scenarios
|
|
138
|
-
- Only include meaningful, realistic options
|
|
139
|
-
- **ALWAYS include "Other" as the LAST option** (MANDATORY)
|
|
140
|
-
- Be specific and clear
|
|
141
|
-
- **Don't make up options to fill A, B, C, D slots**
|
|
142
|
-
|
|
143
|
-
#### Good Example:
|
|
144
|
-
```markdown
|
|
145
|
-
## Question 5
|
|
146
|
-
What database technology will be used? (select one)
|
|
147
|
-
|
|
148
|
-
A) Relational (PostgreSQL, MySQL)
|
|
149
|
-
B) NoSQL Document (MongoDB, DynamoDB)
|
|
150
|
-
C) NoSQL Key-Value (Redis, Memcached)
|
|
151
|
-
D) Graph Database (Neo4j, Neptune)
|
|
152
|
-
E) Other (please describe after [Answer]: tag below)
|
|
153
|
-
|
|
154
|
-
[Recommendation]: A — Relational databases are the most versatile default; PostgreSQL specifically offers strong JSON support if NoSQL-like flexibility is needed later.
|
|
155
|
-
|
|
156
|
-
[Answer]:
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
#### Bad Example (Avoid):
|
|
160
|
-
```markdown
|
|
161
|
-
## Question 5
|
|
162
|
-
What database will you use?
|
|
163
|
-
|
|
164
|
-
A) Yes
|
|
165
|
-
B) No
|
|
166
|
-
C) Maybe
|
|
167
|
-
|
|
168
|
-
[Answer]:
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
### Workflow Integration
|
|
172
|
-
|
|
173
|
-
#### Step 1: Create Question File
|
|
174
|
-
```markdown
|
|
175
|
-
Create aidlc-docs/{phase-name}-questions.md with all questions
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
#### Step 2: Inform User
|
|
179
|
-
```
|
|
180
|
-
"I've created {phase-name}-questions.md with [X] questions.
|
|
181
|
-
Please answer each question by filling in the letter choice after the [Answer]: tag.
|
|
182
|
-
For multi-select questions, provide comma-separated letters (e.g., A, B, E). Each question includes an AI recommendation to help guide your decision.
|
|
183
|
-
If none of the options match your needs, choose the last option (Other) and describe your preference. Let me know when you're done."
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
#### Step 3: Wait for Confirmation
|
|
187
|
-
Wait for user to say "done", "completed", "finished", or similar.
|
|
188
|
-
|
|
189
|
-
#### Step 4: Read and Analyze
|
|
190
|
-
```
|
|
191
|
-
Read aidlc-docs/{phase-name}-questions.md
|
|
192
|
-
Extract all answers
|
|
193
|
-
Validate completeness
|
|
194
|
-
Proceed with analysis
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
### Error Handling
|
|
198
|
-
|
|
199
|
-
#### Missing Answers
|
|
200
|
-
If any [Answer]: tag is empty:
|
|
201
|
-
```
|
|
202
|
-
"I noticed Question [X] is not answered. Please provide an answer using one of the letter choices
|
|
203
|
-
for all questions before proceeding."
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
#### Invalid Answers
|
|
207
|
-
If answer is not a valid letter choice:
|
|
208
|
-
```
|
|
209
|
-
"Question [X] has an invalid answer '[answer]'.
|
|
210
|
-
Please use only the letter choices provided in the question.
|
|
211
|
-
For multi-select questions, use comma-separated letters (e.g., A, B, E)."
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
#### Ambiguous Answers
|
|
215
|
-
If user provides explanation instead of letter:
|
|
216
|
-
```
|
|
217
|
-
"For Question [X], please provide the letter choice that best matches your answer.
|
|
218
|
-
If none match, choose 'Other' and add your description after the [Answer]: tag."
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
### Contradiction and Ambiguity Detection
|
|
222
|
-
|
|
223
|
-
**MANDATORY**: After reading user responses, you MUST check for contradictions and ambiguities.
|
|
224
|
-
|
|
225
|
-
#### Detecting Contradictions
|
|
226
|
-
Look for logically inconsistent answers:
|
|
227
|
-
- Scope mismatch: "Bug fix" but "Entire codebase affected"
|
|
228
|
-
- Risk mismatch: "Low risk" but "Breaking changes"
|
|
229
|
-
- Timeline mismatch: "Quick fix" but "Multiple subsystems"
|
|
230
|
-
- Impact mismatch: "Single component" but "Significant architecture changes"
|
|
231
|
-
|
|
232
|
-
#### Detecting Ambiguities
|
|
233
|
-
Look for unclear or borderline responses:
|
|
234
|
-
- Answers that could fit multiple classifications
|
|
235
|
-
- Responses that lack specificity
|
|
236
|
-
- Conflicting indicators across multiple questions
|
|
237
|
-
|
|
238
|
-
#### Creating Clarification Questions
|
|
239
|
-
If contradictions or ambiguities detected:
|
|
240
|
-
|
|
241
|
-
1. **Create clarification file**: `{phase-name}-clarification-questions.md`
|
|
242
|
-
2. **Explain the issue**: Clearly state what contradiction/ambiguity was detected
|
|
243
|
-
3. **Ask targeted questions**: Use multiple choice format to resolve the issue
|
|
244
|
-
4. **Reference original questions**: Show which questions had conflicting answers
|
|
245
|
-
|
|
246
|
-
**Example**:
|
|
247
|
-
```markdown
|
|
248
|
-
# [Phase Name] Clarification Questions
|
|
249
|
-
|
|
250
|
-
I detected contradictions in your responses that need clarification:
|
|
251
|
-
|
|
252
|
-
## Contradiction 1: [Brief Description]
|
|
253
|
-
You indicated "[Answer A]" (Q[X]:[Letter]) but also "[Answer B]" (Q[Y]:[Letter]).
|
|
254
|
-
These responses are contradictory because [explanation].
|
|
255
|
-
|
|
256
|
-
### Clarification Question 1
|
|
257
|
-
[Specific question to resolve contradiction]
|
|
258
|
-
|
|
259
|
-
A) [Option that resolves toward first answer]
|
|
260
|
-
B) [Option that resolves toward second answer]
|
|
261
|
-
C) [Option that provides middle ground]
|
|
262
|
-
D) [Option that reframes the question]
|
|
263
|
-
|
|
264
|
-
[Answer]:
|
|
265
|
-
|
|
266
|
-
## Ambiguity 1: [Brief Description]
|
|
267
|
-
Your response to Q[X] ("[Answer]") is ambiguous because [explanation].
|
|
268
|
-
|
|
269
|
-
### Clarification Question 2
|
|
270
|
-
[Specific question to clarify ambiguity]
|
|
271
|
-
|
|
272
|
-
A) [Clear option 1]
|
|
273
|
-
B) [Clear option 2]
|
|
274
|
-
C) [Clear option 3]
|
|
275
|
-
D) [Clear option 4]
|
|
276
|
-
|
|
277
|
-
[Answer]:
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
#### Workflow for Clarifications
|
|
281
|
-
|
|
282
|
-
1. **Detect**: Analyze all responses for contradictions/ambiguities
|
|
283
|
-
2. **Create**: Generate clarification question file if issues found
|
|
284
|
-
3. **Inform**: Tell user about the issues and clarification file
|
|
285
|
-
4. **Wait**: Do not proceed until user provides clarifications
|
|
286
|
-
5. **Re-validate**: After clarifications, check again for consistency
|
|
287
|
-
6. **Proceed**: Only move forward when all contradictions are resolved
|
|
288
|
-
|
|
289
|
-
#### Example User Message
|
|
290
|
-
```
|
|
291
|
-
"I detected 2 contradictions in your responses:
|
|
292
|
-
|
|
293
|
-
1. Bug fix scope vs. codebase impact (Q1 vs Q2)
|
|
294
|
-
2. Low risk vs. breaking changes (Q7 vs Q4)
|
|
295
|
-
|
|
296
|
-
I've created classification-clarification-questions.md with 2 questions to resolve these.
|
|
297
|
-
Please answer these clarifying questions before I can proceed with classification."
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
### Best Practices
|
|
301
|
-
|
|
302
|
-
1. **Be Specific**: Questions should be clear and unambiguous
|
|
303
|
-
2. **Be Comprehensive**: Cover all necessary information
|
|
304
|
-
3. **Be Concise**: Keep questions focused on one topic
|
|
305
|
-
4. **Be Practical**: Options should be realistic and actionable
|
|
306
|
-
5. **Be Consistent**: Use same format throughout all question files
|
|
307
|
-
|
|
308
|
-
### Phase-Specific Examples
|
|
309
|
-
|
|
310
|
-
#### Example: select one (2 meaningful options)
|
|
311
|
-
```markdown
|
|
312
|
-
## Question 1
|
|
313
|
-
Is this a new project or existing codebase? (select one)
|
|
314
|
-
|
|
315
|
-
A) New project (greenfield)
|
|
316
|
-
B) Existing codebase (brownfield)
|
|
317
|
-
C) Other (please describe after [Answer]: tag below)
|
|
318
|
-
|
|
319
|
-
[Recommendation]: No recommendation — this is a factual question about your current state.
|
|
320
|
-
|
|
321
|
-
[Answer]:
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
#### Example: select one (3 meaningful options)
|
|
325
|
-
```markdown
|
|
326
|
-
## Question 2
|
|
327
|
-
What is the deployment target? (select one)
|
|
328
|
-
|
|
329
|
-
A) Cloud (AWS, Azure, GCP)
|
|
330
|
-
B) On-premises servers
|
|
331
|
-
C) Hybrid (both cloud and on-premises)
|
|
332
|
-
D) Other (please describe after [Answer]: tag below)
|
|
333
|
-
|
|
334
|
-
[Recommendation]: A — Cloud deployments offer the fastest path to production with managed scaling and infrastructure.
|
|
335
|
-
|
|
336
|
-
[Answer]:
|
|
337
|
-
```
|
|
338
|
-
|
|
339
|
-
#### Example: select all that apply (4 meaningful options)
|
|
340
|
-
```markdown
|
|
341
|
-
## Question 3
|
|
342
|
-
What are your primary concerns for this project? (select all that apply)
|
|
343
|
-
|
|
344
|
-
A) Performance and scalability
|
|
345
|
-
B) Security and compliance
|
|
346
|
-
C) Developer experience and maintainability
|
|
347
|
-
D) Cost optimization
|
|
348
|
-
E) Other (please describe after [Answer]: tag below)
|
|
349
|
-
|
|
350
|
-
[Recommendation]: A, B, C — These three concerns form the foundation of a production-quality system. Cost optimization is important but shouldn't drive architectural decisions early on.
|
|
351
|
-
|
|
352
|
-
[Answer]:
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
## Summary
|
|
356
|
-
|
|
357
|
-
**Remember**:
|
|
358
|
-
- ✅ Always create question files
|
|
359
|
-
- ✅ Always use multiple choice format
|
|
360
|
-
- ✅ **Always include "Other" as the LAST option (MANDATORY)**
|
|
361
|
-
- ✅ **Always include `(select one)` or `(select all that apply)` after the question text**
|
|
362
|
-
- ✅ **Always include `[Recommendation]:` with reasoning before `[Answer]:`**
|
|
363
|
-
- ✅ Only include meaningful options - don't make up options to fill slots
|
|
364
|
-
- ✅ Always use [Answer]: tags
|
|
365
|
-
- ✅ Accept comma-separated letters for multi-select answers (e.g., A, B, E)
|
|
366
|
-
- ✅ Always wait for user completion
|
|
367
|
-
- ✅ Always validate responses for contradictions
|
|
368
|
-
- ✅ Always create clarification files if needed
|
|
369
|
-
- ✅ Always resolve contradictions before proceeding
|
|
370
|
-
- ❌ Never ask questions in chat
|
|
371
|
-
- ❌ Never make up options just to have A, B, C, D
|
|
372
|
-
- ❌ Never proceed without answers
|
|
373
|
-
- ❌ Never proceed with unresolved contradictions
|
|
374
|
-
- ❌ Never make assumptions about ambiguous responses
|
|
375
|
-
- ❌ Never omit the selection type indicator or AI recommendation
|
|
1
|
+
# Question Format Guide
|
|
2
|
+
|
|
3
|
+
## MANDATORY: All Questions Must Use This Format
|
|
4
|
+
|
|
5
|
+
### Rule: Never Ask Questions in Chat
|
|
6
|
+
**CRITICAL**: You must NEVER ask questions directly in the chat. ALL questions must be placed in dedicated question files.
|
|
7
|
+
|
|
8
|
+
### Question File Format
|
|
9
|
+
|
|
10
|
+
#### File Naming Convention
|
|
11
|
+
- Use descriptive names: `{phase-name}-questions.md`
|
|
12
|
+
- Examples:
|
|
13
|
+
- `classification-questions.md`
|
|
14
|
+
- `requirements-analysis-questions.md`
|
|
15
|
+
- `story-planning-questions.md`
|
|
16
|
+
- `design-questions.md`
|
|
17
|
+
|
|
18
|
+
#### Question Structure
|
|
19
|
+
Every question must include meaningful options plus "Other" as the last option:
|
|
20
|
+
|
|
21
|
+
```markdown
|
|
22
|
+
## Question [Number]
|
|
23
|
+
[Clear, specific question text] (select one | select all that apply)
|
|
24
|
+
|
|
25
|
+
A) [First meaningful option]
|
|
26
|
+
B) [Second meaningful option]
|
|
27
|
+
[...additional options as needed...]
|
|
28
|
+
X) Other (please describe after [Answer]: tag below)
|
|
29
|
+
|
|
30
|
+
[Recommendation]: [Letter(s)] — [Brief reasoning for this recommendation]
|
|
31
|
+
|
|
32
|
+
[Answer]:
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**CRITICAL**:
|
|
36
|
+
- "Other" is MANDATORY as the LAST option for every question
|
|
37
|
+
- Only include meaningful options - don't make up options to fill slots
|
|
38
|
+
- Use as many or as few options as make sense (minimum 2 + Other)
|
|
39
|
+
|
|
40
|
+
#### Selection Type Indicator
|
|
41
|
+
Every question MUST include a selection type in parentheses after the question text:
|
|
42
|
+
- `(select one)` — Only one answer is valid
|
|
43
|
+
- `(select all that apply)` — Multiple answers can be selected
|
|
44
|
+
|
|
45
|
+
**Guidelines for choosing selection type:**
|
|
46
|
+
- Use `(select one)` when options are mutually exclusive (e.g., "greenfield vs brownfield")
|
|
47
|
+
- Use `(select all that apply)` when multiple options can coexist (e.g., motivations, features, concerns)
|
|
48
|
+
|
|
49
|
+
#### AI Recommendation
|
|
50
|
+
Every question MUST include a `[Recommendation]:` tag after the options and before `[Answer]:`:
|
|
51
|
+
- Provide the recommended letter(s) followed by a dash and brief reasoning
|
|
52
|
+
- For multi-select questions, list all recommended letters separated by commas
|
|
53
|
+
- Base recommendations on industry best practices, common patterns, and context from the user's input
|
|
54
|
+
- Keep reasoning to 1-2 sentences
|
|
55
|
+
- The recommendation helps the user make informed decisions but does NOT replace their choice
|
|
56
|
+
|
|
57
|
+
### Complete Example
|
|
58
|
+
|
|
59
|
+
```markdown
|
|
60
|
+
# Requirements Clarification Questions
|
|
61
|
+
|
|
62
|
+
Please answer the following questions to help clarify the requirements.
|
|
63
|
+
For multi-select questions, provide comma-separated letters (e.g., A, B, E).
|
|
64
|
+
|
|
65
|
+
## Question 1
|
|
66
|
+
What authentication methods should be supported? (select all that apply)
|
|
67
|
+
|
|
68
|
+
A) Username and password
|
|
69
|
+
B) Social media login (Google, Facebook)
|
|
70
|
+
C) Single Sign-On (SSO)
|
|
71
|
+
D) Multi-factor authentication
|
|
72
|
+
E) Other (please describe after [Answer]: tag below)
|
|
73
|
+
|
|
74
|
+
[Recommendation]: A, D — Username/password is the baseline expectation, and MFA is increasingly required for production applications.
|
|
75
|
+
|
|
76
|
+
[Answer]:
|
|
77
|
+
|
|
78
|
+
## Question 2
|
|
79
|
+
Will this be a web or mobile application? (select one)
|
|
80
|
+
|
|
81
|
+
A) Web application
|
|
82
|
+
B) Mobile application
|
|
83
|
+
C) Both web and mobile
|
|
84
|
+
D) Other (please describe after [Answer]: tag below)
|
|
85
|
+
|
|
86
|
+
[Recommendation]: A — Starting with web reduces initial complexity; mobile can be added later.
|
|
87
|
+
|
|
88
|
+
[Answer]:
|
|
89
|
+
|
|
90
|
+
## Question 3
|
|
91
|
+
Is this a new project or existing codebase? (select one)
|
|
92
|
+
|
|
93
|
+
A) New project (greenfield)
|
|
94
|
+
B) Existing codebase (brownfield)
|
|
95
|
+
C) Other (please describe after [Answer]: tag below)
|
|
96
|
+
|
|
97
|
+
[Recommendation]: No recommendation — this is a factual question about your current state.
|
|
98
|
+
|
|
99
|
+
[Answer]:
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### User Response Format
|
|
103
|
+
Users will answer by filling in the letter choice after [Answer]: tag.
|
|
104
|
+
For `(select all that apply)` questions, users provide comma-separated letters:
|
|
105
|
+
|
|
106
|
+
```markdown
|
|
107
|
+
## Question 1 (select one)
|
|
108
|
+
[Answer]: C
|
|
109
|
+
|
|
110
|
+
## Question 2 (select all that apply)
|
|
111
|
+
[Answer]: A, B, E
|
|
112
|
+
|
|
113
|
+
## Question 3 (select all that apply — with context)
|
|
114
|
+
[Answer]: A, D — We need password auth as baseline plus MFA for admin users
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Users may also add context after their letter choices. This is encouraged and should be preserved.
|
|
118
|
+
|
|
119
|
+
### Reading User Responses
|
|
120
|
+
After user confirms completion:
|
|
121
|
+
1. Read the question file
|
|
122
|
+
2. Extract answers after [Answer]: tags
|
|
123
|
+
3. Validate all questions are answered
|
|
124
|
+
4. Proceed with analysis based on responses
|
|
125
|
+
|
|
126
|
+
### Multiple Choice Guidelines
|
|
127
|
+
|
|
128
|
+
#### Option Count
|
|
129
|
+
- Minimum: 2 meaningful options + "Other" (A, B, C)
|
|
130
|
+
- Typical: 3-4 meaningful options + "Other" (A, B, C, D, E)
|
|
131
|
+
- Maximum: 5 meaningful options + "Other" (A, B, C, D, E, F)
|
|
132
|
+
- **CRITICAL**: Don't make up options just to fill slots - only include meaningful choices
|
|
133
|
+
|
|
134
|
+
#### Option Quality
|
|
135
|
+
- For `(select one)`: Make options mutually exclusive
|
|
136
|
+
- For `(select all that apply)`: Options may overlap or coexist
|
|
137
|
+
- Cover the most common scenarios
|
|
138
|
+
- Only include meaningful, realistic options
|
|
139
|
+
- **ALWAYS include "Other" as the LAST option** (MANDATORY)
|
|
140
|
+
- Be specific and clear
|
|
141
|
+
- **Don't make up options to fill A, B, C, D slots**
|
|
142
|
+
|
|
143
|
+
#### Good Example:
|
|
144
|
+
```markdown
|
|
145
|
+
## Question 5
|
|
146
|
+
What database technology will be used? (select one)
|
|
147
|
+
|
|
148
|
+
A) Relational (PostgreSQL, MySQL)
|
|
149
|
+
B) NoSQL Document (MongoDB, DynamoDB)
|
|
150
|
+
C) NoSQL Key-Value (Redis, Memcached)
|
|
151
|
+
D) Graph Database (Neo4j, Neptune)
|
|
152
|
+
E) Other (please describe after [Answer]: tag below)
|
|
153
|
+
|
|
154
|
+
[Recommendation]: A — Relational databases are the most versatile default; PostgreSQL specifically offers strong JSON support if NoSQL-like flexibility is needed later.
|
|
155
|
+
|
|
156
|
+
[Answer]:
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
#### Bad Example (Avoid):
|
|
160
|
+
```markdown
|
|
161
|
+
## Question 5
|
|
162
|
+
What database will you use?
|
|
163
|
+
|
|
164
|
+
A) Yes
|
|
165
|
+
B) No
|
|
166
|
+
C) Maybe
|
|
167
|
+
|
|
168
|
+
[Answer]:
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Workflow Integration
|
|
172
|
+
|
|
173
|
+
#### Step 1: Create Question File
|
|
174
|
+
```markdown
|
|
175
|
+
Create aidlc-docs/{phase-name}-questions.md with all questions
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
#### Step 2: Inform User
|
|
179
|
+
```
|
|
180
|
+
"I've created {phase-name}-questions.md with [X] questions.
|
|
181
|
+
Please answer each question by filling in the letter choice after the [Answer]: tag.
|
|
182
|
+
For multi-select questions, provide comma-separated letters (e.g., A, B, E). Each question includes an AI recommendation to help guide your decision.
|
|
183
|
+
If none of the options match your needs, choose the last option (Other) and describe your preference. Let me know when you're done."
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
#### Step 3: Wait for Confirmation
|
|
187
|
+
Wait for user to say "done", "completed", "finished", or similar.
|
|
188
|
+
|
|
189
|
+
#### Step 4: Read and Analyze
|
|
190
|
+
```
|
|
191
|
+
Read aidlc-docs/{phase-name}-questions.md
|
|
192
|
+
Extract all answers
|
|
193
|
+
Validate completeness
|
|
194
|
+
Proceed with analysis
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Error Handling
|
|
198
|
+
|
|
199
|
+
#### Missing Answers
|
|
200
|
+
If any [Answer]: tag is empty:
|
|
201
|
+
```
|
|
202
|
+
"I noticed Question [X] is not answered. Please provide an answer using one of the letter choices
|
|
203
|
+
for all questions before proceeding."
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
#### Invalid Answers
|
|
207
|
+
If answer is not a valid letter choice:
|
|
208
|
+
```
|
|
209
|
+
"Question [X] has an invalid answer '[answer]'.
|
|
210
|
+
Please use only the letter choices provided in the question.
|
|
211
|
+
For multi-select questions, use comma-separated letters (e.g., A, B, E)."
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
#### Ambiguous Answers
|
|
215
|
+
If user provides explanation instead of letter:
|
|
216
|
+
```
|
|
217
|
+
"For Question [X], please provide the letter choice that best matches your answer.
|
|
218
|
+
If none match, choose 'Other' and add your description after the [Answer]: tag."
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Contradiction and Ambiguity Detection
|
|
222
|
+
|
|
223
|
+
**MANDATORY**: After reading user responses, you MUST check for contradictions and ambiguities.
|
|
224
|
+
|
|
225
|
+
#### Detecting Contradictions
|
|
226
|
+
Look for logically inconsistent answers:
|
|
227
|
+
- Scope mismatch: "Bug fix" but "Entire codebase affected"
|
|
228
|
+
- Risk mismatch: "Low risk" but "Breaking changes"
|
|
229
|
+
- Timeline mismatch: "Quick fix" but "Multiple subsystems"
|
|
230
|
+
- Impact mismatch: "Single component" but "Significant architecture changes"
|
|
231
|
+
|
|
232
|
+
#### Detecting Ambiguities
|
|
233
|
+
Look for unclear or borderline responses:
|
|
234
|
+
- Answers that could fit multiple classifications
|
|
235
|
+
- Responses that lack specificity
|
|
236
|
+
- Conflicting indicators across multiple questions
|
|
237
|
+
|
|
238
|
+
#### Creating Clarification Questions
|
|
239
|
+
If contradictions or ambiguities detected:
|
|
240
|
+
|
|
241
|
+
1. **Create clarification file**: `{phase-name}-clarification-questions.md`
|
|
242
|
+
2. **Explain the issue**: Clearly state what contradiction/ambiguity was detected
|
|
243
|
+
3. **Ask targeted questions**: Use multiple choice format to resolve the issue
|
|
244
|
+
4. **Reference original questions**: Show which questions had conflicting answers
|
|
245
|
+
|
|
246
|
+
**Example**:
|
|
247
|
+
```markdown
|
|
248
|
+
# [Phase Name] Clarification Questions
|
|
249
|
+
|
|
250
|
+
I detected contradictions in your responses that need clarification:
|
|
251
|
+
|
|
252
|
+
## Contradiction 1: [Brief Description]
|
|
253
|
+
You indicated "[Answer A]" (Q[X]:[Letter]) but also "[Answer B]" (Q[Y]:[Letter]).
|
|
254
|
+
These responses are contradictory because [explanation].
|
|
255
|
+
|
|
256
|
+
### Clarification Question 1
|
|
257
|
+
[Specific question to resolve contradiction]
|
|
258
|
+
|
|
259
|
+
A) [Option that resolves toward first answer]
|
|
260
|
+
B) [Option that resolves toward second answer]
|
|
261
|
+
C) [Option that provides middle ground]
|
|
262
|
+
D) [Option that reframes the question]
|
|
263
|
+
|
|
264
|
+
[Answer]:
|
|
265
|
+
|
|
266
|
+
## Ambiguity 1: [Brief Description]
|
|
267
|
+
Your response to Q[X] ("[Answer]") is ambiguous because [explanation].
|
|
268
|
+
|
|
269
|
+
### Clarification Question 2
|
|
270
|
+
[Specific question to clarify ambiguity]
|
|
271
|
+
|
|
272
|
+
A) [Clear option 1]
|
|
273
|
+
B) [Clear option 2]
|
|
274
|
+
C) [Clear option 3]
|
|
275
|
+
D) [Clear option 4]
|
|
276
|
+
|
|
277
|
+
[Answer]:
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
#### Workflow for Clarifications
|
|
281
|
+
|
|
282
|
+
1. **Detect**: Analyze all responses for contradictions/ambiguities
|
|
283
|
+
2. **Create**: Generate clarification question file if issues found
|
|
284
|
+
3. **Inform**: Tell user about the issues and clarification file
|
|
285
|
+
4. **Wait**: Do not proceed until user provides clarifications
|
|
286
|
+
5. **Re-validate**: After clarifications, check again for consistency
|
|
287
|
+
6. **Proceed**: Only move forward when all contradictions are resolved
|
|
288
|
+
|
|
289
|
+
#### Example User Message
|
|
290
|
+
```
|
|
291
|
+
"I detected 2 contradictions in your responses:
|
|
292
|
+
|
|
293
|
+
1. Bug fix scope vs. codebase impact (Q1 vs Q2)
|
|
294
|
+
2. Low risk vs. breaking changes (Q7 vs Q4)
|
|
295
|
+
|
|
296
|
+
I've created classification-clarification-questions.md with 2 questions to resolve these.
|
|
297
|
+
Please answer these clarifying questions before I can proceed with classification."
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### Best Practices
|
|
301
|
+
|
|
302
|
+
1. **Be Specific**: Questions should be clear and unambiguous
|
|
303
|
+
2. **Be Comprehensive**: Cover all necessary information
|
|
304
|
+
3. **Be Concise**: Keep questions focused on one topic
|
|
305
|
+
4. **Be Practical**: Options should be realistic and actionable
|
|
306
|
+
5. **Be Consistent**: Use same format throughout all question files
|
|
307
|
+
|
|
308
|
+
### Phase-Specific Examples
|
|
309
|
+
|
|
310
|
+
#### Example: select one (2 meaningful options)
|
|
311
|
+
```markdown
|
|
312
|
+
## Question 1
|
|
313
|
+
Is this a new project or existing codebase? (select one)
|
|
314
|
+
|
|
315
|
+
A) New project (greenfield)
|
|
316
|
+
B) Existing codebase (brownfield)
|
|
317
|
+
C) Other (please describe after [Answer]: tag below)
|
|
318
|
+
|
|
319
|
+
[Recommendation]: No recommendation — this is a factual question about your current state.
|
|
320
|
+
|
|
321
|
+
[Answer]:
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
#### Example: select one (3 meaningful options)
|
|
325
|
+
```markdown
|
|
326
|
+
## Question 2
|
|
327
|
+
What is the deployment target? (select one)
|
|
328
|
+
|
|
329
|
+
A) Cloud (AWS, Azure, GCP)
|
|
330
|
+
B) On-premises servers
|
|
331
|
+
C) Hybrid (both cloud and on-premises)
|
|
332
|
+
D) Other (please describe after [Answer]: tag below)
|
|
333
|
+
|
|
334
|
+
[Recommendation]: A — Cloud deployments offer the fastest path to production with managed scaling and infrastructure.
|
|
335
|
+
|
|
336
|
+
[Answer]:
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
#### Example: select all that apply (4 meaningful options)
|
|
340
|
+
```markdown
|
|
341
|
+
## Question 3
|
|
342
|
+
What are your primary concerns for this project? (select all that apply)
|
|
343
|
+
|
|
344
|
+
A) Performance and scalability
|
|
345
|
+
B) Security and compliance
|
|
346
|
+
C) Developer experience and maintainability
|
|
347
|
+
D) Cost optimization
|
|
348
|
+
E) Other (please describe after [Answer]: tag below)
|
|
349
|
+
|
|
350
|
+
[Recommendation]: A, B, C — These three concerns form the foundation of a production-quality system. Cost optimization is important but shouldn't drive architectural decisions early on.
|
|
351
|
+
|
|
352
|
+
[Answer]:
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
## Summary
|
|
356
|
+
|
|
357
|
+
**Remember**:
|
|
358
|
+
- ✅ Always create question files
|
|
359
|
+
- ✅ Always use multiple choice format
|
|
360
|
+
- ✅ **Always include "Other" as the LAST option (MANDATORY)**
|
|
361
|
+
- ✅ **Always include `(select one)` or `(select all that apply)` after the question text**
|
|
362
|
+
- ✅ **Always include `[Recommendation]:` with reasoning before `[Answer]:`**
|
|
363
|
+
- ✅ Only include meaningful options - don't make up options to fill slots
|
|
364
|
+
- ✅ Always use [Answer]: tags
|
|
365
|
+
- ✅ Accept comma-separated letters for multi-select answers (e.g., A, B, E)
|
|
366
|
+
- ✅ Always wait for user completion
|
|
367
|
+
- ✅ Always validate responses for contradictions
|
|
368
|
+
- ✅ Always create clarification files if needed
|
|
369
|
+
- ✅ Always resolve contradictions before proceeding
|
|
370
|
+
- ❌ Never ask questions in chat
|
|
371
|
+
- ❌ Never make up options just to have A, B, C, D
|
|
372
|
+
- ❌ Never proceed without answers
|
|
373
|
+
- ❌ Never proceed with unresolved contradictions
|
|
374
|
+
- ❌ Never make assumptions about ambiguous responses
|
|
375
|
+
- ❌ Never omit the selection type indicator or AI recommendation
|