create-ai-project 1.11.2 → 1.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/.claude/agents-en/acceptance-test-generator.md +13 -13
  2. package/.claude/agents-en/code-reviewer.md +8 -10
  3. package/.claude/agents-en/design-sync.md +6 -5
  4. package/.claude/agents-en/document-reviewer.md +8 -7
  5. package/.claude/agents-en/integration-test-reviewer.md +5 -4
  6. package/.claude/agents-en/prd-creator.md +7 -6
  7. package/.claude/agents-en/quality-fixer-frontend.md +3 -14
  8. package/.claude/agents-en/quality-fixer.md +9 -20
  9. package/.claude/agents-en/requirement-analyzer.md +8 -7
  10. package/.claude/agents-en/rule-advisor.md +57 -128
  11. package/.claude/agents-en/task-decomposer.md +4 -10
  12. package/.claude/agents-en/task-executor-frontend.md +4 -16
  13. package/.claude/agents-en/task-executor.md +5 -16
  14. package/.claude/agents-en/technical-designer-frontend.md +17 -15
  15. package/.claude/agents-en/technical-designer.md +13 -15
  16. package/.claude/agents-en/work-planner.md +9 -14
  17. package/.claude/agents-ja/acceptance-test-generator.md +9 -15
  18. package/.claude/agents-ja/code-reviewer.md +3 -11
  19. package/.claude/agents-ja/design-sync.md +2 -6
  20. package/.claude/agents-ja/document-reviewer.md +4 -9
  21. package/.claude/agents-ja/integration-test-reviewer.md +2 -5
  22. package/.claude/agents-ja/prd-creator.md +3 -7
  23. package/.claude/agents-ja/quality-fixer-frontend.md +2 -13
  24. package/.claude/agents-ja/quality-fixer.md +7 -18
  25. package/.claude/agents-ja/requirement-analyzer.md +5 -8
  26. package/.claude/agents-ja/rule-advisor.md +57 -128
  27. package/.claude/agents-ja/task-decomposer.md +4 -10
  28. package/.claude/agents-ja/task-executor-frontend.md +3 -15
  29. package/.claude/agents-ja/task-executor.md +3 -17
  30. package/.claude/agents-ja/technical-designer-frontend.md +17 -15
  31. package/.claude/agents-ja/technical-designer.md +13 -15
  32. package/.claude/agents-ja/work-planner.md +9 -14
  33. package/.claude/commands-en/build.md +2 -2
  34. package/.claude/commands-en/design.md +1 -1
  35. package/.claude/commands-en/implement.md +8 -8
  36. package/.claude/commands-en/plan.md +3 -3
  37. package/.claude/commands-en/project-inject.md +4 -4
  38. package/.claude/commands-en/{refine-rule.md → refine-skill.md} +47 -48
  39. package/.claude/commands-en/{sync-rules.md → sync-skills.md} +29 -29
  40. package/.claude/commands-ja/build.md +2 -2
  41. package/.claude/commands-ja/design.md +1 -1
  42. package/.claude/commands-ja/implement.md +8 -8
  43. package/.claude/commands-ja/plan.md +3 -3
  44. package/.claude/commands-ja/project-inject.md +4 -4
  45. package/.claude/{commands/refine-rule.md → commands-ja/refine-skill.md} +25 -25
  46. package/.claude/{commands/sync-rules.md → commands-ja/sync-skills.md} +28 -28
  47. package/{docs/rules-en/coding-standards.md → .claude/skills-en/coding-standards/SKILL.md} +21 -108
  48. package/{docs/rules-en/documentation-criteria.md → .claude/skills-en/documentation-criteria/SKILL.md} +40 -42
  49. package/{docs/adr/template-en.md → .claude/skills-en/documentation-criteria/references/adr-template.md} +1 -1
  50. package/{docs/design/template-en.md → .claude/skills-en/documentation-criteria/references/design-template.md} +11 -31
  51. package/{docs/plans/template-en.md → .claude/skills-en/documentation-criteria/references/plan-template.md} +4 -4
  52. package/{docs/prd/template-en.md → .claude/skills-en/documentation-criteria/references/prd-template.md} +1 -1
  53. package/{docs/rules-en/frontend/technical-spec.md → .claude/skills-en/frontend/technical-spec/SKILL.md} +17 -13
  54. package/{docs/rules-en/frontend/typescript.md → .claude/skills-en/frontend/typescript-rules/SKILL.md} +17 -12
  55. package/{docs/rules-en/frontend/typescript-testing.md → .claude/skills-en/frontend/typescript-testing/SKILL.md} +11 -6
  56. package/{docs/rules-en/architecture/implementation-approach.md → .claude/skills-en/implementation-approach/SKILL.md} +7 -2
  57. package/{docs/rules-en/integration-e2e-testing.md → .claude/skills-en/integration-e2e-testing/SKILL.md} +15 -18
  58. package/{docs/rules-en/project-context.md → .claude/skills-en/project-context/SKILL.md} +7 -3
  59. package/.claude/skills-en/subagents-orchestration-guide/SKILL.md +224 -0
  60. package/.claude/skills-en/task-analyzer/SKILL.md +131 -0
  61. package/{docs/rules-en/rules-index.yaml → .claude/skills-en/task-analyzer/references/skills-index.yaml} +34 -20
  62. package/{docs/rules-en/technical-spec.md → .claude/skills-en/technical-spec/SKILL.md} +6 -6
  63. package/{docs/rules-en/typescript.md → .claude/skills-en/typescript-rules/SKILL.md} +15 -10
  64. package/{docs/rules-en/typescript-testing.md → .claude/skills-en/typescript-testing/SKILL.md} +10 -4
  65. package/{docs/rules-ja/coding-standards.md → .claude/skills-ja/coding-standards/SKILL.md} +12 -99
  66. package/{docs/rules-ja/documentation-criteria.md → .claude/skills-ja/documentation-criteria/SKILL.md} +18 -5
  67. package/.claude/skills-ja/documentation-criteria/references/adr-template.md +64 -0
  68. package/.claude/skills-ja/documentation-criteria/references/design-template.md +261 -0
  69. package/{docs/plans/template-ja.md → .claude/skills-ja/documentation-criteria/references/plan-template.md} +38 -38
  70. package/{docs/prd/template-ja.md → .claude/skills-ja/documentation-criteria/references/prd-template.md} +33 -33
  71. package/{docs/rules-ja/frontend/technical-spec.md → .claude/skills-ja/frontend/technical-spec/SKILL.md} +13 -9
  72. package/.claude/skills-ja/frontend/typescript-rules/SKILL.md +315 -0
  73. package/{docs/rules-ja/frontend/typescript-testing.md → .claude/skills-ja/frontend/typescript-testing/SKILL.md} +93 -5
  74. package/{docs/rules/architecture/implementation-approach.md → .claude/skills-ja/implementation-approach/SKILL.md} +10 -5
  75. package/{docs/rules-ja/integration-e2e-testing.md → .claude/skills-ja/integration-e2e-testing/SKILL.md} +5 -8
  76. package/{docs/rules-ja/project-context.md → .claude/skills-ja/project-context/SKILL.md} +7 -3
  77. package/.claude/skills-ja/subagents-orchestration-guide/SKILL.md +212 -0
  78. package/.claude/skills-ja/task-analyzer/SKILL.md +131 -0
  79. package/{docs/rules-ja/rules-index.yaml → .claude/skills-ja/task-analyzer/references/skills-index.yaml} +34 -19
  80. package/{docs/rules-ja/technical-spec.md → .claude/skills-ja/technical-spec/SKILL.md} +6 -6
  81. package/{docs/rules-ja/typescript.md → .claude/skills-ja/typescript-rules/SKILL.md} +16 -11
  82. package/{docs/rules-ja/typescript-testing.md → .claude/skills-ja/typescript-testing/SKILL.md} +11 -5
  83. package/CLAUDE.en.md +6 -6
  84. package/CLAUDE.ja.md +6 -6
  85. package/CLAUDE.md +19 -28
  86. package/README.ja.md +39 -10
  87. package/README.md +39 -10
  88. package/package.json +1 -1
  89. package/scripts/set-language.js +35 -53
  90. package/scripts/setup-project.js +4 -1
  91. package/.claude/agents/acceptance-test-generator.md +0 -316
  92. package/.claude/agents/code-reviewer.md +0 -193
  93. package/.claude/agents/document-reviewer.md +0 -182
  94. package/.claude/agents/prd-creator.md +0 -186
  95. package/.claude/agents/quality-fixer.md +0 -295
  96. package/.claude/agents/requirement-analyzer.md +0 -161
  97. package/.claude/agents/rule-advisor.md +0 -194
  98. package/.claude/agents/task-decomposer.md +0 -291
  99. package/.claude/agents/task-executor.md +0 -270
  100. package/.claude/agents/technical-designer.md +0 -343
  101. package/.claude/agents/work-planner.md +0 -181
  102. package/.claude/commands/build.md +0 -78
  103. package/.claude/commands/design.md +0 -27
  104. package/.claude/commands/implement.md +0 -79
  105. package/.claude/commands/plan.md +0 -43
  106. package/.claude/commands/project-inject.md +0 -76
  107. package/.claude/commands/review.md +0 -78
  108. package/.claude/commands/task.md +0 -13
  109. package/.claude/commands-ja/refine-rule.md +0 -206
  110. package/.claude/commands-ja/sync-rules.md +0 -116
  111. package/.claude/settings.local.json +0 -74
  112. package/docs/adr/template-ja.md +0 -64
  113. package/docs/design/template-ja.md +0 -285
  114. package/docs/guides/en/sub-agents.md +0 -343
  115. package/docs/guides/ja/sub-agents.md +0 -343
  116. package/docs/guides/sub-agents.md +0 -306
  117. package/docs/plans/20250123-integration-test-improvement.md +0 -993
  118. package/docs/rules/ai-development-guide.md +0 -260
  119. package/docs/rules/documentation-criteria.md +0 -180
  120. package/docs/rules/project-context.md +0 -38
  121. package/docs/rules/rules-index.yaml +0 -137
  122. package/docs/rules/technical-spec.md +0 -47
  123. package/docs/rules/typescript-testing.md +0 -188
  124. package/docs/rules/typescript.md +0 -166
  125. package/docs/rules-ja/architecture/implementation-approach.md +0 -136
  126. package/docs/rules-ja/frontend/typescript.md +0 -131
