maestro-flow 0.3.10 → 0.3.12
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/conceptual-planning-agent.md +1 -0
- package/.claude/agents/workflow-analyzer.md +114 -114
- package/.claude/agents/workflow-collab-planner.md +144 -144
- package/.claude/agents/workflow-debugger.md +102 -103
- package/.claude/agents/workflow-executor.md +127 -128
- package/.claude/agents/workflow-integration-checker.md +82 -82
- package/.claude/agents/workflow-nyquist-auditor.md +85 -84
- package/.claude/agents/workflow-phase-researcher.md +85 -85
- package/.claude/agents/workflow-plan-checker.md +90 -90
- package/.claude/agents/workflow-planner.md +178 -178
- package/.claude/agents/workflow-roadmapper.md +81 -83
- package/.claude/agents/workflow-verifier.md +119 -119
- package/.claude/commands/learn-decompose.md +176 -176
- package/.claude/commands/learn-follow.md +167 -167
- package/.claude/commands/learn-retro.md +3 -3
- package/.claude/commands/learn-second-opinion.md +2 -2
- package/.claude/commands/maestro-brainstorm.md +1 -0
- package/.claude/commands/maestro-coordinate.md +1 -3
- package/.claude/commands/maestro-fork.md +133 -111
- package/.claude/commands/maestro-merge.md +85 -77
- package/.claude/commands/maestro-plan.md +88 -2
- package/.claude/commands/maestro-roadmap.md +113 -2
- package/.claude/commands/maestro.md +1 -0
- package/.claude/commands/manage-harvest.md +131 -131
- package/.claude/commands/manage-issue.md +2 -2
- package/.claude/commands/quality-business-test.md +5 -5
- package/.claude/commands/quality-debug.md +3 -2
- package/.claude/commands/quality-retrospective.md +6 -4
- package/.claude/commands/quality-review.md +1 -1
- package/.claude/commands/quality-test-gen.md +5 -4
- package/.claude/commands/spec-add.md +67 -56
- package/.claude/commands/spec-load.md +66 -64
- package/.claude/commands/spec-setup.md +5 -9
- package/.codex/skills/learn-decompose/SKILL.md +119 -0
- package/.codex/skills/learn-follow/SKILL.md +83 -0
- package/.codex/skills/learn-investigate/SKILL.md +83 -0
- package/.codex/skills/learn-retro/SKILL.md +83 -0
- package/.codex/skills/learn-second-opinion/SKILL.md +86 -0
- package/.codex/skills/maestro/SKILL.md +151 -279
- package/.codex/skills/maestro-analyze/SKILL.md +59 -71
- package/.codex/skills/maestro-brainstorm/SKILL.md +452 -463
- package/.codex/skills/maestro-chain/SKILL.md +95 -110
- package/.codex/skills/maestro-coordinate/SKILL.md +68 -234
- package/.codex/skills/maestro-execute/SKILL.md +435 -446
- package/.codex/skills/maestro-fork/SKILL.md +98 -0
- package/.codex/skills/maestro-init/SKILL.md +172 -167
- package/.codex/skills/maestro-learn/SKILL.md +80 -0
- package/.codex/skills/maestro-link-coordinate/SKILL.md +224 -220
- package/.codex/skills/maestro-merge/SKILL.md +69 -0
- package/.codex/skills/maestro-milestone-audit/SKILL.md +108 -103
- package/.codex/skills/maestro-milestone-complete/SKILL.md +155 -149
- package/.codex/skills/maestro-milestone-release/SKILL.md +70 -0
- package/.codex/skills/maestro-overlay/SKILL.md +188 -185
- package/.codex/skills/maestro-plan/SKILL.md +58 -69
- package/.codex/skills/maestro-quick/SKILL.md +26 -23
- package/.codex/skills/maestro-roadmap/SKILL.md +65 -73
- package/.codex/skills/maestro-spec-generate/SKILL.md +66 -74
- package/.codex/skills/maestro-ui-design/SKILL.md +35 -32
- package/.codex/skills/maestro-verify/SKILL.md +556 -566
- package/.codex/skills/manage-codebase-rebuild/SKILL.md +397 -405
- package/.codex/skills/manage-codebase-refresh/SKILL.md +93 -82
- package/.codex/skills/manage-harvest/SKILL.md +82 -0
- package/.codex/skills/manage-issue/SKILL.md +80 -65
- package/.codex/skills/manage-issue-discover/SKILL.md +491 -503
- package/.codex/skills/manage-learn/SKILL.md +190 -186
- package/.codex/skills/manage-memory/SKILL.md +95 -72
- package/.codex/skills/manage-memory-capture/SKILL.md +99 -86
- package/.codex/skills/manage-status/SKILL.md +102 -89
- package/.codex/skills/quality-business-test/SKILL.md +228 -223
- package/.codex/skills/quality-debug/SKILL.md +54 -66
- package/.codex/skills/quality-integration-test/SKILL.md +532 -544
- package/.codex/skills/quality-refactor/SKILL.md +197 -191
- package/.codex/skills/quality-retrospective/SKILL.md +512 -505
- package/.codex/skills/quality-review/SKILL.md +95 -107
- package/.codex/skills/quality-sync/SKILL.md +101 -89
- package/.codex/skills/quality-test/SKILL.md +202 -198
- package/.codex/skills/quality-test-gen/SKILL.md +94 -105
- package/.codex/skills/spec-add/SKILL.md +58 -39
- package/.codex/skills/spec-load/SKILL.md +45 -40
- package/.codex/skills/spec-map/SKILL.md +180 -182
- package/.codex/skills/spec-setup/SKILL.md +94 -76
- package/.codex/skills/team-coordinate/SKILL.md +346 -357
- package/.codex/skills/team-executor/SKILL.md +70 -112
- package/.codex/skills/team-lifecycle-v4/SKILL.md +311 -299
- package/.codex/skills/team-quality-assurance/SKILL.md +234 -227
- package/.codex/skills/team-review/SKILL.md +232 -225
- package/.codex/skills/team-tech-debt/SKILL.md +78 -100
- package/.codex/skills/team-testing/SKILL.md +242 -235
- package/.codex/skills/wiki-connect/SKILL.md +75 -0
- package/.codex/skills/wiki-digest/SKILL.md +87 -0
- package/README.md +9 -4
- package/README.zh-CN.md +9 -4
- package/dashboard/dist/assets/{ArtifactsPage-DZNCi6tn.js → ArtifactsPage-CUrrDGgN.js} +1 -1
- package/dashboard/dist/assets/ChatInput-pUOLJIKE.js +49 -0
- package/dashboard/dist/assets/ChatPage-B8Xqkt0v.js +27 -0
- package/dashboard/dist/assets/{CollabPage-B4NAHXS2.js → CollabPage-DIUXeazv.js} +1 -1
- package/dashboard/dist/assets/{ExecutionPanel-CFt4LJyq.js → ExecutionPanel-VmYeADFj.js} +1 -1
- package/dashboard/dist/assets/KanbanPage-DLq8v7hg.js +21 -0
- package/dashboard/dist/assets/{MarkdownRenderer-X4af_WNb.js → MarkdownRenderer-D7AehrnR.js} +1 -1
- package/dashboard/dist/assets/{McpPage-BKfCVIyU.js → McpPage-BY0SjTgw.js} +2 -2
- package/dashboard/dist/assets/{OutputPanel-BlBQFJSW.js → OutputPanel-B-Rjwgmv.js} +1 -1
- package/dashboard/dist/assets/{ProblemsPanel-De3DLvoI.js → ProblemsPanel-GEpF-oi4.js} +1 -1
- package/dashboard/dist/assets/RequirementBoardPage-xs8uDM7I.js +6 -0
- package/dashboard/dist/assets/{RequirementPage-Bllxe2XI.js → RequirementPage-BKDSFwjA.js} +5 -10
- package/dashboard/dist/assets/SpecsPage-DLFb9ZH0.js +36 -0
- package/dashboard/dist/assets/SupervisorPage-SOki_kgz.js +6 -0
- package/dashboard/dist/assets/TeamsPage-BO2kP70F.js +11 -0
- package/dashboard/dist/assets/{TreeBrowser-Q12qobZs.js → TreeBrowser-B9DHdULE.js} +1 -1
- package/dashboard/dist/assets/{WorkflowPage-D_Fzdy3_.js → WorkflowPage-C8hWbYim.js} +1 -1
- package/dashboard/dist/assets/{check-u6fGOwQO.js → check-DJDk3A2a.js} +1 -1
- package/dashboard/dist/assets/{chevron-right-Csu22t58.js → chevron-right-C7bVDreZ.js} +1 -1
- package/dashboard/dist/assets/{circle-CMrkbRNg.js → circle-Qfgy4LB_.js} +1 -1
- package/dashboard/dist/assets/{circle-alert-c3tH1P4z.js → circle-alert-Na1vf6qQ.js} +1 -1
- package/dashboard/dist/assets/{circle-check-gYxxSYuH.js → circle-check-CEGgy3NV.js} +1 -1
- package/dashboard/dist/assets/{circle-check-big-TDSeWstm.js → circle-check-big-3JB8zRYj.js} +1 -1
- package/dashboard/dist/assets/{code-CFN2uX9V.js → code-Ble63Idz.js} +1 -1
- package/dashboard/dist/assets/{columns-3-38xIDlzy.js → columns-3-BUcKlxve.js} +1 -1
- package/dashboard/dist/assets/{download-DC7KkKyP.js → download-CMqkfn8x.js} +1 -1
- package/dashboard/dist/assets/{folder-CWq_lAnf.js → folder-B9ewx9LL.js} +1 -1
- package/dashboard/dist/assets/index-C2Mcb4TJ.js +231 -0
- package/dashboard/dist/assets/index-DyBbPc18.css +1 -0
- package/dashboard/dist/assets/{index-Do71weNR.js → index-JTmGteaT.js} +1 -1
- package/dashboard/dist/assets/{list-CgIP_2A-.js → list-DI8Wn2aT.js} +1 -1
- package/dashboard/dist/assets/loader-B5F6PzFT.js +11 -0
- package/dashboard/dist/assets/{minus-DYoN5UGk.js → minus-Lp_BfctG.js} +1 -1
- package/dashboard/dist/assets/{pen-line-Bh_WKYHm.js → pen-line-Ch7sphzZ.js} +1 -1
- package/dashboard/dist/assets/pencil-_yRMHmGT.js +6 -0
- package/dashboard/dist/assets/{proxy-BKxDAKTj.js → proxy-D72Y8a4Y.js} +1 -1
- package/dashboard/dist/assets/{search-SieXnOgr.js → search-BS6fI6Bg.js} +1 -1
- package/dashboard/dist/assets/{shallow-Bme1JY57.js → shallow-BXasQBvr.js} +1 -1
- package/dashboard/dist/assets/table-CeGlFjlP.js +6 -0
- package/dashboard/dist/assets/{terminal-BB3Xfuv5.js → terminal-BJic2yW-.js} +1 -1
- package/dashboard/dist/assets/{trash-2-C8f4vFFM.js → trash-2-Czz4X8Fb.js} +1 -1
- package/dashboard/dist/assets/{zap-4uwlzVm0.js → zap-C3H0jVFA.js} +1 -1
- package/dashboard/dist/index.html +2 -2
- package/dashboard/dist-server/dashboard/src/server/agents/agent-manager.js +16 -1
- package/dashboard/dist-server/dashboard/src/server/agents/agent-manager.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/delegate-broker-monitor.js +1 -2
- package/dashboard/dist-server/dashboard/src/server/agents/delegate-broker-monitor.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/commander/commander-prompts.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/server/commander/commander-prompts.js +2 -1
- package/dashboard/dist-server/dashboard/src/server/commander/commander-prompts.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/index.js +3 -0
- package/dashboard/dist-server/dashboard/src/server/index.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/collab.js +124 -0
- package/dashboard/dist-server/dashboard/src/server/routes/collab.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/specs.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/specs.js +75 -30
- package/dashboard/dist-server/dashboard/src/server/routes/specs.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/state/event-bus.d.ts +5 -0
- package/dashboard/dist-server/dashboard/src/server/state/event-bus.js +5 -0
- package/dashboard/dist-server/dashboard/src/server/state/event-bus.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/team-handler.d.ts +10 -0
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/team-handler.js +73 -0
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/team-handler.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/shared/collab-types.d.ts +31 -0
- package/dashboard/dist-server/dashboard/src/shared/collab-types.js +28 -0
- package/dashboard/dist-server/dashboard/src/shared/collab-types.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/constants.js +10 -0
- package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/coordinate-types.d.ts +22 -0
- package/dashboard/dist-server/dashboard/src/shared/issue-types.d.ts +12 -0
- package/dashboard/dist-server/dashboard/src/shared/issue-types.js +12 -0
- package/dashboard/dist-server/dashboard/src/shared/issue-types.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/team-types.d.ts +22 -0
- package/dashboard/dist-server/dashboard/src/shared/team-types.js +7 -0
- package/dashboard/dist-server/dashboard/src/shared/team-types.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/types.d.ts +3 -2
- package/dashboard/dist-server/dashboard/src/shared/ws-protocol.d.ts +28 -2
- package/dashboard/dist-server/dashboard/src/shared/ws-protocol.js.map +1 -1
- package/dashboard/dist-server/shared/agent-types.d.ts +4 -0
- package/dashboard/dist-server/src/hooks/constants.d.ts +3 -1
- package/dashboard/dist-server/src/hooks/constants.js +4 -2
- package/dashboard/dist-server/src/hooks/constants.js.map +1 -1
- package/dist/shared/agent-types.d.ts +4 -0
- package/dist/shared/agent-types.d.ts.map +1 -1
- package/dist/src/commands/collab.js +4 -4
- package/dist/src/commands/collab.js.map +1 -1
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +66 -1
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/install-backend.d.ts.map +1 -1
- package/dist/src/commands/install-backend.js +29 -18
- package/dist/src/commands/install-backend.js.map +1 -1
- package/dist/src/commands/spec.d.ts.map +1 -1
- package/dist/src/commands/spec.js +7 -2
- package/dist/src/commands/spec.js.map +1 -1
- package/dist/src/hooks/__tests__/statusline-visual-test.js +23 -1
- package/dist/src/hooks/__tests__/statusline-visual-test.js.map +1 -1
- package/dist/src/hooks/constants.d.ts +3 -1
- package/dist/src/hooks/constants.d.ts.map +1 -1
- package/dist/src/hooks/constants.js +4 -2
- 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/spec-validator.d.ts +25 -0
- package/dist/src/hooks/guards/spec-validator.d.ts.map +1 -0
- package/dist/src/hooks/guards/spec-validator.js +66 -0
- package/dist/src/hooks/guards/spec-validator.js.map +1 -0
- package/dist/src/hooks/keyword-spec-injector.d.ts +21 -0
- package/dist/src/hooks/keyword-spec-injector.d.ts.map +1 -0
- package/dist/src/hooks/keyword-spec-injector.js +96 -0
- package/dist/src/hooks/keyword-spec-injector.js.map +1 -0
- package/dist/src/hooks/plugins/spec-injection-plugin.d.ts +2 -1
- package/dist/src/hooks/plugins/spec-injection-plugin.d.ts.map +1 -1
- package/dist/src/hooks/plugins/spec-injection-plugin.js +21 -12
- package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
- package/dist/src/hooks/skill-context.d.ts +3 -0
- package/dist/src/hooks/skill-context.d.ts.map +1 -1
- package/dist/src/hooks/skill-context.js +95 -9
- package/dist/src/hooks/skill-context.js.map +1 -1
- package/dist/src/hooks/spec-bridge.d.ts +40 -0
- package/dist/src/hooks/spec-bridge.d.ts.map +1 -0
- package/dist/src/hooks/spec-bridge.js +97 -0
- package/dist/src/hooks/spec-bridge.js.map +1 -0
- package/dist/src/hooks/spec-injector.d.ts.map +1 -1
- package/dist/src/hooks/spec-injector.js +18 -12
- package/dist/src/hooks/spec-injector.js.map +1 -1
- package/dist/src/hooks/statusline.d.ts.map +1 -1
- package/dist/src/hooks/statusline.js +6 -3
- package/dist/src/hooks/statusline.js.map +1 -1
- package/dist/src/team/phase-orchestrator.d.ts +52 -0
- package/dist/src/team/phase-orchestrator.d.ts.map +1 -0
- package/dist/src/team/phase-orchestrator.js +165 -0
- package/dist/src/team/phase-orchestrator.js.map +1 -0
- package/dist/src/team/phase-types.d.ts +51 -0
- package/dist/src/team/phase-types.d.ts.map +1 -0
- package/dist/src/team/phase-types.js +41 -0
- package/dist/src/team/phase-types.js.map +1 -0
- package/dist/src/tools/index.d.ts.map +1 -1
- package/dist/src/tools/index.js +6 -0
- package/dist/src/tools/index.js.map +1 -1
- package/dist/src/tools/merge-validator.d.ts.map +1 -1
- package/dist/src/tools/merge-validator.js +114 -16
- package/dist/src/tools/merge-validator.js.map +1 -1
- package/dist/src/tools/spec-entry-parser.d.ts +56 -0
- package/dist/src/tools/spec-entry-parser.d.ts.map +1 -0
- package/dist/src/tools/spec-entry-parser.js +196 -0
- package/dist/src/tools/spec-entry-parser.js.map +1 -0
- package/dist/src/tools/spec-init.d.ts.map +1 -1
- package/dist/src/tools/spec-init.js +66 -92
- package/dist/src/tools/spec-init.js.map +1 -1
- package/dist/src/tools/spec-keyword-index.d.ts +30 -0
- package/dist/src/tools/spec-keyword-index.d.ts.map +1 -0
- package/dist/src/tools/spec-keyword-index.js +101 -0
- package/dist/src/tools/spec-keyword-index.js.map +1 -0
- package/dist/src/tools/spec-loader.d.ts +3 -3
- package/dist/src/tools/spec-loader.d.ts.map +1 -1
- package/dist/src/tools/spec-loader.js +49 -23
- package/dist/src/tools/spec-loader.js.map +1 -1
- package/dist/src/tools/team-agents.d.ts +27 -0
- package/dist/src/tools/team-agents.d.ts.map +1 -0
- package/dist/src/tools/team-agents.js +362 -0
- package/dist/src/tools/team-agents.js.map +1 -0
- package/dist/src/tools/team-mailbox.d.ts +40 -0
- package/dist/src/tools/team-mailbox.d.ts.map +1 -0
- package/dist/src/tools/team-mailbox.js +384 -0
- package/dist/src/tools/team-mailbox.js.map +1 -0
- package/dist/src/tools/team-msg.d.ts +17 -8
- package/dist/src/tools/team-msg.d.ts.map +1 -1
- package/dist/src/tools/team-msg.js +110 -13
- package/dist/src/tools/team-msg.js.map +1 -1
- package/dist/src/tools/team-tasks-mcp.d.ts +27 -0
- package/dist/src/tools/team-tasks-mcp.d.ts.map +1 -0
- package/dist/src/tools/team-tasks-mcp.js +408 -0
- package/dist/src/tools/team-tasks-mcp.js.map +1 -0
- package/package.json +2 -1
- package/shared/agent-types.ts +4 -0
- package/templates/worktree-scope.json +9 -10
- package/templates/worktrees.json +26 -27
- package/workflows/analyze.md +816 -816
- package/workflows/brainstorm.md +480 -471
- package/workflows/codebase-rebuild.md +332 -332
- package/workflows/codebase-refresh.md +240 -240
- package/workflows/debug.md +16 -6
- package/workflows/execute.md +1 -1
- package/workflows/fork.md +100 -36
- package/workflows/harvest.md +420 -420
- package/workflows/integration-test.md +355 -343
- package/workflows/issue-discover.md +414 -414
- package/workflows/issue.md +14 -4
- package/workflows/learn.md +19 -5
- package/workflows/maestro.md +1 -0
- package/workflows/map.md +111 -111
- package/workflows/merge.md +113 -55
- package/workflows/milestone-complete.md +176 -176
- package/workflows/plan.md +1 -1
- package/workflows/quick.md +497 -497
- package/workflows/refactor.md +300 -300
- package/workflows/retrospective.md +61 -22
- package/workflows/review.md +17 -4
- package/workflows/roadmap.md +335 -335
- package/workflows/spec-generate.md +640 -640
- package/workflows/specs-add.md +46 -81
- package/workflows/specs-load.md +15 -17
- package/workflows/specs-setup.md +40 -161
- package/workflows/test.md +12 -2
- package/workflows/ui-style.md +9 -2
- package/dashboard/dist/assets/ChatInput-Bvr-FeEq.js +0 -49
- package/dashboard/dist/assets/ChatPage-D9zTkJZo.js +0 -22
- package/dashboard/dist/assets/KanbanPage-C8USth6H.js +0 -21
- package/dashboard/dist/assets/RequirementBoardPage-Bf1trzqs.js +0 -11
- package/dashboard/dist/assets/SpecsPage-9lwxKT27.js +0 -36
- package/dashboard/dist/assets/SupervisorPage-SusdfHFq.js +0 -6
- package/dashboard/dist/assets/TeamsPage-DsuM6OwC.js +0 -6
- package/dashboard/dist/assets/arrow-left-Bqtb2hle.js +0 -6
- package/dashboard/dist/assets/index-DWG-WrzT.js +0 -231
- package/dashboard/dist/assets/index-GUNJodSR.css +0 -1
- package/dashboard/dist/assets/table-llyEtj-7.js +0 -6
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: learn-second-opinion
|
|
3
|
+
description: Multi-perspective analysis via CSV wave pipeline. Review mode spawns 3 parallel persona agents (pragmatist, purist, strategist), then synthesis agent merges verdicts. Also supports challenge and consult modes. Persists findings to lessons.jsonl.
|
|
4
|
+
argument-hint: "[-y|--yes] [-c|--concurrency 3] [--continue] \"<target> [--mode review|challenge|consult]\""
|
|
5
|
+
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<purpose>
|
|
9
|
+
Structured second-opinion for code, decisions, or plans. Three modes:
|
|
10
|
+
- **review** (default): 3 parallel persona agents independently assess target via spawn_agents_on_csv
|
|
11
|
+
- **challenge**: single adversarial agent via spawn_agents_on_csv (1 worker)
|
|
12
|
+
- **consult**: interactive Q&A (no CSV wave — direct orchestration)
|
|
13
|
+
|
|
14
|
+
Findings persist to `lessons.jsonl`. Decoupled from phase lifecycle.
|
|
15
|
+
</purpose>
|
|
16
|
+
|
|
17
|
+
<context>
|
|
18
|
+
$ARGUMENTS — target and optional flags.
|
|
19
|
+
|
|
20
|
+
**Target resolution (auto-detected):**
|
|
21
|
+
- File path → analyze file content
|
|
22
|
+
- Wiki ID (`type-slug`) → fetch via `maestro wiki get`
|
|
23
|
+
- `HEAD` / `staged` → analyze git diff
|
|
24
|
+
- Phase number → analyze phase plan
|
|
25
|
+
|
|
26
|
+
**Flags:**
|
|
27
|
+
- `--mode review` — 3-persona parallel review (default)
|
|
28
|
+
- `--mode challenge` — Adversarial single-agent analysis
|
|
29
|
+
- `--mode consult` — Interactive Q&A session
|
|
30
|
+
|
|
31
|
+
**Output**: `.workflow/learning/opinion-{slug}-{date}.md`
|
|
32
|
+
</context>
|
|
33
|
+
|
|
34
|
+
<execution>
|
|
35
|
+
|
|
36
|
+
### Phase 1: Resolve Target + Load Context
|
|
37
|
+
Resolve target to content. Load specs, wiki search, prior lessons for context brief.
|
|
38
|
+
|
|
39
|
+
### Phase 2: Execute Mode
|
|
40
|
+
|
|
41
|
+
#### Review Mode (spawn_agents_on_csv)
|
|
42
|
+
|
|
43
|
+
| id | persona | focus | grading |
|
|
44
|
+
|----|---------|-------|---------|
|
|
45
|
+
| 1 | pragmatist | Simplicity, YAGNI, maintenance cost, readability | complexity score, abstraction depth |
|
|
46
|
+
| 2 | purist | Correctness, type safety, edge cases, error handling | error paths, type completeness |
|
|
47
|
+
| 3 | strategist | Scalability, extensibility, architecture alignment | coupling, cohesion |
|
|
48
|
+
| 4 | synthesis | Merge verdicts → agreements, disagreements, top 3 recommendations | combined verdict |
|
|
49
|
+
|
|
50
|
+
Wave 1: 3 persona agents in parallel. Wave 2: synthesis agent with wave 1 findings as prev_context.
|
|
51
|
+
|
|
52
|
+
Each persona returns: `{ persona, verdict: approve|concern|reject, confidence, findings: [{severity, description, location, suggestion}], summary }`
|
|
53
|
+
|
|
54
|
+
#### Challenge Mode
|
|
55
|
+
Single agent via spawn_agents_on_csv (1 worker). Adversarial analysis with forcing questions:
|
|
56
|
+
- "What assumption would invalidate this entire approach?"
|
|
57
|
+
- "What's the simplest thing that breaks this?"
|
|
58
|
+
- "What's the implicit contract that isn't enforced?"
|
|
59
|
+
|
|
60
|
+
#### Consult Mode
|
|
61
|
+
Interactive loop via AskUserQuestion. Agent studies target, answers questions with code references. Compile Q&A into report on exit.
|
|
62
|
+
|
|
63
|
+
### Phase 3: Persist
|
|
64
|
+
1. Write `opinion-{slug}-{date}.md` with per-persona findings + synthesis
|
|
65
|
+
2. Append non-trivial findings to `lessons.jsonl` (source: "second-opinion")
|
|
66
|
+
3. Display summary with verdict and next steps
|
|
67
|
+
|
|
68
|
+
**Next steps:** `/manage-issue create`, `/learn-decompose <path>`, `/learn-follow <path>`
|
|
69
|
+
</execution>
|
|
70
|
+
|
|
71
|
+
<error_codes>
|
|
72
|
+
| Code | Severity | Condition | Recovery |
|
|
73
|
+
|------|----------|-----------|----------|
|
|
74
|
+
| E001 | error | Target not resolvable | Verify path/ID |
|
|
75
|
+
| E002 | error | Unknown --mode value | Use: review, challenge, consult |
|
|
76
|
+
| W001 | warning | Persona agent failed — partial perspectives | Proceed with available agents |
|
|
77
|
+
| W003 | warning | Git diff empty for HEAD/staged | Use file path instead |
|
|
78
|
+
</error_codes>
|
|
79
|
+
|
|
80
|
+
<success_criteria>
|
|
81
|
+
- [ ] Target resolved and context loaded
|
|
82
|
+
- [ ] Mode executed: review (3 parallel agents), challenge (adversarial), or consult (interactive)
|
|
83
|
+
- [ ] Synthesis produced with agreements, disagreements, verdict
|
|
84
|
+
- [ ] Report written to `opinion-{slug}-{date}.md`
|
|
85
|
+
- [ ] Non-trivial findings appended to `lessons.jsonl`
|
|
86
|
+
</success_criteria>
|
|
@@ -1,75 +1,51 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro
|
|
3
|
-
description: Intelligent coordinator — analyze intent, read project state, select chain, execute wave-by-wave via spawn_agents_on_csv.
|
|
3
|
+
description: Intelligent coordinator — analyze intent, read project state, select chain, execute wave-by-wave via spawn_agents_on_csv. Coordinator only assembles prompts and reads artifacts — never executes skills directly.
|
|
4
4
|
argument-hint: "\"intent text\" [-y] [-c|--continue] [--dry-run] [--chain <name>]"
|
|
5
5
|
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
<purpose>
|
|
9
|
+
Wave-based pipeline coordinator. All skill execution happens exclusively in spawned sub-agents
|
|
10
|
+
via `spawn_agents_on_csv` — the coordinator never executes skills directly.
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
Coordinator loop: classify intent → resolve chain → build wave CSV → spawn → read results →
|
|
13
|
+
(barrier: read artifacts, update context, assemble next skill_call args) → next wave → report.
|
|
11
14
|
|
|
12
|
-
|
|
15
|
+
Each wave = 1 barrier task (solo) or N parallel non-barrier tasks.
|
|
16
|
+
</purpose>
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
<required_reading>
|
|
19
|
+
@~/.maestro/workflows/maestro.codex.md — authoritative `detectTaskType`, `detectNextAction`, `chainMap` (35+ intent patterns, 40+ chain types). Read before executing any step.
|
|
20
|
+
</required_reading>
|
|
15
21
|
|
|
16
|
-
|
|
17
|
-
$
|
|
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
|
-
```
|
|
22
|
+
<context>
|
|
23
|
+
$ARGUMENTS — user intent text, or special flags.
|
|
23
24
|
|
|
24
|
-
**Flags
|
|
25
|
+
**Flags:**
|
|
25
26
|
- `-y, --yes` — Auto mode: skip all prompts; propagate `-y` to each skill
|
|
26
27
|
- `--continue` — Resume latest paused session from last incomplete wave
|
|
27
28
|
- `--dry-run` — Display planned chain without executing
|
|
28
|
-
- `--chain <name>` — Force
|
|
29
|
+
- `--chain <name>` — Force specific chain (skips intent classification)
|
|
29
30
|
|
|
30
31
|
**Session state**: `.workflow/.maestro-coordinate/{session-id}/`
|
|
31
|
-
**Core
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
32
|
+
**Core output**: `tasks.csv` (master) + `wave-{N}-results.csv` (per wave) + `context.md` (report)
|
|
33
|
+
</context>
|
|
34
|
+
|
|
35
|
+
<invariants>
|
|
36
|
+
1. **ALL skills via spawn_agents_on_csv**: Every skill invocation — barrier or non-barrier — MUST go through `spawn_agents_on_csv`. Coordinator NEVER directly executes any skill. No exceptions.
|
|
37
|
+
2. **Coordinator = prompt assembler only**: Classify intent → build CSV → spawn → read results → assemble next CSV. It never runs skill logic itself.
|
|
38
|
+
3. **Barrier ≠ execution**: Barrier designation only means the coordinator **pauses after the wave** to read artifacts and assemble the next wave's prompt args. Coordinator role at barrier: **discover artifacts → read → update context → assemble next skill_call args**. Nothing more.
|
|
39
|
+
4. **Barrier = solo wave**: A barrier skill always executes alone in its wave (wave size = 1).
|
|
40
|
+
5. **Non-barriers can parallel**: Consecutive non-barrier skills grouped into one wave (`max_workers = N`).
|
|
41
|
+
6. **Wave-by-wave**: Never start wave N+1 before wave N results are read and analyzed.
|
|
42
|
+
7. **Coordinator owns context**: Sub-agents never read prior results — coordinator assembles the full `skill_call` with resolved args.
|
|
43
|
+
8. **Simple instruction**: Sub-agent instruction is minimal — just "execute {skill_call}, report result".
|
|
44
|
+
9. **Abort on failure**: Failed step → mark remaining as skipped → report.
|
|
45
|
+
10. **Resume from wave**: `--continue` finds last completed wave, resumes from next pending step.
|
|
46
|
+
</invariants>
|
|
47
|
+
|
|
48
|
+
<chain_map>
|
|
73
49
|
| Intent keywords | Chain | Steps (skills, in order) |
|
|
74
50
|
|----------------|-------|--------------------------|
|
|
75
51
|
| fix, bug, error, broken, crash | `quality-fix` | $maestro-analyze --gaps → $maestro-plan --gaps → $maestro-execute → $maestro-verify |
|
|
@@ -78,142 +54,131 @@ Skills that produce artifacts requiring **coordinator-side analysis** before the
|
|
|
78
54
|
| feature, implement, add, build | `feature` | $maestro-plan → $maestro-execute → $maestro-verify |
|
|
79
55
|
| review, check, audit | `quality-review` | $quality-review |
|
|
80
56
|
| deploy, release, ship | `deploy` | $maestro-verify → $maestro-execute |
|
|
57
|
+
</chain_map>
|
|
81
58
|
|
|
82
|
-
|
|
59
|
+
<barrier_skills>
|
|
60
|
+
Skills that produce artifacts the coordinator must read before assembling the next wave.
|
|
61
|
+
After a barrier skill completes **in its spawned sub-agent**, coordinator reads output and updates `state.context`.
|
|
83
62
|
|
|
84
|
-
|
|
63
|
+
| Skill | Artifacts to Read | Context Updates |
|
|
64
|
+
|-------|------------------|-----------------|
|
|
65
|
+
| `maestro-analyze` | `.workflow/.csv-wave/*/context.md`, `state.json` | `gaps`, `phase`, `analysis_dir` |
|
|
66
|
+
| `maestro-plan` | `{phase_dir}/plan.json`, `{phase_dir}/.task/TASK-*.json` | `plan_dir`, `task_count`, `wave_count` |
|
|
67
|
+
| `maestro-brainstorm` | `.workflow/.csv-wave/*/.brainstorming/` | `brainstorm_dir`, `features` |
|
|
68
|
+
| `maestro-spec-generate` | `.workflow/.csv-wave/*/specs/` | `spec_session_id` |
|
|
69
|
+
| `maestro-execute` | `.workflow/.csv-wave/*/results.csv` | `exec_status`, `completed_tasks`, `failed_tasks` |
|
|
85
70
|
|
|
86
|
-
|
|
71
|
+
**Non-barrier skills** (groupable into multi-task waves): `maestro-verify`, `quality-review`, `quality-test`, `quality-debug`, `quality-refactor`, `quality-sync`, `manage-*`
|
|
87
72
|
|
|
88
|
-
###
|
|
73
|
+
### Barrier Analysis Logic
|
|
89
74
|
|
|
90
75
|
```javascript
|
|
91
|
-
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
76
|
+
function analyzeBarrierArtifacts(step, result, ctx) {
|
|
77
|
+
const artifactPath = result.artifacts;
|
|
78
|
+
switch (step.skill) {
|
|
79
|
+
case 'maestro-analyze':
|
|
80
|
+
const contextMd = Read(`${artifactPath}/context.md`);
|
|
81
|
+
ctx.analysis_dir = artifactPath;
|
|
82
|
+
ctx.gaps = extractGaps(contextMd);
|
|
83
|
+
if (!ctx.phase) ctx.phase = extractPhase(contextMd);
|
|
84
|
+
break;
|
|
85
|
+
case 'maestro-plan':
|
|
86
|
+
const planJson = JSON.parse(Read(`${artifactPath}/plan.json`));
|
|
87
|
+
ctx.plan_dir = artifactPath;
|
|
88
|
+
ctx.task_count = planJson.tasks?.length ?? 0;
|
|
89
|
+
ctx.wave_count = planJson.waves?.length ?? 0;
|
|
90
|
+
break;
|
|
91
|
+
case 'maestro-brainstorm':
|
|
92
|
+
ctx.brainstorm_dir = artifactPath;
|
|
93
|
+
break;
|
|
94
|
+
case 'maestro-spec-generate':
|
|
95
|
+
ctx.spec_session_id = extractSpecId(artifactPath);
|
|
96
|
+
break;
|
|
97
|
+
case 'maestro-execute':
|
|
98
|
+
const execResults = Read(`${artifactPath}/results.csv`);
|
|
99
|
+
ctx.exec_completed = countStatus(execResults, 'completed');
|
|
100
|
+
ctx.exec_failed = countStatus(execResults, 'failed');
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
97
104
|
```
|
|
105
|
+
</barrier_skills>
|
|
106
|
+
|
|
107
|
+
<execution>
|
|
98
108
|
|
|
99
109
|
### Phase 1: Resolve Intent and Chain
|
|
100
110
|
|
|
101
|
-
**`--continue
|
|
111
|
+
**`--continue`**: Glob `.workflow/.maestro-coordinate/MCC-*/state.json` sorted desc; load most recent; resume from first pending wave.
|
|
102
112
|
|
|
103
113
|
**Fresh mode**:
|
|
104
|
-
|
|
105
114
|
1. Read `.workflow/state.json` for project context (`current_phase`, `workflow_name`)
|
|
106
|
-
2. If `--chain`
|
|
107
|
-
3. Otherwise
|
|
108
|
-
4.
|
|
109
|
-
5. Resolve
|
|
115
|
+
2. If `--chain` given, use directly
|
|
116
|
+
3. Otherwise classify intent via keyword heuristics (see chain_map)
|
|
117
|
+
4. No match + not AUTO_YES → one clarifying question via `AskUserQuestion`
|
|
118
|
+
5. Resolve chain's skill list
|
|
110
119
|
6. Write `state.json`:
|
|
111
120
|
|
|
112
121
|
```javascript
|
|
122
|
+
const sessionId = `MCC-${dateStr}-${timeStr}`;
|
|
123
|
+
const sessionDir = `.workflow/.maestro-coordinate/${sessionId}`;
|
|
124
|
+
|
|
113
125
|
Write(`${sessionDir}/state.json`, JSON.stringify({
|
|
114
|
-
id: sessionId,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
|
126
|
+
id: sessionId, intent, chain: resolvedChain, auto_yes: AUTO_YES,
|
|
127
|
+
status: "in_progress", started_at: new Date().toISOString(),
|
|
128
|
+
context: { phase: null, plan_dir: null, analysis_dir: null,
|
|
129
|
+
brainstorm_dir: null, spec_session_id: null, gaps: null },
|
|
130
|
+
waves: [],
|
|
129
131
|
steps: chain.map((skill, i) => ({
|
|
130
|
-
step_n: i + 1,
|
|
131
|
-
|
|
132
|
-
args: skill.args ?? '',
|
|
133
|
-
status: "pending",
|
|
134
|
-
wave_n: null
|
|
132
|
+
step_n: i + 1, skill: skill.cmd, args: skill.args ?? '',
|
|
133
|
+
status: "pending", wave_n: null
|
|
135
134
|
}))
|
|
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>
|
|
135
|
+
}, null, 2));
|
|
147
136
|
```
|
|
148
137
|
|
|
149
|
-
|
|
138
|
+
**`--dry-run`**: Display chain with `[BARRIER]` markers, stop.
|
|
150
139
|
|
|
151
|
-
|
|
140
|
+
**User confirmation** (skip if AUTO_YES): Display plan, prompt `Proceed? (yes/no)`.
|
|
152
141
|
|
|
153
142
|
### Phase 2: Wave Execution Loop
|
|
154
143
|
|
|
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
144
|
```javascript
|
|
166
145
|
let waveNum = 0;
|
|
167
|
-
|
|
168
146
|
while (state.steps.some(s => s.status === 'pending')) {
|
|
169
147
|
waveNum++;
|
|
170
|
-
|
|
171
|
-
// 1. Determine wave contents
|
|
172
148
|
const waveSteps = buildNextWave(state.steps);
|
|
173
149
|
|
|
174
|
-
//
|
|
175
|
-
const
|
|
176
|
-
|
|
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}"`
|
|
150
|
+
// Build CSV — coordinator assembles skill_call, sub-agent executes verbatim
|
|
151
|
+
const csvContent = 'id,skill_call,topic\n' + waveSteps.map(step =>
|
|
152
|
+
`"${step.step_n}","${buildSkillCall(step, state.context).replace(/"/g, '""')}","Chain \"${state.chain}\" step ${step.step_n}/${state.steps.length}"`
|
|
184
153
|
).join('\n');
|
|
185
154
|
Write(`${sessionDir}/wave-${waveNum}.csv`, csvContent);
|
|
186
155
|
|
|
187
|
-
//
|
|
156
|
+
// Spawn — ALL execution via spawn_agents_on_csv, never direct
|
|
188
157
|
spawn_agents_on_csv({
|
|
189
158
|
csv_path: `${sessionDir}/wave-${waveNum}.csv`,
|
|
190
|
-
id_column: "id",
|
|
191
|
-
instruction: WAVE_INSTRUCTION,
|
|
159
|
+
id_column: "id", instruction: WAVE_INSTRUCTION,
|
|
192
160
|
max_workers: waveSteps.length > 1 ? waveSteps.length : 1,
|
|
193
161
|
max_runtime_seconds: 1800,
|
|
194
162
|
output_csv_path: `${sessionDir}/wave-${waveNum}-results.csv`,
|
|
195
163
|
output_schema: RESULT_SCHEMA
|
|
196
164
|
});
|
|
197
165
|
|
|
198
|
-
//
|
|
166
|
+
// Read results, update status
|
|
199
167
|
const results = readCSV(`${sessionDir}/wave-${waveNum}-results.csv`);
|
|
200
168
|
for (const row of results) {
|
|
201
169
|
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;
|
|
170
|
+
step.status = row.status; step.findings = row.findings; step.wave_n = waveNum;
|
|
205
171
|
}
|
|
206
172
|
|
|
207
|
-
//
|
|
173
|
+
// Barrier: read artifacts, update context (NOT execute — skill already ran in sub-agent)
|
|
208
174
|
if (isBarrier(waveSteps[0].skill)) {
|
|
209
175
|
analyzeBarrierArtifacts(waveSteps[0], results[0], state.context);
|
|
210
176
|
}
|
|
211
177
|
|
|
212
|
-
//
|
|
178
|
+
// Persist + abort check
|
|
213
179
|
state.waves.push({ wave_n: waveNum, steps: waveSteps.map(s => s.step_n), results });
|
|
214
180
|
Write(`${sessionDir}/state.json`, JSON.stringify(state, null, 2));
|
|
215
181
|
|
|
216
|
-
// 8. Abort on failure
|
|
217
182
|
if (results.some(r => r.status === 'failed')) {
|
|
218
183
|
state.status = 'aborted';
|
|
219
184
|
state.steps.filter(s => s.status === 'pending').forEach(s => s.status = 'skipped');
|
|
@@ -223,99 +188,13 @@ while (state.steps.some(s => s.status === 'pending')) {
|
|
|
223
188
|
}
|
|
224
189
|
```
|
|
225
190
|
|
|
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
191
|
### Skill Call Assembly
|
|
310
192
|
|
|
311
|
-
The coordinator builds each `skill_call` with resolved context — sub-agents just execute verbatim:
|
|
312
|
-
|
|
313
193
|
```javascript
|
|
314
194
|
const BARRIER_SKILLS = new Set([
|
|
315
195
|
'maestro-analyze', 'maestro-plan', 'maestro-brainstorm',
|
|
316
196
|
'maestro-spec-generate', 'maestro-execute'
|
|
317
197
|
]);
|
|
318
|
-
|
|
319
198
|
const AUTO_FLAG_MAP = {
|
|
320
199
|
'maestro-analyze': '-y', 'maestro-brainstorm': '-y',
|
|
321
200
|
'maestro-ui-design': '-y', 'maestro-plan': '--auto',
|
|
@@ -332,25 +211,18 @@ function buildSkillCall(step, ctx) {
|
|
|
332
211
|
.replace(/{analysis_dir}/g, ctx.analysis_dir ?? '')
|
|
333
212
|
.replace(/{brainstorm_dir}/g, ctx.brainstorm_dir ?? '')
|
|
334
213
|
.replace(/{spec_session_id}/g, ctx.spec_session_id ?? '');
|
|
335
|
-
|
|
336
214
|
if (state.auto_yes) {
|
|
337
215
|
const flag = AUTO_FLAG_MAP[step.skill];
|
|
338
216
|
if (flag && !args.includes(flag)) args = args ? `${args} ${flag}` : flag;
|
|
339
217
|
}
|
|
340
|
-
|
|
341
218
|
return `$${step.skill} ${args}`.trim();
|
|
342
219
|
}
|
|
343
220
|
|
|
344
221
|
function buildNextWave(steps) {
|
|
345
222
|
const pending = steps.filter(s => s.status === 'pending');
|
|
346
223
|
if (!pending.length) return [];
|
|
347
|
-
|
|
348
|
-
const
|
|
349
|
-
// Barrier skill → solo wave
|
|
350
|
-
if (BARRIER_SKILLS.has(first.skill)) return [first];
|
|
351
|
-
|
|
352
|
-
// Group consecutive non-barriers
|
|
353
|
-
const wave = [first];
|
|
224
|
+
if (BARRIER_SKILLS.has(pending[0].skill)) return [pending[0]];
|
|
225
|
+
const wave = [pending[0]];
|
|
354
226
|
for (let i = 1; i < pending.length; i++) {
|
|
355
227
|
if (BARRIER_SKILLS.has(pending[i].skill)) break;
|
|
356
228
|
wave.push(pending[i]);
|
|
@@ -359,38 +231,42 @@ function buildNextWave(steps) {
|
|
|
359
231
|
}
|
|
360
232
|
```
|
|
361
233
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
### Phase 3: Completion Report
|
|
234
|
+
### Sub-Agent Instruction Template
|
|
365
235
|
|
|
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
236
|
```
|
|
237
|
+
你是 CSV job 子 agent。
|
|
371
238
|
|
|
372
|
-
|
|
239
|
+
先原样执行这一段技能调用:
|
|
240
|
+
{skill_call}
|
|
373
241
|
|
|
374
|
-
|
|
375
|
-
|
|
242
|
+
然后基于结果完成这一行任务说明:
|
|
243
|
+
{topic}
|
|
376
244
|
|
|
377
|
-
|
|
378
|
-
-
|
|
379
|
-
-
|
|
380
|
-
- Waves: {waveNum} executed
|
|
381
|
-
- Steps: {completed}/{total} completed
|
|
245
|
+
限制:
|
|
246
|
+
- 不要修改 .workflow/.maestro-coordinate/ 下的 state 文件
|
|
247
|
+
- skill 内部有自己的 session 管理,按 skill SKILL.md 执行即可
|
|
382
248
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|------|-----------|--------|---------|
|
|
387
|
-
| {step_n} | {skill_call} | {status} | {summary} |
|
|
249
|
+
最后必须调用 `report_agent_job_result`,返回 JSON:
|
|
250
|
+
{"status":"completed|failed","skill_call":"{skill_call}","summary":"一句话结果","artifacts":"产物路径或空字符串","error":"失败原因或空字符串"}
|
|
251
|
+
```
|
|
388
252
|
|
|
389
|
-
|
|
390
|
-
|
|
253
|
+
### Result Schema
|
|
254
|
+
|
|
255
|
+
```javascript
|
|
256
|
+
const RESULT_SCHEMA = {
|
|
257
|
+
type: "object",
|
|
258
|
+
properties: {
|
|
259
|
+
status: { type: "string", enum: ["completed", "failed"] },
|
|
260
|
+
skill_call: { type: "string" },
|
|
261
|
+
summary: { type: "string" },
|
|
262
|
+
artifacts: { type: "string" },
|
|
263
|
+
error: { type: "string" }
|
|
264
|
+
},
|
|
265
|
+
required: ["status", "skill_call", "summary", "artifacts", "error"]
|
|
266
|
+
};
|
|
391
267
|
```
|
|
392
268
|
|
|
393
|
-
|
|
269
|
+
### Phase 3: Completion Report
|
|
394
270
|
|
|
395
271
|
```
|
|
396
272
|
=== COORDINATE COMPLETE ===
|
|
@@ -408,11 +284,9 @@ WAVE RESULTS:
|
|
|
408
284
|
State: .workflow/.maestro-coordinate/<sessionId>/state.json
|
|
409
285
|
Resume: $maestro --continue
|
|
410
286
|
```
|
|
287
|
+
</execution>
|
|
411
288
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
## CSV Schema
|
|
415
|
-
|
|
289
|
+
<csv_schema>
|
|
416
290
|
### wave-{N}.csv (Per-Wave Input)
|
|
417
291
|
|
|
418
292
|
```csv
|
|
@@ -433,11 +307,9 @@ id,skill,args,wave_n,status,findings,artifacts,error
|
|
|
433
307
|
```
|
|
434
308
|
|
|
435
309
|
Accumulated across all waves. Updated after each wave completes.
|
|
310
|
+
</csv_schema>
|
|
436
311
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
## Error Handling
|
|
440
|
-
|
|
312
|
+
<error_codes>
|
|
441
313
|
| Code | Severity | Condition | Recovery |
|
|
442
314
|
|------|----------|-----------|----------|
|
|
443
315
|
| E001 | error | Intent unclassifiable after clarification | Default to `feature` chain |
|
|
@@ -446,18 +318,18 @@ Accumulated across all waves. Updated after each wave completes.
|
|
|
446
318
|
| E004 | error | Barrier artifact not found | Retry wave once, then abort |
|
|
447
319
|
| E005 | error | `--continue`: no session found | List sessions, prompt |
|
|
448
320
|
| W001 | warning | Barrier artifact partial | Continue with available context |
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
321
|
+
</error_codes>
|
|
322
|
+
|
|
323
|
+
<success_criteria>
|
|
324
|
+
- [ ] Intent classified and chain resolved (keyword heuristics or `--chain`)
|
|
325
|
+
- [ ] Session dir initialized with `state.json` before first wave
|
|
326
|
+
- [ ] Every skill invocation goes through `spawn_agents_on_csv` — none executed in coordinator
|
|
327
|
+
- [ ] Barrier skills execute solo in their wave; coordinator only reads artifacts afterward
|
|
328
|
+
- [ ] Non-barrier skills grouped into parallel waves where possible
|
|
329
|
+
- [ ] Each wave: CSV built → spawned → results read → state updated
|
|
330
|
+
- [ ] Barrier artifacts read and context updated before assembling next wave's skill_call args
|
|
331
|
+
- [ ] Failed step → remaining marked skipped → abort reported
|
|
332
|
+
- [ ] Completion report with per-wave status written to `context.md`
|
|
333
|
+
- [ ] `--dry-run` shows chain with [BARRIER] markers, no execution
|
|
334
|
+
- [ ] `--continue` resumes from last incomplete wave
|
|
335
|
+
</success_criteria>
|