Skip to content
Back/Harness Engineering

Plan-first Orchestration

View in Graph
Updated 2026-06-02
1 min read
153 words

Plan-first Orchestration

What it is

Plan-first Orchestration 是一种 Agent 工作流设计模式:在执行任何操作之前,Agent 先生成完整的执行计划(plan),然后按步骤执行。与"反应式"(reactive)Agent 不同,Plan-first 强调先思考,后行动

Why it matters

  • CodeRabbit 的 review 流程:先生成 review plan,再逐文件检查
  • Gas City 的 Agent 设计:计划层作为动态工作流的编排器
  • Compound Engineering 的复杂任务处理:多步骤任务必须先分解再执行

核心模式

输入 → 计划生成 → 计划验证 → 步骤执行 → 状态同步 → 计划调整
  1. 计划生成:Agent 根据任务目标生成完整步骤列表
  2. 计划验证:检查计划的可行性、资源需求、风险点
  3. 步骤执行:按顺序执行每个步骤
  4. 状态同步:每步完成后更新全局状态
  5. 计划调整:根据执行反馈动态调整剩余计划

与 Dynamic Workflows 的边界

维度 Plan-first Orchestration Dynamic Workflows
计划时机 执行前完整计划 执行中动态调整
适用场景 确定性高、步骤清晰的任务 不确定性高、需探索的任务
可预测性
灵活性
示例 代码审查、数据迁移 研究、创意生成

工程实践

  1. 计划层作为独立模块:将计划生成与执行分离,便于测试和优化
  2. 计划版本化:记录计划的历史版本,便于回溯和审计
  3. 计划验证器:在计划执行前自动验证(如"是否包含禁止操作")
  4. 人机协作:关键计划节点需要人类确认

Open questions

  • Plan-first 是否会导致 Agent 过度规划(over-planning)?
  • 计划层本身是否值得用专门的模型(planner model)?
  • 在实时性要求高的场景(如客服),Plan-first 的延迟是否可接受?

Sources

Synthesized from 1 source
  • how-coderabbit-used-claude-to-build-an-agent-orchePrimary source for this page.Whole pagehighabsorb log

Evolution

1 event
  1. absorbed

    Derived from source material

    This page is currently synthesized from 1 source.

    From how-coderabbit-used-claude-to-build-an-agent-orcheTo Plan-first Orchestration
    Sources: raw/to-learn/how-coderabbit-used-claude-to-build-an-agent-orche.md