create-ai-project 1.16.2 → 1.17.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.
- package/.claude/agents-en/acceptance-test-generator.md +4 -3
- package/.claude/agents-en/code-reviewer.md +2 -2
- package/.claude/agents-en/code-verifier.md +2 -2
- package/.claude/agents-en/design-sync.md +2 -2
- package/.claude/agents-en/document-reviewer.md +4 -4
- package/.claude/agents-en/integration-test-reviewer.md +2 -2
- package/.claude/agents-en/investigator.md +2 -2
- package/.claude/agents-en/prd-creator.md +4 -2
- package/.claude/agents-en/quality-fixer-frontend.md +7 -5
- package/.claude/agents-en/quality-fixer.md +3 -3
- package/.claude/agents-en/requirement-analyzer.md +2 -2
- package/.claude/agents-en/scope-discoverer.md +2 -2
- package/.claude/agents-en/skill-creator.md +2 -2
- package/.claude/agents-en/skill-reviewer.md +2 -2
- package/.claude/agents-en/solver.md +2 -2
- package/.claude/agents-en/task-decomposer.md +2 -2
- package/.claude/agents-en/task-executor-frontend.md +3 -3
- package/.claude/agents-en/task-executor.md +2 -2
- package/.claude/agents-en/technical-designer-frontend.md +17 -6
- package/.claude/agents-en/technical-designer.md +2 -2
- package/.claude/agents-en/ui-spec-designer.md +115 -0
- package/.claude/agents-en/verifier.md +2 -2
- package/.claude/agents-en/work-planner.md +2 -2
- package/.claude/agents-ja/acceptance-test-generator.md +4 -3
- package/.claude/agents-ja/code-reviewer.md +2 -2
- package/.claude/agents-ja/code-verifier.md +2 -2
- package/.claude/agents-ja/design-sync.md +2 -2
- package/.claude/agents-ja/document-reviewer.md +4 -4
- package/.claude/agents-ja/integration-test-reviewer.md +2 -2
- package/.claude/agents-ja/investigator.md +2 -2
- package/.claude/agents-ja/prd-creator.md +4 -2
- package/.claude/agents-ja/quality-fixer-frontend.md +7 -5
- package/.claude/agents-ja/quality-fixer.md +3 -3
- package/.claude/agents-ja/requirement-analyzer.md +2 -2
- package/.claude/agents-ja/scope-discoverer.md +2 -2
- package/.claude/agents-ja/skill-creator.md +2 -2
- package/.claude/agents-ja/skill-reviewer.md +2 -2
- package/.claude/agents-ja/solver.md +2 -2
- package/.claude/agents-ja/task-decomposer.md +2 -2
- package/.claude/agents-ja/task-executor-frontend.md +3 -3
- package/.claude/agents-ja/task-executor.md +2 -2
- package/.claude/agents-ja/technical-designer-frontend.md +17 -6
- package/.claude/agents-ja/technical-designer.md +2 -2
- package/.claude/agents-ja/ui-spec-designer.md +115 -0
- package/.claude/agents-ja/verifier.md +2 -2
- package/.claude/agents-ja/work-planner.md +2 -2
- package/.claude/commands-en/add-integration-tests.md +1 -1
- package/.claude/commands-en/build.md +55 -19
- package/.claude/commands-en/create-skill.md +1 -1
- package/.claude/commands-en/design.md +1 -1
- package/.claude/commands-en/diagnose.md +2 -2
- package/.claude/commands-en/front-build.md +40 -20
- package/.claude/commands-en/front-design.md +25 -8
- package/.claude/commands-en/front-plan.md +17 -9
- package/.claude/commands-en/front-review.md +2 -2
- package/.claude/commands-en/implement.md +15 -10
- package/.claude/commands-en/project-inject.md +1 -1
- package/.claude/commands-en/refine-skill.md +1 -1
- package/.claude/commands-en/reverse-engineer.md +3 -3
- package/.claude/commands-en/review.md +2 -2
- package/.claude/commands-en/sync-skills.md +1 -1
- package/.claude/commands-en/update-doc.md +2 -2
- package/.claude/commands-ja/add-integration-tests.md +1 -1
- package/.claude/commands-ja/build.md +56 -18
- package/.claude/commands-ja/create-skill.md +1 -1
- package/.claude/commands-ja/design.md +1 -1
- package/.claude/commands-ja/diagnose.md +2 -2
- package/.claude/commands-ja/front-build.md +41 -21
- package/.claude/commands-ja/front-design.md +26 -9
- package/.claude/commands-ja/front-plan.md +15 -7
- package/.claude/commands-ja/front-review.md +2 -2
- package/.claude/commands-ja/implement.md +15 -10
- package/.claude/commands-ja/project-inject.md +1 -1
- package/.claude/commands-ja/refine-skill.md +1 -1
- package/.claude/commands-ja/reverse-engineer.md +3 -3
- package/.claude/commands-ja/review.md +2 -2
- package/.claude/commands-ja/sync-skills.md +1 -1
- package/.claude/commands-ja/update-doc.md +2 -2
- package/.claude/skills-en/documentation-criteria/SKILL.md +37 -1
- package/.claude/skills-en/documentation-criteria/references/design-template.md +24 -0
- package/.claude/skills-en/documentation-criteria/references/prd-template.md +10 -0
- package/.claude/skills-en/documentation-criteria/references/ui-spec-template.md +145 -0
- package/.claude/skills-en/{frontend/technical-spec → frontend-technical-spec}/SKILL.md +5 -5
- package/.claude/skills-en/{frontend/typescript-rules → frontend-typescript-rules}/SKILL.md +1 -1
- package/.claude/skills-en/{frontend/typescript-testing → frontend-typescript-testing}/SKILL.md +9 -2
- package/.claude/skills-en/frontend-typescript-testing/references/e2e.md +185 -0
- package/.claude/skills-en/integration-e2e-testing/SKILL.md +4 -0
- package/.claude/skills-en/integration-e2e-testing/references/e2e-design.md +86 -0
- package/.claude/skills-en/subagents-orchestration-guide/SKILL.md +44 -22
- package/.claude/skills-en/task-analyzer/references/skills-index.yaml +15 -11
- package/.claude/skills-en/technical-spec/SKILL.md +5 -4
- package/.claude/skills-ja/documentation-criteria/SKILL.md +37 -1
- package/.claude/skills-ja/documentation-criteria/references/design-template.md +24 -0
- package/.claude/skills-ja/documentation-criteria/references/prd-template.md +10 -0
- package/.claude/skills-ja/documentation-criteria/references/ui-spec-template.md +145 -0
- package/.claude/skills-ja/{frontend/technical-spec → frontend-technical-spec}/SKILL.md +5 -5
- package/.claude/skills-ja/{frontend/typescript-rules → frontend-typescript-rules}/SKILL.md +1 -1
- package/.claude/skills-ja/{frontend/typescript-testing → frontend-typescript-testing}/SKILL.md +2 -2
- package/.claude/skills-ja/frontend-typescript-testing/references/e2e.md +185 -0
- package/.claude/skills-ja/integration-e2e-testing/SKILL.md +4 -0
- package/.claude/skills-ja/integration-e2e-testing/references/e2e-design.md +86 -0
- package/.claude/skills-ja/subagents-orchestration-guide/SKILL.md +44 -22
- package/.claude/skills-ja/task-analyzer/references/skills-index.yaml +15 -11
- package/.claude/skills-ja/technical-spec/SKILL.md +5 -4
- package/CHANGELOG.md +67 -0
- package/CLAUDE.en.md +2 -2
- package/CLAUDE.ja.md +2 -2
- package/CLAUDE.md +68 -86
- package/README.ja.md +10 -7
- package/README.md +10 -7
- package/bin/create-project.js +76 -75
- package/biome.json +5 -8
- package/package.json +11 -24
- package/scripts/post-setup.js +54 -57
- package/scripts/set-language.js +107 -112
- package/scripts/setup-project.js +97 -92
- package/scripts/show-coverage.js +36 -22
- package/scripts/update-project.js +205 -201
- package/scripts/utils.js +19 -21
- package/tsconfig.json +3 -3
- package/vitest.config.mjs +2 -2
- package/.tsprunerc +0 -11
- package/scripts/check-unused-exports.js +0 -69
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# PlaywrightによるE2Eテスト設計
|
|
2
|
+
|
|
3
|
+
## E2Eテストを作成するタイミング
|
|
4
|
+
|
|
5
|
+
E2Eテストは、複数ページにまたがる、または実ブラウザ操作を必要とする**クリティカルなユーザージャーニー**を対象とする。親スキルと同じROIフレームワークを適用し、ROI > 50の場合のみE2Eテストを作成。
|
|
6
|
+
|
|
7
|
+
### 候補ソース
|
|
8
|
+
|
|
9
|
+
| ソース | 抽出対象 |
|
|
10
|
+
|--------|---------|
|
|
11
|
+
| **Design DocのAC** | 複数画面にまたがるEARS "When" キーワードを含むユーザージャーニー |
|
|
12
|
+
| **UI Specの画面遷移** | 複数ステップのフロー(例: フォームウィザード、チェックアウト) |
|
|
13
|
+
| **UI Specの状態×表示マトリクス** | ブラウザレベルの検証を必要とするエラー/Empty/ローディング状態 |
|
|
14
|
+
| **UI Specのインタラクション定義** | 複雑なインタラクション(ドラッグ&ドロップ、キーボードナビゲーション、レスポンシブ動作) |
|
|
15
|
+
|
|
16
|
+
### 選定基準
|
|
17
|
+
|
|
18
|
+
**対象**(高E2E ROI):
|
|
19
|
+
- 複数ページにまたがるユーザージャーニー(ログイン → ダッシュボード → 操作 → 確認)
|
|
20
|
+
- 実ブラウザAPIを必要とするフロー(ナビゲーション、Cookie、localStorage)
|
|
21
|
+
- 実DOM描画が必要なアクセシビリティ検証
|
|
22
|
+
- Viewportをまたぐレスポンシブ動作
|
|
23
|
+
|
|
24
|
+
**対象外**(統合テストを使用):
|
|
25
|
+
- 単一コンポーネントの状態変化(RTLを使用)
|
|
26
|
+
- APIレスポンスの処理(MSW + RTLを使用)
|
|
27
|
+
- 純粋なデータ変換
|
|
28
|
+
|
|
29
|
+
## UI SpecからE2Eテストへのマッピング
|
|
30
|
+
|
|
31
|
+
UI Specが存在する場合、E2Eテスト設計の主要ソースとして使用:
|
|
32
|
+
|
|
33
|
+
1. **画面遷移を抽出** → 複数ステップの各遷移 = 1つのE2E候補
|
|
34
|
+
2. **状態×表示マトリクスを確認** → ナビゲーションを必要とするエラー状態 = E2E候補
|
|
35
|
+
3. **インタラクション定義をレビュー** → ブラウザ依存のインタラクション = E2E候補
|
|
36
|
+
4. **Design DocのACと照合** → E2E候補が受入条件にマッピングされていることを確認
|
|
37
|
+
|
|
38
|
+
### マッピングテンプレート
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
画面遷移: [画面A] → [画面B] → [画面C]
|
|
42
|
+
AC参照: AC-{id}
|
|
43
|
+
ユーザージャーニー: [ユーザーが達成する内容の説明]
|
|
44
|
+
前提条件: [認証状態、データ状態]
|
|
45
|
+
検証ポイント:
|
|
46
|
+
- [各ステップでアサートすべき内容]
|
|
47
|
+
E2E ROIスコア: [計算スコア]
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Playwrightテストアーキテクチャ
|
|
51
|
+
|
|
52
|
+
### ページオブジェクトパターン
|
|
53
|
+
|
|
54
|
+
保守性のためにブラウザ操作をページオブジェクトで整理:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
tests/
|
|
58
|
+
├── e2e/
|
|
59
|
+
│ ├── pages/ # ページオブジェクト
|
|
60
|
+
│ ├── fixtures/ # テストFixtureとヘルパー
|
|
61
|
+
│ └── *.e2e.test.ts # テストファイル
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### テスト分離
|
|
65
|
+
|
|
66
|
+
- 各テストはクリーンなブラウザコンテキストから開始
|
|
67
|
+
- テスト間で状態を共有しない
|
|
68
|
+
- 共通セットアップ(認証、ナビゲーション)には`beforeEach`を使用
|
|
69
|
+
- セットアップではテスト内ナビゲーションより`page.goto()`を優先
|
|
70
|
+
|
|
71
|
+
### Viewportテスト
|
|
72
|
+
|
|
73
|
+
UI Specでレスポンシブ動作が定義されている場合、クリティカルなBreakpointをテスト:
|
|
74
|
+
|
|
75
|
+
| Breakpoint | 幅 | テスト条件 |
|
|
76
|
+
|-----------|------|-----------|
|
|
77
|
+
| モバイル | 375px | UI Specでモバイル固有のインタラクションが定義されている場合 |
|
|
78
|
+
| タブレット | 768px | UI Specでタブレット用レイアウトの差異が定義されている場合 |
|
|
79
|
+
| デスクトップ | 1280px | デフォルト — 常にテスト |
|
|
80
|
+
|
|
81
|
+
## 上限制約
|
|
82
|
+
|
|
83
|
+
機能あたりのハードリミット(親スキルと同一):
|
|
84
|
+
- **E2Eテスト**: 最大1-2テスト
|
|
85
|
+
- ROIスコア > 50の場合のみ生成
|
|
86
|
+
- 多数の粒度の細かいテストより、少数の包括的なジャーニーテストを優先
|
|
@@ -54,11 +54,12 @@ graph TD
|
|
|
54
54
|
### ドキュメント作成エージェント
|
|
55
55
|
5. **requirement-analyzer**: 要件分析と作業規模判定(WebSearch対応、最新技術情報の調査)
|
|
56
56
|
6. **prd-creator**: Product Requirements Document作成(WebSearch対応、市場動向調査)
|
|
57
|
-
7. **
|
|
58
|
-
8. **
|
|
59
|
-
9. **
|
|
60
|
-
10. **
|
|
61
|
-
11. **
|
|
57
|
+
7. **ui-spec-designer**: PRDとプロトタイプコード(任意)からUI Spec作成(フロントエンド/フルスタック機能)
|
|
58
|
+
8. **technical-designer**: ADR/Design Doc作成(最新技術情報の調査、Property注釈付与)
|
|
59
|
+
9. **work-planner**: 作業計画書作成(テストスケルトンからメタ情報を抽出・反映)
|
|
60
|
+
10. **document-reviewer**: 単一ドキュメントの品質・完成度・ルール準拠チェック
|
|
61
|
+
11. **design-sync**: Design Doc間の整合性検証(明示的矛盾のみ検出)
|
|
62
|
+
12. **acceptance-test-generator**: Design DocのACとUI Spec(任意)から統合テストとE2Eテストのスケルトン生成
|
|
62
63
|
|
|
63
64
|
## オーケストレーション原則
|
|
64
65
|
|
|
@@ -111,29 +112,33 @@ graph TD
|
|
|
111
112
|
|
|
112
113
|
## 作業計画時の基本フロー
|
|
113
114
|
|
|
114
|
-
### 大規模(6ファイル以上) - 11
|
|
115
|
+
### 大規模(6ファイル以上) - 11ステップ(バックエンド) / 13ステップ(フロントエンド/フルスタック)
|
|
115
116
|
|
|
116
117
|
1. requirement-analyzer → 要件分析 + 既存PRD確認 **[停止]**
|
|
117
118
|
2. prd-creator → PRD作成
|
|
118
119
|
3. document-reviewer → PRDレビュー **[停止: PRD承認]**
|
|
119
|
-
4.
|
|
120
|
-
5. document-reviewer →
|
|
121
|
-
6. technical-designer →
|
|
122
|
-
7. document-reviewer →
|
|
123
|
-
8.
|
|
124
|
-
9.
|
|
125
|
-
10.
|
|
126
|
-
11.
|
|
127
|
-
|
|
128
|
-
|
|
120
|
+
4. **(フロントエンド/フルスタックのみ)** プロトタイプコードの有無を確認 → ui-spec-designer → UI Spec作成
|
|
121
|
+
5. **(フロントエンド/フルスタックのみ)** document-reviewer → UI Specレビュー **[停止: UI Spec承認]**
|
|
122
|
+
6. technical-designer → ADR作成(アーキテクチャ/技術/データフロー変更がある場合)
|
|
123
|
+
7. document-reviewer → ADRレビュー(ADR作成時) **[停止: ADR承認]**
|
|
124
|
+
8. technical-designer → Design Doc作成(レイヤー横断時: レイヤー別に作成、レイヤー横断オーケストレーション参照)
|
|
125
|
+
9. document-reviewer → Design Docレビュー(レイヤー横断時: Design Doc毎に実行)
|
|
126
|
+
10. design-sync → 整合性検証 **[停止: Design Doc承認]**
|
|
127
|
+
11. acceptance-test-generator → テストスケルトン生成、work-plannerに渡す (*1)
|
|
128
|
+
12. work-planner → 作業計画書作成 **[停止: 一括承認]**
|
|
129
|
+
13. task-decomposer → 自律実行 → 完了報告
|
|
130
|
+
|
|
131
|
+
### 中規模(3-5ファイル) - 7ステップ(バックエンド) / 9ステップ(フロントエンド/フルスタック)
|
|
129
132
|
|
|
130
133
|
1. requirement-analyzer → 要件分析 **[停止]**
|
|
131
|
-
2.
|
|
132
|
-
3. document-reviewer →
|
|
133
|
-
4.
|
|
134
|
-
5.
|
|
135
|
-
6.
|
|
136
|
-
7.
|
|
134
|
+
2. **(フロントエンド/フルスタックのみ)** プロトタイプコードの有無を確認 → ui-spec-designer → UI Spec作成
|
|
135
|
+
3. **(フロントエンド/フルスタックのみ)** document-reviewer → UI Specレビュー **[停止: UI Spec承認]**
|
|
136
|
+
4. technical-designer → Design Doc作成(レイヤー横断時: レイヤー別に作成、レイヤー横断オーケストレーション参照)
|
|
137
|
+
5. document-reviewer → Design Docレビュー(レイヤー横断時: Design Doc毎に実行)
|
|
138
|
+
6. design-sync → 整合性検証 **[停止: Design Doc承認]**
|
|
139
|
+
7. acceptance-test-generator → テストスケルトン生成、work-plannerに渡す (*1)
|
|
140
|
+
8. work-planner → 作業計画書作成 **[停止: 一括承認]**
|
|
141
|
+
9. task-decomposer → 自律実行 → 完了報告
|
|
137
142
|
|
|
138
143
|
### 小規模(1-2ファイル) - 2ステップ
|
|
139
144
|
|
|
@@ -219,6 +224,22 @@ requirement-analyzerが複数レイヤー(backend + frontend)にまたがる
|
|
|
219
224
|
- 構造化レスポンスから必要な情報を抽出
|
|
220
225
|
- changeSummaryからコミットメッセージを作成 → **Bashでgit commit実行**
|
|
221
226
|
- 要件変更時は初期要件と追加要件を明示的に統合
|
|
227
|
+
|
|
228
|
+
#### *1 acceptance-test-generator → work-planner
|
|
229
|
+
|
|
230
|
+
**acceptance-test-generatorへの入力**:
|
|
231
|
+
- Design Doc: [パス]
|
|
232
|
+
- UI Spec: [パス](存在する場合)
|
|
233
|
+
|
|
234
|
+
**オーケストレーター確認項目**:
|
|
235
|
+
- 統合テストファイルパスの取得と存在確認
|
|
236
|
+
- E2Eテストファイルパスの取得と存在確認
|
|
237
|
+
|
|
238
|
+
**work-plannerへの入力**:
|
|
239
|
+
- 統合テストファイル: [パス](各フェーズの実装と同時に作成・実行)
|
|
240
|
+
- E2Eテストファイル: [パス](最終フェーズでのみ実行)
|
|
241
|
+
|
|
242
|
+
**エラー時**: ファイルが生成されない場合はユーザーにエスカレーション
|
|
222
243
|
3. **品質保証とコミット実行**: approved=true確認後、即座にgit commit実行
|
|
223
244
|
4. **自律実行モード管理**: 承認後の自律実行開始・停止・エスカレーション判断
|
|
224
245
|
5. **ADRステータス管理**: ユーザー判断後のADRステータス更新(Accepted/Rejected)
|
|
@@ -243,6 +264,7 @@ requirement-analyzerが複数レイヤー(backend + frontend)にまたがる
|
|
|
243
264
|
### 主要な停止ポイント
|
|
244
265
|
- **requirement-analyzer完了後**: 要件分析結果と質問事項の確認
|
|
245
266
|
- **PRD作成→document-reviewer実行後**: 要件理解と整合性の確認
|
|
267
|
+
- **UI Spec作成→document-reviewer実行後**(フロントエンド/フルスタック): UI仕様の完全性と整合性の確認
|
|
246
268
|
- **ADR作成→document-reviewer実行後**: 技術方針と整合性の確認
|
|
247
269
|
- **Design Doc作成→document-reviewer実行後**: 設計内容と整合性の確認
|
|
248
270
|
- **計画書作成後**: 実装フェーズ全体の一括承認
|
|
@@ -91,7 +91,7 @@ skills:
|
|
|
91
91
|
|
|
92
92
|
documentation-criteria:
|
|
93
93
|
skill: "documentation-criteria"
|
|
94
|
-
tags: [documentation, decision-making, adr, prd, design-doc, planning, process]
|
|
94
|
+
tags: [documentation, decision-making, adr, prd, ui-spec, design-doc, planning, process]
|
|
95
95
|
typical-use: "実装開始時の規模判定、ドキュメント作成判定、ADR/PRD/Design Doc/作業計画書の作成基準"
|
|
96
96
|
size: medium
|
|
97
97
|
key-references:
|
|
@@ -129,14 +129,16 @@ skills:
|
|
|
129
129
|
|
|
130
130
|
integration-e2e-testing:
|
|
131
131
|
skill: "integration-e2e-testing"
|
|
132
|
-
tags: [testing, integration-test, e2e-test, property-based-testing, fast-check, test-skeleton, test-review, quality]
|
|
133
|
-
typical-use: "統合テスト・E2Eテストのスケルトン生成、テスト実装、テストレビュー、Property-Based Test
|
|
132
|
+
tags: [testing, integration-test, e2e-test, property-based-testing, fast-check, test-skeleton, test-review, quality, playwright]
|
|
133
|
+
typical-use: "統合テスト・E2Eテストのスケルトン生成、テスト実装、テストレビュー、Property-Based Test実装、E2Eテスト設計"
|
|
134
134
|
size: small
|
|
135
135
|
key-references:
|
|
136
136
|
- "fast-check - Property-based testing for TypeScript"
|
|
137
137
|
- "Node.js Testing Best Practices - Yoni Goldberg"
|
|
138
138
|
- "Property-Based Testing - 2025 Practices"
|
|
139
|
+
- "references/e2e-design.md - E2Eテスト設計原則"
|
|
139
140
|
sections:
|
|
141
|
+
- "References"
|
|
140
142
|
- "テスト種別と上限"
|
|
141
143
|
- "振る舞い優先の原則"
|
|
142
144
|
- "スケルトン仕様"
|
|
@@ -181,8 +183,8 @@ skills:
|
|
|
181
183
|
- "References"
|
|
182
184
|
|
|
183
185
|
# フロントエンド固有スキル
|
|
184
|
-
frontend
|
|
185
|
-
skill: "frontend
|
|
186
|
+
frontend-typescript-rules:
|
|
187
|
+
skill: "frontend-typescript-rules"
|
|
186
188
|
tags: [frontend, react, implementation, type-safety, props-driven, hooks, component-design, vite, error-boundary]
|
|
187
189
|
typical-use: "React/Viteでのフロントエンド開発、コンポーネント設計、Props設計、環境変数管理"
|
|
188
190
|
size: small
|
|
@@ -198,16 +200,18 @@ skills:
|
|
|
198
200
|
- "コーディング規約"
|
|
199
201
|
- "アンチパターン"
|
|
200
202
|
|
|
201
|
-
frontend
|
|
202
|
-
skill: "frontend
|
|
203
|
-
tags: [frontend, react, quality, testing, coverage, vitest, react-testing-library, msw, component-testing, implementation]
|
|
204
|
-
typical-use: "Reactコンポーネントのテスト作成、React Testing Library、MSW、60%カバレッジ要件、Co-location"
|
|
203
|
+
frontend-typescript-testing:
|
|
204
|
+
skill: "frontend-typescript-testing"
|
|
205
|
+
tags: [frontend, react, quality, testing, coverage, vitest, react-testing-library, msw, component-testing, implementation, playwright, e2e]
|
|
206
|
+
typical-use: "Reactコンポーネントのテスト作成、React Testing Library、MSW、60%カバレッジ要件、Co-location、Playwright E2Eテスト"
|
|
205
207
|
size: small
|
|
206
208
|
key-references:
|
|
207
209
|
- "React Testing Library - Kent C. Dodds"
|
|
208
210
|
- "MSW (Mock Service Worker) - API Mocking"
|
|
209
211
|
- "ADR-0002 Co-location原則"
|
|
212
|
+
- "references/e2e.md - Playwright E2Eパターン"
|
|
210
213
|
sections:
|
|
214
|
+
- "References"
|
|
211
215
|
- "テストフレームワーク"
|
|
212
216
|
- "テストの基本方針"
|
|
213
217
|
- "テストの実装規約"
|
|
@@ -216,8 +220,8 @@ skills:
|
|
|
216
220
|
- "テスト品質基準"
|
|
217
221
|
- "アンチパターン"
|
|
218
222
|
|
|
219
|
-
frontend
|
|
220
|
-
skill: "frontend
|
|
223
|
+
frontend-technical-spec:
|
|
224
|
+
skill: "frontend-technical-spec"
|
|
221
225
|
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]
|
|
222
226
|
typical-use: "フロントエンド技術設計、環境変数管理(Vite)、セキュリティ制約、アーキテクチャ設計、状態管理パターン、実装方針決定、非機能要件の確認"
|
|
223
227
|
size: medium
|
|
@@ -59,10 +59,11 @@ package.jsonの`packageManager`フィールドに応じた実行コマンドを
|
|
|
59
59
|
品質チェックは実装完了時に必須:
|
|
60
60
|
|
|
61
61
|
**Phase 1-3: コード品質チェック**
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
62
|
+
- package.jsonから以下に該当するスクリプトを自動検出して実行:
|
|
63
|
+
- lint + format チェック
|
|
64
|
+
- 未使用エクスポートの検出
|
|
65
|
+
- 循環依存の検出
|
|
66
|
+
- TypeScriptビルド
|
|
66
67
|
|
|
67
68
|
**Phase 4: テスト**
|
|
68
69
|
- `test` - テスト実行
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,73 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.17.0] - 2026-03-08
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
#### UI Spec Support
|
|
13
|
+
- New `ui-spec-designer` agent (EN/JA) for creating UI Specifications from PRD and optional prototype code
|
|
14
|
+
- UI Spec template in documentation-criteria references
|
|
15
|
+
- UI Spec document type recognized by `document-reviewer`
|
|
16
|
+
- UI Spec integration steps in `technical-designer-frontend`
|
|
17
|
+
- UI Spec phase added to `front-design` command and orchestration flows
|
|
18
|
+
|
|
19
|
+
#### Playwright E2E Testing
|
|
20
|
+
- E2E test implementation guide (`references/e2e.md`) in frontend-typescript-testing skill
|
|
21
|
+
- E2E test design guide (`references/e2e-design.md`) in integration-e2e-testing skill
|
|
22
|
+
- E2E test support in `quality-fixer-frontend` and `acceptance-test-generator`
|
|
23
|
+
|
|
24
|
+
#### Autonomous Execution Enhancements
|
|
25
|
+
- 4-step task execution cycle (`task-executor → escalation check → quality-fixer → commit`) in `build` and `front-build` commands
|
|
26
|
+
- `integration-test-reviewer` integration for test skeleton compliance validation
|
|
27
|
+
- Structured response specs and sub-agent invocation constraints
|
|
28
|
+
- `acceptance-test-generator → work-planner` information passing section in orchestration guide
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
#### Frontend Workflow Enhancements
|
|
33
|
+
- Orchestration flow step counts updated: large scale 11→13, medium scale 7→9 (frontend/fullstack)
|
|
34
|
+
- `front-plan` command restructured with test skeleton generation step
|
|
35
|
+
- `implement` command task execution section renamed and enhanced
|
|
36
|
+
- `documentation-criteria` skill updated with UI Spec in creation matrix, storage paths, diagram requirements, and templates
|
|
37
|
+
- `skills-index.yaml` updated with playwright/e2e tags and new references
|
|
38
|
+
|
|
39
|
+
#### Dependencies Modernization
|
|
40
|
+
- Remove 11 unused devDependencies: react, react-dom, @types/react, @types/react-dom, @vitejs/plugin-react, @testing-library/react, @testing-library/jest-dom, jsdom, c8, ts-node, ts-prune
|
|
41
|
+
- Remove 4 unused scripts: `build:frontend`, `dev:frontend`, `preview`, `check:unused:all`
|
|
42
|
+
- Migrate ts-prune → knip for unused export detection (`check:unused` now runs `knip --include exports`)
|
|
43
|
+
- Upgrade Biome v1 → v2 (schema migration: `organizeImports` → `assist.actions.source`, `include`/`ignore` → `includes` with `!` prefix)
|
|
44
|
+
- Upgrade vitest v3 → v4, @vitest/coverage-v8 v3 → v4, @vitest/ui v3 → v4
|
|
45
|
+
- Upgrade vite v5 → v6, @types/node v20 → v22
|
|
46
|
+
- Add `knip.json` configuration
|
|
47
|
+
|
|
48
|
+
#### ESM Migration
|
|
49
|
+
- Migrate project from CommonJS to ES Modules (`"type": "module"` in package.json)
|
|
50
|
+
- Update tsconfig.json: `target` ES2020 → ES2022, `module` commonjs → Node16
|
|
51
|
+
- Convert all scripts/ and bin/ files from CJS (`require`/`module.exports`) to ESM (`import`/`export`)
|
|
52
|
+
- Add `node:` protocol to all Node.js builtin imports
|
|
53
|
+
|
|
54
|
+
#### Agent/Skill Environment Independence (en/ja)
|
|
55
|
+
- quality-fixer: replace `ts-prune` reference with generic "unused export detection tool"
|
|
56
|
+
- quality-fixer-frontend: replace hardcoded `build:frontend` with auto-detect pattern from package.json
|
|
57
|
+
- technical-spec skill: replace hardcoded script names with environment-independent descriptions
|
|
58
|
+
- frontend/technical-spec skill: replace hardcoded build commands with auto-detect pattern
|
|
59
|
+
|
|
60
|
+
#### Documentation
|
|
61
|
+
- Remove `build:frontend` and `preview` from README script lists (en/ja)
|
|
62
|
+
|
|
63
|
+
### Removed
|
|
64
|
+
|
|
65
|
+
- `.tsprunerc` configuration file
|
|
66
|
+
- `scripts/check-unused-exports.js` (replaced by knip)
|
|
67
|
+
|
|
68
|
+
## [1.16.3] - 2026-03-05
|
|
69
|
+
|
|
70
|
+
### Fixed
|
|
71
|
+
|
|
72
|
+
- Replace deprecated `TodoWrite` with Tasks API (`TaskCreate`/`TaskUpdate`/`TaskList`) across all agent definitions, command files, and CLAUDE rule files (en/ja)
|
|
73
|
+
- Add missing `TaskCreate`/`TaskUpdate` to tools list for `code-reviewer`, `design-sync`, and `integration-test-reviewer` agents (en/ja)
|
|
74
|
+
|
|
8
75
|
## [1.16.2] - 2026-03-03
|
|
9
76
|
|
|
10
77
|
### Changed
|
package/CLAUDE.en.md
CHANGED
|
@@ -29,7 +29,7 @@ Core rules for maximizing AI execution accuracy. All instructions must follow th
|
|
|
29
29
|
**Trigger**: When starting work that involves Edit/Write/MultiEdit tools
|
|
30
30
|
|
|
31
31
|
- [ ] Execute rule-advisor subagent (using Task tool)
|
|
32
|
-
- [ ] Update
|
|
32
|
+
- [ ] Update tasks with TaskCreate/TaskUpdate
|
|
33
33
|
- Record taskEssence as completion criteria
|
|
34
34
|
- Reflect firstActionGuidance as first action
|
|
35
35
|
- Record warningPatterns as checkpoints during execution
|
|
@@ -43,7 +43,7 @@ Core rules for maximizing AI execution accuracy. All instructions must follow th
|
|
|
43
43
|
### Step 3: Implementation Execution
|
|
44
44
|
|
|
45
45
|
- [ ] Execute Edit/Write/MultiEdit following approved approach
|
|
46
|
-
- [ ] Update
|
|
46
|
+
- [ ] Update tasks with TaskUpdate every 3 file edits (confirm progress and direction)
|
|
47
47
|
|
|
48
48
|
### Step 4: Quality Verification
|
|
49
49
|
|
package/CLAUDE.ja.md
CHANGED
|
@@ -29,7 +29,7 @@ AI実行精度最大化のための中核ルール。全ての指示はこのフ
|
|
|
29
29
|
**トリガー**: Edit/Write/MultiEditツールを使う作業の開始時
|
|
30
30
|
|
|
31
31
|
- [ ] rule-advisorサブエージェントを実行(Taskツール使用)
|
|
32
|
-
- [ ]
|
|
32
|
+
- [ ] TaskCreate/TaskUpdateでタスクを更新
|
|
33
33
|
- taskEssenceを完了判断基準として記録
|
|
34
34
|
- firstActionGuidanceを初動アクションとして反映
|
|
35
35
|
- warningPatternsを実行中の確認項目として記録
|
|
@@ -43,7 +43,7 @@ AI実行精度最大化のための中核ルール。全ての指示はこのフ
|
|
|
43
43
|
### Step 3: 実装実行
|
|
44
44
|
|
|
45
45
|
- [ ] 承認されたアプローチに従いEdit/Write/MultiEditを実行
|
|
46
|
-
- [ ] 3ファイル編集ごとに
|
|
46
|
+
- [ ] 3ファイル編集ごとにTaskUpdateで更新(進捗と方向性を確認)
|
|
47
47
|
|
|
48
48
|
### Step 4: 品質検証
|
|
49
49
|
|
package/CLAUDE.md
CHANGED
|
@@ -2,101 +2,83 @@
|
|
|
2
2
|
|
|
3
3
|
AI実行精度最大化のための中核ルール。全ての指示はこのファイルに従う。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 最重要原則:調査OK、実装STOP
|
|
6
6
|
|
|
7
7
|
**すべてのEdit/Write/MultiEditツール使用前にユーザー承認が必須**
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
- 編集作業の前にAskUserQuestionで変更計画を提示し、明示的な承認を得ること
|
|
10
|
+
- 調査・読み込み・分析は承認不要
|
|
11
|
+
|
|
12
|
+
## 品質基準:技術的な妥協をしない
|
|
13
|
+
|
|
14
|
+
- 「とりあえず動く」vs「正しい実装」→ 正しい実装を選択
|
|
15
|
+
- ベストプラクティスに大きなコストがかかる場合 → トレードオフをユーザーに提示
|
|
16
|
+
- ベストプラクティスはrule-advisor(Step 1)から取得
|
|
10
17
|
|
|
11
18
|
## 必須実行プロセス
|
|
12
19
|
|
|
13
|
-
###
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
###
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
3. **metaCognitiveGuidance.pastFailures(過去の失敗)を認識**
|
|
63
|
-
- 同じ失敗を繰り返さないよう注意
|
|
64
|
-
- 提示された回避策を意識
|
|
65
|
-
|
|
66
|
-
4. **metaCognitiveGuidance.firstStep(初動アクション)を実行**
|
|
67
|
-
- 推奨されたツールから開始
|
|
68
|
-
- 計画的に進める
|
|
69
|
-
|
|
70
|
-
## Claude行動制御(失敗防止)
|
|
71
|
-
|
|
72
|
-
### 自動停止トリガー(必ず停止)
|
|
73
|
-
- **5ファイル以上の変更検出**:即座停止、影響範囲をユーザーに報告
|
|
74
|
-
理由:大規模変更は事前計画とレビューが必要なため
|
|
75
|
-
- **同じエラー3回発生**:根本原因分析必須
|
|
76
|
-
理由:対症療法ではなく根本解決が必要なため
|
|
77
|
-
- **unknown型多用検出**:型ガード設計再検討
|
|
78
|
-
理由:型安全性の設計に問題がある可能性が高いため
|
|
79
|
-
- **3ファイル編集完了**: TodoWriteの更新を強制(更新しないと次のEditツール使用不可)
|
|
80
|
-
理由:進捗確認と方向性の再確認が必要なため
|
|
81
|
-
|
|
82
|
-
### エラー修正衝動対処
|
|
83
|
-
1. エラー発見 → **一時停止**
|
|
20
|
+
### セッション初期化
|
|
21
|
+
|
|
22
|
+
**トリガー**: セッション開始時、最初のユーザーメッセージに応答する前
|
|
23
|
+
|
|
24
|
+
- [ ] `date`コマンドで現在日時を確認
|
|
25
|
+
- [ ] `project-context`スキル(Skillツール使用)を実行してプロジェクトの前提を把握
|
|
26
|
+
|
|
27
|
+
### Step 1: タスク準備
|
|
28
|
+
|
|
29
|
+
**トリガー**: Edit/Write/MultiEditツールを使う作業の開始時
|
|
30
|
+
|
|
31
|
+
- [ ] rule-advisorサブエージェントを実行(Taskツール使用)
|
|
32
|
+
- [ ] TaskCreate/TaskUpdateでタスクを更新
|
|
33
|
+
- taskEssenceを完了判断基準として記録
|
|
34
|
+
- firstActionGuidanceを初動アクションとして反映
|
|
35
|
+
- warningPatternsを実行中の確認項目として記録
|
|
36
|
+
|
|
37
|
+
### Step 2: 実装計画
|
|
38
|
+
|
|
39
|
+
- [ ] 影響範囲を調査し、関連ファイルを特定
|
|
40
|
+
- [ ] 実装アプローチをユーザーに提示
|
|
41
|
+
- [ ] AskUserQuestionで編集前に明示的な承認を取得
|
|
42
|
+
|
|
43
|
+
### Step 3: 実装実行
|
|
44
|
+
|
|
45
|
+
- [ ] 承認されたアプローチに従いEdit/Write/MultiEditを実行
|
|
46
|
+
- [ ] 3ファイル編集ごとにTaskUpdateで更新(進捗と方向性を確認)
|
|
47
|
+
|
|
48
|
+
### Step 4: 品質検証
|
|
49
|
+
|
|
50
|
+
- [ ] 実装タスクの場合:quality-fixerサブエージェントを実行(Taskツール使用)
|
|
51
|
+
- [ ] 実装以外の場合:rule-advisorが提供した原則に基づき検証
|
|
52
|
+
- [ ] エラー0を確認し、完了を報告
|
|
53
|
+
|
|
54
|
+
## 自動停止トリガー
|
|
55
|
+
|
|
56
|
+
以下の条件発生時、作業を中断しステータスを報告:
|
|
57
|
+
|
|
58
|
+
| 条件 | アクション |
|
|
59
|
+
|------|-----------|
|
|
60
|
+
| 5ファイル以上の変更を検出 | 影響範囲をユーザーに報告 |
|
|
61
|
+
| 同じエラーが2回発生 | rule-advisor再実行、根本原因分析 |
|
|
62
|
+
| Editツール5回使用 | 影響範囲レポートを作成 |
|
|
63
|
+
| 同一ファイルを3回編集 | リファクタリングを検討 |
|
|
64
|
+
|
|
65
|
+
## エラー対処フロー
|
|
66
|
+
|
|
67
|
+
1. 一時停止
|
|
84
68
|
2. rule-advisor再実行
|
|
85
|
-
3.
|
|
86
|
-
4.
|
|
87
|
-
5.
|
|
69
|
+
3. 根本原因分析(5 Whys)
|
|
70
|
+
4. 対処計画をユーザーに提示
|
|
71
|
+
5. 承認後に修正を実行
|
|
72
|
+
|
|
73
|
+
## ユーザー確認必須
|
|
74
|
+
|
|
75
|
+
以下の状況では実装前にユーザー確認を取得:
|
|
88
76
|
|
|
89
|
-
### エスカレーション基準(ユーザー確認必須)
|
|
90
77
|
- アーキテクチャ変更(新レイヤー追加、責務変更)
|
|
91
|
-
-
|
|
92
|
-
- 破壊的変更(既存API
|
|
78
|
+
- 外部依存の追加(npmパッケージ、外部API)
|
|
79
|
+
- 破壊的変更(既存API、データ構造の変更)
|
|
93
80
|
- 複数の実装方法があり優劣が判断できない場合
|
|
94
81
|
|
|
95
|
-
|
|
96
|
-
**測定可能な強制停止基準**:
|
|
97
|
-
- **連続エラー修正2回目**: 自動的にrule-advisor再実行をトリガー
|
|
98
|
-
- **Editツール5回使用**: 影響範囲レポートの作成を強制
|
|
99
|
-
- **同一ファイル3回編集**: リファクタリング検討の強制停止
|
|
82
|
+
## 作業ファイル管理
|
|
100
83
|
|
|
101
|
-
|
|
102
|
-
作業中ファイルは`tmp/`ディレクトリ使用。完了時削除。
|
|
84
|
+
作業中の一時ファイルは`./tmp/`ディレクトリ(プロジェクトルート配下)に作成。完了時に削除。
|
package/README.ja.md
CHANGED
|
@@ -139,10 +139,11 @@ Vibe Codingの先へ — **Agentic Coding**(構造化されたワークフロ
|
|
|
139
139
|
| `technical-spec` | アーキテクチャ、環境設定、ビルドコマンド |
|
|
140
140
|
| `implementation-approach` | 戦略パターン、タスク分解 |
|
|
141
141
|
| `integration-e2e-testing` | 統合/E2Eテスト設計、ROIベース選択 |
|
|
142
|
+
| `frontend-typescript-rules` | Reactコンポーネント設計、Props駆動パターン |
|
|
143
|
+
| `frontend-typescript-testing` | React Testing Library、MSW、Playwright E2E |
|
|
144
|
+
| `frontend-technical-spec` | Reactアーキテクチャ、環境設定、データフロー |
|
|
142
145
|
| `project-context` | AIの実行精度のためのプロジェクト前提情報(`/project-inject`で設定) |
|
|
143
146
|
|
|
144
|
-
**フロントエンド専用スキル**も`frontend/`配下で利用可能(例:`frontend/typescript-rules`)。
|
|
145
|
-
|
|
146
147
|
👉 [スキルの仕組みについて(Claude Code docs)](https://code.claude.com/docs/ja/skills)
|
|
147
148
|
|
|
148
149
|
## 🎯 このボイラープレートで作られたプロジェクト
|
|
@@ -185,7 +186,7 @@ Claude Codeで利用できる主要なコマンド
|
|
|
185
186
|
| `/diagnose` | 根本原因分析ワークフロー | デバッグ、トラブルシューティング |
|
|
186
187
|
| `/reverse-engineer` | コードからPRD/Design Docを生成 | 既存システムのドキュメント化 |
|
|
187
188
|
|
|
188
|
-
フロントエンド用(`/front-design
|
|
189
|
+
フロントエンド用(`/front-design`(UI Spec + Design Doc), `/front-build`, `/front-review`, `/front-plan`)やユーティリティコマンド(`/add-integration-tests`, `/update-doc`)も利用できます。
|
|
189
190
|
|
|
190
191
|
[コマンドの詳細はこちら →](docs/guides/ja/use-cases.md)
|
|
191
192
|
|
|
@@ -229,7 +230,7 @@ graph TB
|
|
|
229
230
|
### 動作の仕組み
|
|
230
231
|
|
|
231
232
|
1. **要件分析**: `/implement`コマンドがタスクの規模を判断します
|
|
232
|
-
2. **ドキュメント生成**: 必要に応じてドキュメント(PRD、Design Doc、Work Plan)を作成します
|
|
233
|
+
2. **ドキュメント生成**: 必要に応じてドキュメント(PRD、UI Spec、Design Doc、Work Plan)を作成します
|
|
233
234
|
3. **タスク実行**: 専門のエージェントが各フェーズを担当します
|
|
234
235
|
4. **品質保証**: テスト、型チェック、必要に応じた修正を行います
|
|
235
236
|
5. **コミット**: タスクごとに整理されたコミットを作成します
|
|
@@ -248,7 +249,9 @@ ai-coding-project-boilerplate/
|
|
|
248
249
|
│ ├── documentation-criteria/
|
|
249
250
|
│ ├── technical-spec/
|
|
250
251
|
│ ├── project-context/
|
|
251
|
-
│
|
|
252
|
+
│ ├── frontend-typescript-rules/
|
|
253
|
+
│ ├── frontend-typescript-testing/
|
|
254
|
+
│ └── frontend-technical-spec/
|
|
252
255
|
├── docs/
|
|
253
256
|
│ ├── guides/ # ユーザードキュメント
|
|
254
257
|
│ ├── adr/ # アーキテクチャ決定
|
|
@@ -287,7 +290,7 @@ ai-coding-project-boilerplate/
|
|
|
287
290
|
|
|
288
291
|
上記は代表例です。スキルやサブエージェント定義で言及されているスクリプトは以下の通りです。必要に応じて書き換えてください。
|
|
289
292
|
|
|
290
|
-
`build`, `
|
|
293
|
+
`build`, `dev`, `type-check`, `test`, `test:coverage`, `test:coverage:fresh`, `test:safe`, `cleanup:processes`, `check`, `check:fix`, `check:code`, `check:unused`, `check:deps`, `check:all`, `format`, `format:check`, `lint`, `lint:fix`
|
|
291
294
|
|
|
292
295
|
## 🌐 多言語対応
|
|
293
296
|
|
|
@@ -329,7 +332,7 @@ A: Context Engineeringにより防止しています。各サブエージェン
|
|
|
329
332
|
|
|
330
333
|
## 🤖 サブエージェント
|
|
331
334
|
|
|
332
|
-
|
|
335
|
+
要件分析、UI仕様、設計、計画、実装、品質保証、コードレビュー、デバッグ、リバースエンジニアリングをカバーする20以上の専門サブエージェントを搭載しています。各エージェントは独自のコンテキストウィンドウで実行されるため、集中した処理が可能です。
|
|
333
336
|
|
|
334
337
|
[エージェントの詳細 →](.claude/agents-ja/)
|
|
335
338
|
|