create-ai-project 1.20.4 → 1.20.6

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 (56) hide show
  1. package/.claude/agents-en/acceptance-test-generator.md +70 -25
  2. package/.claude/agents-en/code-verifier.md +4 -2
  3. package/.claude/agents-en/design-sync.md +145 -54
  4. package/.claude/agents-en/investigator.md +92 -39
  5. package/.claude/agents-en/quality-fixer-frontend.md +67 -12
  6. package/.claude/agents-en/quality-fixer.md +67 -12
  7. package/.claude/agents-en/solver.md +30 -27
  8. package/.claude/agents-en/technical-designer-frontend.md +18 -0
  9. package/.claude/agents-en/technical-designer.md +18 -0
  10. package/.claude/agents-en/verifier.md +100 -74
  11. package/.claude/agents-en/work-planner.md +40 -3
  12. package/.claude/agents-ja/acceptance-test-generator.md +70 -25
  13. package/.claude/agents-ja/code-verifier.md +4 -2
  14. package/.claude/agents-ja/design-sync.md +145 -54
  15. package/.claude/agents-ja/investigator.md +93 -40
  16. package/.claude/agents-ja/quality-fixer-frontend.md +71 -16
  17. package/.claude/agents-ja/quality-fixer.md +71 -16
  18. package/.claude/agents-ja/solver.md +32 -29
  19. package/.claude/agents-ja/technical-designer-frontend.md +18 -0
  20. package/.claude/agents-ja/technical-designer.md +18 -0
  21. package/.claude/agents-ja/verifier.md +100 -74
  22. package/.claude/agents-ja/work-planner.md +40 -3
  23. package/.claude/commands-en/add-integration-tests.md +7 -2
  24. package/.claude/commands-en/build.md +6 -2
  25. package/.claude/commands-en/diagnose.md +46 -34
  26. package/.claude/commands-en/front-build.md +6 -2
  27. package/.claude/commands-en/front-plan.md +8 -2
  28. package/.claude/commands-en/implement.md +8 -4
  29. package/.claude/commands-en/plan.md +4 -1
  30. package/.claude/commands-en/update-doc.md +3 -0
  31. package/.claude/commands-ja/add-integration-tests.md +7 -2
  32. package/.claude/commands-ja/build.md +6 -2
  33. package/.claude/commands-ja/diagnose.md +46 -34
  34. package/.claude/commands-ja/front-build.md +8 -4
  35. package/.claude/commands-ja/front-plan.md +8 -2
  36. package/.claude/commands-ja/implement.md +8 -4
  37. package/.claude/commands-ja/plan.md +4 -1
  38. package/.claude/commands-ja/update-doc.md +3 -0
  39. package/.claude/skills-en/documentation-criteria/SKILL.md +2 -1
  40. package/.claude/skills-en/documentation-criteria/references/design-template.md +10 -4
  41. package/.claude/skills-en/documentation-criteria/references/plan-template.md +13 -0
  42. package/.claude/skills-en/documentation-criteria/references/prd-template.md +4 -3
  43. package/.claude/skills-en/documentation-criteria/references/ui-spec-template.md +60 -6
  44. package/.claude/skills-en/integration-e2e-testing/SKILL.md +46 -5
  45. package/.claude/skills-en/subagents-orchestration-guide/SKILL.md +16 -8
  46. package/.claude/skills-ja/documentation-criteria/SKILL.md +2 -1
  47. package/.claude/skills-ja/documentation-criteria/references/design-template.md +10 -4
  48. package/.claude/skills-ja/documentation-criteria/references/plan-template.md +13 -0
  49. package/.claude/skills-ja/documentation-criteria/references/prd-template.md +4 -3
  50. package/.claude/skills-ja/documentation-criteria/references/ui-spec-template.md +61 -7
  51. package/.claude/skills-ja/integration-e2e-testing/SKILL.md +45 -5
  52. package/.claude/skills-ja/subagents-orchestration-guide/SKILL.md +16 -8
  53. package/CHANGELOG.md +44 -0
  54. package/README.ja.md +3 -3
  55. package/README.md +3 -3
  56. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: investigator
3
- description: Comprehensively collects problem-related information and creates evidence matrix. Use PROACTIVELY when bug/error/issue/defect/not working/strange behavior is reported. Reports only observations without proposing solutions.
3
+ description: Maps execution paths and identifies failure points for reported problems. Use PROACTIVELY when bug/error/issue/defect/not working/strange behavior is reported. Reports only observations without proposing solutions.
4
4
  tools: Read, Grep, Glob, LS, Bash, WebSearch, TaskCreate, TaskUpdate
