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.
Files changed (50) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/dist/features/workflow-engine/artifacts.d.ts.map +1 -1
  3. package/dist/features/workflow-engine/artifacts.js +13 -9
  4. package/dist/features/workflow-engine/artifacts.js.map +1 -1
  5. package/dist/features/workflow-engine/construction/nfr-requirements.js +1 -1
  6. package/dist/features/workflow-engine/construction/nfr-requirements.js.map +1 -1
  7. package/dist/features/workflow-engine/engine.d.ts +1 -1
  8. package/dist/features/workflow-engine/engine.js +2 -2
  9. package/dist/features/workflow-engine/engine.js.map +1 -1
  10. package/dist/features/workflow-engine/inception/stages/units-generation.d.ts.map +1 -1
  11. package/dist/features/workflow-engine/inception/stages/units-generation.js +7 -6
  12. package/dist/features/workflow-engine/inception/stages/units-generation.js.map +1 -1
  13. package/dist/features/workflow-engine/inception/stages/user-stories.d.ts.map +1 -1
  14. package/dist/features/workflow-engine/inception/stages/user-stories.js +5 -3
  15. package/dist/features/workflow-engine/inception/stages/user-stories.js.map +1 -1
  16. package/dist/features/workflow-engine/question-manager.d.ts.map +1 -1
  17. package/dist/features/workflow-engine/question-manager.js +5 -1
  18. package/dist/features/workflow-engine/question-manager.js.map +1 -1
  19. package/dist/features/workflow-engine/state-file.d.ts.map +1 -1
  20. package/dist/features/workflow-engine/state-file.js +4 -2
  21. package/dist/features/workflow-engine/state-file.js.map +1 -1
  22. package/dist/hooks/olympus-hooks.cjs +10 -10
  23. package/dist/installer/index.d.ts +1 -1
  24. package/dist/installer/index.js +1 -1
  25. package/dist/learning/__tests__/project-resolver.test.d.ts +2 -0
  26. package/dist/learning/__tests__/project-resolver.test.d.ts.map +1 -0
  27. package/dist/learning/__tests__/project-resolver.test.js +216 -0
  28. package/dist/learning/__tests__/project-resolver.test.js.map +1 -0
  29. package/dist/learning/hooks/success-detector.d.ts.map +1 -1
  30. package/dist/learning/hooks/success-detector.js +4 -26
  31. package/dist/learning/hooks/success-detector.js.map +1 -1
  32. package/dist/learning/pattern-extractor.js +1 -1
  33. package/dist/learning/pattern-extractor.js.map +1 -1
  34. package/dist/learning/project-resolver.d.ts +6 -0
  35. package/dist/learning/project-resolver.d.ts.map +1 -0
  36. package/dist/learning/project-resolver.js +65 -0
  37. package/dist/learning/project-resolver.js.map +1 -0
  38. package/dist/learning/storage.d.ts.map +1 -1
  39. package/dist/learning/storage.js +2 -1
  40. package/dist/learning/storage.js.map +1 -1
  41. package/package.json +1 -1
  42. package/resources/agents/frontend-engineer-high.md +112 -10
  43. package/resources/agents/frontend-engineer.md +136 -73
  44. package/resources/rules/common/depth-levels.md +73 -73
  45. package/resources/rules/common/question-format-guide.md +375 -375
  46. package/resources/rules/common/session-continuity.md +47 -47
  47. package/resources/rules/inception/requirements-analysis.md +247 -215
  48. package/resources/rules/inception/workflow-planning.md +487 -487
  49. package/resources/skills/continue/SKILL.md +3 -3
  50. package/resources/skills/plan/SKILL.md +35 -25
