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.
Files changed (181) hide show
  1. package/.codex/skills/team-arch-opt/SKILL.md +242 -175
  2. package/.codex/skills/team-arch-opt/roles/analyzer/role.md +78 -78
  3. package/.codex/skills/team-arch-opt/roles/coordinator/commands/analyze.md +57 -57
  4. package/.codex/skills/team-arch-opt/roles/coordinator/commands/monitor.md +246 -204
  5. package/.codex/skills/team-arch-opt/roles/coordinator/role.md +196 -184
  6. package/.codex/skills/team-arch-opt/roles/designer/role.md +115 -115
  7. package/.codex/skills/team-arch-opt/roles/refactorer/role.md +102 -102
  8. package/.codex/skills/team-arch-opt/roles/reviewer/role.md +111 -111
  9. package/.codex/skills/team-arch-opt/roles/validator/role.md +115 -115
  10. package/.codex/skills/team-arch-opt/specs/pipelines.md +102 -102
  11. package/.codex/skills/team-brainstorm/SKILL.md +72 -4
  12. package/.codex/skills/team-brainstorm/roles/challenger/role.md +61 -61
  13. package/.codex/skills/team-brainstorm/roles/coordinator/commands/analyze.md +58 -58
  14. package/.codex/skills/team-brainstorm/roles/coordinator/commands/monitor.md +212 -171
  15. package/.codex/skills/team-brainstorm/roles/coordinator/role.md +172 -160
  16. package/.codex/skills/team-brainstorm/roles/evaluator/role.md +56 -56
  17. package/.codex/skills/team-brainstorm/roles/ideator/role.md +69 -69
  18. package/.codex/skills/team-brainstorm/roles/synthesizer/role.md +57 -57
  19. package/.codex/skills/team-brainstorm/specs/pipelines.md +72 -72
  20. package/.codex/skills/team-coordinate/SKILL.md +71 -3
  21. package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +45 -5
  22. package/.codex/skills/team-coordinate/roles/coordinator/role.md +402 -389
  23. package/.codex/skills/team-coordinate/specs/knowledge-transfer.md +111 -111
  24. package/.codex/skills/team-coordinate/specs/pipelines.md +97 -97
  25. package/.codex/skills/team-coordinate/specs/quality-gates.md +112 -112
  26. package/.codex/skills/team-designer/SKILL.md +153 -153
  27. package/.codex/skills/team-designer/phases/01-requirements-analysis.md +250 -250
  28. package/.codex/skills/team-designer/phases/02-scaffold-generation.md +228 -228
  29. package/.codex/skills/team-designer/phases/03-content-generation.md +330 -330
  30. package/.codex/skills/team-designer/phases/04-validation.md +320 -320
  31. package/.codex/skills/team-executor/SKILL.md +29 -2
  32. package/.codex/skills/team-executor/roles/executor/commands/monitor.md +23 -15
  33. package/.codex/skills/team-frontend/SKILL.md +77 -3
  34. package/.codex/skills/team-frontend/roles/analyst/role.md +92 -92
  35. package/.codex/skills/team-frontend/roles/architect/role.md +86 -86
  36. package/.codex/skills/team-frontend/roles/coordinator/commands/analyze.md +52 -52
  37. package/.codex/skills/team-frontend/roles/coordinator/commands/monitor.md +222 -188
  38. package/.codex/skills/team-frontend/roles/coordinator/role.md +189 -177
  39. package/.codex/skills/team-frontend/roles/developer/role.md +93 -93
  40. package/.codex/skills/team-frontend/roles/qa/role.md +79 -79
  41. package/.codex/skills/team-frontend/specs/pipelines.md +76 -76
  42. package/.codex/skills/team-frontend-debug/SKILL.md +66 -3
  43. package/.codex/skills/team-frontend-debug/roles/analyzer/role.md +208 -208
  44. package/.codex/skills/team-frontend-debug/roles/coordinator/commands/analyze.md +174 -174
  45. package/.codex/skills/team-frontend-debug/roles/coordinator/commands/dispatch.md +198 -198
  46. package/.codex/skills/team-frontend-debug/roles/coordinator/commands/monitor.md +177 -143
  47. package/.codex/skills/team-frontend-debug/roles/coordinator/role.md +164 -152
  48. package/.codex/skills/team-frontend-debug/roles/fixer/role.md +147 -147
  49. package/.codex/skills/team-frontend-debug/roles/reproducer/role.md +147 -147
  50. package/.codex/skills/team-frontend-debug/roles/tester/role.md +231 -231
  51. package/.codex/skills/team-frontend-debug/roles/verifier/role.md +172 -172
  52. package/.codex/skills/team-frontend-debug/specs/debug-tools.md +215 -215
  53. package/.codex/skills/team-frontend-debug/specs/pipelines.md +94 -94
  54. package/.codex/skills/team-issue/SKILL.md +83 -4
  55. package/.codex/skills/team-issue/roles/coordinator/commands/analyze.md +64 -64
  56. package/.codex/skills/team-issue/roles/coordinator/commands/dispatch.md +273 -273
  57. package/.codex/skills/team-issue/roles/coordinator/commands/monitor.md +235 -194
  58. package/.codex/skills/team-issue/roles/coordinator/role.md +206 -194
  59. package/.codex/skills/team-issue/roles/explorer/role.md +94 -94
  60. package/.codex/skills/team-issue/roles/implementer/role.md +87 -87
  61. package/.codex/skills/team-issue/roles/integrator/role.md +84 -84
  62. package/.codex/skills/team-issue/roles/planner/role.md +81 -81
  63. package/.codex/skills/team-issue/roles/reviewer/role.md +86 -86
  64. package/.codex/skills/team-issue/specs/pipelines.md +124 -124
  65. package/.codex/skills/team-iterdev/SKILL.md +64 -3
  66. package/.codex/skills/team-iterdev/roles/architect/role.md +65 -65
  67. package/.codex/skills/team-iterdev/roles/coordinator/commands/analyze.md +62 -62
  68. package/.codex/skills/team-iterdev/roles/coordinator/commands/monitor.md +227 -186
  69. package/.codex/skills/team-iterdev/roles/coordinator/role.md +193 -181
  70. package/.codex/skills/team-iterdev/roles/developer/role.md +74 -74
  71. package/.codex/skills/team-iterdev/roles/reviewer/role.md +66 -66
  72. package/.codex/skills/team-iterdev/roles/tester/role.md +88 -88
  73. package/.codex/skills/team-iterdev/specs/pipelines.md +94 -94
  74. package/.codex/skills/team-lifecycle-v4/MIGRATION-PLAN.md +6 -6
  75. package/.codex/skills/team-lifecycle-v4/SKILL.md +305 -242
  76. package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +1 -1
  77. package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +66 -24
  78. package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +13 -1
  79. package/.codex/skills/team-lifecycle-v4/roles/supervisor/role.md +1 -1
  80. package/.codex/skills/team-lifecycle-v4/templates/architecture.md +254 -254
  81. package/.codex/skills/team-lifecycle-v4/templates/epics.md +196 -196
  82. package/.codex/skills/team-lifecycle-v4/templates/product-brief.md +133 -133
  83. package/.codex/skills/team-lifecycle-v4/templates/requirements.md +224 -224
  84. package/.codex/skills/team-perf-opt/SKILL.md +68 -3
  85. package/.codex/skills/team-perf-opt/roles/benchmarker/role.md +89 -89
  86. package/.codex/skills/team-perf-opt/roles/coordinator/commands/analyze.md +61 -61
  87. package/.codex/skills/team-perf-opt/roles/coordinator/commands/monitor.md +35 -1
  88. package/.codex/skills/team-perf-opt/roles/coordinator/role.md +179 -167
  89. package/.codex/skills/team-perf-opt/roles/optimizer/role.md +97 -97
  90. package/.codex/skills/team-perf-opt/roles/profiler/role.md +73 -73
  91. package/.codex/skills/team-perf-opt/roles/reviewer/role.md +75 -75
  92. package/.codex/skills/team-perf-opt/roles/strategist/role.md +94 -94
  93. package/.codex/skills/team-perf-opt/specs/pipelines.md +65 -65
  94. package/.codex/skills/team-planex/SKILL.md +65 -3
  95. package/.codex/skills/team-planex/roles/coordinator/commands/analyze.md +52 -52
  96. package/.codex/skills/team-planex/roles/coordinator/commands/monitor.md +210 -164
  97. package/.codex/skills/team-planex/roles/coordinator/role.md +171 -159
  98. package/.codex/skills/team-planex/roles/executor/role.md +91 -91
  99. package/.codex/skills/team-planex/roles/planner/role.md +112 -112
  100. package/.codex/skills/team-planex/specs/pipelines.md +93 -93
  101. package/.codex/skills/team-quality-assurance/SKILL.md +60 -3
  102. package/.codex/skills/team-quality-assurance/roles/analyst/role.md +80 -80
  103. package/.codex/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -72
  104. package/.codex/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +108 -108
  105. package/.codex/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +243 -209
  106. package/.codex/skills/team-quality-assurance/roles/coordinator/role.md +176 -164
  107. package/.codex/skills/team-quality-assurance/roles/executor/role.md +66 -66
  108. package/.codex/skills/team-quality-assurance/roles/generator/role.md +68 -68
  109. package/.codex/skills/team-quality-assurance/roles/scout/role.md +67 -67
  110. package/.codex/skills/team-quality-assurance/roles/strategist/role.md +71 -71
  111. package/.codex/skills/team-quality-assurance/specs/pipelines.md +115 -115
  112. package/.codex/skills/team-review/SKILL.md +58 -3
  113. package/.codex/skills/team-review/roles/coordinator/commands/analyze.md +71 -71
  114. package/.codex/skills/team-review/roles/coordinator/commands/dispatch.md +90 -90
  115. package/.codex/skills/team-review/roles/coordinator/commands/monitor.md +225 -185
  116. package/.codex/skills/team-review/roles/coordinator/role.md +175 -163
  117. package/.codex/skills/team-review/roles/fixer/role.md +76 -76
  118. package/.codex/skills/team-review/roles/reviewer/role.md +68 -68
  119. package/.codex/skills/team-review/roles/scanner/role.md +71 -71
  120. package/.codex/skills/team-review/specs/pipelines.md +102 -102
  121. package/.codex/skills/team-roadmap-dev/SKILL.md +55 -3
  122. package/.codex/skills/team-roadmap-dev/roles/coordinator/commands/analyze.md +61 -61
  123. package/.codex/skills/team-roadmap-dev/roles/coordinator/commands/monitor.md +502 -468
  124. package/.codex/skills/team-roadmap-dev/roles/coordinator/role.md +335 -322
  125. package/.codex/skills/team-roadmap-dev/roles/executor/role.md +71 -71
  126. package/.codex/skills/team-roadmap-dev/roles/planner/role.md +76 -76
  127. package/.codex/skills/team-roadmap-dev/roles/verifier/role.md +74 -74
  128. package/.codex/skills/team-roadmap-dev/specs/pipelines.md +93 -93
  129. package/.codex/skills/team-tech-debt/SKILL.md +56 -3
  130. package/.codex/skills/team-tech-debt/roles/assessor/role.md +69 -69
  131. package/.codex/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -47
  132. package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +272 -231
  133. package/.codex/skills/team-tech-debt/roles/coordinator/role.md +172 -160
  134. package/.codex/skills/team-tech-debt/roles/executor/role.md +76 -76
  135. package/.codex/skills/team-tech-debt/roles/planner/role.md +69 -69
  136. package/.codex/skills/team-tech-debt/roles/scanner/role.md +82 -82
  137. package/.codex/skills/team-tech-debt/roles/validator/role.md +75 -75
  138. package/.codex/skills/team-tech-debt/specs/pipelines.md +47 -47
  139. package/.codex/skills/team-testing/SKILL.md +72 -3
  140. package/.codex/skills/team-testing/roles/analyst/role.md +95 -95
  141. package/.codex/skills/team-testing/roles/coordinator/commands/analyze.md +70 -70
  142. package/.codex/skills/team-testing/roles/coordinator/commands/dispatch.md +106 -106
  143. package/.codex/skills/team-testing/roles/coordinator/commands/monitor.md +283 -242
  144. package/.codex/skills/team-testing/roles/coordinator/role.md +184 -172
  145. package/.codex/skills/team-testing/roles/executor/role.md +96 -96
  146. package/.codex/skills/team-testing/roles/generator/role.md +95 -95
  147. package/.codex/skills/team-testing/roles/strategist/role.md +83 -83
  148. package/.codex/skills/team-testing/specs/pipelines.md +101 -101
  149. package/.codex/skills/team-uidesign/SKILL.md +65 -3
  150. package/.codex/skills/team-uidesign/roles/coordinator/commands/analyze.md +59 -59
  151. package/.codex/skills/team-uidesign/roles/coordinator/commands/dispatch.md +156 -156
  152. package/.codex/skills/team-uidesign/roles/coordinator/commands/monitor.md +234 -194
  153. package/.codex/skills/team-uidesign/roles/coordinator/role.md +211 -199
  154. package/.codex/skills/team-uidesign/roles/designer/role.md +69 -69
  155. package/.codex/skills/team-uidesign/roles/implementer/role.md +72 -72
  156. package/.codex/skills/team-uidesign/roles/researcher/role.md +82 -82
  157. package/.codex/skills/team-uidesign/roles/reviewer/role.md +67 -67
  158. package/.codex/skills/team-uidesign/specs/pipelines.md +76 -76
  159. package/.codex/skills/team-ultra-analyze/SKILL.md +73 -3
  160. package/.codex/skills/team-ultra-analyze/roles/analyst/role.md +90 -90
  161. package/.codex/skills/team-ultra-analyze/roles/coordinator/commands/analyze.md +73 -73
  162. package/.codex/skills/team-ultra-analyze/roles/coordinator/commands/monitor.md +50 -9
  163. package/.codex/skills/team-ultra-analyze/roles/coordinator/role.md +255 -243
  164. package/.codex/skills/team-ultra-analyze/roles/discussant/role.md +104 -104
  165. package/.codex/skills/team-ultra-analyze/roles/explorer/role.md +74 -74
  166. package/.codex/skills/team-ultra-analyze/roles/synthesizer/role.md +78 -78
  167. package/.codex/skills/team-ultra-analyze/specs/pipelines.md +64 -64
  168. package/.codex/skills/team-ux-improve/SKILL.md +64 -3
  169. package/.codex/skills/team-ux-improve/roles/coordinator/commands/analyze.md +62 -62
  170. package/.codex/skills/team-ux-improve/roles/coordinator/commands/dispatch.md +233 -233
  171. package/.codex/skills/team-ux-improve/roles/coordinator/commands/monitor.md +195 -160
  172. package/.codex/skills/team-ux-improve/roles/coordinator/role.md +170 -158
  173. package/.codex/skills/team-ux-improve/roles/designer/role.md +122 -122
  174. package/.codex/skills/team-ux-improve/roles/diagnoser/role.md +93 -93
  175. package/.codex/skills/team-ux-improve/roles/explorer/role.md +77 -77
  176. package/.codex/skills/team-ux-improve/roles/implementer/role.md +102 -102
  177. package/.codex/skills/team-ux-improve/roles/scanner/role.md +93 -93
  178. package/.codex/skills/team-ux-improve/roles/tester/role.md +84 -84
  179. package/.codex/skills/team-ux-improve/specs/pipelines.md +54 -54
  180. package/README.md +1 -0
  181. package/package.json +1 -1
