Skip to content

Agent & Skill Model Optimisation#181

Closed
bradwindy wants to merge 5 commits intoobra:mainfrom
bradwindy:main
Closed

Agent & Skill Model Optimisation#181
bradwindy wants to merge 5 commits intoobra:mainfrom
bradwindy:main

Conversation

@bradwindy
Copy link

@bradwindy bradwindy commented Dec 22, 2025

Per https://platform.claude.com/docs/en/about-claude/models/choosing-a-model, added explicit model specifications for multi-agent orchestration.

Changes

Agent:

  • code-reviewer: Now uses model: haiku for faster, cost-effective reviews

Skills:

  • dispatching-parallel-agents: Recommends model: haiku for parallel investigation subagents
  • subagent-driven-development: Recommends model: haiku for spec and code quality reviewers
  • requesting-code-review: Recommends model: haiku when dispatching code-reviewer

Motivation and Context

Anthropic recommends Haiku 4.5 for sub-agent tasks, noting that "Sonnet 4.5 can orchestrate a team of multiple Haiku 4.5s to complete subtasks in parallel." Haiku 4.5 matches Sonnet 4 on coding and agentic workflows while running 4-5x faster at a fraction of the cost.

How Has This Been Tested?

Tested using these skills in another repo and confirmed visually that changed agents and tool calls now use Haiku.

Summary by CodeRabbit

  • Documentation

    • Added model selection guidance for agent optimization, including decision criteria and practical examples across different task types and agent roles.
    • Included recommendations for balancing speed, cost, and quality in model assignments.
  • Chores

    • Updated agent and task configurations with optimized model specifications for improved efficiency.

✏️ Tip: You can customize this high-level summary in your review settings.

Per Anthropic guidance, Haiku 4.5 is recommended for sub-agent tasks
in multi-agent systems. This reduces cost and latency while
maintaining quality for code review validation tasks.

Reference: https://platform.claude.com/docs/en/about-claude/models/choosing-a-model
Parallel investigation subagents benefit from Haiku's speed and cost
efficiency. Per Anthropic: 'Sonnet 4.5 can orchestrate a team of
multiple Haiku 4.5s to complete subtasks in parallel.'

Reference: https://www.anthropic.com/news/claude-haiku-4-5
…ment

Spec and code quality reviewers are validation tasks suited for Haiku.
Implementer retains orchestrator model for coding intelligence.

Reference: https://platform.claude.com/docs/en/about-claude/models/choosing-a-model
@coderabbitai
Copy link

coderabbitai bot commented Dec 22, 2025

Walkthrough

Documentation and metadata updates extending agent and skill definitions with model-selection guidance. Added model: haiku parameter to code-reviewer agent and dispatched tasks, along with comprehensive model-selection sections explaining when to use haiku versus sonnet/opus models across different subagent types.

Changes

Cohort / File(s) Summary
Agent configuration
agents/code-reviewer.md
Added model: haiku YAML field to agent header metadata.
Skill model selection documentation
skills/dispatching-parallel-agents/SKILL.md
Updated three Task declarations to include model: "haiku" parameter; added new Model Selection section with guidance on haiku usage for parallel subagents, including benchmarks, cost comparisons, and decision criteria for when to use Sonnet/Opus instead.
Skill model selection documentation
skills/requesting-code-review/SKILL.md
Added explanatory block and code example demonstrating model: "haiku" assignment for code-reviewer subagent dispatch.
Skill model selection documentation
skills/subagent-driven-development/SKILL.md
Added Model Selection section with a table mapping subagent types to recommended models (Implementer → sonnet/opus; Spec Reviewer → haiku; Code Quality Reviewer → haiku) and dispatch examples with explicit model assignments.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

The changes follow a consistent, repetitive pattern of adding model-selection metadata and documentation guidance across multiple files with no functional code or logic changes. The additions are primarily documentation and YAML metadata, making them straightforward to validate.

Possibly related PRs

Poem

🐰 Hop through the haiku path, swift and lean,
Model selection guides are now serene,
Parallel agents dispatch with care,
Sonnet for thought, haiku for the flair!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Agent & Skill Model Optimisation' directly and clearly summarizes the main change: adding explicit model specifications (Haiku) to agents and skills for optimization.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 80643c2 and 2aeef13.

📒 Files selected for processing (4)
  • agents/code-reviewer.md
  • skills/dispatching-parallel-agents/SKILL.md
  • skills/requesting-code-review/SKILL.md
  • skills/subagent-driven-development/SKILL.md
🔇 Additional comments (6)
agents/code-reviewer.md (1)

1-6: Metadata field added for agent model specification.

Line 3 introduces model: haiku to the agent header. This declaratively specifies that the code-reviewer agent should run on Haiku, aligning with the PR's goal to optimize validation tasks.

Verify that the agent orchestration system recognizes and enforces this model field at runtime. Provide confirmation that agents can override their default model via this metadata.

skills/requesting-code-review/SKILL.md (1)

36-40: Clear guidance on model selection for code-review dispatching.

Lines 36–40 effectively introduce model selection and provide a concrete Task example. The rationale (validation task → Haiku for speed/cost) is sound and well-positioned.

Confirm that the Task(..., model: "haiku") syntax is supported by the Task tool/function used in the codebase. If Task() does not currently accept a model parameter, this documentation should be deferred or the implementation extended.

skills/subagent-driven-development/SKILL.md (1)

91-106: Well-structured model-selection guidance with clear decision table.

Lines 91–106 provide a practical model-selection section that maps subagent types to recommended models with clear rationale. The dispatch examples effectively show the difference between implicit (inheriting orchestrator model) and explicit model specification.

Confirm that when Task() is called without a model parameter, it inherits the orchestrator's model (e.g., Sonnet/Opus). This implicit-default assumption should be validated against the actual Task() implementation to prevent surprising behavior.

skills/dispatching-parallel-agents/SKILL.md (3)

68-71: Task calls updated with model specification.

Lines 68–71 consistently add model: "haiku" to the three parallel investigation tasks, with a clear explanatory comment. This aligns with the dispatch pattern described in the Model Selection section.


188-195: Real-World Impact section provides concrete validation.

Lines 188–195 ground the model selection guidance with a concrete example: 6 failures across 3 files, 3 agents dispatched in parallel, all investigations completed concurrently with zero conflicts. This validates the practical benefit of the pattern.


166-178: Clarify Anthropic documentation reference and verify speed comparison context.

The Model Selection section references Anthropic guidance and makes performance claims about Haiku 4.5. Anthropic does state that Haiku 4.5 "runs up to 4-5 times faster than Sonnet 4.5"—however, the code snippet does not specify which Sonnet version is being compared. The claim that "Haiku 4.5 matches Sonnet 4's performance across reasoning, coding, and computer-use tasks" is supported by Anthropic's official statements.

Issues:

  • The code states "Haiku runs 4-5x faster than Sonnet" without specifying whether this refers to Sonnet 4, Sonnet 4.5, or an earlier version. For clarity, reference the specific Sonnet version (e.g., "Sonnet 4.5") to avoid confusion.
  • Verify the documentation URL in line 168: the referenced link structure (platform.claude.com vs. docs.claude.com or docs.anthropic.com) should be confirmed as current and accessible.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@obra
Copy link
Owner

obra commented Dec 24, 2025

Haiku is indeed less expensive, but it's also less capable. I don't think this is the right choice for Superpowers

@obra obra closed this Dec 24, 2025
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.

2 participants

Comments