improve-codebase-architecturelisted
Install: claude install-skill perkzen/fabrika
# Refactor pass
Surface architectural friction in the code this branch touched and turn shallow modules into deep ones where it pays. Vocabulary and principles come from `fabrika:codebase-design` — **module**, **interface**, **depth**, **seam**, **adapter**, **leverage**, **locality**; the deletion test; "the interface is the test surface"; "one adapter = hypothetical seam, two = real". Use those terms exactly.
## 1. Scope
The scope is the modules this branch changed (`git diff --name-only <base>...HEAD`) plus their immediate callers and callees. Deepening pays off where change is happening, and a ticket's PR stays reviewable when its refactors stay near its feature. Code outside the scope is recorded as a candidate and left unchanged.
Read `CONTEXT.md` and any ADRs in the area first. An ADR settles a decision: a candidate that contradicts one is recorded with the conflict, never implemented.
## 2. Explore
Walk the scope (a sub-agent is fine) and note where you feel friction:
- Where does understanding one concept require bouncing between many small modules?
- Where are modules **shallow** — interface nearly as complex as the implementation?
- Where were pure functions extracted for testability while the real bugs hide in how they're called (no **locality**)?
- Where do tightly-coupled modules leak across their seams?
- Which parts are untested, or only testable past their interface?
Apply the **deletion test** to anything you suspect is shallow: deleting it would con