Use when explaining System V AMD64, ARM AAPCS, RISC-V psABI, stack frames, variadic calls, or FFI register rules. Not for the Rust FFI binding layer: use rust-ffi.
日本語の概要は準備中です。原文の説明を表示しています。
Use when the user invokes backlog triage for a GitHub repo's open issues and PRs. Not for proactive triage, non-GitHub trackers, or single bug issues: use github-bug-report-triage.
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
| Field | Bound contract |
|---|---|
| Trigger | The user explicitly invokes backlog triage for a GitHub repository's open pull requests and issues. |
| Authority | Remote: merges selected pull requests, closes evidenced resolved issues, and posts missing cross-links on GitHub; requires explicit human invocation. No write runs until the user approves the final set. Never triage proactively. |
| Side effect | After a complete approval gate, optionally merge selected ready pull requests, close evidenced resolved issues, post missing cross-links, and write local review or triage reports. Priority and size estimates are local-only and never posted to GitHub. |
| Done | All open items are classified; only the user-approved GitHub writes execute with per-action safety checks; unresolved items retain local-only priority and size estimates; and any requested local reports are saved. |
OWNER/REPO. Optional: a user-named bot auto-merge allowlist beyond the default dependabot and renovate; a display cutoff for the outstanding table (default 32); a user request to edit a PR body so a pending fix auto-closes its issue on merge.gh must be authenticated (gh auth status). The resolved OWNER/REPO is validated against ^[A-Za-z0-9._-]+/[A-Za-z0-9._-]+$ before any gh -R "$REPO" call.Select the target repository. Run gh auth status, git rev-parse --is-inside-work-tree, git remote -v. A remote is GitHub-hosted when its URL host is github.com (https://github.com/OWNER/REPO(.git), git@github.com:OWNER/REPO(.git), or ssh://git@github.com/OWNER/REPO(.git)). Normalize each to OWNER/REPO and de-duplicate. Exactly one distinct GitHub repo: use it without prompting. Zero (not a git repo, or no GitHub remote): ask the user for OWNER/REPO. More than one: ask the user to pick. For GitHub Enterprise, ask for OWNER/REPO and rely on the user's GH_HOST/gh host config; confirm the resolved repo back before continuing. Store REPO="OWNER/REPO" and pass -R "$REPO" to every gh call. Done when: REPO is set to a validated OWNER/REPO matching the required pattern, gh auth status exits 0, and every subsequent gh call passes -R "$REPO".
Gather issues and context. Fetch open issues, open PRs, and recently merged PRs: Done when: open issues, open PRs, and recently merged PRs are fetched as JSON, the default branch is resolved from the repo, and resolution signals are gathered from closingIssuesReferences and default-branch commits.
gh issue list -R "$REPO" --state open --limit 1000 --json number,title,body,labels,assignees,comments,reactionGroups,createdAt,updatedAt,url
gh pr list -R "$REPO" --state open --limit 1000 --json number,title,body,author,isDraft,reviewDecision,latestReviews,mergeable,mergeStateStatus,statusCheckRollup,labels,createdAt,headRefName,url,closingIssuesReferences
gh pr list -R "$REPO" --state merged --limit 300 --json number,title,body,mergedAt,url,closingIssuesReferences
closingIssuesReferences is the strongest resolution signal (populated by GitHub closing keywords or a manual UI link). For issues it does not cover, search default-branch commits. Resolve the default branch authoritatively from the repo, not from local origin/HEAD:
default_branch=$(gh repo view "$REPO" --json defaultBranchRef --jq .defaultBranchRef.name)
git log --oneline "origin/$default_branch" | grep -iE "(close|fix|resolve)[sd]? +#<N>([^0-9]|$)"
Triage open pull requests when any are open. Summarize them and ask whether to handle PRs now or skip to issues, then follow references/pr-triage.md, which covers classification, incremental merges, review subagents, and per-item approved actions (staleness comments, closes, reviewer requests, status comments, labeling) executed only on per-item user approval. After merges, re-fetch the step-2 merged-PR list before classifying issues. Done when: every open PR is classified, approved merges landed one at a time with re-verification, opted-in reviews remain read-only, and every per-item write action ran only after its own approval.
Classify each open issue into exactly one bucket. Done when: every open issue is placed into exactly one bucket (Already resolved, Pending PR, or Outstanding), and each bucket assignment carries its evidence or stated lack thereof.
closingIssuesReferences or references #N with a closing keyword (strongest); a default-branch commit references #N with a closing keyword; or the behavior the issue asks for demonstrably exists in the current code, verify by reading the relevant code, do not assume; a different or partial implementation does not resolve it. Proposed write: close with a comment naming the resolving PR/commit:
gh issue close <N> -R "$REPO" -c "Resolved by #<PR> (<short reason>). Closing as the change is now on $default_branch."
closingIssuesReferences includes the issue; the issue body/comments link the PR; or an open PR clearly fixes the same thing. The goal is that issue and PR reference each other; fill only genuine gaps, prefer non-destructive writes. No reference in either direction: post a pointer comment on the side that lacks it (gh issue comment <N> -R "$REPO" -b "A fix is in progress in #<PR>.", a mention creates a cross-reference GitHub mirrors into the other's timeline). Already linked in at least one direction: record "already linked: no action". Do not edit the PR body unless the user explicitly wants auto-close-on-merge. A comment establishes a reference but does not trigger auto-close; only a closing keyword in the PR body or a commit message does. When the user opts in, never clobber the description: re-fetch the body immediately before editing and pass it via stdin so untrusted PR text never transits a shell-interpolated string:
body=$(gh pr view <PR> -R "$REPO" --json body --jq .body)
printf '%s\n\nCloses #%s\n' "$body" "<N>" | gh pr edit <PR> -R "$REPO" --body-file -
Do not duplicate links that already exist.Score outstanding issues (LOCAL ONLY). Priority is Critical/High/Medium/Low, weighing impact/severity (security, data loss, crash, correctness above enhancements; docs/cosmetic lowest; existing security/bug/crash/regression labels are strong signals), reach, signal (reactions, duplicate reports, age with continued activity), and urgency (blocks a release, deadline, active regression). Change size is a size/* T-shirt bucket from estimated total changed lines (additions + deletions, ignoring generated/vendored files), using Kubernetes/Prow thresholds: size/XS 0-9, size/S 10-29, size/M 30-99, size/L 100-499, size/XL 500-999, size/XXL 1000+. Estimate by reasoning about the codebase; open the implicated files before estimating rather than guessing from the title. Show estimated lines and files touched plus a one-line basis of estimate. When an issue is too vague or needs design/investigation before sizing, mark it unsized — needs investigation instead of guessing. Size measures volume, not difficulty; when a small change is genuinely hard, add a short complexity caveat. Never post priority, size, or the basis of estimate to GitHub. Done when: every outstanding issue carries a priority label, a size T-shirt bucket, an estimated lines-files count, and a basis-of-estimate note, all local-only and never posted to GitHub.
Present the full triage for approval. Render one view with three sections: proposed closes (writes to GitHub, with evidence and draft comment), proposed cross-links (writes to GitHub, with gap and proposed action), and outstanding issues (LOCAL ONLY, never posted, with Priority/Size/Est. lines-files/Basis), plus a summary count. Ask for approval: approve all proposed writes; revise first; or skip writes (local report only, no GitHub changes). If revise, iterate conversationally, let the user drop closes, downgrade weak evidence to "leave open / needs review", edit draft comments, adjust cross-links, re-present and ask again. Loop until the user approves the final set. Execute nothing until then. Done when: the triage view is rendered with proposed closes, proposed cross-links, and outstanding issues, and the user has approved, revised, or skipped writes; no write executes before approval.
Execute approved issue writes. Run each approved write as a separate command so one failure does not block the rest; report each outcome and continue past failures. Done when: each approved write runs as a separate command, each outcome is reported, and failures do not block the remaining writes.
Deliver the outstanding triage. Let K be the number of outstanding (Bucket C) issues. K <= 32: render the outstanding table directly. K > 32: offer to save to disk instead of printing a large table; when saving, write github-triage-OWNER-REPO-YYYYMMDD.md (date from date +%Y%m%d, current directory unless the user specifies a path) containing the summary plus the full outstanding table sorted by priority then size; confirm the saved path. The threshold governs display, not coverage; triage every open issue regardless. Done when: every open issue is triaged regardless of the display cutoff, the outstanding table is rendered or saved to github-triage-OWNER-REPO-YYYYMMDD.md when K exceeds 32, and the saved path is confirmed.
OWNER/REPO validation rejects it before any gh call; no command is constructed from untrusted input.--body-file - (stdin) or -F, never inline in --body "...", so backticks or $(...) in third-party text cannot execute.mergeable == "UNKNOWN"), the merge did not land, or any required check is not green: stop, report, do not force, --admin, --auto, or skip a check. Continue to the next independently-approved write only after reporting.gh is not authenticated, no GitHub remote resolves and the user supplies none, or the user declines approval, return the local-only classification and estimates with no GitHub writes performed. Never swallow an error or pretend the done predicate holds.A complete triage of every open issue and PR for OWNER/REPO: each PR categorized (mergeable bot / approved & ready / never reviewed / needs work) with any merges executed one at a time with per-merge re-verification; each issue classified into Already resolved / Pending PR / Outstanding; approved closes and cross-links executed as separate commands with per-action reporting; outstanding issues carrying local-only priority, size, estimated lines/files, and basis; optional github-pr-<number>-review.md files for reviewed PRs; and, when the outstanding table exceeds the display cutoff, a saved github-triage-OWNER-REPO-YYYYMMDD.md report. Priority, size, and basis of estimate are never posted to GitHub.
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Use when explaining System V AMD64, ARM AAPCS, RISC-V psABI, stack frames, variadic calls, or FFI register rules. Not for the Rust FFI binding layer: use rust-ffi.
日本語の概要は準備中です。原文の説明を表示しています。
Use when configuring ADC sampling time, DMA-driven ADC, calibration, or DAC channel setup on bare-metal MCUs. Not for the DMA stream itself: use dma-baremetal.
日本語の概要は準備中です。原文の説明を表示しています。
Use when creating AF_XDP sockets, configuring UMEM and XSK rings, writing an XDP redirect program, or choosing copy versus zero-copy mode. Not for full kernel bypass: use dpdk.
日本語の概要は準備中です。原文の説明を表示しています。
Use when a completed session needs an agent-environment retrospective. Not for an engineering retrospective from telemetry: use engineering-retrospective.
日本語の概要は準備中です。原文の説明を表示しています。
Use when a redacted, trimmed agent transcript must be appended to a GitHub PR or issue body, with human approval and preview. Not for automated or model-initiated insertion.
日本語の概要は準備中です。原文の説明を表示しています。
Use when a repo needs agent setup, AGENTS.md added or made lean, CLAUDE.md audited, or agent instructions scored or pruned. Not for remote, credential, publish, deploy, or irreversible changes.
日本語の概要は準備中です。原文の説明を表示しています。