@maestrofrontier/frontier 1.4.0 → 1.4.2

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/README.md CHANGED
@@ -25,41 +25,30 @@
25
25
  <sub>13 fixture tasks &middot; 123 valid A/B runs &middot; 11 voids excluded &amp; re-run &middot; 6 hooks, all tested &middot; ~8 KB always-on kernel &middot; 2-line plugin install</sub>
26
26
  </p>
27
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:
28
+ > **Installrun the one line for your tool, inside that tool.** Each installs only that tool's setup (the portable `AGENTS.md` doctrine, that tool's adapter, `docs/orchestration.md`, the Frontier engine, and that tool's `/frontier` command) **append-only; it never overwrites or deletes your files.**
29
+
30
+ **Claude Code / Desktop** — native plugin (enforcement hooks, `/maestro:*` commands, skills, status line, Frontier auto-run):
29
31
 
30
32
  ```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.
33
+ /plugin marketplace add mbanderas/maestro
34
+ /plugin install maestro@maestro
61
35
  ```
62
36
 
37
+ **Every other CLI / Desktop app** — run its line in that tool's terminal, or just ask its agent to run it. It auto-targets that tool and installs nothing for the others:
38
+
39
+ | Tool | Install (run inside the tool) |
40
+ |------|-------------------------------|
41
+ | Codex (CLI / Desktop) | `npx github:mbanderas/maestro install --target codex` |
42
+ | Cursor | `npx github:mbanderas/maestro install --target cursor` |
43
+ | Gemini CLI | `npx github:mbanderas/maestro install --target gemini` |
44
+ | Cline | `npx github:mbanderas/maestro install --target cline` |
45
+ | Windsurf / Devin | `npx github:mbanderas/maestro install --target windsurf` |
46
+ | Not sure / auto-detect | `npx github:mbanderas/maestro install --target auto` |
47
+
48
+ Per tool it lays down `AGENTS.md` + that tool's adapter (`CLAUDE.md` / `GEMINI.md` / `.cursorrules`; Codex, Cline, and Windsurf read `AGENTS.md` directly), `docs/orchestration.md`, the zero-dependency Frontier engine, and that tool's `/frontier` command. Confirm with `maestro frontier status` (or `node bin/maestro.cjs frontier status` if `maestro` is not on PATH). Once published, swap `github:mbanderas/maestro` for `@maestrofrontier/frontier`.
49
+
50
+ Frontier stays **off** until you arm it: `/maestro:frontier fusion opus-gpt` (Claude Code) or `maestro frontier mode fusion --preset opus-gpt --scope <tool>` elsewhere (armed state stays per-CLI-global; `--scope codex`/`cursor`/`gemini`/`cline`/`windsurf`).
51
+
63
52
  ---
64
53
 
65
54
  > **Agents:** start with [`docs/agent-map.md`](docs/agent-map.md) for
@@ -79,22 +68,6 @@ members — fusing the CLIs you already run buys frontier-tier results. It
79
68
  is the project's new default identity; the doctrine, hooks, skills, and
80
69
  benchmarks are unchanged; the discipline layer is its foundation.
81
70
 
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
71
  It ships with the plugin and is driven by `/maestro:frontier`. Three
99
72
  modes, switched at will, **`off` by default** so installing or
100
73
  upgrading changes nothing until you opt in. **Arming it — `single` or
@@ -116,10 +89,6 @@ the synthesized answer. `off` is the disable path.
116
89
  /maestro:frontier off # disable auto-run; back to normal Maestro
