What problem does it solve? Legacy code refactoring often breaks working systems because changes are too large, untested, or poorly scoped. This Skill performs incremental, safe refactoring of one module at a time with strict blast radius limits, mandatory test verification after every edit, and proven refactoring patterns. ## Core Features & Use Cases - Pattern-Based Refactoring: Selects from Strangler Fig, Branch by Abstraction, Expand-Migrate-Contract, or Extract & Simplify based on module size, coupling, and complexity. - Safety Gates: Enforces a maximum 5-file blast radius, requires safeguard characterization tests before any edit, and runs tests after every single change. - Proposal Payload Execution: Consumes YAML proposals from architecture analysis specifying target scores, seams, adapters, and tests to replace. - Use Case: A 600-line legacy module with many consumers needs modernization. The Skill applies Strangler Fig, migrating one consumer at a time with tests passing after each commit, until the legacy code is fully replaced. ## Quick Start Ask the agent to refactor the legacy payment module using the surgeon workflow after safeguard tests are in place.