跳转到内容

triage

让 issue tracker 上的 issue 按照一套小型状态机流转,由不同角色处理。

如果仓库把外部 PR 也当作请求入口(见 issue tracker 配置),分类处理也包括这些 PR:PR 是附带代码的 issue,使用相同的角色、状态和流程,只是下面标注「针对 PR」的地方有少量不同。根据 tracker 配置,将单独的 #42 解析为 issue 或 PR。

分类处理期间,发到 issue tracker 的每条评论或 issue 都必须以这段免责声明开头:

> *This was generated by AI during triage.*

两种类别角色:

  • bug:功能出错
  • enhancement:新增功能或改进

五种状态角色:

  • needs-triage:维护者需要评估
  • needs-info:等待报告者补充信息
  • ready-for-agent:规格完整,适合交给可后台工作的代理
  • ready-for-human:需要人工实现
  • wontfix:不会处理

对于 PR,根据附带的代码来判断这些状态:ready-for-agent 表示已经附上简报,代理应该接着处理 diff;ready-for-human 表示已经可以由人工合并。

每个经过分类处理的 issue 都应恰好有一个类别角色和一个状态角色。如果状态角色互相冲突,先标记冲突,并询问维护者,再进行其他操作。

这些是规范角色名。issue tracker 实际使用的标签可能不同。标签映射应该已经提供给你。如果没有,请告诉用户运行 /setup-matt-pocock-skills。

状态转换:未标记的 issue 通常先进入 needs-triage;然后从这里转到 needs-info、ready-for-agent、ready-for-human 或 wontfix。报告者回复后,needs-info 会回到 needs-triage。维护者可以随时覆盖状态;遇到看起来不寻常的转换,先标记出来并询问再继续。

维护者调用 /triage,用自然语言描述需求。理解请求并采取行动。示例:

  • 「列出需要我关注的事项」
  • 「我们看看 #42」(issue 或 PR)
  • 「把 #42 移到 ready-for-agent」
  • 「哪些事项可以交给代理处理?」

查询 issue tracker,并按从早到晚列出三组:

  1. 未标记:从未分类处理。
  2. needs-triage:正在评估。
  3. needs-info 且报告者在最近的分类记录后有新活动:需要重新评估。

PR 也在范围内时,将外部 PR 纳入这些分组,并在每行标注 [PR] 或 [issue]。发现阶段只查找外部 PR(tracker 配置定义了谁算外部),因此协作者正在处理的 PR 不属于分类处理工作。这个筛选只用于发现;明确点名的 PR 无论作者是谁,都要进行分类处理。

