create-ai-project 1.19.0 → 1.20.0

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 (55) hide show
  1. package/.claude/agents-en/acceptance-test-generator.md +9 -2
  2. package/.claude/agents-en/code-verifier.md +14 -4
  3. package/.claude/agents-en/codebase-analyzer.md +176 -0
  4. package/.claude/agents-en/document-reviewer.md +8 -0
  5. package/.claude/agents-en/integration-test-reviewer.md +2 -2
  6. package/.claude/agents-en/quality-fixer-frontend.md +32 -5
  7. package/.claude/agents-en/quality-fixer.md +32 -5
  8. package/.claude/agents-en/task-decomposer.md +23 -2
  9. package/.claude/agents-en/task-executor-frontend.md +48 -3
  10. package/.claude/agents-en/task-executor.md +48 -3
  11. package/.claude/agents-en/technical-designer-frontend.md +7 -0
  12. package/.claude/agents-en/technical-designer.md +7 -0
  13. package/.claude/agents-en/work-planner.md +37 -14
  14. package/.claude/agents-ja/acceptance-test-generator.md +9 -2
  15. package/.claude/agents-ja/code-verifier.md +14 -4
  16. package/.claude/agents-ja/codebase-analyzer.md +176 -0
  17. package/.claude/agents-ja/document-reviewer.md +8 -0
  18. package/.claude/agents-ja/integration-test-reviewer.md +2 -2
  19. package/.claude/agents-ja/quality-fixer-frontend.md +32 -6
  20. package/.claude/agents-ja/quality-fixer.md +32 -6
  21. package/.claude/agents-ja/task-decomposer.md +23 -2
  22. package/.claude/agents-ja/task-executor-frontend.md +48 -3
  23. package/.claude/agents-ja/task-executor.md +48 -3
  24. package/.claude/agents-ja/technical-designer-frontend.md +7 -0
  25. package/.claude/agents-ja/technical-designer.md +7 -0
  26. package/.claude/agents-ja/work-planner.md +37 -14
  27. package/.claude/commands-en/design.md +17 -6
  28. package/.claude/commands-en/front-design.md +11 -3
  29. package/.claude/commands-en/implement.md +2 -0
  30. package/.claude/commands-en/reverse-engineer.md +2 -6
  31. package/.claude/commands-en/update-doc.md +16 -2
  32. package/.claude/commands-ja/design.md +17 -6
  33. package/.claude/commands-ja/front-design.md +11 -3
  34. package/.claude/commands-ja/implement.md +2 -0
  35. package/.claude/commands-ja/reverse-engineer.md +2 -6
  36. package/.claude/commands-ja/update-doc.md +16 -2
  37. package/.claude/skills-en/documentation-criteria/references/design-template.md +20 -0
  38. package/.claude/skills-en/documentation-criteria/references/task-template.md +5 -0
  39. package/.claude/skills-en/integration-e2e-testing/SKILL.md +4 -2
  40. package/.claude/skills-en/integration-e2e-testing/references/e2e-environment-prerequisites.md +70 -0
  41. package/.claude/skills-en/subagents-orchestration-guide/SKILL.md +64 -32
  42. package/.claude/skills-en/task-analyzer/references/skills-index.yaml +2 -0
  43. package/.claude/skills-en/typescript-testing/SKILL.md +39 -0
  44. package/.claude/skills-ja/documentation-criteria/references/design-template.md +20 -0
  45. package/.claude/skills-ja/documentation-criteria/references/task-template.md +5 -0
  46. package/.claude/skills-ja/integration-e2e-testing/SKILL.md +4 -0
  47. package/.claude/skills-ja/integration-e2e-testing/references/e2e-environment-prerequisites.md +70 -0
  48. package/.claude/skills-ja/subagents-orchestration-guide/SKILL.md +64 -32
  49. package/.claude/skills-ja/task-analyzer/references/skills-index.yaml +2 -0
  50. package/.claude/skills-ja/typescript-testing/SKILL.md +39 -0
  51. package/CHANGELOG.md +50 -0
  52. package/README.ja.md +1 -1
  53. package/README.md +1 -1
  54. package/package.json +3 -4
  55. package/.madgerc +0 -14
@@ -9,6 +9,15 @@ skills: frontend-typescript-rules, frontend-typescript-testing, coding-standards
9
9
 
10
10
  CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、タスク完了まで独立した判断で実行します。
11
11
 
12
+ ## フェーズ開始ゲート [BLOCKING — 未チェック項目があればHALT]
13
+
14
+ ☐ [確認済] frontmatterの全必須スキルがロード済み
15
+ ☐ [確認済] タスクファイルが存在し未完了項目がある
16
+ ☐ [確認済] タスクファイルから対象ファイルリストを抽出済み
17
+ ☐ [確認済] 調査対象を読み込み主要な所見を記録済み(タスクファイルに記載がある場合)
18
+
19
+ **強制**: いずれかが未チェックの場合はHALTし、`status: "escalation_needed"`を返却。
20
+
12
21
  ## 必須ルール
13
22
 
14
23
  **タスク登録**: TaskCreateで作業ステップを登録。必ず最初に「スキル制約の確認」、最後に「スキル忠実度の検証」を含める。各完了時にTaskUpdateで更新。
@@ -105,7 +114,13 @@ package.jsonの`packageManager`フィールドに応じた実行コマンドを
105
114
  `docs/plans/tasks/*-task-*.md` パターンのファイルで、未完了チェックボックス `[ ]` が残っているものを選択して実行
106
115
 
107
116
  ### 2. タスク背景理解
