codex-workflows 0.4.10 → 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 +9 -0
- package/.agents/skills/recipe-build/SKILL.md +34 -5
- package/.agents/skills/recipe-design/SKILL.md +2 -0
- package/.agents/skills/recipe-diagnose/SKILL.md +2 -0
- package/.agents/skills/recipe-front-build/SKILL.md +34 -5
- package/.agents/skills/recipe-front-design/SKILL.md +2 -0
- package/.agents/skills/recipe-front-plan/SKILL.md +3 -1
- package/.agents/skills/recipe-front-review/SKILL.md +31 -11
- package/.agents/skills/recipe-fullstack-build/SKILL.md +34 -5
- package/.agents/skills/recipe-fullstack-implement/SKILL.md +11 -3
- package/.agents/skills/recipe-implement/SKILL.md +14 -4
- package/.agents/skills/recipe-plan/SKILL.md +7 -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-reverse-engineer/SKILL.md +2 -0
- package/.agents/skills/recipe-review/SKILL.md +36 -6
- package/.agents/skills/recipe-task/SKILL.md +2 -0
- package/.agents/skills/recipe-update-doc/SKILL.md +2 -0
- package/.agents/skills/subagents-orchestration-guide/SKILL.md +37 -33
- 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
|
@@ -59,7 +59,7 @@ function isUser(value: unknown): value is User {
|
|
|
59
59
|
- **Function Components (Mandatory)**: Official React recommendation, optimizable by modern tooling
|
|
60
60
|
- **Classes Prohibited**: Class components completely deprecated (Exception: Error Boundary)
|
|
61
61
|
- **Custom Hooks**: Standard pattern for logic reuse and dependency injection
|
|
62
|
-
- **Component Hierarchy**: Atoms > Molecules > Organisms > Templates > Pages
|
|
62
|
+
- **Component Hierarchy**: Follow the project's existing component architecture. Use Atoms > Molecules > Organisms > Templates > Pages only when the project adopts Atomic Design.
|
|
63
63
|
- **Co-location**: Place tests, styles, and related files alongside components
|
|
64
64
|
|
|
65
65
|
**State Management Patterns**
|
|
@@ -5,6 +5,7 @@ Type: feature|fix|refactor
|
|
|
5
5
|
Estimated Duration: X days
|
|
6
6
|
Estimated Impact: X files
|
|
7
7
|
Related Issue/PR: #XXX (if any)
|
|
8
|
+
Implementation Readiness: pending
|
|
8
9
|
|
|
9
10
|
## Related Documents
|
|
10
11
|
- Design Doc(s):
|
|
@@ -66,6 +67,24 @@ Map each Design Doc technical requirement to the task or phase that covers it. U
|
|
|
66
67
|
- Merge duplicate restatements of the same obligation from multiple DD sections into one row and cite the primary section in `DD Section`
|
|
67
68
|
- Keep `scope-boundary` rows concrete: name the protected file group, component boundary, contract, or workflow that must remain unchanged
|
|
68
69
|
|
|
70
|
+
## UI Spec Component -> Task Mapping
|
|
71
|
+
|
|
72
|
+
Include this section when a UI Spec is among the inputs. Map each UI component section to the task(s) that implement it so task-decomposer can pass the exact UI Spec context to executor tasks. Omit this section when no UI Spec exists.
|
|
73
|
+
|
|
74
|
+
| UI Spec Component (section heading) | States to Cover | Covered By Task(s) | Gap Status | Notes |
|
|
75
|
+
|-------------------------------------|-----------------|--------------------|------------|-------|
|
|
76
|
+
| [Use the UI Spec heading exactly as written, e.g. "Component: AlertCard"] | [default / loading / empty / error / partial] | [P1-T1, P2-T1] | covered | |
|
|
77
|
+
|
|
78
|
+
**Reference key rule**: The component identifier is the UI Spec section heading verbatim. Component headings must be unique within a UI Spec.
|
|
79
|
+
|
|
80
|
+
## Connection Map
|
|
81
|
+
|
|
82
|
+
Include this section when implementation crosses runtime, process, deployment, or service boundaries. Omit it when the change stays inside one runtime or only uses in-process package imports.
|
|
83
|
+
|
|
84
|
+
| Boundary | Caller / Producer | Callee / Consumer | Expected Signal | Covered By Task(s) |
|
|
85
|
+
|----------|-------------------|-------------------|-----------------|--------------------|
|
|
86
|
+
| [e.g. "web client -> API"] | [module/package initiating request or message] | [module/package receiving request or message] | [Observable evidence, e.g. HTTP 200 matching schema X] | [P1-T1, P1-T2] |
|
|
87
|
+
|
|
69
88
|
## Objective
|
|
70
89
|
[Why this change is necessary, what problem it solves]
|
|
71
90
|
|
|
@@ -59,6 +59,8 @@ Map PRD acceptance criteria to prototype references. Skip this section if no pro
|
|
|
59
59
|
|
|
60
60
|
### Component: [ComponentName]
|
|
61
61
|
|
|
62
|
+
> Component heading uniqueness: every `Component: [ComponentName]` heading must be unique within this UI Spec. Work plans and task decomposition reference components by exact heading text.
|
|
63
|
+
|
|
62
64
|
#### State x Display Matrix
|
|
63
65
|
|
|
64
66
|
List only states that actually exist for this component. Remove unused rows. Include fallback or degraded states only when explicitly required by the PRD or existing behavior.
|
|
@@ -7,14 +7,15 @@ description: "Integration and E2E test design principles, value-based selection,
|
|
|
7
7
|
|
|
8
8
|
## References
|
|
9
9
|
|
|
10
|
-
**E2E test design
|
|
10
|
+
**E2E test design**: See [references/e2e-design.md](references/e2e-design.md) for UI Spec-driven E2E test candidate selection and browser test architecture. Playwright is the default browser harness example; use the project's standard when different.
|
|
11
11
|
|
|
12
12
|
## Test Type Definition and Limits [MANDATORY]
|
|
13
13
|
|
|
14
|
-
| Test Type | Purpose | Scope | Limit per Feature | Implementation Timing |
|
|
15
|
-
|
|
16
|
-
| Integration | Verify component interactions | Partial system integration | MAX 3 | Created alongside implementation |
|
|
17
|
-
|
|
|
14
|
+
| Test Type | Purpose | Scope | External Deps | Limit per Feature | Implementation Timing |
|
|
15
|
+
|-----------|---------|-------|---------------|-------------------|----------------------|
|
|
16
|
+
| Integration | Verify component interactions in-process | Partial system integration | Project-local dependencies | MAX 3 | Created alongside implementation |
|
|
17
|
+
| fixture-e2e | Verify browser/user journey with controlled state | Browser UI + mocked backend or fixtures | No live stack required | MAX 3 | Created alongside UI implementation |
|
|
18
|
+
| service-integration-e2e | Verify live-stack cross-service correctness | Full local stack | Local services, DB, queues, stubs | MAX 1-2 | Executed in final phase only |
|
|
18
19
|
|
|
19
20
|
**ENFORCEMENT**: Exceeding test limits requires explicit justification
|
|
20
21
|
|
|
@@ -42,44 +43,53 @@ Value Score = (Business Value x User Frequency) + (Legal Requirement x 10) + Def
|
|
|
42
43
|
|
|
43
44
|
Use `Value Score` for ranking candidates of the same test type. Handle E2E cost through budget limits and reserved-slot rules instead of cost-division scoring.
|
|
44
45
|
|
|
45
|
-
### E2E
|
|
46
|
+
### E2E Lane Thresholds
|
|
46
47
|
|
|
47
|
-
- `
|
|
48
|
-
-
|
|
48
|
+
- `fixture-e2e threshold = Value Score >= 20` for non-reserved candidates
|
|
49
|
+
- `service-integration-e2e threshold = Value Score > 50` for non-reserved candidates
|
|
49
50
|
- Reserved-slot eligibility overrides the threshold when the candidate is the highest-value user-facing multi-step journey
|
|
50
51
|
|
|
52
|
+
The fixture-e2e threshold is lower because this lane uses mocked backend or fixture-driven state, avoids live-stack setup, and has a higher per-feature budget. The service-integration-e2e threshold stays higher because live-stack tests are slower, more brittle, and more expensive to maintain.
|
|
53
|
+
|
|
51
54
|
### Selection Rules
|
|
52
55
|
|
|
53
56
|
| Test Type | Ranking Basis | Selection Rule |
|
|
54
57
|
|-----------|---------------|----------------|
|
|
55
58
|
| Integration | Highest `Value Score` among integration candidates | Select up to budget |
|
|
56
|
-
|
|
|
59
|
+
| fixture-e2e | Highest `Value Score` among fixture-e2e candidates | Select reserved user-facing journey or candidates with `Value Score >= 20` |
|
|
60
|
+
| service-integration-e2e | Highest `Value Score` among service-integration-e2e candidates | Select reserved cross-service journey or candidates with `Value Score > 50` |
|
|
57
61
|
|
|
58
62
|
### E2E Candidate Rules
|
|
59
63
|
|
|
60
64
|
- Treat integration and E2E as complementary coverage layers
|
|
65
|
+
- Default browser-level user journeys to `fixture-e2e` when mocked backend or fixture-driven state can verify the behavior
|
|
66
|
+
- Promote to `service-integration-e2e` only when correctness depends on real cross-service behavior such as DB persistence, queue/event delivery, transactional consistency, or external service contract payloads
|
|
61
67
|
- Retain an E2E candidate when it validates a user-facing multi-step journey, even if integration tests partially cover the behavior
|
|
62
|
-
-
|
|
63
|
-
- Distinguish user-facing journeys from service-internal chains; reserved E2E coverage applies only to user-facing journeys
|
|
68
|
+
- Distinguish user-facing journeys from service-internal chains; reserved fixture-e2e coverage applies only to user-facing journeys
|
|
64
69
|
|
|
65
70
|
### Reserved E2E Slot
|
|
66
71
|
|
|
67
|
-
Reserve 1
|
|
72
|
+
Reserve 1 fixture-e2e slot for the highest-value user-facing multi-step journey when such a journey exists, even if it does not satisfy `Value Score >= 20`.
|
|
73
|
+
|
|
74
|
+
Reserve 1 service-integration-e2e slot only when that journey requires real cross-service verification that fixture-e2e cannot prove.
|
|
68
75
|
|
|
69
76
|
### E2E Absence Contract
|
|
70
77
|
|
|
71
78
|
When no E2E test is generated, downstream artifacts must treat that as an explicit decision, not an error. Carry:
|
|
72
|
-
- `generatedFiles.
|
|
73
|
-
- `
|
|
79
|
+
- `generatedFiles.fixtureE2e: null`
|
|
80
|
+
- `generatedFiles.serviceE2e: null`
|
|
81
|
+
- `e2eAbsenceReason.fixtureE2e`: one of `no_user_facing_multi_step_journey`, `all_e2e_candidates_below_threshold`, `covered_by_existing_e2e`, `budget_not_justified`
|
|
82
|
+
- `e2eAbsenceReason.serviceE2e`: one of the fixture reasons plus `no_real_service_dependency`
|
|
74
83
|
|
|
75
84
|
### E2E Selection Decision Table
|
|
76
85
|
|
|
77
86
|
| Condition | Result |
|
|
78
87
|
|-----------|--------|
|
|
79
|
-
| At least one user-facing multi-step journey exists | Reserve 1
|
|
80
|
-
|
|
|
81
|
-
| Remaining
|
|
82
|
-
|
|
|
88
|
+
| At least one user-facing multi-step journey exists | Reserve 1 fixture-e2e slot for the highest-value such journey |
|
|
89
|
+
| Journey correctness requires live cross-service behavior | Reserve or consider service-integration-e2e |
|
|
90
|
+
| Remaining fixture-e2e candidate has `Value Score >= 20` | Eligible for non-reserved fixture-e2e selection |
|
|
91
|
+
| Remaining service-integration-e2e candidate has `Value Score > 50` | Eligible for non-reserved service-integration-e2e selection |
|
|
92
|
+
| Existing E2E already covers the same journey | Exclude and use `covered_by_existing_e2e` if no lane remains |
|
|
83
93
|
|
|
84
94
|
## Test Skeleton Specification [MANDATORY]
|
|
85
95
|
|
|
@@ -90,8 +100,9 @@ Each test MUST include the following annotations:
|
|
|
90
100
|
```
|
|
91
101
|
// AC: [Original acceptance criteria text]
|
|
92
102
|
// Behavior: [Trigger] -> [Process] -> [Observable Result]
|
|
93
|
-
// @category: core-functionality | integration | edge-case | e2e
|
|
94
|
-
// @
|
|
103
|
+
// @category: core-functionality | integration | edge-case | fixture-e2e | service-integration-e2e
|
|
104
|
+
// @lane: integration | fixture-e2e | service-integration-e2e
|
|
105
|
+
// @dependency: none | [component names] | full-ui (mocked backend) | full-system
|
|
95
106
|
// @real-dependency: [component names] (optional)
|
|
96
107
|
// @complexity: low | medium | high
|
|
97
108
|
// Value Score: [score]
|
|
@@ -133,7 +144,9 @@ These annotations allow work-planner to create prerequisite tasks before E2E exe
|
|
|
133
144
|
## Test File Naming Convention
|
|
134
145
|
|
|
135
146
|
- Integration tests: `*.int.test.*` or `*.integration.test.*`
|
|
136
|
-
-
|
|
147
|
+
- fixture-e2e tests: `*.fixture.e2e.test.*`
|
|
148
|
+
- service-integration-e2e tests: `*.service.e2e.test.*`
|
|
149
|
+
- legacy E2E tests: `*.e2e.test.*`
|
|
137
150
|
|
|
138
151
|
The test runner or framework in the project determines the appropriate file extension.
|
|
139
152
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
# E2E Test Design
|
|
1
|
+
# E2E Test Design
|
|
2
2
|
|
|
3
3
|
## When to Create E2E Tests
|
|
4
4
|
|
|
5
|
-
E2E tests target
|
|
6
|
-
- Reserve 1
|
|
7
|
-
- Use `Value Score >=
|
|
5
|
+
E2E tests target critical user journeys that span multiple interaction boundaries or require browser-level verification. Apply the parent skill rules exactly:
|
|
6
|
+
- Reserve 1 fixture-e2e slot for the highest-value user-facing multi-step journey
|
|
7
|
+
- Use `Value Score >= 20` for additional fixture-e2e candidates
|
|
8
|
+
- Use service-integration-e2e only when correctness depends on real cross-service behavior
|
|
9
|
+
- Use `Value Score > 50` for additional service-integration-e2e candidates
|
|
8
10
|
|
|
9
11
|
### Candidate Sources
|
|
10
12
|
|
|
@@ -22,6 +24,7 @@ E2E tests target **critical user journeys** that span multiple pages or require
|
|
|
22
24
|
- Flows requiring real browser APIs (navigation, cookies, localStorage)
|
|
23
25
|
- Accessibility verification requiring actual DOM rendering
|
|
24
26
|
- Responsive behavior across viewports
|
|
27
|
+
- Live-stack verification where DB persistence, queue/event delivery, transaction consistency, or external service payloads are the behavior under test
|
|
25
28
|
|
|
26
29
|
**Exclude** (use integration tests instead):
|
|
27
30
|
- Single-component state changes (use RTL)
|
|
@@ -47,20 +50,22 @@ Preconditions: [Auth state, data state]
|
|
|
47
50
|
Verification Points:
|
|
48
51
|
- [What to assert at each step]
|
|
49
52
|
E2E Value Score: [calculated score]
|
|
53
|
+
Lane: fixture-e2e | service-integration-e2e
|
|
50
54
|
```
|
|
51
55
|
|
|
52
|
-
##
|
|
56
|
+
## Browser Test Architecture
|
|
53
57
|
|
|
54
58
|
### Page Object Pattern
|
|
55
59
|
|
|
56
|
-
Organize browser interactions through page objects for maintainability:
|
|
60
|
+
Organize browser interactions through page objects or the project's equivalent harness pattern for maintainability:
|
|
57
61
|
|
|
58
62
|
```
|
|
59
63
|
tests/
|
|
60
64
|
├── e2e/
|
|
61
65
|
│ ├── pages/ # Page objects
|
|
62
66
|
│ ├── fixtures/ # Test fixtures and helpers
|
|
63
|
-
│
|
|
67
|
+
│ ├── *.fixture.e2e.test.ts
|
|
68
|
+
│ └── *.service.e2e.test.ts
|
|
64
69
|
```
|
|
65
70
|
|
|
66
71
|
### Test Isolation
|
|
@@ -83,7 +88,8 @@ When UI Spec defines responsive behavior, test critical breakpoints:
|
|
|
83
88
|
## Budget Enforcement
|
|
84
89
|
|
|
85
90
|
Hard limits per feature (same as parent skill):
|
|
86
|
-
- **
|
|
87
|
-
-
|
|
88
|
-
- Generate
|
|
91
|
+
- **fixture-e2e**: MAX 3 tests
|
|
92
|
+
- **service-integration-e2e**: MAX 1-2 tests
|
|
93
|
+
- Generate the reserved fixture-e2e user journey when eligible
|
|
94
|
+
- Generate service-integration-e2e only when live cross-service behavior must be verified
|
|
89
95
|
- Prefer fewer, comprehensive journey tests over many granular tests
|
|
@@ -9,6 +9,8 @@ description: "Add integration/E2E tests to existing codebase using Design Docs."
|
|
|
9
9
|
2. [LOAD IF NOT ACTIVE] `integration-e2e-testing` — integration and E2E test patterns
|
|
10
10
|
3. [LOAD IF NOT ACTIVE] `documentation-criteria` — document creation rules and templates
|
|
11
11
|
|
|
12
|
+
**Spawn rule**: every `spawn_agent` call MUST pass `fork_turns="none"` or `fork_context=false` for context isolation.
|
|
13
|
+
|
|
12
14
|
**Context**: Test addition workflow for existing implementations
|
|
13
15
|
|
|
14
16
|
## Orchestrator Definition
|
|
@@ -169,3 +171,10 @@ ENFORCEMENT: Commits without quality-fixer approval are invalid.
|
|
|
169
171
|
- [ ] Tests reviewed via integration-test-reviewer (approved or fixes applied)
|
|
170
172
|
- [ ] Quality check passed via quality-fixer
|
|
171
173
|
- [ ] Test files committed
|
|
174
|
+
- [ ] Task files created by this recipe deleted from `docs/plans/tasks/`
|
|
175
|
+
|
|
176
|
+
## Final Cleanup
|
|
177
|
+
|
|
178
|
+
Before the completion report, delete only the integration-test task files this recipe created for the current run. Their work is committed; `docs/plans/` is ephemeral working state.
|
|
179
|
+
|
|
180
|
+
If cleanup fails, report the failed path but do not invalidate completed test work.
|
|
@@ -10,6 +10,8 @@ description: "Execute decomposed backend tasks in autonomous execution mode usin
|
|
|
10
10
|
3. [LOAD IF NOT ACTIVE] `ai-development-guide` — AI development patterns
|
|
11
11
|
4. [LOAD IF NOT ACTIVE] `subagents-orchestration-guide` — agent coordination and workflow flows
|
|
12
12
|
|
|
13
|
+
**Spawn rule**: every `spawn_agent` call MUST pass `fork_turns="none"` or `fork_context=false` for context isolation.
|
|
14
|
+
|
|
13
15
|
## Orchestrator Definition
|
|
14
16
|
|
|
15
17
|
**Core Identity**: "I am not a worker. I am an orchestrator." (see subagents-orchestration-guide skill)
|
|
@@ -27,8 +29,24 @@ Work plan: $ARGUMENTS
|
|
|
27
29
|
|
|
28
30
|
## Pre-execution Prerequisites
|
|
29
31
|
|
|
30
|
-
###
|
|
31
|
-
|
|
32
|
+
### Implementation Readiness Check
|
|
33
|
+
|
|
34
|
+
Before task processing, locate the work plan to gate against.
|
|
35
|
+
|
|
36
|
+
Resolution rule:
|
|
37
|
+
1. If `$ARGUMENTS` contains a work plan path, use that exact file and derive `{plan-name}` from its basename. This takes precedence over task-file mtimes.
|
|
38
|
+
2. If `$ARGUMENTS` is empty, list task files in `docs/plans/tasks/` matching the single-layer pattern `{plan-name}-task-*.md`.
|
|
39
|
+
3. Exclude `*-task-prep-*.md`, `_overview-*.md`, `*-phase*-completion.md`, `review-fixes-*.md`, and `integration-tests-*-task-*.md`.
|
|
40
|
+
4. If matching task files exist, infer `{plan-name}` from the most recent matching task file and use `docs/plans/{plan-name}.md`.
|
|
41
|
+
5. If no matching task files exist, use the most recent non-template work plan in `docs/plans/`.
|
|
42
|
+
|
|
43
|
+
Read the work plan header and apply the Implementation Readiness Marker Contract from `subagents-orchestration-guide`.
|
|
44
|
+
|
|
45
|
+
### Consumed Task Set
|
|
46
|
+
|
|
47
|
+
Compute the **Consumed Task Set** for this run: task files in `docs/plans/tasks/` matching `{plan-name}-task-*.md`, excluding `*-task-prep-*.md`, `_overview-*.md`, `*-phase*-completion.md`, `review-fixes-*.md`, and `integration-tests-*-task-*.md`.
|
|
48
|
+
|
|
49
|
+
Every subsequent reference to task files in this recipe uses this set, not an unrestricted `docs/plans/tasks/*.md` scan.
|
|
32
50
|
|
|
33
51
|
### Task Generation Decision Flow
|
|
34
52
|
|
|
@@ -36,8 +54,8 @@ Analyze task file existence state and determine the action required:
|
|
|
36
54
|
|
|
37
55
|
| State | Criteria | Next Action |
|
|
38
56
|
|-------|----------|-------------|
|
|
39
|
-
| Tasks exist |
|
|
40
|
-
| No tasks + plan exists |
|
|
57
|
+
| Tasks exist | Consumed Task Set is non-empty | User's execution instruction serves as batch approval -> Enter autonomous execution immediately |
|
|
58
|
+
| No tasks + plan exists | Consumed Task Set is empty but plan exists | Confirm with user -> spawn task-decomposer |
|
|
41
59
|
| Neither exists | No plan or task files | Error: Prerequisites not met |
|
|
42
60
|
|
|
43
61
|
## Task Decomposition Phase (Conditional)
|
|
@@ -56,7 +74,7 @@ Generate tasks from the work plan? (y/n):
|
|
|
56
74
|
Spawn task-decomposer agent: "Read work plan at docs/plans/[plan-name].md and decompose into atomic tasks. Output: Individual task files in docs/plans/tasks/. Granularity: 1 task = 1 commit = independently executable."
|
|
57
75
|
|
|
58
76
|
### 3. Verify Generation
|
|
59
|
-
|
|
77
|
+
Recompute the Consumed Task Set and verify it is non-empty.
|
|
60
78
|
|
|
61
79
|
## Pre-execution Checklist
|
|
62
80
|
|
|
@@ -121,6 +139,17 @@ After all task cycles finish, collect all `filesModified` from every task-execut
|
|
|
121
139
|
- Maximum retry count is 1 verification fix cycle; if any failed verifier still fails after re-run, escalate to the user
|
|
122
140
|
5. If both verifiers pass -> Proceed to completion report
|
|
123
141
|
|
|
142
|
+
## Final Cleanup
|
|
143
|
+
|
|
144
|
+
Before the completion report, delete only these files for the current `{plan-name}`:
|
|
145
|
+
- Every file in the Consumed Task Set
|
|
146
|
+
- `docs/plans/tasks/{plan-name}-phase*-completion.md`
|
|
147
|
+
- `docs/plans/tasks/_overview-{plan-name}.md`
|
|
148
|
+
|
|
149
|
+
Preserve the work plan itself.
|
|
150
|
+
|
|
151
|
+
If cleanup fails, report the failed path but do not invalidate completed implementation work.
|
|
152
|
+
|
|
124
153
|
**[STOP — BLOCKING]** Upon detecting ANY requirement changes, halt execution immediately.
|
|
125
154
|
**CANNOT proceed until user explicitly confirms the change scope.**
|
|
126
155
|
|
|
@@ -9,6 +9,8 @@ description: "Execute from requirement analysis to design document creation."
|
|
|
9
9
|
2. [LOAD IF NOT ACTIVE] `implementation-approach` — implementation strategy
|
|
10
10
|
3. [LOAD IF NOT ACTIVE] `subagents-orchestration-guide` — agent coordination and workflow flows
|
|
11
11
|
|
|
12
|
+
**Spawn rule**: every `spawn_agent` call MUST pass `fork_turns="none"` or `fork_context=false` for context isolation.
|
|
13
|
+
|
|
12
14
|
**Context**: Dedicated to the design phase.
|
|
13
15
|
|
|
14
16
|
## Orchestrator Definition
|
|
@@ -8,6 +8,8 @@ description: "Investigate problem, verify findings, and derive solutions through
|
|
|
8
8
|
1. [LOAD IF NOT ACTIVE] `ai-development-guide` — AI development patterns
|
|
9
9
|
2. [LOAD IF NOT ACTIVE] `coding-rules` — coding standards
|
|
10
10
|
|
|
11
|
+
**Spawn rule**: every `spawn_agent` call MUST pass `fork_turns="none"` or `fork_context=false` for context isolation.
|
|
12
|
+
|
|
11
13
|
**Context**: Diagnosis flow to identify concrete failure points and present solutions
|
|
12
14
|
|
|
13
15
|
Target problem: $ARGUMENTS
|
|
@@ -10,6 +10,8 @@ description: "Execute frontend tasks in autonomous execution mode using task-exe
|
|
|
10
10
|
3. [LOAD IF NOT ACTIVE] `ai-development-guide` -- AI development patterns
|
|
11
11
|
4. [LOAD IF NOT ACTIVE] `subagents-orchestration-guide` -- agent coordination and workflow flows
|
|
12
12
|
|
|
13
|
+
**Spawn rule**: every `spawn_agent` call MUST pass `fork_turns="none"` or `fork_context=false` for context isolation.
|
|
14
|
+
|
|
13
15
|
## Orchestrator Definition
|
|
14
16
|
|
|
15
17
|
**Core Identity**: "I am not a worker. I am an orchestrator." (see subagents-orchestration-guide skill)
|
|
@@ -27,8 +29,24 @@ Work plan: $ARGUMENTS
|
|
|
27
29
|
|
|
28
30
|
## Pre-execution Prerequisites
|
|
29
31
|
|
|
30
|
-
###
|
|
31
|
-
|
|
32
|
+
### Implementation Readiness Check
|
|
33
|
+
|
|
34
|
+
Before task processing, locate the work plan to gate against.
|
|
35
|
+
|
|
36
|
+
Resolution rule:
|
|
37
|
+
1. If `$ARGUMENTS` contains a work plan path, use that exact file and derive `{plan-name}` from its basename. This takes precedence over task-file mtimes.
|
|
38
|
+
2. If `$ARGUMENTS` is empty, list task files in `docs/plans/tasks/` matching `{plan-name}-frontend-task-*.md`.
|
|
39
|
+
3. Exclude `*-task-prep-*.md`, `_overview-*.md`, `*-phase*-completion.md`, `review-fixes-*.md`, and `integration-tests-*-task-*.md`.
|
|
40
|
+
4. If matching task files exist, infer `{plan-name}` from the most recent matching task file and use `docs/plans/{plan-name}.md`.
|
|
41
|
+
5. If no matching task files exist, use the most recent non-template work plan in `docs/plans/`.
|
|
42
|
+
|
|
43
|
+
Read the work plan header and apply the Implementation Readiness Marker Contract from `subagents-orchestration-guide`.
|
|
44
|
+
|
|
45
|
+
### Consumed Task Set
|
|
46
|
+
|
|
47
|
+
Compute the **Consumed Task Set** for this run: task files in `docs/plans/tasks/` matching `{plan-name}-frontend-task-*.md`, excluding `*-task-prep-*.md`, `_overview-*.md`, `*-phase*-completion.md`, `review-fixes-*.md`, and `integration-tests-*-task-*.md`.
|
|
48
|
+
|
|
49
|
+
Every subsequent reference to task files in this recipe uses this set, not an unrestricted `docs/plans/tasks/*.md` scan.
|
|
32
50
|
|
|
33
51
|
### Task Generation Decision Flow
|
|
34
52
|
|
|
@@ -36,8 +54,8 @@ Analyze task file existence state and determine the action required:
|
|
|
36
54
|
|
|
37
55
|
| State | Criteria | Next Action |
|
|
38
56
|
|-------|----------|-------------|
|
|
39
|
-
| Tasks exist |
|
|
40
|
-
| No tasks + plan exists |
|
|
57
|
+
| Tasks exist | Consumed Task Set is non-empty | User's execution instruction serves as batch approval -> Enter autonomous execution immediately |
|
|
58
|
+
| No tasks + plan exists | Consumed Task Set is empty but plan exists | Confirm with user -> spawn task-decomposer |
|
|
41
59
|
| Neither exists | No plan or task files | Error: Prerequisites not met |
|
|
42
60
|
|
|
43
61
|
## Task Decomposition Phase (Conditional)
|
|
@@ -56,7 +74,7 @@ Generate tasks from the work plan? (y/n):
|
|
|
56
74
|
Spawn task-decomposer agent: "Read work plan at docs/plans/[plan-name].md and decompose into atomic tasks. Output: Individual task files in docs/plans/tasks/. Granularity: 1 task = 1 commit = independently executable"
|
|
57
75
|
|
|
58
76
|
### 3. Verify Generation
|
|
59
|
-
|
|
77
|
+
Recompute the Consumed Task Set and verify it is non-empty.
|
|
60
78
|
|
|
61
79
|
## Pre-execution Checklist
|
|
62
80
|
|
|
@@ -129,6 +147,17 @@ After all task cycles finish, collect all `filesModified` from every task-execut
|
|
|
129
147
|
- Maximum retry count is 1 verification fix cycle; if any failed verifier still fails after re-run, escalate to the user
|
|
130
148
|
5. If both verifiers pass -> Proceed to completion report
|
|
131
149
|
|
|
150
|
+
## Final Cleanup
|
|
151
|
+
|
|
152
|
+
Before the completion report, delete only these files for the current `{plan-name}`:
|
|
153
|
+
- Every file in the Consumed Task Set
|
|
154
|
+
- `docs/plans/tasks/{plan-name}-phase*-completion.md`
|
|
155
|
+
- `docs/plans/tasks/_overview-{plan-name}.md`
|
|
156
|
+
|
|
157
|
+
Preserve the work plan itself.
|
|
158
|
+
|
|
159
|
+
If cleanup fails, report the failed path but do not invalidate completed implementation work.
|
|
160
|
+
|
|
132
161
|
**[STOP -- BLOCKING]** Upon detecting ANY requirement changes, halt execution immediately.
|
|
133
162
|
**CANNOT proceed until user explicitly confirms the change scope.**
|
|
134
163
|
|
|
@@ -11,6 +11,8 @@ description: "Execute from requirement analysis to frontend design document crea
|
|
|
11
11
|
2. [LOAD IF NOT ACTIVE] `implementation-approach` -- implementation methodology
|
|
12
12
|
3. [LOAD IF NOT ACTIVE] `subagents-orchestration-guide` -- agent coordination and workflow flows
|
|
13
13
|
|
|
14
|
+
**Spawn rule**: every `spawn_agent` call MUST pass `fork_turns="none"` or `fork_context=false` for context isolation.
|
|
15
|
+
|
|
14
16
|
## Orchestrator Definition
|
|
15
17
|
|
|
16
18
|
**Core Identity**: "I am not a worker. I am an orchestrator."
|
|
@@ -11,6 +11,8 @@ description: "Create frontend work plan from design document with test skeleton
|
|
|
11
11
|
2. [LOAD IF NOT ACTIVE] `implementation-approach` -- implementation methodology
|
|
12
12
|
3. [LOAD IF NOT ACTIVE] `subagents-orchestration-guide` -- agent coordination and workflow flows
|
|
13
13
|
|
|
14
|
+
**Spawn rule**: every `spawn_agent` call MUST pass `fork_turns="none"` or `fork_context=false` for context isolation.
|
|
15
|
+
|
|
14
16
|
## Orchestrator Definition
|
|
15
17
|
|
|
16
18
|
**Core Identity**: "I am not a worker. I am an orchestrator."
|
|
@@ -46,7 +48,7 @@ Check for existence of design documents in docs/design/.
|
|
|
46
48
|
Spawn acceptance-test-generator agent: "Generate test skeletons from Design Doc at [path]. [UI Spec at [ui-spec path] if exists.]"
|
|
47
49
|
|
|
48
50
|
### Step 3: Work Plan Creation
|
|
49
|
-
Spawn work-planner agent: "Create work plan from Design Doc at [path]. Integration test file: [path from step 2].
|
|
51
|
+
Spawn work-planner agent: "Create work plan from Design Doc at [path]. Integration test file: [path from step 2]. fixture-e2e test file: [path from step 2 or null]. service-integration-e2e test file: [path from step 2 or null]. E2E absence reasons by lane: [values from step 2 when an E2E lane is null]. Integration tests are created with each phase implementation, fixture-e2e runs alongside UI implementation, service-integration-e2e runs only in the final phase when a service E2E file exists. Include `Implementation Readiness: pending` in the work plan header."
|
|
50
52
|
|
|
51
53
|
**[STOP -- BLOCKING]** Interact with user to complete plan and obtain approval for plan content. Clarify specific implementation steps and risks.
|
|
52
54
|
**CANNOT proceed until user explicitly approves the work plan.**
|
|
@@ -11,12 +11,15 @@ description: "Frontend Design Doc compliance and security validation with option
|
|
|
11
11
|
2. [LOAD IF NOT ACTIVE] `testing` -- test strategy and quality gates
|
|
12
12
|
3. [LOAD IF NOT ACTIVE] `ai-development-guide` -- AI development patterns
|
|
13
13
|
|
|
14
|
+
**Spawn rule**: every `spawn_agent` call MUST pass `fork_turns="none"` or `fork_context=false` for context isolation.
|
|
15
|
+
|
|
14
16
|
## Execution Method
|
|
15
17
|
|
|
16
18
|
- Compliance validation -> performed by code-reviewer
|
|
17
19
|
- Security validation -> performed by security-reviewer
|
|
18
20
|
- Rule analysis -> performed by rule-advisor
|
|
19
|
-
-
|
|
21
|
+
- Code-side fix path -> performed by task-executor-frontend
|
|
22
|
+
- Design-side update path -> performed by technical-designer-frontend in update mode, then document-reviewer, then design-sync when multiple Design Docs exist
|
|
20
23
|
- Quality checks -> performed by quality-fixer-frontend
|
|
21
24
|
- Re-validation -> performed by code-reviewer / security-reviewer
|
|
22
25
|
|
|
@@ -78,28 +81,45 @@ Security Review: [status from security-reviewer]
|
|
|
78
81
|
- [policy] [location]: [description] — [rationale]
|
|
79
82
|
Notes: [notes from security-reviewer, if present]
|
|
80
83
|
|
|
81
|
-
|
|
84
|
+
Resolve discrepancies by route:
|
|
85
|
+
c) Code-side fix
|
|
86
|
+
d) Design-side update
|
|
87
|
+
s) Skip
|
|
88
|
+
|
|
89
|
+
Default: accept all recommended routes.
|
|
90
|
+
|
|
91
|
+
Accepted response formats:
|
|
92
|
+
- empty input -- accept every recommended route
|
|
93
|
+
- `all-recommended` -- accept every recommended route
|
|
94
|
+
- `all:c`, `all:d`, or `all:s` -- apply one route to every finding
|
|
95
|
+
- Per-finding routes, e.g. `F1:c, F2:d, F3:s`
|
|
82
96
|
```
|
|
83
97
|
|
|
84
|
-
|
|
85
|
-
|
|
98
|
+
Before presenting results, recommend a route for each finding:
|
|
99
|
+
- Use `d` when implementation intent matches the requirement but the Design Doc is stale or too narrow.
|
|
100
|
+
- Use `c` when code drifted from a still-correct Design Doc, or when the finding is reliability, security, or maintainability related.
|
|
101
|
+
- Use `s` only when the user explicitly accepts the current state without changes.
|
|
86
102
|
|
|
87
|
-
|
|
103
|
+
**[STOP -- BLOCKING]** Wait for user response on routes.
|
|
104
|
+
**CANNOT proceed with fixes or document updates without user approval.**
|
|
88
105
|
|
|
89
|
-
If
|
|
106
|
+
If all findings are skipped: Skip fix steps, proceed to Final Report.
|
|
90
107
|
|
|
91
108
|
## Pre-fix Metacognition
|
|
92
109
|
|
|
93
110
|
1. **Spawn rule-advisor agent**: "Analyze fixes needed. Code issues: $STEP_2_OUTPUT. Security findings: $STEP_3_OUTPUT. Determine root solutions vs symptomatic treatments."
|
|
94
|
-
2. **
|
|
95
|
-
3. **
|
|
96
|
-
4. **Spawn
|
|
97
|
-
5. **
|
|
98
|
-
6. **Re-validate
|
|
111
|
+
2. **Design-side update**: If any finding is routed to `d`, spawn technical-designer-frontend in update mode, then document-reviewer, then design-sync when multiple Design Docs exist. If both `d` and `c` routes exist, re-evaluate `c` findings against the updated Design Doc and drop any now satisfied.
|
|
112
|
+
3. **Register tasks**: Register work steps. Always include: first "Confirm skill constraints", final "Verify skill fidelity". Create task file -> `docs/plans/tasks/review-fixes-YYYYMMDD.md`. Include only code compliance issues and security requiredFixes routed to `c`.
|
|
113
|
+
4. **Spawn task-executor-frontend agent**: "Execute staged auto-fixes for [task-file-path]. Stop at 5 files."
|
|
114
|
+
5. **Spawn quality-fixer-frontend agent**: "Execute all frontend quality checks and confirm quality gate passage"
|
|
115
|
+
6. **Re-validate code-reviewer**: Spawn code-reviewer agent: "Re-validate compliance for [design-doc-path]. Prior issues: $STEP_2_OUTPUT. Measure improvement."
|
|
116
|
+
7. **Re-validate security-reviewer** (only if security fixes were applied): Spawn security-reviewer agent: "Re-validate security after fixes. Prior findings: $STEP_3_OUTPUT. Design Doc: [path]. Implementation files: [union of $STEP_1_FILES and task-executor-frontend filesModified from step 4, deduplicated]."
|
|
99
117
|
|
|
100
118
|
ENFORCEMENT: Auto-fixes MUST go through quality-fixer-frontend before re-validation. Skipping quality checks invalidates fixes.
|
|
101
119
|
|
|
102
120
|
### Final Report
|
|
121
|
+
Delete the review-fix task file this recipe created, if present. Its work is committed; `docs/plans/` is ephemeral working state.
|
|
122
|
+
|
|
103
123
|
```
|
|
104
124
|
Code Compliance:
|
|
105
125
|
Initial: [X]%
|
|
@@ -10,6 +10,8 @@ description: "Execute decomposed fullstack tasks with layer-aware agent routing
|
|
|
10
10
|
3. [LOAD IF NOT ACTIVE] `ai-development-guide` -- AI development patterns
|
|
11
11
|
4. [LOAD IF NOT ACTIVE] `subagents-orchestration-guide` -- agent coordination and workflow flows
|
|
12
12
|
|
|
13
|
+
**Spawn rule**: every `spawn_agent` call MUST pass `fork_turns="none"` or `fork_context=false` for context isolation.
|
|
14
|
+
|
|
13
15
|
## Orchestrator Definition
|
|
14
16
|
|
|
15
17
|
**Core Identity**: "I am not a worker. I am an orchestrator." (see subagents-orchestration-guide skill)
|
|
@@ -37,8 +39,24 @@ Work plan: $ARGUMENTS
|
|
|
37
39
|
|
|
38
40
|
## Pre-execution Prerequisites
|
|
39
41
|
|
|
40
|
-
###
|
|
41
|
-
|
|
42
|
+
### Implementation Readiness Check
|
|
43
|
+
|
|
44
|
+
Before task processing, locate the work plan to gate against.
|
|
45
|
+
|
|
46
|
+
Resolution rule:
|
|
47
|
+
1. If `$ARGUMENTS` contains a work plan path, use that exact file and derive `{plan-name}` from its basename. This takes precedence over task-file mtimes.
|
|
48
|
+
2. If `$ARGUMENTS` is empty, list task files in `docs/plans/tasks/` matching `{plan-name}-backend-task-*.md` or `{plan-name}-frontend-task-*.md`.
|
|
49
|
+
3. Exclude `*-task-prep-*.md`, `_overview-*.md`, `*-phase*-completion.md`, `review-fixes-*.md`, and `integration-tests-*-task-*.md`.
|
|
50
|
+
4. If matching task files exist, infer `{plan-name}` from the most recent matching task file and use `docs/plans/{plan-name}.md`.
|
|
51
|
+
5. If no matching task files exist, use the most recent non-template work plan in `docs/plans/`.
|
|
52
|
+
|
|
53
|
+
Read the work plan header and apply the Implementation Readiness Marker Contract from `subagents-orchestration-guide`.
|
|
54
|
+
|
|
55
|
+
### Consumed Task Set
|
|
56
|
+
|
|
57
|
+
Compute the **Consumed Task Set** for this run: task files in `docs/plans/tasks/` matching `{plan-name}-backend-task-*.md` or `{plan-name}-frontend-task-*.md`, excluding `*-task-prep-*.md`, `_overview-*.md`, `*-phase*-completion.md`, `review-fixes-*.md`, and `integration-tests-*-task-*.md`.
|
|
58
|
+
|
|
59
|
+
Every subsequent reference to task files in this recipe uses this set, not an unrestricted `docs/plans/tasks/*.md` scan.
|
|
42
60
|
|
|
43
61
|
### Task Generation Decision Flow
|
|
44
62
|
|
|
@@ -46,8 +64,8 @@ Analyze task file existence state and determine the action required:
|
|
|
46
64
|
|
|
47
65
|
| State | Criteria | Next Action |
|
|
48
66
|
|-------|----------|-------------|
|
|
49
|
-
| Tasks exist |
|
|
50
|
-
| No tasks + plan exists |
|
|
67
|
+
| Tasks exist | Consumed Task Set is non-empty | User's execution instruction serves as batch approval -> Enter autonomous execution immediately |
|
|
68
|
+
| No tasks + plan exists | Consumed Task Set is empty but plan exists | Confirm with user -> spawn task-decomposer |
|
|
51
69
|
| Neither exists | No plan or task files | Error: Prerequisites not met |
|
|
52
70
|
|
|
53
71
|
## Task Decomposition Phase (Conditional)
|
|
@@ -66,7 +84,7 @@ Generate tasks from the work plan? (y/n):
|
|
|
66
84
|
Spawn task-decomposer agent: "Read work plan at docs/plans/[plan-name].md and decompose into atomic tasks. Output: Individual task files in docs/plans/tasks/. Granularity: 1 task = 1 commit = independently executable. Use layer-aware naming: {plan}-backend-task-{n}.md, {plan}-frontend-task-{n}.md based on target file paths."
|
|
67
85
|
|
|
68
86
|
### 3. Verify Generation
|
|
69
|
-
|
|
87
|
+
Recompute the Consumed Task Set and verify it is non-empty.
|
|
70
88
|
|
|
71
89
|
## Pre-execution Checklist
|
|
72
90
|
|
|
@@ -139,6 +157,17 @@ After all task cycles finish, collect all `filesModified` from every task-execut
|
|
|
139
157
|
- Maximum retry count is 1 verification fix cycle; if any failed verifier still fails after re-run, escalate to the user
|
|
140
158
|
5. If all verifiers pass -> Proceed to completion report
|
|
141
159
|
|
|
160
|
+
## Final Cleanup
|
|
161
|
+
|
|
162
|
+
Before the completion report, delete only these files for the current `{plan-name}`:
|
|
163
|
+
- Every file in the Consumed Task Set
|
|
164
|
+
- `docs/plans/tasks/{plan-name}-phase*-completion.md`
|
|
165
|
+
- `docs/plans/tasks/_overview-{plan-name}.md`
|
|
166
|
+
|
|
167
|
+
Preserve the work plan itself.
|
|
168
|
+
|
|
169
|
+
If cleanup fails, report the failed path but do not invalidate completed implementation work.
|
|
170
|
+
|
|
142
171
|
**[STOP -- BLOCKING]** Upon detecting ANY requirement changes, halt execution immediately.
|
|
143
172
|
**CANNOT proceed until user explicitly confirms the change scope.**
|
|
144
173
|
|