route-task

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

route-task

route-task

Status: scaffold. Implementation lands in Phase 1 per
docs/specs/2026-04-30-multi-cli-orchestrator-design.md
.
Encapsulates the task-type → worker mapping so routing is debuggable and changeable in one place.
状态:scaffold。实现内容将根据
docs/specs/2026-04-30-multi-cli-orchestrator-design.md
在第一阶段落地。
封装了任务类型与worker的映射关系,使路由逻辑可调试且能在单一位置修改。

Routing rules (v1)

路由规则(v1)

  • Gemini CLI — large-context tasks: read whole repo, summarize, doc generation, second-opinion review.
  • OpenCode — mechanical implementation: refactors, test scaffolding, parallel subtasks.
  • Claude Code (self) — architecture, ambiguous tasks, post-review fixes, anything where judgment beats throughput.
  • Gemini CLI —— 大上下文任务:读取整个仓库、总结内容、生成文档、二次意见评审。
  • OpenCode —— 机械性实现任务:重构、测试脚手架搭建、并行子任务。
  • Claude Code(自身) —— 架构设计、模糊任务、评审后修复、所有需要判断力而非吞吐量的任务。

Subagent

Subagent

agents/claude-code/routing-judge.md
(Claude Code) and
agents/opencode/routing-judge.md
(OpenCode) — runs the routing decision in an isolated context so the orchestrator's main context stays compact. Registered as
route-task-routing-judge
after
scripts/install-agents.sh
runs.
agents/claude-code/routing-judge.md
(Claude Code)和
agents/opencode/routing-judge.md
(OpenCode)—— 在独立上下文环境中运行路由决策,确保编排器的主上下文保持精简。执行
scripts/install-agents.sh
后,该组件将注册为
route-task-routing-judge

Output

输出

worker: <claude|opencode|gemini>
rationale: <one sentence>
prompt: <the task prompt to pass to the worker>
The caller invokes the worker via
scripts/invoke-worker.sh <worker> "<prompt>"
.
worker: <claude|opencode|gemini>
rationale: <one sentence>
prompt: <the task prompt to pass to the worker>
调用者通过
scripts/invoke-worker.sh <worker> "<prompt>"
调用worker。