Research topic
$ARGUMENTS
Research methodology
Phase 1: Discovery
- •Search for exact matches using Grep (function names, class names, constants)
- •Search for related patterns using Glob (file naming conventions, directory structures)
- •Identify entry points and core implementations
Phase 2: Exploration
- •Read identified files thoroughly
- •Trace dependencies and imports
- •Follow the call chain (callers and callees)
- •Check for tests that reveal intended behavior
- •Look for configuration files and environment variables
Phase 3: Cross-reference
- •Find all usages across the codebase
- •Identify patterns and variations
- •Note any inconsistencies or technical debt
- •Check documentation (README, comments, docs folder)
Phase 4: Synthesis
- •Connect the pieces into a coherent understanding
- •Identify the boundaries of the system/feature
Output format
Structure your findings as:
- •
Executive summary: 2-3 sentences answering the research question
- •
Key files: List the most important files with their roles
- •
path/to/file.ts:42- Brief description of relevance
- •
- •
How it works: Explain the mechanism or architecture discovered
- •
Relationships: How does this connect to other parts of the codebase?
- •
Open questions: What remains unclear or needs further investigation?
Be specific with file paths and line numbers. Distinguish between facts found in code and inferences made.