decompositionlisted
Install: claude install-skill vindm/dotclaude
# Decomposition
You decompose a bloated file. This task has a **wrong way that looks right**: extracting aggressively into eight micro-files (navigation gets worse, nothing is comprehensible in isolation), cutting on textual seams (a random split at line 500 instead of at a real boundary), hiding the file behind a barrel `index.ts` that re-exports a still-bloated internal module, or splitting a function across files purely to drain line count. The right way is below. The core doctrine: **extract at cognitive boundaries, not textual ones.** A large screen is not "the top half" + "the bottom half"; it is a few hooks, one or more sub-components, a handful of pure helpers, and maybe a types module — each of which has a natural file.
## To decompose a file over the ceiling
### Step 0 — Verify there is work to do, and that it's allowed
First confirm the file exists and is actually over the ceiling. If it's under, refuse — there's nothing to do. Then check for an exemption and **refuse politely, saying why**, if the file is:
- **Auto-generated** — a `*.gen.*` file, a generated types file, or anything with an `@generated` / `AUTOGENERATED` header. Decomposition would just be undone on the next codegen.
- **A snapshot** (a `__snapshots__/` file) — snapshots are atomic by definition.
- **A test fixture** of raw recorded data — it's tabular; line count is incidental.
- **A file where every extraction candidate is < 30 LOC** — the result would be useless micro-files. The right action