目录 Explore, plan, execute

Working a task

Explore, plan, execute

Four vendors document or recommend variants of explore, plan, execute; no controlled outcome measurement of the sequence was found. Treat it as a default, not a result.

Claude Code documents four phases under the heading "Explore first, then plan, then code": read-only exploration in plan mode, a plan, implementation, then commit.1 Plan mode is entered with Shift+Tab or by starting the session in the plan permission mode, and the plan can be opened in an editor and edited before implementation.1 The separation's stated reason is that a model allowed to jump straight into code can produce code solving the wrong problem.1 Cursor ships an equivalent plan mode that researches the codebase, asks clarifying questions, and produces a reviewable plan,2 and its launch claim is qualitative, with no benchmark attached.3 GitHub recommends research, an implementation plan, and iterative changes on a branch before any pull request exists.4 OpenAI generates milestones from a spec.5

None of them publishes a number. No controlled experiment showing that an explicit plan phase raises agent task success was found, no measurement of how often plan approval catches an approach that execution would otherwise have built, and no measurement of planning overhead against its benefit. Widely recommended, not measured.

Anthropic and Cursor are explicit about when to skip it. Anthropic's heuristic is that "If you could describe the diff in one sentence, skip the plan."1 Planning pays when the approach is uncertain, the change spans several files, or the code is unfamiliar, and Cursor's selection rule matches: use plan mode for complex, multi-file work and skip it for quick or well-rehearsed changes.2 For larger features Anthropic documents interviewing the user, writing a self-contained spec that names files and interfaces and states what is out of scope, then executing it in a fresh session.1

The workflow documents a course-correction path from execution: a session that keeps failing the same way is reset rather than pushed further.

The figure defines explore-plan-execute as default.

stateDiagram-v2
  [*] --> Explore
  Explore --> Plan
  Plan --> Execute : plan approved
  Execute --> Done
  Execute --> [*] : same issue corrected >2x, clear & restart
  Done --> [*]

Figure: Explore, plan, then execute; repeated correction is the signal to clear the session and restart from exploration. Anthropic gives that loop a threshold: after correcting the same issue more than twice in one session, clear the context and restart with a better prompt, because the window now holds failed approaches.1 Checkpoints support rewinding a turn, but track only changes made through file-editing tools, not Bash or external processes.1

Genuinely exploratory tasks are a documented exception: Anthropic presents these phases as defaults rather than rules, and a task with no fixed target may not benefit from an upfront plan.1 A plan also carries risk. One built on a wrong reading of the code can direct execution toward the wrong problem, and nobody has published how often that happens.

参考文献

测验
  1. When do the vendors that ship a plan mode say to skip planning?

    • When the diff fits in one sentence
    • When the change spans several files but the surrounding code is already familiar
    • When the agent explored the same repository in an earlier session

    Anthropic's heuristic is that a diff describable in one sentence needs no plan, and Cursor's selection rule matches. Vendors recommend planning for uncertain or unfamiliar work, but its benefit against the overhead has not been measured.

  2. Once the same issue has been corrected repeatedly in one session, Anthropic's documented move is to ____ the context and restart with a better prompt.

    • clear
    • summarise
    • extend

    Anthropic's stated reason is that continuing to correct the same failure leaves the window full of failed approaches, so clearing it removes that pollution before retrying.

评论

还没有评论,来说第一句吧。