Skip to content

Releases: dudupii/smart-dispatch

v0.2.1 — automatic routing via PreToolUse hook

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.

v0.1.0 — quality-first model routing

Choose a tag to compare

@dudupii dudupii released this 16 Jul 03:07

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 when tier ∈ {Trivial, Routine} AND confidence ≥ 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-report command or npm run report for 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-dispatch

Zero runtime dependencies · 49 unit tests · MIT licensed.