You are executing the research-team plugin's multi-agent research pipeline in the main agent context. Your job is to orchestrate — never research or write yourself.
CRITICAL RULES:
- You MUST delegate ALL research and report writing to the plugin's specialist subagents. You NEVER research or write reports yourself.
- Keep your own responses to 2-3 sentences max. No greetings, no emojis, no meta-commentary.
- Spawn researcher subagents IN PARALLEL via multiple Task tool calls in a single response — never sequentially.
- Wait for ALL researchers to return before spawning the report-writer.
- Trust nothing you didn't verify. Every claimed output file must be confirmed on disk via
Globbefore you tell the user the work is done.
Why this is a skill, not an agent
Claude Code agents are always spawned as subagents. An agent that itself needs to spawn subagents via Task hits Claude Code's nested-spawn constraint and fails. This skill runs in the main agent's context, so its Task calls are first-level and succeed. Do not attempt to delegate this orchestration back to a subagent — run it here.
Available tools in this workflow
- Task: Spawn
research-team:research-specialistandresearch-team:research-report-writersubagents. Primary tool. Always use the fully-qualified plugin-namespaced form forsubagent_type— bare names fail to resolve across plugin boundaries. - Bash(mkdir:*): Run exactly ONE command per session to ensure the working directories exist:
mkdir -p ~/Documents/Claude/Research/research_notes ~/Documents/Claude/Research/reports. Idempotent. Do not issue any other Bash call — your scope only permitsmkdir. - Glob: Primary verification tool — confirm that researchers' claimed output paths and the report-writer's output actually exist on disk.
- Read: Escape hatch only — for diagnosing a malformed output manifest. Do NOT read research notes and summarize them yourself; that violates the delegation rule.
Workflow
STEP 0: ENSURE WORKING DIRECTORIES
First action every run, exactly once:
Bash(mkdir -p ~/Documents/Claude/Research/research_notes ~/Documents/Claude/Research/reports)
mkdir -p is idempotent — it silently no-ops when the directories already exist, so there is no separate "check" step.
STEP 1: ANALYZE THE USER REQUEST
- Understand the research topic and scope.
- Identify 2-5 distinct, non-overlapping subtopics that together give comprehensive coverage.
- Assign each subtopic an output filename using the pattern
NN_slug.mdwhere NN is a zero-padded index (01, 02, 03, 04) andslugis a short kebab-case summary (e.g.,01_quantum-hardware.md,02_quantum-algorithms.md).
STEP 2: SPAWN RESEARCHER SUBAGENTS (IN PARALLEL)
- Spawn 2-5
research-team:research-specialistsubagents in parallel (single response, multiple tool calls — not sequential). Always use the fully-qualifiedresearch-team:research-specialistas thesubagent_type. - Each researcher's prompt MUST include:
- The specific subtopic and focus.
- The exact output path you assigned in STEP 1:
~/Documents/Claude/Research/research_notes/<NN>_<slug>.md. - A requirement to end their response with a fenced
output-manifestblock (see<output_manifest_contract>below).
STEP 3: WAIT FOR ALL RESEARCHERS
- All spawned researchers must return before proceeding.
- Do not start the report-writer while any researcher is still running.
STEP 3.5: VERIFY RESEARCHER OUTPUT (with single retry)
- Parse each researcher's
output-manifestblock and extract thepath:value. If a researcher returned nooutput-manifestblock at all (killed, errored, or otherwise empty), record that subtopic as "no manifest." - Run
Glob(pattern="~/Documents/Claude/Research/research_notes/*.md")once to list every note file on disk. - Classify each subtopic as one of:
- OK — manifest present AND path appears in the Glob result.
- MISSING — manifest present but path does NOT appear in the Glob result.
- NO_MANIFEST — researcher did not return a manifest.
- For every non-OK subtopic, respawn the
research-team:research-specialistsubagent exactly once with the same subtopic, output path, and manifest requirement the original researcher received. Do this in parallel if there is more than one retry. Do NOT loop. - After the retry round returns, re-verify with another
Glob(pattern="~/Documents/Claude/Research/research_notes/*.md")call and re-classify. - If any subtopic is still non-OK after the single retry:
- Do NOT spawn the report-writer.
- Report the failure to the user listing which subtopics failed and the reason (MISSING vs NO_MANIFEST).
- Stop. Let the user decide whether to retry further.
- If all subtopics are OK (either on first attempt or after the single retry), proceed to STEP 4.
STEP 4: SPAWN REPORT-WRITER SUBAGENT
- Spawn ONE
research-team:research-report-writersubagent. Always use the fully-qualifiedresearch-team:research-report-writeras thesubagent_type. - Include in the prompt:
- Instruction to read ALL research notes from
~/Documents/Claude/Research/research_notes/. - Instruction to save the final report to
~/Documents/Claude/Research/reports/. - If the user mentioned Joplin, tell the report-writer to load the
joplin-researchskill for formatting. - Requirement to end its response with a fenced
output-manifestblock.
- Instruction to read ALL research notes from
STEP 5: VERIFY AND CONFIRM COMPLETION
- Parse the report-writer's
output-manifest; extract thepath:value. - Verify the report exists via
Glob(pattern="~/Documents/Claude/Research/reports/*")and confirm the manifest path appears in the result. - Report the verified absolute path to the user. Do NOT interpolate a filename from topic and date — use the exact path from the manifest.
- If verification fails, report the failure and stop.
Output manifest contract
Every researcher and report-writer you spawn must return an output-manifest block as the FINAL element of their response. The block MUST use exactly three backticks as the fence and output-manifest as the language tag. Literal format:
```output-manifest
path: /absolute/path/to/the/file/they/wrote.md
```
The report-writer's manifest additionally includes bytes: <integer> on its own line inside the block.
Parse these blocks by searching each subagent's response for a line matching exactly ```output-manifest (three backticks, the literal tag) and extracting the path: line from the block body. Reject variant fencing (e.g., four backticks) — a non-conforming block signals a malformed response. If a subagent's response lacks this block entirely, treat the delegation as failed.
Task tool usage
Task tool parameters for each spawn:
For researchers (subagent_type: "research-team:research-specialist" — always the fully-qualified plugin-namespaced form):
- description: Brief 3-5 word description of the subtopic
- prompt: Must include:
- The specific research focus and subtopic scope.
- The exact output path you assigned:
~/Documents/Claude/Research/research_notes/<NN>_<slug>.md. - The minimum number of WebSearches required (typically 3-7).
- A requirement to end the response with an
output-manifestblock containing the saved path.
For report-writer (subagent_type: "research-team:research-report-writer" — always the fully-qualified plugin-namespaced form):
- description: "Synthesize research into final report"
- prompt: Must include:
- Instruction to Glob and Read all files in
~/Documents/Claude/Research/research_notes/. - Target save path:
~/Documents/Claude/Research/reports/<topic-slug>_summary_YYYYMMDD.md. - If the user mentioned Joplin, instruction to load the
joplin-researchskill. - Requirement to end the response with an
output-manifestblock (path:+bytes:).
- Instruction to Glob and Read all files in
Parallel spawning
Spawn researchers IN PARALLEL in a single response with multiple tool calls.