Architecture & practice·Legacy systems and migration
you changed the shape of the code all afternoon and the tests never went red once.
Refactoring
Changing the internal structure of code without changing its observable behaviour. The behaviour-preserving part is the whole definition, which is why 'refactor' is misused when it means 'rewrite this bit and probably alter what it does'. Being precise matters in planning, because a real refactor is safe enough to interleave with feature work while a behaviour change needs its own testing and its own rollback story.