Workflow Plan
Use planning when it changes execution quality. A trivial read or obvious single action does not need a multi-phase ceremony.
Procedure
- Bind the task. State the requested outcome, exact project/host boundary, hard constraints, and observable success condition.
- Inspect discriminating state. Use
env_inspect,tool_discover, or project-local reads only for facts that can change the route. Preserve unknown/failed probes instead of treating them as missing. - Get the runtime scaffold. Call
workflow_planwith the task, relevant context, and the active project boundary. In Codex, pass the current session/project directory explicitly ascwd. - Resolve the route. Read
selection_statusbefore treating any candidate as chosen. Deterministic selection requires discriminating overlap with capability identity/tags; generic operation words or description-only similarity are not enough.selectedmeans one strongest semantically distinguished route is executable.ambiguousmeans equal strongest task evidence remains; tool availability is an execution prerequisite, not a semantic tie-breaker.matched_unavailablemeans the uniquely strongest semantic route lacks an available configured tool; do not silently fall through to a weaker match.no_matchmeans the scaffold lacks sufficient discriminating capability evidence and ordinary task reasoning must choose the path. Whenroute_discriminatoris present, use it to state the unresolved joint rather than inventing a selection. - State execution phases. For each consequential phase include the entry state actually required, concrete action/tool, safety class, observable exit condition, and rollback only when an explicit restore path exists. A scaffold whose route is unresolved is not executable merely because it contains an
executephase. - Execute under the active host permission boundary. The model constructs the concrete executing call; Claude Code or Codex then decides whether that same call is permitted. Do not add a second model-controlled confirmation field that claims the host already approved it.
- Verify before continuing. A phase that changes upstream state invalidates downstream assumptions that depended on it; re-evaluate those dependencies rather than blindly replaying the original plan.
Stop conditions
- Stop planning when further decomposition cannot change the next action or verification surface.
- If one missing fact selects between materially different routes, obtain that fact rather than expanding the plan.
- If execution is blocked, return the exact blocker and the smallest fact or authorization needed to continue.
- Do not call a task complete until the requested post-state is observed; preserve unresolved outcomes when the available surface cannot establish them.