Deep research on a topic with parallel sub-agents
Orchestrate comprehensive research using parallel sub-agents to investigate codebase patterns, documentation, and community best practices. Use this when you need deep, multi-source insights before making architectural decisions or implementing complex features.
/plugin marketplace add benshapyro/cadre-devkit-claude/plugin install benshapyro-cadre-devkit-claude@benshapyro/cadre-devkit-claudetopic or questionOrchestrate comprehensive research using multiple parallel sub-agents.
If no topic provided, ask for one.
Before proposing a research plan:
Suggest a tailored research plan. Dynamically determine which research agents are needed:
Possible Research Dimensions:
| Dimension | When to Include |
|---|---|
| Codebase - Existing Patterns | Feature touches existing code |
| Codebase - Architecture | Architectural decision needed |
| Codebase - Frontend | UI/UX or frontend changes |
| Codebase - Backend | API/database/server changes |
| Codebase - Infrastructure | DevOps, deployment, CI/CD |
| Documentation - Framework | Using framework features |
| Documentation - Libraries | Using external libraries |
| Documentation - APIs | Integrating external services |
| Community - Best Practices | Common patterns and anti-patterns |
| Community - Recent Changes | Library updates, deprecations |
Output Format:
## Research Plan: [topic]
Based on your question and this project's context, I recommend:
### Proposed Research Agents (N)
1. **[Category] [Specific Focus]**
- What: [What this agent will investigate]
- Why: [Why this is relevant to your question]
2. **[Category] [Specific Focus]**
- What: [description]
- Why: [relevance]
[...more as needed...]
### Questions Before Proceeding
- [Any clarifying question if the request is ambiguous]
---
Proceed with this plan? (yes / adjust / add more / cancel)
Wait for user to:
Once approved, spawn agents using the Task tool:
For EACH approved research dimension:
- Use Task tool with appropriate subagent_type
- Prompt should specify exactly what to find
- Request structured findings in return
Subagent mapping:
subagent_type: "Explore"subagent_type: "documentation-researcher"subagent_type: "documentation-researcher" with web searchIMPORTANT: Spawn all agents in a SINGLE message with multiple Task tool calls for parallel execution.
After all agents return:
Output Format:
## Research Findings: [topic]
### Summary
[2-3 sentence executive summary]
### Key Discoveries
#### From Codebase
- [Finding 1 with file:line references]
- [Finding 2]
#### From Documentation
- [Finding 1 with source links]
- [Finding 2]
#### From Community
- [Best practice or pattern]
- [Common pitfall to avoid]
### Recommendations
1. [Actionable recommendation]
2. [Another recommendation]
### Next Steps
- [ ] [Suggested action]
- [ ] [Another action]
---
Save these findings? (`/progress` to create knowledge document)
User: /research "how should we implement caching"
Claude Response:
## Research Plan: Implementing Caching
Based on your Next.js + PostgreSQL project, I recommend:
### Proposed Research Agents (4)
1. **Codebase - Existing Patterns**
- What: Search for any existing caching (Redis, in-memory, HTTP cache headers)
- Why: Avoid duplicating or conflicting with existing caching
2. **Codebase - Data Access Layer**
- What: Understand current database queries and ORM patterns
- Why: Identify cache invalidation points
3. **Documentation - Next.js Caching**
- What: Next.js 14 caching strategies (ISR, Route Handlers, fetch cache)
- Why: Use framework-native caching before adding external solutions
4. **Community - Best Practices**
- What: Redis vs in-memory vs CDN caching patterns for your stack
- Why: Learn from others' mistakes and successes
---
Proceed with this plan?