maestro-flow 0.3.38 → 0.3.40
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 +130 -126
- package/.claude/commands/maestro-brainstorm.md +104 -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 +154 -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 +48 -12
- 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 +5 -1
- package/.claude/commands/quality-debug.md +125 -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 +107 -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 +11 -3
- package/.codex/skills/maestro-brainstorm/SKILL.md +451 -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 +29 -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 +693 -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 +553 -547
- package/.codex/skills/quality-debug/SKILL.md +345 -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 +507 -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/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 +6 -0
- 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/analyze.md +24 -2
- package/workflows/auto-test.md +12 -0
- package/workflows/brainstorm.md +11 -1
- package/workflows/debug.md +13 -4
- package/workflows/delegate-protocol.codex.md +65 -0
- package/workflows/plan.md +14 -4
- package/workflows/test.md +10 -0
|
@@ -1,318 +1,346 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: maestro-execute
|
|
3
|
-
description:
|
|
4
|
-
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"<phase> [--auto-commit] [--method agent|cli] [--dir <path>]\""
|
|
5
|
-
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep,
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<purpose>
|
|
9
|
-
Wave-based parallel task execution using `spawn_agents_on_csv`. Reads plan.json to build a CSV where waves are pre-computed from the plan. Each wave runs tasks in parallel, with cross-wave context propagation via `prev_context`. This is the core execution engine of the maestro pipeline.
|
|
10
|
-
|
|
11
|
-
**Core workflow**: Load Plan -> Build CSV from Tasks -> Wave-by-Wave Parallel Execution -> Aggregate Results
|
|
12
|
-
|
|
13
|
-
**Topology**: Custom (waves inherited from plan.json -- no Kahn's algorithm needed)
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
+---------------------------------------------------------------------------+
|
|
17
|
-
| TASK EXECUTION CSV WAVE WORKFLOW |
|
|
18
|
-
+---------------------------------------------------------------------------+
|
|
19
|
-
| |
|
|
20
|
-
| Phase 1: Plan Resolution -> CSV |
|
|
21
|
-
| +-- Resolve phase directory (or --dir path) |
|
|
22
|
-
| +-- Read plan.json + .task/TASK-*.json definitions |
|
|
23
|
-
| +-- Detect completed tasks (breakpoint resume) |
|
|
24
|
-
| +-- Build tasks.csv with one row per pending task |
|
|
25
|
-
| +-- Waves inherited from plan.json (pre-computed) |
|
|
26
|
-
| +-- Load project specs for executor context |
|
|
27
|
-
| +-- User validates task breakdown (skip if -y) |
|
|
28
|
-
| |
|
|
29
|
-
| Phase 2: Wave Execution Engine |
|
|
30
|
-
| +-- For each wave (sequential): |
|
|
31
|
-
| | +-- Wave N: Task Execution (parallel within wave) |
|
|
32
|
-
| | | +-- Each agent implements one task |
|
|
33
|
-
| | | +-- Agent reads task definition + convergence criteria |
|
|
34
|
-
| | | +-- Agent creates/modifies files per task.files |
|
|
35
|
-
| | | +-- Agent verifies convergence.criteria (max 3 fix attempts) |
|
|
36
|
-
| | | +-- Agent writes .summaries/TASK-{NNN}-summary.md |
|
|
37
|
-
| | | +-- Atomic commit if --auto-commit |
|
|
38
|
-
| | | +-- Discoveries shared via board (patterns, blockers) |
|
|
39
|
-
| | +-- Merge wave results into master tasks.csv |
|
|
40
|
-
| | +-- Build prev_context for next wave from completed findings |
|
|
41
|
-
| | +-- If blocked tasks: prompt user (skip if -y: auto-continue) |
|
|
42
|
-
| +-- discoveries.ndjson shared across all waves (append-only) |
|
|
43
|
-
| |
|
|
44
|
-
| Phase 3: Results Aggregation |
|
|
45
|
-
| +-- Export results.csv |
|
|
46
|
-
| +-- Update .task/TASK-*.json statuses |
|
|
47
|
-
| +-- Update index.json execution progress |
|
|
48
|
-
| +-- Update state.json project progress |
|
|
49
|
-
| +-- Generate context.md with execution report |
|
|
50
|
-
| +-- Auto-sync codebase docs (if configured) |
|
|
51
|
-
| +-- Display summary with next steps |
|
|
52
|
-
| |
|
|
53
|
-
+---------------------------------------------------------------------------+
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
$maestro-execute
|
|
61
|
-
$maestro-execute -
|
|
62
|
-
$maestro-execute "3 --
|
|
63
|
-
$maestro-execute --
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
- `-
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
- `--
|
|
74
|
-
- `--
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
**
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"TASK-
|
|
90
|
-
"TASK-
|
|
91
|
-
"TASK-
|
|
92
|
-
"TASK-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
| `
|
|
101
|
-
| `
|
|
102
|
-
| `
|
|
103
|
-
| `
|
|
104
|
-
| `
|
|
105
|
-
| `
|
|
106
|
-
| `
|
|
107
|
-
| `
|
|
108
|
-
| `
|
|
109
|
-
| `
|
|
110
|
-
| `
|
|
111
|
-
| `
|
|
112
|
-
| `
|
|
113
|
-
| `
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
| `
|
|
125
|
-
| `wave-{N}
|
|
126
|
-
| `results.csv` |
|
|
127
|
-
| `
|
|
128
|
-
| `
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
+--
|
|
136
|
-
+--
|
|
137
|
-
+--
|
|
138
|
-
+--
|
|
139
|
-
+--
|
|
140
|
-
+-- wave-{N}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
|
302
|
-
|
|
303
|
-
|
|
|
304
|
-
|
|
|
305
|
-
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
1
|
+
---
|
|
2
|
+
name: maestro-execute
|
|
3
|
+
description: Execute plan with parallel waves and atomic commits
|
|
4
|
+
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"<phase> [--auto-commit] [--method agent|cli] [--dir <path>]\""
|
|
5
|
+
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request_user_input
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<purpose>
|
|
9
|
+
Wave-based parallel task execution using `spawn_agents_on_csv`. Reads plan.json to build a CSV where waves are pre-computed from the plan. Each wave runs tasks in parallel, with cross-wave context propagation via `prev_context`. This is the core execution engine of the maestro pipeline.
|
|
10
|
+
|
|
11
|
+
**Core workflow**: Load Plan -> Build CSV from Tasks -> Wave-by-Wave Parallel Execution -> Aggregate Results
|
|
12
|
+
|
|
13
|
+
**Topology**: Custom (waves inherited from plan.json -- no Kahn's algorithm needed)
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
+---------------------------------------------------------------------------+
|
|
17
|
+
| TASK EXECUTION CSV WAVE WORKFLOW |
|
|
18
|
+
+---------------------------------------------------------------------------+
|
|
19
|
+
| |
|
|
20
|
+
| Phase 1: Plan Resolution -> CSV |
|
|
21
|
+
| +-- Resolve phase directory (or --dir path) |
|
|
22
|
+
| +-- Read plan.json + .task/TASK-*.json definitions |
|
|
23
|
+
| +-- Detect completed tasks (breakpoint resume) |
|
|
24
|
+
| +-- Build tasks.csv with one row per pending task |
|
|
25
|
+
| +-- Waves inherited from plan.json (pre-computed) |
|
|
26
|
+
| +-- Load project specs for executor context |
|
|
27
|
+
| +-- User validates task breakdown (skip if -y) |
|
|
28
|
+
| |
|
|
29
|
+
| Phase 2: Wave Execution Engine |
|
|
30
|
+
| +-- For each wave (sequential): |
|
|
31
|
+
| | +-- Wave N: Task Execution (parallel within wave) |
|
|
32
|
+
| | | +-- Each agent implements one task |
|
|
33
|
+
| | | +-- Agent reads task definition + convergence criteria |
|
|
34
|
+
| | | +-- Agent creates/modifies files per task.files |
|
|
35
|
+
| | | +-- Agent verifies convergence.criteria (max 3 fix attempts) |
|
|
36
|
+
| | | +-- Agent writes .summaries/TASK-{NNN}-summary.md |
|
|
37
|
+
| | | +-- Atomic commit if --auto-commit |
|
|
38
|
+
| | | +-- Discoveries shared via board (patterns, blockers) |
|
|
39
|
+
| | +-- Merge wave results into master tasks.csv |
|
|
40
|
+
| | +-- Build prev_context for next wave from completed findings |
|
|
41
|
+
| | +-- If blocked tasks: prompt user (skip if -y: auto-continue) |
|
|
42
|
+
| +-- discoveries.ndjson shared across all waves (append-only) |
|
|
43
|
+
| |
|
|
44
|
+
| Phase 3: Results Aggregation |
|
|
45
|
+
| +-- Export results.csv |
|
|
46
|
+
| +-- Update .task/TASK-*.json statuses |
|
|
47
|
+
| +-- Update index.json execution progress |
|
|
48
|
+
| +-- Update state.json project progress |
|
|
49
|
+
| +-- Generate context.md with execution report |
|
|
50
|
+
| +-- Auto-sync codebase docs (if configured) |
|
|
51
|
+
| +-- Display summary with next steps |
|
|
52
|
+
| |
|
|
53
|
+
+---------------------------------------------------------------------------+
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
</purpose>
|
|
57
|
+
|
|
58
|
+
<context>
|
|
59
|
+
```bash
|
|
60
|
+
$maestro-execute "3"
|
|
61
|
+
$maestro-execute -c 4 "3 --auto-commit"
|
|
62
|
+
$maestro-execute -y "3 --method cli"
|
|
63
|
+
$maestro-execute "3 --dir .workflow/scratch/quick-fix"
|
|
64
|
+
$maestro-execute --continue "20260318-execute-P3-phase3"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Flags**:
|
|
68
|
+
- `-y, --yes`: Skip all confirmations (auto mode)
|
|
69
|
+
- `-c, --concurrency N`: Max concurrent agents within each wave (default: 5)
|
|
70
|
+
- `--continue`: Resume existing session
|
|
71
|
+
|
|
72
|
+
**Inner flags** (passed inside quotes):
|
|
73
|
+
- `--auto-commit`: Atomic git commit after each task completion
|
|
74
|
+
- `--method agent|cli`: Override execution method (default: from config.json)
|
|
75
|
+
- `--dir <path>`: Use arbitrary directory instead of phase resolution (scratch mode)
|
|
76
|
+
|
|
77
|
+
When `--yes` or `-y`: Auto-confirm task breakdown, skip blocked-task prompts, auto-continue through all waves.
|
|
78
|
+
|
|
79
|
+
**Output Directory**: `.workflow/.csv-wave/{session-id}/`
|
|
80
|
+
**Core Output**: `tasks.csv` (master state) + `results.csv` (final) + `discoveries.ndjson` (shared exploration) + `context.md` (human-readable report)
|
|
81
|
+
</context>
|
|
82
|
+
|
|
83
|
+
<csv_schema>
|
|
84
|
+
|
|
85
|
+
### tasks.csv (Master State)
|
|
86
|
+
|
|
87
|
+
```csv
|
|
88
|
+
id,title,description,scope,convergence_criteria,hints,execution_directives,deps,context_from,wave,status,findings,files_modified,tests_passed,error
|
|
89
|
+
"TASK-001","Setup auth module","Create authentication module with JWT token generation and verification. Export verifyToken and generateToken functions.","src/auth/","auth.ts contains export function verifyToken(; auth.ts contains export function generateToken(","Reference existing middleware pattern in src/middleware/auth.ts","npm test -- --grep auth","","","1","","","","",""
|
|
90
|
+
"TASK-002","Create user model","Define User interface and database schema with email, passwordHash, role fields. Use existing Result type pattern.","src/models/","user.ts contains export interface User; user.ts contains email: string","See src/models/session.ts for existing model pattern","npm test -- --grep user","","","1","","","","",""
|
|
91
|
+
"TASK-003","Auth middleware","Create Express middleware that validates JWT from Authorization header. Use verifyToken from auth module. Return 401 on invalid token.","src/middleware/","auth-middleware.ts contains export function authMiddleware(; auth-middleware.ts contains verifyToken","Follows existing middleware pattern in src/middleware/logging.ts","npm test -- --grep middleware","TASK-001","TASK-001","2","","","","",""
|
|
92
|
+
"TASK-004","Login endpoint","Implement POST /api/login endpoint. Validate credentials against user model, return JWT on success. Use generateToken from auth module.","src/routes/","login.ts contains router.post('/api/login'; login.ts contains generateToken(","Wire into existing Express app in src/app.ts","curl -X POST localhost:3000/api/login","TASK-001;TASK-002","TASK-001;TASK-002","2","","","","",""
|
|
93
|
+
"TASK-005","Integration tests","Write integration tests for full auth flow: register, login, access protected route, token refresh.","tests/","tests/auth.test.ts exists; npm test exits with code 0","Use existing test setup in tests/setup.ts","npm test","TASK-003;TASK-004","TASK-003;TASK-004","3","","","","",""
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Columns**:
|
|
97
|
+
|
|
98
|
+
| Column | Phase | Description |
|
|
99
|
+
|--------|-------|-------------|
|
|
100
|
+
| `id` | Input | Task ID (TASK-NNN format, from plan.json) |
|
|
101
|
+
| `title` | Input | Short task title from task definition |
|
|
102
|
+
| `description` | Input | Full task description from TASK-*.json |
|
|
103
|
+
| `scope` | Input | Target file/directory glob from task.files |
|
|
104
|
+
| `convergence_criteria` | Input | Grep-verifiable completion criteria (semicolon-separated) |
|
|
105
|
+
| `hints` | Input | Implementation hints + reference files from task definition |
|
|
106
|
+
| `execution_directives` | Input | Verification commands to run after implementation |
|
|
107
|
+
| `deps` | Input | Semicolon-separated dependency task IDs |
|
|
108
|
+
| `context_from` | Input | Semicolon-separated task IDs whose findings this task needs |
|
|
109
|
+
| `wave` | Computed | Wave number from plan.json wave assignment |
|
|
110
|
+
| `status` | Output | `pending` -> `completed` / `failed` / `blocked` / `skipped` |
|
|
111
|
+
| `findings` | Output | Implementation notes and observations (max 500 chars) |
|
|
112
|
+
| `files_modified` | Output | Semicolon-separated list of created/modified files |
|
|
113
|
+
| `tests_passed` | Output | Test pass/fail status from execution_directives |
|
|
114
|
+
| `error` | Output | Error message if failed or blocked |
|
|
115
|
+
|
|
116
|
+
### Per-Wave CSV (Temporary)
|
|
117
|
+
|
|
118
|
+
Each wave generates `wave-{N}.csv` with extra `prev_context` column populated from predecessor task findings.
|
|
119
|
+
|
|
120
|
+
### Output Artifacts
|
|
121
|
+
|
|
122
|
+
| File | Purpose | Lifecycle |
|
|
123
|
+
|------|---------|-----------|
|
|
124
|
+
| `tasks.csv` | Master state -- all tasks with status/findings | Updated after each wave |
|
|
125
|
+
| `wave-{N}.csv` | Per-wave input (temporary) | Created before wave, deleted after |
|
|
126
|
+
| `wave-{N}-results.csv` | Per-wave output | Created by spawn_agents_on_csv |
|
|
127
|
+
| `results.csv` | Final export of all task results | Created in Phase 3 |
|
|
128
|
+
| `discoveries.ndjson` | Shared exploration board | Append-only, carries across waves |
|
|
129
|
+
| `context.md` | Human-readable execution report | Created in Phase 3 |
|
|
130
|
+
|
|
131
|
+
### Session Structure
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
.workflow/.csv-wave/{YYYYMMDD}-execute-P{N}-{slug}/
|
|
135
|
+
+-- tasks.csv
|
|
136
|
+
+-- results.csv
|
|
137
|
+
+-- discoveries.ndjson
|
|
138
|
+
+-- context.md
|
|
139
|
+
+-- config.json
|
|
140
|
+
+-- wave-{N}.csv (temporary)
|
|
141
|
+
+-- wave-{N}-results.csv (temporary)
|
|
142
|
+
```
|
|
143
|
+
</csv_schema>
|
|
144
|
+
|
|
145
|
+
<invariants>
|
|
146
|
+
1. **Start Immediately**: First action is session initialization, then Phase 1
|
|
147
|
+
2. **Wave Order is Sacred**: Never execute wave N+1 before wave N completes and results are merged
|
|
148
|
+
3. **CSV is Source of Truth**: Master tasks.csv holds all execution state
|
|
149
|
+
4. **Context Propagation**: prev_context built from master CSV findings, not from memory
|
|
150
|
+
5. **Discovery Board is Append-Only**: Never clear, modify, or recreate discoveries.ndjson
|
|
151
|
+
6. **Cascading Skip on Failure**: If a task fails/blocks, all dependent tasks are skipped
|
|
152
|
+
7. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
|
153
|
+
8. **Max 3 Fix Attempts**: Per task, auto-fix convergence failures up to 3 times, then mark blocked
|
|
154
|
+
9. **Breakpoint Resume**: Always detect completed tasks and skip them on re-run
|
|
155
|
+
10. **DO NOT STOP**: Continuous execution until all waves complete or user explicitly stops
|
|
156
|
+
</invariants>
|
|
157
|
+
|
|
158
|
+
<execution>
|
|
159
|
+
|
|
160
|
+
### Session Initialization
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
Parse from $ARGUMENTS:
|
|
164
|
+
AUTO_YES ← --yes | -y
|
|
165
|
+
continueMode ← --continue
|
|
166
|
+
maxConcurrency ← --concurrency | -c N (default: 5)
|
|
167
|
+
autoCommit ← --auto-commit
|
|
168
|
+
executionMethod ← --method agent|cli (default: from config.json)
|
|
169
|
+
scratchDir ← --dir <path> (default: null)
|
|
170
|
+
phaseArg ← remaining text after flag removal
|
|
171
|
+
|
|
172
|
+
Derive:
|
|
173
|
+
dateStr ← UTC+8 YYYYMMDD
|
|
174
|
+
sessionId ← scratchDir ? "{dateStr}-execute-scratch" : "{dateStr}-execute-P{phaseArg}-{phaseSlug}"
|
|
175
|
+
sessionFolder ← ".workflow/.csv-wave/{sessionId}"
|
|
176
|
+
|
|
177
|
+
mkdir -p {sessionFolder}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Pre-flight: Team Conflict Check
|
|
181
|
+
|
|
182
|
+
Before any task execution, run:
|
|
183
|
+
```
|
|
184
|
+
Bash("maestro collab preflight --phase <phase-number>")
|
|
185
|
+
```
|
|
186
|
+
If exit code is 1, present warnings and ask whether to proceed.
|
|
187
|
+
|
|
188
|
+
### Phase 1: Plan Resolution -> CSV
|
|
189
|
+
|
|
190
|
+
**Objective**: Resolve phase, load plan + task definitions, detect resume point, generate tasks.csv.
|
|
191
|
+
|
|
192
|
+
**Decomposition Rules**:
|
|
193
|
+
|
|
194
|
+
1. **Plan resolution** (per scratch-milestone-architecture):
|
|
195
|
+
|
|
196
|
+
| Input | Resolution |
|
|
197
|
+
|-------|------------|
|
|
198
|
+
| `--dir <path>` | Use path directly (scratch plan dir) |
|
|
199
|
+
| No args | Find all pending plans for current milestone from state.json.artifacts[] |
|
|
200
|
+
| Number (e.g., `3`) | Find pending plans for phase N from state.json.artifacts[] |
|
|
201
|
+
|
|
202
|
+
For multi-plan: execute sequentially. Each plan is a full CSV session.
|
|
203
|
+
|
|
204
|
+
2. **Load plan**: Read `{PLAN_DIR}/plan.json` for wave structure and task assignments
|
|
205
|
+
|
|
206
|
+
3. **Detect completed tasks (breakpoint resume)**: Read `.task/TASK-{NNN}.json` for each task; exclude completed ones from CSV. Log resume count.
|
|
207
|
+
|
|
208
|
+
4. **Build tasks.csv**: For each pending task per wave, read `.task/TASK-{NNN}.json` and extract: title, description, scope (from files), convergence.criteria, hints, execution_directives. Set `deps` from task dependency, `context_from` = deps, `wave` from plan.json.
|
|
209
|
+
|
|
210
|
+
5. **Load project specs**: Read `.workflow/specs/` for coding conventions and architecture constraints (passed to all agents)
|
|
211
|
+
|
|
212
|
+
6. **Load codebase + wiki context** (optional, passed to all agents):
|
|
213
|
+
- If `.workflow/codebase/ARCHITECTURE.md` exists: read and include as `codebase_context` in agent instructions
|
|
214
|
+
- Run `maestro wiki search "<phase keywords>" --json 2>/dev/null`; if results: include top 5 entries as `wiki_context`
|
|
215
|
+
- Both are optional — proceed without if unavailable
|
|
216
|
+
|
|
217
|
+
7. **User validation**: Display task/wave breakdown. Skip if AUTO_YES.
|
|
218
|
+
|
|
219
|
+
### Phase 2: Wave Execution Engine
|
|
220
|
+
|
|
221
|
+
**Objective**: Execute tasks wave-by-wave via spawn_agents_on_csv with cross-wave context propagation.
|
|
222
|
+
|
|
223
|
+
#### Per-Wave Execution Loop
|
|
224
|
+
|
|
225
|
+
For each wave N in ascending order:
|
|
226
|
+
|
|
227
|
+
1. Extract wave N pending rows from master `tasks.csv` (skip wave if none)
|
|
228
|
+
2. Build `prev_context` per task from completed predecessor findings
|
|
229
|
+
3. Write `wave-{N}.csv` with `prev_context` column, then execute:
|
|
230
|
+
|
|
231
|
+
```javascript
|
|
232
|
+
spawn_agents_on_csv({
|
|
233
|
+
csv_path: `${sessionFolder}/wave-${N}.csv`,
|
|
234
|
+
id_column: "id",
|
|
235
|
+
instruction: buildExecutorInstruction(sessionFolder, phaseDir, autoCommit, specsContent), // agent: ~/.codex/agents/workflow-executor.toml
|
|
236
|
+
max_concurrency: maxConcurrency, max_runtime_seconds: 3600,
|
|
237
|
+
output_csv_path: `${sessionFolder}/wave-${N}-results.csv`,
|
|
238
|
+
output_schema: { id, status: [completed|failed|blocked], findings, files_modified, tests_passed, error }
|
|
239
|
+
})
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
4. Merge results into master `tasks.csv`, delete `wave-{N}.csv`
|
|
243
|
+
|
|
244
|
+
#### Blocked Task Handling
|
|
245
|
+
|
|
246
|
+
After each wave: if blocked tasks exist, prompt user to continue or stop (AUTO_YES: auto-continue). Skip tasks whose deps are blocked/failed.
|
|
247
|
+
|
|
248
|
+
#### Cascading Skip
|
|
249
|
+
|
|
250
|
+
Blocked/failed tasks cascade: mark all downstream dependents as `skipped` with error "Dependency {dep_id} blocked/failed".
|
|
251
|
+
|
|
252
|
+
### Phase 3: Results Aggregation
|
|
253
|
+
|
|
254
|
+
**Objective**: Update all state files and generate execution report.
|
|
255
|
+
|
|
256
|
+
1. Export final `tasks.csv` as `results.csv`
|
|
257
|
+
|
|
258
|
+
2. **Update task files**: Write each task's status from CSV back to `.task/{id}.json`
|
|
259
|
+
|
|
260
|
+
3. **Issue status sync**: For tasks with `issue_id`, update `.workflow/issues/issues.jsonl`:
|
|
261
|
+
- All task_refs completed -> `issue.status = "resolved"`; any failed -> `"in_progress"`
|
|
262
|
+
- Append history entry: `{ action: "executed", at: <ISO>, by: "maestro-execute", summary: "TASK-{NNN} {status}" }`
|
|
263
|
+
|
|
264
|
+
4. **Register EXC artifact in state.json**: Find matching plan artifact, create `{ id: "EXC-{next_id}", type: "execute", milestone, phase, scope, path, status: "completed", depends_on: plan_artifact.id, harvested: false, created_at, completed_at }`
|
|
265
|
+
|
|
266
|
+
5. **Extract incremental specs**: Read `.summaries/`, use `maestro spec add` CLI:
|
|
267
|
+
- Learnings/pitfalls → `maestro spec add learning "<title>" "<content>" --keywords ... --source execute:{PLAN_DIR}`
|
|
268
|
+
- Design rationale → `maestro spec add coding "<title>" "<content>" --keywords ...`
|
|
269
|
+
- Root cause/workaround → `maestro spec add debug "<title>" "<content>" --keywords ...`
|
|
270
|
+
Mark artifact `harvested: true`
|
|
271
|
+
|
|
272
|
+
6. **Post-task Knowledge Inquiry**: After each task completes, evaluate inquiry triggers:
|
|
273
|
+
|
|
274
|
+
- **Execution deviation**: If task summary mentions approach change, dependency swap, or plan deviation:
|
|
275
|
+
→ Prompt: "TASK-{NNN} deviated from the plan. Record as architecture constraint?"
|
|
276
|
+
→ On confirm: `maestro spec add arch "<decision>" "<rationale>" --keywords ... --source execute:{PLAN_DIR}`
|
|
277
|
+
|
|
278
|
+
- **Retry success**: If task required >=2 retries before completion:
|
|
279
|
+
→ Prompt: "TASK-{NNN} succeeded after {N} retries. Document this fix pattern?"
|
|
280
|
+
→ On confirm: `maestro spec add debug "<pattern>" "<content>" --keywords ... --source execute:{PLAN_DIR}`
|
|
281
|
+
|
|
282
|
+
- **Implicit knowledge**: If task summary contains design rationale ("chose X because", "rejected Y due to"):
|
|
283
|
+
→ Prompt: "Design decision detected. Record as a learning?"
|
|
284
|
+
→ On confirm: `maestro spec add learning "<decision>" "<rationale>" --keywords ... --source execute:{PLAN_DIR}`
|
|
285
|
+
|
|
286
|
+
Use `request_user_input` for prompts:
|
|
287
|
+
```json
|
|
288
|
+
{ "questions": [{ "id": "knowledge-capture", "header": "Knowledge Capture", "question": "...", "options": [{ "label": "Yes", "description": "Record to specs" }, { "label": "Skip", "description": "Continue without recording" }] }] }
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
7. **Generate context.md**: Execution report with summary (tasks/blocked/waves/auto-commit), per-wave result table (task, status, files, tests), blocked tasks, discovery board summary, next steps.
|
|
292
|
+
|
|
293
|
+
8. **Auto-sync** (if config.json.codebase.auto_sync_after_execute == true): detect changed files, trigger codebase doc update.
|
|
294
|
+
|
|
295
|
+
9. **Display completion report**: Phase, completed/blocked counts, wave progress, paths to `.summaries/` and `.task/`, next step suggestions (`maestro-verify`, `manage-status`).
|
|
296
|
+
|
|
297
|
+
### Shared Discovery Board Protocol
|
|
298
|
+
|
|
299
|
+
#### Standard Discovery Types
|
|
300
|
+
|
|
301
|
+
| Type | Dedup Key | Data Schema | Description |
|
|
302
|
+
|------|-----------|-------------|-------------|
|
|
303
|
+
| `code_pattern` | `data.name` | `{name, file, description}` | Reusable code pattern found during implementation |
|
|
304
|
+
| `integration_point` | `data.file` | `{file, description, exports[]}` | Module connection point discovered |
|
|
305
|
+
| `convention` | singleton | `{naming, imports, formatting}` | Project coding conventions observed |
|
|
306
|
+
| `blocker` | `data.issue` | `{issue, severity, impact}` | Blocking issue encountered |
|
|
307
|
+
| `tech_stack` | singleton | `{framework, language, tools[]}` | Technology stack detail confirmed |
|
|
308
|
+
| `test_command` | `data.command` | `{command, scope, result}` | Working test command discovered |
|
|
309
|
+
|
|
310
|
+
#### Protocol
|
|
311
|
+
|
|
312
|
+
Read `discoveries.ndjson` before implementation. Append-only: dedup by type+key before writing, never modify/delete.
|
|
313
|
+
|
|
314
|
+
```bash
|
|
315
|
+
echo '{"ts":"<ISO>","worker":"TASK-001","type":"code_pattern","data":{"name":"Result type","file":"src/types/result.ts","description":"All functions return Result<T,E> for error handling"}}' >> {session_folder}/discoveries.ndjson
|
|
316
|
+
```
|
|
317
|
+
</execution>
|
|
318
|
+
|
|
319
|
+
<error_codes>
|
|
320
|
+
|
|
321
|
+
| Error | Resolution |
|
|
322
|
+
|-------|------------|
|
|
323
|
+
| Phase directory not found | Abort with error: "Phase {N} not found" |
|
|
324
|
+
| plan.json not found | Abort with error: "No plan found -- run plan first" |
|
|
325
|
+
| No pending tasks (all completed) | Abort with info: "All tasks already completed" |
|
|
326
|
+
| Task file (.task/TASK-*.json) missing | Skip task, log error, mark as failed |
|
|
327
|
+
| Agent spawn fails | Retry once, then mark task as blocked with checkpoint |
|
|
328
|
+
| Convergence criteria not met after 3 attempts | Mark task as blocked, write checkpoint |
|
|
329
|
+
| Git commit fails (--auto-commit) | Log warning, continue (task still marked completed) |
|
|
330
|
+
| All tasks in wave blocked | Stop execution, report blocked wave |
|
|
331
|
+
| CSV parse error | Validate format, show line number |
|
|
332
|
+
| discoveries.ndjson corrupt | Ignore malformed lines, continue |
|
|
333
|
+
| Continue mode: no session found | List available sessions |
|
|
334
|
+
</error_codes>
|
|
335
|
+
|
|
336
|
+
<success_criteria>
|
|
337
|
+
- [ ] Session folder created with valid tasks.csv
|
|
338
|
+
- [ ] All waves executed in order with cross-wave context propagation
|
|
339
|
+
- [ ] Completed tasks have .summaries/TASK-{NNN}-summary.md
|
|
340
|
+
- [ ] .task/TASK-*.json statuses updated to match execution results
|
|
341
|
+
- [ ] state.json updated with EXC artifact
|
|
342
|
+
- [ ] context.md produced with execution report
|
|
343
|
+
- [ ] Blocked tasks have checkpoint info for resume
|
|
344
|
+
- [ ] Cascading skip applied for dependent tasks
|
|
345
|
+
- [ ] discoveries.ndjson append-only throughout
|
|
346
|
+
</success_criteria>
|