create-ai-project 1.22.0 → 1.23.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 (47) hide show
  1. package/.claude/agents-en/code-reviewer.md +4 -39
  2. package/.claude/agents-en/code-verifier.md +3 -22
  3. package/.claude/agents-en/document-reviewer.md +26 -68
  4. package/.claude/agents-en/task-decomposer.md +31 -0
  5. package/.claude/agents-en/task-executor-frontend.md +15 -1
  6. package/.claude/agents-en/task-executor.md +15 -1
  7. package/.claude/agents-en/technical-designer-frontend.md +68 -11
  8. package/.claude/agents-en/technical-designer.md +37 -11
  9. package/.claude/agents-en/ui-analyzer.md +313 -0
  10. package/.claude/agents-en/ui-spec-designer.md +3 -1
  11. package/.claude/agents-en/work-planner.md +26 -1
  12. package/.claude/agents-ja/code-reviewer.md +4 -39
  13. package/.claude/agents-ja/code-verifier.md +3 -22
  14. package/.claude/agents-ja/document-reviewer.md +26 -68
  15. package/.claude/agents-ja/task-decomposer.md +31 -0
  16. package/.claude/agents-ja/task-executor-frontend.md +15 -1
  17. package/.claude/agents-ja/task-executor.md +15 -1
  18. package/.claude/agents-ja/technical-designer-frontend.md +68 -11
  19. package/.claude/agents-ja/technical-designer.md +37 -11
  20. package/.claude/agents-ja/ui-analyzer.md +313 -0
  21. package/.claude/agents-ja/ui-spec-designer.md +3 -1
  22. package/.claude/agents-ja/work-planner.md +26 -1
  23. package/.claude/commands-en/build.md +9 -7
  24. package/.claude/commands-en/design.md +70 -44
  25. package/.claude/commands-en/front-build.md +9 -7
  26. package/.claude/commands-en/front-design.md +87 -58
  27. package/.claude/commands-ja/build.md +9 -7
  28. package/.claude/commands-ja/design.md +69 -43
  29. package/.claude/commands-ja/front-build.md +9 -7
  30. package/.claude/commands-ja/front-design.md +95 -64
  31. package/.claude/skills-en/coding-standards/SKILL.md +1 -0
  32. package/.claude/skills-en/documentation-criteria/SKILL.md +1 -0
  33. package/.claude/skills-en/documentation-criteria/references/design-template.md +54 -1
  34. package/.claude/skills-en/documentation-criteria/references/plan-template.md +16 -4
  35. package/.claude/skills-en/documentation-criteria/references/task-template.md +11 -1
  36. package/.claude/skills-en/subagents-orchestration-guide/SKILL.md +3 -1
  37. package/.claude/skills-ja/coding-standards/SKILL.md +1 -0
  38. package/.claude/skills-ja/documentation-criteria/SKILL.md +1 -0
  39. package/.claude/skills-ja/documentation-criteria/references/design-template.md +54 -1
  40. package/.claude/skills-ja/documentation-criteria/references/plan-template.md +16 -4
  41. package/.claude/skills-ja/documentation-criteria/references/task-template.md +11 -1
  42. package/.claude/skills-ja/subagents-orchestration-guide/SKILL.md +3 -1
  43. package/CHANGELOG.md +28 -0
  44. package/CLAUDE.en.md +10 -1
  45. package/CLAUDE.ja.md +12 -3
  46. package/CLAUDE.md +12 -3
  47. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: 要件分析からフロントエンド設計ドキュメント作成まで実行
2
+ description: コードベース分析からフロントエンド設計ドキュメント作成まで実行
3
3
  ---
4
4
 
5
5
  **コマンドコンテキスト**: このコマンドはフロントエンド設計フェーズ専用です。
@@ -9,105 +9,136 @@ description: 要件分析からフロントエンド設計ドキュメント作
9
9
  **コアアイデンティティ**: 「私はオーケストレーターである。」(subagents-orchestration-guideスキル参照)
10
10
 
11
11
  **実行プロトコル**:
12
- 1. **全ての作業をサブエージェントに委譲** — サブエージェントを呼び出し、データを橋渡しし、結果を報告する
13
- 2. **以下のフロントエンド設計フローに従う**(このコマンドは中規模/大規模のフロントエンドを対象。UI Specはコードベース分析の前に作成する コンポーネント構造が技術設計に反映されるため):
14
- - 実行: requirement-analyzer → ui-spec-designercodebase-analyzer → technical-designer-frontend → code-verifier → document-reviewer → design-sync
15
- - **`[停止: ...]`マーカーごとに停止** ユーザー承認を待つ
12
+ 1. **全ての作業をサブエージェントに委譲** — サブエージェントを呼び出し、データを橋渡しし、結果を報告する。唯一の例外はStep 1のスコープブートストラップで、シードファイルの特定に限定したレシピ内オーケストレータータスク。
13
+ 2. **以下のフロントエンド設計フローを順に実行**(このコマンドは中規模/大規模のフロントエンドを対象)分岐のない固定の線形シーケンス:
14
+ - 実行: スコープブートストラップ → codebase-analyzer → [停止: スコープ確認] → ui-analyzerui-spec-designer → technical-designer-frontend → code-verifier → document-reviewer → design-sync
15
+ - technical-designer-frontendは、設計にアーキテクチャ決定が伴う場合(documentation-criteriaに従う)に前提となるADRを作成する。ADRはDesign Docを置き換えない フローは常にDesign Doc作成と検証チェーン全体を通過する
16
+ - **`[停止: ...]`マーカーごとに停止** → 次に進む前にユーザー承認を待つ
16
17
  3. **スコープ**: 設計ドキュメントの承認をもって完了
17
18
 
18
- **重要**: document-reviewer、design-sync、subagents-orchestration-guideスキルフローで定義された全ての停止ポイントを実行すること各ステップが品質ゲートとして機能する。スキップは検出されない不整合のリスクにつながる。
19
+ **subagents-orchestration-guideの利用**: オーケストレーション原則とScale Determination表を参照する。このコマンドは独自の開始順序を定義する ガイドのrequirement-analyzer起点フローはここでは適用しない。
20
+
21
+ **重要**: document-reviewer、design-sync(Design Docの場合)、全ての停止ポイントを実行する — 各々が品質ゲートとして機能する。スキップは検出されない不整合のリスクにつながる。
19
22
 
20
23
  ## ワークフロー概要
21
24
 
22
25
  ```
23
- 要件 → requirement-analyzer → [停止: 規模判定]
24
-
25
- ui-spec-designer → [停止: UI Spec承認]
26
-
27
- codebase-analyzertechnical-designer-frontend
28
-
29
- code-verifier → document-reviewer
30
-
31
- design-sync[停止: 設計承認]
26
+ 要件 → スコープブートストラップ → codebase-analyzer → [停止: スコープ確認]
27
+
28
+ ui-analyzer
29
+
30
+ ui-spec-designer[停止: UI Spec承認]
31
+
32
+ technical-designer-frontend
33
+
34
+ code-verifierdocument-reviewer
35
+
36
+ design-sync → [停止: 設計承認]
32
37
  ```
