create-ai-project 1.20.9 → 1.22.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 +112 -50
- package/.claude/agents-en/task-decomposer.md +40 -4
- package/.claude/agents-en/ui-spec-designer.md +2 -0
- package/.claude/agents-en/work-planner.md +98 -29
- package/.claude/agents-ja/acceptance-test-generator.md +113 -49
- package/.claude/agents-ja/task-decomposer.md +44 -8
- package/.claude/agents-ja/ui-spec-designer.md +2 -0
- package/.claude/agents-ja/work-planner.md +96 -29
- package/.claude/commands-en/add-integration-tests.md +8 -0
- package/.claude/commands-en/build.md +75 -23
- package/.claude/commands-en/front-build.md +56 -25
- package/.claude/commands-en/front-plan.md +7 -6
- package/.claude/commands-en/front-review.md +81 -19
- package/.claude/commands-en/implement.md +36 -5
- package/.claude/commands-en/plan.md +9 -8
- package/.claude/commands-en/prepare-implementation.md +191 -0
- package/.claude/commands-en/project-inject.md +84 -56
- package/.claude/commands-en/review.md +79 -20
- package/.claude/commands-ja/add-integration-tests.md +8 -0
- package/.claude/commands-ja/build.md +77 -25
- package/.claude/commands-ja/front-build.md +59 -28
- package/.claude/commands-ja/front-plan.md +8 -7
- package/.claude/commands-ja/front-review.md +81 -19
- package/.claude/commands-ja/implement.md +36 -5
- package/.claude/commands-ja/plan.md +10 -9
- package/.claude/commands-ja/prepare-implementation.md +191 -0
- package/.claude/commands-ja/project-inject.md +84 -56
- package/.claude/commands-ja/review.md +79 -20
- package/.claude/skills-en/documentation-criteria/references/plan-template.md +22 -0
- package/.claude/skills-en/documentation-criteria/references/ui-spec-template.md +2 -0
- package/.claude/skills-en/frontend-typescript-testing/references/e2e.md +81 -7
- package/.claude/skills-en/integration-e2e-testing/SKILL.md +48 -23
- package/.claude/skills-en/integration-e2e-testing/references/e2e-design.md +31 -13
- package/.claude/skills-en/project-context/SKILL.md +2 -15
- package/.claude/skills-en/project-context/references/external-resources-api.md +76 -0
- package/.claude/skills-en/project-context/references/external-resources-backend.md +76 -0
- package/.claude/skills-en/project-context/references/external-resources-frontend.md +74 -0
- package/.claude/skills-en/project-context/references/external-resources-infra.md +76 -0
- package/.claude/skills-en/project-context/references/template.md +154 -0
- package/.claude/skills-en/subagents-orchestration-guide/SKILL.md +36 -14
- package/.claude/skills-en/task-analyzer/references/skills-index.yaml +0 -5
- package/.claude/skills-ja/documentation-criteria/references/plan-template.md +22 -0
- package/.claude/skills-ja/documentation-criteria/references/ui-spec-template.md +2 -0
- package/.claude/skills-ja/frontend-typescript-testing/references/e2e.md +81 -7
- package/.claude/skills-ja/integration-e2e-testing/SKILL.md +48 -23
- package/.claude/skills-ja/integration-e2e-testing/references/e2e-design.md +31 -13
- package/.claude/skills-ja/project-context/SKILL.md +2 -15
- package/.claude/skills-ja/project-context/references/external-resources-api.md +76 -0
- package/.claude/skills-ja/project-context/references/external-resources-backend.md +76 -0
- package/.claude/skills-ja/project-context/references/external-resources-frontend.md +74 -0
- package/.claude/skills-ja/project-context/references/external-resources-infra.md +76 -0
- package/.claude/skills-ja/project-context/references/template.md +154 -0
- package/.claude/skills-ja/subagents-orchestration-guide/SKILL.md +36 -14
- package/.claude/skills-ja/task-analyzer/references/skills-index.yaml +0 -5
- package/.husky/pre-commit +1 -0
- package/CHANGELOG.md +55 -6
- package/README.ja.md +3 -2
- package/README.md +3 -2
- package/docs/guides/en/use-cases.md +18 -3
- package/docs/guides/ja/use-cases.md +18 -3
- package/package.json +2 -1
- package/scripts/check-skills-index.mjs +173 -0
|
@@ -71,7 +71,7 @@ For each valid AC from Phase 1:
|
|
|
71
71
|
|
|
72
72
|
2. **Classify test level**:
|
|
73
73
|
- Integration test candidate (feature-level interaction)
|
|
74
|
-
- E2E test candidate (
|
|
74
|
+
- E2E test candidate — lane is assigned in Phase 3 (`fixture-e2e` for UI journeys verifiable with mocks; `service-integration-e2e` when real cross-service behavior must be asserted)
|
|
75
75
|
- Property-based test candidate (AC with Property annotation → placed in integration test file)
|
|
76
76
|
|
|
77
77
|
3. **Annotate metadata**:
|
|
@@ -97,12 +97,18 @@ For each valid AC from Phase 1:
|
|
|
97
97
|
3. **Push-Down Analysis**:
|
|
98
98
|
```
|
|
99
99
|
Can this be unit-tested? → Remove from integration/E2E pool
|
|
100
|
-
Already integration-tested
|
|
101
|
-
Already integration-tested AND NOT part of multi-step journey? → Remove from E2E pool
|
|
100
|
+
Already integration-tested AND verifiable in-process? → Remove from E2E pool
|
|
102
101
|
```
|
|
103
|
-
4. **
|
|
102
|
+
4. **Lane assignment** (E2E candidates only):
|
|
103
|
+
- Default to `fixture-e2e` for any UI journey verifiable with mocked backend / fixture-driven state
|
|
104
|
+
- Promote to `service-integration-e2e` only when the verification depends on real cross-service behavior. A candidate qualifies for `service-integration-e2e` when ANY of the following must be asserted:
|
|
105
|
+
- Data persists across a real DB write (e.g., row inserted/updated in the actual database under test)
|
|
106
|
+
- A downstream service receives a real event/message (e.g., topic publish, queue enqueue, webhook call)
|
|
107
|
+
- An external service receives a real API call with the expected payload
|
|
108
|
+
- Transactional consistency across services (e.g., two-phase commit, saga compensation)
|
|
109
|
+
5. **Sort by ROI** within each lane (descending) — this is the single ranking step; Phase 4 budget enforcement consumes this ranked list directly without re-sorting.
|
|
104
110
|
|
|
105
|
-
**Output**: Ranked, deduplicated candidate list
|
|
111
|
+
**Output**: Ranked, deduplicated candidate list with lane assigned per E2E candidate.
|
|
106
112
|
|
|
107
113
|
### Phase 4: Over-Generation Prevention
|
|
108
114
|
|
|
@@ -110,28 +116,36 @@ For each valid AC from Phase 1:
|
|
|
110
116
|
|
|
111
117
|
**Hard Limits per Feature**:
|
|
112
118
|
- **Integration Tests**: MAX 3 tests
|
|
113
|
-
- **
|
|
114
|
-
|
|
119
|
+
- **fixture-e2e**: MAX 3 tests. The reserved slot (highest-ROI journey candidate when the feature contains a **user-facing** multi-step user journey — see definition in integration-e2e-testing skill) is emitted regardless of ROI. Additional slots beyond the reserved slot require ROI ≥ 20 (floor below which slots are intentionally left unfilled)
|
|
120
|
+
- **service-integration-e2e**: MAX 1-2 tests total, composed of:
|
|
121
|
+
- 1 reserved slot (emitted regardless of ROI) when the journey's correctness depends on real cross-service behavior that fixture-e2e cannot verify
|
|
115
122
|
- Up to 1 additional slot requiring ROI > 50
|
|
116
123
|
|
|
117
124
|
**Selection Algorithm**:
|
|
118
125
|
|
|
119
126
|
```
|
|
120
|
-
1. Reserve
|
|
121
|
-
IF feature contains user-facing multi-step user journey
|
|
122
|
-
THEN reserve 1
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
1. Reserve fixture-e2e slot:
|
|
128
|
+
IF feature contains user-facing multi-step user journey
|
|
129
|
+
THEN reserve 1 fixture-e2e slot for the highest-ROI journey candidate
|
|
130
|
+
|
|
131
|
+
2. Reserve service-integration-e2e slot (only if needed):
|
|
132
|
+
IF the reserved journey's verification requires ANY of:
|
|
133
|
+
- data persists across a real DB write
|
|
134
|
+
- downstream service receives a real event/message
|
|
135
|
+
- external service receives a real API call with expected payload
|
|
136
|
+
- transactional consistency across services
|
|
137
|
+
THEN reserve 1 service-integration-e2e slot for that journey
|
|
138
|
+
|
|
139
|
+
3. Walk the candidate list (already sorted by ROI within each lane in Phase 3 step 5)
|
|
140
|
+
and select within budget:
|
|
130
141
|
- Integration: Pick top 3 highest-ROI
|
|
131
|
-
-
|
|
142
|
+
- fixture-e2e (additional beyond reserved): Pick up to remaining budget IF ROI ≥ 20
|
|
143
|
+
- service-integration-e2e (additional beyond reserved): Pick up to 1 more IF ROI > 50
|
|
144
|
+
|
|
145
|
+
4. Select all property-based tests (excluded from budget calculation; this step is order-independent — it can be performed at any point in this algorithm without affecting reserved-slot or ROI-based selection in steps 1-3)
|
|
132
146
|
```
|
|
133
147
|
|
|
134
|
-
**Output**: Final test set
|
|
148
|
+
**Output**: Final test set with each E2E candidate assigned to a lane.
|
|
135
149
|
|
|
136
150
|
## Output Format
|
|
137
151
|
|
|
@@ -147,7 +161,7 @@ The examples below use `//` comment syntax. Adapt to the project's language (e.g
|
|
|
147
161
|
|
|
148
162
|
```typescript
|
|
149
163
|
// [Feature Name] Integration Test - Design Doc: [filename]
|
|
150
|
-
// Generated: [date] | Budget Used: 2/3 integration, 0/2
|
|
164
|
+
// Generated: [date] | Budget Used: 2/3 integration, 0/3 fixture-e2e, 0/2 service-integration-e2e
|
|
151
165
|
|
|
152
166
|
import { describe, it } from '[detected test framework]'
|
|
153
167
|
|
|
@@ -170,24 +184,49 @@ describe('[Feature Name] Integration Test', () => {
|
|
|
170
184
|
})
|
|
171
185
|
```
|
|
172
186
|
|
|
173
|
-
### E2E Test
|
|
187
|
+
### E2E Test Files
|
|
188
|
+
|
|
189
|
+
Generate **separate files per lane**: `*.fixture-e2e.test.[ext]` for fixture-e2e, `*.service-e2e.test.[ext]` for service-integration-e2e. Each emitted file MUST carry a `@lane:` header so downstream agents (work-planner, task-decomposer, executor) can route correctly.
|
|
190
|
+
|
|
191
|
+
**fixture-e2e example** (UI journey with mocked backend, runs in CI without infrastructure):
|
|
174
192
|
|
|
175
193
|
```typescript
|
|
176
|
-
// [Feature Name]
|
|
177
|
-
// Generated: [date] | Budget Used: 1/
|
|
178
|
-
//
|
|
179
|
-
// Implementation Timing: After all feature implementations complete
|
|
194
|
+
// [Feature Name] fixture-e2e - Design Doc: [filename]
|
|
195
|
+
// Generated: [date] | Budget Used: 1/3 fixture-e2e
|
|
196
|
+
// @lane: fixture-e2e
|
|
180
197
|
|
|
181
198
|
import { describe, it } from '[detected test framework]'
|
|
182
199
|
|
|
183
|
-
describe('[Feature Name]
|
|
184
|
-
// User Journey:
|
|
185
|
-
// ROI:
|
|
186
|
-
// Verification:
|
|
200
|
+
describe('[Feature Name] fixture-e2e', () => {
|
|
201
|
+
// User Journey: Cart → checkout → confirmation with mocked payment backend
|
|
202
|
+
// ROI: 64 | reserved slot: multi-step journey
|
|
203
|
+
// Verification: UI transitions and observable state after each step (mocks return canned responses)
|
|
187
204
|
// @category: e2e
|
|
205
|
+
// @lane: fixture-e2e
|
|
206
|
+
// @dependency: full-ui (mocked backend)
|
|
207
|
+
// @complexity: medium
|
|
208
|
+
it.todo('User Journey: Cart-to-confirmation flow with mocked payment')
|
|
209
|
+
})
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**service-integration-e2e example** (against running local stack, final phase only):
|
|
213
|
+
|
|
214
|
+
```typescript
|
|
215
|
+
// [Feature Name] service-integration-e2e - Design Doc: [filename]
|
|
216
|
+
// Generated: [date] | Budget Used: 1/2 service-integration-e2e
|
|
217
|
+
// @lane: service-integration-e2e
|
|
218
|
+
|
|
219
|
+
import { describe, it } from '[detected test framework]'
|
|
220
|
+
|
|
221
|
+
describe('[Feature Name] service-integration-e2e', () => {
|
|
222
|
+
// User Journey: Complete purchase asserting real DB persistence and downstream event publish
|
|
223
|
+
// ROI: 119 | reserved slot: real cross-service behavior required
|
|
224
|
+
// Verification: Order row inserted in DB; OrderCreated event published; receipt email enqueued
|
|
225
|
+
// @category: e2e
|
|
226
|
+
// @lane: service-integration-e2e
|
|
188
227
|
// @dependency: full-system
|
|
189
228
|
// @complexity: high
|
|
190
|
-
it.todo('User Journey: Complete
|
|
229
|
+
it.todo('User Journey: Complete purchase persists order and publishes downstream event')
|
|
191
230
|
})
|
|
192
231
|
```
|
|
193
232
|
|
|
@@ -208,49 +247,71 @@ it.todo('[AC#]-property: [invariant in natural language]')
|
|
|
208
247
|
|
|
209
248
|
Upon completion, report in the following JSON format. Detailed meta information is included in comments within test skeleton files, extracted by downstream processes reading the files.
|
|
210
249
|
|
|
211
|
-
**When
|
|
250
|
+
**When all lanes emit:**
|
|
212
251
|
```json
|
|
213
252
|
{
|
|
214
253
|
"status": "completed",
|
|
215
254
|
"feature": "payment",
|
|
216
255
|
"generatedFiles": {
|
|
217
256
|
"integration": "tests/payment.int.test.[ext]",
|
|
218
|
-
"
|
|
257
|
+
"fixtureE2e": "tests/payment.fixture-e2e.test.[ext]",
|
|
258
|
+
"serviceE2e": "tests/payment.service-e2e.test.[ext]"
|
|
259
|
+
},
|
|
260
|
+
"budgetUsage": {
|
|
261
|
+
"integration": "2/3",
|
|
262
|
+
"fixtureE2e": "1/3",
|
|
263
|
+
"serviceE2e": "1/2"
|
|
219
264
|
},
|
|
220
|
-
"
|
|
221
|
-
"e2eAbsenceReason": null
|
|
265
|
+
"e2eAbsenceReason": { "fixtureE2e": null, "serviceE2e": null }
|
|
222
266
|
}
|
|
223
267
|
```
|
|
224
268
|
|
|
225
|
-
**When no
|
|
269
|
+
**When only fixture-e2e emits (no real cross-service dependency):**
|
|
226
270
|
```json
|
|
227
271
|
{
|
|
228
272
|
"status": "completed",
|
|
229
|
-
"feature": "
|
|
273
|
+
"feature": "checkout-ui",
|
|
230
274
|
"generatedFiles": {
|
|
231
|
-
"integration": "tests/
|
|
232
|
-
"
|
|
275
|
+
"integration": "tests/checkout.int.test.[ext]",
|
|
276
|
+
"fixtureE2e": "tests/checkout.fixture-e2e.test.[ext]",
|
|
277
|
+
"serviceE2e": null
|
|
278
|
+
},
|
|
279
|
+
"budgetUsage": {
|
|
280
|
+
"integration": "1/3",
|
|
281
|
+
"fixtureE2e": "1/3",
|
|
282
|
+
"serviceE2e": "0/2"
|
|
233
283
|
},
|
|
234
|
-
"
|
|
235
|
-
"e2eAbsenceReason": "no_multi_step_journey"
|
|
284
|
+
"e2eAbsenceReason": { "fixtureE2e": null, "serviceE2e": "no_real_service_dependency" }
|
|
236
285
|
}
|
|
237
286
|
```
|
|
238
287
|
|
|
239
|
-
**When no
|
|
288
|
+
**When no E2E lane qualifies:**
|
|
240
289
|
```json
|
|
241
290
|
{
|
|
242
291
|
"status": "completed",
|
|
243
292
|
"feature": "config-update",
|
|
244
293
|
"generatedFiles": {
|
|
245
|
-
"integration":
|
|
246
|
-
"
|
|
294
|
+
"integration": "tests/config.int.test.[ext]",
|
|
295
|
+
"fixtureE2e": null,
|
|
296
|
+
"serviceE2e": null
|
|
297
|
+
},
|
|
298
|
+
"budgetUsage": {
|
|
299
|
+
"integration": "1/3",
|
|
300
|
+
"fixtureE2e": "0/3",
|
|
301
|
+
"serviceE2e": "0/2"
|
|
247
302
|
},
|
|
248
|
-
"
|
|
249
|
-
"e2eAbsenceReason": "no_multi_step_journey"
|
|
303
|
+
"e2eAbsenceReason": { "fixtureE2e": "no_multi_step_journey", "serviceE2e": "no_multi_step_journey" }
|
|
250
304
|
}
|
|
251
305
|
```
|
|
252
306
|
|
|
253
|
-
**Contract**:
|
|
307
|
+
**Contract**: `generatedFiles.{integration,fixtureE2e,serviceE2e}` are always present as keys. Each value is a file path string when emitted, `null` when not emitted. `e2eAbsenceReason` is an object with `fixtureE2e` and `serviceE2e` keys; per-lane allowed values:
|
|
308
|
+
|
|
309
|
+
| Lane | Allowed values |
|
|
310
|
+
|------|---------------|
|
|
311
|
+
| `e2eAbsenceReason.fixtureE2e` | `null` (lane emitted) \| `no_multi_step_journey` \| `below_threshold_user_confirmed` |
|
|
312
|
+
| `e2eAbsenceReason.serviceE2e` | `null` (lane emitted) \| `no_multi_step_journey` \| `below_threshold_user_confirmed` \| `no_real_service_dependency` |
|
|
313
|
+
|
|
314
|
+
`no_real_service_dependency` is service-lane-only — it indicates that the journey is fully verifiable via fixture-e2e, so no service-integration-e2e was warranted. Fixture-lane never emits this reason.
|
|
254
315
|
|
|
255
316
|
## Constraints and Quality Standards
|
|
256
317
|
|
|
@@ -262,7 +323,7 @@ Upon completion, report in the following JSON format. Detailed meta information
|
|
|
262
323
|
- Stay within budget; report to user if budget insufficient for critical tests
|
|
263
324
|
|
|
264
325
|
**Quality Standards**:
|
|
265
|
-
- Select tests by ROI ranking within budget (integration: top 3 by ROI;
|
|
326
|
+
- Select tests by ROI ranking within budget (integration: top 3 by ROI; fixture-e2e: reserved journey slot + up to remaining budget by ROI ≥ 20; service-integration-e2e: reserved slot when real cross-service behavior is required + up to 1 more by ROI > 50)
|
|
266
327
|
- Apply behavior-first filtering STRICTLY
|
|
267
328
|
- Eliminate duplicate coverage (use Grep to check existing tests BEFORE generating)
|
|
268
329
|
- Clarify dependencies EXPLICITLY
|
|
@@ -273,12 +334,13 @@ Upon completion, report in the following JSON format. Detailed meta information
|
|
|
273
334
|
### Auto-processable
|
|
274
335
|
- **Directory Absent**: Auto-create appropriate directory following detected test structure
|
|
275
336
|
- **No High-ROI Integration Tests**: Valid outcome - report "All ACs below ROI threshold or covered by existing tests"
|
|
276
|
-
- **No E2E Tests (no multi-step journey)**: Valid outcome - report "No multi-step user journey detected;
|
|
337
|
+
- **No E2E Tests in either lane (no multi-step journey)**: Valid outcome - report "No multi-step user journey detected; fixture-e2e and service-integration-e2e not applicable"
|
|
338
|
+
- **fixture-e2e emitted but no service-integration-e2e (no real cross-service dependency)**: Valid outcome - report "Journey verifiable end-to-end against mocked backend; service-integration-e2e absence reason `no_real_service_dependency`"
|
|
277
339
|
- **Budget Exceeded by Critical Test**: Report to user
|
|
278
340
|
|
|
279
341
|
### Escalation Required
|
|
280
342
|
1. **Critical**: AC absent, Design Doc absent → Error termination
|
|
281
|
-
2. **High**: No E2E test emitted after budget enforcement, but feature contains user-facing multi-step user journey → Escalate with message: "Feature includes user-facing multi-step journey but
|
|
343
|
+
2. **High**: No E2E test emitted in any lane after budget enforcement, but feature contains user-facing multi-step user journey → Escalate per lane with message: "Feature includes user-facing multi-step journey but neither fixture-e2e nor service-integration-e2e was emitted. Journey candidates evaluated per lane: [list with ROI scores per lane]. Confirm whether to proceed without E2E coverage." (Note: this escalation fires only when the reserved slots in Phase 4 did not apply — e.g., no journey candidate passed Phase 1-3 filtering. When a reserved slot candidate exists in either lane, it is emitted and this escalation does not fire for that lane.)
|
|
282
344
|
3. **High**: All ACs filtered out but feature is business-critical → User confirmation needed
|
|
283
345
|
4. **Medium**: Budget insufficient for critical user journey (ROI > 90) → Present options
|
|
284
346
|
5. **Low**: Multiple interpretations possible but minor impact → Adopt interpretation + note in report
|
|
@@ -308,5 +370,5 @@ Upon completion, report in the following JSON format. Detailed meta information
|
|
|
308
370
|
- **Post-execution**:
|
|
309
371
|
- Completeness of selected tests
|
|
310
372
|
- Dependency validity verified
|
|
311
|
-
- Integration
|
|
373
|
+
- Integration, fixture-e2e, and service-integration-e2e tests generated in separate files (each E2E file carries `@lane:` header)
|
|
312
374
|
- Generation report completeness
|
|
@@ -77,10 +77,18 @@ Decompose tasks based on implementation strategy patterns determined in implemen
|
|
|
77
77
|
- Document design intent and important notes
|
|
78
78
|
|
|
79
79
|
4. **Task File Generation**
|
|
80
|
-
|
|
81
|
-
- Layer-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
|
|
81
|
+
Naming follows the layer routing convention in subagents-orchestration-guide "Layer-Aware Agent Routing". The bare `{plan-name}-task-*.md` form routes exclusively to `task-executor` (backend) and must NOT be used for frontend tasks.
|
|
82
|
+
|
|
83
|
+
| Plan classification | Task filename | Routes to |
|
|
84
|
+
|---------------------|---------------|-----------|
|
|
85
|
+
| Single-layer **backend** | `{plan-name}-task-{number}.md` (preferred) OR `{plan-name}-backend-task-{number}.md` | `task-executor` + `quality-fixer` |
|
|
86
|
+
| Single-layer **frontend** | `{plan-name}-frontend-task-{number}.md` (REQUIRED — bare `*-task-*` form is reserved for backend) | `task-executor-frontend` + `quality-fixer-frontend` |
|
|
87
|
+
| Multi-layer (spans backend + frontend) | `{plan-name}-backend-task-{number}.md` AND `{plan-name}-frontend-task-{number}.md` (one file per layer per task slice) | per filename layer segment |
|
|
88
|
+
|
|
89
|
+
Layer is determined from the task's Target files paths (refer to project structure defined in technical-spec skill).
|
|
90
|
+
|
|
91
|
+
Examples: `20250122-refactor-types-task-01.md` (backend single-layer), `20250122-dashboard-frontend-task-01.md` (frontend single-layer), `20250122-auth-backend-task-01.md` + `20250122-auth-frontend-task-02.md` (multi-layer).
|
|
84
92
|
- **Phase Completion Task Auto-generation (Required)**:
|
|
85
93
|
- Based on "Phase X" notation in work plan, generate after each phase's final task
|
|
86
94
|
- Filename: `{plan-name}-phase{number}-completion.md`
|
|
@@ -105,8 +113,11 @@ Decompose tasks based on implementation strategy patterns determined in implemen
|
|
|
105
113
|
|---|---|
|
|
106
114
|
| Existing code modification | The existing implementation files being modified, their tests, related Design Doc sections |
|
|
107
115
|
| New component/feature | Adjacent implementations in the same layer/domain, Design Doc interface contracts |
|
|
116
|
+
| Frontend component implementation | UI Spec component section (use the section heading the work plan's UI Spec Component → Task Mapping cites), Design Doc interface contracts, adjacent components in the same layer |
|
|
117
|
+
| Frontend integration / fixture-e2e test | UI Spec component section including the State x Display Matrix and Interaction Definition tables, the implemented component code, fixture data files |
|
|
108
118
|
| Test implementation | Test skeleton comments/annotations, the target code being tested, actual API/auth flows |
|
|
109
119
|
| E2E environment setup | Current environment config (startup scripts, docker-compose or equivalent), seed scripts, existing fixture patterns, application auth flow |
|
|
120
|
+
| Cross-package boundary implementation | Both sides of the boundary as listed in the work plan's Connection Map (owner modules and expected signal), the contract definition between them |
|
|
110
121
|
| Bug fix / refactor | The affected code paths, related test coverage, error reproduction context |
|
|
111
122
|
| Behavior replacement / rewrite | The existing implementation being replaced, its observable outputs, Design Doc Verification Strategy section |
|
|
112
123
|
|
|
@@ -116,6 +127,8 @@ Decompose tasks based on implementation strategy patterns determined in implemen
|
|
|
116
127
|
- Be specific with file paths: `src/orders/checkout`, `docs/design/payment.md` — not "the order module" or "related code"
|
|
117
128
|
- When the target is a section within a file, write the file path and add a search hint: `docs/design/payment.md (§ Payment Flow)` or `src/orders/checkout (processOrder function)`
|
|
118
129
|
- When test skeletons exist for the task, always include them as Investigation Targets
|
|
130
|
+
- When the work plan contains a UI Spec Component → Task Mapping table, propagate the matching component section to every task in that row (see UI Spec Propagation below)
|
|
131
|
+
- When the work plan contains a Connection Map, propagate the boundary rows touching this task's target files (see Connection Map Propagation below)
|
|
119
132
|
|
|
120
133
|
7. **Implementation Pattern Consistency**
|
|
121
134
|
When including implementation samples, MUST ensure strict compliance with the Design Doc implementation approach that forms the basis of the work plan
|
|
@@ -136,6 +149,29 @@ When the work plan includes a Verification Strategy, derive each task's Operatio
|
|
|
136
149
|
- **Verification level**: Select L1/L2/L3 per implementation-approach skill
|
|
137
150
|
3. **Investigation Targets**: Include resources needed for verification (e.g., existing implementation for comparison, schema definitions, seed data paths)
|
|
138
151
|
|
|
152
|
+
## UI Spec Propagation
|
|
153
|
+
|
|
154
|
+
When the work plan contains a UI Spec Component → Task Mapping table, propagate component references to each implementation task as follows:
|
|
155
|
+
|
|
156
|
+
1. **Lookup by task ID**: For each row in the mapping table, locate the task(s) listed in the "Covered By Task(s)" column
|
|
157
|
+
2. **Append a single line to Investigation Targets**: Add one line per matched component in the task's Investigation Targets section. The line format is `[ui-spec path] (§ [component heading]<state hint>)`, where `<state hint>` is appended only when the row lists specific states.
|
|
158
|
+
|
|
159
|
+
- When no states are listed: `docs/ui-spec/foo-ui-spec.md (§ Component: AlertCard)`
|
|
160
|
+
- When states are listed: `docs/ui-spec/foo-ui-spec.md (§ Component: AlertCard — verify default + loading + error states)`
|
|
161
|
+
|
|
162
|
+
This is the entire entry — do not also add a separate parenthetical line. The state hint is part of the same line.
|
|
163
|
+
3. **One row → one or more tasks**: A component can be split across multiple tasks; propagate the same line to each
|
|
164
|
+
4. **Skip when not provided**: If the work plan has no UI Spec Component → Task Mapping table, skip this propagation step
|
|
165
|
+
|
|
166
|
+
## Connection Map Propagation
|
|
167
|
+
|
|
168
|
+
When the work plan contains a Connection Map table, propagate boundary context to each implementation task as follows:
|
|
169
|
+
|
|
170
|
+
1. **Lookup by task ID**: For each row in the Connection Map, locate the task(s) listed in the "Covered By Task(s)" column
|
|
171
|
+
2. **Append to Investigation Targets**: Add the boundary's owner module file paths on both sides to each matched task's Investigation Targets
|
|
172
|
+
3. **Add a "Boundary Context" note in the task body**: Record the boundary identifier and expected signal verbatim from the Connection Map row, so the executor knows what observable evidence the implementation must produce
|
|
173
|
+
4. **Skip when not provided**: If the work plan has no Connection Map, skip this propagation step
|
|
174
|
+
|
|
139
175
|
## Quality Assurance Mechanism Propagation
|
|
140
176
|
|
|
141
177
|
When the work plan header includes a Quality Assurance Mechanisms table, propagate mechanisms to each task as follows:
|
|
@@ -103,6 +103,8 @@ Execute file output immediately (considered approved at execution).
|
|
|
103
103
|
- [ ] If prototype provided: prototype is placed in `docs/ui-spec/assets/`
|
|
104
104
|
- [ ] All TBDs in Open Items have owner and deadline
|
|
105
105
|
- [ ] All UI Spec requirements align with PRD requirements
|
|
106
|
+
- [ ] **Component heading uniqueness**: Every component is documented under a section heading whose text is unique within this UI Spec. Use the format `## Component: [ComponentName]` (or `### Component: [ComponentName]` when nested under a screen). Downstream agents (work-planner Step 5a, task-decomposer UI Spec Propagation) reference components by exact heading text — duplicate or paraphrased headings break the propagation chain.
|
|
107
|
+
- **Disambiguation rule**: When two components share a base name (e.g., the same `AlertCard` rendered as a banner variant and as an inline variant), append a parenthetical qualifier to make each heading unique: `Component: AlertCard (Banner variant)` and `Component: AlertCard (Inline variant)`. Verify uniqueness with a final pass: extract all `Component: ` headings, confirm zero duplicates
|
|
106
108
|
|
|
107
109
|
## Important Design Principles
|
|
108
110
|
|
|
@@ -44,22 +44,38 @@ Choose Strategy A (TDD) if test skeletons are provided, Strategy B (implementati
|
|
|
44
44
|
- Final phase is always Quality Assurance
|
|
45
45
|
|
|
46
46
|
**E2E Gap Check (all strategies)**:
|
|
47
|
-
After determining which test skeletons are available, check
|
|
47
|
+
After determining which test skeletons are available, check the two E2E lanes (fixture-e2e, service-integration-e2e — see integration-e2e-testing skill) independently. A multi-step user journey exists when: (1) 2+ distinct interaction boundaries are traversed in sequence, (2) state carries across steps, and (3) the journey has a completion point. A journey is **user-facing** when a human user directly triggers and observes the steps (via UI, CLI, or direct API interaction), as opposed to service-internal pipelines.
|
|
48
48
|
|
|
49
49
|
```
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
fixture-e2e gap:
|
|
51
|
+
IF no fixture-e2e skeleton was provided
|
|
52
|
+
AND e2eAbsenceReason.fixtureE2e was not communicated
|
|
53
|
+
AND Design Doc or UI Spec contains user-facing multi-step user journey
|
|
54
|
+
THEN add to work plan header:
|
|
55
|
+
⚠ fixture-e2e Gap: This feature contains user-facing multi-step journey(s)
|
|
56
|
+
but no fixture-e2e skeleton was provided. Route this feature back through
|
|
57
|
+
acceptance-test generation to evaluate fixture-e2e candidates before the
|
|
58
|
+
UI implementation phase.
|
|
59
|
+
Detected journeys: [list journey descriptions and AC references]
|
|
60
|
+
|
|
61
|
+
service-integration-e2e gap:
|
|
62
|
+
IF no service-integration-e2e skeleton was provided
|
|
63
|
+
AND e2eAbsenceReason.serviceE2e was not communicated
|
|
64
|
+
AND Design Doc indicates the journey requires real cross-service
|
|
65
|
+
verification (data persistence across services, transactional
|
|
66
|
+
consistency, external service contract)
|
|
67
|
+
THEN add to work plan header:
|
|
68
|
+
⚠ service-integration-e2e Gap: This feature crosses service boundaries
|
|
69
|
+
where correctness depends on real cross-service behavior, but no
|
|
70
|
+
service-integration-e2e skeleton was provided.
|
|
71
|
+
Detected boundaries: [list crossings and AC references]
|
|
58
72
|
```
|
|
59
73
|
|
|
60
|
-
|
|
74
|
+
"Was not communicated" means the upstream planning flow skipped test skeleton generation entirely — in that case the absence reason field is not passed to work-planner, so the gap check still runs. Per acceptance-test-generator's contract, when a skeleton was generated `e2eAbsenceReason.<lane>` is null; when generation ran but produced no skeleton, the reason is one of the strings enumerated in that contract — both cases mean the field WAS communicated, so no gap warning fires.
|
|
61
75
|
|
|
62
|
-
|
|
76
|
+
When an `e2eAbsenceReason` for a lane carries a string value (e.g., `no_multi_step_journey`, `below_threshold_user_confirmed`, `no_real_service_dependency` — see acceptance-test-generator for the per-lane allowed values), absence in that lane is intentional — skip the gap check for that lane.
|
|
77
|
+
|
|
78
|
+
This check applies regardless of whether Strategy A or B was selected. Integration-only skeletons being provided does not imply E2E coverage. Service-internal journeys (async pipelines, service-to-service sagas) are not flagged for the reserved-slot rule but may still warrant service-integration-e2e through the normal ROI path.
|
|
63
79
|
|
|
64
80
|
**Phase structure**: Select based on implementation approach from Design Doc. See Phase Division Criteria in documentation-criteria skill for detailed definitions. Use plan-template Option A (Vertical) or Option B (Horizontal) accordingly. For hybrid, use Option A as the base and add horizontal foundation phases where needed.
|
|
65
81
|
|
|
@@ -79,6 +95,39 @@ Map each extracted item to a covering task. Items may be covered by a dedicated
|
|
|
79
95
|
|
|
80
96
|
If an item has no covering task, set Gap Status to `gap` with justification in Notes. **When the Traceability table contains any `gap` entry, the plan is in draft status.** Output the plan as draft, but do not finalize it until the user has confirmed each justified gap. Unjustified gaps (no Notes) are errors — add a covering task or provide justification before proceeding.
|
|
81
97
|
|
|
98
|
+
### 5a. Map UI Spec Components to Tasks (when UI Spec provided)
|
|
99
|
+
|
|
100
|
+
When a UI Spec is among the inputs, also map components and states to the tasks that implement them. task-decomposer reads this mapping in a downstream step to populate each task's Investigation Targets, so without this step the UI Spec never reaches the executor.
|
|
101
|
+
|
|
102
|
+
For each component documented in the UI Spec:
|
|
103
|
+
1. Identify the component's section heading exactly as it appears in the UI Spec (the heading is the reference key — see ui-spec-designer's heading uniqueness rule)
|
|
104
|
+
2. Identify which states (default / loading / empty / error / partial) the implementation must cover
|
|
105
|
+
3. Identify the task(s) in this plan that implement the component or its tests
|
|
106
|
+
|
|
107
|
+
Record the mapping in the **UI Spec Component → Task Mapping** table (see plan template). One row per component. Components with no covering task are flagged as `gap` requiring user confirmation, identical to the Design-to-Plan Traceability rule.
|
|
108
|
+
|
|
109
|
+
### 5b. Map Cross-Package Boundaries to Tasks (when implementation crosses runtime/deployment boundaries)
|
|
110
|
+
|
|
111
|
+
When the implementation crosses a runtime or deployment boundary, build a Connection Map so task-decomposer can propagate boundary context to each affected task.
|
|
112
|
+
|
|
113
|
+
**A boundary qualifies for the Connection Map only when ALL of the following hold**:
|
|
114
|
+
- The two sides run in separate processes, services, or runtimes (e.g., web client ↔ HTTP server, service A ↔ service B over a network, frontend bundle ↔ backend handler)
|
|
115
|
+
- A serialized contract crosses between them (HTTP request/response, message envelope, RPC call, event payload)
|
|
116
|
+
- A failure on one side produces an observable signal on the other (status code, missing field, timeout, dropped message)
|
|
117
|
+
|
|
118
|
+
**Excluded — these are NOT boundaries for the Connection Map**:
|
|
119
|
+
- A package importing a sibling utility, type definition, or shared constant from the same monorepo (in-process, no serialized contract)
|
|
120
|
+
- Internal layering within the same runtime (e.g., handler → usecase → repository)
|
|
121
|
+
- Source code dependencies that compile/bundle into the same artifact
|
|
122
|
+
|
|
123
|
+
For each qualifying boundary:
|
|
124
|
+
1. Identify the boundary (e.g., `web → API gateway`, `service-A → service-B`, `frontend → shared client → backend handler`)
|
|
125
|
+
2. Identify the owner module/package on each side
|
|
126
|
+
3. Identify the expected signal that confirms the boundary works (e.g., HTTP 200 with schema X, message published to topic Y, row inserted in table Z)
|
|
127
|
+
4. Identify the task(s) that implement either side of the boundary
|
|
128
|
+
|
|
129
|
+
Record the mapping in the **Connection Map** table (see plan template). Omit this section entirely when no qualifying boundary exists.
|
|
130
|
+
|
|
82
131
|
### 6. Define Tasks with Completion Criteria
|
|
83
132
|
For each task, derive completion criteria from Design Doc acceptance criteria. Apply the 3-element completion definition (Implementation Complete, Quality Complete, Integration Complete).
|
|
84
133
|
|
|
@@ -87,6 +136,8 @@ For each task, derive completion criteria from Design Doc acceptance criteria. A
|
|
|
87
136
|
- **`scale: medium` / `scale: large`**: Write a work plan following the **plan-template** from documentation-criteria skill. Include Phase Structure Diagram and Task Dependency Diagram (mermaid).
|
|
88
137
|
- **`scale: small`**: Write a single task file following the **task-template** from documentation-criteria skill (see "Output Mode by Scale" below). Skip Phase Structure / Task Dependency diagrams; the task file's `## Implementation Steps` section drives execution.
|
|
89
138
|
|
|
139
|
+
For `scale: medium` / `scale: large`, the plan header MUST include the line `Implementation Readiness: pending`. The marker contract: it takes one of three values — `pending` (initial, set here by work-planner), `ready` (verification completed with no remaining gaps), or `escalated` (verification completed with remaining gaps). The producer that promotes the marker beyond `pending` and the consumer that reads it before execution are external orchestration concerns owned outside this agent.
|
|
140
|
+
|
|
90
141
|
## Input Parameters
|
|
91
142
|
|
|
92
143
|
- **mode**: `create` (default) | `update`
|
|
@@ -144,10 +195,11 @@ Include completion conditions in task names (e.g., "Service implementation and u
|
|
|
144
195
|
#### Phase 0: Test Preparation (Unit Tests Only)
|
|
145
196
|
Create Red state tests based on unit test definitions provided from previous process.
|
|
146
197
|
|
|
147
|
-
**Test Implementation Timing**:
|
|
198
|
+
**Test Implementation Timing and Placement**:
|
|
148
199
|
- Unit tests: Phase 0 Red → Green during implementation
|
|
149
|
-
- Integration tests: Create and execute at completion of implementation (
|
|
150
|
-
-
|
|
200
|
+
- Integration tests: Create and execute at completion of relevant feature implementation (include in phase tasks like "[Feature name] implementation with integration test creation")
|
|
201
|
+
- fixture-e2e tests: Create and execute alongside the UI feature phase (include in phase tasks like "[Feature name] UI implementation with fixture-e2e creation"). These run in CI without infrastructure setup.
|
|
202
|
+
- service-integration-e2e tests: Execute only in the final phase (these depend on local stack and tend to be too slow/heavy for per-task cycles)
|
|
151
203
|
|
|
152
204
|
#### Meta Information Utilization
|
|
153
205
|
Analyze meta information (@category, @dependency, @complexity, etc.) included in test definitions,
|
|
@@ -193,22 +245,29 @@ Read test skeleton files (integration tests, E2E tests) with the Read tool and e
|
|
|
193
245
|
|
|
194
246
|
#### Step 3: Extract Environment Prerequisites from E2E Skeletons
|
|
195
247
|
|
|
196
|
-
When E2E test skeletons are provided, scan for environment prerequisites in two stages
|
|
248
|
+
When E2E test skeletons are provided, scan for environment prerequisites in two stages. Apply the lane-aware rules below — fixture-e2e and service-integration-e2e have very different prerequisite shapes.
|
|
197
249
|
|
|
198
|
-
**Stage 1: Detect precondition patterns** — scan
|
|
199
|
-
- `Preconditions:` or `Arrange:` comment annotations mentioning seed data, test users,
|
|
200
|
-
- `@dependency: full-
|
|
250
|
+
**Stage 1: Detect precondition patterns** — scan each E2E skeleton (read its `@lane` header to know which lane applies) and list every detected precondition:
|
|
251
|
+
- `Preconditions:` or `Arrange:` comment annotations mentioning seed data, test users, fixtures, or specific UI/DB state
|
|
252
|
+
- `@dependency: full-ui (mocked backend)` combined with fixture loaders or API mock handlers (MSW route handlers — fixture-e2e)
|
|
253
|
+
- `@dependency: full-system` combined with auth/login setup code (service-integration-e2e)
|
|
201
254
|
- References to environment variables (`E2E_*`, `TEST_*`)
|
|
202
|
-
- External service references requiring HTTP mock/intercept patterns
|
|
255
|
+
- External service references requiring HTTP mock/intercept patterns
|
|
256
|
+
|
|
257
|
+
**Stage 2: Generate setup tasks** — for each detected precondition, create a corresponding Phase 0 task. Common categories by lane:
|
|
258
|
+
|
|
259
|
+
For **fixture-e2e**:
|
|
260
|
+
- **Fixture data** → "Create fixture data files for [feature] UI states"
|
|
261
|
+
- **Mock backend** → "Configure MSW handlers for fixture-e2e (browser-runtime mocks for the project's API surface)"
|
|
262
|
+
- **Browser harness** → "Set up the Playwright harness for fixture-e2e (no live services required)"
|
|
203
263
|
|
|
204
|
-
|
|
205
|
-
- **Seed data** → "Create
|
|
206
|
-
- **Auth fixture** → "Implement
|
|
207
|
-
- **External service
|
|
208
|
-
- **Environment configuration** → "Define
|
|
209
|
-
- **Other detected preconditions** → Create a setup task matching the detected category
|
|
264
|
+
For **service-integration-e2e**:
|
|
265
|
+
- **Seed data** → "Create seed data script for service-integration-e2e (test users, required records)"
|
|
266
|
+
- **Auth fixture** → "Implement auth fixture using application's login flow"
|
|
267
|
+
- **External service stubs** → "Configure external service stubs for service-integration-e2e"
|
|
268
|
+
- **Environment configuration** → "Define service-integration-e2e environment variables and document local startup"
|
|
210
269
|
|
|
211
|
-
Place all environment setup tasks in Phase 0 (before any implementation tasks). Mark with `@category: e2e-setup` for traceability.
|
|
270
|
+
Place all environment setup tasks in Phase 0 (before any implementation tasks). Mark with `@category: e2e-setup` and `@lane:` matching the target lane for traceability.
|
|
212
271
|
|
|
213
272
|
#### Step 4: Structure Analysis and Classification of it.todo
|
|
214
273
|
|
|
@@ -216,7 +275,8 @@ Place all environment setup tasks in Phase 0 (before any implementation tasks).
|
|
|
216
275
|
- Setup items (Mock preparation, measurement tools, Helpers, etc.) → Prioritize in Phase 1
|
|
217
276
|
- Unit tests (individual functions) → Start from Phase 0 with Red-Green-Refactor
|
|
218
277
|
- Integration tests → Place as create/execute tasks when relevant feature implementation is complete
|
|
219
|
-
-
|
|
278
|
+
- fixture-e2e tests → Place as create/execute tasks alongside the relevant UI feature implementation
|
|
279
|
+
- service-integration-e2e tests → Place as execute-only tasks in final phase
|
|
220
280
|
- Non-functional requirement tests (performance, UX, etc.) → Place in quality assurance phase
|
|
221
281
|
- Risk levels ("high risk", "required", etc.) → Move to earlier phases
|
|
222
282
|
|
|
@@ -238,7 +298,8 @@ Place all environment setup tasks in Phase 0 (before any implementation tasks).
|
|
|
238
298
|
### Test Placement Principles
|
|
239
299
|
**Phase Placement Rules**:
|
|
240
300
|
- Integration tests: Include in relevant phase tasks like "[Feature name] implementation with integration test creation"
|
|
241
|
-
-
|
|
301
|
+
- fixture-e2e tests: Include alongside the UI feature phase (creation + execution in CI-friendly browser harness)
|
|
302
|
+
- service-integration-e2e tests: Place "service-integration-e2e execution" in final phase (implementation not needed, execution only against the local stack)
|
|
242
303
|
|
|
243
304
|
### Implementation Approach Application
|
|
244
305
|
Decompose tasks based on implementation approach and technical dependencies decided in Design Doc, following verification levels (L1/L2/L3) from implementation-approach skill.
|
|
@@ -270,6 +331,13 @@ When creating work plans, **Phase Structure Diagrams** and **Task Dependency Dia
|
|
|
270
331
|
- [ ] Design-to-Plan Traceability table complete (all DD technical requirements categorized and mapped)
|
|
271
332
|
- [ ] No `gap` entries without justification
|
|
272
333
|
- [ ] All justified `gap` entries flagged for user confirmation before plan approval
|
|
334
|
+
- [ ] UI Spec Component → Task Mapping table complete (when UI Spec provided)
|
|
335
|
+
- [ ] Every UI Spec component has a covering task, OR an explicit `gap` justification
|
|
336
|
+
- [ ] Component reference uses the UI Spec section heading exactly as it appears in the document
|
|
337
|
+
- [ ] Connection Map table complete (when implementation crosses packages/services)
|
|
338
|
+
- [ ] Every boundary lists owner modules and expected signal
|
|
339
|
+
- [ ] Every boundary maps to at least one covering task on each side
|
|
340
|
+
- [ ] Plan header includes `Implementation Readiness: pending` (medium / large only)
|
|
273
341
|
- [ ] Verification Strategy extracted from Design Doc and included in plan header
|
|
274
342
|
- [ ] Adopted Quality Assurance Mechanisms extracted from Design Doc and included in plan header
|
|
275
343
|
- [ ] Phase structure matches implementation approach (vertical → value unit phases, horizontal → layer phases)
|
|
@@ -278,7 +346,8 @@ When creating work plans, **Phase Structure Diagrams** and **Task Dependency Dia
|
|
|
278
346
|
- [ ] Quality assurance exists in final phase
|
|
279
347
|
- [ ] Test skeleton file paths listed in corresponding phases (when provided)
|
|
280
348
|
- [ ] E2E environment prerequisites addressed (when E2E skeletons provided)
|
|
281
|
-
- [ ]
|
|
349
|
+
- [ ] fixture-e2e prerequisites: fixture data, mocked backend, browser harness tasks generated when applicable
|
|
350
|
+
- [ ] service-integration-e2e prerequisites: seed data, auth fixture, external service stub tasks generated when applicable
|
|
282
351
|
- [ ] Environment setup tasks placed in Phase 0
|
|
283
352
|
- [ ] Test design information reflected (only when provided)
|
|
284
353
|
- [ ] Setup tasks placed in first phase
|