Skip to content

dev-team: effort-band model routing (task-size drives the model)#12

Merged
outofrange-consulting merged 4 commits into
mainfrom
claude/effort-band-routing
Jun 24, 2026
Merged

dev-team: effort-band model routing (task-size drives the model)#12
outofrange-consulting merged 4 commits into
mainfrom
claude/effort-band-routing

Conversation

@outofrange-consulting

@outofrange-consulting outofrange-consulting commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Applies the upstream effort-band routing idea (v7.0) without breaking our tier model or copilot-preset: the model is derived from the task size and pipeline phase, floored by the agent's tier. Write-up: docs/effort-band-routing.md.

Model (phase-aware bump-from-floor)

The effort goes into spec/plan, not the build — a complex task needs deep reasoning to design, and a solid plan makes implementation routine. The agent's model: tier is a floor; the task size raises the band only while planning:

sizeBand   = { trivial: small, standard: balanced, complex: deep }
bumpStages = [needs-plan]                      # /scope -> /specs -> /plan
effective  = (stage in bumpStages) ? max(floor, sizeBand[size]) : floor
  • Planning (needs-plan): a complex plan runs the architect + the 5 plan-review critics at deep.
  • Build/review (plan-approved): no bump — implementers and reviewers run at their floor (don't spend opus on mechanical work, and don't route every lexical reviewer on opus just because the task is complex).
  • Never below the floor → high-stakes deep agents (security/domain/arch-review, architect, security-engineer, codebase-recon) always hold at deep.
  • No signal / trivial / unscoped → the floor (backward-compatible).

How

  • model-routing.jsoneffortBand { ladder, sizeBand, bumpStages, enforcement }.
  • lib/shared.ts → pure effectiveBand(floor, size, stage); 11 phase-aware unit tests.
  • model-routing.ts → reads floor (agentModel) + size + stage (plan-gate); logs every dispatch; advisory warns (default), DEV_TEAM_EFFORT_ROUTING=enforce blocks, =off disables. /routing shows the effective band per floor for the current stage + size.
  • plan-gate.ts/scope records size (--trivial | --complex | standard); /plan-approve preserves it.

copilot-preset untouched (band picks a tier; modelRoles resolves the model).

Pre-existing routing debt cleaned up

  • The orchestrator Resolution Procedure described a Claude-Code hook (agent-model-resolve.sh, .claude/model-overrides.json, updatedInput, deny, a non-existent docs/model-routing.md + ADR 0004) the OMP extension never implemented → rewritten to reality + the new behavior.
  • 4 skills + agent-registry repointed off the stale hooks/agent-model-resolve.sh to the model-routing extension.
  • Left for a separate pass: the /model-routing-check exec block's deeper .claude/ debt (/routing is the accurate diagnostic; the skill now points to it).

Verified

ci-validate-json 23/23 · extensions compile · unit suite green (incl. 11 phase-aware effectiveBand cases) · no agent-model-resolve.sh refs remain.

🤖 Generated with Claude Code

claude added 4 commits June 24, 2026 16:01
Apply the upstream effort-band idea without breaking tiers or copilot-preset:
the model is derived from the TASK SIZE (trivial/standard/complex, from the
task-size-classifier, recorded by /scope), not only from a static per-agent
tier. The agent's declared tier is the BASE band; the size shifts it along
[small, balanced, deep].

- model-routing.json: new effortBand { ladder, effort shifts, protectDownshift,
  enforcement }.
- lib/shared.ts: pure effectiveBand(base, size, cfg) — clamp + deep-protected
  downshift; 11 unit tests.
- model-routing.ts: read base (agentModel) + size (plan-gate state); log every
  dispatch; advisory warn (default) / enforce block / off, via
  DEV_TEAM_EFFORT_ROUTING; /routing now shows the effective band per base for
  the current size.
- plan-gate.ts: /scope records size (--trivial | --complex | standard);
  /plan-approve preserves it.
- orchestrator Resolution Procedure: rewritten to reality (native base
  resolution + effort-band logger) and the new behavior, replacing the
  aspirational Claude-Code-hook description (updatedInput/deny/.claude paths/ADR
  that the OMP extension never implemented).

Decisions: aggressive downshift on trivial (all bases except a protected deep),
default advisory (orchestrator applies the rule; extension audits) so a
not-yet-updated caller isn't bricked. copilot-preset untouched (band picks a
tier; modelRoles resolves the model).

Cleanup: repointed 4 skills + agent-registry off the stale
hooks/agent-model-resolve.sh to the model-routing extension. (The
/model-routing-check exec block's deeper .claude/ debt is left for a separate
pass; /routing is the accurate effort-band diagnostic.)

Verified: ci-validate-json 23/23; extensions compile; unit suite green; no
agent-model-resolve.sh references remain. Write-up: docs/effort-band-routing.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YTWUxmz6d7hTuF7h8f2DvQ
Revise the effort-band model per the chosen design: the agent tier is a FLOOR
(never routed below it, so high-stakes deep agents hold); the task size picks a
target band (trivial->small, standard->balanced, complex->deep) and the effective
band = max(floor, target). No size signal -> floor (static). Replaces the earlier
shift-with-deep-protect model. Updated effectiveBand + 13 tests, model-routing.json
effortBand.sizeBand, extension terminology, orchestrator Resolution Procedure,
classifier note, config snippet, and the write-up.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YTWUxmz6d7hTuF7h8f2DvQ
Per the chosen design: the size raises the band only during planning
(stage=needs-plan: /scope -> /specs -> /plan); once the plan is approved,
build/review run at the agent floor (a solid plan makes implementation routine).
effective = (stage in bumpStages) ? max(floor, sizeBand[size]) : floor. Avoids
routing every lexical reviewer on opus just because a task is complex.

effectiveBand gains a stage arg + bumpStages config; model-routing reads stage
from plan-gate; 11 phase-aware tests; orchestrator/classifier/config/doc updated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YTWUxmz6d7hTuF7h8f2DvQ
@outofrange-consulting outofrange-consulting merged commit 01c4476 into main Jun 24, 2026
16 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.

2 participants