refactor

Detailed guidance for the REFACTOR phase of TDD - emphasizes searching for existing patterns, extracting shared functionality, and avoiding code duplication before writing new implementations

refactor