# Refactoring Rules

Refactoring is allowed only when:

- tests already exist
- behaviour is preserved

Refactoring must:

- reduce complexity
- improve readability
- not introduce new features

Never mix refactoring with feature implementation.