Skip to content

Add subagent model-routing role agents to onboarding#56

Merged
alongd merged 1 commit into
mainfrom
add-subagent-model-routing
Jul 16, 2026
Merged

Add subagent model-routing role agents to onboarding#56
alongd merged 1 commit into
mainfrom
add-subagent-model-routing

Conversation

@alongd

@alongd alongd commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What

Adds a model-routing layer for Claude Code subagents to the group onboarding, so a mother session (running on any model) dispatches work to a named role agent that pins its own model + effort, instead of making an ad hoc per-task model choice.

Four role agents in onboarding/agents/:

Agent Model Effort Role
snippet-classifier haiku low trivial mechanical work — classify/extract/summarize/lookup
code-implementer sonnet medium default worker — well-scoped changes, test fixes, routine refactors
architecture-reviewer opus high senior judgment — design/API review, cross-cutting tradeoffs, strategy
project-executor fable high large rough-goal mission (plan→implement→self-check) within one session

Why this shape

  • Role-based, not abstract labels. Routing on named roles (with the model baked into frontmatter) is more deterministic and legible than asking the mother to re-classify each task as "technical/tactical/strategic" — "tactical" especially is overloaded.
  • Model-agnostic. Each role pins its model, so a Sonnet/Opus/Fable/Haiku mother that dispatches code-implementer still gets Sonnet.
  • Explicit boundary. The one fuzzy call left — code-implementer vs project-executor — is written on the scope/autonomy axis, defaulting to code-implementer when unsure.
  • Honest ceiling. project-executor is one dispatch (no /handoff, no Phoenix, no context loop); the docs point at the autodev skill for genuinely unbounded work.

Changes

  • onboarding/agents/*.md — the four role definitions (model + effort frontmatter; both officially supported fields, verified against Claude Code sub-agent docs).
  • onboarding/CLAUDE.global.md — new "Subagent model routing" section under the existing subagent-preference rule.
  • onboarding/ONBOARDING.md step 8 — symlink-install into ~/.claude/agents/ (symlinks so git pull keeps them current) + a "takes effect next session" caveat.
  • onboarding/MAINTAINING.md — provenance row; agent files and the CLAUDE.global.md routing section must stay in lockstep.

Verification

End-to-end, not just self-report: a fresh Fable-5 headless session dispatching subagent_type: code-implementer ran the subagent on claude-sonnet-5 (read from the actual stream, not model introspection) — confirming the frontmatter pins the model and that routing is model-agnostic.

🤖 Generated with Claude Code

Add four Claude Code subagent role definitions (onboarding/agents/) and a
"Subagent model routing" rule so any-model mother sessions dispatch to a role
agent that pins its own model + effort, instead of ad hoc per-task choices:

- snippet-classifier -> haiku  (trivial mechanical work)
- code-implementer   -> sonnet (default well-scoped implementation)
- architecture-reviewer -> opus (design review / strategy)
- project-executor   -> fable  (large single-session missions)

The routing is model-agnostic: each role pins its model in frontmatter, so a
Sonnet/Opus/Fable/Haiku mother that dispatches code-implementer still gets
Sonnet. Verified end-to-end: a Fable-5 headless session dispatching
code-implementer ran the subagent on claude-sonnet-5.

CLAUDE.global.md gains the routing section under the existing subagent
preference; ONBOARDING step 8 symlinks the agents into ~/.claude/agents/;
MAINTAINING records the files and their lockstep with the routing section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alongd alongd merged commit 6a68d49 into main Jul 16, 2026
4 checks passed
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.

1 participant