Research Resume Skill
Resume work on a research plan. Handles three states: spawning agents, checking progress, and synthesizing findings.
Process
Scan for research plans:
- Look for
research/NNNN-*/research-plan.md files (exclude research/archive/)
- A research plan is active if its
.research-state.json has status other than "complete" or "archived"
- If no state file exists, treat as active if the research-plan.md exists
Handle different scenarios:
No active research found:
No active research plans found in `research/`.
To create a new research plan, use `/research:create <topic description>`.
Multiple active research plans:
List all and ask user to choose:
Found multiple active research plans:
1. `research/0001-edge-routing/` - Status: in_progress (3/5 questions complete)
2. `research/0002-layout-algo/` - Status: planned (not started)
Which research plan would you like to resume?
Single plan found: Proceed to state-based handling below.
Read .research-state.json and handle based on status:
State: planned (agents not yet spawned)
- Display the research plan summary
- Ask user to confirm they want to start the research
- Spawn parallel subagents using the Task tool:
- Use
subagent_type=Explore for codebase investigation questions
- Use
subagent_type=general-purpose for questions requiring web research or multi-source analysis
- Launch all agents in a single message with multiple Task tool calls for true parallelism
- Each agent's prompt should include:
- The specific question to investigate
- The where/what/how/why framework from the research plan
- The sources to consult
- Instructions to write findings to the output file using the findings template
- The full path to the output file:
research/NNNN-topic/qN-filename.md
- Run agents in the background using
run_in_background: true so they execute in parallel
- Collect agent IDs from all Task results
- Update
.research-state.json:{
"status": "in_progress",
"updated_at": "...",
"agent_ids": ["agent-1-id", "agent-2-id", "agent-3-id"],
...
}
- Update
research-plan.md status to IN PROGRESS and update the Expected Outputs table statuses
- Display:
**Research started:** `research/NNNN-topic-name/`
**Agents spawned:** N parallel investigations
**Agent IDs:** `id1`, `id2`, `id3`
Agents are running in the background. Run `/research:resume` to check progress and synthesize findings when complete.
State: in_progress (agents spawned, awaiting completion)
Check each agent's output file — if the file exists and has content, that question is complete
Read completed findings files to verify they have substantive content
Update research-plan.md Expected Outputs table with current status
Display progress:
**Research progress:** `research/NNNN-topic-name/`
**Questions:** X/N complete
**Complete:**
- Q1: [Title] -> `q1-file.md`
- Q3: [Title] -> `q3-file.md`
**Pending:**
- Q2: [Title] -> `q2-file.md` (agent: `id2`)
If all questions complete, proceed to synthesis (see below)
If some are pending, offer to:
- Wait and check again later (
/research:resume)
- Proceed to partial synthesis with available findings
- Re-spawn failed agents
State: in_progress with all questions complete -> Synthesis
Read all findings files
Synthesize findings into synthesis.md:
# Research Synthesis: Topic Name
## Summary
[3-5 sentence executive summary of all findings]
## Key Findings
### [Finding 1 title]
[Cross-cutting finding that draws from multiple questions]
### [Finding 2 title]
[Another cross-cutting finding]
## Recommendations
1. **[Recommendation]** — [Rationale based on findings]
2. **[Recommendation]** — [Rationale]
## Where/What/How/Why Summary
| Aspect | Key Points |
|--------|------------|
| **Where** | [Key locations/sources identified] |
| **What** | [Core facts discovered] |
| **How** | [Key mechanisms understood] |
| **Why** | [Design rationale and tradeoffs] |
## Open Questions
- [Questions that emerged and may warrant deeper research]
## Next Steps
- [ ] [Suggested follow-up action]
- [ ] [Suggested follow-up action]
## Source Files
| File | Question |
|------|----------|
| `q1-file.md` | Q1: Title |
| `q2-file.md` | Q2: Title |
Update .research-state.json:
{
"status": "synthesized",
"updated_at": "...",
"synthesis_agent_id": null,
"last_session_notes": "Synthesis complete. N findings, M recommendations.",
...
}
Note: synthesis_agent_id is null when synthesis is done inline. Set it to an agent ID if a separate agent performed synthesis.
Update research-plan.md status to SYNTHESIZED and mark synthesis as complete in Expected Outputs
Display:
**Research synthesized:** `research/NNNN-topic-name/`
**Findings:** N questions answered
**Synthesis:** `synthesis.md`
**Key findings:**
- [Finding 1]
- [Finding 2]
**Recommendations:**
- [Recommendation 1]
- [Recommendation 2]
To create an implementation plan based on this research, run `/plan:create` and reference `research/NNNN-topic-name/`.
To archive this research, run `/research:archive NNNN`.
State: synthesized (synthesis complete)
- Display the synthesis summary
- Offer options:
- Create a deeper investigation on a subtopic (hierarchical research)
- Create an implementation plan based on findings
- Archive the research
Deeper Investigation (Hierarchical Research)
If the user wants to investigate a subtopic further:
- Create
research/NNNN-topic/subtopic-name/ subdirectory
- Create a new
research-plan.md and .research-state.json inside it
- The parent research's synthesis should note the child investigation
- Follow the same create/resume lifecycle for the child
Session Notes
Before ending any session, update .research-state.json with:
updated_at: current UTC timestamp
last_session_notes: summary of what happened and what to do next
1---2name: research-resume3description: Resume a research plan. Spawns parallel agents if not started, checks progress, or synthesizes findings.4---5
6# Research Resume Skill
7
8Resume work on a research plan. Handles three states: spawning agents, checking progress, and synthesizing findings.
9
10## Process
11
121. **Scan for research plans:**
13 - Look for `research/NNNN-*/research-plan.md` files (exclude `research/archive/`)
14 - A research plan is active if its `.research-state.json` has `status` other than `"complete"` or `"archived"`
15 - If no state file exists, treat as active if the research-plan.md exists
16
172. **Handle different scenarios:**
18
19 **No active research found:**
20 ```
21 No active research plans found in `research/`.
22
23 To create a new research plan, use `/research:create <topic description>`.
24 ```
25
26 **Multiple active research plans:**
27 List all and ask user to choose:
28 ```
29 Found multiple active research plans:
30
31 1. `research/0001-edge-routing/` - Status: in_progress (3/5 questions complete)
32 2. `research/0002-layout-algo/` - Status: planned (not started)
33
34 Which research plan would you like to resume?
35 ```
36
37 **Single plan found:** Proceed to state-based handling below.
38
393. **Read `.research-state.json`** and handle based on status:
40
41### State: `planned` (agents not yet spawned)
42
431. Display the research plan summary
442. Ask user to confirm they want to start the research
453. **Spawn parallel subagents** using the Task tool:
46 - Use `subagent_type=Explore` for codebase investigation questions
47 - Use `subagent_type=general-purpose` for questions requiring web research or multi-source analysis
48 - **Launch all agents in a single message** with multiple Task tool calls for true parallelism
49 - Each agent's prompt should include:
50 - The specific question to investigate
51 - The where/what/how/why framework from the research plan
52 - The sources to consult
53 - Instructions to write findings to the output file using the findings template
54 - The full path to the output file: `research/NNNN-topic/qN-filename.md`
55 - **Run agents in the background** using `run_in_background: true` so they execute in parallel
564. **Collect agent IDs** from all Task results
575. **Update `.research-state.json`:**
58 ```json
59 {
60 "status": "in_progress",
61 "updated_at": "...",
62 "agent_ids": ["agent-1-id", "agent-2-id", "agent-3-id"],
63 ...
64 }
65 ```
666. **Update `research-plan.md`** status to `IN PROGRESS` and update the Expected Outputs table statuses
677. Display:
68 ```
69 **Research started:** `research/NNNN-topic-name/`
70 **Agents spawned:** N parallel investigations
71 **Agent IDs:** `id1`, `id2`, `id3`
72
73 Agents are running in the background. Run `/research:resume` to check progress and synthesize findings when complete.
74 ```
75
76### State: `in_progress` (agents spawned, awaiting completion)
77
781. **Check each agent's output file** — if the file exists and has content, that question is complete
792. **Read completed findings files** to verify they have substantive content
803. **Update `research-plan.md`** Expected Outputs table with current status
814. Display progress:
82 ```
83 **Research progress:** `research/NNNN-topic-name/`
84 **Questions:** X/N complete
85
86 **Complete:**
87 - Q1: [Title] -> `q1-file.md`
88 - Q3: [Title] -> `q3-file.md`
89
90 **Pending:**
91 - Q2: [Title] -> `q2-file.md` (agent: `id2`)
92 ```
93
945. **If all questions complete**, proceed to synthesis (see below)
956. **If some are pending**, offer to:
96 - Wait and check again later (`/research:resume`)
97 - Proceed to partial synthesis with available findings
98 - Re-spawn failed agents
99
100### State: `in_progress` with all questions complete -> Synthesis
101
1021. **Read all findings files**
1032. **Synthesize findings** into `synthesis.md`:
104
105 ```markdown
106 # Research Synthesis: Topic Name
107
108 ## Summary
109
110 [3-5 sentence executive summary of all findings]
111
112 ## Key Findings
113
114 ### [Finding 1 title]
115 [Cross-cutting finding that draws from multiple questions]
116
117 ### [Finding 2 title]
118 [Another cross-cutting finding]
119
120 ## Recommendations
121
122 1. **[Recommendation]** — [Rationale based on findings]
123 2. **[Recommendation]** — [Rationale]
124
125 ## Where/What/How/Why Summary
126
127 | Aspect | Key Points |
128 |--------|------------|
129 | **Where** | [Key locations/sources identified] |
130 | **What** | [Core facts discovered] |
131 | **How** | [Key mechanisms understood] |
132 | **Why** | [Design rationale and tradeoffs] |
133
134 ## Open Questions
135
136 - [Questions that emerged and may warrant deeper research]
137
138 ## Next Steps
139
140 - [ ] [Suggested follow-up action]
141 - [ ] [Suggested follow-up action]
142
143 ## Source Files
144
145 | File | Question |
146 |------|----------|
147 | `q1-file.md` | Q1: Title |
148 | `q2-file.md` | Q2: Title |
149 ```
150
1513. **Update `.research-state.json`:**
152 ```json
153 {
154 "status": "synthesized",
155 "updated_at": "...",
156 "synthesis_agent_id": null,
157 "last_session_notes": "Synthesis complete. N findings, M recommendations.",
158 ...
159 }
160 ```
161 Note: `synthesis_agent_id` is null when synthesis is done inline. Set it to an agent ID if a separate agent performed synthesis.
162
1634. **Update `research-plan.md`** status to `SYNTHESIZED` and mark synthesis as complete in Expected Outputs
1645. Display:
165 ```
166 **Research synthesized:** `research/NNNN-topic-name/`
167 **Findings:** N questions answered
168 **Synthesis:** `synthesis.md`
169
170 **Key findings:**
171 - [Finding 1]
172 - [Finding 2]
173
174 **Recommendations:**
175 - [Recommendation 1]
176 - [Recommendation 2]
177
178 To create an implementation plan based on this research, run `/plan:create` and reference `research/NNNN-topic-name/`.
179
180 To archive this research, run `/research:archive NNNN`.
181 ```
182
183### State: `synthesized` (synthesis complete)
184
1851. Display the synthesis summary
1862. Offer options:
187 - Create a deeper investigation on a subtopic (hierarchical research)
188 - Create an implementation plan based on findings
189 - Archive the research
190
191### Deeper Investigation (Hierarchical Research)
192
193If the user wants to investigate a subtopic further:
194
1951. Create `research/NNNN-topic/subtopic-name/` subdirectory
1962. Create a new `research-plan.md` and `.research-state.json` inside it
1973. The parent research's synthesis should note the child investigation
1984. Follow the same create/resume lifecycle for the child
199
200## Session Notes
201
202Before ending any session, update `.research-state.json` with:
203- `updated_at`: current UTC timestamp
204- `last_session_notes`: summary of what happened and what to do next