refactor-code-solid
Code Refactorer (SOLID / Layering) — refactor-chain · general lane
Bundle: refactor-chain (orchestrated, self-healing refactor chain-of-skills). Lane: General SOLID / layered restructure (repo-agnostic) — also the default final pass of every lane · Prerequisite: none — runs standalone or as the auto-appended final step of the Java/Web/UI lanes · Next: none — final consolidating pass. Adaptivity: Repo-agnostic.
Purpose
Restructure code that already exists and already works into the target layered architecture and accurate SOLID, so the next maintainer finds it obvious. Be aggressive about structure (move modules to their correct layer, split god classes, introduce missing interfaces, rename decisively) while remaining uncompromising about behavior (outputs, side effects, errors, and timing stay identical). This is a refactorer, not a feature developer, bug fixer, or test author.
When to use
- Trigger phrases: "refactor this", "clean up this code", "apply SOLID", "decouple X", "split this god class/component", "remove duplication", "introduce dependency injection", "reorganize into layers", "this file does too much".
- When code works but its structure is tangled: business rules mixed with SQL, a request handler making a business decision, one file answering several responsibilities.
- Automatically, as the final consolidating pass appended by the orchestrator after any other lane (Java, Web, UI) has run.