Refactor Safely

Change the structure of existing code without changing its behaviour, in verified steps small enough to abandon. Covers pinning current behaviour with characterisation tests before touching anything, sequencing small reversible transformations, keeping the build green throughout, separating refactoring from behaviour change, and extracting a service from a monolith by strangler fig. Use when improving structure, paying down design debt, preparing code for a feature, splitting a module or service, or when the user says 'refactor', 'clean this up', 'restructure', 'extract', 'strangle', or 'reduce coupling'. This workflow preserves behaviour — to add or change behaviour use implement-service, to audit without changing use review-service.

parvez3019 Updated

File contents

parvez3019/awesome-microservices-skills/tree/main/skills/refactor-safely commit 4f6c6a716a

Frequently asked questions

npx skillmds@latest add parvez3019/refactor-safely