chore(ultraplan-local): bump v3.4.0 + autonomy chain + parallel hardenings + schema-drift seal

Ships the speedup work documented in plan-v2 of project
2026-05-03-ultra-pipeline-speedup.

Adds:
- --gates {open|closed|adaptive} flag on all four pipeline commands
- lib/util/autonomy-gate.mjs state machine (idle → main-merged)
- lib/review/plan-review-dedup.mjs (Phase 9 inline dedup)
- lib/stats/event-emit.mjs (autonomy-gate transitions, main-merge gate)
- hooks/scripts/post-compact-flush.mjs PostCompact hook (rehydrate)
- Phase 8 schema-drift seal in commands/ultraplan-local.md
- Phase 2.6 wave-executor 11 hardenings
- Synthetic SC7 determinism floor (Jaccard >= 0.833) for plan + review
- Hook baseline regression pins (path-guard + bash-guard)
- examples/01-add-verbose-flag/perf-measure harness (gitignored)

Architecture decision: Path B (sequential --no-ff parallel waves with
manifest-driven failure recovery) ships in v3.4.0. Path C (cache-first
hybrid) deferred to v3.5.0 contingent on Step 6 cache-telemetry harvest.

Memory updates (Step 14, outside-repo files):
- project_ultraplan_opus47_gap.md rewritten per Path B (mitigated v1.8.0
  + plan-step-7 defense-in-depth; residual risk for plugins NOT using
  ultraplan-local prompt arch)
- MEMORY.md one-liner updated to flag mitigation status
This commit is contained in:
Kjell Tore Guttormsen 2026-05-04 08:52:55 +02:00
commit 6f3519c551
5 changed files with 123 additions and 9 deletions

View file

