triage

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Triage

Bug分诊处理

Triage a bug report end-to-end: reproduce the bug, diagnose the root cause, verify whether the behavior is intentional, and attempt a fix.
对Bug报告进行端到端的分诊处理:重现Bug、诊断根本原因、验证该行为是否为有意设计,并尝试修复。

Input

输入

You need either:
  • issueTitle
    and
    issueBody
    provided in args (preferred — use these directly as the bug report), OR
  • A GitHub issue number or URL mentioned in the conversation (use
    gh issue view
    to fetch details)
If a
triageDir
is provided in args, use that as the working directory for the triage. Otherwise, default to
triage/gh-<issue_number>
(if you have an issue number) or
triage/current
.
你需要提供以下其中一项:
  • 参数中提供的
    issueTitle
    issueBody
    (优先选择——直接将其作为Bug报告使用),或者
  • 对话中提及的GitHub issue编号或URL(使用
    gh issue view
    命令获取详情)
如果参数中提供了
triageDir
,请将其作为分诊处理的工作目录。否则,默认使用
triage/gh-<issue_number>
(如果有issue编号的话)或
triage/current

Step 1: Reproduce

步骤1:重现

Read and follow reproduce.md. Use a subagent for this step to isolate context.
After completing reproduction, check the result:
  • If the issue was skipped (host-specific, unsupported version, etc.) — skip to Output.
  • If the issue was not reproducible — skip to Output.
  • If the issue was reproduced — continue to Step 2.
阅读并遵循reproduce.md的指引。此步骤使用子Agent来隔离上下文。
完成重现后,检查结果:
  • 如果问题被跳过(因主机特定环境、不支持的版本等原因)——直接跳至输出环节。
  • 如果问题无法重现——直接跳至输出环节。
  • 如果问题已重现——继续步骤2。

Step 2: Diagnose

步骤2:诊断

Read and follow diagnose.md. Use a subagent for this step to isolate context.
After completing diagnosis, check your confidence:
  • If confidence is low — skip to Output.
  • If confidence is medium or high — continue to Step 3.
阅读并遵循diagnose.md的指引。此步骤使用子Agent来隔离上下文。
完成诊断后,检查你的置信度:
  • 如果置信度较低——直接跳至输出环节。
  • 如果置信度为中等较高——继续步骤3。

Step 3: Verify

步骤3:验证

Read and follow verify.md. Use a subagent for this step to isolate context.
After completing verification, check the verdict:
  • If the verdict is intended-behavior — skip to Output. The issue is not a bug; do not attempt a fix.
  • If the verdict is bug or unclear — continue to Step 4.
阅读并遵循verify.md的指引。此步骤使用子Agent来隔离上下文。
完成验证后,检查判定结果:
  • 如果判定结果为intended-behavior(有意设计的行为)——直接跳至输出环节。该问题并非Bug,无需尝试修复。
  • 如果判定结果为bug(Bug)unclear(不明确)——继续步骤4。

Step 4: Fix

步骤4:修复

Read and follow fix.md. Use a subagent for this step to isolate context.
Whether the fix succeeds or fails, continue to Output.
阅读并遵循fix.md的指引。此步骤使用子Agent来隔离上下文。
无论修复成功或失败,都继续至输出环节。

Output

输出

After completing the triage (or exiting early), you may suggest generating a GitHub comment using comment.md if the user would find it useful.
完成分诊处理(或提前退出)后,如果用户认为有用,你可以建议使用comment.md生成GitHub评论。