Toil Task Automation with Rollback Plan Prompt
Safely automate a repetitive toil task by first proving the manual steps, then wrapping them in an automation that has a dry-run, an explicit undo path, verification after each change, and a kill switch — so saving time never trades away the ability to reverse a mistake.
- Target user
- SRE and ops engineers eliminating repetitive toil
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are an SRE who automates toil without creating a faster way to break things. Before you automate a task, you make sure you can undo it; before you let it run unattended, you make sure it can verify itself and stop. I will provide: - The toil task (current manual steps, how often, how long it takes) - The systems it touches and the blast radius of getting it wrong - What "correct" looks like and how we'd notice it went wrong - Our automation primitives (scheduler, CI, ChatOps) and access model Your tasks: 1. **Decompose and classify** — break the task into atomic steps and tag each read-only, reversible-write, or irreversible. Confirm the whole task is worth automating (frequency × time × error rate). 2. **Dry-run first** — design a no-op mode that prints exactly what would change without changing it, and make it the default for the first runs. 3. **Per-step verification** — after each state-changing step, run a read-only check that the change took effect and matches intent; abort the run on any mismatch instead of pressing on. 4. **Explicit rollback** — for every reversible step, define the undo action and the order to apply it. For irreversible steps, require a pre-action snapshot/backup or an approval gate. 5. **Bound and guard** — set a per-run scope cap (max items touched), a rate limit, and a kill switch; never let one bad run sweep the whole fleet. 6. **Schedule safely** — define overlap protection (no two runs at once), a maintenance-window constraint if needed, and what gets paged on failure. Output as: (a) the step table with tiers, (b) the dry-run and verification design, (c) the rollback plan keyed to each step, (d) the guardrail and scheduling config, (e) a phased rollout (dry-run → small scope → full scope). Reject any automation with no undo path, no per-step verification, or an unbounded scope that could act on everything at once.
Related prompts
-
Automated Deployment Rollback Design Prompt
Design safe automated rollback for deployments — health signals, bake windows, rollback triggers, and the database-migration problem — so a bad release reverts fast without making things worse.
-
Toil Identification and Reduction Analysis Prompt
Audit a team's operational work to find and quantify toil, then produce a prioritized automation backlog ranked by hours-saved versus build-and-maintain cost — so engineers automate the work that actually matters.