codex-workflows 0.3.1 → 0.4.1
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/documentation-criteria/SKILL.md +25 -2
- package/.agents/skills/documentation-criteria/references/design-template.md +38 -0
- package/.agents/skills/documentation-criteria/references/plan-template.md +67 -10
- package/.agents/skills/documentation-criteria/references/task-template.md +8 -1
- package/.agents/skills/integration-e2e-testing/SKILL.md +4 -1
- package/.agents/skills/recipe-build/SKILL.md +1 -1
- package/.agents/skills/recipe-design/SKILL.md +22 -14
- package/.agents/skills/recipe-front-build/SKILL.md +1 -1
- package/.agents/skills/recipe-front-design/SKILL.md +7 -2
- package/.agents/skills/recipe-fullstack-build/SKILL.md +1 -1
- package/.agents/skills/recipe-fullstack-implement/SKILL.md +2 -0
- package/.agents/skills/recipe-implement/SKILL.md +2 -0
- package/.agents/skills/recipe-reverse-engineer/SKILL.md +2 -2
- package/.agents/skills/recipe-update-doc/SKILL.md +16 -5
- package/.agents/skills/subagents-orchestration-guide/SKILL.md +64 -41
- package/.agents/skills/subagents-orchestration-guide/references/monorepo-flow.md +45 -21
- package/.agents/skills/testing/SKILL.md +31 -0
- package/.codex/agents/acceptance-test-generator.toml +9 -2
- package/.codex/agents/code-verifier.toml +11 -4
- package/.codex/agents/codebase-analyzer.toml +193 -0
- package/.codex/agents/document-reviewer.toml +9 -0
- package/.codex/agents/integration-test-reviewer.toml +8 -7
- package/.codex/agents/task-decomposer.toml +16 -0
- package/.codex/agents/technical-designer-frontend.toml +28 -0
- package/.codex/agents/technical-designer.toml +21 -0
- package/.codex/agents/work-planner.toml +18 -4
- package/README.md +11 -5
- package/package.json +1 -1
|
@@ -71,16 +71,39 @@ description: "Documentation creation criteria for PRD, ADR, Design Doc, UI Spec,
|
|
|
71
71
|
**Includes**: Existing codebase analysis, technical approach, dependencies and constraints, interface/contract definitions, data flow, acceptance criteria, change impact map, code inspection evidence
|
|
72
72
|
**Excludes**: Why that technology was chosen (reference ADR), when/who to implement (reference Work Plan), detailed test strategy and test case selection (generated by acceptance-test-generator from acceptance criteria)
|
|
73
73
|
|
|
74
|
+
**Required Structural Elements**:
|
|
75
|
+
- Existing codebase analysis and code inspection evidence
|
|
76
|
+
- Technical approach and implementation approach decision
|
|
77
|
+
- Change impact map and interface/contract definitions
|
|
78
|
+
- Applicable standards with explicit/implicit classification
|
|
79
|
+
- Verification Strategy
|
|
80
|
+
- Correctness proof method
|
|
81
|
+
- Early verification point
|
|
82
|
+
- Minimal form allowed for low-risk or self-evident changes: concise entries or explicit `N/A` with rationale
|
|
83
|
+
Low-risk: changes affecting 1-2 files with no external contract, integration, or data-flow changes
|
|
84
|
+
Self-evident: internal-only refactoring with identical observable inputs and outputs
|
|
85
|
+
|
|
74
86
|
### Work Plan
|
|
75
87
|
**Purpose**: Implementation task management and progress tracking
|
|
76
|
-
**Includes**: Task breakdown, schedule estimates, test skeleton file paths,
|
|
88
|
+
**Includes**: Task breakdown, schedule estimates, test skeleton file paths, Verification Strategy summaries from each Design Doc, final Quality Assurance phase (required), progress records
|
|
77
89
|
**Excludes**: Technical rationale, design details
|
|
78
90
|
|
|
79
91
|
**Phase Division Criteria**:
|
|
92
|
+
|
|
93
|
+
**When Vertical Slice is selected**:
|
|
94
|
+
- Each phase represents one value unit and includes its own implementation and verification
|
|
95
|
+
- The earliest phase should contain the early verification point when defined
|
|
96
|
+
- Final phase is always Quality Assurance
|
|
97
|
+
|
|
98
|
+
**When Horizontal Slice is selected**:
|
|
80
99
|
1. **Phase 1: Foundation Implementation** - Contract definitions, interfaces, test preparation
|
|
81
100
|
2. **Phase 2: Core Feature Implementation** - Business logic, unit tests
|
|
82
101
|
3. **Phase 3: Integration Implementation** - External connections, presentation layer
|
|
83
|
-
4. **Phase
|
|
102
|
+
4. **Final Phase: Quality Assurance (Required)** - Acceptance criteria, all tests, quality checks
|
|
103
|
+
|
|
104
|
+
**When Hybrid is selected**:
|
|
105
|
+
- Combine vertical and horizontal phase structures as defined in the Design Doc
|
|
106
|
+
- Final phase is always Quality Assurance
|
|
84
107
|
|
|
85
108
|
## Creation Process [MANDATORY]
|
|
86
109
|
|
|
@@ -197,12 +197,50 @@ Invariants:
|
|
|
197
197
|
- [Conditions that remain unchanged before and after processing]
|
|
198
198
|
```
|
|
199
199
|
|
|
200
|
+
### Test Boundaries
|
|
201
|
+
|
|
202
|
+
#### Mock Boundary Decisions
|
|
203
|
+
|
|
204
|
+
| Dependency / Boundary | Test Level | Use Real Dependency | Isolation Method | Rationale |
|
|
205
|
+
|-----------------------|------------|---------------------|------------------|-----------|
|
|
206
|
+
| [Repository / API / queue / hook] | [integration / e2e] | [Yes / No] | [mock / fake / local test env / browser harness] | [Why this boundary should behave this way in tests] |
|
|
207
|
+
|
|
208
|
+
#### Data Layer Verification Strategy
|
|
209
|
+
|
|
210
|
+
- Data storage involved: [Yes / No]
|
|
211
|
+
- Schema or model references: [table / collection / model names or N/A]
|
|
212
|
+
- Real verification approach: [container DB / dedicated test DB / in-memory adapter / browser fixture / N/A]
|
|
213
|
+
- Query and repository coverage: [How repository, ORM, or query paths will be verified]
|
|
214
|
+
- Migration compatibility check: [How schema drift will be detected or why N/A]
|
|
215
|
+
|
|
200
216
|
### Field Propagation Map (When Fields Cross Boundaries)
|
|
201
217
|
|
|
202
218
|
| Field | Boundary | Status | Detail |
|
|
203
219
|
|-------|----------|--------|--------|
|
|
204
220
|
| [field name] | [Component A to B] | preserved / transformed / dropped | [logic or reason] |
|
|
205
221
|
|
|
222
|
+
## Verification Strategy
|
|
223
|
+
|
|
224
|
+
Verification Strategy defines what correctness means and how to prove it at design time. L1/L2/L3 (from implementation-approach) define task-level verification depth at execution time.
|
|
225
|
+
Use the minimal form only when the change is low-risk or the verification path is self-evident. Otherwise fill all fields concretely.
|
|
226
|
+
Low-risk: changes affecting 1-2 files with no external contract, integration, or data-flow changes.
|
|
227
|
+
Self-evident: internal-only refactoring with identical observable inputs and outputs.
|
|
228
|
+
|
|
229
|
+
### Correctness Proof Method
|
|
230
|
+
|
|
231
|
+
- **Correctness definition**: [What "correct" means for this change]
|
|
232
|
+
- **Target comparison**: [What is being compared or validated against what]
|
|
233
|
+
- **Verification method**: [How correctness will be verified]
|
|
234
|
+
- **Observable success indicator**: [What observable result proves the verification succeeded]
|
|
235
|
+
- **Verification timing**: [`phase_1` | `per_phase` | `integration_phase` | `final_phase`]
|
|
236
|
+
- **Timing note**: [Optional free-text clarification when the enum alone is insufficient]
|
|
237
|
+
|
|
238
|
+
### Early Verification Point
|
|
239
|
+
|
|
240
|
+
- **First verification target**: [The smallest unit that proves the approach works]
|
|
241
|
+
- **Success criteria**: [Observable outcome that proves correctness]
|
|
242
|
+
- **Failure response**: [What to do if early verification fails]
|
|
243
|
+
|
|
206
244
|
### State Transitions and Invariants (When Applicable)
|
|
207
245
|
|
|
208
246
|
```yaml
|
|
@@ -13,6 +13,25 @@ Related Issue/PR: #XXX (if any)
|
|
|
13
13
|
- ADR: [docs/adr/ADR-XXXX.md] (if any)
|
|
14
14
|
- PRD: [docs/prd/XXX.md] (if any)
|
|
15
15
|
|
|
16
|
+
## Verification Strategies (from Design Docs)
|
|
17
|
+
|
|
18
|
+
Repeat this block for each Design Doc when multiple Design Docs exist. Preserve each strategy's identity and source document path. Merge strategies only when the Design Docs explicitly define a shared one.
|
|
19
|
+
|
|
20
|
+
### Verification Strategy: [docs/design/XXX.md]
|
|
21
|
+
|
|
22
|
+
#### Correctness Proof Method
|
|
23
|
+
- **Correctness definition**: [extracted from Design Doc]
|
|
24
|
+
- **Target comparison**: [extracted from Design Doc]
|
|
25
|
+
- **Verification method**: [extracted from Design Doc]
|
|
26
|
+
- **Observable success indicator**: [extracted from Design Doc]
|
|
27
|
+
- **Verification timing**: [`phase_1` | `per_phase` | `integration_phase` | `final_phase`]
|
|
28
|
+
- **Timing note**: [optional clarification]
|
|
29
|
+
|
|
30
|
+
#### Early Verification Point
|
|
31
|
+
- **First verification target**: [extracted from Design Doc]
|
|
32
|
+
- **Success criteria**: [extracted from Design Doc]
|
|
33
|
+
- **Failure response**: [extracted from Design Doc]
|
|
34
|
+
|
|
16
35
|
## Objective
|
|
17
36
|
[Why this change is necessary, what problem it solves]
|
|
18
37
|
|
|
@@ -33,10 +52,46 @@ Related Issue/PR: #XXX (if any)
|
|
|
33
52
|
|
|
34
53
|
## Implementation Phases
|
|
35
54
|
|
|
36
|
-
|
|
55
|
+
Select one phase structure based on the implementation approach from the Design Doc.
|
|
56
|
+
Delete every unused option before finalizing the work plan. The final document must contain only the selected phase structure.
|
|
57
|
+
|
|
58
|
+
### Option A: Vertical Slice Phase Structure
|
|
37
59
|
|
|
38
|
-
|
|
39
|
-
|
|
60
|
+
Use when implementation approach is Vertical Slice. Each phase represents one value unit and includes its own verification.
|
|
61
|
+
|
|
62
|
+
### Phase 1: [Value Unit 1] (Estimated commits: X)
|
|
63
|
+
**Purpose**: [First slice that proves the approach works]
|
|
64
|
+
**Verification**: [Use the early verification point when applicable]
|
|
65
|
+
|
|
66
|
+
#### Tasks
|
|
67
|
+
- [ ] Task 1: Specific work content
|
|
68
|
+
- [ ] Task 2: Verification for this value unit
|
|
69
|
+
- [ ] Quality check: Implement staged quality checks (refer to ai-development-guide skill)
|
|
70
|
+
|
|
71
|
+
#### Phase Completion Criteria
|
|
72
|
+
- [ ] Early verification point passed
|
|
73
|
+
- [ ] [Functional completion criteria]
|
|
74
|
+
- [ ] [Quality completion criteria]
|
|
75
|
+
|
|
76
|
+
### Phase 2: [Value Unit 2] (Estimated commits: X)
|
|
77
|
+
**Purpose**: [Subsequent slice]
|
|
78
|
+
**Verification**: [Verification for this value unit]
|
|
79
|
+
|
|
80
|
+
#### Tasks
|
|
81
|
+
- [ ] Task 1: Specific work content
|
|
82
|
+
- [ ] Task 2: Verification for this value unit
|
|
83
|
+
- [ ] Quality check
|
|
84
|
+
|
|
85
|
+
#### Phase Completion Criteria
|
|
86
|
+
- [ ] [Functional completion criteria]
|
|
87
|
+
- [ ] [Quality completion criteria]
|
|
88
|
+
|
|
89
|
+
### Option B: Horizontal Slice Phase Structure
|
|
90
|
+
|
|
91
|
+
Use when implementation approach is Horizontal Slice. Phases follow Foundation -> Core -> Integration -> QA.
|
|
92
|
+
|
|
93
|
+
### Phase 1: [Foundation] (Estimated commits: X)
|
|
94
|
+
**Purpose**: Contract definitions, interfaces, test preparation
|
|
40
95
|
|
|
41
96
|
#### Tasks
|
|
42
97
|
- [ ] Task 1: Specific work content
|
|
@@ -48,26 +103,26 @@ Related Issue/PR: #XXX (if any)
|
|
|
48
103
|
- [ ] [Functional completion criteria]
|
|
49
104
|
- [ ] [Quality completion criteria]
|
|
50
105
|
|
|
51
|
-
### Phase 2: [
|
|
52
|
-
**Purpose**:
|
|
106
|
+
### Phase 2: [Core Feature] (Estimated commits: X)
|
|
107
|
+
**Purpose**: Business logic, unit tests
|
|
53
108
|
|
|
54
109
|
#### Tasks
|
|
55
110
|
- [ ] Task 1: Specific work content
|
|
56
111
|
- [ ] Task 2: Specific work content
|
|
57
|
-
- [ ] Quality check
|
|
112
|
+
- [ ] Quality check
|
|
58
113
|
- [ ] Integration tests: Verify overall feature functionality
|
|
59
114
|
|
|
60
115
|
#### Phase Completion Criteria
|
|
61
116
|
- [ ] [Functional completion criteria]
|
|
62
117
|
- [ ] [Quality completion criteria]
|
|
63
118
|
|
|
64
|
-
### Phase 3: [
|
|
65
|
-
**Purpose**:
|
|
119
|
+
### Phase 3: [Integration] (Estimated commits: X)
|
|
120
|
+
**Purpose**: External connections, presentation layer
|
|
66
121
|
|
|
67
122
|
#### Tasks
|
|
68
123
|
- [ ] Task 1: Specific work content
|
|
69
124
|
- [ ] Task 2: Specific work content
|
|
70
|
-
- [ ] Quality check
|
|
125
|
+
- [ ] Quality check
|
|
71
126
|
- [ ] Integration tests: Verify component coordination
|
|
72
127
|
|
|
73
128
|
#### Phase Completion Criteria
|
|
@@ -75,7 +130,9 @@ Related Issue/PR: #XXX (if any)
|
|
|
75
130
|
- [ ] [Quality completion criteria]
|
|
76
131
|
|
|
77
132
|
### Final Phase: Quality Assurance (Required) (Estimated commits: 1)
|
|
78
|
-
|
|
133
|
+
This phase is required for all implementation approaches.
|
|
134
|
+
|
|
135
|
+
**Purpose**: Cross-cutting quality assurance and Design Doc consistency verification
|
|
79
136
|
|
|
80
137
|
#### Tasks
|
|
81
138
|
- [ ] Verify all Design Doc acceptance criteria achieved
|
|
@@ -37,9 +37,16 @@ Brief observations recorded after reading Investigation Targets:
|
|
|
37
37
|
- [ ] Improve code (maintain passing tests)
|
|
38
38
|
- [ ] Confirm added tests still pass
|
|
39
39
|
|
|
40
|
+
## Operation Verification Methods
|
|
41
|
+
(Derived from Verification Strategy in the work plan)
|
|
42
|
+
- **Verification method**: [What to verify and how]
|
|
43
|
+
- **Success criteria**: [Observable outcome that proves correctness]
|
|
44
|
+
- **Failure response**: [What to do if verification fails]
|
|
45
|
+
- **Verification level**: [L1/L2/L3, per implementation-approach skill]
|
|
46
|
+
|
|
40
47
|
## Completion Criteria
|
|
41
48
|
- [ ] All added tests pass
|
|
42
|
-
- [ ] Operation verified
|
|
49
|
+
- [ ] Operation verified per Operation Verification Methods above
|
|
43
50
|
- [ ] Deliverables created (for research/design tasks)
|
|
44
51
|
|
|
45
52
|
## Notes
|
|
@@ -60,10 +60,13 @@ Each test MUST include the following annotations:
|
|
|
60
60
|
// Behavior: [Trigger] -> [Process] -> [Observable Result]
|
|
61
61
|
// @category: core-functionality | integration | edge-case | e2e
|
|
62
62
|
// @dependency: none | [component names] | full-system
|
|
63
|
+
// @real-dependency: [component names] (optional)
|
|
63
64
|
// @complexity: low | medium | high
|
|
64
65
|
// ROI: [score]
|
|
65
66
|
```
|
|
66
67
|
|
|
68
|
+
Adapt comment syntax to the project's language when generating or reviewing test skeletons.
|
|
69
|
+
|
|
67
70
|
### Verification Items (Optional)
|
|
68
71
|
|
|
69
72
|
When verification points need explicit enumeration:
|
|
@@ -110,7 +113,7 @@ The test runner or framework in the project determines the appropriate file exte
|
|
|
110
113
|
|-------|-------------------|
|
|
111
114
|
| Behavior Verification | No assertion for "observable result" in skeleton |
|
|
112
115
|
| Verification Item Coverage | Listed items not all covered by assertions |
|
|
113
|
-
| Mock Boundary |
|
|
116
|
+
| Mock Boundary | Real dependencies from `@real-dependency` are isolated away or internal components are mocked without rationale |
|
|
114
117
|
|
|
115
118
|
### Implementation Quality
|
|
116
119
|
|
|
@@ -90,7 +90,7 @@ ENFORCEMENT: Proceeding past a failed quality gate invalidates all subsequent wo
|
|
|
90
90
|
**MANDATORY suffix for ALL sub-agent prompts**:
|
|
91
91
|
```
|
|
92
92
|
[SYSTEM CONSTRAINT]
|
|
93
|
-
This agent operates within build skill scope. Use orchestrator
|
|
93
|
+
This agent operates within build skill scope. Use the task file as the primary instruction source. Use the active Design Doc or work plan only as supporting context when the task file references them. Constraints explicitly passed in this prompt by the orchestrator take precedence over supporting context. The agent's own role contract and required quality rules remain in force.
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
Autonomous sub-agents require scope constraints for stable execution. MUST append this constraint to every sub-agent prompt.
|
|
@@ -17,8 +17,9 @@ description: "Execute from requirement analysis to design document creation."
|
|
|
17
17
|
|
|
18
18
|
**Execution Protocol**:
|
|
19
19
|
1. **Spawn agents for all work** -- your role is to invoke sub-agents, pass data between them, and report results
|
|
20
|
-
2. **Follow subagents-orchestration-guide
|
|
21
|
-
-
|
|
20
|
+
2. **Follow the design flow defined in subagents-orchestration-guide**:
|
|
21
|
+
- Apply the scale-specific and layer-specific branches defined there, including PRD, ADR, and UI Spec steps when required
|
|
22
|
+
- Use `requirement-analyzer -> codebase-analyzer -> technical-designer -> code-verifier -> document-reviewer -> design-sync` as the core design-document path after prerequisite branches are resolved
|
|
22
23
|
- **[STOP — BLOCKING]** At every `[Stop: ...]` marker -> Present status to user for confirmation. **CANNOT proceed until user explicitly confirms.**
|
|
23
24
|
3. **Scope**: Complete when design documents receive approval
|
|
24
25
|
|
|
@@ -27,10 +28,14 @@ ENFORCEMENT: Skipping any quality gate invalidates the design output.
|
|
|
27
28
|
|
|
28
29
|
## Workflow Overview
|
|
29
30
|
|
|
31
|
+
Core design-document path after prerequisite branches such as PRD, ADR, or UI Spec are resolved:
|
|
32
|
+
|
|
30
33
|
```
|
|
31
34
|
Requirements -> requirement-analyzer -> [Stop: Scale determination]
|
|
32
35
|
|
|
|
33
|
-
|
|
36
|
+
codebase-analyzer
|
|
37
|
+
|
|
|
38
|
+
technical-designer -> code-verifier -> document-reviewer
|
|
34
39
|
|
|
|
35
40
|
design-sync -> [Stop: Design approval]
|
|
36
41
|
```
|
|
@@ -48,12 +53,7 @@ Requirements -> requirement-analyzer -> [Stop: Scale determination]
|
|
|
48
53
|
|
|
49
54
|
Requirements: $ARGUMENTS
|
|
50
55
|
|
|
51
|
-
|
|
52
|
-
- What problems do you want to solve?
|
|
53
|
-
- Expected outcomes and success criteria
|
|
54
|
-
- Relationship with existing systems
|
|
55
|
-
|
|
56
|
-
Once requirements are moderately clarified, analyze with requirement-analyzer and create appropriate design documents according to scale.
|
|
56
|
+
Pass the user requirements directly to requirement-analyzer as the first action. If clarification is needed, handle it at the requirement-analysis stop point before proceeding.
|
|
57
57
|
|
|
58
58
|
MUST clearly present design alternatives and trade-offs.
|
|
59
59
|
|
|
@@ -64,13 +64,19 @@ Execute the process below within design scope.
|
|
|
64
64
|
### Step 1: Requirement Analysis
|
|
65
65
|
Spawn requirement-analyzer agent: "Analyze the following requirements and determine scale: $ARGUMENTS"
|
|
66
66
|
|
|
67
|
-
### Step 2:
|
|
68
|
-
Spawn
|
|
67
|
+
### Step 2: Codebase Analysis
|
|
68
|
+
Spawn codebase-analyzer agent: "Analyze the existing codebase to provide evidence for Design Doc creation. requirement_analysis: [output from Step 1]. requirements: $ARGUMENTS"
|
|
69
|
+
|
|
70
|
+
### Step 3: Design Document Creation
|
|
71
|
+
Spawn technical-designer agent: "Create design document based on requirement analysis output and codebase analysis output. Include architecture decisions, component design, and acceptance criteria."
|
|
72
|
+
|
|
73
|
+
### Step 4: Code Verification
|
|
74
|
+
Spawn code-verifier agent: "Verify the design document against the current codebase. document_path: [output from Step 3]. doc_type: design-doc."
|
|
69
75
|
|
|
70
|
-
### Step
|
|
71
|
-
Spawn document-reviewer agent: "Review the design document created in the previous step. Verify completeness, consistency, and quality."
|
|
76
|
+
### Step 5: Document Review
|
|
77
|
+
Spawn document-reviewer agent: "Review the design document created in the previous step. Verify completeness, consistency, and quality. code_verification: [output from Step 4]"
|
|
72
78
|
|
|
73
|
-
### Step
|
|
79
|
+
### Step 6: Consistency Verification
|
|
74
80
|
Spawn design-sync agent: "Verify consistency of the design document with other existing design documents and project constraints."
|
|
75
81
|
|
|
76
82
|
**Note**: design-sync returns `sync_status: "SKIPPED"` when only 1 Design Doc exists. This is distinct from `NO_CONFLICTS` and MUST be reported as such to the user.
|
|
@@ -78,7 +84,9 @@ Spawn design-sync agent: "Verify consistency of the design document with other e
|
|
|
78
84
|
## Completion Criteria
|
|
79
85
|
|
|
80
86
|
- [ ] Spawned requirement-analyzer and determined scale
|
|
87
|
+
- [ ] Spawned codebase-analyzer and passed its findings into design creation
|
|
81
88
|
- [ ] Created appropriate design document (ADR or Design Doc) via technical-designer
|
|
89
|
+
- [ ] Spawned code-verifier and passed its findings into document review
|
|
82
90
|
- [ ] Spawned document-reviewer and addressed feedback
|
|
83
91
|
- [ ] Spawned design-sync for consistency verification
|
|
84
92
|
- [ ] Obtained user approval for design document
|
|
@@ -98,7 +98,7 @@ ENFORCEMENT: Proceeding past a failed quality gate invalidates all subsequent wo
|
|
|
98
98
|
**MANDATORY suffix for ALL sub-agent prompts**:
|
|
99
99
|
```
|
|
100
100
|
[SYSTEM CONSTRAINT]
|
|
101
|
-
This agent operates within build skill scope. Use orchestrator
|
|
101
|
+
This agent operates within build skill scope. Use the task file as the primary instruction source. Use the active Design Doc or work plan only as supporting context when the task file references them. Constraints explicitly passed in this prompt by the orchestrator take precedence over supporting context. The agent's own role contract and required quality rules remain in force.
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
Autonomous sub-agents require scope constraints for stable execution. MUST append this constraint to every sub-agent prompt.
|
|
@@ -17,8 +17,10 @@ description: "Execute from requirement analysis to frontend design document crea
|
|
|
17
17
|
|
|
18
18
|
**Execution Method**:
|
|
19
19
|
- Requirement analysis -> performed by requirement-analyzer
|
|
20
|
+
- Codebase analysis -> performed by codebase-analyzer
|
|
20
21
|
- UI Specification creation -> performed by ui-spec-designer
|
|
21
22
|
- Design document creation -> performed by technical-designer-frontend
|
|
23
|
+
- Design verification -> performed by code-verifier
|
|
22
24
|
- Document review -> performed by document-reviewer
|
|
23
25
|
|
|
24
26
|
Orchestrator spawns agents and passes structured data between them.
|
|
@@ -68,8 +70,10 @@ Then create the UI Specification:
|
|
|
68
70
|
### Step 3: Design Document Creation Phase
|
|
69
71
|
Create appropriate design documents according to scale determination:
|
|
70
72
|
- For ADR: Spawn technical-designer-frontend agent: "Create ADR for [technical decision]"
|
|
71
|
-
- For Design Doc: Spawn
|
|
72
|
-
- Spawn
|
|
73
|
+
- For Design Doc: Spawn codebase-analyzer agent first: "Analyze the existing codebase to provide evidence for frontend Design Doc creation. Focus on existing implementations, state paths, API integrations, and constraints the design should respect. requirement_analysis: [JSON from requirement-analyzer]. requirements: [original user requirements]. layer: frontend. target_paths: [frontend affected files and directories from requirement-analyzer]. focus_areas: component hierarchy, state management, UI interactions, data fetching."
|
|
74
|
+
- For Design Doc: Spawn technical-designer-frontend agent: "Create Design Doc based on requirements. Codebase Analysis: [JSON from codebase-analyzer]. UI Spec is at [ui-spec path]. Inherit component structure and state design from UI Spec."
|
|
75
|
+
- Spawn code-verifier agent: "Verify Design Doc against code. doc_type: design-doc. document_path: [document path]. verbose: false."
|
|
76
|
+
- Spawn document-reviewer agent: "Review the Design Doc for consistency and completeness. doc_type: DesignDoc. target: [document path]. mode: composite. code_verification: [JSON from code-verifier]"
|
|
73
77
|
|
|
74
78
|
**[STOP -- BLOCKING]** Present design alternatives and trade-offs, obtain user approval.
|
|
75
79
|
**CANNOT proceed until user explicitly approves the design document.**
|
|
@@ -80,6 +84,7 @@ ENFORCEMENT: Every stop point MUST be respected. Skipping user approval invalida
|
|
|
80
84
|
|
|
81
85
|
- [ ] Requirement analysis completed and approved
|
|
82
86
|
- [ ] UI Specification created and approved
|
|
87
|
+
- [ ] Codebase analysis completed before frontend Design Doc creation
|
|
83
88
|
- [ ] Design document created and approved
|
|
84
89
|
- [ ] All document reviews passed
|
|
85
90
|
|
|
@@ -108,7 +108,7 @@ ENFORCEMENT: Proceeding past a failed quality gate invalidates all subsequent wo
|
|
|
108
108
|
**MANDATORY suffix for ALL sub-agent prompts**:
|
|
109
109
|
```
|
|
110
110
|
[SYSTEM CONSTRAINT]
|
|
111
|
-
This agent operates within build skill scope. Use orchestrator
|
|
111
|
+
This agent operates within build skill scope. Use the task file as the primary instruction source. Use the active Design Docs or work plan only as supporting context when the task file references them. Constraints explicitly passed in this prompt by the orchestrator take precedence over supporting context. The agent's own role contract and required quality rules remain in force.
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
Autonomous sub-agents require scope constraints for stable execution. MUST append this constraint to every sub-agent prompt.
|
|
@@ -90,6 +90,8 @@ When user responds to questions:
|
|
|
90
90
|
- [ ] Identified current progress position
|
|
91
91
|
- [ ] Clarified next step
|
|
92
92
|
- [ ] Recognized stopping points
|
|
93
|
+
- [ ] codebase-analyzer included before each Design Doc creation
|
|
94
|
+
- [ ] code-verifier included before each Design Doc review
|
|
93
95
|
- [ ] **Environment check**: Can I execute per-task commit cycle?
|
|
94
96
|
- If commit capability unavailable -> Escalate before autonomous mode
|
|
95
97
|
- Other environments (tests, quality tools) -> Subagents will escalate
|
|
@@ -128,6 +128,8 @@ After acceptance-test-generator execution, when spawning work-planner, communica
|
|
|
128
128
|
- [ ] Requirement analysis completed and user-confirmed
|
|
129
129
|
- [ ] Layer routing determined (backend / frontend / fullstack)
|
|
130
130
|
- [ ] Correct workflow followed per layer routing
|
|
131
|
+
- [ ] codebase-analyzer included before Design Doc creation for Medium/Large flows
|
|
132
|
+
- [ ] code-verifier included before document-reviewer for Design Doc review
|
|
131
133
|
- [ ] All stopping points honored with user confirmation obtained
|
|
132
134
|
- [ ] Quality-fixer spawned before every commit
|
|
133
135
|
- [ ] All tasks committed or escalation completed
|
|
@@ -101,7 +101,7 @@ Spawn code-verifier agent: "Verify consistency between PRD and code implementati
|
|
|
101
101
|
|
|
102
102
|
**Required Input**: $STEP_3_OUTPUT (verification data from Step 3)
|
|
103
103
|
|
|
104
|
-
Spawn document-reviewer agent: "Review the following PRD considering code verification findings. doc_type: PRD. target: $STEP_2_OUTPUT. mode: composite.
|
|
104
|
+
Spawn document-reviewer agent: "Review the following PRD considering code verification findings. doc_type: PRD. target: $STEP_2_OUTPUT. mode: composite. code_verification: $STEP_3_OUTPUT. Additional Review Focus: Alignment between PRD claims and verification evidence, resolution recommendations for each discrepancy, completeness of undocumented feature coverage."
|
|
105
105
|
|
|
106
106
|
**Store output as**: `$STEP_4_OUTPUT`
|
|
107
107
|
|
|
@@ -208,7 +208,7 @@ Spawn code-verifier agent: "Verify consistency between Design Doc and code imple
|
|
|
208
208
|
|
|
209
209
|
**Required Input**: $STEP_8_OUTPUT (verification data from Step 8)
|
|
210
210
|
|
|
211
|
-
Spawn document-reviewer agent: "Review the following Design Doc considering code verification findings. doc_type: DesignDoc. target: $STEP_7_OUTPUT. mode: composite.
|
|
211
|
+
Spawn document-reviewer agent: "Review the following Design Doc considering code verification findings. doc_type: DesignDoc. target: $STEP_7_OUTPUT. mode: composite. code_verification: $STEP_8_OUTPUT. Parent PRD: $APPROVED_PRD_PATH. Additional Review Focus: Technical accuracy of documented interfaces, consistency with parent PRD scope, completeness of unit boundary definitions."
|
|
212
212
|
|
|
213
213
|
**Store output as**: `$STEP_9_OUTPUT`
|
|
214
214
|
|
|
@@ -32,8 +32,8 @@ ENFORCEMENT: Skipping document-reviewer risks propagating inconsistencies to dow
|
|
|
32
32
|
Target document -> [Stop: Confirm changes]
|
|
33
33
|
|
|
|
34
34
|
technical-designer / technical-designer-frontend / prd-creator (update mode)
|
|
35
|
-
|
|
|
36
|
-
document-reviewer -> [Stop: Review approval]
|
|
35
|
+
| (Design Doc only)
|
|
36
|
+
code-verifier -> document-reviewer -> [Stop: Review approval]
|
|
37
37
|
| (Design Doc only)
|
|
38
38
|
design-sync -> [Stop: Final approval]
|
|
39
39
|
```
|
|
@@ -107,13 +107,23 @@ Spawn [Update Agent from Step 2] agent: "Operation Mode: update. Existing Docume
|
|
|
107
107
|
|
|
108
108
|
### Step 5: Document Review [Stop]
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
For Design Doc updates, first verify the updated document against code:
|
|
111
|
+
|
|
112
|
+
Spawn code-verifier agent: "Verify the updated Design Doc against current code. doc_type: design-doc. document_path: [path from Step 1]. verbose: false."
|
|
112
113
|
|
|
113
|
-
|
|
114
|
+
**Store output as**: `$CODE_VERIFICATION_OUTPUT`
|
|
115
|
+
|
|
116
|
+
For Design Doc updates:
|
|
117
|
+
Spawn document-reviewer agent: "Review the following updated document. doc_type: DesignDoc. target: [path from Step 1]. mode: composite. code_verification: $CODE_VERIFICATION_OUTPUT. Focus on: Consistency of updated sections with rest of document, no contradictions introduced by changes, completeness of change history."
|
|
118
|
+
|
|
119
|
+
For PRD or ADR updates:
|
|
120
|
+
Spawn document-reviewer agent: "Review the following updated document. doc_type: [PRD or ADR]. target: [path from Step 1]. mode: composite. Focus on: Consistency of updated sections with rest of document, no contradictions introduced by changes, completeness of change history."
|
|
114
121
|
|
|
115
122
|
**Store output as**: `$STEP_5_OUTPUT`
|
|
116
123
|
|
|
124
|
+
**[STOP — BLOCKING]** Present review results to user for approval.
|
|
125
|
+
**CANNOT proceed until user explicitly confirms.**
|
|
126
|
+
|
|
117
127
|
**On review result**:
|
|
118
128
|
- Approved -> Proceed to Step 6
|
|
119
129
|
- Needs revision -> Return to Step 4 with review feedback (max 2 iterations):
|
|
@@ -151,6 +161,7 @@ For Design Doc, spawn design-sync agent: "Verify consistency of the updated Desi
|
|
|
151
161
|
- [ ] Identified target document
|
|
152
162
|
- [ ] Clarified change content with user
|
|
153
163
|
- [ ] Updated document via appropriate agent (update mode)
|
|
164
|
+
- [ ] Ran code-verifier before document-reviewer for Design Doc updates
|
|
154
165
|
- [ ] Spawned document-reviewer and addressed feedback
|
|
155
166
|
- [ ] Spawned design-sync for consistency verification (Design Doc only)
|
|
156
167
|
- [ ] Obtained user approval for updated document
|