Plan mode separates deciding what to change from executing the change. An AI tool first produces a structured plan, then waits for review and approval. This deliberate friction replaces instantaneous acceptance with an opportunity to catch hallucinations, architectural missteps, and misunderstood requirements. section 5.2.1 section 2.3.2
Use plan mode as a reviewable engineering procedure:
- Describe the desired outcome and relevant system area, rather than requesting an isolated function. section 5.2.1
- Ask the tool to map concrete implementation steps before it writes code. section 5.2.1 section 2.3.2
- Review and adjust the plan, then inspect the unified diff for architectural or factual errors. section 5.2.1 section 2.3.2
- Execute approved changes in controlled increments, recording each migration step as a clearly defined Git commit. section 2.3.2
Payment retry logic
Instead of asking for a retry function, ask the agent to analyze the payment module and propose retry logic for failed transactions. Critique the resulting plan, revise it where necessary, and approve execution only after understanding the intended changes. section 5.2.1
Listing 2.2 Push the legacy app .
git init git remote add origin git@github.com:your/repo.git #A git checkout -b master #B git add . git commit -m "Commit legacy JBoss application state" git push -u origin master #C
Preserve the legacy application state in a Git repository before using plan mode for migration; this creates a concrete baseline for reviewing later increments. section 2.3.2


