refactorlisted
Install: claude install-skill gnibu/bento
# Refactor
You own the contract. The structure changes; the behavior does not. If the cleanup reveals a
missing feature or a real bug, split it out and ship the structural change first against the
pinned contract.
## Steps (paste as todos)
1. **Pin the behavior first.** Before moving anything, capture current behavior: a
characterization test, a snapshot, or an equivalence harness. No coverage in the area →
write the pin first. Type-check and lint are *not* a pin.
2. **Name the target shape.** State what the module layout, types, and call graph should be
if built today. The reshape must delete branches or invalid states, not add indirection.
3. **Subtract before you add.** Delete dead code, collapse one-caller wrappers, drop
redundant validators before introducing the new shape. Smallest change that reaches the
target ships; a speculative "might help" cleanup gets reverted.
4. **Move in small behavior-preserving steps,** each keeping the pin green. For an API
reshape, migrate every caller and delete the old API in the same step — no compat shims,
no parallel old-and-new paths.
5. **Grep every rename.** Renames silently miss usages in strings, prose, config, and
back-references. Spot-check against the actual files.
6. **Prove behavior unchanged on the real artifact** — the pin green, or an equivalence
check (diff old-vs-new outputs / replay a recorded baseline). Not "it compiles."
7. **Keep only if it lowers reader load.** If the diff doesn't make