@ -4,6 +4,78 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
## [3.4.0] - 2026-05-04 — Ultra-pipeline speedup
Hardenings + scaffolding to support an autonomy chain from brief approval
through main-merge with parallel-wave execution. Non-breaking: all existing
flags continue to work; `--gates` is opt-in autonomy control. Plan-step
delivery covered by 18 plan-v2 steps split across three Waves.
### Added — autonomy + parallelism
- `lib/util/autonomy-gate.mjs` — autonomy-gate state machine (idle → approved → executing → merge-pending → main-merged) for the brief-to-merge chain (Step 4)
- `lib/review/plan-review-dedup.mjs` — deterministic plan-review dedup helpers reused by Phase 9 inline dedup (Step 5)
- `lib/stats/event-emit.mjs` — single-source stats event emitter for autonomy-gate transitions and main-merge-gate (Step 6 + 12)
- `--gates {open|closed|adaptive}` flag on all four pipeline commands (Step 11). Controls how many autonomy checkpoints surface to the operator. Default `adaptive`.
- `hooks/scripts/post-compact-flush.mjs` — PostCompact hook re-injects session-state after context compaction so multi-session work survives a compaction boundary (Step 13)
### Added — hardenings + defense-in-depth
- `commands/ultraplan-local.md` Phase 8 schema-drift defense — post-generation `plan-validator --strict` run blocks plans containing narrative `Fase`/`Phase` headers or missing Manifest YAML; addresses the documented Opus-4.7 plan/list-emission drift (Step 7, builds on v1.8.0 fix in commit `9ecd669`)
- `commands/ultraplan-local.md` Phase 9 parallelization with inline dedup — single-message multi-Agent dispatch + plan-review-dedup helper (Step 8)
- `commands/ultraexecute-local.md` Phase 2.6 wave-executor — 11 sub-hardenings for plugin-in-monorepo + gitignored-state topology: GIT_OPTIONAL_LOCKS, --max-turns, --max-budget-usd, scoped --allowedTools, --append-system-prompt-file, SHARED_CONTEXT_FILE, SAFETY_PREAMBLE, deferred git push origin, push-before-cleanup ordering, GH #36071 awareness (Step 9)
- `templates/headless-launch-template.md` — mirrors Phase 2.6 hardenings so the headless launcher is consistent with Phase 2.6 prose (Step 10)
- `commands/ultraplan-local.md` + `agents/planning-orchestrator.md` Phase 8 main-merge gate — emit stats event for main-merge gate decisions (Step 12)
### Added — quality infrastructure
- `tests/lib/agent-frontmatter.test.mjs` — pins agent frontmatter invariants (Step 1-test)
- `tests/synthetic/plan-run-A.md` + `plan-run-B.md` + `plan-determinism.test.mjs` — SC7 plan-determinism floor (Jaccard ≥ 0.833) (Step 15)
- `tests/synthetic/review-run-A.md` + `review-run-B.md` + `review-determinism.test.mjs` — SC7 review-determinism floor (Jaccard ≥ 0.833) (Step 15)
- `tests/hooks/path-guard.test.mjs` — pins pre-write-executor BLOCK rules; regression detection if BLOCK_RULES are silently weakened (Step 18)
- `tests/hooks/bash-guard.test.mjs` — pins pre-bash-executor BLOCK rules (Step 18)
- `examples/01-add-verbose-flag/perf-measure.local.sh` (gitignored) — operator-driven SC1 wall-time measurement harness (Step 16)
- `examples/01-add-verbose-flag/perf-baseline.local.md` (gitignored) — SC1 gate template + measurement protocol (Step 16)
### Changed
- `lib/parsers/manifest-yaml.mjs` — schema extended additively to recognize `skip_commit_check` and `memory_write` flags (forward-compat: unknown keys ignored). Used by Step 14 and other steps that legitimately don't produce a git commit (Step 4)
- `.gitignore` — generalized `*.local.md` + `*.local.json` rules into a single `*.local.*` glob, covering `.local.sh` and any future `.local.<ext>` (Step 16)
- `package.json``version` 3.3.0 → 3.4.0
- `.claude-plugin/plugin.json``version` 3.3.0 → 3.4.0
- `README.md` + `CLAUDE.md` — version refs + `--gates` flag docs + Wave 1+2+3 architecture notes
- Marketplace root `README.md` — ultraplan-local version line bumped 3.3.0 → 3.4.0
### Memory updates (Step 14)
- `~/.claude/projects/-Users-ktg--claude-plugins-marketplaces-ktg-plugin-marketplace/memory/project_ultraplan_opus47_gap.md` — rewritten per Path B (memory truth gate). New body:
(a) historical context referencing commit `9ecd669` (v1.8.0 fix, 2026-04-17),
(b) empirical evidence (5 organic plans 2026-04-18 → 2026-05-01 all clean per research/04 D1),
(c) defense-in-depth added in Step 7 (`commands/ultraplan-local.md` Phase 8),
(d) residual risk surface for plugins NOT using ultraplan-local prompt arch.
- `~/.claude/projects/.../memory/MEMORY.md` — one-liner updated to flag mitigation status. The drift mechanism stays a known model-level risk; the plugin-level mitigation is documented.
These memory edits are recorded here because the files live outside the
repo and have no git checkpoint of their own.
### Architecture decision (Path B not Path C)
Brief offered three architectural options for the speedup work:
- Path A — cache-first (drop --allowedTools per child) — REJECTED. Inverts security model; plugin hooks don't fire reliably in `claude -p` (research/06 GH #36071).
- Path B — sequential `--no-ff` parallel waves with manifest-driven failure recovery — CHOSEN. v3.4.0 ships this.
- Path C — hybrid (cache-warm sentinel + identical-tool parallel) — DEFERRED to v3.5.0 contingent on cache-telemetry data harvested by Step 6's stats events. Requires unverified Q3 (CLAUDE_CODE_FORK_SUBAGENT cache-prefix preservation at 150-250K context).
### Tests
- 265 baseline (post-Wave-2) → ~290+ green after Wave 3 (Steps 15 + 18 add ~25 tests; doc-consistency may add a couple more pin tests)
### Open Questions for v1.1
- Real-LLM determinism measurement — synthetic floor (0.833) is anchored; the foreign-repo run against `examples/01-add-verbose-flag/` for SC1+SC4+SC5 measurement is a separate post-ship session.
- Cache-telemetry harvest — Step 6 stats events emit shapes useful for Path C decision; harvesting + analysis is v1.1 work.
- Marketplace-level autonomy-gate — currently per-plugin scope. Marketplace-wide policy + dashboards are out of scope for this solo project.
## [3.3.0] - 2026-05-01
Adds `/ultracontinue-local` — a zero-friction multi-session resumption command —