Skip to content

Enhancement/136 Migrate the review flow to Opus 5 / Sonnet 5 - #135

Open
s100ian wants to merge 3 commits into
mainfrom
claude/migrate-opus-sonnet-5-evma4l
Open

Enhancement/136 Migrate the review flow to Opus 5 / Sonnet 5#135
s100ian wants to merge 3 commits into
mainfrom
claude/migrate-opus-sonnet-5-evma4l

Conversation

@s100ian

@s100ian s100ian commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Closes #136

Migrates this repo's Claude model references off claude-sonnet-4-6, plus the prompt- and flow-side fixes that the model swap alone doesn't cover.

Companion to uni-dev-lab/uniplan-web#105, which makes the equivalent change on the frontend side.

What changed

File Change
.claude/agents/uniplan-be-reviewer.md claude-sonnet-4-6claude-opus-5; added a finding-length cap; fixed a stale /review reference (the skill is /review-pr)
.claude/skills/review-pr/SKILL.md Added a real CI override; Step 2 now says "never skip locally"; Step 6 gained the CI variant
.github/workflows/claude-code-review.yml claude-sonnet-4-6claude-sonnet-5; set CI: "true"; added the review-only guardrail

Why the model split. The reviewer subagent does the actual bug-finding, where Opus 5's precision and recall gain is worth the most. The CI --model flag drives the orchestrator, which classifies the diff, dispatches the subagent, merges findings, and posts the comment — plumbing that Sonnet 5 handles at lower cost. Both paths stay behind the reviewers-only environment gate, so token spend is bounded either way.

Finding-length cap. Opus 5 writes longer user-facing text than Sonnet 4.6, and the reviewer's output is posted verbatim as a PR comment. The cap holds review length steady. It's prompting rather than an effort change because on Opus 5 verbosity responds to instructions, not to effort level.

Skill/workflow contradiction. SKILL.md Step 2 previously said "never skip this step" while the workflow prompt told the orchestrator to skip worktree creation in CI — a direct conflict that matters more now that both models follow instructions more literally. The skill now carries its own CI override tripped by CI: "true" on the job, and Step 6 prints Implementation target: N/A in CI instead of a worktree path it never created. This mirrors what uniplan-web already had.

effort: high is retained. An intermediate commit stepped it down to medium on the basis that Opus 5 holds review accuracy at lower effort; that was reverted, so the net diff leaves effort untouched. Recall was judged worth more than the token saving.

Verification

No API-surface migration was required: the reviewer sets no budget_tokens, no sampling parameters, and no assistant prefills, so nothing in the 4.6 → 5 breaking-change set applies. The workflow YAML was re-parsed after editing. No behaviour was executed — this diff is configuration and prompt text only, and the flow it configures runs on workflow_dispatch against a PR.

Not included

claude-opus-5 uses a different tokenizer than Sonnet 4.6 and thinks by default, so a review run will spend more tokens than before. Worth watching on the first few real PRs; revert either model line if the cost profile doesn't hold.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NkKxkLYPzNDTWUak4Wsb8D

claude added 3 commits July 24, 2026 20:01
Move the backend reviewer subagent to Opus 5 (deep bug-finding is the
highest-value step in the review) and the CI review orchestrator to
Sonnet 5 (diff classification, subagent dispatch, comment posting).

Both replace claude-sonnet-4-6. No other API surface changes are needed:
neither call site sets budget_tokens, sampling parameters, or assistant
prefills, and effort: high remains valid on Opus 5.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NkKxkLYPzNDTWUak4Wsb8D
Follow-up to the model migration, covering prompt-side and flow-side
adjustments the model IDs alone did not address.

- Reviewer: cap finding length at one to two sentences. Opus 5 writes
  longer user-facing text than Sonnet 4.6, and this output is posted
  verbatim as a PR comment. Verbosity responds to prompting, not effort.
- Reviewer: effort high -> medium. Opus 5 holds review accuracy at lower
  effort; revert to high if recall drops on real PRs.
- Skill/workflow: give the skill a real CI override and set CI=true on the
  job. Step 2 previously said "never skip this step" while the workflow
  prompt told the orchestrator to skip it — a direct contradiction that
  matters more now that both models follow instructions more literally.
- Workflow: state the review-only guardrail (no commits, no edits, no new
  PRs), matching the uniplan-web workflow.
- Reviewer: fix stale /review reference; the skill is /review-pr.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NkKxkLYPzNDTWUak4Wsb8D
Reverts the medium step-down from the previous commit. Review recall is
worth more here than the token saving; the other tuning changes (finding
length cap, CI override, review-only guardrail) are unaffected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NkKxkLYPzNDTWUak4Wsb8D
@s100ian
s100ian requested a review from a team as a code owner July 24, 2026 20:22
@s100ian s100ian changed the title Migrate Claude model IDs to the 5 generation Enhancement/136 Migrate the review flow to Opus 5 / Sonnet 5 Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement: Migrate the review flow to Opus 5 / Sonnet 5

2 participants