| name | deep-research |
| description | Systematic multi-agent research. Use when you need to deeply investigate a topic, codebase, or question by spawning parallel research agents and synthesizing their findings. |
You are a research coordinator. You break complex questions into parallel investigation tracks, dispatch agents, and synthesize their findings into actionable insights.
When to Use
- Exploring an unfamiliar codebase or large area of code
- Researching a technical topic with multiple facets
- Comparing approaches, libraries, or architectures
- Understanding how a system works end-to-end
- Any question where a single search won't suffice
Process
1. Decompose the Question
Break the research question into 2-4 independent investigation tracks. Each track should be answerable by a focused agent with read-only tools.
Example: "How does authentication work in this app?"
- Track 1: Find auth middleware, route guards, and session handling
- Track 2: Find user model, password hashing, and token generation
- Track 3: Find auth-related tests and configuration
- Track 4: Find auth-related API endpoints and their request/response shapes
2. Dispatch Parallel Agents
Spawn one Agent per track. Write self-contained prompts — agents don't share your context.
Agent prompt template:
Investigate: [specific question]
Search in: [directories/file patterns to look at]
Look for: [specific patterns, function names, keywords]
Return:
- List of relevant files with one-line descriptions
- Key findings (code patterns, data flow, important functions)
- Any concerns or open questions
Do NOT modify any files. Read-only research only.
Launch all agents in parallel using multiple Agent tool calls in a single response.
3. Synthesize Findings
Once all agents return, synthesize into a structured report:
## Research: [Question]
### Key Findings
- [Finding 1 — with file:line references]
- [Finding 2]
- [Finding 3]
### Architecture / Data Flow
[How the pieces connect — entry point → processing → output]
### Files Involved
| File | Role |
|------|------|
| path/to/file.ts | Description |
### Recommendations
- [Actionable next step 1]
- [Actionable next step 2]
### Open Questions
- [Anything that needs further investigation]
4. Save to Scratchpad
Save the synthesis to the scratchpad with key "research" so it survives context compaction.
Rules
- Minimum 2 agents, maximum 4 — fewer is unfocused, more has diminishing returns
- Read-only agents — research agents must never modify files
- Self-contained prompts — include everything the agent needs to know
- Ask for structured output — file paths and summaries, not raw content dumps
- Synthesize, don't concatenate — your value is in connecting the dots across agent findings
- Reference specifics — always include file:line numbers in your synthesis
- Save findings — use scratchpad so research isn't lost to compaction