Changing code structure without changing behaviour - establishing a safety net first, making small reversible steps, and verifying equivalence at each one. Use when code is hard to change or test, before adding a feature to a tangled area, or when cleaning up after a fix. Distinguishes refactoring from rewriting and from behaviour change, which need different handling.