@maestrofrontier/frontier 1.4.5 → 1.5.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.
Files changed (50) hide show
  1. package/.agents/plugins/marketplace.json +21 -21
  2. package/.codex-plugin/plugin.json +29 -29
  3. package/.cursorrules +197 -194
  4. package/AGENTS.md +3 -3
  5. package/README.md +368 -368
  6. package/bin/maestro.cjs +75 -75
  7. package/commands/compress.md +36 -36
  8. package/commands/frontier.md +124 -124
  9. package/commands/terse.md +23 -23
  10. package/docs/codex.md +167 -167
  11. package/docs/orchestration.md +168 -168
  12. package/frontier/cli.cjs +279 -252
  13. package/frontier/config.cjs +468 -468
  14. package/frontier/dispatch.cjs +267 -255
  15. package/frontier/judge.cjs +92 -92
  16. package/frontier/run.cjs +201 -180
  17. package/frontier/schema.cjs +112 -112
  18. package/frontier/semaphore.cjs +49 -49
  19. package/frontier/synthesize.cjs +79 -79
  20. package/hooks/frontier-autorun.cjs +127 -120
  21. package/hooks/hooks.json +103 -103
  22. package/hooks/maestro-doctrine-guard.cjs +81 -81
  23. package/hooks/maestro-gate-reminder.cjs +22 -7
  24. package/hooks/maestro-gate-telemetry.cjs +79 -77
  25. package/hooks/maestro-phase-scope.cjs +118 -118
  26. package/hooks/maestro-statusline-sync.cjs +152 -152
  27. package/hooks/maestro-subagent-guard.cjs +148 -148
  28. package/hooks/maestro-terse-mode.cjs +189 -189
  29. package/hooks/maestro-toolbudget-advisory.cjs +127 -127
  30. package/integrations/README.md +111 -111
  31. package/integrations/cline/skills/frontier/SKILL.md +75 -75
  32. package/integrations/codex/prompts/frontier.md +70 -70
  33. package/integrations/codex/prompts/update.md +39 -39
  34. package/integrations/codex/skills/maestro-frontier/SKILL.md +122 -122
  35. package/integrations/codex/skills/maestro-settings/SKILL.md +55 -55
  36. package/integrations/codex/skills/maestro-terse/SKILL.md +58 -58
  37. package/integrations/codex/skills/maestro-update/SKILL.md +31 -31
  38. package/integrations/cursor/commands/frontier.md +63 -63
  39. package/integrations/cursor/commands/update.md +34 -34
  40. package/integrations/gemini/commands/frontier.toml +76 -76
  41. package/integrations/windsurf/workflows/frontier.md +70 -70
  42. package/package.json +58 -58
  43. package/scripts/install.cjs +1014 -1014
  44. package/settings/cli.cjs +140 -140
  45. package/settings/config.cjs +309 -309
  46. package/skills/maestro-frontier/SKILL.md +122 -122
  47. package/skills/maestro-settings/SKILL.md +55 -55
  48. package/skills/maestro-terse/SKILL.md +58 -58
  49. package/skills/maestro-update/SKILL.md +31 -31
  50. package/skills/terse/SKILL.md +74 -74