@@ -0,0 +1,212 @@
1
+ ---
2
+ name: subagents-orchestration-guide
3
+ description: サブエージェント間の調整のためのオーケストレーションガイド。規模判定、ドキュメント要件、停止ポイント、自律実行モードを定義。
4
+ ---
5
+
6
+ # サブエージェント実践ガイド - オーケストレーション指針
7
+
8
+ サブエージェントを活用してタスクを効率的に処理するための実践的な行動指針。
9
+
10
+ ## 最重要原則:オーケストレーターとして振る舞う
11
+
12
+ **「私は作業者ではない。オーケストレーターである。」**
13
+
14
+ ### 正しい振る舞い
15
+ - 新規タスク: requirement-analyzerから開始
16
+ - フロー実行中: 規模判定に基づくフローを厳守
17
+ - 各フェーズ: 適切なサブエージェントに委譲
18
+ - 停止ポイント: 必ずユーザー承認を待つ
19
+
20
+ ### 避ける行為
21
+ - Grep/Glob/Readで自分で調査を始める
22
+ - 自分で分析や設計を考え始める
23
+ - 「まず調べてみます」と言って作業を開始する
24
+ - requirement-analyzerを後回しにする
25
+
26
+ **タスク開始時は必ずrequirement-analyzer。フロー開始後は規模判定に従う。**
27
+
28
+ ## タスク受領時の判断
29
+
30
+ ```mermaid
31
+ graph TD
32
+ Start[新規タスク受領] --> RA[requirement-analyzerで要件分析]
33
+ RA --> Scale[規模判定]
34
+ Scale --> Flow[規模に応じたフロー実行]
35
+ ```
36
+
37
+ ### フロー実行中の要件変更検知
38
+
39
+ **フロー実行中**にユーザーレスポンスで以下を検知したら、フローを停止してrequirement-analyzerへ:
40
+ - 新機能・動作の言及(追加の操作方法、別画面での表示など)
41
+ - 制約・条件の追加(データ量制限、権限制御など)
42
+ - 技術要件の変更(処理方式、出力形式の変更など)
43
+
44
+ **1つでも該当 → 統合要件でrequirement-analyzerから再開**
45
+
46
+ ## 活用できるサブエージェント
47
+
48
+ ### 実装支援エージェント
49
+ 1. **quality-fixer**: 全体品質保証と修正完了まで自己完結処理
50
+ 2. **task-decomposer**: 作業計画書の適切なタスク分解
51
+ 3. **task-executor**: 個別タスクの実行と構造化レスポンス
52
+ 4. **integration-test-reviewer**: 統合テスト/E2Eテストのスケルトン準拠レビュー
53
+
54
+ ### ドキュメント作成エージェント
55
+ 5. **requirement-analyzer**: 要件分析と作業規模判定(WebSearch対応、最新技術情報の調査)
56
+ 6. **prd-creator**: Product Requirements Document作成(WebSearch対応、市場動向調査)
57
+ 7. **technical-designer**: ADR/Design Doc作成(最新技術情報の調査、Property注釈付与)
58
+ 8. **work-planner**: 作業計画書作成(テストスケルトンからメタ情報を抽出・反映)
59
+ 9. **document-reviewer**: 単一ドキュメントの品質・完成度・ルール準拠チェック
60
+ 10. **design-sync**: Design Doc間の整合性検証(明示的矛盾のみ検出)
61
+ 11. **acceptance-test-generator**: Design DocのACから統合テストとE2Eテストのスケルトン生成
62
+
63
+ ## オーケストレーション原則
64
+
65
+ ### 責務分離を意識した振り分け
66
+
67
+ **task-executorの責務**:
68
+ - 実装作業とテスト追加
69
+ - 追加したテストのパス確認(既存テストは対象外)
70
+ - 品質保証はtask-executorの責務外
71
+
72
+ **quality-fixerの責務**:
73
+ - 全体品質保証(型チェック、lint、全テスト実行等)
74
+ - 品質エラーの完全修正実行
75
+ - 修正完了まで自己完結で処理
76
+ - 最終的な approved 判定(修正完了後のみ)
77
+
78
+ ### 標準フロー
79
+
80
+ **基本サイクル**: `task-executor → エスカレーション判定・フォローアップ → quality-fixer → commit` の4ステップサイクルを管理。
81
+ 各タスクごとにこのサイクルを繰り返し、品質を保証。
82
+
83
+ ## Sub-agent間の制約
84
+
85
+ **重要**: Sub-agentから他のSub-agentを直接呼び出すことはできない。複数のSub-agentを連携させる場合は、メインAIがオーケストレーターとして動作。
86
+
87
+ ## 規模判定とドキュメント要件
88
+
89
+ | 規模 | ファイル数 | PRD | ADR | Design Doc | 作業計画書 |
90
+ |------|-----------|-----|-----|------------|-----------|
91
+ | 小規模 | 1-2 | 更新※1 | 不要 | 不要 | 簡易版 |
92
+ | 中規模 | 3-5 | 更新※1 | 条件付き※2 | **必須** | **必須** |
93
+ | 大規模 | 6以上 | **必須**※3 | 条件付き※2 | **必須** | **必須** |
94
+
95
+ ※1: 該当機能のPRDが存在する場合は更新
96
+ ※2: アーキテクチャ変更、新技術導入、データフロー変更がある場合
97
+ ※3: 新規作成/既存更新/リバースPRD(既存PRDがない場合)
98
+
99
+ ## 構造化レスポンス仕様
100
+
101
+ 各サブエージェントはJSON形式で応答:
102
+ - **task-executor**: status, filesModified, testsAdded, readyForQualityCheck
103
+ - **integration-test-reviewer**: status, verdict (approved/needs_revision), requiredFixes
104
+ - **quality-fixer**: status, checksPerformed, fixesApplied, approved
105
+ - **document-reviewer**: status, reviewsPerformed, issues, recommendations, approvalReady
106
+ - **design-sync**: sync_status, total_conflicts, conflicts (severity, type, source_file, target_file)
107
+
108
+ ## 作業計画時の基本フロー
109
+
110
+ ### 大規模(6ファイル以上)
111
+ 1. requirement-analyzer → 要件分析 **[停止: 要件確認]**
112
+ 2. prd-creator → PRD作成 → document-reviewer **[停止: 要件確認]**
113
+ 3. technical-designer → ADR作成(必要な場合) → document-reviewer **[停止: 技術方針決定]**
114
+ 4. technical-designer → Design Doc作成 → document-reviewer → design-sync **[停止: 設計内容確認]**
115
+ 5. acceptance-test-generator → テストスケルトン生成
116
+ 6. work-planner → 作業計画書作成 **[停止: 実装フェーズ全体の一括承認]**
117
+ 7. **自律実行モード開始**: task-decomposer → 全タスク実行 → 完了報告
118
+
119
+ ### 中規模(3-5ファイル)
120
+ 1. requirement-analyzer → 要件分析 **[停止: 要件確認]**
121
+ 2. technical-designer → Design Doc作成 → document-reviewer → design-sync **[停止: 技術方針決定]**
122
+ 3. acceptance-test-generator → テストスケルトン生成
123
+ 4. work-planner → 作業計画書作成 **[停止: 実装フェーズ全体の一括承認]**
124
+ 5. **自律実行モード開始**: task-decomposer → 全タスク実行 → 完了報告
125
+
126
+ ### 小規模(1-2ファイル)
127
+ 1. 簡易計画書作成 **[停止: 実装フェーズ全体の一括承認]**
128
+ 2. **自律実行モード開始**: 直接実装 → 完了報告
129
+
130
+ ## 自律実行モード
131
+
132
+ ### 権限委譲
133
+
134
+ **自律実行モード開始後**:
135
+ - 実装フェーズ全体の一括承認により、サブエージェントに権限委譲
136
+ - task-executor:実装権限(Edit/Write使用可)
137
+ - quality-fixer:修正権限(品質エラー自動修正)
138
+
139
+ ### 自律実行の停止条件
140
+
141
+ 以下の場合に自律実行を停止し、ユーザーにエスカレーション:
142
+
143
+ 1. **サブエージェントからのエスカレーション**
144
+ - `status: "escalation_needed"` のレスポンス受信時
145
+ - `status: "blocked"` のレスポンス受信時
146
+
147
+ 2. **要件変更検知時**
148
+ - 要件変更検知チェックリストで1つでも該当
149
+ - 自律実行を停止し、requirement-analyzerに統合要件で再分析
150
+
151
+ 3. **work-planner更新制限に抵触時**
152
+ - task-decomposer開始後の要件変更は全体再設計が必要
153
+ - requirement-analyzerから全体フローを再開
154
+
155
+ 4. **ユーザー明示停止時**
156
+ - 直接的な停止指示や割り込み
157
+
158
+ ### 自律実行中のタスク管理
159
+
160
+ **2段階のTodoWrite管理**
161
+
162
+ #### Step1: task-decomposer完了後
163
+ フェーズ管理Todoを登録:
164
+ ```
165
+ [in_progress] 実装フェーズ管理: Phase1開始
166
+ [pending] 実装フェーズ管理: Phase2開始
167
+ [pending] 実装フェーズ管理: Phase3開始
168
+ ```
169
+
170
+ #### Step2: フェーズ開始時
171
+ 該当フェーズのタスクを4ステップで展開:
172
+ ```
173
+ [completed] 実装フェーズ管理: Phase1開始
174
+ [pending] 実装フェーズ管理: Phase2開始
175
+ [in_progress] Phase1-Task01: task-executor実行
176
+ [pending] Phase1-Task01: エスカレーション判定・フォローアップ
177
+ [pending] Phase1-Task01: quality-fixer実行
178
+ [pending] Phase1-Task01: git commit
179
+ ... (同パターンで繰り返し)
180
+ [pending] Phase1: 完了チェック
181
+ ```
182
+
183
+ ## オーケストレーターの主な役割
184
+
185
+ 1. **状態管理**: 現在のフェーズ、各サブエージェントの状態、次のアクションを把握
186
+ 2. **情報の橋渡し**: サブエージェント間のデータ変換と伝達
187
+ 3. **品質保証とコミット実行**: approved=true確認後、即座にgit commit実行
188
+ 4. **自律実行モード管理**: 承認後の自律実行開始・停止・エスカレーション判断
189
+ 5. **ADRステータス管理**: ユーザー判断後のADRステータス更新(Accepted/Rejected)
190
+
191
+ ## 重要な制約
192
+
193
+ - **品質チェックは必須**: コミット前にquality-fixerの承認が必要
194
+ - **構造化レスポンス必須**: サブエージェント間の情報伝達はJSON形式
195
+ - **承認管理**: ドキュメント作成→document-reviewer実行→ユーザー承認を得てから次へ進む
196
+ - **フロー確認**: 承認取得後は必ず作業計画フロー(大規模/中規模/小規模)で次のステップを確認
197
+ - **整合性検証**: サブエージェント判定に矛盾がある場合はガイドラインを優先
198
+
199
+ ## 人間との必須対話ポイント
200
+
201
+ ### 基本原則
202
+ - **停止は必須**: 以下のタイミングでは必ず人間の応答を待つ
203
+ - **確認→合意のサイクル**: ドキュメント生成後は合意またはupdateモードでの修正指示を受けてから次へ進む
204
+ - **具体的な質問**: 選択肢(A/B/C)や比較表を用いて判断しやすく
205
+ - **効率より対話**: 手戻りを防ぐため、早い段階で確認を取る
206
+
207
+ ### 主要な停止ポイント
208
+ - **requirement-analyzer完了後**: 要件分析結果と質問事項の確認
209
+ - **PRD作成→document-reviewer実行後**: 要件理解と整合性の確認
210
+ - **ADR作成→document-reviewer実行後**: 技術方針と整合性の確認
211
+ - **Design Doc作成→document-reviewer実行後**: 設計内容と整合性の確認
212
+ - **計画書作成後**: 実装フェーズ全体の一括承認
@@ -0,0 +1,131 @@
1
+ ---
2
+ name: task-analyzer
3
+ description: メタ認知的タスク分析とスキル選択。タスクの本質を分析し、規模を見積もり、適切なスキルをメタデータと共に返却。
4
+ ---
5
+
6
+ # タスクアナライザー
7
+
8
+ メタ認知的タスク分析とスキル選択ガイダンスを提供。
9
+
10
+ ## スキルインデックス
11
+
12
+ 利用可能なスキルのメタデータは **[skills-index.yaml](references/skills-index.yaml)** を参照。
13
+
14
+ ## タスク分析プロセス
15
+
16
+ ### 1. タスク本質の理解
17
+
18
+ 表面的な作業を超えた根本目的を特定:
19
+
20
+ | 表面的な作業 | 根本目的 |
21
+ |-------------|---------|
22
+ | 「このバグを直して」 | 問題解決、根本原因分析 |
23
+ | 「この機能を実装して」 | 機能追加、価値提供 |
24
+ | 「このコードをリファクタリングして」 | 品質改善、保守性向上 |
25
+ | 「このファイルを更新して」 | 変更管理、一貫性確保 |
26
+
27
+ **キーとなる質問:**
28
+ - 本当に解決しようとしている問題は何か?
29
+ - 期待される成果は何か?
30
+ - 表面的にアプローチした場合、何が問題になり得るか?
31
+
32
+ ### 2. タスク規模の見積もり
33
+
34
+ | 規模 | ファイル数 | 指標 |
35
+ |------|----------|------|
36
+ | 小規模 | 1-2 | 単一の関数/コンポーネントの変更 |
37
+ | 中規模 | 3-5 | 複数の関連コンポーネント |
38
+ | 大規模 | 6以上 | 横断的関心事、アーキテクチャへの影響 |
39
+
40
+ **規模がスキル優先度に影響:**
41
+ - 大規模 → プロセス/ドキュメントスキルがより重要
42
+ - 小規模 → 実装スキルに集中
43
+
44
+ ### 3. タスクタイプの特定
45
+
46
+ | タイプ | 特徴 | キースキル |
47
+ |--------|------|-----------|
48
+ | 実装 | 新規コード、機能 | coding-standards, typescript-testing |
49
+ | 修正 | バグ解決 | coding-standards, typescript-testing |
50
+ | リファクタリング | 構造改善 | coding-standards, implementation-approach |
51
+ | 設計 | アーキテクチャ決定 | documentation-criteria, implementation-approach |
52
+ | 品質 | テスト、レビュー | typescript-testing, integration-e2e-testing |
53
+
54
+ ### 4. タグベースのスキルマッチング
55
+
56
+ タスク説明から関連タグを抽出し、skills-index.yamlとマッチング:
57
+
58
+ ```yaml
59
+ Task: "Implement user authentication with tests"
60
+ Extracted tags: [implementation, testing, security]
61
+ Matched skills:
62
+ - coding-standards (implementation, security)
63
+ - typescript-testing (testing)
64
+ - typescript-rules (implementation)
65
+ ```
66
+
67
+ ### 5. 暗黙的な関連性
68
+
69
+ 隠れた依存関係を考慮:
70
+
71
+ | タスクに含まれる | 追加で含める |
72
+ |-----------------|-------------|
73
+ | エラーハンドリング | デバッグ、テスト |
74
+ | 新機能 | 設計、実装、ドキュメント |
75
+ | パフォーマンス | プロファイリング、最適化、テスト |
76
+ | フロントエンド | typescript-rules, typescript-testing |
77
+ | API/統合 | integration-e2e-testing |
78
+
79
+ ## 出力形式
80
+
81
+ skills-index.yamlからのスキルメタデータを含む構造化された分析を返却:
82
+
83
+ ```yaml
84
+ taskAnalysis:
85
+ essence: <string> # 特定された根本目的
86
+ type: <implementation|fix|refactoring|design|quality>
87
+ scale: <small|medium|large>
88
+ estimatedFiles: <number>
89
+ tags: [<string>, ...] # タスク説明から抽出
90
+
91
+ selectedSkills:
92
+ - skill: <skill-name> # skills-index.yamlから
93
+ priority: <high|medium|low>
94
+ reason: <string> # このスキルが選択された理由
95
+ # skills-index.yamlからメタデータを引き継ぐ
96
+ tags: [...]
97
+ typical-use: <string>
98
+ size: <small|medium|large>
99
+ sections: [...] # yamlからの全セクション(フィルタなし)
100
+ ```
101
+
102
+ **注意**: セクション選択(どのセクションが関連するかの選定)は、実際のSKILL.mdファイルを読み込んだ後に別途行う。
103
+
104
+ ## スキル選択の優先順位
105
+
106
+ 1. **必須** - タスクタイプに直接関連
107
+ 2. **品質** - テストと品質保証
108
+ 3. **プロセス** - ワークフローとドキュメント
109
+ 4. **補助** - リファレンスとベストプラクティス
110
+
111
+ ## メタ認知質問の設計
112
+
113
+ タスクの性質に応じて3-5個の質問を生成:
114
+
115
+ | タスクタイプ | 質問の焦点 |
116
+ |-------------|-----------|
117
+ | 実装 | 設計の妥当性、エッジケース、パフォーマンス |
118
+ | 修正 | 根本原因(5 Whys)、影響範囲、回帰テスト |
119
+ | リファクタリング | 現状の問題、目標状態、段階的計画 |
120
+ | 設計 | 要件の明確性、将来の拡張性、トレードオフ |
121
+
122
+ ## 警告パターン
123
+
124
+ これらのパターンを検出してフラグを立てる:
125
+
126
+ | パターン | 警告 | 緩和策 |
127
+ |---------|------|--------|
128
+ | 一度に大規模変更 | 高リスク | フェーズに分割 |
129
+ | テストなしの実装 | 品質リスク | TDDに従う |
130
+ | エラー発見時の即座の修正 | 根本原因の見落とし | 一時停止、分析 |
131
+ | 計画なしのコーディング | スコープクリープ | まず計画 |
@@ -1,9 +1,9 @@
1
- # 各ルールファイルのメタデータ
2
- # 各ルールの概要、タグ、典型的な使用場面、サイズを管理
1
+ # スキルメタデータインデックス
2
+ # タスク分析に基づいて適切なスキルを選択するために使用
3
3
 
