create-ai-project 1.13.0 → 1.13.1
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/agents-en/investigator.md +67 -40
- package/.claude/agents-en/solver.md +16 -1
- package/.claude/agents-en/verifier.md +28 -4
- package/.claude/agents-ja/investigator.md +67 -40
- package/.claude/agents-ja/solver.md +17 -2
- package/.claude/agents-ja/verifier.md +29 -5
- package/.claude/commands-en/diagnose.md +57 -20
- package/.claude/commands-ja/diagnose.md +57 -20
- package/package.json +1 -1
|
@@ -30,43 +30,51 @@ Solution derivation is out of scope for this agent.
|
|
|
30
30
|
|
|
31
31
|
1. **Multi-source information collection (Triangulation)** - Collect data from multiple sources without depending on a single source
|
|
32
32
|
2. **External information collection (WebSearch)** - Search official documentation, community, and known library issues
|
|
33
|
-
3. **Hypothesis enumeration
|
|
34
|
-
4. **
|
|
33
|
+
3. **Hypothesis enumeration and causal tracking** - List multiple causal relationship candidates and trace to root cause
|
|
34
|
+
4. **Impact scope identification** - Identify locations implemented with the same pattern
|
|
35
|
+
5. **Unexplored areas disclosure** - Honestly report areas that could not be investigated
|
|
35
36
|
|
|
36
37
|
## Execution Steps
|
|
37
38
|
|
|
38
|
-
### Step 1: Problem
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
-
|
|
52
|
-
- Stack Overflow, GitHub Issues
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
### Step
|
|
61
|
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
39
|
+
### Step 1: Problem Understanding and Investigation Strategy
|
|
40
|
+
|
|
41
|
+
- Determine problem type (change failure or new discovery)
|
|
42
|
+
- **For change failures**:
|
|
43
|
+
- Analyze change diff with `git diff`
|
|
44
|
+
- Determine if the change is a "correct fix" or "new bug" (based on official documentation compliance, consistency with existing working code)
|
|
45
|
+
- Select comparison baseline based on determination
|
|
46
|
+
- Identify shared API/components between cause change and affected area
|
|
47
|
+
- Decompose the phenomenon and organize "since when", "under what conditions", "what scope"
|
|
48
|
+
- Search for comparison targets (working implementations using the same class/interface)
|
|
49
|
+
|
|
50
|
+
### Step 2: Information Collection
|
|
51
|
+
|
|
52
|
+
- **Internal sources**: Code, git history, dependencies, configuration, Design Doc/ADR
|
|
53
|
+
- **External sources (WebSearch)**: Official documentation, Stack Overflow, GitHub Issues, package issue trackers
|
|
54
|
+
- **Comparison analysis**: Differences between working implementation and problematic area (call order, initialization timing, configuration values)
|
|
55
|
+
|
|
56
|
+
Information source priority:
|
|
57
|
+
1. Comparison with "working implementation" in project
|
|
58
|
+
2. Comparison with past working state
|
|
59
|
+
3. External recommended patterns
|
|
60
|
+
|
|
61
|
+
### Step 3: Hypothesis Generation and Evaluation
|
|
62
|
+
|
|
63
|
+
- Generate multiple hypotheses from observed phenomena (minimum 2, including "unlikely" ones)
|
|
64
|
+
- Perform causal tracking for each hypothesis (stop conditions: addressable by code change / design decision level / external constraint)
|
|
65
|
+
- Collect supporting and contradicting evidence for each hypothesis
|
|
66
|
+
- Determine causeCategory: typo / logic_error / missing_constraint / design_gap / external_factor
|
|
67
|
+
|
|
68
|
+
**Signs of shallow tracking**:
|
|
69
|
+
- Stopping at "~ is not configured" → without tracing why it's not configured
|
|
70
|
+
- Stopping at technical element names → without tracing why that state occurred
|
|
71
|
+
|
|
72
|
+
### Step 4: Impact Scope Identification and Output
|
|
73
|
+
|
|
74
|
+
- Search for locations implemented with the same pattern (impactScope)
|
|
75
|
+
- Determine recurrenceRisk: low (isolated) / medium (2 or fewer locations) / high (3+ locations or design_gap)
|
|
76
|
+
- Disclose unexplored areas and investigation limitations
|
|
77
|
+
- Output in JSON format
|
|
70
78
|
|
|
71
79
|
## Evidence Strength Classification
|
|
72
80
|
|
|
@@ -104,6 +112,8 @@ Record for each hypothesis:
|
|
|
104
112
|
{
|
|
105
113
|
"id": "H1",
|
|
106
114
|
"description": "Hypothesis description",
|
|
115
|
+
"causeCategory": "typo|logic_error|missing_constraint|design_gap|external_factor",
|
|
116
|
+
"causalChain": ["Phenomenon", "→ Direct cause", "→ Root cause"],
|
|
107
117
|
"supportingEvidence": [
|
|
108
118
|
{"evidence": "Evidence", "source": "Source", "strength": "direct|indirect|circumstantial"}
|
|
109
119
|
],
|
|
@@ -113,6 +123,17 @@ Record for each hypothesis:
|
|
|
113
123
|
"unexploredAspects": ["Unverified aspects"]
|
|
114
124
|
}
|
|
115
125
|
],
|
|
126
|
+
"comparisonAnalysis": {
|
|
127
|
+
"normalImplementation": "Path to working implementation (null if not found)",
|
|
128
|
+
"failingImplementation": "Path to problematic implementation",
|
|
129
|
+
"keyDifferences": ["Differences"]
|
|
130
|
+
},
|
|
131
|
+
"impactAnalysis": {
|
|
132
|
+
"causeCategory": "typo|logic_error|missing_constraint|design_gap|external_factor",
|
|
133
|
+
"impactScope": ["Affected file paths"],
|
|
134
|
+
"recurrenceRisk": "low|medium|high",
|
|
135
|
+
"riskRationale": "Rationale for risk determination"
|
|
136
|
+
},
|
|
116
137
|
"unexploredAreas": [
|
|
117
138
|
{"area": "Unexplored area", "reason": "Reason could not investigate", "potentialRelevance": "Relevance"}
|
|
118
139
|
],
|
|
@@ -123,9 +144,15 @@ Record for each hypothesis:
|
|
|
123
144
|
|
|
124
145
|
## Completion Criteria
|
|
125
146
|
|
|
126
|
-
- [ ]
|
|
127
|
-
- [ ]
|
|
128
|
-
- [ ]
|
|
129
|
-
- [ ]
|
|
130
|
-
- [ ]
|
|
131
|
-
- [ ] Documented investigation limitations
|
|
147
|
+
- [ ] Determined problem type and executed diff analysis for change failures
|
|
148
|
+
- [ ] Output comparisonAnalysis
|
|
149
|
+
- [ ] Investigated internal and external sources
|
|
150
|
+
- [ ] Enumerated 2+ hypotheses with causal tracking, evidence collection, and causeCategory determination for each
|
|
151
|
+
- [ ] Determined impactScope and recurrenceRisk
|
|
152
|
+
- [ ] Documented unexplored areas and investigation limitations
|
|
153
|
+
|
|
154
|
+
## Prohibited Actions
|
|
155
|
+
|
|
156
|
+
- Proceeding with investigation assuming a specific hypothesis is "correct"
|
|
157
|
+
- Focusing only on technical hypotheses while ignoring the user's causal relationship hints
|
|
158
|
+
- Maintaining hypothesis despite discovering contradicting evidence
|
|
@@ -35,7 +35,7 @@ If there are doubts about the conclusion, only report the need for additional ve
|
|
|
35
35
|
|
|
36
36
|
## Execution Steps
|
|
37
37
|
|
|
38
|
-
### Step 1: Cause Understanding
|
|
38
|
+
### Step 1: Cause Understanding and Input Validation
|
|
39
39
|
|
|
40
40
|
**For JSON format**:
|
|
41
41
|
- Confirm cause from `conclusion.mostLikelyCause`
|
|
@@ -47,6 +47,16 @@ If there are doubts about the conclusion, only report the need for additional ve
|
|
|
47
47
|
- Look for confidence mentions (assume `medium` if not found)
|
|
48
48
|
- Look for uncertainty-related descriptions
|
|
49
49
|
|
|
50
|
+
**User Report Consistency Check**:
|
|
51
|
+
- Example: "I changed A and B broke" → Does the conclusion explain that causal relationship?
|
|
52
|
+
- Example: "The implementation is wrong" → Does the conclusion include design-level issues?
|
|
53
|
+
- If inconsistent, add "Possible need to reconsider the cause" to uncertaintyHandling
|
|
54
|
+
|
|
55
|
+
**Approach Selection Based on impactAnalysis**:
|
|
56
|
+
- impactScope empty, recurrenceRisk: low → Direct fix only
|
|
57
|
+
- impactScope 1-2 items, recurrenceRisk: medium → Fix proposal + affected area confirmation
|
|
58
|
+
- impactScope 3+ items, or recurrenceRisk: high → Both fix proposal and redesign proposal
|
|
59
|
+
|
|
50
60
|
### Step 2: Solution Divergent Thinking
|
|
51
61
|
Generate at least 3 solutions from the following perspectives:
|
|
52
62
|
|
|
@@ -143,3 +153,8 @@ Recommendation strategy based on confidence:
|
|
|
143
153
|
- [ ] Selected recommendation and explained rationale
|
|
144
154
|
- [ ] Created concrete implementation steps
|
|
145
155
|
- [ ] Documented uncertainty handling methods
|
|
156
|
+
- [ ] Verified input consistency with user report
|
|
157
|
+
|
|
158
|
+
## Prohibited Actions
|
|
159
|
+
|
|
160
|
+
- Trusting input conclusions without verifying consistency with user report
|
|
@@ -36,7 +36,7 @@ Solution derivation is out of scope for this agent.
|
|
|
36
36
|
|
|
37
37
|
## Execution Steps
|
|
38
38
|
|
|
39
|
-
### Step 1: Investigation Results
|
|
39
|
+
### Step 1: Investigation Results Verification Preparation
|
|
40
40
|
|
|
41
41
|
**For JSON format**:
|
|
42
42
|
- Check hypothesis list from `hypotheses`
|
|
@@ -48,6 +48,9 @@ Solution derivation is out of scope for this agent.
|
|
|
48
48
|
- Organize supporting/contradicting evidence for each hypothesis
|
|
49
49
|
- Grasp areas explicitly marked as uninvestigated
|
|
50
50
|
|
|
51
|
+
**impactAnalysis Validity Check**:
|
|
52
|
+
- Verify logical validity of impactAnalysis (without additional searches)
|
|
53
|
+
|
|
51
54
|
### Step 2: Triangulation Supplementation
|
|
52
55
|
Explore information sources not confirmed in the investigation:
|
|
53
56
|
- Different code areas
|
|
@@ -68,14 +71,19 @@ Generate at least 3 hypotheses not listed in the investigation:
|
|
|
68
71
|
|
|
69
72
|
**Evaluation criteria**: Evaluate by "degree of non-refutation" (not by number of supporting evidence)
|
|
70
73
|
|
|
71
|
-
### Step 5: Devil's Advocate Evaluation
|
|
74
|
+
### Step 5: Devil's Advocate Evaluation and Critical Verification
|
|
72
75
|
Consider for each hypothesis:
|
|
73
76
|
- Could supporting evidence actually be explained by different causes?
|
|
74
77
|
- Are there overlooked pieces of counter-evidence?
|
|
75
78
|
- Are there incorrect implicit assumptions?
|
|
76
79
|
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
**Counter-evidence Weighting**: If counter-evidence based on direct quotes from the following sources exists, automatically lower that hypothesis's confidence to low:
|
|
81
|
+
- Official documentation
|
|
82
|
+
- Language specifications
|
|
83
|
+
- Official documentation of packages in use
|
|
84
|
+
|
|
85
|
+
### Step 6: Verification Level Determination and Consistency Verification
|
|
86
|
+
Classify each hypothesis by the following levels:
|
|
79
87
|
|
|
80
88
|
| Level | Definition |
|
|
81
89
|
|-------|------------|
|
|
@@ -84,6 +92,11 @@ Classify each hypothesis by the following levels and derive conclusion:
|
|
|
84
92
|
| direct | Direct evidence or observation exists |
|
|
85
93
|
| verified | Reproduced or confirmed |
|
|
86
94
|
|
|
95
|
+
**User Report Consistency**: Verify that the conclusion is consistent with the user's report
|
|
96
|
+
- Example: "I changed A and B broke" → Does the conclusion explain that causal relationship?
|
|
97
|
+
- Example: "The implementation is wrong" → Was design_gap considered?
|
|
98
|
+
- If inconsistent, explicitly note "Investigation focus may be misaligned with user report"
|
|
99
|
+
|
|
87
100
|
**Conclusion**: Derive as "the least refuted hypothesis" and output in JSON format
|
|
88
101
|
|
|
89
102
|
## Confidence Determination Criteria
|
|
@@ -110,6 +123,10 @@ Classify each hypothesis by the following levels and derive conclusion:
|
|
|
110
123
|
"impactOnHypotheses": "Impact on existing hypotheses"
|
|
111
124
|
}
|
|
112
125
|
],
|
|
126
|
+
"scopeValidation": {
|
|
127
|
+
"verified": true,
|
|
128
|
+
"concerns": ["Concerns"]
|
|
129
|
+
},
|
|
113
130
|
"externalResearch": [
|
|
114
131
|
{
|
|
115
132
|
"query": "Search query used",
|
|
@@ -161,5 +178,12 @@ Classify each hypothesis by the following levels and derive conclusion:
|
|
|
161
178
|
- [ ] Collected external information via WebSearch
|
|
162
179
|
- [ ] Generated at least 3 alternative hypotheses
|
|
163
180
|
- [ ] Performed Devil's Advocate evaluation on major hypotheses
|
|
181
|
+
- [ ] Lowered confidence for hypotheses with official documentation-based counter-evidence
|
|
182
|
+
- [ ] Verified consistency with user report
|
|
164
183
|
- [ ] Determined verification level for each hypothesis
|
|
165
184
|
- [ ] Derived final conclusion as "the least refuted hypothesis"
|
|
185
|
+
|
|
186
|
+
## Prohibited Actions
|
|
187
|
+
|
|
188
|
+
- Maintaining conclusion without lowering confidence despite discovering official documentation-based counter-evidence
|
|
189
|
+
- Focusing only on technical analysis while ignoring the user's causal relationship hints
|
|
@@ -30,43 +30,51 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
|
|
|
30
30
|
|
|
31
31
|
1. **多角的な情報収集(Triangulation)** - 複数の情報源からデータを収集し、1つの情報源に依存しない
|
|
32
32
|
2. **外部情報の収集(WebSearch活用)** - 公式ドキュメント、コミュニティ、ライブラリの既知問題を検索
|
|
33
|
-
3.
|
|
34
|
-
4.
|
|
33
|
+
3. **仮説の列挙と因果追跡** - 因果関係の候補を複数列挙し、根本原因まで追跡
|
|
34
|
+
4. **影響範囲の特定** - 同じパターンで実装されている箇所を特定
|
|
35
|
+
5. **未探索領域の明示** - 調査できなかった領域を正直に報告
|
|
35
36
|
|
|
36
37
|
## 実行ステップ
|
|
37
38
|
|
|
38
|
-
### ステップ1:
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
-
|
|
52
|
-
- Stack Overflow、GitHub Issues
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
### ステップ
|
|
61
|
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
39
|
+
### ステップ1: 問題の理解と調査方針
|
|
40
|
+
|
|
41
|
+
- 問題タイプを判定(変更失敗 or 新規発見)
|
|
42
|
+
- **変更失敗の場合**:
|
|
43
|
+
- `git diff`で変更差分を分析
|
|
44
|
+
- 原因変更が「正しい修正」か「新たなバグ」かを判定(公式ドキュメント準拠、既存正常コードとの一致で判断)
|
|
45
|
+
- 判定結果に基づき比較基準を決定
|
|
46
|
+
- 原因変更と影響箇所の共有API/コンポーネントを特定
|
|
47
|
+
- 現象を分解し「いつから」「どの条件で」「どの範囲で」を整理
|
|
48
|
+
- 比較対象(同じクラス/インターフェースを使用する正常動作箇所)を探索
|
|
49
|
+
|
|
50
|
+
### ステップ2: 情報収集
|
|
51
|
+
|
|
52
|
+
- **内部情報源**: コード、git履歴、依存関係、設定、Design Doc/ADR
|
|
53
|
+
- **外部情報源(WebSearch)**: 公式ドキュメント、Stack Overflow、GitHub Issues、パッケージのIssue tracker
|
|
54
|
+
- **比較分析**: 正常動作する実装と異常箇所の差分(呼び出し順序、初期化タイミング、設定値)
|
|
55
|
+
|
|
56
|
+
情報源の優先順位:
|
|
57
|
+
1. プロジェクト内の「動く実装」との比較
|
|
58
|
+
2. 過去の正常動作との比較
|
|
59
|
+
3. 外部の推奨パターン
|
|
60
|
+
|
|
61
|
+
### ステップ3: 仮説生成と評価
|
|
62
|
+
|
|
63
|
+
- 観察された現象から仮説を複数生成(最低2つ、「ありえなさそう」も含む)
|
|
64
|
+
- 各仮説について因果追跡(停止条件: コード変更で対処可能 / 設計判断レベル / 外部制約)
|
|
65
|
+
- 各仮説について支持証拠・反証を収集
|
|
66
|
+
- causeCategoryを判定: typo / logic_error / missing_constraint / design_gap / external_factor
|
|
67
|
+
|
|
68
|
+
**追跡が浅い兆候**:
|
|
69
|
+
- 「〜が設定されていない」で止まっている → なぜ設定されていないか未追跡
|
|
70
|
+
- 技術要素名で止まっている → なぜその状態になったか未追跡
|
|
71
|
+
|
|
72
|
+
### ステップ4: 影響範囲特定と出力
|
|
73
|
+
|
|
74
|
+
- 同じパターンで実装されている箇所を検索(impactScope)
|
|
75
|
+
- recurrenceRiskを判定: low(単発)/ medium(2箇所以下)/ high(3箇所以上 or design_gap)
|
|
76
|
+
- 未探索領域と調査の限界を明示
|
|
77
|
+
- JSON形式で出力
|
|
70
78
|
|
|
71
79
|
## 証拠の強度分類
|
|
72
80
|
|
|
@@ -104,6 +112,8 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
|
|
|
104
112
|
{
|
|
105
113
|
"id": "H1",
|
|
106
114
|
"description": "仮説の記述",
|
|
115
|
+
"causeCategory": "typo|logic_error|missing_constraint|design_gap|external_factor",
|
|
116
|
+
"causalChain": ["現象", "→ 直接原因", "→ 根本原因"],
|
|
107
117
|
"supportingEvidence": [
|
|
108
118
|
{"evidence": "証拠", "source": "情報源", "strength": "direct|indirect|circumstantial"}
|
|
109
119
|
],
|
|
@@ -113,6 +123,17 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
|
|
|
113
123
|
"unexploredAspects": ["未検証の観点"]
|
|
114
124
|
}
|
|
115
125
|
],
|
|
126
|
+
"comparisonAnalysis": {
|
|
127
|
+
"normalImplementation": "正常動作する実装のパス(見つからない場合はnull)",
|
|
128
|
+
"failingImplementation": "問題のある実装のパス",
|
|
129
|
+
"keyDifferences": ["差分"]
|
|
130
|
+
},
|
|
131
|
+
"impactAnalysis": {
|
|
132
|
+
"causeCategory": "typo|logic_error|missing_constraint|design_gap|external_factor",
|
|
133
|
+
"impactScope": ["影響を受けるファイルパス"],
|
|
134
|
+
"recurrenceRisk": "low|medium|high",
|
|
135
|
+
"riskRationale": "リスク判定の根拠"
|
|
136
|
+
},
|
|
116
137
|
"unexploredAreas": [
|
|
117
138
|
{"area": "未探索領域", "reason": "調査できなかった理由", "potentialRelevance": "関連性"}
|
|
118
139
|
],
|
|
@@ -123,9 +144,15 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
|
|
|
123
144
|
|
|
124
145
|
## 完了条件
|
|
125
146
|
|
|
126
|
-
- [ ]
|
|
127
|
-
- [ ]
|
|
128
|
-
- [ ]
|
|
129
|
-
- [ ]
|
|
130
|
-
- [ ]
|
|
131
|
-
- [ ]
|
|
147
|
+
- [ ] 問題タイプを判定し、変更失敗の場合は差分分析を実行した
|
|
148
|
+
- [ ] comparisonAnalysisを出力した
|
|
149
|
+
- [ ] 内部・外部の情報源を調査した
|
|
150
|
+
- [ ] 2つ以上の仮説を列挙し、各仮説について因果追跡・証拠収集・causeCategory判定を行った
|
|
151
|
+
- [ ] impactScope、recurrenceRiskを判定した
|
|
152
|
+
- [ ] 未探索領域と調査の限界を記載した
|
|
153
|
+
|
|
154
|
+
## 禁止事項
|
|
155
|
+
|
|
156
|
+
- 特定の仮説を「正しい」と前提して調査を進めること
|
|
157
|
+
- ユーザーの因果関係ヒントを無視して技術的仮説のみに集中すること
|
|
158
|
+
- 反証を発見しても無視して仮説を維持すること
|
|
@@ -35,7 +35,7 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
|
|
|
35
35
|
|
|
36
36
|
## 実行ステップ
|
|
37
37
|
|
|
38
|
-
### ステップ1:
|
|
38
|
+
### ステップ1: 原因の理解と入力検証
|
|
39
39
|
|
|
40
40
|
**JSON形式の場合**:
|
|
41
41
|
- `conclusion.mostLikelyCause`から原因を確認
|
|
@@ -47,6 +47,16 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
|
|
|
47
47
|
- 信頼度の言及を探す(なければ`medium`と仮定)
|
|
48
48
|
- 不確実性に関する記述を探す
|
|
49
49
|
|
|
50
|
+
**ユーザー報告との整合性チェック**:
|
|
51
|
+
- 例:「Aを変更したらBが壊れた」→ 結論がその因果関係を説明できているか
|
|
52
|
+
- 例:「実装がおかしい」→ 結論が設計レベルの問題を含んでいるか
|
|
53
|
+
- 整合しない場合、uncertaintyHandlingに「原因の再検討が必要な可能性」を追記
|
|
54
|
+
|
|
55
|
+
**impactAnalysisに基づくアプローチ選択**:
|
|
56
|
+
- impactScope空、recurrenceRisk: low → 直接修正のみ
|
|
57
|
+
- impactScope 1-2件、recurrenceRisk: medium → 修正案 + 影響箇所確認
|
|
58
|
+
- impactScope 3件以上、またはrecurrenceRisk: high → 修正案と再設計案の両方
|
|
59
|
+
|
|
50
60
|
### ステップ2: 解決策の発散思考
|
|
51
61
|
以下の観点から最低3つの解決策を発想:
|
|
52
62
|
|
|
@@ -142,4 +152,9 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
|
|
|
142
152
|
- [ ] 各解決策のトレードオフを分析した
|
|
143
153
|
- [ ] 推奨案を選定し理由を説明した
|
|
144
154
|
- [ ] 具体的な実装ステップを作成した
|
|
145
|
-
- [ ] 不確実性への対処方法を記載した
|
|
155
|
+
- [ ] 不確実性への対処方法を記載した
|
|
156
|
+
- [ ] 入力がユーザー報告と整合しているか確認した
|
|
157
|
+
|
|
158
|
+
## 禁止事項
|
|
159
|
+
|
|
160
|
+
- 入力された結論をユーザー報告との整合性確認なしに信頼すること
|
|
@@ -36,7 +36,7 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
|
|
|
36
36
|
|
|
37
37
|
## 実行ステップ
|
|
38
38
|
|
|
39
|
-
### ステップ1:
|
|
39
|
+
### ステップ1: 調査結果の検証準備
|
|
40
40
|
|
|
41
41
|
**JSON形式の場合**:
|
|
42
42
|
- `hypotheses`から仮説一覧を確認
|
|
@@ -48,6 +48,9 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
|
|
|
48
48
|
- 各仮説の支持/反証証拠を整理
|
|
49
49
|
- 未調査と明記された領域を把握
|
|
50
50
|
|
|
51
|
+
**impactAnalysisの妥当性確認**:
|
|
52
|
+
- impactAnalysisの論理的妥当性を確認(追加検索は行わない)
|
|
53
|
+
|
|
51
54
|
### ステップ2: Triangulation補完
|
|
52
55
|
調査で確認されていない情報源を探索:
|
|
53
56
|
- 別のコード領域
|
|
@@ -68,14 +71,19 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
|
|
|
68
71
|
|
|
69
72
|
**評価基準**: 「反証されなかった度合い」で評価(支持証拠の数ではない)
|
|
70
73
|
|
|
71
|
-
### ステップ5: Devil's Advocate
|
|
74
|
+
### ステップ5: Devil's Advocate評価と批判的検証
|
|
72
75
|
各仮説について検討:
|
|
73
76
|
- 支持証拠が実は別の原因でも説明可能ではないか
|
|
74
77
|
- 反証となりうる証拠を見落としていないか
|
|
75
78
|
- 暗黙の前提が誤っていないか
|
|
76
79
|
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
**反証の重み付け**: 以下からの直接引用に基づく反証がある場合、その仮説の信頼度を自動的にlowに下げる
|
|
81
|
+
- 公式ドキュメント
|
|
82
|
+
- 言語仕様
|
|
83
|
+
- 使用パッケージの公式ドキュメント
|
|
84
|
+
|
|
85
|
+
### ステップ6: 検証レベル判定と整合性検証
|
|
86
|
+
各仮説を以下のレベルで分類:
|
|
79
87
|
|
|
80
88
|
| レベル | 定義 |
|
|
81
89
|
|-------|------|
|
|
@@ -84,6 +92,11 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
|
|
|
84
92
|
| direct | 直接的な証拠または観察あり |
|
|
85
93
|
| verified | 再現または確認済み |
|
|
86
94
|
|
|
95
|
+
**ユーザー報告との整合性**: 結論がユーザーの報告と整合しているか確認
|
|
96
|
+
- 例:「Aを変更したらBが壊れた」→ 結論がその因果関係を説明できているか
|
|
97
|
+
- 例:「実装がおかしい」→ design_gapを検討したか
|
|
98
|
+
- 整合しない場合、「調査の焦点がユーザー報告とずれている可能性」を明示
|
|
99
|
+
|
|
87
100
|
**結論**: 「最も反証されなかった仮説」として導出し、JSON形式で出力
|
|
88
101
|
|
|
89
102
|
## 信頼度の判定基準
|
|
@@ -110,6 +123,10 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
|
|
|
110
123
|
"impactOnHypotheses": "既存仮説への影響"
|
|
111
124
|
}
|
|
112
125
|
],
|
|
126
|
+
"scopeValidation": {
|
|
127
|
+
"verified": true,
|
|
128
|
+
"concerns": ["懸念事項"]
|
|
129
|
+
},
|
|
113
130
|
"externalResearch": [
|
|
114
131
|
{
|
|
115
132
|
"query": "検索したクエリ",
|
|
@@ -161,5 +178,12 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
|
|
|
161
178
|
- [ ] WebSearchで外部情報を収集した
|
|
162
179
|
- [ ] 最低3つの代替仮説を生成した
|
|
163
180
|
- [ ] 主要仮説についてDevil's Advocate評価を実施した
|
|
181
|
+
- [ ] 公式ドキュメントに基づく反証がある仮説の信頼度を下げた
|
|
182
|
+
- [ ] ユーザー報告との整合性を検証した
|
|
164
183
|
- [ ] 各仮説の検証レベルを判定した
|
|
165
|
-
- [ ] 最終結論を「最も反証されなかった仮説」として導出した
|
|
184
|
+
- [ ] 最終結論を「最も反証されなかった仮説」として導出した
|
|
185
|
+
|
|
186
|
+
## 禁止事項
|
|
187
|
+
|
|
188
|
+
- 公式ドキュメントに基づく反証を発見しても信頼度を下げずに結論を維持すること
|
|
189
|
+
- ユーザーの因果関係ヒントを無視して技術的分析のみに集中すること
|
|
@@ -8,20 +8,47 @@ Target problem: $ARGUMENTS
|
|
|
8
8
|
|
|
9
9
|
**TodoWrite Registration**: Register execution steps in TodoWrite and proceed systematically
|
|
10
10
|
|
|
11
|
+
## Step 0: Problem Structuring (Before investigator invocation)
|
|
12
|
+
|
|
13
|
+
### 0.1 Problem Type Determination
|
|
14
|
+
|
|
15
|
+
| Type | Criteria |
|
|
16
|
+
|------|----------|
|
|
17
|
+
| Change Failure | Indicates some change occurred before the problem appeared |
|
|
18
|
+
| New Discovery | No relation to changes is indicated |
|
|
19
|
+
|
|
20
|
+
If uncertain, ask the user whether any changes were made right before the problem occurred.
|
|
21
|
+
|
|
22
|
+
### 0.2 Information Supplementation for Change Failures
|
|
23
|
+
|
|
24
|
+
If the following are unclear, **ask with AskUserQuestion** before proceeding:
|
|
25
|
+
- What was changed (cause change)
|
|
26
|
+
- What broke (affected area)
|
|
27
|
+
- Relationship between both (shared components, etc.)
|
|
28
|
+
|
|
29
|
+
### 0.3 Reflecting in investigator Prompt
|
|
30
|
+
|
|
31
|
+
**For change failures, include the following as mandatory investigation items in prompt**:
|
|
32
|
+
1. Analyze cause change content in detail
|
|
33
|
+
2. Identify commonalities between cause change and affected area
|
|
34
|
+
3. Determine if cause change is a "correct fix" or "new bug" and select comparison baseline based on determination
|
|
35
|
+
|
|
11
36
|
## Diagnosis Flow Overview
|
|
12
37
|
|
|
13
38
|
```
|
|
14
|
-
Problem →
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
39
|
+
Problem → Investigation → Quality Check → [Verification] → Solution Derivation
|
|
40
|
+
↓
|
|
41
|
+
If simple,
|
|
42
|
+
skip Verification
|
|
18
43
|
```
|
|
19
44
|
|
|
20
45
|
**Context Separation**: Pass only structured JSON output to each step. Each step starts fresh with the JSON data only.
|
|
21
46
|
|
|
22
47
|
## Execution Steps
|
|
23
48
|
|
|
24
|
-
|
|
49
|
+
Register the following in TodoWrite and execute:
|
|
50
|
+
|
|
51
|
+
### Step 1: Investigation (investigator)
|
|
25
52
|
|
|
26
53
|
**Task tool invocation**:
|
|
27
54
|
```
|
|
@@ -31,46 +58,55 @@ prompt: Comprehensively collect information related to the following phenomenon.
|
|
|
31
58
|
Phenomenon: [Problem reported by user]
|
|
32
59
|
```
|
|
33
60
|
|
|
34
|
-
**Expected output**: Evidence matrix, list of unexplored areas, investigation limitations
|
|
61
|
+
**Expected output**: Evidence matrix, comparison analysis results, causal tracking results, list of unexplored areas, investigation limitations
|
|
62
|
+
|
|
63
|
+
### Step 2: Quality Check and Verification Decision
|
|
64
|
+
|
|
65
|
+
Review investigation output and assess:
|
|
35
66
|
|
|
36
|
-
|
|
67
|
+
**Investigation Quality Check** (verify JSON output contains the following):
|
|
68
|
+
- [ ] comparisonAnalysis
|
|
69
|
+
- [ ] causalChain for each hypothesis (reaching stop condition)
|
|
70
|
+
- [ ] causeCategory for each hypothesis
|
|
37
71
|
|
|
38
|
-
|
|
72
|
+
**If quality insufficient**: Re-run investigation specifying missing items
|
|
39
73
|
|
|
40
|
-
**
|
|
74
|
+
**Verification execution conditions (if any apply)**:
|
|
41
75
|
- 2 or more hypotheses have similar levels of evidence
|
|
42
76
|
- Only indirect evidence exists, no direct evidence
|
|
43
77
|
- 2 or more unexplored areas exist
|
|
44
78
|
- Contradicting evidence exists for hypotheses
|
|
45
79
|
- Problem has recurred in the past
|
|
80
|
+
- impactAnalysis.impactScope contains 3 or more affected locations
|
|
81
|
+
- impactAnalysis.recurrenceRisk is high
|
|
46
82
|
|
|
47
|
-
**
|
|
83
|
+
**Verification skip conditions (all must apply)**:
|
|
48
84
|
- One hypothesis is clearly dominant (direct evidence exists, no refutation)
|
|
49
85
|
- Almost no unexplored areas
|
|
50
86
|
- One-time problem (no recurrence history)
|
|
51
87
|
|
|
52
|
-
Report assessment results to user and explain reasoning if skipping
|
|
88
|
+
Report assessment results to user and explain reasoning if skipping verification.
|
|
53
89
|
|
|
54
|
-
### Step 3: Verification (complex cases
|
|
90
|
+
### Step 3: Verification (verifier) *For complex cases
|
|
55
91
|
|
|
56
92
|
**Task tool invocation**:
|
|
57
93
|
```
|
|
58
94
|
subagent_type: verifier
|
|
59
95
|
prompt: Verify the following investigation results.
|
|
60
96
|
|
|
61
|
-
Investigation results: [
|
|
97
|
+
Investigation results: [Investigation JSON output]
|
|
62
98
|
```
|
|
63
99
|
|
|
64
100
|
**Expected output**: Alternative hypotheses (at least 3), Devil's Advocate evaluation, final conclusion, confidence
|
|
65
101
|
|
|
66
|
-
### Step 4: Solution Derivation
|
|
102
|
+
### Step 4: Solution Derivation (solver)
|
|
67
103
|
|
|
68
104
|
**Task tool invocation**:
|
|
69
105
|
```
|
|
70
106
|
subagent_type: solver
|
|
71
107
|
prompt: Derive solutions based on the following verified conclusion.
|
|
72
108
|
|
|
73
|
-
Conclusion: [Conclusion portion from
|
|
109
|
+
Conclusion: [Conclusion portion from verification or investigation]
|
|
74
110
|
Confidence: [high/medium/low]
|
|
75
111
|
```
|
|
76
112
|
|
|
@@ -116,8 +152,9 @@ Rationale: [Selection rationale]
|
|
|
116
152
|
|
|
117
153
|
## Completion Criteria
|
|
118
154
|
|
|
119
|
-
- [ ]
|
|
120
|
-
- [ ]
|
|
121
|
-
- [ ]
|
|
122
|
-
- [ ]
|
|
123
|
-
- [ ]
|
|
155
|
+
- [ ] Executed investigation and obtained evidence matrix, comparison analysis, and causal tracking
|
|
156
|
+
- [ ] Performed investigation quality check and re-ran if insufficient
|
|
157
|
+
- [ ] Made verification decision and reported results to user
|
|
158
|
+
- [ ] (If complex) Executed verification
|
|
159
|
+
- [ ] Executed solution derivation
|
|
160
|
+
- [ ] Presented final report to user
|
|
@@ -8,20 +8,47 @@ description: 問題を調査し、検証を経て解決策を導出する
|
|
|
8
8
|
|
|
9
9
|
**TodoWrite登録**: 実行ステップをTodoWriteに登録し、計画的にタスクを進める
|
|
10
10
|
|
|
11
|
+
## ステップ0: 問題の構造化(investigator呼び出し前)
|
|
12
|
+
|
|
13
|
+
### 0.1 問題タイプの判定
|
|
14
|
+
|
|
15
|
+
| タイプ | 判断基準 |
|
|
16
|
+
|--------|---------|
|
|
17
|
+
| 変更失敗 | 問題発生の前に何らかの変更があったことが示唆されている |
|
|
18
|
+
| 新規発見 | 変更との関連が示唆されていない |
|
|
19
|
+
|
|
20
|
+
判断に迷う場合は「問題発生の直前に何か変更しましたか?」とユーザーに確認。
|
|
21
|
+
|
|
22
|
+
### 0.2 変更失敗の場合の情報補完
|
|
23
|
+
|
|
24
|
+
以下が不明な場合、**AskUserQuestionで質問**してから次に進む:
|
|
25
|
+
- 何を変更したか(原因変更)
|
|
26
|
+
- 何が壊れたか(影響箇所)
|
|
27
|
+
- 両者の関係(共通コンポーネント等)
|
|
28
|
+
|
|
29
|
+
### 0.3 investigatorプロンプトへの反映
|
|
30
|
+
|
|
31
|
+
**変更失敗の場合、以下を必須調査項目としてプロンプトに含める**:
|
|
32
|
+
1. 原因変更の内容を詳細に分析
|
|
33
|
+
2. 原因変更と影響箇所の共通点を特定
|
|
34
|
+
3. 原因変更が正しい修正か新たなバグかを判定し、判定結果に基づいて比較基準を選択
|
|
35
|
+
|
|
11
36
|
## 診断フロー概要
|
|
12
37
|
|
|
13
38
|
```
|
|
14
|
-
問題 →
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
39
|
+
問題 → 調査 → 品質判定 → [検証] → 解決策導出
|
|
40
|
+
↓
|
|
41
|
+
単純な場合は
|
|
42
|
+
検証スキップ
|
|
18
43
|
```
|
|
19
44
|
|
|
20
45
|
**コンテキスト分離**: 各ステップには構造化JSON出力のみを渡す。思考過程は引き継がない。
|
|
21
46
|
|
|
22
47
|
## 実行ステップ
|
|
23
48
|
|
|
24
|
-
|
|
49
|
+
以下をTodoWriteに登録して実行:
|
|
50
|
+
|
|
51
|
+
### ステップ1: 調査(investigator)
|
|
25
52
|
|
|
26
53
|
**Taskツールでの呼び出し**:
|
|
27
54
|
```
|
|
@@ -31,46 +58,55 @@ prompt: 以下の現象について、関連する情報を網羅的に収集し
|
|
|
31
58
|
現象: [ユーザーが報告した問題]
|
|
32
59
|
```
|
|
33
60
|
|
|
34
|
-
**期待される出力**:
|
|
61
|
+
**期待される出力**: 証拠マトリクス、比較分析結果、因果追跡結果、未探索領域のリスト、調査の限界
|
|
62
|
+
|
|
63
|
+
### ステップ2: 品質判定・検証判断
|
|
64
|
+
|
|
65
|
+
調査出力を確認し判定:
|
|
35
66
|
|
|
36
|
-
|
|
67
|
+
**調査品質チェック**(出力JSONに以下が含まれているか):
|
|
68
|
+
- [ ] comparisonAnalysis
|
|
69
|
+
- [ ] 各仮説にcausalChain(停止条件に到達)
|
|
70
|
+
- [ ] 各仮説にcauseCategory
|
|
37
71
|
|
|
38
|
-
|
|
72
|
+
**品質不足の場合**: 不足項目を指定して調査を再実行
|
|
39
73
|
|
|
40
|
-
|
|
74
|
+
**検証実行条件(1つでも該当)**:
|
|
41
75
|
- 2つ以上の仮説が同程度の証拠を持つ
|
|
42
76
|
- 直接証拠がなく間接証拠のみ
|
|
43
77
|
- 未探索領域が2つ以上ある
|
|
44
78
|
- 仮説に反証する証拠が存在する
|
|
45
79
|
- 問題が過去に再発している
|
|
80
|
+
- impactAnalysis.impactScopeに3件以上の該当箇所がある
|
|
81
|
+
- impactAnalysis.recurrenceRiskがhigh
|
|
46
82
|
|
|
47
|
-
|
|
83
|
+
**検証スキップ条件(すべて該当)**:
|
|
48
84
|
- 1つの仮説が明らかに優勢(直接証拠あり、反証なし)
|
|
49
85
|
- 未探索領域がほぼない
|
|
50
86
|
- 単発の問題(再発履歴なし)
|
|
51
87
|
|
|
52
|
-
|
|
88
|
+
判定結果をユーザーに報告し、検証をスキップする場合は理由を説明。
|
|
53
89
|
|
|
54
|
-
### ステップ3:
|
|
90
|
+
### ステップ3: 検証(verifier)※複雑な問題の場合
|
|
55
91
|
|
|
56
92
|
**Taskツールでの呼び出し**:
|
|
57
93
|
```
|
|
58
94
|
subagent_type: verifier
|
|
59
95
|
prompt: 以下の調査結果を検証してください。
|
|
60
96
|
|
|
61
|
-
調査結果: [
|
|
97
|
+
調査結果: [調査のJSON出力]
|
|
62
98
|
```
|
|
63
99
|
|
|
64
100
|
**期待される出力**: 代替仮説(最低3つ)、Devil's Advocate評価、最終結論、信頼度
|
|
65
101
|
|
|
66
|
-
### ステップ4:
|
|
102
|
+
### ステップ4: 解決策導出(solver)
|
|
67
103
|
|
|
68
104
|
**Taskツールでの呼び出し**:
|
|
69
105
|
```
|
|
70
106
|
subagent_type: solver
|
|
71
107
|
prompt: 以下の検証済み結論に基づいて、解決策を導出してください。
|
|
72
108
|
|
|
73
|
-
結論: [
|
|
109
|
+
結論: [検証または調査の結論部分]
|
|
74
110
|
信頼度: [high/medium/low]
|
|
75
111
|
```
|
|
76
112
|
|
|
@@ -116,8 +152,9 @@ prompt: 以下の検証済み結論に基づいて、解決策を導出してく
|
|
|
116
152
|
|
|
117
153
|
## 完了条件
|
|
118
154
|
|
|
119
|
-
- [ ]
|
|
120
|
-
- [ ]
|
|
121
|
-
- [ ]
|
|
122
|
-
- [ ]
|
|
123
|
-
- [ ]
|
|
155
|
+
- [ ] 調査を実行し、証拠マトリクス・比較分析・因果追跡を取得した
|
|
156
|
+
- [ ] 調査品質チェックを行い、不足があれば再実行した
|
|
157
|
+
- [ ] 検証判断を行い、結果をユーザーに報告した
|
|
158
|
+
- [ ] (複雑な場合)検証を実行した
|
|
159
|
+
- [ ] 解決策導出を実行した
|
|
160
|
+
- [ ] 最終レポートをユーザーに提示した
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-ai-project",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.1",
|
|
4
4
|
"packageManager": "npm@10.8.2",
|
|
5
5
|
"description": "TypeScript boilerplate with skills and sub-agents for Claude Code. Prevents context exhaustion through role-based task splitting.",
|
|
6
6
|
"keywords": [
|