Home/
Part XV — Troubleshooting, Checklists, and Reference/47. Prompt Library (Copy-Paste Starters)/47.2 The "plan first" prompt
47.2 The "plan first" prompt
Overview and links for this section of the guide.
On this page
The Prompt
Before writing any code, create a plan.
## Planning Phase
First, output a plan in this format:
### Goal
One sentence describing what we're building.
### Approach
3-5 bullet points explaining the approach.
### Files to Create/Modify
- file1.ts: reason
- file2.ts: reason
### Risks
Any concerns or tradeoffs.
---
## Implementation Phase
After the plan, implement it step by step.
For each file, show the complete code.
## Confirmation
End with: "Plan complete. Ready to implement? [Y/n]"
Wait for user confirmation before writing code.
If user says no, revise the plan based on feedback.