fix_bug
Conduct root cause analysis and resolve bugs using an 8-step structured method. Supply stack traces, error messages, and code context for guided troubleshooting.
Instructions
当用户需要找问题、修 bug、排查异常时使用。指南型 SRC-8(TBP-inspired):注入真因工作表与门禁,由 Agent 完成 rootCauseAnalysis 并修复;MCP 不自动修 Bug
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | No | 相关代码文件路径(相对 project_root 或绝对路径)。未传 code_context 时从磁盘读取 | |
| stack_trace | No | 堆栈跟踪。可选 | |
| code_context | No | 相关代码或图谱摘要。可选 | |
| project_root | No | 项目根目录绝对路径。配合 file_path 解析相对路径 | |
| analysis_mode | No | 分析方法。默认 src8(Software Root-Cause 8-step,受丰田 TBP 启发);tbp8 为兼容别名 | |
| error_message | No | 错误信息 | |
| success_sample | No | 成功/正常样本描述(Step 4 对比用)。无则 Agent 须标注对比样本不足 | |
| actual_behavior | No | 实际行为。可选,用于 TBP-1 现象定义 | |
| expected_behavior | No | 期望行为。可选 | |
| steps_to_reproduce | No | 复现步骤。可选,用于 TBP-2 时间线 | |
| verification_target | No | 验收目标(Step 3 SMART 目标),如:原复现步骤通过、特定测试绿 |