Releases: dudupii/smart-dispatch
Release list
v0.2.1 — automatic routing via PreToolUse hook
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.
v0.1.0 — quality-first model routing
First release of smart-dispatch — quality-first automatic model routing for Claude Code sub-agents.
Every task gets the right model — default strongest, downgrade only when confidently trivial.
Highlights
- Quality-first routing — defaults to
opus; downgrades only whentier ∈ {Trivial, Routine}ANDconfidence ≥ 0.8. Never loses quality to a routing mistake. - Auto-triggering skill — routes before every sub-agent dispatch; respects explicit user model choices.
- Pro-mode workflow (
workflows/batch-route.js) — batch routing with budget-adaptive downgrade. - Observability — per-dispatch routing line + JSONL log (
~/.smart-dispatch/log.jsonl, tier/confidence/model/timestamp only — never task text);/smart-dispatch-reportcommand ornpm run reportfor aggregate stats. - Validated — eval over 50 labeled tasks:
falseDowngradeRate: 0,savingsRate: ~0.49. - Privacy — collects no data; no external calls (see PRIVACY.md).
- i18n — README in English, 简体中文, 繁體中文, 日本語.
Install
claude plugin marketplace add dudupii/smart-dispatch
claude plugin install smart-dispatch@smart-dispatchZero runtime dependencies · 49 unit tests · MIT licensed.