Select a route by declared capabilities and selection criteria. If no route can handle the input, return unsupported rather than silently falling back to a generic answer.input_dispatchRECORD STATUSCandidate · v0.1.0UML class view
The proposed contract drawn as participant roles, received calls, and numbered dependencies.
Object interactions
The same roles and calls as a class collaboration and a numbered message sequence.
Pointcut
Where the mechanism applies. All four dimensions belong to the proposed match, not just its vocabulary.
- Context
- Multiple specialized agent or tool paths are available.
- Trigger
- New input must be sent to a destination.
- Structure
- Route schema, classifier or rules, dispatch result, and unsupported case.
- Effect
- One route is selected and its decision is attributable to input evidence.
Protected contract
The obligation that clients, operators, and auditors should be able to rely on.
- Requires
- Routes have declared capabilities and selection criteria.
- Ensures
- The selected route can handle the input or returns unsupported.
- Invariant
- Dispatch never loses the original request or silently invokes multiple exclusive routes.
- Violation
- Classifier error or ambiguous route has deterministic fallback or escalation.
Negative control
An if statement inside one prompt is not an observable routing contract.
Variation & lifecycle
The hot spot is admitted only where the protected semantics survive.
Permitted variation
LLM router, rules, handoff tool, nested graph, and default route.
Test obligation
Test each route, ambiguous input, unsupported input, and selection cost.
Evolution question
Did routing gain explicit alternatives and error handling?
Prompt + code design
An illustrative prompt and a small design sketch for the proposed contract. Names and APIs are invented; this is not a repository excerpt.
def route(request, routes):
candidates = [route for route in routes if route.can_handle(request)]
if not candidates:
return Unsupported(request.kind)
chosen = max(candidates, key=lambda route: route.confidence(request))
return chosen.dispatch(request)Illustrative design sketch. Routing evidence is the selected route's capability, not the router's confidence alone. This example is a teaching aid, not implementation evidence or a conformance claim.
Detection & matching
The frozen rule that retrieves this record, the canonical source exemplar, and the control that should stay unmatched.
- Join point
input_dispatch- Source locator
- Anthropic
- Lexical cue
(?i)\b(?:route(?:r|s|d|ing)?|dispatch[_-]?route|handoff[_-]?route)\bFrozen expression, v0.1.0. A match is a retrieval cue, not a confirmed implementation.- Aliases
- None
- Canonical exemplar
- openai/openai-agents-python
examples/agent_patterns/routing.py:10Support: examples/agent_patterns/README.md:21 - Negative control
- An if statement inside one prompt is not an observable routing contract.
Scope-anchored review. pohe-agent analyze <repo> --pattern W02 anchors the cue to its enclosing declaration and checks a separate operational signature for all four pointcut dimensions. Missing roles and negative-control risks remain visible; a structural match is not E2/E3. Calibration report ↗
Repository files
Up to five public files retrieved by the frozen cue and pinned to the audited commit. A match is a place to inspect, not a confirmed implementation.
examples/agent_patterns/routing.py:10CANONICAL SOURCE02aaif-goose/goosecrates/goose/examples/tetrate_auth.rs:1RETRIEVAL CUE03affaan-m/ECCskills/agent-self-evaluation/scripts/evaluate.py:103RETRIEVAL CUE04agno-agi/agnolibs/agno/agno/context/mcp/provider.py:179RETRIEVAL CUE05Aider-AI/aideraider/coders/udiff_prompts.py:51RETRIEVAL CUEEvidence & provenance
Each layer answers a different question. Do not substitute retrieval for review.
Source-located exemplar
A concrete source anchor is available for this proposed record. It is one exemplar, not evidence that all repositories—or every contract field—conform.
Review boundary: this candidate and its specification come from an AI-assisted study. Independent human validation remains open.
100.0% of repository families in the frozen panel have at least one current cue, historical cue, or canonical source layer. This is not confirmed prevalence.
Current lexical-cue repositories: 39 / 4186bd29878b30examples/agent_patterns/routing.py:10examples/agent_patterns/README.md:21Triage agent routes to specialized agents.
Exploratory retrieval cue Regex / v0.1.0
(?i)\b(?:route(?:r|s|d|ing)?|dispatch[_-]?route|handoff[_-]?route)\bThis expression is a discovery instrument only. A match is a retrieval cue—not a confirmed implementation, pointcut match, or contract proof.