refactor-simplify
Quality-Only Simplification Pass — refactor-chain · do-the-work / review
Bundle: refactor-chain (self-diagnosing, self-healing fix-it pipeline).
Phase: do-the-work (a cleanup step) or review (a pre-gate polish) · Prerequisite: there is code to simplify and a green baseline (refactor-safety-net) · Next: refactor-verify proves behavior held; then the review gate.
Adaptivity / conditional: repo-agnostic. Behavior-preserving by contract — it applies fixes, unlike the advisory reviewers.
Purpose
Make the changed code simpler and clearer without changing what it does and without hunting for bugs. This is a focused quality pass with exactly four lenses: reuse (stop reinventing what already exists), dead-code removal (delete what nothing reaches), altitude (put each piece at the right level of abstraction — collapse needless layers, or add the one that's genuinely missing), and clarity (names, shape, and flow that read straight through). It applies the simplifications in small, verified, reversible steps — it is not advisory. It deliberately stays in its lane: it does not look for correctness bugs, security holes, or performance regressions. If it notices one in passing, it notes it and leaves it for the reviewers; it does not fix it here.
When to use
- The change works but reads as bloated, duplicated, or over-built. Triggers: "simplify this", "clean this up", "reduce the boilerplate", "this is over-engineered".
- There's obviously dead or duplicated code. Triggers: "remove the dead code", "de-duplicate this", "we have this helper twice".
- The abstraction level is off. Triggers: "too many layers here", "this indirection is pointless", "just inline it".
- As the polish step before the review gate, to shrink the diff to its clearest form.
- Precondition: a green baseline so every simplification can be proven behavior-preserving.