33
38
 
34
39
  ## スコープ境界
35
40
 
36
41
  **実行内容**:
37
- - requirement-analyzerによる要件分析
38
- - codebase-analyzerによるコードベース分析(技術設計の前に実施)
42
+ - スコープブートストラップ: codebase-analyzerが値の入った入力を得られるようシードファイルを特定する
43
+ - codebase-analyzerによるコードベース分析(フロントエンド設計フェーズの入口)
44
+ - codebase-analyzerの所見に基づくユーザーとのスコープ確認
45
+ - ui-analyzerによるUI事実収集
39
46
  - ui-spec-designerによるUI Spec作成(プロトタイプコード確認を含む)
40
- - ADR作成(アーキテクチャ変更、新技術、データフロー変更がある場合)
47
+ - ADR作成(アーキテクチャ変更、新技術、データフロー変更が伴う場合、Design Docの前提として)
41
48
  - technical-designer-frontendによるDesign Doc作成
42
49
  - code-verifierによるDesign Doc検証(ドキュメントレビューの前に実施)
43
50
  - document-reviewerによるドキュメントレビュー
44
- - design-syncによるDesign Doc横断整合性検証
51
+ - design-syncによるDesign Doc間整合性検証
45
52
 
46
53
  **責務境界**: このコマンドはフロントエンド設計ドキュメント(UI Spec/ADR/Design Doc)の承認で責務完了。作業計画以降はスコープ外。
47
54
 
55
+ ## 実行フロー
56
+
48
57
  要件: $ARGUMENTS
49
58
 
50
- ## 実行フロー
59
+ ### Step 1: スコープブートストラップ
60
+ codebase-analyzerは値の入った`requirement_analysis.affectedFiles`を必要とする。そのシードを、軽量なオーケストレーター内タスクで構築する — ファイルの特定のみで、深い読み込みや設計判断は行わない:
61
+
62
+ 1. ユーザー要件から候補キーワード(機能名、ドメイン名詞、識別子)を抽出する。
63
+ 2. Bash(`rg`、`rg`が使えない場合は`grep`)で、それらのキーワードに一致するファイルをリポジトリ内で検索する。
64
+ 3. 一致したファイルパスをシード`affectedFiles`として収集する。
65
+ 4. **検索結果が0件の場合**: 設計対象のファイルまたはモジュールをユーザーに確認し(AskUserQuestion)、その回答を`affectedFiles`とする。関連コードが存在しないとユーザーが確認した場合は、コードベース起点の設計が適用できない旨を報告し、進め方をユーザーと確認する。
66
+ 5. **検索結果が約20件を超える場合**: キーワードが広すぎる。最も関連性の高い候補をユーザーに提示し(AskUserQuestion)、シード`affectedFiles`を確認してから進む。
67
+
68
+ このステップはシードファイルの特定のみを行う。ファイルの全文読み込み、依存関係の追跡、分析はcodebase-analyzerの責務である。
69
+
70
+ ### Step 2: コードベース分析
71
+ - Agentツールで**codebase-analyzer**を呼び出す
72
+ - `subagent_type: "codebase-analyzer"`, `description: "コードベース分析"`
73
+ - `prompt`: `requirements`(ユーザー要件の原文)と`requirement_analysis`(`affectedFiles`(Step 1のシード)、`purpose`(ユーザー要件)、`scale`(シードファイル数にScale Determination表を当てた暫定値)、`technicalConsiderations`(`{ constraints: [], risks: [], dependencies: [] }`)を含むJSONオブジェクト)を含める。フロントエンド設計ガイダンスのため既存コードベースを分析する。
51
74
 
52
- ### Step 1: 要件分析フェーズ
53
- 設計への影響が深いことを考慮し、まず対話により要件の背景と目的を理解:
54
- - 何の問題を解決したいか
55
- - 期待する成果と成功基準
56
- - 既存システムとの関係
75
+ ### Step 3: スコープ確認
76
+ codebase-analyzerが返ったら、設計作業の前にユーザーとスコープを確認する。AskUserQuestionを使う。
57
77
 
58
- ユーザーが上記3つの質問に回答した後、設計スコープ内で以下のプロセスを実行する。codebase-analyzerとcode-verifierの呼び出しはsubagents-orchestration-guideCall Examplesに従う。
59
- - Agentツールで**requirement-analyzer**を呼び出す
60
- - `subagent_type: "requirement-analyzer"`
61
- - `description: "要件分析"`
62
- - `prompt: "要件: [ユーザー要件] 要件分析と規模判定を実施してください"`
63
- - **[停止]**: 要件分析結果を確認し、質問事項に対応
78
+ codebase-analyzerのJSONを出典として以下を提示する:
79
+ - **対象ファイル/モジュール**: `analysisScope.filesAnalyzed`と、それらが属するモジュール
80
+ - **影響を受けるレイヤー**: `analysisScope.categoriesDetected`と`focusAreas`から導出される、影響を受けるレイヤー
81
+ - **不明点/前提**: `limitations`と、codebase-analyzerが記録した前提
82
+ - **設計前の質問事項**: 設計を進める前にユーザーの回答が必要な未解決点
64
83
 
65
- ### Step 2: UI Specフェーズ
66
- 要件分析承認後、プロトタイプコードについてユーザーに確認:
84
+ ユーザーに以下から1つを選んでもらう:
85
+ - **このスコープで設計を進める** — Step 4へ進む
86
+ - **スコープを修正して再実行** — 修正したスコープでStep 1に戻る。ユーザーが修正後のファイルまたはモジュールを指定した場合は、検索で導出し直さず、それをStep 1のシードとして直接使う
87
+ - **追加ヒアリングののち進める** — 不足している回答を集めてからStep 4へ進む
88
+
89
+ ユーザーがスコープを確認したら、確認済みの対象ファイル数を数え、Scale Determination表から規模を設定する。この確認済みの規模はStep 2の暫定値に優先する。
90
+
91
+ **[停止]**: ユーザーの選択を待ってから進む。
92
+
93
+ ### Step 4: UI事実収集
94
+ - Agentツールで**ui-analyzer**を呼び出す
95
+ - `subagent_type: "ui-analyzer"`, `description: "UI事実収集"`
96
+ - `prompt`: `requirements`(ユーザー要件)と`requirement_analysis`(`affectedFiles`(Step 2のcodebase-analyzer出力の`analysisScope.filesAnalyzed`・`analysisScope.tracedDependencies`・`focusAreas[].relatedFiles`のパスの和集合)、`purpose`(ユーザー要件)、`scale`(Step 3の確認済み規模)、`technicalConsiderations`(`{ constraints: [], risks: [], dependencies: [] }`)を含むJSONオブジェクト)を含める。ui-analyzerはproject-contextのExternal Resourcesセクションを読み、宣言されたアクセス手段で外部UIソースを取得し、既存のUIコードベースを分析する。
97
+
98
+ codebase-analyzerのJSON(Step 2)とui-analyzerのJSON(Step 4)は、ui-spec-designerとtechnical-designer-frontendで再利用される。
99
+
100
+ ### Step 5: UI Specフェーズ
101
+ プロトタイプコードについてユーザーに確認する。
67
102
 
