Pr triage

From OutThisLife/brooklyn-skills · View interactive version

Pr triage is an AI agent skill from the GitHub repository OutThisLife/brooklyn-skills. Maintainer triage on OTHER people's PRs/MRs — verdict of approve, supersede, or close, salvage with credit, close the cluster. Use for a review batch, a pasted Discord thread with a PR, or salvage/supersede/close asks. Not for your own PR (that's pr-ready).

How to use this skill

Skill file

PR Triage

Maintainer triage. Three real outcomes: approve, supersede (salvage +

credit + close the old one), or close (wrong premise). Verdict first; wait

for an explicit go before forge writes (approve / supersede / close / merge /

push). Use gh or glab.

Explicit review scope

Treat the user's stated outcome set as overriding the default taxonomy below. If they request approve or request changes only, review each MR on that basis: report concrete blockers as request changes, and do not consolidate, supersede, close, or implement a replacement. Keep the verdict-first / explicit-go boundary for forge writes.

Kickoff

Batch ("we will be reviewing…") or a pasted Discord/>>>…<<< thread with a PR:

  1. Figure out repo + forge. Skim AGENTS.md / CONTRIBUTING.md if present.
  2. Match this repo's worktree/branch naming by inspecting existing worktrees.
  3. Don't touch the primary checkout — use worktrees.
  4. Cluster the batch first (below), then verdict + salvage plan; wait for go

before forge writes.

Cluster the batch first (before per-PR verdicts)

More than one PR/issue in front of you? Group them by the fix they need

before you judge any single one. Multiple PRs on the same bug (or fragile

subsystem) are one consolidation, not N salvages.

  1. Map each PR/issue to the underlying fix and the files/subsystem it touches.
  2. Any two that fix the same bug class or the same subsystem → treat the

group as one super-PR: build the proper fix once, credit every

author (Co-authored-by + @handle), and supersede the whole cluster.

  1. Default to consolidation. Only keep PRs separate when the fixes are genuinely

independent (different bug class, different area, no shared code).

  1. State the grouping up front, e.g. #68665 + #63590 + #67603 → one super-PR,

then run the per-PR loop within each group to confirm premises.

Do not enumerate one verdict per PR when they share a fix — that's the lazy

shape. One cluster → one consolidated supersede.

Discord threads

A pasted thread is the intake. Don't make them restate a bare URL.

A support handoff with an owner/maintainer column is a shared board, not her queue. Take only rows

whose owner names her (alone or shared); list the rest as "not yours" with no forge writes, even when

the ask is a broad "help these out". Approving, merging, salvaging or closing another maintainer's

cluster is overreach she has to walk back.

  1. Pull out symptom, platform, linked PR/issue, what staff already said.
  2. Open those PRs; look for siblings on the same fix.
  3. Run the per-PR loop. Check the PR actually matches the reported bug.
  4. Draft a user reply only if useful — still wait for go before GH actions.
  5. No PR? Search open ones; if they want a new fix, follow that repository's

worktree workflow.

Issue-only closure audits

Issue audits with merged cross-references

For recommendation-only audits, preserve that boundary: no forge writes, even when a related PR is merged.

Forge cheatsheet

| Action | GitHub | GitLab |

|--------|--------|--------|

| View | gh pr view <N> | glab mr view <N> |

| Diff | gh pr diff <N> | glab mr diff <N> |

| Comment | gh pr comment <N> | glab mr note <N> |

| Review | gh pr review <N> --approve \| --request-changes | glab mr approve / note |

| Close PR/MR | gh pr close <N> | glab mr close <N> |

| Close issue | gh issue close <N> | glab issue close <N> |

git fetch origin pull/<N>/head:refs/remotes/origin/pr-<N>   # GitHub
# GitLab: glab mr checkout <N>

Per-PR loop

Run this within each cluster (see "Cluster the batch first"). If the group

consolidates, the salvage plan is shared and you supersede all of them into one

