What problem does it solve? Structural refactors like renames, moves, record/class conversions, and dependency cleanup often break callers, tests, or generated contracts when done without impact analysis. This Skill enforces a disciplined workflow that preserves observable behavior while changing code structure. ## Core Features & Use Cases - Impact-First Analysis: Uses knowledge-graph tools (minimal context, impact radius, affected flows) to map callers and tests before editing any symbol. - Expand-Contract Protocol: Splits wide refactors (database column renames, UUIDv7 identity migration, shared MediatR shape changes) into expand, batch-migrate, and contract phases so CI stays green. - Record/Class Conversion Rules: Classifies identity, equality, serialization, PATCH presence, and collection ownership before converting contracts, with generated C# contracts changed only through the owning generator. - Use Case: When renaming a shared domain type used across multiple projects, load this Skill to preview the rename, lock behavior with a failing regression test, migrate every caller outward, and verify with affected tests and architecture ratchets. ## Quick Start Ask the AI to load the refactor-safely skill and rename a shared domain class across all callers while preserving behavior and keeping tests green.