$ ls ~/.claude/rules/*.md | wc -l → 17
/rules engine
Load-bearing rules survive every context compaction. Topic rules live in ~/.claude/rules/*.md and are linked from the umbrella CLAUDE.md. Each rule has a written lock date and is enforced by 0–2 hooks.
RULE 0.6 — Observable Classification
Classify the observable as classical-noise vs amplitude-only BEFORE applying statistics.
RULE 0.7 — Manifold-SDE Tangent Sanity
Before committing an SDE drift on a manifold: verify the drift is not in the normal space.
RULE 0.8 — Secrets Single Source
Every token lives in ONE file: ~/.claude/secrets/.env (+ per-project secrets/*.env).
RULE 0.9 — Math-First Gate
Pure-theory experiments: ask "provable?" — if YES derive first, run ONCE to confirm.
RULE 0.10 — Recurrence Escalate
Same mistake ≥2× per session → invoke /escalate-recurrence skill (rule + wiki + hook).
RULE 0.12 — Agent Git Model
Every non-trivial Agent invocation = forked git branch + 6-file artefact bundle + ledger row.
RULE 0.13 — Orchestrator Branch First
Orchestrator owns branch + commits + push. Agent writes files only (sandbox denies Bash inside worktree).
RULE 0.14 — Session Self-Audit
Stop / milestone-commit / error-spike → kei-memory analyze + patterns → AskUserQuestion to triage.
RULE 0.15 — Sleep Layer
Nightly REM consolidation via cloud-agent trigger. A:incubation → B:REM → C:NREM (deep-sleep weekly).
guard — API Cost Guard
Pre-launch cost verification for Modal / AWS / GCP / fal.ai / Apify / ElevenLabs.