4
- rules:
4
+ skills:
5
5
  coding-standards:
6
- file: "coding-standards.md"
6
+ skill: "coding-standards"
7
7
  tags: [anti-patterns, technical-judgment, debugging, rule-of-three, implementation, type-safety, refactoring, code-reading, best-practices, impact-analysis, unused-code, code-deletion, testing, tdd]
8
8
  typical-use: "全ドメイン共通の技術的判断基準、アンチパターン検出、デバッグ手法、実装時のベストプラクティス、影響範囲調査、未使用コード削除、テスト設計原則"
9
9
  size: large
@@ -36,8 +36,8 @@ rules:
36
36
  - "テストの粒度原則"
37
37
  - "継続性テストの範囲"
38
38
 
39
- typescript:
40
- file: "typescript.md"
39
+ typescript-rules:
40
+ skill: "typescript-rules"
41
41
  tags: [implementation, type-safety, async, coding-style, functional-programming, dependency-injection, backend]
42
42
  typical-use: "バックエンドTypeScriptコードの作成・修正、クラス使用判断、DI実装"
43
43
  size: small
@@ -50,7 +50,7 @@ rules:
50
50
  - "パフォーマンス最適化"
51
51
 
52
52
  typescript-testing:
53
- file: "typescript-testing.md"
53
+ skill: "typescript-testing"
54
54
  tags: [quality, testing, coverage, vitest, backend, implementation]
