0
Self-critique planning loop before an agent takes irreversible actions
Design a plan-then-critique-then-act loop for an agent that can take irreversible actions (examples: {{irreversible_actions, e.g. sending an email, deleting a file, making a purchase}}). The loop must:
1. Require the agent to write a full plan before any action, listing each step and, for each step that is irreversible, a one-line justification for why it's necessary versus a safer alternative.
2. Add a mandatory self-critique pass on the plan: the agent must argue against its own plan, specifically looking for: a step that assumes information it doesn't actually have, a step that could be replaced by a reversible check first (dry-run, preview, confirmation read-back), and a step whose failure would be hard to detect.
3. After critique, the agent revises the plan if the critique found a real issue, or explicitly states 'critique found no blocking issues' if not, don't allow silently skipping this.
4. Only after that, the agent may execute, one step at a time, re-checking after each irreversible step whether the original plan's assumptions still hold before proceeding to the next.
5. Define what triggers a full stop and human handoff versus what's safe to self-correct and continue.
Output this as a usable system prompt.