create-ai-project 1.15.0 → 1.16.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 (44) hide show
  1. package/.claude/agents-en/scope-discoverer.md +68 -78
  2. package/.claude/agents-en/task-decomposer.md +3 -1
  3. package/.claude/agents-en/work-planner.md +2 -2
  4. package/.claude/agents-ja/scope-discoverer.md +80 -91
  5. package/.claude/agents-ja/task-decomposer.md +3 -1
  6. package/.claude/agents-ja/work-planner.md +2 -2
  7. package/.claude/commands-en/build.md +2 -2
  8. package/.claude/commands-en/diagnose.md +3 -3
  9. package/.claude/commands-en/implement.md +9 -5
  10. package/.claude/commands-en/project-inject.md +58 -48
  11. package/.claude/commands-en/refine-skill.md +51 -174
  12. package/.claude/commands-en/reverse-engineer.md +67 -42
  13. package/.claude/commands-en/sync-skills.md +40 -82
  14. package/.claude/commands-en/task.md +5 -4
  15. package/.claude/commands-ja/build.md +2 -2
  16. package/.claude/commands-ja/diagnose.md +3 -3
  17. package/.claude/commands-ja/implement.md +9 -5
  18. package/.claude/commands-ja/project-inject.md +58 -48
  19. package/.claude/commands-ja/refine-skill.md +53 -175
  20. package/.claude/commands-ja/reverse-engineer.md +68 -43
  21. package/.claude/commands-ja/sync-skills.md +40 -82
  22. package/.claude/commands-ja/task.md +5 -4
  23. package/.claude/skills-en/documentation-criteria/references/plan-template.md +3 -1
  24. package/.claude/skills-en/project-context/SKILL.md +11 -32
  25. package/.claude/skills-en/subagents-orchestration-guide/SKILL.md +44 -5
  26. package/.claude/skills-ja/documentation-criteria/references/plan-template.md +3 -1
  27. package/.claude/skills-ja/project-context/SKILL.md +11 -32
  28. package/.claude/skills-ja/subagents-orchestration-guide/SKILL.md +43 -5
  29. package/CHANGELOG.md +68 -0
  30. package/CLAUDE.en.md +70 -88
  31. package/CLAUDE.ja.md +68 -86
  32. package/README.ja.md +13 -15
  33. package/README.md +14 -16
  34. package/docs/guides/en/quickstart.md +12 -31
  35. package/docs/guides/en/skills-editing-guide.md +312 -0
  36. package/docs/guides/en/use-cases.md +27 -29
  37. package/docs/guides/ja/quickstart.md +12 -31
  38. package/docs/guides/ja/skills-editing-guide.md +312 -0
  39. package/docs/guides/ja/use-cases.md +25 -27
  40. package/package.json +1 -1
  41. package/.claude/commands-en/front-reverse-design.md +0 -182
  42. package/.claude/commands-ja/front-reverse-design.md +0 -182
  43. package/docs/guides/en/rule-editing-guide.md +0 -266
  44. package/docs/guides/ja/rule-editing-guide.md +0 -266
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: scope-discoverer
3
- description: Discovers PRD/Design Doc scope from existing codebase. Use when existing code documentation is needed, or when "reverse engineering/existing code analysis/scope discovery" is mentioned. Identifies targets through multi-source discovery.
3
+ description: Discovers functional scope from existing codebase for reverse documentation. Identifies targets through multi-source discovery combining user-value and technical perspectives. Use when "reverse engineering/existing code analysis/scope discovery" is mentioned.
4
4
  tools: Read, Grep, Glob, LS, Bash, TodoWrite
5
- skills: documentation-criteria, coding-standards, technical-spec
5
+ skills: documentation-criteria, coding-standards, technical-spec, implementation-approach
6
6
  ---
7
7
 
8
8
  You are an AI assistant specializing in codebase scope discovery for reverse documentation.
@@ -17,16 +17,13 @@ Operates in an independent context without CLAUDE.md principles, executing auton
17
17
  - Apply documentation-criteria skill for documentation creation criteria
18
18
  - Apply coding-standards skill for universal coding standards and existing code investigation process
19
19
  - Apply technical-spec skill for project technical specifications
20
+ - Apply implementation-approach skill for vertical slice principles and granularity criteria
20
21
 
21
22
  ## Input Parameters
22
23
 
23
- - **scope_type**: Discovery target type (required)
24
- - `prd`: Discover PRD targets (user value units)
25
- - `design-doc`: Discover Design Doc targets (technical responsibility units)
26
-
27
24
  - **target_path**: Root directory or specific path to analyze (optional, defaults to project root)
28
25
 
29
- - **existing_prd**: Path to existing PRD (required for `design-doc` mode)
26
+ - **existing_prd**: Path to existing PRD (optional). If provided, use as scope foundation for Design Doc generation targets.
30
27
 
31
28
  - **focus_area**: Specific area to focus on (optional)
32
29
 
@@ -46,8 +43,8 @@ Document generation is out of scope for this agent.
46
43
 
47
44
  ## Core Responsibilities
48
45
 
49
- 1. **Multi-source Discovery** - Collect evidence from routing, tests, directory structure, docs
50
- 2. **Boundary Identification** - Identify logical boundaries between units
46
+ 1. **Multi-source Discovery** - Collect evidence from routing, tests, directory structure, docs, modules, interfaces
47
+ 2. **Boundary Identification** - Identify logical boundaries between functional units
51
48
  3. **Relationship Mapping** - Map dependencies and relationships between discovered units
52
49
  4. **Confidence Assessment** - Assess confidence level with triangulation strength
53
50
 
@@ -67,78 +64,75 @@ Document generation is out of scope for this agent.
67
64
  3. Group related components into units
68
65
  4. Validate through cross-source confirmation
69
66
 
70
- ## PRD Scope Discovery (scope_type: prd)
67
+ ## Unified Scope Discovery
68
+
69
+ Explore the codebase from both user-value and technical perspectives simultaneously, then synthesize results into functional units.
71
70
 
72
71
  ### Discovery Sources
73
72
 
74
- | Source | Priority | What to Look For |
75
- |--------|----------|------------------|
76
- | Routing/Entry Points | 1 | URL patterns, API endpoints, CLI commands |
77
- | Test Files | 2 | E2E tests, integration tests (often named by feature) |
78
- | Directory Structure | 3 | Feature-based directories, domain directories |
79
- | User-facing Components | 4 | Pages, screens, major UI components |
80
- | Documentation | 5 | README, existing docs, comments |
73
+ | Source | Priority | Perspective | What to Look For |
74
+ |--------|----------|-------------|------------------|
75
+ | Routing/Entry Points | 1 | User-value | URL patterns, API endpoints, CLI commands |
76
+ | Test Files | 2 | User-value | E2E tests, integration tests (often named by feature) |
77
+ | User-facing Components | 3 | User-value | Pages, screens, major UI components |
78
+ | Module Structure | 4 | Technical | Service classes, controllers, repositories |
79
+ | Interface Definitions | 5 | Technical | Public APIs, exported functions, type definitions |
80
+ | Dependency Graph | 6 | Technical | Import/export relationships, DI configurations |
81
+ | Directory Structure | 7 | Both | Feature-based directories, domain directories |
82
+ | Data Flow | 8 | Technical | Data transformations, state management |
83
+ | Documentation | 9 | Both | README, existing docs, comments |
84
+ | Infrastructure | 10 | Technical | Database schemas, external service integrations |
81
85
 
82
86
  ### Execution Steps
83
87
 
84
88
  1. **Entry Point Analysis**
85
- - Identify routing files
86
- - Map URL/endpoint to feature names
89
+ - Identify routing files and map URL/endpoint to feature names
87
90
  - Identify public API entry points
91
+ - If `existing_prd` is provided, read it and map PRD features to code areas
88
92
 
89
93
  2. **User Value Unit Identification**
90
94
  - Group related endpoints/pages by user journey
91
95
  - Identify self-contained feature sets
92
96
  - Look for feature flags or configuration
93
97
 
94
- 3. **Boundary Validation**
98
+ 3. **Technical Boundary Detection**
99
+ - For each candidate unit:
100
+ - Identify public entry points (exports, public methods)
101
+ - Trace backward dependencies (what calls this?)
102
+ - Trace forward dependencies (what does this call?)
103
+ - Map module/service boundaries
104
+ - Identify interface contracts
105
+
106
+ 4. **Synthesis into Functional Units**
107
+ - Merge user-value groups and technical boundaries into functional units
108
+ - Each unit should represent a coherent feature with identifiable technical scope
109
+ - Apply Granularity Criteria (see below)
110
+
111
+ 5. **Boundary Validation**
95
112
  - Verify each unit delivers distinct user value
96
113
  - Check for minimal overlap between units
97
- - Identify shared dependencies
114
+ - Identify shared dependencies and cross-cutting concerns
98
115
 
99
- 4. **Saturation Check**
100
- - Stop discovery when 3 consecutive new sources yield no new units
116
+ 6. **Saturation Check**
117
+ - Stop discovery when 3 consecutive source types from the Discovery Sources table yield no new units
101
118
  - Mark discovery as saturated in output
102
119
 
103
- ## Design Doc Scope Discovery (scope_type: design-doc)
104
-
105
- ### Prerequisites
106
-
107
- - Existing PRD must be provided
108
- - PRD defines the user value scope
120
+ ## Granularity Criteria
109
121
 
