Architectural Invariants
Invariants are hard constraints that cannot be overridden. They sit at the top of the priority stack and are evaluated before conflict resolution — so a proposed memory that contradicts one is rejected at retain time, structurally, not by prompt.
How It Works
- You register an invariant (via CLI, API, or extraction from
CLAUDE.md/AGENTS.md). - On every retain, the invariant pre-check gate runs the mission registry over the batch before storing, rejecting on contradiction.
- On every recall, invariants are injected and evaluated before the resolver sees any conflict.
Retain-Time Enforcement
The gate fires before model output. Because it is structural, an agent under pressure cannot rationalize its way around a hard constraint. In the MCP surface this is enforced even for non-privileged callers.
Invariant Scopes
| Scope | Meaning |
|---|---|
Global | Applies to all projects and sessions |
Session | Applies within a single session |
Project(<name>) | Applies to a named project |
Extraction
Invariants can be extracted from documentation files (e.g. CLAUDE.md, AGENTS.md) via the zoid_invariant_extract MCP tool, with a dry_run mode to preview before creating them.