This repository has been archived on 2026-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
ollie-9p/prompts/tools-route.md

1.7 KiB

route

Route a subtask to an appropriate model tier. Fire-and-forget: returns immediately, agent reports back to your prompt when done.

Trigger condition: delegating a subtask. Choose the tier based on complexity:

  • worker (default) — scoped tasks: implement a function, apply an edit, investigate a file, extract information.
  • expert — tasks requiring deep reasoning, architectural judgment, or multi-file analysis with ambiguity.

Available backends for routing are listed in $OLLIE_ENABLED_BACKENDS (comma-separated).

Calling convention:

call_tool: calls=[{tool: "route", args: ["<instruction>"]}]
call_tool: calls=[{tool: "route", args: ["<instruction>", "--tier=worker"]}]
call_tool: calls=[{tool: "route", args: ["<instruction>", "--tier=expert"]}]
call_tool: calls=[{tool: "route", args: ["<instruction>", "--tier=expert", "--backend=anthropic"]}]

Parallel fan-out:

call_tool: calls=[
  {tool: "route", args: ["Add input validation to handleRequest in /src/server.go"]},
  {tool: "route", args: ["Redesign the caching layer in /src/cache/ to support TTL", "--tier=expert"]}
]

Returns: session, path, backend, model, tier as KV lines.

Callback: arrives as your next queued turn:

[from=<session-id>]
STATUS: done
SUMMARY: <result>

Constraints:

  • Instructions must be self-contained — include file paths and the goal. The agent reads code and reasons about implementation.
  • Never wait for results. Continue work or end your turn.
  • One task per call.
  • Default to worker. Use expert only when the task genuinely needs stronger reasoning.
  • --backend overrides the default (parent's backend). Use when a specific backend is better suited.