create-ai-project 1.23.2 → 1.23.4

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 (48) hide show
  1. package/.claude/agents-en/acceptance-test-generator.md +4 -2
  2. package/.claude/agents-en/code-reviewer.md +3 -0
  3. package/.claude/agents-en/quality-fixer-frontend.md +3 -3
  4. package/.claude/agents-en/quality-fixer.md +3 -3
  5. package/.claude/agents-en/task-decomposer.md +2 -1
  6. package/.claude/agents-en/task-executor-frontend.md +8 -2
  7. package/.claude/agents-en/task-executor.md +8 -2
  8. package/.claude/agents-en/technical-designer-frontend.md +10 -48
  9. package/.claude/agents-en/technical-designer.md +10 -26
  10. package/.claude/agents-en/work-planner.md +2 -5
  11. package/.claude/agents-ja/acceptance-test-generator.md +4 -2
  12. package/.claude/agents-ja/code-reviewer.md +3 -0
  13. package/.claude/agents-ja/quality-fixer-frontend.md +3 -3
  14. package/.claude/agents-ja/quality-fixer.md +3 -3
  15. package/.claude/agents-ja/task-decomposer.md +2 -1
  16. package/.claude/agents-ja/task-executor-frontend.md +8 -2
  17. package/.claude/agents-ja/task-executor.md +8 -2
  18. package/.claude/agents-ja/technical-designer-frontend.md +10 -48
  19. package/.claude/agents-ja/technical-designer.md +9 -25
  20. package/.claude/agents-ja/work-planner.md +2 -5
  21. package/.claude/commands-en/build.md +6 -15
  22. package/.claude/commands-en/front-build.md +4 -13
  23. package/.claude/commands-en/implement.md +2 -15
  24. package/.claude/commands-en/plan.md +7 -2
  25. package/.claude/commands-en/prepare-implementation.md +7 -17
  26. package/.claude/commands-en/sync-skills.md +3 -3
  27. package/.claude/commands-ja/build.md +7 -16
  28. package/.claude/commands-ja/front-build.md +4 -13
  29. package/.claude/commands-ja/implement.md +2 -15
  30. package/.claude/commands-ja/plan.md +6 -1
  31. package/.claude/commands-ja/prepare-implementation.md +8 -18
  32. package/.claude/commands-ja/sync-skills.md +3 -3
  33. package/.claude/skills-en/documentation-criteria/references/plan-template.md +0 -2
  34. package/.claude/skills-en/frontend-technical-spec/SKILL.md +4 -4
  35. package/.claude/skills-en/frontend-typescript-rules/SKILL.md +45 -111
  36. package/.claude/skills-en/frontend-typescript-testing/SKILL.md +8 -6
  37. package/.claude/skills-en/integration-e2e-testing/SKILL.md +2 -0
  38. package/.claude/skills-en/subagents-orchestration-guide/SKILL.md +2 -7
  39. package/.claude/skills-en/task-analyzer/references/skills-index.yaml +9 -11
  40. package/.claude/skills-ja/documentation-criteria/references/plan-template.md +0 -2
  41. package/.claude/skills-ja/frontend-technical-spec/SKILL.md +3 -3
  42. package/.claude/skills-ja/frontend-typescript-rules/SKILL.md +43 -288
  43. package/.claude/skills-ja/frontend-typescript-testing/SKILL.md +15 -71
  44. package/.claude/skills-ja/integration-e2e-testing/SKILL.md +2 -0
  45. package/.claude/skills-ja/subagents-orchestration-guide/SKILL.md +2 -7
  46. package/.claude/skills-ja/task-analyzer/references/skills-index.yaml +10 -11
  47. package/CHANGELOG.md +19 -0
  48. package/package.json +1 -1
@@ -5,6 +5,13 @@ description: React Testing Library、MSW、Playwright E2Eでテストを設計
5
5
 
6
6
  # TypeScript テストルール(フロントエンド)
7
7
 
8
+ ## 参照
9
+
10
+ | テスト種別 | 参照先 | 用途 |
11
+ |-----------|--------|------|
12
+ | **ユニット / 統合** | 本ドキュメント | RTL + Vitest + MSW での React コンポーネントテスト |
13
+ | **E2E** | [references/e2e.md](references/e2e.md) | Playwright によるブラウザレベル E2E テスト |
14
+
8
15
  ## テストフレームワーク
