triage

triage is a command for Claude Code from tzachbon/smart-ralph. It costs 0 tokens per session (2,025 once invoked), scanned B, original, MIT.

A command that splits a large feature, called an epic, into several smaller software specifications. It records dependencies, meaning which pieces must be done before others, and the contracts between them.

In plain words
What is it for?
Use it to discover the work, create dependency-aware specs, define interfaces between them, and validate the decomposition with delegated agents.
Why use it?
It makes a large body of work easier to organize and helps separate related features without losing how they need to connect.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents; names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the ralph-specum plugin — 3 skills, 11 commands, 7 agents shipped together

Good fit Use it to discover the work, create dependency-aware specs, define interfaces between them, and validate the decomposition with delegated agents.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add tzachbon/smart-ralph
Claude Code
/plugin install ralph-specum

Made for: Claude Code.

Or install ralph-specum, the plugin that ships this one along with the rest of its 3 skills, 11 commands, 7 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for triage

README.md
[![agentmods](https://agentmods.dev/badge/commands/tzachbon/smart-ralph/triage/github.svg)](https://agentmods.dev/commands/tzachbon/smart-ralph/triage)
Your own site
<a href="https://agentmods.dev/commands/tzachbon/smart-ralph/triage"><img src="https://agentmods.dev/badge/commands/tzachbon/smart-ralph/triage/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for triage

Your own site · 80×15
<a href="https://agentmods.dev/commands/tzachbon/smart-ralph/triage"><img src="https://agentmods.dev/badge/commands/tzachbon/smart-ralph/triage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,025 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.02025
Opus 5.5 $0.00000 $0.00810
Sonnet 5.5 $0.00000 $0.00405
Haiku 4.5 $0.00000 $0.00202

Measured 1mo ago against content hash 1ca061baf318, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

triage scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

allowed-tools: "*"
plugins/ralph-specum/commands/triage.md · 195 lines

How it starts

The opening of the file, as written. The whole thing — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Epic Triage

Decompose a large feature into multiple specs with dependency graphs and interface contracts. You are a coordinator, not an implementer.

Checklist

Create a task for each item and complete in order:

  1. Parse mode -- recognize exact --quick or --interactive
  2. Check for active epic -- detect if resuming or creating new
  3. Handle branch -- check git branch, create/switch if needed
  4. Set up epic -- create .epic-state.json before discovery
  5. Run gates -- discover, preload, grill, and get approval
  6. Delegate triage -- gate explore, decomposition, and validation agents

Read ${CLAUDE_PLUGIN_ROOT}/references/normal-mode-gates.md first. If exact --quick and --interactive tokens both occur, stop with an error. Ignore -q, substrings, and natural-language quick requests.

Step 0: Parse Mode Tokens

Tokenize $ARGUMENTS. Recognize only exact --quick and --interactive tokens. If both occur, stop with: ERROR: --quick and --interactive cannot be used together. The aliases -q, substring matches, and natural-language requests do not select quick mode.

Step 1: Check for Active Epic

EPIC_FILE="./specs/.current-epic"
if [ -f "$EPIC_FILE" ]; then
  EPIC_NAME=$(cat "$EPIC_FILE" | tr -d '[:space:]')
  if [[ "$EPIC_NAME" =~ ^[a-z0-9]+(-[a-z0-9]+)*$ ]]; then
    EPIC_STATE="./specs/_epics/$EPIC_NAME/.epic-state.json"
  else
    EPIC_NAME=""
    EPIC_STATE=""
  fi
fi

If active epic exists: Read .epic-state.json and display epic status using the format from ${CLAUDE_PLUGIN_ROOT}/references/triage-flow.md (Epic Status Display section).

Normalize its mode with phase_gate.py mode before any possible question or resumed triage delegation. Exact --quick enables the quick guard from the active .epic-state.json; exact --interactive clears it; no flag resets legacy invalid quick state.

With exact --quick, do not ask how to handle the active epic. Resume it when no different epic name was supplied or when the supplied name matches. If the command supplies a different epic name and goal, create that epic. If the different name lacks a goal, stop with an input error. Do not call AskUserQuestion in any exact-quick branch.

Read the full file on GitHub · 195 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 195 lines · 0 tokens per session scan B 1ca061baf318

Subscribe to this mod's changes

triage is a command published in the GitHub repository tzachbon/smart-ralph (559 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,025 tokens. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.