# Make an AI coding assistant plan a change before it edits code

A structured request that makes the assistant restate requirements, list assumptions to check, and propose file-by-file changes first.

- Topic: Working with AI
- Framework: RTF
- Level: Standard
- Tags: Coding, Write, Rewrite & Edit, Fill-in Template
- Source: https://www.thinkwithprompt.com/prompts/make-an-ai-coding-assistant-plan-a-change-before-it-edits-code

## Prompt

```text
Before you write or change any code, plan this change with me.

**Why we are making the change:** [CONTEXT — the problem, bug, or business need]
**Desired behavior:** [what should happen after the change, including edge cases]
**Relevant files or areas:** [PATHS, or "find them"]
**Constraints:** [e.g. "no new dependencies", "keep the public API stable", "must pass existing tests"]
**Out of scope:** [what not to touch]

Do this, in order, and then stop and wait for my approval:
1. **Your understanding:** restate the requirement in 3-5 sentences, in your own words.
2. **Hypotheses to validate:** list 5 assumptions you are making about the code, data, or expected behavior that I should confirm or correct.
3. **Questions:** anything you cannot determine from the code.
4. **Change plan:** a file-by-file list using these markers:
   - ADD: new file, with its purpose
   - EDIT: existing file, with what changes and why
   - DELETE: file to remove, with why it is safe
5. **Tests:** which tests you will add or update, and how we will know the change works.
6. **Risks:** what could break, and how to roll back.

Rules:
- Do not edit any files until I reply "approved" (or give corrections).
- If you find the change is bigger or riskier than described, say so instead of shrinking the scope silently.
- Keep the plan to what is needed; no unrelated refactoring.
```

## What to fill in

- CONTEXT — the problem, bug, or business need
- what should happen after the change, including edge cases
- PATHS, or "find them"
- what not to touch

Free to copy and use. From ThinkWithPrompt (https://www.thinkwithprompt.com/), a library of 2,663 curated AI prompts.
