feat(ultraplan-local): add --gates autonomy-control flag to all four pipeline commands
Single autonomy-control surface (--gates) added to ultrabrief, ultraresearch,
ultraplan, and ultraexecute. When present, sets gates_mode = true and
re-enables approval pauses at every phase boundary + every wave for
high-stakes runs. When absent (default in auto), the chain runs continuously
to the main-merge gate (which always pauses regardless of --gates — that
boundary is the one always-on safety stop).
ultrabrief: pause after auto-mode confirmation; emit brief-approved event
ultraresearch: pause after each topic completes
ultraplan: pause after Phases 5, 7, 9
ultraexecute: pause after each wave's worktrees finish, before merge-back,
AND before the main-merge gate (MAIN_MERGE_GATE)
All four commands invoke the autonomy-gate state machine via the CLI shim
node lib/util/autonomy-gate.mjs (built in S8). Test pin in
tests/lib/gates-flag-coverage.test.mjs locks the contract.
Also wires the brief-approved stats emission into ultrabrief Phase 5 auto
path (was the SC4 wiring requirement from plan-v2 Step 11).
This commit is contained in:
parent
fc48d01f1e
commit
34f62043f9
5 changed files with 100 additions and 2 deletions
|
|
@ -40,7 +40,15 @@ Parse `$ARGUMENTS` for mode flags:
|
|||
Set **mode = step**, **target-step = N**.
|
||||
7. If arguments contain `--session N` (N is a positive integer): extract N and the file path.
|
||||
Set **mode = session**, **target-session = N**.
|
||||
8. Otherwise: the entire argument string is the file path. Set **mode = execute**.
|
||||
8. If arguments contain `--gates`: set `gates_mode = true`. Pause for
|
||||
operator confirmation after each wave's worktrees finish but before
|
||||
merge-back, AND before the main-merge gate. (The MAIN_MERGE_GATE in
|
||||
Phase 8 ALWAYS pauses regardless of `gates_mode` — `--gates` re-enables
|
||||
the per-wave pauses that auto mode otherwise skips.) Default
|
||||
`gates_mode = false`. The flag is consumed by the autonomy-gate state
|
||||
machine via the CLI shim:
|
||||
`node ${CLAUDE_PLUGIN_ROOT}/lib/util/autonomy-gate.mjs --state X --event Y --gates {true|false}`.
|
||||
9. Otherwise: the entire argument string is the file path. Set **mode = execute**.
|
||||
|
||||
If no path is provided (and `--project` was not used to derive one), output
|
||||
usage and stop:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue