| name | researching-codebase |
| description | Evidence-based codebase investigation. Use when exploring unfamiliar code, understanding architecture, or gathering context for implementation. |
Codebase Research
Conducts evidence-based investigation of codebases to gather accurate
context. Never assume - always verify through code examination.
Workflow
- Define research question - What specific information is needed?
- Identify search strategy - Files, patterns, dependencies
- Gather evidence - Read actual code, not assumptions
- Document findings - File:line references, direct quotes
- Synthesize conclusions - Answer research question with evidence
Research Strategies
Architecture Understanding:
tree -L 2 src/
grep -r "def main" src/
cat pyproject.toml | grep dependencies
Code Flow Tracing:
grep -rn "def function_name" src/
grep -rn "function_name(" src/
grep -rn "from.*import.*function_name" src/
Pattern Discovery:
grep -rn "class.*Base" src/
grep -rn "@dataclass" src/
Evidence Standards
Always include:
- File path and line number:
src/module.py:42
- Direct code quotes when relevant
- Dependency relationships
Never:
- Assume code behavior without reading it
- Reference libraries not in pyproject.toml
- Guess at implementation details
Output Format
## Research: [Question]
### Findings
1. **[Topic]** - `file.py:line`
- Evidence: [direct quote or summary]
- Implication: [what this means]
### Conclusions
[Answer to research question with evidence references]
Quality Checks