Rollback Prod
Roll back production deploy targets to their previous releases using each provider's native rollback primitive.
Workflow
Resolve the shared deploy helper:
if [ -f "$HOME/.claude/skills/deploy-status/scripts/deploy-ops.mjs" ]; then DEPLOY_OPS="$HOME/.claude/skills/deploy-status/scripts/deploy-ops.mjs" elif [ -f "skills/deploy-status/scripts/deploy-ops.mjs" ]; then DEPLOY_OPS="skills/deploy-status/scripts/deploy-ops.mjs" else echo "rollback-prod helper not found; re-run dotbabel bootstrap or dotbabel init" >&2 exit 2 fiRun the rollback planner/executor from the consuming project root:
node "$DEPLOY_OPS" rollback $ARGUMENTSPreserve the helper's exit code:
0- rollback ran and post-rollback status is in sync1- confirmation declined or post-rollback deploy status reports drift2- discovery, auth, release lookup, or rollback execution failed
Confirmation Contract
The helper always prints the rollback plan first. Unless --dry-run is present,
it must require the operator to type exactly:
ROLLBACK PROD
No --yes, environment variable, autonomous mode, or model routing decision may
bypass this confirmation. Provider CLIs may receive their own non-interactive
flags only after this confirmation succeeds.
Target Ordering
The helper uses the same target discovery as /deploy-status. If
.claude/deploy-targets.json contains rollback_order, targets matching each
entry are serialized in that order and targets in the same group run in
parallel. Example:
{
"rollback_order": ["fly", "vercel"]
}
This rolls backend targets back before frontend targets.
Provider References
Load only the provider notes that match discovered targets:
| Provider | Reference |
|---|---|
| Vercel | references/vercel.md |
| Fly.io | references/fly.md |
| AWS Amplify | references/aws-amplify.md |
Rules
- Never run rollback actions without typed confirmation.
- If any target cannot produce both current and previous releases, run no
rollback actions and exit
2. - If one target fails during rollback, report the partial state clearly and do not auto-revert targets that already succeeded.
- After attempted rollback actions, run deploy status automatically and print the new state.