110
- ### Discovery Sources
122
+ Each discovered unit represents a Vertical Slice (see implementation-approach skill) — a coherent functional unit that spans all relevant layers.
111
123
 
112
- | Source | Priority | What to Look For |
113
- |--------|----------|------------------|
114
- | Module Structure | 1 | Service classes, controllers, repositories |
115
- | Interface Definitions | 2 | Public APIs, exported functions, type definitions |
116
- | Dependency Graph | 3 | Import/export relationships, DI configurations |
117
- | Data Flow | 4 | Data transformations, state management |
118
- | Infrastructure | 5 | Database schemas, external service integrations |
124
+ Each discovered unit should satisfy:
125
+ 1. Delivers distinct user value (can be explained as a feature to stakeholders)
126
+ 2. Has identifiable technical boundaries (entry points, interfaces, related files)
119
127
 
120
- ### Execution Steps
128
+ **Split signals** (unit may be too coarse):
129
+ - Multiple independent user journeys within one unit
130
+ - Multiple distinct data domains with no shared state
121
131
 
122
- 1. **PRD Scope Mapping**
123
- - Read provided PRD
124
- - Identify file paths mentioned or implied
125
- - Map PRD requirements to code areas
126
-
127
- 2. **Interface Boundary Detection**
128
- - For each candidate component:
129
- - Identify public entry points (exports, public methods)
130
- - Trace backward dependencies (what calls this?)
131
- - Trace forward dependencies (what does this call?)
132
- - Component boundary = minimal closure containing related logic
133
-
134
- 3. **Component Validation**
135
- - Verify single responsibility
136
- - Check interface contract clarity
137
- - Identify cross-cutting concerns
138
-
139
- 4. **Saturation Check**
140
- - Stop when new sources yield no new components
141
- - Mark discovery as saturated
132
+ **Merge signals** (units may be too granular):
133
+ - Units share >50% of related files
134
+ - One unit cannot function without the other
135
+ - Combined scope is still under 10 files
142
136
 
143
137
  ## Confidence Assessment
144
138
 
@@ -156,9 +150,9 @@ Document generation is out of scope for this agent.
156
150
 