68
103
  **ユーザーに確認**: 「この機能のプロトタイプコードはありますか?ある場合はコードへのパスを教えてください。プロトタイプはUI Specの参考資料として`docs/ui-spec/assets/`に配置されます。」
69
104
 
70
105
  - **[停止]**: プロトタイプコードの有無についてユーザーの回答を待つ
71
106
 
72
- UI Specを作成:
107
+ その後、UI Specを作成する:
73
108
  - Agentツールで**ui-spec-designer**を呼び出す
74
- - `subagent_type: "ui-spec-designer"`
75
- - `description: "UI Spec作成"`
76
- - PRDあり+プロトタイプあり: `prompt: "[パス]のPRDからUI Specを作成。プロトタイプコードは[ユーザー提供パス]。プロトタイプをdocs/ui-spec/assets/{feature-name}/に配置"`
77
- - PRDあり+プロトタイプなし: `prompt: "[パス]のPRDからUI Specを作成。プロトタイプコードなし。"`
78
- - PRDなし(中規模): `prompt: "以下の要件に基づいてUI Specを作成: [requirement-analyzerの出力を渡す]。PRDなし。"`(プロトタイプパスがあれば追加)
79
- - **document-reviewer**でUI Specを検証
109
+ - `subagent_type: "ui-spec-designer"`, `description: "UI Spec作成"`
110
+ - 以下を含めてプロンプトを構築する: ソース(この機能の既存PRDが`docs/prd/`にあればそれ。なければ、ユーザー要件にStep 2のcodebase-analyzer JSONとStep 3の確認済みスコープを添えたもの)、`ui_analysis`(Step 4のui-analyzer JSON)、提供された場合のプロトタイプパス。プロトタイプは`docs/ui-spec/assets/{feature-name}/`に配置する。
111
+ - **document-reviewer**でUI Specを検証する
80
112
  - `subagent_type: "document-reviewer"`, `description: "UI Specレビュー"`, `prompt: "doc_type: UISpec target: [ui-specパス] 整合性と完全性をレビュー"`
81
- - **[停止]**: UI Specをユーザーに提示し承認を取得
82
-
83
- ### Step 3: 設計ドキュメント作成フェーズ
84
- まず既存コードベースを分析:
85
- - Agentツールで**codebase-analyzer**を呼び出す
86
- - `subagent_type: "codebase-analyzer"`, `description: "コードベース分析"`, `prompt: "requirement_analysis: [Step 1のJSON]. requirements: [ユーザー要件]. フロントエンド設計ガイダンスのため既存コードベースを分析。"`
113
+ - **[停止]**: UI Specをユーザーに提示し承認を取得する
87
114
 
88
- 規模判定に応じて適切な設計ドキュメントを作成。technical-designer-frontendは技術選択・データフロー設計について少なくとも2つの選択肢をトレードオフとともに提示:
89
- - Agentツールで**technical-designer-frontend**を呼び出す
90
- - ADRの場合: `subagent_type: "technical-designer-frontend"`, `description: "ADR作成"`, `prompt: "[技術決定]のADRを作成。少なくとも2つの選択肢をトレードオフとともに提示。"`
91
- - Design Docの場合: `subagent_type: "technical-designer-frontend"`, `description: "Design Doc作成"`, `prompt: "要件に基づいてDesign Docを作成。コードベース分析: [codebase-analyzerのJSON]。UI Specは[ui-specパス]。UI Specのコンポーネント構造と状態設計を継承。少なくとも2つのアーキテクチャ選択肢をトレードオフとともに提示。"`
92
- - **(Design Docのみ)** **code-verifier**でDesign Docを既存コードに対して検証。ADRの場合はスキップ。
115
+ ### Step 6: 設計ドキュメント作成フェーズ
116
+ - Agentツールで**technical-designer-frontend**を呼び出し、設計ドキュメントを作成する。documentation-criteriaに従いDesign Docを作成する。設計にアーキテクチャ決定(アーキテクチャ変更、新技術、データフロー変更)が伴う場合は、前提となるADRを先に作成する。
117
+ - `subagent_type: "technical-designer-frontend"`, `description: "設計ドキュメント作成"`, `prompt: "この要件の設計ドキュメントを作成。documentation-criteriaに従いDesign Docを作成し、設計にアーキテクチャ決定が伴う場合は前提となるADRを先に作成。要件: [ユーザー要件の原文]。コードベース分析: [Step 2codebase-analyzer JSON]。UI分析: [Step 4のui-analyzer JSON]。UI Specは[ui-specパス]。UI Specのコンポーネント構造と状態設計を継承。少なくとも2つのアーキテクチャ選択肢をトレードオフとともに提示。"`
118
+ - **code-verifier**でDesign Docを既存コードに対して検証する。
93
119
  - `subagent_type: "code-verifier"`, `description: "Design Doc検証"`, `prompt: "doc_type: design-doc document_path: [Design Docパス] mode: pre-implementation (code_paths省略 — verifierがドキュメントからスコープを発見). Design Docを既存コードに対して検証。"`
94
- - **document-reviewer**で整合性検証(Design Docの場合はcode-verifier結果を渡す。ADRの場合は省略)
95
- - `subagent_type: "document-reviewer"`, `description: "ドキュメントレビュー"`, `prompt: "doc_type: DesignDoc target: [ドキュメントパス] mode: composite code_verification: [code-verifierのJSON](Design Docのみ) 整合性と完全性をレビュー。"`
96
- ### Step 4: 設計整合性検証
97
- - Agentツールで**design-sync**を呼び出す
120
+ - technical-designer-frontendが作成した各ドキュメント(Design Doc、および作成された場合のADR)に対して**document-reviewer**を呼び出す。
121
+ - Design Doc: `subagent_type: "document-reviewer"`, `description: "ドキュメントレビュー"`, `prompt: "doc_type: DesignDoc target: [Design Docパス] mode: composite codebase_analysis: [Step 2のcodebase-analyzer JSON] code_verification: [code-verifierのJSON]. 整合性と完全性をレビュー。"`
122
+ - ADR(作成された場合): `subagent_type: "document-reviewer"`, `description: "ADRレビュー"`, `prompt: "doc_type: ADR target: [ADRパス] mode: composite. 整合性と完全性をレビュー。"`
123
+ - ADRレビューで修正が必要になった場合、technical-designer-frontend(update)がADRを修正し、修正後のADRに合わせてDesign Docを再整合させる — Design Docは未レビューまたは古いADRの上に立ってはならない。この再整合でDesign Docが変わった場合は、更新後のDesign Docに対してcode-verifierとDesign Docのdocument-reviewerを再実行し、検証が最終内容を反映するようにする。
124
+
125
+ ### Step 7: 設計整合性検証
126
+ - Agentツールで**design-sync**を呼び出す。
98
127
  - `subagent_type: "design-sync"`, `description: "設計整合性チェック"`, `prompt: "docs/design/配下の全Design Doc間の整合性をチェック。矛盾と重複を報告。"`
