process-issues

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Process issues (one tick)

处理问题(单次任务)

One pass over the repo's open issues per invocation, then stop. Compose with
/loop
for recurrence (
/loop /process-issues
,
/loop 1h /process-issues
);
/loop
owns pacing. Never schedule yourself.
This is the autonomous sibling of the interactive
/triage
skill: it runs the same state machine and reuses the
triage
skill's bundled references (its
AGENT-BRIEF.md
template,
OUT-OF-SCOPE.md
knowledge base, and needs-info notes template) instead of duplicating them. The difference is that
/triage
waits for the maintainer at each step; this pass acts autonomously and parks anything that needs a human.
State derives entirely from GitHub (labels, comment timestamps), so a tick is idempotent: an empty queue costs one
gh issue list
and exits.
每次调用时对仓库的公开问题进行一次遍历,然后停止。可与
/loop
组合实现重复执行(
/loop /process-issues
/loop 1h /process-issues
);
/loop
负责控制执行节奏。请勿自行设置调度。
这是交互式
/triage
技能的自动版本:它运行相同的状态机,并复用
/triage
技能的内置参考内容(包括
AGENT-BRIEF.md
模板、
OUT-OF-SCOPE.md
知识库以及需要补充信息的注释模板),而非重复实现这些内容。两者的区别在于,
/triage
会在每个步骤等待维护人员操作;而本任务会自动执行,并将需要人工处理的问题暂存。
状态完全源自GitHub(标签、评论时间戳),因此单次任务具有幂等性:若队列无内容,仅执行一次
gh issue list
后即退出。

Rails

规则

  • Never close an issue, never apply
    wontfix
    .
    Those are the maintainer's call. When this pass believes an issue is wontfix, a duplicate, out of scope, or a "do we even want this" scope question, it does not close it: it leaves a disclaimer-prefixed comment with the reasoning (and any
    .out-of-scope/
    match or duplicate link) and parks it in
    needs-triage
    for the maintainer to confirm-and-close.
    wontfix
    is a recommendation, never an action.
  • Every comment starts with a disclaimer:
    > *This was generated by AI during triage.*
    .
  • Skip issues owned by another active loop. If another dispatcher already drives an issue (it is in that loop's queue), leave it untouched.
  • 切勿关闭问题,切勿添加
    wontfix
    标签。
    这些操作应由维护人员决定。当本任务判定问题属于
    wontfix
    、重复问题、超出范围或需确认“是否需要该功能”时,不会直接关闭问题:而是添加一条带有免责声明前缀的注释说明理由(以及匹配的
    .out-of-scope/
    条目或重复问题链接),并将其标记为
    needs-triage
    状态,交由维护人员确认并关闭。
    wontfix
    仅为建议,绝非直接执行的操作。
  • 所有注释均以免责声明开头:
    > *此内容由AI在分类过程中生成。*
    .
  • 跳过由其他活跃循环处理的问题。 若问题已由其他调度器处理(处于该循环的队列中),则不对其进行任何操作。

0. Preflight

0. 预检

  • Abort if not a git repo, or if there is no GitHub remote. This skill is GitHub-only (
    gh
    , issues).
  • Detect optional substrate; use what exists, skip what doesn't:
    • Triage labels + wiring (
      docs/agents/triage-labels.md
      mapping the canonical roles
      needs-triage
      /
      needs-info
      /
      ready-for-agent
      /
      ready-for-human
      /
      wontfix
      , and an issue
      type:
      axis). If absent, offer to run
      /setup-github-labels
      and stop: without state labels the tick can read but cannot record an outcome.
    • .out-of-scope/
      directory.
      If present, read it during context-gathering (see the
      triage
      skill's
      OUT-OF-SCOPE.md
      ); if absent, skip out-of-scope matching.
  • 若当前目录不是git仓库,或无GitHub远程仓库,则终止执行。本技能仅支持GitHub(依赖
    gh
    工具和GitHub Issues)。
  • 检测可选基础组件;使用已存在的组件,跳过不存在的组件:
    • 分类标签及关联配置
      docs/agents/triage-labels.md
      ,映射标准角色标签
      needs-triage
      /
      needs-info
      /
      ready-for-agent
      /
      ready-for-human
      /
      wontfix
      ,以及问题的
      type:
      分类轴)。若缺失,则提示运行
      /setup-github-labels
      并终止:若无状态标签,单次任务仅能读取问题,无法记录处理结果。
    • .out-of-scope/
      目录
      。若存在,则在收集上下文时读取该目录内容(参考
      triage
      技能的
      OUT-OF-SCOPE.md
      );若不存在,则跳过超出范围的匹配检查。

