← ClaudeAtlas

compactlisted

SPEC.md compactor — token-budget sweep. Triggers when user invokes `/sdd:compact` ∨ asks to compact spec ∨ /sdd:check emits `## advisory` token-budget overflow line. Phrasings: "/sdd:compact", "compact SPEC.md", "SPEC too big", "shrink the spec", "token budget".
kborovik/pilot-skills · ★ 4 · Testing & QA · score 70
Install: claude install-skill kborovik/pilot-skills
# compact — SPEC.md compactor Operator-triggered six-prong sweep. Single atomic commit, rollback via `git revert`. ## PREAMBLE `/sdd:compact` ≡ state-mutator scoped to SPEC.md ∪ `SPEC.archive.md` ∪ `.claude/check-extras.md`. ⊥ auto-fire per recipe-step-no-dispatch rule — operator invokes only; advisory surfaces ∈ /sdd:check final-output when `check-mechanical.py` token estimate (`bytes/3.4` per token-budget-compact invariant) > 25k threshold. Writes serialize main-thread; per-prong scan reads delegable to sub-agents per write-serialize invariant. Mutation contract ≡ single commit per atomic-operation discipline; ⊥ partial application. ## LOAD 1. Read `SPEC.md`. Missing → "no spec, nothing to compact." Stop. 2. Read `pilot-spec/SPEC-FORMAT.md` ∀ row schema ∧ section catalog. 3. Compute baseline `tokens ≈ bytes/3.4` per token-budget-compact invariant (single source ≡ `check-mechanical.py` `TOKEN_RATIO` per mechanical-realization invariant; ⊥ hardcode divisor). Record. ## PROPOSE Six prongs ∈ execution order 1 → 2 → 3 → 4 → 5 → 6 (prong number ≡ execution order per token-budget-compact invariant). Per-prong fire decision: scan SPEC.md ∀ trigger match, emit firing-set ∪ skip-set w/ per-prong rationale 1-liner. ### Prong 1 — §V fold-first sweep Cluster pattern-mirrored sibling §V rows per fold-first-authoring invariant. Co-citation seed script-computed per mechanical-realization invariant — `check-mechanical.py emit-fold-seeds` emits clusters of live §V rows sharing a cit