针对复杂项目建立“旗舰模型(Opus/Fable)顶层规划 + Sonnet 5 中低 effort 批量并行执行 + 旗舰模型校验汇总”的多层分工工作流,避免 Sonnet 5 在高难度开放任务中空转多轮消耗过多 token。
适合的任务:海量非结构化文档提取与清洗、多子代理并行代码库检索、大规模模块单测生成、多步骤确定性业务落地。
不适合的任务:单轮超难系统架构设计(应直接由 Opus 处理)、简单的单文件极简改动。
适用的模型版本:Claude Sonnet 5(作为执行层)搭配 Claude Opus 4.8 / Opus 5(作为规划校验层)。
适用的客户端、Agent 或 API:自建多 Agent 调度编排系统、Cursor Composer、Claude Code。
推荐的推理档位和参数:Sonnet 5 执行子任务使用 effort: "low" 或 effort: "medium";Opus 规划使用 effort: "high"。
workflow_name: tiered_model_routing
architecture:
layer_1_orchestrator:
model: claude-opus-4.8
effort: high
role: "System Architect & Task Decomposer"
responsibilities:
- Analyze the full project requirement and repository context
- Decompose the goal into bounded, deterministic, single-step tasks
- Specify input files, constraints, and verifiable acceptance criteria for each subtask
layer_2_workers:
model: claude-sonnet-5
effort: medium # 或 low
role: "Parallel Execution Worker"
responsibilities:
- Execute isolated subtasks (e.g. read files, extract schemas, write unit tests, generate feature code)
- Strictly follow acceptance criteria without redefining overall architecture
- Output diffs, test logs, and structured reports
layer_3_synthesizer:
model: claude-opus-4.8
effort: medium
role: "Quality Gate & Integration Reviewer"
responsibilities:
- Review integrated diffs from Sonnet 5 workers
- Validate edge cases, security guardrails, and cross-module consistency
- Approve final merge or issue targeted remediation requests阶段 1(架构规划):由 Opus 分析完整需求,输出模块化拆解规范与任务清单。
阶段 2(任务下发):将拆解后的独立子任务以结构化输入下发给 Sonnet 5 实例(可并发多实例)。
阶段 3(执行与自测):Sonnet 5 在限定目录和上下文内编写代码并运行本地单测,完成后输出标准化 diff。
阶段 4(质量门禁):由 Opus 或人工审查者对合并后的改动进行回归检查与验收。
社区多位重度用户实践验证:若直接让 Sonnet 5 独立处理高难度长流程架构任务,Sonnet 5 容易在多轮交互中反复探索自纠,导致每任务总 token 和耗时急剧上升;而一旦将任务拆解为边界明确的单步任务,Sonnet 5 的低单价($2/$10)与极高执行速度优势即可完全释放,整体工作流成本较纯 Opus 降低 50% 以上。
文档处理实测:在处理大批量无序文档抽取并汇总至表格的任务中,Sonnet 5 单次调用成本远低于 Opus,且准确率完全满足需求。
必须对子任务设立明确的完成条件(Done Condition);如果下发的子任务目标模糊,Sonnet 5 仍可能产生多余的重构代码。
调度层需监控每个子代理的步数上限,避免异常死循环。
社区用户总结:“The real trick... you should decompose tasks to the level where they are suitable for smaller models on low/medium reasoning... bigger models orchestrate and smaller models drive primary output.”
来源实践:“I use Sonnet 5 for research in workflows with mild fan out that an Opus agent collates and synthesizes... Token usage is actually cheaper than just Opus.”
Claude Sonnet 5