nametriage
description (EN)Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
說明 (繁中)讓 issues 與外部 PR 穿過分診角色的狀態機——分類、驗證、視需要 grill,並撰寫可供代理使用的簡報。
disable-model-invocationtrue

triage

外面湧進來的 bug、請求,先幫它們分診掛號,再決定放行給誰做。

Triage

分診

Move issues on the project issue tracker through a small state machine of triage roles.

在專案 Issue 追蹤器上,讓 issues 穿過由分診角色構成的小型狀態機。

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.

如果這個 repo 把外部 pull requests 視為請求介面(見 issue-tracker 設定),分診也涵蓋它們:PR 就是附帶程式碼的 issue——相同的角色、相同的狀態、相同的機器,只有下面標註「for a PR」的幾處差異。依追蹤器設定,把孤伶伶的 #42 解析成 issue 或 PR。

Every comment or issue posted to the issue tracker during triage must start with this disclaimer:

分診期間貼到 Issue 追蹤器上的每一則評論或 issue,都必須以此免責聲明開頭:

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

Reference docs

參考文件

Roles

角色

Two category roles:

兩個類別角色:

  • bug: something is broken
  • enhancement: new feature or improvement
  • bug — 有東西壞了
  • enhancement — 新功能或改善

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
  • needs-triage — 需要維護者評估
  • needs-info — 等待報告人提供更多資訊
  • ready-for-agent — 規格完整,可供 AFK 代理使用
  • ready-for-human — 需要人類實作
  • wontfix — 不會處理

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.

對 PR 而言,相同的狀態要對照附帶的程式碼來解讀:ready-for-agent 表示已附上簡報,代理應該在 diff 上採取下一步;ready-for-human 表示已準備好由人類合併。

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.

每個已分診的 issue 都應該正好帶一個類別角色和一個狀態角色。如果狀態角色互相衝突,先標註出來並詢問維護者,再做任何其他事。

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.

這些是正式的角色名稱——Issue 追蹤器實際使用的標籤字串可能不同。這個對應關係應該已經提供給你——如果沒有,執行 /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.

狀態轉移:未加標籤的 issue 通常先進入 needs-triage;從那裡移到 needs-infoready-for-agentready-for-humanwontfix。一旦報告人回覆,needs-info 就會回到 needs-triage。維護者隨時可以推翻——把看起來不尋常的轉移標註出來,並在繼續前詢問。

Invocation

叫用

The maintainer invokes /triage and describes what they want in natural language. Interpret the request and act. Examples:

維護者叫用 /triage 並以自然語言描述他們想要什麼。解讀請求並採取行動。例如:

  • "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?"
  • 「讓我看任何需要我注意的內容」
  • 「我們來看一下 #42」(issue 或 PR)
  • 「把 #42 移到 ready-for-agent」
  • 「有哪些是代理可以接手的?」

Show what needs attention

顯示需要關注的內容

Query the issue tracker and present three buckets, oldest first:

查詢 Issue 追蹤器,呈現三個類別,最舊的優先:

  1. Unlabeled: never triaged.
  2. needs-triage: evaluation in progress.
  3. needs-info with reporter activity since the last triage notes: needs re-evaluation.
  1. 未加標籤 — 從未分診。
  2. needs-triage — 評估進行中。
  3. 自上次分診筆記以來有報告人活動的 needs-info — 需要重新評估。

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.

當 PR 在範圍內時,把外部 PR 納入這些類別,並為每一行標上 [PR][issue]。探索只會浮現外部 PR(追蹤器設定會定義誰算是外部)——協作者進行中的 PR 不是分診工作。這個過濾只影響探索;被明確點名的 PR,無論作者是誰都會被分診。

Show counts and a one-line summary per item. Let the maintainer pick.

顯示每個項目的數量與一行摘要。讓維護者挑選。

Triage a specific issue or PR

分診特定的 issue 或 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.
  1. 收集上下文。 讀取完整的 issue 或 PR(內文、評論、標籤、作者、日期;若是 PR,還包括 diff)。解析任何先前的分診筆記,這樣你就不會重問已經解決的問題。使用專案的領域詞彙表探索程式碼庫,並尊重該區域的 ADR。對程式碼庫執行兩項檢查:(a) 冗餘——依領域概念(不只是請求的措辭)搜尋是否已有既有實作,並回報你查過哪裡。如果找到,它就是一項已實作的 wontfix(步驟 5)。(b) 先前拒絕——讀取 .out-of-scope/*.md,浮現任何與此請求相似的內容。
  1. 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.
  1. 建議。 告訴維護者你的類別與狀態建議及理由,外加與此請求相關的簡短程式碼庫摘要——包括它是否已實作。等待指示。
  1. 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.
  1. 驗證主張。 在任何 grilling 之前,先檢查主張是否成立。對 bug,依報告人的步驟重現它。對 PR,確認 diff 做到它所宣稱的事——把它 checkout 出來,執行相關的測試或指令。回報發生的事:已確認(附程式碼路徑)、失敗,或細節不足(一個強烈的 needs-info 訊號)。已確認的驗證會讓代理簡報強上許多。
  1. 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 CONTEXT.md/ADRs inline as decisions land.
  1. Grill(如果需要)。 如果請求需要充實內容,就一起運行 /grilling/domain-modeling 技能——一輪一輪地問問題,把它 grill 成型,磨利領域術語,並在決策落定時就地更新 CONTEXT.md/ADR。
  1. Apply the outcome: - ready-for-agent: post an agent brief comment (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).
    • needs-triage: apply the role. Optional comment if there's partial progress.
  1. 套用結果: - ready-for-agent — 貼上代理簡報評論(AGENT-BRIEF.md)。 - ready-for-human — 結構與代理簡報相同,但要註明為什麼無法委派(需要判斷、外部存取、設計決策、手動測試)。 - needs-info — 貼上分診筆記(見下方範本)。 - wontfix — 關閉,評論依原因而定:
    • 已實作 — 這項變更已存在於程式碼庫。指出它在哪裡;不要寫入 .out-of-scope/(那個知識庫是給被拒絕的請求,不是給已建置的)。
    • 拒絕(bug) — 有禮貌地說明,然後關閉。
    • 拒絕(enhancement) — 寫入 .out-of-scope/,在評論中連結它,然後關閉(OUT-OF-SCOPE.md)。
    • needs-triage — 套用角色。如果已有部分進展,可選擇加上評論。

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.

如果維護者說「把 #42 移到 ready-for-agent」,相信他們並直接套用角色。先確認你即將做的事(角色變更、評論、關閉),然後行動。跳過 grilling。如果在沒有 grilling session 的情況下移到 ready-for-agent,詢問他們是否要撰寫代理簡報。

Needs-info template

Needs-info 範本

## Triage Notes

**What we've established so far:**

- point 1
- point 2

**What we still need from you (@reporter):**

- question 1
- question 2
## 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".

把 grilling 期間解決的一切記在「已確立內容」之下,這樣工作才不會遺失。問題必須具體且可執行,而不是「請提供更多資訊」。

Resuming a previous session

恢復先前的 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.

如果 issue 或 PR 上已有先前的分診筆記,讀取它們,檢查報告人是否已回答任何未決問題,並在繼續前呈現更新後的全貌。不要重問已解決的問題。