Skip to content

v0.24.2 — Step 7 / Step 9 enforcement (Phase B)

Choose a tag to compare

@overdrive-dev overdrive-dev released this 03 May 06:06
· 308 commits to main since this release

v0.24.2 — Step 7 / Step 9 enforcement (Phase B)

Patch on top of v0.24.1. Closes the enforcement gap left by Phase A: shipping the prose contract without the structural backstop is itself the antipattern the post-mortem warns against (model-driven SKILL steps without enforcement). This release adds the hook-level + reviewer-level enforcement that makes Phase A's mandate actually catch drift.

What changed

  • pkg/.aihaus/hooks/autonomy-guard.sh — inline-edit drift advisory (R3). Non-blocking soft warning that fires when the Stop event runs with MANIFEST_PATH set, the manifest's Progress Log shows >5 entries (i.e., substantive run), and Story Records contains zero implementer / frontend-dev / code-fixer agent rows. Emits to stderr + audit log (hook=autonomy-guard advisory=step7-inline-drift). Opt-out: AIHAUS_STEP7_ADVISORY=0. ~37 LOC added near the haiku-backstop section.
  • pkg/.aihaus/agents/code-reviewer.md — Step 7 / Step 9 compliance bullet under ## What to Detect. CRITICAL when diff shows >20 LOC across multiple files OR new files with 0 agent rows and no deviation: flag. Silent-accept under inline budget (≤3 edits, ≤5 lines, ≤1 file). MED when deviation: inline-only-because: flag is present (gives downstream visibility into deviation pattern frequency without flagging every legitimate small edit). 14 LOC added.

Why ship now (revising the v0.24.1 deferral)

The v0.24.1 release notes proposed a 2-week telemetry window before Phase B. That deferral was wrong:

  • R3 is non-blocking by construction — soft stderr advisory + audit-log entry only. It cannot break a build or fail smoke tests.
  • R4 is a single bullet in the reviewer's prompt. It cannot break anything.
  • The "telemetry" justification was hand-waved — the post-mortem already documented the failure case, that's the data.
  • Shipping prose without enforcement IS the exact antipattern the post-mortem indicts. Phase A alone reproduces the M020 Step 13/16 problem at a different step.

User pushback caught this and was correct.

Self-applying

Phase B was implemented via the implementer agent path Phase A introduced (id a0dd820988b3f3f9c). Audit trail at .aihaus/features/260503-step7-mandate-phase-b/RUN-MANIFEST.md. The fix demonstrates its own contract for the second time in two releases.

Verification

  • bash tools/smoke-test.sh: 61/61 PASS (no count delta — Phase B adds no new smoke check; the R3 advisory is exercised by manual fixture in the implementer's test, R4 is prose).
  • bash tools/purity-check.sh: PASS.
  • bash -n pkg/.aihaus/hooks/autonomy-guard.sh: exit 0.
  • code-reviewer.md ≤ 200 lines: 131.
  • R3 advisory tested: >5 progress entries + 0 agent rows → stderr advisory + exit 0; agent rows present → no advisory; AIHAUS_STEP7_ADVISORY=0 → no advisory.

Cumulative effect (v0.24.1 + v0.24.2)

The Step 7 / Step 9 contract is now four-layer:

  1. Prose (Phase A): SKILL.md + annex describe the routing rules + inline budget.
  2. Audit trail (Phase A): manifest progress log records deviation: when inline path was taken.
  3. Soft warning (Phase B / R3): autonomy-guard surfaces drift at every Stop event during a feature/bugfix run.
  4. Post-hoc review (Phase B / R4): code-reviewer flags CRITICAL when diff scope exceeds budget without delegation evidence.

Each layer back-stops the next.

Source

  • Triggering post-mortem: downstream consumer audit, 2026-05-03.
  • Phase A: v0.24.1 (df061b4 feature commit, 2eba417 merge).
  • Phase B: this release (e32280a feature commit, merged in fbaa940).