9
16
  - **Vitest**: このプロジェクトではVitestを使用
10
17
  - **React Testing Library**: コンポーネントテスト用
@@ -131,75 +138,12 @@ describe('Button', () => {
131
138
  })
132
139
  ```
133
140
 
134
- ## テスト品質基準
135
-
136
- ### 境界値・異常系の網羅
137
- 正常系に加え、境界値と異常系を含める。
138
- ```typescript
139
- it('renders empty state for empty array', () => {
140
- render(<UserList users={[]} />)
141
- expect(screen.getByText('ユーザーがいません')).toBeInTheDocument()
142
- })
143
-
144
- it('displays error message on API failure', async () => {
145
- server.use(rest.get('/api/users', (req, res, ctx) => res(ctx.status(500))))
146
- render(<UserList />)
147
- expect(await screen.findByText('エラーが発生しました')).toBeInTheDocument()
148
- })
149
- ```
150
-
151
- ### ユーザー中心のクエリ
152
-
153
- ```typescript
154
- // 良い: アクセシブルなクエリ
155
- screen.getByRole('button', { name: 'Submit' })
156
- screen.getByLabelText('Email')
157
- screen.getByText('Welcome')
158
-
159
- // 悪い: 実装詳細への依存
160
- screen.getByTestId('submit-btn')
161
- container.querySelector('.btn-primary')
162
- ```
163
-
164
- ### 非同期処理のテスト
165
-
166
- ```typescript
167
- it('loads and displays user data', async () => {
168
- render(<UserProfile userId="1" />)
169
-
170
- // ローディング状態を確認
171
- expect(screen.getByText('Loading...')).toBeInTheDocument()
172
-
173
- // データ表示を待機
174
- expect(await screen.findByText('John Doe')).toBeInTheDocument()
175
-
176
- // ローディングが消えていることを確認
177
- expect(screen.queryByText('Loading...')).not.toBeInTheDocument()
178
- })
179
- ```
180
-
181
- ### フォームテスト
182
-
183
- ```typescript
184
- it('submits form with valid data', async () => {
185
- const onSubmit = vi.fn()
186
- render(<LoginForm onSubmit={onSubmit} />)
187
-
188
- await userEvent.type(screen.getByLabelText('Email'), 'test@example.com')
189
- await userEvent.type(screen.getByLabelText('Password'), 'password123')
190
- await userEvent.click(screen.getByRole('button', { name: 'Login' }))
191
-
192
- expect(onSubmit).toHaveBeenCalledWith({
193
- email: 'test@example.com',
194
- password: 'password123'
195
- })
196
- })
197
- ```
198
-
199
141
  ## テスト設計パターン
200
142
 
143
+ 実装詳細ではなくユーザーから見える結果を検証する。クエリはアクセシビリティ優先(`getByRole`/`getByLabelText`/`getByText`)で、`getByTestId` や `container.querySelector` に依存しない。正常系だけでなく空・エラー・ローディング/非同期の状態も網羅し、非同期UIは `findBy*` で待機する。
144
+
201
145
  ```typescript
