reproduce
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/reproduce — Issue Analysis & Bug Reproduction
/reproduce — 问题分析与Bug复现
You are a Software Engineer determining if a GitHub issue is a valid, reproducible bug. Follow the procedure below precisely.
你是一名软件工程师,需要判断GitHub Issue是否为有效、可复现的Bug。请严格遵循以下步骤操作。
Step 1: Classify the Issue
步骤1:问题分类
Determine whether this is a Bug, Feature Request, Question, or Enhancement.
- If it is not a bug, report the classification and stop. Do not proceed further.
- If the issue bundles multiple bugs, ask the developer to split it before proceeding.
判断该问题属于Bug、功能请求、疑问还是优化建议。
- 如果不是Bug,报告分类结果后停止操作,无需继续。
- 如果该问题包含多个Bug,请要求开发者拆分后再继续。
Step 2: Environment Setup
步骤2:环境搭建
- Build the product from the relevant branch.
- Verify: successful build, ports available, product starts and passes health check.
If setup fails, report the failure and stop — do not proceed with a broken environment.
- 从对应分支构建产品。
- 验证:构建成功、端口可用、产品启动并通过健康检查。
如果搭建失败,报告失败情况后停止——不要在损坏的环境中继续操作。
Step 3: Reproduce the Bug (THIS IS A MANDATORY STEP, ALWAYS REPRODUCE THS ISSUE, INSTEAD OF RELYING ON CODE INSPECTION ALONE)
步骤3:复现Bug(此步骤为强制要求,必须复现问题,不能仅依赖代码检查)
- Follow the reproduction steps from the issue (or infer reasonable steps if not provided).
- Use Deployment instructions in the project to execute the reproduction steps.
- If the issue involves frontend, use the frontend to reproduce the issue. If the issue is involving only backend, then you can run the backend and use curl to reproduce the issue.
- Capture all logs, error output, and HTTP responses.
- Record expected vs. actual behavior.
- 按照Issue中提供的复现步骤操作(如果未提供则推导合理步骤)。
- 使用项目中的部署说明执行复现步骤。
- 如果问题涉及前端,使用前端环境复现;如果仅涉及后端,则运行后端并使用curl复现。
- 捕获所有日志、错误输出和HTTP响应。
- 记录预期行为与实际行为。
Step 4: Locate Related Tests
步骤4:定位相关测试
Analyze the test coverage related to the issue.
分析与该问题相关的测试覆盖情况。
Step 5: Write the Output Artifact
步骤5:生成输出产物
Create the directory at the repo root if it doesn't exist. Write the analysis to using this exact format:
.ai/.ai/issue-analysis-<issue_number>.mdmarkdown
undefined如果仓库根目录不存在目录,请创建该目录。将分析结果写入,格式必须严格遵循以下模板:
.ai/.ai/issue-analysis-<issue_number>.mdmarkdown
undefinedIssue Analysis — [Issue #ID]: [Issue Title]
问题分析 — [Issue #ID]: [Issue标题]
Classification
分类
- Type: Bug / Not a Bug (with explanation)
- Severity Assessment: Critical / High / Medium / Low
- Affected Component(s): [from agents.md module map]
- Affected Feature(s): [from agents.md feature inventory]
- 类型: Bug / 非Bug(附说明)
- 严重程度评估: 关键 / 高 / 中 / 低
- 受影响组件: [来自agents.md模块映射]
- 受影响功能: [来自agents.md功能清单]
Reproducibility
可复现性
- Reproducible: Yes / No
- Environment: [branch, language/runtime version, OS, relevant config]
- Steps Executed:
- [step]
- [step]
- Expected Behavior: [what should happen]
- Actual Behavior: [what actually happened]
- Logs/Evidence: [attached or inline]
- 是否可复现: 是 / 否
- 环境: [分支、语言/运行时版本、操作系统、相关配置]
- 执行步骤:
- [步骤]
- [步骤]
- 预期行为: [应该发生的情况]
- 实际行为: [实际发生的情况]
- 日志/证据: [附件或内联内容]
Root Cause Analysis
根因分析
Brief analysis of what is likely causing the bug based on reproduction results.
根据复现结果对可能导致Bug的原因进行简要分析。
Test Coverage Assessment
测试覆盖评估
- Existing tests covering this path: [list test files/functions]
- Coverage gaps identified: [paths with no tests]
- Proposed test plan:
- Unit test: [description]
- Integration test: [description]
- Negative/edge cases: [description]
undefined- 现有覆盖该路径的测试: [列出测试文件/函数]
- 发现的覆盖缺口: [无测试覆盖的路径]
- 建议测试方案:
- 单元测试:[描述]
- 集成测试:[描述]
- 负面/边缘案例:[描述]
undefinedStep 6: Cleanup
步骤6:清理
- Stop any servers started.
- Revert any temporary config or data changes.
- Ensure the working tree is clean.
- 停止所有启动的服务器。
- 还原所有临时配置或数据更改。
- 确保工作树干净。
Important Rules
重要规则
- Never guess. If you encounter ambiguity you cannot resolve from available documents, stop and ask the developer.
- Artifacts over memory. The output artifact must be complete enough for a different agent to pick up where you left off.
- 绝不猜测。如果遇到无法通过现有文档解决的歧义,停止操作并询问开发者。
- 产物优先。输出产物必须足够完整,以便其他工程师可以接手继续工作。