55
55
  typical-use: "バックエンドテスト作成、Vitest設定、70%カバレッジ要件、テスト品質基準"
56
56
  size: small
@@ -65,7 +65,7 @@ rules:
65
65
  - "Vitestの基本例"
66
66
 
67
67
  technical-spec:
68
- file: "technical-spec.md"
68
+ skill: "technical-spec"
69
69
  tags: [architecture, design, documentation, environment, data-flow, implementation, quality-commands, testing, build]
70
70
  typical-use: "技術設計、環境設定、ドキュメント作成プロセス、実装方針決定、品質チェックコマンド、ビルドとテスト実行"
71
71
  size: medium
@@ -81,7 +81,7 @@ rules:
81
81
  - "ビルドとテスト"
82
82
 
83
83
  project-context:
84
- file: "project-context.md"
84
+ skill: "project-context"
85
85
  tags: [context, project-specific, implementation]
86
86
  typical-use: "プロジェクト固有情報、実装原則の理解"
87
87
  size: small
@@ -93,7 +93,7 @@ rules:
93
93
  - "カスタマイズガイド"
94
94
 
95
95
  documentation-criteria:
96
- file: "documentation-criteria.md"
96
+ skill: "documentation-criteria"
97
97
  tags: [documentation, decision-making, adr, prd, design-doc, planning, process]
