create-ai-project 1.23.1 → 1.23.3

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 (42) hide show
  1. package/.claude/agents-en/acceptance-test-generator.md +16 -1
  2. package/.claude/agents-en/code-reviewer.md +8 -0
  3. package/.claude/agents-en/document-reviewer.md +21 -1
  4. package/.claude/agents-en/integration-test-reviewer.md +11 -1
  5. package/.claude/agents-en/task-decomposer.md +10 -0
  6. package/.claude/agents-en/task-executor-frontend.md +7 -1
  7. package/.claude/agents-en/task-executor.md +7 -1
  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 +6 -0
  11. package/.claude/agents-ja/acceptance-test-generator.md +17 -2
  12. package/.claude/agents-ja/code-reviewer.md +8 -0
  13. package/.claude/agents-ja/document-reviewer.md +21 -1
  14. package/.claude/agents-ja/integration-test-reviewer.md +11 -1
  15. package/.claude/agents-ja/task-decomposer.md +10 -0
  16. package/.claude/agents-ja/task-executor-frontend.md +7 -1
  17. package/.claude/agents-ja/task-executor.md +7 -1
  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 +6 -0
  21. package/.claude/commands-en/front-build.md +14 -1
  22. package/.claude/commands-en/front-plan.md +15 -2
  23. package/.claude/commands-en/plan.md +15 -1
  24. package/.claude/commands-ja/front-build.md +14 -1
  25. package/.claude/commands-ja/front-plan.md +14 -1
  26. package/.claude/commands-ja/plan.md +15 -1
  27. package/.claude/skills-en/documentation-criteria/references/plan-template.md +20 -0
  28. package/.claude/skills-en/documentation-criteria/references/task-template.md +12 -0
  29. package/.claude/skills-en/frontend-technical-spec/SKILL.md +4 -4
  30. package/.claude/skills-en/frontend-typescript-rules/SKILL.md +45 -111
  31. package/.claude/skills-en/frontend-typescript-testing/SKILL.md +8 -6
  32. package/.claude/skills-en/subagents-orchestration-guide/SKILL.md +9 -7
  33. package/.claude/skills-en/task-analyzer/references/skills-index.yaml +9 -11
  34. package/.claude/skills-ja/documentation-criteria/references/plan-template.md +20 -0
  35. package/.claude/skills-ja/documentation-criteria/references/task-template.md +12 -0
  36. package/.claude/skills-ja/frontend-technical-spec/SKILL.md +3 -3
  37. package/.claude/skills-ja/frontend-typescript-rules/SKILL.md +43 -288
  38. package/.claude/skills-ja/frontend-typescript-testing/SKILL.md +15 -71
  39. package/.claude/skills-ja/subagents-orchestration-guide/SKILL.md +9 -7
  40. package/.claude/skills-ja/task-analyzer/references/skills-index.yaml +10 -11
  41. package/CHANGELOG.md +18 -0
  42. package/package.json +1 -1
@@ -5,132 +5,66 @@ description: Applies React/TypeScript type safety, component design, and state m
5
5
 
6
6
  # TypeScript Development Rules (Frontend)
7
7
 
8
- ## Frontend-Specific Anti-patterns
8
+ Frontend-specific React/TypeScript rules for implementation: thresholds, boundary type safety, component/state design, error handling, and project conventions.
9
9
 
10
- In addition to universal anti-patterns, watch for these Frontend-specific issues:
10
+ ## Anti-patterns and Thresholds
11
+ Signals that trigger a design change:
12
+ - Prop drilling through 3+ levels → lift to Context or state management
13
+ - Component over 300 lines → split
14
+ - Props count over 10 → split the component (3-7 is the working range)
15
+ - Optional props over 50% → introduce defaults or Context
16
+ - Props nesting deeper than 2 levels → flatten
17
+ - The same `as` assertion appearing 3+ times → revisit the type design
11
18
 
12
- - **Prop drilling through 3+ levels** - Should use Context API or state management
13
- - **Massive components (300+ lines)** - Split into smaller components
19
+ ## Type Safety at Boundaries
20
+ Prohibit `any`; when a type is unavailable, receive it as `unknown` and narrow with a type guard. Minimize `as` (justify with a comment when unavoidable).
14
21
 