99
- - **[停止]**: 設計ドキュメントとdesign-sync結果を提示し、ユーザー承認を取得
128
+ - **[停止]**: 設計ドキュメント(Design Docの場合はdesign-sync結果も)を提示し、ユーザー承認を取得する
100
129
 
101
130
  ## 完了条件
102
131
 
103
- - [ ] requirement-analyzerを実行し規模を判定
104
- - [ ] codebase-analyzerを実行し結果をtechnical-designer-frontendに渡した
105
- - [ ] ui-spec-designerでUI Specを作成(該当時)
106
- - [ ] technical-designer-frontendで適切な設計ドキュメント(ADRまたはDesign Doc)を作成
107
- - [ ] Design Docに対してcode-verifierを実行し結果をdocument-reviewerに渡した(ADRのみの場合はスキップ)
108
- - [ ] document-reviewerを実行しフィードバックに対応
109
- - [ ] design-syncで整合性検証を実行
110
- - [ ] 設計ドキュメントのユーザー承認を取得
132
+ - [ ] Step 1のスコープブートストラップのシードを構築した(または検索結果が0件のときユーザーから対象ファイルを取得した)
133
+ - [ ] 値の入った`requirement_analysis`でcodebase-analyzerを実行した
134
+ - [ ] ユーザーと設計スコープを確認し、確認済みの対象ファイルから規模を設定した
135
+ - [ ] ui-analyzerを実行した。codebase-analyzer(Step 2)とui-analyzer(Step 4)の出力はui-spec-designerとtechnical-designer-frontendで再利用される
136
+ - [ ] ui-spec-designerでUI Specを作成した
137
+ - [ ] technical-designer-frontendでDesign Docを作成した。設計にアーキテクチャ決定が伴う場合は前提となるADRを先に作成した
138
+ - [ ] Design Docに対してcode-verifierを実行し、結果をdocument-reviewerに渡した
139
+ - [ ] 作成した各ドキュメント(Design Doc、および作成された場合のADR)に対してdocument-reviewerを実行し、フィードバックに対応した
140
+ - [ ] design-syncで整合性検証を実行した
141
+ - [ ] 設計ドキュメントのユーザー承認を取得した
111
142
 
112
143
  ## 出力例
113
144
  フロントエンド設計フェーズ完了。
@@ -29,6 +29,7 @@ Immediately stop and reconsider design when detecting the following patterns:
29
29
 
30
30
  - **Aggressive Refactoring** - Prevent technical debt and maintain health
31
31
  - **No Unused "Just in Case" Code** - Violates YAGNI principle (Kent Beck)
32
+ - **Minimum Surface for Required Coverage** - When introducing maintenance-surface-bearing elements (persistent state, public-contract elements or cross-boundary fields/props, behavioral modes/flags/variants, reusable abstractions, or component splits), select the smallest design surface that covers current user-visible requirements and accepted technical constraints (audit, data integrity, compatibility, security, performance, accessibility). Adoption is justified by naming a current requirement or constraint that smaller alternatives fail to cover; value-based arguments (reusable, future-ready, convenient for implementation) serve as tiebreakers only. Distinct from YAGNI: YAGNI is a time-axis check (refuse work for future-only needs); this principle constrains surface area at a fixed coverage point.
32
33
 
33
34
  ## Comment Writing Rules
34
35
 
@@ -120,6 +120,7 @@ description: Guides PRD, ADR, Design Doc, UI Spec, and Work Plan creation. Use w
120
120
  - **Code inspection evidence** (inspected files/functions during investigation)
121
121
  - **Field propagation map** (when fields cross component boundaries)
122
122
  - **Data representation decision** (when introducing new structures)
123
+ - **Minimal Surface Alternatives** (when introducing persistent state, public-contract elements or cross-boundary fields, behavioral modes/flags, or reusable abstractions/component splits — see design-template.md for the 5-step output format)
123
124
  - **Applicable standards** (explicit/implicit classification)
124
125
  - **Prerequisite ADRs** (including common ADRs)
125
126
  - **Verification Strategy** (required)
@@ -30,7 +30,7 @@ unknowns:
30
30
 
31
31
  ### Prerequisite ADRs
32
32
 
33
- - [ADR File Name]: [Related decision items]
33
+ - [docs/adr/ADR-XXXX.md]: [Related decision items]
34
34
  - Reference common technical ADRs when applicable
35
35
 
36
36
  ### Agreement Checklist
@@ -185,6 +185,49 @@ Evaluate existing structures: semantic fit, responsibility fit, lifecycle fit, b
185
185
 
186
186
  **Decision**: [reuse / extend / new] — [rationale]
187
187
 
188
+ ### Minimal Surface Alternatives (When Introducing Maintenance-Surface Elements)
189
+
190
+ One entry per new in-scope element (persistent state / public-contract element or cross-boundary field or prop / behavioral mode/flag/variant / reusable abstraction or component split). Records the 5-step output produced by the invoking designer agent. Reference: `coding-standards` skill, "Minimum Surface for Required Coverage".
191
+
192
+ #### Element 1: [name of the new element]
193
+
194
+ **Step 1 — Fixed Requirements**
195
+ - [AC reference — AC ID, AC heading, EARS clause, or constraint ID]: [requirement / constraint text]
196
+ - [AC reference]: [requirement / constraint text]
197
+
198
+ References may point to the Design Doc, referenced PRD, or referenced UI Spec.
199
+
200
+ **Steps 2–3 — Alternatives Compared**
201
+
202
+ Adapt the column names below to the design context: backend Design Docs use "Crosses module/service boundary" and "New concept / mode / flag"; frontend Design Docs use "Crosses component boundary" and "New props / modes / variants" (and add the "client or server" qualifier to the persistent-state column).
203
+
204
+ | Alternative | Current requirements covered (AC reference) | New persistent state introduced (count) | New concept / mode / flag / prop / variant (count) | Crosses module/service or component boundary (yes/no) | Breaking change or migration required (yes/no) | Subjective cost notes |
205
+ |---|---|---|---|---|---|---|
206
+ | [The added element as proposed] | | | | | | |
207
+ | [Subtractive alternative — derive / compute on demand / keep at caller / reuse existing / introduce no new state] | | | | | | |
208
+ | [Optional third alternative] | | | | | | |
209
+
210
+ Subjective cost notes accepts: maintainability concerns, naming clarity, perceived implementation effort, future-readiness sentiment, and similar judgment-level remarks.
211
+
212
+ **Resolution priority for selecting "smallest"** (later columns are tiebreakers when earlier are equal):
213
+ 1. New persistent state introduced (lower = smaller)
214
+ 2. Crosses module/service or component boundary (no = smaller)
215
+ 3. New concept / mode / flag / prop / variant (lower = smaller)
216
+ 4. Breaking change or migration required (no = smaller)
217
+ 5. Subjective cost notes
218
+
219
+ **Step 4 — Selected Alternative and Rationale**
220
+ - **Selected**: [alternative name]
221
+ - **Rationale**:
222
+ - When selected = smallest alternative considered: state "smallest alternative considered; no further reduction available"
223
+ - When selected > smallest: name the current requirement(s) from Step 1 that smaller alternatives fail to satisfy
224
+
225
+ **Step 5 — Rejected Alternatives Log**
226
+ - [Alternative name]: [1-2 lines on what it was and why rejected]
227
+ - [Alternative name]: [1-2 lines on what it was and why rejected]
228
+
229
+ Repeat the Element block above for each additional in-scope element. Mark the whole section N/A with brief rationale when the design introduces no in-scope elements.
230
+
188
231
  ### Type Definitions