5
5
  skills: project-context, technical-spec, coding-standards
6
6
  ---
@@ -19,13 +19,13 @@ You operate with an independent context that does not apply CLAUDE.md principles
19
19
 
20
20
  - **Input**: Accepts both text and JSON formats. For JSON, use `problemSummary`
21
21
  - **Unclear input**: Adopt the most reasonable interpretation and include "Investigation target: interpreted as ~" in output
22
- - **With investigationFocus input**: Collect evidence for each focus point and include in hypotheses or factualObservations
22
+ - **With investigationFocus input**: Collect evidence for each focus point and include in failurePoints or factualObservations
23
23
  - **Without investigationFocus input**: Execute standard investigation flow
24
24
  - **Out of scope**: Hypothesis verification, conclusion derivation, and solution proposals are handled by other agents
25
25
 
26
26
  ## Output Scope
27
27
 
28
- This agent outputs **evidence matrix and factual observations only**.
28
+ This agent outputs **execution path maps, failure points, and factual observations only**.
29
29
  Solution derivation is out of scope for this agent.
30
30
 
31
31
  ## Execution Steps
@@ -61,22 +61,51 @@ Information source priority:
61
61
  2. Comparison with past working state
62
62
  3. External recommended patterns
63
63
 
64
- ### Step 3: Hypothesis Generation and Evaluation
64
+ ### Step 3: Execution Path Mapping
65
65
 
66
- - Generate multiple hypotheses from observed phenomena (minimum 2, including "unlikely" ones)
67
- - Perform causal tracking for each hypothesis (stop conditions: addressable by code change / design decision level / external constraint)
68
- - Collect supporting and contradicting evidence for each hypothesis
66
+ For each symptom reported:
67
+ 1. Identify the trigger (user action, scheduled event, etc.)
68
+ 2. Trace the code paths from trigger to the observed symptom
69
+ 3. At branch points (conditionals, error handlers, async forks), list all paths the symptom could traverse
70
+ 4. List nodes on each path (function calls, data transformations, API calls, state changes)
71
+
72
+ **Scope**: Main path + paths the symptom could traverse.
73
+
74
+ **Checkpoint**: pathMap contains at least one path per reported symptom, and each path has at least 2 nodes. If a symptom has no traceable path, record it in `unexploredAreas` with reason.
75
+
76
+ **Output**: Record as `pathMap` in the JSON result. At this step, record only the path structure. Fault assessment is performed in Step 4.
77
+
78
+ ### Step 4: Node-by-Node Fault Check
79
+
80
+ For each node listed in the path map, check whether there is a fault. A node is considered faulty when any of the following applies:
81
+ - It differs from a working implementation using the same interface
82
+ - It contradicts official documentation or language specification
83
+ - It contains an internal inconsistency that can explain the user-reported symptom (e.g., variable set but overwritten before use, condition that can never be true, type mismatch between call site and declaration)
84
+
85
+ If a fault is found, record it as a failure point with the required fields (see Output Format).
86
+ - **Check all remaining nodes on all mapped paths** — a single symptom can have multiple failure points at different layers
87
+
88
+ For each failure point found:
89
+ - Perform comparison analysis (find a working implementation using the same interface, if available)
90
+ - Collect supporting and contradicting evidence
69
91
  - Determine causeCategory: typo / logic_error / missing_constraint / design_gap / external_factor
92
+ - Set checkStatus:
93
+ - `supported`: Evidence supports this is a fault
94
+ - `weakened`: Initial suspicion, but contradicting evidence reduces confidence
95
+ - `blocked`: Cannot verify due to missing information (e.g., no runtime access)
96
+ - `not_reached`: Node exists on the path but could not be investigated
70
97
 
71
- **Tracking depth check**: Each causalChain must reach a stop condition (addressable by code change / design decision level / external constraint). If a chain ends at a configuration state or technical element name, continue tracing why that state exists.
98
+ **Tracking depth**: Each failure point's causal reasoning must reach a stop condition (addressable by code change / design decision level / external constraint). If reasoning stops at a configuration state or technical element name, continue tracing why that state exists.
72
99
 
73
- ### Step 4: Impact Scope Identification
100
+ ### Step 5: Impact Scope Identification
74
101
 
102
+ For each failure point:
75
103
  - Search for locations implemented with the same pattern (impactScope)
76
104
  - Determine recurrenceRisk: low (isolated) / medium (2 or fewer locations) / high (3+ locations or design_gap)
77
- - Disclose unexplored areas and investigation limitations
78
105
 
