@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
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Maestro PostToolUse tool-call budget advisory (Fable T1). Log-only,
|
|
3
|
+
// zero prompt tokens, never blocks.
|
|
4
|
+
//
|
|
5
|
+
// Fable scales tool calls to task complexity (1 for single facts; 3-5
|
|
6
|
+
// medium; 5-10 deep research). Maestro caps subagent tool budgets (S9)
|
|
7
|
+
// but nothing watches the ORCHESTRATOR's own pre-edit exploration. This
|
|
8
|
+
// hook measures how many exploration (non-edit) tool calls happened this
|
|
9
|
+
// turn before the FIRST file edit; if that exceeds a budget it appends
|
|
10
|
+
// one advisory row to a local log. It is a behavioural lever, evidence-
|
|
11
|
+
// gated: log-only first, so a preregistered OFF/ON fixture can show the
|
|
12
|
+
// signal separates before anyone promotes it to an enforcing warning.
|
|
13
|
+
//
|
|
14
|
+
// Design choices:
|
|
15
|
+
// - Fires on PostToolUse for edit tools; evaluates once per turn at the
|
|
16
|
+
// first-edit boundary (a per-turn marker file makes it idempotent).
|
|
17
|
+
// - "Turn" = everything since the last genuine user prompt, located from
|
|
18
|
+
// the transcript with the same heuristic as maestro-phase-scope.
|
|
19
|
+
// - ZERO prompt tokens: never writes stdout / additionalContext, so it
|
|
20
|
+
// adds nothing to context. It only appends a counts-only JSON row.
|
|
21
|
+
// - NEVER blocks: PostToolUse cannot block and this emits no decision.
|
|
22
|
+
// - Privacy: records counts + project folder basename only -- no
|
|
23
|
+
// prompts, no file contents, no paths. No network, ever.
|
|
24
|
+
//
|
|
25
|
+
// Env:
|
|
26
|
+
// - MAESTRO_TOOLBUDGET=0 disable entirely (default: active, log-only)
|
|
27
|
+
// - MAESTRO_TOOLBUDGET_THRESHOLD exploration-call budget (default 20)
|
|
28
|
+
// - MAESTRO_TOOLBUDGET_LOG override log path (default ~/.claude/maestro-toolbudget.jsonl)
|
|
29
|
+
// - MAESTRO_TOOLBUDGET_MARKERDIR override per-turn marker dir (default OS tmp)
|
|
30
|
+
//
|
|
31
|
+
// Promotion path (NOT shipped, pending fixture evidence): a `warn` mode
|
|
32
|
+
// that emits additionalContext at the first edit. Kept out until the log
|
|
33
|
+
// shows the budget separates real over-exploration from normal work.
|
|
34
|
+
//
|
|
35
|
+
// Payload fields verified against code.claude.com/docs/en/hooks
|
|
36
|
+
// (PostToolUse input: session_id, transcript_path, cwd, tool_name,
|
|
37
|
+
// tool_input; PostToolUse output cannot block), 2026-06-16.
|
|
38
|
+
//
|
|
39
|
+
// .cjs so Node treats it as CommonJS regardless of any "type": "module"
|
|
40
|
+
// package.json in a parent directory of the install location.
|
|
41
|
+
|
|
42
|
+
'use strict';
|
|
43
|
+
|
|
44
|
+
const fs = require('fs');
|
|
45
|
+
const os = require('os');
|
|
46
|
+
const path = require('path');
|
|
47
|
+
const crypto = require('crypto');
|
|
48
|
+
|
|
49
|
+
if (process.env.MAESTRO_TOOLBUDGET === '0') process.exit(0);
|
|
50
|
+
|
|
51
|
+
const EDIT_TOOLS = new Set(['Edit', 'Write', 'NotebookEdit', 'MultiEdit']);
|
|
52
|
+
|
|
53
|
+
let data = {};
|
|
54
|
+
try { data = JSON.parse(fs.readFileSync(0, 'utf8')); } catch { process.exit(0); }
|
|
55
|
+
|
|
56
|
+
// Only the first edit of a turn matters; ignore every non-edit tool.
|
|
57
|
+
if (!EDIT_TOOLS.has(data.tool_name)) process.exit(0);
|
|
58
|
+
|
|
59
|
+
// Counting exploration before the first edit needs the transcript.
|
|
60
|
+
if (!data.transcript_path || !fs.existsSync(data.transcript_path)) process.exit(0);
|
|
61
|
+
|
|
62
|
+
let lines = [];
|
|
63
|
+
try {
|
|
64
|
+
const buf = fs.readFileSync(data.transcript_path, 'utf8');
|
|
65
|
+
lines = (buf.length > 4000000 ? buf.slice(-4000000) : buf).split(/\r?\n/);
|
|
66
|
+
} catch { process.exit(0); }
|
|
67
|
+
|
|
68
|
+
const parsed = lines.map(l => { try { return JSON.parse(l); } catch { return null; } });
|
|
69
|
+
|
|
70
|
+
// Locate the last genuine user prompt (typed text, not a tool_result
|
|
71
|
+
// carrier); everything after it is the current turn.
|
|
72
|
+
let turnStart = 0;
|
|
73
|
+
for (let i = 0; i < parsed.length; i++) {
|
|
74
|
+
const e = parsed[i];
|
|
75
|
+
if (!e || e.type !== 'user' || e.isMeta || !e.message) continue;
|
|
76
|
+
const c = e.message.content;
|
|
77
|
+
const genuine = typeof c === 'string'
|
|
78
|
+
? true
|
|
79
|
+
: Array.isArray(c) && c.some(x => x && x.type === 'text') && !c.some(x => x && x.type === 'tool_result');
|
|
80
|
+
if (genuine) turnStart = i;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Evaluate at most once per turn, at the first-edit boundary.
|
|
84
|
+
const markerDir = process.env.MAESTRO_TOOLBUDGET_MARKERDIR || os.tmpdir();
|
|
85
|
+
const turnKey = crypto.createHash('sha1')
|
|
86
|
+
.update(String(data.session_id || '') + ':' + turnStart + ':' + (lines[turnStart] || ''))
|
|
87
|
+
.digest('hex').slice(0, 16);
|
|
88
|
+
const marker = path.join(markerDir, 'maestro-toolbudget-' + turnKey);
|
|
89
|
+
if (fs.existsSync(marker)) process.exit(0);
|
|
90
|
+
try { fs.mkdirSync(markerDir, { recursive: true }); fs.writeFileSync(marker, '1'); } catch {}
|
|
91
|
+
|
|
92
|
+
// Count exploration (non-edit) tool calls that ran before the first edit
|
|
93
|
+
// this turn. priorEdit stops the count at the first edit, whether or not
|
|
94
|
+
// the triggering edit is already in the transcript.
|
|
95
|
+
let explore = 0;
|
|
96
|
+
let priorEdit = false;
|
|
97
|
+
for (let i = turnStart; i < parsed.length; i++) {
|
|
98
|
+
const e = parsed[i];
|
|
99
|
+
if (!e || e.type !== 'assistant' || !e.message || !Array.isArray(e.message.content)) continue;
|
|
100
|
+
for (const item of e.message.content) {
|
|
101
|
+
if (!item || item.type !== 'tool_use') continue;
|
|
102
|
+
if (EDIT_TOOLS.has(item.name)) { priorEdit = true; break; }
|
|
103
|
+
explore++;
|
|
104
|
+
}
|
|
105
|
+
if (priorEdit) break;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const threshold = parseInt(process.env.MAESTRO_TOOLBUDGET_THRESHOLD, 10) || 20;
|
|
109
|
+
if (explore > threshold) {
|
|
110
|
+
const row = {
|
|
111
|
+
ts: new Date().toISOString(),
|
|
112
|
+
session_id: data.session_id || null,
|
|
113
|
+
kind: 'toolbudget-advisory',
|
|
114
|
+
explore_calls: explore,
|
|
115
|
+
threshold,
|
|
116
|
+
first_edit_tool: data.tool_name,
|
|
117
|
+
project: data.cwd ? path.basename(data.cwd) : null
|
|
118
|
+
};
|
|
119
|
+
const logPath = process.env.MAESTRO_TOOLBUDGET_LOG
|
|
120
|
+
|| path.join(os.homedir(), '.claude', 'maestro-toolbudget.jsonl');
|
|
121
|
+
try {
|
|
122
|
+
fs.mkdirSync(path.dirname(logPath), { recursive: true });
|
|
123
|
+
fs.appendFileSync(logPath, JSON.stringify(row) + '\n');
|
|
124
|
+
} catch { /* advisory is best-effort; never disrupt the session */ }
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
process.exit(0);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Maestro integrations — slash commands for other CLIs
|
|
2
|
+
|
|
3
|
+
The Claude Code plugin ships Maestro's slash commands (`/maestro:*`) plus
|
|
4
|
+
enforcement hooks and auto-run. Other agent CLIs support **custom slash commands**
|
|
5
|
+
too, but only as *prompt templates* — they inject instruction text, they do not run
|
|
6
|
+
wrapper logic, gate tools, or auto-run on every prompt. So these ports are typing
|
|
7
|
+
shortcuts that tell the agent to shell out to the portable Frontier engine via
|
|
8
|
+
`maestro frontier ...`; they are **not** a plugin equivalent.
|
|
9
|
+
|
|
10
|
+
Only `/frontier` and `/update` are ported. `/frontier` drives the portable engine
|
|
11
|
+
(`maestro frontier ...`); `/update` refreshes the install (git pull or re-download +
|
|
12
|
+
re-copy `frontier/`, `bin/maestro.cjs`, and the command files). `terse`,
|
|
13
|
+
`context-bar`, and `settings` depend on Claude Code hooks/status line and would only
|
|
14
|
+
inject text elsewhere; `compress` operates on memory files and is partly portable.
|
|
15
|
+
The orchestration doctrine itself needs no command — it lives in `AGENTS.md` and
|
|
16
|
+
loads on demand.
|
|
17
|
+
|
|
18
|
+
## Placement
|
|
19
|
+
|
|
20
|
+
| Runtime | Source in this repo | Install to | Invoke |
|
|
21
|
+
|---|---|---|---|
|
|
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` |
|
|
24
|
+
|
|
25
|
+
After adding a file, restart the tool or open a new chat so it loads. Both runtimes
|
|
26
|
+
expand `$ARGUMENTS` to the full argument string — `/frontier fusion opus-gpt` passes
|
|
27
|
+
`fusion opus-gpt`.
|
|
28
|
+
|
|
29
|
+
Each runtime passes an explicit `--scope` flag so armed state is per-CLI and never
|
|
30
|
+
leaks across runtimes on the same machine: Codex uses `--scope codex`, Cursor uses
|
|
31
|
+
`--scope cursor`. Claude Code autodetects its scope and needs no flag. If you add a
|
|
32
|
+
Gemini or Antigravity integration, pass `--scope gemini`.
|
|
33
|
+
|
|
34
|
+
## Updating portable installs
|
|
35
|
+
|
|
36
|
+
Portable installs have no plugin system. Update = refresh the copied files from
|
|
37
|
+
latest `main`.
|
|
38
|
+
|
|
39
|
+
**If you cloned the Maestro repo:**
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
git -C <path-to-maestro-clone> pull
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Then re-copy `frontier/` and the integration command files into your project.
|
|
46
|
+
|
|
47
|
+
**If you copied files manually** (no clone), re-download from latest `main` and
|
|
48
|
+
overwrite the copies in your project:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
curl -O https://raw.githubusercontent.com/mbanderas/maestro/main/AGENTS.md
|
|
52
|
+
curl -O https://raw.githubusercontent.com/mbanderas/maestro/main/frontier/cli.cjs
|
|
53
|
+
curl -O https://raw.githubusercontent.com/mbanderas/maestro/main/bin/maestro.cjs
|
|
54
|
+
# Also re-copy the integration command file(s) you installed.
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
A `/update` shortcut command ships for each runtime — install it once and future
|
|
58
|
+
updates are a single invocation:
|
|
59
|
+
|
|
60
|
+
| Runtime | Source in this repo | Install to | Invoke |
|
|
61
|
+
|---|---|---|---|
|
|
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` |
|
|
64
|
+
|
|
65
|
+
**Version model:** Maestro pins no version for portable files. Fetching from
|
|
66
|
+
latest `main` always resolves the newest committed code — no manual version bump
|
|
67
|
+
needed per release.
|
|
68
|
+
|
|
69
|
+
## Caveats
|
|
70
|
+
|
|
71
|
+
- **No auto-run.** Neither runtime has a `UserPromptSubmit` hook, so arming a mode
|
|
72
|
+
(`mode fusion`) only persists state — nothing fuses later prompts automatically.
|
|
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.
|
|
81
|
+
- **Requires `frontier/` and `bin/maestro.cjs` in the project.** The command runs
|
|
82
|
+
`maestro frontier ...` (or `node bin/maestro.cjs frontier ...`) from the repo root,
|
|
83
|
+
so the engine must have been copied in during install.
|
|
84
|
+
- **Windows + Gemini judge/synth.** `gemini` is fine as a panel member, but a poor
|
|
85
|
+
`--judge`/`--synth` on Windows (its arg-passing rejects the newline-bearing
|
|
86
|
+
judge/synth prompts, so the stage degrades). Use `opus` or `gpt-5.5` for
|
|
87
|
+
judge/synth on Windows.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontier
|
|
3
|
+
description: Maestro Frontier local multi-CLI fusion engine — switch mode, or run a prompt through the panel
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Drive the **Maestro Frontier** engine — a zero-dependency local multi-CLI fusion
|
|
7
|
+
engine (a parallel panel of local CLIs → a judge model's analysis → a grounded
|
|
8
|
+
synthesis). It is the same engine the Claude Code plugin ships; here it runs
|
|
9
|
+
through the `maestro` CLI with `--scope cline`.
|
|
10
|
+
|
|
11
|
+
**Install path (pick one):**
|
|
12
|
+
|
|
13
|
+
- Project-scoped: `.cline/skills/frontier/SKILL.md`
|
|
14
|
+
- Global: `~/.cline/skills/frontier/SKILL.md`
|
|
15
|
+
|
|
16
|
+
**This is a typing shortcut, not the Claude Code plugin.** Cline has no prompt
|
|
17
|
+
hook, so arming a mode does **not** auto-run the engine on later prompts — it
|
|
18
|
+
only persists the mode. To actually fuse a prompt, invoke `run` explicitly
|
|
19
|
+
(step 3).
|
|
20
|
+
|
|
21
|
+
When the user invokes this skill, map their request to one engine CLI call and
|
|
22
|
+
run it in the terminal (Cline will request approval before executing). Do not
|
|
23
|
+
edit the engine's state file by hand.
|
|
24
|
+
|
|
25
|
+
## 1. Switch mode
|
|
26
|
+
|
|
27
|
+
Persists to `~/.config/maestro/frontier-state.cline.json`; default `off`.
|
|
28
|
+
`--scope cline` keeps Cline's armed mode independent from Claude Code, Codex,
|
|
29
|
+
Cursor, and Gemini on the same machine:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
maestro frontier mode off --scope cline
|
|
33
|
+
maestro frontier mode single --model <model> --scope cline
|
|
34
|
+
maestro frontier mode fusion --preset <preset> --scope cline
|
|
35
|
+
maestro frontier mode fusion --preset custom --models <a,b,c> --scope cline
|
|
36
|
+
maestro frontier mode fusion --preset <preset> --judge <model> --synth <model> --scope cline
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Models: `opus` (Claude Opus 4.8, needs `claude`), `gpt-5.5` (needs `codex`),
|
|
40
|
+
`gemini` (needs `gemini`). Presets: `opus-duo`, `opus-gpt`, `gpt-duo`,
|
|
41
|
+
`frontier-trio`, `custom`. Judge + synth default to Opus; `--judge`/`--synth`
|
|
42
|
+
override for any preset (e.g. `--judge opus --synth gpt-5.5`). `gpt-duo` runs
|
|
43
|
+
judge + synth on GPT-5.5 — a Codex-only fusion that needs no `claude`.
|
|
44
|
+
|
|
45
|
+
## 2. Show current mode/preset
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
maestro frontier status --scope cline
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## 3. Run a prompt through the current mode
|
|
52
|
+
|
|
53
|
+
This is the action that actually fuses, since nothing auto-runs here. Set a
|
|
54
|
+
mode first (step 1), then:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
maestro frontier run "<prompt>" --scope cline
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
- `off`: prints a notice, spawns nothing.
|
|
61
|
+
- `single`: dispatches the one selected CLI, prints its answer.
|
|
62
|
+
- `fusion`: runs the panel in parallel → judge → synthesizer; prints the final
|
|
63
|
+
answer (a one-line run meta goes to stderr). Report stdout verbatim.
|
|
64
|
+
|
|
65
|
+
On error the engine prints `ERROR [<reason>]: <detail>` to stderr and exits
|
|
66
|
+
non-zero — relay the reason.
|
|
67
|
+
|
|
68
|
+
## Notes
|
|
69
|
+
|
|
70
|
+
- Real `single`/`fusion` runs spawn local CLIs and cost tokens; use small prompts.
|
|
71
|
+
`off` is free.
|
|
72
|
+
- Each model's CLI must be on `PATH`, or point at a specific build with
|
|
73
|
+
`MAESTRO_CLAUDE_BIN` / `MAESTRO_CODEX_BIN` / `MAESTRO_GEMINI_BIN`.
|
|
74
|
+
- Requires `maestro` on `PATH` (installed during Maestro setup). If it is missing,
|
|
75
|
+
install Maestro first.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Maestro Frontier local multi-CLI fusion engine — switch mode, or run a prompt through the panel
|
|
3
|
+
argument-hint: "<off | single <model> | fusion <preset> | status | run <prompt>>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Drive the **Maestro Frontier** engine — a zero-dependency local multi-CLI fusion
|
|
7
|
+
engine (a parallel panel of local CLIs → a judge model's analysis → a grounded
|
|
8
|
+
synthesis). It is the same engine the Claude Code plugin ships; here it runs through
|
|
9
|
+
the `maestro` CLI, installed into this repo during setup.
|
|
10
|
+
|
|
11
|
+
**This is a typing shortcut, not the Claude Code plugin.** Codex has no
|
|
12
|
+
prompt hook, so arming a mode does **not** auto-run the engine on later prompts —
|
|
13
|
+
it only persists the mode. To actually fuse a prompt, invoke `run` explicitly
|
|
14
|
+
(step 3).
|
|
15
|
+
|
|
16
|
+
Requested action: `$ARGUMENTS`
|
|
17
|
+
|
|
18
|
+
Map it to one engine CLI call and run it from the repo root. Do not edit
|
|
19
|
+
the engine's state file by hand.
|
|
20
|
+
|
|
21
|
+
1. Switch mode (persists to `~/.config/maestro/frontier-state.codex.json`; default `off`).
|
|
22
|
+
`--scope codex` keeps Codex's armed mode independent from Claude Code and Cursor on the same machine:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
maestro frontier mode off --scope codex
|
|
26
|
+
maestro frontier mode single --model <model> --scope codex
|
|
27
|
+
maestro frontier mode fusion --preset <preset> --scope codex
|
|
28
|
+
maestro frontier mode fusion --preset custom --models <a,b,c> --scope codex
|
|
29
|
+
maestro frontier mode fusion --preset <preset> --judge <model> --synth <model> --scope codex
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Models: `opus` (Claude Opus 4.8, needs `claude`), `gpt-5.5` (needs `codex`),
|
|
33
|
+
`gemini` (needs `gemini`). Presets: `opus-duo`, `opus-gpt`, `gpt-duo`,
|
|
34
|
+
`frontier-trio`, `custom`. Judge + synth default to Opus; `--judge`/`--synth`
|
|
35
|
+
override for any preset (e.g. `--judge opus --synth gpt-5.5`). `gpt-duo` runs
|
|
36
|
+
judge + synth on GPT-5.5 — a Codex-only fusion that needs no `claude`.
|
|
37
|
+
|
|
38
|
+
2. Show the current mode/preset:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
maestro frontier status --scope codex
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
3. Run a prompt through the current mode — **this is the action that actually
|
|
45
|
+
fuses**, since nothing auto-runs here. Set a mode first (step 1), then:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
maestro frontier run "<prompt>" --scope codex
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
- `off`: prints a notice, spawns nothing.
|
|
52
|
+
- `single`: dispatches the one selected CLI, prints its answer.
|
|
53
|
+
- `fusion`: runs the panel in parallel → judge → synthesizer; prints the final
|
|
54
|
+
answer (a one-line run meta goes to stderr). Report stdout verbatim.
|
|
55
|
+
|
|
56
|
+
On error the engine prints `ERROR [<reason>]: <detail>` to stderr and exits
|
|
57
|
+
non-zero — relay the reason.
|
|
58
|
+
|
|
59
|
+
Notes:
|
|
60
|
+
|
|
61
|
+
- Real `single`/`fusion` runs spawn local CLIs and cost tokens; use small prompts.
|
|
62
|
+
`off` is free.
|
|
63
|
+
- Each model's CLI must be on `PATH`, or point at a specific build with
|
|
64
|
+
`MAESTRO_CLAUDE_BIN` / `MAESTRO_CODEX_BIN` / `MAESTRO_GEMINI_BIN`.
|
|
65
|
+
- Requires `maestro` on `PATH` (installed during Maestro setup). If it is missing,
|
|
66
|
+
install Maestro first.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Update Maestro portable files to the latest committed code
|
|
3
|
+
argument-hint: ""
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Refresh the Maestro portable install in this repository to the latest committed
|
|
7
|
+
code from <https://github.com/mbanderas/maestro>.
|
|
8
|
+
|
|
9
|
+
Maestro has no version pin for portable installs — fetching the latest `main`
|
|
10
|
+
always resolves the newest committed code.
|
|
11
|
+
|
|
12
|
+
**If this repo contains a git clone of the Maestro source**, run:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
git -C <path-to-maestro-clone> pull
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Then re-copy `frontier/` and any integration command files you use into this project.
|
|
19
|
+
|
|
20
|
+
**If you downloaded and copied files manually** (no clone), re-fetch and re-copy
|
|
21
|
+
from latest `main`:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
curl -O https://raw.githubusercontent.com/mbanderas/maestro/main/AGENTS.md
|
|
25
|
+
curl -O https://raw.githubusercontent.com/mbanderas/maestro/main/frontier/cli.cjs
|
|
26
|
+
curl -O https://raw.githubusercontent.com/mbanderas/maestro/main/bin/maestro.cjs
|
|
27
|
+
# Re-copy any integration command files you installed:
|
|
28
|
+
# integrations/codex/prompts/frontier.md -> ~/.codex/prompts/frontier.md
|
|
29
|
+
# integrations/codex/prompts/update.md -> ~/.codex/prompts/update.md
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
After updating, run `node bin/maestro.cjs frontier status` to confirm the engine is present.
|
|
33
|
+
|
|
34
|
+
Report what was refreshed and note any errors.
|
|
35
|
+
|
|
36
|
+
Do not edit any other files.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
Maestro Frontier — drive the local multi-CLI fusion engine (switch mode, or run a prompt through the panel).
|
|
2
|
+
|
|
3
|
+
Drive the **Maestro Frontier** engine — a zero-dependency local multi-CLI fusion
|
|
4
|
+
engine (a parallel panel of local CLIs → a judge model's analysis → a grounded
|
|
5
|
+
synthesis). It is the same engine the Claude Code plugin ships; here it runs through
|
|
6
|
+
the `maestro` CLI, installed into this repo during setup.
|
|
7
|
+
|
|
8
|
+
**This is a typing shortcut, not the Claude Code plugin.** Cursor has no
|
|
9
|
+
prompt hook, so arming a mode does **not** auto-run the engine on later prompts —
|
|
10
|
+
it only persists the mode. To actually fuse a prompt, invoke `run` explicitly
|
|
11
|
+
(step 3).
|
|
12
|
+
|
|
13
|
+
Requested action: `$ARGUMENTS`
|
|
14
|
+
|
|
15
|
+
Map it to one engine CLI call and run it from the repo root. Do not edit
|
|
16
|
+
the engine's state file by hand.
|
|
17
|
+
|
|
18
|
+
1. Switch mode (persists to `~/.config/maestro/frontier-state.cursor.json`; default `off`).
|
|
19
|
+
`--scope cursor` keeps Cursor's armed mode independent from Claude Code and Codex on the same machine:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
maestro frontier mode off --scope cursor
|
|
23
|
+
maestro frontier mode single --model <model> --scope cursor
|
|
24
|
+
maestro frontier mode fusion --preset <preset> --scope cursor
|
|
25
|
+
maestro frontier mode fusion --preset custom --models <a,b,c> --scope cursor
|
|
26
|
+
maestro frontier mode fusion --preset <preset> --judge <model> --synth <model> --scope cursor
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Models: `opus` (Claude Opus 4.8, needs `claude`), `gpt-5.5` (needs `codex`),
|
|
30
|
+
`gemini` (needs `gemini`). Presets: `opus-duo`, `opus-gpt`, `gpt-duo`,
|
|
31
|
+
`frontier-trio`, `custom`. Judge + synth default to Opus; `--judge`/`--synth`
|
|
32
|
+
override for any preset (e.g. `--judge opus --synth gpt-5.5`). `gpt-duo` runs
|
|
33
|
+
judge + synth on GPT-5.5 — a Codex-only fusion that needs no `claude`.
|
|
34
|
+
|
|
35
|
+
2. Show the current mode/preset:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
maestro frontier status --scope cursor
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
3. Run a prompt through the current mode — **this is the action that actually
|
|
42
|
+
fuses**, since nothing auto-runs here. Set a mode first (step 1), then:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
maestro frontier run "<prompt>" --scope cursor
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
- `off`: prints a notice, spawns nothing.
|
|
49
|
+
- `single`: dispatches the one selected CLI, prints its answer.
|
|
50
|
+
- `fusion`: runs the panel in parallel → judge → synthesizer; prints the final
|
|
51
|
+
answer (a one-line run meta goes to stderr). Report stdout verbatim.
|
|
52
|
+
|
|
53
|
+
On error the engine prints `ERROR [<reason>]: <detail>` to stderr and exits
|
|
54
|
+
non-zero — relay the reason.
|
|
55
|
+
|
|
56
|
+
Notes:
|
|
57
|
+
|
|
58
|
+
- Real `single`/`fusion` runs spawn local CLIs and cost tokens; use small prompts.
|
|
59
|
+
`off` is free.
|
|
60
|
+
- Each model's CLI must be on `PATH`, or point at a specific build with
|
|
61
|
+
`MAESTRO_CLAUDE_BIN` / `MAESTRO_CODEX_BIN` / `MAESTRO_GEMINI_BIN`.
|
|
62
|
+
- Requires `maestro` on `PATH` (installed during Maestro setup). If it is missing,
|
|
63
|
+
install Maestro first.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Maestro update — refresh the portable Maestro files in this repository to the latest committed code.
|
|
2
|
+
|
|
3
|
+
Refresh the Maestro portable install in this repository to the latest committed
|
|
4
|
+
code from <https://github.com/mbanderas/maestro>.
|
|
5
|
+
|
|
6
|
+
Maestro has no version pin for portable installs — fetching the latest `main`
|
|
7
|
+
always resolves the newest committed code.
|
|
8
|
+
|
|
9
|
+
**If this repo contains a git clone of the Maestro source**, run:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
git -C <path-to-maestro-clone> pull
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Then re-copy `frontier/` and any integration command files you use into this project.
|
|
16
|
+
|
|
17
|
+
**If you downloaded and copied files manually** (no clone), re-fetch and re-copy
|
|
18
|
+
from latest `main`:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
curl -O https://raw.githubusercontent.com/mbanderas/maestro/main/AGENTS.md
|
|
22
|
+
curl -O https://raw.githubusercontent.com/mbanderas/maestro/main/.cursorrules
|
|
23
|
+
curl -O https://raw.githubusercontent.com/mbanderas/maestro/main/frontier/cli.cjs
|
|
24
|
+
curl -O https://raw.githubusercontent.com/mbanderas/maestro/main/bin/maestro.cjs
|
|
25
|
+
# Re-copy the Cursor command files you installed:
|
|
26
|
+
# integrations/cursor/commands/frontier.md -> .cursor/commands/frontier.md
|
|
27
|
+
# integrations/cursor/commands/update.md -> .cursor/commands/update.md
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
After updating, run `node bin/maestro.cjs frontier status` to confirm the engine is present.
|
|
31
|
+
|
|
32
|
+
Report what was refreshed and note any errors.
|
|
33
|
+
|
|
34
|
+
Do not edit any other files.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Maestro Frontier — Gemini CLI custom command
|
|
2
|
+
#
|
|
3
|
+
# Install path (pick one):
|
|
4
|
+
# Project-scoped : <project>/.gemini/commands/frontier.toml
|
|
5
|
+
# Global : ~/.gemini/commands/frontier.toml
|
|
6
|
+
#
|
|
7
|
+
# Once installed, invoke with `/frontier <args>` inside the Gemini CLI.
|
|
8
|
+
# This command arms or queries the Maestro Frontier engine with
|
|
9
|
+
# `--scope gemini`, keeping Gemini's state independent from Claude Code,
|
|
10
|
+
# Codex, and Cursor on the same machine.
|
|
11
|
+
#
|
|
12
|
+
# Requires `maestro` on PATH (installed during Maestro setup).
|
|
13
|
+
|
|
14
|
+
description = "Maestro Frontier local multi-CLI fusion engine — switch mode, or run a prompt through the panel"
|
|
15
|
+
|
|
16
|
+
prompt = """
|
|
17
|
+
Drive the **Maestro Frontier** engine — a zero-dependency local multi-CLI fusion
|
|
18
|
+
engine (a parallel panel of local CLIs → a judge model's analysis → a grounded
|
|
19
|
+
synthesis). It is the same engine the Claude Code plugin ships; here it runs
|
|
20
|
+
through the `maestro` CLI with `--scope gemini`.
|
|
21
|
+
|
|
22
|
+
**This is a typing shortcut, not the Claude Code plugin.** Gemini CLI has no
|
|
23
|
+
prompt hook, so arming a mode does **not** auto-run the engine on later prompts —
|
|
24
|
+
it only persists the mode. To actually fuse a prompt, invoke `run` explicitly
|
|
25
|
+
(step 3).
|
|
26
|
+
|
|
27
|
+
Requested action: {{args}}
|
|
28
|
+
|
|
29
|
+
Map it to one engine CLI call and execute it. Do not edit the engine's state
|
|
30
|
+
file by hand.
|
|
31
|
+
|
|
32
|
+
1. Switch mode (persists to `~/.config/maestro/frontier-state.gemini.json`; default `off`).
|
|
33
|
+
`--scope gemini` keeps Gemini's armed mode independent from Claude Code, Codex,
|
|
34
|
+
and Cursor on the same machine:
|
|
35
|
+
|
|
36
|
+
!{maestro frontier mode off --scope gemini}
|
|
37
|
+
!{maestro frontier mode single --model <model> --scope gemini}
|
|
38
|
+
!{maestro frontier mode fusion --preset <preset> --scope gemini}
|
|
39
|
+
!{maestro frontier mode fusion --preset custom --models <a,b,c> --scope gemini}
|
|
40
|
+
!{maestro frontier mode fusion --preset <preset> --judge <model> --synth <model> --scope gemini}
|
|
41
|
+
|
|
42
|
+
Models: `opus` (Claude Opus 4.8, needs `claude`), `gpt-5.5` (needs `codex`),
|
|
43
|
+
`gemini` (needs `gemini`). Presets: `opus-duo`, `opus-gpt`, `gpt-duo`,
|
|
44
|
+
`frontier-trio`, `custom`. Judge + synth default to Opus; `--judge`/`--synth`
|
|
45
|
+
override for any preset (e.g. `--judge opus --synth gpt-5.5`). `gpt-duo` runs
|
|
46
|
+
judge + synth on GPT-5.5 — a Codex-only fusion that needs no `claude`.
|
|
47
|
+
|
|
48
|
+
2. Show the current mode/preset:
|
|
49
|
+
|
|
50
|
+
!{maestro frontier status --scope gemini}
|
|
51
|
+
|
|
52
|
+
3. Run a prompt through the current mode — **this is the action that actually
|
|
53
|
+
fuses**, since nothing auto-runs here. Set a mode first (step 1), then:
|
|
54
|
+
|
|
55
|
+
!{maestro frontier run "{{args}}" --scope gemini}
|
|
56
|
+
|
|
57
|
+
- `off`: prints a notice, spawns nothing.
|
|
58
|
+
- `single`: dispatches the one selected CLI, prints its answer.
|
|
59
|
+
- `fusion`: runs the panel in parallel → judge → synthesizer; prints the final
|
|
60
|
+
answer (a one-line run meta goes to stderr). Report stdout verbatim.
|
|
61
|
+
|
|
62
|
+
On error the engine prints `ERROR [<reason>]: <detail>` to stderr and exits
|
|
63
|
+
non-zero — relay the reason.
|
|
64
|
+
|
|
65
|
+
Notes:
|
|
66
|
+
|
|
67
|
+
- Real `single`/`fusion` runs spawn local CLIs and cost tokens; use small prompts.
|
|
68
|
+
`off` is free.
|
|
69
|
+
- Each model's CLI must be on `PATH`, or point at a specific build with
|
|
70
|
+
`MAESTRO_CLAUDE_BIN` / `MAESTRO_CODEX_BIN` / `MAESTRO_GEMINI_BIN`.
|
|
71
|
+
- On Windows, `gemini` is a poor `--judge`/`--synth` choice: judge/synth prompts
|
|
72
|
+
contain newlines that the win32 arg-safety guard refuses. Use `opus` or `gpt-5.5`
|
|
73
|
+
for judge/synth on Windows.
|
|
74
|
+
- Requires `maestro` on `PATH` (installed during Maestro setup). If it is missing,
|
|
75
|
+
install Maestro first.
|
|
76
|
+
"""
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
Maestro Frontier — drive the local multi-CLI fusion engine (switch mode, or run a prompt through the panel).
|
|
2
|
+
|
|
3
|
+
Drive the **Maestro Frontier** engine — a zero-dependency local multi-CLI fusion
|
|
4
|
+
engine (a parallel panel of local CLIs → a judge model's analysis → a grounded
|
|
5
|
+
synthesis). It is the same engine the Claude Code plugin ships; here it runs
|
|
6
|
+
through the `maestro` CLI with `--scope windsurf`.
|
|
7
|
+
|
|
8
|
+
**Install path (pick one):**
|
|
9
|
+
|
|
10
|
+
- Project-scoped: `.windsurf/workflows/frontier.md`
|
|
11
|
+
- Global: `~/.codeium/windsurf/global_workflows/frontier.md`
|
|
12
|
+
|
|
13
|
+
Once installed, invoke with `/frontier <args>` inside Windsurf Cascade.
|
|
14
|
+
|
|
15
|
+
**This is a typing shortcut, not the Claude Code plugin.** Windsurf Cascade has
|
|
16
|
+
no prompt hook, so arming a mode does **not** auto-run the engine on later
|
|
17
|
+
prompts — it only persists the mode. To actually fuse a prompt, invoke `run`
|
|
18
|
+
explicitly (step 3).
|
|
19
|
+
|
|
20
|
+
When this workflow is invoked, map the requested action to one engine CLI call
|
|
21
|
+
and run it in the terminal. Cascade will request approval before executing. Do
|
|
22
|
+
not edit the engine's state file by hand.
|
|
23
|
+
|
|
24
|
+
1. Switch mode (persists to `~/.config/maestro/frontier-state.windsurf.json`; default `off`).
|
|
25
|
+
`--scope windsurf` keeps Windsurf's armed mode independent from Claude Code,
|
|
26
|
+
Codex, Cursor, Gemini, and Cline on the same machine:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
maestro frontier mode off --scope windsurf
|
|
30
|
+
maestro frontier mode single --model <model> --scope windsurf
|
|
31
|
+
maestro frontier mode fusion --preset <preset> --scope windsurf
|
|
32
|
+
maestro frontier mode fusion --preset custom --models <a,b,c> --scope windsurf
|
|
33
|
+
maestro frontier mode fusion --preset <preset> --judge <model> --synth <model> --scope windsurf
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Models: `opus` (Claude Opus 4.8, needs `claude`), `gpt-5.5` (needs `codex`),
|
|
37
|
+
`gemini` (needs `gemini`). Presets: `opus-duo`, `opus-gpt`, `gpt-duo`,
|
|
38
|
+
`frontier-trio`, `custom`. Judge + synth default to Opus; `--judge`/`--synth`
|
|
39
|
+
override for any preset (e.g. `--judge opus --synth gpt-5.5`). `gpt-duo` runs
|
|
40
|
+
judge + synth on GPT-5.5 — a Codex-only fusion that needs no `claude`.
|
|
41
|
+
|
|
42
|
+
2. Show the current mode/preset:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
maestro frontier status --scope windsurf
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
3. Run a prompt through the current mode — **this is the action that actually
|
|
49
|
+
fuses**, since nothing auto-runs here. Set a mode first (step 1), then:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
maestro frontier run "<prompt>" --scope windsurf
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
- `off`: prints a notice, spawns nothing.
|
|
56
|
+
- `single`: dispatches the one selected CLI, prints its answer.
|
|
57
|
+
- `fusion`: runs the panel in parallel → judge → synthesizer; prints the final
|
|
58
|
+
answer (a one-line run meta goes to stderr). Report stdout verbatim.
|
|
59
|
+
|
|
60
|
+
On error the engine prints `ERROR [<reason>]: <detail>` to stderr and exits
|
|
61
|
+
non-zero — relay the reason.
|
|
62
|
+
|
|
63
|
+
Notes:
|
|
64
|
+
|
|
65
|
+
- Real `single`/`fusion` runs spawn local CLIs and cost tokens; use small prompts.
|
|
66
|
+
`off` is free.
|
|
67
|
+
- Each model's CLI must be on `PATH`, or point at a specific build with
|
|
68
|
+
`MAESTRO_CLAUDE_BIN` / `MAESTRO_CODEX_BIN` / `MAESTRO_GEMINI_BIN`.
|
|
69
|
+
- Requires `maestro` on `PATH` (installed during Maestro setup). If it is missing,
|
|
70
|
+
install Maestro first.
|