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
|
@@ -14,6 +14,8 @@ description: "Orchestrate full-cycle implementation across backend and frontend
|
|
|
14
14
|
5. [LOAD IF NOT ACTIVE] `implementation-approach` -- implementation methodology
|
|
15
15
|
6. [LOAD IF NOT ACTIVE] `subagents-orchestration-guide` -- agent coordination and workflow flows
|
|
16
16
|
|
|
17
|
+
**Spawn rule**: every `spawn_agent` call MUST pass `fork_turns="none"` or `fork_context=false` for context isolation.
|
|
18
|
+
|
|
17
19
|
## Orchestrator Definition
|
|
18
20
|
|
|
19
21
|
**Core Identity**: "I am not a worker. I am an orchestrator." (see subagents-orchestration-guide skill)
|
|
@@ -99,6 +101,7 @@ When user responds to questions:
|
|
|
99
101
|
**Required Flow Compliance**:
|
|
100
102
|
- Run quality-fixer (layer-appropriate) before every commit
|
|
101
103
|
- Obtain user approval before Edit/Write outside autonomous mode
|
|
104
|
+
- Run implementation readiness preflight for the approved work plan before autonomous implementation, or continue without it only after explicit user approval
|
|
102
105
|
|
|
103
106
|
ENFORCEMENT: Commits without quality-fixer approval are invalid and MUST be reverted.
|
|
104
107
|
|
|
@@ -115,6 +118,10 @@ ENFORCEMENT: Sub-agent prompts missing the constraint suffix MUST be re-issued w
|
|
|
115
118
|
|
|
116
119
|
## Task Execution Quality Cycle (Filename-Pattern-Based)
|
|
117
120
|
|
|
121
|
+
### Implementation Readiness Gate
|
|
122
|
+
|
|
123
|
+
Before executing task files, execute the Implementation Readiness Preflight Procedure from `subagents-orchestration-guide` for the approved work plan exact path. This means loading the work plan, evaluating R1-R5, resolving approved prep gaps through exact prep task files when needed, persisting the Readiness Report, and setting `Implementation Readiness: ready` or `escalated`. Then apply the Implementation Readiness Marker Contract before entering autonomous execution.
|
|
124
|
+
|
|
118
125
|
**Agent routing by task filename** (see monorepo-flow.md reference):
|
|
119
126
|
```
|
|
120
127
|
*-backend-task-* -> task-executor + quality-fixer
|
|
@@ -150,9 +157,10 @@ After all task cycles finish, collect all `filesModified` from every task-execut
|
|
|
150
157
|
### Test Information Communication
|
|
151
158
|
After acceptance-test-generator execution, when calling work-planner, communicate:
|
|
152
159
|
- Generated integration test file path
|
|
153
|
-
- Generated
|
|
154
|
-
-
|
|
155
|
-
-
|
|
160
|
+
- Generated fixture-e2e test file path or `null`
|
|
161
|
+
- Generated service-integration-e2e test file path or `null`
|
|
162
|
+
- E2E absence reason per lane when no E2E file is generated
|
|
163
|
+
- Explicit note that integration tests are created simultaneously with implementation, fixture-e2e runs alongside UI implementation, and service-integration-e2e executes after all implementations only when a service E2E file exists
|
|
156
164
|
|
|
157
165
|
**[STOP -- BLOCKING]** Upon detecting ANY requirement changes, halt execution immediately.
|
|
158
166
|
**CANNOT proceed until user explicitly confirms the change scope.**
|
|
@@ -8,6 +8,8 @@ description: "Orchestrate the complete implementation lifecycle from requirement
|
|
|
8
8
|
1. [LOAD IF NOT ACTIVE] `subagents-orchestration-guide` — agent coordination and workflow flows
|
|
9
9
|
2. [LOAD IF NOT ACTIVE] `documentation-criteria` — document creation rules and templates
|
|
10
10
|
|
|
11
|
+
**Spawn rule**: every `spawn_agent` call MUST pass `fork_turns="none"` or `fork_context=false` for context isolation.
|
|
12
|
+
|
|
11
13
|
# Full-Cycle Implementation
|
|
12
14
|
|
|
13
15
|
$ARGUMENTS
|
|
@@ -70,7 +72,10 @@ Follow subagents-orchestration-guide skill Large/Medium/Small scale flow exactly
|
|
|
70
72
|
**STEP 4**: Spawn acceptance-test-generator agent → spawn work-planner agent.
|
|
71
73
|
**[STOP — BLOCKING]** Present Work Plan for user approval. **CANNOT proceed until user explicitly confirms.**
|
|
72
74
|
|
|
73
|
-
**STEP 5**:
|
|
75
|
+
**STEP 5**: Run implementation readiness preflight.
|
|
76
|
+
Execute the Implementation Readiness Preflight Procedure from `subagents-orchestration-guide` for the approved work plan exact path. This means loading the work plan, evaluating R1-R5, resolving approved prep gaps through exact prep task files when needed, persisting the Readiness Report, and setting `Implementation Readiness: ready` or `escalated`. Apply the Implementation Readiness Marker Contract before entering autonomous execution.
|
|
77
|
+
|
|
78
|
+
**STEP 6**: Enter guided autonomous execution (see Autonomous Execution Mode below) using task-executor-frontend + quality-fixer-frontend agents.
|
|
74
79
|
|
|
75
80
|
---
|
|
76
81
|
|
|
@@ -88,6 +93,10 @@ Follow subagents-orchestration-guide `references/monorepo-flow.md` for the compl
|
|
|
88
93
|
|
|
89
94
|
After user grants "batch approval for entire implementation phase", enter autonomous execution.
|
|
90
95
|
|
|
96
|
+
### Implementation Readiness Gate
|
|
97
|
+
|
|
98
|
+
Before executing task files, read the associated work plan header and apply the Implementation Readiness Marker Contract from `subagents-orchestration-guide`.
|
|
99
|
+
|
|
91
100
|
### Task Execution Quality Cycle (4-Step Cycle per Task)
|
|
92
101
|
|
|
93
102
|
**Agent routing by task filename** (for fullstack projects):
|
|
@@ -134,9 +143,10 @@ After all task cycles finish, collect all `filesModified` from every executor re
|
|
|
134
143
|
### Test Information Communication
|
|
135
144
|
After acceptance-test-generator execution, when spawning work-planner, communicate:
|
|
136
145
|
- Generated integration test file path
|
|
137
|
-
- Generated
|
|
138
|
-
-
|
|
139
|
-
-
|
|
146
|
+
- Generated fixture-e2e test file path or `null`
|
|
147
|
+
- Generated service-integration-e2e test file path or `null`
|
|
148
|
+
- E2E absence reason per lane when no E2E file is generated
|
|
149
|
+
- Note: integration tests are created with implementation; fixture-e2e runs alongside UI implementation; service-integration-e2e runs after all implementations when a service E2E file exists
|
|
140
150
|
|
|
141
151
|
## Completion Criteria
|
|
142
152
|
|
|
@@ -9,6 +9,8 @@ description: "Create work plan from design document with optional test skeleton
|
|
|
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 planning phase.
|
|
13
15
|
|
|
14
16
|
## Orchestrator Definition
|
|
@@ -43,14 +45,14 @@ Follow the planning process below:
|
|
|
43
45
|
Check for existence of design documents in docs/design/, notify user if none exist.
|
|
44
46
|
Present options if multiple exist (can be specified with $ARGUMENTS).
|
|
45
47
|
|
|
46
|
-
### Step 2: E2E Test Skeleton Generation Confirmation
|
|
47
|
-
- Confirm with user whether to generate E2E test
|
|
48
|
+
### Step 2: Integration/E2E Test Skeleton Generation Confirmation
|
|
49
|
+
- Confirm with user whether to generate integration and E2E test skeletons first
|
|
48
50
|
- If user wants generation: Spawn acceptance-test-generator agent: "Generate test skeletons from Design Doc at [design-doc-path]"
|
|
49
51
|
- Pass generation results to next process according to subagents-orchestration-guide skill coordination specification
|
|
50
|
-
- If no E2E file is generated, carry the explicit `e2eAbsenceReason` forward as a valid planning input
|
|
52
|
+
- If no E2E file is generated for a lane, carry the explicit lane-specific `e2eAbsenceReason` forward as a valid planning input
|
|
51
53
|
|
|
52
54
|
### Step 3: Work Plan Creation
|
|
53
|
-
- Spawn work-planner agent: "Create work plan from design document at [design-doc-path]. Include deliverables from previous process according to subagents-orchestration-guide skill coordination specification. If `generatedFiles.
|
|
55
|
+
- Spawn work-planner agent: "Create work plan from design document at [design-doc-path]. Include deliverables from previous process according to subagents-orchestration-guide skill coordination specification. If `generatedFiles.fixtureE2e` or `generatedFiles.serviceE2e` is null, use the corresponding `e2eAbsenceReason` and accept the null E2E lane as a valid planning input. Include `Implementation Readiness: pending` in the work plan header."
|
|
54
56
|
- Interact with user to complete plan and obtain approval for plan content
|
|
55
57
|
- Clarify specific implementation steps and risks
|
|
56
58
|
|
|
@@ -59,7 +61,7 @@ Present options if multiple exist (can be specified with $ARGUMENTS).
|
|
|
59
61
|
## Completion Criteria
|
|
60
62
|
|
|
61
63
|
- [ ] Design document identified and selected
|
|
62
|
-
- [ ] E2E test skeleton generation confirmed with user (generated if requested)
|
|
64
|
+
- [ ] Integration/E2E test skeleton generation confirmed with user (generated if requested)
|
|
63
65
|
- [ ] Work plan created via work-planner
|
|
64
66
|
- [ ] Plan content approved by user
|
|
65
67
|
- [ ] All stopping points honored with user confirmation
|
|
@@ -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/`
|
|
@@ -9,6 +9,8 @@ description: "Generate PRD and Design Docs from existing codebase through discov
|
|
|
9
9
|
2. [LOAD IF NOT ACTIVE] `ai-development-guide` — AI development patterns
|
|
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**: Reverse engineering workflow to create documentation from existing code
|
|
13
15
|
|
|
14
16
|
Target: $ARGUMENTS
|
|
@@ -9,6 +9,8 @@ description: "Design Doc compliance and security validation with optional auto-f
|
|
|
9
9
|
2. [LOAD IF NOT ACTIVE] `testing` — test strategy and quality gates
|
|
10
10
|
3. [LOAD IF NOT ACTIVE] `ai-development-guide` — AI development patterns
|
|
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**: Post-implementation quality assurance
|
|
13
15
|
|
|
14
16
|
## Orchestrator Definition
|
|
@@ -21,7 +23,8 @@ description: "Design Doc compliance and security validation with optional auto-f
|
|
|
21
23
|
|
|
22
24
|
- Compliance validation -> Spawn code-reviewer agent
|
|
23
25
|
- Security validation -> Spawn security-reviewer agent
|
|
24
|
-
-
|
|
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
|
|
25
28
|
- Quality checks -> Spawn quality-fixer agent
|
|
26
29
|
- Re-validation -> Spawn code-reviewer / security-reviewer agents
|
|
27
30
|
|
|
@@ -80,22 +83,47 @@ Security Review: [status from security-reviewer]
|
|
|
80
83
|
- [policy] [location]: [description] — [rationale]
|
|
81
84
|
Notes: [notes from security-reviewer, if present]
|
|
82
85
|
|
|
83
|
-
|
|
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`
|
|
84
98
|
```
|
|
85
99
|
|
|
86
|
-
|
|
87
|
-
|
|
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.
|
|
104
|
+
|
|
105
|
+
**[STOP — BLOCKING]** Present results and recommended routes to user for confirmation.
|
|
106
|
+
**CANNOT proceed until user explicitly confirms routes.**
|
|
88
107
|
|
|
89
|
-
If
|
|
108
|
+
If all findings are skipped: Skip Steps 5-10, proceed to Step 11.
|
|
90
109
|
|
|
91
110
|
### Step 5: Prepare Fix Context
|
|
92
111
|
|
|
93
112
|
Reference documentation-criteria skill for task file template.
|
|
94
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
|
+
|
|
95
123
|
### Step 6: Create Task File
|
|
96
124
|
|
|
97
125
|
Create task file at `docs/plans/tasks/review-fixes-YYYYMMDD.md`
|
|
98
|
-
Include
|
|
126
|
+
Include only code-side compliance issues and security requiredFixes routed to `c`.
|
|
99
127
|
|
|
100
128
|
### Step 7: Execute Fixes
|
|
101
129
|
|
|
@@ -115,6 +143,8 @@ Spawn security-reviewer agent: "Re-validate security after fixes. Prior findings
|
|
|
115
143
|
|
|
116
144
|
### Step 11: Final Report
|
|
117
145
|
|
|
146
|
+
Delete the review-fix task file this recipe created, if present. Its work is committed; `docs/plans/` is ephemeral working state.
|
|
147
|
+
|
|
118
148
|
```
|
|
119
149
|
Code Compliance:
|
|
120
150
|
Initial: [X]%
|
|
@@ -7,6 +7,8 @@ description: "Execute tasks with metacognitive analysis and appropriate rule sel
|
|
|
7
7
|
|
|
8
8
|
1. [LOAD IF NOT ACTIVE] `task-analyzer` — task analysis and skill selection (rule-advisor handles remaining skill selection)
|
|
9
9
|
|
|
10
|
+
**Spawn rule**: every `spawn_agent` call MUST pass `fork_turns="none"` or `fork_context=false` for context isolation.
|
|
11
|
+
|
|
10
12
|
# Task Execution with Metacognitive Analysis
|
|
11
13
|
|
|
12
14
|
Task: $ARGUMENTS
|
|
@@ -8,6 +8,8 @@ description: "Update existing design documents (Design Doc / PRD / ADR) with rev
|
|
|
8
8
|
1. [LOAD IF NOT ACTIVE] `documentation-criteria` — document creation rules and templates
|
|
9
9
|
2. [LOAD IF NOT ACTIVE] `subagents-orchestration-guide` — agent coordination and workflow flows
|
|
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**: Dedicated to updating existing design documents.
|
|
12
14
|
|
|
13
15
|
## Orchestrator Definition
|
|
@@ -5,6 +5,8 @@ description: "Guides subagent coordination through implementation workflows. Use
|
|
|
5
5
|
|
|
6
6
|
# Subagents Orchestration Guide
|
|
7
7
|
|
|
8
|
+
**Spawn rule**: every `spawn_agent` call MUST pass `fork_turns="none"` or `fork_context=false` for context isolation.
|
|
9
|
+
|
|
8
10
|
## Role: The Orchestrator
|
|
9
11
|
|
|
10
12
|
The orchestrator coordinates subagents. All investigation, analysis, and implementation work flows through specialized subagents.
|
|
@@ -119,27 +121,12 @@ Close a running subagent only when the user redirects the workflow, the orchestr
|
|
|
119
121
|
|
|
120
122
|
## How to Spawn Agents
|
|
121
123
|
|
|
122
|
-
Spawn agents using natural language prompts. Provide clear context about what the agent should accomplish.
|
|
123
|
-
|
|
124
|
-
### Spawn Examples
|
|
125
|
-
|
|
126
|
-
**requirement-analyzer**:
|
|
127
|
-
> "Analyze the following requirements and determine the work scale: [user requirements]. Perform requirement analysis and scale determination."
|
|
128
|
-
|
|
129
|
-
**codebase-analyzer**:
|
|
130
|
-
> "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."
|
|
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).
|
|
131
125
|
|
|
132
|
-
|
|
133
|
-
> "Execute the implementation task defined in docs/plans/tasks/[filename].md. Complete the implementation following TDD Red-Green-Refactor."
|
|
126
|
+
### Spawn Prompt Requirements
|
|
134
127
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
**document-reviewer**:
|
|
139
|
-
> "Review the document at [path] for quality and rule compliance. Check against documentation-criteria standards."
|
|
140
|
-
|
|
141
|
-
**design-sync**:
|
|
142
|
-
> "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.`
|
|
143
130
|
|
|
144
131
|
## Explicit Stop Points [MANDATORY]
|
|
145
132
|
|
|
@@ -203,7 +190,34 @@ Subagents respond in JSON format. The final response from each JSON-returning su
|
|
|
203
190
|
| `design-sync` | `sync_status` |
|
|
204
191
|
| `integration-test-reviewer` | `status`, `requiredFixes` |
|
|
205
192
|
| `security-reviewer` | `status`, `findings`, `notes`, `requiredFixes` |
|
|
206
|
-
| `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.
|
|
207
221
|
|
|
208
222
|
## Handling Requirement Changes
|
|
209
223
|
|
|
@@ -212,17 +226,7 @@ requirement-analyzer follows the "completely self-contained" principle and proce
|
|
|
212
226
|
|
|
213
227
|
#### How to Integrate Requirements
|
|
214
228
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
```yaml
|
|
218
|
-
Integration example:
|
|
219
|
-
Initial: "I want to create user management functionality"
|
|
220
|
-
Addition: "Permission management is also needed"
|
|
221
|
-
Result: "I want to create user management functionality. Permission management is also needed.
|
|
222
|
-
|
|
223
|
-
Initial requirement: I want to create user management functionality
|
|
224
|
-
Additional requirement: Permission management is also needed"
|
|
225
|
-
```
|
|
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.
|
|
226
230
|
|
|
227
231
|
### Update Mode for Document Generation Agents
|
|
228
232
|
Document generation agents (work-planner, technical-designer, prd-creator) can update existing documents in `update` mode.
|
|
@@ -346,11 +350,11 @@ Maximum retry count is 1 verification fix cycle. If any failed verifier still fa
|
|
|
346
350
|
| `codebase-analyzer` | `technical-designer*` | `Codebase Analysis`, including `focusAreas`, `dataModel`, `qualityAssurance`, `dataTransformationPipelines`, `limitations` |
|
|
347
351
|
| `technical-designer*` | `code-verifier` | Design Doc path |
|
|
348
352
|
| `code-verifier` | `document-reviewer` | `code_verification` JSON |
|
|
349
|
-
| `acceptance-test-generator` | `work-planner` | integration
|
|
353
|
+
| `acceptance-test-generator` | `work-planner` | `generatedFiles.integration`, `generatedFiles.fixtureE2e`, `generatedFiles.serviceE2e`, `e2eAbsenceReason: { fixtureE2e, serviceE2e }` |
|
|
350
354
|
| Design Doc | `work-planner` | Verification Strategy summary, Output Comparison details, implementation-relevant technical requirements, protected no-change boundaries |
|
|
351
355
|
|
|
352
356
|
Handoff rules:
|
|
353
|
-
- Verify generated integration and
|
|
357
|
+
- Verify generated integration, fixture-e2e, and service-integration-e2e file paths exist before passing them onward
|
|
354
358
|
- Escalate only when required outputs are missing without a valid absence reason
|
|
355
359
|
- Require work-planner to map every carried-forward technical requirement to a covering task or a justified `gap`
|
|
356
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
|
|