Skill: Inquiry Output Collector
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.
Capabilities
- •
Completion Detection
- •Monitor ccmux sessions tagged with inquiry ID for completion
- •Watch inquiry research/ directory for file-based completion
- •Handle timeouts and partial completions gracefully
- •
Output Extraction
- •Parse agent outputs from ccmux pane buffers or files
- •Extract structured sections (problem analysis, approaches, evidence, findings)
- •Normalize various output formats to standard structure
- •
Report Generation
- •Create standardized
research/agent-N.mdfiles - •Generate
SUMMARY.mdwith cross-agent analysis - •Update
inquiry_report.jsonwith completion status
- •Create standardized
Usage
bash
# 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
Arguments
| 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 |
Workflow
1. Initialization
Read inquiry_report.json to get:
- •
research_agents: Number of expected agents - •
phase: Verify inquiry is inresearchphase - •
inquiry_id: Confirm ID match
2. Collection (Mode-Dependent)
ccmux Mode:
python
# 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:
python
# 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
3. Extraction
For each agent output, extract:
- •Problem analysis
- •Approaches explored
- •Evidence gathered
- •Key findings
- •Recommendations
4. Summary Generation
Analyze all reports to create SUMMARY.md:
- •Identify common themes across agents
- •Note points of agreement and divergence
- •Generate questions for synthesis phase
- •Create comparison table of key findings
5. Status Update
Update inquiry_report.json:
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"
}
]
}
Completion Detection
ccmux Mode Markers
An agent session is considered complete when:
- •Session status is
completeoridle - •OR pane output contains
## Conclusionor## Summary - •OR agent explicitly reports completion via
ccmux_report_status
File Mode Markers
A research file is considered complete when:
- •File contains
## Conclusionsection - •OR file ends with
---END---marker - •OR file hasn't been modified for 60 seconds and has minimum content
Output Format
research/agent-N.md
markdown
# 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*
SUMMARY.md
markdown
# 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 Handling
| 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 |
Tools
The skill uses scripts in scripts/:
- •
collect.py- Main orchestrator - •
ccmux_monitor.py- ccmux session monitoring - •
file_monitor.py- File-based monitoring - •
extract.py- Content extraction - •
summarize.py- Summary generation
Requirements
- •Python 3.9+
- •ccmux MCP tools (for ccmux mode)
- •jq (for JSON manipulation)
Examples
Complete Collection Workflow
bash
# 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.
Partial Collection
bash
/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.