How do you decide whether a coding agent should plan before editing?

Instruction: Describe when planning adds value before code changes.

Context: Checks whether the candidate can explain the core concept clearly and connect it to real production decisions. Describe when planning adds value before code changes.

Updated

Example Answer

I'd plan when the change has dependencies or uncertainty that should be resolved before editing. Renaming a public request field needs a short plan covering the server, callers, compatibility behavior, and tests. Correcting a typo in a comment may need no separate planning step.

The plan should name the likely files, the behavior being changed, and how completion will be checked. If inspection shows an additional caller or a migration, I'd revise the plan before widening the patch. I'd also compare the final diff with the plan; otherwise it becomes prose that never constrains execution. Planning earns its cost by revealing a missed dependency, not by being long.

Why this works

Shows when planning changes an engineering decision and how the plan remains useful during execution.

Practice follow-up

What discovery should trigger replanning rather than an immediate extra edit?

Your preparation path

Work through these questions in order. Read the answer aloud, then explain it in your own words.

Related Questions