deep-research-synthesizer
Given outputs from 5 research sub-agents (time-sliced or partitioned), validate and synthesize them into a coherent, citation-backed Markdown deep research report with deduplication, contradiction handling, and explicit debug visibility when inputs are missing or malformed.
$ Installer
git clone https://github.com/anthony-maio/pieces-agent-skills /tmp/pieces-agent-skills && cp -r /tmp/pieces-agent-skills/deep-research-synthesizer ~/.claude/skills/pieces-agent-skills// tip: Run this command in your terminal to install the skill
name: deep-research-synthesizer description: Given outputs from 5 research sub-agents (time-sliced or partitioned), validate and synthesize them into a coherent, citation-backed Markdown deep research report with deduplication, contradiction handling, and explicit debug visibility when inputs are missing or malformed. license: MIT compatibility: Framework-agnostic; assumes you can run 5 sub-agents and collect their text outputs (Markdown with a JSON packet header recommended). metadata: author: github.com/anthony-maio version: "1.0"
Deep Research Synthesizer
Use this skill when you have five sub-agent research results and need to produce a single high-quality Markdown report that:
- answers the userâs question directly
- preserves evidence + citations
- removes duplication
- flags contradictions and gaps
- never âsilently failsâ when one agent output is missing or malformed
This skill is designed to fix a common anti-pattern: a coordinator prompts 5 agents, then tries to âjust synthesizeâ without a contract, validation, or observability.
Inputs expected (minimum)
-
user_questionâ the userâs original question (verbatim) -
agent_outputs[5]â one output per agent.
Each output MUST follow the Research Packet Contract (seereferences/AGENT_PACKET_CONTRACT.md).
If you cannot guarantee the contract, run scripts/validate_packets.py and repair nonconforming outputs before synthesis.
The 5-agent pattern that works
Step 1 â Partition the work (pick ONE strategy)
Strategy A: Time slicing (good for âwhat happenedâ / âhow it evolvedâ)
- Agent 1: earliest timeframe
- Agent 2: next window
- âŠ
- Agent 5: most recent window + âwhat changed recentlyâ
Strategy B: Source slicing (good for broad topics)
- Agent 1: primary sources / official docs
- Agent 2: academic papers / standards
- Agent 3: practitioner writeups
- Agent 4: competing viewpoints / critiques
- Agent 5: synthesis + âwhat you should doâ recommendations
Strategy C: Sub-question slicing
- Agent 1: definitions / scope
- Agent 2: current state
- Agent 3: failure modes / risks
- Agent 4: options + tradeoffs
- Agent 5: recommendations + decision framework
Step 2 â Enforce the Research Packet Contract
Every agent must output:
- a machine-parseable JSON âpacket headerâ
- a short narrative
- a âRun Logâ with searches + errors
Contract details: references/AGENT_PACKET_CONTRACT.md.
Step 3 â Validate before you synthesize
Run:
python scripts/validate_packets.py --in packets/
Fix failures immediately:
- missing sources
- missing claims/evidence mapping
- missing run logs
- malformed JSON
Step 4 â Normalize + deduplicate
Use:
python scripts/merge_packets.py --in packets/ --out merged.json
Then synthesize using the report template:
references/REPORT_TEMPLATE.md- include contradictions + gaps explicitly
Step 5 â Synthesize the final report (Markdown)
Write the report in this order:
- Executive Summary (5â10 bullets)
- Direct Answer (2â6 paragraphs)
- Key Findings (grouped, deduped)
- Evidence & Citations (trace claims â sources)
- Contradictions / Uncertainties (what doesnât match)
- Recommendations (actionable, prioritized)
- Appendix
- per-agent âRun Logâ
- per-agent âRaw Findingsâ (optional)
Step 6 â QA checklist (do not skip)
Use references/QA_CHECKLIST.md.
If you canât pass the checklist due to missing info, output a partial report and explicitly list:
- which agents failed
- what is missing
- what follow-up tasks would resolve it
Failure-handling requirements (what stops âconstant failuresâ)
1) Never hide missing agent outputs
If any agent output is missing/empty:
- produce the report anyway
- mark the missing agent as âNO DATAâ
- do not invent what it âwould have foundâ
2) Surface tool errors verbatim
If an agent hit a tool error (HTTP, MCP, API):
- carry the raw error into the appendix
- summarize the impact in âLimitationsâ
3) Preserve traceability
Every major claim must have:
- source id(s)
- agent id
- confidence
This avoids âbig report looks plausible but canât be debugged.â
Files in this skill
References
references/AGENT_PACKET_CONTRACT.mdâ required output format for sub-agentsreferences/REPORT_TEMPLATE.mdâ Markdown structure + guidancereferences/QA_CHECKLIST.mdâ deterministic quality gatesreferences/FAILURE_MODES.mdâ common causes of synthesis failure + mitigations
Scripts
scripts/validate_packets.pyâ validates packet conformance and prints actionable errorsscripts/merge_packets.pyâ merges packets into a single normalized JSON filescripts/render_report_skeleton.pyâ generates a Markdown skeleton from merged JSON
Repository
