pan-wizard 3.21.0 → 3.21.1

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.
@@ -80,6 +80,7 @@ Every cap the conductor enforces applies to the campaign, scaled up:
80
80
  | `--max-cycles` | 5 | Mission items landed before stopping. |
81
81
  | `--total-budget` | 300 | Cumulative point budget. **Advisory by default** — tracked/surfaced but not a hard stop unless `--enforce-budget` / config `budget.enforce: true`. |
82
82
  | `--enforce-budget` | off | Make the point budgets hard stops again (also settable via config `budget.enforce: true`). |
83
+ | `--verify-reserve` | 0.15 | Fraction of `--total-budget` (0–0.5) held back for the final Quality re-review so it can't be starved (config `budget.verify_reserve`). Advisory by default (surfaced as `into_verify_reserve`); under `--enforce-budget` it stops taking on new missions early (`budget_reserve_reached`) and the reserved points fund the closing `--clean-seal` re-verification before the last INTEGRATE. |
83
84
  | `--squads` | all | Restrict to a subset, e.g. `--squads architecture,build,quality`. |
84
85
  | `--no-build-worktrees` | off | Build in the main tree instead of branch-per-agent worktrees (small/serial projects). |
85
86
  | `--push` | off | Push approved merges to origin (still human-gated). |
@@ -143,13 +144,14 @@ PAN is not a daemon — it cannot wake itself while the session is closed. `--sc
143
144
  - **The trigger (you wire one):** a host scheduler (Claude Code routines / cron / scheduled-tasks) or a `/loop` runs `pan-tools campaign due` and, when it reports due, invokes `/pan:army --continue`. On next session open, a due campaign is surfaced as a nudge.
144
145
  - **Resume (`--continue`):** read the schedule + `.planning/orchestration/` + focus-auto state. If `campaign due` is true and the day's `--daily-budget` isn't spent, run the next mission(s), then `campaign record-run` (advances next-due, accrues the day's spend). If not due or budget-spent, report next-due and STOP.
145
146
  - **Bounded spend:** point budgets (`--total-budget`, `--daily-budget`) are **advisory indicators by default** — they're tracked and surfaced, not hard stops, unless `budget.enforce` / `--enforce-budget` is set. The real bounds are `--max-cycles`, the conductor caps, the abort file, and the human merge gate at every integrate. A scheduled campaign runs the backlog down to staged, reviewed, green PRs over days.
147
+ - **Verify reserve:** a fraction of `--total-budget` (`--verify-reserve`, default 0.15) is held back so the closing Quality re-review isn't starved. Surfaced always via `campaign status` / `focus auto --status` (`into_verify_reserve`, `new_work_budget_remaining`); under `--enforce-budget` the run stops taking on new missions early (`budget_reserve_reached`) and spends the reserve on the final `--clean-seal` verification before the last INTEGRATE.
146
148
 
147
149
  Manage it: `pan-tools campaign status` (active/paused, spent today, next-due), `campaign schedule --pause` / `--resume` / `--disable`.
148
150
 
149
151
  ---
150
152
 
151
153
  ## Completion contract
152
- The campaign is complete when ANY holds: `--max-cycles` reached · backlog empty · abort file present · context < 25% · a mission cannot pass Quality and can't be cleanly reverted (HARD STOP — preserve state, report). (Budget exhaustion is advisory by default — a stop condition only when `budget.enforce`/`--enforce-budget` is set.) Always run `--clean-seal` (unless omitted) after the last item.
154
+ The campaign is complete when ANY holds: `--max-cycles` reached · backlog empty · abort file present · context < 25% · a mission cannot pass Quality and can't be cleanly reverted (HARD STOP — preserve state, report). (Budget exhaustion is advisory by default — a stop condition only when `budget.enforce`/`--enforce-budget` is set; under enforcement, crossing into the verify reserve (`budget_reserve_reached`) stops new missions but the reserved points still fund the closing re-verification.) Always run `--clean-seal` (unless omitted) after the last item.
153
155
 
154
156
  ## NEVER DO
155
157
  - Let Mission Control write code, or let a squad agent spawn further agents (depth cap).
@@ -102,6 +102,7 @@ Wait for the user's reply before proceeding. Do not guess or pick a default cate
102
102
  | `--max-cycles` | 10 | Maximum iterations (1-50) |
103
103
  | `--total-budget` | 500 | Cumulative point budget (5-5000). Advisory by default (tracked/surfaced, not a stop). |
104
104
  | `--enforce-budget` | off | Make `--total-budget` a hard stop again (also settable via config `budget.enforce: true`). |
105
+ | `--verify-reserve` | 0.15 | Fraction of `--total-budget` (0–0.5) held back for the final re-verification pass so it can't be starved (config `budget.verify_reserve`). Advisory by default — surfaced as `into_verify_reserve`; under `--enforce-budget` it stops **new work** early (`budget_reserve_reached`) and Phase 3 spends the reserve on the clean re-verification. |
105
106
  | `--continue` | — | Resume stopped/interrupted run |
106
107
  | `--stop` | — | Gracefully stop active run |
107
108
  | `--status` | — | Show current campaign progress |
@@ -344,6 +345,7 @@ Run: `pan-tools focus auto --update --items-completed N --items-failed N --point
344
345
 
