create-ai-project 1.11.2 → 1.12.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.
Files changed (126) hide show
  1. package/.claude/agents-en/acceptance-test-generator.md +13 -13
  2. package/.claude/agents-en/code-reviewer.md +8 -10
  3. package/.claude/agents-en/design-sync.md +6 -5
  4. package/.claude/agents-en/document-reviewer.md +8 -7
  5. package/.claude/agents-en/integration-test-reviewer.md +5 -4
  6. package/.claude/agents-en/prd-creator.md +7 -6
  7. package/.claude/agents-en/quality-fixer-frontend.md +3 -14
  8. package/.claude/agents-en/quality-fixer.md +9 -20
  9. package/.claude/agents-en/requirement-analyzer.md +8 -7
  10. package/.claude/agents-en/rule-advisor.md +57 -128
  11. package/.claude/agents-en/task-decomposer.md +4 -10
  12. package/.claude/agents-en/task-executor-frontend.md +4 -16
  13. package/.claude/agents-en/task-executor.md +5 -16
  14. package/.claude/agents-en/technical-designer-frontend.md +17 -15
  15. package/.claude/agents-en/technical-designer.md +13 -15
  16. package/.claude/agents-en/work-planner.md +9 -14
  17. package/.claude/agents-ja/acceptance-test-generator.md +9 -15
  18. package/.claude/agents-ja/code-reviewer.md +3 -11
  19. package/.claude/agents-ja/design-sync.md +2 -6
  20. package/.claude/agents-ja/document-reviewer.md +4 -9
  21. package/.claude/agents-ja/integration-test-reviewer.md +2 -5
  22. package/.claude/agents-ja/prd-creator.md +3 -7
  23. package/.claude/agents-ja/quality-fixer-frontend.md +2 -13
  24. package/.claude/agents-ja/quality-fixer.md +7 -18
  25. package/.claude/agents-ja/requirement-analyzer.md +5 -8
  26. package/.claude/agents-ja/rule-advisor.md +57 -128
  27. package/.claude/agents-ja/task-decomposer.md +4 -10
  28. package/.claude/agents-ja/task-executor-frontend.md +3 -15
  29. package/.claude/agents-ja/task-executor.md +3 -17
  30. package/.claude/agents-ja/technical-designer-frontend.md +17 -15
  31. package/.claude/agents-ja/technical-designer.md +13 -15
  32. package/.claude/agents-ja/work-planner.md +9 -14
  33. package/.claude/commands-en/build.md +2 -2
  34. package/.claude/commands-en/design.md +1 -1
  35. package/.claude/commands-en/implement.md +8 -8
  36. package/.claude/commands-en/plan.md +3 -3
  37. package/.claude/commands-en/project-inject.md +4 -4
  38. package/.claude/commands-en/{refine-rule.md → refine-skill.md} +47 -48
  39. package/.claude/commands-en/{sync-rules.md → sync-skills.md} +29 -29
  40. package/.claude/commands-ja/build.md +2 -2
  41. package/.claude/commands-ja/design.md +1 -1
  42. package/.claude/commands-ja/implement.md +8 -8
  43. package/.claude/commands-ja/plan.md +3 -3
  44. package/.claude/commands-ja/project-inject.md +4 -4
  45. package/.claude/{commands/refine-rule.md → commands-ja/refine-skill.md} +25 -25
  46. package/.claude/{commands/sync-rules.md → commands-ja/sync-skills.md} +28 -28
  47. package/{docs/rules-en/coding-standards.md → .claude/skills-en/coding-standards/SKILL.md} +21 -108
  48. package/{docs/rules-en/documentation-criteria.md → .claude/skills-en/documentation-criteria/SKILL.md} +40 -42
  49. package/{docs/adr/template-en.md → .claude/skills-en/documentation-criteria/references/adr-template.md} +1 -1
  50. package/{docs/design/template-en.md → .claude/skills-en/documentation-criteria/references/design-template.md} +11 -31
  51. package/{docs/plans/template-en.md → .claude/skills-en/documentation-criteria/references/plan-template.md} +4 -4
  52. package/{docs/prd/template-en.md → .claude/skills-en/documentation-criteria/references/prd-template.md} +1 -1
  53. package/{docs/rules-en/frontend/technical-spec.md → .claude/skills-en/frontend/technical-spec/SKILL.md} +17 -13
  54. package/{docs/rules-en/frontend/typescript.md → .claude/skills-en/frontend/typescript-rules/SKILL.md} +17 -12
  55. package/{docs/rules-en/frontend/typescript-testing.md → .claude/skills-en/frontend/typescript-testing/SKILL.md} +11 -6
  56. package/{docs/rules-en/architecture/implementation-approach.md → .claude/skills-en/implementation-approach/SKILL.md} +7 -2
  57. package/{docs/rules-en/integration-e2e-testing.md → .claude/skills-en/integration-e2e-testing/SKILL.md} +15 -18
  58. package/{docs/rules-en/project-context.md → .claude/skills-en/project-context/SKILL.md} +7 -3
  59. package/.claude/skills-en/subagents-orchestration-guide/SKILL.md +224 -0
  60. package/.claude/skills-en/task-analyzer/SKILL.md +131 -0
  61. package/{docs/rules-en/rules-index.yaml → .claude/skills-en/task-analyzer/references/skills-index.yaml} +34 -20
  62. package/{docs/rules-en/technical-spec.md → .claude/skills-en/technical-spec/SKILL.md} +6 -6
  63. package/{docs/rules-en/typescript.md → .claude/skills-en/typescript-rules/SKILL.md} +15 -10
  64. package/{docs/rules-en/typescript-testing.md → .claude/skills-en/typescript-testing/SKILL.md} +10 -4
  65. package/{docs/rules-ja/coding-standards.md → .claude/skills-ja/coding-standards/SKILL.md} +12 -99
  66. package/{docs/rules-ja/documentation-criteria.md → .claude/skills-ja/documentation-criteria/SKILL.md} +18 -5
  67. package/.claude/skills-ja/documentation-criteria/references/adr-template.md +64 -0
  68. package/.claude/skills-ja/documentation-criteria/references/design-template.md +261 -0
  69. package/{docs/plans/template-ja.md → .claude/skills-ja/documentation-criteria/references/plan-template.md} +38 -38
  70. package/{docs/prd/template-ja.md → .claude/skills-ja/documentation-criteria/references/prd-template.md} +33 -33
  71. package/{docs/rules-ja/frontend/technical-spec.md → .claude/skills-ja/frontend/technical-spec/SKILL.md} +13 -9
  72. package/.claude/skills-ja/frontend/typescript-rules/SKILL.md +315 -0
  73. package/{docs/rules-ja/frontend/typescript-testing.md → .claude/skills-ja/frontend/typescript-testing/SKILL.md} +93 -5
  74. package/{docs/rules/architecture/implementation-approach.md → .claude/skills-ja/implementation-approach/SKILL.md} +10 -5
  75. package/{docs/rules-ja/integration-e2e-testing.md → .claude/skills-ja/integration-e2e-testing/SKILL.md} +5 -8
  76. package/{docs/rules-ja/project-context.md → .claude/skills-ja/project-context/SKILL.md} +7 -3
  77. package/.claude/skills-ja/subagents-orchestration-guide/SKILL.md +212 -0
  78. package/.claude/skills-ja/task-analyzer/SKILL.md +131 -0
  79. package/{docs/rules-ja/rules-index.yaml → .claude/skills-ja/task-analyzer/references/skills-index.yaml} +34 -19
  80. package/{docs/rules-ja/technical-spec.md → .claude/skills-ja/technical-spec/SKILL.md} +6 -6
  81. package/{docs/rules-ja/typescript.md → .claude/skills-ja/typescript-rules/SKILL.md} +16 -11
  82. package/{docs/rules-ja/typescript-testing.md → .claude/skills-ja/typescript-testing/SKILL.md} +11 -5
  83. package/CLAUDE.en.md +6 -6
  84. package/CLAUDE.ja.md +6 -6
  85. package/CLAUDE.md +19 -28
  86. package/README.ja.md +39 -10
  87. package/README.md +39 -10
  88. package/package.json +1 -1
  89. package/scripts/set-language.js +35 -53
  90. package/scripts/setup-project.js +4 -1
  91. package/.claude/agents/acceptance-test-generator.md +0 -316
  92. package/.claude/agents/code-reviewer.md +0 -193
  93. package/.claude/agents/document-reviewer.md +0 -182
  94. package/.claude/agents/prd-creator.md +0 -186
  95. package/.claude/agents/quality-fixer.md +0 -295
  96. package/.claude/agents/requirement-analyzer.md +0 -161
  97. package/.claude/agents/rule-advisor.md +0 -194
  98. package/.claude/agents/task-decomposer.md +0 -291
  99. package/.claude/agents/task-executor.md +0 -270
  100. package/.claude/agents/technical-designer.md +0 -343
  101. package/.claude/agents/work-planner.md +0 -181
  102. package/.claude/commands/build.md +0 -78
  103. package/.claude/commands/design.md +0 -27
  104. package/.claude/commands/implement.md +0 -79
  105. package/.claude/commands/plan.md +0 -43
  106. package/.claude/commands/project-inject.md +0 -76
  107. package/.claude/commands/review.md +0 -78
  108. package/.claude/commands/task.md +0 -13
  109. package/.claude/commands-ja/refine-rule.md +0 -206
  110. package/.claude/commands-ja/sync-rules.md +0 -116
  111. package/.claude/settings.local.json +0 -74
  112. package/docs/adr/template-ja.md +0 -64
  113. package/docs/design/template-ja.md +0 -285
  114. package/docs/guides/en/sub-agents.md +0 -343
  115. package/docs/guides/ja/sub-agents.md +0 -343
  116. package/docs/guides/sub-agents.md +0 -306
  117. package/docs/plans/20250123-integration-test-improvement.md +0 -993
  118. package/docs/rules/ai-development-guide.md +0 -260
  119. package/docs/rules/documentation-criteria.md +0 -180
  120. package/docs/rules/project-context.md +0 -38
  121. package/docs/rules/rules-index.yaml +0 -137
  122. package/docs/rules/technical-spec.md +0 -47
  123. package/docs/rules/typescript-testing.md +0 -188
  124. package/docs/rules/typescript.md +0 -166
  125. package/docs/rules-ja/architecture/implementation-approach.md +0 -136
  126. package/docs/rules-ja/frontend/typescript.md +0 -131
@@ -1,285 +0,0 @@
1
- # [機能名] Design Document
2
-
3
- ## 概要
4
-
5
- [この機能の目的と概要を2-3文で説明]
6
-
7
- ## Design Summary (Meta)
8
-
9
- ```yaml
10
- design_type: "新機能|既存拡張|リファクタリング"
11
- risk_level: "low|medium|high"
12
- main_constraints:
13
- - "[制約1]"
14
- - "[制約2]"
15
- biggest_risks:
16
- - "[リスク1]"
17
- - "[リスク2]"
18
- unknowns:
19
- - "[不確実な点1]"
20
- - "[不確実な点2]"
21
- ```
22
-
23
- ## 背景とコンテキスト
24
-
25
- ### 前提となるADR
26
-
27
- - [ADRファイル名]: [関連する決定事項]
28
- - 共通技術ADRがある場合は参照
29
-
30
- ### 合意事項チェックリスト
31
-
32
- #### スコープ
33
- - [ ] [変更する機能/コンポーネント]
34
- - [ ] [追加する機能]
35
-
36
- #### 非スコープ(明示的に変更しないもの)
37
- - [ ] [変更しない機能/コンポーネント]
38
- - [ ] [保持する既存ロジック]
39
-
40
- #### 制約条件
41
- - [ ] 並行運用: [あり/なし]
42
- - [ ] 後方互換性: [必要/不要]
43
- - [ ] パフォーマンス測定: [必要/不要]
44
-
45
- ### 解決する問題
46
-
47
- [この機能が解決しようとしている具体的な問題や課題]
48
-
49
- ### 現状の課題
50
-
51
- [現在のシステムの問題点や制限]
52
-
53
- ### 要件
54
-
55
- #### 機能要件
56
-
57
- - [必須の機能要件を列挙]
58
-
59
- #### 非機能要件
60
-
61
- - **パフォーマンス**: [応答時間、スループットなどの要件]
62
- - **スケーラビリティ**: [負荷増加時の対応要件]
63
- - **信頼性**: [エラー率、可用性などの要件]
64
- - **保守性**: [コードの理解しやすさ、変更のしやすさ]
65
-
66
- ## 受入条件(AC)- EARS形式
67
-
68
- 各ACはEARS形式で記述。キーワードがテスト種別を決定する。
69
-
70
- ### [機能要件1]
71
-
72
- - [ ] **When** ユーザーが有効な認証情報でログインボタンをクリック, the system shall 認証成功しダッシュボードにリダイレクト
73
- - [ ] **If** 認証情報が無効, **then** the system shall エラーメッセージ「認証情報が正しくありません」を表示
74
- - [ ] **While** ユーザーがログイン状態, the system shall セッションを60分間維持
75
-
76
- ### [機能要件2]
77
-
78
- - [ ] The system shall データ一覧を10件ずつページネーションして表示
79
- - [ ] **When** 検索フィールドに入力, the system shall リアルタイムでフィルタリングを適用
80
- - **Property**: `filtered.every(item => item.name.includes(query))`
81
-
82
- ## 既存コードベース分析
83
-
84
- ### 実装パスマッピング
85
- | 種別 | パス | 説明 |
86
- |------|------|------|
87
- | 既存 | src/[実際のパス] | [現在の実装] |
88
- | 新規 | src/[計画パス] | [新規作成予定] |
89
-
90
- ### 統合点(新規実装でも記載)
91
- - **統合先**: [どこと接続するか]
92
- - **呼び出し方法**: [どのように呼び出されるか]
93
-
94
- ## 設計
95
-
96
- ### 変更影響マップ
97
-
98
- ```yaml
99
- 変更対象: [変更するコンポーネント/機能]
100
- 直接影響:
101
- - [直接変更が必要なファイル/関数]
102
- - [インターフェース変更箇所]
103
- 間接影響:
104
- - [データ形式の変更]
105
- - [処理時間の変化]
106
- 波及なし:
107
- - [影響を受けない機能を明示]
108
- ```
109
-
110
- ### アーキテクチャ概要
111
-
112
- [システム全体の中でこの機能がどのように位置づけられるか]
113
-
114
- ### データフロー
115
-
116
- ```
117
- [データの流れを図や疑似コードで表現]
118
- ```
119
-
120
- ### 統合点一覧
121
-
122
- | 統合点 | 場所 | 旧実装 | 新実装 | 切り替え方法 |
123
- |---------|------|----------|----------|-------------|
124
- | 統合点1 | [クラス/関数] | [既存処理] | [新処理] | [DI/ファクトリ等] |
125
- | 統合点2 | [別の箇所] | [既存] | [新規] | [方法] |
126
-
127
- ### 主要コンポーネント
128
-
129
- #### コンポーネント1
130
-
131
- - **責務**: [このコンポーネントの責任範囲]
132
- - **インターフェース**: [提供するAPIや型定義]
133
- - **依存関係**: [他のコンポーネントとの関係]
134
-
135
- #### コンポーネント2
136
-
137
- - **責務**: [このコンポーネントの責任範囲]
138
- - **インターフェース**: [提供するAPIや型定義]
139
- - **依存関係**: [他のコンポーネントとの関係]
140
-
141
- ### 型定義
142
-
143
- ```typescript
144
- // 主要な型定義をここに記載
145
- ```
146
-
147
- ### データ契約(Data Contract)
148
-
149
- #### コンポーネント1
150
-
151
- ```yaml
152
- 入力:
153
- 型: [TypeScript型定義]
154
- 前提条件: [必須項目、形式制約]
155
- 検証: [バリデーション方法]
156
-
157
- 出力:
158
- 型: [TypeScript型定義]
159
- 保証: [必ず満たす条件]
160
- エラー時: [例外/null/デフォルト値]
161
-
162
- 不変条件:
163
- - [処理の前後で変わらない条件]
164
- ```
165
-
166
- ### 状態遷移と不変条件(該当する場合)
167
-
168
- ```yaml
169
- 状態定義:
170
- - 初期状態: [初期値と条件]
171
- - 遷移可能状態: [状態のリスト]
172
-
173
- 状態遷移:
174
- 現在状態 → イベント → 次状態
175
-
176
- システム不変条件:
177
- - [どの状態でも成立する条件]
178
- ```
179
-
180
- ### エラーハンドリング
181
-
182
- [エラーの種類と対処方法]
183
-
184
- ### ログとモニタリング
185
-
186
- [何をログに記録し、どのようにモニタリングするか]
187
-
188
- ## 実装計画
189
-
190
- ### 実装アプローチ
191
-
192
- **選択したアプローチ**: [アプローチ名または組み合わせ]
193
- **選択理由**: [プロジェクトの制約と技術的依存関係を考慮した理由]
194
-
195
- ### 技術的依存関係と実装順序
196
-
197
- #### 実装の必要順序
198
- 1. **[コンポーネント/機能A]**
199
- - 技術的理由: [なぜこれを最初に実装する必要があるか]
200
- - 依存される要素: [これに依存する他のコンポーネント]
201
-
202
- 2. **[コンポーネント/機能B]**
203
- - 技術的理由: [Aの後に実装する技術的必然性]
204
- - 前提条件: [必要な事前実装]
205
-
206
- #### 並列実装可能な要素
207
- - [独立して実装可能なコンポーネント群]
208
-
209
- ### 統合ポイントとE2E確認
210
-
211
- #### 統合ポイント1: [統合箇所]
212
- **確認手順**:
213
- 1. [動作確認手順]
214
- 2. [期待結果の確認]
215
-
216
- #### 統合ポイント2: [統合箇所]
217
- **確認手順**:
218
- 1. [動作確認手順]
219
- 2. [期待結果の確認]
220
-
221
- ### 移行戦略
222
-
223
- [技術的な移行アプローチ、後方互換性の確保方法]
224
-
225
- ## テスト戦略
226
-
227
- ### テスト設計の基本方針
228
-
229
- 受入条件から自動的にテストケースを導出:
230
- - 各受入条件に対して最低1つのテストケースを作成
231
- - 受入条件の測定可能な基準をアサーションとして実装
232
-
233
- ### 単体テスト
234
-
235
- [単体テストの方針とカバレッジ目標]
236
- - 機能受入条件の個別要素を検証
237
-
238
- ### 統合テスト
239
-
240
- [統合テストの方針と重要なテストケース]
241
- - 機能受入条件の結合動作を検証
242
-
243
- ### E2Eテスト
244
-
245
- [E2Eテストの方針]
246
- - 受入条件のシナリオ全体を検証
247
- - ユーザー視点での機能動作を確認
248
-
249
- ### パフォーマンステスト
250
-
251
- [パフォーマンステストの方法と基準]
252
- - 非機能受入条件のパフォーマンス基準を検証
253
-
254
- ## セキュリティ考慮事項
255
-
256
- [セキュリティ上の懸念事項と対策]
257
-
258
- ## 今後の拡張性
259
-
260
- [将来的な機能追加や変更に対する考慮]
261
-
262
- ## 代替案の検討
263
-
264
- ### 代替案1
265
-
266
- - **概要**: [代替案の説明]
267
- - **利点**: [利点]
268
- - **欠点**: [欠点]
269
- - **不採用の理由**: [なぜ採用しなかったか]
270
-
271
- ## リスクと軽減策
272
-
273
- | リスク | 影響度 | 発生確率 | 軽減策 |
274
- |--------|--------|----------|--------|
275
- | [リスク1] | 高/中/低 | 高/中/低 | [対策] |
276
-
277
- ## 参考資料
278
-
279
- - [関連するドキュメントやリンク]
280
-
281
- ## 更新履歴
282
-
283
- | 日付 | 版 | 変更内容 | 作成者 |
284
- |------|-----|----------|--------|
285
- | YYYY-MM-DD | 1.0 | 初版作成 | [名前] |
@@ -1,343 +0,0 @@
1
- # Sub-agents Practical Guide - Orchestration Guidelines for Claude (Me)
2
-
3
- This document provides practical behavioral guidelines for me (Claude) to efficiently process tasks by utilizing subagents.
4
-
5
- ## 🚨 Core Principle: I Am an Orchestrator
6
-
7
- **Role Definition**: I am an orchestrator, not an executor.
8
-
9
- ### Required Actions
10
- - ✅ **New tasks**: ALWAYS start with requirement-analyzer
11
- - ✅ **During flow execution**: STRICTLY follow scale-based flow
12
- - ✅ **Each phase**: DELEGATE to appropriate subagent
13
- - ✅ **Stop points**: ALWAYS wait for user approval
14
-
15
- ### Prohibited Actions
16
- - ❌ Executing investigation directly with Grep/Glob/Read
17
- - ❌ Performing analysis or design without subagent delegation
18
- - ❌ Saying "Let me first investigate" then starting work directly
19
- - ❌ Skipping or postponing requirement-analyzer
20
-
21
- **Execution Rule**: New tasks → requirement-analyzer FIRST. After flow starts → follow scale determination.
22
-
23
- ## 📋 Decision Flow When Receiving Tasks
24
-
25
- ```mermaid
26
- graph TD
27
- Start[Receive New Task] --> RA[Analyze requirements with requirement-analyzer]
28
- RA --> Scale[Scale assessment]
29
- Scale --> Flow[Execute flow based on scale]
30
- ```
31
-
32
- **During flow execution, determine next subagent according to scale determination table**
33
-
34
- ### Requirement Change Detection During Flow
35
-
36
- **During flow execution**, if detecting the following in user response, stop flow and go to requirement-analyzer:
37
- - Mentions of new features/behaviors (additional operation methods, display on different screens, etc.)
38
- - Additions of constraints/conditions (data volume limits, permission controls, etc.)
39
- - Changes in technical requirements (processing methods, output format changes, etc.)
40
-
41
- **If any one applies → Restart from requirement-analyzer with integrated requirements**
42
-
43
- ## 🤖 Subagents I Can Utilize
44
-
45
- I actively utilize the following subagents:
46
-
47
- ### Implementation Support Agents
48
- 1. **quality-fixer**: Self-contained processing for overall quality assurance and fixes until completion
49
- 2. **task-decomposer**: Appropriate task decomposition of work plans
50
- 3. **task-executor**: Individual task execution and structured response
51
- 4. **integration-test-reviewer**: Review integration/E2E tests for skeleton compliance
52
-
53
- ### Document Creation Agents
54
- 5. **requirement-analyzer**: Requirement analysis and work scale determination (WebSearch enabled, latest technical information research)
55
- 6. **prd-creator**: Product Requirements Document creation (WebSearch enabled, market trend research)
56
- 7. **technical-designer**: ADR/Design Doc creation (latest technology research, Property annotation assignment)
57
- 8. **work-planner**: Work plan creation (extracts and reflects meta information from test skeletons)
58
- 9. **document-reviewer**: Single document quality, completeness, and rule compliance check
59
- 10. **design-sync**: Design Doc consistency verification (detects explicit conflicts only)
60
- 11. **acceptance-test-generator**: Generate separate integration and E2E test skeletons from Design Doc ACs (EARS format, Property annotations, fast-check support)
61
-
62
- ## 🎭 My Orchestration Principles
63
-
64
- ### Task Assignment with Responsibility Separation
65
-
66
- I understand each subagent's responsibilities and assign work appropriately:
67
-
68
- **task-executor Responsibilities** (DELEGATE these):
69
- - Implementation work and test addition
70
- - Confirmation that ONLY added tests pass (existing tests are NOT in scope)
71
- - DO NOT delegate quality assurance to task-executor
72
-
73
- **quality-fixer Responsibilities** (DELEGATE these):
74
- - Overall quality assurance (type check, lint, ALL test execution)
75
- - Complete execution of quality error fixes
76
- - Self-contained processing until fix completion
77
- - Final approved judgment (ONLY after all fixes are complete)
78
-
79
- ### Standard Flow I Manage
80
-
81
- **Basic Cycle**: I manage the 4-step cycle of `task-executor → escalation judgment/follow-up → quality-fixer → commit`.
82
- I repeat this cycle for each task to ensure quality.
83
-
84
- ## 🛡️ Constraints Between Subagents
85
-
86
- **Important**: Subagents cannot directly call other subagents. When coordinating multiple subagents, the main AI (Claude) operates as the orchestrator.
87
-
88
- ## 📏 Scale Determination and Document Requirements
89
- | Scale | File Count | PRD | ADR | Design Doc | Work Plan |
90
- |-------|------------|-----|-----|------------|-----------|
91
- | Small | 1-2 | Update[^1] | Not needed | Not needed | Simplified (inline comments only) |
92
- | Medium | 3-5 | Update[^1] | Conditional[^2] | **Required** | **Required** |
93
- | Large | 6+ | **Required**[^3] | Conditional[^2] | **Required** | **Required** |
94
-
95
- [^1]: Update existing PRD if one exists for the relevant feature
96
- [^2]: Required when: architecture changes, new technology introduction, OR data flow changes
97
- [^3]: Create new PRD, update existing PRD, or create reverse PRD (when no existing PRD)
98
-
99
- ## How to Call Subagents
100
-
101
- ### Execution Method
102
- Call subagents using the Task tool:
103
- - subagent_type: Agent name
104
- - description: Concise task description (3-5 words)
105
- - prompt: Specific instructions
106
-
107
- ### Call Example (requirement-analyzer)
108
- - subagent_type: "requirement-analyzer"
109
- - description: "Requirement analysis"
110
- - prompt: "Requirements: [user requirements] Please perform requirement analysis and scale determination"
111
-
112
- ### Call Example (task-executor)
113
- - subagent_type: "task-executor"
114
- - description: "Task execution"
115
- - prompt: "Task file: docs/plans/tasks/[filename].md Please complete the implementation"
116
-
117
- ## Structured Response Specification
118
-
119
- Each subagent responds in JSON format:
120
- - **task-executor**: status, filesModified, testsAdded, readyForQualityCheck
121
- - **integration-test-reviewer**: status, verdict (approved/needs_revision), requiredFixes
122
- - **quality-fixer**: status, checksPerformed, fixesApplied, approved
123
- - **document-reviewer**: status, reviewsPerformed, issues, recommendations, approvalReady
124
- - **design-sync**: sync_status, total_conflicts, conflicts (severity, type, source_file, target_file)
125
-
126
-
127
- ## 🔄 Handling Requirement Changes
128
-
129
- ### Handling Requirement Changes in requirement-analyzer
130
- requirement-analyzer follows the "completely self-contained" principle and processes requirement changes as new input.
131
-
132
- #### How to Integrate Requirements
133
-
134
- **IMPORTANT**: To maximize LLM execution accuracy, integrate requirements as complete sentences including ALL contextual information communicated by the user.
135
-
136
- ```yaml
137
- Integration example:
138
- Initial: "I want to create user management functionality"
139
- Addition: "Permission management is also needed"
140
- Result: "I want to create user management functionality. Permission management is also needed.
141
-
142
- Initial requirement: I want to create user management functionality
143
- Additional requirement: Permission management is also needed"
144
- ```
145
-
146
- ### Update Mode for Document Generation Agents
147
- Document generation agents (work-planner, technical-designer, prd-creator) can update existing documents in `update` mode.
148
-
149
- - **Initial creation**: Create new document in create (default) mode
150
- - **On requirement change**: Edit existing document and add history in update mode
151
-
152
- My criteria for timing when to call each agent:
153
- - **work-planner**: Request updates only before execution
154
- - **technical-designer**: Request updates according to design changes → Execute document-reviewer for consistency check
155
- - **prd-creator**: Request updates according to requirement changes → Execute document-reviewer for consistency check
156
- - **document-reviewer**: Always execute before user approval after PRD/ADR/Design Doc creation/update
157
-
158
- ## 📄 My Basic Flow for Work Planning
159
-
160
- When receiving new features or change requests, I first request requirement analysis from requirement-analyzer.
161
- According to scale determination:
162
-
163
- ### Large Scale (6+ Files)
164
- 1. requirement-analyzer → Requirement analysis + Check existing PRD **[Stop: Requirement confirmation/question handling]**
165
- 2. prd-creator → PRD creation (update if existing, new creation with thorough investigation if not) → Execute document-reviewer **[Stop: Requirement confirmation]**
166
- 3. technical-designer → ADR creation (if needed) → Execute document-reviewer **[Stop: Technical direction decision]**
167
- 4. technical-designer → Design Doc creation → Execute document-reviewer → Execute design-sync **[Stop: Design content confirmation]**
168
- 5. acceptance-test-generator → Integration and E2E test skeleton generation
169
- → Main AI: Verify generation, then pass information to work-planner (*1)
170
- 6. work-planner → Work plan creation (including integration and E2E test information) **[Stop: Batch approval for entire implementation phase]**
171
- 7. **Start autonomous execution mode**: task-decomposer → Execute all tasks → Completion report
172
-
173
- ### Medium Scale (3-5 Files)
174
- 1. requirement-analyzer → Requirement analysis **[Stop: Requirement confirmation/question handling]**
175
- 2. technical-designer → Design Doc creation → Execute document-reviewer → Execute design-sync **[Stop: Technical direction decision]**
176
- 3. acceptance-test-generator → Integration and E2E test skeleton generation
177
- → Main AI: Verify generation, then pass information to work-planner (*1)
178
- 4. work-planner → Work plan creation (including integration and E2E test information) **[Stop: Batch approval for entire implementation phase]**
179
- 5. **Start autonomous execution mode**: task-decomposer → Execute all tasks → Completion report
180
-
181
- ### Small Scale (1-2 Files)
182
- 1. Create simplified plan **[Stop: Batch approval for entire implementation phase]**
183
- 2. **Start autonomous execution mode**: Direct implementation → Completion report
184
-
185
- ## 🤖 Autonomous Execution Mode
186
-
187
- ### 🔑 Authority Delegation
188
-
189
- **After starting autonomous execution mode**:
190
- - Batch approval for entire implementation phase delegates authority to subagents
191
- - task-executor: Implementation authority (can use Edit/Write)
192
- - quality-fixer: Fix authority (automatic quality error fixes)
193
-
194
- ### Definition of Autonomous Execution Mode
195
- After "batch approval for entire implementation phase" with work-planner, autonomously execute the following processes without human approval:
196
-
197
- ```mermaid
198
- graph TD
199
- START[Batch approval for entire implementation phase] --> AUTO[Start autonomous execution mode]
200
- AUTO --> TD[task-decomposer: Task decomposition]
201
- TD --> PHASE[Register phase management Todo]
202
- PHASE --> PSTART[Phase start: Expand task Todo]
203
- PSTART --> TE[task-executor: Implementation]
204
- TE --> ESC{Escalation judgment}
205
- ESC -->|No issue| FOLLOW[Follow-up processing]
206
- ESC -->|Issue found| STOP[Escalate to user]
207
- FOLLOW --> QF[quality-fixer: Quality check and fixes]
208
- QF --> COMMIT[Execute git commit]
209
- COMMIT --> TCHECK{Tasks remaining?}
210
- TCHECK -->|Yes| TE
211
- TCHECK -->|No| PCHECK{Phases remaining?}
212
- PCHECK -->|Yes| PSTART
213
- PCHECK -->|No| REPORT[Completion report]
214
-
215
- TE --> INTERRUPT{User input?}
216
- INTERRUPT -->|Requirement change| STOP2[Stop autonomous execution]
217
- STOP2 --> RA[Re-analyze with requirement-analyzer]
218
- ```
219
-
220
- ### Conditions for Stopping Autonomous Execution
221
- Stop autonomous execution and escalate to user in the following cases:
222
-
223
- 1. **Escalation from subagent**
224
- - When receiving response with `status: "escalation_needed"`
225
- - When receiving response with `status: "blocked"`
226
-
227
- 2. **When requirement change detected**
228
- - Any match in requirement change detection checklist
229
- - Stop autonomous execution and re-analyze with integrated requirements in requirement-analyzer
230
-
231
- 3. **When work-planner update restriction is violated**
232
- - Requirement changes after task-decomposer starts require overall redesign
233
- - Restart entire flow from requirement-analyzer
234
-
235
- 4. **When user explicitly stops**
236
- - Direct stop instruction or interruption
237
-
238
- ### Handling Subagent Requests During Autonomous Execution
239
- 1. When a subagent requests approval → Reply that user approval has been granted and continue
240
- 2. When work becomes necessary by myself → Stop autonomous execution mode and escalate to user
241
-
242
- ### Task Management During Autonomous Execution
243
-
244
- **2-stage TodoWrite Management**
245
-
246
- #### Step 1: After task-decomposer completion
247
- Register phase management Todo:
248
- ```
249
- [in_progress] Implementation phase management: Phase1 start
250
- [pending] Implementation phase management: Phase2 start
251
- [pending] Implementation phase management: Phase3 start
252
- ```
253
-
254
- #### Step 2: At phase start
255
- Expand tasks for the relevant phase in 4 steps:
256
- ```
257
- [completed] Implementation phase management: Phase1 start
258
- [pending] Implementation phase management: Phase2 start
259
- [in_progress] Phase1-Task01: task-executor execution
260
- [pending] Phase1-Task01: Escalation judgment/follow-up
261
- [pending] Phase1-Task01: quality-fixer execution
262
- [pending] Phase1-Task01: git commit
263
- ... (repeat same pattern)
264
- [pending] Phase1: Completion check
265
- ```
266
-
267
- **At phase completion**: Mark completion check as completed, expand next phase tasks
268
-
269
- **Execution content for each step**:
270
- - task-executor execution: Subagent invocation
271
- - Escalation judgment/follow-up:
272
- - `status: escalation_needed/blocked` → Escalate to user
273
- - `testsAdded` contains `*.int.test.ts`/`*.e2e.test.ts` → Execute integration-test-reviewer
274
- - quality-fixer execution: Subagent invocation
275
- - git commit: Execute commit with Bash tool
276
-
277
- ## 🎼 My Main Roles as Orchestrator
278
-
279
- 1. **State Management**: Grasp current phase, each subagent's state, and next action
280
- 2. **Information Bridging**: Data conversion and transmission between subagents
281
- - Convert each subagent's output to next subagent's input format
282
- - **Always pass deliverables from previous process to next agent**
283
- - Extract necessary information from structured responses
284
- - Compose commit messages from changeSummary → **Execute git commit with Bash**
285
- - Explicitly integrate initial and additional requirements when requirements change
286
-
287
- #### Information Handoff: acceptance-test-generator → work-planner
288
-
289
- **Purpose**: Prepare information for work-planner to incorporate into work plan
290
-
291
- **Main AI Verification Checklist**:
292
- - [ ] Verify integration test file path exists
293
- - [ ] Verify E2E test file path exists
294
-
295
- **Information to Pass to work-planner**:
296
- - Integration test file path: [path] (execute WITH each phase implementation)
297
- - E2E test file path: [path] (execute ONLY in final phase)
298
-
299
- **Error Handling**: IF files are NOT generated → Escalate to user immediately
300
-
301
- 3. **Quality Assurance and Commit Execution**: After confirming approved=true, immediately execute git commit
302
- 4. **Autonomous Execution Mode Management**: Start/stop autonomous execution after approval, escalation decisions
303
- 5. **ADR Status Management**: Update ADR status after user decision (Accepted/Rejected)
304
-
305
- ## ⚠️ Important Constraints
306
-
307
- - **Quality check is MANDATORY**: quality-fixer approval REQUIRED before commit
308
- - **Structured response is MANDATORY**: Information transmission between subagents MUST use JSON format
309
- - **Approval management**: Document creation → Execute document-reviewer → Get user approval BEFORE proceeding
310
- - **Flow confirmation**: After getting approval, ALWAYS check next step with work planning flow (large/medium/small scale)
311
- - **Consistency verification**: IF subagent determinations contradict → prioritize these guidelines
312
-
313
- ## ⚡ Required Dialogue Points with Humans
314
-
315
- ### Basic Principles
316
- - **Stopping is mandatory**: Always wait for human response at the following timings
317
- - **Confirmation → Agreement cycle**: After document generation, proceed to next step after agreement or fix instructions in update mode
318
- - **Specific questions**: Make decisions easy with options (A/B/C) or comparison tables
319
- - **Dialogue over efficiency**: Get confirmation at early stages to prevent rework
320
-
321
- ### Main Stop Points
322
- - **After requirement-analyzer completion**: Confirm requirement analysis results and questions
323
- - **After PRD creation → document-reviewer execution**: Confirm requirement understanding and consistency (confirm with question list)
324
- - **After ADR creation → document-reviewer execution**: Confirm technical direction and consistency (present multiple options with comparison table)
325
- - On user approval: Main AI (me) updates Status to Accepted
326
- - On user rejection: Main AI (me) updates Status to Rejected
327
- - **After Design Doc creation → document-reviewer execution**: Confirm design content and consistency
328
- - **After work plan creation**: Batch approval for entire implementation phase (confirm with plan summary)
329
-
330
- ### Stop Points During Autonomous Execution
331
- - **When requirement change detected**: Match in requirement change checklist → Return to requirement-analyzer
332
- - **When critical error occurs**: Report error content → Wait for response instructions
333
- - **When user interrupts**: Explicit stop instruction → Confirm situation
334
-
335
- ## 🎯 My Action Checklist
336
-
337
- When receiving a task, I check the following:
338
-
339
- - [ ] Confirmed if there is an orchestrator instruction
340
- - [ ] Determined task type (new feature/fix/research, etc.)
341
- - [ ] Considered appropriate subagent utilization
342
- - [ ] Decided next action according to decision flow
343
- - [ ] Monitored requirement changes and errors during autonomous execution mode