π The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
ADR-389 β Refresh the Keyword Router Helper on Upgrade
Status: Implemented (3.44.0)
Date: 2026-09-23
Related: ADR-174 (signed helpers manifest), ADR-390 (semantic router embedder), ADR-391 (router benchmark gate), #2257, #3401, PR #3402
Surfaces: v3/@claude-flow/cli/src/init/helper-refresh.ts, v3/@claude-flow/cli/.claude/helpers/helpers.manifest.json
Context
Claude Code's prompt hook runs ~/.claude/helpers/hook-handler.cjs, which loads
router.js from the same directory (hook-handler.cjs:235) to label each prompt
with a suggested agent. That router matched keywords as substrings:
- "sync and review latest issues" β
testerat 0.8 - "are we usingβ¦" (typed as "uing") β
frontend-devviaui - "author" β auth, "prefix" β fix
The generator was fixed in #2257, and the remaining copies in PR #3402 (3.43.0). Installed copies never receive it. The copy on the maintainer's own machine is dated 2026-04-15, still matches substrings, and misrouted prompts throughout the 3.43.0 release session.
Why no install gets the fix: helper-refresh.ts only re-copies the helpers named
in CRITICAL_HELPERS (auto-memory-hook.mjs, hook-handler.cjs, intelligence.cjs,
statusline.cjs). router.js isn't on that list, and init skips files that
already exist. So once router.js is written, it's frozen.
The refresh already reaches the right place. It has a global pass for
~/.claude/helpers/, which the real CLI entry enables. The only gap is the list.
Decision
- Add
router.jstoCRITICAL_HELPERS. - Re-sign
helpers.manifest.jsonin the same release. The refresh is fail-closed and refuses any helper without a signed hash (ADR-174), so the list change and the re-sign must ship together. - Leave
router.js's behaviour unchanged here. This ADR is only about delivery; the word-boundary logic already shipped in 3.43.0.
Consequences
- Every existing install gets the word-boundary router on its next
ruflocommand, through the same signed, fail-closed path as the other four helpers. - A user who hand-edited
router.jswill have it overwritten. The same is already true ofhook-handler.cjs, and a hand-edited copy fails the hash check anyway. - The release checklist gains nothing new. The re-sign already happens every release, because the manifest is pinned to the package version.
- Risk: the concurrent-session helper overwrite described in CLAUDE.md now
covers one more file. Mitigation is unchanged:
git diff --statthe helpers immediately before signing.
Verification
- A unit test asserts
router.jsis inCRITICAL_HELPERSand in the signed manifest. - Pack the CLI, install it into a directory that has a stale April
router.js, run anyruflocommand, and check thatrouter.js "sync and review latest issues"no longer returnstester. scripts/verify-helpers.mjsreports 5 helpers.