/adev:routefrom adev
Scores tasks on a four-dimensional routing matrix (spec completeness, pattern coverage, blast radius, novelty) and recommends auto-agent, assisted-agent, or human-only execution. Use when deciding which tasks need human review or can run autonomously.
Ships in adev. 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.
Score each task in an implementation plan on four dimensions and recommend a routing mode: auto-agent (fully autonomous), assisted-agent (checkpoint at mid-point), or human-only (agent scaffolds, human implements). Decisions are persisted to the sibling <plan-stem>.routing.json sidecar — never into the plan body — and /adev:implement reads them from there to adjust execution behavior per task.
Announce at start: "I'm using the adev:route skill to score tasks and recommend routing."
--plan <path>: route all tasks in a plan file (required unless --task is used)--task <N>: route a specific task number from the plan (requires --plan)--dry-run: show scores and recommendations without writing the <plan-stem>.routing.json sidecarThe plan file must exist and follow the format produced by /adev:plan. If the plan does not exist, suggest running /adev:plan --spec <path> first.
Read the following files. Each informs the scoring decisions that follow.
The plan file: Read the plan at the path provided by --plan. Extract the list of tasks, their file targets, specialist tags, charter capability references, and dependency chains.
The spec: Read the Live Spec referenced in the plan header. Extract acceptance criteria, behavioral contracts, and error cases. The completeness of these elements feeds Dimension 1.
Constitution: Read .context-index/constitution.md. Extract architecture boundaries and non-negotiable principles. These inform blast radius assessment.
Manifest (specialists registry): Read .context-index/manifest.yaml. Note the specialists section and their trigger patterns. Specialist availability can improve pattern coverage scores.
Golden samples: Read .context-index/samples/ directory listing. For each sample, note its filename and the pattern it represents. Sample availability directly feeds Dimension 2.
Boundary rules: If .context-index/governance/boundaries.yaml exists, read it. Boundary crossings increase blast radius scores.
Risk policies: If .context-index/governance/risk-policies.yaml exists, read it. Risk levels inform whether override rules apply.
Load Skill Extensions: Load any skill extension instructions before proceeding:
adev skill-ext load --skill route
If the output is not __NONE__, incorporate it as additional standing instructions that apply to this skill's entire execution. Frame it as: "The following skill extension instructions apply to this invocation (source: installed domain extensions and/or project-level overrides)." If the output is __NONE__, continue normally.
For each task in the plan (or the single task specified by --task), compute four dimension scores. Each dimension is scored 1 through 5.
How well-specified is the task's expected behavior?
Scoring method: Read the spec sections relevant to this task. Count the acceptance criteria that map to this task. Check for behavioral contract language ("must," "shall," "returns," "throws"). Check for error case descriptions. Check for test expectations or examples.
How much precedent exists for this task's implementation pattern?
.context-index/samples/ that directly matches this task's pattern. The agent can follow the sample with minimal adaptation.Scoring method: For each task, identify the primary pattern (CRUD, component, service, middleware, migration, etc.). Search .context-index/samples/ for matching samples. If no sample matches, search the codebase for similar file patterns using the file paths in the task definition.
How many files and modules does the task touch? Lower blast radius scores higher.
boundaries.yaml.boundaries.yaml.Scoring method: Count the files listed in the task's "Files" section. Map each file to its module (top-level directory under src/ or equivalent). Check each file path against boundary rules. Check against constitution Architecture Boundaries for infrastructure-level changes.
How much creative problem-solving does the task require? Lower novelty scores higher.
Scoring method: Assess the task description and acceptance criteria. If the task maps cleanly to a single known pattern, score high. If the task requires combining patterns, integrating unfamiliar APIs, or making decisions the spec does not prescribe, score lower.
For each task, sum the four dimension scores to get a total (range: 4-20).
Routing thresholds:
| Total Score | Route | Meaning |
|---|---|---|
| 16-20 | auto-agent | Run without checkpoints. Agent can handle this independently. |
| 10-15 | assisted-agent | One human checkpoint per task (before production code under tdd, before review otherwise). May need context enrichment. |
| 4-9 | human-only | Agent generates scaffolding (types, test stubs, file structure) but human implements the core logic. |
Override rule: If any single dimension scores 1, force assisted-agent as the minimum routing regardless of total score. A score of 1 in any dimension indicates a significant risk factor that warrants human oversight.
Secondary override: Force assisted-agent as the minimum routing when the spec declares risk_level: high, or a task file matches a sensitive path: sensitive_paths.built_in or .configured from adev test-policy show (run once). risk-policies.yaml is keyed by risk level, not by file.
Alongside the routing mode, emit a rigor tier recommendation that the gate skills consume (graduated-rigor-tiers.spec.md). A task is "easy" — eligible for tier: quick — exactly when quickTierSignal(entry) in <ADEV_ROOT>/lib/implement/review-depth.mjs is true: it routes auto-agent and no dimension scores below 3 of 5 (each sidecar score ≥ 0.6). Otherwise recommend tier: full. quick narrows review/validation breadth but never skips a gate; when in doubt, recommend full. The consuming skills (/adev:review-specs, /adev:validate, /adev:build) receive this as --tier quick; the spec's declarative risk_level remains the fallback when routing has not run.
A different predicate, liteEligible(entry) in the same module, is the routing condition of /adev:implement's lite grant: it routes auto-agent or assisted-agent, and the dimension scores are not consulted. adev route emit-sidecar reports the count. Route's output is an eligibility signal, never an authorization: lite comes only from operator input, so route never passes --lite and never recommends it.
If --dry-run was NOT passed, persist the routing decisions to the sibling
sidecar file <plan-stem>.routing.json via the adev route emit-sidecar CLI
verb. The plan markdown body MUST NOT be modified by this skill. Routing
state is owned by the sidecar; plan files are read-only after /adev:plan
authored them (CON-8 in plan-task-events.spec.md; ADR-0012).
Normalize the dimension scores first. Steps 2 and 3 work in integers
1..5 (and a 4..20 total) because those are the units humans reason about.
The sidecar schema requires each dimension as a fraction in 0..1 (spec
Behavior 2), and adev route emit-sidecar rejects anything outside that range
with INVALID_ROUTING_ENTRY. Divide each dimension score by 5 before
emitting:
| Step 2 score | Sidecar value |
|---|---|
| 5 | 1.0 |
| 4 | 0.8 |
| 3 | 0.6 |
| 2 | 0.4 |
| 1 | 0.2 |
The 1..5 totals stay in the Step 5 chat summary; only the sidecar uses the
normalized 0..1 form.
Invoke the verb once per /adev:route run, passing the full entry list as a
JSON array on stdin. The verb performs an atomic temp-then-rename write and
surfaces SIDECAR_WRITE_FAILED on rename failure.
adev route emit-sidecar --plan <plan-path> <<'ENTRIES'
[
{
"task_id": "t1",
"selected_agent": "auto-agent",
"scores": {
"spec_completeness": 1.0,
"pattern_coverage": 1.0,
"blast_radius": 1.0,
"novelty": 0.8
},
"rationale": "Well-specified CRUD route with a direct golden sample match and minimal blast radius."
}
]
ENTRIES
(The example above is task t1 from the Step 5 summary table: spec 5, pattern
5, blast 5, novelty 4 — 19/20, routed auto-agent.)
Field contract (per spec Behavior 2):
| Field | Type | Notes |
|---|---|---|
task_id | string | Matches the plan's anchor (t1, t2, …) |
selected_agent | string | auto-agent / assisted-agent / human-only or a specialist slug |
scores | object | Four required dimensions, each 0..1 (Step 2 score ÷ 5): spec_completeness, pattern_coverage, blast_radius, novelty |
rationale | string | ≤ 400 chars; one short sentence explaining the recommendation |
The verb is writer-owned: a re-run fully replaces the prior sidecar. No history is preserved inside the sidecar; consult git history for prior runs.
--task <N> mode must merge before emitting. adev route emit-sidecar
replaces the whole sidecar with the array it receives on stdin — it does not
merge. When only one task was scored, emitting a one-entry array would discard
every other task's routing decision. So in --task <N> mode: read the
existing <plan-stem>.routing.json first (if it exists), take its entries
array, replace the entry whose task_id matches the routed task (or append
one if absent), and pass the complete merged array to emit-sidecar.
Leave the other entries byte-identical. When routing a whole plan without
--task, the scored set already covers every task, so pass it as-is.
Human-readable view. The sidecar is JSON (machine-primary). To inspect
routing decisions as a markdown table without jq, run
adev route render-sidecar --plan <plan-path> — it pretty-prints the
sidecar to stdout. The persisted file remains JSON; markdown is on-demand.
Exit codes:
0 — success; sidecar written1 — argument / JSON / schema error (INVALID_PLAN_PATH, INVALID_ROUTING_ENTRY)2 — SIDECAR_WRITE_FAILED (atomic rename failure; tmp path surfaced on stderr)Do not write **Routing:** / **Scores:** / **Rationale:** blocks into
the plan body. /adev:implement reads routing exclusively via
adev implement read-routing; inline blocks in the plan body will be
flagged by lib/plan-immutability.mjs as PLAN_MUTATED_WITHOUT_SIDECAR.
Present a summary table of all routed tasks. Persona adaptation: The format below is the default for the Developer persona; adapt the chat summary to the active persona's output rules. Verbosity is resolved separately across templates/verbosity/terse.md, templates/verbosity/normal.md, and templates/verbosity/deep.md: when the resolved verbosity is terse and this section carries a **Terse form:** block, that block is the section's declared rendering at terse verbosity. See skills/status/SKILL.md:12 for the full terse-form marker grammar and table-substitution recipe.
Task Routing Summary for <plan file>
| # | Task | Route | Score | Spec | Pattern | Blast | Novelty |
|---|------|-------|-------|------|---------|-------|---------|
| 1 | Create User model | auto-agent | 19/20 | 5 | 5 | 5 | 4 |
| 2 | Auth middleware | assisted-agent | 12/20 | 3 | 3 | 3 | 3 |
| 3 | Payment flow | human-only | 7/20 | 2 | 1 | 2 | 2 |
Route distribution: 5 auto-agent, 3 assisted-agent, 1 human-only
lite-eligible: <count> of <total>
Routing sidecar written to <plan-stem>.routing.json (plan file unchanged).
Fill the lite-eligible: line from the lite_eligible { count, total } field of the emit-sidecar output. Under --dry-run the verb is not called, so omit the line.
If any tasks are marked human-only, highlight them with specific guidance:
Human-only tasks requiring attention before /adev:implement:
Task 3: Payment flow (score: 7/20)
- Spec completeness: 2 — Missing acceptance criteria for refund edge cases
- Pattern coverage: 1 — No payment integration sample exists
Suggestion: Enrich the spec with /adev:specify, create a golden sample with /adev:sample
Task 7: Custom analytics engine (score: 6/20)
- Novelty: 1 — Research-grade problem, no clear solution path
Suggestion: Break into smaller subtasks or implement manually
Terse form: Renders the per-task routing table (task, route, score, and the four dimension scores), the route-distribution count line, the lite-eligible: <count> of <total> line, and the sidecar path <plan-stem>.routing.json, written alongside the plan; the plan file itself is unchanged. Substitutes the human-only guidance block with a count of human-only tasks and a pointer to that same sidecar path, which already carries each task's scores and rationale.
/adev:implement reads routing decisions from <plan-stem>.routing.json via
the adev implement read-routing --plan <path> --task-id <id> CLI verb. It
does NOT parse **Routing:** blocks from the plan body — those will be
ignored even if present (and flagged separately by the plan-immutability
detector).
When a task's selected_agent is resolved from the sidecar, /adev:implement
adjusts its execution behavior:
implementation_mode (under tdd: RED, GREEN, REFACTOR, COMMIT) without pausing.implementation_mode: under tdd, after the failing tests are written and before production code; under test-required and agent-default, after the implementer reports and before review. /adev:implement Step 2a defines it.describe/it blocks and placeholder assertions, and import statements. Present this as a manual task checklist for the human to implement. Do not implement the core logic.If the sidecar is missing when /adev:implement runs, the read verb exits
with ROUTING_SIDECAR_MISSING and instructs the operator to re-run
/adev:route against the plan. There is no silent fallback to inline
parsing.
If --dry-run is passed, perform Steps 1 through 3 (load context, score tasks, compute recommendations) and display the summary table from Step 5. Skip Step 4 entirely: do not invoke adev route emit-sidecar, and leave any existing sidecar in place. The plan file is never modified in either mode. This allows the user to preview routing decisions before committing them.
Dry run: routing scores computed but no sidecar written.
[summary table]
To write the routing sidecar: /adev:route --plan <path>
Terse form: This section's terse form governs the composed view; ## Step 5: Report to User's terse form applies only when Step 5 renders on its own. Renders the same per-task routing summary and route-distribution count Step 5 would render, states that no sidecar was written and none was disturbed, and renders the follow-on /adev:route --plan <path> invocation to write it.
Never:
auto-agent to a task with any dimension scoring 1/adev:plan authored it. Inline **Routing:**, **Scores:**, or
**Rationale:** blocks in the plan body are forbidden — they violate
CON-8 in plan-task-events.spec.md and the lib/plan-immutability.mjs
detector will surface them as PLAN_MUTATED_WITHOUT_SIDECAR. All routing
state lives in the sibling <plan-stem>.routing.json sidecar written via
adev route emit-sidecar.<plan-stem>.routing.json. The sidecar is writer-owned; modify
inputs to /adev:route and re-run instead.Tasks scored. The next step is /adev:implement.
If invoked via /adev:work, offer to continue: "Routing done. Continue to /adev:implement?" The user can stop here.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub agentic-development/adev-plugin --plugin adev31 skills in this plugin
/assessadev:assessAssess codebase readiness for agentic development. Scans the codebase using static file inspection and outputs maturity scores across 8 structural dimensions (raw mode) or 11 dimensions (adev mode). Use when you want to evaluate how well-suited a codebase is for AI-assisted development, identify improvement areas, or track progress over time./brainstormadev:brainstormExplore a feature idea interactively and produce a Feature Charter. Validates against constitution and existing charters. Use before building any new feature or module, when the user mentions a new capability, or says 'let us build X'./Other plugins' skills for the same job