States

状态

This pass routes each issue to exactly one canonical state (label strings come from
triage-labels.md
). Every triaged issue also carries one category role (
type: bug
/
type: feature
/
type: task
).
  • needs-info
    : underspecified or unreproducible; waiting on the reporter.
  • ready-for-agent
    : fully specified, behind the strict gate below, with an agent brief. The handoff to an AFK agent (implemented by
    /implement-issues
    ).
  • ready-for-human
    : wanted, but a human must implement it (judgment, access, or a design decision).
  • needs-triage
    : the parking spot for the maintainer. A wontfix / duplicate / out-of-scope / scope-call belief lands here with a comment. This pass never re-picks it.
本任务会将每个问题流转至唯一的标准状态(标签字符串来自
triage-labels.md
)。每个已分类的问题还会带有一个分类角色标签(
type: bug
/
type: feature
/
type: task
)。
  • needs-info
    :描述不明确或无法复现;等待报告者补充信息。
  • ready-for-agent
    :描述完整,通过下方严格校验,且附带Agent任务简报。将交接给AFK Agent(由
    /implement-issues
    实现)处理。
  • ready-for-human
    :需求合理,但需人工实现(涉及判断、权限或设计决策)。
  • needs-triage
    :维护人员的暂存区。当判定问题为
    wontfix
    、重复问题、超出范围或需确认范围时,将问题置于此状态并附上注释。本任务不会重新处理该状态的问题。

Tick algorithm

