ctx-compact
Installation
SKILL.md
ctx-compact — the pre-reset checkpoint sweep
A user-invoked safety ritual, not a new mechanism. It runs the sink discipline that already lives in the companions —
ctx-progress(tracking),ctx-spec/ctx-merge(SOT), the consistency gate — across both gates at once, so nothing decided this session is left only in chat when context resets. Lifetime model in../ctx.
Execution Procedure
The risk this addresses is asymmetric and catastrophic: a /compact or a new session loses whatever was decided but never written to disk. Mid-session that is handled continuously by sink-same-turn (ctx-progress); this skill is the explicit, user-triggered second check right before the reset, and — unlike sink-same-turn — it is cross-cutting: it sweeps not just progress but decisions and spec too.
checkpoint_before_reset() → nothing decided is left only in chat; the base is current + consistent
# STEP 1 — Sweep the TRACKING gate (progress) — the common case
result = Skill("ctx-progress") # run its pre-reset checkpoint (EP4): sink decided work-state;
# verify active leaf current, next step written, nothing only-in-chat
assert result.delivered # GATE — do not report "safe to /compact" on an unconfirmed sink