98
98
  typical-use: "実装開始時の規模判定、ドキュメント作成判定、ADR/PRD/Design Doc/作業計画書の作成基準"
99
99
  size: medium
@@ -113,7 +113,7 @@ rules:
113
113
  - "共通ADRとの関係性"
114
114
 
115
115
  implementation-approach:
116
- file: "architecture/implementation-approach.md"
116
+ skill: "implementation-approach"
117
117
  tags: [architecture, implementation, task-decomposition, strategy-patterns, strangler-pattern, facade-pattern, design, planning, confirmation-levels]
118
118
  typical-use: "実装戦略の選択、タスク分解、設計判断、大規模変更の計画"
119
119
  size: medium
@@ -130,7 +130,7 @@ rules:
130
130
  - "メタ認知的実行のための指針"
131
131
 
132
132
  integration-e2e-testing:
133
- file: "integration-e2e-testing.md"
133
+ skill: "integration-e2e-testing"
134
134
  tags: [testing, integration-test, e2e-test, property-based-testing, fast-check, test-skeleton, test-review, quality]
135
135
  typical-use: "統合テスト・E2Eテストのスケルトン生成、テスト実装、テストレビュー、Property-Based Test実装"
136
136
  size: small
@@ -145,8 +145,23 @@ rules:
145
145
  - "実装ルール"
