refactor-safely
Recipe for restructuring code without changing behaviour - establish a behavioural safety net first, write characterisation tests where coverage is thin, work in small reversible steps, keep one kind of change per commit, keep tests green at every step, never mix behaviour changes into a refactor, measure when performance is the motive, apply stop criteria, and know how to roll back. Names the skills to apply at each step, the exit check, and what to hand forward. Load when asked to refactor, restructure, rename, extract, simplify, or clean up existing code.
Pinned to revision c74eff4a9f08, so it is the text this page describes rather than whatever the author pushed since.
Files
Every link opens the file at its source, pinned to the revision this page describes.