Codebase Exploration
When invoked, systematically explore the codebase to answer the user's question.
Process
- •Clarify the goal - What are we looking for?
- •Start broad - Check project structure, README, package files
- •Narrow down - Use Glob and Grep to find relevant files
- •Read and synthesize - Understand what you find
Exploration Commands
Project structure
code
Glob: * Glob: src/**/*
Find by file type
code
Glob: **/*.ts Glob: **/*.py Glob: **/*.md
Find by name pattern
code
Glob: **/*config* Glob: **/*auth* Glob: **/test*
Find by content
code
Grep: "function functionName" Grep: "class ClassName" Grep: "import.*from"
Output Format
Always provide:
- •File paths with line numbers
- •Brief explanation of what each finding means
- •Suggested next steps if deeper investigation needed
Example Usage
User: "Where is authentication handled?"
Response approach:
- •Grep for auth-related terms:
auth,login,session,jwt - •Check common locations:
src/auth/,lib/auth/,middleware/ - •Read key files to understand the flow
- •Summarize with file paths and brief descriptions