@maestrofrontier/frontier 1.4.0
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/AGENTS.md +214 -0
- package/CLAUDE.md +29 -0
- package/LICENSE +21 -0
- package/README.md +521 -0
- package/bin/maestro.cjs +75 -0
- package/commands/compress.md +36 -0
- package/commands/context-bar.md +30 -0
- package/commands/frontier.md +124 -0
- package/commands/settings.md +101 -0
- package/commands/terse.md +23 -0
- package/commands/update.md +59 -0
- package/docs/orchestration.md +168 -0
- package/frontier/cli.cjs +248 -0
- package/frontier/config.cjs +441 -0
- package/frontier/dispatch.cjs +255 -0
- package/frontier/judge.cjs +92 -0
- package/frontier/run.cjs +148 -0
- package/frontier/schema.cjs +112 -0
- package/frontier/semaphore.cjs +49 -0
- package/frontier/synthesize.cjs +79 -0
- package/hooks/frontier-autorun.cjs +124 -0
- package/hooks/hooks.json +103 -0
- package/hooks/maestro-doctrine-guard.cjs +81 -0
- package/hooks/maestro-gate-reminder.cjs +58 -0
- package/hooks/maestro-gate-telemetry.cjs +77 -0
- package/hooks/maestro-loop-guard.cjs +76 -0
- package/hooks/maestro-phase-scope.cjs +118 -0
- package/hooks/maestro-statusline-sync.cjs +152 -0
- package/hooks/maestro-subagent-guard.cjs +148 -0
- package/hooks/maestro-terse-mode.cjs +189 -0
- package/hooks/maestro-toolbudget-advisory.cjs +127 -0
- package/integrations/README.md +87 -0
- package/integrations/cline/skills/frontier/SKILL.md +75 -0
- package/integrations/codex/prompts/frontier.md +66 -0
- package/integrations/codex/prompts/update.md +36 -0
- package/integrations/cursor/commands/frontier.md +63 -0
- package/integrations/cursor/commands/update.md +34 -0
- package/integrations/gemini/commands/frontier.toml +76 -0
- package/integrations/windsurf/workflows/frontier.md +70 -0
- package/package.json +52 -0
- package/scripts/install.cjs +490 -0
- package/settings/cli.cjs +140 -0
- package/settings/config.cjs +309 -0
package/README.md
ADDED
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/maestro-frontier-banner.png" width="100%" alt="Maestro Frontier: the mascot conducts a panel of local model CLIs through a judge model into a grounded synthesis">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<strong>Achieve Frontier AI performance in your CLI</strong> — by fusing the model CLIs you already run. Fan one prompt across a panel of 1-8 of your local CLIs in parallel, have a judge model you pick read every answer into a structured analysis, then a synthesizer you pick write one grounded answer that does not majority-vote. On a 100-task benchmark, every fusion panel outscored its individual member models. It runs on Maestro's discipline layer: verified done-claims, surgical scope, and a research-backed multi-agent gate.
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://github.com/mbanderas/maestro/actions/workflows/ci.yml"><img src="https://github.com/mbanderas/maestro/actions/workflows/ci.yml/badge.svg" alt="CI status"></a>
|
|
11
|
+
<a href="https://github.com/mbanderas/maestro/tags"><img src="https://img.shields.io/github/v/tag/mbanderas/maestro?label=version&color=5b82d6" alt="Latest version"></a>
|
|
12
|
+
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT License"></a>
|
|
13
|
+
<img src="https://img.shields.io/badge/dependencies-zero-brightgreen" alt="Zero Dependencies">
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<a href="#the-frontier-engine"><img src="https://img.shields.io/badge/Frontier-fusion%20engine-f59e0b" alt="Frontier fusion engine"></a>
|
|
18
|
+
<img src="https://img.shields.io/badge/agents-Claude%20Code%20%7C%20Gemini%20%7C%20Codex%20%7C%20Cursor-5b82d6" alt="Claude Code | Gemini | Codex | Cursor">
|
|
19
|
+
<img src="https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-lightgrey" alt="macOS | Linux | Windows">
|
|
20
|
+
<img src="https://img.shields.io/badge/install-2%20lines-blueviolet" alt="2-line plugin install">
|
|
21
|
+
<a href="#contributing"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen" alt="PRs welcome"></a>
|
|
22
|
+
</p>
|
|
23
|
+
|
|
24
|
+
<p align="center">
|
|
25
|
+
<sub>13 fixture tasks · 123 valid A/B runs · 11 voids excluded & re-run · 6 hooks, all tested · ~8 KB always-on kernel · 2-line plugin install</sub>
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
> **⚡ Universal install** — paste this to your coding agent (Claude Code, Gemini, Codex / Codex Desktop, Cursor, Cline, Windsurf, …) and it installs the full Maestro your runtime can run — orchestration doctrine, the Frontier engine, and on Claude Code the whole plugin:
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
Install Maestro into this repository — the orchestration doctrine, the Frontier fusion engine,
|
|
32
|
+
and, on Claude Code, the full plugin machinery. Source of truth: the repo at
|
|
33
|
+
https://github.com/mbanderas/maestro (raw base https://raw.githubusercontent.com/mbanderas/maestro/main/).
|
|
34
|
+
|
|
35
|
+
1. Doctrine — every runtime. Put AGENTS.md in the project root; if one already exists, append
|
|
36
|
+
Maestro's content below what is there and never overwrite or delete it. Add my runtime adapter —
|
|
37
|
+
CLAUDE.md (Claude Code), GEMINI.md (Gemini), or .cursorrules (Cursor); Codex needs only AGENTS.md.
|
|
38
|
+
Merge the adapter into any existing file the same append-only way, and make the adapter — not
|
|
39
|
+
AGENTS.md — import @AGENTS.md at the top (Cursor has no imports, so paste the kernel in). Also
|
|
40
|
+
fetch docs/orchestration.md into docs/ — the doctrine loads the full S2-S6 multi-agent protocol
|
|
41
|
+
from it on demand.
|
|
42
|
+
|
|
43
|
+
2. Machinery.
|
|
44
|
+
- Claude Code: run `/plugin marketplace add mbanderas/maestro` then `/plugin install maestro@maestro`.
|
|
45
|
+
Those two lines wire the enforcement hooks, /maestro:* commands, skills, status line, and the
|
|
46
|
+
Frontier engine with auto-run. That is the entire install — you are done.
|
|
47
|
+
- Any other CLI (Codex, Cursor, Gemini, Cline, Windsurf, …): run
|
|
48
|
+
`npx github:mbanderas/maestro install --target auto --project .` from the project root — it
|
|
49
|
+
fetches the engine, copies the integration files, and verifies the install in one step. Zero
|
|
50
|
+
dependencies; works today from GitHub before any npm publish. Once Maestro is published to
|
|
51
|
+
npm, `npx @maestrofrontier/frontier install --target auto` is the equivalent shorthand. Confirm with
|
|
52
|
+
`maestro frontier status` (or `node bin/maestro.cjs frontier status` if maestro is not yet on
|
|
53
|
+
PATH). For a /frontier slash command, the install copies integrations/cursor/commands/frontier.md
|
|
54
|
+
to .cursor/commands/ (Cursor) or integrations/codex/prompts/frontier.md to ~/.codex/prompts/
|
|
55
|
+
(Codex). The plugin's enforcement hooks, /maestro:* commands, and skills can't load outside Claude
|
|
56
|
+
Code, so the doctrine from step 1 is what governs the agent there. Per non-Claude tool add
|
|
57
|
+
--scope <tool> (e.g. --scope codex, --scope cursor) so armed state stays per-CLI-global.
|
|
58
|
+
|
|
59
|
+
Leave Frontier off (its default) until I arm it — /maestro:frontier on Claude Code, or
|
|
60
|
+
`maestro frontier mode fusion --preset opus-gpt` elsewhere.
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
> **Agents:** start with [`docs/agent-map.md`](docs/agent-map.md) for
|
|
66
|
+
> repo navigation. This README is the user-facing product narrative.
|
|
67
|
+
|
|
68
|
+
## The Frontier Engine
|
|
69
|
+
|
|
70
|
+
**Achieve Frontier AI performance in your CLI.** Maestro Frontier is an
|
|
71
|
+
opt-in, zero-dependency multi-CLI fusion engine built from the AI CLIs
|
|
72
|
+
already on your machine. It fans a prompt out to a parallel panel of any
|
|
73
|
+
1-8 local CLIs you pick, has a judge model you choose read their answers
|
|
74
|
+
into a structured analysis (consensus, contradictions, unique insights,
|
|
75
|
+
blind spots; compare, not merge), then has a synthesizer you choose write
|
|
76
|
+
a grounded answer that does not majority-vote. The payoff is measured: on
|
|
77
|
+
a 100-task benchmark, fused panels beat the best of their individual
|
|
78
|
+
members — fusing the CLIs you already run buys frontier-tier results. It
|
|
79
|
+
is the project's new default identity; the doctrine, hooks, skills, and
|
|
80
|
+
benchmarks are unchanged; the discipline layer is its foundation.
|
|
81
|
+
|
|
82
|
+
<p align="center">
|
|
83
|
+
<img src="assets/frontier-fusion-benchmark.svg" alt="Bar chart: fusion panels versus solo models on a 100-task benchmark (93 tasks scored). Every fusion panel outscores its individual member models; an Opus 4.8 self-fusion (double Opus) reaches ~65.5%, matching Claude Fable 5 solo, while the strongest fusion, Fable 5 + GPT-5.5, tops the field at ~69% and solo Gemini 3.1 Pro and Gemini 3 Flash trail near 43-45%." width="880">
|
|
84
|
+
</p>
|
|
85
|
+
|
|
86
|
+
<p align="center">
|
|
87
|
+
<sub>Fusion vs solo on a 100-task suite (93 scored). Every fusion panel beats its own member models, and the strongest fusion — Fable 5 + GPT-5.5 — leads the field. This is the fusion-vs-solo axis; the in-repo <a href="benchmarks/">A/B harness</a> measures a different one (Maestro doctrine ON vs OFF).</sub>
|
|
88
|
+
</p>
|
|
89
|
+
|
|
90
|
+
<p align="center">
|
|
91
|
+
<img src="assets/frontier-pipeline.svg" alt="Maestro Frontier fusion pipeline: prompt fans out to a parallel panel of local CLIs, a chosen judge model produces structured analysis (consensus, contradictions, unique insights, blind spots), then a chosen synthesizer model writes a grounded response" width="900">
|
|
92
|
+
</p>
|
|
93
|
+
|
|
94
|
+
The pipeline above is the engine's whole architecture: fan out to a
|
|
95
|
+
parallel panel, a judge model that compares the answers (it does not
|
|
96
|
+
merge them), then a grounded synthesis.
|
|
97
|
+
|
|
98
|
+
It ships with the plugin and is driven by `/maestro:frontier`. Three
|
|
99
|
+
modes, switched at will, **`off` by default** so installing or
|
|
100
|
+
upgrading changes nothing until you opt in. **Arming it — `single` or
|
|
101
|
+
`fusion` — makes it auto-run on every prompt**: a `UserPromptSubmit`
|
|
102
|
+
hook routes each prompt through the engine and the live session relays
|
|
103
|
+
the synthesized answer. `off` is the disable path.
|
|
104
|
+
|
|
105
|
+
| Mode | Behavior |
|
|
106
|
+
|---|---|
|
|
107
|
+
| `off` | Normal Maestro. Engine never invoked; zero behavior change. The default, and the way to disable auto-run. |
|
|
108
|
+
| `single <model>` | Auto-runs every prompt through one local CLI and relays its answer. No panel, no judge, no synth. |
|
|
109
|
+
| `fusion <preset>` | Auto-runs every prompt through your panel -> a judge model's analysis -> a grounded synthesis, with graceful degradation and one-level recursion bounds. |
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
/maestro:frontier status # show current mode
|
|
113
|
+
/maestro:frontier single opus # arm one-CLI auto-run
|
|
114
|
+
/maestro:frontier fusion opus-gpt # arm panel auto-run (Opus + GPT-5.5)
|
|
115
|
+
/maestro:frontier run "your prompt here" # manual one-off (armed modes also auto-run)
|
|
116
|
+
/maestro:frontier off # disable auto-run; back to normal Maestro
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
<p align="center">
|
|
120
|
+
<img src="assets/frontier-presets.svg" width="820" alt="Maestro Frontier fusion presets reference card">
|
|
121
|
+
</p>
|
|
122
|
+
|
|
123
|
+
Presets define the panel; the judge and synthesizer default to Opus 4.8
|
|
124
|
+
(`claude -p`), and you override either with `--judge` / `--synth`:
|
|
125
|
+
|
|
126
|
+
- **`opus-duo`**: two independent Opus runs, isolating the synthesis lift.
|
|
127
|
+
- **`opus-gpt`**: Opus + GPT-5.5 (via `codex exec`); the recommended default for bounded spend.
|
|
128
|
+
- **`gpt-duo`**: two GPT-5.5 runs whose judge and synthesizer also run on GPT-5.5: a Codex-only fusion that needs no `claude`.
|
|
129
|
+
- **`frontier-trio`**: Opus + GPT-5.5 + Gemini 3.1 Pro (via `gemini -p`).
|
|
130
|
+
- **`custom`**: 1-8 of the known models.
|
|
131
|
+
|
|
132
|
+
Three model CLIs ship as adapters today: Opus 4.8 (`claude`), GPT-5.5
|
|
133
|
+
(`codex`), and Gemini 3.1 Pro (`gemini`). Kimi, DeepSeek, GLM, and Qwen
|
|
134
|
+
adapters follow in an update soon.
|
|
135
|
+
|
|
136
|
+
Pass `--judge <model>` / `--synth <model>` to run those stages on any
|
|
137
|
+
model for any preset (e.g. `--judge opus --synth gpt-5.5`), so you can mix
|
|
138
|
+
the panel and the judge/synth freely. Degradation is graceful: a partial
|
|
139
|
+
panel failure still returns a synthesis plus `failed_models`; a judge
|
|
140
|
+
failure synthesizes from the raw responses; a hard failure returns a typed
|
|
141
|
+
`failure_reason`. A `FUSION_DEPTH` guard bounds recursion to one level.
|
|
142
|
+
|
|
143
|
+
Honest scope, measured rather than implied: the **engine is built,
|
|
144
|
+
unit-tested (degradation, recursion, budget, anti-majority all covered),
|
|
145
|
+
and verified end-to-end on real runs of `single` mode and the
|
|
146
|
+
`opus-gpt`, `opus-duo`, and `frontier-trio` presets**. The `gpt-duo`
|
|
147
|
+
preset and `--judge`/`--synth` selection share that same code path and
|
|
148
|
+
are unit-tested, but not yet live-run. The quality *lift* of local fusion
|
|
149
|
+
is **measured, not asserted**: on a 100-task suite (93 scored, chart
|
|
150
|
+
above) every fusion panel outscored its own member models, with the
|
|
151
|
+
strongest fusion leading the field. That fusion-vs-solo result is a
|
|
152
|
+
separate axis from the in-repo A/B harness, which measures Maestro
|
|
153
|
+
doctrine ON vs OFF; numbers are never mixed across the two.
|
|
154
|
+
Operational caveats recorded in the risk burndown: headless web access
|
|
155
|
+
differs per CLI (Codex confirmed live; Claude and Gemini are gated
|
|
156
|
+
`webTools:false` in this build), and each cold `claude -p`
|
|
157
|
+
panel/judge/synth call is non-trivial in cost; use small prompts, and
|
|
158
|
+
prefer `opus-gpt` to bound spend. The budget cap is opt-in
|
|
159
|
+
(`tokenBudget`, default disabled). The engine is zero-dependency
|
|
160
|
+
CommonJS under [`frontier/`](frontier/); each CLI is resolved from your
|
|
161
|
+
`PATH` (`claude`, `codex`, `gemini`). Binary overrides and the full
|
|
162
|
+
operational reference are in
|
|
163
|
+
[`commands/frontier.md`](commands/frontier.md#binary-overrides).
|
|
164
|
+
|
|
165
|
+
<p align="center">
|
|
166
|
+
<img src="assets/frontier-stack.svg" alt="Maestro Frontier fusion engine sitting on the discipline layer foundation; an amber data-flow connects the two" width="820">
|
|
167
|
+
</p>
|
|
168
|
+
|
|
169
|
+
## What You Get
|
|
170
|
+
|
|
171
|
+
<p align="center">
|
|
172
|
+
<img src="assets/what-you-get.svg" width="860" alt="What Maestro gives you: five capabilities on a dark card">
|
|
173
|
+
</p>
|
|
174
|
+
|
|
175
|
+
Frontier is the headline; the discipline layer beneath it is what runs on
|
|
176
|
+
every task. Drop two markdown files into your repo and your agent gains
|
|
177
|
+
five things:
|
|
178
|
+
|
|
179
|
+
1. **Done means done.** Completion reports carry a verification status (`VERIFIED` / `UNVERIFIED` / `FAIL`) backed by an actual type-check, lint, or test run, with an optional hook enforcing it structurally.
|
|
180
|
+
2. **It stays in its lane.** Surgical-scope rules: every changed line traces back to what you asked for: no drive-by refactors, no formatting sweeps, no deleting code it couldn't verify was dead.
|
|
181
|
+
3. **Long runs that land.** Overnight tasks and recurring loops get checkpoint artifacts, explicit end conditions, iteration caps, and re-grounding rules. This repo's own benchmark loops run on exactly these rules.
|
|
182
|
+
4. **Multi-agent only when it pays.** A counted Decision Gate routes work single-agent by default and demands an explicit verdict line before the first edit; orchestration stays behind it.
|
|
183
|
+
5. **Receipts.** A reproducible A/B benchmark harness ships in-repo, with our own retractions and nulls. Rerun every number yourself.
|
|
184
|
+
|
|
185
|
+
<p align="center">
|
|
186
|
+
<img src="assets/discipline-demo.svg" alt="Two terminal close-outs quoted verbatim from benchmark streams: a baseline agent declares all done although no check ran, while the Maestro run opens with a counted GATE verdict line and exits with the honest status UNVERIFIED, no type-checker or linter configured in this project" width="860">
|
|
187
|
+
</p>
|
|
188
|
+
|
|
189
|
+
The price, measured rather than implied: ON spends about 10% more than a
|
|
190
|
+
clean agent on a 10-module refactor and 38% more on a 16-file feature
|
|
191
|
+
(n=9 medians, t08/t12 below); you are buying verification and
|
|
192
|
+
auditability, not speed. The overhead is behavioral, not byte-weight: a
|
|
193
|
+
kernel rewrite cut always-on bytes 41% and fixed status reporting
|
|
194
|
+
(12/12 vs 3/30) with no measurable cost change. The premium earns its
|
|
195
|
+
keep on unattended work (overnight loops, scheduled runs, CI agents)
|
|
196
|
+
where nobody reads the 3am transcript and the close-out claim is all you
|
|
197
|
+
have.
|
|
198
|
+
|
|
199
|
+
That regime is not hypothetical: Maestro runs under its own rules. The
|
|
200
|
+
four most recent maintenance loops ran unattended on the S10 long-horizon
|
|
201
|
+
doctrine, with checkpoint artifacts and pre-declared budget ceilings, and
|
|
202
|
+
together made 75 benchmark runs for $30.12 against $47 in caps, produced 0
|
|
203
|
+
voided runs, and shipped the retractions you can read below with no human
|
|
204
|
+
in the loop. Output-style compression (terse-reply tools) is orthogonal
|
|
205
|
+
and worth ~1% of agentic spend; Maestro will not grow a kernel toggle for
|
|
206
|
+
it. The whole design rests on [peer-reviewed
|
|
207
|
+
research](https://marklaursen.com/blog/why-your-multi-agent-ai-system-keeps-failing)
|
|
208
|
+
showing **79% of multi-agent failures come from coordination, not model
|
|
209
|
+
capability**, and that **three optimized agents outperform seven**;
|
|
210
|
+
adding agents usually makes things worse, so Maestro makes the single
|
|
211
|
+
agent you already have rigorous by default and holds multi-agent
|
|
212
|
+
coordination behind a counted gate.
|
|
213
|
+
|
|
214
|
+
## The Discipline Layer It Runs On
|
|
215
|
+
|
|
216
|
+
Frontier runs on this. It is the part this repo actually benchmarks: a
|
|
217
|
+
verification-first discipline layer that applies to every task, fusion or
|
|
218
|
+
not.
|
|
219
|
+
|
|
220
|
+
<p align="center">
|
|
221
|
+
<img src="assets/maestro-flow.svg" alt="Maestro orchestration flow: task through the S1 decision gate to either a single agent or the planner, specialist group, and staff engineer pipeline, converging on verified delivery" width="780">
|
|
222
|
+
</p>
|
|
223
|
+
|
|
224
|
+
- **Universal Rules**: verification gates, status vocabulary, surgical scope, edit safety, context economy; applied to every task in both modes, including one-line fixes.
|
|
225
|
+
- **Decision Gate**: counts the work and emits a verdict line (`GATE: files=<n> concerns=<m> -> ...`) before the first edit. Most tasks stay single-agent.
|
|
226
|
+
- **Planner**: decomposes complex tasks into parallel and sequential subtasks with boundaries and acceptance criteria.
|
|
227
|
+
- **Specialists**: execute focused subtasks with scoped context, hard-capped at 4 per parallel group (DyLAN and agent-scaling findings).
|
|
228
|
+
- **Cross-Talk Routing**: detects when one specialist's output affects another and routes the minimum necessary context.
|
|
229
|
+
- **Staff Engineer Review**: adversarial final verification for contradictions, breakage, and architectural drift.
|
|
230
|
+
- **Long-Horizon Operation**: checkpoint artifacts, self-pacing, and explicit end conditions for recurring or multi-session runs; exits graded by a fresh-context verifier, never self-assessed.
|
|
231
|
+
|
|
232
|
+
<p align="center">
|
|
233
|
+
<img src="assets/loop-lifecycle.svg" alt="Loop engineering lifecycle: read checkpoint, re-anchor goal, execute phase, verify with a fresh-context verifier grading the exit, write checkpoint distilling findings into rules, event or wakeup, exiting to a final report on success or hard cap" width="440">
|
|
234
|
+
</p>
|
|
235
|
+
|
|
236
|
+
**How it works:**
|
|
237
|
+
|
|
238
|
+
1. You give your AI coding agent a task as normal.
|
|
239
|
+
2. The Decision Gate counts the work and emits a verdict line; most tasks run single-agent with no coordination overhead.
|
|
240
|
+
3. Single-agent work follows the Universal Rules: scoped edits, verification before any completion claim, an honest status token at the end.
|
|
241
|
+
4. Work that crosses the gate's thresholds goes Planner -> Specialists -> adversarial Staff Engineer review.
|
|
242
|
+
5. Long or recurring runs follow the Long-Horizon rules: checkpoint artifacts, explicit end conditions, iteration caps.
|
|
243
|
+
6. You get a result with a verification status you can act on, not a vibe.
|
|
244
|
+
|
|
245
|
+
The specialist manifest (S3) and cross-talk handoff packet (S4/S6) also ship as machine-readable JSON Schemas in [`schemas/`](schemas/) for tooling. The prose doctrine remains the source of truth.
|
|
246
|
+
|
|
247
|
+
## Quick Start
|
|
248
|
+
|
|
249
|
+
Maestro installs as plain markdown files your AI agent reads on startup. No packages, no build steps, no SDK. Download the files for your runtime into the project root and your agent picks them up automatically.
|
|
250
|
+
|
|
251
|
+
| Runtime | Files to add |
|
|
252
|
+
|---|---|
|
|
253
|
+
| Claude Code | [`AGENTS.md`](AGENTS.md) + [`CLAUDE.md`](CLAUDE.md) |
|
|
254
|
+
| Gemini | [`AGENTS.md`](AGENTS.md) + [`GEMINI.md`](GEMINI.md) |
|
|
255
|
+
| Codex | [`AGENTS.md`](AGENTS.md); see [Maestro on Codex](docs/codex.md) |
|
|
256
|
+
| Cursor | [`.cursorrules`](.cursorrules) |
|
|
257
|
+
| GitHub Copilot | [`AGENTS.md`](AGENTS.md); nearest `AGENTS.md` in the directory tree wins, and a root `CLAUDE.md` or `GEMINI.md` also works |
|
|
258
|
+
| Cline | [`AGENTS.md`](AGENTS.md); native support (also auto-detects `.cursorrules`) |
|
|
259
|
+
| Windsurf | [`AGENTS.md`](AGENTS.md); root file is always-on, processed by the Rules engine |
|
|
260
|
+
|
|
261
|
+
> **Already have a `CLAUDE.md`, `AGENTS.md`, or `.cursorrules`?** Don't overwrite them, you'll lose your project context. The per-runtime steps below show how to merge Maestro into an existing setup.
|
|
262
|
+
|
|
263
|
+
### Claude Code
|
|
264
|
+
|
|
265
|
+
**Option A, plugin (hooks + context-bar command, one step).** Maestro
|
|
266
|
+
is an installable Claude Code plugin; the repo is its own marketplace:
|
|
267
|
+
|
|
268
|
+
```text
|
|
269
|
+
/plugin marketplace add mbanderas/maestro
|
|
270
|
+
/plugin install maestro@maestro
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
The plugin auto-wires all five enforcement hooks (subagent guard, loop
|
|
274
|
+
guard, phase-scope guard, gate reminder, opt-in gate telemetry) and the
|
|
275
|
+
`/maestro:context-bar` command. Two things it cannot do for you:
|
|
276
|
+
the doctrine files (`AGENTS.md`/`CLAUDE.md`) still go in your project
|
|
277
|
+
root (Option B), and the status line script still needs a one-line
|
|
278
|
+
`statusLine` settings entry (see [`docs/context-bar.md`](docs/context-bar.md));
|
|
279
|
+
plugins cannot set the main status line.
|
|
280
|
+
|
|
281
|
+
**Option B, plain files (doctrine only, zero machinery):**
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
curl -O https://raw.githubusercontent.com/mbanderas/maestro/main/AGENTS.md
|
|
285
|
+
curl -O https://raw.githubusercontent.com/mbanderas/maestro/main/CLAUDE.md
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
Claude Code reads `CLAUDE.md` on startup. The `@AGENTS.md` import inside it pulls in the orchestration doctrine. Your next task routes through Maestro's Decision Gate.
|
|
289
|
+
|
|
290
|
+
**Already have a `CLAUDE.md`?** Don't overwrite it. Instead, download just `AGENTS.md` and add `@AGENTS.md` to the top of your existing `CLAUDE.md` to import the doctrine. You can optionally merge the runtime rules from Maestro's [`CLAUDE.md`](CLAUDE.md) into yours.
|
|
291
|
+
|
|
292
|
+
**Optional:** Maestro also ships a context-window progress bar for the Claude Code status line; see [`docs/context-bar.md`](docs/context-bar.md).
|
|
293
|
+
|
|
294
|
+
### Gemini
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
curl -O https://raw.githubusercontent.com/mbanderas/maestro/main/AGENTS.md
|
|
298
|
+
curl -O https://raw.githubusercontent.com/mbanderas/maestro/main/GEMINI.md
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
**Already have a `GEMINI.md`?** Don't overwrite it. Download just `AGENTS.md` and add `@AGENTS.md` to the top of your existing `GEMINI.md`. You can optionally merge the runtime rules from Maestro's [`GEMINI.md`](GEMINI.md) into yours.
|
|
302
|
+
|
|
303
|
+
### Codex
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
curl -O https://raw.githubusercontent.com/mbanderas/maestro/main/AGENTS.md
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
Codex reads `AGENTS.md` directly; no adapter file needed.
|
|
310
|
+
|
|
311
|
+
**Already have an `AGENTS.md`?** Don't overwrite it: that file likely contains your project context. Instead, append the contents of Maestro's [`AGENTS.md`](AGENTS.md) to your existing file, or paste it into a section of your `AGENTS.md` so Codex reads both your project context and the orchestration doctrine.
|
|
312
|
+
|
|
313
|
+
### Cursor
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
curl -O https://raw.githubusercontent.com/mbanderas/maestro/main/.cursorrules
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**Already have a `.cursorrules`?** Don't overwrite it. Cursor does not support file imports, so append the contents of Maestro's [`.cursorrules`](.cursorrules) to your existing file.
|
|
320
|
+
|
|
321
|
+
## Runtime Adapters
|
|
322
|
+
|
|
323
|
+
Maestro separates **portable orchestration doctrine** from **runtime-specific adapters**. The core logic lives in `AGENTS.md` and works across any agent runtime; adapters are thin wrappers that import it and add only what is runtime-specific.
|
|
324
|
+
|
|
325
|
+
| File | Role | What it adds |
|
|
326
|
+
|---|---|---|
|
|
327
|
+
| `AGENTS.md` | Portable core | Full orchestration doctrine, runtime-agnostic |
|
|
328
|
+
| `CLAUDE.md` | Claude Code adapter | Subagent/team routing, hooks, context limits, tool scoping, long-horizon mapping (/loop, schedules) |
|
|
329
|
+
| `GEMINI.md` | Gemini adapter | Execution mapping, instruction precedence, verification notes, long-horizon note |
|
|
330
|
+
| `.cursorrules` | Cursor adapter | Kernel copy (Cursor does not support imports); full S2-S6 in docs/orchestration.md |
|
|
331
|
+
| [`docs/codex.md`](docs/codex.md) | Codex guide | AGENTS.md precedence and 32 KiB cap, Codex subagent mapping, Automations long-horizon mapping (Codex reads `AGENTS.md` natively) |
|
|
332
|
+
|
|
333
|
+
GitHub Copilot, Cline, and Windsurf read `AGENTS.md` directly, so the portable core works there with no adapter. Maestro's always-on kernel (`AGENTS.md`) is ~8 KB, under Windsurf's 12,000-character limit and roughly a quarter of Codex's 32 KiB budget; the full multi-agent protocol loads on demand from `docs/orchestration.md`.
|
|
334
|
+
|
|
335
|
+
**Subagents vs Agent Teams (Claude Code):** Maestro's `CLAUDE.md` adapter
|
|
336
|
+
routes automatically. **Subagents** run within one session and report
|
|
337
|
+
results to the parent; this is the default for narrow independent work.
|
|
338
|
+
**[Agent teams](https://code.claude.com/docs/en/agent-teams)** coordinate
|
|
339
|
+
multiple sessions with peer-to-peer messaging, used only for long-running
|
|
340
|
+
parallel workstreams, competing-hypothesis debugging, or cross-layer
|
|
341
|
+
builds. Agent teams are experimental and Claude Code-only.
|
|
342
|
+
|
|
343
|
+
## Claude Code Tools
|
|
344
|
+
|
|
345
|
+
Optional Claude Code machinery; full install steps in the linked docs.
|
|
346
|
+
|
|
347
|
+
- **Verification Hook**: a `SubagentStop` hook enforcing S7.3 structurally: warns when a file-modifying subagent skips a checker or omits a status token. Never blocks. [`docs/hooks.md`](docs/hooks.md)
|
|
348
|
+
- **Hook Pack**: five more zero-dependency hooks (doctrine guard, loop guard, phase-scope, gate reminder, opt-in gate telemetry) enforcing the rest of the doctrine. [`docs/hooks.md`](docs/hooks.md)
|
|
349
|
+
- **Context Bar**: a status-line context-window progress bar that shifts green to amber to red and detects the model's window (including the 1M Opus tier). [`docs/context-bar.md`](docs/context-bar.md)
|
|
350
|
+
- **Terse Mode + Compress**: opt-in output-token reduction (`/maestro:terse`) and a memory-file compressor (`/maestro:compress`), adapted from the MIT-licensed Caveman plugin. [`docs/context-bar.md`](docs/context-bar.md)
|
|
351
|
+
- **Settings**: `/maestro:settings` changes any toggle in one line (`set terse off`, `frontier fusion opus-gpt`, `help`) or opens a keyboard picker with no arguments (the `AskUserQuestion` selector, not the built-in `/model` widget, which plugins cannot render), plus a portable `node settings/cli.cjs status|list|help|set` for Codex and any other CLI, over the terse, frontier, and context-bar toggles. [`docs/settings.md`](docs/settings.md)
|
|
352
|
+
|
|
353
|
+
## Commands & Settings
|
|
354
|
+
|
|
355
|
+
Every Maestro slash command in Claude Code is namespaced `/maestro:<name>`. On Codex and other CLIs without slash commands, the same actions run through the scripts noted below.
|
|
356
|
+
|
|
357
|
+
| Command | What it does | Usage |
|
|
358
|
+
|---|---|---|
|
|
359
|
+
| `/maestro:settings` | See or change all toggles. With arguments it runs the change directly; with no arguments it opens a keyboard picker. | `/maestro:settings`, `… status`, `… list`, `… help`, `… set terse off`, `… frontier fusion opus-gpt` |
|
|
360
|
+
| `/maestro:frontier` | Drive the local multi-CLI fusion engine: switch mode, pick a model/preset, or run a prompt through it. | `… off`, `… single opus`, `… fusion opus-gpt`, `… status`, `… run "<prompt>"` |
|
|
361
|
+
| `/maestro:terse` | Switch terse output mode for the session (off by default). | `… lite`, `… full`, `… ultra`, `… off` |
|
|
362
|
+
| `/maestro:context-bar` | Toggle the status-line context progress bar (and the Maestro badges on it). | `/maestro:context-bar`, `… on`, `… off` |
|
|
363
|
+
| `/maestro:compress <file>` | Rewrite a natural-language memory file in terse form to cut input tokens; keeps a backup and validates deterministically. | `… path/to/NOTES.md` |
|
|
364
|
+
|
|
365
|
+
### Settings toggles
|
|
366
|
+
|
|
367
|
+
`/maestro:settings` and the portable `node settings/cli.cjs` cover three persisted toggles:
|
|
368
|
+
|
|
369
|
+
| Toggle | Values | What it controls |
|
|
370
|
+
|---|---|---|
|
|
371
|
+
| `terse` | `off`, `lite`, `full`, `ultra` | Output-token reduction. Shows an amber level badge (`ULTRA`) on the status bar. |
|
|
372
|
+
| `frontier` | `off`; `single:` `opus` / `gpt-5.5` / `gemini`; `fusion:` `opus-duo` / `opus-gpt` / `gpt-duo` / `frontier-trio` / `custom`, each with optional `--judge` / `--synth` | The local fusion engine. When armed it auto-runs on every prompt. The blue `ƒ` panel badge means auto-run is on: `ƒO+C`, `ƒO+C+G`, `ƒ✦3` (`O`=Opus, `C`=ChatGPT/GPT-5.5, `G`=Gemini). |
|
|
373
|
+
| `context-bar` | `on`, `off` | The status-line context-window progress bar. |
|
|
374
|
+
|
|
375
|
+
Portable everywhere, Codex included: `node settings/cli.cjs status | list | help | set <key> <value>` (frontier also takes `--judge`, `--synth`, `--models a,b,c`). Full references: [`docs/settings.md`](docs/settings.md) and [`docs/context-bar.md`](docs/context-bar.md).
|
|
376
|
+
|
|
377
|
+
## Updating Maestro
|
|
378
|
+
|
|
379
|
+
Maestro no longer pins a plugin version. The marketplace always resolves to the latest `main`, so updating is a single refresh — no version bump needed in any file.
|
|
380
|
+
|
|
381
|
+
### Claude Code (recommended)
|
|
382
|
+
|
|
383
|
+
`/maestro:update` is the one-command path — it pulls the latest marketplace code, reports what changed, and tells you when to reload:
|
|
384
|
+
|
|
385
|
+
```text
|
|
386
|
+
/maestro:update
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
It can't run the reload for you (a slash command can't invoke another slash command), so it ends by prompting you to run `/reload-plugins` (or restart). The manual equivalent is two steps:
|
|
390
|
+
|
|
391
|
+
```text
|
|
392
|
+
/plugin marketplace update maestro
|
|
393
|
+
/reload-plugins
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
`/reload-plugins` applies the update in the running session; if Claude Code warns that a restart is required, restart it. Non-interactive equivalent of the pull: `claude plugin marketplace update maestro`. You can also enable marketplace auto-update so the local clone refreshes automatically — check Claude Code's plugin settings.
|
|
397
|
+
|
|
398
|
+
> **Note:** There is no `/plugin update <name>` command in Claude Code. Use `/maestro:update`, or `/plugin marketplace update maestro` + `/reload-plugins`.
|
|
399
|
+
|
|
400
|
+
### Codex / Cursor (portable installs, no plugin system)
|
|
401
|
+
|
|
402
|
+
Run `/update` if your integration file exposes it, or update manually:
|
|
403
|
+
|
|
404
|
+
- **Git clone:** `git pull` inside the Maestro clone directory.
|
|
405
|
+
- **Downloaded copy:** re-run `npx github:mbanderas/maestro install --target auto --project .` from the project root, or re-download the tarball and re-copy `frontier/`, `bin/maestro.cjs`, plus your integration command file (`integrations/codex/prompts/frontier.md` or `integrations/cursor/commands/frontier.md`) from the latest `main`.
|
|
406
|
+
|
|
407
|
+
### Gemini / other CLIs
|
|
408
|
+
|
|
409
|
+
The same portable manual steps apply: re-pull or re-copy `frontier/` and the relevant integration file from `main`. If your CLI supports custom commands and you have a `/update` wired, run that instead.
|
|
410
|
+
|
|
411
|
+
## When to Use Maestro
|
|
412
|
+
|
|
413
|
+
The discipline layer (verification, scope, honest status) applies to every task from a one-line fix upward. The orchestration path helps most on tasks that are genuinely too complex for one pass (large refactors, multi-file features), parallelizable (independent subtasks), or benefit from adversarial review. It is deliberately avoided where a single agent already handles the work, the work is purely sequential reasoning, or the task touches fewer than ~10 files; the research shows coordination overhead makes simple tasks worse, not better.
|
|
414
|
+
|
|
415
|
+
### Why Not CrewAI / LangGraph / AutoGen?
|
|
416
|
+
|
|
417
|
+
| | Maestro | CrewAI / LangGraph / AutoGen |
|
|
418
|
+
|---|---|---|
|
|
419
|
+
| **Setup** | Two lines (`/plugin install`) or copy a folder, done | Install packages, write Python/TS, configure agents |
|
|
420
|
+
| **Dependencies** | Zero | Framework + SDK + runtime |
|
|
421
|
+
| **Where it runs** | Inside your existing AI coding agent | Standalone process you build and deploy |
|
|
422
|
+
| **Agent count** | Hard cap at 4 parallel (research-backed) | Unlimited (user decides) |
|
|
423
|
+
| **Default behavior** | Single-agent unless complexity warrants multi | Always multi-agent |
|
|
424
|
+
| **Design philosophy** | Fewer agents, structured coordination | More agents, flexible topologies |
|
|
425
|
+
|
|
426
|
+
Maestro is not a framework. It's a discipline-and-orchestration layer for AI coding agents that already exist: you copy a couple of files and your existing agent gains verification rigor, scope discipline, and gated multi-agent capabilities. If you need a standalone multi-agent application with custom tools, APIs, and deployment pipelines, use a framework.
|
|
427
|
+
|
|
428
|
+
## Benchmarks
|
|
429
|
+
|
|
430
|
+
Maestro ships a reproducible A/B harness in [`benchmarks/`](benchmarks/):
|
|
431
|
+
thirteen fixture tasks, a runner for Windows and macOS/Linux (no deps;
|
|
432
|
+
the macOS/Linux script needs `jq`), and a deterministic `verify.cjs`
|
|
433
|
+
checker per task. Each task runs Maestro ON (doctrine files present) vs
|
|
434
|
+
OFF (absent) under an isolated `CLAUDE_CONFIG_DIR`, with the checker
|
|
435
|
+
**hidden from the agent until the run ends** (visible oracles inflate
|
|
436
|
+
pass rates 20-60%, arXiv:2602.10975).
|
|
437
|
+
|
|
438
|
+
<p align="center">
|
|
439
|
+
<img src="assets/bench-cells.svg" alt="Bar chart of median cost per task-run for t07 to t10 and t12 with doctrine off, on, and core variant; pass rates per cell shown beneath each group" width="860">
|
|
440
|
+
</p>
|
|
441
|
+
|
|
442
|
+
Honest reading: **Maestro ON has never beaten OFF on success rate in any
|
|
443
|
+
measured cell**; at n=9, t09 is exactly tied (8/9 each) and t08 and t12
|
|
444
|
+
are 9/9 both modes. The early efficiency story did not survive
|
|
445
|
+
replication: the t12 and t08 n=3 wall, turn, and token gains were all
|
|
446
|
+
retracted at n=9, and the only unreplicated positives left standing
|
|
447
|
+
(Gemini t08, the t11 pilot) are flagged as such. The full n=3 -> n=9
|
|
448
|
+
reversal arithmetic is in
|
|
449
|
+
[`docs/benchmarks.md`](docs/benchmarks.md#retractions). On small or linear
|
|
450
|
+
tasks the doctrine is pure overhead (t10: +78% median wall). t09 separates
|
|
451
|
+
*models* more than modes: gemini-3.1-pro-preview passes 1 of 6 valid runs,
|
|
452
|
+
gpt-5.4-mini 4/4, sonnet ~8-in-9. Small samples throughout; no
|
|
453
|
+
significance claims.
|
|
454
|
+
|
|
455
|
+
The one new directional signal is on a different axis. **t14**, a
|
|
456
|
+
checker-less trap task with a non-obvious correctness property, holds both
|
|
457
|
+
arms at **6/6 pass** while the honesty metric `claim_consistent` runs
|
|
458
|
+
**OFF 1/6 vs ON 4/6** and `target_smoke_tested` **OFF 0/6 vs ON 2/6**, at
|
|
459
|
+
ON median cost **$0.1930** vs OFF **$0.1501** (about **+29%**). The
|
|
460
|
+
`status_token` axis is excluded; OFF was never taught the S7.3
|
|
461
|
+
vocabulary. Per the frozen prereg this is **directional only, not
|
|
462
|
+
confirmatory** (n=6 is exploratory; a grounded effect needs n>=9): Maestro
|
|
463
|
+
buys more honest completion behavior on a trap task, at higher cost; paid
|
|
464
|
+
for by the premium, not recovered.
|
|
465
|
+
|
|
466
|
+
Key findings:
|
|
467
|
+
|
|
468
|
+
- **No success-rate lift.** ON never beats OFF on pass rate in any measured cell; it buys verification, scope guarantees, and honest status, not speed or capability.
|
|
469
|
+
- **Weak-model rescue: not measurable.** Haiku passes 30/30 across t07-t11 in both modes and 9/9 on all three difficulty versions of t13, a task purpose-built to fail it, but a haiku baseline does not fail on self-contained fixtures with discoverable conventions, so rescue cannot be observed at this task class.
|
|
470
|
+
- **The gate speaks, prose alone does not spawn.** Three S1 revisions got verdict lines into 9/9 probe runs with correct counts above the trigger (the first gate verbalization ever measured), yet every verdict still concluded single-agent and S2-S6 spawns stayed 0/9. The `gate-reminder` hook (alone) is what finally moves sonnet across the spawn threshold (6/6, at no quality delta on a fixture both cells already pass).
|
|
471
|
+
- **The verdict line binds.** Across all 19 single-agent-verdict runs on disk no specialist was ever spawned; 2 of 8 full-pack multi-agent verdicts were stated but never executed, a gap the single-hook cell closed at 0 of 6.
|
|
472
|
+
- **Compliance deltas are null at these tiers.** Three runs in 69 scored streams stated a status token; surgical scope and oracle integrity stay perfect in both modes. Prose doctrine alone does not move headless reporting behavior; hence the structural verification hook.
|
|
473
|
+
|
|
474
|
+
Numbers are never compared across CLIs or models, and the protocol
|
|
475
|
+
forbids publishing numbers that were not actually measured. Earlier
|
|
476
|
+
same-day t01-t06 results were taken **before** the hidden-oracle fix and
|
|
477
|
+
are kept only as labeled upper bounds, not comparable to the cells above.
|
|
478
|
+
|
|
479
|
+
Full data, retractions, and methodology -> [`docs/benchmarks.md`](docs/benchmarks.md).
|
|
480
|
+
|
|
481
|
+
## Research Foundation
|
|
482
|
+
|
|
483
|
+
Maestro's architecture is grounded in 700+ sources across computer science, library science, safety engineering, and knowledge theory. The key papers:
|
|
484
|
+
|
|
485
|
+
| Paper | Year | Venue | Key Finding |
|
|
486
|
+
|---|---|---|---|
|
|
487
|
+
| [MAST](https://arxiv.org/abs/2503.13657) | 2025 | NeurIPS Spotlight | 41-87% failure rates; 79% from coordination |
|
|
488
|
+
| [DyLAN](https://arxiv.org/abs/2310.02170) | 2024 | COLM | 3 agents outperform 7; dynamic topology selection |
|
|
489
|
+
| [Towards a Science of Scaling Agent Systems](https://arxiv.org/abs/2512.08296) | 2025 | arXiv (Google/MIT) | 260 configs; architecture-task fit dominates; sequential tasks degrade 39-70% |
|
|
490
|
+
| [Agent Scaling via Diversity](https://arxiv.org/abs/2602.03794) | 2026 | arXiv | 2 diverse agents match 16 homogeneous; diversity, not headcount, drives gains |
|
|
491
|
+
| [LoopTrap](https://arxiv.org/abs/2605.05846) | 2026 | arXiv | Termination poisoning: loop end-conditions are an attack surface; hard caps mitigate |
|
|
492
|
+
| [MetaGPT](https://arxiv.org/abs/2308.00352) | 2023 | - | Structured handoffs score 3.9/4 vs unstructured 2.1/4 |
|
|
493
|
+
| [Voyager](https://arxiv.org/abs/2305.16291) | 2023 | NeurIPS | Skill library pattern for capability organization |
|
|
494
|
+
| [GTD](https://arxiv.org/abs/2504.05767) | 2025 | arXiv | 0.3% degradation under failure with redundant topologies |
|
|
495
|
+
| [SELFORG](https://arxiv.org/abs/2502.11811) | 2025 | arXiv | Shapley-based contribution estimation |
|
|
496
|
+
| [DRACO](https://arxiv.org/abs/2602.11685) | 2026 | arXiv | Deep-research benchmark reviewed for fusion; fused panels outscored their solo members |
|
|
497
|
+
|
|
498
|
+
For the full analysis, read [Why Your Multi-Agent AI System Keeps Failing](https://marklaursen.com/blog/why-your-multi-agent-ai-system-keeps-failing).
|
|
499
|
+
|
|
500
|
+
## Contributing
|
|
501
|
+
|
|
502
|
+
Contributions are welcome. Before opening a PR:
|
|
503
|
+
|
|
504
|
+
1. Read the research foundation. Maestro's constraints (4-agent cap, Decision Gate bias toward single-agent) are intentional and research-backed
|
|
505
|
+
2. Keep it zero-dependency: no npm packages, no external imports
|
|
506
|
+
3. Test with real tasks across Claude Code, Gemini, Codex, and Cursor
|
|
507
|
+
4. Docs changes: run `npx --yes markdownlint-cli2` from the repo root (no install footprint; config in `.markdownlint-cli2.jsonc`)
|
|
508
|
+
|
|
509
|
+
If you have benchmarks, case studies, or research that challenges or extends the current architecture, open an issue. The design should evolve with evidence.
|
|
510
|
+
|
|
511
|
+
## Related Projects
|
|
512
|
+
|
|
513
|
+
- **[Govyn](https://github.com/govynAI/govyn)**: Open-source AI agent governance proxy. Maestro orchestrates your agents; Govyn ensures they never hold real API keys, stay within budget, and follow policy. They are designed to work together.
|
|
514
|
+
|
|
515
|
+
## Community
|
|
516
|
+
|
|
517
|
+
Using Maestro Frontier, or running the discipline layer on your own agent? [Open a discussion](https://github.com/mbanderas/maestro/discussions) or [file an issue](https://github.com/mbanderas/maestro/issues).
|
|
518
|
+
|
|
519
|
+
## License
|
|
520
|
+
|
|
521
|
+
MIT
|
package/bin/maestro.cjs
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Maestro — unified CLI. One stable `maestro` entrypoint so every tool
|
|
3
|
+
// wrapper and the docs call `maestro frontier ...` instead of the raw
|
|
4
|
+
// `node frontier/cli.cjs` path.
|
|
5
|
+
//
|
|
6
|
+
// maestro frontier <mode|status|run|adopt> [...]
|
|
7
|
+
// Delegates verbatim to frontier/cli.cjs in a child process with
|
|
8
|
+
// inherited cwd, env, and stdio -> identical Frontier state and
|
|
9
|
+
// scope (the engine's own scope autodetect and MAESTRO_SCOPE both
|
|
10
|
+
// resolve exactly as a direct call would). The child's exit code
|
|
11
|
+
// is propagated.
|
|
12
|
+
//
|
|
13
|
+
// maestro install [--target <tool>] [--dry-run] [--project <path>]
|
|
14
|
+
// [--user] [--no-hooks]
|
|
15
|
+
// Runs the cross-tool installer (scripts/install.cjs). Loaded
|
|
16
|
+
// lazily so the bin works for `frontier` even where the installer
|
|
17
|
+
// is absent.
|
|
18
|
+
//
|
|
19
|
+
// Zero dependencies. Resolves siblings relative to __dirname so it works
|
|
20
|
+
// whether invoked via an npm bin shim, `npx github:mbanderas/maestro`, or
|
|
21
|
+
// a direct `node bin/maestro.cjs`. .cjs so Node treats it as CommonJS
|
|
22
|
+
// regardless of any parent "type": "module".
|
|
23
|
+
|
|
24
|
+
'use strict';
|
|
25
|
+
|
|
26
|
+
const path = require('path');
|
|
27
|
+
const { spawnSync } = require('child_process');
|
|
28
|
+
|
|
29
|
+
const argv = process.argv.slice(2);
|
|
30
|
+
const cmd = argv[0];
|
|
31
|
+
const rest = argv.slice(1);
|
|
32
|
+
|
|
33
|
+
function usage(code) {
|
|
34
|
+
const w = code ? process.stderr : process.stdout;
|
|
35
|
+
w.write(
|
|
36
|
+
'Maestro — unified CLI\n' +
|
|
37
|
+
'\n' +
|
|
38
|
+
'Usage:\n' +
|
|
39
|
+
' maestro frontier <mode|status|run|adopt> [...] run the Frontier engine\n' +
|
|
40
|
+
' maestro install [--target <tool>] [--dry-run] [--project <path>] [--user] [--no-hooks]\n' +
|
|
41
|
+
'\n' +
|
|
42
|
+
'Examples:\n' +
|
|
43
|
+
' maestro frontier status\n' +
|
|
44
|
+
' maestro frontier mode fusion --preset opus-gpt\n' +
|
|
45
|
+
' maestro frontier run "fix the failing test"\n' +
|
|
46
|
+
' maestro install --target auto --project .\n'
|
|
47
|
+
);
|
|
48
|
+
process.exit(code);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (cmd === 'frontier') {
|
|
52
|
+
const cli = path.join(__dirname, '..', 'frontier', 'cli.cjs');
|
|
53
|
+
const r = spawnSync(process.execPath, [cli, ...rest], { stdio: 'inherit' });
|
|
54
|
+
if (r.error) {
|
|
55
|
+
process.stderr.write('maestro: failed to launch frontier — ' + (r.error.message || r.error) + '\n');
|
|
56
|
+
process.exit(1);
|
|
57
|
+
}
|
|
58
|
+
process.exit(r.status === null ? 1 : r.status);
|
|
59
|
+
} else if (cmd === 'install') {
|
|
60
|
+
let run;
|
|
61
|
+
try {
|
|
62
|
+
({ run } = require(path.join(__dirname, '..', 'scripts', 'install.cjs')));
|
|
63
|
+
} catch (e) {
|
|
64
|
+
process.stderr.write('maestro: installer unavailable — ' + (e && e.message) + '\n');
|
|
65
|
+
process.exit(1);
|
|
66
|
+
}
|
|
67
|
+
Promise.resolve(run(rest))
|
|
68
|
+
.then(code => process.exit(code || 0))
|
|
69
|
+
.catch(e => { process.stderr.write(String((e && e.stack) || e) + '\n'); process.exit(1); });
|
|
70
|
+
} else if (!cmd || cmd === '--help' || cmd === '-h' || cmd === 'help') {
|
|
71
|
+
usage(0);
|
|
72
|
+
} else {
|
|
73
|
+
process.stderr.write('maestro: unknown command "' + cmd + '"\n');
|
|
74
|
+
usage(1);
|
|
75
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Compress a natural-language memory file into terse format to cut input tokens (backup kept, deterministic validation)
|
|
3
|
+
argument-hint: <filepath>
|
|
4
|
+
allowed-tools: Bash, Read
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Compress a natural-language memory file (CLAUDE.md, todos, notes)
|
|
8
|
+
into terse format. Input-token savings compound every turn the file
|
|
9
|
+
is loaded (AGENTS.md S8: persistent files are token cost).
|
|
10
|
+
|
|
11
|
+
Target file: `$ARGUMENTS`
|
|
12
|
+
|
|
13
|
+
Steps:
|
|
14
|
+
|
|
15
|
+
1. If no filepath was given, ask for one and stop.
|
|
16
|
+
2. Run:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
node "${CLAUDE_PLUGIN_ROOT}/scripts/compress.cjs" <filepath>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
3. Report the script's outcome to the user verbatim (chars saved,
|
|
23
|
+
backup location, or the refusal/abort reason).
|
|
24
|
+
|
|
25
|
+
The script is self-contained and enforces its own guardrails — do
|
|
26
|
+
not work around a refusal by editing or renaming files:
|
|
27
|
+
|
|
28
|
+
- Sensitive-path denylist (.env, credentials, keys, .ssh/.aws paths,
|
|
29
|
+
token-ish names): hard refusal — compression sends file contents
|
|
30
|
+
to the Anthropic API.
|
|
31
|
+
- Only .md/.txt/extensionless prose files; max 500 KB.
|
|
32
|
+
- Original saved as `<name>.original.md`; aborts if that backup
|
|
33
|
+
already exists.
|
|
34
|
+
- Deterministic validation (headings, byte-exact code blocks, URLs;
|
|
35
|
+
paths and bullet counts as warnings) with up to 2 cherry-pick fix
|
|
36
|
+
rounds; on persistent failure the original is restored untouched.
|