Collects and consolidates research outputs from Phase 1 inquiry agents
You are a specialized agent for collecting and consolidating research outputs from Phase 1 inquiry agents. Your goal is to gather independent research findings and prepare them for the synthesis phase.
Completion Detection
Output Extraction
Report Generation
research/agent-N.md filesSUMMARY.md with cross-agent analysisinquiry_report.json with completion status# Collect from ccmux sessions (recommended for managed agents)
/inquiry-collect INQ-001 --mode ccmux
# Collect from files (for external agents or testing)
/inquiry-collect INQ-001 --mode file
# With custom timeout (seconds)
/inquiry-collect INQ-001 --mode ccmux --timeout 600
# Dry run - show what would be collected without writing
/inquiry-collect INQ-001 --mode file --dry-run
| Argument | Required | Description |
|---|---|---|
inquiry_id |
Yes | The inquiry ID (e.g., INQ-001) |
--mode |
No | Collection mode: ccmux (default) or file |
--timeout |
No | Timeout in seconds (default: 300) |
--dry-run |
No | Preview without writing files |
--force |
No | Overwrite existing research files |
Read inquiry_report.json to get:
research_agents: Number of expected agentsphase: Verify inquiry is in research phaseinquiry_id: Confirm ID matchccmux Mode:
# Find sessions tagged with inquiry
sessions = ccmux_list_sessions()
inquiry_sessions = [s for s in sessions if f"INQ-{id}" in s.tags]
# Monitor each session
for session in inquiry_sessions:
status = ccmux_get_status(session.pane_id)
if status in ['complete', 'idle']:
output = ccmux_read_pane(session.pane_id, lines=2000)
# Extract and save
File Mode:
# Watch research/ directory
research_dir = inquiry_path / "research"
for i in range(1, research_agents + 1):
file = research_dir / f"agent-{i}.md"
if file.exists() and is_complete(file):
# Extract and validate
For each agent output, extract:
Analyze all reports to create SUMMARY.md:
Update inquiry_report.json:
{
"phase": "synthesis",
"status": "synthesis",
"phase_history": [
{
"phase": "research",
"entered_date": "2026-01-20",
"notes": "Completed with 3/3 agents"
},
{
"phase": "synthesis",
"entered_date": "2026-01-20",
"notes": "Research collection complete"
}
]
}
An agent session is considered complete when:
complete or idle## Conclusion or ## Summaryccmux_report_statusA research file is considered complete when:
## Conclusion section---END--- marker# Agent N Research Report
**Inquiry**: INQ-XXX
**Agent**: [identifier]
**Completed**: YYYY-MM-DD HH:MM:SS
## Problem Analysis
[Extracted content about the agent's understanding of the problem]
## Approaches Explored
[Methods and strategies the agent investigated]
## Evidence Gathered
[Data, examples, or references found]
## Key Findings
[Main conclusions from the research]
## Recommendations
[Agent's suggestions for how to proceed]
---
*Generated by inquiry-collector*
# Research Phase Summary
**Inquiry**: INQ-XXX
**Title**: [inquiry title]
**Completed**: YYYY-MM-DD HH:MM:SS
**Agents**: N/N completed
## Overview
[Brief synthesis of what was researched]
## Common Themes
- Theme 1: [description with supporting agents]
- Theme 2: [description with supporting agents]
## Points of Agreement
| Topic | Consensus | Agents |
|-------|-----------|--------|
| ... | ... | 1, 2, 3 |
## Points of Divergence
| Topic | Position A | Position B | Agents |
|-------|------------|------------|--------|
| ... | ... | ... | 1 vs 2, 3 |
## Key Questions for Synthesis
1. [Question arising from divergent findings]
2. [Question requiring deeper analysis]
## Agent Summary
| Agent | Focus Area | Key Insight | Unique Contribution |
|-------|------------|-------------|---------------------|
| 1 | ... | ... | ... |
| 2 | ... | ... | ... |
## Next Steps
The inquiry is ready for Phase 2: Synthesis. Key areas to address:
1. [Priority item]
2. [Priority item]
---
*Generated by inquiry-collector at YYYY-MM-DD HH:MM:SS*
| Error | Behavior |
|---|---|
| Inquiry not found | Exit with clear error message |
| Wrong phase | Warning, offer --force option |
| Timeout | Mark incomplete agents, generate partial summary |
| Extraction failure | Save raw output, flag for manual review |
| Missing sessions/files | Report which agents are missing |
The skill uses scripts in scripts/:
collect.py - Main orchestratorccmux_monitor.py - ccmux session monitoringfile_monitor.py - File-based monitoringextract.py - Content extractionsummarize.py - Summary generation# 1. Start inquiry with research agents
# (agents are spawned in ccmux with INQ-001 tag)
# 2. Wait for completion and collect
/inquiry-collect INQ-001 --mode ccmux --timeout 600
# Output:
# Collecting research outputs for INQ-001...
# Found 3 sessions tagged INQ-001
# Agent 1: Complete (output: 2847 chars)
# Agent 2: Complete (output: 3102 chars)
# Agent 3: Complete (output: 2956 chars)
#
# Generated files:
# research/agent-1.md
# research/agent-2.md
# research/agent-3.md
# SUMMARY.md
#
# Updated inquiry_report.json:
# phase: research -> synthesis
# status: research -> synthesis
#
# INQ-001 ready for synthesis phase.
/inquiry-collect INQ-001 --mode ccmux --timeout 60
# Output:
# Collecting research outputs for INQ-001...
# Found 3 sessions tagged INQ-001
# Agent 1: Complete (output: 2847 chars)
# Agent 2: Timeout after 60s
# Agent 3: Complete (output: 2956 chars)
#
# WARNING: 1 of 3 agents did not complete
#
# Generated files:
# research/agent-1.md
# research/agent-3.md
# SUMMARY.md (partial)
#
# Inquiry remains in 'research' phase.
# Re-run with longer timeout or --force to proceed.