Trim
Installation
SKILL.md
Trim
Shrink an always-on context file that has gotten too big. /trim <file> walks the reduction, safest cuts first, never dropping a rule.
Workflow Routing
| Trigger | Workflow |
|---|---|
/trim <file>, "trim OPERATIONAL_RULES", "this file is too big", "reduce a doctrine file", "fold the proposal inbox" |
Workflows/Trim.md |
Quick Reference
- Target resolution: a bare name (
OPERATIONAL_RULES) resolves against the always-on set — the system prompt,CLAUDE.md, its@-imports, and the hook-injected memory files. No arg →wc -cthat set and take the largest. - Order is safest-first: (1) show state, (2) deterministic GC (zero-risk), (3) semantic trims (human-gated), (4) safety gate, (5) re-measure. Full steps:
Workflows/Trim.md. - One tool it orchestrates — never reimplement:
LIFEOS/TOOLS/ProposalGC.ts(removes superseded/duplicate/absorbed entries). Sizes come fromwc -c. - Three semantic moves: MERGE overlapping rules, TIGHTEN verbose ones, RELOCATE rarely-used detail to an on-demand reference (leave a stub + pointer).
- The invariant: a trim never drops a distinct directive. If a merge would, keep the original.