What problem does it solve? Long-running research projects accumulate decisions, session records, metrics, and resolved blockers in STATE.md until the file becomes too large to load efficiently into context. This Skill compacts STATE.md by moving historical entries to STATE-ARCHIVE.md while preserving recent and actively referenced content. ## Core Features & Use Cases - Threshold-Based Compaction: Measures STATE.md line count against a 150-line target and a 1500-line emergency budget, with a --force flag to bypass checks. - Selective Archival: Archives decisions and metrics from old phases, resolved blockers, and session records older than the last three, appending them to STATE-ARCHIVE.md with dated headers. - Verification and Recovery: Validates required sections after compaction, syncs state.json, and recovers from state.json or git if compaction was too aggressive. - Use Case: A research project's STATE.md has grown past 1500 lines across many phases. Run the compaction workflow to archive completed-phase decisions and old session records, commit the result, and keep the active context lean. ## Quick Start Ask the AI to compact STATE.md by archiving historical entries to STATE-ARCHIVE.md, optionally forcing compaction with the --force flag.