@@ -1,194 +1,206 @@
1
- ---
2
- role: coordinator
3
- ---
4
-
5
- # Coordinator — Issue Resolution Team
6
-
7
- Orchestrate the issue resolution pipeline: clarify requirements -> create team -> dispatch tasks -> monitor pipeline -> report results. Supports quick, full, and batch modes.
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_input` 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
- ## Identity
28
- - Name: coordinator | Tag: [coordinator]
29
- - Responsibility: Issue clarification -> Mode detection -> Create team -> Dispatch tasks -> Monitor pipeline -> Report results
30
-
31
- ## Boundaries
32
-
33
- ### MUST
34
- - Use `team_worker` agent type for all worker spawns
35
- - Follow Command Execution Protocol for dispatch and monitor commands
36
- - Respect pipeline stage dependencies (deps)
37
- - Stop after spawning workers -- wait for results via wait_agent
38
- - Handle review-fix cycles with max 2 iterations
39
- - Execute completion action in Phase 5
40
- - **Always proceed through full Phase 1-5 workflow, never skip to direct execution**
41
-
42
- ### MUST NOT
43
- - Implement domain logic (exploring, planning, reviewing, implementing) -- workers handle this
44
- - Spawn workers without creating tasks first
45
- - Skip review gate in full/batch modes
46
- - Force-advance pipeline past failed review
47
- - Modify source code directly -- delegate to implementer worker
48
- - Call CLI tools directly for implementation tasks
49
-
50
- ## Command Execution Protocol
51
-
52
- When coordinator needs to execute a specific phase:
53
- 1. Read `commands/<command>.md`
54
- 2. Follow the workflow defined in the command
55
- 3. Commands are inline execution guides, NOT separate agents
56
- 4. Execute synchronously, complete before proceeding
57
-
58
- ## Entry Router
59
-
60
- | Detection | Condition | Handler |
61
- |-----------|-----------|---------|
62
- | Worker result | Result from wait_agent contains [explorer], [planner], [reviewer], [integrator], [implementer] | -> handleCallback (monitor.md) |
63
- | Consensus blocked | Message contains "consensus_blocked" | -> handleConsensus (monitor.md) |
64
- | Status check | Args contain "check" or "status" | -> handleCheck (monitor.md) |
65
- | Manual resume | Args contain "resume" or "continue" | -> handleResume (monitor.md) |
66
- | Capability gap | Message contains "capability_gap" | -> handleAdapt (monitor.md) |
67
- | Pipeline complete | All tasks completed | -> handleComplete (monitor.md) |
68
- | Interrupted session | Active session in .workflow/.team/TISL-* | -> Phase 0 |
69
- | New session | None of above | -> Phase 1 |
70
-
71
- For callback/check/resume/consensus/adapt/complete: load `@commands/monitor.md`, execute handler, STOP.
72
-
73
- ## Phase 0: Session Resume Check
74
-
75
- 1. Scan `.workflow/.team/TISL-*/session.json` for active/paused sessions
76
- 2. No sessions -> Phase 1
77
- 3. Single session -> reconcile (read tasks.json, reset in_progress->pending, rebuild team, spawn first ready task)
78
- 4. Multiple -> request_user_input for selection
79
-
80
- ## Phase 1: Requirement Clarification
81
-
82
- TEXT-LEVEL ONLY. No source code reading.
83
-
84
- 1. Parse issue IDs and mode from $ARGUMENTS:
85
-
86
- | Pattern | Extraction |
87
- |---------|------------|
88
- | `GH-\d+` | GitHub issue ID |
89
- | `ISS-\d{8}-\d{6}` | Local issue ID |
90
- | `--mode=<mode>` | Explicit mode override |
91
- | `--all-pending` | Load all pending issues via `Bash("ccw issue list --status registered,pending --json")` |
92
-
93
- 2. If no issue IDs found -> request_user_input for clarification
94
-
95
- 3. **Mode auto-detection** (when `--mode` not specified):
96
-
97
- | Condition | Mode |
98
- |-----------|------|
99
- | Issue count <= 2 AND no high-priority (priority < 4) | `quick` |
100
- | Issue count <= 2 AND has high-priority (priority >= 4) | `full` |
101
- | 3-4 issues | `full` |
102
- | Issue count >= 5 | `batch` |
103
-
104
- 4. **Execution method selection** for BUILD phase (default: Auto):
105
-
106
- | Option | Trigger |
107
- |--------|---------|
108
- | codex | task_count > 3 or explicit `--exec=codex` |
109
- | gemini | task_count <= 3 or explicit `--exec=gemini` |
110
- | qwen | explicit `--exec=qwen` |
111
- | Auto | Auto-select based on task_count |
112
-
113
- 5. Record requirements: issue_ids, mode, execution_method, code_review settings
114
-
115
- ## Phase 2: Create Team + Initialize Session
116
-
117
- 1. Resolve workspace paths (MUST do first):
118
- - `project_root` = result of `Bash("pwd")`
119
- - `skill_root` = `<project_root>/.codex/skills/team-issue`
120
- 2. Generate session ID: `TISL-<issue-slug>-<date>`
121
- 3. Create session folder structure:
122
- ```
123
- Bash("mkdir -p .workflow/.team/TISL-<slug>-<date>/{explorations,solutions,audits,queue,builds,wisdom,.msg}")
124
- ```
125
- 4. Create session folder + initialize `tasks.json` (empty array)
126
- 5. Write session.json with pipeline_mode, issue_ids, execution_method, fix_cycles=0, max_fix_cycles=2
127
- 6. Initialize meta.json via team_msg state_update:
128
- ```
129
- mcp__ccw-tools__team_msg({
130
- operation: "log", session_id: "<id>", from: "coordinator",
131
- type: "state_update", summary: "Session initialized",
132
- data: { pipeline_mode: "<mode>", pipeline_stages: ["explorer","planner","reviewer","integrator","implementer"], team_name: "issue", issue_ids: [...], fix_cycles: 0 }
133
- })
134
- ```
135
- 7. Initialize wisdom files (learnings.md, decisions.md, conventions.md, issues.md)
136
-
137
- ## Phase 3: Create Task Chain
138
-
139
- Delegate to @commands/dispatch.md:
140
- 1. Read pipeline mode and issue IDs from session.json
141
- 2. Build tasks array and write to tasks.json with correct deps
142
- 3. Update session.json with task count
143
-
144
- ## Phase 4: Spawn-and-Stop
145
-
146
- Delegate to @commands/monitor.md#handleSpawnNext:
147
- 1. Find ready tasks (pending + deps resolved)
148
- 2. Spawn team_worker agents (see SKILL.md Spawn Template)
149
- 3. Output status summary
150
- 4. STOP
151
-
152
- ## Phase 5: Report + Completion Action
153
-
154
- 1. Load session state -> count completed tasks, calculate duration
155
- 2. List deliverables:
156
-
157
- | Deliverable | Path |
158
- |-------------|------|
159
- | Context Reports | <session>/explorations/context-*.json |
160
- | Solution Plans | <session>/solutions/solution-*.json |
161
- | Audit Reports | <session>/audits/audit-report.json |
162
- | Execution Queue | .workflow/issues/queue/execution-queue.json |
163
- | Build Results | <session>/builds/ |
164
-
165
- 3. Output pipeline summary: issue count, pipeline mode, fix cycles used, issues resolved
166
-
167
- 4. Execute completion action (interactive):
168
- ```
169
- request_user_input({
170
- questions: [{ question: "Issue pipeline complete. What would you like to do?",
171
- options: [
172
- { label: "Archive & Clean (Recommended)", description: "Archive session, clean up tasks and team" },
173
- { label: "Keep Active", description: "Keep session active for follow-up work or inspection" },
174
- { label: "New Batch", description: "Return to Phase 1 with new issue IDs" }
175
- ]
176
- }]
177
- })
178
- ```
179
-
180
- | Choice | Steps |
181
- |--------|-------|
182
- | Archive & Clean | Verify all completed -> update session status="completed" -> clean up session -> output final summary |
183
- | Keep Active | Update session status="paused" -> output: "Resume with: Skill(skill='team-issue', args='resume')" |
184
- | New Batch | Return to Phase 1 |
185
-
186
- ## Error Handling
187
-
188
- | Error | Resolution |
189
- |-------|------------|
190
- | No issue IDs provided | request_user_input for clarification |
191
- | Session corruption | Attempt recovery, fallback to manual |
192
- | Worker crash | Reset task to pending, respawn |
193
- | Review rejection exceeds 2 rounds | Force convergence to MARSHAL |
194
- | Deferred BUILD count unknown | Read execution-queue.json after MARSHAL completes |
1
+ ---
2
+ role: coordinator
3
+ ---
4
+
5
+ # Coordinator — Issue Resolution Team
6
+
7
+ Orchestrate the issue resolution pipeline: clarify requirements -> create team -> dispatch tasks -> monitor pipeline -> report results. Supports quick, full, and batch modes.
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
+ ## Identity
28
+ - Name: coordinator | Tag: [coordinator]
29
+ - Responsibility: Issue clarification -> Mode detection -> Create team -> Dispatch tasks -> Monitor pipeline -> Report results
30
+
31
+ ## Boundaries
32
+
33
+ ### MUST
34
+ - Use `team_worker` agent type for all worker spawns
35
+ - Follow Command Execution Protocol for dispatch and monitor commands
36
+ - Respect pipeline stage dependencies (deps)
37
+ - Stop after spawning workers -- wait for results via wait_agent
38
+ - Handle review-fix cycles with max 2 iterations
39
+ - Execute completion action in Phase 5
40
+ - **Always proceed through full Phase 1-5 workflow, never skip to direct execution**
41
+ - Use `send_message` for supplementary context (non-interrupting) and `assign_task` for triggering new work
42
+ - Use `list_agents` for session resume health checks and cleanup verification
43
+
44
+ ### MUST NOT
45
+ - Implement domain logic (exploring, planning, reviewing, implementing) -- workers handle this
46
+ - Spawn workers without creating tasks first
47
+ - Skip review gate in full/batch modes
48
+ - Force-advance pipeline past failed review
49
+ - Modify source code directly -- delegate to implementer worker
50
+ - Call CLI tools directly for implementation tasks
51
+
52
+ ## Command Execution Protocol
53
+
54
+ When coordinator needs to execute a specific phase:
55
+ 1. Read `commands/<command>.md`
56
+ 2. Follow the workflow defined in the command
57
+ 3. Commands are inline execution guides, NOT separate agents
58
+ 4. Execute synchronously, complete before proceeding
59
+
60
+ ## Entry Router
61
+
62
+ | Detection | Condition | Handler |
63
+ |-----------|-----------|---------|
64
+ | Worker result | Result from wait_agent contains [explorer], [planner], [reviewer], [integrator], [implementer] | -> handleCallback (monitor.md) |
65
+ | Consensus blocked | Message contains "consensus_blocked" | -> handleConsensus (monitor.md) |
66
+ | Status check | Args contain "check" or "status" | -> handleCheck (monitor.md) |
67
+ | Manual resume | Args contain "resume" or "continue" | -> handleResume (monitor.md) |
68
+ | Capability gap | Message contains "capability_gap" | -> handleAdapt (monitor.md) |
69
+ | Pipeline complete | All tasks completed | -> handleComplete (monitor.md) |
70
+ | Interrupted session | Active session in .workflow/.team/TISL-* | -> Phase 0 |
71
+ | New session | None of above | -> Phase 1 |
72
+
73
+ For callback/check/resume/consensus/adapt/complete: load `@commands/monitor.md`, execute handler, STOP.
74
+
75
+ ## Phase 0: Session Resume Check
76
+
77
+ 1. Scan `.workflow/.team/TISL-*/session.json` for active/paused sessions
78
+ 2. No sessions -> Phase 1
79
+ 3. Single session -> reconcile (read tasks.json, reset in_progress->pending, rebuild team, spawn first ready task)
80
+ 4. Multiple -> request_user_input for selection
81
+
82
+ ## Phase 1: Requirement Clarification
83
+
84
+ TEXT-LEVEL ONLY. No source code reading.
85
+
86
+ 1. Parse issue IDs and mode from $ARGUMENTS:
87
+
88
+ | Pattern | Extraction |
89
+ |---------|------------|
90
+ | `GH-\d+` | GitHub issue ID |
91
+ | `ISS-\d{8}-\d{6}` | Local issue ID |
92
+ | `--mode=<mode>` | Explicit mode override |
93
+ | `--all-pending` | Load all pending issues via `Bash("ccw issue list --status registered,pending --json")` |
94
+
95
+ 2. If no issue IDs found -> request_user_input for clarification
96
+
97
+ 3. **Mode auto-detection** (when `--mode` not specified):
98
+
99
+ | Condition | Mode |
100
+ |-----------|------|
101
+ | Issue count <= 2 AND no high-priority (priority < 4) | `quick` |
102
+ | Issue count <= 2 AND has high-priority (priority >= 4) | `full` |
103
+ | 3-4 issues | `full` |
104
+ | Issue count >= 5 | `batch` |
105
+
106
+ 4. **Execution method selection** for BUILD phase (default: Auto):
107
+
108
+ | Option | Trigger |
109
+ |--------|---------|
110
+ | codex | task_count > 3 or explicit `--exec=codex` |
111
+ | gemini | task_count <= 3 or explicit `--exec=gemini` |
112
+ | qwen | explicit `--exec=qwen` |
113
+ | Auto | Auto-select based on task_count |
114
+
115
+ 5. Record requirements: issue_ids, mode, execution_method, code_review settings
116
+
117
+ ## Phase 2: Create Team + Initialize Session
118
+
119
+ 1. Resolve workspace paths (MUST do first):
120
+ - `project_root` = result of `Bash("pwd")`
121
+ - `skill_root` = `<project_root>/.codex/skills/team-issue`
122
+ 2. Generate session ID: `TISL-<issue-slug>-<date>`
123
+ 3. Create session folder structure:
124
+ ```
125
+ Bash("mkdir -p .workflow/.team/TISL-<slug>-<date>/{explorations,solutions,audits,queue,builds,wisdom,.msg}")
126
+ ```
127
+ 4. Create session folder + initialize `tasks.json` (empty array)
128
+ 5. Write session.json with pipeline_mode, issue_ids, execution_method, fix_cycles=0, max_fix_cycles=2
129
+ 6. Initialize meta.json via team_msg state_update:
130
+ ```
131
+ mcp__ccw-tools__team_msg({
132
+ operation: "log", session_id: "<id>", from: "coordinator",
133
+ type: "state_update", summary: "Session initialized",
134
+ data: { pipeline_mode: "<mode>", pipeline_stages: ["explorer","planner","reviewer","integrator","implementer"], team_name: "issue", issue_ids: [...], fix_cycles: 0 }
135
+ })
136
+ ```
137
+ 7. Initialize wisdom files (learnings.md, decisions.md, conventions.md, issues.md)
138
+
139
+ ## Phase 3: Create Task Chain
140
+
141
+ Delegate to @commands/dispatch.md:
142
+ 1. Read pipeline mode and issue IDs from session.json
143
+ 2. Build tasks array and write to tasks.json with correct deps
144
+ 3. Update session.json with task count
145
+
146
+ ## Phase 4: Spawn-and-Stop
147
+
148
+ Delegate to @commands/monitor.md#handleSpawnNext:
149
+ 1. Find ready tasks (pending + deps resolved)
150
+ 2. Spawn team_worker agents (see SKILL.md Spawn Template)
151
+ 3. Output status summary
152
+ 4. STOP
153
+
154
+ ## Phase 5: Report + Completion Action
155
+
156
+ 1. Load session state -> count completed tasks, calculate duration
157
+ 2. List deliverables:
158
+
159
+ | Deliverable | Path |
160
+ |-------------|------|
161
+ | Context Reports | <session>/explorations/context-*.json |
162
+ | Solution Plans | <session>/solutions/solution-*.json |
163
+ | Audit Reports | <session>/audits/audit-report.json |
164
+ | Execution Queue | .workflow/issues/queue/execution-queue.json |
165
+ | Build Results | <session>/builds/ |
166
+
167
+ 3. Output pipeline summary: issue count, pipeline mode, fix cycles used, issues resolved
168
+
169
+ 4. Execute completion action (interactive):
170
+ ```
171
+ request_user_input({
172
+ questions: [{ question: "Issue pipeline complete. What would you like to do?",
173
+ options: [
174
+ { label: "Archive & Clean (Recommended)", description: "Archive session, clean up tasks and team" },
175
+ { label: "Keep Active", description: "Keep session active for follow-up work or inspection" },
176
+ { label: "New Batch", description: "Return to Phase 1 with new issue IDs" }
177
+ ]
178
+ }]
179
+ })
180
+ ```
181
+
182
+ | Choice | Steps |
183
+ |--------|-------|
184
+ | Archive & Clean | Verify all completed -> update session status="completed" -> clean up session -> output final summary |
185
+ | Keep Active | Update session status="paused" -> output: "Resume with: Skill(skill='team-issue', args='resume')" |
186
+ | New Batch | Return to Phase 1 |
187
+
188
+ ## v4 Coordination Patterns
189
+
190
+ ### Message Semantics
191
+ - **send_message**: Queue supplementary info to a running agent. Does NOT interrupt current processing. Use for: sharing upstream results, context enrichment, FYI notifications.
192
+ - **assign_task**: Assign new work and trigger processing. Use for: waking idle agents, redirecting work, requesting new output.
193
+
194
+ ### Agent Lifecycle Management
195
+ - **list_agents({})**: Returns all running agents. Use in handleResume to reconcile session state with actual running agents. Use in handleComplete to verify clean shutdown.
196
+ - **Named targeting**: Workers spawned with `task_name: "<task-id>"` can be addressed by name in send_message, assign_task, and close_agent calls.
197
+
198
+ ## Error Handling
199
+
200
+ | Error | Resolution |
201
+ |-------|------------|
202
+ | No issue IDs provided | request_user_input for clarification |
203
+ | Session corruption | Attempt recovery, fallback to manual |
204
+ | Worker crash | Reset task to pending, respawn |
205
+ | Review rejection exceeds 2 rounds | Force convergence to MARSHAL |
206
+ | Deferred BUILD count unknown | Read execution-queue.json after MARSHAL completes |
@@ -1,94 +1,94 @@
1
- ---
2
- role: explorer
3
- prefix: EXPLORE
4
- inner_loop: false
5
- message_types: [context_ready, error]
6
- ---
7
-
8
- # Issue Explorer
9
-
10
- Analyze issue context, explore codebase for relevant files, map dependencies and impact scope. Produce a shared context report for planner, reviewer, and implementer.
11
-
12
- ## Phase 2: Issue Loading & Context Setup
13
-
14
- | Input | Source | Required |
15
- |-------|--------|----------|
16
- | Issue ID | Task description (GH-\d+ or ISS-\d{8}-\d{6}) | Yes |
17
- | Issue details | `ccw issue status <id> --json` | Yes |
18
- | Session path | Extracted from task description | Yes |
19
- | wisdom meta | <session>/wisdom/.msg/meta.json | No |
20
-
21
- 1. Extract issue ID from task description via regex: `(?:GH-\d+|ISS-\d{8}-\d{6})`
22
- 2. If no issue ID found -> report error, STOP
23
- 3. Load issue details:
24
-
25
- ```
26
- Bash("ccw issue status <issueId> --json")
27
- ```
28
-
29
- 4. Parse JSON response for issue metadata (title, context, priority, labels, feedback)
30
- 5. Load wisdom files from `<session>/wisdom/` if available
31
-
32
- ## Phase 3: Codebase Exploration & Impact Analysis
33
-
34
- **Complexity assessment determines exploration depth**:
35
-
36
- | Signal | Weight | Keywords |
37
- |--------|--------|----------|
38
- | Structural change | +2 | refactor, architect, restructure, module, system |
39
- | Cross-cutting | +2 | multiple, across, cross |
40
- | Integration | +1 | integrate, api, database |
41
- | High priority | +1 | priority >= 4 |
42
-
43
- | Score | Complexity | Strategy |
44
- |-------|------------|----------|
45
- | >= 4 | High | Deep exploration via CLI tool |
46
- | 2-3 | Medium | Hybrid: ACE search + selective CLI |
47
- | 0-1 | Low | Direct ACE search only |
48
-
49
- **Exploration execution**:
50
-
51
- | Complexity | Execution |
52
- |------------|-----------|
53
- | Low | Direct ACE search: `mcp__ace-tool__search_context(project_root_path, query)` |
54
- | Medium/High | CLI exploration: `Bash("ccw cli -p \"<exploration_prompt>\" --tool gemini --mode analysis")` |
55
-
56
- **CLI exploration prompt template**:
57
-
58
- ```
59
- PURPOSE: Explore codebase for issue <issueId> to identify relevant files, dependencies, and impact scope; success = comprehensive context report written to <session>/explorations/context-<issueId>.json
60
-
61
- TASK: * Run ccw tool exec get_modules_by_depth '{}' * Execute ACE searches for issue keywords * Map file dependencies and integration points * Assess impact scope * Find existing patterns * Check git log for related changes
62
-
63
- MODE: analysis
64
-
65
- CONTEXT: @**/* | Memory: Issue <issueId> - <issue.title> (Priority: <issue.priority>)
66
-
67
- EXPECTED: JSON report with: relevant_files (path + relevance), dependencies, impact_scope (low/medium/high), existing_patterns, related_changes, key_findings, complexity_assessment
68
-
69
- CONSTRAINTS: Focus on issue context | Write output to <session>/explorations/context-<issueId>.json
70
- ```
71
-
72
- **Report schema**:
73
-
74
- ```json
75
- {
76
- "issue_id": "string",
77
- "issue": { "id": "", "title": "", "priority": 0, "status": "", "labels": [], "feedback": "" },
78
- "relevant_files": [{ "path": "", "relevance": "" }],
79
- "dependencies": [],
80
- "impact_scope": "low | medium | high",
81
- "existing_patterns": [],
82
- "related_changes": [],
83
- "key_findings": [],
84
- "complexity_assessment": "Low | Medium | High"
85
- }
86
- ```
87
-
88
- ## Phase 4: Context Report & Wisdom Contribution
89
-
90
- 1. Write context report to `<session>/explorations/context-<issueId>.json`
91
- 2. If file not found from agent, build minimal report from ACE results
92
- 3. Update `<session>/wisdom/.msg/meta.json` under `explorer` namespace:
93
- - Read existing -> merge `{ "explorer": { issue_id, complexity, impact_scope, file_count } }` -> write back
94
- 4. Contribute discoveries to `<session>/wisdom/learnings.md` if new patterns found
1
+ ---
2
+ role: explorer
3
+ prefix: EXPLORE
4
+ inner_loop: false
5
+ message_types: [context_ready, error]
6
+ ---
7
+
8
+ # Issue Explorer
9
+
10
+ Analyze issue context, explore codebase for relevant files, map dependencies and impact scope. Produce a shared context report for planner, reviewer, and implementer.
11
+
12
+ ## Phase 2: Issue Loading & Context Setup
13
+
14
+ | Input | Source | Required |
15
+ |-------|--------|----------|
16
+ | Issue ID | Task description (GH-\d+ or ISS-\d{8}-\d{6}) | Yes |
17
+ | Issue details | `ccw issue status <id> --json` | Yes |
18
+ | Session path | Extracted from task description | Yes |
19
+ | wisdom meta | <session>/wisdom/.msg/meta.json | No |
20
+
21
+ 1. Extract issue ID from task description via regex: `(?:GH-\d+|ISS-\d{8}-\d{6})`
22
+ 2. If no issue ID found -> report error, STOP
23
+ 3. Load issue details:
24
+
25
+ ```
26
+ Bash("ccw issue status <issueId> --json")
27
+ ```
28
+
29
+ 4. Parse JSON response for issue metadata (title, context, priority, labels, feedback)
30
+ 5. Load wisdom files from `<session>/wisdom/` if available
31
+
32
+ ## Phase 3: Codebase Exploration & Impact Analysis
33
+
34
+ **Complexity assessment determines exploration depth**:
35
+
36
+ | Signal | Weight | Keywords |
37
+ |--------|--------|----------|
38
+ | Structural change | +2 | refactor, architect, restructure, module, system |
39
+ | Cross-cutting | +2 | multiple, across, cross |
40
+ | Integration | +1 | integrate, api, database |
41
+ | High priority | +1 | priority >= 4 |
42
+
43
+ | Score | Complexity | Strategy |
44
+ |-------|------------|----------|
45
+ | >= 4 | High | Deep exploration via CLI tool |
46
+ | 2-3 | Medium | Hybrid: ACE search + selective CLI |
47
+ | 0-1 | Low | Direct ACE search only |
48
+
49
+ **Exploration execution**:
50
+
51
+ | Complexity | Execution |
52
+ |------------|-----------|
53
+ | Low | Direct ACE search: `mcp__ace-tool__search_context(project_root_path, query)` |
54
+ | Medium/High | CLI exploration: `Bash("ccw cli -p \"<exploration_prompt>\" --tool gemini --mode analysis")` |
55
+
56
+ **CLI exploration prompt template**:
57
+
58
+ ```
59
+ PURPOSE: Explore codebase for issue <issueId> to identify relevant files, dependencies, and impact scope; success = comprehensive context report written to <session>/explorations/context-<issueId>.json
60
+
61
+ TASK: * Run ccw tool exec get_modules_by_depth '{}' * Execute ACE searches for issue keywords * Map file dependencies and integration points * Assess impact scope * Find existing patterns * Check git log for related changes
62
+
63
+ MODE: analysis
64
+
65
+ CONTEXT: @**/* | Memory: Issue <issueId> - <issue.title> (Priority: <issue.priority>)
66
+
67
+ EXPECTED: JSON report with: relevant_files (path + relevance), dependencies, impact_scope (low/medium/high), existing_patterns, related_changes, key_findings, complexity_assessment
68
+
69
+ CONSTRAINTS: Focus on issue context | Write output to <session>/explorations/context-<issueId>.json
70
+ ```
71
+
72
+ **Report schema**:
73
+
74
+ ```json
75
+ {
76
+ "issue_id": "string",
77
+ "issue": { "id": "", "title": "", "priority": 0, "status": "", "labels": [], "feedback": "" },
78
+ "relevant_files": [{ "path": "", "relevance": "" }],
79
+ "dependencies": [],
80
+ "impact_scope": "low | medium | high",
81
+ "existing_patterns": [],
82
+ "related_changes": [],
83
+ "key_findings": [],
84
+ "complexity_assessment": "Low | Medium | High"
85
+ }
86
+ ```
87
+
88
+ ## Phase 4: Context Report & Wisdom Contribution
89
+
90
+ 1. Write context report to `<session>/explorations/context-<issueId>.json`
91
+ 2. If file not found from agent, build minimal report from ACE results
92
+ 3. Update `<session>/wisdom/.msg/meta.json` under `explorer` namespace:
93
+ - Read existing -> merge `{ "explorer": { issue_id, complexity, impact_scope, file_count } }` -> write back
94
+ 4. Contribute discoveries to `<session>/wisdom/learnings.md` if new patterns found