117
90
  ```
118
91
 
119
- <p align="center">
120
- <img src="assets/frontier-presets.svg" width="820" alt="Maestro Frontier fusion presets reference card">
121
- </p>
122
-
123
92
  Presets define the panel; the judge and synthesizer default to Opus 4.8
124
93
  (`claude -p`), and you override either with `--judge` / `--synth`:
125
94
 
@@ -146,32 +115,23 @@ and verified end-to-end on real runs of `single` mode and the
146
115
  `opus-gpt`, `opus-duo`, and `frontier-trio` presets**. The `gpt-duo`
147
116
  preset and `--judge`/`--synth` selection share that same code path and
148
117
  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
118
+ is **measured, not asserted**: on a 100-task suite (93 scored) every
119
+ fusion panel outscored its own member models, with the strongest fusion
120
+ leading the field. That fusion-vs-solo result is a separate axis from the
121
+ in-repo A/B harness, which measures Maestro doctrine ON vs OFF; numbers
122
+ are never mixed across the two.
123
+ Operational caveats: headless web access differs per CLI (Codex confirmed
124
+ live; Claude and Gemini are gated `webTools:false` in this build), and
125
+ each cold `claude -p` panel/judge/synth call is non-trivial in cost; use
126
+ small prompts, and prefer `opus-gpt` to bound spend. The budget cap is
127
+ opt-in (`tokenBudget`, default disabled). The engine is zero-dependency
160
128
  CommonJS under [`frontier/`](frontier/); each CLI is resolved from your
161
129
  `PATH` (`claude`, `codex`, `gemini`). Binary overrides and the full
162
130
  operational reference are in
163
131
  [`commands/frontier.md`](commands/frontier.md#binary-overrides).
164
132
 
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
133
  ## What You Get
170
134
 
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
135
  Frontier is the headline; the discipline layer beneath it is what runs on
176
136
  every task. Drop two markdown files into your repo and your agent gains
177
137
  five things:
@@ -182,141 +142,27 @@ five things:
182
142
  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
143
  5. **Receipts.** A reproducible A/B benchmark harness ships in-repo, with our own retractions and nulls. Rerun every number yourself.
184
144
 
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
145
  The price, measured rather than implied: ON spends about 10% more than a
190
146
  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.
147
+ (n=9 medians, t08/t12); you are buying verification and auditability, not
148
+ speed. The premium earns its keep on unattended work (overnight loops,
149
+ scheduled runs, CI agents) where nobody reads the 3am transcript and the
150
+ close-out claim is all you have.
151
+
152
+ ## Discipline, Benchmarks, and Research
153
+
154
+ The discipline layer (verification, scope, honest status) applies to
155
+ every task, fusion or not. The full orchestration protocol lives in
156
+ [`docs/orchestration.md`](docs/orchestration.md). Benchmark data,
157
+ retractions, and methodology including the honest reading that Maestro
158
+ ON has never beaten OFF on success rate in any measured cell and that the
159
+ early efficiency story did not survive replication are in
160
+ [`docs/benchmarks.md`](docs/benchmarks.md) and
161
+ [`benchmarks/README.md`](benchmarks/README.md). The architecture is
162
+ grounded in 700+ sources; the key driver is that
163
+ [79% of multi-agent failures come from coordination, not model
164
+ capability](https://marklaursen.com/blog/why-your-multi-agent-ai-system-keeps-failing),
165
+ and that three optimized agents outperform seven.
320
166
 
321
167
  ## Runtime Adapters
322
168
 
@@ -330,6 +176,8 @@ Maestro separates **portable orchestration doctrine** from **runtime-specific ad
330
176
  | `.cursorrules` | Cursor adapter | Kernel copy (Cursor does not support imports); full S2-S6 in docs/orchestration.md |
331
177
  | [`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
178
 
179
+ Codex skills (`frontier`, `terse`, `settings`, `update`) are installed to `.agents/skills/<name>/SKILL.md` by `maestro install --target codex`. When Frontier mode is on, the `frontier` skill leads each Codex reply with `Maestro Frontier ON (<label>)` (`single · <model>` or `fusion · <preset>`); run `maestro frontier status --scope codex` to check. This indicator is Codex-scoped only.
180
+
333
181
  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
182
 
335
183
  **Subagents vs Agent Teams (Claude Code):** Maestro's `CLAUDE.md` adapter
