Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for Automation Difficulty: Intermediate ClaudeChatGPT

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.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More Automation prompts & error guides

Browse every Automation prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.