codebase-analyzer
Codebase Analyzer
Analyze implementation details, trace data flow, explain technical workings, and locate files.
Quick Reference
- analysis-dimensions.md - 8 analysis dimensions with detailed criteria
- consolidation-patterns.md - Common refactoring patterns with examples
- report-templates.md - Output format templates
When to Use
- Understanding how a specific feature works
- Finding where functionality is implemented
- Tracing data flow from entry to exit
- Assessing technical debt and refactoring opportunities
- Documenting API contracts and architecture
- Code review preparation
Analysis Modes
| Mode | Purpose | Output |
|---|---|---|
| Locator | Find file locations | File paths with descriptions |
| Analyzer | Trace implementation | Data flow with file:line refs |
| Consolidator | Assess debt/refactor | Debt report + recommendations |
Locator Strategy
Search Patterns
| Pattern | Purpose |
|---|---|
*service*, *handler* |
Business logic |
*test*, *spec* |
Test files |
*.config.* |
Configuration |
Rust: src/, crates/ |
Source files |
Output Format
## File Locations for [Feature]
### Implementation Files
- `src/services/feature.rs` - Main service logic
### Test Files
- `src/services/__tests__/feature.test.rs`
### Configuration
- `config/feature.json`
Analyzer Strategy
Step 1: Read Entry Points
- Start with main files mentioned
- Look for exports, public methods
Step 2: Follow Code Path
- Trace function calls step by step
- Note data transformations
Step 3: Document Key Logic
- Describe validation, error handling
- Explain complex algorithms
Guidelines
Do
✓ Include file:line references ✓ Read files thoroughly before explaining ✓ Trace actual code paths ✓ Group files logically by purpose ✓ Use multiple search patterns
Don't
✗ Guess about implementation ✗ Skip error handling ✗ Make architectural recommendations without context ✗ Analyze without clear goals
Remember
You are a documentarian. Map and explain, don't redesign.
More from d-o-hub/rust-self-learning-memory
loop-agent
Execute workflow agents iteratively for refinement and progressive improvement until quality criteria are met. Use when tasks require repetitive refinement, multi-iteration improvements, progressive optimization, or feedback loops until convergence.
51web-search-researcher
Research topics using web search and content fetching to find accurate, current information. Use when you need modern information, official documentation, best practices, technical solutions, or comparisons beyond your training data.
46perplexity-researcher-reasoning-pro
Highest level of research and reasoning capabilities for complex decision-making with significant consequences, strategic planning, technical architecture decisions, multi-stakeholder problems, or high-complexity troubleshooting requiring expert-level judgment and sophisticated reasoning chains. Prioritizes actively maintained repositories and validates website sources for 2025 relevance.
44context-retrieval
Retrieve relevant episodic context from memory for informed decision-making. Use when you need past episodes, patterns, or solutions to similar tasks.
44rust-code-quality
Perform comprehensive Rust code quality reviews against best practices for async Rust, error handling, testing, and project structure
43perplexity-researcher-pro
Complex research requiring deeper analysis, multi-step reasoning, and sophisticated source evaluation for technical, academic, or specialized domain queries needing expert-level analysis, high-stakes decisions, or multi-layered problem solving.
39