Research Codebase
Conduct comprehensive codebase research using parallel sub-agents.
Process
- •Read mentioned files first & understand type of research
- •Read the referenced files first FULLY (no limit/offset) before spawning tasks
- •This ensures you have necessary context before decomposing the question
- •Before starting anything, the first thing you must absolutely understand is: Is this a "general research request" about understanding a repo, service or subsystem? Or is this a "specific research request" for a specific component of a repo, service or subsystem?
- •Decompose research question
- •"general research request":
- •You want to focus research more on the purpose of the system itself, core components, interactions between components & interactions with other services, datastore, etc.
- •"specific research request": You want to understand everything in the "general research request" but additionally, you need to find components releated to this specific request and dive deep on how these work & interact in the context of this specific request.
- •Break into composable, independent research areas.
- •Identify components, patterns, concepts to investigate
- •Create TodoWrite research plan with specific investigation
- •note: "specific research requests" will have additional tasks
- •Spawn Parallel sub-agents
- •Use
codebase-locatoragents to find relevant files and directories - •Use
codebase-analyzeragents on promising findings for deep dives - •Use
codebase-pattern-finderfor finding similar implementations or examples - •Run multiple agents in parallel for efficiency
- •Wait for ALL sub-agents, then synthesize
- •Prioritize live codebase findings over thoughts/ documentation
- •Include file paths and line numbers for all references
- •Highlight patterns, architectural decisions, and design rationale
- •Generate research document
- •Output path:
./YYYY-MM-DD-<description>.md - •Use template from
~/assets/research-template.md - •Add GitHub permalinks if on main branch or pushed to remote
- •Present findings to user
- •Summarize key discoveries
- •Highlight anything surprising or noteworthy
- •Note any open questions or areas needing further investigation