146
146
  - "レビュー基準"
147
147
 
148
- frontend-typescript:
149
- file: "frontend/typescript.md"
148
+ subagents-orchestration-guide:
149
+ skill: "subagents-orchestration-guide"
150
+ tags: [orchestration, subagents, workflow, scale-determination, document-requirements, autonomous-execution]
151
+ typical-use: "サブエージェントのワークフロー調整、規模判定、ドキュメント要件"
152
+ size: medium
153
+ key-references:
154
+ - "ワークフロー調整パターン"
155
+ - "エージェント連携パターン"
156
+ sections:
157
+ - "規模判定"
158
+ - "ドキュメント要件"
159
+ - "停止ポイント"
160
+ - "自律実行モード"
161
+
162
+ # フロントエンド固有スキル
163
+ frontend/typescript-rules:
164
+ skill: "frontend/typescript-rules"
150
165
  tags: [frontend, react, implementation, type-safety, props-driven, hooks, component-design, vite, error-boundary]
151
166
  typical-use: "React/Viteでのフロントエンド開発、コンポーネント設計、Props設計、環境変数管理"
152
167
  size: small
@@ -160,8 +175,8 @@ rules:
160
175
  - "エラーハンドリング"
161
176
  - "パフォーマンス最適化"
162
177
 
