docs(framework): add WAKE-DOCTRINE.md guide (W0) (#893)
Some checks failed
ci/woodpecker/push/publish Pipeline was successful
ci/woodpecker/push/ci Pipeline was canceled

Co-authored-by: jason.woltje <jason@diversecanvas.com>
Co-committed-by: jason.woltje <jason@diversecanvas.com>
This commit was merged in pull request #893.
This commit is contained in:
2026-07-25 21:57:51 +00:00
committed by Mos
parent 2698ddb7b5
commit 4c117afe03

View File

@@ -0,0 +1,31 @@
# Wake Doctrine
This is the canonical fleet wake/heartbeat doctrine, extracted verbatim from the ratified
converged wake/heartbeat design (`docs/scratchpads/heartbeat-planning/CONVERGED-DESIGN.md`). It
governs when agents wake and how a wake is delivered, consumed, and retired.
**Wake only on a real, un-consumed, lane-relevant obligation.** Fixed-interval heartbeats are
forbidden as the primary wake mechanism; they survive only as a **per-class fallback cadence**
bounded by urgency SLO, never as the steady state.
**A digest is cumulative state since the last CONSUMED ack**, not an event delta. It is
self-orienting (who / lane / board-head) and decides the no-op case with **zero tool calls**.
Actionable facts are **claims-to-verify** carrying a **hard locator** (repo/issue#/SHA/file);
self-sufficiency never exempts a consequential action from its live gate.
**Consumption is a consumer act, not a delivery act.** Split RECEIVED (delivery; `wake_id`-deduped)
from CONSUMED (durable capture of a contiguous prefix). Never ack-then-crash-before-capture. Acks
are local-write-only and cumulative; a turn never blocks on the network to ack.
**Durability is unconditional; coalescing is optional.** Every delivered class is durably stored
and acked; only machine `digest` wakes coalesce. A parked or absent pane must never lose a human
or peer message.
**Park is two-phase:** flush-and-checkpoint (recording the CONSUMED cursor) _before_ `/clear`.
**Liveness is independent of work-triggering:** an off-host dead-man beacon, alarming on absence —
never a same-host sibling, never a pane scrape.
**Retire the old net LAST:** run new alongside old, compare ledgers, and cut over only when the
per-host safety vector (no-op-rate ↓ AND canary-FN=0 AND source-parity-inventory-complete AND
reconcile=0 AND p95 event→CONSUMED≤SLO AND p95 event→qualified-action≤SLO) passes.