Blacksite/.codex/ARCHITECTURE.md

810 B

Architecture debt ratchet

Blacksite keeps extension seams sustainable at the point of change. New behavior belongs in the smallest domain module that owns it; an already-large file is not permission to add more behavior there.

architecture.toml is the machine-readable policy. scripts/codex/architecture_audit.py enforces three default nonblank-line budgets: 500 for UI shells, 800 for other UI modules, and 1,200 for other production Rust modules. Existing files above those budgets have frozen ceilings and may shrink but never grow.

An exception is temporary and must name a tracker issue, rationale, hard maximum, extraction target, and expiry milestone. Passing the audit means the debt did not regress; it does not mean an exception is complete. Candidate review must reject expired exceptions.