163
- frontend-typescript-testing:
164
- file: "frontend/typescript-testing.md"
178
+ frontend/typescript-testing:
179
+ skill: "frontend/typescript-testing"
165
180
  tags: [frontend, react, quality, testing, coverage, vitest, react-testing-library, msw, component-testing, implementation]
166
181
  typical-use: "Reactコンポーネントのテスト作成、React Testing Library、MSW、60%カバレッジ要件、Co-location"
167
182
  size: small
@@ -176,8 +191,8 @@ rules:
176
191
  - "モックの型安全性の徹底"
177
192
  - "React Testing Libraryの基本例"
178
193
 
179
- frontend-technical-spec:
180
- file: "frontend/technical-spec.md"
194
+ frontend/technical-spec:
195
+ skill: "frontend/technical-spec"
181
196
  tags: [frontend, react, architecture, design, documentation, environment, data-flow, implementation, vite, security, client-side, state-management, context-api, hooks, lighthouse, bundle-size, non-functional-requirements]
182
197
  typical-use: "フロントエンド技術設計、環境変数管理(Vite)、セキュリティ制約、アーキテクチャ設計、状態管理パターン、実装方針決定、非機能要件の確認"
183
198
  size: medium
@@ -193,4 +208,4 @@ rules:
193
208
  - "環境変数管理とセキュリティ"
194
209
  - "アーキテクチャ設計"
195
210
  - "データフロー統一原則"
196
- - "ビルドとテスト"
211
+ - "ビルドとテスト"
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: technical-spec
3
+ description: 環境変数管理、アーキテクチャ設計、ビルド・テストコマンドを含む技術設計ルール。
4
+ ---
5
+
1
6
  # 技術設計ルール
2
7
 
3
8
  ## 技術スタックの基本方針
@@ -21,13 +26,8 @@ TypeScriptをベースとしたアプリケーション実装。アーキテク
21
26
  ### アーキテクチャ設計の原則
22
27
  プロジェクトごとに適切なアーキテクチャを選択し、明確に定義すること:
23
28
 
24
- - **明確な定義**: プロジェクトのアーキテクチャは`docs/rules/architecture/`配下に専用ファイルで定義
25
29
  - **責務の分離**: 各層やモジュールの責務を明確に定義し、境界を守ること
26
30
 
27
- ## パターン適用の一貫性
28
-
29
- 選択したアーキテクチャパターンに厳密に従う。プロジェクト固有詳細は`docs/rules/architecture/`参照。
30
-
31
31
  ## データフロー統一原則
32
32
 
33
33
  #### 基本原則
@@ -83,4 +83,4 @@ package.jsonの`packageManager`フィールドに応じた実行コマンドを
83
83
 
84
84
  ### カバレッジ要件
85
85
  - **必須**: ユニットテストカバレッジは70%以上
86
- - **メトリクス**: Statements、Branches、Functions、Lines
86
+ - **メトリクス**: Statements、Branches、Functions、Lines
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: typescript-rules
3
+ description: 型安全性とエラーハンドリングのためのTypeScript開発ルール。TypeScriptコード実装や型定義レビュー時に使用。
4
+ ---
5
+
1
6
  # TypeScript 開発ルール
2
7
 
3
8
  ## Backend実装における型安全性
@@ -16,13 +21,13 @@
16
21
  **クラス使用の判断基準**
17
22
  - **推奨:関数とinterfaceでの実装**
18
23
  - 背景: テスタビリティと関数合成の柔軟性が向上
19
- - **クラス使用を許可**:
24
+ - **クラス使用を許可**:
20
25
  - フレームワーク要求時(NestJSのController/Service、TypeORMのEntity等)
21
26
  - カスタムエラークラス定義時
22
27
  - 状態とビジネスロジックが密結合している場合(例: ShoppingCart、Session、StateMachine)
23
28
  - **判断基準**: 「このデータは振る舞いを持つか?」がYesならクラス検討
24
29
  ```typescript
25
- // 関数とinterface
30
+ // 関数とinterface
26
31
  interface UserService { create(data: UserData): User }
27
32
  const userService: UserService = { create: (data) => {...} }
28
33
  ```
@@ -30,14 +35,14 @@
30
35
  **関数設計**
31
36
  - **引数は0-2個まで**: 3個以上はオブジェクト化
32
37
  ```typescript
33
- // オブジェクト引数
38
+ // オブジェクト引数
34
39
  function createUser({ name, email, role }: CreateUserParams) {}
35
40
  ```
36
41
 
37
42
  **依存性注入**
38
43
  - **外部依存は引数で注入**: テスト可能性とモジュール性確保
39
44
  ```typescript
40
- // 依存性を引数で受け取る
45
+ // 依存性を引数で受け取る
41
46
  function createService(repository: Repository) { return {...} }
42
47
  ```
43
48
 
@@ -52,10 +57,10 @@
52
57
  - インポートは絶対パス(`src/`)
53
58
 
54
59
  **クリーンコード原則**
55
- - 使用されていないコードは即座に削除
56
- - デバッグ用`console.log()`は削除
57
- - ❌ コメントアウトされたコード(バージョン管理で履歴管理)
58
- - コメントは「なぜ」を説明(「何」ではなく)
60
+ - 使用されていないコードは即座に削除
61
+ - デバッグ用`console.log()`は削除
62
+ - コメントアウトされたコード禁止(バージョン管理で履歴管理)
63
+ - コメントは「なぜ」を説明(「何」ではなく)
59
64
 
