maestro-flow 0.3.6 → 0.3.8
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/commands/learn-retro.md +303 -0
- package/.claude/commands/maestro-execute.md +3 -2
- package/.claude/commands/maestro-learn.md +74 -298
- package/.claude/commands/manage-learn.md +21 -15
- package/.claude/commands/manage-memory-capture.md +13 -15
- package/.claude/commands/manage-memory.md +1 -1
- package/.claude/commands/quality-retrospective.md +5 -5
- package/.claude/commands/spec-load.md +7 -2
- package/.claude/commands/wiki-digest.md +27 -2
- package/README.md +103 -220
- package/README.zh-CN.md +159 -181
- package/dashboard/dist/assets/{ArtifactsPage-A9yzYtpj.js → ArtifactsPage-BmPOu8sO.js} +1 -1
- package/dashboard/dist/assets/{ChatInput-PuCvZZ3y.js → ChatInput-CL8YDfOU.js} +1 -1
- package/dashboard/dist/assets/ChatPage-CT-ozBK2.js +8 -0
- package/dashboard/dist/assets/{CollabPage-I5k_mCbG.js → CollabPage-C0rWMden.js} +1 -1
- package/dashboard/dist/assets/{KanbanPage-PDDBv5-9.js → KanbanPage-C6WbAlwI.js} +1 -1
- package/dashboard/dist/assets/{MarkdownRenderer-CCXHaut3.js → MarkdownRenderer-BjZ43aSa.js} +1 -1
- package/dashboard/dist/assets/{McpPage-CiqXpCHg.js → McpPage-BPIXADQi.js} +1 -1
- package/dashboard/dist/assets/{RequirementBoardPage-CEOvppGn.js → RequirementBoardPage-B7yRL0s_.js} +1 -1
- package/dashboard/dist/assets/{RequirementPage-DpnbTEqY.js → RequirementPage-D8J_-b6O.js} +1 -1
- package/dashboard/dist/assets/{SpecsPage-CYqOfFkB.js → SpecsPage-6lO8v8_C.js} +1 -1
- package/dashboard/dist/assets/{SupervisorPage-B2sZwkq8.js → SupervisorPage-Ds5N378a.js} +1 -1
- package/dashboard/dist/assets/{TeamsPage-CkZdCAVZ.js → TeamsPage-DrkKr17T.js} +1 -1
- package/dashboard/dist/assets/{TreeBrowser-0VIMWclo.js → TreeBrowser-g_QUKemL.js} +1 -1
- package/dashboard/dist/assets/WorkflowPage-X8aNkDEr.js +6 -0
- package/dashboard/dist/assets/{arrow-left-6fktHyjN.js → arrow-left-CadP5YgU.js} +1 -1
- package/dashboard/dist/assets/{check-Cbxq2l1-.js → check-5xufDzS8.js} +1 -1
- package/dashboard/dist/assets/{chevron-right-Yts3bi8p.js → chevron-right-CYbpR4ev.js} +1 -1
- package/dashboard/dist/assets/{circle-4Ci4Xolf.js → circle-Bm-5Q-Yh.js} +1 -1
- package/dashboard/dist/assets/{circle-alert-B25g9BTL.js → circle-alert-BqcYuT7x.js} +1 -1
- package/dashboard/dist/assets/{circle-check-BA5_XqeV.js → circle-check-DEVzW_lm.js} +1 -1
- package/dashboard/dist/assets/{circle-check-big-DzO2BlL7.js → circle-check-big-yyzAFysU.js} +1 -1
- package/dashboard/dist/assets/{code-zxwuybO8.js → code-BBdC8Wmw.js} +1 -1
- package/dashboard/dist/assets/{columns-3-DV4oeCfU.js → columns-3-CQ9Trztr.js} +1 -1
- package/dashboard/dist/assets/{download-CXCyQw8M.js → download-DayuF-sn.js} +1 -1
- package/dashboard/dist/assets/{folder-Bvjj8Vn9.js → folder-CqXeSKeC.js} +1 -1
- package/dashboard/dist/assets/{git-branch-DL8p9kVC.js → git-branch-SqFf4Ru5.js} +1 -1
- package/dashboard/dist/assets/{index-BvScJmJM.js → index-Dru5HYy0.js} +1 -1
- package/dashboard/dist/assets/{index-11DuhKhc.js → index-nufWop4p.js} +18 -18
- package/dashboard/dist/assets/{list-Dj4i9N75.js → list-DBOD6IUt.js} +1 -1
- package/dashboard/dist/assets/{minus-DwlFabsT.js → minus-fQI1Syn2.js} +1 -1
- package/dashboard/dist/assets/{pen-line-D7UzECt6.js → pen-line-Bkbbngl5.js} +1 -1
- package/dashboard/dist/assets/{proxy-B9XRqHD9.js → proxy-teW12DdZ.js} +1 -1
- package/dashboard/dist/assets/{search-BQbBTIYl.js → search-Bq3ygFUW.js} +1 -1
- package/dashboard/dist/assets/{shallow-Clb1Lyd_.js → shallow-22ZN8sFt.js} +1 -1
- package/dashboard/dist/assets/{table-BqxCXid2.js → table-BEYtdWc4.js} +1 -1
- package/dashboard/dist/assets/{trash-2-6rN9B-EQ.js → trash-2-DMqGBgcF.js} +1 -1
- package/dashboard/dist/assets/{wrench-BScEJFqC.js → wrench-B84-zdLI.js} +1 -1
- package/dashboard/dist/assets/{zap-DxUhG-gk.js → zap-9DVkGVtt.js} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/agent-sdk-adapter.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/agent-sdk-adapter.js +5 -4
- package/dashboard/dist-server/dashboard/src/server/agents/agent-sdk-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/tools/issue-mcp-server.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/tools/issue-mcp-server.js +3 -4
- package/dashboard/dist-server/dashboard/src/server/agents/tools/issue-mcp-server.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/tools/issue-mcp-server.test.js +4 -4
- package/dashboard/dist-server/dashboard/src/server/agents/tools/issue-mcp-server.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.js +4 -3
- package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.test.js +20 -7
- package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/execution/wave-executor.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/server/execution/wave-executor.js +4 -4
- package/dashboard/dist-server/dashboard/src/server/execution/wave-executor.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/index.js +2 -1
- package/dashboard/dist-server/dashboard/src/server/index.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/issues.js +14 -14
- package/dashboard/dist-server/dashboard/src/server/routes/issues.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/linear.js +7 -5
- package/dashboard/dist-server/dashboard/src/server/routes/linear.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/state/state-manager.js +144 -23
- package/dashboard/dist-server/dashboard/src/server/state/state-manager.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/utils/issue-store.d.ts +6 -0
- package/dashboard/dist-server/dashboard/src/server/utils/issue-store.js +24 -2
- package/dashboard/dist-server/dashboard/src/server/utils/issue-store.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/execution-handler.js +4 -7
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/execution-handler.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/constants.js +2 -1
- package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/constants.test.js +5 -5
- package/dashboard/dist-server/dashboard/src/shared/constants.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/issue-types.test.js +4 -4
- package/dashboard/dist-server/dashboard/src/shared/issue-types.test.js.map +1 -1
- package/dashboard/dist-server/src/commands/delegate.js +7 -1
- package/dashboard/dist-server/src/commands/delegate.js.map +1 -1
- package/dist/src/commands/delegate.d.ts.map +1 -1
- package/dist/src/commands/delegate.js +7 -1
- package/dist/src/commands/delegate.js.map +1 -1
- package/package.json +1 -1
- package/workflows/delegate-usage.md +39 -41
- package/workflows/execute.md +154 -34
- package/workflows/init.md +1 -1
- package/workflows/maestro-coordinate.codex.md +1 -1
- package/workflows/maestro-coordinate.md +1 -1
- package/workflows/maestro.md +2 -2
- package/workflows/memory.md +2 -1
- package/workflows/plan.md +9 -2
- package/workflows/retrospective.md +2 -2
- package/workflows/roadmap.md +1 -1
- package/.claude/commands/learn-retro-decision.md +0 -198
- package/.claude/commands/learn-retro-git.md +0 -160
- package/dashboard/dist/assets/ChatPage-v19GURYH.js +0 -8
- package/dashboard/dist/assets/WorkflowPage-Csm23wUS.js +0 -6
package/workflows/execute.md
CHANGED
|
@@ -37,7 +37,8 @@ ELSE (standard phase resolution):
|
|
|
37
37
|
| Flag | Effect |
|
|
38
38
|
|------|--------|
|
|
39
39
|
| `--auto-commit` | Override config: commit after each task completion |
|
|
40
|
-
| `--method agent\|cli` | Override execution method (default: config.json.execution.method) |
|
|
40
|
+
| `--method agent\|cli\|auto` | Override execution method (default: config.json.execution.method) |
|
|
41
|
+
| `--executor <tool>` | Default CLI tool: gemini\|codex\|qwen\|opencode\|claude (default: first enabled in cli-tools.json) |
|
|
41
42
|
| `--dir <path>` | Use arbitrary directory instead of phase resolution (skip roadmap validation) |
|
|
42
43
|
|
|
43
44
|
---
|
|
@@ -53,7 +54,9 @@ If executionContext is available in memory:
|
|
|
53
54
|
planObject = executionContext.planObject
|
|
54
55
|
explorations = executionContext.explorations
|
|
55
56
|
clarifications = executionContext.clarifications
|
|
56
|
-
executionMethod = executionContext.executionMethod
|
|
57
|
+
executionMethod = --method flag || executionContext.executionMethod
|
|
58
|
+
defaultExecutor = --executor flag || executionContext.defaultExecutor
|
|
59
|
+
executorAssignments = executionContext.executorAssignments || {}
|
|
57
60
|
Skip disk reload
|
|
58
61
|
```
|
|
59
62
|
|
|
@@ -64,6 +67,8 @@ Read ${PHASE_DIR}/index.json
|
|
|
64
67
|
Read ${PHASE_DIR}/plan.json
|
|
65
68
|
|
|
66
69
|
executionMethod = --method flag || config.json.execution.method || "agent"
|
|
70
|
+
defaultExecutor = --executor flag || config.json.execution.default_executor || "gemini"
|
|
71
|
+
executorAssignments = index.json.plan.executor_assignments || {}
|
|
67
72
|
```
|
|
68
73
|
|
|
69
74
|
### Detect completed tasks (breakpoint resume)
|
|
@@ -110,7 +115,69 @@ Pass specs_content to each executor agent in E2.
|
|
|
110
115
|
|
|
111
116
|
## E2: Wave Parallel Execution
|
|
112
117
|
|
|
113
|
-
**Purpose:** Execute tasks wave by wave, parallel within each wave.
|
|
118
|
+
**Purpose:** Execute tasks wave by wave, parallel within each wave. Supports multi-backend dispatch — tasks route to Agent or CLI tools (via `maestro delegate`) based on executor resolution.
|
|
119
|
+
|
|
120
|
+
### Executor Resolution
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
# Priority: per-task assignment > global method > auto fallback
|
|
124
|
+
function resolveTaskExecutor(task_id):
|
|
125
|
+
If executorAssignments[task_id]:
|
|
126
|
+
return executorAssignments[task_id].executor # "agent"|"gemini"|"codex"|"qwen"|"opencode"|"claude"
|
|
127
|
+
If executionMethod == "agent":
|
|
128
|
+
return "agent"
|
|
129
|
+
If executionMethod == "cli":
|
|
130
|
+
return defaultExecutor # e.g., "gemini"
|
|
131
|
+
# executionMethod == "auto":
|
|
132
|
+
task = loaded task definition
|
|
133
|
+
# Heuristic: tasks with many files or multi-step implementation → agent; otherwise → CLI
|
|
134
|
+
return (task.files.length > 5 || task.implementation.length > 8) ? "agent" : defaultExecutor
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Delegate Prompt Builder
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
# Unified prompt for CLI backends (maestro delegate). Same task info as Agent path.
|
|
141
|
+
function buildDelegatePrompt(task_def, phase_context, specs_content, prior_summaries):
|
|
142
|
+
return """
|
|
143
|
+
PURPOSE: Implement task ${task_def.id}: ${task_def.title}; success = all convergence criteria pass
|
|
144
|
+
TASK: ${task_def.action} | Read existing code first | Verify convergence criteria after changes
|
|
145
|
+
MODE: write
|
|
146
|
+
CONTEXT: @${task_def.scope}/**/* | Phase: ${phase_context.goal}
|
|
147
|
+
EXPECTED: Working code changes, all convergence criteria verified, summary of what was done
|
|
148
|
+
CONSTRAINTS: Scope limited to task files | Follow project specs
|
|
149
|
+
|
|
150
|
+
## Task Definition
|
|
151
|
+
|
|
152
|
+
**Scope**: ${task_def.scope} | **Action**: ${task_def.action}
|
|
153
|
+
|
|
154
|
+
### Files
|
|
155
|
+
${task_def.files.map(f => '- ' + f.path + ' → ' + f.target + ': ' + f.change).join('\n')}
|
|
156
|
+
|
|
157
|
+
### Read First
|
|
158
|
+
${task_def.read_first.map(f => '- ' + f).join('\n')}
|
|
159
|
+
|
|
160
|
+
### Implementation Steps
|
|
161
|
+
${task_def.implementation.map(s => '- ' + s).join('\n')}
|
|
162
|
+
|
|
163
|
+
### Convergence Criteria
|
|
164
|
+
${task_def.convergence.criteria.map(c => '- [ ] ' + c).join('\n')}
|
|
165
|
+
|
|
166
|
+
### Reference
|
|
167
|
+
- Pattern: ${task_def.reference?.pattern || 'N/A'}
|
|
168
|
+
- Files: ${task_def.reference?.files?.join(', ') || 'N/A'}
|
|
169
|
+
|
|
170
|
+
## Phase Context
|
|
171
|
+
- Goal: ${phase_context.goal}
|
|
172
|
+
- Success criteria: ${phase_context.success_criteria}
|
|
173
|
+
|
|
174
|
+
## Project Specs
|
|
175
|
+
${specs_content}
|
|
176
|
+
|
|
177
|
+
## Prior Task Summaries
|
|
178
|
+
${prior_summaries}
|
|
179
|
+
"""
|
|
180
|
+
```
|
|
114
181
|
|
|
115
182
|
### Execution Loop
|
|
116
183
|
|
|
@@ -146,31 +213,59 @@ For each wave in execution_queue (sequential):
|
|
|
146
213
|
1. Load task definition
|
|
147
214
|
Read .task/${task_id}.json (lazy loading)
|
|
148
215
|
|
|
149
|
-
2.
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
216
|
+
2. Resolve executor and dispatch
|
|
217
|
+
executor = resolveTaskExecutor(task_id)
|
|
218
|
+
|
|
219
|
+
IF executor == "agent":
|
|
220
|
+
# --- Agent path (existing) ---
|
|
221
|
+
Spawn workflow-executor agent (fresh 200k context)
|
|
222
|
+
Input:
|
|
223
|
+
- Task definition (.task/${task_id}.json)
|
|
224
|
+
- Phase context (index.json goal, success_criteria)
|
|
225
|
+
- Relevant summaries from prior waves (.summaries/ of deps)
|
|
226
|
+
- Project specs (specs_content from E1.5)
|
|
227
|
+
- Phase context decisions (context.md)
|
|
228
|
+
- Phase analysis scores (analysis.md)
|
|
229
|
+
|
|
230
|
+
Agent responsibilities:
|
|
231
|
+
a. Read task definition (read_first, files, action, convergence.criteria)
|
|
232
|
+
b. Implement the task (create/modify files per task.files)
|
|
233
|
+
c. Verify convergence.criteria pass
|
|
234
|
+
d. If verification fails: auto-fix (max 3 attempts)
|
|
235
|
+
e. If auto-fix fails: write checkpoint, mark task as "blocked"
|
|
236
|
+
f. Atomic commit (if auto-commit enabled):
|
|
237
|
+
git add <task files>
|
|
238
|
+
git commit -m "{type}({slug}): {task.title}"
|
|
239
|
+
g. Write .summaries/${task_id}-summary.md
|
|
240
|
+
h. Update .task/${task_id}.json:
|
|
241
|
+
status = "completed" | "blocked"
|
|
242
|
+
|
|
243
|
+
ELSE:
|
|
244
|
+
# --- CLI path (via maestro delegate) ---
|
|
245
|
+
fixedId = "${PHASE_NUM || 'scratch'}-${PHASE_SLUG}-${task_id}"
|
|
246
|
+
prompt = buildDelegatePrompt(task_def, phase_context, specs_content, prior_summaries)
|
|
247
|
+
|
|
248
|
+
# Store delegate ID for resume tracking
|
|
249
|
+
index.json.execution.delegate_ids[task_id] = fixedId
|
|
250
|
+
|
|
251
|
+
# Dispatch — synchronous, returns when done
|
|
252
|
+
Bash("maestro delegate \"${prompt}\" --to ${executor} --mode write --id ${fixedId}")
|
|
253
|
+
|
|
254
|
+
# Post-dispatch processing (CLI tools don't do this internally):
|
|
255
|
+
a. Verify convergence criteria against actual file state
|
|
256
|
+
For each criterion in task_def.convergence.criteria:
|
|
257
|
+
Check file contents / grep / test command
|
|
258
|
+
b. Determine status:
|
|
259
|
+
If all criteria pass: status = "completed"
|
|
260
|
+
Else: status = "blocked", log which criteria failed
|
|
261
|
+
c. Write .summaries/${task_id}-summary.md (from delegate output + verification result)
|
|
262
|
+
d. Update .task/${task_id}.json: status = status
|
|
263
|
+
e. Auto-commit (if --auto-commit and status == "completed"):
|
|
166
264
|
git add <task files>
|
|
167
265
|
git commit -m "{type}({slug}): {task.title}"
|
|
168
|
-
g. Write .summaries/${task_id}-summary.md
|
|
169
|
-
h. Update .task/${task_id}.json:
|
|
170
|
-
status = "completed" | "blocked"
|
|
171
266
|
|
|
172
267
|
3. Collect result
|
|
173
|
-
result = { task_id, status, summary_path, commit_hash }
|
|
268
|
+
result = { task_id, status, executor, summary_path, commit_hash, delegate_id }
|
|
174
269
|
|
|
175
270
|
4. Clear current_task_id in state.json
|
|
176
271
|
Read .workflow/state.json
|
|
@@ -198,20 +293,36 @@ For each wave in execution_queue (sequential):
|
|
|
198
293
|
Log "=== Wave {wave.wave} complete ==="
|
|
199
294
|
```
|
|
200
295
|
|
|
296
|
+
### Parallel Dispatch Rules
|
|
297
|
+
|
|
298
|
+
```
|
|
299
|
+
Within a wave, tasks execute in parallel regardless of executor type:
|
|
300
|
+
- Agent tasks: multiple Agent() calls in single message (run_in_background: false)
|
|
301
|
+
- CLI tasks: multiple Bash("maestro delegate ...") calls in single message (run_in_background: true)
|
|
302
|
+
- Mixed: Agent() + Bash() calls together in single message
|
|
303
|
+
- Each task = one independent dispatch (never merge tasks into one delegate prompt)
|
|
304
|
+
```
|
|
305
|
+
|
|
201
306
|
### Deviation Rule
|
|
202
307
|
|
|
203
308
|
```
|
|
204
309
|
Per task, max 3 auto-fix attempts:
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
310
|
+
|
|
311
|
+
Agent path: auto-fix handled internally by workflow-executor agent.
|
|
312
|
+
|
|
313
|
+
CLI path: auto-fix via session resume:
|
|
314
|
+
Attempt 1: Re-dispatch with --resume ${fixedId}
|
|
315
|
+
Attempt 2: Re-dispatch with simplified prompt (reduce to core action + criteria)
|
|
316
|
+
Attempt 3: Fallback to agent executor for this task
|
|
208
317
|
|
|
209
318
|
If all 3 fail:
|
|
210
319
|
Mark task as "blocked" with checkpoint data:
|
|
211
320
|
.task/${task_id}.json.meta.checkpoint = {
|
|
212
321
|
attempt: 3,
|
|
213
322
|
last_error: "...",
|
|
214
|
-
partial_files: [...]
|
|
323
|
+
partial_files: [...],
|
|
324
|
+
executor: executor,
|
|
325
|
+
delegate_id: fixedId
|
|
215
326
|
}
|
|
216
327
|
Continue wave (other tasks unaffected)
|
|
217
328
|
```
|
|
@@ -403,6 +514,7 @@ If NOT SCRATCH_MODE:
|
|
|
403
514
|
| No plan exists | Abort: "No plan found. Run /workflow:plan first." |
|
|
404
515
|
| Task file missing | Skip task, log error, continue wave |
|
|
405
516
|
| Agent spawn fails | Retry once, then mark task as "blocked" |
|
|
517
|
+
| Delegate fails | Resume with `--resume ${fixedId}`, then fallback to agent |
|
|
406
518
|
| Git commit fails | Log warning, continue (task still marked completed) |
|
|
407
519
|
| All tasks in wave blocked | Stop execution, report blocked wave |
|
|
408
520
|
|
|
@@ -414,14 +526,22 @@ The execute workflow is fully resumable:
|
|
|
414
526
|
|
|
415
527
|
```
|
|
416
528
|
State tracking in index.json.execution:
|
|
417
|
-
tasks_completed: N
|
|
418
|
-
current_wave: W
|
|
419
|
-
commits: [...]
|
|
529
|
+
tasks_completed: N # Count of finished tasks
|
|
530
|
+
current_wave: W # Last active wave
|
|
531
|
+
commits: [...] # All commits made
|
|
532
|
+
method: "agent"|"cli"|"auto" # Execution method used
|
|
533
|
+
default_executor: "gemini"|... # CLI tool used (if method != "agent")
|
|
534
|
+
delegate_ids: { task_id: fixedId, ... } # CLI task delegate IDs
|
|
420
535
|
|
|
421
536
|
Re-running /workflow:execute <phase>:
|
|
422
537
|
1. Reads index.json.execution.tasks_completed
|
|
423
538
|
2. Checks each .task/TASK-*.json status
|
|
424
|
-
3.
|
|
425
|
-
|
|
426
|
-
|
|
539
|
+
3. For CLI-dispatched tasks with status "in-progress":
|
|
540
|
+
fixedId = index.json.execution.delegate_ids[task_id]
|
|
541
|
+
Check maestro delegate status ${fixedId}
|
|
542
|
+
If completed: retrieve output, process as completed
|
|
543
|
+
If failed: add to retry queue with --resume ${fixedId}
|
|
544
|
+
4. Builds queue of remaining tasks
|
|
545
|
+
5. Continues from next pending wave
|
|
546
|
+
6. No duplicate execution of completed tasks
|
|
427
547
|
```
|
package/workflows/init.md
CHANGED
|
@@ -87,7 +87,7 @@ CHECK .workflow/state.json exists?
|
|
|
87
87
|
1. Create `.workflow/` directory structure
|
|
88
88
|
2. Create `.workflow/state.json` (status: "idle")
|
|
89
89
|
3. Offer codebase mapping:
|
|
90
|
-
- "Map codebase first" → execute `/
|
|
90
|
+
- "Map codebase first" → execute `/manage-codebase-rebuild` to understand existing architecture, then return
|
|
91
91
|
- "Skip mapping" → proceed
|
|
92
92
|
4. Run Workflow Preferences (same as Path A step 2) → `.workflow/config.json`
|
|
93
93
|
5. Ask user for project vision, goals, constraints (same deep questioning as Path A step 1)
|
|
@@ -230,7 +230,7 @@ const chainMap = {
|
|
|
230
230
|
'spec_setup': [{ cmd: 'spec-setup' }],
|
|
231
231
|
'spec_add': [{ cmd: 'spec-add', args: '"{description}"' }],
|
|
232
232
|
'spec_load': [{ cmd: 'spec-load', args: '"{description}"' }],
|
|
233
|
-
'spec_map': [{ cmd: '
|
|
233
|
+
'spec_map': [{ cmd: 'manage-codebase-rebuild' }],
|
|
234
234
|
'memory_capture': [{ cmd: 'manage-memory-capture', args: '"{description}"' }],
|
|
235
235
|
'memory': [{ cmd: 'manage-memory', args: '"{description}"' }],
|
|
236
236
|
'issue': [{ cmd: 'manage-issue', args: '"{description}"' }],
|
|
@@ -214,7 +214,7 @@ const chainMap = {
|
|
|
214
214
|
'spec_setup': [{ cmd: 'spec-setup' }],
|
|
215
215
|
'spec_add': [{ cmd: 'spec-add', args: '"{description}"' }],
|
|
216
216
|
'spec_load': [{ cmd: 'spec-load', args: '"{description}"' }],
|
|
217
|
-
'spec_map': [{ cmd: '
|
|
217
|
+
'spec_map': [{ cmd: 'manage-codebase-rebuild' }],
|
|
218
218
|
'memory_capture': [{ cmd: 'manage-memory-capture', args: '"{description}"' }],
|
|
219
219
|
'memory': [{ cmd: 'manage-memory', args: '"{description}"' }],
|
|
220
220
|
'issue': [{ cmd: 'manage-issue', args: '"{description}"' }],
|
package/workflows/maestro.md
CHANGED
|
@@ -520,7 +520,7 @@ const chainMap = {
|
|
|
520
520
|
'spec_setup': [{ cmd: 'spec-setup' }],
|
|
521
521
|
'spec_add': [{ cmd: 'spec-add', args: '"{description}"' }],
|
|
522
522
|
'spec_load': [{ cmd: 'spec-load', args: '"{description}"' }],
|
|
523
|
-
'spec_map': [{ cmd: '
|
|
523
|
+
'spec_map': [{ cmd: 'manage-codebase-rebuild' }],
|
|
524
524
|
'memory_capture': [{ cmd: 'manage-memory-capture', args: '"{description}"' }],
|
|
525
525
|
'issue': [{ cmd: 'manage-issue', args: '"{description}"' }],
|
|
526
526
|
'issue_discover': [{ cmd: 'manage-issue-discover', args: '"{description}"' }],
|
|
@@ -662,7 +662,7 @@ function resolvePhase(intent_analysis, project_state) {
|
|
|
662
662
|
const noPhaseCommands = ['manage-status', 'manage-issue', 'manage-issue-discover',
|
|
663
663
|
'manage-issue-analyze', 'manage-issue-plan', 'manage-issue-execute',
|
|
664
664
|
'maestro-init', 'maestro-spec-generate',
|
|
665
|
-
'maestro-roadmap', 'spec-setup', '
|
|
665
|
+
'maestro-roadmap', 'spec-setup', 'manage-memory', 'manage-memory-capture', 'manage-learn',
|
|
666
666
|
'manage-codebase-rebuild', 'manage-codebase-refresh', 'maestro-milestone-audit',
|
|
667
667
|
'maestro-milestone-complete', 'maestro-phase-transition', 'maestro-phase-add'];
|
|
668
668
|
if (chain.every(s => noPhaseCommands.includes(s.cmd))) return null;
|
package/workflows/memory.md
CHANGED
|
@@ -99,7 +99,8 @@ Hints:
|
|
|
99
99
|
View: /manage-memory view <ID|filename>
|
|
100
100
|
Edit: /manage-memory edit <filename>
|
|
101
101
|
Search: /manage-memory search <query>
|
|
102
|
-
Capture: /manage-memory-capture
|
|
102
|
+
Capture: /manage-memory-capture compact
|
|
103
|
+
Tips: /manage-learn tip <text>
|
|
103
104
|
```
|
|
104
105
|
|
|
105
106
|
### Step 4: Execute Search (search mode)
|
package/workflows/plan.md
CHANGED
|
@@ -401,7 +401,8 @@ Build plan.json with gap-fix tasks
|
|
|
401
401
|
task_ids: [extracted from plan.json],
|
|
402
402
|
task_count: plan.json.task_count,
|
|
403
403
|
complexity: plan.json.complexity,
|
|
404
|
-
waves: plan.json.waves
|
|
404
|
+
waves: plan.json.waves,
|
|
405
|
+
executor_assignments: {} # populated by user override or auto-assignment in P5
|
|
405
406
|
}
|
|
406
407
|
index.json.status = "planning"
|
|
407
408
|
index.json.updated_at = now()
|
|
@@ -442,6 +443,10 @@ Build plan.json with gap-fix tasks
|
|
|
442
443
|
|
|
443
444
|
3. **executionContext handoff** (if "Execute now")
|
|
444
445
|
```
|
|
446
|
+
executionMethod = config.json.execution.method || "agent"
|
|
447
|
+
defaultExecutor = config.json.execution.default_executor || "gemini"
|
|
448
|
+
executorAssignments = index.json.plan.executor_assignments || {}
|
|
449
|
+
|
|
445
450
|
executionContext = {
|
|
446
451
|
planObject: {
|
|
447
452
|
plan: plan.json contents,
|
|
@@ -449,7 +454,9 @@ Build plan.json with gap-fix tasks
|
|
|
449
454
|
},
|
|
450
455
|
explorations: [ exploration-*.json contents ],
|
|
451
456
|
clarifications: clarificationContext,
|
|
452
|
-
executionMethod:
|
|
457
|
+
executionMethod: executionMethod,
|
|
458
|
+
defaultExecutor: defaultExecutor,
|
|
459
|
+
executorAssignments: executorAssignments,
|
|
453
460
|
phaseIndex: index.json contents,
|
|
454
461
|
specRef: spec-ref contents (if loaded)
|
|
455
462
|
}
|
|
@@ -507,14 +507,14 @@ insight.routed_id = "SPEC-retro-{phase_num}-{INS_id}-{slug}.md"
|
|
|
507
507
|
|
|
508
508
|
#### Target: note
|
|
509
509
|
|
|
510
|
-
Reuse the existing `manage-
|
|
510
|
+
Reuse the existing `manage-learn` skill in tip mode — do not duplicate the learning pipeline.
|
|
511
511
|
|
|
512
512
|
```
|
|
513
513
|
note_text = "[Retro phase {NN} / {lens}] {insight.title}: {insight.summary}"
|
|
514
514
|
tags = insight.tags + ["retrospective", "phase-{NN}", insight.lens]
|
|
515
515
|
|
|
516
516
|
Skill({
|
|
517
|
-
skill: "manage-
|
|
517
|
+
skill: "manage-learn",
|
|
518
518
|
args: "tip \"{note_text}\" --tag " + tags.join(",")
|
|
519
519
|
})
|
|
520
520
|
|
package/workflows/roadmap.md
CHANGED
|
@@ -61,7 +61,7 @@ IF .workflow/state.json exists:
|
|
|
61
61
|
- key_decisions[] → architectural_constraints
|
|
62
62
|
- blockers[] → known_risks
|
|
63
63
|
|
|
64
|
-
IF .workflow/codebase/ exists (from
|
|
64
|
+
IF .workflow/codebase/ exists (from codebase-rebuild or codebase-refresh):
|
|
65
65
|
Read available codebase docs for feature inventory
|
|
66
66
|
```
|
|
67
67
|
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: learn-retro-decision
|
|
3
|
-
description: Decision trace and evaluation with multi-perspective analysis and lifecycle classification
|
|
4
|
-
argument-hint: "[--phase N] [--tag <tag>] [--id <decision-id>]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- Bash
|
|
9
|
-
- Glob
|
|
10
|
-
- Grep
|
|
11
|
-
- Agent
|
|
12
|
-
- AskUserQuestion
|
|
13
|
-
---
|
|
14
|
-
<purpose>
|
|
15
|
-
Decision retrospective that traces architectural and design decisions across wiki, specs, phase contexts, and git history. Evaluates each decision from 3 perspectives (technical soundness, cost assessment, alternative hindsight) and classifies its lifecycle status.
|
|
16
|
-
|
|
17
|
-
Inspired by gstack's cross-functional review pipeline (CEO/Eng/Design perspectives). Unlike `quality-retrospective` which reviews completed phases holistically, this command focuses specifically on decision quality and evolution.
|
|
18
|
-
</purpose>
|
|
19
|
-
|
|
20
|
-
<context>
|
|
21
|
-
Arguments: $ARGUMENTS
|
|
22
|
-
|
|
23
|
-
**Scope:**
|
|
24
|
-
- No arguments → scan all sources for decisions, prompt for selection
|
|
25
|
-
- `--phase N` → decisions from phase N's context and related specs
|
|
26
|
-
- `--tag <tag>` → decisions tagged with specific tag in wiki/specs
|
|
27
|
-
- `--id <id>` → single decision by wiki ID or lessons.jsonl INS-id
|
|
28
|
-
|
|
29
|
-
**Storage written:**
|
|
30
|
-
- `.workflow/learning/retro-decision-{YYYY-MM-DD}.md` — Decision evaluation report
|
|
31
|
-
- `.workflow/learning/lessons.jsonl` — Decision evaluation insights (source: "retro-decision")
|
|
32
|
-
- `.workflow/learning/learning-index.json` — Updated index
|
|
33
|
-
|
|
34
|
-
**Storage read:**
|
|
35
|
-
- `maestro wiki list --type spec --json` — Spec entries (many contain decisions)
|
|
36
|
-
- `maestro wiki search "decision"` — Decision-tagged entries
|
|
37
|
-
- `.workflow/specs/architecture-constraints.md` — Documented architectural decisions
|
|
38
|
-
- `.workflow/phases/*/context.md` — Phase context with Locked/Free/Deferred decisions (if exists)
|
|
39
|
-
- `.workflow/learning/lessons.jsonl` — Entries with `category: "decision"`
|
|
40
|
-
- Git log — Implementation evidence for decision tracing
|
|
41
|
-
</context>
|
|
42
|
-
|
|
43
|
-
<execution>
|
|
44
|
-
|
|
45
|
-
### Stage 1: Collect Decisions
|
|
46
|
-
Gather decisions from all sources in parallel:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
# Wiki decisions
|
|
50
|
-
maestro wiki search "decision" --json
|
|
51
|
-
maestro wiki list --type spec --json # specs often contain decision entries
|
|
52
|
-
|
|
53
|
-
# Git evidence
|
|
54
|
-
git log --oneline --all --grep="decision\|chose\|decided\|architecture" -20
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Also read:
|
|
58
|
-
- `.workflow/specs/architecture-constraints.md` — grep for `### [decision]` heading blocks
|
|
59
|
-
- `.workflow/phases/*/context.md` — scan for "Locked:", "Deferred:" sections
|
|
60
|
-
- `.workflow/learning/lessons.jsonl` — filter entries where `category == "decision"`
|
|
61
|
-
|
|
62
|
-
Apply scope filter (--phase, --tag, --id) to reduce the set.
|
|
63
|
-
|
|
64
|
-
If no decisions found, AskUserQuestion: "No decisions found in wiki/specs. Would you like to: A) Scan git commit messages for implicit decisions, B) Provide a specific decision to evaluate"
|
|
65
|
-
|
|
66
|
-
### Stage 2: Build Decision Registry
|
|
67
|
-
For each decision, build a structured record:
|
|
68
|
-
|
|
69
|
-
```json
|
|
70
|
-
{
|
|
71
|
-
"id": "decision source id",
|
|
72
|
-
"title": "what was decided",
|
|
73
|
-
"source": "wiki|spec|phase-context|lesson|git",
|
|
74
|
-
"date": "when decided",
|
|
75
|
-
"rationale": "why (if documented)",
|
|
76
|
-
"alternatives": "what was considered (if documented)",
|
|
77
|
-
"phase": "which phase",
|
|
78
|
-
"tags": ["related tags"],
|
|
79
|
-
"implementation_evidence": ["file paths from git that implement this"]
|
|
80
|
-
}
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
For implementation evidence: search git log for commits that reference the decision topic, and grep source files for patterns consistent with the decision.
|
|
84
|
-
|
|
85
|
-
### Stage 3: Multi-Perspective Evaluation
|
|
86
|
-
Spawn 3 Agents in a single message, each evaluating all decisions from one perspective:
|
|
87
|
-
|
|
88
|
-
**Agent 1 — Technical Soundness:**
|
|
89
|
-
- Does the implementation match the stated intent?
|
|
90
|
-
- Are there code-level violations of the decision?
|
|
91
|
-
- Has the technical context changed since the decision was made?
|
|
92
|
-
- Grade: sound / degraded / violated
|
|
93
|
-
|
|
94
|
-
**Agent 2 — Cost Assessment:**
|
|
95
|
-
- What complexity did this decision add?
|
|
96
|
-
- How many files/modules are affected?
|
|
97
|
-
- Is the decision creating coupling or technical debt?
|
|
98
|
-
- Grade: low-cost / acceptable / expensive / debt-creating
|
|
99
|
-
|
|
100
|
-
**Agent 3 — Alternative Hindsight:**
|
|
101
|
-
- With what we know now, was this the right call?
|
|
102
|
-
- What alternative would we choose today?
|
|
103
|
-
- Would reversing this decision be feasible?
|
|
104
|
-
- Grade: confirmed / questionable / should-revisit
|
|
105
|
-
|
|
106
|
-
Each agent receives the full decision registry and returns evaluations per decision.
|
|
107
|
-
|
|
108
|
-
### Stage 4: Classify Decision Lifecycle
|
|
109
|
-
Based on the 3 perspectives, classify each decision:
|
|
110
|
-
|
|
111
|
-
| Status | Criteria |
|
|
112
|
-
|--------|---------|
|
|
113
|
-
| **Validated** | Sound + Low/Acceptable cost + Confirmed |
|
|
114
|
-
| **Aging** | Sound but Expensive + Confirmed (still right but costly) |
|
|
115
|
-
| **Questionable** | Degraded or Violated + Any cost + Questionable |
|
|
116
|
-
| **Stale** | Any soundness + Any cost + Should-revisit |
|
|
117
|
-
| **Reversed** | Evidence in code contradicts the decision |
|
|
118
|
-
|
|
119
|
-
### Stage 5: Generate Recommendations
|
|
120
|
-
For each non-Validated decision:
|
|
121
|
-
- **Aging**: flag for tech debt review, suggest cost reduction
|
|
122
|
-
- **Questionable**: create issue for investigation, suggest brainstorm
|
|
123
|
-
- **Stale**: suggest decision refresh (re-evaluate with current context)
|
|
124
|
-
- **Reversed**: suggest documenting the reversal and updating specs/wiki
|
|
125
|
-
|
|
126
|
-
### Stage 6: Write Report
|
|
127
|
-
`.workflow/learning/retro-decision-{date}.md`:
|
|
128
|
-
|
|
129
|
-
```markdown
|
|
130
|
-
# Decision Retrospective: {scope}
|
|
131
|
-
**Date:** {date} | **Decisions evaluated:** {count}
|
|
132
|
-
|
|
133
|
-
## Decision Health Dashboard
|
|
134
|
-
| Status | Count | Decisions |
|
|
135
|
-
|--------|-------|-----------|
|
|
136
|
-
| Validated | N | {list} |
|
|
137
|
-
| Aging | N | {list} |
|
|
138
|
-
| Questionable | N | {list} |
|
|
139
|
-
| Stale | N | {list} |
|
|
140
|
-
|
|
141
|
-
## Per-Decision Evaluation
|
|
142
|
-
|
|
143
|
-
### {Decision Title}
|
|
144
|
-
**Source:** {wiki/spec/phase} | **Date:** {when} | **Status:** {lifecycle}
|
|
145
|
-
|
|
146
|
-
| Perspective | Grade | Assessment |
|
|
147
|
-
|------------|-------|-----------|
|
|
148
|
-
| Technical | sound/degraded/violated | {one-line} |
|
|
149
|
-
| Cost | low/acceptable/expensive | {one-line} |
|
|
150
|
-
| Hindsight | confirmed/questionable/revisit | {one-line} |
|
|
151
|
-
|
|
152
|
-
**Implementation evidence:** {file references}
|
|
153
|
-
**Recommendation:** {action if non-validated}
|
|
154
|
-
|
|
155
|
-
## Recommended Actions
|
|
156
|
-
1. {action}: {reason}
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
### Stage 7: Persist
|
|
160
|
-
1. Write report file
|
|
161
|
-
2. Append decision evaluation insights to `lessons.jsonl`:
|
|
162
|
-
- `source: "retro-decision"`, `category: "decision"`
|
|
163
|
-
- Tags: `["retro-decision", "{lifecycle-status}"]`
|
|
164
|
-
- One insight per non-Validated decision with the recommendation
|
|
165
|
-
3. Update `learning-index.json`
|
|
166
|
-
4. Optionally: update wiki entries with evaluation metadata via `maestro wiki update`
|
|
167
|
-
5. Display health dashboard summary
|
|
168
|
-
|
|
169
|
-
**Next-step routing:**
|
|
170
|
-
- Create issue for questionable decision → `Skill({ skill: "manage-issue", args: "create ..." })`
|
|
171
|
-
- Brainstorm alternatives → `Skill({ skill: "maestro-brainstorm", args: "<decision topic>" })`
|
|
172
|
-
- Investigate stale decision → `Skill({ skill: "learn-investigate", args: "<question>" })`
|
|
173
|
-
- Update spec → `Skill({ skill: "spec-add", args: "decision <updated rationale>" })`
|
|
174
|
-
</execution>
|
|
175
|
-
|
|
176
|
-
<error_codes>
|
|
177
|
-
| Code | Severity | Condition | Recovery |
|
|
178
|
-
|------|----------|-----------|----------|
|
|
179
|
-
| E001 | error | No decisions found in any source | Check wiki/specs content, or provide --id |
|
|
180
|
-
| E002 | error | --id not found in wiki or lessons | Verify the decision ID exists |
|
|
181
|
-
| W001 | warning | One perspective agent failed — partial evaluation | Proceed with available perspectives, note gap |
|
|
182
|
-
| W002 | warning | No git implementation evidence found for a decision | Decision evaluation is theoretical only |
|
|
183
|
-
| W003 | warning | Phase context files not found | Skip phase-context decisions, proceed with wiki/spec sources |
|
|
184
|
-
</error_codes>
|
|
185
|
-
|
|
186
|
-
<success_criteria>
|
|
187
|
-
- [ ] Decisions collected from all available sources (wiki, specs, phase-context, lessons, git)
|
|
188
|
-
- [ ] Scope filter applied correctly (--phase, --tag, or --id)
|
|
189
|
-
- [ ] Decision registry built with structured records
|
|
190
|
-
- [ ] 3 perspective agents spawned in parallel
|
|
191
|
-
- [ ] Each decision classified: Validated / Aging / Questionable / Stale / Reversed
|
|
192
|
-
- [ ] Recommendations generated for non-Validated decisions
|
|
193
|
-
- [ ] Report written to `retro-decision-{date}.md` with health dashboard
|
|
194
|
-
- [ ] Insights appended to `lessons.jsonl` (source: "retro-decision")
|
|
195
|
-
- [ ] `learning-index.json` updated
|
|
196
|
-
- [ ] No files modified outside `.workflow/learning/`
|
|
197
|
-
- [ ] Health dashboard displayed with next-step routing
|
|
198
|
-
</success_criteria>
|