# Triage

让 issues 和 external PRs 通过一组 triage roles 状态机，分类、验证、必要时 grilling，并写出 agent-ready briefs。

- Repository: https://github.com/vinvcn/mattpocock-skills-zh-CN (5461 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-28
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add vinvcn/mattpocock-skills-zh-CN --skill triage -g -a claude-code -y`
Codex: `npx skills add vinvcn/mattpocock-skills-zh-CN --skill triage -g -a codex -y`
Cursor: `npx skills add vinvcn/mattpocock-skills-zh-CN --skill triage -g -a cursor -y`
Gemini CLI: `npx skills add vinvcn/mattpocock-skills-zh-CN --skill triage -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add vinvcn/mattpocock-skills-zh-CN`

## Description

让 issues 和 external PRs 通过一组 triage roles 状态机，分类、验证、必要时 grilling，并写出 agent-ready briefs。

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Triage

通过一组小型 triage roles state machine，在项目 issue tracker 中移动 issues。

如果这个 repo 把 external pull requests 当作 request surface（见 issue-tracker 配置），triage 也覆盖它们：**PR 是带附加代码的 issue**，相同的 roles、相同的 states、相同的 machine，只有下面标记为 “for a PR” 的几处差异。按 tracker 配置把裸 `#42` 解析为 issue 或 PR。

Triage 期间发布到 issue tracker 的每条 comment 或 issue **必须**以此 disclaimer 开头：

```
> *This was generated by AI during triage.*
```

## 参考文档

- [AGENT-BRIEF.md](AGENT-BRIEF.md)：如何写持久可用的 agent briefs
- [OUT-OF-SCOPE.md](OUT-OF-SCOPE.md)：`.out-of-scope/` knowledge base 如何工作

## Roles

两个 **category** roles：

- `bug`：某个东西坏了
- `enhancement`：新功能或改进

五个 **state** roles：

- `needs-triage`：maintainer 需要评估
- `needs-info`：等待 reporter 提供更多信息
- `ready-for-agent`：已完整说明，准备给 AFK agent 接手
- `ready-for-human`：需要人工实现
- `wontfix`：不会处理

对 PR 而言，相同的 states 对照附加代码来解读：`ready-for-agent` 表示已附加 brief、agent 应对 diff 采取下一步；`ready-for-human` 表示已准备好由人类 merge。

每个已 triage 的 issue 应该刚好携带一个 category role 和一个 state role。如果 state roles 冲突，标记出来并先询问 maintainer，再做其他事。

这些是 canonical role names；issue tracker 中实际使用的 label strings 可能不同。映射应该已经提供给你；如果没有，请让用户运行 `/setup-matt-pocock-skills`。

State transitions：未标记的 issue 通常先进入 `needs-triage`；之后移动到 `needs-info`、`ready-for-agent`、`ready-for-human` 或 `wontfix`。`needs-info` 在 reporter 回复后回到 `needs-triage`。Maintainer 可以随时 override；对看起来异常的 transitions 标记并在继续前询问。

## 调用

Maintainer 调用 `/triage`，并用自然语言描述想要什么。解释请求并行动。示例：

- "Show me anything that needs my attention"
- "Let's look at #42"（issue 或 PR）
- "Move #42 to ready-for-agent"
- "What's ready for agents to pick up?"

## 展示需要关注的内容

查询 issue tracker，并按最旧优先展示三个 buckets：

1. **Unlabeled**：从未 triaged。
2. **`needs-triage`**：evaluation in progress。
3. **`needs-info` with reporter activity since the last triage notes**：需要重新评估。

当 PRs 在范围内时，把 external PRs 纳入这些 buckets，并为每行标注 `[PR]` 或 `[issue]`。Discovery 只浮现 *external* PRs（tracker 配置定义了谁算 external），collaborator 正在进行的 PR 不是 triage 工作。这个过滤仅用于 discovery；被明确点名的 PR 无论作者是谁都会被 triage。

The rest: https://github.com/vinvcn/mattpocock-skills-zh-CN/blob/HEAD/skills/engineering/triage/SKILL.md
