Plan a behavior-preserving refactor BEFORE touching it: fix the target shape, name the regression risk, pin behavior at the seam, then sequence it into small **always-green** steps that avoid a **big-bang rewrite**. Use when 'just clean this up', 'refactor X', 'this file is a mess', 'untangle this m
Plan a behavior-preserving refactor BEFORE touching it: fix the target shape, name the regression risk, pin behavior at the seam, then sequence it into small **always-green** steps that avoid a **big-bang rewrite**. Use when 'just clean this up', 'refactor X', 'this file is a mess', 'untangle this module', 'restructure this before I add to it', or before reshaping a risky area you don't want to br