@@ -348,7 +196,7 @@ Optional Claude Code machinery; full install steps in the linked docs.
348
196
  - **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
197
  - **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
198
  - **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)
199
+ - **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, plus a portable `node settings/cli.cjs status|list|help|set` for Codex and any other CLI. [`docs/settings.md`](docs/settings.md)
352
200
 
353
201
  ## Commands & Settings
354
202
 
@@ -369,7 +217,7 @@ Every Maestro slash command in Claude Code is namespaced `/maestro:<name>`. On C
369
217
  | Toggle | Values | What it controls |
370
218
  |---|---|---|
371
219
  | `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). |
220
+ | `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 `f` panel badge means auto-run is on: `fO+C`, `fO+C+G`, `f*3` (`O`=Opus, `C`=ChatGPT/GPT-5.5, `G`=Gemini). |
373
221
  | `context-bar` | `on`, `off` | The status-line context-window progress bar. |
374
222
 
375
223
  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).
@@ -393,109 +241,18 @@ It can't run the reload for you (a slash command can't invoke another slash comm
393
241
  /reload-plugins
394
242
  ```
395
243
 
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.
244
+ `/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`.
397
245
 
398
246
  > **Note:** There is no `/plugin update <name>` command in Claude Code. Use `/maestro:update`, or `/plugin marketplace update maestro` + `/reload-plugins`.
399
247
 
400
248
  ### Codex / Cursor (portable installs, no plugin system)
401
249
 
402
- Run `/update` if your integration file exposes it, or update manually:
403
-
404
250
  - **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`.
251
+ - **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 from the latest `main`.
406
252
 
407
253
  ### Gemini / other CLIs
408
254
 
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).
255
+ 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.
499
256
 
500
257
  ## Contributing
501
258
 
