🤖 The Prompt That Asks for Your Rollback Plan Before You Need One
Every deploy plan gets attention for how a feature is supposed to go out – far fewer get the same scrutiny for how it comes back out if something’s wrong after it’s already live. A rollback plan that only exists as “we’d just revert the commit” quietly assumes no migrations ran, no external state changed, and no other deploy landed on top of it in the meantime – assumptions that are usually fine and occasionally catastrophic, which makes this exactly the kind of checklist an AI can run through methodically before the pressure of an actual incident forces it.
🔎 The Prompt
I'm going to describe a feature I'm about to deploy (or paste the PR description, migration files, and config changes). Please: 1. List every piece of state this change touches that a simple code revert would NOT automatically undo - database schema changes, data migrations, changed default config values, feature flags, cache entries, or external service calls. 2. For each one, tell me specifically what "rolling back" would actually require beyond reverting the code - a down-migration, a manual data fix, flipping a flag back, or something else. 3. Flag anything where rolling back the code but NOT the data migration would leave the system in a broken or inconsistent state, since that's the single most common rollback trap. 4. Ask me directly whether each of those extra rollback steps has actually been tested, not just planned - and if I don't know, tell me that's the answer I need to go find out. My change: [paste the PR description, migrations, and config changes here]
✅ Fix: Why This Prompt Works
- Asking specifically what a plain code revert would NOT undo targets the actual gap in most rollback plans – the code almost always reverts cleanly; it’s the schema, data, and external state that usually doesn’t.
- Flagging the code-reverts-but-migration-doesn’t scenario by name catches the single most common real incident pattern directly, instead of leaving it to be rediscovered the hard way during an actual rollback.
- Asking whether each extra step has been tested, not just planned, keeps this from producing a false sense of security – a rollback plan that’s never been rehearsed is a theory, not a plan.
🚨 Worth Keeping in Mind
- This can only reason about what it’s told – a migration or config change you forgot to paste is a gap it has no way to flag, so completeness of the input directly limits completeness of the review.
- It won’t tell you whether your team has the operational access or runbook to actually execute a rollback step under pressure – it can only tell you the step exists and needs testing.
A rollback plan that’s never been tested isn’t a rollback plan – it’s a guess you’re hoping never to need, written down to feel safer about not checking it.
