Deep Research Investigation
Orchestrates iterative deep research with user-guided exploration and parallel subagents
Check if Research Topics has existing research on this topic or related topics.
If found: "I have existing research on [topic/related]. Want to build on it or start fresh?"
Clarify the research topic with the user. Ask:
- What specific topic do you want to research?
- What's driving this research? (decision, learning, preparation)
- Preferred depth: Quick Overview (1-2 rounds), Moderate (3-4 rounds), or Comprehensive (5+ rounds)?
If user already specified the topic clearly, skip to decomposition.
INITIAL LANDSCAPE SCAN
Decompose the topic into 4-6 research branches using the guide. Common branch types:
- Fundamentals: Core concepts, definitions, how it works
- Players: Key companies, people, organizations involved
- Applications: Use cases, implementations, real-world examples
- Timeline: History, current state, future projections
- Controversies: Debates, risks, criticisms, open questions
- Economics: Market size, costs, business models
For each branch, formulate a specific search query.
PARALLEL SEARCH EXECUTION (Round 1)
Execute 4-6 web searches in parallel using @tool/websearch for each branch.
For each search:
- Use specific, well-formed queries (not vague terms)
- Extract 3-5 key facts with source URLs
- Note confidence level (High: multiple sources agree, Medium: single reliable source, Low: limited/conflicting info)
CREATE RESEARCH STATE
Write the JSON state to Research Map with this structure:
{
"topic": "Topic Name",
"depth": "Quick|Moderate|Comprehensive",
"round": 1,
"explored": [
{
"branch": "Fundamentals",
"summary": "One-line key finding",
"sources": ["url1", "url2"],
"confidence": "high|medium|low"
}
],
"available": [
{"branch": "Timeline", "preview": "What we'd learn if explored"}
],
"suggested_deep_dives": [
"Specific question raised by findings?"
],
"history": [
{"round": 1, "branches": ["Fundamentals", "Players"], "timestamp": "ISO date"}
]
} CREATE RESEARCH MAP DISPLAY
Write the human-readable markdown to Research Map Display:
## Research Map: [Topic]
**Depth:** [Quick/Moderate/Comprehensive] | **Round:** 1 | **Sources:** [count]
### Explored
- [x] [Branch] — [One-line summary of key finding]
### Available to Explore
- [ ] [Branch] — [What we'd learn, suggested searches]
### Suggested Deep Dives
1. "[Specific question]" (based on [finding that raised this question])
2. "[Specific question]" (connects [branch A] + [branch B])
### Key Findings So Far
[2-3 paragraph synthesis of most important discoveries]
### Sources
- [Source title](URL) — used for [which claims]
---
**What should I explore next?** Pick branches above, suggest your own direction, or say "finalize" for the full report.Present this map to the user and wait for their direction.
USER-DIRECTED EXPLORATION LOOP
Based on user selection:
If user picks branches: Use task tool to spawn Research Branch Exploration in parallel for each branch. Provide: branch_name, parent_context, search_queries (2-4), depth_target. Subagents write to
Branch Findings. Wait for completion.
If user asks a question: Treat as new branch, spawn single subagent.
If user says "continue": Select top 2-3 suggested deep dives, spawn subagents.
If user says "finalize": Proceed to final report generation.
AGGREGATE FINDINGS
After subagents complete:
- Read all files from
Branch Findings
- Increment the round counter in
Research Map
- Add newly explored branches to the "explored" array
- Update "available" with remaining unexplored branches
- Generate new "suggested_deep_dives" based on findings
- Add this round to the "history" array
- Update
Research Map Display with new state
- Delete the processed files from
Branch Findings
Present updated map and repeat the exploration loop until user indicates satisfaction.
GENERATE FINAL REPORT
When user is satisfied, synthesize all findings using the structure from the synthesis guide.
Save to Research Reports with filename like {topic}-research-{date}.md
Include:
- Executive Summary (3-5 sentences)
- Key Findings by theme (not by search order)
- Timeline & Context (if explored)
- Key Players (if explored)
- Open Questions (honest about gaps)
- Confidence Assessment (claim-level and section-level)
- Sources (organized by topic, with descriptions)
- Reading time estimate (~250 words per minute)
Present the report location to user and offer to explore any remaining questions.
Add an entry to Research Topics (filename: topic-slug.md):
- Topic name
- Summary (2-3 sentences)
- Link to full report in
Research Reports
- Key findings (3-5 bullets)
- Date researched
This indexes the research for future discovery.
You MUST use a todo list to complete these steps in order. Never move on to one step if you haven't completed the previous step. If you have multiple CONSECUTIVE read steps in a row, read them all at once (in parallel). Otherwise, do not read a file until you reach that step.
Add all steps to your todo list now and begin executing.
## Steps
1. [Read Deep Research Strategy Guide]: Read the documentation in: `skills/sauna/[skill_id]/references/research.deep.guide.md` (Load topic decomposition strategy)
2. [Read Research Topics]: Discover relevant information in the user's filesystem at `documents/knowledge/research/topics/*.md`. (Check for existing research on this topic)
3. Check if `documents/knowledge/research/topics/*.md` has existing research on this topic or related topics.
If found: "I have existing research on [topic/related]. Want to build on it or start fresh?"
Clarify the research topic with the user. Ask:
1. What specific topic do you want to research?
2. What's driving this research? (decision, learning, preparation)
3. Preferred depth: Quick Overview (1-2 rounds), Moderate (3-4 rounds), or Comprehensive (5+ rounds)?
If user already specified the topic clearly, skip to decomposition.
4. INITIAL LANDSCAPE SCAN
Decompose the topic into 4-6 research branches using the guide. Common branch types:
- Fundamentals: Core concepts, definitions, how it works
- Players: Key companies, people, organizations involved
- Applications: Use cases, implementations, real-world examples
- Timeline: History, current state, future projections
- Controversies: Debates, risks, criticisms, open questions
- Economics: Market size, costs, business models
For each branch, formulate a specific search query.
5. PARALLEL SEARCH EXECUTION (Round 1)
Execute 4-6 web searches in parallel using @tool/websearch for each branch.
For each search:
- Use specific, well-formed queries (not vague terms)
- Extract 3-5 key facts with source URLs
- Note confidence level (High: multiple sources agree, Medium: single reliable source, Low: limited/conflicting info)
6. CREATE RESEARCH STATE
Write the JSON state to `session/research-map.json` with this structure:
```json
{
"topic": "Topic Name",
"depth": "Quick|Moderate|Comprehensive",
"round": 1,
"explored": [
{
"branch": "Fundamentals",
"summary": "One-line key finding",
"sources": ["url1", "url2"],
"confidence": "high|medium|low"
}
],
"available": [
{"branch": "Timeline", "preview": "What we'd learn if explored"}
],
"suggested_deep_dives": [
"Specific question raised by findings?"
],
"history": [
{"round": 1, "branches": ["Fundamentals", "Players"], "timestamp": "ISO date"}
]
}
```
7. CREATE RESEARCH MAP DISPLAY
Write the human-readable markdown to `session/research-map.md`:
```markdown
## Research Map: [Topic]
**Depth:** [Quick/Moderate/Comprehensive] | **Round:** 1 | **Sources:** [count]
### Explored
- [x] [Branch] — [One-line summary of key finding]
### Available to Explore
- [ ] [Branch] — [What we'd learn, suggested searches]
### Suggested Deep Dives
1. "[Specific question]" (based on [finding that raised this question])
2. "[Specific question]" (connects [branch A] + [branch B])
### Key Findings So Far
[2-3 paragraph synthesis of most important discoveries]
### Sources
- [Source title](URL) — used for [which claims]
---
**What should I explore next?** Pick branches above, suggest your own direction, or say "finalize" for the full report.
```
Present this map to the user and wait for their direction.
8. USER-DIRECTED EXPLORATION LOOP
Based on user selection:
**If user picks branches:** Use task tool to spawn `skills/sauna/[skill_id]/references/recipes/research.deep.branch.md` in parallel for each branch. Provide: branch_name, parent_context, search_queries (2-4), depth_target. Subagents write to `session/branch-findings/*.json`. Wait for completion.
**If user asks a question:** Treat as new branch, spawn single subagent.
**If user says "continue":** Select top 2-3 suggested deep dives, spawn subagents.
**If user says "finalize":** Proceed to final report generation.
9. AGGREGATE FINDINGS
After subagents complete:
1. Read all files from `session/branch-findings/*.json`
2. Increment the round counter in `session/research-map.json`
3. Add newly explored branches to the "explored" array
4. Update "available" with remaining unexplored branches
5. Generate new "suggested_deep_dives" based on findings
6. Add this round to the "history" array
7. Update `session/research-map.md` with new state
8. Delete the processed files from `session/branch-findings/*.json`
Present updated map and repeat the exploration loop until user indicates satisfaction.
10. [Read Research Synthesis Guide]: Read the documentation in: `skills/sauna/[skill_id]/references/research.deep.synthesis.md` (Load synthesis and report structure guidance)
11. GENERATE FINAL REPORT
When user is satisfied, synthesize all findings using the structure from the synthesis guide.
Save to `documents/knowledge/research/reports/*.md` with filename like {topic}-research-{date}.md
Include:
- Executive Summary (3-5 sentences)
- Key Findings by theme (not by search order)
- Timeline & Context (if explored)
- Key Players (if explored)
- Open Questions (honest about gaps)
- Confidence Assessment (claim-level and section-level)
- Sources (organized by topic, with descriptions)
- Reading time estimate (~250 words per minute)
Present the report location to user and offer to explore any remaining questions.
12. Add an entry to `documents/knowledge/research/topics/*.md` (filename: topic-slug.md):
- Topic name
- Summary (2-3 sentences)
- Link to full report in `documents/knowledge/research/reports/*.md`
- Key findings (3-5 bullets)
- Date researched
This indexes the research for future discovery.