Skip to content

Recipe: Opus 4.8 max planner → GPT-5.5 xhigh plan review → Sonnet builder → GPT-5.5 xhigh implementation review (measure twice, cut once, measure you cut right) #25

@BaseInfinity

Description

@BaseInfinity

Summary

A "measure twice, cut once, measure that you cut right" model-routing loop for high-confidence OpenCode SDLC work.

The pattern:

  1. Plan: opencode/claude-opus-4-8 (max) — deep implementation planning. Opus's reasoning depth surfaces hidden dependencies, auth/data risks, blast radius, and safe task slices before a single line of code is written.
  2. Plan review: opencode/gpt-5.5 (reasoningEffort: xhigh) — adversarial critique of the plan. "Does this plan actually solve the problem? What's missing? What could go wrong?" Loop until plan confidence ≥95%.
  3. Build: opencode/claude-sonnet-4-6 — implementation. Sonnet is fast and capable; using it for the bulk of coding keeps cost sane while Opus and GPT-5.5 tokens go to the high-leverage moments.
  4. Implementation review: opencode/gpt-5.5 (reasoningEffort: xhigh) — merge-blocking review. "Did the implementation match the plan? Are there bugs, test gaps, security issues, scope creep?" Loop back to builder until implementation confidence ≥95%.

Why this matters

This is the "measure twice, cut once, measure that you cut right" pattern for AI-assisted dev:

  • Measure once (plan): Opus max burns tokens on understanding, not code. It's the right model for ambiguous, risky, or multi-file planning where missing a dependency is expensive.
  • Cut (build): Sonnet is the workhorse. ~5x cheaper than Opus; capable enough to ship. The bulk of token spend stays at Sonnet rates.
  • Measure twice (review): GPT-5.5 xhigh is an adversarial reviewer from a different model family. Cross-model review catches what same-model self-review structurally misses.
  • The loop: if review confidence is below 95%, return targeted fix instructions to the builder. Sonnet patches. Review again. Convergence in 2 rounds typically.

Why this may still be cheaper than all-Opus

Phase Model Relative cost Rationale
Plan Opus 4.8 max High — one call Deep reasoning on the hard part
Plan review GPT-5.5 xhigh Medium — one call Adversarial check before any code
Build Sonnet 4.6 Low — many calls Bulk implementation at 5x lower rate
Impl review GPT-5.5 xhigh Medium — 1-2 calls Final gate before merge

Compare to all-Opus: every file read, test run, and edit at Opus rates. The premium is front-loaded and back-loaded, not spread across every inner-loop operation.

Suggested opencode.json agent config

{
  "agent": {
    "plan": {
      "model": "opencode/claude-opus-4-8",
      "mode": "primary"
    },
    "build": {
      "model": "opencode/claude-sonnet-4-6",
      "mode": "primary"
    },
    "review": {
      "description": "Merge-blocking GPT-5.5 xhigh review. Read-only by default.",
      "model": "opencode/gpt-5.5",
      "reasoningEffort": "xhigh",
      "mode": "subagent"
    }
  }
}

Matching commands:

  • /plan-feature <goal> → plan agent (Opus max) → deep plan, no edits
  • /driver-task <task> → build agent (Sonnet) → one slice, small diff
  • /plan-review → review agent (GPT-5.5 xhigh) → "is this plan solid before I build it?"
  • /final-review <goal> → review agent (GPT-5.5 xhigh) → merge-blocking implementation review

The confidence gate (document this explicitly)

  • Before build: plan review must reach ≥95% confidence or explicitly list what's uncertain.
  • Before merge: implementation review must reach ≥95% confidence.
  • If not: return fix instructions to builder/planner, repeat. Max 3 rounds.
  • After 3 rounds still not ≥95%: STOP, escalate to human.

This matches the cross-model review convergence research already in the SDLC wizard (2 rounds sweet spot, 3 max). The same convergence rule applies here — the confidence gate is the same mechanism, just applied to the plan before build, not only to the implementation before merge.

Environment

  • OpenCode: 1.16.2
  • opencode-sdlc-wizard: 0.13.4
  • macOS 15.1 arm64
  • Zen model IDs: opencode/claude-opus-4-8, opencode/claude-sonnet-4-6, opencode/gpt-5.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions