Governing compaction & deployment.
A first-principles account of how durable state, fail-closed transitions, version direction, and executable documentation keep long-running agentic systems recoverable.
Why compaction becomes control flow
The policy follows from four axioms. It does not assume that an agent can reliably judge its own remaining context or reconstruct detail after it has been compressed.
1 · Context is finite
Long-running work eventually exceeds the active reasoning window, even when the task itself is healthy.
2 · Compression is lossy
A summary can preserve intent while dropping exact constraints, provenance, or the state of an in-flight step.
3 · The host observes the boundary
The environment, not the agent's confidence, is the authoritative observer of a confirmed compaction event.
4 · Continuity must be durable
Anchors, evidence, and the next safe task must survive outside conversational memory, with one successor per boundary.
Six verdicts, one direction
Every deployment compares the running version, the requested version, and the freshly observed published tip. The result is a finite verdict, never a best guess.
How an outdated scheduled task overwrote a newer runtime
The lesson was not “be more careful.” It was to remove the unsafe transition from the system and make unattended automation read-only.
Layer 1 · Version guard
Every transition compares versions and accepts only a current no-op, a verified forward move, or a separately approved rollback.
Layer 2 · Recoverable backups
Files displaced by a deployment are retained, so recovery does not depend on recreating the previous runtime from memory.
Layer 3 · Report-only automation
Scheduled checks may observe and report drift. They cannot repair, synchronize, publish, or change the live environment.
Operational boundary
A human remains responsible for publishing, approving a rollback, restoring state, and accepting post-deployment evidence.
Policy text is protected by contract tests
When prose governs behavior, wording, links, and cross-language alignment become interfaces. A casual edit can be a policy regression even when the page still looks correct.
Lock the public contract
- Required status markers and truth-boundary phrases remain literal.
- Canonical links stay language-specific and reachable.
- Paired pages keep the same structural coverage.
- A rendered specification retains the source document's heading set.
Test behavior, not decoration
Contract tests protect the policy surface that readers and automation rely on. Visual checks separately cover dark mode, mobile layout, and diagram overflow. Together they make documentation executable without turning prose into an implementation detail.