一键导入
rai-bugfix-analyse
Root cause analysis using the method best suited to the bug. Phase 3 of bugfix pipeline.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Root cause analysis using the method best suited to the bug. Phase 3 of bugfix pipeline.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Interactive adapter setup for Jira and Confluence. Detects available backends, discovers projects/spaces, generates validated YAML config. 3-4 questions max.
Evaluate design proportionality using Beck's four rules. Use after implementation.
Push branch, create MR, verify artifacts complete. Phase 7 of bugfix pipeline.
Execute fix tasks with TDD and all validation gates. Phase 5 of bugfix pipeline.
Decompose fix into atomic TDD tasks. Phase 4 of bugfix pipeline.
Retrospective, pattern extraction, and process improvement. Phase 6 of bugfix pipeline.
| name | rai-bugfix-analyse |
| description | Root cause analysis using the method best suited to the bug. Phase 3 of bugfix pipeline. |
| allowed-tools | ["Read","Edit","Write","Grep","Glob","Bash"] |
| license | MIT |
| metadata | {"raise.adaptable":"true","raise.fase":"3","raise.frequency":"per-bug","raise.gate":"","raise.next":"bugfix-plan","raise.prerequisites":"bugfix-triage","raise.skillset":"raise-maintainability","raise.version":"2.4.0","raise.visibility":"public","raise.work_cycle":"bugfix","raise.inputs":"- bug_id: string, required, argument\n- scope_md: file_path, required, from_previous\n","raise.outputs":"- analysis_md: file_path, next_skill\n"} |
Determine the root cause of the bug and decide a fix approach. Select the analysis method based on what information is available — not on an arbitrary complexity tier.
When to use: After /rai-bugfix-triage has classified the bug in 4 dimensions.
When to skip: XS bugs where cause is self-evident — but still write analysis.md documenting the obvious cause.
Inputs: Bug ID, work/bugs/RAISE-{N}/scope.md with TRIAGE block.
Expected state: On bug branch. Scope with triage exists. Bug reproduces.
Read the scope artifact and determine which signals you have:
| Signal available | Best method |
|---|---|
| Stack trace or error message with location | Stack trace analysis — follow the error path to origin |
| Bug appeared after a known change | git bisect — binary search commits to find the introducing change |
| Single suspected cause | 5 Whys — trace one causal chain, each answer evidenced |
| Multiple possible causes, unclear which | Hypothesis-driven — list hypotheses, test each, eliminate |
| Cause is evident from reproduction | Document directly — write the cause and move on |
Choose the method that matches your signals. If uncertain, default to hypothesis-driven — it's the most general and what LLMs do naturally.
Execute the selected method:
Stack trace analysis: Follow the error from the surface (exception/log) back through the call chain to the originating defect. Document the path.
git bisect: git bisect start, git bisect bad HEAD, git bisect good {known-good-commit}. Test at each step until the introducing commit is found.
5 Whys: Trace one factual causal chain — ask "Why?" up to five times, each answer evidenced by code. Stop at the actionable root cause.
Hypothesis-driven: List 2-5 hypotheses for the root cause. For each one, define a test (grep, read code, run command), execute it, and record the result:
| Hypothesis | Test | Result | Conclusion |
|---|---|---|---|
| {what might cause it} | {how to verify} | {what you found} | confirmed / eliminated |
Narrow to one confirmed root cause. If two remain, escalate to human at GATE 2.
Rule for all methods: "Human error" is never a root cause — ask why the error was possible.
Root cause stated with evidence. Fix approach decided — not implemented yet. Root cause unclear after analysis → document top 2 hypotheses, escalate to human at GATE 2.Write work/bugs/RAISE-{N}/analysis.md with: method used, root cause, evidence, and fix approach.
git add work/bugs/RAISE-{N}/analysis.md
git commit -m "bug(RAISE-{N}): analyse — root cause identified
Method: {method used}
Root cause: {one line}
Fix approach: {one line}
Co-Authored-By: Rai <rai@humansys.ai>"
Analysis artifact committed with method, root cause, and fix approach.
| Item | Destination |
|---|---|
| Analysis | work/bugs/RAISE-{N}/analysis.md |
| Next | /rai-bugfix-plan |
/rai-bugfix-triage/rai-bugfix-plan