@@ -1,47 +1,47 @@
1
- # Session Continuity Templates
2
-
3
- ## Welcome Back Prompt Template
4
- When a user returns to continue work on an existing AI-DLC project, present this prompt:
5
-
6
- ```markdown
7
- **Welcome back! I can see you have an existing AI-DLC project in progress.**
8
-
9
- Based on your aidlc-state.md, here's your current status:
10
- - **Project**: [project-name]
11
- - **Current Phase**: [INCEPTION/CONSTRUCTION/OPERATIONS]
12
- - **Current Stage**: [Stage Name]
13
- - **Last Completed**: [Last completed step]
14
- - **Next Step**: [Next step to work on]
15
-
16
- **What would you like to work on today?**
17
-
18
- A) Continue where you left off ([Next step description])
19
- B) Review a previous stage ([Show available stages])
20
-
21
- [Answer]:
22
- ```
23
-
24
- ## MANDATORY: Session Continuity Instructions
25
- 1. **Always read aidlc-state.md first** when detecting existing project
26
- 2. **Parse current status** from the workflow file to populate the prompt
27
- 3. **MANDATORY: Load Previous Stage Artifacts** - Before resuming any stage, automatically read all relevant artifacts from previous stages:
28
- - **Reverse Engineering**: Read architecture.md, code-structure.md, api-documentation.md
29
- - **Requirements Analysis**: Read requirements.md, requirement-verification-questions.md
30
- - **User Stories**: Read stories.md, personas.md, story-generation-plan.md
31
- - **Application Design**: Read application-design artifacts (components.md, component-methods.md, services.md)
32
- - **Design (Units)**: Read unit-of-work.md, unit-of-work-dependency.md, unit-of-work-story-map.md
33
- - **Per-Unit Design**: Read functional-design.md, nfr-requirements.md, nfr-design.md, infrastructure-design.md
34
- - **Code Stages**: Read all code files, plans, AND all previous artifacts
35
- 4. **Smart Context Loading by Stage**:
36
- - **Early Stages (Workspace Detection, Reverse Engineering)**: Load workspace analysis
37
- - **Requirements/Stories**: Load reverse engineering + requirements artifacts
38
- - **Design Stages**: Load requirements + stories + architecture + design artifacts
39
- - **Code Stages**: Load ALL artifacts + existing code files
40
- 5. **Adapt options** based on architectural choice and current phase
41
- 6. **Show specific next steps** rather than generic descriptions
42
- 7. **Log the continuity prompt** in audit.md with timestamp
43
- 8. **Context Summary**: After loading artifacts, provide brief summary of what was loaded for user awareness
44
- 9. **Asking questions**: ALWAYS ask clarification or user feedback questions by placing them in .md files. DO NOT place the multiple-choice questions in-line in the chat session.
45
-
46
- ## Error Handling
47
- If artifacts are missing or corrupted during session resumption, see [error-handling.md](error-handling.md) for guidance on recovery procedures.
1
+ # Session Continuity Templates
2
+
3
+ ## Welcome Back Prompt Template
4
+ When a user returns to continue work on an existing AI-DLC project, present this prompt:
5
+
6
+ ```markdown
7
+ **Welcome back! I can see you have an existing AI-DLC project in progress.**
8
+
9
+ Based on your aidlc-state.md, here's your current status:
10
+ - **Project**: [project-name]
11
+ - **Current Phase**: [INCEPTION/CONSTRUCTION/OPERATIONS]
12
+ - **Current Stage**: [Stage Name]
13
+ - **Last Completed**: [Last completed step]
14
+ - **Next Step**: [Next step to work on]
15
+
16
+ **What would you like to work on today?**
17
+
18
+ A) Continue where you left off ([Next step description])
19
+ B) Review a previous stage ([Show available stages])
20
+
21
+ [Answer]:
22
+ ```
23
+
24
+ ## MANDATORY: Session Continuity Instructions
25
+ 1. **Always read aidlc-state.md first** when detecting existing project
26
+ 2. **Parse current status** from the workflow file to populate the prompt
27
+ 3. **MANDATORY: Load Previous Stage Artifacts** - Before resuming any stage, automatically read all relevant artifacts from previous stages:
28
+ - **Reverse Engineering**: Read architecture.md, code-structure.md, api-documentation.md
29
+ - **Requirements Analysis**: Read requirements.md, requirements-analysis-questions.md
30
+ - **User Stories**: Read stories.md, personas.md, story-generation-plan.md
31
+ - **Application Design**: Read application-design artifacts (components.md, component-methods.md, services.md)
32
+ - **Design (Units)**: Read unit-of-work.md, unit-of-work-dependency.md, unit-of-work-story-map.md
33
+ - **Per-Unit Design**: Read functional-design.md, nfr-requirements.md, nfr-design.md, infrastructure-design.md
34
+ - **Code Stages**: Read all code files, plans, AND all previous artifacts
35
+ 4. **Smart Context Loading by Stage**:
36
+ - **Early Stages (Workspace Detection, Reverse Engineering)**: Load workspace analysis
37
+ - **Requirements/Stories**: Load reverse engineering + requirements artifacts
38
+ - **Design Stages**: Load requirements + stories + architecture + design artifacts
39
+ - **Code Stages**: Load ALL artifacts + existing code files
40
+ 5. **Adapt options** based on architectural choice and current phase
41
+ 6. **Show specific next steps** rather than generic descriptions
42
+ 7. **Log the continuity prompt** in audit.md with timestamp
43
+ 8. **Context Summary**: After loading artifacts, provide brief summary of what was loaded for user awareness
44
+ 9. **Asking questions**: ALWAYS ask clarification or user feedback questions by placing them in .md files. DO NOT place the multiple-choice questions in-line in the chat session.
45
+
46
+ ## Error Handling
47
+ If artifacts are missing or corrupted during session resumption, see [error-handling.md](error-handling.md) for guidance on recovery procedures.
@@ -1,215 +1,247 @@
1
- # Requirements Analysis (Adaptive)
2
-
3
- **Assume the role** of a product owner
4
-
5
- **Adaptive Phase**: Always executes. Detail level adapts to problem complexity.
6
-
7
- **See [depth-levels.md](../common/depth-levels.md) for adaptive depth explanation**
8
-
9
- ## Prerequisites
10
- - Workspace Detection must be complete
11
- - Reverse Engineering must be complete (if brownfield)
12
-
13
- ## Agent Delegation Strategy
14
-
15
- **Orchestrator-driven stage** with optional agent support. Requirements Analysis is primarily Q&A-driven work that the orchestrator manages directly (intent analysis, question generation, answer collection, requirements document creation).
16
-
17
- **Optional delegation**:
18
- - **`metis`** (Opus, read-only): May be invoked for blind spot analysis during the question-answering phase. If used, findings are presented to the user for review in Step 6b. This is optional and at the orchestrator's discretion based on project complexity.
19
-
20
- **Execution mode**: The orchestrator runs all steps directly. If `metis` is invoked, it runs in the foreground as a supplementary analysis — not a replacement for the orchestrator's own work.
21
-
22
- **If an agent task fails**: Follow the Agent Task Failure Recovery procedure in `error-handling.md` — retry the delegation, never silently do the work yourself.
23
-
24
- ## Execution Steps
25
-
26
- ### Step 1: Load Reverse Engineering Context (if available)
27
-
28
- **IF brownfield project**:
29
- - Load `aidlc-docs/inception/reverse-engineering/architecture.md`
30
- - Load `aidlc-docs/inception/reverse-engineering/component-inventory.md`
31
- - Load `aidlc-docs/inception/reverse-engineering/technology-stack.md`
32
- - Use these to understand existing system when analyzing request
33
-
34
- ### Step 2: Analyze User Request (Intent Analysis)
35
-
36
- #### 2.1 Request Clarity
37
- - **Clear**: Specific, well-defined, actionable
38
- - **Vague**: General, ambiguous, needs clarification
39
- - **Incomplete**: Missing key information
40
-
41
- #### 2.2 Request Type
42
- - **New Feature**: Adding new functionality
43
- - **Bug Fix**: Fixing existing issue
44
- - **Refactoring**: Improving code structure
45
- - **Upgrade**: Updating dependencies or frameworks
46
- - **Migration**: Moving to different technology
47
- - **Enhancement**: Improving existing feature
48
- - **New Project**: Starting from scratch
49
-
50
- #### 2.3 Initial Scope Estimate
51
- - **Single File**: Changes to one file
52
- - **Single Component**: Changes to one component/package
53
- - **Multiple Components**: Changes across multiple components
54
- - **System-wide**: Changes affecting entire system
55
- - **Cross-system**: Changes affecting multiple systems
56
-
57
- #### 2.4 Initial Complexity Estimate
58
- - **Trivial**: Simple, straightforward change
59
- - **Simple**: Clear implementation path
60
- - **Moderate**: Some complexity, multiple considerations
61
- - **Complex**: Significant complexity, many considerations
62
-
63
- ### Step 3: Determine Requirements Depth
64
-
65
- **Based on request analysis, determine depth:**
66
-
67
- **Minimal Depth** - Use when:
68
- - Request is clear and simple
69
- - No detailed requirements needed
70
- - Just document the basic understanding
71
-
72
- **Standard Depth** - Use when:
73
- - Request needs clarification
74
- - Functional and non-functional requirements needed
75
- - Normal complexity
76
-
77
- **Comprehensive Depth** - Use when:
78
- - Complex project with multiple stakeholders
79
- - High risk or critical system
80
- - Detailed requirements with traceability needed
81
-
82
- ### Step 4: Assess Current Requirements
83
-
84
- Analyze whatever the user has provided:
85
- - Intent statements or descriptions (already logged in audit.md)
86
- - Existing requirements documents (search workspace if mentioned)
87
- - Pasted content or file references
88
- - Convert any non-markdown documents to markdown format
89
-
90
- ### Step 5: Thorough Completeness Analysis
91
-
92
- **CRITICAL**: Use comprehensive analysis to evaluate requirements completeness. Default to asking questions when there is ANY ambiguity or missing detail.
93
-
94
- **MANDATORY**: Evaluate ALL of these areas and ask questions for ANY that are unclear:
95
- - **Functional Requirements**: Core features, user interactions, system behaviors
96
- - **Non-Functional Requirements**: Performance, security, scalability, usability
97
- - **User Scenarios**: Use cases, user journeys, edge cases, error scenarios
98
- - **Business Context**: Goals, constraints, success criteria, stakeholder needs
99
- - **Technical Context**: Integration points, data requirements, system boundaries
100
- - **Quality Attributes**: Reliability, maintainability, testability, accessibility
101
-
102
- **When in doubt, ask questions** - incomplete requirements lead to poor implementations.
103
-
104
- ### Step 6: Generate Clarifying Questions (PROACTIVE APPROACH)
105
- - **ALWAYS** create `aidlc-docs/inception/requirements/requirement-verification-questions.md` unless requirements are exceptionally clear and complete
106
- - Ask questions about ANY missing, unclear, or ambiguous areas
107
- - Focus on functional requirements, non-functional requirements, user scenarios, and business context
108
- - Request user to fill in all [Answer]: tags directly in the questions document
109
- - If presenting multiple-choice options for answers:
110
- - Label the options as A, B, C, D etc.
111
- - Ensure options are mutually exclusive and don't overlap
112
- - ALWAYS include option for custom response: "X) Other (please describe after [Answer]: tag below)"
113
- - Wait for user answers in the document
114
- - **MANDATORY**: Analyze ALL answers for ambiguities and create follow-up questions if needed
115
- - **MANDATORY**: Keep asking questions until ALL ambiguities are resolved OR user explicitly asks to proceed
116
-
117
- ### ⛔ GATE: Await User Answers
118
- DO NOT proceed to Step 7 until all questions in requirement-verification-questions.md are answered and validated.
119
- Present the question file to the user and STOP.
120
-
121
- ### Step 6b: Review Supplementary Analysis (if applicable)
122
-
123
- **IF a Metis blind spot analysis (or any supplementary agent analysis) was run during the question-answering phase:**
124
-
125
- 1. Present a summary of the agent's findings to the userclearly separated from the user's own answers
126
- 2. Format as a numbered list of findings, each with a brief explanation of why it was flagged
127
- 3. Ask the user to review and indicate which findings to incorporate:
128
-
129
- ```markdown
130
- > **🔎 Metis Blind Spot Analysis Findings**
131
- >
132
- > The following potential gaps or risks were identified during requirements analysis:
133
- >
134
- > 1. [Finding description]
135
- > 2. [Finding description]
136
- > ...
137
- >
138
- > **Please review these findings.** You may:
139
- > - **Approve All** Incorporate all findings into requirements
140
- > - ✏️ **Select Specific** — Indicate which findings to include (e.g., "include 1, 3, skip 2")
141
- > - **Skip All** Proceed without incorporating supplementary findings
142
- ```
143
-
144
- 4. **MANDATORY**: Do NOT proceed to Step 7 until the user has reviewed and responded
145
- 5. **MANDATORY**: Only incorporate findings the user explicitly approved
146
- 6. Log the user's response in `audit.md` with complete raw input
147
-
148
- **IF no supplementary analysis was run**: Skip directly to Step 7.
149
-
150
- ### Step 7: Generate Requirements Document
151
- - **PREREQUISITE**: Step 6 gate must be passed — all answers received and analyzed. If Step 6b applied, supplementary findings must also be reviewed.
152
- - Create `aidlc-docs/inception/requirements/requirements.md`
153
- - Include intent analysis summary at the top:
154
- - User request
155
- - Request type
156
- - Scope estimate
157
- - Complexity estimate
158
- - Include both functional and non-functional requirements
159
- - Incorporate user's answers to clarifying questions
160
- - Provide brief summary of key requirements
161
-
162
- ### Step 8: MANDATORY: Update State Tracking
163
-
164
- **MANDATORY**: Update BOTH state files in the SAME interaction:
165
- 1. Update `aidlc-docs/{workflow-id}/aidlc-state.md`:
166
-
167
- ```markdown
168
- ## Stage Progress
169
- ### 🔵 INCEPTION PHASE
170
- - [x] Workspace Detection
171
- - [x] Reverse Engineering (if applicable)
172
- - [x] Requirements Analysis
173
- ```
174
-
175
- ### Step 9: Log and Proceed
176
- - Log approval prompt with timestamp in `aidlc-docs/audit.md`
177
- - Present completion message in this structure:
178
- 1. **Completion Announcement** (mandatory): Always start with this:
179
-
180
- ```markdown
181
- # 🔍 Requirements Analysis Complete
182
- ```
183
-
184
- 2. **AI Summary** (optional): Provide structured bullet-point summary of requirements
185
- - Format: "Requirements analysis has identified [project type/complexity]:"
186
- - List key functional requirements (bullet points)
187
- - List key non-functional requirements (bullet points)
188
- - Mention architectural considerations or technical decisions if relevant
189
- - DO NOT include workflow instructions ("please review", "let me know", "proceed to next phase", "before we proceed")
190
- - Keep factual and content-focused
191
- 3. **Formatted Workflow Message** (mandatory): Always end with this exact format:
192
-
193
- ```markdown
194
- > **📋 <u>**REVIEW REQUIRED:**</u>**
195
- > Please examine the requirements document at: `aidlc-docs/inception/requirements/requirements.md`
196
-
197
-
198
-
199
- > **🚀 <u>**WHAT'S NEXT?**</u>**
200
- >
201
- > **You may:**
202
- >
203
- > 🔧 **Request Changes** - Ask for modifications to the requirements if required based on your review
204
- > [IF User Stories will be skipped, add this option:]
205
- > 📝 **Add User Stories** - Choose to Include **User Stories** stage (currently skipped based on project simplicity)
206
- > ✅ **Approve & Continue** - Approve requirements and proceed to **[User Stories/Workflow Planning]**
207
-
208
- ---
209
- ```
210
-
211
- **Note**: Include the "Add User Stories" option only when User Stories stage will be skipped. Replace [User Stories/Workflow Planning] with the actual next stage name.
212
-
213
- - Wait for explicit user approval before proceeding
214
- - Record approval response with timestamp
215
- - Update Requirements Analysis stage complete in aidlc-state.md
1
+ # Requirements Analysis (Adaptive)
2
+
3
+ **Assume the role** of a product owner
4
+
5
+ **Adaptive Phase**: Always executes. Detail level adapts to problem complexity.
6
+
7
+ **See [depth-levels.md](../common/depth-levels.md) for adaptive depth explanation**
8
+
9
+ ## Prerequisites
10
+ - Workspace Detection must be complete
11
+ - Reverse Engineering must be complete (if brownfield)
12
+
13
+ ## Agent Delegation Strategy
14
+
15
+ **Orchestrator-driven stage** with optional agent support. Requirements Analysis is primarily Q&A-driven work that the orchestrator manages directly (intent analysis, question generation, answer collection, requirements document creation).
16
+
17
+ **Optional delegation**:
18
+ - **`metis`** (Opus, read-only): May be invoked for blind spot analysis during the question-answering phase. If used, findings are presented to the user for review in Step 6b. This is optional and at the orchestrator's discretion based on project complexity.
19
+
20
+ **Execution mode**: The orchestrator runs all steps directly. If `metis` is invoked, it runs in the foreground as a supplementary analysis — not a replacement for the orchestrator's own work.
21
+
22
+ **If an agent task fails**: Follow the Agent Task Failure Recovery procedure in `error-handling.md` — retry the delegation, never silently do the work yourself.
23
+
24
+ ## Execution Steps
25
+
26
+ ### Step 1: Load Reverse Engineering Context (if available)
27
+
28
+ **IF brownfield project**:
29
+ - Load `aidlc-docs/{workflow-id}/inception/reverse-engineering/architecture.md`
30
+ - Load `aidlc-docs/{workflow-id}/inception/reverse-engineering/component-inventory.md`
31
+ - Load `aidlc-docs/{workflow-id}/inception/reverse-engineering/technology-stack.md`
32
+ - Use these to understand existing system when analyzing request
33
+
34
+ ### Step 2: Analyze User Request (Intent Analysis)
35
+
36
+ #### 2.1 Request Clarity
37
+ - **Clear**: Specific, well-defined, actionable
38
+ - **Vague**: General, ambiguous, needs clarification
39
+ - **Incomplete**: Missing key information
40
+
41
+ #### 2.2 Request Type
42
+ - **New Feature**: Adding new functionality
43
+ - **Bug Fix**: Fixing existing issue
44
+ - **Refactoring**: Improving code structure
45
+ - **Upgrade**: Updating dependencies or frameworks
46
+ - **Migration**: Moving to different technology
47
+ - **Enhancement**: Improving existing feature
48
+ - **New Project**: Starting from scratch
49
+
50
+ #### 2.3 Initial Scope Estimate
51
+ - **Single File**: Changes to one file
52
+ - **Single Component**: Changes to one component/package
53
+ - **Multiple Components**: Changes across multiple components
54
+ - **System-wide**: Changes affecting entire system
55
+ - **Cross-system**: Changes affecting multiple systems
56
+
57
+ #### 2.4 Initial Complexity Estimate
58
+ - **Trivial**: Simple, straightforward change
59
+ - **Simple**: Clear implementation path
60
+ - **Moderate**: Some complexity, multiple considerations
61
+ - **Complex**: Significant complexity, many considerations
62
+
63
+ ### Step 3: Determine Requirements Depth
64
+
65
+ **Based on request analysis, determine depth:**
66
+
67
+ **Minimal Depth** - Use when:
68
+ - Request is clear and simple
69
+ - No detailed requirements needed
70
+ - Just document the basic understanding
71
+
72
+ **Standard Depth** - Use when:
73
+ - Request needs clarification
74
+ - Functional and non-functional requirements needed
75
+ - Normal complexity
76
+
77
+ **Comprehensive Depth** - Use when:
78
+ - Complex project with multiple stakeholders
79
+ - High risk or critical system
80
+ - Detailed requirements with traceability needed
81
+
82
+ ### Step 4: Assess Current Requirements
83
+
84
+ Analyze whatever the user has provided:
85
+ - Intent statements or descriptions (already logged in audit.md)
86
+ - Existing requirements documents (search workspace if mentioned)
87
+ - Pasted content or file references
88
+ - Convert any non-markdown documents to markdown format
89
+
90
+ ### Step 5: Thorough Completeness Analysis
91
+
92
+ **CRITICAL**: Use comprehensive analysis to evaluate requirements completeness. Default to asking questions when there is ANY ambiguity or missing detail.
93
+
94
+ **MANDATORY**: Evaluate ALL of these areas and ask questions for ANY that are unclear:
95
+ - **Functional Requirements**: Core features, user interactions, system behaviors
96
+ - **Non-Functional Requirements**: Performance, security, scalability, usability
97
+ - **User Scenarios**: Use cases, user journeys, edge cases, error scenarios
98
+ - **Business Context**: Goals, constraints, success criteria, stakeholder needs
99
+ - **Technical Context**: Integration points, data requirements, system boundaries
100
+ - **Quality Attributes**: Reliability, maintainability, testability, accessibility
101
+
102
+ **When in doubt, ask questions** - incomplete requirements lead to poor implementations.
103
+
104
+ ### Step 6: Generate Clarifying Questions (PROACTIVE APPROACH)
105
+ - **ALWAYS** create `aidlc-docs/{workflow-id}/inception/requirements/requirements-analysis-questions.md` unless requirements are exceptionally clear and complete
106
+ - Ask questions about ANY missing, unclear, or ambiguous areas
107
+ - Focus on functional requirements, non-functional requirements, user scenarios, and business context
108
+ - Request user to fill in all [Answer]: tags directly in the questions document
109
+ - If presenting multiple-choice options for answers:
110
+ - Label the options as A, B, C, D etc.
111
+ - Ensure options are mutually exclusive and don't overlap
112
+ - ALWAYS include option for custom response: "X) Other (please describe after [Answer]: tag below)"
113
+ - Wait for user answers in the document
114
+ - **MANDATORY**: Analyze ALL answers for ambiguities and create follow-up questions if needed
115
+ - **MANDATORY**: Keep asking questions until ALL ambiguities are resolved OR user explicitly asks to proceed
116
+
117
+ ### ⛔ GATE: Await User Answers
118
+ DO NOT proceed to Step 7 until all questions in requirements-analysis-questions.md are answered and validated.
119
+ Present the question file to the user and STOP.
120
+
121
+ ### Step 6b: Review Supplementary Analysis (if applicable)
122
+
123
+ **IF a Metis blind spot analysis (or any supplementary agent analysis) was run during the question-answering phase:**
124
+
125
+ 1. **Write findings to a file**Create `aidlc-docs/{workflow-id}/inception/requirements/metis-blind-spot-analysis.md` with this structure:
126
+
127
+ ```markdown
128
+ # Metis Blind Spot Analysis
129
+
130
+ Date: {ISO-8601}
131
+ Feature: {feature name}
132
+
133
+ ## How to Review
134
+
135
+ For each finding below, Metis has provided a **Recommendation** with a suggested course of action.
136
+ Review each finding and:
137
+ - **Check the box** `[x]` next to findings you want incorporated into requirements
138
+ - **Add comments** in the "Your Comments" field if you want to modify or clarify a finding
139
+ - Leave unchecked findings as `[ ]` to skip them
140
+
141
+ When done, let me know and I will incorporate your approved findings into the requirements.
142
+
143
+ ---
144
+
145
+ ## Findings
146
+
147
+ ### 1. [Finding title]
148
+ [Description of the gap/risk and why it was flagged]
149
+
150
+ **Recommendation**: [Metis's suggested course of action — e.g., incorporate as requirement, defer to later phase, investigate further, add as constraint, etc.]
151
+
152
+ - [ ] Include this finding
153
+ - **Your Comments**:
154
+
155
+ ---
156
+
157
+ ### 2. [Finding title]
158
+ ...
159
+
160
+ {repeat for all findings}
161
+ ```
162
+
163
+ 2. **Present the file to the user** for review:
164
+
165
+ ```markdown
166
+ > **🔎 Metis Blind Spot Analysis**
167
+ >
168
+ > Metis identified potential gaps and risks during requirements analysis.
169
+ > Findings with recommendations have been written to:
170
+ > `aidlc-docs/{workflow-id}/inception/requirements/metis-blind-spot-analysis.md`
171
+ >
172
+ > Please review the file — each finding includes Metis's recommended course of action to help you decide.
173
+ > Check the boxes for findings you want included and add any comments, then let me know to continue.
174
+ ```
175
+
176
+ 3. **MANDATORY**: Do NOT proceed to Step 7 until the user has reviewed the file and responded
177
+ 4. **MANDATORY**: Only incorporate findings the user explicitly checked/approved in the file
178
+ 5. Log the user's response in `audit.md` with complete raw input
179
+
180
+ **IF no supplementary analysis was run**: Skip directly to Step 7.
181
+
182
+ ### Step 7: Generate Requirements Document
183
+ - **PREREQUISITE**: Step 6 gate must be passed — all answers received and analyzed. If Step 6b applied, supplementary findings must also be reviewed.
184
+ - Create `aidlc-docs/{workflow-id}/inception/requirements/requirements.md`
185
+ - Include intent analysis summary at the top:
186
+ - User request
187
+ - Request type
188
+ - Scope estimate
189
+ - Complexity estimate
190
+ - Include both functional and non-functional requirements
191
+ - Incorporate user's answers to clarifying questions
192
+ - Provide brief summary of key requirements
193
+
194
+ ### Step 8: MANDATORY: Update State Tracking
195
+
196
+ **MANDATORY**: Update BOTH state files in the SAME interaction:
197
+ 1. Update `aidlc-docs/{workflow-id}/aidlc-state.md`:
198
+
199
+ ```markdown
200
+ ## Stage Progress
201
+ ### 🔵 INCEPTION PHASE
202
+ - [x] Workspace Detection
203
+ - [x] Reverse Engineering (if applicable)
204
+ - [x] Requirements Analysis
205
+ ```
206
+
207
+ ### Step 9: Log and Proceed
208
+ - Log approval prompt with timestamp in `aidlc-docs/audit.md`
209
+ - Present completion message in this structure:
210
+ 1. **Completion Announcement** (mandatory): Always start with this:
211
+
212
+ ```markdown
213
+ # 🔍 Requirements Analysis Complete
214
+ ```
215
+
216
+ 2. **AI Summary** (optional): Provide structured bullet-point summary of requirements
217
+ - Format: "Requirements analysis has identified [project type/complexity]:"
218
+ - List key functional requirements (bullet points)
219
+ - List key non-functional requirements (bullet points)
220
+ - Mention architectural considerations or technical decisions if relevant
221
+ - DO NOT include workflow instructions ("please review", "let me know", "proceed to next phase", "before we proceed")
222
+ - Keep factual and content-focused
223
+ 3. **Formatted Workflow Message** (mandatory): Always end with this exact format:
224
+
225
+ ```markdown
226
+ > **📋 <u>**REVIEW REQUIRED:**</u>**
227
+ > Please examine the requirements document at: `aidlc-docs/{workflow-id}/inception/requirements/requirements.md`
228
+
229
+
230
+
231
+ > **🚀 <u>**WHAT'S NEXT?**</u>**
232
+ >
233
+ > **You may:**
234
+ >
235
+ > 🔧 **Request Changes** - Ask for modifications to the requirements if required based on your review
236
+ > [IF User Stories will be skipped, add this option:]
237
+ > 📝 **Add User Stories** - Choose to Include **User Stories** stage (currently skipped based on project simplicity)
238
+ > ✅ **Approve & Continue** - Approve requirements and proceed to **[User Stories/Workflow Planning]**
239
+
240
+ ---
241
+ ```
242
+
243
+ **Note**: Include the "Add User Stories" option only when User Stories stage will be skipped. Replace [User Stories/Workflow Planning] with the actual next stage name.
244
+
245
+ - Wait for explicit user approval before proceeding
246
+ - Record approval response with timestamp
247
+ - Update Requirements Analysis stage complete in aidlc-state.md