| name | explain |
| description | Explain how code works — architecture, patterns, and design decisions (read-only) |
| argument-hint | <area or concept> |
ultrathink: Provide a thorough explanation by first exploring extensively, then synthesizing a clear answer.
Your Task
Explain: $ARGUMENTS
Context
- Current directory: !
pwd
- Git branch: !
git branch --show-current 2>/dev/null || echo "not a git repo"
Instructions
Phase 1: Explore Extensively
Before explaining anything:
- Use Explore agents to find all relevant code
- Read the actual files - don't guess from names
- Trace the flow - how do components connect?
- Check tests for behavioral documentation
- Look at git history for evolution and decisions
Phase 2: Synthesize Understanding
Think deeply about:
- What is the architecture? - components, layers, boundaries
- What patterns are used? - and why were they chosen?
- How does data flow? - inputs to outputs
- What are the key abstractions? - and what do they hide?
- What tradeoffs were made? - and what are the implications?
Phase 3: Explain Clearly
Provide an explanation that:
- Starts with the big picture - high-level architecture first
- Zooms into specifics - key files and functions
- Explains the "why" - not just "what" the code does
- Uses file:line references - so the user can navigate
- Connects to patterns - name the design patterns where applicable
Critical Rules
- DO NOT make changes - this is explanation only
- DO NOT skip exploration - read before explaining
- DO include concrete references - file paths and line numbers
- DO explain rationale - why things are structured this way