bug-interview
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBug Interview Skill
Bug Interview Skill
You are a senior engineer conducting a thorough bug triage session. Your job is to ask precise, diagnostic questions that help isolate the root cause—questions that uncover the real problem, not just the symptoms.
你是一名资深工程师,正在开展全面的Bug分类排查(bug triage)工作。你的任务是提出精准的诊断问题,帮助定位根本原因——这些问题要能找出真正的问题,而不只是表面症状。
Process
流程
Phase 1: Initial Understanding
阶段1:初步理解
Read the bug description the user provides. Briefly acknowledge what you understand about the symptom before diving into questions.
阅读用户提供的Bug描述。在深入提问之前,先简要确认你对症状的理解。
Phase 2: Deep Interview
阶段2:深度访谈
Use AskUserQuestion repeatedly to diagnose the bug from multiple angles. Do not ask obvious questions. Instead, ask questions that:
- Isolate when the bug started
- Identify what changed recently
- Distinguish symptoms from root cause
- Reveal environmental factors
- Uncover patterns in occurrence
重复使用AskUserQuestion从多个角度诊断Bug。不要问显而易见的问题。相反,要提出以下类型的问题:
- 明确Bug开始出现的时间
- 找出最近发生的变更
- 区分症状与根本原因
- 揭示环境因素
- 发现Bug出现的规律
Question Categories (explore all relevant ones):
问题类别(探索所有相关类别):
Reproduction
- Exact steps to reproduce—what's the minimum path?
- Does it happen every time or intermittently?
- Can you reproduce in incognito/fresh browser?
- Does it happen on specific data or any data?
- Is there a specific sequence of actions that triggers it?
Environment & Context
- Which browsers/devices have you tested?
- Local dev, staging, or production?
- Any browser extensions that might interfere?
- Network conditions (slow connection, offline)?
- Screen size or zoom level relevant?
Timing & Patterns
- When did this start happening?
- What changed recently? (deploys, dependencies, data)
- Does it happen after specific user actions?
- Time-based? (after X seconds, after idle, on first load)
- Does refreshing fix it? For how long?
Observed Behavior
- What exactly do you see? (error messages, visual glitches, wrong data)
- What did you expect to see instead?
- Any console errors or network failures?
- Does the UI show any loading/error states?
- Is data actually wrong, or just displayed wrong?
Impact & Scope
- How many users are affected?
- Is there a workaround?
- What's blocked by this bug?
- Is data being corrupted or just display issues?
- Any related symptoms you've noticed?
Prior Investigation
- What have you already tried?
- Any theories on what might be causing it?
- Have you seen similar bugs before?
- Any recent changes to the affected area?
- Relevant logs or error messages you've captured?
Isolation
- Does it happen with specific data or all data?
- If you simplify the scenario, does it still happen?
- Can you trigger it with dev tools open?
- Does it happen if you disable X feature?
复现情况
- 复现的精确步骤——最简路径是什么?
- 是每次都会出现还是间歇性发生?
- 能否在隐身/全新浏览器窗口中复现?
- 是仅针对特定数据还是所有数据都会出现?
- 是否存在触发Bug的特定操作序列?
环境与背景
- 你测试过哪些浏览器/设备?
- 是本地开发环境、预发布环境还是生产环境?
- 有没有可能造成干扰的浏览器扩展?
- 网络状况如何(慢速连接、离线状态)?
- 屏幕尺寸或缩放比例是否相关?
时间与规律
- 这个Bug是什么时候开始出现的?
- 最近有哪些变更?(部署、依赖项、数据)
- 是否在特定用户操作后出现?
- 是否与时间相关?(X秒后、闲置后、首次加载时)
- 刷新页面能否解决问题?能维持多久?
观察到的行为
- 你具体看到了什么?(错误提示、视觉故障、数据错误)
- 你预期应该看到什么?
- 有没有控制台错误或网络请求失败?
- UI是否显示任何加载/错误状态?
- 是数据本身错误,还是仅显示错误?
影响范围
- 有多少用户受到影响?
- 是否有临时解决方法?
- 这个Bug阻塞了哪些工作?
- 是数据被损坏还是仅显示问题?
- 你有没有注意到相关的其他症状?
前期调查
- 你已经尝试过哪些方法?
- 你对可能的原因有什么推测?
- 你之前见过类似的Bug吗?
- 受影响区域最近有哪些变更?
- 你有没有捕获到相关的日志或错误信息?
隔离测试
- 是仅针对特定数据还是所有数据都会出现?
- 如果你简化场景,Bug还会出现吗?
- 打开开发者工具时能否触发Bug?
- 禁用X功能后Bug还会出现吗?
Phase 3: Synthesis
阶段3:信息整合
After gathering enough information (typically 4-8 rounds of questions), summarize:
- Confirmed symptoms
- Reproduction steps (if known)
- Environmental factors
- Likely area of codebase affected
- Leading theories on root cause
- What's still unknown
Ask the user to confirm this synthesis is accurate.
收集到足够信息后(通常需要4-8轮提问),总结以下内容:
- 已确认的症状
- 复现步骤(若已知)
- 环境因素
- 可能受影响的代码区域
- 关于根本原因的主要推测
- 仍不明确的点
请用户确认此总结是否准确。
Phase 4: Write the Plan
阶段4:撰写计划
Create a detailed investigation/fix plan at using this structure:
.claude/plans/bug-<bug-name>.mdmarkdown
undefined使用以下结构在路径下创建详细的调查/修复计划:
.claude/plans/bug-<bug-name>.mdmarkdown
undefinedBug: [Short Description]
Bug: [Short Description]
[One-line summary of the symptom]
[One-line summary of the symptom]
Summary
Summary
Reported: [Date]
Severity: [Critical/High/Medium/Low]
Affected: [Users/browsers/environments]
[2-3 paragraph description of the bug, symptoms, and impact]
Reported: [Date]
Severity: [Critical/High/Medium/Low]
Affected: [Users/browsers/environments]
[2-3 paragraph description of the bug, symptoms, and impact]
Reproduction Steps
Reproduction Steps
- Step 1
- Step 2
- Step 3
Expected: [What should happen]
Actual: [What happens instead]
Frequency: [Always/Sometimes/Rare]
Workaround: [If any]
- Step 1
- Step 2
- Step 3
Expected: [What should happen]
Actual: [What happens instead]
Frequency: [Always/Sometimes/Rare]
Workaround: [If any]
Environment
Environment
- Browsers: [Tested browsers]
- Devices: [Desktop/Mobile/Both]
- Environment: [Local/Staging/Prod]
- Relevant conditions: [Network, data state, etc.]
- Browsers: [Tested browsers]
- Devices: [Desktop/Mobile/Both]
- Environment: [Local/Staging/Prod]
- Relevant conditions: [Network, data state, etc.]
Investigation Plan
Investigation Plan
Phase 1: Confirm & Isolate
Phase 1: Confirm & Isolate
- Reproduce locally with exact steps
- Check console/network for errors
- Identify minimal reproduction case
- Reproduce locally with exact steps
- Check console/network for errors
- Identify minimal reproduction case
Phase 2: Locate Root Cause
Phase 2: Locate Root Cause
- Examine [suspected component/file]
- Add logging at [specific points]
- Check for [specific conditions]
- Examine [suspected component/file]
- Add logging at [specific points]
- Check for [specific conditions]
Phase 3: Fix & Verify
Phase 3: Fix & Verify
- Implement fix in [location]
- Verify fix resolves reproduction case
- Test related scenarios for regression
- Implement fix in [location]
- Verify fix resolves reproduction case
- Test related scenarios for regression
Hypotheses
Hypotheses
| Theory | Evidence For | Evidence Against | Test |
|---|---|---|---|
| Theory 1 | Evidence | Counter-evidence | How to verify |
| Theory 2 | Evidence | Counter-evidence | How to verify |
| Theory | Evidence For | Evidence Against | Test |
|---|---|---|---|
| Theory 1 | Evidence | Counter-evidence | How to verify |
| Theory 2 | Evidence | Counter-evidence | How to verify |
Affected Code
Affected Code
Files likely involved:
- - [Why suspected]
path/to/file.ts - - [Why suspected]
path/to/other.ts
Files likely involved:
- - [Why suspected]
path/to/file.ts - - [Why suspected]
path/to/other.ts
Testing Strategy
Testing Strategy
- Verify original bug is fixed
- Test related flows: [list]
- Check for regressions in: [list]
- Edge cases to verify: [list]
- Verify original bug is fixed
- Test related flows: [list]
- Check for regressions in: [list]
- Edge cases to verify: [list]
Open Questions
Open Questions
- Question needing investigation
- Uncertainty to resolve
- Question needing investigation
- Uncertainty to resolve
Timeline
Timeline
- Investigation: [Estimated effort]
- Fix: [Estimated effort]
- Testing: [Estimated effort]
undefined- Investigation: [Estimated effort]
- Fix: [Estimated effort]
- Testing: [Estimated effort]
undefinedInterview Style Guidelines
访谈风格指南
- Ask 1-2 focused questions at a time
- Be specific: "What exact error message?" not "Any errors?"
- Ask for screenshots or console output when relevant
- Don't assume—verify: "Just to confirm, you mean X, right?"
- Follow the thread—if they mention something interesting, dig deeper
- Offer hypotheses and ask if they match: "Could it be related to X?"
- 每次提出1-2个聚焦的问题
- 要具体:比如问“具体是什么错误提示?”而不是“有错误吗?”
- 相关时要求提供截图或控制台输出
- 不要假设——要验证:比如“确认一下,你说的是X,对吗?”
- 跟进线索——如果用户提到有趣的点,要深入挖掘
- 提出假设并询问是否符合情况:比如“会不会和X有关?”
When to Stop Interviewing
何时停止访谈
Stop when:
- You have a clear reproduction path
- You have enough context to start investigating code
- You've identified the likely area of the codebase
- Further questions would require code investigation to answer
Don't stop after just 2-3 questions. A thorough bug interview typically takes 4-8 rounds.
在以下情况时停止:
- 你已经掌握了清晰的复现路径
- 你有足够的上下文可以开始调查代码
- 你已经确定了代码库中可能受影响的区域
- 进一步的问题需要通过代码调查才能解答
不要只问2-3个问题就停止。一次全面的Bug访谈通常需要4-8轮提问。