← ClaudeAtlas

improve-architecturelisted

Slice-bounded refactor: clarify boundaries, remove incidental complexity, extract duplication. No behavior change.
a-canary/arc-agents · ★ 0 · AI & Automation · score 66
Install: claude install-skill a-canary/arc-agents
# improve-architecture — Refactor for Clarity, Not Features Use when a worker (usually during hygiene phase) notices structural rot — fuzzy module boundaries, duplicated logic, a helper that has outgrown its file — and wants to land a contained refactor without sliding into a feature change. This skill is *not* for new behavior. If the change alters runtime semantics, file it as a regular `task` row instead. Wiring this skill into the stop-hook reminder (and any bookie hygiene-emit verb) is Slice D's responsibility — until that lands, workers reach this skill by directory listing or by an explicit pointer from the director. ## When to use - A function or type is duplicated across ≥2 files with no shared owner. - A module's public surface no longer matches its name (e.g. `ledger/claim.ts` exporting unrelated helpers). - A switch / if-chain has grown past ~6 arms and the cases are stable. - A test file is testing two unrelated concerns and the split is mechanical. Do **not** use this skill to redesign a subsystem, change a contract, or rename a public CLI verb — those need an ADR or a dedicated task. ## Inputs expected - The row body names the symptom (e.g. "extract `parseRowId` from ledger.ts + bin/arc-chat.ts into src/ledger/row-id.ts"). - A pre-state diff or grep showing the duplication / smell. - The CHOICES.md / ADR section the refactor honors (or the constraint it must not violate). ## Deliverable shape 1. A single commit (or short stack) that moves code, with *