Refactoring

Domain: Code Generation

🎯 Motivation

Improving code structure without changing behavior - making it cleaner, faster, or more maintainable. The model can suggest and perform refactoring.

📋 Concrete Example

Before: 50-line function with nested ifs. After (refactored): 3 smaller functions, each 15 lines, clear names, same behavior. Easier to read and maintain.

🔗 Analogy

Reorganizing your room - same furniture, same stuff, but better arranged. It functions the same but is more pleasant and efficient. Refactoring reorganizes code.