显示数量和每项的一句话摘要。由维护者选择。

  1. 收集上下文。 阅读完整的 issue 或 PR(正文、评论、标签、作者、日期;PR 还要看 diff)。解析之前的分类记录,避免重复询问已经解决的问题。参考项目的领域术语表探索代码库,并遵循相关区域的架构决策记录(ADR)。对代码库做两项检查:(a) 重复检查:按领域概念搜索是否已有请求所需的行为,而不只是搜索请求中的措辞,并说明查找范围。如果已经实现,就作为「已实现」按第 5 步处理为 wontfix。(b) 先前驳回:阅读 .out-of-scope/*.md,指出其中是否有与此请求相似的记录。

  2. 提出建议。 说明建议的类别和状态,并给出理由;同时简要介绍与请求相关的代码库情况,包括是否已经实现。等待指示。

  3. 核实说法。 进行任何 grilling 前,先检查相关说法是否成立。对于 bug,按报告者给出的步骤重现问题。对于 PR,确认 diff 实现了所声称的功能:检出代码,运行相关测试或命令。报告核实结果:已确认(并说明代码路径)、未通过,或信息不足(这是支持 needs-info 的强信号)。核实确认能让代理简报更有依据。

  4. 深入追问(如有需要)。 如果请求还需要补充细节,调用 Skill 工具两次,分别用于「grilling」和「domain-modeling」,按轮次逐个提问,完善领域术语,并随着决定的明确同步更新 GLOSSARY.md 和 ADR。

  5. 落实处理结果:

    • ready-for-agent:发布一条代理简报评论(见 AGENT-BRIEF.md)。
    • ready-for-human:采用同样结构的代理简报,但说明为什么无法委派(判断取舍、需要外部访问、设计决策或人工测试)。
    • needs-info:发布分类记录(使用下方模板)。
    • 对于 wontfix,关闭 issue,并根据原因添加相应评论:
      • 已经实现:代码库中已经有这项改动。指出实现位置;不要写入 .out-of-scope/(该知识库用于被驳回的请求,不用于已实现的功能)。
      • 已驳回(bug):礼貌说明原因,然后关闭。
      • 已驳回(enhancement):写入 .out-of-scope/,在评论中链接到该记录,然后关闭(见 OUT-OF-SCOPE.md)。
    • needs-triage:应用对应角色。可选添加评论说明已有的部分进展。

如果维护者说「把 #42 移到 ready-for-agent」,就按要求直接应用该角色。先确认准备执行的操作(角色变更、评论、关闭),再执行。跳过深入追问。如果不经过深入追问就移到 ready-for-agent,询问维护者是否想写一份代理简报。

## Triage Notes
**目前已经确认的内容:**
- 要点 1
- 要点 2
**还需要你提供的信息(@reporter):**
- 问题 1
- 问题 2

把深入追问中已经解决的所有内容记录在「目前已经确认的内容」下,避免遗漏。问题要具体、可执行,不要只说「请提供更多信息」。

如果 issue 或 PR 上已有分类记录,先阅读记录,检查报告者是否回答了未解决的问题,并在继续前说明最新情况。不要重复询问已经解决的问题。

读者要自己输入 /triage 才会用到它。它在 Claude Code 插件里。

按角色和状态流转处理 issue 与外部 PR,核实问题或改动,必要时补充需求,并整理后续处理所需的信息。

Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
英文 SKILL.md
---
name: triage
description: Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
disable-model-invocation: true
---
# Triage
Move issues on the project issue tracker through a small state machine of triage roles.
If this repo treats external pull requests as a request surface (see the issue-tracker config), triage covers them too: **a PR is an issue with attached code**, using the same roles, same states, and same machine, with a few deltas marked "for a PR" below. Resolve a bare `#42` to an issue or PR per the tracker config.
Every comment or issue posted to the issue tracker during triage **must** start with this disclaimer:
```
> *This was generated by AI during triage.*
```
## Reference docs
- [AGENT-BRIEF.md](AGENT-BRIEF.md): how to write durable agent briefs
- [OUT-OF-SCOPE.md](OUT-OF-SCOPE.md): how the `.out-of-scope/` knowledge base works
## Roles
Two **category** roles:
- `bug`: something is broken
- `enhancement`: new feature or improvement
Five **state** roles:
- `needs-triage`: maintainer needs to evaluate
- `needs-info`: waiting on reporter for more information
- `ready-for-agent`: fully specified, ready for an AFK agent
- `ready-for-human`: needs human implementation
- `wontfix`: will not be actioned
For a PR, the same states read against the attached code: `ready-for-agent` means a brief is attached and an agent should take the next step on the diff; `ready-for-human` means it's ready for a human to merge.
Every triaged issue should carry exactly one category role and one state role. If state roles conflict, flag it and ask the maintainer before doing anything else.
These are canonical role names. The actual label strings used in the issue tracker may differ. The mapping should have been provided to you. If not, tell the user to run `/setup-matt-pocock-skills`.
State transitions: an unlabeled issue normally goes to `needs-triage` first; from there it moves to `needs-info`, `ready-for-agent`, `ready-for-human`, or `wontfix`. `needs-info` returns to `needs-triage` once the reporter replies. The maintainer can override at any time; flag transitions that look unusual and ask before proceeding.
## Invocation
The maintainer invokes `/triage` and describes what they want in natural language. Interpret the request and act. Examples:
- "Show me anything that needs my attention"
- "Let's look at #42" (issue or PR)
- "Move #42 to ready-for-agent"
- "What's ready for agents to pick up?"
## Show what needs attention
Query the issue tracker and present three buckets, oldest first:
1. **Unlabeled**: never triaged.
2. **`needs-triage`**: evaluation in progress.
3. **`needs-info` with reporter activity since the last triage notes**: needs re-evaluation.
When PRs are in scope, include external PRs in these buckets and tag each line `[PR]` or `[issue]`. Discovery surfaces only *external* PRs (the tracker config defines who counts as external), so a collaborator's in-flight PR is not triage work. This filter is discovery-only; an explicitly named PR is always triaged regardless of author.
Show counts and a one-line summary per item. Let the maintainer pick.
## Triage a specific issue or PR
1. **Gather context.** Read the full issue or PR (body, comments, labels, author, dates; for a PR, the diff too). Parse any prior triage notes so you don't re-ask resolved questions. Explore the codebase using the project's domain glossary, respecting ADRs in the area. Run two checks against the codebase: (a) **redundancy**: search for an existing implementation of the requested behavior by domain concept (not just the request's wording), and report where you looked. If found, it's an already-implemented `wontfix` (step 5). (b) **prior rejection**: read `.out-of-scope/*.md` and surface any that resembles this request.
2. **Recommend.** Tell the maintainer your category and state recommendation with reasoning, plus a brief codebase summary relevant to the request (including whether it's already implemented). Wait for direction.
3. **Verify the claim.** Before any grilling, check that the claim holds up. For a bug, reproduce it from the reporter's steps. For a PR, confirm the diff does what it claims: check it out, run the relevant tests or commands. Report what happened: confirmed (with code path), failed, or insufficient detail (a strong `needs-info` signal). A confirmed verification makes a much stronger agent brief.
4. **Grill (if needed).** If the request needs fleshing out, call the Skill tool twice, for "grilling" and "domain-modeling", and grill it into shape a round of questions at a time, sharpening domain terms and updating `GLOSSARY.md`/ADRs inline as decisions land.
5. **Apply the outcome:**
- `ready-for-agent`: post an agent brief comment ([AGENT-BRIEF.md](AGENT-BRIEF.md)).
- `ready-for-human`: same structure as an agent brief, but note why it can't be delegated (judgment calls, external access, design decisions, manual testing).
- `needs-info`: post triage notes (template below).
- For `wontfix`, close the issue, with the comment depending on *why*:
- **Already implemented**: the change already exists in the codebase. Point to where it lives; do **not** write to `.out-of-scope/` (that KB is for *rejected* requests, not built ones).
- **Rejected (bug)**: give a polite explanation, then close.
- **Rejected (enhancement)**: write to `.out-of-scope/`, link to it from a comment, then close ([OUT-OF-SCOPE.md](OUT-OF-SCOPE.md)).
- `needs-triage`: apply the role. Optional comment if there's partial progress.
## Quick state override
If the maintainer says "move #42 to ready-for-agent", trust them and apply the role directly. Confirm what you're about to do (role changes, comment, close), then act. Skip grilling. If moving to `ready-for-agent` without a grilling session, ask whether they want to write an agent brief.
## Needs-info template
```markdown
## Triage Notes
**What we've established so far:**
- point 1
- point 2
**What we still need from you (@reporter):**
- question 1
- question 2
```
Capture everything resolved during grilling under "established so far" so the work isn't lost. Questions must be specific and actionable, not "please provide more info".
## Resuming a previous session
If prior triage notes exist on the issue or PR, read them, check whether the reporter has answered any outstanding questions, and present an updated picture before continuing. Don't re-ask resolved questions.

非官方学习站,与 Matt Pocock 和 AI Hero 没有隶属关系。本站不提供可安装的中文技能包。

技能原文采用 MIT 许可。Copyright (c) 2026 Matt Pocock

鲁ICP备2025189036号