Plan the failure
Makes the agent imagine the shipped change has already gone wrong, list the likeliest causes specific to your project, and add safeguards before editing.
Before you start, imagine this change is already shipped and has gone badly wrong. List up to five of the likeliest causes specific to this project, such as a false assumption, an untested edge case, a nearby feature broken by the edit, an unexpected bill, or a user doing something unintended. Stop as soon as the real risks run out instead of padding the list. For each risk, state how we would spot it early and what your plan does to prevent it. Show me that plan before changing files. When the work finishes, report which risks you eliminated and which remain possible.
Plan the failurePrompt
- Use it when
- You are about to run a migration, change billing, launch a major feature, or rewrite a core flow.