super-PR — don't emit a standalone salvage per member.

  1. Metadata + diff + existing reviews (gh / glab).
  2. Unaddressed #1 / lead maintainer comments → do not approve.
  3. Check the premise on current default branch (usually main).
  4. Cherry-pick/apply in a review worktree; run targeted tests this repo uses.
  5. Return a verdict:
**PR/MR:** [#N](https://…/pull/N)

**Verdict: approve | supersede | close-as-wrong-premise**

**Worktree:** `…` · `<branch>`

### Why
- …

### Checks
| Check | Result |
|---|---|
| Merges onto default branch | … |
| CI | … |
| Targeted tests | … |

### Next (after go)
- approve: …
- supersede: salvage plan (reuse X, drop Y, tests Z, credit @handle)
- close: wrong-premise comment outline

Pick the verdict (no soft exits)

| Situation | Verdict |

|-----------|---------|

| Idea + shape are fine | approve |

| Idea is right, shape is wrong (wrong helper/layer, missing tests for the bug class, contaminated, stale/conflicting, duplicate of another PR, ignored lead feedback) | supersede |

| Premise doesn't hold on current default branch | close-as-wrong-premise |

Anti-patterns — do not do these:

when the shape is already wrong → that is supersede. You salvage it.

for external PRs that need reshaping.

one consolidated super-PR that supersedes the cluster, credit all authors.

supersede (wrong helper, wrong layer, no bug-class tests). Note the open

question under Why if useful; still verdict supersede with the salvage

plan. Only block the verdict when you literally cannot tell whether the

reported bug is this codepath vs something else — and even then say what

evidence would flip it, don't default to "ask the author."

request-changes is not a triage verdict. It is only for **trusted /

internal authors with a single tiny nit** under Approve — never for

"please rebuild this correctly."

Trusted / internal authors

Infer from organization membership, team roles, prior maintainer behavior, or

the user explicitly identifying someone as a lead/internal contributor. If a

pr-triage-<repo> overlay skill exists for this repo, load it for the roster

and worktree layout.

| Who | Default |

|-----|---------|

| #1 lead | Prefer approve/merge. Don't supersede automatically. Never approve over their open review comments. |

| Other internal | Prefer approve. One tiny nit → ask them (request-changes). Needs a real rewrite → supersede (or they bounce it to you). |

| External | Normal bar. Idea right / shape wrong → supersede with credit. Never "ask them to rebuild it." |

When to supersede

Not enough alone: taste nits, optional follow-ups, "could be prettier."

Supersede (only after go)

This is the default salvage ritual — not a rare escalation.

  1. One salvage worktree for the whole cluster — not one per PR.
  2. Keep the good idea; drop junk; reuse existing helpers (don't re-ask the

author to). Check what already landed on the default branch first — part of

the cluster may already be fixed, so build only the residual gaps.

  1. Credit every author in the cluster: cherry-pick or Co-authored-by +

@handle for each in the body.

  1. Tests for the bug class; green.
  2. Open one new PR/MR: Supersedes #N, #M, … for all members;

Closes/Fixes only for issues it really fixes.

  1. Close the cluster (below).
  2. Run no-tropes on public comments.

Templates: reference.md.

Close the cluster

After supersede or a merge that kills siblings:

  1. Close every superseded/sibling PR/MR for that fix — comment Superseded by #<new>., then close.
  2. Close related issues this work actually fixed (Closes # on the new PR, or close by hand).
  3. Don't close issues for a different bug class.
  4. "Supersedes" does not auto-close other PRs — you close them.
  5. Audit asks → page recent supersedes/merges, close stragglers, report counts.

Approve (after go)

Before you stop (every item)

Run this checklist at the end of each PR/item — don't wait to be reminded:

super-PR, not enumerated as separate salvages.

"keep open — ask author" for reshape work).

tests, credit for every author) — ready for "go".

Merged-reference issue closure audits

When the user requests recommendations only, preserve that boundary: do not perform forge writes.

Reviewing issues with merged references

Auditing issues with merged references

Hard rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.