create-ai-project 1.23.5 → 1.24.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 +2 -2
- package/.claude/agents-en/code-reviewer.md +9 -1
- package/.claude/agents-en/codebase-analyzer.md +1 -1
- package/.claude/agents-en/document-reviewer.md +2 -1
- package/.claude/agents-en/task-decomposer.md +22 -8
- package/.claude/agents-en/task-executor-frontend.md +16 -2
- package/.claude/agents-en/task-executor.md +16 -2
- package/.claude/agents-en/technical-designer-frontend.md +7 -12
- package/.claude/agents-en/technical-designer.md +4 -11
- package/.claude/agents-en/ui-spec-designer.md +3 -3
- package/.claude/agents-en/work-planner.md +27 -22
- package/.claude/agents-ja/acceptance-test-generator.md +4 -4
- package/.claude/agents-ja/code-reviewer.md +9 -1
- package/.claude/agents-ja/code-verifier.md +2 -2
- package/.claude/agents-ja/codebase-analyzer.md +1 -1
- package/.claude/agents-ja/document-reviewer.md +6 -5
- package/.claude/agents-ja/prd-creator.md +3 -3
- package/.claude/agents-ja/quality-fixer-frontend.md +1 -1
- package/.claude/agents-ja/quality-fixer.md +1 -1
- package/.claude/agents-ja/rule-advisor.md +1 -1
- package/.claude/agents-ja/security-reviewer.md +1 -1
- package/.claude/agents-ja/solver.md +2 -2
- package/.claude/agents-ja/task-decomposer.md +23 -9
- package/.claude/agents-ja/task-executor-frontend.md +16 -2
- package/.claude/agents-ja/task-executor.md +16 -2
- package/.claude/agents-ja/technical-designer-frontend.md +8 -13
- package/.claude/agents-ja/technical-designer.md +5 -12
- package/.claude/agents-ja/ui-analyzer.md +1 -1
- package/.claude/agents-ja/ui-spec-designer.md +7 -7
- package/.claude/agents-ja/work-planner.md +51 -51
- package/.claude/commands-ja/build.md +1 -1
- package/.claude/commands-ja/design.md +1 -1
- package/.claude/commands-ja/diagnose.md +1 -1
- package/.claude/commands-ja/front-build.md +1 -1
- package/.claude/commands-ja/front-design.md +3 -3
- package/.claude/commands-ja/front-plan.md +2 -2
- package/.claude/commands-ja/implement.md +1 -1
- package/.claude/commands-ja/plan.md +2 -2
- package/.claude/commands-ja/prepare-implementation.md +4 -4
- package/.claude/commands-ja/reverse-engineer.md +1 -1
- package/.claude/commands-ja/review.md +1 -1
- package/.claude/commands-ja/task.md +2 -2
- package/.claude/commands-ja/update-doc.md +1 -1
- package/.claude/skills-en/documentation-criteria/references/design-template.md +5 -1
- package/.claude/skills-en/documentation-criteria/references/plan-template.md +16 -6
- package/.claude/skills-en/documentation-criteria/references/task-template.md +10 -0
- package/.claude/skills-en/documentation-criteria/references/ui-spec-template.md +1 -1
- package/.claude/skills-en/frontend-typescript-testing/references/e2e.md +1 -1
- package/.claude/skills-ja/coding-standards/SKILL.md +4 -4
- package/.claude/skills-ja/coding-standards/references/security-checks.md +1 -1
- package/.claude/skills-ja/documentation-criteria/SKILL.md +1 -1
- package/.claude/skills-ja/documentation-criteria/references/design-template.md +10 -6
- package/.claude/skills-ja/documentation-criteria/references/plan-template.md +17 -7
- package/.claude/skills-ja/documentation-criteria/references/task-template.md +11 -1
- package/.claude/skills-ja/documentation-criteria/references/ui-spec-template.md +3 -3
- package/.claude/skills-ja/frontend-technical-spec/SKILL.md +1 -1
- package/.claude/skills-ja/frontend-typescript-rules/SKILL.md +4 -4
- package/.claude/skills-ja/frontend-typescript-testing/SKILL.md +1 -1
- package/.claude/skills-ja/frontend-typescript-testing/references/e2e.md +2 -2
- package/.claude/skills-ja/implementation-approach/SKILL.md +1 -1
- package/.claude/skills-ja/integration-e2e-testing/SKILL.md +1 -1
- package/.claude/skills-ja/integration-e2e-testing/references/e2e-environment-prerequisites.md +1 -1
- package/.claude/skills-ja/project-context/references/template.md +2 -2
- package/CHANGELOG.md +11 -0
- package/package.json +1 -1
|
@@ -189,13 +189,13 @@ describe('[Feature Name] Integration Test', () => {
|
|
|
189
189
|
})
|
|
190
190
|
```
|
|
191
191
|
|
|
192
|
-
**Proof annotations** (apply to every skeleton, alongside the metadata above): each `it.todo` carries two comment lines that hand the proof contract to the test implementer and
|
|
192
|
+
**Proof annotations** (apply to every skeleton, alongside the metadata above): each `it.todo` carries two comment lines that hand the proof contract to the test implementer and the downstream review (these map to the task template's Proof Obligations fields):
|
|
193
193
|
- `Primary failure mode`: the specific regression that turns this test red — the behavior the AC promises and would break
|
|
194
194
|
- `Proof obligation`: what the implemented test must assert to prove the claim — the boundary to traverse, the observable state before/after for state-changing ACs, and which boundaries may be mocked and why. For behavior-changing ACs, name the boundary path (branch, state, input class, lifecycle step, or fallback) the test must traverse when the main path alone would stay green through the regression. Phrase it as design intent describing what to assert; the implementer writes the executable assertions and mock setup
|
|
195
195
|
|
|
196
196
|
### E2E Test Files
|
|
197
197
|
|
|
198
|
-
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
|
|
198
|
+
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 steps can route correctly.
|
|
199
199
|
|
|
200
200
|
**fixture-e2e example** (UI journey with mocked backend, runs in CI without infrastructure):
|
|
201
201
|
|
|
@@ -50,9 +50,10 @@ Read the Design Doc **in full** and extract:
|
|
|
50
50
|
- Architecture design and data flow
|
|
51
51
|
- Interface contracts (function signatures, API endpoints, data structures)
|
|
52
52
|
- Identifier specifications (resource names, endpoint paths, configuration keys, error codes, schema/model names)
|
|
53
|
+
- Binding observable contracts: column/label sets and order, derived-display rules, and state-lifecycle negatives; plus Field Propagation Map rows that carry a Serialized Format + Consumer Parse Rule
|
|
53
54
|
- Error handling policy
|
|
54
55
|
- Non-functional requirements
|
|
55
|
-
- **Fact Disposition Table rows** (when the section exists): record each row as `{fact_id, disposition, rationale, evidence, relatedFiles}` — the Related Files column carries the paths the designer must verify; read each listed file during Step 4-1. These rows become verification targets in Step
|
|
56
|
+
- **Fact Disposition Table rows** (when the section exists): record each row as `{fact_id, disposition, rationale, evidence, relatedFiles}` — the Related Files column carries the paths the designer must verify; read each listed file during Step 4-1. These rows become verification targets in Step 4-1.
|
|
56
57
|
|
|
57
58
|
Then load the task context that drives adjacent-case review (Step 2-1):
|
|
58
59
|
|
|
@@ -93,6 +94,13 @@ Assign confidence based on evidence count:
|
|
|
93
94
|
- **medium**: 2 sources agree
|
|
94
95
|
- **low**: 1 source only (implementation exists but no test or type confirmation)
|
|
95
96
|
|
|
97
|
+
#### 2-4. Reference Contract and Boundary Verification
|
|
98
|
+
|
|
99
|
+
Runs independently of the AC loop, so observable contracts that are not tied to an AC are also verified.
|
|
100
|
+
|
|
101
|
+
1. For each binding observable value extracted in Step 1 (column/label set and order, derived-display rule, state-lifecycle negative), verify the implementation reproduces it exactly. A deviation is a `dd_violation` whose rationale names it a reference contract gap (the required observable value vs the implemented one).
|
|
102
|
+
2. For each Field Propagation Map serialized boundary extracted in Step 1 (Serialized Format + Consumer Parse Rule), verify the producer emits the recorded representation and the consumer parses it by the recorded rule. A mismatch between the two sides is a `dd_violation` whose rationale names it a boundary contract gap (what the producer emits vs what the consumer parses).
|
|
103
|
+
|
|
96
104
|
### 3. Assess Code Quality
|
|
97
105
|
|
|
98
106
|
Read each implementation file and evaluate against coding-standards skill:
|
|
@@ -89,7 +89,7 @@ For each element discovered in Steps 2-3:
|
|
|
89
89
|
|
|
90
90
|
**Cardinality target**: 5-15 entries for typical changes. When candidate count exceeds 15, keep all category 1 and 2 entries; merge category 3 entries into the `factsToAddress` text of the related category 1/2 entry.
|
|
91
91
|
|
|
92
|
-
**Generate `fact_id`** with this format: `<repo-relative-primary-file-path>:<primary-symbol-or-focus-area-label>` using the main file anchoring the fact set and the exact symbol name when one exists; otherwise use a short normalized focus-area label. **For cross-layer features**: when a shared type, schema, or API contract is referenced from multiple layers, anchor `fact_id` to the canonical source file (the definition site closest to the shared module — e.g., `packages/shared/schemas/user.ts:User`), so that per-layer
|
|
92
|
+
**Generate `fact_id`** with this format: `<repo-relative-primary-file-path>:<primary-symbol-or-focus-area-label>` using the main file anchoring the fact set and the exact symbol name when one exists; otherwise use a short normalized focus-area label. **For cross-layer features**: when a shared type, schema, or API contract is referenced from multiple layers, anchor `fact_id` to the canonical source file (the definition site closest to the shared module — e.g., `packages/shared/schemas/user.ts:User`), so that per-layer runs produce identical `fact_id` values for the same concept and cross-layer disposition conflicts remain detectable.
|
|
93
93
|
|
|
94
94
|
**Populate `evidence`** with a single reference string in one of these forms (pick the most specific that applies): `existingElements[name='<name>']` / `constraints[location='<file>:<line>']` / `<file>:<line>`. Record exactly one form per focus area.
|
|
95
95
|
|
|
@@ -54,7 +54,7 @@ You are an AI assistant specialized in technical document review.
|
|
|
54
54
|
- Specialized verification based on doc_type
|
|
55
55
|
- For DesignDoc: Verify "Applicable Standards" section exists with explicit/implicit classification
|
|
56
56
|
- Missing or incomplete → `critical` issue; implicit standards without confirmation → `important` issue
|
|
57
|
-
- For WorkPlan: confirm the plan carries the artifacts the semantic gate is judged against — Design-to-Plan Traceability, Failure Mode Checklist, Review Scope, Verification Strategy summary, and Proof Strategy. Read the referenced Design Doc(s) so AC / contract / state-transition coverage can be checked against the plan
|
|
57
|
+
- For WorkPlan: confirm the plan carries the artifacts the semantic gate is judged against — Design-to-Plan Traceability, Reference Contract Values (when the Design Doc specifies binding observable values), Failure Mode Checklist, Review Scope, Verification Strategy summary, and Proof Strategy. Read the referenced Design Doc(s) so AC / contract / state-transition coverage and the content fidelity of binding observable values can be checked against the plan
|
|
58
58
|
- If `code_verification` provided: extract discrepancy list and reverse coverage gaps; feed into Gate 1 as pre-verified evidence
|
|
59
59
|
- If `codebase_analysis` provided: extract `focusAreas` and their `evidence` values for Gate 0 / Gate 1 Fact Disposition checks
|
|
60
60
|
|
|
@@ -131,6 +131,7 @@ For WorkPlan, additionally verify:
|
|
|
131
131
|
- (3) Each cross-boundary, public-boundary, or persisted-state change names a task that verifies it through the real boundary — missing → `important` issue (category: `completeness`)
|
|
132
132
|
- (4) Each traceability table present (Design-to-Plan, UI Spec Component, Connection Map, ADR Bindings) is filled to a granularity that resolves its target task — under-specified rows → `important` issue (category: `completeness`)
|
|
133
133
|
- (5) The Failure Mode Checklist covers the plan's applicable domain-independent categories (same-value, no-op, empty input, invalid option, missing config, unavailable boundary, shared-state dependency, rollback-only visibility) — missing applicable category → `recommended` issue (category: `completeness`)
|
|
134
|
+
- (6) Binding observable values are carried with content fidelity, not only coverage: for each Design Doc observable contract that encodes a binding value (a column/label set and order, a derived-display rule, or a state-lifecycle negative), the plan's Reference Contract Values table carries the value verbatim from the Design Doc and maps it to a covering task. Re-derive each such value from the Design Doc and compare against the plan; a value reduced to a label, summarized, or absent while the Design Doc specifies it is a content-fidelity gap → `critical` issue (category: `completeness`)
|
|
134
135
|
- Verdict mapping (WorkPlan): any semantic-gate `critical` issue forces the verdict to at least `needs_revision` — except a coverage gap traceable to a missing or contradictory Design Doc/input element (which re-planning cannot fix) → `rejected`; an `important`-only set caps the verdict at `approved_with_conditions`
|
|
135
136
|
|
|
136
137
|
**Perspective-specific Mode**:
|
|
@@ -79,13 +79,13 @@ Decompose tasks based on implementation strategy patterns determined in implemen
|
|
|
79
79
|
|
|
80
80
|
4. **Task File Generation**
|
|
81
81
|
|
|
82
|
-
Naming follows the layer routing convention in subagents-orchestration-guide "Layer-Aware Agent Routing". The bare `{plan-name}-task-*.md` form
|
|
82
|
+
Naming follows the layer routing convention in subagents-orchestration-guide "Layer-Aware Agent Routing". The bare `{plan-name}-task-*.md` form is reserved for backend and must NOT be used for frontend tasks.
|
|
83
83
|
|
|
84
|
-
| Plan classification | Task filename |
|
|
85
|
-
|
|
86
|
-
| Single-layer **backend** | `{plan-name}-task-{number}.md` (preferred) OR `{plan-name}-backend-task-{number}.md` |
|
|
87
|
-
| Single-layer **frontend** | `{plan-name}-frontend-task-{number}.md` (REQUIRED — bare `*-task-*` form is reserved for backend) |
|
|
88
|
-
| 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) |
|
|
84
|
+
| Plan classification | Task filename |
|
|
85
|
+
|---------------------|---------------|
|
|
86
|
+
| Single-layer **backend** | `{plan-name}-task-{number}.md` (preferred) OR `{plan-name}-backend-task-{number}.md` |
|
|
87
|
+
| Single-layer **frontend** | `{plan-name}-frontend-task-{number}.md` (REQUIRED — bare `*-task-*` form is reserved for backend) |
|
|
88
|
+
| 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) |
|
|
89
89
|
|
|
90
90
|
Layer is determined from the task's Target files paths (refer to project structure defined in technical-spec skill).
|
|
91
91
|
|
|
@@ -120,7 +120,7 @@ Decompose tasks based on implementation strategy patterns determined in implemen
|
|
|
120
120
|
| 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 |
|
|
121
121
|
| Test implementation | Test skeleton comments/annotations, the target code being tested, actual API/auth flows |
|
|
122
122
|
| E2E environment setup | Current environment config (startup scripts, docker-compose or equivalent), seed scripts, existing fixture patterns, application auth flow |
|
|
123
|
-
| Cross-package boundary implementation |
|
|
123
|
+
| Cross-package boundary implementation | The Connection Map owner file path(s) on both sides of the boundary, plus the contract definition file between them (the expected signal and any serialized format/parse rule are recorded in the task's Boundary Context note, not as Investigation Targets) |
|
|
124
124
|
| Bug fix / refactor | The affected code paths, related test coverage, error reproduction context |
|
|
125
125
|
| Behavior replacement / rewrite | The existing implementation being replaced, its observable outputs, Design Doc Verification Strategy section |
|
|
126
126
|
| Task constrained by an ADR (work plan's ADR Bindings table covers this task) | The ADR file with section hint matching the row's `Source Section` value (e.g., `(§ Decision)` or `(§ Implementation Guidance)`) for each binding row covering this task |
|
|
@@ -183,7 +183,7 @@ When the work plan contains a Connection Map table, propagate boundary context t
|
|
|
183
183
|
|
|
184
184
|
1. **Lookup by task ID**: For each row in the Connection Map, locate the task(s) listed in the "Covered By Task(s)" column
|
|
185
185
|
2. **Append to Investigation Targets**: Add the boundary's owner module file paths on both sides to each matched task's Investigation Targets
|
|
186
|
-
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
|
|
186
|
+
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. When the row carries a **Serialized Format** and **Consumer Parse Rule** (a serialized boundary), copy both verbatim into the note and state the roundtrip check the task must satisfy: the value the producer emits parses to the value the consumer expects.
|
|
187
187
|
4. **Skip when not provided**: If the work plan has no Connection Map, skip this propagation step
|
|
188
188
|
|
|
189
189
|
## ADR Binding Propagation
|
|
@@ -206,6 +206,19 @@ When the work plan contains an ADR Bindings table, propagate each binding decisi
|
|
|
206
206
|
When the decision cannot be verified by file:line or command alone, the predicate may rely on reasoned judgment, but it must remain Y/N-answerable
|
|
207
207
|
4. **Apply only when provided**: Run this propagation only when the work plan contains an ADR Bindings table
|
|
208
208
|
|
|
209
|
+
## Reference Contract Propagation
|
|
210
|
+
|
|
211
|
+
When the work plan contains a **Reference Contract Values** table, propagate each binding observable value to the task(s) it covers, so the executor is checked against the exact value rather than a back-pointer it must re-derive:
|
|
212
|
+
|
|
213
|
+
1. **Lookup by task ID**: For each row, locate the task(s) listed in "Covered By Task(s)"
|
|
214
|
+
2. **Append to Investigation Targets**: Add the row's `Design Doc (§ Section)` to each matched task (deduplicate against Design Traceability Propagation entries)
|
|
215
|
+
3. **Add a Reference Contracts table row to the task**: For each matched row, add one row to the task's Reference Contracts table:
|
|
216
|
+
- **Source**: the `Design Doc (§ Section)` value
|
|
217
|
+
- **Contract Type**: copy the `Contract Type` value verbatim (structure-order / derived-display / state-lifecycle-negative)
|
|
218
|
+
- **Required Observable Value**: copy the value **verbatim** from the work plan row, preserving its exact wording and detail
|
|
219
|
+
- **Compliance Check**: write a Y/N-answerable positive predicate stating the final implementation reproduces the value (e.g., "the listed fields render in the specified order"; "the label shows the looked-up name in place of the raw code"; "the persisted state is applied only when the restore signal is present")
|
|
220
|
+
4. **Apply only when provided**: Run this propagation only when the work plan contains a Reference Contract Values table. Serialized boundaries are propagated by Connection Map Propagation above, not here.
|
|
221
|
+
|
|
209
222
|
## Design Traceability Propagation
|
|
210
223
|
|
|
211
224
|
When the work plan contains a Design-to-Plan Traceability table, propagate the matching DD section to each task:
|
|
@@ -376,6 +389,7 @@ Please execute decomposed tasks according to the order.
|
|
|
376
389
|
- [ ] Investigation Targets specified for every task (specific file paths, not vague categories)
|
|
377
390
|
- [ ] Proof Obligations recorded for each claim-implementing task (primary failure mode + boundary to exercise)
|
|
378
391
|
- [ ] Change Category set for bug-fix / regression / state-change / boundary-change tasks, with adjacent path/boundary owners added to Investigation Targets
|
|
392
|
+
- [ ] Reference Contract Values rows propagated to matching tasks as Reference Contracts, value copied verbatim (when work plan has the table)
|
|
379
393
|
- [ ] Quality Assurance Mechanisms from work plan header propagated to relevant tasks
|
|
380
394
|
|
|
381
395
|
## Task Design Principles
|
|
@@ -192,7 +192,7 @@ Runs after Pre-implementation Verification, before the Binding Decision Check. T
|
|
|
192
192
|
3. Disposition each residual by scope:
|
|
193
193
|
- **Within Target Files scope** → fold the residual into this task's failing tests and implementation.
|
|
194
194
|
- **A confirmed out-of-scope sibling that needs the same fix** → raise the `out_of_scope_file` escalation (the standard path for a file outside Target Files), letting the user expand Target Files or split off a follow-up task. This routes a confirmed adjacent defect to an explicit decision.
|
|
195
|
-
- **A related residual not confirmed to need the same fix** → record it in the task file's Investigation Notes so
|
|
195
|
+
- **A related residual not confirmed to need the same fix** → record it in the task file's Investigation Notes so the downstream review's adjacent-case check verifies it against the implementation.
|
|
196
196
|
|
|
197
197
|
#### Binding Decision Check (Required when the task file has a Binding Decisions section)
|
|
198
198
|
|
|
@@ -206,6 +206,18 @@ This check runs after Pre-implementation Verification and before the TDD cycle.
|
|
|
206
206
|
- `N`: stop implementation and produce the final response with `status: "escalation_needed"` and `escalation_type: "binding_decision_violation"` with `phase: "pre_implementation"` (see the Escalation Response table). `N` represents a planned violation
|
|
207
207
|
- `Unknown`: mark the row as deferred in Investigation Notes and proceed to the TDD cycle. The Exit Gate re-evaluates every row (including Unknown rows deferred from this step) against the final implementation and escalates if any remains `N` or `Unknown` at that point
|
|
208
208
|
|
|
209
|
+
#### Reference Contract Check (Required when the task file has a Reference Contracts section)
|
|
210
|
+
|
|
211
|
+
Runs after Pre-implementation Verification, alongside the Binding Decision Check.
|
|
212
|
+
|
|
213
|
+
1. Confirm each Source in the Reference Contracts table has been read (Sources are listed in Investigation Targets and were read at Step 2)
|
|
214
|
+
2. Record the planned approach in Investigation Notes — one sentence per row stating how the implementation reproduces the Required Observable Value
|
|
215
|
+
3. Evaluate each row's Compliance Check against the planned approach. Record the result for each row as `Y`, `N`, or `Unknown` in Investigation Notes, with a one-line rationale. Use `Unknown` only when the planned approach has no decision yet on the predicate's subject
|
|
216
|
+
4. Per row, branch on the evaluation:
|
|
217
|
+
- `Y`: proceed
|
|
218
|
+
- `N`: stop implementation and produce the final response with `status: "escalation_needed"` and `escalation_type: "design_compliance_violation"`, populated per the Escalation Response table — `details.design_doc_expectation` = the Reference Contract row's Required Observable Value, `details.actual_situation` = the planned approach, and `details.why_cannot_implement` / `details.attempted_approaches[]` / `claude_recommendation` per the table. `N` represents a planned violation
|
|
219
|
+
- `Unknown`: mark the row as deferred in Investigation Notes and proceed to the TDD cycle. The Exit Gate re-evaluates every deferred row against the final implementation and escalates if any remains `N` or `Unknown` at that point
|
|
220
|
+
|
|
209
221
|
#### Reference Representativeness (Applied During Implementation)
|
|
210
222
|
|
|
211
223
|
A per-adoption check applied each time a pattern, hook, or library is referenced. Apply coding-standards "Reference Representativeness" at the point of adoption:
|
|
@@ -347,7 +359,9 @@ This gate runs immediately before producing the final JSON response.
|
|
|
347
359
|
☐ Fix Mode: every `requiredFixes` / `incompleteImplementations` item is addressed in `changeSummary` or escalated
|
|
348
360
|
☐ Implementation is consistent with the Investigation Notes recorded at Step 2 (when Investigation Targets were present)
|
|
349
361
|
☐ Every Binding Decisions Compliance Check evaluates to `Y` against the final implementation, with evidence recorded in Investigation Notes (when the task file has a Binding Decisions section). Re-evaluate here even when the pre-implementation check passed, because the implementation may have diverged from the planned approach
|
|
362
|
+
☐ Every Reference Contracts Compliance Check evaluates to `Y` against the final implementation, with evidence recorded in Investigation Notes (when the task file has a Reference Contracts section). Re-evaluate here even when the pre-implementation check passed
|
|
363
|
+
☐ A test exercises the roundtrip — the value the producer emits parses to the value the consumer expects (when the task has a Boundary Context with a roundtrip check from the work plan's Connection Map)
|
|
350
364
|
☐ When test evidence is cited (the task ran tests), `runnableCheck.substance` and `runnableCheck.substanceIssue` are populated per the field spec
|
|
351
365
|
☐ Final response is a single JSON with `status: "completed"` or `status: "escalation_needed"` and matches the schema in Structured Response Specification
|
|
352
366
|
|
|
353
|
-
**ENFORCEMENT**: When any gate item is unchecked, produce the final response in the JSON format defined in Structured Response Specification with `status: "escalation_needed"`. When the unchecked item is the Binding Decisions Compliance Check, use `escalation_type: "binding_decision_violation"` with `phase: "exit_gate"`.
|
|
367
|
+
**ENFORCEMENT**: When any gate item is unchecked, produce the final response in the JSON format defined in Structured Response Specification with `status: "escalation_needed"`. When the unchecked item is the Binding Decisions Compliance Check, use `escalation_type: "binding_decision_violation"` with `phase: "exit_gate"`. For other unchecked gate items use `escalation_type: "design_compliance_violation"`, populated per the Escalation Response table at the same granularity as the pre-implementation mapping: for a Reference Contracts failure, `details.design_doc_expectation` = the Required Observable Value and `details.actual_situation` = the final implementation's behavior; for a missing roundtrip test, `details.design_doc_expectation` = the required roundtrip (the producer's emitted value parses to the consumer's expected value) and `details.actual_situation` = the absent or failing roundtrip coverage; in both, set `details.why_cannot_implement` / `details.attempted_approaches[]` / `claude_recommendation` per the table.
|
|
@@ -192,7 +192,7 @@ Runs after Pre-implementation Verification, before the Binding Decision Check. T
|
|
|
192
192
|
3. Disposition each residual by scope:
|
|
193
193
|
- **Within Target Files scope** → fold the residual into this task's failing tests and implementation.
|
|
194
194
|
- **A confirmed out-of-scope sibling that needs the same fix** → raise the `out_of_scope_file` escalation (the standard path for a file outside Target Files), letting the user expand Target Files or split off a follow-up task. This routes a confirmed adjacent defect to an explicit decision.
|
|
195
|
-
- **A related residual not confirmed to need the same fix** → record it in the task file's Investigation Notes so
|
|
195
|
+
- **A related residual not confirmed to need the same fix** → record it in the task file's Investigation Notes so the downstream review's adjacent-case check verifies it against the implementation.
|
|
196
196
|
|
|
197
197
|
#### Binding Decision Check (Required when the task file has a Binding Decisions section)
|
|
198
198
|
|
|
@@ -206,6 +206,18 @@ This check runs after Pre-implementation Verification and before the TDD cycle.
|
|
|
206
206
|
- `N`: stop implementation and produce the final response with `status: "escalation_needed"` and `escalation_type: "binding_decision_violation"` with `phase: "pre_implementation"` (see the Escalation Response table). `N` represents a planned violation
|
|
207
207
|
- `Unknown`: mark the row as deferred in Investigation Notes and proceed to the TDD cycle. The Exit Gate re-evaluates every row (including Unknown rows deferred from this step) against the final implementation and escalates if any remains `N` or `Unknown` at that point
|
|
208
208
|
|
|
209
|
+
#### Reference Contract Check (Required when the task file has a Reference Contracts section)
|
|
210
|
+
|
|
211
|
+
Runs after Pre-implementation Verification, alongside the Binding Decision Check.
|
|
212
|
+
|
|
213
|
+
1. Confirm each Source in the Reference Contracts table has been read (Sources are listed in Investigation Targets and were read at Step 2)
|
|
214
|
+
2. Record the planned approach in Investigation Notes — one sentence per row stating how the implementation reproduces the Required Observable Value
|
|
215
|
+
3. Evaluate each row's Compliance Check against the planned approach. Record the result for each row as `Y`, `N`, or `Unknown` in Investigation Notes, with a one-line rationale. Use `Unknown` only when the planned approach has no decision yet on the predicate's subject
|
|
216
|
+
4. Per row, branch on the evaluation:
|
|
217
|
+
- `Y`: proceed
|
|
218
|
+
- `N`: stop implementation and produce the final response with `status: "escalation_needed"` and `escalation_type: "design_compliance_violation"`, populated per the Escalation Response table — `details.design_doc_expectation` = the Reference Contract row's Required Observable Value, `details.actual_situation` = the planned approach, and `details.why_cannot_implement` / `details.attempted_approaches[]` / `claude_recommendation` per the table. `N` represents a planned violation
|
|
219
|
+
- `Unknown`: mark the row as deferred in Investigation Notes and proceed to the TDD cycle. The Exit Gate re-evaluates every deferred row against the final implementation and escalates if any remains `N` or `Unknown` at that point
|
|
220
|
+
|
|
209
221
|
#### Reference Representativeness (Applied During Implementation)
|
|
210
222
|
|
|
211
223
|
A per-adoption check applied each time a pattern or dependency is referenced. Apply coding-standards "Reference Representativeness" at the point of adoption:
|
|
@@ -350,7 +362,9 @@ This gate runs immediately before producing the final JSON response.
|
|
|
350
362
|
☐ Fix Mode: every `requiredFixes` / `incompleteImplementations` item is addressed in `changeSummary` or escalated
|
|
351
363
|
☐ Implementation is consistent with the Investigation Notes recorded at Step 2 (when Investigation Targets were present)
|
|
352
364
|
☐ Every Binding Decisions Compliance Check evaluates to `Y` against the final implementation, with evidence recorded in Investigation Notes (when the task file has a Binding Decisions section). Re-evaluate here even when the pre-implementation check passed, because the implementation may have diverged from the planned approach
|
|
365
|
+
☐ Every Reference Contracts Compliance Check evaluates to `Y` against the final implementation, with evidence recorded in Investigation Notes (when the task file has a Reference Contracts section). Re-evaluate here even when the pre-implementation check passed
|
|
366
|
+
☐ A test exercises the roundtrip — the value the producer emits parses to the value the consumer expects (when the task has a Boundary Context with a roundtrip check from the work plan's Connection Map)
|
|
353
367
|
☐ When test evidence is cited (the task ran tests), `runnableCheck.substance` and `runnableCheck.substanceIssue` are populated per the field spec
|
|
354
368
|
☐ Final response is a single JSON with `status: "completed"` or `status: "escalation_needed"` and matches the schema in Structured Response Specification
|
|
355
369
|
|
|
356
|
-
**ENFORCEMENT**: When any gate item is unchecked, produce the final response in the JSON format defined in Structured Response Specification with `status: "escalation_needed"`. When the unchecked item is the Binding Decisions Compliance Check, use `escalation_type: "binding_decision_violation"` with `phase: "exit_gate"`.
|
|
370
|
+
**ENFORCEMENT**: When any gate item is unchecked, produce the final response in the JSON format defined in Structured Response Specification with `status: "escalation_needed"`. When the unchecked item is the Binding Decisions Compliance Check, use `escalation_type: "binding_decision_violation"` with `phase: "exit_gate"`. For other unchecked gate items use `escalation_type: "design_compliance_violation"`, populated per the Escalation Response table at the same granularity as the pre-implementation mapping: for a Reference Contracts failure, `details.design_doc_expectation` = the Required Observable Value and `details.actual_situation` = the final implementation's behavior; for a missing roundtrip test, `details.design_doc_expectation` = the required roundtrip (the producer's emitted value parses to the consumer's expected value) and `details.actual_situation` = the absent or failing roundtrip coverage; in both, set `details.why_cannot_implement` / `details.attempted_approaches[]` / `claude_recommendation` per the table.
|
|
@@ -33,7 +33,6 @@ Follow documentation-criteria skill for ADR/Design Doc creation thresholds. If a
|
|
|
33
33
|
The subsections below are not parallel mandates; they form four serial gates: **Gate 0** Inputs & Standards → **Gate 1** Existing-State Analysis → **Gate 2** Design Decisions → **Gate 3** Impact Documentation. Complete each gate fully before starting the next. Each subsection below carries a `[Gate N — ...]` annotation (with its own applicability condition) in its heading and appears in Gate order; execute them in document order.
|
|
34
34
|
|
|
35
35
|
### Agreement Checklist [Gate 0 — Required]
|
|
36
|
-
Must be performed at the beginning of Design Doc creation:
|
|
37
36
|
|
|
38
37
|
1. **List agreements with user in bullet points**
|
|
39
38
|
- Scope (which components/features to change)
|
|
@@ -47,7 +46,6 @@ Must be performed at the beginning of Design Doc creation:
|
|
|
47
46
|
- [ ] If any agreements are not reflected, state the reason
|
|
48
47
|
|
|
49
48
|
### Standards Identification [Gate 0 — Required]
|
|
50
|
-
Must be performed before existing-state investigation:
|
|
51
49
|
|
|
52
50
|
1. **Identify Project Standards**
|
|
53
51
|
- Scan project configuration, rule files, UI Spec / UI analysis inputs, and existing frontend code patterns
|
|
@@ -69,7 +67,6 @@ Must be performed before existing-state investigation:
|
|
|
69
67
|
- Deviations require documented rationale
|
|
70
68
|
|
|
71
69
|
### Existing Code Investigation [Gate 1 — Required]
|
|
72
|
-
Must be performed before Design Doc creation:
|
|
73
70
|
|
|
74
71
|
1. **Implementation File Path Verification**
|
|
75
72
|
- First grasp overall structure with `Glob: src/**/*.tsx`
|
|
@@ -163,7 +160,6 @@ Execute the 5 steps below for each in-scope element. Record the result in the De
|
|
|
163
160
|
- For each rejected alternative, record 1-2 lines: what it was, why rejected. Keep this in the Design Doc so future iterations or agents avoid re-proposing.
|
|
164
161
|
|
|
165
162
|
### Implementation Approach Decision [Gate 2 — Required]
|
|
166
|
-
Must be performed when creating Design Doc.
|
|
167
163
|
|
|
168
164
|
1. **Approach selection** (run Phase 1-4 of implementation-approach skill, record selection rationale):
|
|
169
165
|
|
|
@@ -186,7 +182,6 @@ Must be performed when creating Design Doc.
|
|
|
186
182
|
Define an **early verification point**: the first thing to verify and how, before scaling.
|
|
187
183
|
|
|
188
184
|
### Common ADR Process [Gate 2 — Required]
|
|
189
|
-
Perform before Design Doc creation:
|
|
190
185
|
1. Identify common technical areas (component patterns, state management, error handling, accessibility, etc.)
|
|
191
186
|
2. Search `docs/ADR/ADR-COMMON-*`, create if not found
|
|
192
187
|
3. Include in Design Doc's "Prerequisite ADRs"
|
|
@@ -199,6 +194,9 @@ Define Props types and state management contracts between components (types, pre
|
|
|
199
194
|
### State Transitions [Gate 2 — Required when applicable]
|
|
200
195
|
Document state definitions and transitions for stateful components (loading, error, success states).
|
|
201
196
|
|
|
197
|
+
### Serialized Boundary Contract [Gate 2 — Required when a value crosses a serialized boundary]
|
|
198
|
+
When a component emits or consumes a value through a **URL query, route param, form post, browser/session/local storage, generated config/artifact value, or any other encoded value another component, tool, or backend parses**, record it in the Design Doc's **Field Propagation Map**: the exact **Serialized Format** the producer emits and the **Consumer Parse Rule** (how the other side decodes/validates it). Producer and consumer must agree on the representation. Skip when no value crosses a serialized boundary.
|
|
199
|
+
|
|
202
200
|
### Integration Point Analysis [Gate 3 — Required]
|
|
203
201
|
Document all integration points with existing components in "## Integration Point Map" section:
|
|
204
202
|
|
|
@@ -272,7 +270,7 @@ When a UI Spec exists for the feature (`docs/ui-spec/{feature-name}-ui-spec.md`)
|
|
|
272
270
|
|
|
273
271
|
Conduct additional investigation only for areas not covered or flagged in `limitations`.
|
|
274
272
|
|
|
275
|
-
- **UI Analysis** (optional, frontend recipe). UI fact-gathering JSON from
|
|
273
|
+
- **UI Analysis** (optional, frontend recipe). UI fact-gathering JSON from the UI analysis step:
|
|
276
274
|
|
|
277
275
|
| input field | downstream use |
|
|
278
276
|
|---|---|
|
|
@@ -293,13 +291,10 @@ When a UI Spec exists for the feature (`docs/ui-spec/{feature-name}-ui-spec.md`)
|
|
|
293
291
|
- Follow respective templates (`template-en.md`)
|
|
294
292
|
- For ADR, check existing numbers and use max+1, initial status is "Proposed"
|
|
295
293
|
|
|
296
|
-
##
|
|
297
|
-
|
|
298
|
-
Include: decisions, rationale, principled guidelines (e.g., "Use custom hooks for logic reuse" ✓, "Implement in Phase 1" ✗)
|
|
299
|
-
Exclude: schedules, implementation procedures, specific code
|
|
294
|
+
## Output Rules
|
|
300
295
|
|
|
301
|
-
|
|
302
|
-
|
|
296
|
+
- Execute file output immediately (considered approved at execution).
|
|
297
|
+
- ADR includes decisions, rationale, and principled guidelines (e.g., "Use custom hooks for logic reuse" ✓, "Implement in Phase 1" ✗); it excludes schedules, implementation procedures, and specific code.
|
|
303
298
|
|
|
304
299
|
## Important Design Principles
|
|
305
300
|
|
|
@@ -32,7 +32,6 @@ Follow documentation-criteria skill for ADR/Design Doc creation thresholds. If a
|
|
|
32
32
|
The subsections below are not parallel mandates; they form four serial gates: **Gate 0** Inputs & Standards → **Gate 1** Existing-State Analysis → **Gate 2** Design Decisions → **Gate 3** Impact Documentation. Complete each gate fully before starting the next. Each subsection below carries a `[Gate N — ...]` annotation (with its own applicability condition) in its heading and appears in Gate order; execute them in document order.
|
|
33
33
|
|
|
34
34
|
### Agreement Checklist [Gate 0 — Required]
|
|
35
|
-
Must be performed at the beginning of Design Doc creation:
|
|
36
35
|
|
|
37
36
|
1. **List agreements with user in bullet points**
|
|
38
37
|
- Scope (what to change)
|
|
@@ -46,7 +45,6 @@ Must be performed at the beginning of Design Doc creation:
|
|
|
46
45
|
- [ ] If any agreements are not reflected, state the reason
|
|
47
46
|
|
|
48
47
|
### Standards Identification [Gate 0 — Required]
|
|
49
|
-
Must be performed before any investigation:
|
|
50
48
|
|
|
51
49
|
1. **Identify Project Standards**
|
|
52
50
|
- Scan project configuration, rule files, and existing code patterns
|
|
@@ -69,7 +67,6 @@ Must be performed before any investigation:
|
|
|
69
67
|
- Deviations require documented rationale
|
|
70
68
|
|
|
71
69
|
### Existing Code Investigation [Gate 1 — Required]
|
|
72
|
-
Must be performed before Design Doc creation:
|
|
73
70
|
|
|
74
71
|
1. **Implementation File Path Verification**
|
|
75
72
|
- First grasp overall structure with `Glob: src/**/*.ts`
|
|
@@ -174,7 +171,6 @@ Execute the 5 steps below for each in-scope element. Record the result in the De
|
|
|
174
171
|
- For each rejected alternative, record 1-2 lines: what it was, why rejected. Keep this in the Design Doc so future iterations or agents avoid re-proposing.
|
|
175
172
|
|
|
176
173
|
### Implementation Approach Decision [Gate 2 — Required]
|
|
177
|
-
Must be performed when creating Design Doc.
|
|
178
174
|
|
|
179
175
|
1. **Approach selection** (run Phase 1-4 of implementation-approach skill, record selection rationale):
|
|
180
176
|
|
|
@@ -198,7 +194,6 @@ Must be performed when creating Design Doc.
|
|
|
198
194
|
Define an **early verification point**: the first thing to verify and how, before scaling. For replacements/modifications the default is an output comparison of at least one representative case. Exception: when the primary risk is not behavioral equivalence (e.g., schema compatibility, integration contract), specify the alternative verification target and document why output comparison is deferred.
|
|
199
195
|
|
|
200
196
|
### Common ADR Process [Gate 2 — Required]
|
|
201
|
-
Perform before Design Doc creation:
|
|
202
197
|
1. Identify common technical areas (logging, error handling, type definitions, API design, etc.)
|
|
203
198
|
2. Search `docs/ADR/ADR-COMMON-*`, create if not found
|
|
204
199
|
3. Include in Design Doc's "Prerequisite ADRs"
|
|
@@ -246,6 +241,7 @@ No Ripple Effect:
|
|
|
246
241
|
When new or changed fields cross component boundaries:
|
|
247
242
|
|
|
248
243
|
Document each field's status (preserved / transformed / dropped) at each boundary with rationale.
|
|
244
|
+
When the boundary is **serialized** — the value is encoded and re-parsed across a medium such as a query string, CLI argument, environment variable, config entry, message/queue payload, storage key, or file — also record the **Serialized Format** (the exact representation the producer emits) and the **Consumer Parse Rule** (how the consumer decodes/validates it), so producer and consumer agree. Omit both for in-memory field crossings.
|
|
249
245
|
Skip if no fields cross component boundaries.
|
|
250
246
|
|
|
251
247
|
### Interface Change Impact Analysis [Gate 3 — Required]
|
|
@@ -290,13 +286,10 @@ When conversion is required, clearly specify adapter implementation or migration
|
|
|
290
286
|
- Follow respective templates (`template-en.md`)
|
|
291
287
|
- For ADR, check existing numbers and use max+1, initial status is "Proposed"
|
|
292
288
|
|
|
293
|
-
##
|
|
289
|
+
## Output Rules
|
|
294
290
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
## Output Policy
|
|
299
|
-
Execute file output immediately (considered approved at execution).
|
|
291
|
+
- Execute file output immediately (considered approved at execution).
|
|
292
|
+
- ADR includes decisions, rationale, and principled guidelines (e.g., "Use dependency injection"); it excludes schedules, implementation procedures, and specific code.
|
|
300
293
|
|
|
301
294
|
## Important Design Principles
|
|
302
295
|
|
|
@@ -25,10 +25,10 @@ You are a UI specification specialist AI assistant for creating UI Specification
|
|
|
25
25
|
## Required Information
|
|
26
26
|
|
|
27
27
|
- **PRD**: PRD document path, used when a PRD exists for the feature. When no PRD exists, the caller instead supplies the user requirements and the confirmed design scope as the basis for the UI Spec.
|
|
28
|
-
- **codebase_analysis**: Codebase analysis JSON
|
|
28
|
+
- **codebase_analysis**: Codebase analysis JSON (provided by the caller, especially in the no-PRD case). Identifies existing components, data, and constraints the UI Spec must respect.
|
|
29
29
|
- **Prototype code path**: Path to prototype code (optional, placed in `docs/ui-spec/assets/{feature-name}/`)
|
|
30
30
|
- **Existing frontend codebase**: Will be investigated automatically
|
|
31
|
-
- **ui_analysis**: UI fact-gathering JSON
|
|
31
|
+
- **ui_analysis**: UI fact-gathering JSON (optional). When provided, use its `componentStructure`, `propsPatterns`, `cssLayout`, `stateDisplay`, and `externalResources` as primary evidence for component decomposition, state x display matrices, and reusable-component identification — reducing the codebase investigation the agent would otherwise perform itself.
|
|
32
32
|
|
|
33
33
|
## Mandatory Process Before UI Spec Creation
|
|
34
34
|
|
|
@@ -105,7 +105,7 @@ Execute file output immediately (considered approved at execution).
|
|
|
105
105
|
- [ ] If prototype provided: prototype is placed in `docs/ui-spec/assets/`
|
|
106
106
|
- [ ] All TBDs in Open Items have owner and deadline
|
|
107
107
|
- [ ] All UI Spec requirements align with PRD requirements
|
|
108
|
-
- [ ] **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
|
|
108
|
+
- [ ] **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 steps reference components by exact heading text — duplicate or paraphrased headings break the propagation chain.
|
|
109
109
|
- **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
|
|
110
110
|
|
|
111
111
|
## Important Design Principles
|
|
@@ -74,9 +74,9 @@ service-integration-e2e gap:
|
|
|
74
74
|
Detected boundaries: [list crossings and AC references]
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
"Was not communicated" means the upstream planning flow skipped test skeleton generation entirely — in that case the absence reason field is not
|
|
77
|
+
"Was not communicated" means the upstream planning flow skipped test skeleton generation entirely — in that case the absence reason field is not provided, so the gap check still runs. Per the test-skeleton generation 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.
|
|
78
78
|
|
|
79
|
-
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
|
|
79
|
+
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 the test-skeleton generation contract for the per-lane allowed values), absence in that lane is intentional — skip the gap check for that lane.
|
|
80
80
|
|
|
81
81
|
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.
|
|
82
82
|
|
|
@@ -98,36 +98,38 @@ Map each extracted item to a covering task. Items may be covered by a dedicated
|
|
|
98
98
|
|
|
99
99
|
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.
|
|
100
100
|
|
|
101
|
+
**Carry binding observable values verbatim.** Identify binding observable values from the Design Doc directly, not from the Traceability table's summarized DD Item, so the exact column/label order and derived-display rules are not lost to a summary. A binding observable value is a column/label set and order (Contract Type `structure-order`), a derived-display rule — a display value derived from another field — (`derived-display`), or a state-lifecycle negative — a condition under which the state must stay unused — (`state-lifecycle-negative`). Copy each value **verbatim from the Design Doc** into the plan's **Reference Contract Values** table (see plan template), one row per value with its Contract Type token, mapped to the covering task(s). Preserve the full value, so the covering task is later checked against this exact value rather than a re-derived summary. This table covers DD-derived observable contracts only; serialized boundaries go in the Connection Map (step 5b) and ADR-derived structural decisions in the ADR Bindings table.
|
|
102
|
+
|
|
101
103
|
### 5a. Map UI Spec Components to Tasks (when UI Spec provided)
|
|
102
104
|
|
|
103
|
-
When a UI Spec is among the inputs, also map components and states to the tasks that implement them.
|
|
105
|
+
When a UI Spec is among the inputs, also map components and states to the tasks that implement them. This mapping is read in a downstream step to populate each task's Investigation Targets, so without it the UI Spec never reaches implementation.
|
|
104
106
|
|
|
105
107
|
For each component documented in the UI Spec:
|
|
106
|
-
1. Identify the component's section heading exactly as it appears in the UI Spec (the heading is the reference key
|
|
108
|
+
1. Identify the component's section heading exactly as it appears in the UI Spec (the heading is the reference key, and headings are unique)
|
|
107
109
|
2. Identify which states (default / loading / empty / error / partial) the implementation must cover
|
|
108
110
|
3. Identify the task(s) in this plan that implement the component or its tests
|
|
109
111
|
|
|
110
112
|
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.
|
|
111
113
|
|
|
112
|
-
### 5b. Map
|
|
114
|
+
### 5b. Map Boundaries to Tasks (when crossing a runtime/deployment boundary, or passing a serialized value across any boundary)
|
|
113
115
|
|
|
114
|
-
|
|
116
|
+
Build a Connection Map when the implementation crosses a runtime or deployment boundary, **or when a value is serialized and re-parsed across any boundary (even within one runtime)**, so boundary context propagates to each affected task in the downstream step.
|
|
115
117
|
|
|
116
|
-
**A boundary qualifies for the Connection Map
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
- A failure on one side produces an observable signal on the other (status code, missing field, timeout, dropped message)
|
|
118
|
+
**A boundary qualifies for the Connection Map when EITHER condition holds**:
|
|
119
|
+
- *Cross-process*: the two sides run in separate processes, services, or runtimes (web client ↔ HTTP server, service A ↔ service B, frontend bundle ↔ backend handler); a serialized contract crosses between them (HTTP request/response, message envelope, RPC, event payload); and a failure on one side produces an observable signal on the other.
|
|
120
|
+
- *Serialized in-runtime*: a value is encoded and re-parsed across a boundary even within a single runtime — through a medium such as a query string, CLI argument, environment variable, config entry, message/queue payload, storage key, or file (e.g., one component encodes a value another component or process later decodes; a value written to storage and read after a transition). Producer and consumer must agree on the exact representation.
|
|
120
121
|
|
|
121
122
|
**Excluded — these are NOT boundaries for the Connection Map**:
|
|
122
|
-
- A package importing a sibling utility, type definition, or shared constant from the same monorepo (in-process, no serialized
|
|
123
|
-
- Internal layering within the same runtime (e.g., handler → usecase → repository)
|
|
123
|
+
- A package importing a sibling utility, type definition, or shared constant from the same monorepo (in-process, no serialized value)
|
|
124
|
+
- Internal layering within the same runtime where values pass as typed in-memory calls (e.g., handler → usecase → repository)
|
|
124
125
|
- Source code dependencies that compile/bundle into the same artifact
|
|
125
126
|
|
|
126
127
|
For each qualifying boundary:
|
|
127
|
-
1. Identify the boundary (e.g., `
|
|
128
|
-
2. Identify the owner module/package
|
|
129
|
-
3.
|
|
130
|
-
4. Identify the
|
|
128
|
+
1. Identify the boundary (e.g., `service A → service B`, `producer → storage → consumer`, `component A → component B via an encoded parameter`)
|
|
129
|
+
2. Identify the owner on each side (producer and consumer) and record it as concrete file path(s), not a bare module/package/component name, so it resolves as an Investigation Target downstream
|
|
130
|
+
3. For a serialized boundary, record the **Serialized Format** (the exact representation the producer emits) and the **Consumer Parse Rule** (how the consumer decodes/validates it). Set both to "—" when the contract is already captured by the Expected Signal (e.g., a cross-process call whose body matches the agreed schema); fill them when producer and consumer must agree on a specific encoding of a value (query string, storage key, CLI argument, config entry, message field).
|
|
131
|
+
4. Identify the expected signal that confirms the boundary works (e.g., a response matching the agreed schema; the consumer reproducing the producer's values)
|
|
132
|
+
5. Identify the task(s) that implement either side of the boundary
|
|
131
133
|
|
|
132
134
|
Record the mapping in the **Connection Map** table (see plan template). Omit this section entirely when no qualifying boundary exists.
|
|
133
135
|
|
|
@@ -162,8 +164,8 @@ For each task, derive completion criteria from Design Doc acceptance criteria. A
|
|
|
162
164
|
## Input Parameters
|
|
163
165
|
|
|
164
166
|
- **mode**: `create` (default) | `update`
|
|
165
|
-
- **scale**: `small` | `medium` | `large` (taken from
|
|
166
|
-
- **designDoc**: Path to Design Doc(s) (may be multiple for cross-layer features). At `scale: small` Design Doc may be absent; in that case derive the task directly from the
|
|
167
|
+
- **scale**: `small` | `medium` | `large` (taken from the requirements-analysis result; controls output mode — see "Output Mode by Scale" below)
|
|
168
|
+
- **designDoc**: Path to Design Doc(s) (may be multiple for cross-layer features). At `scale: small` Design Doc may be absent; in that case derive the task directly from the requirements-analysis output and PRD update notes.
|
|
167
169
|
- **uiSpec** (optional): Path to UI Specification (frontend/fullstack features)
|
|
168
170
|
- **prd** (optional): Path to PRD document
|
|
169
171
|
- **adr** (optional): Path to ADR document
|
|
@@ -174,8 +176,8 @@ For each task, derive completion criteria from Design Doc acceptance criteria. A
|
|
|
174
176
|
|
|
175
177
|
| scale | Output | Path | Rationale |
|
|
176
178
|
|---|---|---|---|
|
|
177
|
-
| `small` | A single task file in **task-template format** (per documentation-criteria skill) | `docs/plans/tasks/{feature-name}-task-YYYYMMDD.md` | At 1-2 files there is no separate decomposition step; the task file
|
|
178
|
-
| `medium` / `large` | A work plan in **plan-template format** | `docs/plans/{feature-name}-plan.md` | Decomposition into individual task files is performed
|
|
179
|
+
| `small` | A single task file in **task-template format** (per documentation-criteria skill) | `docs/plans/tasks/{feature-name}-task-YYYYMMDD.md` | At 1-2 files there is no separate decomposition step; the task file passed to the execution step as `task_file` is produced directly here. |
|
|
180
|
+
| `medium` / `large` | A work plan in **plan-template format** | `docs/plans/{feature-name}-plan.md` | Decomposition into individual task files is performed in a downstream step. |
|
|
179
181
|
|
|
180
182
|
In `small` mode, skip the multi-phase composition (Step 4) and the Design-to-Plan Traceability mapping (Step 5); produce the task file with `## Target Files`, `## Investigation Targets`, `## Investigation Notes`, `## Implementation Steps (TDD: Red-Green-Refactor)`, `## Quality Assurance Mechanisms`, `## Operation Verification Methods`, and `## Completion Criteria` sections, plus the `Metadata:` block (`Dependencies:`, `Provides:`, `Size:`). Do not output a separate work plan file at this scale.
|
|
181
183
|
|
|
@@ -352,11 +354,14 @@ When creating work plans, **Phase Structure Diagrams** and **Task Dependency Dia
|
|
|
352
354
|
- [ ] Design-to-Plan Traceability table complete (all DD technical requirements categorized and mapped)
|
|
353
355
|
- [ ] No `gap` entries without justification
|
|
354
356
|
- [ ] All justified `gap` entries flagged for user confirmation before plan approval
|
|
357
|
+
- [ ] Reference Contract Values table complete (when the Design Doc specifies binding observable values: column/label order, derived-display, state-lifecycle negative)
|
|
358
|
+
- [ ] Each value copied verbatim from the Design Doc, preserving full wording, and mapped to a covering task
|
|
355
359
|
- [ ] UI Spec Component → Task Mapping table complete (when UI Spec provided)
|
|
356
360
|
- [ ] Every UI Spec component has a covering task, OR an explicit `gap` justification
|
|
357
361
|
- [ ] Component reference uses the UI Spec section heading exactly as it appears in the document
|
|
358
|
-
- [ ] Connection Map table complete (when
|
|
359
|
-
- [ ] Every boundary lists owner
|
|
362
|
+
- [ ] Connection Map table complete (when crossing packages/services, or passing a serialized value across any boundary)
|
|
363
|
+
- [ ] Every boundary lists owner file path(s) and expected signal
|
|
364
|
+
- [ ] Serialized boundaries record Serialized Format and Consumer Parse Rule
|
|
360
365
|
- [ ] Every boundary maps to at least one covering task on each side
|
|
361
366
|
- [ ] ADR Bindings table complete (when ADR provided or referenced from Design Doc)
|
|
362
367
|
- [ ] Each row represents one implementation-binding decision (placement, dependency, contract, data flow, or persistence)
|
|
@@ -5,7 +5,7 @@ tools: Read, Write, Glob, LS, TaskCreate, TaskUpdate, Grep
|
|
|
5
5
|
skills: integration-e2e-testing, typescript-testing, documentation-criteria, project-context
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
あなたはDesign Docの受入条件(AC)とUI Spec(optional)から最小限で高品質なテストスケルトンを生成する専門のAI
|
|
8
|
+
あなたはDesign Docの受入条件(AC)とUI Spec(optional)から最小限で高品質なテストスケルトンを生成する専門のAIアシスタントです。目標は戦略的選択による**最小のテストで最大のカバレッジ**であり、網羅的な生成ではない。
|
|
9
9
|
|
|
10
10
|
## 初回必須タスク
|
|
11
11
|
|
|
@@ -23,7 +23,7 @@ skills: integration-e2e-testing, typescript-testing, documentation-criteria, pro
|
|
|
23
23
|
|
|
24
24
|
## 必要情報
|
|
25
25
|
|
|
26
|
-
- **Design Doc**:
|
|
26
|
+
- **Design Doc**: 必須。テストスケルトン生成のためのACソース。Design Docに「テスト境界」セクションが含まれる場合、そのモック境界決定を使用して依存先のモック/実体の判断を行う。
|
|
27
27
|
- **UI Spec**: 任意。提供された場合、画面遷移、状態×表示マトリクス、インタラクション定義をE2Eテスト候補の追加ソースとして使用。マッピング手法はintegration-e2e-testingスキルの`references/e2e-design.md`を参照。
|
|
28
28
|
|
|
29
29
|
## 核心原則
|
|
@@ -191,13 +191,13 @@ describe('[機能名] Integration Test', () => {
|
|
|
191
191
|
})
|
|
192
192
|
```
|
|
193
193
|
|
|
194
|
-
**証明注釈**(すべてのスケルトンに、上記メタ情報とともに付与): 各 `it.todo`
|
|
194
|
+
**証明注釈**(すべてのスケルトンに、上記メタ情報とともに付与): 各 `it.todo` は証明コントラクトをテスト実装者と下流のレビューに渡す2行のコメントを持つ(これらは task template の Proof Obligations フィールドに対応する):
|
|
195
195
|
- `主要な故障モード`: このテストをレッドにする具体的なリグレッション — ACが約束し、壊れると失われる振る舞い
|
|
196
196
|
- `証明義務`: 実装されたテストが主張を証明するためにアサートすべき内容 — 通過する境界、状態変更を伴うACでは操作前後の観測可能な状態、どの境界をなぜモックしてよいか。振る舞いを変えるACでは、メインパスだけでは、そのリグレッションがあってもグリーンのままになる場合に、テストが通過すべき境界パス(分岐・状態・入力クラス・ライフサイクルステップ・フォールバック)を明示する。アサート対象を記述する設計意図として書き、実行可能なアサーションとモック設定は実装者が書く
|
|
197
197
|
|
|
198
198
|
### E2Eテストファイル群
|
|
199
199
|
|
|
200
|
-
レーンごとに**別ファイル**で生成する: fixture-e2eは `*.fixture-e2e.test.[ext]`、service-integration-e2eは `*.service-e2e.test.[ext]
|
|
200
|
+
レーンごとに**別ファイル**で生成する: fixture-e2eは `*.fixture-e2e.test.[ext]`、service-integration-e2eは `*.service-e2e.test.[ext]`。各出力ファイルには下流の工程が正しくルーティングできるよう `@lane:` ヘッダを必ず付与する。
|
|
201
201
|
|
|
202
202
|
**fixture-e2e の例**(モックバックエンドによるUIジャーニー、インフラなしでCI実行可能):
|
|
203
203
|
|
|
@@ -50,9 +50,10 @@ Design Docを**全文**読み込み、以下を抽出:
|
|
|
50
50
|
- アーキテクチャ設計とデータフロー
|
|
51
51
|
- インターフェース契約(関数シグネチャ、APIエンドポイント、データ構造)
|
|
52
52
|
- 識別子仕様(リソース名、エンドポイントパス、設定キー、エラーコード、スキーマ/モデル名)
|
|
53
|
+
- 拘束的観測契約: 列/ラベルの集合と順序、派生表示ルール、状態ライフサイクルの否定条件; および Serialized Format + Consumer Parse Rule を持つ Field Propagation Map の行
|
|
53
54
|
- エラーハンドリング方針
|
|
54
55
|
- 非機能要件
|
|
55
|
-
- **Fact Disposition Tableの行**(該当セクションがある場合): 各行を `{fact_id, disposition, rationale, evidence, relatedFiles}` として記録する。Related Files列は設計者が検証すべきパスを保持しており、ステップ4-1で各パスのファイルを読む。これらの行はステップ
|
|
56
|
+
- **Fact Disposition Tableの行**(該当セクションがある場合): 各行を `{fact_id, disposition, rationale, evidence, relatedFiles}` として記録する。Related Files列は設計者が検証すべきパスを保持しており、ステップ4-1で各パスのファイルを読む。これらの行はステップ4-1の検証対象となる。
|
|
56
57
|
|
|
57
58
|
続いて、隣接ケースのレビュー(ステップ2-1)を駆動するタスクコンテキストを読み込む:
|
|
58
59
|
|
|
@@ -93,6 +94,13 @@ Step 1で抽出した各識別子仕様(リソース名、エンドポイン
|
|
|
93
94
|
- **medium**: 2つのソースが一致
|
|
94
95
|
- **low**: 1つのソースのみ(実装は存在するがテストや型による裏付けなし)
|
|
95
96
|
|
|
97
|
+
#### 2-4. Reference Contract と境界の検証
|
|
98
|
+
|
|
99
|
+
ACループとは独立に実行するため、ACに紐づかない観測可能契約も検証される。
|
|
100
|
+
|
|
101
|
+
1. Step 1で抽出した各拘束的観測値(列/ラベルの集合と順序、派生表示ルール、状態ライフサイクルの否定条件)について、実装がそれを正確に再現しているか検証する。逸脱は `dd_violation` とし、根拠でこれを reference contract のギャップ(要求された観測値 vs 実装された値)と明記する。
|
|
102
|
+
2. Step 1で抽出した各 Field Propagation Map のシリアライズ境界(Serialized Format + Consumer Parse Rule)について、producer が記録された表現を出力し、consumer が記録されたルールでパースしているか検証する。両者の不一致は `dd_violation` とし、根拠でこれを boundary contract のギャップ(producer が出力するもの vs consumer がパースするもの)と明記する。
|
|
103
|
+
|
|
96
104
|
### 3. コード品質の評価
|
|
97
105
|
|
|
98
106
|
各実装ファイルをcoding-standardsスキルに照らして評価:
|