maestro-flow 0.3.8 → 0.3.10
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-decompose.md +3 -3
- package/.claude/commands/learn-follow.md +5 -5
- package/.claude/commands/learn-investigate.md +3 -3
- package/.claude/commands/learn-retro.md +6 -6
- package/.claude/commands/learn-second-opinion.md +3 -3
- package/.claude/commands/maestro-analyze.md +166 -99
- package/.claude/commands/maestro-brainstorm.md +2 -2
- package/.claude/commands/maestro-execute.md +151 -97
- package/.claude/commands/maestro-fork.md +111 -0
- package/.claude/commands/maestro-init.md +6 -6
- package/.claude/commands/maestro-merge.md +77 -0
- package/.claude/commands/maestro-milestone-audit.md +72 -60
- package/.claude/commands/maestro-milestone-complete.md +67 -59
- package/.claude/commands/maestro-milestone-release.md +6 -6
- package/.claude/commands/maestro-plan.md +167 -130
- package/.claude/commands/maestro-quick.md +4 -4
- package/.claude/commands/maestro-roadmap.md +5 -5
- package/.claude/commands/maestro-spec-generate.md +5 -5
- package/.claude/commands/maestro-ui-design.md +3 -3
- package/.claude/commands/maestro-verify.md +106 -87
- package/.claude/commands/maestro.md +10 -4
- package/.claude/commands/manage-codebase-rebuild.md +4 -4
- package/.claude/commands/manage-codebase-refresh.md +1 -1
- package/.claude/commands/manage-harvest.md +6 -6
- package/.claude/commands/manage-issue-discover.md +2 -2
- package/.claude/commands/manage-issue.md +7 -7
- package/.claude/commands/manage-learn.md +2 -2
- package/.claude/commands/manage-memory-capture.md +4 -4
- package/.claude/commands/manage-memory.md +2 -2
- package/.claude/commands/manage-status.md +24 -24
- package/.claude/commands/quality-business-test.md +5 -5
- package/.claude/commands/quality-debug.md +4 -4
- package/.claude/commands/quality-integration-test.md +4 -4
- package/.claude/commands/quality-refactor.md +3 -3
- package/.claude/commands/quality-retrospective.md +2 -2
- package/.claude/commands/quality-review.md +4 -4
- package/.claude/commands/quality-sync.md +3 -3
- package/.claude/commands/quality-test-gen.md +4 -4
- package/.claude/commands/quality-test.md +9 -9
- package/.claude/commands/spec-add.md +2 -2
- package/.claude/commands/spec-load.md +1 -1
- package/.claude/commands/spec-setup.md +5 -5
- package/.claude/commands/wiki-connect.md +3 -3
- package/.claude/commands/wiki-digest.md +4 -4
- package/.codex/skills/maestro/SKILL.md +463 -0
- package/.codex/skills/maestro-analyze/SKILL.md +79 -20
- package/.codex/skills/maestro-chain/SKILL.md +248 -0
- package/.codex/skills/maestro-coordinate/SKILL.md +279 -224
- package/.codex/skills/maestro-execute/SKILL.md +35 -26
- package/.codex/skills/maestro-milestone-audit/SKILL.md +103 -209
- package/.codex/skills/maestro-milestone-complete/SKILL.md +149 -158
- package/.codex/skills/maestro-plan/SKILL.md +56 -18
- package/.codex/skills/maestro-roadmap/SKILL.md +3 -2
- package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +2 -2
- package/.codex/skills/team-executor/roles/executor/commands/monitor.md +1 -1
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +2 -2
- package/.codex/skills/team-lifecycle-v4/specs/knowledge-transfer.md +2 -2
- package/.codex/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +1 -1
- package/.codex/skills/team-review/roles/coordinator/commands/monitor.md +1 -1
- package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +1 -1
- package/.codex/skills/team-testing/roles/coordinator/commands/monitor.md +1 -1
- package/README.md +26 -21
- package/README.zh-CN.md +23 -19
- package/bin/maestro-mcp.js +1 -1
- package/chains/_intent-map.json +21 -9
- package/chains/_router.json +30 -77
- package/chains/brainstorm-driven.json +17 -6
- package/chains/full-lifecycle.json +22 -23
- package/chains/issue-lifecycle.json +13 -13
- package/chains/milestone-close.json +20 -7
- package/chains/milestone-fork-merge.json +50 -0
- package/chains/roadmap-driven.json +17 -6
- package/chains/singles/issue-analyze.json +3 -3
- package/chains/singles/issue-execute.json +3 -3
- package/chains/singles/issue-plan.json +3 -3
- package/chains/spec-driven.json +17 -6
- package/dashboard/dist/assets/{ArtifactsPage-BmPOu8sO.js → ArtifactsPage-DZNCi6tn.js} +12 -7
- package/dashboard/dist/assets/ChatInput-Bvr-FeEq.js +49 -0
- package/dashboard/dist/assets/ChatPage-D9zTkJZo.js +22 -0
- package/dashboard/dist/assets/CollabPage-B4NAHXS2.js +1 -0
- package/dashboard/dist/assets/ExecutionPanel-CFt4LJyq.js +1 -0
- package/dashboard/dist/assets/KanbanPage-C8USth6H.js +21 -0
- package/dashboard/dist/assets/{MarkdownRenderer-BjZ43aSa.js → MarkdownRenderer-X4af_WNb.js} +1 -1
- package/dashboard/dist/assets/McpPage-BKfCVIyU.js +21 -0
- package/dashboard/dist/assets/OutputPanel-BlBQFJSW.js +1 -0
- package/dashboard/dist/assets/ProblemsPanel-De3DLvoI.js +1 -0
- package/dashboard/dist/assets/{RequirementBoardPage-B7yRL0s_.js → RequirementBoardPage-Bf1trzqs.js} +2 -2
- package/dashboard/dist/assets/{RequirementPage-D8J_-b6O.js → RequirementPage-Bllxe2XI.js} +10 -5
- package/dashboard/dist/assets/{SpecsPage-6lO8v8_C.js → SpecsPage-9lwxKT27.js} +2 -2
- package/dashboard/dist/assets/{SupervisorPage-Ds5N378a.js → SupervisorPage-SusdfHFq.js} +1 -1
- package/dashboard/dist/assets/{TeamsPage-DrkKr17T.js → TeamsPage-DsuM6OwC.js} +2 -2
- package/dashboard/dist/assets/TreeBrowser-Q12qobZs.js +6 -0
- package/dashboard/dist/assets/WorkflowPage-D_Fzdy3_.js +6 -0
- package/dashboard/dist/assets/{arrow-left-CadP5YgU.js → arrow-left-Bqtb2hle.js} +1 -1
- package/dashboard/dist/assets/{check-5xufDzS8.js → check-u6fGOwQO.js} +1 -1
- package/dashboard/dist/assets/{chevron-right-CYbpR4ev.js → chevron-right-Csu22t58.js} +1 -1
- package/dashboard/dist/assets/{circle-Bm-5Q-Yh.js → circle-CMrkbRNg.js} +1 -1
- package/dashboard/dist/assets/{circle-alert-BqcYuT7x.js → circle-alert-c3tH1P4z.js} +1 -1
- package/dashboard/dist/assets/{circle-check-big-yyzAFysU.js → circle-check-big-TDSeWstm.js} +1 -1
- package/dashboard/dist/assets/{circle-check-DEVzW_lm.js → circle-check-gYxxSYuH.js} +1 -1
- package/dashboard/dist/assets/{code-BBdC8Wmw.js → code-CFN2uX9V.js} +1 -1
- package/dashboard/dist/assets/{columns-3-CQ9Trztr.js → columns-3-38xIDlzy.js} +1 -1
- package/dashboard/dist/assets/{download-DayuF-sn.js → download-DC7KkKyP.js} +1 -1
- package/dashboard/dist/assets/{folder-CqXeSKeC.js → folder-CWq_lAnf.js} +1 -1
- package/dashboard/dist/assets/index-DWG-WrzT.js +231 -0
- package/dashboard/dist/assets/{index-Dru5HYy0.js → index-Do71weNR.js} +1 -1
- package/dashboard/dist/assets/index-GUNJodSR.css +1 -0
- package/dashboard/dist/assets/{list-DBOD6IUt.js → list-CgIP_2A-.js} +1 -1
- package/dashboard/dist/assets/{minus-fQI1Syn2.js → minus-DYoN5UGk.js} +1 -1
- package/dashboard/dist/assets/{pen-line-Bkbbngl5.js → pen-line-Bh_WKYHm.js} +1 -1
- package/dashboard/dist/assets/{proxy-teW12DdZ.js → proxy-BKxDAKTj.js} +1 -1
- package/dashboard/dist/assets/{search-Bq3ygFUW.js → search-SieXnOgr.js} +1 -1
- package/dashboard/dist/assets/{shallow-22ZN8sFt.js → shallow-Bme1JY57.js} +1 -1
- package/dashboard/dist/assets/{table-BEYtdWc4.js → table-llyEtj-7.js} +1 -1
- package/dashboard/dist/assets/terminal-BB3Xfuv5.js +6 -0
- package/dashboard/dist/assets/{trash-2-DMqGBgcF.js → trash-2-C8f4vFFM.js} +1 -1
- package/dashboard/dist/assets/{zap-9DVkGVtt.js → zap-4uwlzVm0.js} +1 -1
- package/dashboard/dist/index.html +2 -2
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js +8 -4
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/entry-normalizer.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/entry-normalizer.js +2 -1
- package/dashboard/dist-server/dashboard/src/server/agents/entry-normalizer.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js +20 -10
- package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.js +2 -2
- package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js +3 -3
- package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/git.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/server/routes/git.js +79 -0
- package/dashboard/dist-server/dashboard/src/server/routes/git.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/routes/index.js +3 -0
- package/dashboard/dist-server/dashboard/src/server/routes/index.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/issues.js +34 -0
- package/dashboard/dist-server/dashboard/src/server/routes/issues.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/workspace.js +43 -0
- package/dashboard/dist-server/dashboard/src/server/routes/workspace.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/state/state-manager.js +43 -3
- package/dashboard/dist-server/dashboard/src/server/state/state-manager.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/execution-handler.js +2 -3
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/execution-handler.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/issue-types.d.ts +5 -0
- package/dashboard/dist-server/dashboard/src/shared/issue-types.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/normalize-task.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/shared/normalize-task.js +75 -0
- package/dashboard/dist-server/dashboard/src/shared/normalize-task.js.map +1 -0
- package/dashboard/dist-server/src/hooks/constants.d.ts +90 -12
- package/dashboard/dist-server/src/hooks/constants.js +149 -16
- package/dashboard/dist-server/src/hooks/constants.js.map +1 -1
- package/dashboard/dist-server/src/types/index.d.ts +5 -0
- package/dashboard/package.json +59 -59
- package/dist/src/cli.js +3 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/collab.d.ts +14 -0
- package/dist/src/commands/collab.d.ts.map +1 -0
- package/dist/src/commands/{team.js → collab.js} +395 -96
- package/dist/src/commands/collab.js.map +1 -0
- package/dist/src/commands/hooks.d.ts +5 -1
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +50 -10
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/install-ui/InstallConfirm.d.ts +3 -1
- package/dist/src/commands/install-ui/InstallConfirm.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallConfirm.js +3 -1
- package/dist/src/commands/install-ui/InstallConfirm.js.map +1 -1
- package/dist/src/commands/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallExecution.js +5 -1
- package/dist/src/commands/install-ui/InstallExecution.js.map +1 -1
- package/dist/src/commands/install-ui/InstallFlow.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallFlow.js +7 -3
- package/dist/src/commands/install-ui/InstallFlow.js.map +1 -1
- package/dist/src/commands/install-ui/StatuslineConfig.d.ts +6 -1
- package/dist/src/commands/install-ui/StatuslineConfig.d.ts.map +1 -1
- package/dist/src/commands/install-ui/StatuslineConfig.js +27 -5
- package/dist/src/commands/install-ui/StatuslineConfig.js.map +1 -1
- package/dist/src/commands/msg.d.ts.map +1 -1
- package/dist/src/commands/msg.js +4 -3
- package/dist/src/commands/msg.js.map +1 -1
- package/dist/src/hooks/__tests__/statusline-visual-test.d.ts +7 -0
- package/dist/src/hooks/__tests__/statusline-visual-test.d.ts.map +1 -0
- package/dist/src/hooks/__tests__/statusline-visual-test.js +236 -0
- package/dist/src/hooks/__tests__/statusline-visual-test.js.map +1 -0
- package/dist/src/hooks/constants.d.ts +90 -12
- package/dist/src/hooks/constants.d.ts.map +1 -1
- package/dist/src/hooks/constants.js +149 -16
- package/dist/src/hooks/constants.js.map +1 -1
- package/dist/src/hooks/guards/index.d.ts +1 -0
- package/dist/src/hooks/guards/index.d.ts.map +1 -1
- package/dist/src/hooks/guards/index.js +1 -0
- package/dist/src/hooks/guards/index.js.map +1 -1
- package/dist/src/hooks/guards/preflight-guard.d.ts +29 -0
- package/dist/src/hooks/guards/preflight-guard.d.ts.map +1 -0
- package/dist/src/hooks/guards/preflight-guard.js +95 -0
- package/dist/src/hooks/guards/preflight-guard.js.map +1 -0
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/index.js +1 -0
- package/dist/src/hooks/index.js.map +1 -1
- package/dist/src/{commands/team.d.ts → hooks/preflight-core.d.ts} +12 -22
- package/dist/src/hooks/preflight-core.d.ts.map +1 -0
- package/dist/src/hooks/preflight-core.js +86 -0
- package/dist/src/hooks/preflight-core.js.map +1 -0
- package/dist/src/hooks/statusline.d.ts +8 -17
- package/dist/src/hooks/statusline.d.ts.map +1 -1
- package/dist/src/hooks/statusline.js +269 -112
- package/dist/src/hooks/statusline.js.map +1 -1
- package/dist/src/hooks/team-monitor.d.ts.map +1 -1
- package/dist/src/hooks/team-monitor.js +16 -0
- package/dist/src/hooks/team-monitor.js.map +1 -1
- package/dist/src/i18n/locales/en.d.ts.map +1 -1
- package/dist/src/i18n/locales/en.js +5 -0
- package/dist/src/i18n/locales/en.js.map +1 -1
- package/dist/src/i18n/locales/zh.d.ts.map +1 -1
- package/dist/src/i18n/locales/zh.js +5 -0
- package/dist/src/i18n/locales/zh.js.map +1 -1
- package/dist/src/i18n/types.d.ts +5 -0
- package/dist/src/i18n/types.d.ts.map +1 -1
- package/dist/src/tools/collab-adapter.d.ts +102 -0
- package/dist/src/tools/collab-adapter.d.ts.map +1 -0
- package/dist/src/tools/collab-adapter.js +458 -0
- package/dist/src/tools/collab-adapter.js.map +1 -0
- package/dist/src/tools/merge-validator.d.ts +24 -0
- package/dist/src/tools/merge-validator.d.ts.map +1 -0
- package/dist/src/tools/merge-validator.js +220 -0
- package/dist/src/tools/merge-validator.js.map +1 -0
- package/dist/src/tools/namespace-guard.d.ts +2 -0
- package/dist/src/tools/namespace-guard.d.ts.map +1 -1
- package/dist/src/tools/namespace-guard.js +12 -0
- package/dist/src/tools/namespace-guard.js.map +1 -1
- package/dist/src/tools/phase-gate-evaluator.d.ts +45 -0
- package/dist/src/tools/phase-gate-evaluator.d.ts.map +1 -0
- package/dist/src/tools/phase-gate-evaluator.js +42 -0
- package/dist/src/tools/phase-gate-evaluator.js.map +1 -0
- package/dist/src/tools/team-members.d.ts +18 -0
- package/dist/src/tools/team-members.d.ts.map +1 -1
- package/dist/src/tools/team-members.js +50 -0
- package/dist/src/tools/team-members.js.map +1 -1
- package/dist/src/tools/team-tasks.d.ts +120 -0
- package/dist/src/tools/team-tasks.d.ts.map +1 -0
- package/dist/src/tools/team-tasks.js +365 -0
- package/dist/src/tools/team-tasks.js.map +1 -0
- package/dist/src/tools/transition-recorder.d.ts +3 -0
- package/dist/src/tools/transition-recorder.d.ts.map +1 -1
- package/dist/src/tools/transition-recorder.js +52 -1
- package/dist/src/tools/transition-recorder.js.map +1 -1
- package/dist/src/types/index.d.ts +5 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/utils/get-version.d.ts.map +1 -1
- package/dist/src/utils/get-version.js +15 -4
- package/dist/src/utils/get-version.js.map +1 -1
- package/package.json +1 -1
- package/templates/cli/prompts/workflow-skill-conflict-patterns.txt +3 -3
- package/templates/cli/prompts/workflow-skill-lessons-learned.txt +3 -3
- package/templates/config.json +7 -0
- package/templates/search-tools.md +1 -1
- package/templates/worktree-scope.json +10 -0
- package/templates/worktrees.json +27 -0
- package/workflows/analyze.md +86 -36
- package/workflows/brainstorm.md +17 -37
- package/workflows/cli-tools-usage.md +44 -27
- package/workflows/delegate-usage.md +3 -3
- package/workflows/execute.md +94 -28
- package/workflows/fork.md +309 -0
- package/workflows/init.md +10 -1
- package/workflows/issue-analyze.md +6 -2
- package/workflows/issue-discover.md +4 -4
- package/workflows/issue-execute.md +6 -3
- package/workflows/issue-plan.md +5 -2
- package/workflows/issue.md +66 -7
- package/workflows/maestro-coordinate.codex.md +281 -470
- package/workflows/maestro-coordinate.md +37 -30
- package/workflows/maestro-link-coordinate.md +2 -2
- package/workflows/maestro.codex.md +710 -0
- package/workflows/maestro.md +62 -46
- package/workflows/merge.md +285 -0
- package/workflows/milestone-audit.md +89 -70
- package/workflows/milestone-complete.md +89 -156
- package/workflows/plan.md +122 -17
- package/workflows/retrospective.md +4 -4
- package/workflows/roadmap.md +11 -3
- package/workflows/spec-generate.md +9 -0
- package/workflows/status.md +76 -27
- package/workflows/ui-design.md +14 -12
- package/workflows/verify.md +44 -8
- package/.claude/commands/maestro-phase-add.md +0 -63
- package/.claude/commands/maestro-phase-transition.md +0 -75
- package/.claude/commands/manage-issue-analyze.md +0 -62
- package/.claude/commands/manage-issue-execute.md +0 -73
- package/.claude/commands/manage-issue-plan.md +0 -62
- package/.codex/skills/maestro-phase-add/SKILL.md +0 -154
- package/.codex/skills/maestro-phase-transition/SKILL.md +0 -173
- package/.codex/skills/manage-issue-analyze/SKILL.md +0 -207
- package/.codex/skills/manage-issue-execute/SKILL.md +0 -200
- package/.codex/skills/manage-issue-plan/SKILL.md +0 -186
- package/chains/singles/phase-add.json +0 -31
- package/chains/singles/phase-transition.json +0 -23
- package/dashboard/dist/assets/ChatInput-CL8YDfOU.js +0 -67
- package/dashboard/dist/assets/ChatPage-CT-ozBK2.js +0 -8
- package/dashboard/dist/assets/CollabPage-C0rWMden.js +0 -1
- package/dashboard/dist/assets/KanbanPage-C6WbAlwI.js +0 -16
- package/dashboard/dist/assets/McpPage-BPIXADQi.js +0 -16
- package/dashboard/dist/assets/TreeBrowser-g_QUKemL.js +0 -11
- package/dashboard/dist/assets/WorkflowPage-X8aNkDEr.js +0 -6
- package/dashboard/dist/assets/git-branch-SqFf4Ru5.js +0 -6
- package/dashboard/dist/assets/index-D2Mtyw7I.css +0 -1
- package/dashboard/dist/assets/index-nufWop4p.js +0 -231
- package/dashboard/dist/assets/wrench-B84-zdLI.js +0 -11
- package/dist/src/commands/team.d.ts.map +0 -1
- package/dist/src/commands/team.js.map +0 -1
- package/workflows/phase-add.md +0 -252
- package/workflows/phase-transition.md +0 -399
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro
|
|
3
|
+
description: Intelligent coordinator — analyze intent, read project state, select chain, execute wave-by-wave via spawn_agents_on_csv. Barrier skills trigger coordinator-side artifact analysis between waves to dynamically assemble subsequent skill_call args. Each wave can be 1 or N parallel tasks.
|
|
4
|
+
argument-hint: "\"intent text\" [-y] [-c|--continue] [--dry-run] [--chain <name>]"
|
|
5
|
+
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Auto Mode
|
|
9
|
+
|
|
10
|
+
When `-y` or `--yes`: Skip clarification and confirmation prompts. Pass `-y` through to each step's skill invocation.
|
|
11
|
+
|
|
12
|
+
# Maestro
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
$maestro "implement user authentication with JWT"
|
|
18
|
+
$maestro -y "refactor the payment module"
|
|
19
|
+
$maestro --continue
|
|
20
|
+
$maestro --dry-run "add rate limiting to API endpoints"
|
|
21
|
+
$maestro --chain feature "add dark mode toggle"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Flags**:
|
|
25
|
+
- `-y, --yes` — Auto mode: skip all prompts; propagate `-y` to each skill
|
|
26
|
+
- `--continue` — Resume latest paused session from last incomplete wave
|
|
27
|
+
- `--dry-run` — Display planned chain without executing
|
|
28
|
+
- `--chain <name>` — Force a specific chain (skips intent classification)
|
|
29
|
+
|
|
30
|
+
**Session state**: `.workflow/.maestro-coordinate/{session-id}/`
|
|
31
|
+
**Core Output**: `tasks.csv` (master) + `wave-{N}-results.csv` (per wave) + `context.md` (report)
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Overview
|
|
36
|
+
|
|
37
|
+
Wave-based pipeline coordinator. The coordinator loop builds one wave CSV at a time, calls `spawn_agents_on_csv`, then performs **coordinator-side artifact analysis** before assembling the next wave. Barrier skills produce artifacts (plan.json, analysis results, etc.) that the coordinator reads to dynamically resolve args for subsequent steps.
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
Intent → Resolve Chain → [Wave Loop]:
|
|
41
|
+
┌─────────────────────────────────────────────────┐
|
|
42
|
+
│ 1. Identify next wave (1 or N parallel steps) │
|
|
43
|
+
│ 2. Build wave-{N}.csv with skill_call per row │
|
|
44
|
+
│ 3. spawn_agents_on_csv(wave-{N}.csv) │
|
|
45
|
+
│ 4. Read wave-{N}-results.csv │
|
|
46
|
+
│ 5. If barrier skill: analyze artifacts, │
|
|
47
|
+
│ update context for subsequent steps │
|
|
48
|
+
│ 6. Merge into master tasks.csv │
|
|
49
|
+
└─────────────────────────────────────────────────┘
|
|
50
|
+
→ Report
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Barrier Skills
|
|
56
|
+
|
|
57
|
+
Skills that produce artifacts requiring **coordinator-side analysis** before the next wave can be assembled. After a barrier skill completes, the coordinator reads its output and updates the execution context.
|
|
58
|
+
|
|
59
|
+
| Skill | Artifacts to Read | Context Updates |
|
|
60
|
+
|-------|------------------|-----------------|
|
|
61
|
+
| `maestro-analyze` | `.workflow/.csv-wave/*/context.md`, `state.json` | `gaps`, `phase`, `analysis_dir` |
|
|
62
|
+
| `maestro-plan` | `{phase_dir}/plan.json`, `{phase_dir}/.task/TASK-*.json` | `plan_dir`, `task_count`, `wave_count` |
|
|
63
|
+
| `maestro-brainstorm` | `.workflow/.csv-wave/*/.brainstorming/` | `brainstorm_dir`, `features` |
|
|
64
|
+
| `maestro-spec-generate` | `.workflow/.csv-wave/*/specs/` | `spec_session_id` |
|
|
65
|
+
| `maestro-execute` | `.workflow/.csv-wave/*/results.csv` | `exec_status`, `completed_tasks`, `failed_tasks` |
|
|
66
|
+
|
|
67
|
+
**Non-barrier skills** (can be grouped into multi-task waves): `maestro-verify`, `quality-review`, `quality-test`, `quality-debug`, `quality-refactor`, `quality-sync`, `manage-*`
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Chain Map
|
|
72
|
+
|
|
73
|
+
| Intent keywords | Chain | Steps (skills, in order) |
|
|
74
|
+
|----------------|-------|--------------------------|
|
|
75
|
+
| fix, bug, error, broken, crash | `quality-fix` | $maestro-analyze --gaps → $maestro-plan --gaps → $maestro-execute → $maestro-verify |
|
|
76
|
+
| test, spec, coverage | `quality-test` | $quality-test |
|
|
77
|
+
| refactor, cleanup, debt | `quality-refactor` | $quality-refactor |
|
|
78
|
+
| feature, implement, add, build | `feature` | $maestro-plan → $maestro-execute → $maestro-verify |
|
|
79
|
+
| review, check, audit | `quality-review` | $quality-review |
|
|
80
|
+
| deploy, release, ship | `deploy` | $maestro-verify → $maestro-execute |
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Implementation
|
|
85
|
+
|
|
86
|
+
> **Full implementation reference**: The complete `detectTaskType`, `detectNextAction`, and `chainMap` definitions (35+ intent patterns, 40+ chain types) are in `~/.maestro/workflows/maestro.codex.md`. Read that file for authoritative logic before executing any step.
|
|
87
|
+
|
|
88
|
+
### Session Initialization
|
|
89
|
+
|
|
90
|
+
```javascript
|
|
91
|
+
const dateStr = new Date().toISOString().substring(0, 10).replace(/-/g, '')
|
|
92
|
+
const timeStr = new Date().toISOString().substring(11, 19).replace(/:/g, '')
|
|
93
|
+
const sessionId = `MCC-${dateStr}-${timeStr}`
|
|
94
|
+
const sessionDir = `.workflow/.maestro-coordinate/${sessionId}`
|
|
95
|
+
|
|
96
|
+
Bash(`mkdir -p ${sessionDir}`)
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Phase 1: Resolve Intent and Chain
|
|
100
|
+
|
|
101
|
+
**`--continue` mode**: Glob `.workflow/.maestro-coordinate/MCC-*/state.json` sorted by name desc; load the most recent; resume from first pending wave.
|
|
102
|
+
|
|
103
|
+
**Fresh mode**:
|
|
104
|
+
|
|
105
|
+
1. Read `.workflow/state.json` for project context (`current_phase`, `workflow_name`)
|
|
106
|
+
2. If `--chain` is given, use it directly
|
|
107
|
+
3. Otherwise, classify intent with keyword heuristics (see Chain Map above)
|
|
108
|
+
4. If no keyword matches and not `AUTO_YES`: ask one clarifying question via `AskUserQuestion`
|
|
109
|
+
5. Resolve the chain's skill list from Chain Map
|
|
110
|
+
6. Write `state.json`:
|
|
111
|
+
|
|
112
|
+
```javascript
|
|
113
|
+
Write(`${sessionDir}/state.json`, JSON.stringify({
|
|
114
|
+
id: sessionId,
|
|
115
|
+
intent,
|
|
116
|
+
chain: resolvedChain,
|
|
117
|
+
auto_yes: AUTO_YES,
|
|
118
|
+
status: "in_progress",
|
|
119
|
+
started_at: new Date().toISOString(),
|
|
120
|
+
context: {
|
|
121
|
+
phase: resolvedPhase,
|
|
122
|
+
plan_dir: null,
|
|
123
|
+
analysis_dir: null,
|
|
124
|
+
brainstorm_dir: null,
|
|
125
|
+
spec_session_id: null,
|
|
126
|
+
gaps: null
|
|
127
|
+
},
|
|
128
|
+
waves: [], // populated as waves execute
|
|
129
|
+
steps: chain.map((skill, i) => ({
|
|
130
|
+
step_n: i + 1,
|
|
131
|
+
skill: skill.cmd,
|
|
132
|
+
args: skill.args ?? '',
|
|
133
|
+
status: "pending",
|
|
134
|
+
wave_n: null
|
|
135
|
+
}))
|
|
136
|
+
}, null, 2))
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**`--dry-run`**: Display the chain plan and stop.
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
Chain: <resolvedChain>
|
|
143
|
+
Steps:
|
|
144
|
+
1. $<cmd> <args>
|
|
145
|
+
2. $<cmd> <args> [BARRIER]
|
|
146
|
+
3. $<cmd> <args>
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**User confirmation** (skip if `AUTO_YES`): Display the plan above and prompt `Proceed? (yes/no)`.
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
### Phase 2: Wave Execution Loop
|
|
154
|
+
|
|
155
|
+
The coordinator iterates over pending steps, grouping them into waves and executing one wave at a time.
|
|
156
|
+
|
|
157
|
+
#### Wave Grouping Rules
|
|
158
|
+
|
|
159
|
+
1. A **barrier skill** is always alone in its wave (wave size = 1)
|
|
160
|
+
2. Consecutive **non-barrier skills** with no inter-dependencies are grouped into one wave (wave size = N)
|
|
161
|
+
3. After a barrier wave completes → coordinator analyzes artifacts → updates context → re-assembles subsequent step args
|
|
162
|
+
|
|
163
|
+
#### Per-Wave Execution
|
|
164
|
+
|
|
165
|
+
```javascript
|
|
166
|
+
let waveNum = 0;
|
|
167
|
+
|
|
168
|
+
while (state.steps.some(s => s.status === 'pending')) {
|
|
169
|
+
waveNum++;
|
|
170
|
+
|
|
171
|
+
// 1. Determine wave contents
|
|
172
|
+
const waveSteps = buildNextWave(state.steps);
|
|
173
|
+
|
|
174
|
+
// 2. Assemble skill_call for each step (with latest context)
|
|
175
|
+
const waveCsv = waveSteps.map((step, i) => ({
|
|
176
|
+
id: String(step.step_n),
|
|
177
|
+
skill_call: buildSkillCall(step, state.context),
|
|
178
|
+
topic: `Chain "${state.chain}" step ${step.step_n}/${state.steps.length}`
|
|
179
|
+
}));
|
|
180
|
+
|
|
181
|
+
// 3. Write wave CSV
|
|
182
|
+
const csvContent = 'id,skill_call,topic\n' + waveCsv.map(r =>
|
|
183
|
+
`"${r.id}","${r.skill_call.replace(/"/g, '""')}","${r.topic}"`
|
|
184
|
+
).join('\n');
|
|
185
|
+
Write(`${sessionDir}/wave-${waveNum}.csv`, csvContent);
|
|
186
|
+
|
|
187
|
+
// 4. Execute wave
|
|
188
|
+
spawn_agents_on_csv({
|
|
189
|
+
csv_path: `${sessionDir}/wave-${waveNum}.csv`,
|
|
190
|
+
id_column: "id",
|
|
191
|
+
instruction: WAVE_INSTRUCTION,
|
|
192
|
+
max_workers: waveSteps.length > 1 ? waveSteps.length : 1,
|
|
193
|
+
max_runtime_seconds: 1800,
|
|
194
|
+
output_csv_path: `${sessionDir}/wave-${waveNum}-results.csv`,
|
|
195
|
+
output_schema: RESULT_SCHEMA
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
// 5. Read results, update step status
|
|
199
|
+
const results = readCSV(`${sessionDir}/wave-${waveNum}-results.csv`);
|
|
200
|
+
for (const row of results) {
|
|
201
|
+
const step = state.steps.find(s => s.step_n === parseInt(row.id));
|
|
202
|
+
step.status = row.status;
|
|
203
|
+
step.findings = row.findings;
|
|
204
|
+
step.wave_n = waveNum;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// 6. Barrier analysis (if wave contained a barrier skill)
|
|
208
|
+
if (isBarrier(waveSteps[0].skill)) {
|
|
209
|
+
analyzeBarrierArtifacts(waveSteps[0], results[0], state.context);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// 7. Persist state
|
|
213
|
+
state.waves.push({ wave_n: waveNum, steps: waveSteps.map(s => s.step_n), results });
|
|
214
|
+
Write(`${sessionDir}/state.json`, JSON.stringify(state, null, 2));
|
|
215
|
+
|
|
216
|
+
// 8. Abort on failure
|
|
217
|
+
if (results.some(r => r.status === 'failed')) {
|
|
218
|
+
state.status = 'aborted';
|
|
219
|
+
state.steps.filter(s => s.status === 'pending').forEach(s => s.status = 'skipped');
|
|
220
|
+
Write(`${sessionDir}/state.json`, JSON.stringify(state, null, 2));
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
### Instruction Template (Simple)
|
|
229
|
+
|
|
230
|
+
```
|
|
231
|
+
你是 CSV job 子 agent。
|
|
232
|
+
|
|
233
|
+
先原样执行这一段技能调用:
|
|
234
|
+
{skill_call}
|
|
235
|
+
|
|
236
|
+
然后基于结果完成这一行任务说明:
|
|
237
|
+
{topic}
|
|
238
|
+
|
|
239
|
+
限制:
|
|
240
|
+
- 不要修改 .workflow/.maestro-coordinate/ 下的 state 文件
|
|
241
|
+
- skill 内部有自己的 session 管理,按 skill SKILL.md 执行即可
|
|
242
|
+
|
|
243
|
+
最后必须调用 `report_agent_job_result`,返回 JSON:
|
|
244
|
+
{"status":"completed|failed","skill_call":"{skill_call}","summary":"一句话结果","artifacts":"产物路径或空字符串","error":"失败原因或空字符串"}
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Result Schema
|
|
248
|
+
|
|
249
|
+
```javascript
|
|
250
|
+
const RESULT_SCHEMA = {
|
|
251
|
+
type: "object",
|
|
252
|
+
properties: {
|
|
253
|
+
status: { type: "string", enum: ["completed", "failed"] },
|
|
254
|
+
skill_call: { type: "string" },
|
|
255
|
+
summary: { type: "string" },
|
|
256
|
+
artifacts: { type: "string" },
|
|
257
|
+
error: { type: "string" }
|
|
258
|
+
},
|
|
259
|
+
required: ["status", "skill_call", "summary", "artifacts", "error"]
|
|
260
|
+
};
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
### Barrier Analysis Logic
|
|
266
|
+
|
|
267
|
+
After a barrier skill completes, the coordinator reads its artifacts and updates `state.context`:
|
|
268
|
+
|
|
269
|
+
```javascript
|
|
270
|
+
function analyzeBarrierArtifacts(step, result, ctx) {
|
|
271
|
+
const artifactPath = result.artifacts;
|
|
272
|
+
|
|
273
|
+
switch (step.skill) {
|
|
274
|
+
case 'maestro-analyze':
|
|
275
|
+
// Read analysis conclusions → extract gaps, phase info
|
|
276
|
+
const contextMd = Read(`${artifactPath}/context.md`);
|
|
277
|
+
ctx.analysis_dir = artifactPath;
|
|
278
|
+
ctx.gaps = extractGaps(contextMd); // grep for gap/issue markers
|
|
279
|
+
if (!ctx.phase) ctx.phase = extractPhase(contextMd);
|
|
280
|
+
break;
|
|
281
|
+
|
|
282
|
+
case 'maestro-plan':
|
|
283
|
+
// Read plan.json → know task structure for execute
|
|
284
|
+
const planJson = JSON.parse(Read(`${artifactPath}/plan.json`));
|
|
285
|
+
ctx.plan_dir = artifactPath;
|
|
286
|
+
ctx.task_count = planJson.tasks?.length ?? 0;
|
|
287
|
+
ctx.wave_count = planJson.waves?.length ?? 0;
|
|
288
|
+
break;
|
|
289
|
+
|
|
290
|
+
case 'maestro-brainstorm':
|
|
291
|
+
// Read brainstorm output → features for plan
|
|
292
|
+
ctx.brainstorm_dir = artifactPath;
|
|
293
|
+
break;
|
|
294
|
+
|
|
295
|
+
case 'maestro-spec-generate':
|
|
296
|
+
ctx.spec_session_id = extractSpecId(artifactPath);
|
|
297
|
+
break;
|
|
298
|
+
|
|
299
|
+
case 'maestro-execute':
|
|
300
|
+
// Read execution results → completed/failed counts
|
|
301
|
+
const execResults = Read(`${artifactPath}/results.csv`);
|
|
302
|
+
ctx.exec_completed = countStatus(execResults, 'completed');
|
|
303
|
+
ctx.exec_failed = countStatus(execResults, 'failed');
|
|
304
|
+
break;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### Skill Call Assembly
|
|
310
|
+
|
|
311
|
+
The coordinator builds each `skill_call` with resolved context — sub-agents just execute verbatim:
|
|
312
|
+
|
|
313
|
+
```javascript
|
|
314
|
+
const BARRIER_SKILLS = new Set([
|
|
315
|
+
'maestro-analyze', 'maestro-plan', 'maestro-brainstorm',
|
|
316
|
+
'maestro-spec-generate', 'maestro-execute'
|
|
317
|
+
]);
|
|
318
|
+
|
|
319
|
+
const AUTO_FLAG_MAP = {
|
|
320
|
+
'maestro-analyze': '-y', 'maestro-brainstorm': '-y',
|
|
321
|
+
'maestro-ui-design': '-y', 'maestro-plan': '--auto',
|
|
322
|
+
'maestro-spec-generate': '-y', 'quality-test': '--auto-fix',
|
|
323
|
+
'quality-retrospective': '--auto-yes',
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
function buildSkillCall(step, ctx) {
|
|
327
|
+
let args = (step.args ?? '')
|
|
328
|
+
.replace(/{phase}/g, ctx.phase ?? '')
|
|
329
|
+
.replace(/{description}/g, state.intent ?? '')
|
|
330
|
+
.replace(/{issue_id}/g, ctx.issue_id ?? '')
|
|
331
|
+
.replace(/{plan_dir}/g, ctx.plan_dir ?? '')
|
|
332
|
+
.replace(/{analysis_dir}/g, ctx.analysis_dir ?? '')
|
|
333
|
+
.replace(/{brainstorm_dir}/g, ctx.brainstorm_dir ?? '')
|
|
334
|
+
.replace(/{spec_session_id}/g, ctx.spec_session_id ?? '');
|
|
335
|
+
|
|
336
|
+
if (state.auto_yes) {
|
|
337
|
+
const flag = AUTO_FLAG_MAP[step.skill];
|
|
338
|
+
if (flag && !args.includes(flag)) args = args ? `${args} ${flag}` : flag;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
return `$${step.skill} ${args}`.trim();
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
function buildNextWave(steps) {
|
|
345
|
+
const pending = steps.filter(s => s.status === 'pending');
|
|
346
|
+
if (!pending.length) return [];
|
|
347
|
+
|
|
348
|
+
const first = pending[0];
|
|
349
|
+
// Barrier skill → solo wave
|
|
350
|
+
if (BARRIER_SKILLS.has(first.skill)) return [first];
|
|
351
|
+
|
|
352
|
+
// Group consecutive non-barriers
|
|
353
|
+
const wave = [first];
|
|
354
|
+
for (let i = 1; i < pending.length; i++) {
|
|
355
|
+
if (BARRIER_SKILLS.has(pending[i].skill)) break;
|
|
356
|
+
wave.push(pending[i]);
|
|
357
|
+
}
|
|
358
|
+
return wave;
|
|
359
|
+
}
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
### Phase 3: Completion Report
|
|
365
|
+
|
|
366
|
+
```javascript
|
|
367
|
+
state.status = state.steps.every(s => s.status === 'completed') ? 'completed' : state.status;
|
|
368
|
+
state.completed_at = new Date().toISOString();
|
|
369
|
+
Write(`${sessionDir}/state.json`, JSON.stringify(state, null, 2));
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
Generate `context.md`:
|
|
373
|
+
|
|
374
|
+
```markdown
|
|
375
|
+
# Coordinate Report — {chain}
|
|
376
|
+
|
|
377
|
+
## Summary
|
|
378
|
+
- Session: {sessionId}
|
|
379
|
+
- Chain: {chain}
|
|
380
|
+
- Waves: {waveNum} executed
|
|
381
|
+
- Steps: {completed}/{total} completed
|
|
382
|
+
|
|
383
|
+
## Wave Results
|
|
384
|
+
### Wave {N} (barrier: {skill})
|
|
385
|
+
| Step | Skill Call | Status | Summary |
|
|
386
|
+
|------|-----------|--------|---------|
|
|
387
|
+
| {step_n} | {skill_call} | {status} | {summary} |
|
|
388
|
+
|
|
389
|
+
Artifacts: {artifacts}
|
|
390
|
+
Context update: {what changed}
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
Display:
|
|
394
|
+
|
|
395
|
+
```
|
|
396
|
+
=== COORDINATE COMPLETE ===
|
|
397
|
+
Session: <sessionId>
|
|
398
|
+
Chain: <chain>
|
|
399
|
+
Waves: <N> executed
|
|
400
|
+
Steps: <completed>/<total>
|
|
401
|
+
|
|
402
|
+
WAVE RESULTS:
|
|
403
|
+
[W1] $maestro-analyze --gaps → ✓ found 3 gaps
|
|
404
|
+
[W2] $maestro-plan --gaps → ✓ 12 tasks in 3 waves
|
|
405
|
+
[W3] $maestro-execute → ✓ 12/12 tasks done
|
|
406
|
+
[W4] $maestro-verify → ✓ all criteria met
|
|
407
|
+
|
|
408
|
+
State: .workflow/.maestro-coordinate/<sessionId>/state.json
|
|
409
|
+
Resume: $maestro --continue
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
## CSV Schema
|
|
415
|
+
|
|
416
|
+
### wave-{N}.csv (Per-Wave Input)
|
|
417
|
+
|
|
418
|
+
```csv
|
|
419
|
+
id,skill_call,topic
|
|
420
|
+
"1","$maestro-analyze --gaps \"fix auth\" -y","Chain \"quality-fix\" step 1/4"
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
| Column | Description |
|
|
424
|
+
|--------|-------------|
|
|
425
|
+
| `id` | Step number from chain (string) |
|
|
426
|
+
| `skill_call` | Full skill invocation assembled by coordinator with resolved context |
|
|
427
|
+
| `topic` | Brief description for the agent |
|
|
428
|
+
|
|
429
|
+
### tasks.csv (Master State)
|
|
430
|
+
|
|
431
|
+
```csv
|
|
432
|
+
id,skill,args,wave_n,status,findings,artifacts,error
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
Accumulated across all waves. Updated after each wave completes.
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
## Error Handling
|
|
440
|
+
|
|
441
|
+
| Code | Severity | Condition | Recovery |
|
|
442
|
+
|------|----------|-----------|----------|
|
|
443
|
+
| E001 | error | Intent unclassifiable after clarification | Default to `feature` chain |
|
|
444
|
+
| E002 | error | `--chain` value not in chain map | List valid chains, abort |
|
|
445
|
+
| E003 | error | Wave timeout (max_runtime_seconds) | Mark step `failed`, abort chain |
|
|
446
|
+
| E004 | error | Barrier artifact not found | Retry wave once, then abort |
|
|
447
|
+
| E005 | error | `--continue`: no session found | List sessions, prompt |
|
|
448
|
+
| W001 | warning | Barrier artifact partial | Continue with available context |
|
|
449
|
+
|
|
450
|
+
---
|
|
451
|
+
|
|
452
|
+
## Core Rules
|
|
453
|
+
|
|
454
|
+
1. **Start Immediately**: Init session dir and write `state.json` before any wave
|
|
455
|
+
2. **Wave-by-wave**: Never start wave N+1 before wave N results are read and analyzed
|
|
456
|
+
3. **Barrier = solo wave**: A barrier skill always executes alone; coordinator analyzes its artifacts before proceeding
|
|
457
|
+
4. **Non-barriers can parallel**: Consecutive non-barrier skills in the same wave execute with `max_workers = N`
|
|
458
|
+
5. **Coordinator owns context**: Sub-agents never read prior results — coordinator assembles the full `skill_call` with resolved args
|
|
459
|
+
6. **Simple instruction**: Sub-agent instruction is minimal — just "execute {skill_call}, report result"
|
|
460
|
+
7. **Abort on failure**: Failed step → mark remaining as skipped → report
|
|
461
|
+
8. **State.json tracks waves**: Each wave is recorded with step IDs and results for resume
|
|
462
|
+
9. **Dry-run is read-only**: Display chain with [BARRIER] markers, no execution
|
|
463
|
+
10. **Resume from wave**: `--continue` finds last completed wave and resumes from next pending step
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-analyze
|
|
3
|
-
description: Multi-dimensional analysis via CSV wave pipeline. Diamond topology — CLI exploration agents (Wave 1), 6-dimension scoring agents (Wave 2), decision synthesis agent (Wave 3). Supports dual depth with -q quick mode. Replaces maestro-analyze command.
|
|
4
|
-
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"<phase|topic> [-q|--quick]\""
|
|
3
|
+
description: Multi-dimensional analysis via CSV wave pipeline. Diamond topology — CLI exploration agents (Wave 1), 6-dimension scoring agents (Wave 2), decision synthesis agent (Wave 3). Supports dual depth with -q quick mode and --gaps issue root cause analysis. Replaces maestro-analyze command.
|
|
4
|
+
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"<phase|topic> [-q|--quick] [--gaps [ISS-ID]]\""
|
|
5
5
|
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -25,6 +25,7 @@ $maestro-analyze --continue "analyze-microservices-20260318"
|
|
|
25
25
|
- `-c, --concurrency N`: Max concurrent agents within each wave (default: 6)
|
|
26
26
|
- `--continue`: Resume existing session
|
|
27
27
|
- `-q, --quick`: Quick mode -- skip exploration + scoring, go straight to decision extraction (Wave 3 only)
|
|
28
|
+
- `--gaps [ISS-ID]`: Issue root cause analysis mode. If ISS-ID provided, analyze single issue. If omitted, analyze all open/registered issues from issues.jsonl. Replaces manage-issue-analyze.
|
|
28
29
|
|
|
29
30
|
**Output Directory**: `.workflow/.csv-wave/{session-id}/`
|
|
30
31
|
**Core Output**: `tasks.csv` (master state) + `results.csv` (final) + `discoveries.ndjson` (shared exploration) + `context.md` (decision extraction report) + `analysis.md` (6-dimension scoring summary)
|
|
@@ -37,7 +38,7 @@ Wave-based multi-dimensional analysis using `spawn_agents_on_csv`. Diamond topol
|
|
|
37
38
|
|
|
38
39
|
**Core workflow**: Parse Subject -> CLI Exploration -> 6-Dimension Scoring -> Decision Synthesis
|
|
39
40
|
|
|
40
|
-
**
|
|
41
|
+
**Tri-depth**: Full mode (all 3 waves), Quick mode (`-q`, Wave 3 only), or Gaps mode (`--gaps`, issue root cause analysis pipeline).
|
|
41
42
|
|
|
42
43
|
```
|
|
43
44
|
+---------------------------------------------------------------------------+
|
|
@@ -170,23 +171,59 @@ const maxConcurrency = concurrencyMatch ? parseInt(concurrencyMatch[1]) : 6
|
|
|
170
171
|
|
|
171
172
|
// Parse analyze-specific flags
|
|
172
173
|
const QUICK_MODE = $ARGUMENTS.includes('-q') || $ARGUMENTS.includes('--quick')
|
|
174
|
+
const GAPS_MODE = $ARGUMENTS.includes('--gaps')
|
|
175
|
+
const gapsIssueMatch = $ARGUMENTS.match(/--gaps\s+(ISS-\S+)/)
|
|
176
|
+
const gapsIssueId = gapsIssueMatch ? gapsIssueMatch[1] : null
|
|
173
177
|
|
|
174
178
|
// Clean subject text
|
|
175
179
|
const subjectArg = $ARGUMENTS
|
|
176
|
-
.replace(/--yes|-y|--continue|--concurrency\s+\d+|-c\s+\d+|-q|--quick/g, '')
|
|
180
|
+
.replace(/--yes|-y|--continue|--concurrency\s+\d+|-c\s+\d+|-q|--quick|--gaps\s+ISS-\S+|--gaps/g, '')
|
|
177
181
|
.trim()
|
|
178
182
|
|
|
179
|
-
//
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
183
|
+
// Auto-bootstrap state.json if missing
|
|
184
|
+
if (!fileExists('.workflow/state.json')) {
|
|
185
|
+
Bash('mkdir -p .workflow/scratch/')
|
|
186
|
+
writeMinimalStateJson() // { project: null, status: "active", current_milestone: null, artifacts: [] }
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// Scope determination (per scratch-milestone-architecture)
|
|
190
|
+
const state = JSON.parse(Read('.workflow/state.json'))
|
|
191
|
+
let scope, slug, phaseNum = null
|
|
192
|
+
|
|
193
|
+
if (GAPS_MODE) {
|
|
194
|
+
// --gaps → issue root cause analysis
|
|
195
|
+
scope = 'gaps'
|
|
196
|
+
slug = gapsIssueId ? gapsIssueId.toLowerCase().replace(/[^a-z0-9]+/g, '-') : 'issue-gaps'
|
|
197
|
+
} else if (subjectArg === '') {
|
|
198
|
+
// No args → milestone-wide
|
|
199
|
+
if (state.current_milestone && fileExists('.workflow/roadmap.md')) {
|
|
200
|
+
scope = 'milestone'
|
|
201
|
+
slug = slugify(state.milestones.find(m => m.id === state.current_milestone)?.name || state.current_milestone)
|
|
202
|
+
} else {
|
|
203
|
+
ERROR('E001: No args and no roadmap — provide topic text or create roadmap first')
|
|
204
|
+
}
|
|
205
|
+
} else if (/^\d+$/.test(subjectArg)) {
|
|
206
|
+
// Phase number
|
|
207
|
+
if (state.current_milestone && fileExists('.workflow/roadmap.md')) {
|
|
208
|
+
scope = 'phase'
|
|
209
|
+
phaseNum = parseInt(subjectArg)
|
|
210
|
+
slug = resolvePhaseSlugFromRoadmap(phaseNum) // parse roadmap.md for phase N slug
|
|
211
|
+
} else {
|
|
212
|
+
ERROR('Phase number requires init + roadmap')
|
|
213
|
+
}
|
|
214
|
+
} else {
|
|
215
|
+
// Text → adhoc or standalone
|
|
216
|
+
slug = subjectArg.toLowerCase().replace(/[^a-z0-9]+/g, '-').substring(0, 40)
|
|
217
|
+
scope = state.current_milestone ? 'adhoc' : 'standalone'
|
|
218
|
+
}
|
|
184
219
|
|
|
185
|
-
const dateStr = getUtc8ISOString().substring(0, 10)
|
|
220
|
+
const dateStr = getUtc8ISOString().substring(0, 10)
|
|
186
221
|
const sessionId = `analyze-${slug}-${dateStr}`
|
|
187
222
|
const sessionFolder = `.workflow/.csv-wave/${sessionId}`
|
|
223
|
+
const scratchDir = `.workflow/scratch/analyze-${slug}-${dateStr}`
|
|
188
224
|
|
|
189
225
|
Bash(`mkdir -p ${sessionFolder}`)
|
|
226
|
+
Bash(`mkdir -p ${scratchDir}`)
|
|
190
227
|
```
|
|
191
228
|
|
|
192
229
|
---
|
|
@@ -197,18 +234,27 @@ Bash(`mkdir -p ${sessionFolder}`)
|
|
|
197
234
|
|
|
198
235
|
**Decomposition Rules**:
|
|
199
236
|
|
|
200
|
-
1. **
|
|
201
|
-
2. **Context loading** (phase
|
|
237
|
+
1. **Scope detection**: Already determined in Session Initialization (milestone/phase/adhoc/standalone)
|
|
238
|
+
2. **Context loading** (milestone/phase scope):
|
|
202
239
|
- Read `.workflow/project.md` -- project vision and constraints
|
|
203
240
|
- Read `.workflow/roadmap.md` -- phase structure and dependencies
|
|
204
|
-
- Read
|
|
205
|
-
-
|
|
206
|
-
-
|
|
207
|
-
- Read prior phases' `context.md` files -- skip already-decided areas
|
|
241
|
+
- Read `.workflow/state.json` → `current_milestone`, `artifacts[]`, `accumulated_context`
|
|
242
|
+
- Find prior analyze artifacts from `state.json.artifacts[]` (type=analyze, same milestone) → load their `context.md`
|
|
243
|
+
- Find brainstorm artifacts from `state.json.artifacts[]` (type=brainstorm, same milestone) → load `guidance-specification.md`
|
|
208
244
|
- Load project specs: `maestro spec load --category planning`
|
|
209
245
|
|
|
210
246
|
3. **Quick mode routing**: If QUICK_MODE, generate only wave 3 (synthesis/decide) task in CSV. Skip exploration and scoring.
|
|
211
247
|
|
|
248
|
+
3b. **Gaps mode routing** (if GAPS_MODE):
|
|
249
|
+
- Load issues from `.workflow/issues/issues.jsonl`
|
|
250
|
+
- If `gapsIssueId`: load single issue, validate existence
|
|
251
|
+
- If no ISS-ID: filter `status == "open" || status == "registered"`
|
|
252
|
+
- For each issue, generate an exploration task (wave 1) focused on issue context
|
|
253
|
+
- Generate a synthesis task (wave 2) that writes analysis records back to issues.jsonl
|
|
254
|
+
- Skip standard dimension scoring (wave 2 in normal mode)
|
|
255
|
+
- Pipeline: Load Issues → CLI Exploration per issue → Root Cause Synthesis → Write issue.analysis → Output context.md
|
|
256
|
+
- On completion: append history entry `{ action: "analyzed", at: <ISO>, by: "maestro-analyze --gaps" }` per issue
|
|
257
|
+
|
|
212
258
|
4. **Dimension and perspective selection** (full mode):
|
|
213
259
|
|
|
214
260
|
| Depth | Exploration Dimensions | Scoring Dimensions |
|
|
@@ -457,8 +503,18 @@ IF deferred_items.length > 0:
|
|
|
457
503
|
Print: "Created {N} deferred issues for tracking"
|
|
458
504
|
```
|
|
459
505
|
|
|
460
|
-
7.
|
|
461
|
-
|
|
506
|
+
7. **Register artifact in state.json**:
|
|
507
|
+
```
|
|
508
|
+
Read .workflow/state.json
|
|
509
|
+
next_id = max ANL-NNN + 1 (or 1 if none)
|
|
510
|
+
Push artifact: { id: "ANL-{next_id}", type: "analyze", milestone: current_milestone,
|
|
511
|
+
phase: phaseNum, scope: scope, path: scratchDir (relative to .workflow/),
|
|
512
|
+
status: "completed", depends_on: null, harvested: false,
|
|
513
|
+
created_at: session_start, completed_at: now() }
|
|
514
|
+
Write state.json (atomic)
|
|
515
|
+
```
|
|
516
|
+
8. Copy final outputs (context.md, analysis.md, conclusions.json) from CSV session folder to `scratchDir`
|
|
517
|
+
9. Display summary
|
|
462
518
|
|
|
463
519
|
---
|
|
464
520
|
|
|
@@ -502,7 +558,9 @@ echo '{"ts":"<ISO>","worker":"{id}","type":"exploration_finding","data":{"file":
|
|
|
502
558
|
|
|
503
559
|
| Error | Resolution |
|
|
504
560
|
|-------|------------|
|
|
505
|
-
| Subject argument missing | Abort with error: "Analysis subject required (phase number or topic text)" |
|
|
561
|
+
| Subject argument missing (non-gaps) | Abort with error: "Analysis subject required (phase number or topic text)" |
|
|
562
|
+
| --gaps but no issues found | Abort with error: "No open/registered issues in issues.jsonl" |
|
|
563
|
+
| --gaps ISS-ID not found | Abort with error: "Issue {ISS-ID} not found — run manage-issue list" |
|
|
506
564
|
| Phase directory not found | List available phases, abort with error |
|
|
507
565
|
| No prior context for quick mode | Warn: limited context, proceed with available information |
|
|
508
566
|
| Exploration agent timeout | Mark as failed, continue with remaining exploration agents |
|
|
@@ -524,7 +582,8 @@ echo '{"ts":"<ISO>","worker":"{id}","type":"exploration_finding","data":{"file":
|
|
|
524
582
|
4. **Context Propagation**: prev_context built from master CSV, not from memory
|
|
525
583
|
5. **Discovery Board is Append-Only**: Never clear, modify, or recreate discoveries.ndjson
|
|
526
584
|
6. **Quick Mode Shortcut**: With -q flag, generate only wave 3 task, skip exploration and scoring
|
|
585
|
+
6b. **Gaps Mode Pipeline**: With --gaps flag, load issues, explore per issue, write analysis records back to issues.jsonl, output context.md for plan --gaps
|
|
527
586
|
7. **Skip on Failure**: Degrade gracefully -- missing exploration reduces scoring quality, missing scoring reduces synthesis quality
|
|
528
587
|
8. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
|
529
588
|
9. **DO NOT STOP**: Continuous execution until all waves complete
|
|
530
|
-
10. **
|
|
589
|
+
10. **Tri-Output**: context.md is ALWAYS produced (all modes). analysis.md + conclusions.json are full-mode only. Gaps mode writes analysis records to issues.jsonl + context.md for plan --gaps.
|