Skip to content

v0.2.1 — automatic routing via PreToolUse hook

Latest

Choose a tag to compare

@dudupii dudupii released this 16 Jul 08:35

smart-dispatch v0.2.1 — routing is now automatic and transparent.

A PreToolUse hook intercepts every Agent call and rewrites the model in place via updatedInput. You never have to remember a command, and the model can't bypass it by calling the Agent tool directly.

What's new since v0.1.0

  • Automatic routing via a PreToolUse hook (hooks/route.mjs + hooks/hooks.json). Routing is no longer opt-in via the skill — it fires on every sub-agent dispatch. Explicit model choices are still respected as overrides.
  • Conservative heuristic classifier (src/classify-heuristic.js) — the hook only downgrades read-only Explore tasks; everything else stays on opus. The invariant "never lose quality to a routing mistake" holds.
  • Two paths, one policy — the automatic hook and the explicit /smart-dispatch skill share src/decide-model.js as the single source of truth and write to the same JSONL log, so /smart-dispatch-report reflects all routed activity.
  • Failure-safe — any error emits {} and exits 0; the hook never blocks or breaks a tool call.
  • More tests — 66 total, including an end-to-end test that spawns the hook binary with real PreToolUse payloads.

Note on v0.2.0

v0.2.0 shipped a malformed hooks/hooks.json that prevented the hook from registering (claude plugin details reported Hooks (0) — the hook never fired). v0.2.1 fixes the registration. If you installed v0.2.0, update:

claude plugin update smart-dispatch

Install

claude plugin marketplace add dudupii/smart-dispatch
claude plugin install smart-dispatch@smart-dispatch

Zero runtime dependencies · 66 tests · MIT licensed.