Pattern: Plan-Then-Execute

Pattern: Plan-Then-Execute

Category: Reasoning Source: FOR-0012 Status: Documented

When to Use

When a task is complex enough that jumping straight into execution would produce poor results. The agent first creates a structured plan with steps, dependencies, and acceptance criteria, then executes the plan step by step. Best for multi-step tasks where the order of operations matters.

How It Works

  • Analyze the task requirements and constraints
  • Generate a step-by-step plan with clear milestones
  • Optionally validate the plan (human review or self-critique)
  • Execute each step in order, checking completion before moving on
  • After all steps are complete, run an overall acceptance test
  • If any step fails, re-plan from that point rather than starting over

Example

A digital talent tasked with "research competitors and produce a market analysis" first plans: (1) identify competitor list, (2) gather public data on each, (3) analyze pricing models, (4) compare feature sets, (5) synthesize into a report with recommendations. Each step has a clear deliverable. The agent executes sequentially, checking each step's output before proceeding.

Tradeoffs

Pro Con
Reduces wasted work from premature execution Planning step adds upfront latency
Makes complex tasks tractable Plan may need revision mid-execution
Creates a record of intended approach Over-planning on simple tasks wastes resources
Enables progress tracking against milestones Agent may plan well but execute poorly (or vice versa)

Factory Usage

  • Role Factory DESIGN stage: Before building any files, the workflow designs the role definition completely, creating a blueprint before execution.
  • Production Line stages: Pablo's assembly process follows a planned sequence with defined stages and quality gates.