/ruflo-intelligence:intelligence-route <task-description> [--why]from ruflo-intelligence
Routes tasks to the optimal agent and model tier (Haiku/Sonnet/Opus) using learned patterns and a 3-tier selector. Emits auditable routing rationale. Use before non-trivial tasks to replace manual agent selection.
Ships in ruflo-intelligence. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Pick the optimal agent + model tier for a task using learned patterns + the 3-tier router. Emits a hooks_explain rationale so the choice is auditable.
Before starting any non-trivial task. Replaces manual agent selection with data-driven decisions.
mcp__plugin_ruflo-core_ruflo__hooks_route with the task description. Returns { recommended, confidence, reasoning }.mcp__plugin_ruflo-core_ruflo__hooks_model-route for Haiku/Sonnet/Opus selection.mcp__plugin_ruflo-core_ruflo__hooks_intelligence_pattern-search to find prior successes.mcp__plugin_ruflo-core_ruflo__neural_predict with the task description for a confidence-scored prediction.--why was passed) — call mcp__plugin_ruflo-core_ruflo__hooks_explain to surface the routing rationale to the user.CLAUDE_FLOW_ROUTER_CENTROID=1) — after replacing its artifact (CLAUDE_FLOW_ROUTER_CENTROID_PATH), run npx @claude-flow/cli@latest neural wsp check via Bash. Exit 1 lists labels that no longer win on their own centroid (near-duplicates or a corrupt file); exit 2 means the optional ruv-FANN WSP packages are not installed.mcp__plugin_ruflo-core_ruflo__hooks_model-outcome with { task, model, outcome: "success"|"failure"|"escalated" } to train the router.| Tier | Handler | Latency | Cost | When |
|---|---|---|---|---|
| 1 | Deterministic codemod (TS compiler) | ~1ms | $0 | Structural transforms with no LLM: var-to-const, remove-console, add-logging |
| 2 | Haiku | ~500ms | ~$0.0002 | Low complexity (<30%), bug fixes, quick patches |
| 3 | Sonnet/Opus | 2–5s | $0.003–$0.015 | Complex reasoning, architecture, security, multi-file refactors |
When hooks_route returns [CODEMOD_AVAILABLE] for a deterministic intent (var-to-const, remove-console, add-logging), call mcp__plugin_ruflo-core_ruflo__hooks_codemod with the intent + file — it applies the transform via the TypeScript compiler at $0, no LLM. Note: add-types, add-error-handling, async-await require judgement and route to a model (Tier 2/3) per ADR-143; they are NOT $0 codemods. Agent Booster is a fast-apply merge engine for LLM-produced edits, not the Tier-1 path.
Closing the routing loop is mandatory:
# Success (task, model and outcome are all required; model is haiku|sonnet|opus)
npx @claude-flow/cli@latest mcp exec -t hooks_model-outcome -p '{"task": "fix the flaky retry test", "model": "haiku", "outcome": "success"}'
# The model was too small and the work moved up a tier: use "escalated"; use "failure" if it did not work out
npx @claude-flow/cli@latest mcp exec -t hooks_model-outcome -p '{"task": "fix the flaky retry test", "model": "haiku", "outcome": "escalated"}'
The router learns from these calls. Skipping them = no learning.
npx @claude-flow/cli@latest hooks route --task "description"
npx @claude-flow/cli@latest hooks pre-task --description "description"
npx @claude-flow/cli@latest hooks explain --task "description" --verbose
What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/intelligence-transferCopy learned patterns from another local project, or browse, download and publish patterns through the IPFS pattern marketplace. Use when a new project should start with patterns an older one already learned, or when sharing patterns with a peer./neural-trainTrain SONA + MicroLoRA neural patterns from successful task completions; runs the DISTILL + CONSOLIDATE phases of the 4-step pipelinenpx claudepluginhub ruvnet/ruflo --plugin ruflo-intelligenceOther plugins' skills for the same job