15
- ## Type Safety in Frontend Implementation
22
+ Inside the app, React Props/State are type-guaranteed — no `unknown` needed. At every external boundary, receive as `unknown` and narrow with a type guard before use: API responses, `localStorage`/`sessionStorage`, URL parameters, parsed JSON. Controlled-component form input stays type-safe through React synthetic events.
16
23
 
17
- **Type Safety in Data Flow**
18
- - **Frontend -> Backend**: Props/State (Type Guaranteed) -> API Request (Serialization)
19
- - **Backend -> Frontend**: API Response (`unknown`) -> Type Guard -> State (Type Guaranteed)
20
-
21
- **Frontend-Specific Type Scenarios**:
22
- - **React Props/State**: TypeScript manages types, unknown unnecessary
23
- - **External API Responses**: Always receive as `unknown`, validate with type guards
24
- - **localStorage/sessionStorage**: Treat as `unknown`, validate
25
- - **URL Parameters**: Treat as `unknown`, validate
26
- - **Form Input (Controlled Components)**: Type-safe with React synthetic events
27
-
28
- **Type Complexity Management (Frontend)**
29
- - **Props Design**:
30
- - Props count: 3-7 props ideal (consider component splitting if exceeds 10)
31
- - Optional Props: 50% or less (consider default values or Context if excessive)
32
- - Nesting: Up to 2 levels (flatten deeper structures)
33
- - Type Assertions: Review design if used 3+ times
34
- - **External API Types**: Relax constraints and define according to reality (convert appropriately internally)
35
-
36
- ## Coding Conventions
37
-
38
- **Component Design Criteria**
39
- - **Function Components (Mandatory)**: Official React recommendation, optimizable by modern tooling
40
- - **Classes Prohibited**: Class components completely deprecated (Exception: Error Boundary)
41
- - **Custom Hooks**: Standard pattern for logic reuse
42
-
43
- **Function Design**
44
- - **0-2 parameters maximum**: Use object for 3+ parameters
45
- ```typescript
46
- // Object parameter
47
- function createUser({ name, email, role }: CreateUserParams) {}
48
- ```
49
-
50
- **Props Design (Props-driven Approach)**
51
- - Props are the interface: Define all necessary information as props
52
- - Avoid implicit dependencies: Do not depend on global state or context without necessity
53
- - Type-safe: Always define Props type explicitly
54
-
55
- **Environment Variables**
56
- - **Use build tool's environment variable system**: `process.env` does not work in browsers
57
- - **No secrets on client-side**: All frontend code is public, manage secrets in backend
58
-
59
- **Dependency Injection**
60
- - **Custom Hooks for dependency injection**: Ensure testability and modularity
61
-
62
- **Asynchronous Processing**
63
- - Promise Handling: Always use `async/await`
64
- - Error Handling: Always handle with `try-catch` or Error Boundary
65
- - Type Definition: Explicitly define return value types (e.g., `Promise<Result>`)
66
-
67
- **Format Rules**
68
- - Semicolon omission (follow Biome settings)
69
- - Types in `PascalCase`, variables/functions in `camelCase`
70
- - Imports use absolute paths (`src/`)
24
+ ```typescript
25
+ const raw: unknown = await (await fetch(url)).json()
26
+ if (!isUser(raw)) throw new ValidationError('invalid user')
27
+ const user = raw // narrowed to User
28
+ ```
71
29
 
72
- **Clean Code Principles**
73
- - Delete unused code immediately
74
- - Delete debug `console.log()`
75
- - No commented-out code (manage history with version control)
76
- - Comments explain "why" (not "what")
30
+ ## Component and State Design
31
+ - **Function components only.** Class components are allowed solely for Error Boundaries (no hook equivalent exists).
32
+ - **Type Props explicitly** with a named type and destructure: `function UserCard({ user, onSelect }: UserCardProps)`. Avoid `React.FC`; type props directly on the function so the props contract stays explicit.
33
+ - **Props-driven:** pass dependencies as props; reach into global state or Context only when needed.
34
+ - **Custom hooks** are the unit of logic reuse and dependency injection (inject collaborators through the hook for testability).
35
+ - **Function parameters:** 0-2 positional; for 3+ take a single options object.
36
+ - **State shape:** type state explicitly; for multi-field state with discrete transitions, use `useReducer` with a discriminated-union action type rather than many `useState` calls.
77
37
 
