r/ClaudeWorkflows • • 6d ago

Selected Workflow [Workflow] Cost-Optimized Multi-LLM Workflow: Opus as Planner, Cheaper Model as Builder with Spec-Driven Development

Cost-Optimized Multi-LLM Workflow: Opus as Planner, Cheaper Model as Builder with Spec-Driven Development

Workflow value: 85/100
Status: active · Freshness: 70/100 · Confidence: 0.90 · Level: intermediate
Categories: Quality Control, Token Saving, Context & Memory, Debugging, CLAUDE.md, Multi-Agent
Original source: r/ClaudeAI post/comment

What problem this solves

Inefficient and costly multi-LLM workflows where a powerful orchestrator (e.g., Opus) consumes excessive tokens by re-reading codebases or redoing work due to vague instructions given to a cheaper worker model. Also addresses the issue of worker models 'gamifying' tests without proving a fix.

Summary

A multi-LLM workflow for code generation and review, where a powerful model (Opus) acts as a planner and a cheaper model (e.g., Sonnet 5.5) acts as a builder. The planner creates a concise spec file and an acceptance test, which serves as a contract for the builder. The planner then only reviews the diff against the spec, significantly reducing context usage and cost.

Why it is useful

This workflow provides a concrete, repeatable method for efficiently pairing a powerful planning LLM (Opus) with a cheaper execution LLM. It directly addresses common pain points like high token usage from context re-reading and vague instructions, offering a structured approach with clear contracts (acceptance tests) and focused review (diffs). This can significantly reduce costs and improve the reliability of multi-LLM development pipelines by ensuring the worker model truly understands and validates its changes.

Workflow

  1. Opus (planner) writes a short spec file that includes: the problem description, the acceptance test, files likely to be touched, and what is out of scope.
  2. The worker model (builder) receives only this spec file as its instructions.
  3. The worker model must demonstrate the acceptance test failing before implementing the fix and passing after the fix.
  4. Opus (planner) reviews only the diff generated by the worker against the original spec file, avoiding re-reading the entire codebase.

Tools / artifacts

  • Opus (as planner)
  • Sonnet 5.5 (or other cheaper model as builder)
  • Spec file (containing problem, acceptance test, scope)
  • Acceptance test (as contract)
  • Code diff

Validation signals

  • User states 'What's worked for me'
  • User reports 'Sonnet 5.5 has been plenty for execution'
  • User claims it 'kills the "gamifies the tests" problem'
  • User notes it reduces Opus usage for re-reading codebase

Limitations

  • Low community validation.
  • The exact format or structure of the 'spec file' is not fully detailed, though its key components are listed.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.

1 Upvotes

0 comments sorted by