maestro-flow-one 0.1.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/LICENSE +21 -0
- package/README.md +173 -0
- package/bin/maestro-flow.js +730 -0
- package/claude/maestro-flow/SKILL.md +239 -0
- package/claude/maestro-flow/chains/templates.json +256 -0
- package/claude/maestro-flow/commands/learn/decompose.md +176 -0
- package/claude/maestro-flow/commands/learn/follow.md +167 -0
- package/claude/maestro-flow/commands/learn/investigate.md +221 -0
- package/claude/maestro-flow/commands/learn/retro.md +303 -0
- package/claude/maestro-flow/commands/learn/second-opinion.md +167 -0
- package/claude/maestro-flow/commands/lifecycle/amend.md +300 -0
- package/claude/maestro-flow/commands/lifecycle/analyze.md +126 -0
- package/claude/maestro-flow/commands/lifecycle/brainstorm.md +100 -0
- package/claude/maestro-flow/commands/lifecycle/composer.md +354 -0
- package/claude/maestro-flow/commands/lifecycle/execute.md +114 -0
- package/claude/maestro-flow/commands/lifecycle/fork.md +86 -0
- package/claude/maestro-flow/commands/lifecycle/init.md +78 -0
- package/claude/maestro-flow/commands/lifecycle/learn.md +140 -0
- package/claude/maestro-flow/commands/lifecycle/link-coordinate.md +71 -0
- package/claude/maestro-flow/commands/lifecycle/merge.md +61 -0
- package/claude/maestro-flow/commands/lifecycle/overlay.md +178 -0
- package/claude/maestro-flow/commands/lifecycle/plan.md +138 -0
- package/claude/maestro-flow/commands/lifecycle/player.md +404 -0
- package/claude/maestro-flow/commands/lifecycle/quick.md +56 -0
- package/claude/maestro-flow/commands/lifecycle/roadmap.md +164 -0
- package/claude/maestro-flow/commands/lifecycle/ui-design.md +93 -0
- package/claude/maestro-flow/commands/lifecycle/update.md +176 -0
- package/claude/maestro-flow/commands/lifecycle/verify.md +90 -0
- package/claude/maestro-flow/commands/manage/codebase-rebuild.md +75 -0
- package/claude/maestro-flow/commands/manage/codebase-refresh.md +57 -0
- package/claude/maestro-flow/commands/manage/harvest.md +94 -0
- package/claude/maestro-flow/commands/manage/issue-discover.md +77 -0
- package/claude/maestro-flow/commands/manage/issue.md +73 -0
- package/claude/maestro-flow/commands/manage/knowhow-capture.md +193 -0
- package/claude/maestro-flow/commands/manage/knowhow.md +77 -0
- package/claude/maestro-flow/commands/manage/learn.md +67 -0
- package/claude/maestro-flow/commands/manage/status.md +51 -0
- package/claude/maestro-flow/commands/manage/wiki.md +62 -0
- package/claude/maestro-flow/commands/milestone/audit.md +68 -0
- package/claude/maestro-flow/commands/milestone/complete.md +75 -0
- package/claude/maestro-flow/commands/milestone/release.md +96 -0
- package/claude/maestro-flow/commands/quality/auto-test.md +124 -0
- package/claude/maestro-flow/commands/quality/debug.md +115 -0
- package/claude/maestro-flow/commands/quality/refactor.md +55 -0
- package/claude/maestro-flow/commands/quality/retrospective.md +78 -0
- package/claude/maestro-flow/commands/quality/review.md +108 -0
- package/claude/maestro-flow/commands/quality/sync.md +51 -0
- package/claude/maestro-flow/commands/quality/test.md +103 -0
- package/claude/maestro-flow/commands/spec/add.md +49 -0
- package/claude/maestro-flow/commands/spec/load.md +51 -0
- package/claude/maestro-flow/commands/spec/remove.md +51 -0
- package/claude/maestro-flow/commands/spec/setup.md +51 -0
- package/claude/maestro-flow/commands/wiki/connect.md +62 -0
- package/claude/maestro-flow/commands/wiki/digest.md +69 -0
- package/codex/maestro-flow/SKILL.md +505 -0
- package/codex/maestro-flow/chains/templates.json +256 -0
- package/codex/maestro-flow/commands/learn/decompose.md +113 -0
- package/codex/maestro-flow/commands/learn/follow.md +83 -0
- package/codex/maestro-flow/commands/learn/investigate.md +83 -0
- package/codex/maestro-flow/commands/learn/retro.md +83 -0
- package/codex/maestro-flow/commands/learn/second-opinion.md +86 -0
- package/codex/maestro-flow/commands/lifecycle/amend.md +300 -0
- package/codex/maestro-flow/commands/lifecycle/analyze.md +483 -0
- package/codex/maestro-flow/commands/lifecycle/brainstorm.md +397 -0
- package/codex/maestro-flow/commands/lifecycle/composer.md +213 -0
- package/codex/maestro-flow/commands/lifecycle/execute.md +318 -0
- package/codex/maestro-flow/commands/lifecycle/fork.md +98 -0
- package/codex/maestro-flow/commands/lifecycle/init.md +134 -0
- package/codex/maestro-flow/commands/lifecycle/learn.md +80 -0
- package/codex/maestro-flow/commands/lifecycle/link-coordinate.md +257 -0
- package/codex/maestro-flow/commands/lifecycle/merge.md +69 -0
- package/codex/maestro-flow/commands/lifecycle/overlay.md +119 -0
- package/codex/maestro-flow/commands/lifecycle/plan.md +460 -0
- package/codex/maestro-flow/commands/lifecycle/player.md +323 -0
- package/codex/maestro-flow/commands/lifecycle/quick.md +124 -0
- package/codex/maestro-flow/commands/lifecycle/roadmap.md +468 -0
- package/codex/maestro-flow/commands/lifecycle/ui-design.md +135 -0
- package/codex/maestro-flow/commands/lifecycle/update.md +176 -0
- package/codex/maestro-flow/commands/lifecycle/verify.md +468 -0
- package/codex/maestro-flow/commands/manage/codebase-rebuild.md +347 -0
- package/codex/maestro-flow/commands/manage/codebase-refresh.md +66 -0
- package/codex/maestro-flow/commands/manage/harvest.md +91 -0
- package/codex/maestro-flow/commands/manage/issue-discover.md +431 -0
- package/codex/maestro-flow/commands/manage/issue.md +75 -0
- package/codex/maestro-flow/commands/manage/knowhow-capture.md +110 -0
- package/codex/maestro-flow/commands/manage/knowhow.md +95 -0
- package/codex/maestro-flow/commands/manage/learn.md +137 -0
- package/codex/maestro-flow/commands/manage/status.md +76 -0
- package/codex/maestro-flow/commands/manage/wiki.md +55 -0
- package/codex/maestro-flow/commands/milestone/audit.md +87 -0
- package/codex/maestro-flow/commands/milestone/complete.md +91 -0
- package/codex/maestro-flow/commands/milestone/release.md +70 -0
- package/codex/maestro-flow/commands/quality/auto-test.md +547 -0
- package/codex/maestro-flow/commands/quality/debug.md +334 -0
- package/codex/maestro-flow/commands/quality/refactor.md +151 -0
- package/codex/maestro-flow/commands/quality/retrospective.md +292 -0
- package/codex/maestro-flow/commands/quality/review.md +364 -0
- package/codex/maestro-flow/commands/quality/sync.md +111 -0
- package/codex/maestro-flow/commands/quality/test.md +498 -0
- package/codex/maestro-flow/commands/spec/add.md +101 -0
- package/codex/maestro-flow/commands/spec/load.md +77 -0
- package/codex/maestro-flow/commands/spec/remove.md +69 -0
- package/codex/maestro-flow/commands/spec/setup.md +75 -0
- package/codex/maestro-flow/commands/wiki/connect.md +73 -0
- package/codex/maestro-flow/commands/wiki/digest.md +87 -0
- package/package.json +24 -0
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-flow
|
|
3
|
+
description: Unified workflow command collection — intent routing, minimal closed-loop chain selection, wave-based CSV execution. All 49 maestro commands in one skill.
|
|
4
|
+
argument-hint: "\"intent\" [-y] [--chain <name>] [--cmd <name> <args>] | list | status | continue | execute"
|
|
5
|
+
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<purpose>
|
|
9
|
+
Single-entry skill packaging all 49 Maestro workflow commands.
|
|
10
|
+
|
|
11
|
+
Two execution modes:
|
|
12
|
+
1. **Router** (default): Analyze intent -> match chain template -> create session -> wave execution
|
|
13
|
+
2. **Direct** (`--cmd <name> <args>`): Load and execute a specific command inline
|
|
14
|
+
|
|
15
|
+
Execution uses `spawn_agents_on_csv` for wave-based parallel/sequential step dispatch.
|
|
16
|
+
Commands loaded via `maestro-flow resolve` CLI for path resolution.
|
|
17
|
+
|
|
18
|
+
Session path: `.workflow/.maestro/flow-{YYYYMMDD-HHmmss}/status.json`
|
|
19
|
+
</purpose>
|
|
20
|
+
|
|
21
|
+
<context>
|
|
22
|
+
$ARGUMENTS -- intent text, flags, or special keywords.
|
|
23
|
+
|
|
24
|
+
**State files:**
|
|
25
|
+
- `.workflow/state.json` -- project artifact registry (optional)
|
|
26
|
+
- `.workflow/.maestro/flow-*/status.json` -- flow session state
|
|
27
|
+
</context>
|
|
28
|
+
|
|
29
|
+
<invariants>
|
|
30
|
+
1. **ALL steps via spawn_agents_on_csv** -- coordinator NEVER executes skill logic directly
|
|
31
|
+
2. **Coordinator = prompt assembler** -- classify -> enrich args -> build CSV -> spawn -> read results -> next wave
|
|
32
|
+
3. **Decision nodes handled by coordinator** -- delegate-evaluate for quality gates, direct for structural
|
|
33
|
+
4. **Barrier = solo wave** -- analyze, plan, execute, brainstorm, roadmap always run alone
|
|
34
|
+
5. **Non-barriers can parallel** -- consecutive non-barrier, non-decision steps grouped into one wave
|
|
35
|
+
6. **Wave-by-wave** -- never start wave N+1 before wave N results are read
|
|
36
|
+
7. **Decision nodes NEVER appear in CSV** -- processed by coordinator between waves
|
|
37
|
+
</invariants>
|
|
38
|
+
|
|
39
|
+
<execution>
|
|
40
|
+
|
|
41
|
+
## Step 1: Parse & Route
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
Parse $ARGUMENTS:
|
|
45
|
+
|
|
46
|
+
--cmd <name> <remaining-args>
|
|
47
|
+
-> Step 1a: Direct Command Execution
|
|
48
|
+
-> End.
|
|
49
|
+
|
|
50
|
+
list
|
|
51
|
+
-> Bash: maestro-flow list
|
|
52
|
+
-> End.
|
|
53
|
+
|
|
54
|
+
status [session-id]
|
|
55
|
+
-> Bash: maestro-flow status [session-id]
|
|
56
|
+
-> End.
|
|
57
|
+
|
|
58
|
+
chains
|
|
59
|
+
-> Bash: maestro-flow chains
|
|
60
|
+
-> End.
|
|
61
|
+
|
|
62
|
+
execute | continue
|
|
63
|
+
-> Find latest running flow session
|
|
64
|
+
-> If not found: "No running flow session." End.
|
|
65
|
+
-> Phase 2 (Wave Execution Loop)
|
|
66
|
+
|
|
67
|
+
--chain <name> [-y] <remaining>
|
|
68
|
+
-> Force chain selection (skip intent analysis), go to Step 4
|
|
69
|
+
|
|
70
|
+
-y / --yes
|
|
71
|
+
-> auto_confirm = true
|
|
72
|
+
|
|
73
|
+
Other text
|
|
74
|
+
-> intent = remaining text -> Step 2
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Step 1a: Direct Command Execution (--cmd)
|
|
78
|
+
|
|
79
|
+
Entry point for delegate sessions and single-command execution.
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
1. Bash: maestro-flow resolve <name>
|
|
83
|
+
-> Returns absolute path to command .md file
|
|
84
|
+
|
|
85
|
+
2. If NOT_FOUND -> Error. End.
|
|
86
|
+
|
|
87
|
+
3. Read() the command .md file
|
|
88
|
+
|
|
89
|
+
4. Set $ARGUMENTS = <remaining-args>
|
|
90
|
+
|
|
91
|
+
5. Follow the command's <execution> section completely
|
|
92
|
+
|
|
93
|
+
End.
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Step 2: Read Project State (optional)
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
If .workflow/state.json exists:
|
|
102
|
+
Read -> extract: current_milestone, milestones, artifacts
|
|
103
|
+
If not: state_summary = "Project not initialized"
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Step 3: Intent Analysis & Chain Matching
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
Bash: maestro-flow suggest "{intent}"
|
|
110
|
+
-> Parse output for suggested chains
|
|
111
|
+
|
|
112
|
+
Display top 3 chain options to user
|
|
113
|
+
AskUserQuestion: select chain / single command / Cancel
|
|
114
|
+
|
|
115
|
+
If auto_confirm: pick highest scoring chain
|
|
116
|
+
If single command: --cmd -> Step 1a
|
|
117
|
+
If chain selected: -> Step 4
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Step 4: Build Session
|
|
123
|
+
|
|
124
|
+
### 4.1: Load template & build steps
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
Bash: maestro-flow chain {template_name}
|
|
128
|
+
-> Parse step list
|
|
129
|
+
|
|
130
|
+
Build session steps[] from template.
|
|
131
|
+
Decision steps get extra fields: decision, retry_count, max_retries
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 4.2: Create session
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
session_id = "flow-{YYYYMMDD-HHmmss}"
|
|
138
|
+
session_dir = .workflow/.maestro/{session_id}/
|
|
139
|
+
|
|
140
|
+
Write {session_dir}/status.json:
|
|
141
|
+
{
|
|
142
|
+
"session_id": "{session_id}",
|
|
143
|
+
"source": "flow",
|
|
144
|
+
"created_at": "{ISO}", "updated_at": "{ISO}",
|
|
145
|
+
"intent": "{intent}",
|
|
146
|
+
"status": "running",
|
|
147
|
+
"chain_name": "{template_name}",
|
|
148
|
+
"task_type": "{category}",
|
|
149
|
+
"phase": {phase},
|
|
150
|
+
"milestone": "{current_milestone}",
|
|
151
|
+
"auto_mode": {auto_confirm},
|
|
152
|
+
"quality_mode": "standard",
|
|
153
|
+
"passed_gates": [],
|
|
154
|
+
"context": {
|
|
155
|
+
"scratch_dir": null, "plan_dir": null, "analysis_dir": null
|
|
156
|
+
},
|
|
157
|
+
"steps": [...],
|
|
158
|
+
"waves": [],
|
|
159
|
+
"current_step": 0
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### 4.3: Display + confirm
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
============================================================
|
|
167
|
+
MAESTRO FLOW SESSION
|
|
168
|
+
============================================================
|
|
169
|
+
Session: {session_id}
|
|
170
|
+
Chain: {chain_name} ({total} steps)
|
|
171
|
+
Phase: {phase}
|
|
172
|
+
|
|
173
|
+
[ ] 0. maestro-plan {phase} [barrier]
|
|
174
|
+
[ ] 1. maestro-execute {phase} [barrier]
|
|
175
|
+
[ ] 2. maestro-verify {phase}
|
|
176
|
+
[ ] 3. * post-verify [decision]
|
|
177
|
+
...
|
|
178
|
+
============================================================
|
|
179
|
+
|
|
180
|
+
If auto_confirm: proceed directly
|
|
181
|
+
Else: AskUserQuestion -> Execute / Cancel
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Fall through to Phase 2.
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Phase 2: Wave Execution Loop
|
|
189
|
+
|
|
190
|
+
### 2.1: Load session + find next step
|
|
191
|
+
|
|
192
|
+
Read status.json. Find first pending step.
|
|
193
|
+
|
|
194
|
+
- If decision node -> Step 2.2 (Decision Evaluation)
|
|
195
|
+
- If non-decision -> Step 2.3 (Wave Execution)
|
|
196
|
+
- If no pending -> Phase 3 (Completion)
|
|
197
|
+
|
|
198
|
+
### 2.2: Decision Evaluation
|
|
199
|
+
|
|
200
|
+
**Route by decision type:**
|
|
201
|
+
- Quality-gate decisions (post-verify, post-business-test, post-review, post-test) -> delegate analysis
|
|
202
|
+
- Structural decisions (post-milestone) -> direct evaluation
|
|
203
|
+
|
|
204
|
+
#### 2.2a: Delegate quality-gate assessment
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
Read decision metadata: { decision, retry_count, max_retries }
|
|
208
|
+
|
|
209
|
+
Result file mapping:
|
|
210
|
+
post-verify -> {artifact_dir}/verification.json
|
|
211
|
+
post-business-test -> {artifact_dir}/business-test-results.json
|
|
212
|
+
post-review -> {artifact_dir}/review.json
|
|
213
|
+
post-test -> {artifact_dir}/uat.md, {artifact_dir}/.tests/test-results.json
|
|
214
|
+
|
|
215
|
+
Bash({
|
|
216
|
+
command: `maestro delegate "PURPOSE: evaluate ${decision} quality gate
|
|
217
|
+
TASK: read result files | analyze pass/fail | assess severity | recommend next step
|
|
218
|
+
MODE: analysis
|
|
219
|
+
CONTEXT: @${result_files}
|
|
220
|
+
EXPECTED:
|
|
221
|
+
---VERDICT---
|
|
222
|
+
STATUS: proceed | fix | escalate
|
|
223
|
+
REASON: one-line
|
|
224
|
+
GAP_SUMMARY: problem details (fix/escalate only)
|
|
225
|
+
CONFIDENCE: high | medium | low
|
|
226
|
+
---END---
|
|
227
|
+
CONSTRAINTS: evaluate only | retry ${retry_count}/${max_retries}" --role analyze --mode analysis`,
|
|
228
|
+
run_in_background: true
|
|
229
|
+
})
|
|
230
|
+
STOP -- wait for callback.
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
#### 2.2b: Parse verdict & apply
|
|
234
|
+
|
|
235
|
+
```
|
|
236
|
+
On callback: maestro delegate output <exec_id>
|
|
237
|
+
Extract STATUS / REASON / GAP_SUMMARY / CONFIDENCE
|
|
238
|
+
If parse fails -> fallback: STATUS = "fix"
|
|
239
|
+
|
|
240
|
+
Verdict actions:
|
|
241
|
+
proceed -> add gate to passed_gates[], mark decision completed, continue
|
|
242
|
+
fix -> clear passed_gates[], insert fix-loop steps, continue
|
|
243
|
+
escalate -> session status = "paused". End.
|
|
244
|
+
|
|
245
|
+
Interactive (non-auto): AskUserQuestion before applying
|
|
246
|
+
Auto (-y): follow verdict directly
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
#### 2.2c: Fix-loop templates
|
|
250
|
+
|
|
251
|
+
When verdict == "fix", insert fix-loop after current position:
|
|
252
|
+
|
|
253
|
+
**post-verify:** quality-debug -> maestro-plan --gaps -> maestro-execute -> maestro-verify -> decision:post-verify {retry+1}
|
|
254
|
+
**post-review:** quality-debug -> maestro-plan --gaps -> maestro-execute -> quality-review -> decision:post-review {retry+1}
|
|
255
|
+
**post-test:** quality-debug -> maestro-plan --gaps -> maestro-execute -> maestro-verify -> decision:post-verify -> quality-test -> decision:post-test {retry+1}
|
|
256
|
+
**post-business-test:** quality-debug -> maestro-plan --gaps -> maestro-execute -> maestro-verify -> decision:post-verify -> quality-auto-test -> decision:post-business-test {retry+1}
|
|
257
|
+
|
|
258
|
+
Insert, reindex, write status.json, continue to 2.3.
|
|
259
|
+
|
|
260
|
+
#### 2.2d: Structural decisions
|
|
261
|
+
|
|
262
|
+
**post-milestone:**
|
|
263
|
+
```
|
|
264
|
+
Read .workflow/state.json -> check next milestone
|
|
265
|
+
If found: update session, insert lifecycle steps for next milestone
|
|
266
|
+
If none: proceed, session completes naturally
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
#### 2.2e: Finalize decision
|
|
270
|
+
|
|
271
|
+
```
|
|
272
|
+
Mark decision step "completed"
|
|
273
|
+
Write status.json
|
|
274
|
+
|
|
275
|
+
STOP behavior:
|
|
276
|
+
auto_mode == true -> no STOP, continue to 2.3
|
|
277
|
+
auto_mode == false -> STOP. Display: "Use $maestro-flow execute to continue"
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### 2.3: Build and Execute Wave
|
|
281
|
+
|
|
282
|
+
**Loop while pending non-decision steps exist:**
|
|
283
|
+
|
|
284
|
+
#### 1. buildNextWave
|
|
285
|
+
|
|
286
|
+
```
|
|
287
|
+
Scan pending steps from current position:
|
|
288
|
+
- Barrier step (analyze, plan, execute, brainstorm, roadmap)
|
|
289
|
+
-> solo wave (single row CSV)
|
|
290
|
+
- Non-barrier step
|
|
291
|
+
-> collect consecutive non-barrier, non-decision steps (multi-row CSV)
|
|
292
|
+
- Stop at first decision node
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
**Barrier list:**
|
|
296
|
+
|
|
297
|
+
| Command | Barrier |
|
|
298
|
+
|---------|---------|
|
|
299
|
+
| maestro-analyze | yes |
|
|
300
|
+
| maestro-plan | yes |
|
|
301
|
+
| maestro-execute | yes |
|
|
302
|
+
| maestro-brainstorm | yes |
|
|
303
|
+
| maestro-roadmap | yes |
|
|
304
|
+
| All others | no |
|
|
305
|
+
|
|
306
|
+
#### 2. buildSkillCall(step, session)
|
|
307
|
+
|
|
308
|
+
Assemble fully-resolved command for CSV:
|
|
309
|
+
|
|
310
|
+
**Placeholder resolution:**
|
|
311
|
+
```
|
|
312
|
+
{phase} -> session.phase
|
|
313
|
+
{intent} -> session.intent
|
|
314
|
+
{scratch_dir} -> session.context.scratch_dir or latest artifact path
|
|
315
|
+
{plan_dir} -> session.context.plan_dir
|
|
316
|
+
{analysis_dir} -> session.context.analysis_dir
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**Per-skill enrichment:**
|
|
320
|
+
|
|
321
|
+
| Skill | Enrichment |
|
|
322
|
+
|-------|-----------|
|
|
323
|
+
| maestro-brainstorm | args empty -> `"{intent}"` |
|
|
324
|
+
| maestro-roadmap | args empty -> `"{intent}"` |
|
|
325
|
+
| maestro-analyze | args empty -> `{phase}` |
|
|
326
|
+
| maestro-plan | resolve latest analyze artifact -> `--dir .workflow/scratch/{path}` |
|
|
327
|
+
| maestro-execute | resolve latest plan artifact -> `--dir .workflow/scratch/{path}` |
|
|
328
|
+
| quality-debug | append gap_summary context |
|
|
329
|
+
| quality-* / maestro-verify / milestone-* | args empty -> `{phase}` or empty |
|
|
330
|
+
|
|
331
|
+
**Auto flag propagation (if auto_mode == true):**
|
|
332
|
+
|
|
333
|
+
| Skill | Flag |
|
|
334
|
+
|-------|------|
|
|
335
|
+
| maestro-init | -y |
|
|
336
|
+
| maestro-analyze | -y |
|
|
337
|
+
| maestro-brainstorm | -y |
|
|
338
|
+
| maestro-roadmap | -y |
|
|
339
|
+
| maestro-plan | -y |
|
|
340
|
+
| maestro-execute | -y |
|
|
341
|
+
| quality-auto-test | -y |
|
|
342
|
+
| quality-test | -y --auto-fix |
|
|
343
|
+
| maestro-milestone-complete | -y |
|
|
344
|
+
|
|
345
|
+
Result: `$maestro-flow --cmd <skill-name> <enriched-args> [auto-flag]`
|
|
346
|
+
|
|
347
|
+
#### 3. Write wave CSV
|
|
348
|
+
|
|
349
|
+
```
|
|
350
|
+
Write {sessionDir}/wave-{N}.csv:
|
|
351
|
+
|
|
352
|
+
id,skill_call,topic
|
|
353
|
+
"0","$maestro-flow --cmd maestro-plan 1 -y","Flow step 0/8: plan phase 1"
|
|
354
|
+
"1","$maestro-flow --cmd maestro-execute 1 -y","Flow step 1/8: execute phase 1"
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
Rules:
|
|
358
|
+
- `skill_call`: `$maestro-flow --cmd <skill> <args>` (routes through this skill's --cmd)
|
|
359
|
+
- `topic`: human-readable step description
|
|
360
|
+
- Non-barrier + non-decision -> multi-row (parallel)
|
|
361
|
+
- Barrier -> single-row (solo)
|
|
362
|
+
- Decision nodes NEVER appear in CSV
|
|
363
|
+
|
|
364
|
+
#### 4. Spawn
|
|
365
|
+
|
|
366
|
+
```
|
|
367
|
+
spawn_agents_on_csv({
|
|
368
|
+
csv_path: "{sessionDir}/wave-{N}.csv",
|
|
369
|
+
id_column: "id",
|
|
370
|
+
instruction: WAVE_INSTRUCTION,
|
|
371
|
+
max_workers: <wave_size>,
|
|
372
|
+
max_runtime_seconds: 3600,
|
|
373
|
+
output_csv_path: "{sessionDir}/wave-{N}-results.csv",
|
|
374
|
+
output_schema: RESULT_SCHEMA
|
|
375
|
+
})
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
**Sub-Agent Instruction:**
|
|
379
|
+
```
|
|
380
|
+
You are a CSV job sub-agent in a maestro-flow pipeline.
|
|
381
|
+
|
|
382
|
+
Execute the skill call: {skill_call}
|
|
383
|
+
Task: {topic}
|
|
384
|
+
|
|
385
|
+
Rules:
|
|
386
|
+
- Do NOT modify .workflow/.maestro/ status files
|
|
387
|
+
- The skill has its own session management
|
|
388
|
+
- Execute the command completely
|
|
389
|
+
|
|
390
|
+
Report result:
|
|
391
|
+
{"status":"completed|failed","skill_call":"{skill_call}","summary":"one-line result","artifacts":"artifact paths","error":"failure reason"}
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
**Result Schema:** `{ status, skill_call, summary, artifacts, error }` -- all string
|
|
395
|
+
|
|
396
|
+
#### 5. Read results & update
|
|
397
|
+
|
|
398
|
+
```
|
|
399
|
+
Read wave-{N}-results.csv
|
|
400
|
+
For each result row:
|
|
401
|
+
Match to step by id
|
|
402
|
+
If status == "completed":
|
|
403
|
+
step.status = "completed"
|
|
404
|
+
step.completed_at = now
|
|
405
|
+
If status == "failed":
|
|
406
|
+
step.status = "failed"
|
|
407
|
+
step.error = result.error
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
#### 6. Barrier context update
|
|
411
|
+
|
|
412
|
+
After barrier wave completes, read outputs and update session context:
|
|
413
|
+
|
|
414
|
+
| Barrier | Read | Update |
|
|
415
|
+
|---------|------|--------|
|
|
416
|
+
| maestro-analyze | context.md, state.json | context.analysis_dir |
|
|
417
|
+
| maestro-plan | plan.json | context.plan_dir |
|
|
418
|
+
| maestro-execute | results | context.scratch_dir |
|
|
419
|
+
| maestro-brainstorm | .brainstorming/ | context.brainstorm_dir |
|
|
420
|
+
| maestro-roadmap | specs/ | context.spec_session_id |
|
|
421
|
+
|
|
422
|
+
#### 7. Persist & continue
|
|
423
|
+
|
|
424
|
+
```
|
|
425
|
+
Write status.json
|
|
426
|
+
Record wave in session.waves[]
|
|
427
|
+
|
|
428
|
+
Failure check:
|
|
429
|
+
-y: retry once, then skip and continue
|
|
430
|
+
non-y: mark remaining skipped, pause, STOP
|
|
431
|
+
|
|
432
|
+
Next step check:
|
|
433
|
+
Decision node -> loop to 2.2
|
|
434
|
+
More external steps -> loop to 2.3 step 1
|
|
435
|
+
No pending -> Phase 3
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
---
|
|
439
|
+
|
|
440
|
+
## Phase 3: Completion
|
|
441
|
+
|
|
442
|
+
```
|
|
443
|
+
session.status = "completed"
|
|
444
|
+
Write status.json
|
|
445
|
+
|
|
446
|
+
Display:
|
|
447
|
+
============================================================
|
|
448
|
+
FLOW COMPLETE
|
|
449
|
+
============================================================
|
|
450
|
+
Session: {session_id}
|
|
451
|
+
Chain: {chain_name}
|
|
452
|
+
Phase: {phase}
|
|
453
|
+
Waves: {wave_count} executed
|
|
454
|
+
Steps: {completed}/{total} ({skipped} skipped)
|
|
455
|
+
|
|
456
|
+
[+] 0. maestro-plan 1 [W1]
|
|
457
|
+
[+] 1. maestro-execute 1 [W2]
|
|
458
|
+
[+] 2. maestro-verify 1 [W3]
|
|
459
|
+
[+] 3. * post-verify -> proceed [decision]
|
|
460
|
+
[~] 4. quality-auto-test 1 [skipped]
|
|
461
|
+
[+] 5. quality-review 1 [W4]
|
|
462
|
+
...
|
|
463
|
+
============================================================
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
</execution>
|
|
467
|
+
|
|
468
|
+
<csv_schema>
|
|
469
|
+
### wave-{N}.csv
|
|
470
|
+
|
|
471
|
+
```csv
|
|
472
|
+
id,skill_call,topic
|
|
473
|
+
"0","$maestro-flow --cmd maestro-verify 1","Flow step 2/8: verify phase 1"
|
|
474
|
+
"1","$maestro-flow --cmd quality-review 1","Flow step 3/8: review phase 1"
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
### Result Schema
|
|
478
|
+
|
|
479
|
+
`{ status, skill_call, summary, artifacts, error }` -- all string
|
|
480
|
+
</csv_schema>
|
|
481
|
+
|
|
482
|
+
<error_codes>
|
|
483
|
+
| Code | Severity | Description | Recovery |
|
|
484
|
+
|------|----------|-------------|----------|
|
|
485
|
+
| E001 | error | No intent and no running session | Prompt for intent |
|
|
486
|
+
| E002 | error | Command not found for --cmd | maestro-flow list |
|
|
487
|
+
| E003 | error | No matching chain template | maestro-flow chains |
|
|
488
|
+
| E004 | error | Delegate verdict parse failed | Fallback: treat as "fix" |
|
|
489
|
+
| E005 | error | Wave timeout | Mark step failed, pause |
|
|
490
|
+
| W001 | warning | Multiple chains match equally | Show top 3 |
|
|
491
|
+
</error_codes>
|
|
492
|
+
|
|
493
|
+
<success_criteria>
|
|
494
|
+
- [ ] --cmd resolves via maestro-flow CLI, executes command inline
|
|
495
|
+
- [ ] list/status/chains/suggest route to maestro-flow CLI
|
|
496
|
+
- [ ] Intent analysis -> chain matching -> session creation
|
|
497
|
+
- [ ] Wave execution via spawn_agents_on_csv with CSV skill_call format
|
|
498
|
+
- [ ] Barrier steps solo wave, non-barriers parallel
|
|
499
|
+
- [ ] Decision nodes evaluated between waves (never in CSV)
|
|
500
|
+
- [ ] Quality-gate decisions delegate-evaluated, structural evaluated directly
|
|
501
|
+
- [ ] Fix-loop insertion + reindex on "fix" verdict
|
|
502
|
+
- [ ] passed_gates tracking, retry_count enforcement
|
|
503
|
+
- [ ] Context propagation after barrier waves
|
|
504
|
+
- [ ] Auto mode: skip confirmation, auto-follow verdicts, retry+skip on failure
|
|
505
|
+
</success_criteria>
|