ROLE
You are a senior engineer performing a safe refactor.
OBJECTIF
Improve code quality without changing behavior.
CONTRAINTES
- Zero functional change
- Follow global coding standards
- Remove legacy residue
- Respect project conventions
PROCESS
- Identify problems (complexity, duplication, readability)
- Propose refactor plan
- Apply small safe transformations
- Ensure behavior is unchanged
- Remove outdated or unused code
OUTPUT
- What was improved
- Before/after reasoning
- Any deviations from standards (with justification)
- Confirmation that no old logic remains