package/bin/maestro.cjs CHANGED
@@ -1,75 +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
- }
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
+ }
@@ -1,36 +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.
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.
@@ -1,124 +1,124 @@
1
- ---
2
- description: Maestro Frontier local multi-CLI engine: arm a mode (off/single/fusion) so it auto-runs every prompt, pick a model/preset, or run a one-off prompt
3
- argument-hint: "<off | single <model> | fusion <preset> | status | run <prompt> | adopt>"
4
- allowed-tools: Bash, Read
5
- ---
6
-
7
- Drive the Maestro Frontier engine: a zero-dependency local multi-CLI
8
- fusion engine (parallel panel of local CLIs -> a judge model's
9
- analysis -> grounded synthesis). Default mode is `off`: the engine is opt-in and
10
- never runs until you switch it on. Arming it (`single` or `fusion`)
11
- makes it **auto-run on every prompt** — a `UserPromptSubmit` hook
12
- (`hooks/frontier-autorun.cjs`) routes each prompt through the engine and
13
- the live session relays the synthesized answer. `off` disables auto-run.
14
- Autorun blocks the turn until the engine returns; the hook carries a
15
- 300s timeout (`hooks/hooks.json`), and a run that exceeds it is skipped
16
- so the turn proceeds normally. Any engine error degrades the same way.
17
-
18
- Requested action: `$ARGUMENTS`
19
-
20
- Map the argument to one engine CLI call and run it. The engine is
21
- self-contained; do not edit its state file yourself.
22
-
23
- 1. Mode switch (persists across sessions; default `off`):
24
-
25
- ```bash
26
- node "${CLAUDE_PLUGIN_ROOT}/bin/maestro.cjs" frontier mode off
27
- node "${CLAUDE_PLUGIN_ROOT}/bin/maestro.cjs" frontier mode single --model <model>
28
- node "${CLAUDE_PLUGIN_ROOT}/bin/maestro.cjs" frontier mode fusion --preset <preset>
29
- node "${CLAUDE_PLUGIN_ROOT}/bin/maestro.cjs" frontier mode fusion --preset custom --models <a,b,c>
30
- node "${CLAUDE_PLUGIN_ROOT}/bin/maestro.cjs" frontier mode fusion --preset <preset> --judge <model> --synth <model>
31
- ```
32
-
33
- Models: `opus` (Claude Opus 4.8), `gpt-5.5` (Codex), `gemini`
34
- (Gemini 3.1 Pro). Presets: `opus-duo`, `opus-gpt`, `gpt-duo`,
35
- `frontier-trio`, `custom`. The judge + synthesizer default to Opus,
36
- but `gpt-duo` runs them on GPT-5.5 (a Codex-only fusion that needs no
37
- `claude`), and `--judge`/`--synth` override the model for any preset,
38
- so you can mix freely (e.g. `--judge opus --synth gpt-5.5`).
39
-
40
- 2. Show current mode/preset:
41
-
42
- ```bash
43
- node "${CLAUDE_PLUGIN_ROOT}/bin/maestro.cjs" frontier status
44
- ```
45
-
46
- 3. Run a prompt through the current mode (prompt as the argument, or
47
- piped on stdin). This is a manual one-off; when the engine is armed
48
- (`single`/`fusion`) the autorun hook already runs every prompt for
49
- you, so `run` is mainly for scripting or an explicit re-run:
50
-
51
- ```bash
52
- node "${CLAUDE_PLUGIN_ROOT}/bin/maestro.cjs" frontier run "<prompt>"
53
- ```
54
-
55
- - `off`: prints a notice and exits without spawning anything;
56
- normal Maestro behavior is unchanged.
57
- - `single`: dispatches the one selected CLI and prints its answer.
58
- - `fusion`: runs the panel in parallel, then the judge and
59
- synthesizer models; prints the final answer (a one-line run meta of
60
- preset, models, analysis present, and failed models goes to stderr).
61
-
62
- 4. Adopt a previously-armed **global** mode into this workspace
63
- (per-workspace isolation means a workspace never inherits the old
64
- global state automatically — this copies it in once, on demand):
65
-
66
- ```bash
67
- node "${CLAUDE_PLUGIN_ROOT}/bin/maestro.cjs" frontier adopt
68
- node "${CLAUDE_PLUGIN_ROOT}/bin/maestro.cjs" frontier adopt --force
69
- ```
70
-
71
- Reads the legacy global `frontier-state.json` read-only and writes it
72
- into this workspace's `frontier-state.cc-<hash>.json`. It refuses to
73
- overwrite an existing workspace state unless `--force`, never touches
74
- the legacy file, and only targets a Claude Code `cc-*` scope. If
75
- there is no legacy state (`missing-legacy`) it does nothing — arm the
76
- workspace with `mode` instead.
77
-
78
- 5. Report the result, matched to the action:
79
- - `run`: report the engine's stdout verbatim.
80
- - `adopt`: confirm the adopted mode/preset, or relay the
81
- `ERROR [<reason>]` (e.g. `exists` — suggest `--force`; `missing-legacy`
82
- — nothing to adopt). Arming now auto-runs on every prompt.
83
- - arming a mode (`single`/`fusion`): confirm the mode, then tell the
84
- user plainly that the engine now **auto-runs on every prompt** —
85
- they just chat normally and the synthesized answer is relayed.
86
- Do NOT tell the user to call `run` manually; arming already routes
87
- every prompt through the engine (`run` is only a scripted one-off).
88
- - `off`: confirm auto-run is disabled and normal Maestro resumes.
89
- - `status`: report the current mode/preset.
90
-
91
- On an error the engine prints `ERROR [<failure_reason>]: <detail>`
92
- to stderr and exits non-zero; relay the failure_reason.
93
-
94
- Notes:
95
-
96
- - **Arming in Claude Code is per-workspace.** State is stored in a
97
- workspace-scoped file (`frontier-state.cc-<hash>.json`, keyed to the
98
- git project root). Arming in one workspace does not affect any other.
99
- After upgrading Maestro, each Claude Code workspace starts `off` and
100
- must be re-armed — no automatic migration into workspace scopes.
101
- `adopt` (step 4) is the explicit opt-in to copy a prior global mode in.
102
- - Real `single`/`fusion` runs spawn local CLIs and cost tokens; each
103
- cold `claude -p` panel/judge/synth call is non-trivial. Use small
104
- prompts. `off` is free.
105
- - Headless web access varies per CLI (Codex confirmed; Claude and
106
- Gemini gated off in this build). The engine sets a per-adapter
107
- `webTools` flag accordingly; see the risk burndown.
108
- - `gemini` works well as a panel member, but on Windows it is a poor
109
- `--judge`/`--synth` choice: it takes its prompt as an argument and the
110
- judge/synth prompts contain newlines, which the win32 arg-safety guard
111
- refuses, so the stage then degrades (judge omitted, synth falls back).
112
- Use `opus` or `gpt-5.5` for judge/synth on Windows. (No such limit on
113
- macOS/Linux, where args are passed directly.)
114
-
115
- ## Binary overrides
116
-
117
- The engine is zero-dependency CommonJS under `frontier/`. Each CLI is
118
- resolved from your `PATH`: `claude` (Opus 4.8), `codex` (GPT-5.5), and
119
- `gemini` (Gemini 3.1 Pro). When a binary is not on `PATH`, or you want a
120
- specific build, point at it with an environment variable:
121
-
122
- - `MAESTRO_CLAUDE_BIN` sets the `claude` binary path.
123
- - `MAESTRO_CODEX_BIN` sets the `codex` binary path.
124
- - `MAESTRO_GEMINI_BIN` sets the `gemini` binary path.
1
+ ---
2
+ description: Maestro Frontier local multi-CLI engine: arm a mode (off/single/fusion) so it auto-runs every prompt, pick a model/preset, or run a one-off prompt
3
+ argument-hint: "<off | single <model> | fusion <preset> | status | run <prompt> | adopt>"
4
+ allowed-tools: Bash, Read
5
+ ---
6
+
7
+ Drive the Maestro Frontier engine: a zero-dependency local multi-CLI
8
+ fusion engine (parallel panel of local CLIs -> a judge model's
9
+ analysis -> grounded synthesis). Default mode is `off`: the engine is opt-in and
10
+ never runs until you switch it on. Arming it (`single` or `fusion`)
11
+ makes it **auto-run on every prompt** — a `UserPromptSubmit` hook
12
+ (`hooks/frontier-autorun.cjs`) routes each prompt through the engine and
13
+ the live session relays the synthesized answer. `off` disables auto-run.
14
+ Autorun blocks the turn until the engine returns; the hook carries a
15
+ 300s timeout (`hooks/hooks.json`), and a run that exceeds it is skipped
16
+ so the turn proceeds normally. Any engine error degrades the same way.
17
+
18
+ Requested action: `$ARGUMENTS`
19
+
20
+ Map the argument to one engine CLI call and run it. The engine is
21
+ self-contained; do not edit its state file yourself.
22
+
23
+ 1. Mode switch (persists across sessions; default `off`):
24
+
25
+ ```bash
26
+ node "${CLAUDE_PLUGIN_ROOT}/bin/maestro.cjs" frontier mode off
27
+ node "${CLAUDE_PLUGIN_ROOT}/bin/maestro.cjs" frontier mode single --model <model>
28
+ node "${CLAUDE_PLUGIN_ROOT}/bin/maestro.cjs" frontier mode fusion --preset <preset>
29
+ node "${CLAUDE_PLUGIN_ROOT}/bin/maestro.cjs" frontier mode fusion --preset custom --models <a,b,c>
30
+ node "${CLAUDE_PLUGIN_ROOT}/bin/maestro.cjs" frontier mode fusion --preset <preset> --judge <model> --synth <model>
31
+ ```
32
+
33
+ Models: `opus` (Claude Opus 4.8), `gpt-5.5` (Codex), `gemini`
34
+ (Gemini 3.1 Pro). Presets: `opus-duo`, `opus-gpt`, `gpt-duo`,
35
+ `frontier-trio`, `custom`. The judge + synthesizer default to Opus,
36
+ but `gpt-duo` runs them on GPT-5.5 (a Codex-only fusion that needs no
37
+ `claude`), and `--judge`/`--synth` override the model for any preset,
38
+ so you can mix freely (e.g. `--judge opus --synth gpt-5.5`).
39
+
40
+ 2. Show current mode/preset:
41
+
42
+ ```bash
43
+ node "${CLAUDE_PLUGIN_ROOT}/bin/maestro.cjs" frontier status
44
+ ```
45
+
46
+ 3. Run a prompt through the current mode (prompt as the argument, or
47
+ piped on stdin). This is a manual one-off; when the engine is armed
48
+ (`single`/`fusion`) the autorun hook already runs every prompt for
49
+ you, so `run` is mainly for scripting or an explicit re-run:
50
+
51
+ ```bash
52
+ node "${CLAUDE_PLUGIN_ROOT}/bin/maestro.cjs" frontier run "<prompt>"
53
+ ```
54
+
55
+ - `off`: prints a notice and exits without spawning anything;
56
+ normal Maestro behavior is unchanged.
57
+ - `single`: dispatches the one selected CLI and prints its answer.
58
+ - `fusion`: runs the panel in parallel, then the judge and
59
+ synthesizer models; prints the final answer (a one-line run meta of
60
+ preset, models, analysis present, and failed models goes to stderr).
61
+
62
+ 4. Adopt a previously-armed **global** mode into this workspace
63
+ (per-workspace isolation means a workspace never inherits the old
64
+ global state automatically — this copies it in once, on demand):
65
+
66
+ ```bash
67
+ node "${CLAUDE_PLUGIN_ROOT}/bin/maestro.cjs" frontier adopt
68
+ node "${CLAUDE_PLUGIN_ROOT}/bin/maestro.cjs" frontier adopt --force
69
+ ```
70
+
71
+ Reads the legacy global `frontier-state.json` read-only and writes it
72
+ into this workspace's `frontier-state.cc-<hash>.json`. It refuses to
73
+ overwrite an existing workspace state unless `--force`, never touches
74
+ the legacy file, and only targets a Claude Code `cc-*` scope. If
75
+ there is no legacy state (`missing-legacy`) it does nothing — arm the
76
+ workspace with `mode` instead.
77
+
78
+ 5. Report the result, matched to the action:
79
+ - `run`: report the engine's stdout verbatim.
80
+ - `adopt`: confirm the adopted mode/preset, or relay the
81
+ `ERROR [<reason>]` (e.g. `exists` — suggest `--force`; `missing-legacy`
82
+ — nothing to adopt). Arming now auto-runs on every prompt.
83
+ - arming a mode (`single`/`fusion`): confirm the mode, then tell the
84
+ user plainly that the engine now **auto-runs on every prompt** —
85
+ they just chat normally and the synthesized answer is relayed.
86
+ Do NOT tell the user to call `run` manually; arming already routes
87
+ every prompt through the engine (`run` is only a scripted one-off).
88
+ - `off`: confirm auto-run is disabled and normal Maestro resumes.
89
+ - `status`: report the current mode/preset.
90
+
91
+ On an error the engine prints `ERROR [<failure_reason>]: <detail>`
92
+ to stderr and exits non-zero; relay the failure_reason.
93
+
94
+ Notes:
95
+
96
+ - **Arming in Claude Code is per-workspace.** State is stored in a
97
+ workspace-scoped file (`frontier-state.cc-<hash>.json`, keyed to the
98
+ git project root). Arming in one workspace does not affect any other.
99
+ After upgrading Maestro, each Claude Code workspace starts `off` and
100
+ must be re-armed — no automatic migration into workspace scopes.
101
+ `adopt` (step 4) is the explicit opt-in to copy a prior global mode in.
102
+ - Real `single`/`fusion` runs spawn local CLIs and cost tokens; each
103
+ cold `claude -p` panel/judge/synth call is non-trivial. Use small
104
+ prompts. `off` is free.
105
+ - Headless web access varies per CLI (Codex confirmed; Claude and
106
+ Gemini gated off in this build). The engine sets a per-adapter
107
+ `webTools` flag accordingly; see the risk burndown.
108
+ - `gemini` works well as a panel member, but on Windows it is a poor
109
+ `--judge`/`--synth` choice: it takes its prompt as an argument and the
110
+ judge/synth prompts contain newlines, which the win32 arg-safety guard
111
+ refuses, so the stage then degrades (judge omitted, synth falls back).
112
+ Use `opus` or `gpt-5.5` for judge/synth on Windows. (No such limit on
113
+ macOS/Linux, where args are passed directly.)
114
+
115
+ ## Binary overrides
116
+
117
+ The engine is zero-dependency CommonJS under `frontier/`. Each CLI is
118
+ resolved from your `PATH`: `claude` (Opus 4.8), `codex` (GPT-5.5), and
119
+ `gemini` (Gemini 3.1 Pro). When a binary is not on `PATH`, or you want a
120
+ specific build, point at it with an environment variable:
121
+
122
+ - `MAESTRO_CLAUDE_BIN` sets the `claude` binary path.
123
+ - `MAESTRO_CODEX_BIN` sets the `codex` binary path.
124
+ - `MAESTRO_GEMINI_BIN` sets the `gemini` binary path.
package/commands/terse.md CHANGED
@@ -1,23 +1,23 @@
1
- ---
2
- description: Switch Maestro terse output mode (lite|full|ultra|off)
3
- argument-hint: "[lite|full|ultra|off]"
4
- ---
5
-
6
- Switch the Maestro terse output level. Requested level: `$ARGUMENTS`
7
-
8
- The maestro-terse-mode hook already updated the flag file when this
9
- command was submitted (bare invocation activates the configured
10
- default, or `full`). Do not edit the flag yourself.
11
-
12
- Steps:
13
-
14
- 1. Read `${CLAUDE_PLUGIN_ROOT}/skills/terse/SKILL.md` and apply the
15
- ruleset for the requested level from this response onward
16
- (`off`: drop terse style entirely).
17
- 2. Confirm in one line: new level, how to switch off
18
- (`/maestro:terse off`, "stop terse", "normal mode"), and that the
19
- statusline badge shows `[TERSE:<LEVEL>]` next session refresh.
20
-
21
- Boundaries (always): code/commits/PRs written normal; Auto-Clarity
22
- escape for security warnings, irreversible-action confirmations, and
23
- multi-step sequences.
1
+ ---
2
+ description: Switch Maestro terse output mode (lite|full|ultra|off)
3
+ argument-hint: "[lite|full|ultra|off]"
4
+ ---
5
+
6
+ Switch the Maestro terse output level. Requested level: `$ARGUMENTS`
7
+
8
+ The maestro-terse-mode hook already updated the flag file when this
9
+ command was submitted (bare invocation activates the configured
10
+ default, or `full`). Do not edit the flag yourself.
11
+
12
+ Steps:
13
+
14
+ 1. Read `${CLAUDE_PLUGIN_ROOT}/skills/terse/SKILL.md` and apply the
15
+ ruleset for the requested level from this response onward
16
+ (`off`: drop terse style entirely).
17
+ 2. Confirm in one line: new level, how to switch off
18
+ (`/maestro:terse off`, "stop terse", "normal mode"), and that the
19
+ statusline badge shows `[TERSE:<LEVEL>]` next session refresh.
20
+
21
+ Boundaries (always): code/commits/PRs written normal; Auto-Clarity
22
+ escape for security warnings, irreversible-action confirmations, and
23
+ multi-step sequences.