Skip to content

queen: route each task to the cheapest tier that can finish it, and escalate one tier on send-back #9972

Closed as not planned

Description

@gHashTag

Part of the dispatch roadmap epic #9976. Industry reference and the measured gap are below.

Every bee dispatch today uses the same agent setup regardless of the task. A port task (one Python file to one .t27) and compiler work cost the same, and a send-back retries with the setup that just failed.

Industry reference: FrugalGPT and RouteLLM cascades (cheap model first, escalate on low confidence) report large cost cuts at equal quality; production agent schedulers route by task class.

User Scenarios

  • As the Queen, I send a small port task to the fast tier and a compiler task to the strongest tier.
  • As the Queen, when a task comes back with a send-back, the retry goes one tier up instead of repeating the same attempt.

Requirements

  • task_class(domain, boundary_paths, est_lines) -> u8, tier_for(task_class, send_backs) -> u8, the tier ladder as named constants.
  • The top tier is used only after a send-back or for named classes.
  • The card names tiers, not vendors or prices.

Success Criteria

  • Tests: each class lands on its tier; every send-back moves exactly one tier up and never past the top.
  • Invariant: tier is monotonic in send-backs.
  • 0 surviving mutants.

Rules for the bee

Boundary

  • specs/queen/routing.t27
  • .trinity/seals/queen_QueenRouting.json

Activity

  1. added
    shape-refusedClosed by the issue-shape gate (specs/policy/issue_shape.t27); a passing edit reopens it
    on Oct 17, 2026
  2. github-actions commented on Oct 17, 2026

    @github-actions
    Contributor

    Closed by the issue-shape gate (specs/policy/issue_shape.t27, #7498): an issue must have the template's sections. Edit the body; an edit that passes reopens it.

    • missing: ## Requirements -- numbered obligations, FR-001: ... MUST ...
    • missing: ## Success Criteria -- an outcome a machine can settle: a number with a unit, a backticked file, exit 0, or a backticked command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    shape-refusedClosed by the issue-shape gate (specs/policy/issue_shape.t27); a passing edit reopens it

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions