create-ai-project 1.14.12 → 1.14.14

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.
@@ -62,6 +62,8 @@ Operates in an independent context without CLAUDE.md principles, executing auton
62
62
  ### Step 1: Parameter Analysis
63
63
  - Confirm mode is `composite` or unspecified
64
64
  - Specialized verification based on doc_type
65
+ - For DesignDoc: Verify "Applicable Standards" section exists with explicit/implicit classification
66
+ - Missing or incomplete → `critical` issue; implicit standards without confirmation → `important` issue
65
67
 
66
68
  ### Step 2: Target Document Collection
67
69
  - Load document specified by target
@@ -69,16 +71,29 @@ Operates in an independent context without CLAUDE.md principles, executing auton
69
71
  - For Design Docs, also check common ADRs (`ADR-COMMON-*`)
70
72
 
71
73
  ### Step 3: Perspective-based Review Implementation
72
- #### Comprehensive Review Mode
74
+
75
+ #### Gate 0: Structural Existence (must pass before Gate 1)
76
+ Verify required elements exist per documentation-criteria skill template. Gate 0 failure on any item → `needs_revision`.
77
+
78
+ For DesignDoc, additionally verify:
79
+ - [ ] Code inspection evidence recorded (files and functions listed)
80
+ - [ ] Applicable standards listed with explicit/implicit classification
81
+ - [ ] Field propagation map present (when fields cross boundaries)
82
+
83
+ #### Gate 1: Quality Assessment (only after Gate 0 passes)
84
+
85
+ **Comprehensive Review Mode**:
73
86
  - Consistency check: Detect contradictions between documents
74
- - Completeness check: Confirm presence of required elements
87
+ - Completeness check: Confirm depth and coverage of required elements
75
88
  - Rule compliance check: Compatibility with project rules
76
89
  - Feasibility check: Technical and resource perspectives
77
90
  - Assessment consistency check: Verify alignment between scale assessment and document requirements
91
+ - Rationale verification: Design decision rationales must reference identified standards or existing patterns; unverifiable rationale → `important` issue
78
92
  - Technical information verification: When sources exist, verify with WebSearch for latest information and validate claim validity
79
93
  - Failure scenario review: Identify failure scenarios across normal usage, high load, and external failures; specify which design element becomes the bottleneck
94
+ - Code inspection evidence review: Verify inspected files are relevant to design scope; flag if key related files are missing
80
95
 
81
- #### Perspective-specific Mode
96
+ **Perspective-specific Mode**:
82
97
  - Implement review based on specified mode and focus
83
98
 
84
99
  ### Step 4: Prior Context Resolution Check
@@ -131,6 +146,10 @@ Complete all items before proceeding to output.
131
146
  "rule_compliance": 90,
132
147
  "clarity": 75
133
148
  },
