strategic-compact
Strategic Compact Skill
A framework for intelligently suggesting context compaction at optimal moments during long coding sessions, preserving work continuity while managing context window limitations.
Design Philosophy
Why Strategic Compaction > Auto-Compaction
Auto-compaction operates on simple thresholds (token count, time elapsed) without understanding the semantic state of your work. This leads to several problems:
-
Mid-Task Disruption: Auto-compact might trigger while you're debugging a complex issue, losing the mental model you've built up over many interactions.
-
Context Fragmentation: Arbitrary cutoffs create artificial boundaries in your work history, making it harder to understand the full picture when resuming.
-
Lost Continuity: Important context about "why" decisions were made gets compacted away at random points rather than preserved at meaningful boundaries.
-
Incomplete State: Compacting mid-implementation can lose track of partially completed work, leading to duplicated effort or missed steps.
Strategic compaction instead: