Encodes the 4 load-bearing lessons from the 170-cycle /evolve run that ended
in operator override at cycle 154 + 13-cycle rescope arc:
1. Mechanical session-state persistence — new scripts/evolve-update-session-state.sh
derives session-state.json from cycle-history.jsonl tail. Fixes the cycle 91 → 169
drift that accumulated when Claude forgot to write state at each cycle boundary.
Also computes mode_repeat_streak + idle_streak as derived signals.
2. Sticky dormancy marker — Step 3 hard-gate now writes .agents/evolve/DORMANT,
Step 1 short-circuits on subsequent fires with zero further tool calls.
Eliminates the post-dormancy cron-fire inference burn.
3. Metronome detector — Step 3.0 reads mode_repeat_streak, soft-blocks at >=3
(skip rung), hard-blocks at >=5 (operator override required). Would have caught
the cycles 144-154 CLI-wiring template-application loop 5 cycles sooner.
4. Pre-flight schema check — Step 4 samples 2 consumer call sites before
architectural migration cycles, compares field-use against port surface.
Would have caught cycles 156-157 narrowness post-mortem before burning the
/rpi cost.
Net SKILL.md change: +14/-7 lines (inline gates only; detail in references/).
Two new reference docs document thresholds, naming discipline, and worked examples
from this repo's actual cycle history.
Validated: skill-lint passes, codex parity passes, go build + vet clean,
derive script tested with synthetic histories (streak math correct for all
3 cases: metronome=3, dormancy=2, idempotence).
bd: soc-p5nh