package/docs/codex.md ADDED
@@ -0,0 +1,98 @@
1
+ # Maestro on Codex
2
+
3
+ Codex reads `AGENTS.md` natively, no adapter file needed. This page
4
+ maps Maestro's concepts onto Codex specifics. All behavior below was
5
+ verified against the official Codex docs
6
+ ([AGENTS.md guide](https://developers.openai.com/codex/guides/agents-md),
7
+ [Automations](https://developers.openai.com/codex/app/automations.md),
8
+ [Subagents](https://developers.openai.com/codex/subagents.md))
9
+ on 2026-06-12.
10
+
11
+ ## AGENTS.md semantics
12
+
13
+ Codex discovers instruction files in this order:
14
+
15
+ 1. **Global:** `~/.codex/AGENTS.override.md` if present, else
16
+ `~/.codex/AGENTS.md`.
17
+ 2. **Project:** walking from the Git root down to the current working
18
+ directory, checking each level for `AGENTS.override.md`, then
19
+ `AGENTS.md`.
20
+
21
+ Files are concatenated root-down with blank lines between them; files
22
+ closer to your current directory appear later in the combined prompt
23
+ and therefore override earlier guidance. Codex skips empty files,
24
+ discovers once per run, and stops adding files once the combined set
25
+ hits `project_doc_max_bytes` (32 KiB by default).
26
+
27
+ Practical consequences for Maestro:
28
+
29
+ - **Placement:** put Maestro's `AGENTS.md` at the repository root. If
30
+ you already have a project `AGENTS.md`, append Maestro's content to
31
+ it (Codex concatenates by directory level, not by file).
32
+ - **Budget:** Maestro's always-on kernel is ~8 KB, a quarter of the
33
+ default 32 KiB cap, leaving room for your project instructions
34
+ (the full S2-S6 protocol lives in `docs/orchestration.md`, read on
35
+ demand). If you layer nested `AGENTS.md` files, watch the cap:
36
+ Codex silently stops adding files beyond it.
37
+ - **Global install:** putting Maestro in `~/.codex/AGENTS.md` applies
38
+ the doctrine to every project; per-repo files then layer on top and
39
+ win where they conflict.
40
+
41
+ ## Multi-agent routing (S2-S6 mapping)
42
+
43
+ Codex supports subagent workflows in the CLI and app, but current Codex
44
+ docs specify that subagents spawn only when the user explicitly asks for
45
+ them. Practical mapping for Maestro:
46
+
47
+ - If the user did **not** explicitly ask for subagents, parallel
48
+ agents, or delegation, emit the counted S1 verdict and continue
49
+ single-agent even when the portable gate would otherwise route to
50
+ S2-S6.
51
+ - If the user explicitly asked for subagents/parallel work and the S1
52
+ gate returns multi-agent, map Maestro's Planner, Specialists, and
53
+ Staff Engineer to Codex subagents. Keep specialist prompts scoped and
54
+ cap parallel groups at 4 as usual.
55
+ - Claude Code agent teams do not transfer to Codex. Codex subagents are
56
+ the only Codex-native mapping for Maestro specialists.
57
+
58
+ ## Long-horizon operation (S10 mapping)
59
+
60
+ Claude Code maps S10 to `/loop`, `/schedule`, and `ScheduleWakeup`.
61
+ The Codex analog is **Automations** (Codex app, automations pane):
62
+ recurring prompts that run in the background on minute-based, daily,
63
+ weekly, or cron schedules.
64
+
65
+ | Maestro S10 concept | Codex mechanism |
66
+ |---|---|
67
+ | Self-paced session loop | **Thread automations**, heartbeat-style recurring wake-up calls attached to the current thread, preserving conversation context |
68
+ | Durable scheduled routine | **Standalone/project automations**, independent runs; findings land in the Triage inbox (auto-archived when there is nothing to report) |
69
+ | Checkpoint artifact | Same convention: one `_<task>.md` in the repo root (gitignore `_*`), read first on every run, holding phase status, findings with sources, decisions with rationale |
70
+ | Scripted/CI iteration | `codex exec "<prompt>"` non-interactive runs |
71
+
72
+ S10 rules apply unchanged: hard caps on iterations, completion criteria
73
+ declared up front, externalized state (the thread is not durable
74
+ memory), and an explicit final report instead of a zombie loop. For
75
+ project-scoped automations note the Codex requirement that the local
76
+ app is running and the project is on disk.
77
+
78
+ ## What does not transfer
79
+
80
+ Codex has no user-hook system equivalent to Claude Code's, so Maestro's
81
+ structural enforcement pack (subagent guard, loop guard, phase-scope
82
+ guard, gate telemetry) does not run on Codex. The prose doctrine in
83
+ `AGENTS.md` is the enforcement surface; S7.3's verification gate relies
84
+ on the model honoring it rather than on a hook.
85
+
86
+ The Maestro context bar also does not apply: Codex CLI ships a native
87
+ context-usage indicator (`/statusline` picker, or `context` in
88
+ `[tui].status_line` in `~/.codex/config.toml`).
89
+
90
+ ## Skills and the Frontier ON indicator
91
+
92
+ `maestro install --target codex` installs the `frontier`, `terse`, `settings`,
93
+ and `update` Maestro commands as Codex skills (no-clobber) to
94
+ `.agents/skills/<name>/SKILL.md` (per-repo) or `~/.agents/skills/<name>/SKILL.md`
95
+ (global). When `maestro frontier status --scope codex` reports mode != off, the
96
+ `frontier` skill instructs Codex to lead its reply with
97
+ `Maestro Frontier ON (<label>)` — `single · <model>` or `fusion · <preset>`. When
98
+ mode is off, no indicator line appears.
@@ -20,7 +20,7 @@ loads on demand.
20
20
  | Runtime | Source in this repo | Install to | Invoke |
21
21
  |---|---|---|---|
22
22
  | Cursor | `integrations/cursor/commands/frontier.md` | `.cursor/commands/frontier.md` (per-repo) or `~/.cursor/commands/` (global) | `/frontier` |
23
- | Codex (CLI + IDE/Desktop) | `integrations/codex/prompts/frontier.md` | `~/.codex/prompts/frontier.md` (global only) | `/frontier` |
23
+ | Codex (CLI + IDE/Desktop) | `integrations/codex/skills/frontier/SKILL.md` (and `terse`, `settings`, `update`) | `.agents/skills/<name>/SKILL.md` (per-repo) or `~/.agents/skills/<name>/SKILL.md` (global) | `/frontier` |
24
24
 
25
25
  After adding a file, restart the tool or open a new chat so it loads. Both runtimes
26
26
  expand `$ARGUMENTS` to the full argument string — `/frontier fusion opus-gpt` passes
@@ -60,7 +60,7 @@ updates are a single invocation:
60
60
  | Runtime | Source in this repo | Install to | Invoke |
61
61
  |---|---|---|---|
62
62
  | Cursor | `integrations/cursor/commands/update.md` | `.cursor/commands/update.md` (per-repo) or `~/.cursor/commands/` (global) | `/update` |
63
- | Codex (CLI + IDE/Desktop) | `integrations/codex/prompts/update.md` | `~/.codex/prompts/update.md` (global only) | `/update` |
63
+ | Codex (CLI + IDE/Desktop) | `integrations/codex/skills/update/SKILL.md` | `.agents/skills/update/SKILL.md` (per-repo) or `~/.agents/skills/update/SKILL.md` (global) | `/update` |
64
64
 
65
65
  **Version model:** Maestro pins no version for portable files. Fetching from
66
66
  latest `main` always resolves the newest committed code — no manual version bump
@@ -71,13 +71,20 @@ needed per release.
71
71
  - **No auto-run.** Neither runtime has a `UserPromptSubmit` hook, so arming a mode
72
72
  (`mode fusion`) only persists state — nothing fuses later prompts automatically.
73
73
  Use `/frontier run "<prompt>"` to actually run the panel.
74
- - **Codex custom prompts are deprecated.** OpenAI's docs say *"Deprecated. Use
75
- skills for reusable prompts."* The prompt file still works in current Codex (CLI
76
- and IDE), but the forward path is a Codex *skill* (repo-shareable, implicitly
77
- invoked) — a different format than this template. This port favors the simple
78
- prompt file by design.
79
- - **Codex has no confirmed per-repo prompt path** `~/.codex/prompts/` is global
80
- per-user. Cursor's `.cursor/commands/` is the repo-scoped option.
74
+ - **Codex uses skills, not prompts.** `maestro install --target codex` installs the
75
+ `frontier`, `terse`, `settings`, and `update` skills as Codex skills
76
+ (no-clobber) to `.agents/skills/<name>/SKILL.md` (per-repo) or
77
+ `~/.agents/skills/<name>/SKILL.md` (global). The deprecated
78
+ `~/.codex/prompts/frontier.md` prompt file remains as a compatibility bridge but
79
+ the canonical path is the skill.
80
+ - **Codex per-repo skill path:** `.agents/skills/<name>/SKILL.md` is the
81
+ repo-scoped option for Codex skills. The global path is
82
+ `~/.agents/skills/<name>/SKILL.md`.
83
+ - **Maestro Frontier ON indicator (Codex only).** When
84
+ `maestro frontier status --scope codex` reports mode != off, the `frontier` skill
85
+ instructs Codex to lead its reply with `Maestro Frontier ON (<label>)` —
86
+ `single · <model>` or `fusion · <preset>`. When mode is off, no indicator line
87
+ appears. This is Codex-scoped only and has no effect on Claude Code.
81
88
  - **Requires `frontier/` and `bin/maestro.cjs` in the project.** The command runs
82
89
  `maestro frontier ...` (or `node bin/maestro.cjs frontier ...`) from the repo root,
83
90
  so the engine must have been copied in during install.