189
232
 
190
233
  ```typescript
@@ -351,6 +394,16 @@ Mark as N/A with brief rationale when the design introduces entirely new behavio
351
394
  - **Disadvantages**: [Disadvantages]
352
395
  - **Reason for Rejection**: [Why it wasn't adopted]
353
396
 
397
+ ## Future Extensibility
398
+
399
+ This section records capabilities **excluded** from the current design surface. Limit entries to capabilities tied to a current requirement, a current consumer, or a documented constraint; route purely speculative future plans into a separate proposal document.
400
+
401
+ Distinguish from "Minimal Surface Alternatives → Step 5 (Rejected Alternatives)": Step 5 records element-level alternatives that were compared and rejected within a single in-scope element; this section records capability-level items not bound to a single element (broader scope considered but excluded).
402
+
403
+ - **Deferred possibilities**: [Capabilities considered during design and explicitly excluded from the current design surface. Each entry names the current requirement it would have served]
404
+ - **Intentional limitations**: [What was deliberately kept small and why]
405
+ - **Extension points (existing, with current consumers)**: [Interfaces or hooks already in use by named current consumers. Each entry names a current consumer]
406
+
354
407
  ## Risks and Mitigation
355
408
 
356
409
  | Risk | Impact | Probability | Mitigation |
@@ -39,10 +39,10 @@ Adopted quality gates for the change area. Each task in this plan must satisfy t
39
39
 
40
40
  Maps each Design Doc technical requirement to the covering task(s). One row per extracted item. Every row must have at least one covering task, or an explicit gap justification.
41
41
 
42
- | DD Section | DD Item | Category | Covered By Task(s) | Gap Status | Notes |
43
- |---|---|---|---|---|---|
44
- | [Section name from DD] | [Specific item] | impl-target / connection-switching / contract-change / verification / prerequisite | [Phase X Task Y] | covered | |
45
- | Security Considerations | Input validation for API | prerequisite | — | gap | Deferred to Phase 2 per user decision |
42
+ | Design Doc | DD Section | DD Item | Category | Covered By Task(s) | Gap Status | Notes |
43
+ |---|---|---|---|---|---|---|
44
+ | [docs/design/XXX.md — one of the Related Documents above] | [Section name from DD] | [Specific item] | impl-target / connection-switching / contract-change / verification / prerequisite | [Phase X Task Y] | covered | |
45
+ | docs/design/XXX.md | Security Considerations | Input validation for API | prerequisite | — | gap | Deferred to Phase 2 per user decision |
46
46
 
47
47
  **Category values**: `impl-target` (implementation target), `connection-switching` (connection/switching/registration), `contract-change` (contract change and propagation), `verification` (verification requirement), `prerequisite` (prerequisite work)
48
48
 
@@ -60,6 +60,18 @@ Include this section when a UI Spec is among the inputs. Maps each component doc
60
60
 
61
61
  **Gap Status values**: `covered` (task exists), `gap` (no task — requires justification in Notes, user confirmation required before plan approval)
62
62
 
63
+ ## ADR Bindings
64
+
65
+ Include this section when ADRs are provided as input or listed in the Design Doc's "Prerequisite ADRs" section. Maps each implementation-binding ADR decision to the task(s) it constrains. Omit the section when no ADR applies.
66
+
67
+ A decision is **implementation-binding** when it constrains code placement, dependency direction, contract/schema shape, data flow, or persistence. Acceptance criteria and required behaviors are recorded in the Design Doc; this table covers only structural constraints from ADRs.
68
+
69
+ | ADR | Source Section | Axis | Binding Decision | Covered By Task(s) |
70
+ |---|---|---|---|---|
71
+ | [docs/adr/ADR-XXXX.md] | Decision / Implementation Guidance | placement \| dependency_direction \| contract_schema \| data_flow \| persistence | [One implementation-binding decision sentence, copied or condensed from the named section] | [Phase X Task Y] |
72
+
73
+ One row per binding decision. A single ADR can contribute multiple rows. A single task can appear in multiple rows.
74
+
63
75
  ## Connection Map
64
76
 
65
77
  Include this section when the implementation crosses more than one package, service, or process boundary. Document each boundary so task-decomposer can propagate boundary context to the implementation tasks on each side. Omit the section when the implementation stays within a single package.
@@ -17,8 +17,17 @@ Metadata:
17
17
  Files to read before starting implementation (file path, with optional search hint):
18
18
  - [e.g., src/orders/checkout (processOrder function) — determined during task decomposition based on task nature]
19
19
 
20
+ ## Binding Decisions
21
+ (Include this section when the work plan's ADR Bindings table covers this task. Omit otherwise.)
22
+
23
+ Each row is an ADR decision the implementation in this task must comply with.
24
+
25
+ | Source | Axis | Decision | Compliance Check |
26
+ |---|---|---|---|
27
+ | [docs/adr/ADR-XXXX.md (§ <Source Section>) — substitute the section name (`Decision` or `Implementation Guidance`) from the matching work plan row] | [Axis value copied verbatim from the work plan's ADR Bindings row] | [Binding decision copied from the work plan's ADR Bindings row] | [Y/N-answerable positive predicate that evaluates whether the planned/final implementation satisfies the decision] |
28
+
20
29
  ## Investigation Notes
21
- (Implementation observations are appended here before implementation begins.)
30
+ (Implementation observations are appended here before implementation begins. When Binding Decisions exist, record the planned implementation approach and each Compliance Check result here.)
22
31
 
23
32
  ## Implementation Steps (TDD: Red-Green-Refactor)
24
33
  ### 1. Red Phase
@@ -51,6 +60,7 @@ Files to read before starting implementation (file path, with optional search hi
51
60
  - [ ] All added tests pass
52
61
  - [ ] Operation verified per Operation Verification Methods above
53
62
  - [ ] Deliverables created (for research/design tasks)
63
+ - [ ] (When Binding Decisions exist) Every Compliance Check evaluates to `Y` against the final implementation, with evidence recorded in Investigation Notes (file:line, test result, or command output)
54
64
 
55
65
  ## Notes
56
66
  - Impact scope: [Areas where changes may propagate]
@@ -53,6 +53,7 @@ When receiving a new task, pass user requirements directly to requirement-analyz
53
53
  13. **code-verifier**: Verify document-code consistency. Pre-implementation: Design Doc claims against existing codebase. Post-implementation: implementation against Design Doc
54
54
  14. **design-sync**: Design Doc consistency verification (detects explicit conflicts only)
55
55
  15. **acceptance-test-generator**: Generate separate integration and E2E test skeletons from Design Doc ACs and optional UI Spec
56
+ 16. **ui-analyzer**: Gather UI facts (external sources + existing UI code) for frontend design preparation — read-only
56
57
 
57
58
  ## My Orchestration Principles
58
59
 
@@ -153,8 +154,9 @@ Subagents respond in JSON format. Key fields for orchestrator decisions:
153
154
  |-------|-----------|----------------|
154
155
  | requirement-analyzer | scale, confidence, adrRequired, crossLayerScope, scopeDependencies, questions | Select flow by scale; check adrRequired for ADR step |
155
156
  | codebase-analyzer | analysisScope.categoriesDetected, dataModel.detected, qualityAssurance (mechanisms[], domainConstraints[]), focusAreas[], existingElements count, limitations | Pass focusAreas to technical-designer as context |
157
+ | ui-analyzer | externalResources (status, per-axis fetch_status), componentStructure[], propsPatterns[], cssLayout[], stateDisplay[], focusAreas[], candidateWriteSet[], limitations | Pass the ui-analyzer JSON to ui-spec-designer and technical-designer-frontend; each consumes the fields named in its own input declaration |
156
158
  | code-verifier | status (consistent/mostly_consistent/needs_review/inconsistent), consistencyScore, discrepancies[], reverseCoverage (dataOperationsInCode, testBoundariesSectionPresent). Pre-implementation: verifies Design Doc claims against existing codebase. Post-implementation: verifies implementation consistency against Design Doc (pass `code_paths` scoped to changed files) | Flag discrepancies for document-reviewer |
157
- | task-executor | Input: `task_file` (required in orchestrated flows); optional Fix Mode signals `requiredFixes` or `incompleteImplementations` — when either is non-empty, skip `task_already_completed` and extend allowed list with each item's `file_path` / `location` (parse `location` as `file[:line]`). Output: status (escalation_needed/completed), filesModified[], testsAdded, requiresTestReview, escalation_type ∈ {task_file_not_found, task_already_completed, target_files_missing, design_compliance_violation, similar_function_found, similar_component_found, investigation_target_not_found, out_of_scope_file, dependency_version_uncertain}. | On escalation_needed: handle by escalation_type |
159
+ | task-executor | Input: `task_file` (required in orchestrated flows); optional Fix Mode signals `requiredFixes` or `incompleteImplementations` — when either is non-empty, skip `task_already_completed` and extend allowed list with each item's `file_path` / `location` (parse `location` as `file[:line]`). Output: status (escalation_needed/completed), filesModified[], testsAdded, requiresTestReview, escalation_type ∈ {task_file_not_found, task_already_completed, target_files_missing, design_compliance_violation, similar_function_found, similar_component_found, investigation_target_not_found, out_of_scope_file, dependency_version_uncertain, binding_decision_violation}. | On escalation_needed: handle by escalation_type |
158
160
  | quality-fixer | Input: `task_file` (path to current task file — always pass this in orchestrated flows), `filesModified` (extract from the upstream implementation step's response — passes the task's write set as the primary scope for stub-detection; falls back to `git diff HEAD` when omitted). Status: approved/stub_detected/blocked. `stub_detected` → route back to the implementation step with `incompleteImplementations[]` details for completion, then re-run quality-fixer. `blocked` → see quality-fixer blocked handling below | On stub_detected: re-invoke the implementation step. On blocked: see handling below |
159
161
  | document-reviewer | approvalReady (true/false) | Proceed to next step on true; request fixes on false |
160
162
  | design-sync | sync_status (NO_CONFLICTS/CONFLICTS_FOUND) | On CONFLICTS_FOUND: present conflicts to user before proceeding |
@@ -29,6 +29,7 @@ description: コードの品質問題、アンチパターン、可読性を検
29
29
 
30
30
  - **積極的なリファクタリング** - 技術的負債を防ぎ、健全性を維持
31
31
  - **使われない「念のため」のコード禁止** - YAGNI原則(Kent Beck)に反する
32
+ - **Minimum Surface for Required Coverage** - 保守対象の要素(永続状態、公開コントラクト要素または境界を越えるフィールド/Props、振る舞いモード/フラグ/バリアント、再利用可能な抽象、コンポーネント分割)を導入する場合、現在のユーザー観察可能な要件と受容済み技術制約(監査、データ整合性、互換性、セキュリティ、パフォーマンス、アクセシビリティ)をカバーする最小の設計面を選ぶ。採用の正当化は「より小さい代替案では満たせない現要件・制約を名指す」形で行い、価値ベースの議論(再利用可能、将来対応、実装が楽)はタイブレーカーのみに用いる。YAGNI との違い: YAGNI は時間軸の判断(将来のためだけの作業はしない)、本原則は固定されたカバレッジ点での設計面を制約する。
32
33
 
33
34
  ## コメント記述ルール
34
35
 
@@ -120,6 +120,7 @@ description: PRD、ADR、Design Doc、UI Spec、作業計画書の作成を支
120
120
  - **コード調査エビデンス**(調査時に確認したファイル/関数)
121
121
  - **フィールド伝播マップ**(フィールドがコンポーネント境界を越える場合)
122
122
  - **データ構造の採用判断**(新規構造導入時)
123
+ - **Minimal Surface Alternatives**(永続状態、公開コントラクト要素または境界を越えるフィールド、振る舞いモード/フラグ、再利用可能な抽象/コンポーネント分割を導入する場合 — design-template.md の5ステップ出力フォーマットを参照)
123
124
  - **適用基準**(explicit/implicit分類)
124
125
  - **前提となるADR**(共通ADR含む)
125
126
  - **検証戦略**(必須)
@@ -30,7 +30,7 @@ unknowns:
30
30
 
31
31
  ### 前提となるADR
32
32
 
33
- - [ADRファイル名]: [関連する決定事項]
33
+ - [docs/adr/ADR-XXXX.md]: [関連する決定事項]
34
34
  - 共通技術ADRも該当する場合は参照
35
35
 
36
36
  ### 合意事項チェックリスト
@@ -185,6 +185,49 @@ unknowns:
185
185
 
186
186
  **判断**: [再利用 / 拡張 / 新規] — [根拠]
187
187
 
188
+ ### Minimal Surface Alternatives(保守対象の要素を導入する場合)
189
+
190
+ 新規に導入する適用対象要素(永続状態 / 公開コントラクト要素または境界を越えるフィールド・Props / 振る舞いモード・フラグ・バリアント / 再利用可能な抽象またはコンポーネント分割)ごとに1エントリ。設計者エージェントが実行した5ステップの結果を記録する。参照: `coding-standards` スキル「Minimum Surface for Required Coverage」。
191
+
192
+ #### Element 1: [新規要素の名前]
193
+
194
+ **ステップ1 — 確定要件**
195
+ - [AC 参照 — AC ID、AC見出し、EARS節、または制約ID]: [要件・制約の文言]
196
+ - [AC 参照]: [要件・制約の文言]
197
+
198
+ 参照先は Design Doc、参照 PRD、参照 UI Spec のいずれでもよい。
199
+
200
+ **ステップ2〜3 — 比較した代替案**
201
+
202
+ 下記の列名は設計コンテキストに合わせて適用する。バックエンド Design Doc では「モジュール/サービス境界を越えるか」「新規の概念 / モード / フラグ」を使用、フロントエンド Design Doc では「コンポーネント境界を越えるか」「新規の Props / モード / バリアント」を使用(永続状態列には「クライアントまたはサーバー」の修飾を加える)。
203
+
204
+ | 代替案 | カバーする現要件(AC 参照) | 新規の永続状態(件数) | 新規の概念 / モード / フラグ / Props / バリアント(件数) | モジュール/サービスまたはコンポーネント境界を越えるか(はい/いいえ) | 破壊的変更または移行が必要か(はい/いいえ) | 主観的コストノート |
205
+ |---|---|---|---|---|---|---|
206
+ | [提案された追加要素そのもの] | | | | | | |
207
+ | [削減的代替案 — 既存から導出 / オンデマンド計算 / 呼び出し側に留める / 既存を再利用 / 新規状態を導入しない] | | | | | | |
208
+ | [任意の第3案] | | | | | | |
209
+
210
+ 主観的コストノートに記載できる内容: 保守性の懸念、命名の分かりやすさ、体感的な実装労力、将来対応への期待、その他の判断レベルのコメント。
211
+
212
+ **「最小」選定のための解決優先順位**(左の列が同点のとき右の列でタイブレーク):
213
+ 1. 新規の永続状態の件数(少ない=小さい)
214
+ 2. モジュール/サービスまたはコンポーネント境界を越えるか(いいえ=小さい)
215
+ 3. 新規の概念 / モード / フラグ / Props / バリアントの件数(少ない=小さい)
216
+ 4. 破壊的変更または移行の要否(いいえ=小さい)
217
+ 5. 主観的コストノート
218
+
219
+ **ステップ4 — 選定した代替案と根拠**
220
+ - **選定**: [代替案の名前]
221
+ - **根拠**:
222
+ - 選定が検討した中で最小の代替案である場合: 「検討した中で最小の代替案であり、これ以上の縮減余地なし」と記載
223
+ - 選定が最小でない場合: ステップ1から、より小さい代替案では満たせない現要件を名指す
224
+
225
+ **ステップ5 — 不採用案の記録**
226
+ - [代替案の名前]: [何だったか・なぜ不採用かを1〜2行]
227
+ - [代替案の名前]: [何だったか・なぜ不採用かを1〜2行]
228
+
229
+ 新規に導入する各適用対象要素について上記のエレメントブロックを繰り返す。適用対象要素を導入しない場合は、本セクション全体を簡潔な理由とともに N/A とする。
230
+
188
231
  ### 型定義
189
232
 
190
233
  ```typescript
