← ClaudeAtlas

spec-compactlisted

Compact a spec plan (or design doc) markdown file after the implementation has shipped: strip the transient how — code snippets, step-by-step walkthroughs, file-by-file diffs — that the codebase now owns, keep the why — design decisions, key file references, changelog. Use when the user wants to compact, shrink, or trim a plan/spec file post-implementation, says the plan is bloated or too long now that the feature shipped, or invokes `/spec-compact`. Renaming files, fixing dead links, and index updates belong to `spec-lint`.
kevinlin/skills · ★ 3 · Code & Development · score 74
Install: claude install-skill kevinlin/skills
# spec-compact: Post-Implementation Spec File Compaction After a feature lands, the plan that guided it is usually 3–10× larger than future readers need. Code blocks, per-step walkthroughs, and `Verify:` command lists earned their keep during implementation but now duplicate what the codebase and git history carry. The rule that governs every decision below: **the codebase owns the how; the plan keeps the why** — plus pointers to where the how now lives. Scope guard: naming, dead links, index drift, and reverse coverage belong to `spec-lint`. Surface them in the final report; the fix happens in a `spec-lint` run, keeping each diff single-purpose. --- ## Step 1: Resolve the Specs Root and Read Local Meta Build a small map of the spec tree first, so the compaction can keep links to the sibling specs that own the long-term knowledge instead of restating them. 1. Identify the specs root, stopping at the first hit: - Read `README.md` and `CLAUDE.md` (root + `.claude/CLAUDE.md`) for an explicit pointer ("design docs in `docs/specs/`"). - Probe in order: `docs/specs/`, `openspec/specs/`, `specs/`, `docs/spec/`, `spec/`. - Still none → ask the user where the specs live. 2. If `<SPECS_ROOT>/meta/convention.md` exists, read it — the per-project source of truth for artifact classes (`requirements`, `design`, `plan`, plus project extensions like `runbook` or `adr`). Compaction applies to **plan** and (when explicitly requested) **design** files only. 3. If `<SPECS_ROOT>/in