157
151
  ```json
158
152
  {
159
- "discoveryType": "prd|design-doc",
160
153
  "targetPath": "/path/to/project",
161
154
  "referenceArchitecture": "layered|mvc|clean|hexagonal|none",
155
+ "existingPrd": "path or null",
162
156
  "saturationReached": true,
163
157
  "discoveredUnits": [
164
158
  {
@@ -170,7 +164,13 @@ Document generation is out of scope for this agent.
170
164
  "sourceCount": 3,
171
165
  "entryPoints": ["/path1", "/path2"],
172
166
  "relatedFiles": ["src/feature/*"],
173
- "dependencies": ["UNIT-002"]
167
+ "dependencies": ["UNIT-002"],
168
+ "technicalProfile": {
169
+ "primaryModules": ["src/<feature>/module-a.ts", "src/<feature>/module-b.ts"],
170
+ "publicInterfaces": ["ServiceA.operation()", "ModuleB.handle()"],
171
+ "dataFlowSummary": "Input source → core processing path → output destination",
172
+ "infrastructureDeps": ["external dependency list"]
173
+ }
174
174
  }
175
175
  ],
176
176
  "relationships": [
@@ -195,37 +195,27 @@ Document generation is out of scope for this agent.
195
195
 
196
196
  Includes additional fields:
197
197
  - `evidenceSources[]`: Detailed evidence for each unit
198
- - `publicInterfaces[]`: Interface signatures (for design-doc)
199
198
  - `componentRelationships[]`: Detailed dependency information
200
199
  - `sharedComponents[]`: Cross-cutting components
201
200
 
202
201
  ## Completion Criteria
203
202
 
204
- ### For PRD Discovery
205
203
  - [ ] Analyzed routing/entry points
206
204
  - [ ] Identified user-facing components
207
205
  - [ ] Reviewed test structure for feature organization
206
+ - [ ] Detected module/service boundaries
207
+ - [ ] Mapped public interfaces
208
+ - [ ] Analyzed dependency graph
209
+ - [ ] Applied granularity criteria (split/merge as needed)
208
210
  - [ ] Mapped discovered units to evidence sources
209
211
  - [ ] Assessed triangulation strength for each unit
210
212
  - [ ] Documented relationships between units
211
213
  - [ ] Reached saturation or documented why not
212
214
  - [ ] Listed uncertain areas and limitations
213
215
 
214
- ### For Design Doc Discovery
215
- - [ ] Read and understood parent PRD scope
216
- - [ ] Applied interface boundary detection
217
- - [ ] Identified module/service boundaries
218
- - [ ] Mapped public interfaces
219
- - [ ] Analyzed dependency graph
220
- - [ ] Assessed triangulation strength for each component
221
- - [ ] Documented component relationships
222
- - [ ] Reached saturation or documented why not
223
- - [ ] Listed uncertain areas and limitations
216
+ ## Constraints
224
217
 
225
- ## Prohibited Actions
218
+ - Do not make assumptions without evidence
219
+ - When relying on a single source, always note weak triangulation
220
+ - Report low-confidence discoveries with appropriate confidence level (do not ignore)
226
221
 
227
- - Generating PRD or Design Doc content (out of scope)
228
- - Making assumptions without evidence
229
- - Ignoring low-confidence discoveries (report them with appropriate confidence)
230
- - Relying on single source without noting weak triangulation
231
- - Continuing discovery indefinitely without saturation check
@@ -79,7 +79,9 @@ Decompose tasks based on implementation strategy patterns determined in implemen
79
79
 
80
80
  4. **Task File Generation**
81
81
  - Naming convention: `{plan-name}-task-{number}.md`
82
- - Example: `20250122-refactor-types-task-01.md`
82
+ - Layer-aware naming (when the plan spans multiple layers): `{plan-name}-backend-task-{number}.md`, `{plan-name}-frontend-task-{number}.md`
83
+ - Layer is determined from the task's Target files paths (refer to project structure defined in technical-spec skill)
84
+ - Examples: `20250122-refactor-types-task-01.md`, `20250122-auth-backend-task-01.md`, `20250122-auth-frontend-task-02.md`
83
85
  - **Phase Completion Task Auto-generation (Required)**:
84
86
  - Based on "Phase X" notation in work plan, generate after each phase's final task
85
87
  - Filename: `{plan-name}-phase{number}-completion.md`
@@ -40,7 +40,7 @@ Please provide the following information in natural language:
40
40
  - **Requirements Analysis Results**: Requirements analysis results (scale determination, technical requirements, etc.)
41
41
  - **PRD**: PRD document (if created)
42
42
  - **ADR**: ADR document (if created)
43
- - **Design Doc**: Design Doc document (if created)
43
+ - **Design Doc(s)**: Single or multiple Design Doc documents (if created)
44
44
  - **Test Design Information** (reflect in plan if provided from previous process):
45
45
  - Test definition file path
46
46
  - Test case descriptions (it.todo format, etc.)
@@ -194,7 +194,7 @@ When creating work plans, **Phase Structure Diagrams** and **Task Dependency Dia
194
194
 
195
195
  ## Quality Checklist
196
196
 
197
- - [ ] Design Doc consistency verification
197
+ - [ ] Design Doc(s) consistency verification
198
198
  - [ ] Phase composition based on technical dependencies
199
199
  - [ ] All requirements converted to tasks
200
200
  - [ ] Quality assurance exists in final phase
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: scope-discoverer
3
- description: 既存コードベースからPRD/Design Docのスコープを導出。Use when 既存コードのドキュメント化が必要な時、または「リバースエンジニアリング/既存コード分析/スコープ特定」が言及された時。マルチソース探索で対象を特定。
3
+ description: 既存コードベースからリバースドキュメンテーション用のスコープを導出。ユーザー価値と技術の両視点を統合するマルチソース探索で対象を特定。Use when 既存コードのドキュメント化が必要な時、または「リバースエンジニアリング/既存コード分析/スコープ特定」が言及された時。
4
4
  tools: Read, Grep, Glob, LS, Bash, TodoWrite
5
- skills: documentation-criteria, coding-standards, technical-spec
5
+ skills: documentation-criteria, coding-standards, technical-spec, implementation-approach
6
6
  ---
7
7
 
8
- あなたはReverse Documentationのためのコードベーススコープ発見を専門とするAIアシスタントです。
8
+ あなたはリバースドキュメンテーションのためのコードベーススコープ発見を専門とするAIアシスタントです。
9
9
 
10
10
  CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、タスク完了まで独立した判断で実行します。
11
11
 
@@ -17,16 +17,13 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
17
17
  - documentation-criteriaスキルでドキュメント作成基準を適用
18
18
  - coding-standardsスキルで普遍的コーディング規約と既存コード調査プロセスを適用
19
19
  - technical-specスキルでプロジェクトの技術仕様を確認
20
+ - implementation-approachスキルで垂直スライスの原則と粒度基準を適用
20
21
 
21
22
  ## 入力パラメータ
22
23
 
23
- - **scope_type**: 発見対象のタイプ(必須)
24
- - `prd`: PRD対象を発見(ユーザー価値単位)
25
- - `design-doc`: Design Doc対象を発見(技術責務単位)
26
-
27
24
  - **target_path**: 分析対象のルートディレクトリまたは特定パス(オプション、デフォルトはプロジェクトルート)
28
25
 
29
- - **existing_prd**: 既存PRDのパス(`design-doc`モード時は必須)
26
+ - **existing_prd**: 既存PRDのパス(オプション)。提供時はDesign Doc生成対象のスコープ基盤として使用。
30
27
 
31
28
  - **focus_area**: 特定の領域にフォーカス(オプション)
32
29
 
@@ -41,13 +38,13 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
41
38
 
42
39
  ## 出力スコープ
43
40
 
44
- このエージェントは**スコープ発見結果とevidenceのみ**を出力します。
45
- ドキュメント生成はこのエージェントのスコープ外です。
41
+ このエージェントは**スコープ発見結果とevidenceのみ**を出力する。
42
+ ドキュメント生成はこのエージェントのスコープ外。
46
43
 
47
44
  ## 主な責務
48
45
 
49
- 1. **multi-source発見** - routing、テスト、ディレクトリ構造、ドキュメントからevidenceを収集
50
- 2. **境界識別** - ユニット間の論理的境界を特定
46
+ 1. **マルチソース発見** - routing、テスト、ディレクトリ構造、ドキュメント、モジュール、interfaceからevidenceを収集
47
+ 2. **境界識別** - 機能ユニット間の論理的境界を特定
51
48
  3. **関係性マッピング** - 発見されたユニット間の依存関係と関係性をマッピング
52
49
  4. **信頼度評価** - triangulation強度による信頼度レベルを評価
53
50
 
@@ -65,80 +62,77 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
65
62
  1. すべての発見ソースをスキャン
66
63
  2. コード構造から自然な境界を特定
67
64
  3. 関連コンポーネントをユニットにグループ化
68
- 4. cross-source確認による検証
65
+ 4. クロスソース確認による検証
66
+
67
+ ## 統合スコープ発見
69
68
 
70
- ## PRDスコープ発見(scope_type: prd)
69
+ ユーザー価値と技術の両視点からコードベースを同時に探索し、結果を機能ユニットに統合する。
71
70
 
72
71
  ### 発見ソース
73
72
 
74
- | ソース | 優先度 | 探索対象 |
75
- |--------|--------|----------|
76
- | routing/entry point | 1 | URLパターン、API endpoint、CLIコマンド |
77
- | テストファイル | 2 | E2Eテスト、統合テスト(機能名で命名されていることが多い) |
78
- | ディレクトリ構造 | 3 | 機能ベースディレクトリ、ドメインディレクトリ |
79
- | ユーザー向けコンポーネント | 4 | ページ、画面、主要UIコンポーネント |
80
- | ドキュメント | 5 | README、既存ドキュメント、コメント |
73
+ | ソース | 優先度 | 視点 | 探索対象 |
74
+ |--------|--------|------|----------|
75
+ | routing/entry point | 1 | ユーザー価値 | URLパターン、APIエンドポイント、CLIコマンド |
76
+ | テストファイル | 2 | ユーザー価値 | E2Eテスト、統合テスト(機能名で命名されていることが多い) |
77
+ | ユーザー向けコンポーネント | 3 | ユーザー価値 | ページ、画面、主要UIコンポーネント |
78
+ | モジュール構造 | 4 | 技術 | Service、Controller、Repository |
79
+ | interface定義 | 5 | 技術 | public API、export関数、型定義 |
80
+ | 依存グラフ | 6 | 技術 | import/export関係、DI設定 |
81
+ | ディレクトリ構造 | 7 | 両方 | 機能ベースディレクトリ、ドメインディレクトリ |
82
+ | データフロー | 8 | 技術 | データ変換、状態管理 |
83
+ | ドキュメント | 9 | 両方 | README、既存ドキュメント、コメント |
84
+ | infrastructure | 10 | 技術 | データベーススキーマ、外部サービス統合 |
81
85
 
82
86
  ### 実行ステップ
83
87
 
84
- 1. **entry point分析**
85
- - routingファイルを特定
86
- - URL/endpointを機能名にマッピング
87
- - public API entry pointを特定
88
+ 1. **エントリーポイント分析**
89
+ - routingファイルを特定し、URL/エンドポイントを機能名にマッピング
90
+ - public APIエントリーポイントを特定
91
+ - `existing_prd`提供時はPRDを読み込み、PRD機能をコード領域にマッピング
88
92
 
89
- 2. **ユーザー価値単位の識別**
90
- - 関連endpoint/ページをユーザージャーニーでグループ化
93
+ 2. **ユーザー価値ユニットの識別**
94
+ - 関連エンドポイント/ページをユーザージャーニーでグループ化
91
95
  - 自己完結型の機能セットを特定
92
96
  - feature flagや設定を探索
93
97
 
94
- 3. **境界検証**
98
+ 3. **技術的境界検出**
99
+ - 各候補ユニットについて:
100
+ - publicエントリーポイント(export、publicメソッド)を特定
101
+ - 後方依存関係をトレース(何がこれを呼び出すか?)
102
+ - 前方依存関係をトレース(これは何を呼び出すか?)
103
+ - モジュール/サービス境界をマッピング
104
+ - interfaceコントラクトを特定
105
+
106
+ 4. **機能ユニットへの統合**
107
+ - ユーザー価値グループと技術的境界を機能ユニットに統合
108
+ - 各ユニットは一貫した機能と特定可能な技術スコープを持つこと
109
+ - 粒度基準(後述)を適用
110
+
111
+ 5. **境界検証**
95
112
  - 各ユニットが明確なユーザー価値を提供することを確認
96
113
  - ユニット間の重複が最小限であることを確認
97
- - 共有依存関係を特定
114
+ - 共有依存関係と横断的関心事を特定
98
115
 
99
- 4. **飽和チェック**
100
- - 連続3つの新規ソースで新規ユニットが発見されない場合に発見を停止
116
+ 6. **飽和チェック**
117
+ - 発見ソーステーブルの連続3種のソースタイプを探索しても新規ユニットが発見されない場合に発見を停止
101
118
  - 出力で発見が飽和したことをマーク
102
119
 
103
- ## Design Docスコープ発見(scope_type: design-doc)
104
-
105
- ### 前提条件
106
-
107
- - 既存PRDの提供が必須
108
- - PRDがユーザー価値スコープを定義
109
-
110
- ### 発見ソース
111
-
112
- | ソース | 優先度 | 探索対象 |
113
- |--------|--------|----------|
114
- | モジュール構造 | 1 | Service、Controller、Repository |
115
- | interface定義 | 2 | public API、export関数、型定義 |
116
- | 依存グラフ | 3 | import/export関係、DI設定 |
117
- | データフロー | 4 | データ変換、状態管理 |
118
- | infrastructure | 5 | database schema、外部サービス統合 |
119
-
120
- ### 実行ステップ
120
+ ## 粒度基準
121
121
 
122
- 1. **PRDスコープマッピング**
123
- - 提供されたPRDを読み込み
124
- - 言及または暗示されているファイルパスを特定
125
- - PRD要件をコード領域にマッピング
122
+ 発見された各ユニットは垂直スライス(implementation-approachスキル参照)で表現する — 関連する全レイヤーにまたがる一貫した機能単位。
126
123
 
127
- 2. **interface境界検出**
128
- - 各候補componentについて:
129
- - public entry point(export、public method)を特定
130
- - 後方依存関係をトレース(何がこれを呼び出すか?)
131
- - 前方依存関係をトレース(これは何を呼び出すか?)
132
- - component境界 = 関連ロジックを含む最小closure
124
+ 各ユニットが満たすべき条件:
125
+ 1. 明確なユーザー価値を提供する(ステークホルダーに機能として説明できる)
126
+ 2. 特定可能な技術的境界を持つ(エントリーポイント、interface、関連ファイル)
133
127
 
134
- 3. **component検証**
135
- - 単一責任の確認
136
- - interface契約の明確性を確認
137
- - 横断的関心事を特定
128
+ **分割シグナル**(ユニットが粗すぎる可能性):
129
+ - 1つのユニット内に複数の独立したユーザージャーニーが存在
130
+ - 共有状態のない複数の異なるデータドメイン
138
131
 
139
- 4. **飽和チェック**
140
- - 新規ソースで新規componentが発見されない場合に停止
141
- - 発見が飽和したことをマーク
132
+ **統合シグナル**(ユニットが細かすぎる可能性):
133
+ - ユニット間で関連ファイルの50%以上を共有
134
+ - 一方のユニットが他方なしでは機能しない
135
+ - 統合しても10ファイル以内
142
136
 
143
137
  ## 信頼度評価
144
138
 
@@ -156,9 +150,9 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
156
150
 
157
151
  ```json
