Best Practices for AI Coding Assistants

Chapter 2 · Practice 2 of 4

Separate exploring and planning from writing code on larger changes

From Writing task prompts

Why it matters

Letting an assistant jump straight to code can produce a working solution to the wrong problem. Claude Code recommends four phases:

  1. Explore: the assistant reads files and answers questions without changing anything.
  2. Plan: it writes a plan: which files change, what the flow is. You edit the plan.
  3. Implement: it codes against the plan and runs the tests.
  4. Commit: it commits with a clear message and opens a pull request.

Many tools have a read-only or plan mode for the first two phases.

Planning has a cost, so skip it when it does not help. Claude Code's docs put it simply: if you could describe the diff in one sentence, skip the plan. Plan when you are unsure of the approach, the change touches several files, or you do not know the code well.