smart-dispatch v0.2.1 — routing is now automatic and transparent.
A
PreToolUsehook intercepts everyAgentcall and rewrites the model in place viaupdatedInput. 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
PreToolUsehook (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-onlyExploretasks; everything else stays onopus. The invariant "never lose quality to a routing mistake" holds. - Two paths, one policy — the automatic hook and the explicit
/smart-dispatchskill sharesrc/decide-model.jsas the single source of truth and write to the same JSONL log, so/smart-dispatch-reportreflects 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
PreToolUsepayloads.
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-dispatchInstall
claude plugin marketplace add dudupii/smart-dispatch
claude plugin install smart-dispatch@smart-dispatchZero runtime dependencies · 66 tests · MIT licensed.