Cascading review
By default every file in a PR gets the same deep review treatment. Cascading adds a triage step that classifies each file as skip, skim, or deep-review before the main review runs, so cheap files don’t consume the same token budget as critical ones.
| Tier | What happens |
|---|---|
skip | File is excluded entirely — lock files, auto-generated code, vendored deps |
skim | Lightweight single-pass review — diff-only context, no tools, simplified output schema (no suggestedFix, no ticket compliance) |
deep-review | Full review pipeline — tree-sitter context expansion, code search tools, consensus voting, ticket compliance |
Enabling it
Section titled “Enabling it”Set a triage model to enable cascading automatically:
RUSTY_LLM_TRIAGE_MODEL=anthropic/claude-3-5-haiku-20241022Or toggle explicitly:
RUSTY_CASCADE_ENABLED=true # force on (requires RUSTY_LLM_TRIAGE_MODEL)RUSTY_CASCADE_ENABLED=false # force off even if triage model is setHow it works
Section titled “How it works”- The triage agent receives a truncated version of each file’s diff (≤200 tokens per file, 30k token budget total) and classifies it
- Files that overflow the triage budget default to
deep-review - Files the triage model misses also default to
deep-review - Safety net: if triage classifies all files as
skip, the top 20% by additions are force-promoted todeep-review - Skim-tier and deep-tier files are reviewed in parallel
- Results from both tiers are merged, then passed through the judge (if enabled)
- If triage fails entirely, the bot falls back to the standard full-review pipeline
Summary comment
Section titled “Summary comment”When cascading is active, the PR comment includes a collapsible Triage Summary showing how many files were skipped, skimmed, and deep-reviewed, plus the triage model and token usage.
The triage call itself is cheap — truncated diffs and a small output schema. The savings come from skipping context expansion and tool calls for skim-tier files. For a typical PR where roughly 40% of files are config, docs, or tests, expect around 30–50% token reduction on the review calls.