codex-workflows 0.3.0 → 0.4.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/documentation-criteria/references/design-template.md +16 -0
- package/.agents/skills/documentation-criteria/references/task-template.md +9 -0
- package/.agents/skills/integration-e2e-testing/SKILL.md +17 -1
- package/.agents/skills/recipe-front-design/SKILL.md +7 -2
- 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 +43 -25
- 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 +5 -0
- package/.codex/agents/integration-test-reviewer.toml +8 -7
- package/.codex/agents/quality-fixer-frontend.toml +30 -4
- package/.codex/agents/quality-fixer.toml +30 -4
- package/.codex/agents/task-decomposer.toml +23 -2
- package/.codex/agents/task-executor-frontend.toml +46 -7
- package/.codex/agents/task-executor.toml +47 -8
- package/.codex/agents/technical-designer-frontend.toml +9 -0
- package/.codex/agents/technical-designer.toml +9 -0
- package/.codex/agents/work-planner.toml +22 -2
- package/README.md +11 -5
- package/package.json +1 -1
|
@@ -197,6 +197,22 @@ 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 |
|
|
@@ -13,8 +13,17 @@ Metadata:
|
|
|
13
13
|
- [ ] [Implementation file path]
|
|
14
14
|
- [ ] [Test file path]
|
|
15
15
|
|
|
16
|
+
## Investigation Targets
|
|
17
|
+
Files to read before starting implementation. Use concrete file paths, optionally with a section/function hint:
|
|
18
|
+
- [e.g., src/orders/checkout.ts (processOrder function)]
|
|
19
|
+
|
|
20
|
+
## Investigation Notes
|
|
21
|
+
Brief observations recorded after reading Investigation Targets:
|
|
22
|
+
- [path] - [interfaces, control/data flow, state transitions, side effects relevant to this task]
|
|
23
|
+
|
|
16
24
|
## Implementation Steps (TDD: Red-Green-Refactor)
|
|
17
25
|
### 1. Red Phase
|
|
26
|
+
- [ ] Read all Investigation Targets and update Investigation Notes
|
|
18
27
|
- [ ] Review dependency deliverables (if any)
|
|
19
28
|
- [ ] Verify/create contract definitions
|
|
20
29
|
- [ ] Write failing tests
|
|
@@ -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:
|
|
@@ -73,6 +76,19 @@ When verification points need explicit enumeration:
|
|
|
73
76
|
// - [Item 2]
|
|
74
77
|
```
|
|
75
78
|
|
|
79
|
+
### E2E Preconditions (Optional but Recommended)
|
|
80
|
+
|
|
81
|
+
When an E2E test requires environment setup, seed data, login state, or external dependency control, annotate it explicitly:
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
// Preconditions:
|
|
85
|
+
// - Seeded user with active subscription
|
|
86
|
+
// - Authenticated browser session
|
|
87
|
+
// - Payment provider mocked or available in local environment
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
These annotations allow work-planner to create prerequisite tasks before E2E execution.
|
|
91
|
+
|
|
76
92
|
## EARS Format Mapping
|
|
77
93
|
|
|
78
94
|
| EARS Keyword | Test Type | Generation Approach |
|
|
@@ -97,7 +113,7 @@ The test runner or framework in the project determines the appropriate file exte
|
|
|
97
113
|
|-------|-------------------|
|
|
98
114
|
| Behavior Verification | No assertion for "observable result" in skeleton |
|
|
99
115
|
| Verification Item Coverage | Listed items not all covered by assertions |
|
|
100
|
-
| Mock Boundary |
|
|
116
|
+
| Mock Boundary | Real dependencies from `@real-dependency` are isolated away or internal components are mocked without rationale |
|
|
101
117
|
|
|
102
118
|
### Implementation Quality
|
|
103
119
|
|
|
@@ -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
|
|
|
@@ -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
|
|
@@ -65,13 +65,15 @@ The following subagents are available:
|
|
|
65
65
|
|
|
66
66
|
### Document Creation Agents
|
|
67
67
|
6. **requirement-analyzer**: Requirement analysis and work scale determination
|
|
68
|
-
7. **
|
|
69
|
-
8. **
|
|
70
|
-
9. **
|
|
71
|
-
10. **
|
|
72
|
-
11. **
|
|
73
|
-
12. **
|
|
74
|
-
13. **
|
|
68
|
+
7. **codebase-analyzer**: Existing codebase analysis before Design Doc creation
|
|
69
|
+
8. **prd-creator**: Product Requirements Document creation
|
|
70
|
+
9. **ui-spec-designer**: UI Specification creation from PRD and optional prototype code (frontend/fullstack features)
|
|
71
|
+
10. **technical-designer**: ADR/Design Doc creation
|
|
72
|
+
11. **work-planner**: Work plan creation from Design Doc and test skeletons
|
|
73
|
+
12. **document-reviewer**: Single document quality and rule compliance check
|
|
74
|
+
13. **code-verifier**: Document-code consistency verification for review inputs
|
|
75
|
+
14. **design-sync**: Design Doc consistency verification across multiple documents
|
|
76
|
+
15. **acceptance-test-generator**: Generate integration and E2E test skeletons from Design Doc ACs
|
|
75
77
|
|
|
76
78
|
## Orchestration Principles
|
|
77
79
|
|
|
@@ -105,6 +107,9 @@ Spawn agents using natural language prompts. Provide clear context about what th
|
|
|
105
107
|
**requirement-analyzer**:
|
|
106
108
|
> "Analyze the following requirements and determine the work scale: [user requirements]. Perform requirement analysis and scale determination."
|
|
107
109
|
|
|
110
|
+
**codebase-analyzer**:
|
|
111
|
+
> "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."
|
|
112
|
+
|
|
108
113
|
**task-executor**:
|
|
109
114
|
> "Execute the implementation task defined in docs/plans/tasks/[filename].md. Complete the implementation following TDD Red-Green-Refactor."
|
|
110
115
|
|
|
@@ -175,9 +180,11 @@ All agents MUST use this vocabulary consistently:
|
|
|
175
180
|
|
|
176
181
|
Subagents respond in JSON format. The final response from each JSON-returning subagent must be the JSON payload itself, with no trailing prose. Key fields for orchestrator decisions:
|
|
177
182
|
- **requirement-analyzer**: scale, confidence, affectedLayers, adrRequired, scopeDependencies, questions
|
|
178
|
-
- **
|
|
179
|
-
- **
|
|
183
|
+
- **codebase-analyzer**: analysisScope, existingElements, dataModel, focusAreas, limitations
|
|
184
|
+
- **task-executor**: status (escalation_needed/completed), escalation_type (design_compliance_violation/similar_function_found/similar_component_found/investigation_target_not_found/out_of_scope_file/test_environment_not_ready), testsAdded, requiresTestReview
|
|
185
|
+
- **quality-fixer**: status (approved/blocked). For blocked responses, discriminate by `reason`: specification conflicts use `blockingIssues[]`; execution prerequisites use `missingPrerequisites[]`, and each item provides its own `resolutionSteps`
|
|
180
186
|
- **document-reviewer**: verdict.decision (approved/approved_with_conditions/needs_revision/rejected)
|
|
187
|
+
- **code-verifier**: summary, discrepancies, reverseCoverage
|
|
181
188
|
- **design-sync**: sync_status (CONFLICTS_FOUND/NO_CONFLICTS) — text format with [SUMMARY] block
|
|
182
189
|
- **integration-test-reviewer**: status (approved/needs_revision/blocked), requiredFixes
|
|
183
190
|
- **security-reviewer**: status (approved/approved_with_notes/needs_revision/blocked), findings, notes, requiredFixes
|
|
@@ -212,7 +219,7 @@ Document generation agents (work-planner, technical-designer, prd-creator) can u
|
|
|
212
219
|
|
|
213
220
|
When receiving new features or change requests, start with requirement-analyzer.
|
|
214
221
|
|
|
215
|
-
### Large Scale (6+ Files) -
|
|
222
|
+
### Large Scale (6+ Files) - 13 Steps (backend) / 15 Steps (frontend/fullstack)
|
|
216
223
|
|
|
217
224
|
1. requirement-analyzer: Requirement analysis + Check existing PRD **[Stop]**
|
|
218
225
|
2. prd-creator: PRD creation
|
|
@@ -221,24 +228,35 @@ When receiving new features or change requests, start with requirement-analyzer.
|
|
|
221
228
|
5. **(frontend/fullstack only)** document-reviewer: UI Spec review **[Stop: UI Spec Approval]**
|
|
222
229
|
6. technical-designer: ADR creation (if architecture/technology/data flow changes)
|
|
223
230
|
7. document-reviewer: ADR review (if ADR created) **[Stop: ADR Approval]**
|
|
224
|
-
8.
|
|
225
|
-
9.
|
|
226
|
-
10.
|
|
227
|
-
11.
|
|
228
|
-
12.
|
|
229
|
-
13.
|
|
231
|
+
8. codebase-analyzer: Codebase analysis (pass requirement-analyzer output and PRD path when available)
|
|
232
|
+
9. technical-designer: Design Doc creation
|
|
233
|
+
10. code-verifier: Design Doc verification against code
|
|
234
|
+
11. document-reviewer: Design Doc review with code verification evidence
|
|
235
|
+
12. design-sync: Consistency verification **[Stop: Design Doc Approval]**
|
|
236
|
+
13. acceptance-test-generator: Test skeleton generation, pass to work-planner
|
|
237
|
+
14. work-planner: Work plan creation **[Stop: Batch approval]**
|
|
238
|
+
15. task-decomposer: Autonomous execution to Completion report
|
|
230
239
|
|
|
231
|
-
### Medium Scale (3-5 Files) -
|
|
240
|
+
### Medium Scale (3-5 Files) - 9 Steps (backend) / 11 Steps (frontend/fullstack)
|
|
232
241
|
|
|
233
242
|
1. requirement-analyzer: Requirement analysis **[Stop]**
|
|
234
|
-
2.
|
|
235
|
-
3. **(frontend/fullstack only)**
|
|
236
|
-
4.
|
|
237
|
-
5.
|
|
238
|
-
6.
|
|
239
|
-
7.
|
|
240
|
-
8.
|
|
241
|
-
9.
|
|
243
|
+
2. codebase-analyzer: Codebase analysis
|
|
244
|
+
3. **(frontend/fullstack only)** Ask user for prototype code; ui-spec-designer: UI Spec creation
|
|
245
|
+
4. **(frontend/fullstack only)** document-reviewer: UI Spec review **[Stop: UI Spec Approval]**
|
|
246
|
+
5. technical-designer: Design Doc creation
|
|
247
|
+
6. code-verifier: Design Doc verification against code
|
|
248
|
+
7. document-reviewer: Design Doc review with code verification evidence
|
|
249
|
+
8. design-sync: Consistency verification **[Stop: Design Doc Approval]**
|
|
250
|
+
9. acceptance-test-generator: Test skeleton generation, pass to work-planner
|
|
251
|
+
10. work-planner: Work plan creation **[Stop: Batch approval]**
|
|
252
|
+
11. task-decomposer: Autonomous execution to Completion report
|
|
253
|
+
|
|
254
|
+
### Design Flow Data Passing
|
|
255
|
+
|
|
256
|
+
- Pass requirement-analyzer output and original requirements to codebase-analyzer
|
|
257
|
+
- Pass codebase-analyzer JSON to technical-designer or technical-designer-frontend as `Codebase Analysis`
|
|
258
|
+
- Pass Design Doc path to code-verifier
|
|
259
|
+
- Pass code-verifier JSON to document-reviewer as `code_verification`
|
|
242
260
|
|
|
243
261
|
### Small Scale (1-2 Files) - 2 Steps
|
|
244
262
|
|
|
@@ -10,7 +10,7 @@ This reference defines the orchestration flow for projects spanning multiple lay
|
|
|
10
10
|
|
|
11
11
|
## Design Phase
|
|
12
12
|
|
|
13
|
-
### Large Scale Fullstack (6+ Files) -
|
|
13
|
+
### Large Scale Fullstack (6+ Files) - 14 Steps
|
|
14
14
|
|
|
15
15
|
| Step | Agent | Purpose | Output |
|
|
16
16
|
|------|-------|---------|--------|
|
|
@@ -20,27 +20,35 @@ This reference defines the orchestration flow for projects spanning multiple lay
|
|
|
20
20
|
| 4 | (orchestrator) | Ask user for prototype code **[Stop]** | Prototype path or none |
|
|
21
21
|
| 5 | ui-spec-designer | UI Spec from PRD + optional prototype | UI Spec |
|
|
22
22
|
| 6 | document-reviewer | UI Spec review **[Stop]** | Approval |
|
|
23
|
-
| 7 |
|
|
24
|
-
| 8 | technical-designer
|
|
25
|
-
| 9 |
|
|
26
|
-
| 10 |
|
|
27
|
-
| 11 |
|
|
28
|
-
| 12 |
|
|
23
|
+
| 7 | codebase-analyzer x2 | Per-layer codebase analysis before Design Doc creation | Analysis JSON |
|
|
24
|
+
| 8 | technical-designer | **Backend** Design Doc | Backend Design Doc |
|
|
25
|
+
| 9 | technical-designer-frontend | **Frontend** Design Doc (references backend Integration Points + UI Spec) | Frontend Design Doc |
|
|
26
|
+
| 10 | code-verifier x2 | Verify each Design Doc against code | Verification JSON |
|
|
27
|
+
| 11 | document-reviewer x2 | Review each Design Doc with verification evidence | Reviews |
|
|
28
|
+
| 12 | design-sync | Cross-layer consistency verification (source: frontend Design Doc) **[Stop]** | Sync status |
|
|
29
|
+
| 13 | acceptance-test-generator | Integration/E2E test skeleton from cross-layer contracts | Test skeletons |
|
|
30
|
+
| 14 | work-planner | Work plan from all Design Docs **[Stop: Batch approval]** | Work plan |
|
|
29
31
|
|
|
30
|
-
### Medium Scale Fullstack (3-5 Files) -
|
|
32
|
+
### Medium Scale Fullstack (3-5 Files) - 12 Steps
|
|
31
33
|
|
|
32
34
|
| Step | Agent | Purpose | Output |
|
|
33
35
|
|------|-------|---------|--------|
|
|
34
36
|
| 1 | requirement-analyzer | Requirement analysis + scale determination **[Stop]** | Requirements + scale |
|
|
35
|
-
| 2 |
|
|
36
|
-
| 3 |
|
|
37
|
-
| 4 |
|
|
38
|
-
| 5 |
|
|
39
|
-
| 6 | technical-designer
|
|
40
|
-
| 7 |
|
|
41
|
-
| 8 |
|
|
42
|
-
| 9 |
|
|
43
|
-
| 10 |
|
|
37
|
+
| 2 | codebase-analyzer x2 | Per-layer codebase analysis before Design Doc creation | Analysis JSON |
|
|
38
|
+
| 3 | (orchestrator) | Ask user for prototype code **[Stop]** | Prototype path or none |
|
|
39
|
+
| 4 | ui-spec-designer | UI Spec from requirements + optional prototype | UI Spec |
|
|
40
|
+
| 5 | document-reviewer | UI Spec review **[Stop]** | Approval |
|
|
41
|
+
| 6 | technical-designer | **Backend** Design Doc | Backend Design Doc |
|
|
42
|
+
| 7 | technical-designer-frontend | **Frontend** Design Doc (references backend Integration Points + UI Spec) | Frontend Design Doc |
|
|
43
|
+
| 8 | code-verifier x2 | Verify each Design Doc against code | Verification JSON |
|
|
44
|
+
| 9 | document-reviewer x2 | Review each Design Doc with verification evidence | Reviews |
|
|
45
|
+
| 10 | design-sync | Cross-layer consistency verification (source: frontend Design Doc) **[Stop]** | Sync status |
|
|
46
|
+
| 11 | acceptance-test-generator | Integration/E2E test skeleton from cross-layer contracts | Test skeletons |
|
|
47
|
+
| 12 | work-planner | Work plan from all Design Docs **[Stop: Batch approval]** | Work plan |
|
|
48
|
+
|
|
49
|
+
### Parallelization in Multi-Agent Steps
|
|
50
|
+
|
|
51
|
+
Steps marked `x2` run independently per layer and can execute in parallel when supported.
|
|
44
52
|
|
|
45
53
|
### Layer Context in Design Doc Creation
|
|
46
54
|
|
|
@@ -48,19 +56,35 @@ When spawning Design Doc creation for each layer, pass explicit context:
|
|
|
48
56
|
|
|
49
57
|
**Large Scale (PRD available) -- Backend Design Doc**:
|
|
50
58
|
**Agent**: Spawn technical-designer
|
|
51
|
-
> "Create a backend Design Doc from PRD at [path]. Focus on: API contracts, data layer, business logic, service architecture."
|
|
59
|
+
> "Create a backend Design Doc from PRD at [path]. Codebase analysis: [backend analysis JSON]. Focus on: API contracts, data layer, business logic, service architecture."
|
|
60
|
+
|
|
61
|
+
**Large Scale (PRD available) -- Backend Codebase Analysis**:
|
|
62
|
+
**Agent**: Spawn codebase-analyzer
|
|
63
|
+
> "Analyze the existing codebase to provide evidence for backend Design Doc creation. requirement_analysis: [requirement-analyzer output filtered to backend files]. prd_path: [path]. requirements: [original user requirements]. layer: backend. target_paths: [backend file and directory scope]. focus_areas: API contracts, data layer, business logic, service architecture."
|
|
52
64
|
|
|
53
65
|
**Large Scale (PRD available) -- Frontend Design Doc**:
|
|
54
66
|
**Agent**: Spawn technical-designer-frontend
|
|
55
|
-
> "Create a frontend Design Doc from PRD at [path]. Reference backend Design Doc at [path] for API contracts and Integration Points. Reference UI Spec at [path] for component structure and state design. Focus on: component hierarchy, state management, UI interactions, data fetching."
|
|
67
|
+
> "Create a frontend Design Doc from PRD at [path]. Codebase analysis: [frontend analysis JSON]. Reference backend Design Doc at [path] for API contracts and Integration Points. Reference UI Spec at [path] for component structure and state design. Focus on: component hierarchy, state management, UI interactions, data fetching."
|
|
68
|
+
|
|
69
|
+
**Large Scale (PRD available) -- Frontend Codebase Analysis**:
|
|
70
|
+
**Agent**: Spawn codebase-analyzer
|
|
71
|
+
> "Analyze the existing codebase to provide evidence for frontend Design Doc creation. requirement_analysis: [requirement-analyzer output filtered to frontend files]. prd_path: [path]. requirements: [original user requirements]. layer: frontend. target_paths: [frontend file and directory scope]. focus_areas: component hierarchy, state management, UI interactions, data fetching."
|
|
56
72
|
|
|
57
73
|
**Medium Scale (no PRD) -- Backend Design Doc**:
|
|
58
74
|
**Agent**: Spawn technical-designer
|
|
59
|
-
> "Create a backend Design Doc based on the following requirements: [requirement-analyzer output]. Focus on: API contracts, data layer, business logic, service architecture."
|
|
75
|
+
> "Create a backend Design Doc based on the following requirements: [requirement-analyzer output]. Codebase analysis: [backend analysis JSON]. Focus on: API contracts, data layer, business logic, service architecture."
|
|
76
|
+
|
|
77
|
+
**Medium Scale (no PRD) -- Backend Codebase Analysis**:
|
|
78
|
+
**Agent**: Spawn codebase-analyzer
|
|
79
|
+
> "Analyze the existing codebase to provide evidence for backend Design Doc creation. requirement_analysis: [requirement-analyzer output filtered to backend files]. requirements: [original user requirements]. layer: backend. target_paths: [backend file and directory scope]. focus_areas: API contracts, data layer, business logic, service architecture."
|
|
60
80
|
|
|
61
81
|
**Medium Scale (no PRD) -- Frontend Design Doc**:
|
|
62
82
|
**Agent**: Spawn technical-designer-frontend
|
|
63
|
-
> "Create a frontend Design Doc based on the following requirements: [requirement-analyzer output]. Reference backend Design Doc at [path] for API contracts and Integration Points. Reference UI Spec at [path] for component structure and state design. Focus on: component hierarchy, state management, UI interactions, data fetching."
|
|
83
|
+
> "Create a frontend Design Doc based on the following requirements: [requirement-analyzer output]. Codebase analysis: [frontend analysis JSON]. Reference backend Design Doc at [path] for API contracts and Integration Points. Reference UI Spec at [path] for component structure and state design. Focus on: component hierarchy, state management, UI interactions, data fetching."
|
|
84
|
+
|
|
85
|
+
**Medium Scale (no PRD) -- Frontend Codebase Analysis**:
|
|
86
|
+
**Agent**: Spawn codebase-analyzer
|
|
87
|
+
> "Analyze the existing codebase to provide evidence for frontend Design Doc creation. requirement_analysis: [requirement-analyzer output filtered to frontend files]. requirements: [original user requirements]. layer: frontend. target_paths: [frontend file and directory scope]. focus_areas: component hierarchy, state management, UI interactions, data fetching."
|
|
64
88
|
|
|
65
89
|
### design-sync for Cross-Layer Verification
|
|
66
90
|
|
|
@@ -189,6 +189,37 @@ Test names should clearly describe:
|
|
|
189
189
|
- **Fake**: Simplified working implementation
|
|
190
190
|
- **Dummy**: Passed but never used
|
|
191
191
|
|
|
192
|
+
## Data Layer Testing
|
|
193
|
+
|
|
194
|
+
### Mock Limitations for Data Access
|
|
195
|
+
|
|
196
|
+
Mocks validate call patterns but do not validate schema correctness, query correctness, or storage constraints.
|
|
197
|
+
Examples of issues that mocks can miss:
|
|
198
|
+
- schema drift
|
|
199
|
+
- column or field mismatches
|
|
200
|
+
- incorrect joins, filters, or aggregations
|
|
201
|
+
- migration incompatibility
|
|
202
|
+
|
|
203
|
+
### When Real Data Layer Verification Adds Value
|
|
204
|
+
|
|
205
|
+
Use real or production-like data access verification when testing:
|
|
206
|
+
- repository or DAO implementations
|
|
207
|
+
- ORM mappings
|
|
208
|
+
- query builders or raw SQL
|
|
209
|
+
- persistence behavior that depends on constraints or schema shape
|
|
210
|
+
|
|
211
|
+
### Environment Options
|
|
212
|
+
|
|
213
|
+
Choose the most practical option for the project environment:
|
|
214
|
+
- containerized database
|
|
215
|
+
- dedicated test database
|
|
216
|
+
- in-memory database with documented limitations
|
|
217
|
+
- adapter-backed local test harness
|
|
218
|
+
|
|
219
|
+
### Design Alignment
|
|
220
|
+
|
|
221
|
+
When a Design Doc includes `Test Boundaries`, follow it as the baseline for deciding which dependencies stay real and which boundaries are isolated.
|
|
222
|
+
|
|
192
223
|
## Test Quality Practices [MANDATORY]
|
|
193
224
|
|
|
194
225
|
### Keep Tests Active
|
|
@@ -40,7 +40,7 @@ Skill Status:
|
|
|
40
40
|
|
|
41
41
|
## Required Information
|
|
42
42
|
|
|
43
|
-
- **Design Doc**: Required. Source of acceptance criteria for test skeleton generation.
|
|
43
|
+
- **Design Doc**: Required. Source of acceptance criteria for test skeleton generation. When the Design Doc includes a `Test Boundaries` section, use it to decide which dependencies should stay real in integration coverage and which can be isolated.
|
|
44
44
|
- **UI Spec**: Optional. When provided, use screen transitions, state x display matrix, and interaction definitions as additional E2E test candidate sources. See `references/e2e-design.md` in integration-e2e-testing skill for mapping methodology.
|
|
45
45
|
|
|
46
46
|
## Core Principle: Maximum Coverage, Minimum Tests
|
|
@@ -96,7 +96,11 @@ Key points:
|
|
|
96
96
|
|
|
97
97
|
**Principle**: AC = User-observable behavior verifiable in isolated CI environment
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
When `Test Boundaries` exists:
|
|
100
|
+
- Read mock boundary decisions and reflect them in generated skeleton metadata
|
|
101
|
+
- Mark dependencies that should stay real in integration coverage with a project-appropriate annotation such as `@real-dependency: [component]`
|
|
102
|
+
|
|
103
|
+
**Output**: Filtered AC list with boundary annotations when available
|
|
100
104
|
|
|
101
105
|
### Phase 2: Candidate Enumeration (Two-Pass #1)
|
|
102
106
|
|
|
@@ -161,6 +165,8 @@ ROI calculation formula and cost table are defined in **integration-e2e-testing
|
|
|
161
165
|
|
|
162
166
|
### Integration Test File
|
|
163
167
|
|
|
168
|
+
Adapt comment syntax to the project's language when generating annotations.
|
|
169
|
+
|
|
164
170
|
```
|
|
165
171
|
// [Feature Name] Integration Test - Design Doc: [filename]
|
|
166
172
|
// Generated: [date] | Budget Used: 2/3 integration, 0/2 E2E
|
|
@@ -173,6 +179,7 @@ ROI calculation formula and cost table are defined in **integration-e2e-testing
|
|
|
173
179
|
// Behavior: User completes payment → Order created in DB + Payment recorded
|
|
174
180
|
// @category: core-functionality
|
|
175
181
|
// @dependency: PaymentService, OrderRepository, Database
|
|
182
|
+
// @real-dependency: OrderRepository, Database
|
|
176
183
|
// @complexity: high
|
|
177
184
|
[Test: 'AC1: Successful payment creates persisted order with correct status']
|
|
178
185
|
|
|
@@ -140,8 +140,10 @@ Perform this step with actual tool-backed enumeration, not memory:
|
|
|
140
140
|
1. Enumerate routes/endpoints in scope and record whether each is documented
|
|
141
141
|
2. Enumerate test files in scope and record whether their existence is documented
|
|
142
142
|
3. Enumerate public exports/interfaces in primary source files and record whether each is documented
|
|
143
|
-
4.
|
|
144
|
-
5.
|
|
143
|
+
4. Enumerate data operations in scope and record whether the associated schema, repository, model, or data contract appears in the document
|
|
144
|
+
5. Record whether a Design Doc contains a `Test Boundaries` section when persistence or data operations are part of scope
|
|
145
|
+
6. Compile undocumented code items from the enumerations
|
|
146
|
+
7. Compile unimplemented document items from earlier claim verification
|
|
145
147
|
|
|
146
148
|
### Step 6: Return JSON Result
|
|
147
149
|
|
|
@@ -188,7 +190,11 @@ Return the JSON result as the final response. See Output Format for the schema.
|
|
|
188
190
|
"testFilesDocumented": 2,
|
|
189
191
|
"exportsInCode": 12,
|
|
190
192
|
"exportsDocumented": 10,
|
|
191
|
-
"undocumentedExports": ["rebuildSearchIndex (src/search/index.ts:18)"]
|
|
193
|
+
"undocumentedExports": ["rebuildSearchIndex (src/search/index.ts:18)"],
|
|
194
|
+
"dataOperationsInCode": 3,
|
|
195
|
+
"dataOperationsDocumented": 2,
|
|
196
|
+
"undocumentedDataOperations": ["userRepository.saveUser (src/user/repository.ts:41)"],
|
|
197
|
+
"testBoundariesSectionPresent": true
|
|
192
198
|
},
|
|
193
199
|
"coverage": {
|
|
194
200
|
"documented": ["Feature areas with documentation"],
|
|
@@ -230,7 +236,7 @@ If `verifiableClaimCount < 20`, treat the score as unstable and return to Step 1
|
|
|
230
236
|
- [ ] `verifiableClaimCount >= 20`
|
|
231
237
|
- [ ] Collected evidence from multiple sources for each claim
|
|
232
238
|
- [ ] Classified each claim (match/drift/gap/conflict)
|
|
233
|
-
- [ ] Performed reverse coverage with route, test file,
|
|
239
|
+
- [ ] Performed reverse coverage with route, test file, public export, and data operation enumeration
|
|
234
240
|
- [ ] Identified undocumented features in code
|
|
235
241
|
- [ ] Identified unimplemented specifications
|
|
236
242
|
- [ ] Calculated consistency score
|
|
@@ -245,6 +251,7 @@ If `verifiableClaimCount < 20`, treat the score as unstable and return to Step 1
|
|
|
245
251
|
- [ ] Low-confidence classifications are explicitly noted
|
|
246
252
|
- [ ] Contradicting evidence is documented, not ignored
|
|
247
253
|
- [ ] `reverseCoverage` includes concrete counts from tool-backed enumeration
|
|
254
|
+
- [ ] Data operation coverage is recorded when persistence-related code is in scope
|
|
248
255
|
|
|
249
256
|
## Completion Gate [BLOCKING]
|
|
250
257
|
|