diagnose
Root cause analysis for bugs
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Root cause analysis for bugs
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Top-level workflow controller that manages phase transitions for OCMUI bug resolution
Create PR description and recommend Jira updates
Implement bug fix following UHC Portal standards
Create draft pull request
Systematically reproduce bugs in a controlled environment
Bug scrubbing and triage for OCMUI Interruption Catcher duties
| name | diagnose |
| description | Root cause analysis for bugs |
Perform systematic root cause analysis to understand WHY the bug occurs, not just WHAT happens. This guides the fix implementation.
Load the reproduction report to understand:
Use file navigation to find the affected code:
Follow the code path:
Understand recent changes:
git log --oneline --since="30 days ago" -- {affected-file}
git blame {affected-file}
Look for:
Based on code analysis, propose potential root causes:
Example hypotheses:
For each hypothesis:
Continue until you identify the actual root cause.
Consider broader implications:
Use Grep to search for similar code patterns.
Based on the root cause, propose how to fix it:
Create artifacts/bugfix/analysis/root-cause-{issue-key}.md:
# Root Cause Analysis: {Issue Key}
## Bug Summary
- **Issue**: {OCMUI-XXXX}
- **Title**: {bug title}
- **Affected Component**: {component name or page}
## Reproduction Summary
{Brief summary from reproduction report}
## Code Investigation
### Affected Files
- `{file-path}:{line}` — {description}
- `{file-path}:{line}` — {description}
### Execution Flow
1. User action: {action}
2. Event handler: `{function-name}` at `{file}:{line}`
3. State update: {describe}
4. API call (if applicable): `{endpoint}`
5. Error occurs: {where and why}
### Git History
Recent changes to affected area:
```
{relevant git log output}
```
**Relevant PR**: {PR link if identified}
## Root Cause
**Cause**: {concise statement of the actual problem}
**Details**: {detailed explanation of why this causes the observed behavior}
**Code Evidence**:
```typescript
// At {file}:{line}
{paste the problematic code}
```
## Hypotheses Tested
1. ❌ **{Hypothesis 1}**: Ruled out because {reason}
2. ❌ **{Hypothesis 2}**: Ruled out because {reason}
3. ✅ **{Actual cause}**: Confirmed by {evidence}
## Impact Assessment
### Scope
- **Affected pages**: {list}
- **Affected features**: {list}
- **User impact**: {who is affected and how}
### Similar Patterns
{Use Grep to find similar code patterns}
Found {N} similar occurrences in:
- `{file}:{line}` — {should this be fixed too?}
- `{file}:{line}` — {should this be fixed too?}
## Recommended Fix Strategy
### Approach
{Describe the fix strategy}
### Implementation
**Files to modify:**
- `{file}` — {what to change}
- `{file}` — {what to change}
**Changes required:**
1. {Change 1}
2. {Change 2}
3. {Change 3}
### Considerations
- **Breaking changes**: {yes/no and why}
- **TypeScript updates**: {any type changes needed}
- **Testing needs**: {what tests to add/modify}
- **Similar issues**: {should we fix related patterns?}
### Confidence Level
**High** / **Medium** / **Low**
{Explain confidence level}
## References
- File paths: Use `{file}:{line}` notation
- Related issues: {JIRA keys}
- Related PRs: {PR links}
## Next Steps
Ready to proceed to `/fix` phase.
After generating the root cause analysis, re-read .claude/skills/controller/SKILL.md and return control to the controller for next step recommendations.
artifacts/bugfix/analysis/root-cause-{issue-key}.md — Complete root cause analysisAfter running this phase:
src/components/ClusterList.tsx:245