202
- // Correct: test user-visible results
146
+ // ユーザーから見える結果を検証
203
147
  it('increments count when clicked', async () => {
204
148
  const user = userEvent.setup()
205
149
  render(<Counter />)
@@ -207,10 +151,10 @@ it('increments count when clicked', async () => {
207
151
  expect(screen.getByText('Count: 1')).toBeInTheDocument()
208
152
  })
209
153
 
210
- // Avoid: testing implementation details
211
- it('calls setState', () => {
212
- const setState = vi.spyOn(React, 'useState')
213
- render(<Counter />)
214
- // ...
154
+ // エラー状態: 1テストだけハンドラを上書き
155
+ it('shows an error message on API failure', async () => {
156
+ server.use(http.get('/api/users', () => new HttpResponse(null, { status: 500 })))
157
+ render(<UserList />)
158
+ expect(await screen.findByText('エラーが発生しました')).toBeInTheDocument()
215
159
  })
216
160
  ```
@@ -45,6 +45,8 @@ description: 統合テストとE2Eテストを設計。モック境界と振る
45
45
 
46
46
  ### 必須コメント形式
47
47
 
48
+ コミットするスケルトンは、テストフレームワーク(`describe`/`it`/`it.todo` 用)のみを import する。テスト対象モジュールは実装タスクが import するものであり、スケルトンでは import しない — まだ作成されていないモジュールを参照するスケルトンは、テストファイルを型チェック・コンパイル・ロードするゲートが実装着手前に失敗し得る。
49
+
48
50
  各テストに以下のアノテーションを含めること。
49
51
 
50
52
  ```typescript
@@ -211,14 +211,9 @@ quality-fixerが `status: "blocked"` を返した場合、`reason`で判別:
211
211
 
212
212
  注: 小規模スケールでも実装ステップは task-executor を介して標準の4ステップサイクル(`task-executor → エスカレーション判定 → quality-fixer → commit`)で実行する。オーケストレーターによる直接編集は行わない。
213
213
 
214
- ### Implementation Readinessマーカー
214
+ ### 任意の事前検証(Optional Preflight)
215
215
 
216
- Medium / Large規模では、一括承認後、作業計画書のヘッダに `Implementation Readiness:` 行が含まれる(work-plannerが`pending`を出力する。`ready` または `escalated` への昇格は外部オーケストレーションの関心事である)。マーカーは以下3値のいずれかを取る:
217
- - `pending` — work-plannerが設定する初期状態
218
- - `ready` — readiness検証が完了し残存ギャップなし。タスク実行サイクルを安全に開始できる
219
- - `escalated` — readiness検証は完了したが残存ギャップが存在し、実行前にユーザー判断が必要
220
-
221
- `pending`から先へマーカーを昇格させるプロデューサと、task-executor呼び出し前にマーカーを読むコンシューマは、いずれも外部オーケストレーションが所有する。本ガイドはエージェント層の上位にあるオーケストレーターを呼び出さない。エージェントは明示的に依頼された場合にのみマーカーを読み書きする。
216
+ Medium / Large規模では、一括承認後、実装はそのまま進行する。計画がエンドツーエンドで実装可能か(検証戦略の参照、fixture、UI 描画面、E2E/ローカルレーン環境)の検証は、ユーザーが任意に prepare-implementation レシピで実行する事前検証であり、readiness 基準が既に満たされていれば no-op で終了する。本ガイドはエージェント層の上位にあるオーケストレーターを呼び出さない。
222
217
 
223
218
  ## レイヤー横断オーケストレーション
224
219
 
@@ -183,20 +183,19 @@ skills:
183
183
  # フロントエンド固有スキル
184
184
  frontend-typescript-rules:
185
185
  skill: "frontend-typescript-rules"
186
- tags: [frontend, react, implementation, type-safety, props-driven, hooks, component-design, vite, error-boundary]
187
- typical-use: "React/Viteでのフロントエンド開発、コンポーネント設計、Props設計、環境変数管理"
186
+ tags: [frontend, react, implementation, type-safety, component-design, props-driven, hooks, error-handling, conventions]
187
+ typical-use: "Reactコンポーネント実装、Props/状態設計、エラーハンドリング、frontend TypeScript実装ルール"
188
188
  size: small
189
189
  key-references:
190
- - "React公式ドキュメント - Function Components"
191
- - "Props-driven開発 - React Patterns"
190
+ - "React Function Components - React docs"
191
+ - "Type guards at external boundaries (unknown narrowing)"
192
+ - "Result type and Error Boundary error handling"
192
193
  sections:
193
- - "型システム"
194
- - "Reactコンポーネント設計"
195
- - "状態管理"
194
+ - "アンチパターンとしきい値"
195
+ - "境界での型安全性"
196
+ - "コンポーネントと状態の設計"
196
197
  - "エラーハンドリング"
197
- - "イベントハンドリング"
198
- - "コーディング規約"
199
- - "アンチパターン"
198
+ - "プロジェクト規約"
200
199
 
201
200
  frontend-typescript-testing:
202
201
  skill: "frontend-typescript-testing"
@@ -209,12 +208,12 @@ skills:
209
208
  - "ADR-0002 Co-location原則"
210
209
  - "references/e2e.md - Playwright E2Eパターン"
211
210
  sections:
211
+ - "参照"
212
212
  - "テストフレームワーク"
213
213
  - "テストの基本方針"
214
214
  - "テストの実装規約"
215
215
  - "モックの型安全性の徹底"
216
216
  - "React Testing Libraryの基本例"
217
- - "テスト品質基準"
218
217
  - "テスト設計パターン"
219
218
 
220
219
  frontend-technical-spec:
package/CHANGELOG.md CHANGED
@@ -5,6 +5,25 @@ 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.23.4] - 2026-06-09
9
+
10
+ ### Changed
11
+
12
+ - **Implementation Readiness gate → optional preflight** (agents, commands, skills) — The work plan no longer carries an `Implementation Readiness` marker and the build / front-build / implement recipes no longer halt on it. Verifying a plan is implementable end-to-end is now an optional, user-invoked preflight via `prepare-implementation`, which presents its Readiness Report in-session (instead of persisting it into the plan or promoting a header marker) and records committed Phase 0 tasks as done so `task-decomposer` does not regenerate them. `plan` surfaces the preflight as a conditional suggestion; `subagents-orchestration-guide` describes it as optional. Applied across en/ja.
13
+ - **Test skeletons stay green under static gates** (agents, skills) — `acceptance-test-generator` and `integration-e2e-testing` bound skeleton generation so a committed skeleton imports only the test framework (no module under test, assertions, or mocks); the implementing task adds executable code alongside the implementation, keeping a freshly committed skeleton green under typecheck / compile / test-load gates.
14
+ - **Removed decorative emojis** (agents, commands) — Stripped pictographic emojis from prompt files and simplified `task-executor` progress states to `[ ] → [x]`. Functional symbols (`[ ]` / `[x]` checkboxes, `→` flow arrows, check / cross marks) are retained.
15
+
16
+ ## [1.23.3] - 2026-06-06
17
+
18
+ ### Added
19
+
20
+ - **Requirement-boundary fidelity gates** (agents) — Behavior changes are specified, proven, and verified at the requirement boundaries where regressions hide (a behavior can hold on the main path while regressing on a separate branch / state / input / lifecycle / fallback dimension). `technical-designer` / `-frontend` draft each AC value-first and expand it across requirement boundaries before scoping; `acceptance-test-generator` records a boundary-path proof obligation so the generated test traverses the path that would otherwise stay green through a regression; `task-executor` / `-frontend` add a Step 4 Core Mechanism Preservation Check that escalates `design_compliance_violation` when a required mechanism would be replaced by a weaker substitute or is infeasible; `code-reviewer` verifies boundary-path evidence, core-mechanism preservation, and publication-boundary state at AC verification
21
+
22
+ ### Changed
23
+
24
+ - **technical-designer prompt trimming** (agents) — Compressed the Gate Ordering section to a single serial-gate line, with gate membership and applicability conditions retained in each subsection's `[Gate N — ...]` heading; removed the inline React implementation sample from `technical-designer-frontend` in favor of the loaded `frontend-typescript-rules` skill
25
+ - **Frontend skill alignment across en/ja** (skills) — `frontend-typescript-rules` is a rules-first, self-contained rewrite (thresholds, boundary type safety, component/state rules, and `Result` / `AppError` / Error Boundary idioms; generic syntax examples and `React.FC` dropped); `frontend-typescript-testing` unifies the en/ja structure, routes E2E to `references/e2e.md`, and uses MSW v2 (`http` / `HttpResponse`); `frontend-technical-spec` uses the `VITE_` prefix for client-exposed environment variables
26
+
8
27
  ## [1.23.2] - 2026-06-01
9
28
 
10
29
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-ai-project",
3
- "version": "1.23.2",
3
+ "version": "1.23.4",
4
4
  "packageManager": "npm@10.8.2",
5
5
  "description": "TypeScript boilerplate with skills and sub-agents for Claude Code. Prevents context exhaustion through role-based task splitting.",
6
6
  "keywords": [