A diff-first workflow with Cursor that keeps you in control of every change.
Legacy refactors fail when the model changes behavior while making code look cleaner.
This flow makes the model describe current behavior, add characterization checks, then patch one concern at a time.
Refactor this legacy file without changing behavior. First summarize the current behavior and risk areas. Then propose characterization tests. After tests exist, make the smallest diff for one refactor axis only.