codex-workflows 0.4.11 → 0.5.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/.agents/skills/coding-rules/references/typescript.md +1 -1
- package/.agents/skills/documentation-criteria/references/plan-template.md +19 -0
- package/.agents/skills/documentation-criteria/references/ui-spec-template.md +2 -0
- package/.agents/skills/integration-e2e-testing/SKILL.md +34 -21
- package/.agents/skills/integration-e2e-testing/references/e2e-design.md +16 -10
- package/.agents/skills/recipe-add-integration-tests/SKILL.md +7 -0
- package/.agents/skills/recipe-build/SKILL.md +32 -5
- package/.agents/skills/recipe-front-build/SKILL.md +32 -5
- package/.agents/skills/recipe-front-plan/SKILL.md +1 -1
- package/.agents/skills/recipe-front-review/SKILL.md +29 -11
- package/.agents/skills/recipe-fullstack-build/SKILL.md +32 -5
- package/.agents/skills/recipe-fullstack-implement/SKILL.md +9 -3
- package/.agents/skills/recipe-implement/SKILL.md +12 -4
- package/.agents/skills/recipe-plan/SKILL.md +5 -5
- package/.agents/skills/recipe-prepare-implementation/SKILL.md +162 -0
- package/.agents/skills/recipe-prepare-implementation/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-review/SKILL.md +34 -6
- package/.agents/skills/subagents-orchestration-guide/SKILL.md +34 -34
- package/.agents/skills/subagents-orchestration-guide/references/monorepo-flow.md +1 -1
- package/.agents/skills/task-analyzer/references/skills-index.yaml +13 -5
- package/.agents/skills/testing/references/typescript.md +2 -3
- package/.codex/agents/acceptance-test-generator.toml +69 -31
- package/.codex/agents/task-decomposer.toml +27 -2
- package/.codex/agents/task-executor-frontend.toml +5 -11
- package/.codex/agents/task-executor.toml +8 -14
- package/.codex/agents/technical-designer-frontend.toml +2 -2
- package/.codex/agents/work-planner.toml +54 -17
- package/README.md +12 -2
- package/package.json +1 -1
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: recipe-prepare-implementation
|
|
3
|
+
description: "Verify that an approved work plan is implementable before build execution, resolving readiness gaps through Phase 0 prep tasks when needed."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Required Skills [LOAD BEFORE EXECUTION]
|
|
7
|
+
|
|
8
|
+
1. [LOAD IF NOT ACTIVE] `coding-rules` -- coding standards
|
|
9
|
+
2. [LOAD IF NOT ACTIVE] `testing` -- test strategy and quality gates
|
|
10
|
+
3. [LOAD IF NOT ACTIVE] `ai-development-guide` -- AI development patterns
|
|
11
|
+
4. [LOAD IF NOT ACTIVE] `documentation-criteria` -- document templates
|
|
12
|
+
5. [LOAD IF NOT ACTIVE] `subagents-orchestration-guide` -- agent coordination
|
|
13
|
+
|
|
14
|
+
**Spawn rule**: every `spawn_agent` call MUST pass `fork_turns="none"` or `fork_context=false` for context isolation.
|
|
15
|
+
|
|
16
|
+
## Purpose
|
|
17
|
+
|
|
18
|
+
Run this recipe after work-plan approval and before any build or implementation execution. It verifies that the plan can be executed from Phase 1 onward without missing verification references, test prerequisites, UI render surfaces, or local execution instructions.
|
|
19
|
+
|
|
20
|
+
The recipe is safe to invoke unconditionally. If all readiness criteria pass, it only updates the work plan readiness marker and report.
|
|
21
|
+
|
|
22
|
+
Work plan: $ARGUMENTS
|
|
23
|
+
|
|
24
|
+
## Readiness Marker Contract
|
|
25
|
+
|
|
26
|
+
Use the Implementation Readiness Marker Contract defined in `subagents-orchestration-guide`. If the line is absent, treat the work plan as `pending` and insert it after `Related Issue/PR:` when persisting the report.
|
|
27
|
+
|
|
28
|
+
## Readiness Criteria
|
|
29
|
+
|
|
30
|
+
Each criterion produces `pass`, `fail`, or `not_applicable`, with file:line evidence where possible.
|
|
31
|
+
|
|
32
|
+
| ID | Criterion | Pass Evidence |
|
|
33
|
+
|----|-----------|---------------|
|
|
34
|
+
| R1 | Verification Strategy references resolve | Every command, file path, function, endpoint, fixture, seed, and test reference in the work plan's Verification Strategies either exists now or is the deliverable of a task in the plan |
|
|
35
|
+
| R2 | E2E prerequisites are addressed | For each fixture-e2e or service-integration-e2e skeleton, every noted precondition is present in the codebase or covered by a Phase 0 task |
|
|
36
|
+
| R3 | Phase 1 observability exists | The first implementation phase includes at least one operation verification method executable at task completion using existing files, prior Phase 0 deliverables, or the task's own output |
|
|
37
|
+
| R4 | UI rendering surface exists | When the plan implements UI components, a fixture entry, dev route, Storybook story, preview harness, or equivalent render surface exists or is covered by a Phase 0 task |
|
|
38
|
+
| R5 | Local lane procedure exists | The work plan or referenced docs record commands needed to run the relevant local service stack or browser harness, including startup commands, ports, seed steps, and required environment variables |
|
|
39
|
+
|
|
40
|
+
R4 applies only to UI work. R5 applies when the plan uses a local service stack or browser harness.
|
|
41
|
+
|
|
42
|
+
## Execution Flow
|
|
43
|
+
|
|
44
|
+
### Step 1: Load Inputs
|
|
45
|
+
|
|
46
|
+
Read the work plan passed in `$ARGUMENTS`; if absent, select the most recent non-template `docs/plans/*.md`. Extract:
|
|
47
|
+
- Verification Strategies
|
|
48
|
+
- Quality Assurance Mechanisms
|
|
49
|
+
- Design-to-Plan Traceability
|
|
50
|
+
- UI Spec Component -> Task Mapping
|
|
51
|
+
- Connection Map
|
|
52
|
+
- test skeleton references and E2E absence reasons
|
|
53
|
+
- phase structure and task IDs
|
|
54
|
+
- referenced Design Docs and UI Specs
|
|
55
|
+
|
|
56
|
+
If no work plan exists, stop and report the missing prerequisite.
|
|
57
|
+
|
|
58
|
+
### Step 2: Readiness Scan
|
|
59
|
+
|
|
60
|
+
Evaluate R1-R5 using repository search and the work plan content. Build a `## Implementation Readiness Report` regardless of outcome.
|
|
61
|
+
|
|
62
|
+
For each `fail`, identify the smallest concrete prep task that closes the gap. Examples:
|
|
63
|
+
- Add fixture data for a UI state
|
|
64
|
+
- Add an API mock handler for fixture-e2e
|
|
65
|
+
- Add a seed script for service-integration-e2e
|
|
66
|
+
- Add a Storybook story, dev route, or equivalent render surface
|
|
67
|
+
- Document local startup commands and required environment variables
|
|
68
|
+
- Add a missing verification helper or script referenced by the plan
|
|
69
|
+
|
|
70
|
+
### Step 3: No-Op Success
|
|
71
|
+
|
|
72
|
+
When all applicable criteria are `pass`:
|
|
73
|
+
1. Persist `## Implementation Readiness Report` in the work plan immediately after the header block.
|
|
74
|
+
2. Set `Implementation Readiness: ready`.
|
|
75
|
+
3. Do not create task files.
|
|
76
|
+
4. Report `outcome: ready`.
|
|
77
|
+
|
|
78
|
+
### Step 4: Create Resolution Tasks
|
|
79
|
+
|
|
80
|
+
When one or more criteria fail:
|
|
81
|
+
1. Present the proposed prep tasks to the user and continue only after explicit approval.
|
|
82
|
+
2. Create task files in `docs/plans/tasks/` using the task template:
|
|
83
|
+
- Backend prep: `{plan-name}-backend-task-prep-{NN}.md`
|
|
84
|
+
- Frontend prep: `{plan-name}-frontend-task-prep-{NN}.md`
|
|
85
|
+
- Single-layer prep: `{plan-name}-task-prep-{NN}.md`
|
|
86
|
+
3. Insert the tasks into the work plan's existing Phase 0 when one exists. If no Phase 0 exists, create `Phase 0: Implementation Readiness Prep` before Phase 1. Keep existing Phase 0 task IDs stable; assign prep task IDs after existing Phase 0 tasks or use a clearly labeled `P0-PREP-N` identifier when the plan's numbering would otherwise require renumbering.
|
|
87
|
+
4. Each prep task must include Investigation Targets, concrete implementation steps, and Operation Verification Methods.
|
|
88
|
+
|
|
89
|
+
Layer selection:
|
|
90
|
+
- Use frontend prep when every target is UI, browser harness, component, page, or frontend fixture work.
|
|
91
|
+
- Use backend prep when every target is API, server, service, repository, database, seed, or backend fixture work.
|
|
92
|
+
- Use single-layer prep for non-layered repositories.
|
|
93
|
+
- Escalate if the gap crosses layers and cannot be split into separate prep tasks.
|
|
94
|
+
|
|
95
|
+
### Step 5: Execute Prep Tasks
|
|
96
|
+
|
|
97
|
+
Run each prep task through the standard 4-step cycle:
|
|
98
|
+
1. Spawn the layer-appropriate task executor with the exact prep task path in the prompt: "Execute implementation-readiness prep task. Task file: [exact prep task path]."
|
|
99
|
+
2. Check for `blocked` or `escalation_needed`.
|
|
100
|
+
3. Spawn the layer-appropriate quality fixer with the task file as `task_file`.
|
|
101
|
+
4. Commit only when the quality fixer returns `approved`.
|
|
102
|
+
|
|
103
|
+
Append this scope boundary to every subagent prompt:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
[SYSTEM CONSTRAINT]
|
|
107
|
+
This agent operates within implementation-readiness prep scope. Use the task file as the primary instruction source. Do not implement feature behavior beyond the readiness gap described by the task.
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Step 6: Re-Scan and Persist
|
|
111
|
+
|
|
112
|
+
After prep tasks are complete:
|
|
113
|
+
1. Re-run the readiness scan.
|
|
114
|
+
2. Persist or replace `## Implementation Readiness Report` in the work plan.
|
|
115
|
+
3. Set the header to `Implementation Readiness: ready` when all applicable criteria pass, otherwise `Implementation Readiness: escalated`.
|
|
116
|
+
4. Collapse completed prep tasks out of active plan execution: remove the Phase 0 readiness prep task entries from the work plan and record their committed evidence under `Resolution Tasks Executed` in the Readiness Report. If Phase 0 becomes empty and was created only by this recipe, remove that Phase 0 section. Preserve any pre-existing Phase 0 content.
|
|
117
|
+
5. Delete only these files for the current `{plan-name}`:
|
|
118
|
+
- `docs/plans/tasks/{plan-name}-task-prep-*.md`
|
|
119
|
+
- `docs/plans/tasks/{plan-name}-backend-task-prep-*.md`
|
|
120
|
+
- `docs/plans/tasks/{plan-name}-frontend-task-prep-*.md`
|
|
121
|
+
- `docs/plans/tasks/{plan-name}-phase0-completion.md`
|
|
122
|
+
6. Report remaining gaps if any.
|
|
123
|
+
|
|
124
|
+
## Readiness Report Format
|
|
125
|
+
|
|
126
|
+
```markdown
|
|
127
|
+
## Implementation Readiness Report
|
|
128
|
+
|
|
129
|
+
Work plan: [path]
|
|
130
|
+
Outcome: ready | escalated
|
|
131
|
+
Gaps resolved: [N]
|
|
132
|
+
phase0_created_by_recipe: true | false
|
|
133
|
+
|
|
134
|
+
### Readiness Criteria
|
|
135
|
+
|
|
136
|
+
| ID | Result | Evidence |
|
|
137
|
+
|----|--------|----------|
|
|
138
|
+
| R1 | pass / fail / not_applicable | [file:line or missing reference] |
|
|
139
|
+
| R2 | ... | ... |
|
|
140
|
+
| R3 | ... | ... |
|
|
141
|
+
| R4 | ... | ... |
|
|
142
|
+
| R5 | ... | ... |
|
|
143
|
+
|
|
144
|
+
### Resolution Tasks Executed
|
|
145
|
+
- [task file path] - [one-line summary] - committed
|
|
146
|
+
|
|
147
|
+
### Remaining Gaps
|
|
148
|
+
- [criterion ID]: [unresolved reference] - Next action: [recommendation]
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Completion Criteria
|
|
152
|
+
|
|
153
|
+
- [ ] Work plan loaded and relevant sections extracted
|
|
154
|
+
- [ ] Readiness scan completed with evidence per criterion
|
|
155
|
+
- [ ] No-op success handled when all criteria pass
|
|
156
|
+
- [ ] Failing criteria converted to approved prep tasks when needed
|
|
157
|
+
- [ ] Prep tasks executed through executor -> quality-fixer -> commit
|
|
158
|
+
- [ ] Re-scan completed after prep tasks
|
|
159
|
+
- [ ] Work plan readiness marker updated to `ready` or `escalated`
|
|
160
|
+
- [ ] Readiness Report persisted in the work plan
|
|
161
|
+
- [ ] Completed prep task references collapsed into the Readiness Report
|
|
162
|
+
- [ ] Prep task files created by this recipe removed from `docs/plans/tasks/`
|
|
@@ -23,7 +23,8 @@ description: "Design Doc compliance and security validation with optional auto-f
|
|
|
23
23
|
|
|
24
24
|
- Compliance validation -> Spawn code-reviewer agent
|
|
25
25
|
- Security validation -> Spawn security-reviewer agent
|
|
26
|
-
-
|
|
26
|
+
- Code-side fix path -> Spawn task-executor agent
|
|
27
|
+
- Design-side update path -> Spawn technical-designer in update mode, then document-reviewer, then design-sync when multiple Design Docs exist
|
|
27
28
|
- Quality checks -> Spawn quality-fixer agent
|
|
28
29
|
- Re-validation -> Spawn code-reviewer / security-reviewer agents
|
|
29
30
|
|
|
@@ -82,22 +83,47 @@ Security Review: [status from security-reviewer]
|
|
|
82
83
|
- [policy] [location]: [description] — [rationale]
|
|
83
84
|
Notes: [notes from security-reviewer, if present]
|
|
84
85
|
|
|
85
|
-
|
|
86
|
+
Resolve discrepancies by route:
|
|
87
|
+
c) Code-side fix
|
|
88
|
+
d) Design-side update
|
|
89
|
+
s) Skip
|
|
90
|
+
|
|
91
|
+
Default: accept all recommended routes.
|
|
92
|
+
|
|
93
|
+
Accepted response formats:
|
|
94
|
+
- empty input -- accept every recommended route
|
|
95
|
+
- `all-recommended` -- accept every recommended route
|
|
96
|
+
- `all:c`, `all:d`, or `all:s` -- apply one route to every finding
|
|
97
|
+
- Per-finding routes, e.g. `F1:c, F2:d, F3:s`
|
|
86
98
|
```
|
|
87
99
|
|
|
88
|
-
|
|
89
|
-
|
|
100
|
+
Before presenting results, recommend a route for each finding:
|
|
101
|
+
- Use `d` when implementation intent matches the requirement but the Design Doc is stale or too narrow.
|
|
102
|
+
- Use `c` when code drifted from a still-correct Design Doc, or when the finding is reliability, security, or maintainability related.
|
|
103
|
+
- Use `s` only when the user explicitly accepts the current state without changes.
|
|
90
104
|
|
|
91
|
-
|
|
105
|
+
**[STOP — BLOCKING]** Present results and recommended routes to user for confirmation.
|
|
106
|
+
**CANNOT proceed until user explicitly confirms routes.**
|
|
107
|
+
|
|
108
|
+
If all findings are skipped: Skip Steps 5-10, proceed to Step 11.
|
|
92
109
|
|
|
93
110
|
### Step 5: Prepare Fix Context
|
|
94
111
|
|
|
95
112
|
Reference documentation-criteria skill for task file template.
|
|
96
113
|
|
|
114
|
+
### Step 5d: Design-Side Update
|
|
115
|
+
|
|
116
|
+
Run this step only when the user routes at least one finding to `d`.
|
|
117
|
+
|
|
118
|
+
1. Spawn technical-designer agent in update mode: "Update Design Doc at [path]. The implementation is being accepted as correct for these findings: [d-routed findings with code locations and current Design Doc values]. Update the relevant sections and add change history."
|
|
119
|
+
2. Spawn document-reviewer agent: "Review updated Design Doc at [path] for consistency and completeness."
|
|
120
|
+
3. If multiple Design Docs exist in `docs/design/`, spawn design-sync agent: "Check cross-Design Doc consistency after updating [path]."
|
|
121
|
+
4. If the user selected both `d` and `c` routes, re-evaluate the `c` findings against the updated Design Doc and drop any that are now satisfied.
|
|
122
|
+
|
|
97
123
|
### Step 6: Create Task File
|
|
98
124
|
|
|
99
125
|
Create task file at `docs/plans/tasks/review-fixes-YYYYMMDD.md`
|
|
100
|
-
Include
|
|
126
|
+
Include only code-side compliance issues and security requiredFixes routed to `c`.
|
|
101
127
|
|
|
102
128
|
### Step 7: Execute Fixes
|
|
103
129
|
|
|
@@ -117,6 +143,8 @@ Spawn security-reviewer agent: "Re-validate security after fixes. Prior findings
|
|
|
117
143
|
|
|
118
144
|
### Step 11: Final Report
|
|
119
145
|
|
|
146
|
+
Delete the review-fix task file this recipe created, if present. Its work is committed; `docs/plans/` is ephemeral working state.
|
|
147
|
+
|
|
120
148
|
```
|
|
121
149
|
Code Compliance:
|
|
122
150
|
Initial: [X]%
|
|
@@ -123,27 +123,10 @@ Close a running subagent only when the user redirects the workflow, the orchestr
|
|
|
123
123
|
|
|
124
124
|
Spawn agents using natural language prompts. Provide clear context about what the agent should accomplish. Every `spawn_agent` call MUST include `fork_turns="none"` or `fork_context=false` (see Spawn rule at top of this skill).
|
|
125
125
|
|
|
126
|
-
### Spawn
|
|
126
|
+
### Spawn Prompt Requirements
|
|
127
127
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
**requirement-analyzer** (`fork_turns="none"` or `fork_context=false`):
|
|
131
|
-
> "Analyze the following requirements and determine the work scale: [user requirements]. Perform requirement analysis and scale determination."
|
|
132
|
-
|
|
133
|
-
**codebase-analyzer** (`fork_turns="none"` or `fork_context=false`):
|
|
134
|
-
> "Analyze the existing codebase to provide evidence for Design Doc creation. Focus on existing implementations, data model elements, and constraints the design should respect. requirement_analysis: [JSON]. prd_path: [path if available]. requirements: [original user requirements]. layer: [target layer if applicable]. target_paths: [paths if narrowed]. Return codebase facts and focus areas."
|
|
135
|
-
|
|
136
|
-
**task-executor** (`fork_turns="none"` or `fork_context=false`):
|
|
137
|
-
> "Execute the implementation task defined in docs/plans/tasks/[filename].md. Complete the implementation following TDD Red-Green-Refactor."
|
|
138
|
-
|
|
139
|
-
**quality-fixer** (`fork_turns="none"` or `fork_context=false`):
|
|
140
|
-
> "Run quality checks on the codebase: static analysis, style check, all test execution. Fix any issues found and report when all checks pass."
|
|
141
|
-
|
|
142
|
-
**document-reviewer** (`fork_turns="none"` or `fork_context=false`):
|
|
143
|
-
> "Review the document at [path] for quality and rule compliance. Check against documentation-criteria standards."
|
|
144
|
-
|
|
145
|
-
**design-sync** (`fork_turns="none"` or `fork_context=false`):
|
|
146
|
-
> "Verify consistency between Design Docs in docs/design/. Use [path] as the source document for comparison."
|
|
128
|
+
- Set `fork_context=false` or `fork_turns="none"` on every spawn for context isolation.
|
|
129
|
+
- Each spawn prompt must name the target deliverable, input paths, and expected result. When invoking `task-executor*`, include the exact task file path, for example: `Execute the implementation task. Task file: docs/plans/tasks/[filename].md.`
|
|
147
130
|
|
|
148
131
|
## Explicit Stop Points [MANDATORY]
|
|
149
132
|
|
|
@@ -207,7 +190,34 @@ Subagents respond in JSON format. The final response from each JSON-returning su
|
|
|
207
190
|
| `design-sync` | `sync_status` |
|
|
208
191
|
| `integration-test-reviewer` | `status`, `requiredFixes` |
|
|
209
192
|
| `security-reviewer` | `status`, `findings`, `notes`, `requiredFixes` |
|
|
210
|
-
| `acceptance-test-generator` | `status`, `generatedFiles`, `e2eAbsenceReason` |
|
|
193
|
+
| `acceptance-test-generator` | `status`, `generatedFiles.integration`, `generatedFiles.fixtureE2e`, `generatedFiles.serviceE2e`, `e2eAbsenceReason.fixtureE2e`, `e2eAbsenceReason.serviceE2e` |
|
|
194
|
+
|
|
195
|
+
## Implementation Readiness Marker Contract
|
|
196
|
+
|
|
197
|
+
Work plans use the header line `Implementation Readiness: <status>`.
|
|
198
|
+
|
|
199
|
+
| Status | Meaning | Consumer Action |
|
|
200
|
+
|--------|---------|-----------------|
|
|
201
|
+
| `pending` | Initial state from work-planner; readiness has not been checked | Present the unchecked state, recommend running implementation readiness preflight, and continue only on explicit user approval |
|
|
202
|
+
| `ready` | Readiness scan completed and no applicable failures remain | Proceed with task execution |
|
|
203
|
+
| `escalated` | Readiness scan completed, but one or more failures remain | Read the work plan's Implementation Readiness Report, present remaining gaps, and continue only on explicit user approval |
|
|
204
|
+
| absent | Older work plan without the marker | Treat as `pending` |
|
|
205
|
+
|
|
206
|
+
## Implementation Readiness Preflight Procedure
|
|
207
|
+
|
|
208
|
+
Use this procedure after work-plan approval and before autonomous task execution when the flow needs to verify implementation readiness.
|
|
209
|
+
|
|
210
|
+
1. Load the approved work plan exact path and extract Verification Strategies, Quality Assurance Mechanisms, Design-to-Plan Traceability, UI Spec Component -> Task Mapping, Connection Map, test skeleton references, E2E absence reasons, phase structure, referenced Design Docs, and UI Specs.
|
|
211
|
+
2. Evaluate these criteria with evidence:
|
|
212
|
+
- R1 Verification Strategy references resolve
|
|
213
|
+
- R2 E2E prerequisites are addressed
|
|
214
|
+
- R3 Phase 1 observability exists
|
|
215
|
+
- R4 UI rendering surface exists when UI work is present
|
|
216
|
+
- R5 Local service stack or browser harness procedure exists when applicable
|
|
217
|
+
3. If every applicable criterion passes, persist `## Implementation Readiness Report` in the work plan and set `Implementation Readiness: ready`.
|
|
218
|
+
4. If any criterion fails, create the smallest approved prep tasks that close the gaps, execute each exact prep task file through the standard executor -> quality-fixer -> commit cycle, then re-run the scan.
|
|
219
|
+
5. After re-scan, set `Implementation Readiness: ready` when all applicable criteria pass, otherwise `Implementation Readiness: escalated`, and persist remaining gaps in the Readiness Report.
|
|
220
|
+
6. Collapse completed prep task references into the Readiness Report and delete only the prep task files created for the current work plan.
|
|
211
221
|
|
|
212
222
|
## Handling Requirement Changes
|
|
213
223
|
|
|
@@ -216,17 +226,7 @@ requirement-analyzer follows the "completely self-contained" principle and proce
|
|
|
216
226
|
|
|
217
227
|
#### How to Integrate Requirements
|
|
218
228
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
```yaml
|
|
222
|
-
Integration example:
|
|
223
|
-
Initial: "I want to create user management functionality"
|
|
224
|
-
Addition: "Permission management is also needed"
|
|
225
|
-
Result: "I want to create user management functionality. Permission management is also needed.
|
|
226
|
-
|
|
227
|
-
Initial requirement: I want to create user management functionality
|
|
228
|
-
Additional requirement: Permission management is also needed"
|
|
229
|
-
```
|
|
229
|
+
Integrate initial requirements and later additions as complete sentences, preserving all contextual information communicated by the user. The updated input must remain self-contained without relying on prior conversation turns.
|
|
230
230
|
|
|
231
231
|
### Update Mode for Document Generation Agents
|
|
232
232
|
Document generation agents (work-planner, technical-designer, prd-creator) can update existing documents in `update` mode.
|
|
@@ -350,11 +350,11 @@ Maximum retry count is 1 verification fix cycle. If any failed verifier still fa
|
|
|
350
350
|
| `codebase-analyzer` | `technical-designer*` | `Codebase Analysis`, including `focusAreas`, `dataModel`, `qualityAssurance`, `dataTransformationPipelines`, `limitations` |
|
|
351
351
|
| `technical-designer*` | `code-verifier` | Design Doc path |
|
|
352
352
|
| `code-verifier` | `document-reviewer` | `code_verification` JSON |
|
|
353
|
-
| `acceptance-test-generator` | `work-planner` | integration
|
|
353
|
+
| `acceptance-test-generator` | `work-planner` | `generatedFiles.integration`, `generatedFiles.fixtureE2e`, `generatedFiles.serviceE2e`, `e2eAbsenceReason: { fixtureE2e, serviceE2e }` |
|
|
354
354
|
| Design Doc | `work-planner` | Verification Strategy summary, Output Comparison details, implementation-relevant technical requirements, protected no-change boundaries |
|
|
355
355
|
|
|
356
356
|
Handoff rules:
|
|
357
|
-
- Verify generated integration and
|
|
357
|
+
- Verify generated integration, fixture-e2e, and service-integration-e2e file paths exist before passing them onward
|
|
358
358
|
- Escalate only when required outputs are missing without a valid absence reason
|
|
359
359
|
- Require work-planner to map every carried-forward technical requirement to a covering task or a justified `gap`
|
|
360
360
|
|
|
@@ -100,7 +100,7 @@ Spawn acceptance-test-generator with all Design Docs and UI Spec:
|
|
|
100
100
|
|
|
101
101
|
Spawn work-planner with all Design Docs:
|
|
102
102
|
|
|
103
|
-
> "Create a work plan from the following documents: PRD: [path] (Large Scale only), Design Doc (backend): [path], Design Doc (frontend): [path]. Compose phases as vertical feature slices where possible -- each phase should contain both backend and frontend work for the same feature area, enabling early integration verification per phase."
|
|
103
|
+
> "Create a work plan from the following documents: PRD: [path] (Large Scale only), Design Doc (backend): [path], Design Doc (frontend): [path], UI Spec: [path] (if exists). Test skeletons from acceptance-test-generator: integration: [path or null], fixtureE2e: [path or null], serviceE2e: [path or null], e2eAbsenceReason: { fixtureE2e: [value or null], serviceE2e: [value or null] }. Compose phases as vertical feature slices where possible -- each phase should contain both backend and frontend work for the same feature area, enabling early integration verification per phase. Include `Implementation Readiness: pending` in the work plan header."
|
|
104
104
|
|
|
105
105
|
work-planner's existing Integration Complete criteria naturally covers cross-layer verification when given multiple Design Docs.
|
|
106
106
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
skills:
|
|
5
5
|
coding-rules:
|
|
6
6
|
skill: "coding-rules"
|
|
7
|
-
tags: [implementation, code-quality, refactoring, clean-code, maintainability, function-design, error-handling, parameterized-dependencies, performance, security]
|
|
7
|
+
tags: [implementation, code-quality, refactoring, clean-code, maintainability, function-design, error-handling, parameterized-dependencies, reference-representativeness, performance, security]
|
|
8
8
|
typical-use: "Language-agnostic code creation, modification, and refactoring principles applicable to all programming languages"
|
|
9
9
|
size: medium
|
|
10
10
|
key-references:
|
|
@@ -14,23 +14,25 @@ skills:
|
|
|
14
14
|
- "Refactoring - Martin Fowler"
|
|
15
15
|
- "Single Responsibility Principle - SOLID"
|
|
16
16
|
sections:
|
|
17
|
+
- "Language-Specific References"
|
|
17
18
|
- "Core Philosophy [MANDATORY]"
|
|
18
19
|
- "Code Quality [MANDATORY]"
|
|
19
20
|
- "Function Design [MANDATORY]"
|
|
20
21
|
- "Error Handling [MANDATORY]"
|
|
21
22
|
- "Dependency Management"
|
|
23
|
+
- "Reference Representativeness"
|
|
22
24
|
- "Performance"
|
|
23
25
|
- "Code Organization"
|
|
24
26
|
- "Commenting Principles"
|
|
25
27
|
- "Refactoring [SAFE CHANGE PROTOCOL]"
|
|
26
|
-
- "Security
|
|
28
|
+
- "Security"
|
|
27
29
|
- "Version Control [MANDATORY]"
|
|
28
30
|
references:
|
|
29
31
|
- "references/typescript.md"
|
|
30
32
|
|
|
31
33
|
testing:
|
|
32
34
|
skill: "testing"
|
|
33
|
-
tags: [testing, tdd, quality, unit-testing, integration-testing, e2e-testing, test-design, coverage, mocking, test-independence, ci-cd, test-quality-criteria]
|
|
35
|
+
tags: [testing, tdd, quality, unit-testing, integration-testing, e2e-testing, data-layer-testing, test-design, coverage, mocking, test-independence, ci-cd, test-quality-criteria]
|
|
34
36
|
typical-use: "Universal testing principles, TDD practice, test quality criteria, test creation and quality assurance for all programming languages"
|
|
35
37
|
size: large
|
|
36
38
|
key-references:
|
|
@@ -39,6 +41,7 @@ skills:
|
|
|
39
41
|
- "AAA Pattern - Arrange-Act-Assert"
|
|
40
42
|
- "Test Pyramid - Mike Cohn"
|
|
41
43
|
sections:
|
|
44
|
+
- "Language-Specific References"
|
|
42
45
|
- "Core Testing Philosophy"
|
|
43
46
|
- "TDD Process [MANDATORY for all code changes]"
|
|
44
47
|
- "Quality Requirements [MANDATORY]"
|
|
@@ -46,6 +49,7 @@ skills:
|
|
|
46
49
|
- "Test Design Principles"
|
|
47
50
|
- "Test Independence"
|
|
48
51
|
- "Mocking and Test Doubles"
|
|
52
|
+
- "Data Layer Testing"
|
|
49
53
|
- "Test Quality Practices [MANDATORY]"
|
|
50
54
|
- "What to Test"
|
|
51
55
|
- "Test Quality Criteria [MANDATORY]"
|
|
@@ -68,11 +72,13 @@ skills:
|
|
|
68
72
|
- "DRY Principle - The Pragmatic Programmer"
|
|
69
73
|
- "YAGNI Principle - Extreme Programming"
|
|
70
74
|
sections:
|
|
75
|
+
- "Language-Specific References"
|
|
71
76
|
- "Technical Anti-patterns (Red Flag Patterns) [MANDATORY]"
|
|
72
77
|
- "Fail-Fast Fallback Design Principles"
|
|
73
78
|
- "Rule of Three - Criteria for Code Duplication"
|
|
74
79
|
- "Common Failure Patterns and Avoidance Methods"
|
|
75
80
|
- "Debugging Techniques"
|
|
81
|
+
- "Quality Assurance Mechanism Awareness"
|
|
76
82
|
- "Quality Check Workflow [MANDATORY]"
|
|
77
83
|
- "Situations Requiring Technical Decisions"
|
|
78
84
|
- "Implementation Completeness Assurance"
|
|
@@ -117,7 +123,7 @@ skills:
|
|
|
117
123
|
|
|
118
124
|
integration-e2e-testing:
|
|
119
125
|
skill: "integration-e2e-testing"
|
|
120
|
-
tags: [testing, integration-testing, e2e-testing, test-design, behavior-first, roi, test-skeleton, ears-format]
|
|
126
|
+
tags: [testing, integration-testing, e2e-testing, fixture-e2e, service-integration-e2e, e2e-absence-reason, test-design, behavior-first, roi, test-skeleton, ears-format]
|
|
121
127
|
typical-use: "Integration and E2E test design principles, value-based test selection, behavior-first approach, test skeleton specification"
|
|
122
128
|
size: medium
|
|
123
129
|
key-references:
|
|
@@ -136,7 +142,7 @@ skills:
|
|
|
136
142
|
|
|
137
143
|
subagents-orchestration-guide:
|
|
138
144
|
skill: "subagents-orchestration-guide"
|
|
139
|
-
tags: [orchestration, workflow, subagents, autonomous-execution, planning, design-flow, implementation-flow]
|
|
145
|
+
tags: [orchestration, workflow, subagents, context-isolation, autonomous-execution, planning, design-flow, implementation-flow, implementation-readiness, readiness-gate]
|
|
140
146
|
typical-use: "Orchestrating subagents through implementation workflows, scale determination, stop points, autonomous execution mode"
|
|
141
147
|
size: large
|
|
142
148
|
key-references:
|
|
@@ -152,6 +158,8 @@ skills:
|
|
|
152
158
|
- "Explicit Stop Points [MANDATORY]"
|
|
153
159
|
- "Scale Determination and Document Requirements"
|
|
154
160
|
- "Structured Response Specification"
|
|
161
|
+
- "Implementation Readiness Marker Contract"
|
|
162
|
+
- "Implementation Readiness Preflight Procedure"
|
|
155
163
|
- "Handling Requirement Changes"
|
|
156
164
|
- "Basic Flow for Work Planning"
|
|
157
165
|
- "Autonomous Execution Mode"
|
|
@@ -13,9 +13,8 @@ import userEvent from '@testing-library/user-event'
|
|
|
13
13
|
### Coverage Requirements
|
|
14
14
|
|
|
15
15
|
- **Overall minimum**: 60%
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
18
|
-
- **Organisms (Header, Footer)**: 60%+
|
|
16
|
+
- **Atomic Design projects**: Atoms 70%+, Molecules 65%+, Organisms 60%+
|
|
17
|
+
- **Other component architectures**: Keep 60% as the baseline and raise foundational or highly reused components to 70%+
|
|
19
18
|
- **Custom Hooks**: 65%+
|
|
20
19
|
- **Utils**: 70%+
|
|
21
20
|
|
|
@@ -58,7 +58,8 @@ Test type definitions, budgets, and value-based selection rules are specified in
|
|
|
58
58
|
|
|
59
59
|
Key points:
|
|
60
60
|
- **Integration Tests**: MAX 3 per feature, created alongside implementation
|
|
61
|
-
- **
|
|
61
|
+
- **fixture-e2e**: MAX 3 per feature, created alongside UI implementation, mocked backend / fixture-driven state
|
|
62
|
+
- **service-integration-e2e**: MAX 1-2 per feature, executed in final phase only, live local stack
|
|
62
63
|
|
|
63
64
|
## 4-Phase Generation Process
|
|
64
65
|
|
|
@@ -123,7 +124,7 @@ For each valid AC from Phase 1:
|
|
|
123
124
|
|
|
124
125
|
**Output**: Candidate pool with value metadata
|
|
125
126
|
|
|
126
|
-
### Phase 3: Value-Based Selection (Two-Pass #2)
|
|
127
|
+
### Phase 3: Value-Based Selection and Lane Assignment (Two-Pass #2)
|
|
127
128
|
|
|
128
129
|
Value score and E2E selection rules are defined in **integration-e2e-testing skill**.
|
|
129
130
|
|
|
@@ -138,14 +139,15 @@ Value score and E2E selection rules are defined in **integration-e2e-testing ski
|
|
|
138
139
|
3. **Push-Down Analysis**:
|
|
139
140
|
```
|
|
140
141
|
Can this be unit-tested? → Remove from integration/E2E pool
|
|
141
|
-
Already integration-tested
|
|
142
|
+
Already integration-tested AND verifiable in-process? → Remove from E2E pool
|
|
142
143
|
```
|
|
143
|
-
4. **
|
|
144
|
+
4. **Lane Assignment**:
|
|
144
145
|
```
|
|
145
|
-
|
|
146
|
-
|
|
146
|
+
UI journey verifiable with mocked backend / fixture-driven state → fixture-e2e
|
|
147
|
+
Journey correctness depends on real cross-service behavior → service-integration-e2e
|
|
148
|
+
Service-internal chain only → Not reserved-slot eligible
|
|
147
149
|
```
|
|
148
|
-
5. **Sort by Value Score** (descending order)
|
|
150
|
+
5. **Sort by Value Score within each lane** (descending order)
|
|
149
151
|
|
|
150
152
|
**Output**: Ranked, deduplicated candidate list
|
|
151
153
|
|
|
@@ -153,16 +155,19 @@ Value score and E2E selection rules are defined in **integration-e2e-testing ski
|
|
|
153
155
|
|
|
154
156
|
**Hard Limits per Feature**:
|
|
155
157
|
- **Integration Tests**: MAX 3 tests
|
|
156
|
-
- **
|
|
158
|
+
- **fixture-e2e**: MAX 3 tests
|
|
159
|
+
- **service-integration-e2e**: MAX 1-2 tests
|
|
157
160
|
|
|
158
161
|
**Selection Algorithm**:
|
|
159
162
|
|
|
160
163
|
```
|
|
161
164
|
1. Sort integration candidates by Value Score (descending)
|
|
162
165
|
2. Select up to 3 integration candidates
|
|
163
|
-
3. Reserve 1
|
|
164
|
-
4.
|
|
165
|
-
5.
|
|
166
|
+
3. Reserve 1 fixture-e2e slot for the highest-value user-facing multi-step journey, if one exists
|
|
167
|
+
4. Reserve 1 service-integration-e2e slot only when the journey needs real cross-service verification
|
|
168
|
+
5. Fill remaining fixture-e2e budget with candidates that satisfy `Value Score >= 20`
|
|
169
|
+
6. Fill remaining service-integration-e2e budget with candidates that satisfy `Value Score > 50`
|
|
170
|
+
7. If a lane emits no tests, return its generated file as `null` with a concrete lane-specific absence reason
|
|
166
171
|
```
|
|
167
172
|
|
|
168
173
|
**Output**: Final test set
|
|
@@ -198,24 +203,46 @@ Adapt comment syntax to the project's language when generating annotations.
|
|
|
198
203
|
[Test: 'AC1: Failed payment displays error without creating order']
|
|
199
204
|
```
|
|
200
205
|
|
|
201
|
-
###
|
|
206
|
+
### fixture-e2e Test File
|
|
202
207
|
|
|
203
208
|
```
|
|
204
|
-
// [Feature Name]
|
|
205
|
-
// Generated: [date] | Budget Used: 1/
|
|
206
|
-
// Test Type:
|
|
207
|
-
// Implementation Timing:
|
|
209
|
+
// [Feature Name] fixture-e2e Test - Design Doc: [filename]
|
|
210
|
+
// Generated: [date] | Budget Used: 1/3 fixture-e2e
|
|
211
|
+
// Test Type: Browser UI with mocked backend / fixture-driven state
|
|
212
|
+
// Implementation Timing: Alongside UI implementation
|
|
208
213
|
|
|
209
214
|
[Import statement using detected test framework]
|
|
210
215
|
|
|
211
216
|
[Test suite using detected framework syntax]
|
|
212
|
-
// User Journey:
|
|
213
|
-
// Value Score:
|
|
214
|
-
// Verification:
|
|
215
|
-
// @category: e2e
|
|
217
|
+
// User Journey: Dismiss card -> Undo banner appears -> Undo restores card
|
|
218
|
+
// Value Score: 60 | Business Value: 6 | Frequency: 7 | Defect Detection: 8
|
|
219
|
+
// Verification: Browser-visible state transitions with mocked backend state
|
|
220
|
+
// @category: fixture-e2e
|
|
221
|
+
// @lane: fixture-e2e
|
|
222
|
+
// @dependency: full-ui (mocked backend)
|
|
223
|
+
// @complexity: medium
|
|
224
|
+
[Test: 'User Journey: Dismiss and undo restores the card']
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### service-integration-e2e Test File
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
// [Feature Name] service-integration-e2e Test - Design Doc: [filename]
|
|
231
|
+
// Generated: [date] | Budget Used: 1/2 service-integration-e2e
|
|
232
|
+
// Test Type: End-to-end against running local stack
|
|
233
|
+
// Implementation Timing: Final phase only
|
|
234
|
+
|
|
235
|
+
[Import statement using detected test framework]
|
|
236
|
+
|
|
237
|
+
[Test suite using detected framework syntax]
|
|
238
|
+
// User Journey: Complete purchase flow (browse -> checkout -> payment -> confirmation persisted)
|
|
239
|
+
// Value Score: 120 | Business Value: 10 (business-critical) | Frequency: 10 (core flow) | Legal: true
|
|
240
|
+
// Verification: Order persists in DB and confirmation event is emitted
|
|
241
|
+
// @category: service-integration-e2e
|
|
242
|
+
// @lane: service-integration-e2e
|
|
216
243
|
// @dependency: full-system
|
|
217
244
|
// @complexity: high
|
|
218
|
-
[Test: 'User Journey: Complete product purchase
|
|
245
|
+
[Test: 'User Journey: Complete product purchase persists order and emits confirmation']
|
|
219
246
|
```
|
|
220
247
|
|
|
221
248
|
### Generation Report
|
|
@@ -226,13 +253,18 @@ Adapt comment syntax to the project's language when generating annotations.
|
|
|
226
253
|
"feature": "[feature name]",
|
|
227
254
|
"generatedFiles": {
|
|
228
255
|
"integration": "[path]/[feature].int.test.[ext]",
|
|
229
|
-
"
|
|
256
|
+
"fixtureE2e": null,
|
|
257
|
+
"serviceE2e": null
|
|
230
258
|
},
|
|
231
259
|
"budgetUsage": {
|
|
232
260
|
"integration": "2/3",
|
|
233
|
-
"
|
|
261
|
+
"fixtureE2e": "0/3",
|
|
262
|
+
"serviceE2e": "0/2"
|
|
234
263
|
},
|
|
235
|
-
"e2eAbsenceReason":
|
|
264
|
+
"e2eAbsenceReason": {
|
|
265
|
+
"fixtureE2e": "all_e2e_candidates_below_threshold",
|
|
266
|
+
"serviceE2e": "no_real_service_dependency"
|
|
267
|
+
}
|
|
236
268
|
}
|
|
237
269
|
```
|
|
238
270
|
|
|
@@ -242,13 +274,18 @@ Adapt comment syntax to the project's language when generating annotations.
|
|
|
242
274
|
"feature": "[feature name]",
|
|
243
275
|
"generatedFiles": {
|
|
244
276
|
"integration": "[path]/[feature].int.test.[ext]",
|
|
245
|
-
"
|
|
277
|
+
"fixtureE2e": "[path]/[feature].fixture.e2e.test.[ext]",
|
|
278
|
+
"serviceE2e": "[path]/[feature].service.e2e.test.[ext]"
|
|
246
279
|
},
|
|
247
280
|
"budgetUsage": {
|
|
248
281
|
"integration": "2/3",
|
|
249
|
-
"
|
|
282
|
+
"fixtureE2e": "1/3",
|
|
283
|
+
"serviceE2e": "1/2"
|
|
250
284
|
},
|
|
251
|
-
"e2eAbsenceReason":
|
|
285
|
+
"e2eAbsenceReason": {
|
|
286
|
+
"fixtureE2e": null,
|
|
287
|
+
"serviceE2e": null
|
|
288
|
+
}
|
|
252
289
|
}
|
|
253
290
|
```
|
|
254
291
|
|
|
@@ -256,8 +293,9 @@ Adapt comment syntax to the project's language when generating annotations.
|
|
|
256
293
|
|
|
257
294
|
Each test case MUST have the following standard annotations for test implementation planning:
|
|
258
295
|
|
|
259
|
-
- **@category**: core-functionality | integration | edge-case | ux
|
|
260
|
-
- **@
|
|
296
|
+
- **@category**: core-functionality | integration | edge-case | ux | fixture-e2e | service-integration-e2e
|
|
297
|
+
- **@lane**: integration | fixture-e2e | service-integration-e2e
|
|
298
|
+
- **@dependency**: none | [component names] | full-ui (mocked backend) | full-system
|
|
261
299
|
- **@complexity**: low | medium | high
|
|
262
300
|
|
|
263
301
|
These annotations are used when planning and prioritizing test implementation.
|
|
@@ -282,7 +320,7 @@ These annotations are used when planning and prioritizing test implementation.
|
|
|
282
320
|
|
|
283
321
|
### Auto-processable
|
|
284
322
|
- **Directory Absent**: Auto-create appropriate directory following detected test structure
|
|
285
|
-
- **No E2E Selected**: Valid outcome when accompanied by `e2eAbsenceReason`
|
|
323
|
+
- **No E2E Selected**: Valid outcome when accompanied by lane-specific `e2eAbsenceReason`
|
|
286
324
|
- **Budget Exceeded by Critical Test**: Report to user
|
|
287
325
|
|
|
288
326
|
### Escalation Required
|
|
@@ -316,7 +354,7 @@ These annotations are used when planning and prioritizing test implementation.
|
|
|
316
354
|
- **Post-execution**:
|
|
317
355
|
- Completeness of selected tests
|
|
318
356
|
- Dependency validity verified
|
|
319
|
-
- Integration tests and
|
|
357
|
+
- Integration tests, fixture-e2e tests, and service-integration-e2e tests generated in separate files when selected
|
|
320
358
|
- Generation report completeness
|
|
321
359
|
|
|
322
360
|
## Completion Gate [BLOCKING]
|