rules-compact
Rules Compact
Compact oversized rules files in claude/rules/ by archiving stale entries, deduplicating same-root-cause patterns, and consolidating related entries. Targets under 35k per file.
<essential_principles>
Why this matters. Rules files load into every Claude Code session. Files over 40k degrade performance -- large input blocks get ignored at task transitions (Variant B stall pattern). Keeping files under 35k leaves headroom for growth.
Archive, never delete. Removed entries go to claude/rules/archive/ and Synapset (pool: devkit). Archive files hold tombstones (number, title, status, Synapset ID); Synapset holds full text for semantic search. Zero information loss.
Synapset is the long-term store. Every archived entry MUST be stored in Synapset before removal from the active file. This enables semantic discovery of deprecated patterns that may still be relevant in new contexts.
Consolidation over deletion. Entries sharing the same root cause merge into a single super-entry with subsections. This reduces line count without losing detail.
Entry numbering is stable. Consolidated entries keep the lowest original number. Archived entries retain their number in the archive file. New entries use the next available number.
</essential_principles>