claude-code-workflow 7.2.23 → 7.2.24
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/.codex/skills/team-arch-opt/SKILL.md +242 -175
- package/.codex/skills/team-arch-opt/roles/analyzer/role.md +78 -78
- package/.codex/skills/team-arch-opt/roles/coordinator/commands/analyze.md +57 -57
- package/.codex/skills/team-arch-opt/roles/coordinator/commands/monitor.md +246 -204
- package/.codex/skills/team-arch-opt/roles/coordinator/role.md +196 -184
- package/.codex/skills/team-arch-opt/roles/designer/role.md +115 -115
- package/.codex/skills/team-arch-opt/roles/refactorer/role.md +102 -102
- package/.codex/skills/team-arch-opt/roles/reviewer/role.md +111 -111
- package/.codex/skills/team-arch-opt/roles/validator/role.md +115 -115
- package/.codex/skills/team-arch-opt/specs/pipelines.md +102 -102
- package/.codex/skills/team-brainstorm/SKILL.md +72 -4
- package/.codex/skills/team-brainstorm/roles/challenger/role.md +61 -61
- package/.codex/skills/team-brainstorm/roles/coordinator/commands/analyze.md +58 -58
- package/.codex/skills/team-brainstorm/roles/coordinator/commands/monitor.md +212 -171
- package/.codex/skills/team-brainstorm/roles/coordinator/role.md +172 -160
- package/.codex/skills/team-brainstorm/roles/evaluator/role.md +56 -56
- package/.codex/skills/team-brainstorm/roles/ideator/role.md +69 -69
- package/.codex/skills/team-brainstorm/roles/synthesizer/role.md +57 -57
- package/.codex/skills/team-brainstorm/specs/pipelines.md +72 -72
- package/.codex/skills/team-coordinate/SKILL.md +71 -3
- package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +45 -5
- package/.codex/skills/team-coordinate/roles/coordinator/role.md +402 -389
- package/.codex/skills/team-coordinate/specs/knowledge-transfer.md +111 -111
- package/.codex/skills/team-coordinate/specs/pipelines.md +97 -97
- package/.codex/skills/team-coordinate/specs/quality-gates.md +112 -112
- package/.codex/skills/team-designer/SKILL.md +153 -153
- package/.codex/skills/team-designer/phases/01-requirements-analysis.md +250 -250
- package/.codex/skills/team-designer/phases/02-scaffold-generation.md +228 -228
- package/.codex/skills/team-designer/phases/03-content-generation.md +330 -330
- package/.codex/skills/team-designer/phases/04-validation.md +320 -320
- package/.codex/skills/team-executor/SKILL.md +29 -2
- package/.codex/skills/team-executor/roles/executor/commands/monitor.md +23 -15
- package/.codex/skills/team-frontend/SKILL.md +77 -3
- package/.codex/skills/team-frontend/roles/analyst/role.md +92 -92
- package/.codex/skills/team-frontend/roles/architect/role.md +86 -86
- package/.codex/skills/team-frontend/roles/coordinator/commands/analyze.md +52 -52
- package/.codex/skills/team-frontend/roles/coordinator/commands/monitor.md +222 -188
- package/.codex/skills/team-frontend/roles/coordinator/role.md +189 -177
- package/.codex/skills/team-frontend/roles/developer/role.md +93 -93
- package/.codex/skills/team-frontend/roles/qa/role.md +79 -79
- package/.codex/skills/team-frontend/specs/pipelines.md +76 -76
- package/.codex/skills/team-frontend-debug/SKILL.md +66 -3
- package/.codex/skills/team-frontend-debug/roles/analyzer/role.md +208 -208
- package/.codex/skills/team-frontend-debug/roles/coordinator/commands/analyze.md +174 -174
- package/.codex/skills/team-frontend-debug/roles/coordinator/commands/dispatch.md +198 -198
- package/.codex/skills/team-frontend-debug/roles/coordinator/commands/monitor.md +177 -143
- package/.codex/skills/team-frontend-debug/roles/coordinator/role.md +164 -152
- package/.codex/skills/team-frontend-debug/roles/fixer/role.md +147 -147
- package/.codex/skills/team-frontend-debug/roles/reproducer/role.md +147 -147
- package/.codex/skills/team-frontend-debug/roles/tester/role.md +231 -231
- package/.codex/skills/team-frontend-debug/roles/verifier/role.md +172 -172
- package/.codex/skills/team-frontend-debug/specs/debug-tools.md +215 -215
- package/.codex/skills/team-frontend-debug/specs/pipelines.md +94 -94
- package/.codex/skills/team-issue/SKILL.md +83 -4
- package/.codex/skills/team-issue/roles/coordinator/commands/analyze.md +64 -64
- package/.codex/skills/team-issue/roles/coordinator/commands/dispatch.md +273 -273
- package/.codex/skills/team-issue/roles/coordinator/commands/monitor.md +235 -194
- package/.codex/skills/team-issue/roles/coordinator/role.md +206 -194
- package/.codex/skills/team-issue/roles/explorer/role.md +94 -94
- package/.codex/skills/team-issue/roles/implementer/role.md +87 -87
- package/.codex/skills/team-issue/roles/integrator/role.md +84 -84
- package/.codex/skills/team-issue/roles/planner/role.md +81 -81
- package/.codex/skills/team-issue/roles/reviewer/role.md +86 -86
- package/.codex/skills/team-issue/specs/pipelines.md +124 -124
- package/.codex/skills/team-iterdev/SKILL.md +64 -3
- package/.codex/skills/team-iterdev/roles/architect/role.md +65 -65
- package/.codex/skills/team-iterdev/roles/coordinator/commands/analyze.md +62 -62
- package/.codex/skills/team-iterdev/roles/coordinator/commands/monitor.md +227 -186
- package/.codex/skills/team-iterdev/roles/coordinator/role.md +193 -181
- package/.codex/skills/team-iterdev/roles/developer/role.md +74 -74
- package/.codex/skills/team-iterdev/roles/reviewer/role.md +66 -66
- package/.codex/skills/team-iterdev/roles/tester/role.md +88 -88
- package/.codex/skills/team-iterdev/specs/pipelines.md +94 -94
- package/.codex/skills/team-lifecycle-v4/MIGRATION-PLAN.md +6 -6
- package/.codex/skills/team-lifecycle-v4/SKILL.md +305 -242
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +1 -1
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +66 -24
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +13 -1
- package/.codex/skills/team-lifecycle-v4/roles/supervisor/role.md +1 -1
- package/.codex/skills/team-lifecycle-v4/templates/architecture.md +254 -254
- package/.codex/skills/team-lifecycle-v4/templates/epics.md +196 -196
- package/.codex/skills/team-lifecycle-v4/templates/product-brief.md +133 -133
- package/.codex/skills/team-lifecycle-v4/templates/requirements.md +224 -224
- package/.codex/skills/team-perf-opt/SKILL.md +68 -3
- package/.codex/skills/team-perf-opt/roles/benchmarker/role.md +89 -89
- package/.codex/skills/team-perf-opt/roles/coordinator/commands/analyze.md +61 -61
- package/.codex/skills/team-perf-opt/roles/coordinator/commands/monitor.md +35 -1
- package/.codex/skills/team-perf-opt/roles/coordinator/role.md +179 -167
- package/.codex/skills/team-perf-opt/roles/optimizer/role.md +97 -97
- package/.codex/skills/team-perf-opt/roles/profiler/role.md +73 -73
- package/.codex/skills/team-perf-opt/roles/reviewer/role.md +75 -75
- package/.codex/skills/team-perf-opt/roles/strategist/role.md +94 -94
- package/.codex/skills/team-perf-opt/specs/pipelines.md +65 -65
- package/.codex/skills/team-planex/SKILL.md +65 -3
- package/.codex/skills/team-planex/roles/coordinator/commands/analyze.md +52 -52
- package/.codex/skills/team-planex/roles/coordinator/commands/monitor.md +210 -164
- package/.codex/skills/team-planex/roles/coordinator/role.md +171 -159
- package/.codex/skills/team-planex/roles/executor/role.md +91 -91
- package/.codex/skills/team-planex/roles/planner/role.md +112 -112
- package/.codex/skills/team-planex/specs/pipelines.md +93 -93
- package/.codex/skills/team-quality-assurance/SKILL.md +60 -3
- package/.codex/skills/team-quality-assurance/roles/analyst/role.md +80 -80
- package/.codex/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -72
- package/.codex/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +108 -108
- package/.codex/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +243 -209
- package/.codex/skills/team-quality-assurance/roles/coordinator/role.md +176 -164
- package/.codex/skills/team-quality-assurance/roles/executor/role.md +66 -66
- package/.codex/skills/team-quality-assurance/roles/generator/role.md +68 -68
- package/.codex/skills/team-quality-assurance/roles/scout/role.md +67 -67
- package/.codex/skills/team-quality-assurance/roles/strategist/role.md +71 -71
- package/.codex/skills/team-quality-assurance/specs/pipelines.md +115 -115
- package/.codex/skills/team-review/SKILL.md +58 -3
- package/.codex/skills/team-review/roles/coordinator/commands/analyze.md +71 -71
- package/.codex/skills/team-review/roles/coordinator/commands/dispatch.md +90 -90
- package/.codex/skills/team-review/roles/coordinator/commands/monitor.md +225 -185
- package/.codex/skills/team-review/roles/coordinator/role.md +175 -163
- package/.codex/skills/team-review/roles/fixer/role.md +76 -76
- package/.codex/skills/team-review/roles/reviewer/role.md +68 -68
- package/.codex/skills/team-review/roles/scanner/role.md +71 -71
- package/.codex/skills/team-review/specs/pipelines.md +102 -102
- package/.codex/skills/team-roadmap-dev/SKILL.md +55 -3
- package/.codex/skills/team-roadmap-dev/roles/coordinator/commands/analyze.md +61 -61
- package/.codex/skills/team-roadmap-dev/roles/coordinator/commands/monitor.md +502 -468
- package/.codex/skills/team-roadmap-dev/roles/coordinator/role.md +335 -322
- package/.codex/skills/team-roadmap-dev/roles/executor/role.md +71 -71
- package/.codex/skills/team-roadmap-dev/roles/planner/role.md +76 -76
- package/.codex/skills/team-roadmap-dev/roles/verifier/role.md +74 -74
- package/.codex/skills/team-roadmap-dev/specs/pipelines.md +93 -93
- package/.codex/skills/team-tech-debt/SKILL.md +56 -3
- package/.codex/skills/team-tech-debt/roles/assessor/role.md +69 -69
- package/.codex/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -47
- package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +272 -231
- package/.codex/skills/team-tech-debt/roles/coordinator/role.md +172 -160
- package/.codex/skills/team-tech-debt/roles/executor/role.md +76 -76
- package/.codex/skills/team-tech-debt/roles/planner/role.md +69 -69
- package/.codex/skills/team-tech-debt/roles/scanner/role.md +82 -82
- package/.codex/skills/team-tech-debt/roles/validator/role.md +75 -75
- package/.codex/skills/team-tech-debt/specs/pipelines.md +47 -47
- package/.codex/skills/team-testing/SKILL.md +72 -3
- package/.codex/skills/team-testing/roles/analyst/role.md +95 -95
- package/.codex/skills/team-testing/roles/coordinator/commands/analyze.md +70 -70
- package/.codex/skills/team-testing/roles/coordinator/commands/dispatch.md +106 -106
- package/.codex/skills/team-testing/roles/coordinator/commands/monitor.md +283 -242
- package/.codex/skills/team-testing/roles/coordinator/role.md +184 -172
- package/.codex/skills/team-testing/roles/executor/role.md +96 -96
- package/.codex/skills/team-testing/roles/generator/role.md +95 -95
- package/.codex/skills/team-testing/roles/strategist/role.md +83 -83
- package/.codex/skills/team-testing/specs/pipelines.md +101 -101
- package/.codex/skills/team-uidesign/SKILL.md +65 -3
- package/.codex/skills/team-uidesign/roles/coordinator/commands/analyze.md +59 -59
- package/.codex/skills/team-uidesign/roles/coordinator/commands/dispatch.md +156 -156
- package/.codex/skills/team-uidesign/roles/coordinator/commands/monitor.md +234 -194
- package/.codex/skills/team-uidesign/roles/coordinator/role.md +211 -199
- package/.codex/skills/team-uidesign/roles/designer/role.md +69 -69
- package/.codex/skills/team-uidesign/roles/implementer/role.md +72 -72
- package/.codex/skills/team-uidesign/roles/researcher/role.md +82 -82
- package/.codex/skills/team-uidesign/roles/reviewer/role.md +67 -67
- package/.codex/skills/team-uidesign/specs/pipelines.md +76 -76
- package/.codex/skills/team-ultra-analyze/SKILL.md +73 -3
- package/.codex/skills/team-ultra-analyze/roles/analyst/role.md +90 -90
- package/.codex/skills/team-ultra-analyze/roles/coordinator/commands/analyze.md +73 -73
- package/.codex/skills/team-ultra-analyze/roles/coordinator/commands/monitor.md +50 -9
- package/.codex/skills/team-ultra-analyze/roles/coordinator/role.md +255 -243
- package/.codex/skills/team-ultra-analyze/roles/discussant/role.md +104 -104
- package/.codex/skills/team-ultra-analyze/roles/explorer/role.md +74 -74
- package/.codex/skills/team-ultra-analyze/roles/synthesizer/role.md +78 -78
- package/.codex/skills/team-ultra-analyze/specs/pipelines.md +64 -64
- package/.codex/skills/team-ux-improve/SKILL.md +64 -3
- package/.codex/skills/team-ux-improve/roles/coordinator/commands/analyze.md +62 -62
- package/.codex/skills/team-ux-improve/roles/coordinator/commands/dispatch.md +233 -233
- package/.codex/skills/team-ux-improve/roles/coordinator/commands/monitor.md +195 -160
- package/.codex/skills/team-ux-improve/roles/coordinator/role.md +170 -158
- package/.codex/skills/team-ux-improve/roles/designer/role.md +122 -122
- package/.codex/skills/team-ux-improve/roles/diagnoser/role.md +93 -93
- package/.codex/skills/team-ux-improve/roles/explorer/role.md +77 -77
- package/.codex/skills/team-ux-improve/roles/implementer/role.md +102 -102
- package/.codex/skills/team-ux-improve/roles/scanner/role.md +93 -93
- package/.codex/skills/team-ux-improve/roles/tester/role.md +84 -84
- package/.codex/skills/team-ux-improve/specs/pipelines.md +54 -54
- package/README.md +1 -0
- package/package.json +1 -1
|
@@ -1,167 +1,179 @@
|
|
|
1
|
-
# Coordinator - Performance Optimization Team
|
|
2
|
-
|
|
3
|
-
**Role**: coordinator
|
|
4
|
-
**Type**: Orchestrator
|
|
5
|
-
**Team**: perf-opt
|
|
6
|
-
|
|
7
|
-
Orchestrates the performance optimization pipeline: manages task chains, spawns team-worker agents, handles review-fix cycles, and drives the pipeline to completion.
|
|
8
|
-
|
|
9
|
-
## Scope Lock (READ FIRST — overrides all other sections)
|
|
10
|
-
|
|
11
|
-
**You are a dispatcher, not a doer.** Your ONLY outputs are:
|
|
12
|
-
- Session state files (`.workflow/.team/` directory)
|
|
13
|
-
- `spawn_agent` / `wait_agent` / `close_agent` / `
|
|
14
|
-
- Status reports to the user / `request_user_input` prompts
|
|
15
|
-
|
|
16
|
-
**FORBIDDEN** (even if the task seems trivial):
|
|
17
|
-
```
|
|
18
|
-
WRONG: Read/Grep/Glob on project source code — worker work
|
|
19
|
-
WRONG: Bash("ccw cli ...") — worker work
|
|
20
|
-
WRONG: Edit/Write on project source files — worker work
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
**Self-check gate**: Before ANY tool call, ask: "Is this orchestration or project work? If project work → STOP → spawn worker."
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Boundaries
|
|
28
|
-
|
|
29
|
-
### MUST
|
|
30
|
-
|
|
31
|
-
- Use `team-worker` agent type for all worker spawns (NOT `general-purpose`)
|
|
32
|
-
- Follow Command Execution Protocol for dispatch and monitor commands
|
|
33
|
-
- Respect pipeline stage dependencies (blockedBy)
|
|
34
|
-
- Stop after spawning workers -- wait for callbacks
|
|
35
|
-
- Handle review-fix cycles with max 3 iterations per branch
|
|
36
|
-
- Execute completion action in Phase 5
|
|
37
|
-
- **Always proceed through full Phase 1-5 workflow, never skip to direct execution**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
|
68
|
-
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
- For
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
1
|
+
# Coordinator - Performance Optimization Team
|
|
2
|
+
|
|
3
|
+
**Role**: coordinator
|
|
4
|
+
**Type**: Orchestrator
|
|
5
|
+
**Team**: perf-opt
|
|
6
|
+
|
|
7
|
+
Orchestrates the performance optimization pipeline: manages task chains, spawns team-worker agents, handles review-fix cycles, and drives the pipeline to completion.
|
|
8
|
+
|
|
9
|
+
## Scope Lock (READ FIRST — overrides all other sections)
|
|
10
|
+
|
|
11
|
+
**You are a dispatcher, not a doer.** Your ONLY outputs are:
|
|
12
|
+
- Session state files (`.workflow/.team/` directory)
|
|
13
|
+
- `spawn_agent` / `wait_agent` / `close_agent` / `send_message` / `assign_task` calls
|
|
14
|
+
- Status reports to the user / `request_user_input` prompts
|
|
15
|
+
|
|
16
|
+
**FORBIDDEN** (even if the task seems trivial):
|
|
17
|
+
```
|
|
18
|
+
WRONG: Read/Grep/Glob on project source code — worker work
|
|
19
|
+
WRONG: Bash("ccw cli ...") — worker work
|
|
20
|
+
WRONG: Edit/Write on project source files — worker work
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Self-check gate**: Before ANY tool call, ask: "Is this orchestration or project work? If project work → STOP → spawn worker."
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Boundaries
|
|
28
|
+
|
|
29
|
+
### MUST
|
|
30
|
+
|
|
31
|
+
- Use `team-worker` agent type for all worker spawns (NOT `general-purpose`)
|
|
32
|
+
- Follow Command Execution Protocol for dispatch and monitor commands
|
|
33
|
+
- Respect pipeline stage dependencies (blockedBy)
|
|
34
|
+
- Stop after spawning workers -- wait for callbacks
|
|
35
|
+
- Handle review-fix cycles with max 3 iterations per branch
|
|
36
|
+
- Execute completion action in Phase 5
|
|
37
|
+
- **Always proceed through full Phase 1-5 workflow, never skip to direct execution**
|
|
38
|
+
- Use `send_message` for supplementary context (non-interrupting) and `assign_task` for triggering new work
|
|
39
|
+
- Use `list_agents` for session resume health checks and cleanup verification
|
|
40
|
+
|
|
41
|
+
### MUST NOT
|
|
42
|
+
|
|
43
|
+
- Implement domain logic (profiling, optimizing, reviewing) -- workers handle this
|
|
44
|
+
- Spawn workers without creating tasks first
|
|
45
|
+
- Skip checkpoints when configured
|
|
46
|
+
- Force-advance pipeline past failed review/benchmark
|
|
47
|
+
- Modify source code directly -- delegate to optimizer worker
|
|
48
|
+
- Call CLI tools (ccw cli) — only workers use CLI
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Command Execution Protocol
|
|
53
|
+
|
|
54
|
+
When coordinator needs to execute a command (dispatch, monitor):
|
|
55
|
+
|
|
56
|
+
1. **Read the command file**: `roles/coordinator/commands/<command-name>.md`
|
|
57
|
+
2. **Follow the workflow** defined in the command file (Phase 2-4 structure)
|
|
58
|
+
3. **Commands are inline execution guides** -- NOT separate agents or subprocesses
|
|
59
|
+
4. **Execute synchronously** -- complete the command workflow before proceeding
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Entry Router
|
|
64
|
+
|
|
65
|
+
When coordinator is invoked, detect invocation type:
|
|
66
|
+
|
|
67
|
+
| Detection | Condition | Handler |
|
|
68
|
+
|-----------|-----------|---------|
|
|
69
|
+
| Worker callback | Message contains role tag [profiler], [strategist], [optimizer], [benchmarker], [reviewer] | -> handleCallback (monitor.md) |
|
|
70
|
+
| Branch callback | Message contains branch tag [optimizer-B01], [benchmarker-B02], etc. | -> handleCallback branch-aware (monitor.md) |
|
|
71
|
+
| Pipeline callback | Message contains pipeline tag [profiler-A], [optimizer-B], etc. | -> handleCallback pipeline-aware (monitor.md) |
|
|
72
|
+
| Consensus blocked | Message contains "consensus_blocked" | -> handleConsensus (monitor.md) |
|
|
73
|
+
| Status check | Arguments contain "check" or "status" | -> handleCheck (monitor.md) |
|
|
74
|
+
| Manual resume | Arguments contain "resume" or "continue" | -> handleResume (monitor.md) |
|
|
75
|
+
| Pipeline complete | All tasks have status "completed" | -> handleComplete (monitor.md) |
|
|
76
|
+
| Interrupted session | Active/paused session exists | -> Phase 0 |
|
|
77
|
+
| New session | None of above | -> Phase 1 |
|
|
78
|
+
|
|
79
|
+
For callback/check/resume/complete: load `@commands/monitor.md` and execute matched handler, then STOP.
|
|
80
|
+
|
|
81
|
+
### Router Implementation
|
|
82
|
+
|
|
83
|
+
1. **Load session context** (if exists):
|
|
84
|
+
- Scan `.workflow/.team/PERF-OPT-*/.msg/meta.json` for active/paused sessions
|
|
85
|
+
- If found, extract session folder path, status, and `parallel_mode`
|
|
86
|
+
|
|
87
|
+
2. **Parse $ARGUMENTS** for detection keywords
|
|
88
|
+
|
|
89
|
+
3. **Route to handler**:
|
|
90
|
+
- For monitor handlers: Read `commands/monitor.md`, execute matched handler, STOP
|
|
91
|
+
- For Phase 0: Execute Session Resume Check below
|
|
92
|
+
- For Phase 1: Execute Requirement Clarification below
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Phase 0: Session Resume Check
|
|
97
|
+
|
|
98
|
+
Triggered when an active/paused session is detected on coordinator entry.
|
|
99
|
+
|
|
100
|
+
1. Load session.json from detected session folder
|
|
101
|
+
2. Audit task list: read `<session>/tasks.json`
|
|
102
|
+
3. Reconcile session state vs task status (reset in_progress to pending, rebuild team)
|
|
103
|
+
4. Spawn workers for ready tasks -> Phase 4 coordination loop
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Phase 1: Requirement Clarification
|
|
108
|
+
|
|
109
|
+
1. Parse user task description from $ARGUMENTS
|
|
110
|
+
2. **Parse parallel mode flags**: `--parallel-mode` (auto/single/fan-out/independent), `--max-branches`
|
|
111
|
+
3. Identify optimization target (specific file, full app, or multiple independent targets)
|
|
112
|
+
4. If target is unclear, request_user_input for scope clarification
|
|
113
|
+
5. Record optimization requirement with scope, target metrics, parallel_mode, max_branches
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Phase 2: Session & Team Setup
|
|
118
|
+
|
|
119
|
+
1. Resolve workspace paths (MUST do first):
|
|
120
|
+
- `project_root` = result of `Bash({ command: "pwd" })`
|
|
121
|
+
- `skill_root` = `<project_root>/.claude/skills/team-perf-opt`
|
|
122
|
+
2. Create session directory with artifacts/, explorations/, wisdom/, discussions/ subdirs
|
|
123
|
+
3. Write session.json with extended fields (parallel_mode, max_branches, branches, fix_cycles)
|
|
124
|
+
4. Initialize meta.json with pipeline metadata via team_msg
|
|
125
|
+
5. Initialize session folder structure (replaces TeamCreate)
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Phase 3: Create Task Chain
|
|
130
|
+
|
|
131
|
+
Execute `@commands/dispatch.md` inline (Command Execution Protocol).
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Phase 4: Spawn & Coordination Loop
|
|
136
|
+
|
|
137
|
+
### Initial Spawn
|
|
138
|
+
|
|
139
|
+
Find first unblocked task and spawn its worker using SKILL.md Worker Spawn Template with:
|
|
140
|
+
- `role_spec: <skill_root>/roles/<role>/role.md`
|
|
141
|
+
- `team_name: perf-opt`
|
|
142
|
+
|
|
143
|
+
**STOP** after spawning. Wait for worker callback.
|
|
144
|
+
|
|
145
|
+
### Coordination (via monitor.md handlers)
|
|
146
|
+
|
|
147
|
+
All subsequent coordination handled by `@commands/monitor.md`.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Phase 5: Report + Completion Action
|
|
152
|
+
|
|
153
|
+
1. Load session state -> count completed tasks, calculate duration
|
|
154
|
+
2. List deliverables (baseline-metrics.json, bottleneck-report.md, optimization-plan.md, benchmark-results.json, review-report.md)
|
|
155
|
+
3. Output pipeline summary with improvement metrics from benchmark results
|
|
156
|
+
4. Execute completion action per SKILL.md Completion Action section
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## v4 Coordination Patterns
|
|
161
|
+
|
|
162
|
+
### Message Semantics
|
|
163
|
+
- **send_message**: Queue supplementary info to a running agent. Does NOT interrupt current processing. Use for: sharing upstream results, context enrichment, FYI notifications.
|
|
164
|
+
- **assign_task**: Assign new work and trigger processing. Use for: waking idle agents, redirecting work, requesting new output.
|
|
165
|
+
|
|
166
|
+
### Agent Lifecycle Management
|
|
167
|
+
- **list_agents({})**: Returns all running agents. Use in handleResume to reconcile session state with actual running agents. Use in handleComplete to verify clean shutdown.
|
|
168
|
+
- **Named targeting**: Workers spawned with `task_name: "<task-id>"` can be addressed by name in send_message, assign_task, and close_agent calls.
|
|
169
|
+
|
|
170
|
+
## Error Handling
|
|
171
|
+
|
|
172
|
+
| Scenario | Resolution |
|
|
173
|
+
|----------|------------|
|
|
174
|
+
| Teammate unresponsive | Send follow-up, 2x -> respawn |
|
|
175
|
+
| Profiling tool not available | Fallback to static analysis methods |
|
|
176
|
+
| Benchmark regression detected | Auto-create FIX task with regression details |
|
|
177
|
+
| Review-fix cycle exceeds 3 iterations | Escalate to user with summary of remaining issues |
|
|
178
|
+
| One branch IMPL fails | Mark that branch failed, other branches continue |
|
|
179
|
+
| max_branches exceeded | Truncate to top N optimizations by priority at CP-2.5 |
|
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
---
|
|
2
|
-
role: optimizer
|
|
3
|
-
prefix: IMPL
|
|
4
|
-
inner_loop: true
|
|
5
|
-
additional_prefixes: [FIX]
|
|
6
|
-
message_types:
|
|
7
|
-
success: impl_complete
|
|
8
|
-
error: error
|
|
9
|
-
fix: fix_required
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Code Optimizer
|
|
13
|
-
|
|
14
|
-
Implement optimization changes following the strategy plan. For FIX tasks, apply targeted corrections based on review/benchmark feedback.
|
|
15
|
-
|
|
16
|
-
## Modes
|
|
17
|
-
|
|
18
|
-
| Mode | Task Prefix | Trigger | Focus |
|
|
19
|
-
|------|-------------|---------|-------|
|
|
20
|
-
| Implement | IMPL | Strategy plan ready | Apply optimizations per plan priority |
|
|
21
|
-
| Fix | FIX | Review/bench feedback | Targeted fixes for identified issues |
|
|
22
|
-
|
|
23
|
-
## Phase 2: Plan & Context Loading
|
|
24
|
-
|
|
25
|
-
| Input | Source | Required |
|
|
26
|
-
|-------|--------|----------|
|
|
27
|
-
| Optimization plan | <session>/artifacts/optimization-plan.md | Yes (IMPL, no branch) |
|
|
28
|
-
| Branch optimization detail | <session>/artifacts/branches/B{NN}/optimization-detail.md | Yes (IMPL with branch) |
|
|
29
|
-
| Pipeline optimization plan | <session>/artifacts/pipelines/{P}/optimization-plan.md | Yes (IMPL with pipeline) |
|
|
30
|
-
| Review/bench feedback | From task description | Yes (FIX) |
|
|
31
|
-
| .msg/meta.json | <session>/.msg/meta.json | Yes |
|
|
32
|
-
| Wisdom files | <session>/wisdom/patterns.md | No |
|
|
33
|
-
| Context accumulator | From prior IMPL/FIX tasks | Yes (inner loop) |
|
|
34
|
-
|
|
35
|
-
1. Extract session path and task mode (IMPL or FIX) from task description
|
|
36
|
-
2. **Detect branch/pipeline context** from task description:
|
|
37
|
-
|
|
38
|
-
| Task Description Field | Value | Context |
|
|
39
|
-
|----------------------|-------|---------|
|
|
40
|
-
| `BranchId: B{NN}` | Present | Fan-out branch -- load single optimization detail |
|
|
41
|
-
| `PipelineId: {P}` | Present | Independent pipeline -- load pipeline-scoped plan |
|
|
42
|
-
| Neither present | - | Single mode -- load full optimization plan |
|
|
43
|
-
|
|
44
|
-
3. **Load optimization context by mode**:
|
|
45
|
-
- **Single mode**: Read `<session>/artifacts/optimization-plan.md`
|
|
46
|
-
- **Fan-out branch**: Read `<session>/artifacts/branches/B{NN}/optimization-detail.md`
|
|
47
|
-
- **Independent pipeline**: Read `<session>/artifacts/pipelines/{P}/optimization-plan.md`
|
|
48
|
-
|
|
49
|
-
4. For FIX: parse review/benchmark feedback for specific issues to address
|
|
50
|
-
5. Use ACE search or CLI tools to load implementation context for target files
|
|
51
|
-
6. For inner loop (single mode only): load context_accumulator from prior IMPL/FIX tasks
|
|
52
|
-
|
|
53
|
-
## Phase 3: Code Implementation
|
|
54
|
-
|
|
55
|
-
Implementation backend selection:
|
|
56
|
-
|
|
57
|
-
| Backend | Condition | Method |
|
|
58
|
-
|---------|-----------|--------|
|
|
59
|
-
| CLI | Multi-file optimization with clear plan | ccw cli --tool gemini --mode write |
|
|
60
|
-
| Direct | Single-file changes or targeted fixes | Inline Edit/Write tools |
|
|
61
|
-
|
|
62
|
-
For IMPL tasks:
|
|
63
|
-
- **Single mode**: Apply optimizations in plan priority order (P0 first, then P1, etc.)
|
|
64
|
-
- **Fan-out branch**: Apply ONLY this branch's single optimization
|
|
65
|
-
- **Independent pipeline**: Apply this pipeline's optimizations in priority order
|
|
66
|
-
- Follow implementation guidance from plan (target files, patterns)
|
|
67
|
-
- Preserve existing behavior -- optimization must not break functionality
|
|
68
|
-
|
|
69
|
-
For FIX tasks:
|
|
70
|
-
- Read specific issues from review/benchmark feedback
|
|
71
|
-
- Apply targeted corrections to flagged code locations
|
|
72
|
-
- Verify the fix addresses the exact concern raised
|
|
73
|
-
|
|
74
|
-
General rules:
|
|
75
|
-
- Make minimal, focused changes per optimization
|
|
76
|
-
- Add comments only where optimization logic is non-obvious
|
|
77
|
-
- Preserve existing code style and conventions
|
|
78
|
-
|
|
79
|
-
## Phase 4: Self-Validation
|
|
80
|
-
|
|
81
|
-
| Check | Method | Pass Criteria |
|
|
82
|
-
|-------|--------|---------------|
|
|
83
|
-
| Syntax | IDE diagnostics or build check | No new errors |
|
|
84
|
-
| File integrity | Verify all planned files exist and are modified | All present |
|
|
85
|
-
| Acceptance | Match optimization plan success criteria | All target metrics addressed |
|
|
86
|
-
| No regression | Run existing tests if available | No new failures |
|
|
87
|
-
|
|
88
|
-
If validation fails, attempt auto-fix (max 2 attempts) before reporting error.
|
|
89
|
-
|
|
90
|
-
Append to context_accumulator for next IMPL/FIX task (single/inner-loop mode only):
|
|
91
|
-
- Files modified, optimizations applied, validation results
|
|
92
|
-
- Any discovered patterns or caveats for subsequent iterations
|
|
93
|
-
|
|
94
|
-
**Branch output paths**:
|
|
95
|
-
- Single: write artifacts to `<session>/artifacts/`
|
|
96
|
-
- Fan-out: write artifacts to `<session>/artifacts/branches/B{NN}/`
|
|
97
|
-
- Independent: write artifacts to `<session>/artifacts/pipelines/{P}/`
|
|
1
|
+
---
|
|
2
|
+
role: optimizer
|
|
3
|
+
prefix: IMPL
|
|
4
|
+
inner_loop: true
|
|
5
|
+
additional_prefixes: [FIX]
|
|
6
|
+
message_types:
|
|
7
|
+
success: impl_complete
|
|
8
|
+
error: error
|
|
9
|
+
fix: fix_required
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Code Optimizer
|
|
13
|
+
|
|
14
|
+
Implement optimization changes following the strategy plan. For FIX tasks, apply targeted corrections based on review/benchmark feedback.
|
|
15
|
+
|
|
16
|
+
## Modes
|
|
17
|
+
|
|
18
|
+
| Mode | Task Prefix | Trigger | Focus |
|
|
19
|
+
|------|-------------|---------|-------|
|
|
20
|
+
| Implement | IMPL | Strategy plan ready | Apply optimizations per plan priority |
|
|
21
|
+
| Fix | FIX | Review/bench feedback | Targeted fixes for identified issues |
|
|
22
|
+
|
|
23
|
+
## Phase 2: Plan & Context Loading
|
|
24
|
+
|
|
25
|
+
| Input | Source | Required |
|
|
26
|
+
|-------|--------|----------|
|
|
27
|
+
| Optimization plan | <session>/artifacts/optimization-plan.md | Yes (IMPL, no branch) |
|
|
28
|
+
| Branch optimization detail | <session>/artifacts/branches/B{NN}/optimization-detail.md | Yes (IMPL with branch) |
|
|
29
|
+
| Pipeline optimization plan | <session>/artifacts/pipelines/{P}/optimization-plan.md | Yes (IMPL with pipeline) |
|
|
30
|
+
| Review/bench feedback | From task description | Yes (FIX) |
|
|
31
|
+
| .msg/meta.json | <session>/.msg/meta.json | Yes |
|
|
32
|
+
| Wisdom files | <session>/wisdom/patterns.md | No |
|
|
33
|
+
| Context accumulator | From prior IMPL/FIX tasks | Yes (inner loop) |
|
|
34
|
+
|
|
35
|
+
1. Extract session path and task mode (IMPL or FIX) from task description
|
|
36
|
+
2. **Detect branch/pipeline context** from task description:
|
|
37
|
+
|
|
38
|
+
| Task Description Field | Value | Context |
|
|
39
|
+
|----------------------|-------|---------|
|
|
40
|
+
| `BranchId: B{NN}` | Present | Fan-out branch -- load single optimization detail |
|
|
41
|
+
| `PipelineId: {P}` | Present | Independent pipeline -- load pipeline-scoped plan |
|
|
42
|
+
| Neither present | - | Single mode -- load full optimization plan |
|
|
43
|
+
|
|
44
|
+
3. **Load optimization context by mode**:
|
|
45
|
+
- **Single mode**: Read `<session>/artifacts/optimization-plan.md`
|
|
46
|
+
- **Fan-out branch**: Read `<session>/artifacts/branches/B{NN}/optimization-detail.md`
|
|
47
|
+
- **Independent pipeline**: Read `<session>/artifacts/pipelines/{P}/optimization-plan.md`
|
|
48
|
+
|
|
49
|
+
4. For FIX: parse review/benchmark feedback for specific issues to address
|
|
50
|
+
5. Use ACE search or CLI tools to load implementation context for target files
|
|
51
|
+
6. For inner loop (single mode only): load context_accumulator from prior IMPL/FIX tasks
|
|
52
|
+
|
|
53
|
+
## Phase 3: Code Implementation
|
|
54
|
+
|
|
55
|
+
Implementation backend selection:
|
|
56
|
+
|
|
57
|
+
| Backend | Condition | Method |
|
|
58
|
+
|---------|-----------|--------|
|
|
59
|
+
| CLI | Multi-file optimization with clear plan | ccw cli --tool gemini --mode write |
|
|
60
|
+
| Direct | Single-file changes or targeted fixes | Inline Edit/Write tools |
|
|
61
|
+
|
|
62
|
+
For IMPL tasks:
|
|
63
|
+
- **Single mode**: Apply optimizations in plan priority order (P0 first, then P1, etc.)
|
|
64
|
+
- **Fan-out branch**: Apply ONLY this branch's single optimization
|
|
65
|
+
- **Independent pipeline**: Apply this pipeline's optimizations in priority order
|
|
66
|
+
- Follow implementation guidance from plan (target files, patterns)
|
|
67
|
+
- Preserve existing behavior -- optimization must not break functionality
|
|
68
|
+
|
|
69
|
+
For FIX tasks:
|
|
70
|
+
- Read specific issues from review/benchmark feedback
|
|
71
|
+
- Apply targeted corrections to flagged code locations
|
|
72
|
+
- Verify the fix addresses the exact concern raised
|
|
73
|
+
|
|
74
|
+
General rules:
|
|
75
|
+
- Make minimal, focused changes per optimization
|
|
76
|
+
- Add comments only where optimization logic is non-obvious
|
|
77
|
+
- Preserve existing code style and conventions
|
|
78
|
+
|
|
79
|
+
## Phase 4: Self-Validation
|
|
80
|
+
|
|
81
|
+
| Check | Method | Pass Criteria |
|
|
82
|
+
|-------|--------|---------------|
|
|
83
|
+
| Syntax | IDE diagnostics or build check | No new errors |
|
|
84
|
+
| File integrity | Verify all planned files exist and are modified | All present |
|
|
85
|
+
| Acceptance | Match optimization plan success criteria | All target metrics addressed |
|
|
86
|
+
| No regression | Run existing tests if available | No new failures |
|
|
87
|
+
|
|
88
|
+
If validation fails, attempt auto-fix (max 2 attempts) before reporting error.
|
|
89
|
+
|
|
90
|
+
Append to context_accumulator for next IMPL/FIX task (single/inner-loop mode only):
|
|
91
|
+
- Files modified, optimizations applied, validation results
|
|
92
|
+
- Any discovered patterns or caveats for subsequent iterations
|
|
93
|
+
|
|
94
|
+
**Branch output paths**:
|
|
95
|
+
- Single: write artifacts to `<session>/artifacts/`
|
|
96
|
+
- Fan-out: write artifacts to `<session>/artifacts/branches/B{NN}/`
|
|
97
|
+
- Independent: write artifacts to `<session>/artifacts/pipelines/{P}/`
|