Loading...
Loading...
Execute deep research on every item in a research outline, producing structured JSON per item and a final markdown report. Use after running /research to generate an outline. Reads outline.yaml and fields.yaml, launches parallel research agents in batches, validates output, generates a consolidated report, and supports resume on interruption. Trigger when the user says "start deep research", "research these items", "run the deep phase", "fill in the fields for each item", or "generate the research report".
npx skill4agent add marco-machado/agent-skills research-deepoutline.yamlfields.yaml/research| Variable | Source | Description |
|---|---|---|
| | The |
| Discovered | Directory containing |
| | |
| | |
| | |
| Derived | Absolute path to |
| Per item | The item's |
| Derived | Slugified item name: lowercase, spaces to underscores, strip non-alphanumeric except underscores, collapse consecutive underscores. E.g. "GitHub Copilot" becomes |
| Derived | |
*/outline.yamlfields.yaml{outline_dir}/research{topic}{batch_size}{items_per_agent}{output_dir}{output_dir}.jsongithub_copilot.jsonpython3 scripts/validate_json.py -f {fields_path} -j {output_path}{items_per_agent}{batch_size}{variables}references/web-search-guide.md## Task
Research the following item(s) and output structured JSON.
Topic: {topic}
### Items to Research
{for each item assigned to this agent:}
- name: {item_name}
description: {item_description}
{end for}
## Field Definitions
Read the field definitions file to understand what data to collect for each item:
{fields_path}
Use all field categories and fields defined in that file. Each item gets its own JSON object with every field populated.
## Research Instructions
- Search for authoritative, current information on each item
- Use 2-3 search query variations per item
- Prefer official sources (project websites, documentation, release announcements)
- Cross-reference claims across multiple sources when possible
- Note publication dates — flag anything older than 12 months
## Output Format
For each item, write a JSON file to its output path:
{for each item:}
- {item_name} -> {output_path}
{end for}
Each JSON file must follow this structure:
```json
{
"name": "{item_name}",
"category_name": {
"field_name": "value",
"field_name": "value"
},
"another_category": {
"field_name": "value"
},
"uncertain": ["field_name_1", "field_name_2"],
"sources": [
{"description": "Source description", "url": "https://..."}
]
}python3 {validate_script_path} -f {fields_path} -j {output_path}
**One-shot example** (single item, topic "AI Coding History"):{
"name": "GitHub Copilot",
"basic_info": {
"release_date": "2021-06-29",
"company": "Microsoft / GitHub"
},
"technical_features": {
"underlying_model": "OpenAI Codex (initially), GPT-4 (current)",
"context_window": "Varies by tier; up to 128k tokens in Copilot Enterprise [uncertain]"
},
"uncertain": ["context_window"],
"sources": [
{"description": "GitHub Copilot official documentation", "url": "https://docs.github.com/copilot"}
]
}python3 /Users/you/agent-skills/skills/research-deep/scripts/validate_json.py -f /Users/you/ai-coding-history/fields.yaml -j /Users/you/ai-coding-history/results/github_copilot.json
## Step 4: Monitor and Continue
After launching a batch:
1. **Wait** for all agents in the batch to complete
2. **Collect results**: for each agent, check that its output JSON files exist and pass validation
3. **Handle failures**:
- If an agent fails entirely (no output): log the item names and add them to a retry list
- If validation fails after the agent finishes: log which fields are missing/invalid
- **Retry failed items once** in the next batch. If they fail again, mark them as failed and move on.
4. **Report batch progress**: "Batch {N} complete: {succeeded}/{total} items succeeded."
5. **Launch next batch** (with user approval)
## Step 5: Summary Report
After all batches complete, output:
## Step 6: Generate Report
After Step 5's summary (or after resume finds all items already completed), generate a markdown report.
**Ask the user**: "Which fields should appear as summary columns in the table of contents? (Pick from the available fields — e.g. release_date, company, github_stars)"
To help the user choose, scan the completed JSON files and list fields that have short values (single numbers, dates, short strings) — these work well as TOC columns.
Run the report generation script:
```bash
python3 scripts/generate_report.py \
-f {fields_path} \
-d {output_dir} \
-o {outline_dir}/report.md \
--toc-fields field1,field2,field3{outline_dir}/report.mdoutline.yamlfields.yaml{output_path}.tmp{output_path}cc.jsonc_2.json