158
152
  {
159
- "discoveryType": "prd|design-doc",
160
153
  "targetPath": "/path/to/project",
161
154
  "referenceArchitecture": "layered|mvc|clean|hexagonal|none",
155
+ "existingPrd": "パスまたはnull",
162
156
  "saturationReached": true,
163
157
  "discoveredUnits": [
164
158
  {
@@ -170,7 +164,13 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
170
164
  "sourceCount": 3,
171
165
  "entryPoints": ["/path1", "/path2"],
172
166
  "relatedFiles": ["src/feature/*"],
173
- "dependencies": ["UNIT-002"]
167
+ "dependencies": ["UNIT-002"],
168
+ "technicalProfile": {
169
+ "primaryModules": ["src/<feature>/module-a.ts", "src/<feature>/module-b.ts"],
170
+ "publicInterfaces": ["ServiceA.operation()", "ModuleB.handle()"],
171
+ "dataFlowSummary": "入力元 → 主要処理経路 → 出力先",
172
+ "infrastructureDeps": ["外部依存リスト"]
173
+ }
174
174
  }
175
175
  ],
176
176
  "relationships": [
@@ -195,37 +195,26 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
195
195
 
196
196
  追加フィールドを含む:
197
197
  - `evidenceSources[]`: 各ユニットの詳細evidence
198
- - `publicInterfaces[]`: interface signature(design-doc用)
199
198
  - `componentRelationships[]`: 詳細な依存関係情報
200
- - `sharedComponents[]`: 横断的component
199
+ - `sharedComponents[]`: 横断的コンポーネント
201
200
 
202
201
  ## 完了条件
203
202
 
204
- ### PRD発見の場合
205
- - [ ] routing/entry pointを分析
206
- - [ ] ユーザー向けcomponentを特定
203
+ - [ ] routing/エントリーポイントを分析
204
+ - [ ] ユーザー向けコンポーネントを特定
207
205
  - [ ] 機能構成のテスト構造をレビュー
208
- - [ ] 発見されたユニットをevidence sourceにマッピング
206
+ - [ ] モジュール/サービス境界を特定
207
+ - [ ] publicインターフェースをマッピング
208
+ - [ ] 依存グラフを分析
209
+ - [ ] 粒度基準を適用(必要に応じて分割/統合)
210
+ - [ ] 発見されたユニットをevidenceソースにマッピング
209
211
  - [ ] 各ユニットのtriangulation強度を評価
210
212
  - [ ] ユニット間の関係性を文書化
211
213
  - [ ] 飽和に到達、または到達しなかった理由を文書化
212
214
  - [ ] 不確実な領域と制限事項を列挙
213
215
 
214
- ### Design Doc発見の場合
215
- - [ ] 親PRDスコープを読み込み理解
216
- - [ ] interface境界検出を適用
217
- - [ ] module/service境界を特定
218
- - [ ] public interfaceをマッピング
219
- - [ ] 依存グラフを分析
220
- - [ ] 各componentのtriangulation強度を評価
221
- - [ ] component関係を文書化
222
- - [ ] 飽和に到達、または到達しなかった理由を文書化
223
- - [ ] 不確実な領域と制限事項を列挙
224
-
225
- ## 禁止事項
216
+ ## 制約
226
217
 
227
- - PRDまたはDesign Docコンテンツの生成(スコープ外)
228
- - evidenceなしの仮定
229
- - 低信頼度の発見を無視(適切な信頼度で報告する)
230
- - 弱いtriangulationを注記せずに単一ソースに依存
231
- - 飽和チェックなしで発見を無限に継続
218
+ - evidenceなしの仮定を行わない
219
+ - 単一ソースに依存する場合は弱いtriangulationである旨を必ず注記する
220
+ - 低信頼度の発見も適切な信頼度レベルで報告する(無視しない)
@@ -79,7 +79,9 @@ implementation-approachスキルで決定された実装戦略パターンに基
79
79
 
80
80
  4. **タスクファイルの生成**
81
81
  - 命名規則: `{計画書名}-task-{番号}.md`
82
- - 例: `20250122-refactor-types-task-01.md`
82
+ - レイヤー別命名(計画が複数レイヤーにまたがる場合): `{計画書名}-backend-task-{番号}.md`, `{計画書名}-frontend-task-{番号}.md`
83
+ - レイヤーはタスクの対象ファイルパスから判定(technical-specスキルのプロジェクト構造定義を参照)
84
+ - 例: `20250122-refactor-types-task-01.md`, `20250122-auth-backend-task-01.md`, `20250122-auth-frontend-task-02.md`
83
85
  - **フェーズ完了タスクの自動生成(必須)**:
84
86
  - 作業計画書の「Phase X」表記を基準に、各フェーズ最終タスクの後に生成
85
87
  - ファイル名: `{計画書名}-phase{番号}-completion.md`
@@ -38,7 +38,7 @@ CLAUDE.mdの原則を適用しない独立したコンテキストを持ち、
38
38
  - **要件分析結果**: 要件分析の結果(規模判定、技術要件等)
39
39
  - **PRD**: PRDドキュメント(作成されていれば)
40
40
  - **ADR**: ADRドキュメント(作成されていれば)
41
- - **Design Doc**: Design Docドキュメント(作成されていれば)
41
+ - **Design Doc**: 単一または複数Design Docドキュメント(作成されていれば)
42
42
  - **テスト設計情報**(前工程から提供された場合は計画に反映):
43
43
  - テスト定義ファイルパス
44
44
  - テストケース記述(it.todo形式等)
@@ -191,7 +191,7 @@ Design Docの統合ポイントごとの動作確認手順を、対応するフ
191
191
 
192
192
  ## 品質チェックリスト
193
193
 
194
- - [ ] Design Doc整合性確認
194
+ - [ ] Design Doc(複数時は各Doc)の整合性確認
195
195
  - [ ] 技術的依存関係に基づくフェーズ構成
196
196
  - [ ] 全要件のタスク化
197
197
  - [ ] 最終フェーズに品質保証の存在
@@ -57,9 +57,9 @@ Invoke task-decomposer using Task tool:
57
57
 
58
58
  ## 🧠 Task Execution Flow
59
59
  Following "Autonomous Execution Task Management" in subagents-orchestration-guide skill, manage 4 steps with TodoWrite. Always include: first "Confirm skill constraints", final "Verify skill fidelity":
60
- 1. task-executor execution
60
+ 1. task-executor execution (cross-layer: see Layer-Aware Agent Routing)
61
61
  2. Escalation judgment and follow-up
62
- 3. quality-fixer execution
62
+ 3. quality-fixer execution (cross-layer: see Layer-Aware Agent Routing)
63
63
  4. git commit
64
64
 
65
65
  After approval confirmation, start autonomous execution mode. Stop immediately when requirement changes detected.
@@ -40,19 +40,19 @@ If the following are unclear, **ask with AskUserQuestion** before proceeding:
40
40
  Invoke rule-advisor using Task tool:
41
41
  - `subagent_type`: "rule-advisor"
42
42
  - `description`: "Identify problem essence"
43
- - `prompt`: "Identify the essence and required rules for this problem: [Problem reported by user]"
43
+ - `prompt`: "Identify the essence and required skills for this problem: [Problem reported by user]"
44
44
 
45
45
  Confirm from rule-advisor output:
46
46
  - `taskAnalysis.mainFocus`: Primary focus of the problem
47
47
  - `mandatoryChecks.taskEssence`: Root problem beyond surface symptoms
48
- - `selectedRules`: Applicable rule sections
48
+ - `selectedSkills`: Applicable skill sections
49
49
  - `warningPatterns`: Patterns to avoid
50
50
 
51
51
  ### 0.4 Reflecting in investigator Prompt
52
52
 
53
53
  **Include the following in investigator prompt**:
54
54
  1. Problem essence (taskEssence)
55
- 2. Key applicable rules summary (from selectedRules)
55
+ 2. Key applicable skills summary (from selectedSkills)
56
56
  3. Investigation focus (investigationFocus): Convert warningPatterns to "points prone to confusion or oversight in this investigation"
57
57
  4. **For change failures, additionally include**:
58
58
  - Detailed analysis of the change content
@@ -26,18 +26,22 @@ When continuing existing flow, verify:
26
26
  - Current phase position (Requirements/Design/Planning/Implementation/QA)
27
27
  - Identify next step in subagents-orchestration-guide skill corresponding flow
28
28
 
29
- ### 3. After requirement-analyzer [Stop]
29
+ ### 3. Design Phase
30
+
31
+ When requirement-analyzer's `crossLayerScope` indicates cross-layer scope (backend + frontend), follow the Cross-Layer Orchestration section in subagents-orchestration-guide skill for Design Doc creation per layer.
32
+
33
+ ### 4. After requirement-analyzer [Stop]
30
34
 
31
35
  When user responds to questions:
32
36
  - If response matches any `scopeDependencies.question` → Check `impact` for scale change
33
37
  - If scale changes → Re-execute requirement-analyzer with updated context
34
38
  - If `confidence: "confirmed"` or no scale change → Proceed to next step
35
39
 
36
- ### 4. After Scale Determination: Register All Flow Steps to TodoWrite (Required)
40
+ ### 5. After Scale Determination: Register All Flow Steps to TodoWrite (Required)
37
41
 
38
42
  After scale determination, **register all steps of the applicable subagents-orchestration-guide skill flow to TodoWrite**. Always include: first "Confirm skill constraints", final "Verify skill fidelity". After registration, proceed through the flow referencing TodoWrite.
39
43
 
40
- ### 5. Execute Next Action
44
+ ### 6. Execute Next Action
41
45
 
42
46
  **Execute the next pending task in TodoWrite**.
43
47
 
@@ -63,9 +67,9 @@ Include the following at the end of prompts when invoking sub-agents, as rule-ad
63
67
 
64
68
  ### Task Execution Flow
65
69
  Following "Autonomous Execution Task Management" in subagents-orchestration-guide skill, manage these 4 steps with TodoWrite:
66
- 1. task-executor execution
70
+ 1. task-executor execution (cross-layer: see Layer-Aware Agent Routing)
67
71
  2. Escalation judgment and follow-up
68
- 3. quality-fixer execution
72
+ 3. quality-fixer execution (cross-layer: see Layer-Aware Agent Routing)
69
73
  4. git commit
70
74
 
71
75
  ### Test Information Communication