refactoring
Change internal structure while preserving observable behavior.
Use this when A working implementation is becoming hard to change.
without the term
“This file is a mess and hard to change. Can you clean it up and reorganize it, but please don't change what it actually does or break anything that already works?”
with the term · How do you ask a model for refactoring?
Refactor this module while preserving its public behavior. Run the behavior tests before and after; report any intentional test changes.
What is refactoring?
Refactoring changes how code is organized without adding a new product behavior.
Why does refactoring matter when vibe coding?
A cleanup request can accidentally become a feature rewrite.
How do you do refactoring?
Name the behavior to preserve and the scope to improve. Check those behaviors before and after.
What goes wrong with refactoring?
Changing assertions to accept a behavior change conceals a regression.