task-grade-routing — Claude Code rule: what it does, how to install
task-grade-routing sets documentation and review lane obligations for task sizes S, M, L, and XL based on workflow classification.
MIT ★ 880 updated 2026-09-03
.claude/rules/task-grade-routing.mdWhat task-grade-routing does
The rule maps task sizes from /workflow-classify to explicit preparation and verification gates. Minor S tasks need only in-session goals and one review lane on behavioral shifts. Grade M enforces a four-item micro-spec covering goal, non-goals, acceptance criteria, and tests. Larger tasks demand pre-code documentation alongside adversarial review.
Any touch to auth, payments, personal data, RLS policies, or secrets immediately starts at grade XL. API contract updates begin at grade L. Escalation moves only up. A crashed or silent reviewer never counts as passed validation, so the maker cannot sign off on its own code.
What it helps with
- map task sizes S through XL to mandatory documentation gates
- enforce independent review lanes for behavioral code changes
- lock auth, payments, and secrets changes into the XL grade
- reject self-approval when an assigned reviewer agent crashes
Example prompts for the agent
- Check the required spec format for grade M before writing code
- Confirm how many verification lanes this XL payment change needs
- Rerun verification because the previous review agent timed out
How to install task-grade-routing
Manually: put the files in place
.claude/rules/task-grade-routing.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/task-grade-routing.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/task-grade-routing.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/task-grade-routing.mdManually: put the files in place
.clinerules/task-grade-routing.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about task-grade-routing
How to install task-grade-routing in Claude Code?
Save the rule file to .claude/rules/task-grade-routing.md.
What does task-grade-routing do?
It dictates how much documentation to write and how many independent review lanes must approve a task based on its assigned grade.
Which changes automatically escalate to grade XL?
Auth, payments, PII, RLS policies, secrets boundaries, and irreversible deploys must start at grade XL regardless of size.
Source text
task-grade-routing.md · MIT
--- name: task-grade-routing load: always audience: team sensitivity: L1 category: verification critical: true description: Per-grade documentation and verification obligations for /workflow-classify's S/M/L/XL sizes — what to write before code, and how many independent lanes gate completion. --- # Task Grade Routing (CRITICAL) > Analogy: a building permit office doesn't ask for the same paperwork for a doorbell repair and a > load-bearing wall removal. The size of the job sets the size of the record. This rule maps > `/workflow-classify`'s S/M/L/XL sizes to that record, and to how many independent lanes have to > approve the change before it counts as done. ## The table | Grade | Documentation | Verification | |---|---|---| | S | No persistent docs. Keep goal, constraints and done-when inline for the session | Targeted check, plus 1 independent review lane on any behavioural change | | M | Micro-spec, 4 items: Goal / Non-goals / Acceptance / Test | Targeted check, plus 1 independent review lane on any behavioural change | | L | Permanent spec and plan, written and approved before code | 1 adversarial lane (`rules/adversarial-review.md`) | | XL | Full spec, decision record, rollout/rollback, and an approval gate before implementation | 2+ independent lanes: correctness plus the risk-specific angle | ## Escalation floor Regardless of size: - Auth, payments, PII, RLS policies, secrets boundaries, or irreversible deploys start at XL. - Non-destructive schema or API contract changes start at L. Escalate up, never down. A change that looks S but touches one of these is XL from the first draft, not XL after a downgrade gets caught later. ## Reviewer death is not a pass A checker that crashes, times out, or returns nothing has verified nothing, at any grade. Dispatch a fresh checker; the maker reviewing its own change is not a substitute for the reviewer that died. See `rules/adversarial-review.md`. ## Using this with /workflow-classify `/workflow-classify` sizes a task from repo signals. This rule answers what that size leaves open: what to write down, and how many independent eyes look at it before the change is done. The command's classification report prints both fields for the grade it assigns. ## Related - `commands/workflow-classify.md` — sizing procedure and pipeline recommendation - `rules/adversarial-review.md` — the three verdicts, and what checker independence means - `skills/review-loop/SKILL.md` — how the adversarial loop is actually run - `agents/adversarial-reviewer.md`, `agents/skeptical-auditor.md` — the checkers
© sangrokjung · MIT · sangrokjung/claude-forge