# compress-dedup ## Goal Resolve the duplication between `skills/compress/` and `skills/caveman-compress/`. Both ship byte-identical `scripts/` (7 files: `__init__.py`, `__main__.py`, `benchmark.py`, `cli.py`, `compress.py`, `detect.py`, `validate.py`) and near-identical `SKILL.md` (only `name:` field and Process step 2 differ). Both register independently with the harness with identical descriptions — listing-token waste and arbitrary tie-break on activation. Pick canonical = `caveman-compress` (richer: README + SECURITY + caveman-toolkit branding); port the better Process-step wording from `compress` (generic `cd ` vs brittle `cd caveman-compress`); delete `skills/compress/` entirely. Add `version: 1.0.0` frontmatter to caveman-compress (project-discipline Rule 3 alignment). Skill listing collapses from two redundant entries to one rich one. Install path `~/.claude/skills/compress/` is removed. ## Key files - `skills/compress/` — entire folder deleted - `skills/caveman-compress/SKILL.md` — port Process step from compress; add `version: 1.0.0` - `skills/caveman-compress/README.md` — left as-is (already canonical, branding intact) - `skills/caveman-compress/SECURITY.md` — left as-is - `dist/compress.skill` — deleted (rebuild won't recreate; source gone) - `dist/caveman-compress.skill` — rebuilt after SKILL.md edit - `~/.claude/skills/compress/` — removed manually (install.sh has no prune step) - `~/.claude/skills/caveman-compress/` — reinstalled - `.wiki/concepts/compress-dedup.md` — design rationale (why caveman-compress canonical, why no alias mechanism, install-path impact) - `.wiki/index.md` — add concept entry - `.wiki/log.md` — append decision line - `.tasks/STATUS.md` — flip compress-dedup ⚪ → 🔴 → 🟢 ## Decisions log - 2026-05-05: scripts/ byte-identical (SHA256 match across all 7 files). SKILL.md diff = `name:` field + Process step 2 only. Description text identical between the two. README + SECURITY only in caveman-compress. Conclusion: same skill, two registrations. - 2026-05-05: chose `caveman-compress` as canonical over `compress`. Rationale: (a) richer docs (README with benchmarks table, branding, "Part of Caveman" toolkit linkage; SECURITY.md with Snyk false-positive writeup), (b) name reflects actual upstream origin (JuliusBrussee/caveman toolkit), (c) caveman cluster (caveman, caveman-commit, caveman-review, caveman-help, caveman-compress) has consistent prefix. - 2026-05-05: rejected "alias-stub" approach (keep `compress` as a tiny SKILL.md pointing at caveman-compress). Harness has no alias mechanism — every SKILL.md fully registers; alias-stub still consumes a listing slot and a description budget. No win. - 2026-05-05: rejected "keep both" approach. Identical descriptions ⇒ harness arbitrarily tie-breaks; both consume listing tokens; user has no way to predict which fires. Pure waste. - 2026-05-05: ported Process step 2 wording from `compress` SKILL.md into `caveman-compress` SKILL.md. The compress version (`cd && python3 -m scripts ...`) is robust regardless of cwd; the caveman-compress version (`cd caveman-compress && ...`) implicitly assumes cwd is the parent directory. Net: caveman-compress gets the better text + keeps everything else. - 2026-05-05: added `version: 1.0.0` frontmatter to caveman-compress SKILL.md. First versioned release of this skill. Aligns with the rest of the infra-skill cluster (skill-versioning concept). - 2026-05-05: install.sh has no prune step — removing `skills/compress/` does NOT remove `~/.claude/skills/compress/`. Manual `rm -rf ~/.claude/skills/compress/` required. Filed mental note for `[install-ps1]` task: future installer should accept a `--prune` flag, or `setup-tasks`-style canon-list, to remove stale installs. - 2026-05-05: slash-command impact — `/compress` slash command stops working after deletion; `/caveman-compress` and `/caveman:compress` (the canonical caveman-toolkit form) remain. Confirmed with user that `/compress` was effectively never used; no migration needed. ## Open questions - [ ] Eventually wire up an `install.sh --prune` flag that drops `~/.claude/skills//` for any name not in `skills//`. Tracked indirectly via `[install-ps1]` ⚪ task — that task should at minimum match install.sh, but adding prune is the right time to do it. ## Completed steps - (filled in during implementation) ## Notes - Origin: both skills came from the JuliusBrussee/caveman upstream toolkit (caveman-compress carries the "Part of Caveman" branding); `skills/compress/` looks like a stripped-down copy that lost README + SECURITY + branding. Never reconciled until this task. - Frontmatter description budget reminder (~900 chars): caveman-compress description is well under, no risk on this edit.