maestro-flow 0.2.1 → 0.2.2
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/.claude/agents/team-supervisor.md +18 -8
- package/.claude/agents/team-worker.md +78 -0
- package/.claude/skills/team-coordinate/SKILL.md +266 -0
- package/.claude/skills/team-coordinate/roles/coordinator/commands/analyze-task.md +247 -0
- package/.claude/skills/team-coordinate/roles/coordinator/commands/dispatch.md +131 -0
- package/.claude/skills/team-coordinate/roles/coordinator/commands/monitor.md +358 -0
- package/.claude/skills/team-coordinate/roles/coordinator/role.md +363 -0
- package/.claude/skills/team-coordinate/specs/knowledge-transfer.md +111 -0
- package/.claude/skills/team-coordinate/specs/pipelines.md +97 -0
- package/.claude/skills/team-coordinate/specs/quality-gates.md +112 -0
- package/.claude/skills/team-coordinate/specs/role-spec-template.md +192 -0
- package/.claude/skills/team-executor/SKILL.md +189 -0
- package/.claude/skills/team-executor/roles/executor/commands/monitor.md +239 -0
- package/.claude/skills/team-executor/roles/executor/role.md +171 -0
- package/.claude/skills/team-executor/specs/session-schema.md +264 -0
- package/.claude/skills/team-lifecycle-v4/SKILL.md +209 -0
- package/.claude/skills/team-lifecycle-v4/roles/analyst/role.md +78 -0
- package/.claude/skills/team-lifecycle-v4/roles/coordinator/commands/analyze.md +56 -0
- package/.claude/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +56 -0
- package/.claude/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +157 -0
- package/.claude/skills/team-lifecycle-v4/roles/coordinator/role.md +130 -0
- package/.claude/skills/team-lifecycle-v4/roles/executor/commands/fix.md +35 -0
- package/.claude/skills/team-lifecycle-v4/roles/executor/commands/implement.md +62 -0
- package/.claude/skills/team-lifecycle-v4/roles/executor/role.md +67 -0
- package/.claude/skills/team-lifecycle-v4/roles/planner/role.md +76 -0
- package/.claude/skills/team-lifecycle-v4/roles/reviewer/commands/review-code.md +34 -0
- package/.claude/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +44 -0
- package/.claude/skills/team-lifecycle-v4/roles/reviewer/role.md +69 -0
- package/.claude/skills/team-lifecycle-v4/roles/supervisor/role.md +192 -0
- package/.claude/skills/team-lifecycle-v4/roles/tester/role.md +87 -0
- package/.claude/skills/team-lifecycle-v4/roles/writer/role.md +95 -0
- package/.claude/skills/team-lifecycle-v4/specs/knowledge-transfer.md +112 -0
- package/.claude/skills/team-lifecycle-v4/specs/pipelines.md +125 -0
- package/.claude/skills/team-lifecycle-v4/specs/quality-gates.md +130 -0
- package/.claude/skills/team-lifecycle-v4/templates/architecture.md +254 -0
- package/.claude/skills/team-lifecycle-v4/templates/epics.md +196 -0
- package/.claude/skills/team-lifecycle-v4/templates/product-brief.md +133 -0
- package/.claude/skills/team-lifecycle-v4/templates/requirements.md +224 -0
- package/.claude/skills/team-quality-assurance/SKILL.md +147 -0
- package/.claude/skills/team-quality-assurance/roles/analyst/role.md +80 -0
- package/.claude/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -0
- package/.claude/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +111 -0
- package/.claude/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +250 -0
- package/.claude/skills/team-quality-assurance/roles/coordinator/role.md +143 -0
- package/.claude/skills/team-quality-assurance/roles/executor/role.md +66 -0
- package/.claude/skills/team-quality-assurance/roles/generator/role.md +68 -0
- package/.claude/skills/team-quality-assurance/roles/scout/role.md +67 -0
- package/.claude/skills/team-quality-assurance/roles/strategist/role.md +71 -0
- package/.claude/skills/team-quality-assurance/specs/pipelines.md +115 -0
- package/.claude/skills/team-quality-assurance/specs/team-config.json +131 -0
- package/.claude/skills/team-review/SKILL.md +147 -0
- package/.claude/skills/team-review/roles/coordinator/commands/analyze.md +71 -0
- package/.claude/skills/team-review/roles/coordinator/commands/dispatch.md +91 -0
- package/.claude/skills/team-review/roles/coordinator/commands/monitor.md +224 -0
- package/.claude/skills/team-review/roles/coordinator/role.md +132 -0
- package/.claude/skills/team-review/roles/fixer/role.md +76 -0
- package/.claude/skills/team-review/roles/reviewer/role.md +68 -0
- package/.claude/skills/team-review/roles/scanner/role.md +71 -0
- package/.claude/skills/team-review/specs/dimensions.md +82 -0
- package/.claude/skills/team-review/specs/finding-schema.json +82 -0
- package/.claude/skills/team-review/specs/pipelines.md +102 -0
- package/.claude/skills/team-review/specs/team-config.json +27 -0
- package/.claude/skills/team-tech-debt/SKILL.md +128 -0
- package/.claude/skills/team-tech-debt/roles/assessor/role.md +69 -0
- package/.claude/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -0
- package/.claude/skills/team-tech-debt/roles/coordinator/commands/dispatch.md +156 -0
- package/.claude/skills/team-tech-debt/roles/coordinator/commands/monitor.md +209 -0
- package/.claude/skills/team-tech-debt/roles/coordinator/role.md +123 -0
- package/.claude/skills/team-tech-debt/roles/executor/role.md +76 -0
- package/.claude/skills/team-tech-debt/roles/planner/role.md +69 -0
- package/.claude/skills/team-tech-debt/roles/scanner/role.md +82 -0
- package/.claude/skills/team-tech-debt/roles/validator/role.md +78 -0
- package/.claude/skills/team-tech-debt/specs/pipelines.md +47 -0
- package/.claude/skills/team-tech-debt/specs/team-config.json +129 -0
- package/.claude/skills/team-testing/SKILL.md +143 -0
- package/.claude/skills/team-testing/roles/analyst/role.md +95 -0
- package/.claude/skills/team-testing/roles/coordinator/commands/analyze.md +70 -0
- package/.claude/skills/team-testing/roles/coordinator/commands/dispatch.md +108 -0
- package/.claude/skills/team-testing/roles/coordinator/commands/monitor.md +257 -0
- package/.claude/skills/team-testing/roles/coordinator/role.md +134 -0
- package/.claude/skills/team-testing/roles/executor/role.md +99 -0
- package/.claude/skills/team-testing/roles/generator/role.md +98 -0
- package/.claude/skills/team-testing/roles/strategist/role.md +83 -0
- package/.claude/skills/team-testing/specs/pipelines.md +101 -0
- package/.claude/skills/team-testing/specs/team-config.json +93 -0
- package/.codex/skills/maestro-coordinate/SKILL.md +6 -6
- package/.codex/skills/maestro-overlay/SKILL.md +1 -3
- package/.codex/skills/manage-issue-analyze/SKILL.md +2 -2
- package/.codex/skills/quality-retrospective/SKILL.md +30 -31
- package/.codex/skills/team-coordinate/SKILL.md +16 -18
- package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +50 -7
- package/.codex/skills/team-coordinate/roles/coordinator/role.md +4 -4
- package/.codex/skills/team-coordinate/specs/knowledge-transfer.md +2 -0
- package/.codex/skills/team-executor/SKILL.md +11 -13
- package/.codex/skills/team-executor/roles/executor/commands/monitor.md +47 -11
- package/.codex/skills/team-lifecycle-v4/SKILL.md +27 -33
- package/.codex/skills/team-lifecycle-v4/instructions/agent-instruction.md +94 -0
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +1 -1
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +94 -27
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +12 -14
- package/.codex/skills/team-lifecycle-v4/roles/supervisor/role.md +1 -1
- package/.codex/skills/team-lifecycle-v4/specs/knowledge-transfer.md +69 -1
- package/.codex/skills/team-quality-assurance/SKILL.md +14 -16
- package/.codex/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +60 -11
- package/.codex/skills/team-quality-assurance/roles/coordinator/role.md +4 -4
- package/.codex/skills/team-review/SKILL.md +14 -16
- package/.codex/skills/team-review/roles/coordinator/commands/monitor.md +47 -10
- package/.codex/skills/team-review/roles/coordinator/role.md +4 -4
- package/.codex/skills/team-tech-debt/SKILL.md +13 -15
- package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +51 -12
- package/.codex/skills/team-tech-debt/roles/coordinator/role.md +4 -4
- package/.codex/skills/team-testing/SKILL.md +15 -17
- package/.codex/skills/team-testing/roles/coordinator/commands/monitor.md +51 -13
- package/.codex/skills/team-testing/roles/coordinator/role.md +4 -4
- package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js +4 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/cli-history.js +8 -1
- package/dashboard/dist-server/dashboard/src/server/routes/cli-history.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/mcp.js +20 -0
- package/dashboard/dist-server/dashboard/src/server/routes/mcp.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/constants.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/shared/constants.js +1 -0
- package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
- package/dashboard/dist-server/src/agents/cli-history-store.js +21 -3
- package/dashboard/dist-server/src/agents/cli-history-store.js.map +1 -1
- package/dist/src/agents/cli-history-store.d.ts.map +1 -1
- package/dist/src/agents/cli-history-store.js +21 -3
- package/dist/src/agents/cli-history-store.js.map +1 -1
- package/dist/src/commands/cli.d.ts.map +1 -1
- package/dist/src/commands/cli.js +20 -8
- package/dist/src/commands/cli.js.map +1 -1
- package/dist/src/commands/uninstall-ui/UninstallFlow.d.ts.map +1 -1
- package/dist/src/commands/uninstall-ui/UninstallFlow.js +5 -4
- package/dist/src/commands/uninstall-ui/UninstallFlow.js.map +1 -1
- package/dist/src/commands/uninstall.js +1 -1
- package/dist/src/commands/uninstall.js.map +1 -1
- package/dist/src/core/manifest.d.ts.map +1 -1
- package/dist/src/core/manifest.js +9 -1
- package/dist/src/core/manifest.js.map +1 -1
- package/package.json +1 -1
- package/workflows/cli-tools-usage.md +6 -2
|
@@ -4,8 +4,8 @@ Synchronous pipeline coordination using spawn_agent + wait_agent.
|
|
|
4
4
|
|
|
5
5
|
## Constants
|
|
6
6
|
|
|
7
|
-
- WORKER_AGENT:
|
|
8
|
-
- SUPERVISOR_AGENT:
|
|
7
|
+
- WORKER_AGENT: team_worker
|
|
8
|
+
- SUPERVISOR_AGENT: team_supervisor (resident, woken via followup_task)
|
|
9
9
|
|
|
10
10
|
## Handler Router
|
|
11
11
|
|
|
@@ -19,20 +19,58 @@ Synchronous pipeline coordination using spawn_agent + wait_agent.
|
|
|
19
19
|
|
|
20
20
|
## handleCheck
|
|
21
21
|
|
|
22
|
-
Read-only status report from tasks.json, then STOP.
|
|
22
|
+
Read-only status report from tasks.json + team_msg progress, then STOP.
|
|
23
23
|
|
|
24
24
|
1. Read tasks.json
|
|
25
25
|
2. Count tasks by status (pending, in_progress, completed, failed, skipped)
|
|
26
|
+
3. Read worker progress from message bus:
|
|
27
|
+
```javascript
|
|
28
|
+
const progressMsgs = mcp__maestro-tools__team_msg({
|
|
29
|
+
operation: "list",
|
|
30
|
+
session_id: sessionId,
|
|
31
|
+
type: "progress",
|
|
32
|
+
last: 50
|
|
33
|
+
})
|
|
34
|
+
const blockerMsgs = mcp__maestro-tools__team_msg({
|
|
35
|
+
operation: "list",
|
|
36
|
+
session_id: sessionId,
|
|
37
|
+
type: "blocker",
|
|
38
|
+
last: 10
|
|
39
|
+
})
|
|
40
|
+
// Aggregate latest milestone per task
|
|
41
|
+
const taskProgress = {}
|
|
42
|
+
for (const msg of progressMsgs.result.messages) {
|
|
43
|
+
const tid = msg.data?.task_id
|
|
44
|
+
if (tid && (!taskProgress[tid] || msg.ts > taskProgress[tid].ts)) {
|
|
45
|
+
taskProgress[tid] = { phase: msg.data.phase, pct: msg.data.progress_pct, ts: msg.ts, summary: msg.summary }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
4. Output enhanced status:
|
|
26
51
|
|
|
27
|
-
Output:
|
|
28
52
|
```
|
|
29
53
|
[coordinator] Pipeline Status
|
|
30
54
|
[coordinator] Progress: <done>/<total> (<pct>%)
|
|
31
|
-
[coordinator]
|
|
32
|
-
[coordinator]
|
|
55
|
+
[coordinator]
|
|
56
|
+
[coordinator] Active Workers:
|
|
57
|
+
[coordinator] <task_id> <role> <milestone_phase> <pct>% "<summary>" <time_ago>
|
|
58
|
+
[coordinator] ...
|
|
59
|
+
[coordinator]
|
|
60
|
+
[coordinator] Blockers: <count> (or "none")
|
|
61
|
+
[coordinator] <task_id>: <blocker_detail> ← only if blockers exist
|
|
62
|
+
[coordinator]
|
|
63
|
+
[coordinator] Completed: <list>
|
|
64
|
+
[coordinator] Ready: <pending with resolved deps>
|
|
33
65
|
[coordinator] Commands: 'resume' to advance | 'check' to refresh
|
|
34
66
|
```
|
|
35
67
|
|
|
68
|
+
**CLI equivalent for human monitoring** (no coordinator needed):
|
|
69
|
+
```bash
|
|
70
|
+
maestro msg list -s "<session_id>" --type progress --last 10
|
|
71
|
+
maestro msg list -s "<session_id>" --type blocker
|
|
72
|
+
```
|
|
73
|
+
|
|
36
74
|
## handleResume
|
|
37
75
|
|
|
38
76
|
**Agent Health Check** (v4):
|
|
@@ -49,7 +87,7 @@ const runningAgents = list_agents({})
|
|
|
49
87
|
2. No active agents -> handleSpawnNext
|
|
50
88
|
3. Has active agents -> check each:
|
|
51
89
|
- If supervisor with `resident: true` + no CHECKPOINT in_progress + pending CHECKPOINT exists
|
|
52
|
-
-> supervisor may have crashed. Respawn via spawn_agent({ agent_type: "
|
|
90
|
+
-> supervisor may have crashed. Respawn via spawn_agent({ agent_type: "team_supervisor" }) with recovery: true
|
|
53
91
|
4. Proceed to handleSpawnNext
|
|
54
92
|
|
|
55
93
|
## handleSpawnNext
|
|
@@ -72,28 +110,34 @@ state.tasks[task.id].status = 'in_progress'
|
|
|
72
110
|
|
|
73
111
|
// 2) Spawn worker
|
|
74
112
|
const agentId = spawn_agent({
|
|
75
|
-
agent_type: "
|
|
113
|
+
agent_type: "team_worker",
|
|
76
114
|
task_name: task.id, // e.g., "PLAN-001" — enables named targeting
|
|
77
|
-
|
|
78
|
-
{ type: "text", text: `## Role Assignment
|
|
115
|
+
message: `## Role Assignment
|
|
79
116
|
role: ${task.role}
|
|
80
117
|
role_spec: ${skillRoot}/roles/${task.role}/role.md
|
|
81
118
|
session: ${sessionFolder}
|
|
82
119
|
session_id: ${sessionId}
|
|
83
120
|
requirement: ${requirement}
|
|
84
|
-
inner_loop: ${hasInnerLoop(task.role)}
|
|
121
|
+
inner_loop: ${hasInnerLoop(task.role)}
|
|
85
122
|
|
|
86
|
-
|
|
87
|
-
Execute built-in Phase 1 (task discovery) -> role Phase 2-4 -> built-in Phase 5 (report)
|
|
123
|
+
Read role_spec file (${skillRoot}/roles/${task.role}/role.md) to load Phase 2-4 domain instructions.
|
|
124
|
+
Execute built-in Phase 1 (task discovery) -> role Phase 2-4 -> built-in Phase 5 (report).
|
|
88
125
|
|
|
89
|
-
|
|
126
|
+
## Task Context
|
|
90
127
|
task_id: ${task.id}
|
|
91
128
|
title: ${task.title}
|
|
92
129
|
description: ${task.description}
|
|
93
|
-
pipeline_phase: ${task.pipeline_phase}
|
|
130
|
+
pipeline_phase: ${task.pipeline_phase}
|
|
131
|
+
|
|
132
|
+
## Upstream Context
|
|
133
|
+
${prevContext}
|
|
94
134
|
|
|
95
|
-
|
|
96
|
-
|
|
135
|
+
## Progress Milestones
|
|
136
|
+
session_id: ${sessionId}
|
|
137
|
+
Report progress via team_msg at natural phase boundaries (context loaded → core work done → verification).
|
|
138
|
+
Report blockers immediately via team_msg type="blocker".
|
|
139
|
+
Report completion via team_msg type="task_complete" after report_agent_job_result.
|
|
140
|
+
See agent-instruction.md "Progress Milestone Protocol" for format.`
|
|
97
141
|
})
|
|
98
142
|
|
|
99
143
|
// 3) Track agent
|
|
@@ -107,10 +151,35 @@ After spawning all ready regular tasks:
|
|
|
107
151
|
const taskNames = Object.entries(state.active_agents)
|
|
108
152
|
.filter(([_, a]) => !a.resident)
|
|
109
153
|
.map(([taskId]) => taskId)
|
|
110
|
-
const waitResult = wait_agent({
|
|
154
|
+
const waitResult = wait_agent({ timeout_ms: 900000 })
|
|
155
|
+
// 4a) Drain progress from message bus (before collecting discoveries)
|
|
156
|
+
const progressMsgs = mcp__maestro-tools__team_msg({
|
|
157
|
+
operation: "list", session_id: sessionId, type: "progress", last: 100
|
|
158
|
+
})
|
|
159
|
+
const blockerMsgs = mcp__maestro-tools__team_msg({
|
|
160
|
+
operation: "list", session_id: sessionId, type: "blocker", last: 20
|
|
161
|
+
})
|
|
162
|
+
// Log execution trace
|
|
163
|
+
for (const msg of (progressMsgs.result?.messages || [])) {
|
|
164
|
+
console.log(`[coordinator] trace: ${msg.summary}`)
|
|
165
|
+
}
|
|
166
|
+
if (blockerMsgs.result?.messages?.length > 0) {
|
|
167
|
+
console.log(`[coordinator] WARNING: ${blockerMsgs.result.messages.length} blocker(s) reported during execution`)
|
|
168
|
+
for (const b of blockerMsgs.result.messages) {
|
|
169
|
+
console.log(`[coordinator] ${b.data?.task_id}: ${b.data?.blocker_detail}`)
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
111
173
|
if (waitResult.timed_out) {
|
|
174
|
+
// Use progress trace to understand where workers got stuck
|
|
112
175
|
for (const taskId of taskNames) {
|
|
176
|
+
const lastProgress = (progressMsgs.result?.messages || [])
|
|
177
|
+
.filter(m => m.data?.task_id === taskId)
|
|
178
|
+
.pop()
|
|
113
179
|
state.tasks[taskId].status = 'timed_out'
|
|
180
|
+
state.tasks[taskId].error = lastProgress
|
|
181
|
+
? `Timed out at ${lastProgress.data.phase} (${lastProgress.data.progress_pct}%)`
|
|
182
|
+
: 'Timed out with no progress reported'
|
|
114
183
|
close_agent({ target: taskId })
|
|
115
184
|
delete state.active_agents[taskId]
|
|
116
185
|
}
|
|
@@ -142,12 +211,12 @@ When spawning workers in a later pipeline phase, send upstream results as supple
|
|
|
142
211
|
// Example: Send planning results to running implementers
|
|
143
212
|
send_message({
|
|
144
213
|
target: "<running-agent-task-name>",
|
|
145
|
-
|
|
214
|
+
message: `## Supplementary Context\n${upstreamFindings}`
|
|
146
215
|
})
|
|
147
216
|
// Note: send_message queues info without interrupting the agent's current work
|
|
148
217
|
```
|
|
149
218
|
|
|
150
|
-
Use `send_message` (not `
|
|
219
|
+
Use `send_message` (not `followup_task`) for supplementary info that enriches but doesn't redirect the agent's current task.
|
|
151
220
|
|
|
152
221
|
### Handle CHECKPOINT Tasks
|
|
153
222
|
|
|
@@ -158,16 +227,14 @@ For each ready CHECKPOINT task:
|
|
|
158
227
|
2. Determine scope: list task IDs that this checkpoint depends on (its deps)
|
|
159
228
|
3. Wake supervisor:
|
|
160
229
|
```javascript
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
{ type: "text", text: `## Checkpoint Request
|
|
230
|
+
followup_task({
|
|
231
|
+
target: supervisorId,
|
|
232
|
+
message: `## Checkpoint Request
|
|
165
233
|
task_id: ${task.id}
|
|
166
234
|
scope: [${task.deps.join(', ')}]
|
|
167
|
-
pipeline_progress: ${completedCount}/${totalCount} tasks completed`
|
|
168
|
-
]
|
|
235
|
+
pipeline_progress: ${completedCount}/${totalCount} tasks completed`
|
|
169
236
|
})
|
|
170
|
-
const cpResult = wait_agent({
|
|
237
|
+
const cpResult = wait_agent({ timeout_ms: 600000 })
|
|
171
238
|
if (cpResult.timed_out) { /* mark checkpoint timed_out, close supervisor, STOP */ }
|
|
172
239
|
```
|
|
173
240
|
4. Read checkpoint report from artifacts/${task.id}-report.md
|
|
@@ -6,7 +6,7 @@ Orchestrate team-lifecycle-v4: analyze -> dispatch -> spawn -> monitor -> report
|
|
|
6
6
|
|
|
7
7
|
**You are a dispatcher, not a doer.** Your ONLY outputs are:
|
|
8
8
|
- Session state files (`.workflow/.team/` directory)
|
|
9
|
-
- `spawn_agent` / `wait_agent` / `close_agent` / `send_message` / `
|
|
9
|
+
- `spawn_agent` / `wait_agent` / `close_agent` / `send_message` / `followup_task` calls
|
|
10
10
|
- Status reports to the user
|
|
11
11
|
- `request_user_input` prompts
|
|
12
12
|
|
|
@@ -32,20 +32,20 @@ WRONG: Bash("npm test"), Bash("tsc"), etc. — worker work
|
|
|
32
32
|
|
|
33
33
|
### MUST
|
|
34
34
|
- Parse task description (text-level only, no codebase reading)
|
|
35
|
-
- Create session folder and spawn
|
|
35
|
+
- Create session folder and spawn team_worker agents via spawn_agent
|
|
36
36
|
- Dispatch tasks with proper dependency chains (tasks.json)
|
|
37
37
|
- Monitor progress via wait_agent and process results
|
|
38
38
|
- Maintain session state (tasks.json)
|
|
39
39
|
- Handle capability_gap reports
|
|
40
40
|
- Execute completion action when pipeline finishes
|
|
41
|
-
- Use `send_message` for supplementary context (non-interrupting) and `
|
|
41
|
+
- Use `send_message` for supplementary context (non-interrupting) and `followup_task` for triggering new work
|
|
42
42
|
- Use `list_agents` for session resume health checks and cleanup verification
|
|
43
43
|
|
|
44
44
|
### MUST NOT
|
|
45
45
|
- Read source code or explore codebase (delegate to workers)
|
|
46
46
|
- Execute task work directly (even for single-role low-complexity tasks)
|
|
47
47
|
- Modify task output artifacts
|
|
48
|
-
- Spawn workers with general-purpose agent (MUST use
|
|
48
|
+
- Spawn workers with general-purpose agent (MUST use team_worker)
|
|
49
49
|
- Generate more than 5 worker roles
|
|
50
50
|
- Call CLI tools (maestro cli) — only workers use CLI
|
|
51
51
|
|
|
@@ -77,7 +77,7 @@ For check/resume/adapt/complete: load @commands/monitor.md, execute handler, STO
|
|
|
77
77
|
a. Read tasks.json, reset in_progress -> pending
|
|
78
78
|
b. Rebuild active_agents map
|
|
79
79
|
c. If pipeline has CHECKPOINT tasks AND `supervision !== false`:
|
|
80
|
-
- Respawn supervisor via `spawn_agent({ agent_type: "
|
|
80
|
+
- Respawn supervisor via `spawn_agent({ agent_type: "team_supervisor" })` with `recovery: true`
|
|
81
81
|
- Supervisor auto-rebuilds context from existing CHECKPOINT-*-report.md files
|
|
82
82
|
d. Kick first ready task via handleSpawnNext
|
|
83
83
|
4. Multiple -> request_user_input for selection
|
|
@@ -125,9 +125,8 @@ TEXT-LEVEL ONLY. No source code reading.
|
|
|
125
125
|
- Use SKILL.md Supervisor Spawn Template:
|
|
126
126
|
```javascript
|
|
127
127
|
const supervisorId = spawn_agent({
|
|
128
|
-
agent_type: "
|
|
129
|
-
|
|
130
|
-
{ type: "text", text: `## Role Assignment
|
|
128
|
+
agent_type: "team_supervisor",
|
|
129
|
+
message: `## Role Assignment
|
|
131
130
|
role: supervisor
|
|
132
131
|
role_spec: ${skillRoot}/roles/supervisor/role.md
|
|
133
132
|
session: ${sessionFolder}
|
|
@@ -135,8 +134,7 @@ TEXT-LEVEL ONLY. No source code reading.
|
|
|
135
134
|
requirement: ${requirement}
|
|
136
135
|
|
|
137
136
|
Read role_spec file to load checkpoint definitions.
|
|
138
|
-
Init: load baseline context, report ready, go idle.`
|
|
139
|
-
]
|
|
137
|
+
Init: load baseline context, report ready, go idle.`
|
|
140
138
|
})
|
|
141
139
|
```
|
|
142
140
|
- Record supervisorId in tasks.json active_agents with `resident: true` flag
|
|
@@ -155,7 +153,7 @@ Delegate to @commands/dispatch.md:
|
|
|
155
153
|
|
|
156
154
|
Delegate to @commands/monitor.md#handleSpawnNext:
|
|
157
155
|
1. Find ready tasks (pending + deps resolved)
|
|
158
|
-
2. Spawn
|
|
156
|
+
2. Spawn team_worker agents via spawn_agent
|
|
159
157
|
3. Wait for completion via wait_agent
|
|
160
158
|
4. Process results, advance pipeline
|
|
161
159
|
5. Repeat until all waves complete or pipeline blocked
|
|
@@ -172,11 +170,11 @@ Delegate to @commands/monitor.md#handleSpawnNext:
|
|
|
172
170
|
|
|
173
171
|
### Message Semantics
|
|
174
172
|
- **send_message**: Queue supplementary info to a running agent. Does NOT interrupt current processing. Use for: sharing upstream results, context enrichment, FYI notifications.
|
|
175
|
-
- **
|
|
173
|
+
- **followup_task**: Assign new work and trigger processing. Use for: waking idle agents, redirecting work, requesting new output.
|
|
176
174
|
|
|
177
175
|
### Agent Lifecycle Management
|
|
178
176
|
- **list_agents({})**: Returns all running agents. Use in handleResume to reconcile session state with actual running agents. Use in handleComplete to verify clean shutdown.
|
|
179
|
-
- **Named targeting**: Workers spawned with `task_name: "<task-id>"` can be addressed by name in send_message,
|
|
177
|
+
- **Named targeting**: Workers spawned with `task_name: "<task-id>"` can be addressed by name in send_message, followup_task, and close_agent calls.
|
|
180
178
|
|
|
181
179
|
## Error Handling
|
|
182
180
|
|
|
@@ -185,6 +183,6 @@ Delegate to @commands/monitor.md#handleSpawnNext:
|
|
|
185
183
|
| Task too vague | request_user_input for clarification |
|
|
186
184
|
| Session corruption | Attempt recovery, fallback to manual |
|
|
187
185
|
| Worker crash | Reset task to pending in tasks.json, respawn via spawn_agent |
|
|
188
|
-
| Supervisor crash | Respawn via spawn_agent({ agent_type: "
|
|
186
|
+
| Supervisor crash | Respawn via spawn_agent({ agent_type: "team_supervisor" }) with recovery: true |
|
|
189
187
|
| Dependency cycle | Detect in analysis, halt |
|
|
190
188
|
| Role limit exceeded | Merge overlapping roles |
|
|
@@ -17,7 +17,7 @@ Process and execution supervision at pipeline phase transition points.
|
|
|
17
17
|
## Identity
|
|
18
18
|
- Tag: [supervisor] | Prefix: CHECKPOINT-*
|
|
19
19
|
- Responsibility: Verify cross-artifact consistency, process compliance, and execution health between pipeline phases
|
|
20
|
-
- Residency: Spawned once, awakened via `
|
|
20
|
+
- Residency: Spawned once, awakened via `followup_task` at each checkpoint trigger (not SendMessage)
|
|
21
21
|
|
|
22
22
|
## Boundaries
|
|
23
23
|
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
| Wisdom | Append to `<session>/wisdom/*.md` | Any role | All roles |
|
|
10
10
|
| Context Accumulator | In-memory aggregation | Inner loop only | Current task |
|
|
11
11
|
| Exploration Cache | `<session>/explorations/` | Analyst / researcher | All roles |
|
|
12
|
+
| **Progress Milestones** | `team_msg` type=progress/blocker/task_complete | Worker (all roles) | Coordinator + Human (CLI) |
|
|
13
|
+
| **Cross-Worker Handoff** | `send_message` from coordinator to running worker | Coordinator | Running worker |
|
|
12
14
|
|
|
13
15
|
## 2. Context Loading Protocol (Before Task Execution)
|
|
14
16
|
|
|
@@ -126,7 +128,73 @@ Prevents redundant research across tasks.
|
|
|
126
128
|
- Cache entries never expire within a session
|
|
127
129
|
- Any role can read cached explorations; only the creator updates them
|
|
128
130
|
|
|
129
|
-
## 6.
|
|
131
|
+
## 6. Progress Milestone Protocol
|
|
132
|
+
|
|
133
|
+
Workers report progress during execution via `team_msg`. This provides:
|
|
134
|
+
- **Human CLI monitoring**: `maestro msg list -s <session-id> --type progress` works while coordinator is blocked in `wait_agent`
|
|
135
|
+
- **Coordinator post-wait trace**: Full execution history for forensics and status display
|
|
136
|
+
- **Blocker awareness**: Coordinator knows where worker got stuck on timeout
|
|
137
|
+
|
|
138
|
+
### Message Types
|
|
139
|
+
|
|
140
|
+
| Type | When | Purpose |
|
|
141
|
+
|------|------|---------|
|
|
142
|
+
| `progress` | At natural phase boundaries | Report milestone reached + progress % |
|
|
143
|
+
| `blocker` | Immediately on error | Report blocking issue without waiting |
|
|
144
|
+
| `task_complete` | After `report_agent_job_result` | Final status for coordinator trace |
|
|
145
|
+
|
|
146
|
+
### Progress Message Schema
|
|
147
|
+
|
|
148
|
+
```javascript
|
|
149
|
+
mcp__maestro-tools__team_msg({
|
|
150
|
+
operation: "log",
|
|
151
|
+
session_id: "<session_id>",
|
|
152
|
+
from: "<task_id>", // e.g., "IMPL-001"
|
|
153
|
+
to: "coordinator",
|
|
154
|
+
type: "progress", // or "blocker" or "task_complete"
|
|
155
|
+
summary: "[<task_id>] <phase description> (<pct>%)",
|
|
156
|
+
data: {
|
|
157
|
+
task_id: "<task_id>",
|
|
158
|
+
role: "<role>",
|
|
159
|
+
status: "in_progress", // in_progress | blocked | completed
|
|
160
|
+
progress_pct: 0-100,
|
|
161
|
+
phase: "<what just completed>",
|
|
162
|
+
key_info: "<most important finding>"
|
|
163
|
+
}
|
|
164
|
+
})
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Timing Constraint
|
|
168
|
+
|
|
169
|
+
`wait_agent` is **blocking** — coordinator cannot read team_msg during wait. Progress is only consumed:
|
|
170
|
+
1. On `handleCheck` (user types "check" while coordinator is idle)
|
|
171
|
+
2. On `handleResume` after `wait_agent` returns (drain bus before collecting discoveries)
|
|
172
|
+
3. By human via `maestro msg list` CLI (works anytime, independent of coordinator)
|
|
173
|
+
|
|
174
|
+
### Relationship to Discoveries
|
|
175
|
+
|
|
176
|
+
- **Progress milestones** = lightweight trace during execution (via team_msg)
|
|
177
|
+
- **Discovery files** = authoritative final output (via `discoveries/{task_id}.json`)
|
|
178
|
+
- If team_msg fails, worker continues — discovery file is ground truth
|
|
179
|
+
- Coordinator always reads both: team_msg for trace, discoveries for results
|
|
180
|
+
|
|
181
|
+
## 7. Cross-Worker Handoff Protocol
|
|
182
|
+
|
|
183
|
+
When worker A completes and worker B is still running, coordinator pushes A's findings to B via `send_message`:
|
|
184
|
+
|
|
185
|
+
```javascript
|
|
186
|
+
// In handleSpawnNext, after collecting A's discovery:
|
|
187
|
+
send_message({
|
|
188
|
+
target: "IMPL-002", // B's task_name
|
|
189
|
+
message: `## Supplementary Context from IMPL-001\n${findingsFromA}`
|
|
190
|
+
})
|
|
191
|
+
// Note: send_message queues info without interrupting B's current work
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
**When to send**: After each wave of discoveries is collected, if any running worker could benefit from the new findings.
|
|
195
|
+
**What to send**: Key findings and decisions from completed tasks, especially those listed in `context_from` deps.
|
|
196
|
+
|
|
197
|
+
## 8. Platform Mapping Reference
|
|
130
198
|
|
|
131
199
|
| Claude Code Operation | Codex Equivalent |
|
|
132
200
|
|----------------------|------------------|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: team-quality-assurance
|
|
3
3
|
description: Unified team skill for quality assurance. Full closed-loop QA combining issue discovery and software testing. Triggers on "team quality-assurance", "team qa".
|
|
4
|
-
allowed-tools: spawn_agent(*), wait_agent(*), send_message(*),
|
|
4
|
+
allowed-tools: spawn_agent(*), wait_agent(*), send_message(*), followup_task(*), close_agent(*), list_agents(*), report_agent_job_result(*), request_user_input(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*), mcp__maestro-tools__team_msg(*)
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Team Quality Assurance
|
|
@@ -55,7 +55,7 @@ Before calling ANY tool, apply this check:
|
|
|
55
55
|
|
|
56
56
|
| Tool Call | Verdict | Reason |
|
|
57
57
|
|-----------|---------|--------|
|
|
58
|
-
| `spawn_agent`, `wait_agent`, `close_agent`, `send_message`, `
|
|
58
|
+
| `spawn_agent`, `wait_agent`, `close_agent`, `send_message`, `followup_task` | ALLOWED | Orchestration |
|
|
59
59
|
| `list_agents` | ALLOWED | Agent health check |
|
|
60
60
|
| `request_user_input` | ALLOWED | User interaction |
|
|
61
61
|
| `mcp__maestro-tools__team_msg` | ALLOWED | Message bus |
|
|
@@ -88,9 +88,8 @@ Coordinator spawns workers using this template:
|
|
|
88
88
|
spawn_agent({
|
|
89
89
|
agent_type: "team_worker",
|
|
90
90
|
task_name: "<task-id>",
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
{ type: "text", text: `## Role Assignment
|
|
91
|
+
fork_turns: "none",
|
|
92
|
+
message: `## Role Assignment
|
|
94
93
|
role: <role>
|
|
95
94
|
role_spec: <skill_root>/roles/<role>/role.md
|
|
96
95
|
session: <session-folder>
|
|
@@ -98,21 +97,20 @@ session_id: <session-id>
|
|
|
98
97
|
requirement: <task-description>
|
|
99
98
|
inner_loop: <true|false>
|
|
100
99
|
|
|
101
|
-
Read role_spec file (<skill_root>/roles/<role>/role.md) to load Phase 2-4 domain instructions
|
|
100
|
+
Read role_spec file (<skill_root>/roles/<role>/role.md) to load Phase 2-4 domain instructions.
|
|
102
101
|
|
|
103
|
-
|
|
102
|
+
## Task Context
|
|
104
103
|
task_id: <task-id>
|
|
105
104
|
title: <task-title>
|
|
106
105
|
description: <task-description>
|
|
107
|
-
pipeline_phase: <pipeline-phase
|
|
106
|
+
pipeline_phase: <pipeline-phase>
|
|
108
107
|
|
|
109
|
-
|
|
110
|
-
<prev_context>`
|
|
111
|
-
]
|
|
108
|
+
## Upstream Context
|
|
109
|
+
<prev_context>`
|
|
112
110
|
})
|
|
113
111
|
```
|
|
114
112
|
|
|
115
|
-
After spawning, use `wait_agent({
|
|
113
|
+
After spawning, use `wait_agent({ timeout_ms: 900000 })` to collect results, then `close_agent({ target })` each worker.
|
|
116
114
|
|
|
117
115
|
|
|
118
116
|
### Model Selection Guide
|
|
@@ -130,10 +128,10 @@ Override model/reasoning_effort in spawn_agent when cost optimization is needed:
|
|
|
130
128
|
spawn_agent({
|
|
131
129
|
agent_type: "team_worker",
|
|
132
130
|
task_name: "<task-id>",
|
|
133
|
-
|
|
131
|
+
fork_turns: "none",
|
|
134
132
|
model: "<model-override>",
|
|
135
133
|
reasoning_effort: "<effort-level>",
|
|
136
|
-
|
|
134
|
+
message: "..."
|
|
137
135
|
})
|
|
138
136
|
```
|
|
139
137
|
|
|
@@ -154,7 +152,7 @@ spawn_agent({
|
|
|
154
152
|
| Intent | API | Example |
|
|
155
153
|
|--------|-----|---------|
|
|
156
154
|
| Send scout findings to running strategist | `send_message` | Queue issue scan results to QASTRAT-* |
|
|
157
|
-
| Not used in this skill | `
|
|
155
|
+
| Not used in this skill | `followup_task` | No resident agents -- all workers are one-shot |
|
|
158
156
|
| Check running agents | `list_agents` | Verify agent health during resume |
|
|
159
157
|
|
|
160
158
|
### Pipeline Pattern
|
|
@@ -175,7 +173,7 @@ const running = list_agents({})
|
|
|
175
173
|
### Named Agent Targeting
|
|
176
174
|
|
|
177
175
|
Workers are spawned with `task_name: "<task-id>"` enabling direct addressing:
|
|
178
|
-
- `send_message({ target: "QASTRAT-001",
|
|
176
|
+
- `send_message({ target: "QASTRAT-001", message: "..." })` -- queue scout findings to running strategist
|
|
179
177
|
- `close_agent({ target: "SCOUT-001" })` -- cleanup by name after completion
|
|
180
178
|
|
|
181
179
|
## Completion Action
|
|
@@ -72,6 +72,16 @@ Worker completed. Process and advance.
|
|
|
72
72
|
|
|
73
73
|
Read-only status report, then STOP.
|
|
74
74
|
|
|
75
|
+
```javascript
|
|
76
|
+
// Read progress and blocker messages from message bus
|
|
77
|
+
const progressMsgs = mcp__maestro-tools__team_msg({
|
|
78
|
+
operation: "list", session_id: sessionId, type: "progress", last: 50
|
|
79
|
+
})
|
|
80
|
+
const blockerMsgs = mcp__maestro-tools__team_msg({
|
|
81
|
+
operation: "list", session_id: sessionId, type: "blocker", last: 10
|
|
82
|
+
})
|
|
83
|
+
```
|
|
84
|
+
|
|
75
85
|
Output:
|
|
76
86
|
```
|
|
77
87
|
[coordinator] QA Pipeline Status
|
|
@@ -86,9 +96,18 @@ Output:
|
|
|
86
96
|
QARUN-001: <done|run|wait> <summary>
|
|
87
97
|
QAANA-001: <done|run|wait> <summary>
|
|
88
98
|
|
|
89
|
-
[coordinator] Active Workers:
|
|
99
|
+
[coordinator] Active Workers:
|
|
100
|
+
<task_id> <role> <milestone_phase> <pct>% "<summary>" <time_ago>
|
|
101
|
+
|
|
102
|
+
[coordinator] Blockers:
|
|
103
|
+
<task_id> <role> "<blocker_summary>" <time_ago>
|
|
104
|
+
(omit section if no blockers)
|
|
105
|
+
|
|
90
106
|
[coordinator] Ready: <pending tasks with resolved deps>
|
|
91
107
|
[coordinator] Commands: 'resume' to advance | 'check' to refresh
|
|
108
|
+
|
|
109
|
+
**CLI monitoring** (works while coordinator is blocked):
|
|
110
|
+
maestro msg list -s "<session_id>" --type progress --last 10
|
|
92
111
|
```
|
|
93
112
|
|
|
94
113
|
Then STOP.
|
|
@@ -143,11 +162,7 @@ Find ready tasks, spawn workers, STOP.
|
|
|
143
162
|
spawn_agent({
|
|
144
163
|
agent_type: "team_worker",
|
|
145
164
|
task_name: taskId, // e.g., "SCOUT-001" — enables named targeting
|
|
146
|
-
|
|
147
|
-
description: "Spawn <role> worker for <subject>",
|
|
148
|
-
team_name: "quality-assurance",
|
|
149
|
-
name: "<role>",
|
|
150
|
-
prompt: `## Role Assignment
|
|
165
|
+
message: `## Role Assignment
|
|
151
166
|
role: <role>
|
|
152
167
|
role_spec: ~ or <project>/.codex/skills/team-quality-assurance/roles/<role>/role.md
|
|
153
168
|
session: <session-folder>
|
|
@@ -161,14 +176,48 @@ inner_loop: <true|false>
|
|
|
161
176
|
- Task: <subject>
|
|
162
177
|
|
|
163
178
|
Read role_spec file to load Phase 2-4 domain instructions.
|
|
164
|
-
Execute built-in Phase 1 (task discovery) -> role Phase 2-4 -> built-in Phase 5 (report)
|
|
165
|
-
|
|
179
|
+
Execute built-in Phase 1 (task discovery) -> role Phase 2-4 -> built-in Phase 5 (report).
|
|
180
|
+
|
|
181
|
+
## Progress Milestones
|
|
182
|
+
session_id: ${sessionId}
|
|
183
|
+
Report progress via team_msg at natural phase boundaries.
|
|
184
|
+
Report blockers immediately via team_msg type="blocker".
|
|
185
|
+
Report completion via team_msg type="task_complete" after report_agent_job_result.`
|
|
166
186
|
})
|
|
167
187
|
```
|
|
168
188
|
|
|
169
189
|
f. Add to active_workers
|
|
170
190
|
5. Update session, output summary, STOP
|
|
171
|
-
6. Use `wait_agent({
|
|
191
|
+
6. Use `wait_agent({ timeout_ms: 900000 })` to wait for callbacks. Workers use `report_agent_job_result()` to send results back.
|
|
192
|
+
|
|
193
|
+
### Post-Wait Processing
|
|
194
|
+
|
|
195
|
+
After `wait_agent` returns:
|
|
196
|
+
|
|
197
|
+
```javascript
|
|
198
|
+
// Drain progress from message bus
|
|
199
|
+
const progressMsgs = mcp__maestro-tools__team_msg({
|
|
200
|
+
operation: "list", session_id: sessionId, type: "progress", last: 100
|
|
201
|
+
})
|
|
202
|
+
for (const msg of (progressMsgs.result?.messages || [])) {
|
|
203
|
+
console.log(`[coordinator] trace: ${msg.summary}`)
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
if (waitResult.timed_out) {
|
|
207
|
+
for (const taskId of Object.keys(state.active_workers)) {
|
|
208
|
+
const lastProgress = (progressMsgs.result?.messages || [])
|
|
209
|
+
.filter(m => m.data?.task_id === taskId).pop()
|
|
210
|
+
state.tasks[taskId].status = 'timed_out'
|
|
211
|
+
state.tasks[taskId].error = lastProgress
|
|
212
|
+
? `Timed out at ${lastProgress.data.phase} (${lastProgress.data.progress_pct}%)`
|
|
213
|
+
: 'Timed out with no progress reported'
|
|
214
|
+
close_agent({ target: taskId })
|
|
215
|
+
delete state.active_workers[taskId]
|
|
216
|
+
}
|
|
217
|
+
} else {
|
|
218
|
+
// Collect results, mark completed, close agents
|
|
219
|
+
}
|
|
220
|
+
```
|
|
172
221
|
|
|
173
222
|
**Cross-Agent Supplementary Context** (v4):
|
|
174
223
|
|
|
@@ -178,12 +227,12 @@ When spawning workers in a later pipeline phase, send upstream results as supple
|
|
|
178
227
|
// Example: Send scout results to running strategist
|
|
179
228
|
send_message({
|
|
180
229
|
target: "<running-agent-task-name>",
|
|
181
|
-
|
|
230
|
+
message: `## Supplementary Context\n${upstreamFindings}`
|
|
182
231
|
})
|
|
183
232
|
// Note: send_message queues info without interrupting the agent's current work
|
|
184
233
|
```
|
|
185
234
|
|
|
186
|
-
Use `send_message` (not `
|
|
235
|
+
Use `send_message` (not `followup_task`) for supplementary info that enriches but doesn't redirect the agent's current task.
|
|
187
236
|
|
|
188
237
|
## handleComplete
|
|
189
238
|
|
|
@@ -6,7 +6,7 @@ Orchestrate team-quality-assurance: analyze -> dispatch -> spawn -> monitor -> r
|
|
|
6
6
|
|
|
7
7
|
**You are a dispatcher, not a doer.** Your ONLY outputs are:
|
|
8
8
|
- Session state files (`.workflow/.team/` directory)
|
|
9
|
-
- `spawn_agent` / `wait_agent` / `close_agent` / `send_message` / `
|
|
9
|
+
- `spawn_agent` / `wait_agent` / `close_agent` / `send_message` / `followup_task` calls
|
|
10
10
|
- Status reports to the user / `request_user_input` prompts
|
|
11
11
|
|
|
12
12
|
**FORBIDDEN** (even if the task seems trivial):
|
|
@@ -36,7 +36,7 @@ WRONG: Bash("npm test"), Bash("tsc"), etc. — worker work
|
|
|
36
36
|
- Handle GC loop (generator-executor coverage cycles)
|
|
37
37
|
- Execute completion action when pipeline finishes
|
|
38
38
|
- **Always proceed through full Phase 1-5 workflow, never skip to direct execution**
|
|
39
|
-
- Use `send_message` for supplementary context (non-interrupting) and `
|
|
39
|
+
- Use `send_message` for supplementary context (non-interrupting) and `followup_task` for triggering new work
|
|
40
40
|
- Use `list_agents` for session resume health checks and cleanup verification
|
|
41
41
|
|
|
42
42
|
### MUST NOT
|
|
@@ -157,11 +157,11 @@ Delegate to @commands/monitor.md#handleSpawnNext:
|
|
|
157
157
|
|
|
158
158
|
### Message Semantics
|
|
159
159
|
- **send_message**: Queue supplementary info to a running agent. Does NOT interrupt current processing. Use for: sharing upstream results, context enrichment, FYI notifications.
|
|
160
|
-
- **
|
|
160
|
+
- **followup_task**: Assign new work and trigger processing. Use for: waking idle agents, redirecting work, requesting new output.
|
|
161
161
|
|
|
162
162
|
### Agent Lifecycle Management
|
|
163
163
|
- **list_agents({})**: Returns all running agents. Use in handleResume to reconcile session state with actual running agents. Use in handleComplete to verify clean shutdown.
|
|
164
|
-
- **Named targeting**: Workers spawned with `task_name: "<task-id>"` can be addressed by name in send_message,
|
|
164
|
+
- **Named targeting**: Workers spawned with `task_name: "<task-id>"` can be addressed by name in send_message, followup_task, and close_agent calls.
|
|
165
165
|
|
|
166
166
|
## Error Handling
|
|
167
167
|
|