一键导入
model-routing
Adds a model-selection overlay for issue DAG execution, recommending provider/model/thinking per issue from live harness capabilities.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Adds a model-selection overlay for issue DAG execution, recommending provider/model/thinking per issue from live harness capabilities.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Runs core mu operator workflows for bounded investigation, CLI-first state operations, and session handoffs. Use when general mu execution or state-management guidance is needed.
Meta-skill for core mu operating primitives. Routes to mu, programmable-ui, memory, tmux, and code-mode based on task shape.
Produces clear, argument-driven technical prose. Use when drafting or reviewing systems papers, design docs, READMEs, PR descriptions, error messages, API references, or other technical communication.
Builds and debugs mu_ui UiDocs with schema-valid payloads, interaction wiring, and status/snapshot verification.
Runs cross-store memory retrieval and index maintenance workflows with bounded filters and timeline anchors. Use when querying prior context or repairing memory index health.
Defines compositional control-flow policies for orchestration DAGs (for example review-gated retry loops) using protocol-preserving transitions.
| name | model-routing |
| description | Adds a model-selection overlay for issue DAG execution, recommending provider/model/thinking per issue from live harness capabilities. |
Use this skill when execution should choose different models for different issue kinds (for example code vs docs), while preserving protocol semantics.
route:model-routing-v1)Model-routing policies are overlays. They do not replace protocol semantics.
Examples:
Load these skills before applying model-routing policies:
protocol (protocol primitives/invariants)execution (durable execution runtime)heartbeats and/or crons (scheduler clock)mu (for /mu ui inspection commands and communication checks)control-flow (optional; when loop/termination overlays are also active)Overlay, don’t fork protocol
hierarchical-work.protocol/v1 + proto:hierarchical-work-v1.kind:*, ctx:*, issue lifecycle semantics, or DAG validity.Harness is source-of-truth
mu control harness --json.Recommend, then apply
Non-blocking by default
Bounded pass per tick
Per-issue/session overrides preferred
mu exec --provider/--model/--thinking or mu turn ... overrides.For protocol/runtime/schema/cross-adapter work, apply an explicit quality floor. Do not rely on implicit defaults.
Recommended high-stakes profile:
openai-codexgpt-5.3-codexxhighRequired guardrails:
--provider --model --thinking when launching workers.ROUTE_FALLBACK packet that explains the downgrade rationale.route:model-routing-v1)route:model-routing-v1kind:*, ctx:*, and flow:*.Recommended routing tags (policy metadata):
route:model-routing-v1route:task:coderoute:task:docsroute:task:researchroute:task:opsroute:task:reviewroute:task:synthroute:task:generalroute:depth:fastroute:depth:balancedroute:depth:deeproute:budget:lowroute:budget:balancedroute:budget:premiumroute:modality:image (omit for text-only)route:pin (exact provider/model comes from packet metadata)Notes:
Post one ROUTE_RECOMMENDATION packet to issue:<issue-id> before launching work
with a selected model.
Suggested packet shape (JSON block inside forum message):
ROUTE_RECOMMENDATION:
{
"version": "route:model-routing-v1",
"issue_id": "<issue-id>",
"harness_fingerprint": "<sha256>",
"selected": {
"provider": "<provider>",
"model": "<model>",
"thinking": "<thinking-level>"
},
"alternates": [
{ "provider": "<provider>", "model": "<model>", "thinking": "<thinking-level>" }
],
"constraints": {
"task": "code|docs|research|ops|review|synth|general",
"depth": "fast|balanced|deep",
"budget": "low|balanced|premium",
"modality": "text|image",
"min_context_window": 0
},
"rationale": [
"provider authenticated",
"supports required thinking level",
"meets context/modality constraints",
"best score under budget/depth policy"
],
"created_at_ms": 0
}
Optional root-level packet for custom preferences:
ROUTE_POLICY:
{
"version": "route:model-routing-v1",
"quality_profiles": {
"orchestration_critical": {
"provider": "openai-codex",
"model": "gpt-5.3-codex",
"thinking": "xhigh"
}
},
"task_preferences": {
"code": [
{ "provider": "openai-codex", "model": "gpt-5.3-codex", "thinking": "xhigh" }
],
"docs": [
{ "provider": "openrouter", "model": "google/gemini-3.1-pro-preview", "thinking": "high" }
]
}
}
If a preference entry is unavailable under current harness/auth state, skip it and continue deterministic fallback selection.
route:task:*, route:depth:*, route:budget:*, route:modality:image, route:pin)ROUTE_POLICY and per-issue constraints from forum/bodymu control harness --json)mu control harness --json --pretty
text and optional image)route:pin) if specifiedfast -> minimalbalanced -> mediumdeep -> xhigh if available, else highthinking_levels.Use deterministic score components (example):
ROUTE_POLICY/task family)Tie-breaker: lower estimated cost, then lexicographic provider/model.
selectedalternates (recommended N=2)ROUTE_RECOMMENDATION packetFor one-shot execution:
mu exec --provider <provider> --model <model> --thinking <thinking> \
"Use skills subagents, protocol, execution, model-routing, and mu. Work issue <issue-id> and keep routing visibility current via mu_ui."
For existing session turn:
mu turn --session-kind cp_operator --session-id <session-id> \
--provider <provider> --model <model> --thinking <thinking> \
--body "Continue issue <issue-id> with current routing selection."
Given an executable issue under route:model-routing-v1:
No routing decision yet
ROUTE_RECOMMENDATION packetRouting decision exists and still valid
Selected route fails at launch/runtime
ROUTE_FALLBACK, retry bounded onceAll alternates exhausted
ROUTE_DEGRADEDHard requirement unmet (no valid candidates)
kind:ask node (ctx:human, actor:user) requesting
provider auth/config change or constraint relaxationWhen planning a routed subtree:
route:model-routing-v1.ROUTE_POLICY preferences.protocol invariants:
mu issues ready --root <root-id> --tag proto:hierarchical-work-v1 --prettymu issues validate <root-id>Per orchestrator tick:
mu issues ready --root <root-id> --tag proto:hierarchical-work-v1 --prettymu issues validate <root-id>mu_ui (ui_id:"ui:subagents" when orchestration is shared, or ui_id:"ui:model-routing" when standalone).ORCH_PASS status update.Reusable heartbeat prompt fragment:
Use skills subagents, protocol, execution, model-routing, and mu.
For root <root-id>, enforce route:model-routing-v1.
Run exactly one bounded routing/orchestration transition pass: compute or validate
one issue's model recommendation from live `mu control harness` capabilities,
apply one action, keep route status current via mu_ui (`ui:subagents` or
`ui:model-routing`), verify DAG state, post one ORCH_PASS, then stop.
If validate is final, disable the supervising heartbeat and report completion.
Provider/model unavailable or auth drift
ROUTE_FALLBACKThinking level unsupported for selected model
No candidates satisfy hard constraints
kind:ask escalation with clear options:
Auditability requirement
ROUTE_RECOMMENDATION,
ROUTE_FALLBACK, ROUTE_DEGRADED)Use mu_ui as the primary communication surface for active model-routing
execution.
ui_id:"ui:subagents"ui_id:"ui:model-routing"metadata.profile.id: "subagents" or "model-routing"metadata.profile.variant: "status"metadata.profile.snapshot.compact|multilineactions: []).ui_id:"ui:model-routing:escalation").ORCH_PASS.mu_ui remove actions. Prefer remove over clear.ui:model-routing){
"action": "set",
"doc": {
"v": 1,
"ui_id": "ui:model-routing",
"title": "Model-routing status",
"summary": "issue=<issue-id> · selected=openai-codex/gpt-5.3-codex/xhigh · alternates=2",
"components": [
{
"kind": "key_value",
"id": "route",
"title": "Current route",
"rows": [
{ "key": "policy", "value": "route:model-routing-v1" },
{ "key": "issue", "value": "<issue-id>" },
{ "key": "selected", "value": "openai-codex/gpt-5.3-codex/xhigh" },
{ "key": "alternates", "value": "2" },
{ "key": "next", "value": "Launch worker with explicit overrides" }
],
"metadata": {}
},
{
"kind": "list",
"id": "recent",
"title": "Recent routing events",
"items": [
{
"id": "e1",
"label": "ROUTE_RECOMMENDATION posted",
"detail": "selected openai-codex/gpt-5.3-codex/xhigh"
},
{
"id": "e2",
"label": "fallback budget",
"detail": "openrouter/google/gemini-3.1-pro-preview/high"
}
],
"metadata": {}
}
],
"actions": [],
"revision": { "id": "model-routing-status", "version": 7 },
"updated_at_ms": 1772069500000,
"metadata": {
"profile": {
"id": "model-routing",
"variant": "status",
"snapshot": {
"compact": "selected=openai-codex/gpt-5.3-codex/xhigh · alternates=2",
"multiline": "issue: <issue-id>\nselected: openai-codex/gpt-5.3-codex/xhigh\nalternates: 2\nnext: launch worker"
}
}
}
}
}
ui:model-routing:escalation){
"action": "set",
"doc": {
"v": 1,
"ui_id": "ui:model-routing:escalation",
"title": "Routing escalation required",
"summary": "No authenticated model satisfies image + deep reasoning constraints.",
"components": [
{
"kind": "text",
"id": "question",
"text": "Routing is blocked by missing provider capability. Should execution wait for provider auth or run with degraded constraints?",
"metadata": {}
},
{
"kind": "list",
"id": "options",
"title": "Choices",
"items": [
{ "id": "opt-auth", "label": "Pause and authenticate provider" },
{ "id": "opt-degrade", "label": "Proceed with degraded route" }
],
"metadata": {}
}
],
"actions": [
{
"id": "wait-for-auth",
"label": "Wait for provider auth",
"kind": "primary",
"payload": {},
"metadata": { "command_text": "/answer wait-for-auth" }
},
{
"id": "approve-degraded-route",
"label": "Approve degraded route",
"kind": "secondary",
"payload": {},
"metadata": { "command_text": "/answer approve-degraded-route" }
}
],
"revision": { "id": "model-routing-escalation", "version": 1 },
"updated_at_ms": 1772069510000,
"metadata": {
"profile": {
"id": "model-routing-escalation",
"variant": "interactive"
}
}
}
}
{"action":"remove","ui_id":"ui:model-routing:escalation"}
{"action":"remove","ui_id":"ui:model-routing"}
Coding leaf selects deep coding model
route:task:code, route:depth:deep, authenticated coding provider.Docs leaf prefers writing model
route:task:docs with root ROUTE_POLICY preference for docs.Auth/provider drift fallback
ROUTE_FALLBACK packet and alternate selection in next bounded pass.Hard requirement escalation
kind:ask node created; downstream remains blocked until user action.