108
- **依存成果物の活用**:
117
+ #### 調査対象(タスクファイルに記載がある場合は必須)
118
+ 1. タスクファイル「調査対象」セクションからファイルパスを抽出
119
+ 2. **実装前に**各ファイルをReadツールで読み込む。サーチヒントが付与されている場合(例: `(§ Auth Flow)` や `(authenticateUser関数)`)、そのセクションを特定して重点的に確認
120
+ 3. 各調査対象で観察した主要なインターフェース・関数シグネチャ、制御/データフロー、状態遷移、副作用を記録する — これらの所見が実装をガイドする
121
+ 4. 調査対象のファイルが存在しない、またはパスが古い場合は `reason: "investigation_target_not_found"` でエスカレーション(エスカレーションレスポンス2-3参照)
122
+
123
+ #### 依存成果物
109
124
  1. タスクファイル「Dependencies」セクションからパスを抽出
110
125
  2. 各成果物をReadツールで読み込み
111
126
  3. **具体的な活用方法**:
@@ -252,9 +267,39 @@ Design Doc通りに実装できない場合、以下のJSON形式でエスカレ
252
267
  }
253
268
  ```
254
269
 
255
- ## 完了条件
270
+ #### 2-3. 調査対象未発見エスカレーション
271
+ 調査対象のファイルが存在しない、またはパスが古い場合、以下のJSON形式でエスカレーション:
272
+
273
+ ```json
274
+ {
275
+ "status": "escalation_needed",
276
+ "reason": "Investigation target not found",
277
+ "taskName": "[実行中のタスク名]",
278
+ "escalation_type": "investigation_target_not_found",
279
+ "missingTargets": [
280
+ {
281
+ "path": "[タスクファイルで指定されたパス]",
282
+ "searchHint": "[セクション/関数ヒントがある場合はそれ、なければnull]",
283
+ "searchAttempts": ["パスを直接確認", "同一ディレクトリ内で類似ファイル名を検索"]
284
+ }
285
+ ],
286
+ "user_decision_required": true,
287
+ "suggested_options": [
288
+ "正しいファイルパスを提供",
289
+ "この調査対象を除外して続行",
290
+ "タスクファイルを現在のパスで更新"
291
+ ]
292
+ }
293
+ ```
294
+
295
+ ## 完了ゲート [BLOCKING]
296
+
297
+ ☐ 全タスクチェックボックスがエビデンス付きで完了
298
+ ☐ 調査対象を読み込み、実装前に所見を記録した(タスクファイルに記載がある場合)
299
+ ☐ 実装が調査対象から記録した所見と整合している
300
+ ☐ 最終レスポンスが`completed`または`escalation_needed`ステータスの単一JSON
256
301
 
257
- - [ ] 最終レスポンスが`completed`または`escalation_needed`ステータスの単一JSON
302
+ **強制**: いずれかが未チェックの場合はHALT。`status: "escalation_needed"`を返却。
258
303
 
259
304
  ## 実行原則
260
305
 
@@ -9,6 +9,15 @@ skills: typescript-rules, typescript-testing, coding-standards, project-context,
9
9
 
10
10
  CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、タスク完了まで独立した判断で実行します。
11
11
 
12
+ ## フェーズ開始ゲート [BLOCKING — 未チェック項目があればHALT]
13
+
14
+ ☐ [確認済] frontmatterの全必須スキルがロード済み
15
+ ☐ [確認済] タスクファイルが存在し未完了項目がある
16
+ ☐ [確認済] タスクファイルから対象ファイルリストを抽出済み
17
+ ☐ [確認済] 調査対象を読み込み主要な所見を記録済み(タスクファイルに記載がある場合)
18
+
19
+ **強制**: いずれかが未チェックの場合はHALTし、`status: "escalation_needed"`を返却。
20
+
12
21
  ## 必須ルール
13
22
 
14
23
  **タスク登録**: TaskCreateで作業ステップを登録。必ず最初に「スキル制約の確認」、最後に「スキル忠実度の検証」を含める。各完了時にTaskUpdateで更新。
@@ -102,7 +111,13 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
102
111
  `docs/plans/tasks/*-task-*.md` パターンのファイルから、未完了のチェックボックス `[ ]` が残っているものを選択して実行
103
112
 
104
113
  ### 2. タスク背景理解
105
- **依存成果物の活用**:
114
+ #### 調査対象(タスクファイルに記載がある場合は必須)
115
+ 1. タスクファイル「調査対象」セクションからファイルパスを抽出
116
+ 2. **実装前に**各ファイルをReadツールで読み込む。サーチヒントが付与されている場合(例: `(§ Auth Flow)` や `(authenticateUser関数)`)、そのセクションを特定して重点的に確認
117
+ 3. 各調査対象で観察した主要なインターフェース・関数シグネチャ、制御/データフロー、状態遷移、副作用を記録する — これらの所見が実装をガイドする
118
+ 4. 調査対象のファイルが存在しない、またはパスが古い場合は `reason: "investigation_target_not_found"` でエスカレーション(エスカレーションレスポンス2-3参照)
119
+
120
+ #### 依存成果物
106
121
  1. タスクファイルの「依存」セクションからパスを取得
107
122
  2. 各成果物をReadツールで読み込み
108
123
  3. **具体的活用**:
@@ -249,9 +264,39 @@ Design Doc通りに実装できない場合は以下のJSON形式でエスカレ
249
264
  }
250
265
  ```
251
266
 
252
- ## 完了条件
267
+ #### 2-3. 調査対象未発見エスカレーション
268
+ 調査対象のファイルが存在しない、またはパスが古い場合、以下のJSON形式でエスカレーション:
269
+
270
+ ```json
271
+ {
272
+ "status": "escalation_needed",
273
+ "reason": "Investigation target not found",
274
+ "taskName": "[実行中のタスク名]",
275
+ "escalation_type": "investigation_target_not_found",
276
+ "missingTargets": [
277
+ {
278
+ "path": "[タスクファイルで指定されたパス]",
279
+ "searchHint": "[セクション/関数ヒントがある場合はそれ、なければnull]",
280
+ "searchAttempts": ["パスを直接確認", "同一ディレクトリ内で類似ファイル名を検索"]
281
+ }
282
+ ],
283
+ "user_decision_required": true,
284
+ "suggested_options": [
285
+ "正しいファイルパスを提供",
286
+ "この調査対象を除外して続行",
287
+ "タスクファイルを現在のパスで更新"
288
+ ]
289
+ }
290
+ ```
291
+
292
+ ## 完了ゲート [BLOCKING]
293
+
294
+ ☐ 全タスクチェックボックスがエビデンス付きで完了
295
+ ☐ 調査対象を読み込み、実装前に所見を記録した(タスクファイルに記載がある場合)
296
+ ☐ 実装が調査対象から記録した所見と整合している
297
+ ☐ 最終レスポンスが`completed`または`escalation_needed`ステータスの単一JSON
253
298
 
254
- - [ ] 最終レスポンスが`completed`または`escalation_needed`ステータスの単一JSON
299
+ **強制**: いずれかが未チェックの場合はHALT。`status: "escalation_needed"`を返却。
255
300
 
256
301
  ## 実行原則
257
302
 
@@ -173,6 +173,13 @@ Design Doc作成前に実施:
173
173
  - `reverse-engineer`: 既存フロントエンドアーキテクチャの現状ドキュメント化(reverse-engineerモードセクション参照)
174
174
 
175
175
  - **要件分析結果**: 要件分析の結果(規模判定、技術要件等)
176
+ - **コードベース分析**(任意、コードベース分析エージェントから提供):
177
+ - 提供された場合、「既存コードベース分析」セクションの主要ソースとして使用
178
+ - `existingElements` → Implementation Path MappingとCode Inspection Evidenceに反映
179
+ - `dataModel` → データ関連セクション(スキーマ参照、データ契約)に反映
180
+ - `focusAreas` → フラグされた領域の調査深度を優先
181
+ - `constraints` → 設計上の制約と前提条件に組み込む
182
+ - 分析でカバーされていない領域、または`limitations`でフラグされた領域についてのみ追加調査を実施
176
183
  - **PRD**: PRDドキュメント(存在する場合)
177
184
  - **UI Spec**: UI Specパス(存在する場合、コンポーネント構造と状態設計を継承)
178
185
  - **作成対象ドキュメント**: ADR、Design Doc、または両方
@@ -200,6 +200,13 @@ Design Doc作成前に実施:
200
200
  - `reverse-engineer`: 既存アーキテクチャの現状ドキュメント化(reverse-engineerモードセクション参照)
201
201
 
202
202
  - **要件分析結果**: 要件分析の結果(規模判定、技術要件等)
203
+ - **コードベース分析**(任意、コードベース分析エージェントから提供):
204
+ - 提供された場合、「既存コードベース分析」セクションの主要ソースとして使用
205
+ - `existingElements` → Implementation Path MappingとCode Inspection Evidenceに反映
206
+ - `dataModel` → データ関連セクション(スキーマ参照、データ契約)に反映
207
+ - `focusAreas` → フラグされた領域の調査深度を優先
208
+ - `constraints` → 設計上の制約と前提条件に組み込む
209
+ - 分析でカバーされていない領域、または`limitations`でフラグされた領域についてのみ追加調査を実施
203
210
  - **PRD**: PRDドキュメント(存在する場合)
204
211
  - **作成するドキュメント**: ADR、Design Doc、または両方
205
212
  - **既存アーキテクチャ情報**:
@@ -115,30 +115,50 @@ Design Docの受入条件を基に、段階的に品質を確保。
115
115
 
116
116
  テストスケルトンファイル(統合テスト、E2Eテスト)をReadツールで読み込み、コメントからメタ情報を抽出する。
117
117
 
118
- **抽出対象のコメントパターン**:
119
- - `// @category:` → テスト分類(core-functionality, edge-case, e2e等)
120
- - `// @dependency:` → 依存コンポーネント(フェーズ配置の判断材料)
121
- - `// @complexity:` → 複雑度(high/medium/low、工数見積もりの判断材料)
122
- - `// fast-check:` → Property-Based Test実装パターン(**重要**: このコメントがあるテストは「fast-checkライブラリ使用」と作業計画に明記)
123
- - `// ROI:` → 優先度判断
118
+ **抽出対象のアノテーションパターン**(コメント構文はプロジェクト言語に依存):
119
+ - `@category:` → テスト分類(core-functionality, edge-case, e2e等)
120
+ - `@dependency:` → 依存コンポーネント(フェーズ配置の判断材料)
121
+ - `@complexity:` → 複雑度(high/medium/low、工数見積もりの判断材料)
122
+ - `@real-dependency:` → 非モックセットアップが必要なコンポーネント。環境セットアップ完了後のフェーズに配置
123
+ - `fast-check:` → Property-Based Test実装パターン(**重要**: このコメントがあるテストは「fast-checkライブラリ使用」と作業計画に明記)
124
+ - `ROI:` → 優先度判断
124
125
 
125
126
  #### Step 2: メタ情報の作業計画への反映
126
127
 
127
128
  1. **Property-Based Test(fast-check)の明記**
128
- - `// fast-check:` コメントがあるテスト → 該当タスクの実装手順に以下を追加:
129
+ - `fast-check:` コメントがあるテスト → 該当タスクの実装手順に以下を追加:
129
130
  - 「fast-checkライブラリを使用したproperty-based testを実装」
130
131
  - コメント内のパターン(`fc.property(...)`)をサンプルコードとして記載
131
132
 
132
133
  2. **依存関係に基づくフェーズ配置**
133
- - `// @dependency: none` → 早いフェーズに配置
134
- - `// @dependency: [コンポーネント名]` → 依存コンポーネント実装後のフェーズに配置
135
- - `// @dependency: full-system` → 最終フェーズに配置
134
+ - `@dependency: none` → 早いフェーズに配置
135
+ - `@dependency: [コンポーネント名]` → 依存コンポーネント実装後のフェーズに配置
136
+ - `@dependency: full-system` → 最終フェーズに配置
136
137
 
137
138
  3. **複雑度に基づく工数見積もり**
138
- - `// @complexity: high` → タスクを細分化、または工数を多めに見積もる
139
- - `// @complexity: low` → 複数テストを1タスクにまとめることを検討
139
+ - `@complexity: high` → タスクを細分化、または工数を多めに見積もる
140
+ - `@complexity: low` → 複数テストを1タスクにまとめることを検討
140
141
 
141
- #### Step 3: it.todoの構造分析と分類
142
+ #### Step 3: E2EスケルトンからのEnvironment Prerequisites抽出
143
+
144
+ E2Eテストスケルトンが提供された場合、2段階で環境前提条件をスキャンする:
145
+
146
+ **Stage 1: 前提条件パターンの検出** — 全E2Eスケルトンをスキャンし、検出した全前提条件を列挙:
147
+ - seed data、テストユーザー、サブスクリプション、特定のDB状態に言及する`Preconditions:`または`Arrange:`コメントアノテーション
148
+ - auth/loginセットアップコードと組み合わされた`@dependency: full-system`
149
+ - 環境変数への参照(`E2E_*`, `TEST_*`)
150
+ - テストコード内のHTTP mock/interceptパターンを必要とする外部サービス参照
151
+
152
+ **Stage 2: セットアップタスクの生成** — 検出した各前提条件に対応するPhase 0タスクを作成。一般的なカテゴリ:
153
+ - **Seed data** → 「E2E seed data scriptの作成(テストユーザー、必要なレコード)」
154
+ - **Auth fixture** → 「アプリケーションのログインフローを使用したE2E auth fixtureの実装」
155
+ - **外部サービスモック** → 「E2Eテスト用の外部サービスモック設定」
156
+ - **環境設定** → 「E2E環境変数の定義とセットアップ手順の文書化」
157
+ - **その他の検出された前提条件** → 検出カテゴリに合わせたセットアップタスクを作成
158
+
159
+ 全環境セットアップタスクをPhase 0(実装タスクより前)に配置する。トレーサビリティのため`@category: e2e-setup`を付与。
160
+
161
+ #### Step 4: it.todoの構造分析と分類
142
162
 
143
163
  1. **it.todoの構造分析と分類**
144
164
  - セットアップ系(Mock準備、測定ツール、Helper等)→ Phase 1に最優先配置
@@ -181,7 +201,7 @@ Design Docの技術的依存関係と実装アプローチに基づいてフェ
181
201
  最終フェーズには必ず品質保証(全テスト通過、受入条件達成)を含める。
182
202
 
183
203
  ### テストスケルトンの統合
184
- 計画プロセスのステップ4で定義したテストスケルトン配置ルールに従う。
204
+ 計画プロセス(フェーズ構成ステップ)で定義したテストスケルトン配置ルールに従う。
185
205
 
186
206
  ### タスクの依存関係
187
207
  - 依存関係を明確に定義
@@ -199,6 +219,9 @@ Design Docの技術的依存関係と実装アプローチに基づいてフェ
199
219
  - [ ] 全要件のタスク化
200
220
  - [ ] 最終フェーズに品質保証の存在
201
221
  - [ ] テストスケルトンファイルパスを対応するフェーズに記載(提供時)
222
+ - [ ] E2E環境前提条件に対応済み(E2Eスケルトンが提供された場合)
223
+ - [ ] seed data、auth fixture、外部サービスモックのタスクを生成
224
+ - [ ] 環境セットアップタスクをPhase 0に配置
202
225
  - [ ] テスト設計情報の反映(提供された場合のみ)
203
226
  - [ ] セットアップタスクが最初のフェーズに配置されている
204
227
  - [ ] リスクレベルに基づく優先順位付けが適用されている
@@ -11,7 +11,8 @@ description: Execute from requirement analysis to design document creation
11
11
  **Execution Protocol**:
12
12
  1. **Delegate all work through Agent tool** — invoke sub-agents, pass data between them, and report results (permitted tools: see subagents-orchestration-guide "Orchestrator's Permitted Tools")
13
13
  2. **Follow subagents-orchestration-guide skill design flow exactly**:
14
- - Execute: requirement-analyzer → technical-designer → document-reviewer → design-sync
14
+ - Execute: requirement-analyzer → codebase-analyzer → technical-designer → code-verifier → document-reviewer → design-sync
15
+ - **ADR-only**: Skip codebase-analyzer and code-verifier (these apply to Design Doc only)
15
16
  - **Stop at every `[Stop: ...]` marker** → Wait for user approval before proceeding
16
17
  3. **Scope**: Complete when design documents receive approval
17
18
 
@@ -22,7 +23,9 @@ description: Execute from requirement analysis to design document creation
22
23
  ```
23
24
  Requirements → requirement-analyzer → [Stop: Scale determination]
24
25
 
25
- technical-designerdocument-reviewer
26
+ codebase-analyzertechnical-designer
27
+
28
+ code-verifier → document-reviewer
26
29
 
27
30
  design-sync → [Stop: Design approval]
28
31
  ```
@@ -38,12 +41,16 @@ Once requirements are moderately clarified, analyze with requirement-analyzer an
38
41
 
39
42
  Clearly present design alternatives and trade-offs.
40
43
 
44
+ Execute the process below within design scope. Follow subagents-orchestration-guide Call Examples for codebase-analyzer and code-verifier invocations.
45
+
41
46
  ## Scope Boundaries
42
47
 
43
48
  **Included in this command**:
44
49
  - Requirement analysis with requirement-analyzer
50
+ - Codebase analysis with codebase-analyzer (before technical design)
45
51
  - ADR creation (if architecture changes, new technology, or data flow changes)
46
52
  - Design Doc creation with technical-designer
53
+ - Design Doc verification with code-verifier (before document review)
47
54
  - Document review with document-reviewer
48
55
  - Design Doc consistency verification with design-sync
49
56
 
@@ -52,17 +59,21 @@ Clearly present design alternatives and trade-offs.
52
59
  ## Execution Flow
53
60
 
54
61
  1. requirement-analyzer → Requirement analysis
55
- 2. technical-designerDesign Doc creation
56
- 3. document-reviewerSingle document quality check
57
- 4. User approval (WAIT for approval)
58
- 5. design-syncDesign Doc consistency verification
62
+ 2. codebase-analyzerCodebase analysis (pass requirement-analyzer output)
63
+ 3. technical-designerDesign Doc creation (pass codebase-analyzer output)
64
+ 4. code-verifier Verify Design Doc against existing code
65
+ 5. document-reviewerSingle document quality check (pass code-verifier results)
66
+ 6. User approval (WAIT for approval)
67
+ 7. design-sync → Design Doc consistency verification
59
68
  - IF conflicts found → Report to user → Wait for fix instructions → Fix with technical-designer(update)
60
69
  - IF no conflicts → End
61
70
 
62
71
  ## Completion Criteria
63
72
 
64
73
  - [ ] Executed requirement-analyzer and determined scale
74
+ - [ ] Executed codebase-analyzer and passed results to technical-designer
65
75
  - [ ] Created appropriate design document (ADR or Design Doc) with technical-designer
76
+ - [ ] Executed code-verifier on Design Doc and passed results to document-reviewer (skip for ADR-only)
66
77
  - [ ] Executed document-reviewer and addressed feedback
67
78
  - [ ] Executed design-sync for consistency verification
68
79
  - [ ] Obtained user approval for design document
@@ -20,9 +20,11 @@ Orchestrator invokes sub-agents and passes structured JSON between them.
20
20
 
21
21
  **Included in this command**:
22
22
  - Requirement analysis with requirement-analyzer
23
+ - Codebase analysis with codebase-analyzer (before Design Doc creation)
23
24
  - UI Specification creation with ui-spec-designer (prototype code inquiry included)
24
25
  - ADR creation (if architecture changes, new technology, or data flow changes)
25
26
  - Design Doc creation with technical-designer-frontend
27
+ - Design Doc verification with code-verifier (before document review)
26
28
  - Document review with document-reviewer
27
29
 
28
30
  **Responsibility Boundary**: This command completes with frontend design document (UI Spec/ADR/Design Doc) approval. Work planning and beyond are outside scope.
@@ -63,12 +65,18 @@ Then create the UI Specification:
63
65
  - **[STOP]**: Present UI Spec for user approval
64
66
 
65
67
  ### Step 3: Design Document Creation Phase
68
+ First, analyze the existing codebase:
69
+ - Invoke **codebase-analyzer** using Agent tool
70
+ - `subagent_type: "codebase-analyzer"`, `description: "Codebase analysis"`, `prompt: "requirement_analysis: [JSON from Step 1]. requirements: [user requirements]. Analyze existing codebase for frontend design guidance."`
71
+
66
72
  Create appropriate design documents according to scale determination:
67
73
  - Invoke **technical-designer-frontend** using Agent tool
68
74
  - For ADR: `subagent_type: "technical-designer-frontend"`, `description: "ADR creation"`, `prompt: "Create ADR for [technical decision]"`
69
- - For Design Doc: `subagent_type: "technical-designer-frontend"`, `description: "Design Doc creation"`, `prompt: "Create Design Doc based on requirements. UI Spec is at [ui-spec path]. Inherit component structure and state design from UI Spec."`
70
- - Invoke **document-reviewer** to verify consistency
71
- - `subagent_type: "document-reviewer"`, `description: "Document review"`, `prompt: "Review [document path] for consistency and completeness"`
75
+ - For Design Doc: `subagent_type: "technical-designer-frontend"`, `description: "Design Doc creation"`, `prompt: "Create Design Doc based on requirements. Codebase analysis: [JSON from codebase-analyzer]. UI Spec is at [ui-spec path]. Inherit component structure and state design from UI Spec."`
76
+ - **(Design Doc only)** Invoke **code-verifier** to verify Design Doc against existing code. Skip for ADR.
77
+ - `subagent_type: "code-verifier"`, `description: "Design Doc verification"`, `prompt: "doc_type: design-doc document_path: [Design Doc path] Verify Design Doc against existing code."`
78
+ - Invoke **document-reviewer** to verify consistency (pass code-verifier results for Design Doc; omit for ADR)
79
+ - `subagent_type: "document-reviewer"`, `description: "Document review"`, `prompt: "doc_type: DesignDoc target: [document path] mode: composite code_verification: [JSON from code-verifier] (Design Doc only) Review for consistency and completeness."`
72
80
  - **[STOP]**: Present design alternatives and trade-offs, obtain user approval
73
81
 
74
82
  ## Output Example
@@ -52,6 +52,8 @@ After scale determination, **register all steps of the applicable subagents-orch
52
52
  - [ ] Identified current progress position
53
53
  - [ ] Clarified next step
54
54
  - [ ] Recognized stopping points → **Use AskUserQuestion for confirmation at all Stop points**
55
+ - [ ] codebase-analyzer included before each Design Doc creation
56
+ - [ ] code-verifier included before document-reviewer for each Design Doc
55
57
  - [ ] Understood the 4-step cycle after task execution (task-executor → escalation judgment/follow-up → quality-fixer → commit)
56
58
 
57
59
  **Flow Adherence**: Follow "Autonomous Execution Task Management" in subagents-orchestration-guide skill, managing 4 steps with TaskCreate/TaskUpdate
@@ -142,9 +142,7 @@ prompt: |
142
142
  doc_type: PRD
143
143
  target: $STEP_2_OUTPUT
144
144
  mode: composite
145
-
146
- ## Code Verification Results
147
- $STEP_3_OUTPUT
145
+ code_verification: $STEP_3_OUTPUT
148
146
 
149
147
  ## Additional Review Focus
150
148
  - Alignment between PRD claims and verification evidence
@@ -308,9 +306,7 @@ prompt: |
308
306
  doc_type: DesignDoc
309
307
  target: $STEP_7_OUTPUT or $STEP_7_FRONTEND_OUTPUT
310
308
  mode: composite
311
-
312
- ## Code Verification Results
313
- $STEP_8_OUTPUT
309
+ code_verification: $STEP_8_OUTPUT
314
310
 
315
311
  ## Parent PRD
316
312
  $APPROVED_PRD_PATH
@@ -25,8 +25,8 @@ description: Update existing design documents (Design Doc / PRD / ADR) with revi
25
25
  Target document → [Stop: Confirm changes]
26
26
 
27
27
  technical-designer / technical-designer-frontend / prd-creator (update mode)
28
-
29
- document-reviewer → [Stop: Review approval]
28
+ (Design Doc only)
29
+ code-verifier → document-reviewer → [Stop: Review approval]
30
30
  ↓ (Design Doc only)
31
31
  design-sync → [Stop: Final approval]
32
32
  ```
@@ -113,6 +113,18 @@ prompt: |
113
113
 
114
114
  ### Step 5: Document Review [Stop]
115
115
 
116
+ **For Design Doc updates only**: Before document-reviewer, invoke code-verifier:
117
+ ```
118
+ subagent_type: code-verifier
119
+ description: "Verify updated Design Doc"
120
+ prompt: |
121
+ doc_type: design-doc
122
+ document_path: [path from Step 1]
123
+ Verify the updated Design Doc against current codebase.
124
+ ```
125
+
126
+ **Store output as**: `$CODE_VERIFICATION_OUTPUT`
127
+
116
128
  Invoke document-reviewer:
117
129
  ```
118
130
  subagent_type: document-reviewer
@@ -123,6 +135,7 @@ prompt: |
123
135
  doc_type: [Design Doc / PRD / ADR]
124
136
  target: [path from Step 1]
125
137
  mode: standard
138
+ code_verification: $CODE_VERIFICATION_OUTPUT (Design Doc only, omit for PRD/ADR)
126
139
 
127
140
  Focus on:
128
141
  - Consistency of updated sections with rest of document
@@ -191,6 +204,7 @@ prompt: |
191
204
  - [ ] Identified target document
192
205
  - [ ] Clarified change content with user
193
206
  - [ ] Updated document with appropriate agent (update mode)
207
+ - [ ] Executed code-verifier before document-reviewer (Design Doc only)
194
208
  - [ ] Executed document-reviewer and addressed feedback
195
209
  - [ ] Executed design-sync for consistency verification (Design Doc only)
196
210
  - [ ] Obtained user approval for updated document
@@ -11,7 +11,8 @@ description: 要件分析から設計書作成まで実行
11
11
  **実行プロトコル**:
12
12
  1. **全作業をAgentツールでサブエージェントに委譲** — サブエージェントの呼び出し、データの受け渡し、結果の報告(許可ツール: subagents-orchestration-guideスキル「オーケストレーターの許可ツール」参照)
13
13
  2. **subagents-orchestration-guideスキルの設計フローに厳密に従う**:
14
- - 実行: requirement-analyzer → technical-designer → document-reviewer → design-sync
14
+ - 実行: requirement-analyzer → codebase-analyzer → technical-designer → code-verifier → document-reviewer → design-sync
15
+ - **ADRのみの場合**: codebase-analyzerとcode-verifierはスキップ(Design Docにのみ適用)
15
16
  - **`[停止: ...]`マーカーで必ず停止** → 次に進む前にユーザー承認を待つ
16
17
  3. **スコープ**: 設計書が承認されたら完了
17
18
 
@@ -22,7 +23,9 @@ description: 要件分析から設計書作成まで実行
22
23
  ```
23
24
  要件 → requirement-analyzer → [停止: 規模判定]
24
25
 
25
- technical-designerdocument-reviewer
26
+ codebase-analyzertechnical-designer
27
+
28
+ code-verifier → document-reviewer
26
29
 
27
30
  design-sync → [停止: 設計承認]
28
31
  ```
@@ -38,12 +41,16 @@ description: 要件分析から設計書作成まで実行
38
41
 
39
42
  設計の代替案とトレードオフを明確に提示します。
40
43
 
44
+ subagents-orchestration-guideのCall Examplesに従い、codebase-analyzerとcode-verifierを呼び出す。
45
+
41
46
  ## スコープ境界
42
47
 
43
48
  **実行内容**:
44
49
  - requirement-analyzerによる要件分析
50
+ - codebase-analyzerによるコードベース分析(技術設計の前に実施)
45
51
  - ADR作成(アーキテクチャ変更、新技術、データフロー変更がある場合)
46
52
  - technical-designerによるDesign Doc作成
53
+ - code-verifierによるDesign Doc検証(ドキュメントレビューの前に実施)
47
54
  - document-reviewerによるドキュメントレビュー
48
55
  - design-syncによるDesign Doc間整合性検証
49
56
 
@@ -52,17 +59,21 @@ description: 要件分析から設計書作成まで実行
52
59
  ## 実行フロー
53
60
 
54
61
  1. requirement-analyzer → 要件分析
55
- 2. technical-designerDesign Doc作成
56
- 3. document-reviewer単一ドキュメント品質チェック
57
- 4. ユーザー承認(承認を待つ)
58
- 5. design-syncDesign Doc間整合性検証
62
+ 2. codebase-analyzerコードベース分析(要件分析結果を入力)
63
+ 3. technical-designerDesign Doc作成(codebase-analyzer出力を入力)
64
+ 4. code-verifier → Design Docを既存コードに対して検証
65
+ 5. document-reviewer単一ドキュメント品質チェック(code-verifier結果を入力)
66
+ 6. ユーザー承認(承認を待つ)
67
+ 7. design-sync → Design Doc間整合性検証
59
68
  - 矛盾あり → ユーザーに報告 → 修正指示待ち → technical-designer(update)で修正
60
69
  - 矛盾なし → 終了
61
70
 
62
71
  ## 完了条件
63
72
 
64
73
  - [ ] requirement-analyzerを実行し規模を判定した
74
+ - [ ] codebase-analyzerを実行し結果をtechnical-designerに渡した
65
75
  - [ ] technical-designerで適切な設計書(ADRまたはDesign Doc)を作成した
76
+ - [ ] code-verifierでDesign Docを検証し結果をdocument-reviewerに渡した(ADRのみの場合はスキップ)
66
77
  - [ ] document-reviewerを実行しフィードバックに対応した
67
78
  - [ ] design-syncで整合性検証を実行した
68
79
  - [ ] ユーザーから設計書の承認を取得した
@@ -20,9 +20,11 @@ description: 要件分析からフロントエンド設計ドキュメント作
20
20
 
21
21
  **実行内容**:
22
22
  - requirement-analyzerによる要件分析
23
+ - codebase-analyzerによるコードベース分析(Design Doc作成前に実施)
23
24
  - ui-spec-designerによるUI Spec作成(プロトタイプコード確認を含む)
24
25
  - ADR作成(アーキテクチャ変更、新技術、データフロー変更がある場合)
25
26
  - technical-designer-frontendによるDesign Doc作成
27
+ - code-verifierによるDesign Doc検証(ドキュメントレビューの前に実施)
26
28
  - document-reviewerによるドキュメントレビュー
27
29
 
28
30
  **責務境界**: このコマンドはフロントエンド設計ドキュメント(UI Spec/ADR/Design Doc)の承認で責務完了。作業計画以降はスコープ外。
@@ -63,12 +65,18 @@ UI Specを作成:
63
65
  - **[停止]**: UI Specをユーザーに提示し承認を取得
64
66
 
65
67
  ### Step 3: 設計ドキュメント作成フェーズ
68
+ まず既存コードベースを分析:
69
+ - Agentツールで**codebase-analyzer**を呼び出す
70
+ - `subagent_type: "codebase-analyzer"`, `description: "コードベース分析"`, `prompt: "requirement_analysis: [Step 1のJSON]. requirements: [ユーザー要件]. フロントエンド設計ガイダンスのため既存コードベースを分析。"`
71
+
66
72
  規模判定に応じて適切な設計ドキュメントを作成:
67
73
  - Agentツールで**technical-designer-frontend**を呼び出す
68
74
  - ADRの場合: `subagent_type: "technical-designer-frontend"`, `description: "ADR作成"`, `prompt: "[技術決定]のADRを作成"`
69
- - Design Docの場合: `subagent_type: "technical-designer-frontend"`, `description: "Design Doc作成"`, `prompt: "要件に基づいてDesign Docを作成。UI Specは[ui-specパス]。UI Specのコンポーネント構造と状態設計を継承。"`
70
- - **document-reviewer**で整合性検証
71
- - `subagent_type: "document-reviewer"`, `description: "ドキュメントレビュー"`, `prompt: "[ドキュメントパス]の整合性と完成度をレビュー"`
75
+ - Design Docの場合: `subagent_type: "technical-designer-frontend"`, `description: "Design Doc作成"`, `prompt: "要件に基づいてDesign Docを作成。コードベース分析: [codebase-analyzerのJSON]。UI Specは[ui-specパス]。UI Specのコンポーネント構造と状態設計を継承。"`
76
+ - **(Design Docのみ)** **code-verifier**でDesign Docを既存コードに対して検証。ADRの場合はスキップ。
77
+ - `subagent_type: "code-verifier"`, `description: "Design Doc検証"`, `prompt: "doc_type: design-doc document_path: [Design Docパス] Design Docを既存コードに対して検証。"`
78
+ - **document-reviewer**で整合性検証(Design Docの場合はcode-verifier結果を渡す。ADRの場合は省略)
79
+ - `subagent_type: "document-reviewer"`, `description: "ドキュメントレビュー"`, `prompt: "doc_type: DesignDoc target: [ドキュメントパス] mode: composite code_verification: [code-verifierのJSON](Design Docのみ) 整合性と完成度をレビュー。"`
72
80
  - **[停止]**: 設計の選択肢とトレードオフを提示し、ユーザー承認を取得
73
81
 
74
82
  ## 出力例
@@ -52,6 +52,8 @@ requirement-analyzerの`crossLayerScope`がレイヤー横断(backend + fronte
52
52
  - [ ] 現在の進捗位置を特定した
53
53
  - [ ] 次のステップを明確にした
54
54
  - [ ] 停止ポイントを認識した → **全ての停止ポイントでAskUserQuestionを使用**
55
+ - [ ] 各Design Doc作成前にcodebase-analyzerを含めた
56
+ - [ ] 各Design DocレビューでDesign Doc前にcode-verifierを含めた
55
57
  - [ ] タスク実行後の4ステップサイクル(task-executor → エスカレーション判定・フォローアップ → quality-fixer → commit)を理解した
56
58
 
57
59
  **フロー厳守**: subagents-orchestration-guideスキルの「自律実行中のタスク管理」に従い、TaskCreate/TaskUpdateで4ステップを管理する
@@ -142,9 +142,7 @@ prompt: |
142
142
  doc_type: PRD
143
143
  target: $STEP_2_OUTPUT
144
144
  mode: composite
145
-
146
- ## コード検証結果
147
- $STEP_3_OUTPUT
145
+ code_verification: $STEP_3_OUTPUT
148
146
 
149
147
  ## 追加レビュー観点
150
148
  - PRD主張と検証evidenceの整合性
@@ -308,9 +306,7 @@ prompt: |
308
306
  doc_type: DesignDoc
309
307
  target: $STEP_7_OUTPUT または $STEP_7_FRONTEND_OUTPUT
310
308
  mode: composite
311
-
312
- ## コード検証結果
313
- $STEP_8_OUTPUT
309
+ code_verification: $STEP_8_OUTPUT
314
310
 
315
311
  ## 親PRD
316
312
  $APPROVED_PRD_PATH
@@ -25,8 +25,8 @@ description: 既存設計ドキュメント(Design Doc / PRD / ADR)をレビ
25
25
  対象ドキュメント → [停止: 変更内容確認]
26
26
 
27
27
  technical-designer / technical-designer-frontend / prd-creator(updateモード)
28
-
29
- document-reviewer → [停止: レビュー承認]
28
+ ↓(Design Docのみ)
29
+ code-verifier → document-reviewer → [停止: レビュー承認]
30
30
  ↓(Design Docのみ)
31
31
  design-sync → [停止: 最終承認]
32
32
  ```
@@ -113,6 +113,18 @@ prompt: |
113
113
 
114
114
  ### ステップ5: ドキュメントレビュー [停止]
115
115
 
116
+ **Design Doc更新時のみ**: document-reviewerの前にcode-verifierを呼び出す:
117
+ ```
118
+ subagent_type: code-verifier
119
+ description: "更新されたDesign Docを検証"
120
+ prompt: |
121
+ doc_type: design-doc
122
+ document_path: [ステップ1のパス]
123
+ 更新されたDesign Docを現在のコードベースに対して検証する。
124
+ ```
125
+
126
+ **出力を保存**: `$CODE_VERIFICATION_OUTPUT`
127
+
116
128
  document-reviewerを呼び出す:
117
129
  ```
118
130
  subagent_type: document-reviewer
@@ -123,6 +135,7 @@ prompt: |
123
135
  doc_type: [Design Doc / PRD / ADR]
124
136
  target: [ステップ1のパス]
125
137
  mode: standard
138
+ code_verification: $CODE_VERIFICATION_OUTPUT(Design Docのみ、PRD/ADRでは省略)
126
139
 
127
140
  注力ポイント:
128
141
  - 更新セクションとドキュメント全体の整合性
@@ -191,6 +204,7 @@ prompt: |
191
204
  - [ ] 対象ドキュメントを特定した
192
205
  - [ ] ユーザーと変更内容を確認した
193
206
  - [ ] 適切なエージェントでドキュメントを更新した(updateモード)
207
+ - [ ] code-verifierをdocument-reviewerの前に実行した(Design Docのみ)
194
208
  - [ ] document-reviewerを実行しフィードバックに対応した
195
209
  - [ ] design-syncで整合性検証を実行した(Design Docのみ)
196
210
  - [ ] 更新されたドキュメントのユーザー承認を取得した
@@ -266,6 +266,26 @@ Evaluate the following for this feature's trust boundaries and data flow:
266
266
 
267
267
  Mark items as N/A with brief rationale when the feature has no relevant trust boundary.
268
268
 
269
+ ## Test Boundaries
270
+
271
+ ### Mock Boundary Decisions
272
+
273
+ | Component/Dependency | Mock? | Rationale |
274
+ |---------------------|-------|-----------|
275
+ | [External API / DB / File system / etc.] | [Yes/No] | [Why this boundary was chosen] |
276
+
277
+ ### Data Layer Testing Strategy
278
+
279
+ - **Schema dependencies**: [List tables/models this feature reads from or writes to, with paths to their definitions]
280
+ - **Test data approach**: [How test data is provided — fixtures, factories, seed scripts, or real database]
281
+ - **Mock limitations acknowledged**: [What cannot be reliably tested with mocks alone for this feature]
282
+
283
+ Mark as N/A with brief rationale when the feature has no data layer dependencies.
284
+
285
+ ### Integration Verification Points
286
+
287
+ - [List critical integration points that require testing beyond unit-level mocks]
288
+
269
289
  ## Alternative Solutions
270
290
 
271
291
  ### Alternative 1