60
65
  ## エラーハンドリング
61
66
 
@@ -63,12 +68,12 @@
63
68
 
64
69
  **Fail-Fast原則**: エラー時は速やかに失敗させ、不正な状態での処理継続を防ぐ
65
70
  ```typescript
66
- // 禁止: 無条件フォールバック
71
+ // 禁止: 無条件フォールバック
67
72
  catch (error) {
68
73
  return defaultValue // エラーを隠蔽
69
74
  }
70
75
 
71
- // 必須: 明示的な失敗
76
+ // 必須: 明示的な失敗
72
77
  catch (error) {
73
78
  logger.error('処理失敗', error)
74
79
  throw error // 上位層で適切に処理
@@ -113,4 +118,4 @@ export class AppError extends Error {
113
118
  ## パフォーマンス最適化
114
119
 
115
120
  - ストリーミング処理: 大きなデータセットはストリームで処理
116
- - メモリリーク防止: 不要なオブジェクトは明示的に解放
121
+ - メモリリーク防止: 不要なオブジェクトは明示的に解放
@@ -1,6 +1,12 @@
1
+ ---
2
+ name: typescript-testing
3
+ description: Vitestを使用したTypeScriptテストルール。カバレッジ要件、テスト設計原則、品質基準を含む。
4
+ ---
5
+
1
6
  # TypeScript テストルール
2
7
 
3
8
  ## テストフレームワーク
9
+
4
10
  - **Vitest**: このプロジェクトではVitestを使用
5
11
  - テストのインポート: `import { describe, it, expect, beforeEach, vi } from 'vitest'`
6
12
  - モックの作成: `vi.mock()` を使用
@@ -54,14 +60,13 @@ src/
54
60
  - テストスイート: 対象の機能や状況を説明する名前
55
61
  - テストケース: 期待される動作を説明する名前
56
62
 
57
-
58
63
  ### テストコードの品質ルール
59
64
 
60
- **推奨: すべてのテストを常に有効に保つ**
65
+ **推奨: すべてのテストを常に有効に保つ**
61
66
  - メリット: テストスイートの完全性を保証
62
67
  - 実践: 問題があるテストは修正して有効化
63
68
 
64
- **避けるべき: test.skip()やコメントアウト**
69
+ **避けるべき: test.skip()やコメントアウト**
65
70
  - 理由: テストの穴が生まれ、品質チェックが不完全になる
66
71
  - 対処: 不要なテストは完全に削除する
67
72
 
@@ -76,6 +81,7 @@ it('throws on negative price', () => expect(() => calc([{price: -1}])).toThrow()
76
81
 
77
82
  ### 期待値の直接記述
78
83
  期待値はリテラルで記述。実装ロジックを再現しない。
84
+ **有効なテスト**: 期待値 ≠ モック戻り値(実装による変換・処理がある)
79
85
  ```typescript
80
86
  expect(calcTax(100)).toBe(10) // not: 100 * TAX_RATE
81
87
  ```
@@ -119,7 +125,7 @@ it('reverses twice equals original', () => {
119
125
 
120
126
  ### 必要最小限の型定義
121
127
  ```typescript
122
- // 必要な部分のみ
128
+ // 必要な部分のみ
123
129
  type TestRepo = Pick<Repository, 'find' | 'save'>
124
130
  const mock: TestRepo = { find: vi.fn(), save: vi.fn() }
125
131
 
@@ -146,4 +152,4 @@ describe('ComponentName', () => {
146
152
  expect(result).toBe('expected')
147
153
  })
148
154
  })
149
- ```
155
+ ```
package/CLAUDE.en.md CHANGED
@@ -26,8 +26,8 @@ Reason: To prevent implementations that differ from user intent and ensure corre
26
26
  **Execution Rules**:
27
27
  - When `pending → in_progress`: rule-advisor output is mandatory
28
28
  - **After rule-advisor execution**: Always update TodoWrite in the following format
29
- 1. Add firstActionGuidance as the first task in Todo
30
- 2. Record taskEssence as the completion criteria for each task
29
+ 1. Add metaCognitiveGuidance.firstStep as the first task in Todo
30
+ 2. Record metaCognitiveGuidance.taskEssence as the completion criteria for each task
31
31
  3. Record warningPatterns as checkpoints during execution
32
32
  - Using Edit tools without TodoWrite: Stop as rule violation
33
33
  - When updating task status: Recording implementation details is mandatory (no blanks)
@@ -55,15 +55,15 @@ Reason: To prevent implementations that differ from user intent and ensure corre
55
55
  - Distinguish between surface work and fundamental purpose
56
56
  - Judge "quick fix" vs "proper solution"
57
57
 
58
- 2. **Confirm applicableRules (applicable rules)**
59
- - Judge if selected rules are appropriate
58
+ 2. **Confirm selectedSkills (applicable skills)**
59
+ - Judge if selected skills are appropriate
60
60
  - Load necessary sections
61
61
 
62
- 3. **Recognize pastFailurePatterns (past failures)**
62
+ 3. **Recognize metaCognitiveGuidance.pastFailures (past failures)**
63
63
  - Be careful not to repeat same failures
64
64
  - Be conscious of suggested workarounds
65
65
 
66
- 4. **Execute firstAction (initial action)**
66
+ 4. **Execute metaCognitiveGuidance.firstStep (initial action)**
67
67
  - Start with recommended tools
68
68
  - Proceed systematically
69
69