Skip to content

/edikt:invariant:review

Review invariant language quality — checks whether hard constraints are specific, actionable, and phrased for reliable enforcement.

This is a scoped shortcut for running /edikt:gov:review targeting invariants only.

Usage

bash
/edikt:invariant:review
/edikt:invariant:review INV-001

Arguments

ArgumentDescription
(none)Review all active invariants in docs/architecture/invariants/
INV-NNNReview a specific invariant

What it checks

Invariants are held to a higher standard than ADRs — they must be non-negotiable, verifiable, and carry a clear consequence for violation.

Each invariant is evaluated on:

DimensionStrongWeak
SpecificityNames exact patterns, types, or operationsVague or broadly interpretable
PhrasingNEVER/MUST with explicit consequence"avoid" or "try to" language
Violation signalDescribes what a violation looks likeNo way to tell if violated
TestabilityCheckable by static analysis, grep, or testCannot be verified mechanically

Sidecar Cross-Check (v0.6.0)

After the prose-quality review, :review cross-checks the invariant's <INV>.edikt.yaml sidecar against the prose body for drift. The check is read-only — it never modifies files.

For each directive in the sidecar:

  1. Read <INV>.edikt.yaml. If missing, warn: "No sidecar found — run /edikt:invariant:compile <INV> to generate."
  2. Locate each of the directive's source_excerpts[].quote entries in the prose body. If any verbatim quote is not found, flag the directive as stale.
  3. Scan the prose body for imperative directives (MUST, MUST NOT, SHOULD, NEVER, ALWAYS) not represented in the sidecar. Flag any extras.

Output is either ✓ Sidecar in sync or a warning list with line numbers and a recovery command. :review never auto-regenerates — the user resolves drift via :compile or by editing the prose.

When to run

  • After writing a new invariant, before it goes active
  • Before running /edikt:gov:compile — clean invariant language produces clean enforcement

What's next

Released under the Elastic License 2.0. Free to use, not for resale.