maestro-flow 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/team-supervisor.md +18 -8
- package/.claude/agents/team-worker.md +84 -2
- package/.claude/commands/manage-harvest.md +131 -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 +198 -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 +94 -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 +206 -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 +85 -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 +114 -0
- package/.claude/skills/team-lifecycle-v4/specs/pipelines.md +140 -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 +88 -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 +75 -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 +79 -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 +77 -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 +90 -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 +103 -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
- package/workflows/harvest.md +420 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: team-review
|
|
3
3
|
description: "Unified team skill for code review. 3-role pipeline: scanner, reviewer, fixer. Triggers on team-review."
|
|
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__ace-tool__search_context(*), mcp__maestro-tools__team_msg(*)
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Team Review
|
|
@@ -53,7 +53,7 @@ Before calling ANY tool, apply this check:
|
|
|
53
53
|
|
|
54
54
|
| Tool Call | Verdict | Reason |
|
|
55
55
|
|-----------|---------|--------|
|
|
56
|
-
| `spawn_agent`, `wait_agent`, `close_agent`, `send_message`, `
|
|
56
|
+
| `spawn_agent`, `wait_agent`, `close_agent`, `send_message`, `followup_task` | ALLOWED | Orchestration |
|
|
57
57
|
| `list_agents` | ALLOWED | Agent health check |
|
|
58
58
|
| `request_user_input` | ALLOWED | User interaction |
|
|
59
59
|
| `mcp__maestro-tools__team_msg` | ALLOWED | Message bus |
|
|
@@ -86,9 +86,8 @@ Coordinator spawns workers using this template:
|
|
|
86
86
|
spawn_agent({
|
|
87
87
|
agent_type: "team_worker",
|
|
88
88
|
task_name: "<task-id>",
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
{ type: "text", text: `## Role Assignment
|
|
89
|
+
fork_turns: "none",
|
|
90
|
+
message: `## Role Assignment
|
|
92
91
|
role: <role>
|
|
93
92
|
role_spec: <skill_root>/roles/<role>/role.md
|
|
94
93
|
session: <session-folder>
|
|
@@ -96,21 +95,20 @@ session_id: <session-id>
|
|
|
96
95
|
requirement: <task-description>
|
|
97
96
|
inner_loop: <true|false>
|
|
98
97
|
|
|
99
|
-
Read role_spec file (<skill_root>/roles/<role>/role.md) to load Phase 2-4 domain instructions
|
|
98
|
+
Read role_spec file (<skill_root>/roles/<role>/role.md) to load Phase 2-4 domain instructions.
|
|
100
99
|
|
|
101
|
-
|
|
100
|
+
## Task Context
|
|
102
101
|
task_id: <task-id>
|
|
103
102
|
title: <task-title>
|
|
104
103
|
description: <task-description>
|
|
105
|
-
pipeline_phase: <pipeline-phase
|
|
104
|
+
pipeline_phase: <pipeline-phase>
|
|
106
105
|
|
|
107
|
-
|
|
108
|
-
<prev_context>`
|
|
109
|
-
]
|
|
106
|
+
## Upstream Context
|
|
107
|
+
<prev_context>`
|
|
110
108
|
})
|
|
111
109
|
```
|
|
112
110
|
|
|
113
|
-
After spawning, use `wait_agent({
|
|
111
|
+
After spawning, use `wait_agent({ timeout_ms: 900000 })` to collect results, then `close_agent({ target })` each worker.
|
|
114
112
|
|
|
115
113
|
|
|
116
114
|
### Model Selection Guide
|
|
@@ -126,10 +124,10 @@ Override model/reasoning_effort in spawn_agent when cost optimization is needed:
|
|
|
126
124
|
spawn_agent({
|
|
127
125
|
agent_type: "team_worker",
|
|
128
126
|
task_name: "<task-id>",
|
|
129
|
-
|
|
127
|
+
fork_turns: "none",
|
|
130
128
|
model: "<model-override>",
|
|
131
129
|
reasoning_effort: "<effort-level>",
|
|
132
|
-
|
|
130
|
+
message: "..."
|
|
133
131
|
})
|
|
134
132
|
```
|
|
135
133
|
|
|
@@ -152,7 +150,7 @@ spawn_agent({
|
|
|
152
150
|
| Intent | API | Example |
|
|
153
151
|
|--------|-----|---------|
|
|
154
152
|
| Send scan findings to running reviewer | `send_message` | Queue scan results to REV-* as supplementary context |
|
|
155
|
-
| Not used in this skill | `
|
|
153
|
+
| Not used in this skill | `followup_task` | No resident agents -- sequential 3-stage pipeline |
|
|
156
154
|
| Check running agents | `list_agents` | Verify agent health during resume |
|
|
157
155
|
|
|
158
156
|
### Pipeline Pattern
|
|
@@ -173,7 +171,7 @@ const running = list_agents({})
|
|
|
173
171
|
### Named Agent Targeting
|
|
174
172
|
|
|
175
173
|
Workers are spawned with `task_name: "<task-id>"` enabling direct addressing:
|
|
176
|
-
- `send_message({ target: "REV-001",
|
|
174
|
+
- `send_message({ target: "REV-001", message: "..." })` -- queue scan findings to running reviewer
|
|
177
175
|
- `close_agent({ target: "SCAN-001" })` -- cleanup by name after completion
|
|
178
176
|
|
|
179
177
|
## Completion Action
|
|
@@ -32,6 +32,16 @@ Read-only status report from tasks.json, then STOP.
|
|
|
32
32
|
1. Read tasks.json
|
|
33
33
|
2. Count tasks by status (pending, in_progress, completed, failed)
|
|
34
34
|
|
|
35
|
+
```javascript
|
|
36
|
+
// Read progress and blocker messages from message bus
|
|
37
|
+
const progressMsgs = mcp__maestro-tools__team_msg({
|
|
38
|
+
operation: "list", session_id: sessionId, type: "progress", last: 50
|
|
39
|
+
})
|
|
40
|
+
const blockerMsgs = mcp__maestro-tools__team_msg({
|
|
41
|
+
operation: "list", session_id: sessionId, type: "blocker", last: 10
|
|
42
|
+
})
|
|
43
|
+
```
|
|
44
|
+
|
|
35
45
|
Output:
|
|
36
46
|
```
|
|
37
47
|
[coordinator] Review Pipeline Status
|
|
@@ -45,9 +55,18 @@ Output:
|
|
|
45
55
|
|
|
46
56
|
done=completed >>>=running o=pending x=deleted
|
|
47
57
|
|
|
48
|
-
[coordinator] Active
|
|
58
|
+
[coordinator] Active Workers:
|
|
59
|
+
<task_id> <role> <milestone_phase> <pct>% "<summary>" <time_ago>
|
|
60
|
+
|
|
61
|
+
[coordinator] Blockers:
|
|
62
|
+
<task_id> <role> "<blocker_summary>" <time_ago>
|
|
63
|
+
(omit section if no blockers)
|
|
64
|
+
|
|
49
65
|
[coordinator] Ready to spawn: <subjects>
|
|
50
66
|
[coordinator] Commands: 'resume' to advance | 'check' to refresh
|
|
67
|
+
|
|
68
|
+
**CLI monitoring** (works while coordinator is blocked):
|
|
69
|
+
maestro msg list -s "<session_id>" --type progress --last 10
|
|
51
70
|
```
|
|
52
71
|
|
|
53
72
|
Then STOP.
|
|
@@ -99,31 +118,49 @@ state.tasks[taskId].status = 'in_progress'
|
|
|
99
118
|
const agentId = spawn_agent({
|
|
100
119
|
agent_type: "team_worker",
|
|
101
120
|
task_name: taskId, // e.g., "SCAN-001" — enables named targeting
|
|
102
|
-
|
|
103
|
-
{ type: "text", text: `## Role Assignment
|
|
121
|
+
message: `## Role Assignment
|
|
104
122
|
role: ${role}
|
|
105
123
|
role_spec: ${skillRoot}/roles/${role}/role.md
|
|
106
124
|
session: ${sessionFolder}
|
|
107
125
|
session_id: ${sessionId}
|
|
108
126
|
requirement: ${taskDescription}
|
|
109
|
-
inner_loop: ${innerLoop}
|
|
127
|
+
inner_loop: ${innerLoop}
|
|
110
128
|
|
|
111
|
-
|
|
129
|
+
## Current Task
|
|
112
130
|
- Task ID: ${taskId}
|
|
113
131
|
- Task: ${taskSubject}
|
|
114
132
|
|
|
115
133
|
Read role_spec file to load Phase 2-4 domain instructions.
|
|
116
|
-
Execute built-in Phase 1 (task discovery) -> role Phase 2-4 -> built-in Phase 5 (report)
|
|
117
|
-
|
|
134
|
+
Execute built-in Phase 1 (task discovery) -> role Phase 2-4 -> built-in Phase 5 (report).
|
|
135
|
+
|
|
136
|
+
## Progress Milestones
|
|
137
|
+
session_id: ${sessionId}
|
|
138
|
+
Report progress via team_msg at natural phase boundaries.
|
|
139
|
+
Report blockers immediately via team_msg type="blocker".
|
|
140
|
+
Report completion via team_msg type="task_complete" after report_agent_job_result.`
|
|
118
141
|
})
|
|
119
142
|
|
|
120
143
|
// 3) Track agent
|
|
121
144
|
state.active_agents[taskId] = { agentId, role, started_at: now }
|
|
122
145
|
|
|
123
146
|
// 4) Wait for completion — use task_name for stable targeting (v4)
|
|
124
|
-
const waitResult = wait_agent({
|
|
147
|
+
const waitResult = wait_agent({ timeout_ms: 900000 })
|
|
148
|
+
|
|
149
|
+
// Drain progress from message bus
|
|
150
|
+
const progressMsgs = mcp__maestro-tools__team_msg({
|
|
151
|
+
operation: "list", session_id: sessionId, type: "progress", last: 100
|
|
152
|
+
})
|
|
153
|
+
for (const msg of (progressMsgs.result?.messages || [])) {
|
|
154
|
+
console.log(`[coordinator] trace: ${msg.summary}`)
|
|
155
|
+
}
|
|
156
|
+
|
|
125
157
|
if (waitResult.timed_out) {
|
|
158
|
+
const lastProgress = (progressMsgs.result?.messages || [])
|
|
159
|
+
.filter(m => m.data?.task_id === taskId).pop()
|
|
126
160
|
state.tasks[taskId].status = 'timed_out'
|
|
161
|
+
state.tasks[taskId].error = lastProgress
|
|
162
|
+
? `Timed out at ${lastProgress.data.phase} (${lastProgress.data.progress_pct}%)`
|
|
163
|
+
: 'Timed out with no progress reported'
|
|
127
164
|
close_agent({ target: taskId })
|
|
128
165
|
delete state.active_agents[taskId]
|
|
129
166
|
} else {
|
|
@@ -161,12 +198,12 @@ When spawning workers in a later pipeline phase, send upstream results as supple
|
|
|
161
198
|
// Example: Send scan results to running reviewer
|
|
162
199
|
send_message({
|
|
163
200
|
target: "<running-agent-task-name>",
|
|
164
|
-
|
|
201
|
+
message: `## Supplementary Context\n${upstreamFindings}`
|
|
165
202
|
})
|
|
166
203
|
// Note: send_message queues info without interrupting the agent's current work
|
|
167
204
|
```
|
|
168
205
|
|
|
169
|
-
Use `send_message` (not `
|
|
206
|
+
Use `send_message` (not `followup_task`) for supplementary info that enriches but doesn't redirect the agent's current task.
|
|
170
207
|
|
|
171
208
|
## handleComplete
|
|
172
209
|
|
|
@@ -6,7 +6,7 @@ Orchestrate team-review: parse target -> detect mode -> dispatch task chain -> m
|
|
|
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: Edit/Write on project source files — worker work
|
|
|
36
36
|
- Maintain session state (tasks.json)
|
|
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
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: team-tech-debt
|
|
3
3
|
description: Unified team skill for tech debt identification and remediation. Scans codebase for tech debt, assesses severity, plans and executes fixes with validation. Uses team-worker agent architecture with roles/ for domain logic. Coordinator orchestrates pipeline, workers are team-worker agents. Triggers on "team tech debt".
|
|
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__ace-tool__search_context(*), mcp__maestro-tools__read_file(*), mcp__maestro-tools__write_file(*), mcp__maestro-tools__edit_file(*), mcp__maestro-tools__team_msg(*)
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Team Tech Debt
|
|
@@ -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
|
|
@@ -173,7 +171,7 @@ Scanner discoveries flow through the pipeline — each stage narrows and refines
|
|
|
173
171
|
| Intent | API | Example |
|
|
174
172
|
|--------|-----|---------|
|
|
175
173
|
| Queue supplementary info (don't interrupt) | `send_message` | Send scan findings to running assessor |
|
|
176
|
-
| Assign fix from remediation plan | `
|
|
174
|
+
| Assign fix from remediation plan | `followup_task` | Assign TDFIX task from planner output |
|
|
177
175
|
| Check running agents | `list_agents` | Verify agent health during resume |
|
|
178
176
|
|
|
179
177
|
### Agent Health Check
|
|
@@ -190,8 +188,8 @@ const running = list_agents({})
|
|
|
190
188
|
### Named Agent Targeting
|
|
191
189
|
|
|
192
190
|
Workers are spawned with `task_name: "<task-id>"` enabling direct addressing:
|
|
193
|
-
- `send_message({ target: "TDSCAN-001",
|
|
194
|
-
- `
|
|
191
|
+
- `send_message({ target: "TDSCAN-001", message: "..." })` -- send additional scan scope to scanner
|
|
192
|
+
- `followup_task({ target: "TDFIX-001", message: "..." })` -- assign fix task from planner output
|
|
195
193
|
- `close_agent({ target: "TDVAL-001" })` -- cleanup after validation
|
|
196
194
|
|
|
197
195
|
## Error Handling
|
|
@@ -26,6 +26,16 @@ Read-only status report from tasks.json, then STOP.
|
|
|
26
26
|
1. Read tasks.json
|
|
27
27
|
2. Count tasks by status (pending, in_progress, completed, failed)
|
|
28
28
|
|
|
29
|
+
```javascript
|
|
30
|
+
// Read progress and blocker messages from message bus
|
|
31
|
+
const progressMsgs = mcp__maestro-tools__team_msg({
|
|
32
|
+
operation: "list", session_id: sessionId, type: "progress", last: 50
|
|
33
|
+
})
|
|
34
|
+
const blockerMsgs = mcp__maestro-tools__team_msg({
|
|
35
|
+
operation: "list", session_id: sessionId, type: "blocker", last: 10
|
|
36
|
+
})
|
|
37
|
+
```
|
|
38
|
+
|
|
29
39
|
```
|
|
30
40
|
Pipeline Status (<mode>):
|
|
31
41
|
[DONE] TDSCAN-001 (scanner) -> scan complete
|
|
@@ -34,9 +44,19 @@ Pipeline Status (<mode>):
|
|
|
34
44
|
[WAIT] TDFIX-001 (executor) -> blocked by TDPLAN-001
|
|
35
45
|
[WAIT] TDVAL-001 (validator) -> blocked by TDFIX-001
|
|
36
46
|
|
|
47
|
+
[coordinator] Active Workers:
|
|
48
|
+
<task_id> <role> <milestone_phase> <pct>% "<summary>" <time_ago>
|
|
49
|
+
|
|
50
|
+
[coordinator] Blockers:
|
|
51
|
+
<task_id> <role> "<blocker_summary>" <time_ago>
|
|
52
|
+
(omit section if no blockers)
|
|
53
|
+
|
|
37
54
|
GC Rounds: 0/3
|
|
38
55
|
Session: <session-id>
|
|
39
56
|
Commands: 'resume' to advance | 'check' to refresh
|
|
57
|
+
|
|
58
|
+
**CLI monitoring** (works while coordinator is blocked):
|
|
59
|
+
maestro msg list -s "<session_id>" --type progress --last 10
|
|
40
60
|
```
|
|
41
61
|
|
|
42
62
|
Output status -- do NOT advance pipeline.
|
|
@@ -83,26 +103,31 @@ state.tasks[taskId].status = 'in_progress'
|
|
|
83
103
|
const agentId = spawn_agent({
|
|
84
104
|
agent_type: "team_worker",
|
|
85
105
|
task_name: taskId, // e.g., "TDSCAN-001" — enables named targeting
|
|
86
|
-
|
|
87
|
-
{ type: "text", text: `## Role Assignment
|
|
106
|
+
message: `## Role Assignment
|
|
88
107
|
role: ${task.role}
|
|
89
108
|
role_spec: ${skillRoot}/roles/${task.role}/role.md
|
|
90
109
|
session: ${sessionFolder}
|
|
91
110
|
session_id: ${sessionId}
|
|
92
111
|
team_name: tech-debt
|
|
93
112
|
requirement: ${task.description}
|
|
94
|
-
inner_loop: ${task.role === 'executor'}
|
|
113
|
+
inner_loop: ${task.role === 'executor'}
|
|
95
114
|
|
|
96
|
-
|
|
97
|
-
Execute built-in Phase 1 (task discovery) -> role Phase 2-4 -> built-in Phase 5 (report)
|
|
115
|
+
Read role_spec file (${skillRoot}/roles/${task.role}/role.md) to load Phase 2-4 domain instructions.
|
|
116
|
+
Execute built-in Phase 1 (task discovery) -> role Phase 2-4 -> built-in Phase 5 (report).
|
|
98
117
|
|
|
99
|
-
|
|
118
|
+
## Task Context
|
|
100
119
|
task_id: ${taskId}
|
|
101
120
|
title: ${task.title}
|
|
102
|
-
description: ${task.description}
|
|
121
|
+
description: ${task.description}
|
|
122
|
+
|
|
123
|
+
## Upstream Context
|
|
124
|
+
${prevContext}
|
|
103
125
|
|
|
104
|
-
|
|
105
|
-
|
|
126
|
+
## Progress Milestones
|
|
127
|
+
session_id: ${sessionId}
|
|
128
|
+
Report progress via team_msg at natural phase boundaries.
|
|
129
|
+
Report blockers immediately via team_msg type="blocker".
|
|
130
|
+
Report completion via team_msg type="task_complete" after report_agent_job_result.`
|
|
106
131
|
})
|
|
107
132
|
|
|
108
133
|
// 3) Track agent
|
|
@@ -125,10 +150,24 @@ After spawning all ready tasks:
|
|
|
125
150
|
```javascript
|
|
126
151
|
// 4) Batch wait — use task_name for stable targeting (v4)
|
|
127
152
|
const taskNames = Object.keys(state.active_agents)
|
|
128
|
-
const waitResult = wait_agent({
|
|
153
|
+
const waitResult = wait_agent({ timeout_ms: 900000 })
|
|
154
|
+
|
|
155
|
+
// Drain progress from message bus
|
|
156
|
+
const progressMsgs = mcp__maestro-tools__team_msg({
|
|
157
|
+
operation: "list", session_id: sessionId, type: "progress", last: 100
|
|
158
|
+
})
|
|
159
|
+
for (const msg of (progressMsgs.result?.messages || [])) {
|
|
160
|
+
console.log(`[coordinator] trace: ${msg.summary}`)
|
|
161
|
+
}
|
|
162
|
+
|
|
129
163
|
if (waitResult.timed_out) {
|
|
130
164
|
for (const taskId of taskNames) {
|
|
165
|
+
const lastProgress = (progressMsgs.result?.messages || [])
|
|
166
|
+
.filter(m => m.data?.task_id === taskId).pop()
|
|
131
167
|
state.tasks[taskId].status = 'timed_out'
|
|
168
|
+
state.tasks[taskId].error = lastProgress
|
|
169
|
+
? `Timed out at ${lastProgress.data.phase} (${lastProgress.data.progress_pct}%)`
|
|
170
|
+
: 'Timed out with no progress reported'
|
|
132
171
|
close_agent({ target: taskId })
|
|
133
172
|
delete state.active_agents[taskId]
|
|
134
173
|
}
|
|
@@ -214,12 +253,12 @@ When spawning workers in a later pipeline phase, send upstream results as supple
|
|
|
214
253
|
// Example: Send scan results to running assessor
|
|
215
254
|
send_message({
|
|
216
255
|
target: "<running-agent-task-name>",
|
|
217
|
-
|
|
256
|
+
message: `## Supplementary Context\n${upstreamFindings}`
|
|
218
257
|
})
|
|
219
258
|
// Note: send_message queues info without interrupting the agent's current work
|
|
220
259
|
```
|
|
221
260
|
|
|
222
|
-
Use `send_message` (not `
|
|
261
|
+
Use `send_message` (not `followup_task`) for supplementary info that enriches but doesn't redirect the agent's current task.
|
|
223
262
|
|
|
224
263
|
### Persist and Loop
|
|
225
264
|
|
|
@@ -6,7 +6,7 @@
|
|
|
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):
|
|
@@ -33,7 +33,7 @@ WRONG: Edit/Write on project source files — worker work
|
|
|
33
33
|
- Monitor worker progress via spawn_agent/wait_agent and route messages
|
|
34
34
|
- Maintain session state persistence (tasks.json)
|
|
35
35
|
- **Always proceed through full Phase 1-5 workflow, never skip to direct execution**
|
|
36
|
-
- Use `send_message` for supplementary context (non-interrupting) and `
|
|
36
|
+
- Use `send_message` for supplementary context (non-interrupting) and `followup_task` for triggering new work
|
|
37
37
|
- Use `list_agents` for session resume health checks and cleanup verification
|
|
38
38
|
|
|
39
39
|
### MUST NOT
|
|
@@ -153,11 +153,11 @@ Delegate to @commands/monitor.md#handleSpawnNext:
|
|
|
153
153
|
|
|
154
154
|
### Message Semantics
|
|
155
155
|
- **send_message**: Queue supplementary info to a running agent. Does NOT interrupt current processing. Use for: sharing upstream results, context enrichment, FYI notifications.
|
|
156
|
-
- **
|
|
156
|
+
- **followup_task**: Assign new work and trigger processing. Use for: waking idle agents, redirecting work, requesting new output.
|
|
157
157
|
|
|
158
158
|
### Agent Lifecycle Management
|
|
159
159
|
- **list_agents({})**: Returns all running agents. Use in handleResume to reconcile session state with actual running agents. Use in handleComplete to verify clean shutdown.
|
|
160
|
-
- **Named targeting**: Workers spawned with `task_name: "<task-id>"` can be addressed by name in send_message,
|
|
160
|
+
- **Named targeting**: Workers spawned with `task_name: "<task-id>"` can be addressed by name in send_message, followup_task, and close_agent calls.
|
|
161
161
|
|
|
162
162
|
## Error Handling
|
|
163
163
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: team-testing
|
|
3
3
|
description: Unified team skill for testing team. Progressive test coverage through Generator-Critic loops, shared memory, and dynamic layer selection. Triggers on "team testing".
|
|
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 Testing
|
|
@@ -54,7 +54,7 @@ Before calling ANY tool, apply this check:
|
|
|
54
54
|
|
|
55
55
|
| Tool Call | Verdict | Reason |
|
|
56
56
|
|-----------|---------|--------|
|
|
57
|
-
| `spawn_agent`, `wait_agent`, `close_agent`, `send_message`, `
|
|
57
|
+
| `spawn_agent`, `wait_agent`, `close_agent`, `send_message`, `followup_task` | ALLOWED | Orchestration |
|
|
58
58
|
| `list_agents` | ALLOWED | Agent health check |
|
|
59
59
|
| `request_user_input` | ALLOWED | User interaction |
|
|
60
60
|
| `mcp__maestro-tools__team_msg` | ALLOWED | Message bus |
|
|
@@ -87,9 +87,8 @@ Coordinator spawns workers using this template:
|
|
|
87
87
|
spawn_agent({
|
|
88
88
|
agent_type: "team_worker",
|
|
89
89
|
task_name: "<task-id>",
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
{ type: "text", text: `## Role Assignment
|
|
90
|
+
fork_turns: "none",
|
|
91
|
+
message: `## Role Assignment
|
|
93
92
|
role: <role>
|
|
94
93
|
role_spec: <skill_root>/roles/<role>/role.md
|
|
95
94
|
session: <session-folder>
|
|
@@ -97,21 +96,20 @@ session_id: <session-id>
|
|
|
97
96
|
requirement: <task-description>
|
|
98
97
|
inner_loop: <true|false>
|
|
99
98
|
|
|
100
|
-
Read role_spec file (<skill_root>/roles/<role>/role.md) to load Phase 2-4 domain instructions
|
|
99
|
+
Read role_spec file (<skill_root>/roles/<role>/role.md) to load Phase 2-4 domain instructions.
|
|
101
100
|
|
|
102
|
-
|
|
101
|
+
## Task Context
|
|
103
102
|
task_id: <task-id>
|
|
104
103
|
title: <task-title>
|
|
105
104
|
description: <task-description>
|
|
106
|
-
pipeline_phase: <pipeline-phase
|
|
105
|
+
pipeline_phase: <pipeline-phase>
|
|
107
106
|
|
|
108
|
-
|
|
109
|
-
<prev_context>`
|
|
110
|
-
]
|
|
107
|
+
## Upstream Context
|
|
108
|
+
<prev_context>`
|
|
111
109
|
})
|
|
112
110
|
```
|
|
113
111
|
|
|
114
|
-
After spawning, use `wait_agent({
|
|
112
|
+
After spawning, use `wait_agent({ timeout_ms: 900000 })` to collect results, then `close_agent({ target })` each worker.
|
|
115
113
|
|
|
116
114
|
|
|
117
115
|
### Model Selection Guide
|
|
@@ -128,10 +126,10 @@ Override model/reasoning_effort in spawn_agent when cost optimization is needed:
|
|
|
128
126
|
spawn_agent({
|
|
129
127
|
agent_type: "team_worker",
|
|
130
128
|
task_name: "<task-id>",
|
|
131
|
-
|
|
129
|
+
fork_turns: "none",
|
|
132
130
|
model: "<model-override>",
|
|
133
131
|
reasoning_effort: "<effort-level>",
|
|
134
|
-
|
|
132
|
+
message: "..."
|
|
135
133
|
})
|
|
136
134
|
```
|
|
137
135
|
|
|
@@ -151,7 +149,7 @@ spawn_agent({
|
|
|
151
149
|
| Intent | API | Example |
|
|
152
150
|
|--------|-----|---------|
|
|
153
151
|
| Send strategy to running generators | `send_message` | Queue test strategy findings to TESTGEN-* workers |
|
|
154
|
-
| Not used in this skill | `
|
|
152
|
+
| Not used in this skill | `followup_task` | No resident agents -- all workers are one-shot |
|
|
155
153
|
| Check running agents | `list_agents` | Verify parallel generator/executor health |
|
|
156
154
|
|
|
157
155
|
### Parallel Test Generation
|
|
@@ -164,7 +162,7 @@ const genNames = ["TESTGEN-001", "TESTGEN-002"]
|
|
|
164
162
|
for (const name of genNames) {
|
|
165
163
|
spawn_agent({ agent_type: "team_worker", task_name: name, ... })
|
|
166
164
|
}
|
|
167
|
-
wait_agent({
|
|
165
|
+
wait_agent({ timeout_ms: 900000 })
|
|
168
166
|
```
|
|
169
167
|
|
|
170
168
|
### GC Loop Coordination
|
|
@@ -185,7 +183,7 @@ const running = list_agents({})
|
|
|
185
183
|
### Named Agent Targeting
|
|
186
184
|
|
|
187
185
|
Workers are spawned with `task_name: "<task-id>"` enabling direct addressing:
|
|
188
|
-
- `send_message({ target: "TESTGEN-001",
|
|
186
|
+
- `send_message({ target: "TESTGEN-001", message: "..." })` -- queue strategy context to running generator
|
|
189
187
|
- `close_agent({ target: "TESTRUN-001" })` -- cleanup by name after wait_agent returns
|
|
190
188
|
|
|
191
189
|
## Completion Action
|