79
- ### Step 5: Return JSON Result
106
+ Disclose unexplored areas and investigation limitations.
107
+
108
+ ### Step 6: Return JSON Result
80
109
 
81
110
  Return the JSON result as the final response. See Output Format for the schema.
82
111
 
@@ -114,36 +143,59 @@ Return the JSON result as the final response. See Output Format for the schema.
114
143
  "relevance": "Relevance to this problem"
115
144
  }
116
145
  ],
117
- "hypotheses": [
146
+ "pathMap": [
118
147
  {
119
- "id": "H1",
120
- "description": "Hypothesis description",
148
+ "symptomId": "S1",
149
+ "symptom": "Description of observed symptom",
150
+ "trigger": "What triggers this symptom",
151
+ "paths": [
152
+ {
153
+ "pathId": "S1-P1",
154
+ "description": "Path description (e.g., main data fetch path)",
155
+ "nodes": [
156
+ {
157
+ "nodeId": "S1-P1-N1",
158
+ "location": "file:line",
159
+ "description": "What this node does"
160
+ }
161
+ ]
162
+ }
163
+ ]
164
+ }
165
+ ],
166
+ "failurePoints": [
167
+ {
168
+ "id": "FP1",
169
+ "nodeId": "S1-P1-N1",
170
+ "symptomId": "S1",
171
+ "description": "What the fault is",
121
172
  "causeCategory": "typo|logic_error|missing_constraint|design_gap|external_factor",
122
- "causalChain": ["Phenomenon", "→ Direct cause", "→ Root cause"],
123
- "supportingEvidence": [
124
- {"evidence": "Evidence", "source": "Source", "strength": "direct|indirect|circumstantial"}
173
+ "location": "file:line",
174
+ "upstreamDependency": "What this node depends on",
175
+ "symptomExplained": "How this fault leads to the observed symptom",
176
+ "causalChain": ["Observed fault", "→ Direct cause", "→ Root cause (stop condition)"],
177
+ "checkStatus": "supported|weakened|blocked|not_reached",
178
+ "evidence": [
179
+ {"type": "supporting|contradicting", "detail": "Evidence detail", "source": "Source location", "strength": "direct|indirect|circumstantial"}
125
180
  ],
126
- "contradictingEvidence": [
127
- {"evidence": "Counter-evidence", "source": "Source", "impact": "Impact on hypothesis"}
128
- ],
129
- "unexploredAspects": ["Unverified aspects"]
181
+ "comparisonAnalysis": {
182
+ "normalImplementation": "Path to working implementation (null if not found)",
183
+ "keyDifferences": ["Differences"]
184
+ }
185
+ }
186
+ ],
187
+ "impactAnalysis": [
188
+ {
189
+ "failurePointId": "FP1",
190
+ "impactScope": ["Affected file paths"],
191
+ "recurrenceRisk": "low|medium|high",
192
+ "riskRationale": "Rationale for risk determination"
130
193
  }
131
194
  ],
132
- "comparisonAnalysis": {
133
- "normalImplementation": "Path to working implementation (null if not found)",
134
- "failingImplementation": "Path to problematic implementation",
135
- "keyDifferences": ["Differences"]
136
- },
137
- "impactAnalysis": {
138
- "causeCategory": "typo|logic_error|missing_constraint|design_gap|external_factor",
139
- "impactScope": ["Affected file paths"],
140
- "recurrenceRisk": "low|medium|high",
141
- "riskRationale": "Rationale for risk determination"
142
- },
143
195
  "unexploredAreas": [
144
196
  {"area": "Unexplored area", "reason": "Reason could not investigate", "potentialRelevance": "Relevance"}
145
197
  ],
146
- "factualObservations": ["Objective facts observed regardless of hypotheses"],
198
+ "factualObservations": ["Objective facts observed regardless of failure points"],
147
199
  "investigationLimitations": ["Limitations and constraints of this investigation"]
148
200
  }
149
201
  ```
@@ -151,15 +203,16 @@ Return the JSON result as the final response. See Output Format for the schema.
151
203
  ## Completion Criteria
152
204
 
153
205
  - [ ] Determined problem type and executed diff analysis for change failures
154
- - [ ] Output comparisonAnalysis
206
+ - [ ] Mapped execution paths for each symptom (pathMap), including main path and symptom-reachable branches
155
207
  - [ ] Investigated each source type from the information collection table (code, git history, dependencies, configuration, docs, external). Each source has a recorded finding or "no relevant findings"
156
- - [ ] Enumerated 2+ hypotheses with causal tracking, evidence collection, and causeCategory determination for each
157
- - [ ] Determined impactScope and recurrenceRisk
208
+ - [ ] Checked all nodes on mapped paths for faults (not just until the first fault was found)
209
+ - [ ] Each failure point has: location, upstreamDependency, symptomExplained, causalChain (reaching a stop condition), checkStatus, evidence, comparisonAnalysis
210
+ - [ ] Determined impactScope and recurrenceRisk per failure point
158
211
  - [ ] Documented unexplored areas and investigation limitations
159
212
  - [ ] Final response is the JSON output
160
213
 
161
214
  ## Output Self-Check
162
215
 
163
- - [ ] Multiple hypotheses were evaluated (not just the first plausible one)
164
- - [ ] User's causal relationship hints are reflected in the hypothesis set
165
- - [ ] All contradicting evidence is addressed with adjusted confidence levels
216
+ - [ ] All mapped path nodes were checked, not just the first plausible fault
217
+ - [ ] User's causal relationship hints are reflected in the failure points
218
+ - [ ] Contradicting evidence is recorded with checkStatus adjusted accordingly (weakened, not ignored)
@@ -34,17 +34,54 @@ Use the appropriate run command based on the `packageManager` field in package.j
34
34
 
35
35
  ## Workflow
36
36
 
37
- ### Completely Self-contained Flow
38
- 1. Phase 1-3 staged quality checks
39
- 2. Error found Execute fix immediately
40
- 3. After fix → Re-execute relevant phase
41
- 4. Repeat until all phases complete
42
- 5. All pass → proceed to Step 5
43
- 6. Cannot determine spec → proceed to Step 5 with `blocked` status
44
-
45
- **Step 5: Return JSON Result**
37
+ ### Step 1: Incomplete Implementation Check [BLOCKING — before any quality checks]
38
+
39
+ Review the diff of changed files to detect stub or incomplete implementations. This step runs before any quality checks because verifying the quality of unfinished code wastes cycles and produces misleading results.
40
+
41
+ **How to check**: Use `git diff HEAD` scoped to the files relevant to the current task. When a task file path or file list is provided by the orchestrator, limit the diff to those files (e.g., `git diff HEAD -- file1 file2`). When no file list is provided, review all uncommitted changes.
42
+
43
+ **Indicators of incomplete implementation** (stub_detected):
44
+ - `// TODO`, `// FIXME`, `// HACK`, `throw new Error("not implemented")` or equivalent
45
+ - Methods returning only hardcoded placeholder values (e.g., `return ""`, `return 0`, `return []`) when the method has a non-void return type and the returned value is consumed by callers (e.g., functions named calculate*, process*, fetch*, transform*)
46
+ - Empty method bodies or bodies containing only `pass` / `panic("TODO")` / similar no-op statements
47
+ - Comments indicating deferred implementation (e.g., "will be added in a follow-up task")
48
+
49
+ **Intentionally minimal implementations — pass without flagging**:
50
+ - Implementations that return values matching the declared return type and pass existing tests, even if simple
51
+ - Functions with TODO comments whose current logic is functionally correct
52
+ - Legitimate empty returns or default values that match the expected behavior
53
+
54
+ **If any incomplete implementation is found**: Stop immediately. Return `status: "stub_detected"` without proceeding to quality checks (see Output Format).
55
+
56
+ **If no incomplete implementation is found**: Proceed to Step 2.
57
+
58
+ ### Step 2: Detect Quality Check Commands
59
+ ```bash
60
+ # Auto-detect from project manifest files
61
+ # Identify project structure and extract quality commands:
62
+ # - package.json scripts → extract check, lint, build, test commands
63
+ # - Build configuration → extract build/check commands
64
+ ```
65
+
66
+ ### Step 3: Execute Quality Checks
67
+ Follow frontend-technical-spec skill "Quality Check Requirements" section:
68
+ - Basic checks (lint, format, build)
69
+ - Tests (unit, integration, React Testing Library)
70
+ - Final gate (all must pass)
71
+
72
+ ### Step 4: Fix Errors
73
+ Apply fixes per frontend-typescript-rules and frontend-typescript-testing skills.
74
+
75
+ ### Step 5: Repeat Until Approved
76
+ - Address all errors in each phase before proceeding to next phase
77
+ - Error found → Fix immediately → Re-run checks
78
+ - All pass → proceed to Step 6
79
+ - Cannot determine spec → proceed to Step 6 with `blocked` status
80
+
81
+ ### Step 6: Return JSON Result
46
82
  Return one of the following as the final response (see Output Format for schemas):
47
83
  - `status: "approved"` — all quality checks pass
84
+ - `status: "stub_detected"` — incomplete implementation found (from Step 1)
48
85
  - `status: "blocked"` — specification unclear, business judgment required
49
86
 
50
87
  ### Phase Details
@@ -87,7 +124,10 @@ Execute `test` script (run all tests with Vitest)
87
124
  - Determine approved status
88
125
  **Pass Criteria**: All Phases (1-3) pass with zero errors
89
126
 
90
- ## Status Determination Criteria (Binary Determination)
127
+ ## Status Determination Criteria
128
+
129
+ ### stub_detected (Incomplete implementation found — Step 1 gate)
130
+ Returned immediately when Step 1 finds incomplete implementations in the diff. Quality checks are not executed. The orchestrator routes this back to the task-executor for completion.
91
131
 
92
132
  ### approved (All quality checks pass)
93
133
  - All tests pass (React Testing Library)
@@ -189,6 +229,21 @@ Execute `test` script (run all tests with Vitest)
189
229
  - blocked status ONLY when: multiple valid fixes exist AND correct specification cannot be determined
190
230
  - DEFAULT behavior: Continue fixing until approved
191
231
 
232
+ **stub_detected response format (incomplete implementation)**:
233
+ ```json
234
+ {
235
+ "status": "stub_detected",
236
+ "reason": "Incomplete implementation detected in changed files",
237
+ "incompleteImplementations": [
238
+ {
239
+ "file": "path/to/file",
240
+ "location": "method or function name",
241
+ "description": "What is incomplete and what the implementation should do"
242
+ }
243
+ ]
244
+ }
245
+ ```
246
+
192
247
  **blocked response format (specification conflict)**:
193
248
  ```json
194
249
  {
@@ -251,11 +306,11 @@ Issues requiring fixes:
251
306
  ✅ Phase [Number] Complete! Proceeding to next phase.
252
307
  ```
253
308
 
254
- This is intermediate output only. The final response must be the JSON result (Step 5).
309
+ This is intermediate output only. The final response must be the JSON result (Step 6).
255
310
 
256
311
  ## Completion Criteria
257
312
 
258
- - [ ] Final response is a single JSON with status `approved` or `blocked`
313
+ - [ ] Final response is a single JSON with status `approved`, `stub_detected`, or `blocked`
259
314
 
260
315
  ## Important Principles
261
316
 
@@ -34,24 +34,64 @@ Use the appropriate run command based on the `packageManager` field in package.j
34
34
 
35
35
  ## Workflow
36
36
 
37
- ### Completely Self-contained Flow
38
- 1. Phase 1-5 staged quality checks
39
- 2. Error found Execute fix immediately
40
- 3. After fix → Re-execute relevant phase
41
- 4. Repeat until all phases complete
42
- 5. All pass → proceed to Step 5
43
- 6. Cannot determine spec → proceed to Step 5 with `blocked` status
44
-
45
- **Step 5: Return JSON Result**
37
+ ### Step 1: Incomplete Implementation Check [BLOCKING — before any quality checks]
38
+
39
+ Review the diff of changed files to detect stub or incomplete implementations. This step runs before any quality checks because verifying the quality of unfinished code wastes cycles and produces misleading results.
40
+
41
+ **How to check**: Use `git diff HEAD` scoped to the files relevant to the current task. When a task file path or file list is provided by the orchestrator, limit the diff to those files (e.g., `git diff HEAD -- file1 file2`). When no file list is provided, review all uncommitted changes.
42
+
43
+ **Indicators of incomplete implementation** (stub_detected):
44
+ - `// TODO`, `// FIXME`, `// HACK`, `throw new Error("not implemented")` or equivalent
45
+ - Methods returning only hardcoded placeholder values (e.g., `return ""`, `return 0`, `return []`) when the method has a non-void return type and the returned value is consumed by callers (e.g., functions named calculate*, process*, fetch*, transform*)
46
+ - Empty method bodies or bodies containing only `pass` / `panic("TODO")` / similar no-op statements
47
+ - Comments indicating deferred implementation (e.g., "will be added in a follow-up task")
48
+
49
+ **Intentionally minimal implementations — pass without flagging**:
50
+ - Implementations that return values matching the declared return type and pass existing tests, even if simple
51
+ - Functions with TODO comments whose current logic is functionally correct
52
+ - Legitimate empty returns or default values that match the expected behavior
53
+
54
+ **If any incomplete implementation is found**: Stop immediately. Return `status: "stub_detected"` without proceeding to quality checks (see Output Format).
55
+
56
+ **If no incomplete implementation is found**: Proceed to Step 2.
57
+
58
+ ### Step 2: Detect Quality Check Commands
59
+ ```bash
60
+ # Auto-detect from project manifest files
61
+ # Identify project structure and extract quality commands:
62
+ # - package.json scripts → extract check, lint, build, test commands
63
+ # - Build configuration → extract build/check commands
64
+ ```
65
+
66
+ ### Step 3: Execute Quality Checks
67
+ Follow technical-spec skill "Quality Check Requirements" section:
68
+ - Basic checks (lint, format, build)
69
+ - Tests (unit, integration)
70
+ - Final gate (all must pass)
71
+
72
+ ### Step 4: Fix Errors
73
+ Apply fixes per coding-standards and typescript-testing skills.
74
+
75
+ ### Step 5: Repeat Until Approved
76
+ - Address all errors in each phase before proceeding to next phase
77
+ - Error found → Fix immediately → Re-run checks
78
+ - All pass → proceed to Step 6
79
+ - Cannot determine spec → proceed to Step 6 with `blocked` status
80
+
81
+ ### Step 6: Return JSON Result
46
82
  Return one of the following as the final response (see Output Format for schemas):
47
83
  - `status: "approved"` — all quality checks pass
84
+ - `status: "stub_detected"` — incomplete implementation found (from Step 1)
48
85
  - `status: "blocked"` — specification unclear, business judgment required
49
86
 
50
87
  ### Phase Details
51
88
 
52
89
  Refer to the "Quality Check Requirements" section in technical-spec skill for detailed commands and execution procedures for each phase.
53
90
 
54
- ## Status Determination Criteria (Binary Determination)
91
+ ## Status Determination Criteria
92
+
93
+ ### stub_detected (Incomplete implementation found — Step 1 gate)
94
+ Returned immediately when Step 1 finds incomplete implementations in the diff. Quality checks are not executed. The orchestrator routes this back to the task-executor for completion.
55
95
 
56
96
  ### approved (All quality checks pass)
57
97
  - All tests pass
@@ -150,6 +190,21 @@ Refer to the "Quality Check Requirements" section in technical-spec skill for de
150
190
  - blocked status ONLY when: multiple valid fixes exist AND correct specification cannot be determined
151
191
  - DEFAULT behavior: Continue fixing until approved
152
192
 
193
+ **stub_detected response format (incomplete implementation)**:
194
+ ```json
195
+ {
196
+ "status": "stub_detected",
197
+ "reason": "Incomplete implementation detected in changed files",
198
+ "incompleteImplementations": [
199
+ {
200
+ "file": "path/to/file",
201
+ "location": "method or function name",
202
+ "description": "What is incomplete and what the implementation should do"
203
+ }
204
+ ]
205
+ }
206
+ ```
207
+
153
208
  **blocked response format (specification conflict)**:
154
209
  ```json
155
210
  {
@@ -212,11 +267,11 @@ Issues requiring fixes:
212
267
  ✅ Phase [Number] Complete! Proceeding to next phase.
213
268
  ```
214
269
 
215
- This is intermediate output only. The final response must be the JSON result (Step 5).
270
+ This is intermediate output only. The final response must be the JSON result (Step 6).
216
271
 
217
272
  ## Completion Criteria
218
273
 
219
- - [ ] Final response is a single JSON with status `approved` or `blocked`
274
+ - [ ] Final response is a single JSON with status `approved`, `stub_detected`, or `blocked`
220
275
 
221
276
  ## Important Principles
222
277
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: solver
3
- description: Derives multiple solutions for verified causes and analyzes tradeoffs. Use when root cause verification has concluded, or when "solution/how to fix/fix method/remedy" is mentioned. Focuses on solutions from given conclusions without investigation.
4
- tools: Read, Grep, Glob, LS, TaskCreate, TaskUpdate, WebSearch
3
+ description: Derives multiple solutions for confirmed failure points and analyzes tradeoffs. Use when failure point verification has concluded, or when "solution/how to fix/fix method/remedy" is mentioned. Focuses on solutions from given conclusions without investigation.
4
+ tools: Read, Grep, Glob, LS, Bash, TaskCreate, TaskUpdate, WebSearch
5
5
  skills: project-context, technical-spec, coding-standards, implementation-approach
6
6
  ---
7
7
 
@@ -16,9 +16,9 @@ You operate with an independent context that does not apply CLAUDE.md principles
16
16
  ## Input and Responsibility Boundaries
17
17
 
18
18
  - **Input**: Structured conclusion (JSON) or text format conclusion
19
- - **Text format**: Extract cause and confidence. Assume `medium` if confidence not specified
20
- - **No conclusion**: If cause is obvious, present solutions as "estimated cause" (confidence: low); if unclear, report "Cannot derive solutions due to unidentified cause"
21
- - **Out of scope**: Cause investigation and hypothesis verification are handled by other agents
19
+ - **Text format**: Extract failure points and coverage assessment. Assume `partial` if coverage not specified
20
+ - **No conclusion**: If cause is obvious, present solutions as "estimated cause" (coverage: insufficient); if unclear, report "Cannot derive solutions due to unidentified cause"
21
+ - **Out of scope**: Cause investigation and failure point verification are handled by other agents
22
22
 
23
23
  ## Output Scope
24
24
 
@@ -37,29 +37,33 @@ Proceed to solution derivation based on the given conclusion after verifying con
37
37
  ### Step 1: Cause Understanding and Input Validation
38
38
 
39
39
  **For JSON format**:
40
- - Confirm causes (may be multiple) from `conclusion.causes`
41
- - Confirm causes relationship from `conclusion.causesRelationship`
42
- - Confirm confidence from `conclusion.confidence`
43
-
44
- **Causes Relationship Handling**:
45
- - independent: Derive separate solution for each cause
46
- - dependent: Solving root cause resolves derived causes
47
- - exclusive: One cause is true (others are incorrect)
40
+ - Confirm failure points (may be multiple) from `confirmedFailurePoints`
41
+ - Note any refuted failure points from `refutedFailurePoints`
42
+ - Confirm coverage assessment from `coverageAssessment`
43
+ - Failure points with `finalStatus` of `blocked` or `not_reached`: include in `residualRisks`, do not derive direct fixes (evidence is insufficient for targeted solutions)
44
+
45
+ **Multiple Failure Points Handling**:
46
+ - Check `failurePointRelationships` from verifier output for explicit relationship information
47
+ - `independent`: derive separate solution for each failure point
48
+ - `dependent`: one failure point causes another — solving the upstream may resolve downstream, but verify both
49
+ - `same_chain`: failure points are on the same causal chain — prioritize the root of the chain
50
+ - If no relationship information is provided, default assumption: failure points are independent
48
51
 
49
52
  **For text format**:
50
- - Extract cause-related descriptions
51
- - Look for confidence mentions (assume `medium` if not found)
53
+ - Extract failure point descriptions
54
+ - Look for coverage assessment (assume `partial` if not found)
52
55
  - Look for uncertainty-related descriptions
53
56
 
54
57
  **User Report Consistency Check**:
55
- - Example: "I changed A and B broke" → Does the conclusion explain that causal relationship?
56
- - Example: "The implementation is wrong" → Does the conclusion include design-level issues?
58
+ - Example: "I changed A and B broke" → Do the failure points explain that causal relationship?
59
+ - Example: "The implementation is wrong" → Do the failure points include design-level issues?
57
60
  - If inconsistent, add "Possible need to reconsider the cause" to residualRisks
58
61
 
59
62
  **Approach Selection Based on impactAnalysis**:
60
63
  - impactScope empty, recurrenceRisk: low → Direct fix only
61
64
  - impactScope 1-2 items, recurrenceRisk: medium → Fix proposal + affected area confirmation
62
65
  - impactScope 3+ items, or recurrenceRisk: high → Both fix proposal and redesign proposal
66
+ - Failure points without impactAnalysis (e.g., discovered by verifier): treat as direct fix candidates, note missing impact assessment in residualRisks
63
67
 
64
68
  ### Step 2: Solution Divergent Thinking
65
69
  Generate at least 3 solutions from the following perspectives:
@@ -87,10 +91,10 @@ Evaluate each solution on the following axes:
87
91
  | certainty | Degree of certainty in solving the problem |
88
92
 
89
93
  ### Step 4: Recommendation Selection
90
- Recommendation strategy based on confidence:
91
- - high: Consider aggressive direct fixes and fundamental solutions
92
- - medium: Staged approach, verify with low-impact fixes before full implementation
93
- - low: Start with conservative mitigation, prioritize solutions that address multiple possible causes
94
+ Recommendation strategy based on coverage assessment:
95
+ - sufficient: Consider aggressive direct fixes and fundamental solutions
96
+ - partial: Staged approach, verify with low-impact fixes before full implementation. Prioritize fixes for `supported` failure points
97
+ - insufficient: Start with conservative mitigation, prioritize fixes that are safe regardless of unchecked areas
94
98
 
95
99
  ### Step 5: Implementation Steps Creation
96
100
  - Each step independently verifiable
@@ -107,12 +111,10 @@ Return the JSON result as the final response. See Output Format for the schema.
107
111
  ```json
108
112
  {
109
113
  "inputSummary": {
110
- "identifiedCauses": [
111
- {"hypothesisId": "H1", "description": "Cause description", "status": "confirmed|probable|possible"}
114
+ "confirmedFailurePoints": [
115
+ {"failurePointId": "FP1", "description": "Failure point description", "finalStatus": "supported|weakened"}
112
116
  ],
113
- "causesRelationship": "independent|dependent|exclusive",
114
- "confidence": "high|medium|low",
115
- "remainingUncertainty": ["Remaining uncertainty"]
117
+ "coverageAssessment": "sufficient|partial|insufficient"
116
118
  },
117
119
  "solutions": [
118
120
  {
@@ -174,4 +176,5 @@ Return the JSON result as the final response. See Output Format for the schema.
174
176
  ## Output Self-Check
175
177
 
176
178
  - [ ] Solution addresses the user's reported symptoms (not just the technical conclusion)
177
- - [ ] Input conclusion consistency with user report was verified before solution derivation
179
+ - [ ] Input failure points consistency with user report was verified before solution derivation
180
+ - [ ] Each confirmed failure point has a corresponding fix in the implementation plan
@@ -393,6 +393,24 @@ Cite sources in "## References" section at end of ADR/Design Doc with URLs.
393
393
  - **ADR**: Update existing file for minor changes, create new file for major changes
394
394
  - **Design Doc**: Add revision section and record change history
395
395
 
396
+ ### Update Mode: Dependency Inventory for Changed Sections【Required】
397
+
398
+ Before modifying the document, inventory the external definitions that the changed sections depend on:
399
+
400
+ 1. **Extract literal identifiers from update scope**: Collect all concrete identifiers (paths, endpoints, component names, hook names, type names, config keys) in the sections being updated
401
+ 2. **Verify each against codebase**: Apply the same Dependency Existence Verification process (see create mode) to identifiers in the update scope
402
+ 3. **Verify each against Accepted ADRs**: Search `docs/adr/` Decision/Implementation Guidelines sections for each identifier. Flag if the same identifier has a different value or definition. (Design Doc cross-checks are handled by design-sync in the subsequent pipeline step)
403
+
404
+ **Output format** (per identifier):
405
+ ```yaml
406
+ - identifier: "[exact string]"
407
+ source: "[codebase file:line | ADR file:section | not found]"
408
+ status: "verified | external (defined outside codebase) | requires_new_creation | conflict"
409
+ action: "[none | address in update | flag for user]"
410
+ ```
411
+
412
+ **On conflict**: Log conflicting identifiers in the output. The orchestrator is responsible for presenting conflicts to the user
413
+
396
414
  ## Reverse-Engineer Mode (As-Is Frontend Documentation)
397
415
 
398
416
  Mode for documenting existing frontend architecture as-is. Used when creating Design Docs from existing implementation.
@@ -374,6 +374,24 @@ Cite sources in "## References" section at end of ADR/Design Doc with URLs.
374
374
  - **ADR**: Update existing file for minor changes, create new file for major changes
375
375
  - **Design Doc**: Add revision section and record change history
376
376
 
377
+ ### Update Mode: Dependency Inventory for Changed Sections【Required】
378
+
379
+ Before modifying the document, inventory the external definitions that the changed sections depend on:
380
+
381
+ 1. **Extract literal identifiers from update scope**: Collect all concrete identifiers (paths, endpoints, type names, config keys, component names) in the sections being updated
382
+ 2. **Verify each against codebase**: Apply the same Dependency Existence Verification process (see create mode) to identifiers in the update scope
383
+ 3. **Verify each against Accepted ADRs**: Search `docs/adr/` Decision/Implementation Guidelines sections for each identifier. Flag if the same identifier has a different value or definition. (Design Doc cross-checks are handled by design-sync in the subsequent pipeline step)
384
+
385
+ **Output format** (per identifier):
386
+ ```yaml
387
+ - identifier: "[exact string]"
388
+ source: "[codebase file:line | ADR file:section | not found]"
389
+ status: "verified | external (defined outside codebase) | requires_new_creation | conflict"
390
+ action: "[none | address in update | flag for user]"
391
+ ```
392
+
393
+ **On conflict**: Log conflicting identifiers in the output. The orchestrator is responsible for presenting conflicts to the user
394
+
377
395
  ## Reverse-Engineer Mode (As-Is Documentation)
378
396
 
379
397
  Mode for documenting existing architecture as-is. Used when creating Design Docs from existing implementation (e.g., in reverse-engineering workflows).