149
+ "gate0": {
150
+ "status": "pass|fail",
151
+ "missing_elements": []
152
+ },
134
153
  "verdict": {
135
154
  "decision": "approved_with_conditions",
136
155
  "conditions": [
@@ -219,10 +238,15 @@ Include in output when `prior_context_count > 0`:
219
238
  - [ ] Verification of sources for technical claims and consistency with latest information
220
239
  - [ ] Failure scenario coverage
221
240
  - [ ] Complexity justification: If complexity_level is medium/high, complexity_rationale must specify (1) requirements/ACs necessitating the complexity, (2) constraints/risks it addresses
241
+ - [ ] Gate 0 structural existence checks pass before quality review
242
+ - [ ] Design decision rationales verified against identified standards/patterns
243
+ - [ ] Code inspection evidence covers files relevant to design scope
244
+ - [ ] Field propagation map present when fields cross component boundaries
222
245
 
223
246
  ## Review Criteria (for Comprehensive Mode)
224
247
 
225
248
  ### Approved
249
+ - Gate 0: All structural existence checks pass
226
250
  - Consistency score > 90
227
251
  - Completeness score > 85
228
252
  - No rule violations (severity: high is zero)
@@ -230,6 +254,7 @@ Include in output when `prior_context_count > 0`:
230
254
  - Prior context items (if any): All critical/major resolved
231
255
 
232
256
  ### Approved with Conditions
257
+ - Gate 0: All structural existence checks pass
233
258
  - Consistency score > 80
234
259
  - Completeness score > 75
235
260
  - Only minor rule violations (severity: medium or below)
@@ -237,6 +262,7 @@ Include in output when `prior_context_count > 0`:
237
262
  - Prior context items (if any): At most 1 major unresolved
238
263
 
239
264
  ### Needs Revision
265
+ - Gate 0: Any structural existence check fails OR
240
266
  - Consistency score < 80 OR
241
267
  - Completeness score < 75 OR
242
268
  - Serious rule violations (severity: high)
@@ -51,6 +51,21 @@ Details of documentation creation criteria follow documentation-criteria skill.
51
51
 
52
52
  ## Mandatory Process Before Design Doc Creation
53
53
 
54
+ ### Standards Identification Gate【Required】
55
+ Must be performed before any investigation:
56
+
57
+ 1. **Identify Project Standards**
58
+ - Scan project configuration, rule files, and existing code patterns
59
+ - Classify each: **Explicit** (documented) or **Implicit** (observed pattern only)
60
+
61
+ 2. **Record in Design Doc**
62
+ - List in "Applicable Standards" section with `[explicit]`/`[implicit]` tags
63
+ - Implicit standards require user confirmation before design proceeds
64
+
65
+ 3. **Alignment Rule**
66
+ - Design decisions must reference applicable standards
67
+ - Deviations require documented rationale
68
+
54
69
  ### Existing Code Investigation【Required】
55
70
  Must be performed before Design Doc creation:
56
71
 
@@ -76,6 +91,23 @@ Must be performed before Design Doc creation:
76
91
  - Clearly document similar functionality search results (found implementations or "none")
77
92
  - Record adopted decision (use existing/improvement proposal/new implementation) and rationale
78
93
 
94
+ 5. **Code Inspection Evidence**
95
+ - Record all inspected files and key functions in "Code Inspection Evidence" section of Design Doc
96
+ - Each entry must state relevance (similar functionality / integration point / pattern reference)
97
+
98
+ ### Data Representation Decision【Required】
99
+ When the design introduces or significantly modifies data structures:
100
+
101
+ 1. **Reuse-vs-New Assessment**
102
+ - Search for existing structures with overlapping purpose
103
+ - Evaluate: semantic fit, responsibility fit, lifecycle fit, boundary/interop cost
104
+
105
+ 2. **Decision Rule**
106
+ - All criteria satisfied → Reuse existing
107
+ - 1-2 criteria fail → Evaluate extension with adapter
108
+ - 3+ criteria fail → New structure justified
109
+ - Record decision and rationale in Design Doc
110
+
79
111
  ### Integration Point Analysis【Important】
80
112
  Clarify integration points with existing systems when adding new features or modifying existing ones:
81
113
 
@@ -142,6 +174,12 @@ No Ripple Effect:
142
174
  - Other services, DB structure
143
175
  ```
144
176
 
177
+ ### Field Propagation Map【Required】
178
+ When new or changed fields cross component boundaries:
179
+
180
+ Document each field's status (preserved / transformed / dropped) at each boundary with rationale.
181
+ Skip if no fields cross component boundaries.
182
+
145
183
  ### Interface Change Impact Analysis【Required】
146
184
 
147
185
  **Change Matrix:**
@@ -305,6 +343,10 @@ Implementation sample creation checklist:
305
343
  - [ ] Implementation approach selection rationale (vertical/horizontal/hybrid)
306
344
  - [ ] Latest best practices researched and references cited
307
345
  - [ ] **Complexity assessment**: complexity_level set; if medium/high, complexity_rationale specifies (1) requirements/ACs, (2) constraints/risks
346
+ - [ ] **Standards identification gate completed** (required)
347
+ - [ ] **Code inspection evidence recorded** (required)
348
+ - [ ] **Data representation decision documented** (when new structures introduced)
349
+ - [ ] **Field propagation map included** (when fields cross boundaries)
308
350
 
309
351
 
310
352
  ## Acceptance Criteria Creation Guidelines
@@ -62,6 +62,8 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
62
62
  ### ステップ1: パラメータ解析
63
63
  - modeが`composite`または未指定を確認
64
64
  - doc_typeに基づく特化した検証
65
+ - DesignDocの場合:「適用基準」セクションの存在をexplicit/implicit分類付きで確認
66
+ - 欠落・不完全 → `critical`、implicit基準の未確認 → `important`
65
67
 
66
68
  ### ステップ2: 対象ドキュメントの収集
67
69
  - targetで指定されたドキュメントを読み込み
@@ -69,16 +71,29 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
69
71
  - Design Docの場合は共通ADR(`ADR-COMMON-*`)も確認
70
72
 
71
73
  ### ステップ3: 観点別レビューの実施
72
- #### 総合レビューモード
74
+
75
+ #### Gate 0: 必須要素の存在チェック(Gate 1の前に必ず実施)
76
+ documentation-criteriaスキルのテンプレートに基づき必須要素の存在を確認。いずれかの項目で不合格 → `needs_revision`。
77
+
78
+ DesignDocの場合、追加で以下を確認:
79
+ - [ ] コード調査エビデンスの記録(ファイルと関数の一覧)
80
+ - [ ] 適用基準のexplicit/implicit分類付き一覧
81
+ - [ ] フィールド伝播マップの存在(フィールドが境界を越える場合)
82
+
83
+ #### Gate 1: 品質評価(Gate 0通過後のみ実施)
84
+
85
+ **総合レビューモード**:
73
86
  - 整合性チェック:ドキュメント間の矛盾を検出
74
- - 完成度チェック:必須要素の有無を確認
87
+ - 完成度チェック:必須要素の深度と網羅性を確認
75
88
  - ルール準拠チェック:プロジェクトルールとの適合性
76
89
  - 実現可能性チェック:技術的・リソース的観点
77
90
  - 判定整合性チェック:規模判定とドキュメント要件の整合性を検証
91
+ - 根拠検証:設計判断の根拠は特定された基準または既存パターンを参照すること。検証不能な根拠 → `important`
78
92
  - 技術情報検証:出典がある場合はWebSearchで最新情報を確認、主張の妥当性を検証
79
93
  - 失敗シナリオ検証:正常系・高負荷・外部障害の失敗シナリオを特定し、どの設計要素がボトルネックになるか指摘
94
+ - コード調査エビデンス検証:調査ファイルが設計スコープに関連するか確認、主要な関連ファイルの漏れを指摘
80
95
 
81
- #### 観点特化モード
96
+ **観点特化モード**:
82
97
  - 指定されたmodeとfocusに基づいてレビューを実施
83
98
 
84
99
  ### ステップ4: prior context解決チェック
@@ -131,6 +146,10 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
131
146
  "rule_compliance": 90,
132
147
  "clarity": 75
133
148
  },
149
+ "gate0": {
150
+ "status": "pass|fail",
151
+ "missing_elements": []
152
+ },
134
153
  "verdict": {
135
154
  "decision": "approved_with_conditions",
136
155
  "conditions": [
@@ -219,10 +238,15 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
219
238
  - [ ] 技術的主張の出典確認と最新情報との整合性
220
239
  - [ ] 失敗シナリオの網羅性
221
240
  - [ ] 複雑性の正当化: complexity_levelがmedium/highの場合、complexity_rationaleは(1)その複雑性を必要とする要件/AC、(2)対処する制約/リスクを明記すること
241
+ - [ ] Gate 0の存在チェックが品質レビュー前に通過していること
242
+ - [ ] 設計判断の根拠が特定された基準/パターンに照合されていること
243
+ - [ ] コード調査エビデンスが設計スコープに関連するファイルを網羅していること
244
+ - [ ] フィールドが境界を越える場合にフィールド伝播マップが存在すること
222
245
 
223
246
  ## レビュー基準(総合モード用)
224
247
 
225
248
  ### 承認(Approved)
249
+ - Gate 0: すべての存在チェック通過
226
250
  - 整合性スコア > 90
227
251
  - 完成度スコア > 85
228
252
  - ルール違反なし(重大度: high がゼロ)
@@ -230,6 +254,7 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
230
254
  - prior context項目(ある場合): critical/majorすべて解決済み
231
255
 
232
256
  ### 条件付き承認(Approved with Conditions)
257
+ - Gate 0: すべての存在チェック通過
233
258
  - 整合性スコア > 80
234
259
  - 完成度スコア > 75
235
260
  - 軽微なルール違反のみ(重大度: medium 以下)
@@ -237,6 +262,7 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
237
262
  - prior context項目(ある場合): major未解決は最大1件
238
263
 
239
264
  ### 要修正(Needs Revision)
265
+ - Gate 0: いずれかの存在チェック不合格、または
240
266
  - 整合性スコア < 80 または
241
267
  - 完成度スコア < 75 または
242
268
  - 重大なルール違反あり(重大度: high)
@@ -51,6 +51,21 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
51
51
 
52
52
  ## Design Doc作成前の必須プロセス
53
53
 
54
+ ### 基準特定ゲート【必須】
55
+ 調査開始前に必ず実施:
56
+
57
+ 1. **プロジェクト基準の特定**
58
+ - プロジェクト設定、ルールファイル、既存コードパターンをスキャン
59
+ - 各基準を分類: **Explicit**(文書化済み)または **Implicit**(観察されたパターンのみ)
60
+
61
+ 2. **Design Docへの記録**
62
+ - 「適用基準」セクションに`[explicit]`/`[implicit]`タグ付きで記載
63
+ - Implicit基準は設計着手前にユーザー確認が必要
64
+
65
+ 3. **整合性ルール**
66
+ - 設計判断は適用基準を参照すること
67
+ - 逸脱する場合は根拠を明記
68
+
54
69
  ### 既存コード調査【必須】
55
70
  Design Doc作成前に必ず実施:
56
71
 
@@ -76,6 +91,23 @@ Design Doc作成前に必ず実施:
76
91
  - 類似機能の検索結果(発見した実装、または「なし」)を明記
77
92
  - 採用した判断(既存使用/改善提案/新規実装)とその根拠を記録
78
93
 
94
+ 5. **コード調査エビデンス**
95
+ - 調査したすべてのファイルと主要関数をDesign Docの「コード調査エビデンス」セクションに記録
96
+ - 各エントリの関連性(類似機能 / 統合点 / パターン参照)を明記
97
+
98
+ ### データ構造の採用判断【必須】
99
+ 設計で新規データ構造の導入や大幅な変更を行う場合:
100
+
101
+ 1. **再利用vs新規の評価**
102
+ - 目的が重複する既存構造を検索
103
+ - 評価: 意味的適合、責務適合、ライフサイクル適合、境界/相互運用コスト
104
+
105
+ 2. **判断ルール**
106
+ - 全基準適合 → 既存を再利用
107
+ - 1-2基準不適合 → アダプターによる拡張を検討
108
+ - 3基準以上不適合 → 新規構造を正当化
109
+ - 判断と根拠をDesign Docに記録
110
+
79
111
  ### 統合ポイント分析【重要】
80
112
  新機能や既存機能の変更時に、既存システムとの統合ポイントを明確化:
81
113
 
@@ -138,10 +170,16 @@ Design Doc作成時に必ず含める:
138
170
  間接影響:
139
171
  - セッション管理(トークン形式変更)
140
172
  - ログ出力(新フィールド追加)
141
- 波及なし:
173
+ 波及なし:
142
174
  - 他のサービス、DB構造
143
175
  ```
144
176
 
177
+ ### フィールド伝播マップ【必須】
178
+ フィールドがコンポーネント境界を越える場合:
179
+
180
+ 各境界でのフィールドのステータス(preserved / transformed / dropped)を根拠付きで記録。
181
+ フィールドが境界を越えない場合はスキップ。
182
+
145
183
  ### インターフェース変更影響分析【必須】
146
184
 
147
185
  **変更マトリクス:**
@@ -304,6 +342,10 @@ ADRに含まない:スケジュール、実装手順、具体的コード
304
342
  - [ ] 実装アプローチ(垂直/水平/ハイブリッド)の選択根拠
305
343
  - [ ] 最新のベストプラクティスの調査と参考資料の記載
306
344
  - [ ] **複雑性評価**: complexity_levelを設定。medium/highの場合、complexity_rationaleに(1)要件/AC、(2)制約/リスクを明記
345
+ - [ ] **基準特定ゲート完了**(必須)
346
+ - [ ] **コード調査エビデンス記録済み**(必須)
347
+ - [ ] **データ構造の採用判断の文書化**(新規構造導入時)
348
+ - [ ] **フィールド伝播マップの記載**(フィールドが境界を越える場合)
307
349
 
308
350
 
309
351
  ## 受入条件の作成ガイドライン
@@ -1,5 +1,4 @@
1
1
  ---
2
- name: add-integration-tests
3
2
  description: Add integration/E2E tests to existing backend codebase using Design Doc
4
3
  ---
5
4
 
@@ -1,5 +1,4 @@
1
1
  ---
2
- name: front-reverse-design
3
2
  description: Generate frontend Design Docs from existing codebase using existing PRD
4
3
  ---
5
4
 
@@ -1,5 +1,4 @@
1
1
  ---
2
- name: front-review
3
2
  description: Design Doc compliance validation with optional auto-fixes
4
3
  ---
5
4
 
@@ -1,5 +1,4 @@
1
1
  ---
2
- name: reverse-engineer
3
2
  description: Generate PRD and Design Docs from existing codebase through discovery, generation, verification, and review workflow
4
3
  ---
5
4
 
@@ -0,0 +1,178 @@
1
+ ---
2
+ description: Update existing design documents (Design Doc / PRD / ADR) with review
3
+ ---
4
+
5
+ **Command Context**: This command is dedicated to updating existing design documents.
6
+
7
+ ## Orchestrator Definition
8
+
9
+ **Core Identity**: "I am not a worker. I am an orchestrator." (see subagents-orchestration-guide skill)
10
+
11
+ **First Action**: Register Steps 1-6 to TodoWrite before any execution.
12
+
13
+ **Execution Protocol**:
14
+ 1. **Delegate all work** to sub-agents (NEVER edit documents yourself)
15
+ 2. **Execute update flow**:
16
+ - Identify target → Clarify changes → Update document → Review → Consistency check
17
+ - **Stop at every `[Stop: ...]` marker** → Wait for user approval before proceeding
18
+ 3. **Scope**: Complete when updated document receives approval
19
+
20
+ **CRITICAL**: NEVER skip document-reviewer or stopping points.
21
+
22
+ ## Workflow Overview
23
+
24
+ ```
25
+ Target document → [Stop: Confirm changes]
26
+
27
+ technical-designer / prd-creator (update mode)
28
+
29
+ document-reviewer → [Stop: Review approval]
30
+ ↓ (Design Doc only)
31
+ design-sync → [Stop: Final approval]
32
+ ```
33
+
34
+ ## Scope Boundaries
35
+
36
+ **Included in this command**:
37
+ - Existing document identification and selection
38
+ - Change content clarification with user
39
+ - Document update with appropriate agent (update mode)
40
+ - Document review with document-reviewer
41
+ - Consistency verification with design-sync (Design Doc only)
42
+
43
+ **NOT included**:
44
+ - New requirement analysis (use /design for new documents)
45
+ - Work planning or implementation (use /plan or /task after this command)
46
+
47
+ **Responsibility Boundary**: This command completes with updated document approval.
48
+
49
+ Target document: $ARGUMENTS
50
+
51
+ ## Execution Flow
52
+
53
+ ### Step 1: Target Document Identification
54
+
55
+ ```bash
56
+ # Check existing documents
57
+ ls docs/design/*.md docs/prd/*.md docs/adr/*.md 2>/dev/null | grep -v template
58
+ ```
59
+
60
+ **Decision flow**:
61
+
62
+ | Situation | Action |
63
+ |-----------|--------|
64
+ | $ARGUMENTS specifies a path | Use specified document |
65
+ | $ARGUMENTS describes a topic | Search documents matching the topic |
66
+ | Multiple candidates found | Present options with AskUserQuestion |
67
+ | No documents found | Report and end (suggest /design instead) |
68
+
69
+ ### Step 2: Document Type Determination
70
+
71
+ Determine type from document path:
72
+
73
+ | Path Pattern | Type | Update Agent | Notes |
74
+ |-------------|------|--------------|-------|
75
+ | `docs/design/*.md` | Design Doc | technical-designer | - |
76
+ | `docs/prd/*.md` | PRD | prd-creator | - |
77
+ | `docs/adr/*.md` | ADR | technical-designer | Minor changes: update existing file; Major changes: create new ADR file |
78
+
79
+ **ADR Update Guidance**:
80
+ - **Minor changes** (clarification, typo fix, small scope adjustment): Update the existing ADR file
81
+ - **Major changes** (decision reversal, significant scope change): Create a new ADR that supersedes the original
82
+
83
+ ### Step 3: Change Content Clarification [Stop]
84
+
85
+ Use AskUserQuestion to clarify what changes are needed:
86
+ - What sections need updating
87
+ - Reason for the change (bug fix findings, spec change, review feedback, etc.)
88
+ - Expected outcome after the update
89
+
90
+ Confirm understanding of changes with user before proceeding.
91
+
92
+ ### Step 4: Document Update
93
+
94
+ Invoke the update agent determined in Step 2:
95
+ ```
96
+ subagent_type: [Update Agent from Step 2]
97
+ description: "Update [Type from Step 2]"
98
+ prompt: |
99
+ Operation Mode: update
100
+ Existing Document: [path from Step 1]
101
+
102
+ ## Changes Required
103
+ [Changes clarified in Step 3]
104
+
105
+ Update the document to reflect the specified changes.
106
+ Add change history entry.
107
+ ```
108
+
109
+ ### Step 5: Document Review [Stop]
110
+
111
+ Invoke document-reviewer:
112
+ ```
113
+ subagent_type: document-reviewer
114
+ description: "Review updated document"
115
+ prompt: |
116
+ Review the following updated document.
117
+
118
+ doc_type: [Design Doc / PRD / ADR]
119
+ target: [path from Step 1]
120
+ mode: standard
121
+
122
+ Focus on:
123
+ - Consistency of updated sections with rest of document
124
+ - No contradictions introduced by changes
125
+ - Completeness of change history
126
+ ```
127
+
128
+ **On review result**:
129
+ - Approved → Proceed to Step 6
130
+ - Needs revision → Return to Step 4 with reviewer feedback (max 2 iterations)
131
+ - **After 2 rejections** → Flag for human review, present accumulated feedback to user and end
132
+
133
+ Present review result to user for approval.
134
+
135
+ ### Step 6: Consistency Verification (Design Doc only) [Stop]
136
+
137
+ **Skip condition**: Document type is PRD or ADR → Proceed to completion.
138
+
139
+ For Design Doc, invoke design-sync:
140
+ ```
141
+ subagent_type: design-sync
142
+ description: "Verify consistency"
143
+ prompt: |
144
+ Verify consistency of the updated Design Doc with other design documents.
145
+
146
+ Updated document: [path from Step 1]
147
+ ```
148
+
149
+ **On consistency result**:
150
+ - No conflicts → Present result to user for final approval
151
+ - Conflicts detected → Present conflicts to user with AskUserQuestion:
152
+ - A: Return to Step 4 to resolve conflicts in this document
153
+ - B: End command and address conflicts separately
154
+
155
+ ## Error Handling
156
+
157
+ | Error | Action |
158
+ |-------|--------|
159
+ | Target document not found | Report and end (suggest /design instead) |
160
+ | Sub-agent update fails | Log failure, present error to user, retry once |
161
+ | Review rejects after 2 revisions | Stop loop, flag for human intervention |
162
+ | design-sync detects conflicts | Present to user for resolution decision |
163
+
164
+ ## Completion Criteria
165
+
166
+ - [ ] Identified target document
167
+ - [ ] Clarified change content with user
168
+ - [ ] Updated document with appropriate agent (update mode)
169
+ - [ ] Executed document-reviewer and addressed feedback
170
+ - [ ] Executed design-sync for consistency verification (Design Doc only)
171
+ - [ ] Obtained user approval for updated document
172
+
173
+ ## Output Example
174
+ Document update completed.
175
+ - Updated document: docs/design/[document-name].md
176
+ - Approval status: User approved
177
+
178
+ **Important**: This command ends with document approval. Does not propose transition to next phase.
@@ -1,5 +1,4 @@
1
1
  ---
2
- name: add-integration-tests
3
2
  description: Design Docを使用して既存バックエンドコードベースに統合/E2Eテストを追加
4
3
  ---
5
4
 
@@ -1,5 +1,4 @@
1
1
  ---
2
- name: front-reverse-design
3
2
  description: 既存PRDを使用して既存コードベースからフロントエンドDesign Docを生成
4
3
  ---
5
4
 
@@ -1,5 +1,4 @@
1
1
  ---
2
- name: front-review
3
2
  description: Design Doc準拠検証と必要に応じた自動修正
4
3
  ---
5
4
 
@@ -1,5 +1,4 @@
1
1
  ---
2
- name: reverse-engineer
3
2
  description: 既存コードベースからPRDとDesign Docを生成するリバースエンジニアリングワークフロー
4
3
  ---
5
4
 
@@ -0,0 +1,178 @@
1
+ ---
2
+ description: 既存設計ドキュメント(Design Doc / PRD / ADR)をレビュー付きで更新
3
+ ---
4
+
5
+ **コマンドコンテキスト**: このコマンドは既存設計ドキュメントの更新専用です。
6
+
7
+ ## オーケストレーター定義
8
+
9
+ **コアアイデンティティ**: 「私は作業者ではない。オーケストレーターである。」(subagents-orchestration-guideスキル参照)
10
+
11
+ **初期アクション**: 実行前にステップ1-6をTodoWriteに登録する。
12
+
13
+ **実行プロトコル**:
14
+ 1. **全作業をサブエージェントに委譲**(自分でドキュメントを編集しない)
15
+ 2. **更新フローを実行**:
16
+ - 対象特定 → 変更内容確認 → ドキュメント更新 → レビュー → 整合性チェック
17
+ - **`[停止: ...]`マーカーで必ず停止** → 次に進む前にユーザー承認を待つ
18
+ 3. **スコープ**: 更新されたドキュメントが承認されたら完了
19
+
20
+ **重要**: document-reviewerと停止ポイントは必ず実行する。
21
+
22
+ ## ワークフロー概要
23
+
24
+ ```
25
+ 対象ドキュメント → [停止: 変更内容確認]
26
+
27
+ technical-designer / prd-creator(updateモード)
28
+
29
+ document-reviewer → [停止: レビュー承認]
30
+ ↓(Design Docのみ)
31
+ design-sync → [停止: 最終承認]
32
+ ```
33
+
34
+ ## スコープ境界
35
+
36
+ **実行内容**:
37
+ - 既存ドキュメントの特定と選択
38
+ - ユーザーとの変更内容確認
39
+ - 適切なエージェントによるドキュメント更新(updateモード)
40
+ - document-reviewerによるドキュメントレビュー
41
+ - design-syncによる整合性検証(Design Docのみ)
42
+
43
+ **実行しない**:
44
+ - 新規要件分析(新規ドキュメントには/designを使用)
45
+ - 作業計画や実装(本コマンド後に/planまたは/taskを使用)
46
+
47
+ **責務境界**: このコマンドは更新されたドキュメントの承認で責務完了。
48
+
49
+ 対象ドキュメント: $ARGUMENTS
50
+
51
+ ## 実行フロー
52
+
53
+ ### ステップ1: 対象ドキュメントの特定
54
+
55
+ ```bash
56
+ # 既存ドキュメントを確認
57
+ ls docs/design/*.md docs/prd/*.md docs/adr/*.md 2>/dev/null | grep -v template
58
+ ```
59
+
60
+ **判断フロー**:
61
+
62
+ | 状況 | アクション |
63
+ |------|-----------|
64
+ | $ARGUMENTSがパスを指定 | 指定ドキュメントを使用 |
65
+ | $ARGUMENTSがトピックを記述 | トピックに合致するドキュメントを検索 |
66
+ | 複数の候補が見つかった | AskUserQuestionで選択肢を提示 |
67
+ | ドキュメントが見つからない | 報告して終了(代わりに/designを推奨) |
68
+
69
+ ### ステップ2: ドキュメントタイプの判定
70
+
71
+ ドキュメントパスからタイプを判定:
72
+
73
+ | パスパターン | タイプ | 更新エージェント | 備考 |
74
+ |-------------|--------|-----------------|------|
75
+ | `docs/design/*.md` | Design Doc | technical-designer | - |
76
+ | `docs/prd/*.md` | PRD | prd-creator | - |
77
+ | `docs/adr/*.md` | ADR | technical-designer | 軽微な変更: 既存ファイルを更新、大きな変更: 元を置き換える新ADRを作成 |
78
+
79
+ **ADR更新ガイダンス**:
80
+ - **軽微な変更**(明確化、誤字修正、小規模なスコープ調整): 既存ADRファイルを更新
81
+ - **大きな変更**(決定の変更、大規模なスコープ変更): 元のADRを置き換える新しいADRを作成
82
+
83
+ ### ステップ3: 変更内容の確認 [停止]
84
+
85
+ AskUserQuestionで必要な変更を確認:
86
+ - どのセクションの更新が必要か
87
+ - 変更の理由(バグ修正の発見、仕様変更、レビューフィードバック等)
88
+ - 更新後の期待される結果
89
+
90
+ 変更内容の理解をユーザーと確認してから進む。
91
+
92
+ ### ステップ4: ドキュメント更新
93
+
94
+ ステップ2で決定した更新エージェントを呼び出す:
95
+ ```
96
+ subagent_type: [ステップ2の更新エージェント]
97
+ description: "[ステップ2のタイプ]を更新"
98
+ prompt: |
99
+ 動作モード: update
100
+ 既存ドキュメント: [ステップ1のパス]
101
+
102
+ ## 必要な変更
103
+ [ステップ3で確認した変更内容]
104
+
105
+ 指定された変更を反映するようドキュメントを更新する。
106
+ 変更履歴エントリを追加する。
107
+ ```
108
+
109
+ ### ステップ5: ドキュメントレビュー [停止]
110
+
111
+ document-reviewerを呼び出す:
112
+ ```
113
+ subagent_type: document-reviewer
114
+ description: "更新されたドキュメントをレビュー"
115
+ prompt: |
116
+ 以下の更新されたドキュメントをレビューする。
117
+
118
+ doc_type: [Design Doc / PRD / ADR]
119
+ target: [ステップ1のパス]
120
+ mode: standard
121
+
122
+ 注力ポイント:
123
+ - 更新セクションとドキュメント全体の整合性
124
+ - 変更による矛盾が発生していないこと
125
+ - 変更履歴の完全性
126
+ ```
127
+
128
+ **レビュー結果に基づく対応**:
129
+ - 承認 → ステップ6へ進む
130
+ - 要修正 → レビュアーフィードバックを持ってステップ4に戻る(最大2回)
131
+ - **2回のリジェクト後** → 人間レビュー用にフラグ、蓄積されたフィードバックをユーザーに提示して終了
132
+
133
+ レビュー結果をユーザーに提示して承認を得る。
134
+
135
+ ### ステップ6: 整合性検証(Design Docのみ) [停止]
136
+
137
+ **スキップ条件**: ドキュメントタイプがPRDまたはADR → 完了へ進む。
138
+
139
+ Design Docの場合、design-syncを呼び出す:
140
+ ```
141
+ subagent_type: design-sync
142
+ description: "整合性を検証"
143
+ prompt: |
144
+ 更新されたDesign Docと他の設計ドキュメントとの整合性を検証する。
145
+
146
+ 更新されたドキュメント: [ステップ1のパス]
147
+ ```
148
+
149
+ **整合性結果に基づく対応**:
150
+ - 矛盾なし → 結果をユーザーに提示して最終承認を得る
151
+ - 矛盾を検出 → AskUserQuestionで矛盾をユーザーに提示:
152
+ - A: このドキュメントの矛盾を解決するためステップ4に戻る
153
+ - B: コマンドを終了し、矛盾は別途対応する
154
+
155
+ ## エラーハンドリング
156
+
157
+ | エラー | アクション |
158
+ |--------|-----------|
159
+ | 対象ドキュメントが見つからない | 報告して終了(代わりに/designを推奨) |
160
+ | サブエージェントの更新が失敗 | 失敗をログ、エラーをユーザーに提示、1回リトライ |
161
+ | 2回の修正後もレビューがリジェクト | ループを停止、人間介入用にフラグ |
162
+ | design-syncが矛盾を検出 | 解決判断のためユーザーに提示 |
163
+
164
+ ## 完了条件
165
+
166
+ - [ ] 対象ドキュメントを特定した
167
+ - [ ] ユーザーと変更内容を確認した
168
+ - [ ] 適切なエージェントでドキュメントを更新した(updateモード)
169
+ - [ ] document-reviewerを実行しフィードバックに対応した
170
+ - [ ] design-syncで整合性検証を実行した(Design Docのみ)
171
+ - [ ] 更新されたドキュメントのユーザー承認を取得した
172
+
173
+ ## 出力例
174
+ ドキュメント更新が完了しました。
175
+ - 更新されたドキュメント: docs/design/[ドキュメント名].md
176
+ - 承認ステータス: ユーザー承認済み
177
+
178
+ **重要**: 本コマンドはドキュメント承認で終了。次フェーズへの移行提案は行わない。
@@ -97,6 +97,10 @@ description: Guides PRD, ADR, Design Doc, and Work Plan creation with templates
97
97
  - Complete enumeration of integration points
98
98
  - Data contract clarification
99
99
  - **Agreement checklist** (agreements with stakeholders)
100
+ - **Code inspection evidence** (inspected files/functions during investigation)
101
+ - **Field propagation map** (when fields cross component boundaries)
102
+ - **Data representation decision** (when introducing new structures)
103
+ - **Applicable standards** (explicit/implicit classification)
100
104
  - **Prerequisite ADRs** (including common ADRs)
101
105
 
102
106
  **Excludes**:
@@ -133,6 +137,7 @@ description: Guides PRD, ADR, Design Doc, and Work Plan creation with templates
133
137
  ## Creation Process
134
138
 
135
139
  1. **Problem Analysis**: Change scale assessment, ADR condition check
140
+ - Identify explicit and implicit project standards before investigation
136
141
  2. **ADR Option Consideration** (ADR only): Compare 3+ options, specify trade-offs
137
142
  3. **Creation**: Use templates, include measurable conditions
138
143
  4. **Approval**: "Accepted" after review enables implementation
@@ -44,6 +44,10 @@ unknowns:
44
44
  - [ ] Backward compatibility: [Required/Not required]
45
45
  - [ ] Performance measurement: [Required/Not required]
46
46
 
47
+ #### Applicable Standards
48
+ - [Standard/convention] `[explicit]` — Source: [config / rule file / doc path]
49
+ - [Observed pattern] `[implicit]` — Evidence: [file paths] — Confirmed: [Yes/No]
50
+
47
51
  ### Problem to Solve
48
52
 
49
53
  [Specific problems or challenges this feature aims to address]
@@ -93,6 +97,9 @@ Each AC is written in EARS format. Keywords determine test type.
93
97
  - **Integration Target**: [What to connect with]
94
98
  - **Invocation Method**: [How it will be invoked]
95
99
 
100
+ ### Code Inspection Evidence
101
+ - [path:function] — [relevance: similar functionality / integration point / pattern reference]
102
+
96
103
  ## Design
97
104
 
98
105
  ### Change Impact Map
@@ -140,6 +147,14 @@ No Ripple Effect:
140
147
  - **Interface**: [APIs and type definitions provided]
141
148
  - **Dependencies**: [Relationships with other components]
142
149
 
150
+ ### Data Representation Decision (When Introducing New Structures)
151
+ Evaluate existing structures: semantic fit, responsibility fit, lifecycle fit, boundary/interop cost.
152
+ - All fit → reuse existing
153
+ - 1-2 fail → extend with adapter
154
+ - 3+ fail → new structure justified
155
+
156
+ **Decision**: [reuse / extend / new] — [rationale]
157
+
143
158
  ### Type Definitions
144
159
 
145
160
  ```typescript
@@ -165,6 +180,9 @@ Invariants:
165
180
  - [Conditions that remain unchanged before and after processing]
166
181
  ```
167
182
 
183
+ ### Field Propagation Map (When Fields Cross Boundaries)
184
+ - [field]: [ComponentA → B] — preserved / transformed / dropped — [reason]
185
+
168
186
  ### State Transitions and Invariants
169
187
 
170
188
  [If the feature involves state management, describe state transitions and invariants here]
@@ -97,6 +97,10 @@ description: PRD、ADR、Design Doc、作業計画書の作成を支援。テン
97
97
  - 統合点の完全な列挙
98
98
  - データ契約の明確化
99
99
  - **合意事項チェックリスト**(関係者との合意内容)
100
+ - **コード調査エビデンス**(調査時に確認したファイル/関数)
101
+ - **フィールド伝播マップ**(フィールドがコンポーネント境界を越える場合)
102
+ - **データ構造の採用判断**(新規構造導入時)
103
+ - **適用基準**(explicit/implicit分類)
100
104
  - **前提となるADR**(共通ADR含む)
101
105
 
102
106
  **必須構造要素**:
@@ -144,6 +148,7 @@ description: PRD、ADR、Design Doc、作業計画書の作成を支援。テン
144
148
  ## 作成プロセス
145
149
 
146
150
  1. **問題分析**: 変更規模判定、ADR条件確認
151
+ - 調査開始前にプロジェクトのexplicit/implicit基準を特定
147
152
  2. **ADR選択肢検討**(ADR時のみ): 3案以上比較、トレードオフ明記
148
153
  3. **作成**: テンプレート使用、測定可能な条件記載
149
154
  4. **承認**: レビュー後「Accepted」で実装可
@@ -44,6 +44,10 @@ unknowns:
44
44
  - [ ] 後方互換性: [必要/不要]
45
45
  - [ ] パフォーマンス計測: [必要/不要]
46
46
 
47
+ #### 適用基準
48
+ - [基準/規約] `[explicit]` — 出典: [設定ファイル / ルールファイル / ドキュメントパス]
49
+ - [観察されたパターン] `[implicit]` — 根拠: [ファイルパス] — 確認: [済/未]
50
+
47
51
  ### 解決すべき課題
48
52
 
49
53
  [この機能が解決しようとする具体的な問題や課題]
@@ -93,6 +97,9 @@ unknowns:
93
97
  - **統合先**: [何と連携するか]
94
98
  - **呼び出し方式**: [どのように呼び出されるか]
95
99
 
100
+ ### コード調査エビデンス
101
+ - [パス:関数] — [関連性: 類似機能 / 統合点 / パターン参照]
102
+
96
103
  ## 設計
97
104
 
98
105
  ### 変更影響マップ
@@ -140,6 +147,14 @@ unknowns:
140
147
  - **インターフェース**: [提供するAPIや型定義]
141
148
  - **依存関係**: [他のコンポーネントとの関係]
142
149
 
150
+ ### データ構造の採用判断(新規構造導入時)
151
+ 既存構造を評価: 意味的適合、責務適合、ライフサイクル適合、境界/相互運用コスト。
152
+ - 全適合 → 既存を再利用
153
+ - 1-2不適合 → アダプターで拡張
154
+ - 3以上不適合 → 新規構造を正当化
155
+
156
+ **判断**: [再利用 / 拡張 / 新規] — [根拠]
157
+
143
158
  ### 型定義
144
159
 
145
160
  ```typescript
@@ -165,6 +180,9 @@ unknowns:
165
180
  - [処理前後で変わらない条件]
166
181
  ```
167
182
 
183
+ ### フィールド伝播マップ(フィールドが境界を越える場合)
184
+ - [フィールド名]: [コンポーネントA → B] — preserved / transformed / dropped — [理由]
185
+
168
186
  ### 状態遷移と不変条件
169
187
 
170
188
  [機能が状態管理を含む場合、状態遷移と不変条件をここに記述]
package/README.ja.md CHANGED
@@ -132,6 +132,7 @@ Claude Codeで利用できる主要なコマンド:
132
132
  | `/reverse-engineer` | コードからPRD/Design Docを生成 | 既存システムのドキュメント化(Backend) |
133
133
  | `/front-reverse-design` | フロントエンドDesign Docを生成 | 既存フロントエンドコードのドキュメント化 |
134
134
  | `/add-integration-tests` | 統合/E2Eテストの追加 | Design Doc存在時のテスト追加 |
135
+ | `/update-doc` | 既存設計ドキュメントの更新 | 仕様変更、レビューフィードバック対応 |
135
136
 
136
137
  [コマンドの詳細はこちら →](docs/guides/ja/use-cases.md)
137
138
 
package/README.md CHANGED
@@ -138,6 +138,7 @@ Essential commands for Claude Code:
138
138
  | `/reverse-engineer` | Generate PRD/Design Docs from code | Legacy system documentation (Backend) |
139
139
  | `/front-reverse-design` | Generate frontend Design Docs | Existing frontend code documentation |
140
140
  | `/add-integration-tests` | Add integration/E2E tests | When Design Doc exists but tests missing |
141
+ | `/update-doc` | Update existing design documents | Spec changes, review feedback |
141
142
 
142
143
  [Full command reference →](docs/guides/en/use-cases.md)
143
144
 
@@ -162,7 +163,7 @@ Generate PRD and Design Docs from existing code:
162
163
  ```mermaid
163
164
  graph TB
164
165
  subgraph Phase1[Phase 1: PRD Generation]
165
- CMD[/reverse-engineer] --> SD1[scope-discoverer]
166
+ CMD["/reverse-engineer"] --> SD1[scope-discoverer]
166
167
  SD1 --> PRD[prd-creator]
167
168
  PRD --> CV1[code-verifier]
168
169
  CV1 --> DR1[document-reviewer]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-ai-project",
3
- "version": "1.14.12",
3
+ "version": "1.14.14",
4
4
  "packageManager": "npm@10.8.2",
5
5
  "description": "TypeScript boilerplate with skills and sub-agents for Claude Code. Prevents context exhaustion through role-based task splitting.",
6
6
  "keywords": [