单次任务算法

  1. Build the queue. Two buckets:
    • Open issues with no triage state label (never triaged, this pass's turn).
    • needs-info
      issues where the reporter has replied since the last triage note (re-evaluation needed).
    bash
    gh issue list --state open --json number,title,labels,author,createdAt,updatedAt \
      --jq '[.[] | {number, title, labels: [.labels[].name], author: .author.login, createdAt, updatedAt}]'
    Skip issues already wearing
    ready-for-agent
    /
    ready-for-human
    /
    wontfix
    , and do not re-pick
    needs-triage
    (that is the parking spot, not a work queue).
  2. Process up to ~5 issues this tick, oldest-first, each through the pipeline below, then stop.
    /loop
    drains a larger backlog over later ticks.
  3. Report. A short dashboard: each issue processed and the state applied, recommendations parked for the maintainer, anything needing a human call.
    /loop
    reads this to pace the next run.
  1. 构建队列。分为两类:
    • 未添加任何分类状态标签的公开问题(从未被分类,由本次任务处理)。
    • needs-info
      状态下,报告者在最近一次分类注释后已回复的问题(需重新评估)。
    bash
    gh issue list --state open --json number,title,labels,author,createdAt,updatedAt \
      --jq '[.[] | {number, title, labels: [.labels[].name], author: .author.login, createdAt, updatedAt}]'
    跳过已带有
    ready-for-agent
    /
    ready-for-human
    /
    wontfix
    标签的问题,且不重新处理
    needs-triage
    状态的问题(该状态为暂存区,而非工作队列)。
  2. 本次任务最多处理约5个问题,按创建时间从早到晚排序,每个问题均通过下方流水线处理,然后终止。
    /loop
    会在后续任务中处理更多积压问题。
  3. 生成报告。简短的仪表盘:列出每个已处理的问题及应用的状态、提交给维护人员的建议、所有需要人工决策的内容。
    /loop
    会根据此报告控制下一次运行的节奏。

Per-issue pipeline

单问题处理流水线

  1. Gather context in a subagent (keep the main loop context clean): read the issue body, comments, labels, reporter, and dates; parse prior triage notes so resolved questions are not re-asked; read
    .out-of-scope/
    ; quick-search open issues for a likely duplicate; explore the codebase. For bugs, attempt reproduction (trace the code, run tests). A confirmed repro makes a far stronger brief; a failed or impossible repro is a strong
    needs-info
    signal.
  2. Classify the category
    type: bug
    /
    type: feature
    /
    type: task
    .
  3. Route to a state:
    • Out-of-scope match or duplicate of an open issue → comment linking the prior
      .out-of-scope/
      entry or the original issue, then park
      needs-triage
      . Never close.
    • Underspecified / repro failed / missing information
      needs-info
      , using the
      triage
      skill's needs-info notes template. Capture everything already established so the work is not lost; ask the reporter specific, actionable questions. This is the autonomous substitute for
      /triage
      's maintainer-grilling: ask the reporter, do not block on a human.
    • Passes the strict gate
      ready-for-agent
      with an agent brief written per the
      triage
      skill's
      AGENT-BRIEF.md
      . The gate requires all of: one reasonable interpretation, a complete brief with concrete testable acceptance criteria, verifiability by cheap or existing tests, and no product/design decision or human-only access required.
    • Wanted but a human must build it (judgment, access, design decision) →
      ready-for-human
      , same brief structure, noting why it cannot be delegated.
    • A "do we even want this" scope call → park
      needs-triage
      with the reasoning.
    When in doubt, escalate. Prefer
    ready-for-human
    or
    needs-triage
    over
    ready-for-agent
    : handing an AFK agent an underspecified brief is the failure mode this gate exists to prevent.
  1. 在子Agent中收集上下文(保持主循环上下文清晰):读取问题正文、评论、标签、报告者信息及日期;解析之前的分类注释,避免重复询问已解决的问题;读取
    .out-of-scope/
    目录内容;快速搜索公开问题以查找可能的重复项;浏览代码库。对于Bug类问题,尝试复现(追踪代码、运行测试)。确认可复现能生成更完善的任务简报;复现失败或无法复现则是
    needs-info
    状态的强烈信号。
  2. 分类问题类型
    type: bug
    /
    type: feature
    /
    type: task
  3. 流转至对应状态
    • 匹配超出范围条目或与公开问题重复 → 添加注释链接至对应的
      .out-of-scope/
      条目或原问题,然后标记为
      needs-triage
      状态暂存。切勿关闭问题。
    • 描述不明确/复现失败/信息缺失 → 标记为
      needs-info
      状态,使用
      triage
      技能的需要补充信息注释模板。记录所有已确认的信息,避免工作内容丢失;向报告者提出具体、可执行的问题。这是
      /triage
      技能中人工询问环节的自动替代方案:直接询问报告者,无需等待人工操作。
    • 通过严格校验 → 标记为
      ready-for-agent
      状态,并按照
      triage
      技能的
      AGENT-BRIEF.md
      模板撰写Agent任务简报。校验需满足所有条件:仅有一个合理的解读方向、简报完整且包含具体可测试的验收标准、可通过低成本或现有测试验证、无需产品/设计决策或仅人工可访问的权限。
    • 需求合理但需人工实现(涉及判断、权限、设计决策) → 标记为
      ready-for-human
      状态,使用相同的简报结构,并说明无法委派给Agent的原因。
    • 需确认“是否需要该功能”的范围决策 → 标记为
      needs-triage
      状态暂存,并附上理由。
    存疑时,升级处理。优先选择
    ready-for-human
    needs-triage
    状态,而非
    ready-for-agent
    :将描述不明确的简报交给AFK Agent是本校验机制旨在避免的失败场景。

Composition

组合使用

Spin-off issues from
/process-prs
land unlabeled, so this pass picks them up and triages them on its next tick (escalations from
/kaizen-codebase
arrive already labeled
needs-triage
and are left for the maintainer, not re-picked here). An issue this pass marks
ready-for-agent
is the handoff to
/implement-issues
(this pass does not write code or open PRs itself); the resulting PR is then handled by
/process-prs
.
/process-prs
衍生的问题未被标记标签,因此本任务会在下次运行时拾取并分类它们(从
/kaizen-codebase
升级的问题已标记
needs-triage
状态,将留给维护人员处理,不会被本任务重新拾取)。本任务标记为
ready-for-agent
状态的问题将交接给
/implement-issues
处理(本任务本身不会编写代码或创建PR);生成的PR随后由
/process-prs
处理。