Loading...
Loading...
Investigate a GitHub issue — fan out parallel exploration, find the root cause (5 Whys, evidence-backed), and write a reviewable RCA artifact (then post a summary to the issue). The investigate step before piv-implement-issue. Use to diagnose a bug/issue before fixing it.
npx skill4agent add coleam00/skills piv-investigate-issuegh auth statusgh issue view $ARGUMENTScodebase-analystfile:lineresearch-agentfile:linegit log --oneline -20 -- [relevant-paths]git blame -L <start>,<end> <affected-file> # who/when introduced the suspect linesfile:lineWHY does <symptom> happen? → because <cause A> (evidence: file.ts:123 — <snippet>)
WHY <cause A>? → because <cause B> (evidence: file.ts:456 — <snippet>)
… ROOT CAUSE: <the exact code/logic to change> (evidence: file.ts:789 — <snippet>)docs/issues/issue-$ARGUMENTS.md# Root Cause Analysis: GitHub Issue #$ARGUMENTS
## Issue Summary
- **GitHub Issue ID**: #$ARGUMENTS
- **Issue URL**: [Link to GitHub issue]
- **Title**: [Issue title from GitHub]
- **Reporter**: [GitHub username]
- **Status**: [Current GitHub issue status]
## Assessment
Each value needs a one-line reason grounded in the investigation (not a guess):
| Metric | Value | Reasoning |
|--------|-------|-----------|
| Severity | Critical/High/Medium/Low | user impact · workaround · scope of failure |
| Complexity | Low/Medium/High | files touched · integration points · risk |
| Confidence | High/Medium/Low | evidence quality · unknowns · assumptions |
> **Confidence is the human-attention signal:** LOW confidence = a human should look before the fix runs. Say it honestly.
## Problem Description
[Clear description of the issue]
**Expected Behavior:**
[What should happen]
**Actual Behavior:**
[What actually happens]
**Symptoms:**
- [List observable symptoms]
## Reproduction
**Steps to Reproduce:**
1. [Step 1]
2. [Step 2]
3. [Observe issue]
**Reproduction Verified:** [Yes/No]
## Root Cause
### Affected Components
- **Files**: [List of affected files with paths]
- **Functions/Classes**: [Specific code locations]
- **Dependencies**: [Any external deps involved]
### Analysis
[Detailed explanation of the root cause]
**Evidence Chain (5 Whys):**
**Why This Occurs:**
[Explanation of the underlying issue]
**Code Location:**
### Related Issues
- [Any related issues or patterns]
## Impact Assessment
**Scope:**
- [How widespread is this?]
**Affected Features:**
- [List affected features]
**Severity Justification:**
[Why this severity level]
**Data/Security Concerns:**
[Any data corruption or security implications]
## Proposed Fix
### Fix Strategy
[High-level approach to fixing]
### Files to Modify
1. **[file-path]**
- Changes: [What needs to change]
- Reason: [Why this change fixes it]
2. **[file-path]**
- Changes: [What needs to change]
- Reason: [Why this change fixes it]
### Alternative Approaches
[Other possible solutions and why the proposed approach is better]
### Risks and Considerations
- [Any risks with this fix]
- [Side effects to watch for]
- [Breaking changes if any]
### Testing Requirements
**Test Cases Needed:**
1. [Test case 1 - verify fix works]
2. [Test case 2 - verify no regression]
3. [Test case 3 - edge cases]
**Validation Commands:**
```bash
[Exact commands to verify fix]piv-implement-issuepiv-implement-issuepiv-commit
## Post the summary to the issue
After writing the doc, post a short version as a GitHub comment — an audit trail, and so the fix can be
triggered/tracked from the issue itself:
```bash
gh issue comment $ARGUMENTS --body "<title · the Assessment table (severity/complexity/confidence + one-line reasons) · root cause in 1–2 lines · files to change · next: /piv-implement-issue $ARGUMENTS>"