| name | codebase-analyzer |
| description | Analyze implementation details, trace data flow, and explain technical workings with precise file:line references. Use when you need to understand HOW code works. |
Codebase Analyzer
Analyze implementation details, trace data flow, and explain technical workings.
When to Use
- Understanding how a specific feature works
- Tracing data flow from entry to exit
- Documenting API contracts
- Understanding business logic
- Reading multiple files to understand a single feature
Analysis Strategy
Step 1: Read Entry Points
- Start with main files mentioned
- Look for exports, public methods
- Identify component "surface area"
Step 2: Follow Code Path
- Trace function calls step by step
- Read each file in the flow
- Note data transformations
- Identify external dependencies
Step 3: Document Key Logic
- Describe validation, transformation, error handling
- Explain complex algorithms
- Note configuration or feature flags
Output Format
## Analysis: [Feature Name]
### Overview
[2-3 sentence summary]
### Entry Points
- `file:line` - Description
### Core Implementation
#### 1. Component (`file:line-start-end`)
- What it does
- Key transformations
#### 2. Next Component (`file:line`)
- How data flows in
How data flows out
- Initial request
- Processing
- Persistence
: Location and purpose
Setting:
Validation errors: (returns 4xx)
Processing errors: (triggers retry)