78
38
  ## Error Handling
39
+ - Surface every error: log and handle, or propagate — never swallow.
40
+ - **Fail fast:** on an invalid state, throw rather than returning a silent fallback.
41
+ - Represent expected failures as values with a `Result` type; reserve `throw` for unexpected/unrecoverable cases.
42
+ - Use purpose-specific error classes extending a base `AppError` carrying a `code` (e.g. ValidationError, ApiError, NotFoundError).
43
+ - **Layer responsibilities:** the API layer converts transport errors into domain errors; hooks propagate `AppError` upward; an Error Boundary catches render-time errors and shows fallback UI.
44
+ - Never log secrets (password, token, apiKey, creditCard).
79
45
 
80
- **Absolute Rule**: Error suppression prohibited. All errors must have log output and appropriate handling.
81
-
82
- **Fail-Fast Principle**: Fail quickly on errors to prevent continued processing in invalid states
83
- ```typescript
84
- // Prohibited: Unconditional fallback
85
- catch (error) {
86
- return defaultValue // Hides error
87
- }
88
-
89
- // Required: Explicit failure
90
- catch (error) {
91
- logger.error('Processing failed', error)
92
- throw error // Handle with Error Boundary or higher layer
93
- }
94
- ```
95
-
96
- **Result Type Pattern**: Express errors with types for explicit handling
97
46
  ```typescript
98
47
  type Result<T, E> = { ok: true; value: T } | { ok: false; error: E }
99
48
 
100
- // Example: Express error possibility with types
101
- function parseUser(data: unknown): Result<User, ValidationError> {
102
- if (!isValid(data)) return { ok: false, error: new ValidationError() }
103
- return { ok: true, value: data as User }
49
+ class AppError extends Error {
50
+ constructor(message: string, readonly code: string, readonly statusCode = 500) {
51
+ super(message); this.name = this.constructor.name
52
+ }
104
53
  }
105
54
  ```
106
55
 
107
- **Custom Error Classes**
56
+ Error Boundary — the one place a class component is required:
108
57
  ```typescript
109
- export class AppError extends Error {
110
- constructor(message: string, public readonly code: string, public readonly statusCode = 500) {
111
- super(message)
112
- this.name = this.constructor.name
113
- }
58
+ class ErrorBoundary extends React.Component<{ children: React.ReactNode; fallback: React.ReactNode }, { hasError: boolean }> {
59
+ state = { hasError: false }
60
+ static getDerivedStateFromError() { return { hasError: true } }
61
+ render() { return this.state.hasError ? this.props.fallback : this.props.children }
114
62
  }
115
- // Purpose-specific: ValidationError(400), ApiError(502), NotFoundError(404)
116
63
  ```
117
64
 