345
346
  Check the response for stop conditions:
346
347
  - `regression`: Tests decreased — STOP IMMEDIATELY
348
+ - `budget_reserve_reached`: New-work spend crossed into the reserved headroom (enforced runs) — stop taking on new items and go to Phase 3, which spends the reserve on the final re-verification pass
347
349
  - `budget_cap`: Cumulative budget exceeded — go to Phase 3
348
350
  - `max_cycles`: Maximum iterations reached — go to Phase 3
349
351
  - `zero_completed`: No items completed in this cycle — go to Phase 3
@@ -391,8 +393,9 @@ Then continue immediately to the next cycle (back to Step 2.1).
391
393
 
392
394
  ### Phase 3: Campaign End
393
395
 
394
- 1. Run `pan-tools focus auto --status` to get final state
395
- 2. Display campaign summary:
396
+ 1. **Final re-verification pass (spend the verify reserve).** Run `pan-tools focus auto --status` and read `stop_reason` / `into_verify_reserve` / `verify_reserve`. Run one clean build + full verification directly (commands from `config.json → build`/`verification`) — the same pass `--clean-seal` performs — when ANY holds: the stop reason is `budget_reserve_reached`, `--clean-seal` is set, or `into_verify_reserve` is true. This is what the reserved budget is FOR: the run stopped taking on **new** work early (at `budget_reserve_reached`) precisely so this closing verification has headroom and isn't starved. Run the verification commands directly — do NOT `focus auto --update` here (the run is already `completed`; its status update is refused, and the verification agents' spend is captured by the cost hooks automatically). If verification fails, treat it as a HARD STOP (preserve state, report) rather than sealing green. Skip this step only when none of the three conditions hold (advisory run that never entered the reserve and no `--clean-seal`).
397
+ 2. Run `pan-tools focus auto --status` to get final state
398
+ 3. Display campaign summary:
396
399
 
397
400
  ```
398
401
  ## Campaign Complete
@@ -408,7 +411,7 @@ Then continue immediately to the next cycle (back to Step 2.1).
408
411
  | Stop reason | <reason> |
409
412
  ```
410
413
 
411
- 3. Remove safety tag: `git tag -d focus-auto-baseline 2>/dev/null`
414
+ 4. Remove safety tag: `git tag -d focus-auto-baseline 2>/dev/null`
412
415
 
413
416
  ## 6-Layer Safety Harness
414
417
 
@@ -416,6 +419,7 @@ Then continue immediately to the next cycle (back to Step 2.1).
416
419
  |-------|-----------|--------|
417
420
  | Per-cycle budget | `--budget N` per cycle | Limits single-cycle damage |
418
421
  | Cumulative budget | `--total-budget N` | Prevents runaway spending |
422
+ | Verify reserve | `--verify-reserve F` | Holds back a budget fraction so the final re-verification isn't starved — stops new work early under enforcement (`budget_reserve_reached`) and spends the reserve on the clean re-verify in Phase 3 |
419
423
  | Iteration limit | `--max-cycles N` | Hard stop on loop count |
420
424
  | Regression circuit breaker | tests_after < tests_before | Immediate stop, status=stopped |
421
425
  | Zero-completed guard | 0 items done in a cycle | Stop — further cycles won't help |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pan-wizard",
3
- "version": "3.21.0",
3
+ "version": "3.21.1",
4
4
  "description": "Command a bot army for your codebase: an Opus Mission Control delegates whole-project goals to specialist squads and ships behind a human merge gate. Five AI CLIs, zero context rot.",
5
5
  "bin": {
6
6
  "pan-wizard": "bin/install.js"