@@ -357,6 +400,16 @@ unknowns:
357
400
  - **デメリット**: [欠点]
358
401
  - **不採用理由**: [採用しなかった理由]
359
402
 
403
+ ## 将来の拡張性
404
+
405
+ 本セクションは現在の設計面から**除外した**機能・能力を記録する。エントリは現要件、現在のコンシューマー、または記録された制約に結び付くものに限定し、純粋な将来構想は別途の提案ドキュメントに送る。
406
+
407
+ 「Minimal Surface Alternatives → ステップ5(不採用案)」との区別: ステップ5 は単一の適用対象要素内で比較・棄却した要素レベルの代替案を記録する。本セクションは個別の要素に結び付かない、より粒度の大きな能力レベルの項目(検討したが今回の設計面に含めなかった機能や能力)を記録する。
408
+
409
+ - **先送りした機能・能力**: [設計時に検討したが現在の設計面から明示的に除外した機能・能力。各エントリには、これが満たしたはずの現要件を名指して記載する]
410
+ - **意図的な限定**: [意図的に小さく抑えた範囲とその理由]
411
+ - **拡張ポイント(既存・現在のコンシューマーあり)**: [現在のコンシューマーがすでに利用している既存のインターフェースやフック。各エントリには現在のコンシューマーを名指して記載する]
412
+
360
413
  ## リスクと対策
