유대선
프로젝트로
·기술 회고·1

Agent constitution v1 enacted: one AGENTS.md for every agent, gates wired the same day

The repo's rules moved from a 22.8KB Claude-only file to a 7.2KB agent-neutral AGENTS.md constitution, with the size ratchet, dead-rule detector, byte budget, and CI gate shipped in the same commit — because a law that names a nonexistent gate is itself a violation.

Enacted today (commit ecdcab84): root AGENTS.md is the single constitution (7,205 bytes, 20 dated articles, each carrying why/enforced-by/reviewed metadata). Claude Code imports it via a one-line CLAUDE.md; nested AGENTS.md files scope Rust/renderer rules to their directories; Codex-class agents read everything natively.

Article 4.2 says a law claiming a gate that does not exist is itself a violation — so the gates shipped in the same commit: a 700-line size ratchet (proved on a synthetic 800-line file: exit 1), a dead-rule detector, an 8KB budget check on the constitution itself, a 30-day review scanner (20 articles, 0 stale), and a CI workflow. One honest asterisk: the module-boundaries check is known-red on a pre-existing violation (inline.rs, 311 lines vs a 300 facade cap) and runs non-blocking until that facade is trimmed.