maestro-flow 0.3.37 → 0.3.39
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/workflow-analyzer.md +2 -0
- package/.claude/agents/workflow-debugger.md +2 -0
- package/.claude/agents/workflow-executor.md +2 -0
- package/.claude/agents/workflow-integration-checker.md +1 -0
- package/.claude/agents/workflow-nyquist-auditor.md +1 -0
- package/.claude/agents/workflow-planner.md +2 -0
- package/.claude/agents/workflow-reviewer.md +2 -0
- package/.claude/agents/workflow-verifier.md +2 -0
- package/.claude/commands/learn-decompose.md +176 -176
- package/.claude/commands/learn-follow.md +167 -167
- package/.claude/commands/learn-investigate.md +221 -221
- package/.claude/commands/learn-retro.md +303 -303
- package/.claude/commands/learn-second-opinion.md +167 -167
- package/.claude/commands/maestro-amend.md +300 -300
- package/.claude/commands/maestro-analyze.md +126 -126
- package/.claude/commands/maestro-brainstorm.md +100 -100
- package/.claude/commands/maestro-composer.md +354 -354
- package/.claude/commands/maestro-execute.md +120 -114
- package/.claude/commands/maestro-fork.md +86 -86
- package/.claude/commands/maestro-init.md +78 -78
- package/.claude/commands/maestro-learn.md +140 -140
- package/.claude/commands/maestro-link-coordinate.md +1 -1
- package/.claude/commands/maestro-merge.md +61 -61
- package/.claude/commands/maestro-milestone-release.md +96 -96
- package/.claude/commands/maestro-overlay.md +178 -178
- package/.claude/commands/maestro-plan.md +150 -138
- package/.claude/commands/maestro-player.md +404 -404
- package/.claude/commands/maestro-quick.md +56 -56
- package/.claude/commands/maestro-ralph-execute.md +7 -18
- package/.claude/commands/maestro-ralph.md +9 -3
- package/.claude/commands/maestro-roadmap.md +1 -1
- package/.claude/commands/maestro-ui-design.md +93 -93
- package/.claude/commands/maestro-update.md +176 -176
- package/.claude/commands/maestro-verify.md +96 -90
- package/.claude/commands/maestro.md +121 -121
- package/.claude/commands/manage-codebase-rebuild.md +75 -75
- package/.claude/commands/manage-codebase-refresh.md +57 -57
- package/.claude/commands/manage-harvest.md +94 -94
- package/.claude/commands/manage-issue-discover.md +77 -77
- package/.claude/commands/manage-issue.md +73 -73
- package/.claude/commands/manage-knowhow-capture.md +193 -193
- package/.claude/commands/manage-knowhow.md +77 -77
- package/.claude/commands/manage-learn.md +67 -67
- package/.claude/commands/manage-status.md +51 -51
- package/.claude/commands/manage-wiki.md +62 -62
- package/.claude/commands/quality-auto-test.md +1 -1
- package/.claude/commands/quality-debug.md +121 -115
- package/.claude/commands/quality-refactor.md +55 -55
- package/.claude/commands/quality-retrospective.md +78 -78
- package/.claude/commands/quality-review.md +114 -108
- package/.claude/commands/quality-sync.md +51 -51
- package/.claude/commands/quality-test.md +103 -103
- package/.claude/commands/spec-add.md +49 -49
- package/.claude/commands/spec-load.md +51 -51
- package/.claude/commands/spec-remove.md +51 -51
- package/.claude/commands/spec-setup.md +51 -51
- package/.claude/commands/wiki-connect.md +62 -62
- package/.claude/commands/wiki-digest.md +69 -69
- package/.codex/skills/learn-decompose/SKILL.md +113 -113
- package/.codex/skills/learn-follow/SKILL.md +1 -1
- package/.codex/skills/learn-investigate/SKILL.md +83 -83
- package/.codex/skills/learn-retro/SKILL.md +83 -83
- package/.codex/skills/learn-second-opinion/SKILL.md +86 -86
- package/.codex/skills/maestro/SKILL.md +304 -304
- package/.codex/skills/maestro-analyze/SKILL.md +9 -8
- package/.codex/skills/maestro-brainstorm/SKILL.md +442 -397
- package/.codex/skills/maestro-composer/SKILL.md +213 -213
- package/.codex/skills/maestro-execute/SKILL.md +346 -318
- package/.codex/skills/maestro-fork/SKILL.md +56 -2
- package/.codex/skills/maestro-init/SKILL.md +40 -16
- package/.codex/skills/maestro-learn/SKILL.md +80 -80
- package/.codex/skills/maestro-link-coordinate/SKILL.md +257 -257
- package/.codex/skills/maestro-merge/SKILL.md +1 -1
- package/.codex/skills/maestro-milestone-audit/SKILL.md +1 -1
- package/.codex/skills/maestro-milestone-complete/SKILL.md +40 -9
- package/.codex/skills/maestro-milestone-release/SKILL.md +70 -70
- package/.codex/skills/maestro-overlay/SKILL.md +1 -1
- package/.codex/skills/maestro-plan/SKILL.md +19 -4
- package/.codex/skills/maestro-player/SKILL.md +323 -323
- package/.codex/skills/maestro-quick/SKILL.md +1 -1
- package/.codex/skills/maestro-ralph/SKILL.md +681 -578
- package/.codex/skills/maestro-roadmap/SKILL.md +518 -468
- package/.codex/skills/maestro-ui-design/SKILL.md +109 -12
- package/.codex/skills/maestro-verify/SKILL.md +27 -9
- package/.codex/skills/manage-codebase-rebuild/SKILL.md +3 -2
- package/.codex/skills/manage-codebase-refresh/SKILL.md +1 -1
- package/.codex/skills/manage-harvest/SKILL.md +91 -91
- package/.codex/skills/manage-issue/SKILL.md +19 -6
- package/.codex/skills/manage-issue-discover/SKILL.md +1 -1
- package/.codex/skills/manage-knowhow/SKILL.md +95 -95
- package/.codex/skills/manage-knowhow-capture/SKILL.md +110 -110
- package/.codex/skills/manage-learn/SKILL.md +1 -1
- package/.codex/skills/manage-status/SKILL.md +1 -1
- package/.codex/skills/manage-wiki/SKILL.md +55 -55
- package/.codex/skills/quality-auto-test/SKILL.md +547 -547
- package/.codex/skills/quality-debug/SKILL.md +339 -334
- package/.codex/skills/quality-refactor/SKILL.md +1 -1
- package/.codex/skills/quality-retrospective/SKILL.md +292 -292
- package/.codex/skills/quality-review/SKILL.md +365 -364
- package/.codex/skills/quality-sync/SKILL.md +1 -1
- package/.codex/skills/quality-test/SKILL.md +498 -498
- package/.codex/skills/spec-add/SKILL.md +101 -101
- package/.codex/skills/spec-load/SKILL.md +77 -77
- package/.codex/skills/spec-map/SKILL.md +1 -1
- package/.codex/skills/spec-remove/SKILL.md +69 -69
- package/.codex/skills/spec-setup/SKILL.md +1 -1
- package/.codex/skills/team-coordinate/SKILL.md +2 -1
- package/.codex/skills/team-executor/SKILL.md +116 -115
- package/.codex/skills/team-lifecycle-v4/SKILL.md +2 -1
- package/.codex/skills/team-lifecycle-v4/instructions/agent-instruction.md +14 -6
- package/.codex/skills/team-lifecycle-v4/roles/analyst/role.md +16 -4
- package/.codex/skills/team-lifecycle-v4/roles/executor/commands/implement.md +7 -1
- package/.codex/skills/team-lifecycle-v4/roles/planner/role.md +16 -4
- package/.codex/skills/team-lifecycle-v4/roles/writer/role.md +8 -2
- package/.codex/skills/team-quality-assurance/SKILL.md +2 -1
- package/.codex/skills/team-quality-assurance/roles/scout/role.md +9 -2
- package/.codex/skills/team-review/SKILL.md +2 -1
- package/.codex/skills/team-review/roles/reviewer/role.md +10 -1
- package/.codex/skills/team-review/roles/scanner/role.md +10 -1
- package/.codex/skills/team-tech-debt/SKILL.md +144 -143
- package/.codex/skills/team-tech-debt/roles/executor/role.md +9 -5
- package/.codex/skills/team-tech-debt/roles/scanner/role.md +10 -0
- package/.codex/skills/team-tech-debt/roles/validator/role.md +8 -2
- package/.codex/skills/team-testing/SKILL.md +2 -1
- package/.codex/skills/team-testing/roles/executor/role.md +8 -2
- package/.codex/skills/team-testing/roles/generator/role.md +8 -2
- package/.codex/skills/wiki-connect/SKILL.md +73 -73
- package/.codex/skills/wiki-digest/SKILL.md +87 -87
- package/README.md +6 -0
- package/README.zh-CN.md +6 -0
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js +4 -0
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +118 -7
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
- package/dashboard/dist-server/shared/agent-types.d.ts +2 -0
- package/dashboard/dist-server/src/agents/cli-agent-runner.d.ts +2 -0
- package/dashboard/dist-server/src/agents/cli-agent-runner.js +4 -0
- package/dashboard/dist-server/src/agents/cli-agent-runner.js.map +1 -1
- package/dashboard/dist-server/src/commands/delegate.d.ts +2 -0
- package/dashboard/dist-server/src/commands/delegate.js +18 -0
- package/dashboard/dist-server/src/commands/delegate.js.map +1 -1
- package/dashboard/dist-server/src/config/cli-tools-config.d.ts +6 -0
- package/dashboard/dist-server/src/config/cli-tools-config.js +2 -0
- package/dashboard/dist-server/src/config/cli-tools-config.js.map +1 -1
- package/dist/shared/agent-types.d.ts +2 -0
- package/dist/shared/agent-types.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.d.ts +2 -0
- package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.js +4 -0
- package/dist/src/agents/cli-agent-runner.js.map +1 -1
- package/dist/src/commands/config.d.ts.map +1 -1
- package/dist/src/commands/config.js +29 -1
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/delegate.d.ts +2 -0
- package/dist/src/commands/delegate.d.ts.map +1 -1
- package/dist/src/commands/delegate.js +18 -0
- package/dist/src/commands/delegate.js.map +1 -1
- package/dist/src/commands/launcher.d.ts.map +1 -1
- package/dist/src/commands/launcher.js +27 -4
- package/dist/src/commands/launcher.js.map +1 -1
- package/dist/src/config/cli-tools-config.d.ts +6 -0
- package/dist/src/config/cli-tools-config.d.ts.map +1 -1
- package/dist/src/config/cli-tools-config.js +2 -0
- package/dist/src/config/cli-tools-config.js.map +1 -1
- package/dist/src/core/overlay/applier.d.ts.map +1 -1
- package/dist/src/core/overlay/applier.js +65 -5
- package/dist/src/core/overlay/applier.js.map +1 -1
- package/dist/src/core/overlay/loader.d.ts.map +1 -1
- package/dist/src/core/overlay/loader.js +9 -4
- package/dist/src/core/overlay/loader.js.map +1 -1
- package/dist/src/core/overlay/types.d.ts +2 -0
- package/dist/src/core/overlay/types.d.ts.map +1 -1
- package/dist/src/core/overlay/types.js +2 -0
- package/dist/src/core/overlay/types.js.map +1 -1
- package/dist/src/tui/tools-ui/ToolsDashboard.d.ts.map +1 -1
- package/dist/src/tui/tools-ui/ToolsDashboard.js +1 -1
- package/dist/src/tui/tools-ui/ToolsDashboard.js.map +1 -1
- package/dist/src/tui/tools-ui/ToolsOverview.d.ts.map +1 -1
- package/dist/src/tui/tools-ui/ToolsOverview.js +51 -4
- package/dist/src/tui/tools-ui/ToolsOverview.js.map +1 -1
- package/package.json +1 -1
- package/shared/agent-types.ts +2 -0
- package/workflows/delegate-protocol.codex.md +65 -0
- package/workflows/issue-analyze.md +2 -3
- package/workflows/issue-gaps-analyze.codex.md +260 -0
- package/workflows/issue-gaps-analyze.md +214 -0
|
@@ -1,323 +1,323 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: maestro-player
|
|
3
|
-
description:
|
|
4
|
-
argument-hint: "<template-slug|path> [--context key=value...] [-c [session-id]] [--list] [--dry-run]"
|
|
5
|
-
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<purpose>
|
|
9
|
-
Wave-based template executor using `spawn_agents_on_csv`. Loads a workflow template
|
|
10
|
-
(produced by maestro-composer), binds context variables, converts DAG nodes into
|
|
11
|
-
CSV waves via topological sort, executes wave-by-wave with barrier/non-barrier grouping.
|
|
12
|
-
|
|
13
|
-
Aligned with maestro codex coordinator pattern:
|
|
14
|
-
- ALL skill execution via `spawn_agents_on_csv` — coordinator never executes directly
|
|
15
|
-
- Barrier nodes (checkpoints + artifact-producing skills) execute solo
|
|
16
|
-
- Non-barrier nodes grouped into parallel waves
|
|
17
|
-
- Session state at `.workflow/.maestro/{session-id}/`
|
|
18
|
-
- Resume from last completed wave via `-c`
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
Load Template → Bind Variables → Build Wave CSV → spawn → read results →
|
|
22
|
-
(barrier: read artifacts, update context) → next wave → report
|
|
23
|
-
```
|
|
24
|
-
</purpose>
|
|
25
|
-
|
|
26
|
-
<invariants>
|
|
27
|
-
1. **ALL skills via spawn_agents_on_csv**: Every node execution goes through spawn. Coordinator NEVER directly executes any skill.
|
|
28
|
-
2. **Coordinator = prompt assembler only**: Load template → resolve refs → build CSV → spawn → read results → assemble next CSV.
|
|
29
|
-
3. **Barrier = solo wave**: Checkpoint nodes and artifact-producing skills execute alone (wave size = 1).
|
|
30
|
-
4. **Non-barriers can parallel**: Consecutive non-barrier nodes grouped into one wave.
|
|
31
|
-
5. **Wave-by-wave**: Never start wave N+1 before wave N results are read and analyzed.
|
|
32
|
-
6. **Coordinator owns context**: Sub-agents never read prior results — coordinator assembles full `skill_call` with resolved args.
|
|
33
|
-
7. **Resume from wave**: `-c` finds last completed wave, resumes from next pending step.
|
|
34
|
-
</invariants>
|
|
35
|
-
|
|
36
|
-
<context>
|
|
37
|
-
$ARGUMENTS — template slug/path, or flags.
|
|
38
|
-
|
|
39
|
-
**Flags:**
|
|
40
|
-
- `--context key=value` — Bind context variables (repeatable)
|
|
41
|
-
- `-c` / `--continue [session-id]` — Resume paused/interrupted session
|
|
42
|
-
- `--list` — List available templates
|
|
43
|
-
- `--dry-run` — Show wave plan without executing
|
|
44
|
-
|
|
45
|
-
**Entry routing:**
|
|
46
|
-
|
|
47
|
-
| Detection | Condition | Handler |
|
|
48
|
-
|-----------|-----------|---------|
|
|
49
|
-
| List | `--list` | handleList |
|
|
50
|
-
| Resume | `-c [session-id]` | Phase 0: Resume |
|
|
51
|
-
| Dry run | `--dry-run` | Phase 1 + 2, print plan, exit |
|
|
52
|
-
| Normal | Template slug/path | Phase 1 |
|
|
53
|
-
| No args | Empty | handleList + AskUserQuestion |
|
|
54
|
-
|
|
55
|
-
**Session tracking (aligned with maestro codex):**
|
|
56
|
-
|
|
57
|
-
| Constant | Value |
|
|
58
|
-
|----------|-------|
|
|
59
|
-
| Session prefix | `MCP` (Maestro Composer Player) |
|
|
60
|
-
| Session dir | `.workflow/.maestro/MCP-<YYYYMMDD>-<HHmmss>/` |
|
|
61
|
-
| State file | `state.json` |
|
|
62
|
-
| Wave CSV | `wave-{N}.csv` |
|
|
63
|
-
| Wave results | `wave-{N}-results.csv` |
|
|
64
|
-
| Template dir | `~/.maestro/templates/workflows/` |
|
|
65
|
-
| Template index | `~/.maestro/templates/workflows/index.json` |
|
|
66
|
-
|
|
67
|
-
**Barrier nodes** (solo wave, coordinator reads artifacts after):
|
|
68
|
-
|
|
69
|
-
| Node type | Artifacts to Read | Context Updates |
|
|
70
|
-
|-----------|------------------|-----------------|
|
|
71
|
-
| `checkpoint` | — (state save only) | `last_checkpoint` |
|
|
72
|
-
| `maestro-plan` | `plan.json`, `.task/TASK-*.json` | `plan_dir`, `task_count` |
|
|
73
|
-
| `maestro-execute` | `results.csv` | `exec_status`, `completed_tasks` |
|
|
74
|
-
| `maestro-analyze` | `context.md` | `analysis_dir`, `gaps`, `phase` |
|
|
75
|
-
| `maestro-brainstorm` | `.brainstorming/` | `brainstorm_dir` |
|
|
76
|
-
| `maestro-roadmap` | `specs/` | `spec_session_id` |
|
|
77
|
-
|
|
78
|
-
All other skill nodes are **non-barrier** (groupable into parallel waves).
|
|
79
|
-
|
|
80
|
-
**state.json schema:**
|
|
81
|
-
|
|
82
|
-
```json
|
|
83
|
-
{
|
|
84
|
-
"id": "MCP-<YYYYMMDD>-<HHmmss>",
|
|
85
|
-
"intent": "<template_name> with context",
|
|
86
|
-
"chain": "<template_id>",
|
|
87
|
-
"template_path": "~/.maestro/templates/workflows/<slug>.json",
|
|
88
|
-
"template_name": "<name>",
|
|
89
|
-
"auto_yes": false,
|
|
90
|
-
"status": "in_progress | paused | completed | aborted",
|
|
91
|
-
"started_at": "<ISO>",
|
|
92
|
-
"context": {
|
|
93
|
-
"goal": "...", "scope": "...",
|
|
94
|
-
"phase": null, "plan_dir": null, "analysis_dir": null,
|
|
95
|
-
"last_checkpoint": null
|
|
96
|
-
},
|
|
97
|
-
"waves": [],
|
|
98
|
-
"steps": [
|
|
99
|
-
{
|
|
100
|
-
"step_n": 1, "node_id": "N-001",
|
|
101
|
-
"skill": "<executor>", "args": "<args_template>",
|
|
102
|
-
"type": "skill | cli | checkpoint",
|
|
103
|
-
"is_barrier": true,
|
|
104
|
-
"status": "pending | completed | failed | skipped",
|
|
105
|
-
"wave_n": null, "findings": null, "artifacts": null
|
|
106
|
-
}
|
|
107
|
-
]
|
|
108
|
-
}
|
|
109
|
-
```
|
|
110
|
-
</context>
|
|
111
|
-
|
|
112
|
-
<execution>
|
|
113
|
-
|
|
114
|
-
### handleList
|
|
115
|
-
|
|
116
|
-
Scan `~/.maestro/templates/workflows/index.json`. Display:
|
|
117
|
-
```
|
|
118
|
-
Available workflow templates:
|
|
119
|
-
feature-tdd-review [feature, complex] 3 work nodes, 2 checkpoints
|
|
120
|
-
quick-bugfix [bugfix, simple] 2 work nodes, 1 checkpoint
|
|
121
|
-
|
|
122
|
-
Run: $maestro-player <slug> --context goal="..."
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
If not found: "No templates. Create with $maestro-composer"
|
|
126
|
-
|
|
127
|
-
---
|
|
128
|
-
|
|
129
|
-
### Phase 0: Resume
|
|
130
|
-
|
|
131
|
-
**Trigger**: `-c [session-id]`
|
|
132
|
-
|
|
133
|
-
Load session state by explicit ID or most recent `MCP-*/state.json` with `status = "in_progress" | "paused"`. Error E005 if none found. Resume from next pending step after last completed wave → jump to Phase 3.
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
### Phase 1: Load & Bind
|
|
138
|
-
|
|
139
|
-
1. **Resolve template**: absolute path → as-is, slug → lookup in `~/.maestro/templates/workflows/index.json`, partial → confirm, not found → show `--list`
|
|
140
|
-
2. **Parse** `--context key=value` pairs into `bound_context`
|
|
141
|
-
3. **Load and validate** template JSON
|
|
142
|
-
4. **Collect missing** required variables via AskUserQuestion
|
|
143
|
-
5. **Bind** `{variable_name}` in all `args_template` strings. Leave `{N-xxx.field}` and `{prev_*}` unresolved (runtime Phase 3)
|
|
144
|
-
6. If `--dry-run`: print wave plan and exit
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
### Phase 2: Init Session & Build Wave Plan
|
|
149
|
-
|
|
150
|
-
1. Generate session ID: `MCP-<YYYYMMDD>-<HHmmss>`
|
|
151
|
-
2. Topological sort (Kahn's algorithm) on template nodes + edges
|
|
152
|
-
3. Classify barrier vs non-barrier: barriers = checkpoint nodes + `maestro-analyze`, `maestro-plan`, `maestro-brainstorm`, `maestro-roadmap`, `maestro-execute`
|
|
153
|
-
4. Group into waves: barrier nodes → solo wave, non-barrier nodes → accumulate into parallel wave
|
|
154
|
-
5. Build steps array from waves, write `state.json`
|
|
155
|
-
|
|
156
|
-
**Step 2.6** — Display start banner:
|
|
157
|
-
```
|
|
158
|
-
============================================================
|
|
159
|
-
MAESTRO PLAYER
|
|
160
|
-
============================================================
|
|
161
|
-
Template: <template.name>
|
|
162
|
-
Session: <session_id>
|
|
163
|
-
Context: goal="<value>"
|
|
164
|
-
|
|
165
|
-
Wave Plan:
|
|
166
|
-
[W1] N-001 maestro-plan "{goal}" [BARRIER]
|
|
167
|
-
[W2] N-002 maestro-execute {phase} [BARRIER]
|
|
168
|
-
[W3] N-003 quality-test {phase}
|
|
169
|
-
N-004 quality-review {phase}
|
|
170
|
-
============================================================
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
**`--dry-run`**: Display above and exit.
|
|
174
|
-
|
|
175
|
-
---
|
|
176
|
-
|
|
177
|
-
### Phase 3: Wave Execution Loop
|
|
178
|
-
|
|
179
|
-
Loop while any step has `status === 'pending'`:
|
|
180
|
-
|
|
181
|
-
**3a. Resolve runtime references** in each step's args:
|
|
182
|
-
- `{key}` → lookup from `context[key]`
|
|
183
|
-
- `{N-xxx.field}` → lookup from completed step with matching `node_id`
|
|
184
|
-
- `{prev_field}` → lookup from most recently completed non-checkpoint step
|
|
185
|
-
|
|
186
|
-
**3b. Handle checkpoint nodes** (no CSV spawn needed):
|
|
187
|
-
- Save checkpoint snapshot to `checkpoints/{node_id}.json` (session state + context)
|
|
188
|
-
- Update `context.last_checkpoint`, mark completed
|
|
189
|
-
- If `auto_continue === false`: prompt user (Continue / Pause / Abort)
|
|
190
|
-
|
|
191
|
-
**3c. Build wave CSV** for skill nodes:
|
|
192
|
-
Write `wave-{N}.csv` with columns `id,skill_call,topic`. Each row: resolved `$${step.skill} ${args}`.
|
|
193
|
-
|
|
194
|
-
**3d. Spawn agents**:
|
|
195
|
-
|
|
196
|
-
```javascript
|
|
197
|
-
spawn_agents_on_csv({
|
|
198
|
-
csv_path: `${sessionDir}/wave-${waveNum}.csv`,
|
|
199
|
-
id_column: "id",
|
|
200
|
-
instruction: PLAYER_INSTRUCTION,
|
|
201
|
-
max_workers: waveSteps.length,
|
|
202
|
-
max_runtime_seconds: 3600,
|
|
203
|
-
output_csv_path: `${sessionDir}/wave-${waveNum}-results.csv`,
|
|
204
|
-
output_schema: RESULT_SCHEMA
|
|
205
|
-
})
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
**3e. Read results**: Map each result row back to its step — update status, findings, artifacts, wave_n.
|
|
209
|
-
|
|
210
|
-
**3f. Barrier analysis**: If barrier wave, read artifacts and update context (see barrier node table in `<context>`).
|
|
211
|
-
|
|
212
|
-
**3g. Persist + abort check**: Append wave record to `state.waves[]`, persist `state.json`. If any result failed → set `state.status = 'aborted'`, mark remaining steps as skipped.
|
|
213
|
-
|
|
214
|
-
### Sub-Agent Instruction Template
|
|
215
|
-
|
|
216
|
-
```
|
|
217
|
-
你是 CSV job 子 agent。
|
|
218
|
-
|
|
219
|
-
先原样执行这一段技能调用:
|
|
220
|
-
{skill_call}
|
|
221
|
-
|
|
222
|
-
然后基于结果完成这一行任务说明:
|
|
223
|
-
{topic}
|
|
224
|
-
|
|
225
|
-
限制:
|
|
226
|
-
- 不要修改 .workflow/.maestro/ 下的 state 文件
|
|
227
|
-
- skill 内部有自己的 session 管理,按 skill SKILL.md 执行即可
|
|
228
|
-
|
|
229
|
-
最后必须调用 `report_agent_job_result`,返回 JSON:
|
|
230
|
-
{"status":"completed|failed","skill_call":"{skill_call}","summary":"一句话结果","artifacts":"产物路径或空字符串","error":"失败原因或空字符串"}
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
### Result Schema
|
|
234
|
-
|
|
235
|
-
```javascript
|
|
236
|
-
const RESULT_SCHEMA = {
|
|
237
|
-
type: "object",
|
|
238
|
-
properties: {
|
|
239
|
-
status: { type: "string", enum: ["completed", "failed"] },
|
|
240
|
-
skill_call: { type: "string" },
|
|
241
|
-
summary: { type: "string" },
|
|
242
|
-
artifacts: { type: "string" },
|
|
243
|
-
error: { type: "string" }
|
|
244
|
-
},
|
|
245
|
-
required: ["status", "skill_call", "summary", "artifacts", "error"]
|
|
246
|
-
};
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
---
|
|
250
|
-
|
|
251
|
-
### Phase 4: Completion Report
|
|
252
|
-
|
|
253
|
-
```
|
|
254
|
-
============================================================
|
|
255
|
-
MAESTRO PLAYER SESSION COMPLETE
|
|
256
|
-
============================================================
|
|
257
|
-
Session: <session_id>
|
|
258
|
-
Template: <template_name> (<template_id>)
|
|
259
|
-
Waves: <N> executed
|
|
260
|
-
Steps: <completed>/<total>
|
|
261
|
-
Context: goal="<value>"
|
|
262
|
-
|
|
263
|
-
WAVE RESULTS:
|
|
264
|
-
[W1] $maestro-plan "{goal}" → ✓ plan created
|
|
265
|
-
[W2] $maestro-execute {phase} → ✓ 12/12 tasks
|
|
266
|
-
[W3] $quality-test {phase} → ✓ all tests pass
|
|
267
|
-
$quality-review {phase} → ✓ no issues
|
|
268
|
-
|
|
269
|
-
State: .workflow/.maestro/<session_id>/state.json
|
|
270
|
-
Resume: $maestro-player -c
|
|
271
|
-
============================================================
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
Update `state.status = "completed"`, write final `state.json`.
|
|
275
|
-
</execution>
|
|
276
|
-
|
|
277
|
-
<csv_schema>
|
|
278
|
-
### wave-{N}.csv (Per-Wave Input)
|
|
279
|
-
|
|
280
|
-
```csv
|
|
281
|
-
id,skill_call,topic
|
|
282
|
-
"1","$maestro-plan \"implement user auth\"","Template \"feature-plan-test\" step 1/5"
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
| Column | Description |
|
|
286
|
-
|--------|-------------|
|
|
287
|
-
| `id` | Step number (string) |
|
|
288
|
-
| `skill_call` | Full skill invocation with resolved context args |
|
|
289
|
-
| `topic` | Brief description for the agent |
|
|
290
|
-
|
|
291
|
-
### wave-{N}-results.csv (Per-Wave Output)
|
|
292
|
-
|
|
293
|
-
Written by `spawn_agents_on_csv`. Contains result per agent.
|
|
294
|
-
</csv_schema>
|
|
295
|
-
|
|
296
|
-
<error_codes>
|
|
297
|
-
| Code | Severity | Condition | Recovery |
|
|
298
|
-
|------|----------|-----------|----------|
|
|
299
|
-
| E001 | error | Template not found | Show --list, suggest closest match |
|
|
300
|
-
| E002 | error | Template JSON invalid | Point to file for fix |
|
|
301
|
-
| E003 | error | Required variable missing, user declined | Cannot proceed |
|
|
302
|
-
| E004 | error | DAG cycle in template | Suggest $maestro-composer --edit |
|
|
303
|
-
| E005 | error | Resume session not found | List sessions |
|
|
304
|
-
| E006 | error | Wave timeout | Mark failed, abort chain |
|
|
305
|
-
| E007 | error | Barrier artifact not found | Retry wave once, then abort |
|
|
306
|
-
| W001 | warning | Runtime reference resolved to empty | Log, continue |
|
|
307
|
-
| W002 | warning | Barrier artifact partial | Continue with available context |
|
|
308
|
-
</error_codes>
|
|
309
|
-
|
|
310
|
-
<success_criteria>
|
|
311
|
-
- [ ] Template loaded from `~/.maestro/templates/workflows/` and validated
|
|
312
|
-
- [ ] All required context variables bound
|
|
313
|
-
- [ ] Session dir at `.workflow/.maestro/MCP-*/` with `state.json`
|
|
314
|
-
- [ ] DAG nodes converted to waves (barrier=solo, non-barrier=parallel)
|
|
315
|
-
- [ ] Every skill invocation goes through `spawn_agents_on_csv` — none in coordinator
|
|
316
|
-
- [ ] Checkpoint nodes handled inline (state save, optional user pause)
|
|
317
|
-
- [ ] Barrier artifacts read and context updated before next wave
|
|
318
|
-
- [ ] Runtime references ({N-xxx.field}, {prev_*}) resolved before each wave CSV
|
|
319
|
-
- [ ] Failed step → remaining marked skipped → abort reported
|
|
320
|
-
- [ ] `--dry-run` shows wave plan with [BARRIER] markers, no execution
|
|
321
|
-
- [ ] `-c` resumes from last completed wave
|
|
322
|
-
- [ ] Completion report with per-wave status
|
|
323
|
-
</success_criteria>
|
|
1
|
+
---
|
|
2
|
+
name: maestro-player
|
|
3
|
+
description: Play workflow templates with checkpoint resume
|
|
4
|
+
argument-hint: "<template-slug|path> [--context key=value...] [-c [session-id]] [--list] [--dry-run]"
|
|
5
|
+
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<purpose>
|
|
9
|
+
Wave-based template executor using `spawn_agents_on_csv`. Loads a workflow template
|
|
10
|
+
(produced by maestro-composer), binds context variables, converts DAG nodes into
|
|
11
|
+
CSV waves via topological sort, executes wave-by-wave with barrier/non-barrier grouping.
|
|
12
|
+
|
|
13
|
+
Aligned with maestro codex coordinator pattern:
|
|
14
|
+
- ALL skill execution via `spawn_agents_on_csv` — coordinator never executes directly
|
|
15
|
+
- Barrier nodes (checkpoints + artifact-producing skills) execute solo
|
|
16
|
+
- Non-barrier nodes grouped into parallel waves
|
|
17
|
+
- Session state at `.workflow/.maestro/{session-id}/`
|
|
18
|
+
- Resume from last completed wave via `-c`
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
Load Template → Bind Variables → Build Wave CSV → spawn → read results →
|
|
22
|
+
(barrier: read artifacts, update context) → next wave → report
|
|
23
|
+
```
|
|
24
|
+
</purpose>
|
|
25
|
+
|
|
26
|
+
<invariants>
|
|
27
|
+
1. **ALL skills via spawn_agents_on_csv**: Every node execution goes through spawn. Coordinator NEVER directly executes any skill.
|
|
28
|
+
2. **Coordinator = prompt assembler only**: Load template → resolve refs → build CSV → spawn → read results → assemble next CSV.
|
|
29
|
+
3. **Barrier = solo wave**: Checkpoint nodes and artifact-producing skills execute alone (wave size = 1).
|
|
30
|
+
4. **Non-barriers can parallel**: Consecutive non-barrier nodes grouped into one wave.
|
|
31
|
+
5. **Wave-by-wave**: Never start wave N+1 before wave N results are read and analyzed.
|
|
32
|
+
6. **Coordinator owns context**: Sub-agents never read prior results — coordinator assembles full `skill_call` with resolved args.
|
|
33
|
+
7. **Resume from wave**: `-c` finds last completed wave, resumes from next pending step.
|
|
34
|
+
</invariants>
|
|
35
|
+
|
|
36
|
+
<context>
|
|
37
|
+
$ARGUMENTS — template slug/path, or flags.
|
|
38
|
+
|
|
39
|
+
**Flags:**
|
|
40
|
+
- `--context key=value` — Bind context variables (repeatable)
|
|
41
|
+
- `-c` / `--continue [session-id]` — Resume paused/interrupted session
|
|
42
|
+
- `--list` — List available templates
|
|
43
|
+
- `--dry-run` — Show wave plan without executing
|
|
44
|
+
|
|
45
|
+
**Entry routing:**
|
|
46
|
+
|
|
47
|
+
| Detection | Condition | Handler |
|
|
48
|
+
|-----------|-----------|---------|
|
|
49
|
+
| List | `--list` | handleList |
|
|
50
|
+
| Resume | `-c [session-id]` | Phase 0: Resume |
|
|
51
|
+
| Dry run | `--dry-run` | Phase 1 + 2, print plan, exit |
|
|
52
|
+
| Normal | Template slug/path | Phase 1 |
|
|
53
|
+
| No args | Empty | handleList + AskUserQuestion |
|
|
54
|
+
|
|
55
|
+
**Session tracking (aligned with maestro codex):**
|
|
56
|
+
|
|
57
|
+
| Constant | Value |
|
|
58
|
+
|----------|-------|
|
|
59
|
+
| Session prefix | `MCP` (Maestro Composer Player) |
|
|
60
|
+
| Session dir | `.workflow/.maestro/MCP-<YYYYMMDD>-<HHmmss>/` |
|
|
61
|
+
| State file | `state.json` |
|
|
62
|
+
| Wave CSV | `wave-{N}.csv` |
|
|
63
|
+
| Wave results | `wave-{N}-results.csv` |
|
|
64
|
+
| Template dir | `~/.maestro/templates/workflows/` |
|
|
65
|
+
| Template index | `~/.maestro/templates/workflows/index.json` |
|
|
66
|
+
|
|
67
|
+
**Barrier nodes** (solo wave, coordinator reads artifacts after):
|
|
68
|
+
|
|
69
|
+
| Node type | Artifacts to Read | Context Updates |
|
|
70
|
+
|-----------|------------------|-----------------|
|
|
71
|
+
| `checkpoint` | — (state save only) | `last_checkpoint` |
|
|
72
|
+
| `maestro-plan` | `plan.json`, `.task/TASK-*.json` | `plan_dir`, `task_count` |
|
|
73
|
+
| `maestro-execute` | `results.csv` | `exec_status`, `completed_tasks` |
|
|
74
|
+
| `maestro-analyze` | `context.md` | `analysis_dir`, `gaps`, `phase` |
|
|
75
|
+
| `maestro-brainstorm` | `.brainstorming/` | `brainstorm_dir` |
|
|
76
|
+
| `maestro-roadmap` | `specs/` | `spec_session_id` |
|
|
77
|
+
|
|
78
|
+
All other skill nodes are **non-barrier** (groupable into parallel waves).
|
|
79
|
+
|
|
80
|
+
**state.json schema:**
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"id": "MCP-<YYYYMMDD>-<HHmmss>",
|
|
85
|
+
"intent": "<template_name> with context",
|
|
86
|
+
"chain": "<template_id>",
|
|
87
|
+
"template_path": "~/.maestro/templates/workflows/<slug>.json",
|
|
88
|
+
"template_name": "<name>",
|
|
89
|
+
"auto_yes": false,
|
|
90
|
+
"status": "in_progress | paused | completed | aborted",
|
|
91
|
+
"started_at": "<ISO>",
|
|
92
|
+
"context": {
|
|
93
|
+
"goal": "...", "scope": "...",
|
|
94
|
+
"phase": null, "plan_dir": null, "analysis_dir": null,
|
|
95
|
+
"last_checkpoint": null
|
|
96
|
+
},
|
|
97
|
+
"waves": [],
|
|
98
|
+
"steps": [
|
|
99
|
+
{
|
|
100
|
+
"step_n": 1, "node_id": "N-001",
|
|
101
|
+
"skill": "<executor>", "args": "<args_template>",
|
|
102
|
+
"type": "skill | cli | checkpoint",
|
|
103
|
+
"is_barrier": true,
|
|
104
|
+
"status": "pending | completed | failed | skipped",
|
|
105
|
+
"wave_n": null, "findings": null, "artifacts": null
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
</context>
|
|
111
|
+
|
|
112
|
+
<execution>
|
|
113
|
+
|
|
114
|
+
### handleList
|
|
115
|
+
|
|
116
|
+
Scan `~/.maestro/templates/workflows/index.json`. Display:
|
|
117
|
+
```
|
|
118
|
+
Available workflow templates:
|
|
119
|
+
feature-tdd-review [feature, complex] 3 work nodes, 2 checkpoints
|
|
120
|
+
quick-bugfix [bugfix, simple] 2 work nodes, 1 checkpoint
|
|
121
|
+
|
|
122
|
+
Run: $maestro-player <slug> --context goal="..."
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
If not found: "No templates. Create with $maestro-composer"
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
### Phase 0: Resume
|
|
130
|
+
|
|
131
|
+
**Trigger**: `-c [session-id]`
|
|
132
|
+
|
|
133
|
+
Load session state by explicit ID or most recent `MCP-*/state.json` with `status = "in_progress" | "paused"`. Error E005 if none found. Resume from next pending step after last completed wave → jump to Phase 3.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
### Phase 1: Load & Bind
|
|
138
|
+
|
|
139
|
+
1. **Resolve template**: absolute path → as-is, slug → lookup in `~/.maestro/templates/workflows/index.json`, partial → confirm, not found → show `--list`
|
|
140
|
+
2. **Parse** `--context key=value` pairs into `bound_context`
|
|
141
|
+
3. **Load and validate** template JSON
|
|
142
|
+
4. **Collect missing** required variables via AskUserQuestion
|
|
143
|
+
5. **Bind** `{variable_name}` in all `args_template` strings. Leave `{N-xxx.field}` and `{prev_*}` unresolved (runtime Phase 3)
|
|
144
|
+
6. If `--dry-run`: print wave plan and exit
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
### Phase 2: Init Session & Build Wave Plan
|
|
149
|
+
|
|
150
|
+
1. Generate session ID: `MCP-<YYYYMMDD>-<HHmmss>`
|
|
151
|
+
2. Topological sort (Kahn's algorithm) on template nodes + edges
|
|
152
|
+
3. Classify barrier vs non-barrier: barriers = checkpoint nodes + `maestro-analyze`, `maestro-plan`, `maestro-brainstorm`, `maestro-roadmap`, `maestro-execute`
|
|
153
|
+
4. Group into waves: barrier nodes → solo wave, non-barrier nodes → accumulate into parallel wave
|
|
154
|
+
5. Build steps array from waves, write `state.json`
|
|
155
|
+
|
|
156
|
+
**Step 2.6** — Display start banner:
|
|
157
|
+
```
|
|
158
|
+
============================================================
|
|
159
|
+
MAESTRO PLAYER
|
|
160
|
+
============================================================
|
|
161
|
+
Template: <template.name>
|
|
162
|
+
Session: <session_id>
|
|
163
|
+
Context: goal="<value>"
|
|
164
|
+
|
|
165
|
+
Wave Plan:
|
|
166
|
+
[W1] N-001 maestro-plan "{goal}" [BARRIER]
|
|
167
|
+
[W2] N-002 maestro-execute {phase} [BARRIER]
|
|
168
|
+
[W3] N-003 quality-test {phase}
|
|
169
|
+
N-004 quality-review {phase}
|
|
170
|
+
============================================================
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**`--dry-run`**: Display above and exit.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
### Phase 3: Wave Execution Loop
|
|
178
|
+
|
|
179
|
+
Loop while any step has `status === 'pending'`:
|
|
180
|
+
|
|
181
|
+
**3a. Resolve runtime references** in each step's args:
|
|
182
|
+
- `{key}` → lookup from `context[key]`
|
|
183
|
+
- `{N-xxx.field}` → lookup from completed step with matching `node_id`
|
|
184
|
+
- `{prev_field}` → lookup from most recently completed non-checkpoint step
|
|
185
|
+
|
|
186
|
+
**3b. Handle checkpoint nodes** (no CSV spawn needed):
|
|
187
|
+
- Save checkpoint snapshot to `checkpoints/{node_id}.json` (session state + context)
|
|
188
|
+
- Update `context.last_checkpoint`, mark completed
|
|
189
|
+
- If `auto_continue === false`: prompt user (Continue / Pause / Abort)
|
|
190
|
+
|
|
191
|
+
**3c. Build wave CSV** for skill nodes:
|
|
192
|
+
Write `wave-{N}.csv` with columns `id,skill_call,topic`. Each row: resolved `$${step.skill} ${args}`.
|
|
193
|
+
|
|
194
|
+
**3d. Spawn agents**:
|
|
195
|
+
|
|
196
|
+
```javascript
|
|
197
|
+
spawn_agents_on_csv({
|
|
198
|
+
csv_path: `${sessionDir}/wave-${waveNum}.csv`,
|
|
199
|
+
id_column: "id",
|
|
200
|
+
instruction: PLAYER_INSTRUCTION,
|
|
201
|
+
max_workers: waveSteps.length,
|
|
202
|
+
max_runtime_seconds: 3600,
|
|
203
|
+
output_csv_path: `${sessionDir}/wave-${waveNum}-results.csv`,
|
|
204
|
+
output_schema: RESULT_SCHEMA
|
|
205
|
+
})
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**3e. Read results**: Map each result row back to its step — update status, findings, artifacts, wave_n.
|
|
209
|
+
|
|
210
|
+
**3f. Barrier analysis**: If barrier wave, read artifacts and update context (see barrier node table in `<context>`).
|
|
211
|
+
|
|
212
|
+
**3g. Persist + abort check**: Append wave record to `state.waves[]`, persist `state.json`. If any result failed → set `state.status = 'aborted'`, mark remaining steps as skipped.
|
|
213
|
+
|
|
214
|
+
### Sub-Agent Instruction Template
|
|
215
|
+
|
|
216
|
+
```
|
|
217
|
+
你是 CSV job 子 agent。
|
|
218
|
+
|
|
219
|
+
先原样执行这一段技能调用:
|
|
220
|
+
{skill_call}
|
|
221
|
+
|
|
222
|
+
然后基于结果完成这一行任务说明:
|
|
223
|
+
{topic}
|
|
224
|
+
|
|
225
|
+
限制:
|
|
226
|
+
- 不要修改 .workflow/.maestro/ 下的 state 文件
|
|
227
|
+
- skill 内部有自己的 session 管理,按 skill SKILL.md 执行即可
|
|
228
|
+
|
|
229
|
+
最后必须调用 `report_agent_job_result`,返回 JSON:
|
|
230
|
+
{"status":"completed|failed","skill_call":"{skill_call}","summary":"一句话结果","artifacts":"产物路径或空字符串","error":"失败原因或空字符串"}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Result Schema
|
|
234
|
+
|
|
235
|
+
```javascript
|
|
236
|
+
const RESULT_SCHEMA = {
|
|
237
|
+
type: "object",
|
|
238
|
+
properties: {
|
|
239
|
+
status: { type: "string", enum: ["completed", "failed"] },
|
|
240
|
+
skill_call: { type: "string" },
|
|
241
|
+
summary: { type: "string" },
|
|
242
|
+
artifacts: { type: "string" },
|
|
243
|
+
error: { type: "string" }
|
|
244
|
+
},
|
|
245
|
+
required: ["status", "skill_call", "summary", "artifacts", "error"]
|
|
246
|
+
};
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
### Phase 4: Completion Report
|
|
252
|
+
|
|
253
|
+
```
|
|
254
|
+
============================================================
|
|
255
|
+
MAESTRO PLAYER SESSION COMPLETE
|
|
256
|
+
============================================================
|
|
257
|
+
Session: <session_id>
|
|
258
|
+
Template: <template_name> (<template_id>)
|
|
259
|
+
Waves: <N> executed
|
|
260
|
+
Steps: <completed>/<total>
|
|
261
|
+
Context: goal="<value>"
|
|
262
|
+
|
|
263
|
+
WAVE RESULTS:
|
|
264
|
+
[W1] $maestro-plan "{goal}" → ✓ plan created
|
|
265
|
+
[W2] $maestro-execute {phase} → ✓ 12/12 tasks
|
|
266
|
+
[W3] $quality-test {phase} → ✓ all tests pass
|
|
267
|
+
$quality-review {phase} → ✓ no issues
|
|
268
|
+
|
|
269
|
+
State: .workflow/.maestro/<session_id>/state.json
|
|
270
|
+
Resume: $maestro-player -c
|
|
271
|
+
============================================================
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Update `state.status = "completed"`, write final `state.json`.
|
|
275
|
+
</execution>
|
|
276
|
+
|
|
277
|
+
<csv_schema>
|
|
278
|
+
### wave-{N}.csv (Per-Wave Input)
|
|
279
|
+
|
|
280
|
+
```csv
|
|
281
|
+
id,skill_call,topic
|
|
282
|
+
"1","$maestro-plan \"implement user auth\"","Template \"feature-plan-test\" step 1/5"
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
| Column | Description |
|
|
286
|
+
|--------|-------------|
|
|
287
|
+
| `id` | Step number (string) |
|
|
288
|
+
| `skill_call` | Full skill invocation with resolved context args |
|
|
289
|
+
| `topic` | Brief description for the agent |
|
|
290
|
+
|
|
291
|
+
### wave-{N}-results.csv (Per-Wave Output)
|
|
292
|
+
|
|
293
|
+
Written by `spawn_agents_on_csv`. Contains result per agent.
|
|
294
|
+
</csv_schema>
|
|
295
|
+
|
|
296
|
+
<error_codes>
|
|
297
|
+
| Code | Severity | Condition | Recovery |
|
|
298
|
+
|------|----------|-----------|----------|
|
|
299
|
+
| E001 | error | Template not found | Show --list, suggest closest match |
|
|
300
|
+
| E002 | error | Template JSON invalid | Point to file for fix |
|
|
301
|
+
| E003 | error | Required variable missing, user declined | Cannot proceed |
|
|
302
|
+
| E004 | error | DAG cycle in template | Suggest $maestro-composer --edit |
|
|
303
|
+
| E005 | error | Resume session not found | List sessions |
|
|
304
|
+
| E006 | error | Wave timeout | Mark failed, abort chain |
|
|
305
|
+
| E007 | error | Barrier artifact not found | Retry wave once, then abort |
|
|
306
|
+
| W001 | warning | Runtime reference resolved to empty | Log, continue |
|
|
307
|
+
| W002 | warning | Barrier artifact partial | Continue with available context |
|
|
308
|
+
</error_codes>
|
|
309
|
+
|
|
310
|
+
<success_criteria>
|
|
311
|
+
- [ ] Template loaded from `~/.maestro/templates/workflows/` and validated
|
|
312
|
+
- [ ] All required context variables bound
|
|
313
|
+
- [ ] Session dir at `.workflow/.maestro/MCP-*/` with `state.json`
|
|
314
|
+
- [ ] DAG nodes converted to waves (barrier=solo, non-barrier=parallel)
|
|
315
|
+
- [ ] Every skill invocation goes through `spawn_agents_on_csv` — none in coordinator
|
|
316
|
+
- [ ] Checkpoint nodes handled inline (state save, optional user pause)
|
|
317
|
+
- [ ] Barrier artifacts read and context updated before next wave
|
|
318
|
+
- [ ] Runtime references ({N-xxx.field}, {prev_*}) resolved before each wave CSV
|
|
319
|
+
- [ ] Failed step → remaining marked skipped → abort reported
|
|
320
|
+
- [ ] `--dry-run` shows wave plan with [BARRIER] markers, no execution
|
|
321
|
+
- [ ] `-c` resumes from last completed wave
|
|
322
|
+
- [ ] Completion report with per-wave status
|
|
323
|
+
</success_criteria>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-quick
|
|
3
|
-
description:
|
|
3
|
+
description: Quick task execution, skip optional agents
|
|
4
4
|
argument-hint: "\"task description\" [--discuss] [--full]"
|
|
5
5
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Agent, AskUserQuestion
|
|
6
6
|
---
|