361
414
 
362
415
  | リスク | 影響度 | 発生確率 | 対策 |
@@ -39,10 +39,10 @@ Implementation Readiness: pending
39
39
 
40
40
  Design Docの各技術要件をカバーするタスクへのマッピング。抽出した項目ごとに1行。各行には対応タスクが少なくとも1つ必要。タスクがない場合は明示的なギャップ理由が必要。
41
41
 
42
- | DDセクション | DD項目 | カテゴリ | カバーするタスク | ギャップステータス | 備考 |
43
- |---|---|---|---|---|---|
44
- | [DDのセクション名] | [具体的な項目] | impl-target / connection-switching / contract-change / verification / prerequisite | [Phase X タスクY] | covered | |
45
- | セキュリティ考慮事項 | APIの入力バリデーション | prerequisite | — | gap | ユーザー判断によりPhase 2に延期 |
42
+ | Design Doc | DDセクション | DD項目 | カテゴリ | カバーするタスク | ギャップステータス | 備考 |
43
+ |---|---|---|---|---|---|---|
44
+ | [docs/design/XXX.md — 上記の関連ドキュメントのいずれか] | [DDのセクション名] | [具体的な項目] | impl-target / connection-switching / contract-change / verification / prerequisite | [Phase X タスクY] | covered | |
45
+ | docs/design/XXX.md | セキュリティ考慮事項 | APIの入力バリデーション | prerequisite | — | gap | ユーザー判断によりPhase 2に延期 |
46
46
 
47
47
  **カテゴリ値**: `impl-target`(実装対象)、`connection-switching`(接続/切替/登録)、`contract-change`(コントラクト変更と伝搬)、`verification`(検証要件)、`prerequisite`(前提作業)
48
48
 
@@ -60,6 +60,18 @@ Design Docの各技術要件をカバーするタスクへのマッピング。
60
60
 
61
61
  **ギャップステータス値**: `covered`(タスクあり)、`gap`(タスクなし — 備考に理由必須、計画承認前にユーザー確認が必要)
62
62
 
63
+ ## ADR Bindings
64
+
65
+ ADRが入力として与えられた場合、またはDesign Docの「Prerequisite ADRs」セクションに記載されている場合に本セクションを記載する。実装を拘束する各ADR決定を、それが制約するタスクへマッピングする。該当するADRがない場合は本セクションを省略する。
66
+
67
+ 決定が**実装拘束的**であるのは、コード配置、依存方向、コントラクト/スキーマ形状、データフロー、または永続化を制約する場合である。受入基準と必要な振る舞いはDesign Docに記録される。本表はADR由来の構造的制約のみを扱う。
68
+
69
+ | ADR | Source Section | Axis | Binding Decision | Covered By Task(s) |
70
+ |---|---|---|---|---|
71
+ | [docs/adr/ADR-XXXX.md] | Decision / Implementation Guidance | placement \| dependency_direction \| contract_schema \| data_flow \| persistence | [実装拘束的な決定文を1つ、該当セクションからコピーまたは要約] | [Phase X タスクY] |
72
+
73
+ バインディング決定ごとに1行。1つのADRが複数行に寄与しうる。1つのタスクが複数行に現れうる。
74
+
63
75
  ## Connection Map
