codex-workflows 0.1.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/ai-development-guide/SKILL.md +283 -0
- package/.agents/skills/ai-development-guide/agents/openai.yaml +7 -0
- package/.agents/skills/ai-development-guide/references/frontend.md +135 -0
- package/.agents/skills/coding-rules/SKILL.md +98 -0
- package/.agents/skills/coding-rules/agents/openai.yaml +7 -0
- package/.agents/skills/coding-rules/references/typescript.md +220 -0
- package/.agents/skills/documentation-criteria/SKILL.md +127 -0
- package/.agents/skills/documentation-criteria/agents/openai.yaml +7 -0
- package/.agents/skills/documentation-criteria/references/adr-template.md +64 -0
- package/.agents/skills/documentation-criteria/references/design-template.md +327 -0
- package/.agents/skills/documentation-criteria/references/plan-template.md +131 -0
- package/.agents/skills/documentation-criteria/references/prd-template.md +119 -0
- package/.agents/skills/documentation-criteria/references/task-template.md +38 -0
- package/.agents/skills/documentation-criteria/references/ui-spec-template.md +145 -0
- package/.agents/skills/implementation-approach/SKILL.md +145 -0
- package/.agents/skills/implementation-approach/agents/openai.yaml +7 -0
- package/.agents/skills/integration-e2e-testing/SKILL.md +125 -0
- package/.agents/skills/integration-e2e-testing/agents/openai.yaml +7 -0
- package/.agents/skills/integration-e2e-testing/references/e2e-design.md +86 -0
- package/.agents/skills/recipe-add-integration-tests/SKILL.md +128 -0
- package/.agents/skills/recipe-add-integration-tests/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-build/SKILL.md +119 -0
- package/.agents/skills/recipe-build/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-design/SKILL.md +90 -0
- package/.agents/skills/recipe-design/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-diagnose/SKILL.md +187 -0
- package/.agents/skills/recipe-diagnose/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-front-build/SKILL.md +127 -0
- package/.agents/skills/recipe-front-build/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-front-design/SKILL.md +90 -0
- package/.agents/skills/recipe-front-design/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-front-plan/SKILL.md +68 -0
- package/.agents/skills/recipe-front-plan/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-front-review/SKILL.md +101 -0
- package/.agents/skills/recipe-front-review/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-fullstack-build/SKILL.md +139 -0
- package/.agents/skills/recipe-fullstack-build/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-fullstack-implement/SKILL.md +151 -0
- package/.agents/skills/recipe-fullstack-implement/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-implement/SKILL.md +125 -0
- package/.agents/skills/recipe-implement/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-plan/SKILL.md +73 -0
- package/.agents/skills/recipe-plan/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-reverse-engineer/SKILL.md +212 -0
- package/.agents/skills/recipe-reverse-engineer/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-review/SKILL.md +115 -0
- package/.agents/skills/recipe-review/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-task/SKILL.md +74 -0
- package/.agents/skills/recipe-task/agents/openai.yaml +7 -0
- package/.agents/skills/recipe-update-doc/SKILL.md +156 -0
- package/.agents/skills/recipe-update-doc/agents/openai.yaml +7 -0
- package/.agents/skills/subagents-orchestration-guide/SKILL.md +354 -0
- package/.agents/skills/subagents-orchestration-guide/agents/openai.yaml +7 -0
- package/.agents/skills/subagents-orchestration-guide/references/monorepo-flow.md +124 -0
- package/.agents/skills/task-analyzer/SKILL.md +142 -0
- package/.agents/skills/task-analyzer/agents/openai.yaml +7 -0
- package/.agents/skills/task-analyzer/references/skills-index.yaml +162 -0
- package/.agents/skills/testing/SKILL.md +324 -0
- package/.agents/skills/testing/agents/openai.yaml +7 -0
- package/.agents/skills/testing/references/typescript.md +224 -0
- package/.codex/agents/acceptance-test-generator.toml +310 -0
- package/.codex/agents/code-reviewer.toml +228 -0
- package/.codex/agents/code-verifier.toml +231 -0
- package/.codex/agents/design-sync.toml +265 -0
- package/.codex/agents/document-reviewer.toml +367 -0
- package/.codex/agents/integration-test-reviewer.toml +178 -0
- package/.codex/agents/investigator.toml +197 -0
- package/.codex/agents/prd-creator.toml +250 -0
- package/.codex/agents/quality-fixer-frontend.toml +356 -0
- package/.codex/agents/quality-fixer.toml +249 -0
- package/.codex/agents/requirement-analyzer.toml +172 -0
- package/.codex/agents/rule-advisor.toml +186 -0
- package/.codex/agents/scope-discoverer.toml +248 -0
- package/.codex/agents/solver.toml +212 -0
- package/.codex/agents/task-decomposer.toml +262 -0
- package/.codex/agents/task-executor-frontend.toml +312 -0
- package/.codex/agents/task-executor.toml +314 -0
- package/.codex/agents/technical-designer-frontend.toml +492 -0
- package/.codex/agents/technical-designer.toml +474 -0
- package/.codex/agents/ui-spec-designer.toml +150 -0
- package/.codex/agents/verifier.toml +228 -0
- package/.codex/agents/work-planner.toml +251 -0
- package/README.md +365 -0
- package/bin/cli.js +249 -0
- package/package.json +35 -0
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: subagents-orchestration-guide
|
|
3
|
+
description: "Guides subagent coordination through implementation workflows. Use when: orchestrating multiple agents, managing workflow phases, determining autonomous execution mode, or coordinating recipe execution."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Subagents Orchestration Guide
|
|
7
|
+
|
|
8
|
+
## Role: The Orchestrator
|
|
9
|
+
|
|
10
|
+
**The orchestrator coordinates subagents like a conductor -- directing the musicians without playing the instruments.**
|
|
11
|
+
|
|
12
|
+
All investigation, analysis, and implementation work flows through specialized subagents.
|
|
13
|
+
|
|
14
|
+
### Automatic Responses
|
|
15
|
+
|
|
16
|
+
| Trigger | Action |
|
|
17
|
+
|---------|--------|
|
|
18
|
+
| New task | Spawn **requirement-analyzer** |
|
|
19
|
+
| Flow in progress | Check scale determination table for next subagent |
|
|
20
|
+
| Phase completion | Spawn the appropriate agent |
|
|
21
|
+
| Stop point reached | Wait for user approval |
|
|
22
|
+
|
|
23
|
+
### First Action Rule [MANDATORY]
|
|
24
|
+
|
|
25
|
+
To accurately analyze user requirements, pass them directly to requirement-analyzer and determine the workflow based on its analysis results.
|
|
26
|
+
|
|
27
|
+
**ENFORCEMENT**: MUST spawn requirement-analyzer as first action for every new task
|
|
28
|
+
|
|
29
|
+
## Decision Flow When Receiving Tasks
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
Receive New Task -> Analyze requirements with requirement-analyzer
|
|
33
|
+
-> Scale assessment
|
|
34
|
+
-> Execute flow based on scale
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**During flow execution, determine next subagent according to scale determination table**
|
|
38
|
+
|
|
39
|
+
### Requirement Change Detection During Flow [MANDATORY]
|
|
40
|
+
|
|
41
|
+
**During flow execution**, if detecting the following in user response, MUST stop flow and go to requirement-analyzer:
|
|
42
|
+
- Mentions of new features/behaviors (additional operation methods, display on different screens, etc.)
|
|
43
|
+
- Additions of constraints/conditions (data volume limits, permission controls, etc.)
|
|
44
|
+
- Changes in technical requirements (processing methods, output format changes, etc.)
|
|
45
|
+
|
|
46
|
+
**ENFORCEMENT**: If any one applies — MUST restart from requirement-analyzer with integrated requirements
|
|
47
|
+
|
|
48
|
+
## Available Subagents
|
|
49
|
+
|
|
50
|
+
The following subagents are available:
|
|
51
|
+
|
|
52
|
+
### Implementation Support Agents
|
|
53
|
+
1. **quality-fixer**: Self-contained processing for overall quality assurance and fixes until completion
|
|
54
|
+
2. **task-decomposer**: Appropriate task decomposition of work plans
|
|
55
|
+
3. **task-executor**: Individual task execution and structured response
|
|
56
|
+
4. **integration-test-reviewer**: Review integration/E2E tests for skeleton compliance and quality
|
|
57
|
+
|
|
58
|
+
### Document Creation Agents
|
|
59
|
+
5. **requirement-analyzer**: Requirement analysis and work scale determination
|
|
60
|
+
6. **prd-creator**: Product Requirements Document creation
|
|
61
|
+
7. **ui-spec-designer**: UI Specification creation from PRD and optional prototype code (frontend/fullstack features)
|
|
62
|
+
8. **technical-designer**: ADR/Design Doc creation
|
|
63
|
+
9. **work-planner**: Work plan creation from Design Doc and test skeletons
|
|
64
|
+
10. **document-reviewer**: Single document quality and rule compliance check
|
|
65
|
+
11. **design-sync**: Design Doc consistency verification across multiple documents
|
|
66
|
+
12. **acceptance-test-generator**: Generate integration and E2E test skeletons from Design Doc ACs
|
|
67
|
+
|
|
68
|
+
## Orchestration Principles
|
|
69
|
+
|
|
70
|
+
### Task Assignment with Responsibility Separation [MANDATORY]
|
|
71
|
+
|
|
72
|
+
Assign work based on each subagent's responsibilities:
|
|
73
|
+
|
|
74
|
+
**What to spawn task-executor for**:
|
|
75
|
+
- Implementation work and test addition
|
|
76
|
+
- Confirmation of added tests passing (existing tests are not covered)
|
|
77
|
+
- Spawn quality-fixer exclusively for quality assurance
|
|
78
|
+
|
|
79
|
+
**What to spawn quality-fixer for**:
|
|
80
|
+
- Overall quality assurance (static analysis, style check, all test execution, etc.)
|
|
81
|
+
- Complete execution of quality error fixes
|
|
82
|
+
- Self-contained processing until fix completion
|
|
83
|
+
- Final approved judgment (only after fixes are complete)
|
|
84
|
+
|
|
85
|
+
## Constraints Between Subagents [MANDATORY]
|
|
86
|
+
|
|
87
|
+
Subagents CANNOT directly call other subagents — all coordination MUST flow through the orchestrator.
|
|
88
|
+
|
|
89
|
+
**ENFORCEMENT**: Direct subagent-to-subagent communication is PROHIBITED
|
|
90
|
+
|
|
91
|
+
## How to Spawn Agents
|
|
92
|
+
|
|
93
|
+
Spawn agents using natural language prompts. Provide clear context about what the agent should accomplish.
|
|
94
|
+
|
|
95
|
+
### Spawn Examples
|
|
96
|
+
|
|
97
|
+
**requirement-analyzer**:
|
|
98
|
+
> "Analyze the following requirements and determine the work scale: [user requirements]. Perform requirement analysis and scale determination."
|
|
99
|
+
|
|
100
|
+
**task-executor**:
|
|
101
|
+
> "Execute the implementation task defined in docs/plans/tasks/[filename].md. Complete the implementation following TDD Red-Green-Refactor."
|
|
102
|
+
|
|
103
|
+
**quality-fixer**:
|
|
104
|
+
> "Run quality checks on the codebase: static analysis, style check, all test execution. Fix any issues found and report when all checks pass."
|
|
105
|
+
|
|
106
|
+
**document-reviewer**:
|
|
107
|
+
> "Review the document at [path] for quality and rule compliance. Check against documentation-criteria standards."
|
|
108
|
+
|
|
109
|
+
**design-sync**:
|
|
110
|
+
> "Verify consistency between Design Docs in docs/design/. Use [path] as the source document for comparison."
|
|
111
|
+
|
|
112
|
+
## Explicit Stop Points [MANDATORY]
|
|
113
|
+
|
|
114
|
+
Autonomous execution MUST stop and wait for user input at these points.
|
|
115
|
+
|
|
116
|
+
| Phase | Stop Point | User Action Required |
|
|
117
|
+
|-------|------------|---------------------|
|
|
118
|
+
| Requirements | After requirement-analyzer completes | Confirm requirements / Answer questions |
|
|
119
|
+
| PRD | After document-reviewer completes PRD review | Approve PRD |
|
|
120
|
+
| UI Spec | After document-reviewer completes UI Spec review (frontend/fullstack) | Approve UI Spec |
|
|
121
|
+
| ADR | After document-reviewer completes ADR review (if ADR created) | Approve ADR |
|
|
122
|
+
| Design | After design-sync completes consistency verification | Approve Design Doc |
|
|
123
|
+
| Work Plan | After work-planner creates plan | Batch approval for implementation phase |
|
|
124
|
+
|
|
125
|
+
**ENFORCEMENT**: After batch approval, autonomous execution proceeds without stops until completion or escalation. Skipping stop points is a CRITICAL VIOLATION.
|
|
126
|
+
|
|
127
|
+
### Approval Status Vocabulary [MANDATORY]
|
|
128
|
+
|
|
129
|
+
All agents MUST use this vocabulary consistently:
|
|
130
|
+
|
|
131
|
+
| Status | Meaning | Next Action |
|
|
132
|
+
|--------|---------|-------------|
|
|
133
|
+
| `approved` | All criteria met | Proceed to next phase |
|
|
134
|
+
| `approved_with_conditions` | Criteria met with minor open items | Proceed — carry conditions as input to next phase |
|
|
135
|
+
| `needs_revision` | Significant issues found | Return to author agent for revision (max 2 iterations) |
|
|
136
|
+
| `rejected` | Fundamental problems | Halt workflow, escalate to user |
|
|
137
|
+
| `skipped` | Preconditions not met for this step | Report reason, proceed |
|
|
138
|
+
|
|
139
|
+
**approved_with_conditions handling**:
|
|
140
|
+
- Conditions MUST be listed explicitly in the agent's output
|
|
141
|
+
- Orchestrator MUST append conditions to the document's "Undetermined Items" or "Open Items" section before proceeding
|
|
142
|
+
- Orchestrator MUST pass conditions to the next phase's agent as context
|
|
143
|
+
- Conditions do not block progression but MUST be resolved before implementation phase
|
|
144
|
+
|
|
145
|
+
**ENFORCEMENT**: Using any status value outside this vocabulary is a VIOLATION.
|
|
146
|
+
|
|
147
|
+
## Scale Determination and Document Requirements
|
|
148
|
+
|
|
149
|
+
| Scale | File Count | PRD | ADR | Design Doc | Work Plan |
|
|
150
|
+
|-------|------------|-----|-----|------------|-----------|
|
|
151
|
+
| Small | 1-2 | Update* | Not needed | Not needed | Simplified |
|
|
152
|
+
| Medium | 3-5 | Update* | Conditional** | **Required** | **Required** |
|
|
153
|
+
| Large | 6+ | **Required*** | Conditional** | **Required** | **Required** |
|
|
154
|
+
|
|
155
|
+
\* Update if PRD exists for the relevant feature
|
|
156
|
+
\*\* When there are architecture changes, new technology introduction, or data flow changes
|
|
157
|
+
\*\*\* New creation/update existing/reverse PRD (when no existing PRD)
|
|
158
|
+
|
|
159
|
+
## Structured Response Specification
|
|
160
|
+
|
|
161
|
+
Subagents respond in JSON format. Key fields for orchestrator decisions:
|
|
162
|
+
- **requirement-analyzer**: scale, confidence, affectedLayers, adrRequired, scopeDependencies, questions
|
|
163
|
+
- **task-executor**: status (escalation_needed/blocked/completed), testsAdded
|
|
164
|
+
- **quality-fixer**: approved (true/false)
|
|
165
|
+
- **document-reviewer**: verdict.decision (approved/approved_with_conditions/needs_revision/rejected)
|
|
166
|
+
- **design-sync**: sync_status (CONFLICTS_FOUND/NO_CONFLICTS) — text format with [SUMMARY] block
|
|
167
|
+
- **integration-test-reviewer**: status (approved/needs_revision/blocked), requiredFixes
|
|
168
|
+
- **acceptance-test-generator**: status, generatedFiles
|
|
169
|
+
|
|
170
|
+
## Handling Requirement Changes
|
|
171
|
+
|
|
172
|
+
### Handling Requirement Changes in requirement-analyzer
|
|
173
|
+
requirement-analyzer follows the "completely self-contained" principle and processes requirement changes as new input.
|
|
174
|
+
|
|
175
|
+
#### How to Integrate Requirements
|
|
176
|
+
|
|
177
|
+
**Important**: To maximize accuracy, integrate requirements as complete sentences, including all contextual information communicated by the user.
|
|
178
|
+
|
|
179
|
+
```yaml
|
|
180
|
+
Integration example:
|
|
181
|
+
Initial: "I want to create user management functionality"
|
|
182
|
+
Addition: "Permission management is also needed"
|
|
183
|
+
Result: "I want to create user management functionality. Permission management is also needed.
|
|
184
|
+
|
|
185
|
+
Initial requirement: I want to create user management functionality
|
|
186
|
+
Additional requirement: Permission management is also needed"
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Update Mode for Document Generation Agents
|
|
190
|
+
Document generation agents (work-planner, technical-designer, prd-creator) can update existing documents in `update` mode.
|
|
191
|
+
|
|
192
|
+
- **Initial creation**: Create new document in create (default) mode
|
|
193
|
+
- **On requirement change**: Edit existing document and add history in update mode
|
|
194
|
+
|
|
195
|
+
## Basic Flow for Work Planning
|
|
196
|
+
|
|
197
|
+
When receiving new features or change requests, start with requirement-analyzer.
|
|
198
|
+
|
|
199
|
+
### Large Scale (6+ Files) - 11 Steps (backend) / 13 Steps (frontend/fullstack)
|
|
200
|
+
|
|
201
|
+
1. requirement-analyzer: Requirement analysis + Check existing PRD **[Stop]**
|
|
202
|
+
2. prd-creator: PRD creation
|
|
203
|
+
3. document-reviewer: PRD review **[Stop: PRD Approval]**
|
|
204
|
+
4. **(frontend/fullstack only)** Ask user for prototype code; ui-spec-designer: UI Spec creation
|
|
205
|
+
5. **(frontend/fullstack only)** document-reviewer: UI Spec review **[Stop: UI Spec Approval]**
|
|
206
|
+
6. technical-designer: ADR creation (if architecture/technology/data flow changes)
|
|
207
|
+
7. document-reviewer: ADR review (if ADR created) **[Stop: ADR Approval]**
|
|
208
|
+
8. technical-designer: Design Doc creation
|
|
209
|
+
9. document-reviewer: Design Doc review
|
|
210
|
+
10. design-sync: Consistency verification **[Stop: Design Doc Approval]**
|
|
211
|
+
11. acceptance-test-generator: Test skeleton generation, pass to work-planner
|
|
212
|
+
12. work-planner: Work plan creation **[Stop: Batch approval]**
|
|
213
|
+
13. task-decomposer: Autonomous execution to Completion report
|
|
214
|
+
|
|
215
|
+
### Medium Scale (3-5 Files) - 7 Steps (backend) / 9 Steps (frontend/fullstack)
|
|
216
|
+
|
|
217
|
+
1. requirement-analyzer: Requirement analysis **[Stop]**
|
|
218
|
+
2. **(frontend/fullstack only)** Ask user for prototype code; ui-spec-designer: UI Spec creation
|
|
219
|
+
3. **(frontend/fullstack only)** document-reviewer: UI Spec review **[Stop: UI Spec Approval]**
|
|
220
|
+
4. technical-designer: Design Doc creation
|
|
221
|
+
5. document-reviewer: Design Doc review
|
|
222
|
+
6. design-sync: Consistency verification **[Stop: Design Doc Approval]**
|
|
223
|
+
7. acceptance-test-generator: Test skeleton generation, pass to work-planner
|
|
224
|
+
8. work-planner: Work plan creation **[Stop: Batch approval]**
|
|
225
|
+
9. task-decomposer: Autonomous execution to Completion report
|
|
226
|
+
|
|
227
|
+
### Small Scale (1-2 Files) - 2 Steps
|
|
228
|
+
|
|
229
|
+
1. Create simplified plan **[Stop: Batch approval]**
|
|
230
|
+
2. Direct implementation to Completion report
|
|
231
|
+
|
|
232
|
+
## Autonomous Execution Mode
|
|
233
|
+
|
|
234
|
+
### Pre-Execution Environment Check
|
|
235
|
+
|
|
236
|
+
**Principle**: Verify subagents can complete their responsibilities
|
|
237
|
+
|
|
238
|
+
**Required environments**:
|
|
239
|
+
- Commit capability (for per-task commit cycle)
|
|
240
|
+
- Quality check tools (quality-fixer will detect and escalate if missing)
|
|
241
|
+
- Test runner (task-executor will detect and escalate if missing)
|
|
242
|
+
|
|
243
|
+
**If critical environment unavailable**: Escalate with specific missing component before entering autonomous mode
|
|
244
|
+
|
|
245
|
+
### Authority Grant
|
|
246
|
+
|
|
247
|
+
**After environment check passes**:
|
|
248
|
+
- Batch approval for entire implementation phase grants authority to agents
|
|
249
|
+
- task-executor: Implementation authority
|
|
250
|
+
- quality-fixer: Fix authority (automatic quality error fixes)
|
|
251
|
+
|
|
252
|
+
### Definition of Autonomous Execution Mode
|
|
253
|
+
|
|
254
|
+
After "batch approval for entire implementation phase" with work-planner, autonomously execute the following processes without human approval:
|
|
255
|
+
|
|
256
|
+
```
|
|
257
|
+
Batch approval -> Start autonomous execution mode
|
|
258
|
+
-> task-decomposer: Task decomposition
|
|
259
|
+
-> Task execution loop:
|
|
260
|
+
-> task-executor: Implementation
|
|
261
|
+
-> Escalation judgment:
|
|
262
|
+
- escalation_needed/blocked -> Escalate to user
|
|
263
|
+
- testsAdded has int/e2e -> integration-test-reviewer
|
|
264
|
+
- needs_revision -> back to task-executor
|
|
265
|
+
- approved -> quality-fixer
|
|
266
|
+
- No issues -> quality-fixer
|
|
267
|
+
-> quality-fixer: Quality check and fixes
|
|
268
|
+
-> Orchestrator: Execute git commit
|
|
269
|
+
-> Check remaining tasks:
|
|
270
|
+
- Yes -> next task
|
|
271
|
+
- No -> Completion report
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### Conditions for Stopping Autonomous Execution
|
|
275
|
+
|
|
276
|
+
Stop autonomous execution and escalate to user in the following cases:
|
|
277
|
+
|
|
278
|
+
1. **Escalation from subagent**: When receiving `status: "escalation_needed"` or `status: "blocked"`
|
|
279
|
+
2. **Requirement change detected**: Any match in requirement change detection checklist
|
|
280
|
+
3. **Work-planner update restriction violated**: Requirement changes after task-decomposer starts require overall redesign
|
|
281
|
+
4. **User explicitly stops**: Direct stop instruction or interruption
|
|
282
|
+
|
|
283
|
+
### Task Management: 4-Step Cycle
|
|
284
|
+
|
|
285
|
+
**Per-task cycle**:
|
|
286
|
+
1. task-executor: Implementation
|
|
287
|
+
2. Check task-executor response:
|
|
288
|
+
- `escalation_needed` or `blocked`: Escalate to user
|
|
289
|
+
- `testsAdded` contains integration/e2e tests: Execute integration-test-reviewer
|
|
290
|
+
- `needs_revision`: Return to step 1 with requiredFixes
|
|
291
|
+
- `approved`: Proceed to step 3
|
|
292
|
+
- Otherwise: Proceed to step 3
|
|
293
|
+
3. quality-fixer: Quality check and fixes
|
|
294
|
+
4. git commit (on `approved: true`)
|
|
295
|
+
|
|
296
|
+
## Main Orchestrator Roles
|
|
297
|
+
|
|
298
|
+
1. **State Management**: Track current phase, each subagent's state, and next action
|
|
299
|
+
2. **Information Bridging**: Data conversion and transmission between subagents
|
|
300
|
+
- Convert each subagent's output to next subagent's input format
|
|
301
|
+
- **Always pass deliverables from previous process to next agent**
|
|
302
|
+
- Extract necessary information from structured responses
|
|
303
|
+
- Compose commit messages from changeSummary
|
|
304
|
+
- Explicitly integrate initial and additional requirements when requirements change
|
|
305
|
+
3. **Quality Assurance and Commit Execution**: Execute git commit per the 4-step task cycle
|
|
306
|
+
4. **Autonomous Execution Mode Management**: Start/stop autonomous execution after approval, escalation decisions
|
|
307
|
+
5. **ADR Status Management**: Update ADR status after user decision (Accepted/Rejected)
|
|
308
|
+
|
|
309
|
+
### acceptance-test-generator to work-planner Bridge
|
|
310
|
+
|
|
311
|
+
**Pass to acceptance-test-generator**:
|
|
312
|
+
- Design Doc: [path]
|
|
313
|
+
- UI Spec: [path] (if exists)
|
|
314
|
+
|
|
315
|
+
**Orchestrator verification items**:
|
|
316
|
+
- Verify integration test file path retrieval and existence
|
|
317
|
+
- Verify E2E test file path retrieval and existence
|
|
318
|
+
|
|
319
|
+
**Pass to work-planner**:
|
|
320
|
+
- Integration test file: [path] (create and execute simultaneously with each phase implementation)
|
|
321
|
+
- E2E test file: [path] (execute only in final phase)
|
|
322
|
+
|
|
323
|
+
**On error**: Escalate to user if files are not generated
|
|
324
|
+
|
|
325
|
+
## Important Constraints [MANDATORY]
|
|
326
|
+
|
|
327
|
+
- **Quality check is REQUIRED**: quality-fixer approval MUST be obtained before commit
|
|
328
|
+
- **Structured response REQUIRED**: Information transmission between subagents MUST use JSON format
|
|
329
|
+
- **Approval management**: Document creation -> Execute document-reviewer -> Get user approval before proceeding
|
|
330
|
+
- **Flow confirmation**: After getting approval, MUST check next step with work planning flow (large/medium/small scale)
|
|
331
|
+
- **Consistency verification**: If subagent determinations contradict, MUST prioritize guidelines
|
|
332
|
+
|
|
333
|
+
**ENFORCEMENT**: Violating ANY constraint requires immediate correction
|
|
334
|
+
|
|
335
|
+
## Required Dialogue Points with Humans [MANDATORY]
|
|
336
|
+
|
|
337
|
+
### Basic Principles
|
|
338
|
+
- **Stopping is REQUIRED**: MUST wait for human response at stop points
|
|
339
|
+
- **Confirmation then Agreement cycle**: After document generation, proceed to next step after agreement or fix instructions in update mode
|
|
340
|
+
- **Specific questions**: Make decisions easy with options (A/B/C) or comparison tables
|
|
341
|
+
|
|
342
|
+
## Action Checklist
|
|
343
|
+
|
|
344
|
+
When receiving a task, check the following:
|
|
345
|
+
|
|
346
|
+
- [ ] Confirmed if there is an orchestrator instruction
|
|
347
|
+
- [ ] Determined task type (new feature/fix/research, etc.)
|
|
348
|
+
- [ ] Considered appropriate subagent utilization
|
|
349
|
+
- [ ] Decided next action according to decision flow
|
|
350
|
+
- [ ] Monitored requirement changes and errors during autonomous execution mode
|
|
351
|
+
|
|
352
|
+
## References
|
|
353
|
+
|
|
354
|
+
- `references/monorepo-flow.md`: Fullstack (monorepo) orchestration flow
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Fullstack (Monorepo) Flow
|
|
2
|
+
|
|
3
|
+
This reference defines the orchestration flow for projects spanning multiple layers (backend + frontend). It extends the standard orchestration guide without modifying it.
|
|
4
|
+
|
|
5
|
+
## When This Flow Applies
|
|
6
|
+
|
|
7
|
+
- Multiple Design Docs exist targeting different layers (backend, frontend)
|
|
8
|
+
- A single feature requires implementation across both backend and frontend
|
|
9
|
+
- The orchestrator is invoked for fullstack implementation
|
|
10
|
+
|
|
11
|
+
## Design Phase
|
|
12
|
+
|
|
13
|
+
### Large Scale Fullstack (6+ Files) - 12 Steps
|
|
14
|
+
|
|
15
|
+
| Step | Agent | Purpose | Output |
|
|
16
|
+
|------|-------|---------|--------|
|
|
17
|
+
| 1 | requirement-analyzer | Requirement analysis + scale determination **[Stop]** | Requirements + scale |
|
|
18
|
+
| 2 | prd-creator | PRD covering entire feature (all layers) | Single PRD |
|
|
19
|
+
| 3 | document-reviewer | PRD review **[Stop]** | Approval |
|
|
20
|
+
| 4 | (orchestrator) | Ask user for prototype code **[Stop]** | Prototype path or none |
|
|
21
|
+
| 5 | ui-spec-designer | UI Spec from PRD + optional prototype | UI Spec |
|
|
22
|
+
| 6 | document-reviewer | UI Spec review **[Stop]** | Approval |
|
|
23
|
+
| 7 | technical-designer | **Backend** Design Doc | Backend Design Doc |
|
|
24
|
+
| 8 | technical-designer-frontend | **Frontend** Design Doc (references backend Integration Points + UI Spec) | Frontend Design Doc |
|
|
25
|
+
| 9 | document-reviewer x2 | Review each Design Doc (one invocation per doc) | Reviews |
|
|
26
|
+
| 10 | design-sync | Cross-layer consistency verification (source: frontend Design Doc) **[Stop]** | Sync status |
|
|
27
|
+
| 11 | acceptance-test-generator | Integration/E2E test skeleton from cross-layer contracts | Test skeletons |
|
|
28
|
+
| 12 | work-planner | Work plan from all Design Docs **[Stop: Batch approval]** | Work plan |
|
|
29
|
+
|
|
30
|
+
### Medium Scale Fullstack (3-5 Files) - 10 Steps
|
|
31
|
+
|
|
32
|
+
| Step | Agent | Purpose | Output |
|
|
33
|
+
|------|-------|---------|--------|
|
|
34
|
+
| 1 | requirement-analyzer | Requirement analysis + scale determination **[Stop]** | Requirements + scale |
|
|
35
|
+
| 2 | (orchestrator) | Ask user for prototype code **[Stop]** | Prototype path or none |
|
|
36
|
+
| 3 | ui-spec-designer | UI Spec from requirements + optional prototype | UI Spec |
|
|
37
|
+
| 4 | document-reviewer | UI Spec review **[Stop]** | Approval |
|
|
38
|
+
| 5 | technical-designer | **Backend** Design Doc | Backend Design Doc |
|
|
39
|
+
| 6 | technical-designer-frontend | **Frontend** Design Doc (references backend Integration Points + UI Spec) | Frontend Design Doc |
|
|
40
|
+
| 7 | document-reviewer x2 | Review each Design Doc (one invocation per doc) | Reviews |
|
|
41
|
+
| 8 | design-sync | Cross-layer consistency verification (source: frontend Design Doc) **[Stop]** | Sync status |
|
|
42
|
+
| 9 | acceptance-test-generator | Integration/E2E test skeleton from cross-layer contracts | Test skeletons |
|
|
43
|
+
| 10 | work-planner | Work plan from all Design Docs **[Stop: Batch approval]** | Work plan |
|
|
44
|
+
|
|
45
|
+
### Layer Context in Design Doc Creation
|
|
46
|
+
|
|
47
|
+
When spawning Design Doc creation for each layer, pass explicit context:
|
|
48
|
+
|
|
49
|
+
**Large Scale (PRD available) -- Backend Design Doc**:
|
|
50
|
+
**Agent**: Spawn technical-designer
|
|
51
|
+
> "Create a backend Design Doc from PRD at [path]. Focus on: API contracts, data layer, business logic, service architecture."
|
|
52
|
+
|
|
53
|
+
**Large Scale (PRD available) -- Frontend Design Doc**:
|
|
54
|
+
**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."
|
|
56
|
+
|
|
57
|
+
**Medium Scale (no PRD) -- Backend Design Doc**:
|
|
58
|
+
**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."
|
|
60
|
+
|
|
61
|
+
**Medium Scale (no PRD) -- Frontend Design Doc**:
|
|
62
|
+
**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."
|
|
64
|
+
|
|
65
|
+
### design-sync for Cross-Layer Verification
|
|
66
|
+
|
|
67
|
+
Spawn design-sync with `source_design` = frontend Design Doc (created last, referencing backend's Integration Points). design-sync auto-discovers other Design Docs in `docs/design/` for comparison.
|
|
68
|
+
|
|
69
|
+
## Test Skeleton Generation Phase
|
|
70
|
+
|
|
71
|
+
Spawn acceptance-test-generator with all Design Docs and UI Spec:
|
|
72
|
+
|
|
73
|
+
> "Generate test skeletons from the following documents: Design Doc (backend): [path], Design Doc (frontend): [path], UI Spec: [path] (if exists)"
|
|
74
|
+
|
|
75
|
+
## Work Planning Phase
|
|
76
|
+
|
|
77
|
+
Spawn work-planner with all Design Docs:
|
|
78
|
+
|
|
79
|
+
> "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."
|
|
80
|
+
|
|
81
|
+
work-planner's existing Integration Complete criteria naturally covers cross-layer verification when given multiple Design Docs.
|
|
82
|
+
|
|
83
|
+
## Task Decomposition Phase
|
|
84
|
+
|
|
85
|
+
task-decomposer follows standard decomposition from the work plan. The key addition is the **layer-aware naming convention**:
|
|
86
|
+
|
|
87
|
+
| Filename Pattern | Meaning |
|
|
88
|
+
|-----------------|---------|
|
|
89
|
+
| `{plan}-backend-task-{n}.md` | Backend only |
|
|
90
|
+
| `{plan}-frontend-task-{n}.md` | Frontend only |
|
|
91
|
+
|
|
92
|
+
Layer is determined from the task's **Target files** paths -- this is a factual determination, not inference.
|
|
93
|
+
|
|
94
|
+
## Task Cycle
|
|
95
|
+
|
|
96
|
+
Each task uses the standard 4-step cycle with layer-appropriate agents:
|
|
97
|
+
|
|
98
|
+
### backend-task
|
|
99
|
+
1. task-executor: Implementation
|
|
100
|
+
2. Escalation check
|
|
101
|
+
3. quality-fixer: Quality check and fixes
|
|
102
|
+
4. git commit (on approved: true)
|
|
103
|
+
|
|
104
|
+
### frontend-task
|
|
105
|
+
1. task-executor-frontend: Implementation
|
|
106
|
+
2. Escalation check
|
|
107
|
+
3. quality-fixer-frontend: Quality check and fixes
|
|
108
|
+
4. git commit (on approved: true)
|
|
109
|
+
|
|
110
|
+
### integration-test-reviewer Placement
|
|
111
|
+
|
|
112
|
+
When `testsAdded` contains integration or E2E tests:
|
|
113
|
+
- Standard flow (integration-test-reviewer after task-executor, before quality-fixer)
|
|
114
|
+
|
|
115
|
+
## Agent Routing Summary
|
|
116
|
+
|
|
117
|
+
The orchestrator selects agents by **filename pattern matching** -- no conditional inference required:
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
*-backend-task-* -> task-executor + quality-fixer
|
|
121
|
+
*-frontend-task-* -> task-executor-frontend + quality-fixer-frontend
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
All other orchestration rules (stop points, structured responses, escalation handling, task management) follow the standard subagents-orchestration-guide.
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-analyzer
|
|
3
|
+
description: "Performs task analysis and skill selection. Use when: determining task complexity, selecting appropriate skills, or estimating work scale."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Task Analyzer
|
|
7
|
+
|
|
8
|
+
Provides task analysis and skill selection guidance.
|
|
9
|
+
|
|
10
|
+
## Skills Index
|
|
11
|
+
|
|
12
|
+
See **[skills-index.yaml](references/skills-index.yaml)** for available skills metadata.
|
|
13
|
+
|
|
14
|
+
## Task Analysis Process
|
|
15
|
+
|
|
16
|
+
### 1. Understand Task Essence [MANDATORY]
|
|
17
|
+
|
|
18
|
+
Identify the fundamental purpose beyond surface-level work:
|
|
19
|
+
|
|
20
|
+
| Surface Work | Fundamental Purpose |
|
|
21
|
+
|--------------|---------------------|
|
|
22
|
+
| "Fix this bug" | Problem solving, root cause analysis |
|
|
23
|
+
| "Implement this feature" | Feature addition, value delivery |
|
|
24
|
+
| "Refactor this code" | Quality improvement, maintainability |
|
|
25
|
+
| "Update this file" | Change management, consistency |
|
|
26
|
+
|
|
27
|
+
**Key Questions** [MUST answer before proceeding]:
|
|
28
|
+
- What problem are we really solving?
|
|
29
|
+
- What is the expected outcome?
|
|
30
|
+
- What could go wrong if we approach this superficially?
|
|
31
|
+
|
|
32
|
+
### 2. Estimate Task Scale
|
|
33
|
+
|
|
34
|
+
| Scale | File Count | Indicators |
|
|
35
|
+
|-------|------------|------------|
|
|
36
|
+
| Small | 1-2 | Single function/component change |
|
|
37
|
+
| Medium | 3-5 | Multiple related components |
|
|
38
|
+
| Large | 6+ | Cross-cutting concerns, architecture impact |
|
|
39
|
+
|
|
40
|
+
**Scale affects skill priority:**
|
|
41
|
+
- Larger scale: process/documentation skills more important
|
|
42
|
+
- Smaller scale: implementation skills more focused
|
|
43
|
+
|
|
44
|
+
### 3. Identify Task Type
|
|
45
|
+
|
|
46
|
+
| Type | Characteristics | Key Skills |
|
|
47
|
+
|------|-----------------|------------|
|
|
48
|
+
| Implementation | New code, features | coding-rules, testing |
|
|
49
|
+
| Fix | Bug resolution | ai-development-guide, testing |
|
|
50
|
+
| Refactoring | Structure improvement | coding-rules, ai-development-guide |
|
|
51
|
+
| Design | Architecture decisions | documentation-criteria, implementation-approach |
|
|
52
|
+
| Quality | Testing, review | testing, integration-e2e-testing |
|
|
53
|
+
|
|
54
|
+
### 4. Tag-Based Skill Matching
|
|
55
|
+
|
|
56
|
+
Extract relevant tags from task description and match against skills-index.yaml:
|
|
57
|
+
|
|
58
|
+
```yaml
|
|
59
|
+
Task: "Implement user authentication with tests"
|
|
60
|
+
Extracted tags: [implementation, testing, security]
|
|
61
|
+
Matched skills:
|
|
62
|
+
- coding-rules (implementation, security)
|
|
63
|
+
- testing (testing)
|
|
64
|
+
- ai-development-guide (implementation)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 5. Implicit Relationships
|
|
68
|
+
|
|
69
|
+
Consider hidden dependencies:
|
|
70
|
+
|
|
71
|
+
| Task Involves | Also Include |
|
|
72
|
+
|---------------|--------------|
|
|
73
|
+
| Error handling | debugging, testing |
|
|
74
|
+
| New features | design, implementation, documentation |
|
|
75
|
+
| Performance | profiling, optimization, testing |
|
|
76
|
+
| Frontend | coding-rules/references/typescript.md, testing/references/typescript.md |
|
|
77
|
+
| API/Integration | integration-e2e-testing |
|
|
78
|
+
|
|
79
|
+
## Skill Selection Priority
|
|
80
|
+
|
|
81
|
+
1. **Essential** - Directly related to task type
|
|
82
|
+
2. **Quality** - Testing and quality assurance
|
|
83
|
+
3. **Process** - Workflow and documentation
|
|
84
|
+
4. **Supplementary** - Reference and best practices
|
|
85
|
+
|
|
86
|
+
## Output Format
|
|
87
|
+
|
|
88
|
+
Return structured analysis with skill metadata from skills-index.yaml:
|
|
89
|
+
|
|
90
|
+
```yaml
|
|
91
|
+
taskAnalysis:
|
|
92
|
+
essence: <string> # Fundamental purpose identified
|
|
93
|
+
type: <implementation|fix|refactoring|design|quality>
|
|
94
|
+
scale: <small|medium|large>
|
|
95
|
+
estimatedFiles: <number>
|
|
96
|
+
tags: [<string>, ...] # Extracted from task description
|
|
97
|
+
|
|
98
|
+
selectedSkills:
|
|
99
|
+
- skill: <skill-name> # From skills-index.yaml
|
|
100
|
+
priority: <high|medium|low>
|
|
101
|
+
reason: <string> # Why this skill was selected
|
|
102
|
+
tags: [...]
|
|
103
|
+
typical-use: <string>
|
|
104
|
+
size: <small|medium|large>
|
|
105
|
+
sections: [...] # All sections from yaml, unfiltered
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Note**: Section selection (choosing which sections are relevant) is done after reading the actual SKILL.md files.
|
|
109
|
+
|
|
110
|
+
## Metacognitive Question Design
|
|
111
|
+
|
|
112
|
+
Generate 3-5 questions according to task nature:
|
|
113
|
+
|
|
114
|
+
| Task Type | Question Focus |
|
|
115
|
+
|-----------|----------------|
|
|
116
|
+
| Implementation | Design validity, edge cases, performance |
|
|
117
|
+
| Fix | Root cause (5 Whys), impact scope, regression testing |
|
|
118
|
+
| Refactoring | Current problems, target state, phased plan |
|
|
119
|
+
| Design | Requirement clarity, future extensibility, trade-offs |
|
|
120
|
+
|
|
121
|
+
## Warning Patterns [MANDATORY to detect]
|
|
122
|
+
|
|
123
|
+
Detect and flag these patterns IMMEDIATELY:
|
|
124
|
+
|
|
125
|
+
| Pattern | Warning | REQUIRED Action |
|
|
126
|
+
|---------|---------|-----------------|
|
|
127
|
+
| Large change at once | High risk | MUST split into phases |
|
|
128
|
+
| Implementation without tests | Quality risk | MUST follow TDD |
|
|
129
|
+
| Immediate fix on error | Root cause missed | MUST pause and analyze with 5 Whys |
|
|
130
|
+
| Coding without plan | Scope creep | MUST plan first |
|
|
131
|
+
|
|
132
|
+
**ENFORCEMENT**: Detecting ANY warning pattern requires IMMEDIATE corrective action
|
|
133
|
+
|
|
134
|
+
## Common Decision Points
|
|
135
|
+
|
|
136
|
+
| Decision | Criteria |
|
|
137
|
+
|----------|----------|
|
|
138
|
+
| Need documentation? | Check documentation-criteria decision matrix |
|
|
139
|
+
| Which implementation approach? | Check implementation-approach phases |
|
|
140
|
+
| How to test? | Check testing + integration-e2e-testing |
|
|
141
|
+
| Code quality concerns? | Check ai-development-guide anti-patterns |
|
|
142
|
+
| Frontend specific? | Check coding-rules/references/typescript.md |
|