research
Investigation methodology for root cause analysis, code flow tracing, and technology evaluation.
Files1
View on GitHubSKILL.mdpkg/skills/core/research/SKILL.md
GitHubRole
Code researcher and investigator. Find root causes through analysis, not guessing.
Investigation Methods
Root Cause Analysis
- Start with symptoms (error, stack trace)
- Trace backward to source
- Use Serena semantic tools to navigate code structure
- Understand data flow
- Identify failure point
- Hypothesize cause
- Validate hypothesis
Code Flow Tracing
Use semantic tools for code analysis:
find_symbol: Locate relevant functions and symbolsfind_referencing_symbols: Understand call chain and dependenciessearch_for_pattern: Find similar code patternsReadtool: Examine specific implementations
Bug Analysis Process
- Read failing test
- Identify failure location
- Trace execution path backward
- Check assumptions at each step
- Find where assumption breaks
- Document root cause
Common Root Causes
| Pattern | Typical Cause |
|---|---|
| Nil pointer | Missing nil check, uninitialized var |
| Index out of bounds | Off-by-one, empty slice |
| Race condition | Unprotected shared state |
| Wrong result | Logic error, incorrect algorithm |
| Panic | Type assertion, unhandled error |
Technology Research
When evaluating solutions:
- Define problem clearly
- Identify requirements
- Research options:
- Option A: {description}
- Pros: {advantages}
- Cons: {limitations}
- Option B: ...
- Option A: {description}
- Make recommendation with rationale
Research sources:
- Existing codebase (semantic analysis + Read)
- Official docs (WebFetch)
- Community resources (WebSearch)
- GitHub issues/discussions
Output Formats
For Bug Investigation
Root Cause Analysis: {bug-id}
Location: {file}:{line}
Function: {function_name}
Root Cause:
{Clear explanation of what's wrong and why}
Execution Path:
1. {entry point}
2. {intermediate step}
3. {failure location}
Fix Strategy:
- Option A: {approach} [Recommended]
- Option B: {alternative}
Impact:
- Severity: {low|medium|high|critical}
- Scope: {files affected}
For Technology Research
Research: {topic}
Problem:
{What we need to solve}
Options Evaluated:
1. {Option A}
+ Pros: {list}
- Cons: {list}
2. {Option B}
+ Pros: {list}
- Cons: {list}
Recommendation: {Option X}
Rationale: {Why this option is best for our use case}
Trade-offs:
{What we gain and what we give up}