64
76
 
65
77
  実装が複数のパッケージ、サービス、またはプロセス境界をまたがる場合のみ本セクションを記載する。各境界を文書化することで、task-decomposerは境界の文脈を両側の実装タスクに伝播できる。実装が単一パッケージ内に収まる場合は本セクションを省略する。
@@ -17,8 +17,17 @@ Metadata:
17
17
  実装開始前に読むべきファイル(ファイルパス、任意でサーチヒント付き):
18
18
  - [例: src/orders/checkout (processOrder関数) — タスクの性質に基づきタスク分解時に決定]
19
19
 
20
+ ## Binding Decisions
21
+ (作業計画書のADR Bindings表がこのタスクをカバーする場合に本セクションを記載する。それ以外は省略する。)
22
+
23
+ 各行は、このタスクの実装が準拠すべきADR決定である。
24
+
25
+ | Source | Axis | Decision | Compliance Check |
26
+ |---|---|---|---|
27
+ | [docs/adr/ADR-XXXX.md (§ <Source Section>) — 対応する作業計画書の行のセクション名(`Decision` または `Implementation Guidance`)に置き換える] | [作業計画書のADR Bindings行から逐語コピーしたAxis値] | [作業計画書のADR Bindings行からコピーしたバインディング決定] | [計画中/最終の実装が決定を満たすかをY/Nで判定できる肯定述語] |
28
+
20
29
  ## Investigation Notes
21
- (実装観察事項を実装開始前にここへ追記する。)
30
+ (実装観察事項を実装開始前にここへ追記する。Binding Decisionsがある場合、計画した実装アプローチと各Compliance Check結果をここに記録する。)
22
31
 
23
32
  ## Implementation Steps (TDD: Red-Green-Refactor)
24
33
  ### 1. Red Phase
@@ -51,6 +60,7 @@ Metadata:
51
60
  - [ ] 追加した全テストがパス
52
61
  - [ ] Operation Verification Methods に基づく動作確認完了
53
62
  - [ ] 成果物作成完了(調査・設計タスクの場合)
63
+ - [ ] (Binding Decisionsがある場合)全てのCompliance Checkが最終実装に対して`Y`と評価され、根拠(file:line、テスト結果、またはコマンド出力)がInvestigation Notesに記録されている
54
64
 
55
65
  ## Notes
56
66
  - 影響範囲: [変更が波及する可能性のある領域]
@@ -53,6 +53,7 @@ description: サブエージェントのタスク分担と連携を調整。規
53
53
  13. **code-verifier**: ドキュメントとコードの整合性を検証。実装前: Design Docの主張を既存コードベースに対して検証。実装後: 実装がDesign Docに準拠しているか検証
54
54
  14. **design-sync**: Design Doc間の整合性検証(明示的矛盾のみ検出)
55
55
  15. **acceptance-test-generator**: Design DocのACとUI Spec(任意)から統合テストとE2Eテストのスケルトン生成
56
+ 16. **ui-analyzer**: フロントエンド設計準備のためUI事実(外部ソース+既存UIコード)を収集 — 読み取り専用
56
57
 
57
58
  ## オーケストレーション原則
58
59
 
@@ -151,8 +152,9 @@ description: サブエージェントのタスク分担と連携を調整。規
151
152
  |-------|---------------|-------------|
152
153
  | requirement-analyzer | scale, confidence, adrRequired, crossLayerScope, scopeDependencies, questions | scaleでフローを選択。adrRequiredでADRステップ要否を判断 |
153
154
  | codebase-analyzer | analysisScope.categoriesDetected, dataModel.detected, qualityAssurance (mechanisms[], domainConstraints[]), focusAreas[], existingElements count, limitations | focusAreasをtechnical-designerにコンテキストとして渡す |
155
+ | ui-analyzer | externalResources (status, per-axis fetch_status), componentStructure[], propsPatterns[], cssLayout[], stateDisplay[], focusAreas[], candidateWriteSet[], limitations | ui-analyzerのJSONをui-spec-designerとtechnical-designer-frontendに渡す。各エージェントは自身の入力宣言に記載されたフィールドを使う |
154
156
  | code-verifier | status (consistent/mostly_consistent/needs_review/inconsistent), consistencyScore, discrepancies[], reverseCoverage (dataOperationsInCode, testBoundariesSectionPresent). 実装前: Design Docの主張を既存コードに対して検証。実装後: 実装のDesign Doc整合性を検証(`code_paths`で変更ファイルにスコープ) | discrepanciesをdocument-reviewerに連携 |
155
- | task-executor | 入力: `task_file`(オーケストレーションフローでは必須); 任意の Fix Mode シグナル `requiredFixes` または `incompleteImplementations` — いずれかが非空の場合、`task_already_completed` チェックをスキップし、各項目の `file_path` / `location`(`location` は `file[:line]` として解釈)で許可リストを拡張する。出力: status (escalation_needed/completed), filesModified[], testsAdded, requiresTestReview, escalation_type ∈ {task_file_not_found, task_already_completed, target_files_missing, design_compliance_violation, similar_function_found, similar_component_found, investigation_target_not_found, out_of_scope_file, dependency_version_uncertain} | escalation_needed時: escalation_type別に対応 |
157
+ | task-executor | 入力: `task_file`(オーケストレーションフローでは必須); 任意の Fix Mode シグナル `requiredFixes` または `incompleteImplementations` — いずれかが非空の場合、`task_already_completed` チェックをスキップし、各項目の `file_path` / `location`(`location` は `file[:line]` として解釈)で許可リストを拡張する。出力: status (escalation_needed/completed), filesModified[], testsAdded, requiresTestReview, escalation_type ∈ {task_file_not_found, task_already_completed, target_files_missing, design_compliance_violation, similar_function_found, similar_component_found, investigation_target_not_found, out_of_scope_file, dependency_version_uncertain, binding_decision_violation} | escalation_needed時: escalation_type別に対応 |
156
158
  | quality-fixer | 入力: `task_file`(現在のタスクファイルパス — オーケストレーションフローでは常に渡す)、`filesModified`(上流の実装ステップのレスポンスから抽出 — 当該タスクの書き込み集合を未完成実装検出の主要スコープとして渡す。省略時は `git diff HEAD` にフォールバック)。Status: approved/stub_detected/blocked。`stub_detected` → 上流の実装ステップに `incompleteImplementations[]` の詳細を添えて差し戻し、本実装完了後にquality-fixerを再実行。`blocked` → 下記quality-fixer blockedハンドリング参照 | stub_detected: 実装ステップを再実行。blocked: 下記参照 |
157
159
  | document-reviewer | approvalReady (true/false) | trueで次ステップへ。falseで修正を依頼 |
158
160
  | design-sync | sync_status (NO_CONFLICTS/CONFLICTS_FOUND) | CONFLICTS_FOUND時: 矛盾をユーザーに提示してから進む |