| name | invariant-check |
| description | Audit Rust source code against Palimpsest's Six Laws. Use when reviewing code changes, before commits, or when asked to verify invariant compliance across the codebase. |
| version | 0.1.0 |
| user-invocable | true |
| allowed-tools | Grep Read Glob Bash(cargo *) |
| argument-hint | [crate-name or file path] |
Invariant Compliance Audit
Scan the specified crate (or the entire workspace if no argument given) for violations of the Six Laws.
Target
If $ARGUMENTS is provided, scope to that crate or file. Otherwise scan all crates.
Checklist
For each source file, check:
Law 1 — Determinism
Law 2 — Idempotence
Law 3 — Content Addressability
Law 4 — Temporal Integrity
Law 5 — Replay Fidelity
Law 6 — Observability as Proof
Output
Report findings as a table:
| File | Law | Violation | Severity | Line |
|---|
Severity: critical (blocks merge), warning (should fix), info (style preference).
After the table, summarize: total violations by severity, and whether the crate is merge-ready.