route
Skill2 starsChanged 7 days agoMITView on GitHub
Decide whether a non-trivial task (code, research, writing, analysis or operations) should run as a plain session, a plain session plus an independent reviewer, or the multi-agent orchestrator pipeline. Use before starting a non-trivial task, or when asked "should I orchestrate this".
23 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- Innei/ryugitheir own version, first seen Nov 29, 2026
- tenaya-ui/claude-skillstheir own version, first seen Nov 29, 2026
- muhammadali-k/claude-skillstheir own version, first seen Nov 22, 2026
- medjbilou/claude-skill-routertheir own version, first seen Nov 22, 2026
- jbellsolutions/hermes-super-agenttheir own version, first seen Nov 15, 2026
- ypollak2/llm-routertheir own version, first seen Nov 14, 2026
Used with
Projects with it also use learn, plan and 2 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
genomewalkerSkilllearn
Learn from web sources, generate SKILL.md, and store key patterns in soul memory. Trigger keywords: learn, skill-gen, web-learn, documentation, tutorial.
Also in 3 projects that use this
BlockSkillplan
Draft a TDD, PRD, or lightweight plan in the conversation without committing it.
Also in 3 projects that use this
GoogleSkillprototype
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
Also in 3 projects that use this
MicrosoftSkillhandoff
Compact the current conversation into a handoff document for another agent to pick up.
Also in 3 projects that use this
Other versions23 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- 0xcvaliente/claude-code-orchestration★ 289% same
Wrote their own version · 22
- Innei/ryugi★ 1.1ksame name
- ypollak2/llm-router★ 131same name
- mehrad-dm/mastermind★ 23same name
- ItsssssJack/seven-skills★ 19same name
- purpleeddy/cladding★ 16same name
- gabriellst/codm★ 5same name
- dawidtomaszewskipl/route-skill★ 4same name
- jbellsolutions/hermes-super-agent★ 4same name
- jerseycheese/agent-skills★ 4same name
- xiaolongnk/SuperHarness★ 4same name
12 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- .claude/rules/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- orchestration-conventionsSkill
- skill-authoringSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 21 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
If ${ORCH_HOME:-$HOME/claude-code-orchestration} contains both package.json and node_modules, run the triager.
- Very specific: line 17
No shell reads the task text: --task-file makes the triager read the file itself, so quotes, backticks, $, several lines or a leading dash …
- Very specific: line 62
If the user disagrees with the route, follow their choice.
“Common” is measured: kept by at least 6 in 10 of the 21 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Size the task before doing it.
- Get the route.
If
${ORCH_HOME:-$HOME/claude-code-orchestration}contains bothpackage.jsonandnode_modules, run the triager.--repois the folder the task is about (any folder; a git repository is not required); substitute its absolute path for$TASK_DIR.First write the task to a file with your file-writing tool, never with a shell command: the text between the
<task>tags below, exactly as given, into a new file namedroute-task.txtin your session's scratchpad folder (if you have none, runmktemp -dand use the folder it prints). Substitute that file's absolute path for$TASK_FILE; the path never contains any of the task's words. Then run:(cd "${ORCH_HOME:-$HOME/claude-code-orchestration}" && CLAUDE_PLUGIN_DATA="${CLAUDE_PLUGIN_DATA}" npm run --silent route -- --repo "$TASK_DIR" --task-file="$TASK_FILE"); rc=$?; rm -f "$TASK_FILE"; (exit "$rc")No shell reads the task text:
--task-filemakes the triager read the file itself, so quotes, backticks,$, several lines or a leading dash are all just text. The command removes the file when it ends.<task>
$ARGUMENTS
</task>
It makes one cheap read-only model call and prints JSON: `mode`, `reason`, and the `facts` behind it (`filesToTouch`, `linesToChange`, `independentSlices`, `risky` and `code`). It also appends the decision to `routes.jsonl` in that folder's state dir: `.claude/state/` when the project registers the orchestration hooks itself, otherwise the plugin's per-user dir, so nothing is written into the folder.Otherwise (no checkout, e.g. a plugin-only install) size the task yourself. Skim the folder, then estimate five facts:
code: true when the task creates or changes source code, tests, build or CI configuration in a repository; false for research, writing, analysis, planning or operations whose output is documents, data, answers or commands run. It changes one rule of the mode, the file count in rule 4. It also decides whether step 2 uses git machinery and how you check the result; the test gate does not read it. When unsure, count it as code.filesToTouch: files the task creates or changes, of any kind (source, docs, reports, data, config).linesToChange: lines added or changed, prose and data included, new files included.independentSlices: parts separate workers could do at the same time with no shared output file and no dependency (modules, documents, or research questions combined at the end); 1 when sequential or small.risky: a wrong result is costly: security, authentication, payments, data migrations or deletion, public API changes, production operations (deploys, infrastructure, credentials), content sent or published outside the team, or several modules where a wrong change is costly.
Apply these rules in order, the same as
TRIAGEinsrc/config.ts:- risky, fewer than 2 independent slices, at most 3 files and at most 200 lines:
reviewed. - risky otherwise:
orchestrate. - 12 or more files:
orchestrate. - 2 or more independent slices and (10 or more files when
codeis true, 4 or more when it is false, or 1500 or more lines):orchestrate. An interface-first plan lets those slices run in parallel, where step 2 allows it, even across few files. - Otherwise
plain. A large but sequential change stays plain: one session keeps a coupled design in one context.
Thresholds: minParallelSlices 2, minParallelFilesCode 10, minParallelFilesNonCode 4, bigFiles 12, reviewedMaxFiles 3, bigLines 1500, reviewedMaxLines 200.
Then, if a route-recording tool is listed (
mcp__orchestration__route, ormcp__orchestration-dashboard__routewhen the standalone dashboard mod is loaded), call it once with the mode, the reason and the five facts so the orchestration pane shows the triage. If no such tool is listed, carry on.
- Tell the user
Route: <mode> - <reason, a few words>on one line, then act on it. Write to the user in short bullets or key: value lines: progress in one short line, only when something changed; a final report of at most 15 lines (plain and reviewed: what changed, the check and its result, what is open; orchestrate: one line per slice,<id>: pass|fail - <evidence pointer>, for code in githandoff: <branch> at <commit>orhandoff: none - <why>, then, when the hand-off made a branch,Next: type /ship(Next: type /stewardwhen a pull request for it exists), then what is open); more detail only when the user asks. Only code in a git repository uses git machinery (worktrees, the integrator, checkpoint commits, the hand-off, branch reports,git diffreviews). The test gate runs the tests whenever a test command exists (detected or configured) and skips them only for a prose-only change in a git work tree; it judges the changed files, nevercode. The review gate applies to every task.plain: do the task in this session. If it changed code, run the project's tests before saying it is done; otherwise check the result against the request (every requested item is there, and each claim is backed by a source you read).reviewed: do the task here, then haveorchestration:reviewercheck the result before reporting:git diff HEADfor code in a git repository, otherwise the files or answer you produced, with the request and what a correct result must contain.orchestrate: act as the orchestrator in this session. Ask at most 6 researcher questions, plan at most 12 slices with disjoint output files, delegate with the Agent tool toorchestration:researcher,orchestration:implementer,orchestration:reviewerandorchestration:integrator, and implement nothing yourself. Give each slice an acceptance check: the narrowest command that proves the slice for code (the tests of the files it owns), otherwise a checklist a reviewer can verify by reading the output and its cited sources. The test gate runs the project's whole suite when an implementer stops and the integrator runs it once more after the merge, so a brief never also asks a worker to run the whole suite: the integrator's brief is the one that names the project's whole suite. A hook checks every implementer launch: start each brief withSLICE: <id>,FILES: <files it owns, comma-separated>andDEPENDS: <slice ids it runs after, or none>, and before launching the first implementers of a plan with several slices send the plan toorchestration:reviewerin a brief that starts with PLAN REVIEW and wait for its report (only the light path, a single slice of at most 3 files and about 1,500 lines with nothing risky, skips the plan review, withPATH: lightin the brief). In that brief, put the task's hard requirements (MUST and MUST NOT rules, forbidden imports or dependencies, required formats, interfaces, limits) in aCONSTRAINTS:block ofC<n>: <text>lines, and write each slice as itsSLICE:,FILES:,DEPENDS:andGOAL:lines (the orchestration pane's progress bar reads them), plusRISKY: yeswhen it is risky andCHECKS: <ids>for the constraints its files can break. Implementer and reviewer briefs carry the slice'sCHECKS:line and the text of each constraint it names; workers answer each id (C1: pass (cmd) <command> -> <result>,C1: pass (read) <file:line or URL>orC1: fail <reason>). Those lines are optional: without them no constraint is tracked or gated and no slice counts as risky. A bug-fix slice carriesKIND: bugfix: its implementer writes a failing reproduction test before the fix. A researcher brief may start withSOURCES: <paths or URLs>andREAD: lookup|extract|judge; ask researchers to back facts read from files withQUOTE: <locator> | <verbatim text>lines. Review each slice as soon as its implementer returns, start each reviewer brief withSLICE: <id>, and addFOCUS: <what to check hardest>when a slice has a known risk. Reviewers list each gap asGAP: <0-100> <text>with their confidence. When a slice clearly needs an installed skill you know (a document skill for a .docx, .pptx, .xlsx or .pdf deliverable, a frontend skill for UI work, a security review skill for a risky auth change), addSKILLS: <comma-separated skill names>to that implementer, researcher or reviewer brief, each name exactly as the Skill tool lists it (anthropic-skills:docx,frontend-design,<plugin>:<skill>); never invent a name and never give one to the integrator. Load yourself at most two installed skills that shape the plan itself (domain rules, architecture, a threat model), since each loaded skill stays in your context; every other fitting skill goes to the workers by name. In the PLAN REVIEW brief a slice may carrySKILLS: <names>orSKILLS: none, and a RISKY slice always carries one of the two. The plan check may append suggested skills to those briefs; workers load each named skill with the Skill tool before starting and ignore one that does not fit (saying so in one line of the report, not under OPEN, since a non-empty OPEN is a doubt signal), and end the report withSKILLS-USED:andSKILLS-SKIPPED:lines. New skill: when no installed skill covers knowledge the task needs and that knowledge is reusable beyond this task, the plan may hold one skill slice per run; when a person can answer, propose it first (name, when it triggers, target, category) and wait for a yes, and in an unattended run do not ask. Its implementer brief addsKIND: skill,SKILL: <name>and, for the public repository only,TARGET: public, with FILES relative to the skills repository (skills/<name>/, README.md); it never runs withisolation: worktree, reportsDRAFT: <name> <branch>instead of BRANCH, and the integrator never merges it. Later slices that need it carryDRAFTS: <name>. If it fails for good, or the plan check blocks it withskill_create_offorskill_repo_missing, do the task without it and say so in the report; the report names the draft and its branch, and publishing it is a separate step a person runs.- Run scope: a run opens at the PLAN REVIEW (or the light-path implementer launch) and closes when every slice is final; a new prompt does not close it. While it is open the plan check blocks fork and built-in subagents (
builtin_agent_in_run) and implementers whose SLICE or FILES are not in the reviewed plan (not_in_plan); to change the plan, send the plan review again. - Escalation: a RISKY slice gets two
orchestration:reviewerlaunches in one message with the same brief, one with model "opus" and one on the default model; it passes only when both pass (second_review_required). Wait for both reports before you validate gaps or retry; a failing review from either goes through the retry below. A new attempt is reviewed by two fresh reviewers, never a resumed one. When a gap validation confirms no gap, its pass counts as one of the two: send one more fresh reviewer, with model "opus" when no pass of the attempt ran on opus. When a reviewer launch is refused withtests_failed_after_report, resume the implementer first and launch the two reviewers only after it has reported again. For other slices, when a passing review shows a doubt signal (any(read)answer, a non-empty OPEN, a retry, an isolated test failure, a test gate that gave up on the slice's latest attempt, or a failing review whose gaps are all below the cutoff, which counts as a pass with a doubt signal), send the slice to anorchestration:reviewerwith model "opus" before accepting it. The Stop gate enforces this (opus_review_required). For a slice that is not RISKY, when the opus review is certain before the review starts (a retry after a failed review, or the slice has checked constraints (aCHECKS:line) and no command can prove any of them, so every answer will be(read)), launch its one review on opus directly instead of a default-model review followed by an opus one; that review is the slice's review. On its first review, a slice with no checked constraints (noCHECKS:line) starts on the default model; a retry after a failed review still goes to opus directly. When in doubt whether a command can prove a constraint, start on the default model. - Retry and replan: a review fails on a failed checked id or a gap with confidence 80 or more. Before sending those gaps back, send them with the diff (or output files) to a fresh
orchestration:reviewerwhose brief starts withSLICE: <id>andVALIDATE: gaps(plus the slice's CHECKS line and constraint texts), and forward only the gaps it confirms; if it confirms none, its pass is the slice's review and the opus escalation for a retry applies. Send the confirmed gaps to the same implementer withSendMessage(the retry's review of a slice that is not RISKY runs on opus directly); for an isolated slice, check that the BRANCH in its resumed report equals the branch it reported before, and if it differs orSendMessagefails, start a fresh implementer on that branch's worktree. Run the third and last attempt as a freshorchestration:implementerwith model "opus", the full brief and the confirmed gaps; a slice whose review still fails then has failed for good. Then, or when a launch or the Stop gate blocks withreplan_required(two failing reviews of a slice in a row that report the same gap), do not retry: send one PLAN REVIEW brief with aREPLAN: 1line that plans only the missing work (new slice ids allowed; DEPENDS may name finished slices). When the Stop gate blocks withimplementer_unfinished(an implementer ran out of turns or was stopped before it finished, so nothing tested or reviewed its work), resume it withSendMessageso it finishes, or start a fresh implementer for the slice, then review the result; a partial result is never a finished slice. An implementer's report arrives before its test gate has finished: when a reviewer launch for its slice is refused withtests_failed_after_report, the tests failed after the worker reported, so resume that implementer withSendMessage(the refusal names its agent id), then review. At most one replan per run; report which slices it replaced. - Waiting: subagents run in the background and their results arrive as a new turn, so ending your turn to wait is fine, interactively and in
claude -p(it waits for background subagents before exiting).claude -pdoes not wait for background shell tasks, so never leave a Bashrun_in_backgroundtask running at the end of a headless run. Acompletednotification from a worker that already handed back its report is not a new report and needs no new review, retry or reply (a late shell task of its own woke it). The Stop review gate defers while a subagent or workflow is still running (agents_running). Never write the final report until every worker has reported. - Wave: at most 4 implementers run at a time. With more ready slices, launch 4 and start the next ready slice when one reports. A launch refused with
wave_fullmeans wait for a running implementer's report, then launch it again (in worktrees the plan check may allow fewer when the project's test suite is slow). - Code in a git repository: parallel slices use
isolation: worktreeandorchestration:integratormerges them. Before any parallel worktree wave, confirmworktree.baseRefis "head" in.claude/settings.json,.claude/settings.local.jsonor~/.claude/settings.json(worktrees otherwise branch from the remote default branch and miss local work); if it is not, run the slices one after another in the shared tree. If earlier shared-tree slices left uncommitted work, first sendorchestration:integratora brief starting with CHECKPOINT, a label and the files those slices own, and check theCHECKPOINT:field of its reply (a commit hash) before launching the wave; on fail or "none", run the wave sequentially instead. Every CHECKPOINT, merge and HANDOFF brief names the run's branch and head commit (the integrator stops on a mismatch); when the run's branch is the repository's default branch, a brief that makes the integrator commit or merge also names a new branch (such asorch/<short task words>), which the integrator creates first and which is the run's branch from then on; on the default branch, send that CHECKPOINT before a parallel wave even when no earlier slice left work, and on fail run the wave sequentially. - Hand-off (code in a git repository only): once every slice is final, send
orchestration:integratora brief that starts with HANDOFF and names the run's branch and head commit, a new branch that does not exist yet (such asorch/<short task words>), the exact files of every slice that passed (never a skill slice's) and a commit subject; it creates the branch, stages those files by name, commits, never pushes, and reportsBRANCH:andCHECKPOINT:. Skip it when the task says not to commit or when no slice passed. When the integrator could not create the branch (a headless run denies it), nothing is committed: the final report says the reviewed files are uncommitted and why. - Publishing is the person's: only the person starts
/ship, which pushes the hand-off branch, opens the pull request and watches CI (/stewardwatches an existing pull request). Never invoke/shipor/steward, or theship,ship-localorstewardskills. Pushing, pull requests and CI watching are/ship's by default; brieforchestration:integratorto push, open a pull request, merge, tag or create a release only when the person asked for exactly that in their own words in this session, and quote those words in its brief. - Code outside a git repository: worktrees are impossible, and the test gate runs the whole suite on the shared tree each time an implementer finishes, so parallel siblings would fail each other's gate. Run the slices one after another in the shared folder; nobody commits.
- Work that changes no code: slices run in the shared folder with no worktrees, no integrator and no commits. Slices with disjoint output files may run in parallel in one message without isolation; slices that depend on each other run one after another.
- Every deliverable is reviewed. If you write the answer yourself from the researchers' findings, no implementer runs and the Stop gate never fires, so send the draft and its sources to
orchestration:reviewerbefore replying (a secondorchestration:reviewerwith model "opus" when the answer is risky), and fix or flag what it reports. Small question: a question about the project that changes nothing and that at most 5 of your own Read, Grep or Glob calls can settle is answered directly, with a file and line reference for each fact and no researcher, and goes toorchestration:revieweronly when a wrong answer is costly.
Fixed-order option: the gated workflow
/orchestration:orchestrate(project copy:/orchestrate) runs the orchestrate route with its order fixed in code (plan with a constraints ledger, build, review with opus escalation, one replan, integrate). Only the user starts it: suggest it when a fixed order helps, never start it unasked.For an unattended run use
claude -p --agent orchestration:orchestrator.- Run scope: a run opens at the PLAN REVIEW (or the light-path implementer launch) and closes when every slice is final; a new prompt does not close it. While it is open the plan check blocks fork and built-in subagents (
- If the user disagrees with the route, follow their choice. The thresholds live in
src/config.ts(TRIAGE) in the orchestration repo.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

