safe-change
Installation
SKILL.md
Safe Change
Never change something in place when other code depends on it. Add the new thing next to the old, move callers over, then remove the old. Each phase is its own PR and deploy, and each one is safe to roll back on its own.
Step 0: Know the callers
You need the full list of callers before you start: run impact-analysis if you haven't. If the code being changed has thin test coverage, run characterization-tests first so you'll notice if behavior shifts.
Step 1: Pick the pattern
Rename a model field (status → state)
- Expand: add
state(nullable or with default). Write to both on save. Migration + backfill (django-migrations). - Migrate readers: switch all reads (code, serializers, filters, admin, raw SQL, other repos) to
state. - Stop writing
status. Make it nullable if it wasn't. - Contract: remove the field from the model with
SeparateDatabaseAndState(state only), deploy, then drop the column in a later migration.