Command Palette

Search for a command to run...

Назад к скиллам
скилл № 06185

pr-triage

Pure-discovery phase of the PR review pipeline. Runs the 12 inspection phases (orient through merge state), produces a machine-readable finding list at…

БесплатноЗапускает вложенные скрипты
CERTCCот CERTCC★ 22 звезды на GitHub

Установить pr-triage в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Skill: PR Triage

Purpose

Triage closes the finding list before any mutation occurs. Every inspection phase the mode selects (§ "Modes") runs to completion; then and only then is the artifact written and the comment posted. pr-execute reads the artifact — it never re-runs discovery.

Merge conflicts are discovered here (Phase 12) but re-checked authoritatively in pr-verify, because conflicts can appear after triage runs — either from execute's own fixes or from another PR landing on the base branch mid-pipeline. Triage's merge-state finding is a heads-up, not the gate.

Finding Severity

This skill uses the three-category system from .claude/skills/shared/completeness-doctrine.md.

Verdict Meaning Required action
FAIL Broken: won't work correctly, spec violated, changed behavior untested Must be fixed before merge
IMPROVE Works but incomplete: missing adjacent test, stale doc, obvious gap in scope Fix in the same session
NEW-ISSUE A finding that warrants its own record: an "also" excursion, or a premise inversion Apply the decision tree below (fix-now-file, defer-ask, or inversion-halt) — filing a record is not the same as deferring the work

Decision-Tree Outcomes

Each finding is tagged with one of four outcomes. Triage records the outcome but does NOT act on it — pr-execute acts. Fix-now is the default; the FILE decision and the DEFER decision are separate (see .claude/skills/shared/completeness-doctrine.md § "Filing Is Not Deferring").

Outcome Condition What execute does
fix-now Anything the agent can just do, and which is not an "also" excursion Fix inline, no issue filed — the diff is the record
fix-now-file An "also" excursion (fails the "also" test) that the agent still fixes now Fix inline and file an issue the PR closes (through create-issue); add a one-line "why"
defer-ask Work genuinely too big to finish now — must be earned with evidence Gate 1: file, present a measured remainder in plain language, ask. On silence, fix it now
inversion-halt The work inverts a premise from the issue or its backing specs/ADRs Gate 2: explain the overturned premise, ask if/what to file. On silence, halt the PR

The "also" test decides filing (breadth surprise): if explaining why you fixed both the original thing and the discovered thing needs the word "also," it is a genuine excursion → file it. If you can explain both in one sentence without "also," it is just doing the task → do not file; the diff is the record.

Depth cap: defer-ask is only legal for second-order findings (revealed while fixing an excursion). First-order findings (revealed by the original work) are always "just do it" — never defer-ask, apart from a missing test or check the task needs (completeness-doctrine.md § "Depth").

There is no new-issue-no-ask: silent deferral does not exist. There is no fix-now-expand-scope: size is not a constraint, so an "also" excursion that grows the PR is simply fix-now-file (see the doctrine § "Clarity Over Size").

Quick Start

# Triage the current branch's open PR
/pr-triage

# Triage a specific PR
/pr-triage 1234

# Pre-push review of the current branch (build Phase 7, in a fresh subagent)
/pr-triage --pre-push <issue> [<issue>...] --body <draft-body-file>

Modes

Every phase runs once per change: before the push on the reviewed diff, and after the push on what the PR adds to it (PAD-07-007, PAD-07-012, ADR-0139). The mode decides which phases run on which diff.

Mode When Phases Diff
pre-push --pre-push, from build Phase 7 1 (orient only), 2 (scope against the issues), 4–8, 9 (steps 1–4, and step 5's page determination), 10 origin/main...HEAD
delta prepush-delta.sh exits 0 on the PR branch, and the PR does not carry needs-rebase 1–3, 9 step 5's Docs: comparison, 11, 12; then 2 (scope), 4–10 on the delta files alone; then the carry-forward check below the delta files
full prepush-delta.sh exits 3 (for any cause PAD-07-008 lists, named in its reason=), or the PR carries needs-rebase 1–12 the PR diff

Choosing post-push. After Phase 1 identifies the PR, run bash .agents/skills/pr-triage/prepush-delta.sh origin/<base_ref> on the PR branch. Exit 0 means delta mode, with one delta_file= line per file to review; exit 3 means full mode, with reason= saying why. Exit 2 means the script could not compare (a detached checkout, jq missing, or no merge base with an unfetched base): fetch the base, check out the PR branch and re-run; if it still exits 2, run full mode and name the cause in the comment header. A needs-rebase PR is full mode whatever the script says: its conflict was resolved by hand after the review.

Carry-forward check (delta mode). For each pre-push finding, read its resolution

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • REFERENCE.md
  • prepush-delta.sh

FAQ

Что делает скилл pr-triage?

Pure-discovery phase of the PR review pipeline. Runs the 12 inspection phases (orient through merge state), produces a machine-readable finding list at .claude/pr-{number}-triage.json, and posts a human-readable PR comment. Makes NO code changes. Use as the first step of /pr-ship, standalone for a full finding inventory, or with --pre-push from build's fresh review subagent before a branch's first push; a PR with a pre-push record gets only the live-PR phases plus the delta.

Как установить скилл pr-triage?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл pr-triage запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить pr-triage с