Skip to main content
rule CX Codex

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

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/task-grade-routing.md
Open on GitHub

What 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.md

The paths frontmatter field limits the files

Step 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

Similar IDE rules

All IDE rules for Code review and refactoring →

From the same set44

The whole set →
doc-updater doc-updater rebuilds README, guides and codemaps from the actual source after code changes. Useful once the docs have drifted away from the code. CX Codex ★ 880repo stars instinct-export instinct-export exports continuous-learning instincts into a shareable file for team members or migration across machines. CX Codex +1 ★ 880repo stars eval This command defines eval criteria, runs checks, and builds reports. Use it to track a feature’s capabilities and catch regressions against a baseline. CX Codex +1 ★ 880repo stars refactor-cleaner refactor-cleaner — a subagent that hunts down code nobody calls: unused files, exports and npm packages. Each hit gets a reference search before anything is deleted. CX Codex ★ 880repo stars frontend-code-review The frontend-code-review skill checks frontend files against a checklist and formats findings in a fixed review structure. Use it for pending changes or specific files you name. CX Codex +1 ★ 880repo stars instinct-import instinct-import pulls instincts from a file or URL, checks them against the ones you already have, and files the keepers with a note of where they came from. CX Codex +1 ★ 880repo stars database-reviewer database-reviewer — a Claude Code subagent for reviewing SQL migrations, schema types, and RLS policies in PostgreSQL and Supabase projects. It spots N+1 queries and runs EXPLAIN ANALYZE. CX Codex ★ 880repo stars observer observer — a background subagent that mines session observations for repeating patterns and saves each one as a short instinct rule with a confidence score. CX Codex ★ 880repo stars

Project sponsors

Companies that keep this analytics open