118
- **Layer-Specific Error Handling (React)**
119
- - Error Boundary: Catch React component errors, display fallback UI
120
- - Custom Hook: Detect business rule violations, propagate AppError as-is
121
- - API Layer: Convert fetch errors to domain errors
122
-
123
- **Structured Logging and Sensitive Information Protection**
124
- Never include sensitive information (password, token, apiKey, secret, creditCard) in logs
125
-
126
- **Asynchronous Error Handling in React**
127
- - Error Boundary setup mandatory: Catch rendering errors
128
- - Use try-catch with all async/await in event handlers
129
- - Always log and re-throw errors or display error state
130
-
131
- ## Performance Optimization
132
-
133
- - Component Memoization: Use React.memo for expensive components
134
- - State Optimization: Minimize re-renders with proper state structure
135
- - Lazy Loading: Use React.lazy and Suspense for code splitting
136
- - Bundle Size: Monitor with the `build` script and keep under 500KB
65
+ ## Project Conventions
66
+ - **Environment variables:** read through the build tool's env system (`process.env` is absent in the browser). Keep all secrets server-side — frontend code ships to the client.
67
+ - **Bundle & performance:** monitor with the `build` script, keep under 500KB; memoize expensive components (`React.memo`); code-split with `React.lazy` + `Suspense`; structure state to minimize re-renders.
68
+ - **Naming:** components/types `PascalCase`; variables/functions `camelCase`; hooks `use`-prefixed; constants `SCREAMING_SNAKE_CASE`.
69
+ - **Imports:** absolute paths from `src/`; order: React → external libs → internal (absolute) → internal (relative) → type-only → styles/assets.
70
+ - **Formatting:** follow Biome (semicolons and style come from project config).
@@ -140,8 +140,10 @@ describe('Button', () => {
140
140
 
141
141
  ## Test Design Patterns
142
142
 
143
+ Test user-visible results, not implementation details. Query by accessibility (`getByRole`/`getByLabelText`/`getByText`), not `getByTestId` or `container.querySelector`. Cover empty, error, and loading/async states, not only the happy path; await async UI with `findBy*`.
144
+
143
145
  ```typescript
144
- // Correct: test user-visible results
146
+ // Test the user-visible result
145
147
  it('increments count when clicked', async () => {
146
148
  const user = userEvent.setup()
147
149
  render(<Counter />)
@@ -149,10 +151,10 @@ it('increments count when clicked', async () => {
149
151
  expect(screen.getByText('Count: 1')).toBeInTheDocument()
150
152
  })
151
153
 
152
- // Avoid: testing implementation details
153
- it('calls setState', () => {
154
- const setState = vi.spyOn(React, 'useState')
155
- render(<Counter />)
156
- // ...
154
+ // Error state: override the handler for one test
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('Something went wrong')).toBeInTheDocument()
157
159
  })
158
160
  ```
@@ -158,7 +158,7 @@ Subagents respond in JSON format. Key fields for orchestrator decisions:
158
158
  | code-verifier | status (consistent/mostly_consistent/needs_review/inconsistent), consistencyScore, discrepancies[], reverseCoverage (dataOperationsInCode, testBoundariesSectionPresent). Pre-implementation: verifies Design Doc claims against existing codebase. Post-implementation: verifies implementation consistency against Design Doc (pass `code_paths` scoped to changed files) | Flag discrepancies for document-reviewer |
159
159
  | task-executor | Input: `task_file` (required in orchestrated flows); optional Fix Mode signals `requiredFixes` or `incompleteImplementations` — when either is non-empty, skip `task_already_completed` and extend allowed list with each item's `file_path` / `location` (parse `location` as `file[:line]`); each `incompleteImplementations[]` entry may carry `type: "missing_logic" \| "hollow_test"` and the executor branches its fix action by `type`. Output: status (escalation_needed/completed), filesModified[], testsAdded, requiresTestReview, runnableCheck{level, executed, command, result, substance, substanceIssue, reason}, escalation_type ∈ {task_file_not_found, task_already_completed, target_files_missing, design_compliance_violation, similar_function_found, similar_component_found, investigation_target_not_found, out_of_scope_file, dependency_version_uncertain, binding_decision_violation, test_environment_not_ready}. | On escalation_needed: handle by escalation_type |
160
160
  | quality-fixer | Input: `task_file` (path to current task file — always pass this in orchestrated flows), `filesModified` (extract from the upstream implementation step's response — passes the task's write set as the primary scope for stub-detection; falls back to `git diff HEAD` when omitted), `runnableCheck` (extract from the upstream implementation step's response — passes the test execution evidence including `substance` and `substanceIssue` so the substance check has the runtime signal; omit when the upstream did not run tests). Status: approved/stub_detected/blocked. `stub_detected` → `incompleteImplementations[]` items carry `type: "missing_logic" \| "hollow_test"`; route back to the implementation step (which branches its fix action on `type`), then re-run quality-fixer. `blocked` → see quality-fixer blocked handling below | On stub_detected: re-invoke the implementation step. On blocked: see handling below |
161
- | document-reviewer | approvalReady (true/false) | Proceed to next step on true; request fixes on false |
161
+ | document-reviewer | verdict.decision (approved/approved_with_conditions/needs_revision/rejected) | Proceed on approved/approved_with_conditions; request fixes on needs_revision; escalate on rejected |
162
162
  | design-sync | sync_status (NO_CONFLICTS/CONFLICTS_FOUND) | On CONFLICTS_FOUND: present conflicts to user before proceeding |
163
163
  | integration-test-reviewer | status (approved/needs_revision/blocked), requiredFixes | On needs_revision: re-invoke the routed executor in Fix Mode with the same task_file and requiredFixes[] |
164
164
  | security-reviewer | status (approved/approved_with_notes/needs_revision/blocked), findings, notes, requiredFixes | On needs_revision: create a consolidated fix task file with the affected file paths from `requiredFixes[].location` populated into Target Files, then invoke the routed executor in Fix Mode with that task_file and the `requiredFixes[]` array, then quality-fixer, then re-invoke security-reviewer to verify resolution. On blocked: escalate to user with the blocking findings — fix is not within the agent layer's authority |
@@ -175,7 +175,7 @@ When quality-fixer returns `status: "blocked"`, discriminate by `reason`:
175
175
  When receiving new features or change requests, I first request requirement analysis from requirement-analyzer.
176
176
  According to scale determination:
177
177
 
178
- ### Large Scale (6+ Files) - 13 Steps (backend) / 15 Steps (frontend/fullstack)
178
+ ### Large Scale (6+ Files) - 14 Steps (backend) / 16 Steps (frontend/fullstack)
179
179
 
180
180
  1. requirement-analyzer → Requirement analysis + Check existing PRD **[Stop]**
181
181
  2. prd-creator → PRD creation
@@ -190,10 +190,11 @@ According to scale determination:
190
190
  11. document-reviewer → Design Doc review (pass code-verifier results as code_verification; cross-layer: per Design Doc)
191
191
  12. design-sync → Consistency verification **[Stop: Design Doc Approval]**
192
192
  13. acceptance-test-generator → Test skeleton generation, pass to work-planner (*1)
193
- 14. work-planner → Work plan creation **[Stop: Batch approval]**
194
- 15. task-decomposerAutonomous execution Completion report
193
+ 14. work-planner → Work plan creation
194
+ 15. document-reviewerWork plan review (doc_type: WorkPlan; pass the Design Doc path so AC/contract/state coverage is traceable). On `needs_revision`: re-invoke work-planner (update) and re-review until `approved`/`approved_with_conditions` — the plan is a derivation of the Design Doc, so plan-fidelity findings need no user adjudication. On `rejected`: escalate to user. **[Stop: Batch approval]**
195
+ 16. task-decomposer → Autonomous execution → Completion report
195
196
 
196
- ### Medium Scale (3-5 Files) - 9 Steps (backend) / 11 Steps (frontend/fullstack)
197
+ ### Medium Scale (3-5 Files) - 10 Steps (backend) / 12 Steps (frontend/fullstack)
197
198
 
198
199
  1. requirement-analyzer → Requirement analysis **[Stop]**
199
200
  2. **(frontend/fullstack only)** Ask user for prototype code → ui-spec-designer → UI Spec creation (UI Spec informs component structure for technical design)
@@ -204,8 +205,9 @@ According to scale determination:
204
205
  7. document-reviewer → Design Doc review (pass code-verifier results as code_verification; cross-layer: per Design Doc)
205
206
  8. design-sync → Consistency verification **[Stop: Design Doc Approval]**
206
207
  9. acceptance-test-generator → Test skeleton generation, pass to work-planner (*1)
207
- 10. work-planner → Work plan creation **[Stop: Batch approval]**
208
- 11. task-decomposerAutonomous execution Completion report
208
+ 10. work-planner → Work plan creation
209
+ 11. document-reviewerWork plan review (doc_type: WorkPlan; pass the Design Doc path so AC/contract/state coverage is traceable). On `needs_revision`: re-invoke work-planner (update) and re-review until `approved`/`approved_with_conditions` — the plan is a derivation of the Design Doc, so plan-fidelity findings need no user adjudication. On `rejected`: escalate to user. **[Stop: Batch approval]**
210
+ 12. task-decomposer → Autonomous execution → Completion report
209
211
 
210
212
  ### Small Scale (1-2 Files) - 2 Steps
211
213
 
@@ -192,21 +192,19 @@ skills:
192
192
  # Frontend-specific Skills
193
193
  frontend-typescript-rules:
194
194
  skill: "frontend-typescript-rules"
195
- tags: [frontend, react, implementation, type-safety, function-components, props-driven, async, refactoring, coding-style]
196
- typical-use: "React component creation, Props type definitions, frontend TypeScript development"
195
+ tags: [frontend, react, implementation, type-safety, component-design, props-driven, hooks, error-handling, conventions]
196
+ typical-use: "React component creation, Props/state design, error handling, frontend TypeScript implementation rules"
197
197
  size: small
198
198
  key-references:
199
- - "React Function Components - React Official"
200
- - "Props-driven Design - React Best Practices"
201
- - "YAGNI Principle - Kent Beck"
202
- - "Clean Code - Robert C. Martin"
203
- - "TypeScript satisfies Operator - Microsoft"
199
+ - "React Function Components - React docs"
200
+ - "Type guards at external boundaries (unknown narrowing)"
201
+ - "Result type and Error Boundary error handling"
204
202
  sections:
205
- - "Frontend-Specific Anti-patterns"
206
- - "Type Safety in Frontend Implementation"
207
- - "Coding Conventions"
203
+ - "Anti-patterns and Thresholds"
204
+ - "Type Safety at Boundaries"
205
+ - "Component and State Design"
208
206
  - "Error Handling"
209
- - "Performance Optimization"
207
+ - "Project Conventions"
210
208
 
211
209
  frontend-typescript-testing:
212
210
  skill: "frontend-typescript-testing"
@@ -4,6 +4,7 @@
4
4
  種別: feature|fix|refactor
5
5
  想定影響範囲: Xファイル
6
6
  関連Issue/PR: #XXX(該当する場合)
7
+ レビュースコープ: [Design Docとタスク対象から導出した変更予定ファイルの範囲。既存作業に対する改訂計画の場合はベースブランチ + diff範囲]
7
8
  <!-- 下記の行はmedium / large規模のみ — small規模はこのplan-templateではなくtask-templateを使用する。値の行は末尾コメントを付けず、下流のパーサがbare statusの抽出(pending | ready | escalated)を行えるように保つこと。 -->
8
9
  Implementation Readiness: pending
9
10
 
@@ -26,6 +27,10 @@ Implementation Readiness: pending
26
27
  - **成功基準**: [Design Docから抽出]
27
28
  - **失敗時の対応**: [Design Docから抽出]
28
29
 
30
+ ### 証明戦略
31
+ - **証明義務の出所**: [スケルトンが存在する場合はテストスケルトンの注釈(主要な故障モード、証明義務)。存在しない場合は各ACの主要な故障モード]
32
+ - **タスクごとの伝播**: 主張を実装する各タスクは Proof Obligations(task template参照)を記録し、下流のレビューがテストが主張を証明しているか(単に実行されるだけでないか)を判定できるようにする
33
+
29
34
  ## 品質保証メカニズム(Design Docより)
30
35
 
31
36
  変更対象領域で採用された品質ゲート。本計画の各タスクはこれらのメカニズムを満たす必要がある。
@@ -48,6 +53,21 @@ Design Docの各技術要件をカバーするタスクへのマッピング。
48
53
 
49
54
  **ギャップステータス値**: `covered`(タスクあり)、`gap`(タスクなし — 備考に理由必須、計画承認前にユーザー確認が必要)
50
55
 
56
+ ## 故障モードチェックリスト
57
+
58
+ この実装が防ぐべきドメイン非依存の故障カテゴリ。8カテゴリすべてを列挙し、各カテゴリの該当列に yes/no を記入し、該当する各カテゴリにカバーするタスクを挙げる。エントリにはプロジェクト固有の名称を含めない。
59
+
60
+ | カテゴリ | 該当? | カバーするタスク |
61
+ |---|---|---|
62
+ | same-value | yes/no | [Phase X タスクY] |
63
+ | no-op | yes/no | |
64
+ | empty input | yes/no | |
65
+ | invalid option | yes/no | |
66
+ | missing config | yes/no | |
67
+ | unavailable boundary | yes/no | |
68
+ | shared-state dependency | yes/no | |
69
+ | rollback-only visibility | yes/no | |
70
+
51
71
  ## UI Specコンポーネント → タスクマッピング
52
72
 
53
73
  入力にUI Specが含まれる場合のみ本セクションを記載する。UI Specに記述された各コンポーネントを実装するタスクへのマッピング。task-decomposerはこの表を読み込み、対応するUI Specセクションを各タスクのInvestigation Targetsに伝播させる。UI Specがない場合は本セクションを省略する。
@@ -56,9 +56,21 @@ Metadata:
56
56
  - **失敗時の対応**: [検証失敗時の対処 — 例: 「続行前にアプローチを再評価」「ユーザーにエスカレーション」]
57
57
  - **検証レベル**: [L1: エンドユーザー機能としての動作確認 / L2: 新規テスト追加・パス / L3: ビルドエラーなし]
58
58
 
59
+ ## Proof Obligations
60
+ (このタスクが実装するACまたは主張ごとに1エントリ。スケルトンの注釈がある場合はそこから、なければACの主要な故障モードから導出する。各テストは主張を証明すること。下記ブロックを主張ごとに繰り返し、見出しにAC IDまたは主張IDを記載して下流のレビューが主張ごとにカバレッジを解決できるようにする。)
61
+
62
+ ### Obligation: [AC IDまたは主張ID]
63
+ - **主張**: [ACが約束する振る舞い]
64
+ - **主要な故障モード**: [テストがレッドになるリグレッション]
65
+ - **検証する境界**: [テストが通過する公開/統合境界、または "in-process unit"]
66
+ - **状態アサーション**: [状態変更を伴う主張では 操作前 → 操作 → 操作後 の観察可能な状態。それ以外は "N/A"]
67
+ - **モック境界の根拠**: [どの境界をモックしてよいか、その理由。すべて実物なら "none"]
68
+ - **残余**: [この証明で未確立のまま残る事項があれば記載]
69
+
59
70
  ## Completion Criteria
60
71
  - [ ] 追加した全テストがパス
61
72
  - [ ] Operation Verification Methods に基づく動作確認完了
73
+ - [ ] 各 Proof Obligation が満たされている: テストが主要な故障モードでレッドになり、指定された境界を通過する
62
74
  - [ ] 成果物作成完了(調査・設計タスクの場合)
63
75
  - [ ] (Binding Decisionsがある場合)全てのCompliance Checkが最終実装に対して`Y`と評価され、根拠(file:line、テスト結果、またはコマンド出力)がInvestigation Notesに記録されている
64
76
 
@@ -17,10 +17,10 @@ TypeScriptベースのReactアプリケーション実装。アーキテクチ
17
17
  - デフォルト値設定と必須チェックの適切な実装
18
18
 
19
19
  ```typescript
20
- // ビルドツールの環境変数(公開値のみ)
20
+ // ビルドツールの環境変数(公開値のみ。クライアント公開変数は VITE_ 接頭辞が必要)
21
21
  const config = {
22
- apiUrl: import.meta.env.API_URL || 'http://localhost:3000',
23
- appName: import.meta.env.APP_NAME || 'My App'
22
+ apiUrl: import.meta.env.VITE_API_URL || 'http://localhost:3000',
23
+ appName: import.meta.env.VITE_APP_NAME || 'My App'
24
24
  }
25
25
 
26
26
  // フロントエンドでは動作しない