maestro-flow 0.3.46 → 0.3.48
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/ui-design-agent.md +1 -0
- package/.claude/agents/workflow-executor.md +3 -0
- package/.claude/commands/learn-decompose.md +91 -146
- package/.claude/commands/learn-follow.md +102 -137
- package/.claude/commands/learn-investigate.md +102 -167
- package/.claude/commands/learn-retro.md +100 -243
- package/.claude/commands/learn-second-opinion.md +95 -135
- package/.claude/commands/maestro-amend.md +95 -232
- package/.claude/commands/maestro-analyze.md +1 -6
- package/.claude/commands/maestro-collab.md +104 -265
- package/.claude/commands/maestro-composer.md +113 -293
- package/.claude/commands/maestro-execute.md +10 -17
- package/.claude/commands/maestro-impeccable.md +89 -0
- package/.claude/commands/maestro-plan.md +1 -6
- package/.claude/commands/maestro-player.md +111 -340
- package/.claude/commands/maestro-quick.md +9 -0
- package/.claude/commands/maestro-ralph-execute.md +167 -210
- package/.claude/commands/maestro-ralph.md +245 -426
- package/.claude/commands/maestro-ui-codify.md +13 -0
- package/.claude/commands/maestro-ui-craft.md +364 -0
- package/.claude/commands/maestro-ui-design.md +12 -1
- package/.claude/commands/maestro-verify.md +12 -13
- package/.claude/commands/maestro.md +142 -72
- package/.claude/commands/manage-knowhow-capture.md +45 -170
- package/.claude/commands/quality-auto-test.md +9 -0
- package/.claude/commands/quality-debug.md +11 -25
- package/.claude/commands/quality-refactor.md +9 -0
- package/.claude/commands/quality-review.md +5 -14
- package/.claude/commands/spec-add.md +1 -1
- package/.claude/commands/spec-load.md +3 -2
- package/.claude/skills/maestro-impeccable/SKILL.md +169 -0
- package/.codex/skills/learn-decompose/SKILL.md +1 -1
- package/.codex/skills/learn-investigate/SKILL.md +2 -1
- package/.codex/skills/maestro/SKILL.md +420 -313
- package/.codex/skills/maestro-analyze/SKILL.md +126 -417
- package/.codex/skills/maestro-brainstorm/SKILL.md +129 -451
- package/.codex/skills/maestro-collab/SKILL.md +134 -547
- package/.codex/skills/maestro-execute/SKILL.md +3 -1
- package/.codex/skills/maestro-impeccable/SKILL.md +112 -0
- package/.codex/skills/maestro-plan/SKILL.md +88 -437
- package/.codex/skills/maestro-player/SKILL.md +191 -333
- package/.codex/skills/maestro-quick/SKILL.md +2 -0
- package/.codex/skills/maestro-ralph/SKILL.md +327 -710
- package/.codex/skills/maestro-roadmap/SKILL.md +201 -518
- package/.codex/skills/maestro-ui-codify/SKILL.md +1 -0
- package/.codex/skills/maestro-ui-craft/SKILL.md +341 -0
- package/.codex/skills/maestro-ui-design/SKILL.md +10 -0
- package/.codex/skills/maestro-verify/SKILL.md +116 -409
- package/.codex/skills/quality-auto-test/SKILL.md +145 -443
- package/.codex/skills/quality-refactor/SKILL.md +1 -1
- package/.codex/skills/quality-test/SKILL.md +229 -517
- package/.codex/skills/spec-add/SKILL.md +1 -1
- package/README.md +4 -1
- package/README.zh-CN.md +3 -1
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +3 -0
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/install.js +110 -1
- package/dashboard/dist-server/dashboard/src/server/routes/install.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/settings.js +56 -0
- package/dashboard/dist-server/dashboard/src/server/routes/settings.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js +2 -0
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js +2 -2
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +2 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-types.d.ts +3 -1
- package/dashboard/dist-server/dashboard/src/shared/constants.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/shared/constants.js +2 -0
- package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
- package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.js +1 -3
- package/dist/src/agents/cli-agent-runner.js.map +1 -1
- package/dist/src/agents/cli-history-store.d.ts +5 -0
- package/dist/src/agents/cli-history-store.d.ts.map +1 -1
- package/dist/src/agents/cli-history-store.js +65 -13
- package/dist/src/agents/cli-history-store.js.map +1 -1
- package/dist/src/cli.js +13 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/command-help.d.ts +3 -0
- package/dist/src/commands/command-help.d.ts.map +1 -0
- package/dist/src/commands/command-help.js +60 -0
- package/dist/src/commands/command-help.js.map +1 -0
- package/dist/src/commands/config.d.ts.map +1 -1
- package/dist/src/commands/config.js +17 -0
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/delegate.d.ts.map +1 -1
- package/dist/src/commands/delegate.js +12 -2
- package/dist/src/commands/delegate.js.map +1 -1
- package/dist/src/commands/impeccable.d.ts +10 -0
- package/dist/src/commands/impeccable.d.ts.map +1 -0
- package/dist/src/commands/impeccable.js +181 -0
- package/dist/src/commands/impeccable.js.map +1 -0
- package/dist/src/commands/spec.js +1 -1
- package/dist/src/commands/spec.js.map +1 -1
- package/dist/src/commands/wiki.d.ts.map +1 -1
- package/dist/src/commands/wiki.js +5 -1
- package/dist/src/commands/wiki.js.map +1 -1
- package/dist/src/config/cli-tools-config.d.ts.map +1 -1
- package/dist/src/config/cli-tools-config.js +10 -7
- package/dist/src/config/cli-tools-config.js.map +1 -1
- package/dist/src/core/addon-registry.d.ts +31 -0
- package/dist/src/core/addon-registry.d.ts.map +1 -0
- package/dist/src/core/addon-registry.js +28 -0
- package/dist/src/core/addon-registry.js.map +1 -0
- package/dist/src/hooks/plugins/spec-injection-plugin.js +2 -0
- package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
- package/dist/src/hooks/spec-injector.js +2 -2
- package/dist/src/hooks/spec-injector.js.map +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/tools/impeccable/critique-storage.d.ts +28 -0
- package/dist/src/tools/impeccable/critique-storage.d.ts.map +1 -0
- package/dist/src/tools/impeccable/critique-storage.js +120 -0
- package/dist/src/tools/impeccable/critique-storage.js.map +1 -0
- package/dist/src/tools/impeccable/design-parser.d.ts +90 -0
- package/dist/src/tools/impeccable/design-parser.d.ts.map +1 -0
- package/dist/src/tools/impeccable/design-parser.js +696 -0
- package/dist/src/tools/impeccable/design-parser.js.map +1 -0
- package/dist/src/tools/impeccable/detect-csp.d.ts +6 -0
- package/dist/src/tools/impeccable/detect-csp.d.ts.map +1 -0
- package/dist/src/tools/impeccable/detect-csp.js +130 -0
- package/dist/src/tools/impeccable/detect-csp.js.map +1 -0
- package/dist/src/tools/impeccable/is-generated.d.ts +4 -0
- package/dist/src/tools/impeccable/is-generated.d.ts.map +1 -0
- package/dist/src/tools/impeccable/is-generated.js +56 -0
- package/dist/src/tools/impeccable/is-generated.js.map +1 -0
- package/dist/src/tools/impeccable/live/accept.d.ts +50 -0
- package/dist/src/tools/impeccable/live/accept.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/accept.js +556 -0
- package/dist/src/tools/impeccable/live/accept.js.map +1 -0
- package/dist/src/tools/impeccable/live/bootstrap.d.ts +2 -0
- package/dist/src/tools/impeccable/live/bootstrap.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/bootstrap.js +244 -0
- package/dist/src/tools/impeccable/live/bootstrap.js.map +1 -0
- package/dist/src/tools/impeccable/live/complete.d.ts +7 -0
- package/dist/src/tools/impeccable/live/complete.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/complete.js +67 -0
- package/dist/src/tools/impeccable/live/complete.js.map +1 -0
- package/dist/src/tools/impeccable/live/completion.d.ts +24 -0
- package/dist/src/tools/impeccable/live/completion.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/completion.js +26 -0
- package/dist/src/tools/impeccable/live/completion.js.map +1 -0
- package/dist/src/tools/impeccable/live/inject.d.ts +41 -0
- package/dist/src/tools/impeccable/live/inject.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/inject.js +394 -0
- package/dist/src/tools/impeccable/live/inject.js.map +1 -0
- package/dist/src/tools/impeccable/live/poll.d.ts +24 -0
- package/dist/src/tools/impeccable/live/poll.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/poll.js +180 -0
- package/dist/src/tools/impeccable/live/poll.js.map +1 -0
- package/dist/src/tools/impeccable/live/resume.d.ts +5 -0
- package/dist/src/tools/impeccable/live/resume.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/resume.js +30 -0
- package/dist/src/tools/impeccable/live/resume.js.map +1 -0
- package/dist/src/tools/impeccable/live/server.d.ts +6 -0
- package/dist/src/tools/impeccable/live/server.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/server.js +867 -0
- package/dist/src/tools/impeccable/live/server.js.map +1 -0
- package/dist/src/tools/impeccable/live/session-store.d.ts +72 -0
- package/dist/src/tools/impeccable/live/session-store.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/session-store.js +281 -0
- package/dist/src/tools/impeccable/live/session-store.js.map +1 -0
- package/dist/src/tools/impeccable/live/static/live-browser-session.js +123 -0
- package/dist/src/tools/impeccable/live/static/live-browser.js +4860 -0
- package/dist/src/tools/impeccable/live/static/modern-screenshot.umd.js +14 -0
- package/dist/src/tools/impeccable/live/status.d.ts +2 -0
- package/dist/src/tools/impeccable/live/status.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/status.js +52 -0
- package/dist/src/tools/impeccable/live/status.js.map +1 -0
- package/dist/src/tools/impeccable/live/wrap.d.ts +33 -0
- package/dist/src/tools/impeccable/live/wrap.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/wrap.js +572 -0
- package/dist/src/tools/impeccable/live/wrap.js.map +1 -0
- package/dist/src/tools/impeccable/load-context.d.ts +13 -0
- package/dist/src/tools/impeccable/load-context.d.ts.map +1 -0
- package/dist/src/tools/impeccable/load-context.js +79 -0
- package/dist/src/tools/impeccable/load-context.js.map +1 -0
- package/dist/src/tools/impeccable/paths.d.ts +34 -0
- package/dist/src/tools/impeccable/paths.d.ts.map +1 -0
- package/dist/src/tools/impeccable/paths.js +102 -0
- package/dist/src/tools/impeccable/paths.js.map +1 -0
- package/dist/src/tools/spec-entry-parser.d.ts +1 -1
- package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
- package/dist/src/tools/spec-entry-parser.js +1 -1
- package/dist/src/tools/spec-entry-parser.js.map +1 -1
- package/dist/src/tools/spec-init.d.ts.map +1 -1
- package/dist/src/tools/spec-init.js +26 -1
- package/dist/src/tools/spec-init.js.map +1 -1
- package/dist/src/tools/spec-loader.d.ts +1 -1
- package/dist/src/tools/spec-loader.d.ts.map +1 -1
- package/dist/src/tools/spec-loader.js +2 -0
- package/dist/src/tools/spec-loader.js.map +1 -1
- package/package.json +2 -2
- package/workflows/claude-instructions.md +17 -5
- package/workflows/cli-tools-usage.md +10 -3
- package/workflows/delegate-usage.md +3 -2
- package/workflows/impeccable/adapt.md +190 -0
- package/workflows/impeccable/animate.md +175 -0
- package/workflows/impeccable/audit.md +133 -0
- package/workflows/impeccable/bolder.md +113 -0
- package/workflows/impeccable/brand.md +118 -0
- package/workflows/impeccable/clarify.md +174 -0
- package/workflows/impeccable/codex.md +105 -0
- package/workflows/impeccable/cognitive-load.md +106 -0
- package/workflows/impeccable/color-and-contrast.md +105 -0
- package/workflows/impeccable/colorize.md +154 -0
- package/workflows/impeccable/craft.md +123 -0
- package/workflows/impeccable/critique.md +261 -0
- package/workflows/impeccable/delight.md +302 -0
- package/workflows/impeccable/distill.md +111 -0
- package/workflows/impeccable/document.md +439 -0
- package/workflows/impeccable/extract.md +69 -0
- package/workflows/impeccable/harden.md +347 -0
- package/workflows/impeccable/heuristics-scoring.md +234 -0
- package/workflows/impeccable/interaction-design.md +195 -0
- package/workflows/impeccable/layout.md +141 -0
- package/workflows/impeccable/live.md +622 -0
- package/workflows/impeccable/motion-design.md +109 -0
- package/workflows/impeccable/onboard.md +234 -0
- package/workflows/impeccable/optimize.md +258 -0
- package/workflows/impeccable/overdrive.md +130 -0
- package/workflows/impeccable/personas.md +179 -0
- package/workflows/impeccable/polish.md +242 -0
- package/workflows/impeccable/product.md +62 -0
- package/workflows/impeccable/quieter.md +99 -0
- package/workflows/impeccable/responsive-design.md +114 -0
- package/workflows/impeccable/shape.md +165 -0
- package/workflows/impeccable/spatial-design.md +100 -0
- package/workflows/impeccable/teach.md +168 -0
- package/workflows/impeccable/typeset.md +124 -0
- package/workflows/impeccable/typography.md +159 -0
- package/workflows/impeccable/ux-writing.md +107 -0
- package/workflows/impeccable.md +164 -0
- package/workflows/maestro.md +7 -3
- package/workflows/skill-authoring.md +265 -0
- package/workflows/specs-add.md +3 -2
- package/workflows/specs-load.md +2 -1
- package/workflows/specs-setup.md +21 -1
|
@@ -6,626 +6,213 @@ allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
<purpose>
|
|
9
|
-
Wave-based multi-CLI collaboration
|
|
10
|
-
|
|
11
|
-
Each CLI tool independently analyzes the same requirement from its own perspective. Results are cross-verified for conflicts, then synthesized into a single actionable output.
|
|
12
|
-
|
|
13
|
-
**Core workflow**: Parse Requirement -> CLI Fan-Out -> Cross-Verify -> Synthesize
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
+---------------------------------------------------------------------------+
|
|
17
|
-
| COLLAB CSV WAVE WORKFLOW |
|
|
18
|
-
+---------------------------------------------------------------------------+
|
|
19
|
-
| |
|
|
20
|
-
| Phase 1: Requirement Resolution -> CSV |
|
|
21
|
-
| +-- Parse requirement and flags from arguments |
|
|
22
|
-
| +-- Select CLI tools (explicit --tools or auto-select) |
|
|
23
|
-
| +-- Load project context (project.md, specs, codebase) |
|
|
24
|
-
| +-- Generate tasks.csv with fan-out + verify + synthesis rows |
|
|
25
|
-
| +-- User validates tool selection (skip if -y) |
|
|
26
|
-
| |
|
|
27
|
-
| Phase 2: Wave Execution Engine |
|
|
28
|
-
| +-- Wave 1: CLI Fan-Out (parallel, 2-5 agents) |
|
|
29
|
-
| | +-- Each agent delegates to one CLI tool via exec_command |
|
|
30
|
-
| | +-- Same requirement, different CLI perspective |
|
|
31
|
-
| | +-- Results: per-tool findings + recommendations |
|
|
32
|
-
| +-- Wave 2: Cross-Verification (single agent) |
|
|
33
|
-
| | +-- Compare all CLI outputs for consensus/conflicts |
|
|
34
|
-
| | +-- Tag: [CONSENSUS] / [CONFLICT] / [UNIQUE] |
|
|
35
|
-
| | +-- Results: conflict matrix + agreement areas |
|
|
36
|
-
| +-- Wave 3: Synthesis (single agent) |
|
|
37
|
-
| | +-- Merge verified findings into actionable output |
|
|
38
|
-
| | +-- Resolve conflicts with evidence-weighted voting |
|
|
39
|
-
| | +-- Generate final collab-report.md |
|
|
40
|
-
| +-- discoveries.ndjson shared across all waves (append-only) |
|
|
41
|
-
| |
|
|
42
|
-
| Phase 3: Results Aggregation |
|
|
43
|
-
| +-- Export results.csv + collab-report.md |
|
|
44
|
-
| +-- Display summary with consensus level + next steps |
|
|
45
|
-
| |
|
|
46
|
-
+---------------------------------------------------------------------------+
|
|
47
|
-
```
|
|
9
|
+
Wave-based multi-CLI collaboration via `spawn_agents_on_csv`. Diamond topology:
|
|
10
|
+
Wave 1 (parallel CLI fan-out) → Wave 2 (cross-verify) → Wave 3 (synthesis).
|
|
48
11
|
|
|
12
|
+
Each CLI tool independently analyzes the requirement. Results cross-verified for consensus/conflicts, synthesized into unified report.
|
|
49
13
|
</purpose>
|
|
50
14
|
|
|
51
15
|
<context>
|
|
52
|
-
|
|
53
|
-
$maestro-collab "analyze the auth module for security vulnerabilities"
|
|
54
|
-
$maestro-collab "design a caching strategy for the API layer" --tools gemini,qwen,claude
|
|
55
|
-
$maestro-collab -y "review error handling patterns across the codebase"
|
|
56
|
-
$maestro-collab "refactor user service to use repository pattern" --mode write --tools gemini,claude
|
|
57
|
-
```
|
|
16
|
+
$ARGUMENTS — requirement text and optional flags.
|
|
58
17
|
|
|
59
18
|
**Flags**:
|
|
60
|
-
- `--tools <list>`: Comma-separated CLI tools (default:
|
|
19
|
+
- `--tools <list>`: Comma-separated CLI tools (default: first 3 enabled)
|
|
61
20
|
- `--mode analysis|write`: Delegate mode (default: analysis)
|
|
62
|
-
- `--rule <template>`: Shared rule template
|
|
63
|
-
- `-y
|
|
64
|
-
- `-c
|
|
65
|
-
|
|
66
|
-
**Auto-select
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
21
|
+
- `--rule <template>`: Shared rule template
|
|
22
|
+
- `-y`: Skip confirmations
|
|
23
|
+
- `-c N`: Max concurrency per wave (default: 5)
|
|
24
|
+
|
|
25
|
+
**Auto-select** (no --tools): read `~/.maestro/cli-tools.json` → filter enabled + eligible → first 3. Exclude api-endpoint when --mode write. Minimum 2 required.
|
|
26
|
+
|
|
27
|
+
**Session**: `.workflow/.csv-wave/{YYYYMMDD}-collab-{slug}/`
|
|
28
|
+
**Scratch**: `.workflow/scratch/{YYYYMMDD}-collab-{slug}/`
|
|
29
|
+
|
|
30
|
+
**Output files**:
|
|
31
|
+
- `collab-report.md` — merged findings (Consensus/Conflicts/Unique/Recommendations)
|
|
32
|
+
- `context.md` — Locked/Free/Deferred decisions (plan compatible)
|
|
33
|
+
- `conclusions.json` — session_id, tools[], consensus_level, recommendation, confidence, dimensions[], decisions[]
|
|
34
|
+
- `per-tool/{tool}-output.md` — raw outputs
|
|
74
35
|
</context>
|
|
75
36
|
|
|
76
37
|
<csv_schema>
|
|
77
38
|
|
|
78
|
-
### tasks.csv
|
|
39
|
+
### tasks.csv
|
|
79
40
|
|
|
80
41
|
```csv
|
|
81
42
|
id,title,description,tool,role,prompt,mode,rule,deps,context_from,wave,status,findings,recommendations,confidence,error
|
|
82
|
-
"1","CLI: gemini","
|
|
83
|
-
"2","CLI:
|
|
84
|
-
"3","
|
|
85
|
-
"4","
|
|
86
|
-
"5","Synthesis","Merge verified findings into actionable collab-report.md","","","","","","4","4","3","","","","",""
|
|
43
|
+
"1","CLI: gemini","...","gemini","analyze","<prompt>","analysis","","","","1","","","","",""
|
|
44
|
+
"2","CLI: claude","...","claude","analyze","<prompt>","analysis","","","","1","","","","",""
|
|
45
|
+
"3","Cross-Verify","Compare CLI outputs: CONSENSUS/CONFLICT/UNIQUE","","","","","","1;2","1;2","2","","","","",""
|
|
46
|
+
"4","Synthesis","Merge verified findings → collab-report.md + context.md + conclusions.json","","","","","","3","3","3","","","","",""
|
|
87
47
|
```
|
|
88
48
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
| Column | Phase | Description |
|
|
92
|
-
|--------|-------|-------------|
|
|
93
|
-
| `id` | Input | Unique task identifier |
|
|
94
|
-
| `title` | Input | Short task title |
|
|
95
|
-
| `description` | Input | Detailed instructions for this task |
|
|
96
|
-
| `tool` | Input | CLI tool name (wave 1 only) |
|
|
97
|
-
| `role` | Input | Delegate --role value |
|
|
98
|
-
| `prompt` | Input | Full 6-field prompt for delegate |
|
|
99
|
-
| `mode` | Input | analysis or write |
|
|
100
|
-
| `rule` | Input | --rule template name (optional) |
|
|
101
|
-
| `deps` | Input | Semicolon-separated dependency task IDs |
|
|
102
|
-
| `context_from` | Input | Semicolon-separated task IDs for prev_context |
|
|
103
|
-
| `wave` | Computed | Wave number (1=fan-out, 2=verify, 3=synthesis) |
|
|
104
|
-
| `status` | Output | pending -> completed / failed |
|
|
105
|
-
| `findings` | Output | Key findings summary (max 500 chars) |
|
|
106
|
-
| `recommendations` | Output | Per-tool recommendations |
|
|
107
|
-
| `confidence` | Output | Self-assessed confidence (0-100) |
|
|
108
|
-
| `error` | Output | Error message if failed |
|
|
109
|
-
|
|
110
|
-
### Session Structure
|
|
111
|
-
|
|
112
|
-
```
|
|
113
|
-
.workflow/.csv-wave/{YYYYMMDD}-collab-{slug}/
|
|
114
|
-
+-- tasks.csv
|
|
115
|
-
+-- results.csv
|
|
116
|
-
+-- discoveries.ndjson
|
|
117
|
-
+-- collab-report.md
|
|
118
|
-
+-- context.md ← standard Locked/Free/Deferred format (downstream compatible)
|
|
119
|
-
+-- conclusions.json ← structured conclusions (plan fast-track compatible)
|
|
120
|
-
+-- wave-{N}.csv (temporary)
|
|
121
|
-
+-- per-tool/
|
|
122
|
-
+-- gemini-output.md
|
|
123
|
-
+-- qwen-output.md
|
|
124
|
-
+-- claude-output.md
|
|
125
|
-
```
|
|
49
|
+
Input columns: id, title, description, tool, role, prompt, mode, rule, deps, context_from, wave.
|
|
50
|
+
Output columns: status (pending→completed/failed), findings, recommendations, confidence, error.
|
|
126
51
|
|
|
127
52
|
### Downstream Compatibility
|
|
128
53
|
|
|
129
|
-
| Consumer |
|
|
130
|
-
|
|
131
|
-
|
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
| **maestro-ralph** | auto — lifecycle position inference includes collab | artifact chain lookup |
|
|
54
|
+
| Consumer | Artifact |
|
|
55
|
+
|----------|----------|
|
|
56
|
+
| maestro-plan | context.md + conclusions.json (via --dir) |
|
|
57
|
+
| maestro-analyze | context.md as prior context (via state.json) |
|
|
58
|
+
| maestro-ralph | artifact chain lookup (type=collab) |
|
|
135
59
|
|
|
136
|
-
`context.md` uses the standard Locked/Free/Deferred decision format. `conclusions.json` follows the same schema as maestro-analyze's output. This allows plan to skip wave 1 exploration when collab has already produced structured conclusions.
|
|
137
60
|
</csv_schema>
|
|
138
61
|
|
|
139
62
|
<invariants>
|
|
140
|
-
1. **
|
|
141
|
-
2. **
|
|
142
|
-
3. **
|
|
143
|
-
4. **
|
|
144
|
-
5. **
|
|
145
|
-
6. **
|
|
146
|
-
7. **
|
|
147
|
-
8. **Delegate Protocol**: All exec_command calls follow delegate-protocol.codex.md (yield_time + poll)
|
|
148
|
-
9. **DO NOT STOP**: Continuous execution until all waves complete
|
|
149
|
-
10. **Partial Degradation**: If 1+ tool fails in wave 1, continue with available results
|
|
63
|
+
1. **Wave order sacred**: Never execute wave N+1 before wave N completes
|
|
64
|
+
2. **CSV is source of truth**: Master tasks.csv holds all state
|
|
65
|
+
3. **Same prompt, different tool**: Wave 1 agents all use same base prompt, only --to differs
|
|
66
|
+
4. **Minimum 2 tools**: Abort if fewer eligible
|
|
67
|
+
5. **Delegate protocol**: All exec_command calls follow delegate-protocol.codex.md (yield_time + poll)
|
|
68
|
+
6. **Partial degradation**: If 1+ tool fails in wave 1, continue with remaining
|
|
69
|
+
7. **Discovery board append-only**: Never modify/delete discoveries.ndjson
|
|
150
70
|
</invariants>
|
|
151
71
|
|
|
152
|
-
<
|
|
153
|
-
|
|
154
|
-
### Session Initialization
|
|
155
|
-
|
|
156
|
-
**Parse from `$ARGUMENTS`**:
|
|
157
|
-
|
|
158
|
-
| Variable | Source | Default |
|
|
159
|
-
|----------|--------|---------|
|
|
160
|
-
| `AUTO_YES` | `--yes` or `-y` | false |
|
|
161
|
-
| `maxConcurrency` | `--concurrency N` or `-c N` | 5 |
|
|
162
|
-
| `selectedTools` | `--tools <list>` | auto-select |
|
|
163
|
-
| `delegateMode` | `--mode` | `analysis` |
|
|
164
|
-
| `ruleTemplate` | `--rule` | null |
|
|
165
|
-
| `requirement` | remaining text after flag removal | "" (E001 if empty) |
|
|
166
|
-
|
|
167
|
-
**Auto-bootstrap**: If `.workflow/` missing, create minimal structure.
|
|
168
|
-
|
|
169
|
-
**Session paths** (UTC+8 date prefix):
|
|
170
|
-
- `slug` ← requirement kebab-cased, max 40 chars
|
|
171
|
-
- `sessionFolder`: `.workflow/.csv-wave/{YYYYMMDD}-collab-{slug}/`
|
|
72
|
+
<state_machine>
|
|
172
73
|
|
|
173
|
-
|
|
74
|
+
<states>
|
|
75
|
+
S_PARSE — 解析参数、发现工具 PERSIST: —
|
|
76
|
+
S_CONFIRM — 展示计划、用户确认(-y 跳过) PERSIST: —
|
|
77
|
+
S_CSV_GEN — 生成 tasks.csv PERSIST: tasks.csv
|
|
78
|
+
S_WAVE_1 — CLI Fan-Out (parallel spawn) PERSIST: per-tool outputs + tasks.csv
|
|
79
|
+
S_WAVE_2 — Cross-Verify (single agent spawn) PERSIST: tasks.csv
|
|
80
|
+
S_WAVE_3 — Synthesis (single agent spawn) PERSIST: reports + tasks.csv
|
|
81
|
+
S_AGGREGATE — 注册 artifact、输出摘要 PERSIST: state.json + results.csv
|
|
82
|
+
</states>
|
|
174
83
|
|
|
175
|
-
|
|
84
|
+
<transitions>
|
|
176
85
|
|
|
177
|
-
|
|
86
|
+
S_PARSE:
|
|
87
|
+
→ S_CONFIRM WHEN: eligible tools >= 2 DO: A_PARSE_AND_DISCOVER
|
|
88
|
+
→ ERROR(E002) WHEN: eligible tools < 2
|
|
178
89
|
|
|
179
|
-
|
|
90
|
+
S_CONFIRM:
|
|
91
|
+
→ S_CSV_GEN WHEN: -y OR user confirms "执行"
|
|
92
|
+
→ S_PARSE WHEN: user modifies tools DO: re-select, validate >= 2
|
|
93
|
+
→ END WHEN: user cancels
|
|
180
94
|
|
|
181
|
-
|
|
95
|
+
S_CSV_GEN:
|
|
96
|
+
→ S_WAVE_1 DO: A_GENERATE_CSV (N tool rows wave 1 + 1 verify wave 2 + 1 synthesis wave 3)
|
|
182
97
|
|
|
183
|
-
|
|
98
|
+
S_WAVE_1:
|
|
99
|
+
→ S_WAVE_2 WHEN: 1+ agents completed DO: A_SPAWN_WAVE_1
|
|
100
|
+
→ ERROR(E004) WHEN: all failed
|
|
184
101
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
availableTools.push({
|
|
188
|
-
name: tool.name,
|
|
189
|
-
enabled: tool.enabled,
|
|
190
|
-
type: tool.type, // builtin | cli-wrapper | api-endpoint
|
|
191
|
-
model: tool.primaryModel,
|
|
192
|
-
tags: tool.tags, // [fullstack, frontend, backend, ...]
|
|
193
|
-
eligible: tool.enabled
|
|
194
|
-
&& (delegateMode != "write" || tool.type != "api-endpoint")
|
|
195
|
-
})
|
|
196
|
-
```
|
|
102
|
+
S_WAVE_2:
|
|
103
|
+
→ S_WAVE_3 DO: A_SPAWN_WAVE_2
|
|
197
104
|
|
|
198
|
-
|
|
105
|
+
S_WAVE_3:
|
|
106
|
+
→ S_AGGREGATE DO: A_SPAWN_WAVE_3
|
|
199
107
|
|
|
200
|
-
|
|
108
|
+
S_AGGREGATE:
|
|
109
|
+
→ END DO: A_AGGREGATE_RESULTS
|
|
201
110
|
|
|
202
|
-
|
|
203
|
-
|--------|-------|
|
|
204
|
-
| `--tools` explicit | Use provided list, validate each is eligible |
|
|
205
|
-
| No `--tools` | Take first 3 eligible tools in config order |
|
|
111
|
+
</transitions>
|
|
206
112
|
|
|
207
|
-
|
|
113
|
+
<actions>
|
|
208
114
|
|
|
209
|
-
|
|
210
|
-
- Read `.workflow/project.md` if exists
|
|
211
|
-
- Load project specs: `maestro spec load --category coding` (if available)
|
|
212
|
-
- Grep for relevant codebase files based on requirement keywords
|
|
115
|
+
### A_PARSE_AND_DISCOVER
|
|
213
116
|
|
|
214
|
-
|
|
117
|
+
1. Parse flags: requirement, tools, mode, rule, autoYes, concurrency
|
|
118
|
+
2. Read cli-tools.json → build eligible tool list
|
|
119
|
+
3. Auto-select if no --tools: first 3 eligible in config order
|
|
120
|
+
4. Load context: project.md + `maestro spec load --category arch` + `maestro wiki list --category arch`
|
|
121
|
+
5. Build shared delegate prompt (6-field format: PURPOSE/TASK/MODE/CONTEXT/EXPECTED/CONSTRAINTS)
|
|
215
122
|
|
|
216
|
-
|
|
217
|
-
PURPOSE: {requirement}; success = actionable findings with evidence
|
|
218
|
-
TASK: {auto-decomposed from requirement into 3-5 specific verbs}
|
|
219
|
-
MODE: {delegateMode}
|
|
220
|
-
CONTEXT: @**/* | Memory: {project context if available}
|
|
221
|
-
EXPECTED: Structured findings with file:line references, confidence score (0-100), prioritized recommendations
|
|
222
|
-
CONSTRAINTS: {from requirement} | Output findings as structured text with sections: ## Findings, ## Recommendations, ## Confidence
|
|
223
|
-
```
|
|
123
|
+
### A_GENERATE_CSV
|
|
224
124
|
|
|
225
|
-
|
|
125
|
+
Create session + scratch dirs. Write tasks.csv:
|
|
126
|
+
- Wave 1: one row per selected tool (parallel)
|
|
127
|
+
- Wave 2: cross-verify row (deps on all wave 1 IDs)
|
|
128
|
+
- Wave 3: synthesis row (deps on wave 2 ID)
|
|
226
129
|
|
|
227
|
-
|
|
130
|
+
### A_SPAWN_WAVE_1
|
|
228
131
|
|
|
229
|
-
|
|
230
|
-
============================================================
|
|
231
|
-
COLLABORATION PLAN
|
|
232
|
-
============================================================
|
|
233
|
-
Requirement: {requirement}
|
|
234
|
-
Mode: {delegateMode}
|
|
235
|
-
Rule: {ruleTemplate || "none"}
|
|
236
|
-
|
|
237
|
-
Available CLI Tools (from cli-tools.json):
|
|
238
|
-
[✓] gemini — gemini-3.1-pro-preview [fullstack, frontend]
|
|
239
|
-
[✓] claude — claude-sonnet-4-6 [fullstack]
|
|
240
|
-
[✓] codex — gpt-5.5 [fullstack, backend]
|
|
241
|
-
[ ] opencode — (no model) [fullstack]
|
|
242
|
-
|
|
243
|
-
Selected: gemini, claude, codex (3 tools)
|
|
244
|
-
|
|
245
|
-
Pipeline:
|
|
246
|
-
Wave 1: Fan-out → gemini + claude + codex (parallel)
|
|
247
|
-
Wave 2: Cross-verification (conflicts/consensus)
|
|
248
|
-
Wave 3: Synthesis → context.md + conclusions.json
|
|
249
|
-
|
|
250
|
-
Prompt Preview:
|
|
251
|
-
PURPOSE: {first 80 chars}...
|
|
252
|
-
TASK: {task verbs}
|
|
253
|
-
============================================================
|
|
254
|
-
```
|
|
132
|
+
Filter wave==1 from CSV → write wave-1.csv.
|
|
255
133
|
|
|
256
|
-
```json
|
|
257
|
-
request_user_input({
|
|
258
|
-
"questions": [{
|
|
259
|
-
"id": "collab_plan",
|
|
260
|
-
"header": "Collaboration Plan",
|
|
261
|
-
"question": "以上为协作计划。如何继续?",
|
|
262
|
-
"options": [
|
|
263
|
-
{
|
|
264
|
-
"label": "执行 (Recommended)",
|
|
265
|
-
"description": "使用选中的 {N} 个 CLI 工具开始协作分析"
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
"label": "修改工具选择",
|
|
269
|
-
"description": "更改参与协作的 CLI 工具组合"
|
|
270
|
-
},
|
|
271
|
-
{
|
|
272
|
-
"label": "取消",
|
|
273
|
-
"description": "中止协作,不执行任何调用"
|
|
274
|
-
}
|
|
275
|
-
]
|
|
276
|
-
}]
|
|
277
|
-
})
|
|
278
134
|
```
|
|
279
|
-
|
|
280
|
-
**Handle user response**:
|
|
281
|
-
|
|
282
|
-
| Response | Action |
|
|
283
|
-
|----------|--------|
|
|
284
|
-
| **执行** | Proceed to step 6 (CSV generation) |
|
|
285
|
-
| **修改工具选择** | → Tool Modification Interaction (step 5a) |
|
|
286
|
-
| **取消** | Abort with message "协作已取消" |
|
|
287
|
-
|
|
288
|
-
#### 5a. Tool Modification Interaction
|
|
289
|
-
|
|
290
|
-
Present all eligible tools as toggleable options:
|
|
291
|
-
|
|
292
|
-
```json
|
|
293
|
-
request_user_input({
|
|
294
|
-
"questions": [{
|
|
295
|
-
"id": "tool_selection",
|
|
296
|
-
"header": "CLI Tool Selection",
|
|
297
|
-
"question": "选择参与协作的 CLI 工具(至少 2 个):",
|
|
298
|
-
"options": [
|
|
299
|
-
{ "label": "gemini", "description": "gemini-3.1-pro-preview — fullstack, frontend" },
|
|
300
|
-
{ "label": "claude", "description": "claude-sonnet-4-6 — fullstack" },
|
|
301
|
-
{ "label": "codex", "description": "gpt-5.5 — fullstack, backend" },
|
|
302
|
-
{ "label": "opencode", "description": "(no model) — fullstack" }
|
|
303
|
-
]
|
|
304
|
-
}]
|
|
305
|
-
})
|
|
135
|
+
spawn_agents_on_csv({ csv_path: "wave-1.csv", max_concurrency: N })
|
|
306
136
|
```
|
|
307
137
|
|
|
308
|
-
|
|
309
|
-
- `label` = tool name
|
|
310
|
-
- `description` = `{primaryModel} — {tags.join(", ")}`
|
|
311
|
-
|
|
312
|
-
Parse user selection → update `selectedTools`. Validate minimum 2 (re-prompt if fewer).
|
|
313
|
-
Return to step 5 to re-display updated plan.
|
|
314
|
-
|
|
315
|
-
**6. CSV generation**:
|
|
316
|
-
- N tool rows (wave 1, one per selected tool)
|
|
317
|
-
- 1 cross-verify row (wave 2, deps on all wave 1)
|
|
318
|
-
- 1 synthesis row (wave 3, deps on wave 2)
|
|
319
|
-
|
|
320
|
-
### Phase 2: Wave Execution Engine
|
|
321
|
-
|
|
322
|
-
#### Wave 1: CLI Fan-Out (Parallel)
|
|
323
|
-
|
|
324
|
-
Filter `wave == 1 && status == pending` from master CSV. Write `wave-1.csv`.
|
|
325
|
-
|
|
326
|
-
Each wave 1 agent:
|
|
327
|
-
|
|
328
|
-
1. Read task row: extract `tool`, `prompt`, `mode`, `rule`
|
|
329
|
-
2. Execute delegate (blocking):
|
|
330
|
-
|
|
331
|
-
```
|
|
332
|
-
exec_command({
|
|
333
|
-
cmd: `maestro delegate "${prompt}" --to ${tool} --mode ${mode} ${rule ? '--rule ' + rule : ''}`,
|
|
334
|
-
yield_time_ms: 30000,
|
|
335
|
-
max_output_tokens: 6000
|
|
336
|
-
})
|
|
337
|
-
// If session_id returned -> poll write_stdin until completion
|
|
338
|
-
// See @~/.maestro/workflows/delegate-protocol.codex.md
|
|
339
|
-
```
|
|
138
|
+
**Agent instruction**: Execute `maestro delegate "<prompt>" --to <tool> --mode <mode>` via exec_command (delegate-protocol.codex.md). Write output to per-tool/{tool}-output.md. Extract findings/recommendations/confidence. Append discoveries.ndjson.
|
|
340
139
|
|
|
341
|
-
|
|
342
|
-
4. Write per-tool output to `per-tool/{tool}-output.md`
|
|
343
|
-
5. Share findings via discovery board
|
|
344
|
-
|
|
345
|
-
```javascript
|
|
346
|
-
spawn_agents_on_csv({
|
|
347
|
-
csv_path: `${sessionFolder}/wave-1.csv`,
|
|
348
|
-
id_column: "id",
|
|
349
|
-
instruction: buildFanOutInstruction(sessionFolder),
|
|
350
|
-
max_concurrency: maxConcurrency,
|
|
351
|
-
max_runtime_seconds: 3600,
|
|
352
|
-
output_csv_path: `${sessionFolder}/wave-1-results.csv`,
|
|
353
|
-
output_schema: { id, status: ["completed"|"failed"], findings, recommendations, confidence, error }
|
|
354
|
-
})
|
|
355
|
-
```
|
|
140
|
+
Merge results → master tasks.csv.
|
|
356
141
|
|
|
357
|
-
|
|
142
|
+
### A_SPAWN_WAVE_2
|
|
358
143
|
|
|
359
|
-
|
|
144
|
+
Filter wave==2 → write wave-2.csv. Build prev_context from wave 1 findings.
|
|
360
145
|
|
|
361
146
|
```
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
1. Read your task row for: tool, prompt, mode, rule
|
|
365
|
-
2. Execute the delegate call using exec_command (follow delegate-protocol.codex.md):
|
|
366
|
-
exec_command({
|
|
367
|
-
cmd: `maestro delegate "<prompt>" --to <tool> --mode <mode> [--rule <rule>]`,
|
|
368
|
-
yield_time_ms: 30000, max_output_tokens: 6000
|
|
369
|
-
})
|
|
370
|
-
3. If session_id returned, poll via write_stdin until completion
|
|
371
|
-
4. Write full output to {sessionFolder}/per-tool/{tool}-output.md
|
|
372
|
-
5. Extract: findings (key points), recommendations (actionable items), confidence (0-100)
|
|
373
|
-
6. Share via discoveries.ndjson: type="cli_finding", data={tool, dimension, finding, confidence}
|
|
374
|
-
7. Report result with findings, recommendations, confidence
|
|
147
|
+
spawn_agents_on_csv({ csv_path: "wave-2.csv", max_concurrency: 1 })
|
|
375
148
|
```
|
|
376
149
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
Filter `wave == 2 && status == pending`. Build `prev_context` from wave 1 findings.
|
|
150
|
+
**Agent instruction**: Read all per-tool outputs + discoveries.ndjson. Classify each finding:
|
|
380
151
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
max_concurrency: 1,
|
|
387
|
-
max_runtime_seconds: 3600,
|
|
388
|
-
output_csv_path: `${sessionFolder}/wave-2-results.csv`,
|
|
389
|
-
output_schema: { id, status: ["completed"|"failed"], findings, recommendations, confidence, error }
|
|
390
|
-
})
|
|
391
|
-
```
|
|
152
|
+
| Condition | Tag |
|
|
153
|
+
|-----------|-----|
|
|
154
|
+
| 2+ tools agree | CONSENSUS |
|
|
155
|
+
| Tools disagree | CONFLICT |
|
|
156
|
+
| 1 tool only | UNIQUE |
|
|
392
157
|
|
|
393
|
-
|
|
158
|
+
Compute consensus_level = consensus_count / total * 100.
|
|
394
159
|
|
|
395
|
-
|
|
396
|
-
You are a cross-verification agent. Compare outputs from multiple CLI tools.
|
|
397
|
-
|
|
398
|
-
1. Read all per-tool outputs from {sessionFolder}/per-tool/
|
|
399
|
-
2. Read discoveries.ndjson for shared findings
|
|
400
|
-
3. For each finding across tools, classify:
|
|
401
|
-
- [CONSENSUS]: 2+ tools agree on same finding/recommendation
|
|
402
|
-
- [CONFLICT]: Tools disagree on approach/assessment
|
|
403
|
-
- [UNIQUE]: Finding from only one tool (may be valuable or noise)
|
|
404
|
-
4. For [CONFLICT] items: note each tool's position and evidence strength
|
|
405
|
-
5. Compute consensus_level: (consensus_count / total_findings) * 100
|
|
406
|
-
6. Write findings as structured text:
|
|
407
|
-
## Consensus Areas
|
|
408
|
-
## Conflicts (with per-tool positions)
|
|
409
|
-
## Unique Findings (with source tool)
|
|
410
|
-
## Consensus Level: {N}%
|
|
411
|
-
```
|
|
160
|
+
Merge results → master tasks.csv.
|
|
412
161
|
|
|
413
|
-
|
|
162
|
+
### A_SPAWN_WAVE_3
|
|
414
163
|
|
|
415
|
-
|
|
164
|
+
Filter wave==3 → write wave-3.csv. Build prev_context from wave 2 findings.
|
|
416
165
|
|
|
417
|
-
Filter `wave == 3 && status == pending`. Build `prev_context` from wave 2 findings.
|
|
418
|
-
|
|
419
|
-
```javascript
|
|
420
|
-
spawn_agents_on_csv({
|
|
421
|
-
csv_path: `${sessionFolder}/wave-3.csv`,
|
|
422
|
-
id_column: "id",
|
|
423
|
-
instruction: buildSynthesisInstruction(sessionFolder),
|
|
424
|
-
max_concurrency: 1,
|
|
425
|
-
max_runtime_seconds: 3600,
|
|
426
|
-
output_csv_path: `${sessionFolder}/wave-3-results.csv`,
|
|
427
|
-
output_schema: { id, status: ["completed"|"failed"], findings, recommendations, confidence, error }
|
|
428
|
-
})
|
|
429
166
|
```
|
|
430
|
-
|
|
431
|
-
**Synthesis Agent Instruction**:
|
|
432
|
-
|
|
167
|
+
spawn_agents_on_csv({ csv_path: "wave-3.csv", max_concurrency: 1 })
|
|
433
168
|
```
|
|
434
|
-
You are a synthesis agent. Merge cross-verified findings into a final report.
|
|
435
|
-
|
|
436
|
-
1. Read cross-verification results from prev_context
|
|
437
|
-
2. Read all per-tool outputs from {sessionFolder}/per-tool/
|
|
438
|
-
3. Read discoveries.ndjson
|
|
439
|
-
4. Resolve [CONFLICT] items via evidence-weighted voting:
|
|
440
|
-
- Higher confidence tool's position wins
|
|
441
|
-
- More specific evidence (file:line refs) wins over general statements
|
|
442
|
-
- If tied: present both with [SUGGESTED] tag
|
|
443
|
-
5. Generate collab-report.md:
|
|
444
|
-
|
|
445
|
-
# Multi-CLI Collaboration Report -- {requirement}
|
|
446
|
-
|
|
447
|
-
## Summary
|
|
448
|
-
- Tools: {tool_list}
|
|
449
|
-
- Consensus level: {N}%
|
|
450
|
-
- Key finding: {top finding}
|
|
451
|
-
|
|
452
|
-
## Consensus Findings
|
|
453
|
-
{merged findings agreed by 2+ tools}
|
|
454
|
-
|
|
455
|
-
## Resolved Conflicts
|
|
456
|
-
{conflicts resolved with rationale}
|
|
457
|
-
|
|
458
|
-
## Unresolved Items
|
|
459
|
-
{items requiring human judgment}
|
|
460
|
-
|
|
461
|
-
## Unique Insights
|
|
462
|
-
{valuable unique findings with source attribution}
|
|
463
|
-
|
|
464
|
-
## Recommendations
|
|
465
|
-
{prioritized, merged recommendations}
|
|
466
|
-
|
|
467
|
-
## Per-Tool Confidence
|
|
468
|
-
| Tool | Confidence | Key Strength |
|
|
469
|
-
|------|-----------|--------------|
|
|
470
169
|
|
|
471
|
-
|
|
170
|
+
**Agent instruction**: Resolve conflicts via evidence-weighted voting (higher confidence wins, specific evidence > general). Generate 3 files:
|
|
171
|
+
1. **collab-report.md**: Summary, Consensus Findings, Resolved Conflicts, Unresolved Items, Unique Insights, Recommendations, Per-Tool Confidence table
|
|
172
|
+
2. **context.md**: Locked (CONSENSUS), Free (UNIQUE w/ strong evidence), Deferred (UNRESOLVED). Standard Locked/Free/Deferred format.
|
|
173
|
+
3. **conclusions.json**: session_id, subject, mode, tools[], consensus_level, recommendation (Go/No-Go/Conditional), confidence, dimensions[], decisions[]
|
|
472
174
|
|
|
473
|
-
|
|
175
|
+
Merge results → master tasks.csv.
|
|
474
176
|
|
|
475
|
-
|
|
476
|
-
**Mode**: collab ({tool_list})
|
|
477
|
-
**Consensus Level**: {N}%
|
|
177
|
+
### A_AGGREGATE_RESULTS
|
|
478
178
|
|
|
479
|
-
|
|
179
|
+
1. Export tasks.csv → results.csv
|
|
180
|
+
2. Verify outputs exist (fallback: build minimal from available findings)
|
|
181
|
+
3. Copy collab-report.md + context.md + conclusions.json → scratchDir
|
|
182
|
+
4. Register CLB artifact in state.json (type: collab, scope: adhoc)
|
|
183
|
+
5. Spec enrichment: for each Locked decision → `maestro spec add arch`
|
|
184
|
+
6. Display summary (requirement, tools, consensus_level, per-tool status, artifact ID, next steps)
|
|
480
185
|
|
|
481
|
-
|
|
482
|
-
- **Context**: {what and why}
|
|
483
|
-
- **Options**: 1. {opt1} 2. {opt2}
|
|
484
|
-
- **Chosen**: {selected — from consensus or evidence-weighted resolution}
|
|
485
|
-
- **Reason**: {rationale — include which tools agreed/disagreed}
|
|
186
|
+
</actions>
|
|
486
187
|
|
|
487
|
-
|
|
188
|
+
</state_machine>
|
|
488
189
|
|
|
489
|
-
|
|
490
|
-
{[CONSENSUS] items — agreed by 2+ tools, treat as confirmed decisions}
|
|
190
|
+
<discovery_board>
|
|
491
191
|
|
|
492
|
-
|
|
493
|
-
|
|
192
|
+
| Type | Dedup Key | Data |
|
|
193
|
+
|------|-----------|------|
|
|
194
|
+
| cli_finding | tool+dimension | {tool, dimension, finding, confidence, evidence} |
|
|
195
|
+
| consensus | area | {area, tools[], finding, confidence} |
|
|
196
|
+
| conflict | area | {area, positions[{tool, stance, evidence}], resolution} |
|
|
197
|
+
| unique_insight | tool+finding | {tool, finding, significance, actionable} |
|
|
494
198
|
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
## Code Context
|
|
499
|
-
{file:line references from per-tool findings}
|
|
500
|
-
|
|
501
|
-
7. Generate conclusions.json (plan fast-track compatible):
|
|
502
|
-
|
|
503
|
-
{
|
|
504
|
-
"session_id": "<session>",
|
|
505
|
-
"subject": "<requirement>",
|
|
506
|
-
"mode": "collab",
|
|
507
|
-
"tools": ["gemini", "qwen", "claude"],
|
|
508
|
-
"consensus_level": 85,
|
|
509
|
-
"recommendation": "Go|No-Go|Conditional",
|
|
510
|
-
"confidence": "high|medium|low",
|
|
511
|
-
"dimensions": [
|
|
512
|
-
{ "name": "<tool>", "score": 80, "findings": "...", "recommendations": "..." }
|
|
513
|
-
],
|
|
514
|
-
"decisions": [
|
|
515
|
-
{ "title": "...", "classification": "locked|free|deferred", "source_tools": ["gemini","qwen"], "rationale": "..." }
|
|
516
|
-
],
|
|
517
|
-
"timestamp": "<ISO>"
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
8. Write collab-report.md, context.md, conclusions.json to {sessionFolder}/
|
|
521
|
-
```
|
|
522
|
-
|
|
523
|
-
Merge results into master `tasks.csv`, delete `wave-3.csv`.
|
|
524
|
-
|
|
525
|
-
### Phase 3: Results Aggregation
|
|
526
|
-
|
|
527
|
-
1. Export final `tasks.csv` as `results.csv`
|
|
528
|
-
2. Verify `collab-report.md` + `context.md` + `conclusions.json` exist (if synthesis failed, build minimal versions from available findings)
|
|
529
|
-
3. Copy final outputs to `scratchDir`:
|
|
530
|
-
- `collab-report.md` → `{scratchDir}/collab-report.md`
|
|
531
|
-
- `context.md` → `{scratchDir}/context.md`
|
|
532
|
-
- `conclusions.json` → `{scratchDir}/conclusions.json`
|
|
533
|
-
|
|
534
|
-
4. **Register artifact in state.json**:
|
|
535
|
-
```json
|
|
536
|
-
{
|
|
537
|
-
"id": "CLB-{next_id}",
|
|
538
|
-
"type": "collab",
|
|
539
|
-
"milestone": "{current_milestone}",
|
|
540
|
-
"phase": null,
|
|
541
|
-
"scope": "adhoc",
|
|
542
|
-
"path": "scratch/{YYYYMMDD}-collab-{slug}",
|
|
543
|
-
"status": "completed",
|
|
544
|
-
"depends_on": null,
|
|
545
|
-
"harvested": false,
|
|
546
|
-
"created_at": "<ISO>",
|
|
547
|
-
"completed_at": "<ISO>"
|
|
548
|
-
}
|
|
549
|
-
```
|
|
550
|
-
|
|
551
|
-
5. **Spec Enrichment**: For each Locked decision in context.md:
|
|
552
|
-
- `maestro spec add arch "<decision.title>" "<decision.rationale>" --keywords ... --source collab:{sessionId}`
|
|
553
|
-
|
|
554
|
-
6. Display summary:
|
|
555
|
-
|
|
556
|
-
```
|
|
557
|
-
============================================================
|
|
558
|
-
MULTI-CLI COLLABORATION COMPLETE
|
|
559
|
-
============================================================
|
|
560
|
-
Requirement: {requirement}
|
|
561
|
-
Tools: {tool_list}
|
|
562
|
-
Consensus Level: {N}%
|
|
563
|
-
Wave Results: {completed}/{total} tasks
|
|
564
|
-
|
|
565
|
-
Per-Tool:
|
|
566
|
-
gemini: {status} (confidence: {N}%)
|
|
567
|
-
qwen: {status} (confidence: {N}%)
|
|
568
|
-
claude: {status} (confidence: {N}%)
|
|
569
|
-
|
|
570
|
-
Artifact: CLB-{id} registered in state.json
|
|
571
|
-
Output: {scratchDir}/
|
|
572
|
-
|
|
573
|
-
Next steps:
|
|
574
|
-
$maestro-analyze "{topic}" -- Deep feasibility analysis
|
|
575
|
-
$maestro-plan "{phase} --dir {scratchDir}" -- Plan from collab conclusions
|
|
576
|
-
$maestro-brainstorm "{topic}" -- Expand with multi-role brainstorm
|
|
577
|
-
============================================================
|
|
578
|
-
```
|
|
579
|
-
|
|
580
|
-
### Shared Discovery Board Protocol
|
|
581
|
-
|
|
582
|
-
#### Domain Discovery Types
|
|
583
|
-
|
|
584
|
-
| Type | Dedup Key | Data Schema | Description |
|
|
585
|
-
|------|-----------|-------------|-------------|
|
|
586
|
-
| `cli_finding` | `data.tool+data.dimension` | `{tool, dimension, finding, confidence, evidence}` | Per-tool finding |
|
|
587
|
-
| `consensus` | `data.area` | `{area, tools[], finding, confidence}` | Cross-tool agreement |
|
|
588
|
-
| `conflict` | `data.area` | `{area, positions[{tool, stance, evidence}], resolution}` | Cross-tool disagreement |
|
|
589
|
-
| `unique_insight` | `data.tool+data.finding` | `{tool, finding, significance, actionable}` | Single-tool unique finding |
|
|
590
|
-
|
|
591
|
-
#### Protocol
|
|
592
|
-
|
|
593
|
-
Read `discoveries.ndjson` before analysis. Append-only: dedup by type+key, never modify/delete.
|
|
594
|
-
|
|
595
|
-
</execution>
|
|
199
|
+
Protocol: read before analysis, append-only, dedup by type+key.
|
|
200
|
+
</discovery_board>
|
|
596
201
|
|
|
597
202
|
<error_codes>
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
|
602
|
-
|
|
|
603
|
-
|
|
|
604
|
-
|
|
|
605
|
-
| W001 | warning | One tool failed in wave 1 | Continue with remaining tools |
|
|
606
|
-
| W002 | warning | Cross-verify found >50% conflicts | Highlight in report, recommend manual review |
|
|
607
|
-
| W003 | warning | Synthesis agent failed | Use cross-verify output as fallback report |
|
|
608
|
-
| W004 | warning | Low consensus level (<40%) | Flag in summary, tools may need different prompts |
|
|
609
|
-
|
|
203
|
+
| Code | Condition | Recovery |
|
|
204
|
+
|------|-----------|----------|
|
|
205
|
+
| E002 | Fewer than 2 eligible tools | Check cli-tools.json |
|
|
206
|
+
| E004 | All wave 1 delegates failed | Abort with per-tool error details |
|
|
207
|
+
| W001 | One tool failed wave 1 | Continue with remaining |
|
|
208
|
+
| W003 | Synthesis failed | Use cross-verify output as fallback |
|
|
209
|
+
| W004 | consensus_level < 40% | Flag in summary |
|
|
610
210
|
</error_codes>
|
|
611
211
|
|
|
612
212
|
<success_criteria>
|
|
613
|
-
- [ ]
|
|
614
|
-
- [ ]
|
|
615
|
-
- [ ]
|
|
616
|
-
- [ ]
|
|
617
|
-
- [ ]
|
|
618
|
-
- [ ] All wave 1 delegates executed via delegate-protocol.codex.md (blocking poll)
|
|
619
|
-
- [ ] Per-tool outputs written to per-tool/{tool}-output.md
|
|
620
|
-
- [ ] Cross-verification completed with consensus/conflict/unique classification
|
|
621
|
-
- [ ] Synthesis produced collab-report.md with merged findings
|
|
622
|
-
- [ ] context.md produced in standard Locked/Free/Deferred format (downstream compatible)
|
|
623
|
-
- [ ] conclusions.json produced with per-tool dimensions and decision trail (plan fast-track compatible)
|
|
624
|
-
- [ ] Consensus level computed and displayed
|
|
625
|
-
- [ ] Results.csv exported with all task statuses
|
|
626
|
-
- [ ] CLB artifact registered in state.json
|
|
627
|
-
- [ ] Final outputs copied to scratchDir (collab-report.md, context.md, conclusions.json)
|
|
628
|
-
- [ ] Spec enrichment applied for Locked decisions
|
|
629
|
-
- [ ] discoveries.ndjson append-only throughout
|
|
630
|
-
- [ ] Partial degradation: continue if 1+ tools succeed in wave 1
|
|
213
|
+
- [ ] Wave 1: all delegates via delegate-protocol.codex.md, per-tool outputs written
|
|
214
|
+
- [ ] Wave 2: consensus/conflict/unique classified, consensus_level computed
|
|
215
|
+
- [ ] Wave 3: collab-report.md + context.md + conclusions.json produced
|
|
216
|
+
- [ ] CLB artifact registered, outputs copied to scratchDir
|
|
217
|
+
- [ ] Partial degradation: continued if 1+ tools succeeded
|
|
631
218
|
</success_criteria>
|