brutal-deepresearch/SKILL.md
Structured deep research pipeline with confirmation gates and resume support. Generates outline, launches parallel research agents, produces validated JSON results and markdown report.
npx skillsauth add sssemil/skills brutal-deepresearchInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Structured deep research pipeline with confirmation gates and resume support. Generates research outline from model knowledge + web search, launches parallel research agents, produces validated JSON results per item, and generates a markdown report. Supports resuming interrupted sessions.
Agent assumptions (applies to all agents and subagents):
Check for TARGET.md in the project root directory.
TARGET.md exists, read it in full and treat it as required context.date +%Y-%m-%d
Find the highest existing DR number:
ls workspace/research/ 2>/dev/null | grep -oE '[0-9]{4}' | sort -rn | head -1
New DR number = highest + 1. If no research sessions exist, start at 0001.
Generate a slug from the research topic:
Session directory: workspace/research/DR-<NNNN>-<slug>/
Do not create the directory yet. Wait until Gate 2 confirmation.
Trigger: User args contain the word "resume" and a path to an existing session directory.
Example invocation: /brutal-deepresearch resume research workspace/research/DR-0001-ai-coding
If resume mode is NOT detected, skip to Step 1.
outline.yaml from the given session path to get items listfields.yaml from the given session path to get field definitionsprogress.yaml (if it exists) for previous execution contextls <session_path>/results/*.json 2>/dev/null
ls <session_path>/results/*.started 2>/dev/null
Determine item status:
.json exists → completed (skip this item).started exists but no .json → interrupted (re-research this item)Compare items in outline.yaml against completed results:
Resume mode skips Steps 1-4 entirely — the outline and fields are already confirmed from the previous session.
Based on the user's research topic, use model knowledge to generate:
Items List: The main research objects/items in this domain. Each item should have:
name: Item namecategory: Classification (if applicable)description: Brief description of why this item is relevantField Framework: Suggested research field categories and fields per category. Each field should have:
name: Field name (snake_case)description: What this field capturesdetail_level: One of brief, moderate, or detailedPresent the framework to the user in a readable format.
This is a hard gate. Do not proceed past this step without explicit user confirmation.
Present:
Use AskUserQuestion to ask:
Hard gate: Do not proceed until user confirms. User can request additions or removals here.
Use AskUserQuestion to ask for time range:
Launch 1 web-search-agent (background) using the Task tool with model: sonnet and max_turns: 20.
Parameter Retrieval:
{topic}: User's research topic{YYYY-MM-DD}: Current date from Step 0.2{step1_output}: Complete output from Step 1 (items list + field framework){time_range}: User-specified time rangeHard Constraint: The following prompt must be strictly reproduced, only replacing variables in {xxx}. Do not modify structure or wording.
Prompt Template:
You are an elite internet researcher. Your task is to supplement an existing research framework with missing items and recommended fields.
## Research Methodology
Before searching, determine which search strategies apply to this topic. Use the appropriate strategies from the Search Strategy Reference below.
Get today's date first:
date +%Y-%m-%d
Generate 5-10 different search query variations to maximize coverage:
- Include technical terms, product names, and common variations
- Think of how different people might describe the same topic
- Use exact phrases in quotes for specific names
- Include version numbers and dates when relevant
## Information Gathering Standards
- Read beyond the first few results - valuable information is often buried
- Look for patterns across different sources
- Pay attention to dates to ensure relevance
- Note different approaches and their trade-offs
- Identify authoritative sources and experienced contributors
- Check for updated information or superseded approaches
- Verify across multiple sources when possible
## Task
Research topic: {topic}
Current date: {YYYY-MM-DD}
Based on the following initial framework, supplement latest items and recommended research fields.
## Existing Framework
{step1_output}
## Goals
1. Verify if existing items are missing important objects
2. Supplement items based on missing objects
3. Continue searching for {topic} related items within {time_range} and supplement
4. Supplement new fields
## Output Requirements
Return structured results directly (do not write files):
### Supplementary Items
- item_name: Brief explanation (why it should be added)
...
### Recommended Supplementary Fields
- field_name: Field description (why this dimension is needed)
...
### Sources
- [Source1](url1)
- [Source2](url2)
One-shot Example (assuming researching AI Coding History):
## Task
Research topic: AI Coding History
Current date: 2025-12-30
Based on the following initial framework, supplement latest items and recommended research fields.
## Existing Framework
### Items List
1. GitHub Copilot: Developed by Microsoft/GitHub, first mainstream AI coding assistant
2. Cursor: AI-first IDE, based on VSCode
...
### Field Framework
- Basic Info: name, release_date, company
- Technical Features: underlying_model, context_window
...
## Goals
1. Verify if existing items are missing important objects
2. Supplement items based on missing objects
3. Continue searching for AI Coding History related items within since 2024 and supplement
4. Supplement new fields
## Output Requirements
Return structured results directly (do not write files):
### Supplementary Items
- item_name: Brief explanation (why it should be added)
...
### Recommended Supplementary Fields
- field_name: Field description (why this dimension is needed)
...
### Sources
- [Source1](url1)
- [Source2](url2)
After the web search agent completes, merge its findings with the initial framework:
This is a hard gate. Do not proceed past this step without explicit user confirmation.
Present the merged outline:
Use AskUserQuestion to confirm the outline is correct.
User can say "add X item" or "add Y field" at this gate. If they do:
Repeat until user explicitly confirms. Do not generate files until confirmed.
After confirmation:
mkdir -p workspace/research/DR-<NNNN>-<slug>/results
Write outline.yaml:
topic: "<research topic>"
session: "DR-<NNNN>-<slug>"
created: "<YYYY-MM-DD>"
items:
- name: "<item name>"
category: "<category>"
description: "<description>"
# ... more items
output_dir: "./results"
Write fields.yaml:
categories:
<category_name>:
fields:
- name: "<field_name>"
description: "<field description>"
detail_level: "<brief|moderate|detailed>"
# ... more fields
# ... more categories
Read workspace/research/DR-<NNNN>-<slug>/outline.yaml to get items list.
Check for completed and in-progress results in results/:
ls workspace/research/DR-<NNNN>-<slug>/results/*.json 2>/dev/null
ls workspace/research/DR-<NNNN>-<slug>/results/*.started 2>/dev/null
Determine item status:
.json exists → completed (skip this item).started exists but no .json → interrupted (re-research this item)Log which items are being resumed vs skipped. Update progress.yaml (if it exists) with the current state before proceeding.
Calculate:
Launch remaining agents using the Task tool with model: sonnet, run_in_background: true, and max_turns: 25.
Batching strategy based on remaining item count:
Each agent researches one item and outputs JSON for that item.
Agent Prompt Template (per item):
Hard Constraint: The following prompt must be strictly reproduced, only replacing variables in {xxx}. Do not modify structure or wording.
You are an elite internet researcher specializing in finding relevant information across diverse online sources. Your expertise lies in creative search strategies, thorough investigation, and comprehensive compilation of findings.
## Progress Tracking
Before starting research, write a marker file to signal that this agent has started:
Write an empty file to {started_path}
After self-validation passes and the JSON result is confirmed correct, delete the marker file:
rm {started_path}
## Research Methodology
Get today's date first:
date +%Y-%m-%d
Generate 5-10 different search query variations to maximize coverage:
- Include technical terms, product names, and common variations
- Think of how different people might describe the same topic
- Use exact phrases in quotes for specific names
- Include version numbers and dates when relevant
### Search Strategy Reference
Use the following search strategies based on what is relevant to the research topic:
**GitHub/Debug Strategy** (for software, tools, technical projects):
- Search GitHub Issues (open and closed) for known bugs and workarounds
- Search for exact error messages in quotes
- Look for issue templates that match the problem pattern
- Check closed issues for resolution patterns
- Identify version-specific issues
**General Web Strategy** (for broad information gathering):
Sources: Reddit, official documentation, blog posts, Hacker News, Dev.to, Medium, Discord, X/Twitter
- Look for official recommendations first
- Cross-reference with community consensus
- Find examples from production use
- Identify anti-patterns and common pitfalls
- Note evolving best practices
- Create structured comparisons with clear criteria
- Find real-world usage examples and case studies
- Look for performance benchmarks and user experiences
**Academic Papers Strategy** (for research, algorithms, scientific topics):
Sources: Google Scholar, arXiv, Hugging Face Papers, bioRxiv, ResearchGate, Semantic Scholar, ACM Digital Library, IEEE Xplore
- Use Google Scholar as primary source with advanced search operators
- Search by author names, paper titles, DOI numbers
- Include year ranges to find seminal works and recent publications
- Look for related papers and citation patterns
- Search for preprints on arXiv and bioRxiv
- Track citation networks to understand research evolution
**Stack Overflow Strategy** (for programming, APIs, implementation):
Sources: Stack Overflow, Stack Exchange, technical forums
- Search for exact error messages and API names
- Look for accepted answers and highly-voted alternatives
- Check for version-specific solutions
## Information Gathering Standards
- Read beyond the first few results - valuable information is often buried
- Look for patterns in solutions across different sources
- Pay attention to dates to ensure relevance (note if information is outdated)
- Note different approaches and their trade-offs
- Identify authoritative sources and experienced contributors
- Verify information across multiple sources when possible
- Clearly indicate when information is speculative or unverified
## Task
Research {item_related_info}, output structured JSON to {output_path}
## Field Definitions
Read {fields_path} to get all field definitions
## Output Requirements
1. Output JSON according to fields defined in fields.yaml
2. Mark uncertain field values with [uncertain]
3. Add uncertain array at the end of JSON, listing all uncertain field names
4. All field values must be in English
## Self-Validation
After writing the JSON file, read it back and verify:
1. Every field defined in fields.yaml has a corresponding entry in the JSON
2. The JSON is valid (properly formatted)
3. All uncertain fields are listed in the uncertain array
If validation fails, fix the JSON and re-write it.
## Output Path
{output_path}
One-shot Example (assuming researching GitHub Copilot):
## Progress Tracking
Before starting research, write a marker file to signal that this agent has started:
Write an empty file to /home/user/workspace/research/DR-0001-ai-coding/results/GitHub_Copilot.started
After self-validation passes and the JSON result is confirmed correct, delete the marker file:
rm /home/user/workspace/research/DR-0001-ai-coding/results/GitHub_Copilot.started
## Task
Research name: GitHub Copilot
category: International Product
description: Developed by Microsoft/GitHub, first mainstream AI coding assistant, ~40% market share, output structured JSON to /home/user/workspace/research/DR-0001-ai-coding/results/GitHub_Copilot.json
## Field Definitions
Read /home/user/workspace/research/DR-0001-ai-coding/fields.yaml to get all field definitions
## Output Requirements
1. Output JSON according to fields defined in fields.yaml
2. Mark uncertain field values with [uncertain]
3. Add uncertain array at the end of JSON, listing all uncertain field names
4. All field values must be in English
## Self-Validation
After writing the JSON file, read it back and verify:
1. Every field defined in fields.yaml has a corresponding entry in the JSON
2. The JSON is valid (properly formatted)
3. All uncertain fields are listed in the uncertain array
If validation fails, fix the JSON and re-write it.
## Output Path
/home/user/workspace/research/DR-0001-ai-coding/results/GitHub_Copilot.json
For each item being researched:
{item_related_info}: The item's complete YAML content (name + category + description){output_path}: Absolute path to workspace/research/DR-<NNNN>-<slug>/results/<item_name_slug>.json
_, remove special characters{fields_path}: Absolute path to workspace/research/DR-<NNNN>-<slug>/fields.yaml{started_path}: Absolute path to workspace/research/DR-<NNNN>-<slug>/results/<item_name_slug>.startedImmediately after launching all agents, write progress.yaml in the session directory:
status: in_progress
started: "<YYYY-MM-DD HH:MM>"
total_items: <N>
items:
- name: "<Item Name>"
slug: "<Item_Name>"
status: pending
# ... all items being researched
Items that were already completed (skipped) should not be listed — only items that agents were launched for.
CRITICAL: Do NOT use TaskOutput to read agent results. Agent outputs are large (extensive web search transcripts) and reading them into the orchestrator context will cause context window exhaustion. All research results are already persisted to disk as JSON files — the orchestrator only needs to check file existence.
Polling loop — repeat until all items are resolved:
ls <session_path>/results/*.json 2>/dev/null | wc -l
ls <session_path>/results/*.started 2>/dev/null | wc -l
completed = count of .json files, in_progress = count of .started files without matching .json, remaining = total - completedin_progress > 0, wait ~30 seconds (use sleep 30 via Bash) then poll againin_progress == 0 (all agents have finished — either produced .json or exited), exit the loopAfter polling loop completes:
progress.yaml:
completed if its .json file exists, or failed if only .started exists or neither existsstatus to completed if all items done, or partial if some are missingRead all completed JSON results and identify fields suitable for TOC display:
Present a dynamic options list based on actual fields found in the JSON results.
This is a hard gate. Do not proceed past this step without explicit user confirmation.
Use AskUserQuestion to ask:
Hard gate: Do not generate report until user confirms field selection.
Generate generate_report.py in the session directory.
The script must handle:
1. JSON Structure Compatibility
Support two JSON structures:
{"name": "xxx", "release_date": "xxx"}{"basic_info": {"name": "xxx"}, "technical_features": {...}}Field lookup order: Top level -> category mapping key -> Traverse all nested dicts
2. Category Mapping
Map between fields.yaml category names and JSON keys:
CATEGORY_MAPPING = {
"Basic Info": ["basic_info", "Basic Info"],
"Technical Features": ["technical_features", "technical_characteristics", "Technical Features"],
"Performance Metrics": ["performance_metrics", "performance", "Performance Metrics"],
"Milestone Significance": ["milestone_significance", "milestones", "Milestone Significance"],
"Business Info": ["business_info", "commercial_info", "Business Info"],
"Competition & Ecosystem": ["competition_ecosystem", "competition", "Competition & Ecosystem"],
"History": ["history", "History"],
"Market Positioning": ["market_positioning", "market", "Market Positioning"],
}
3. Complex Value Formatting
|<br> or use blockquote format for readability4. Extra Fields Collection
Collect fields that exist in JSON but not defined in fields.yaml, put in "Other Info" category. Filter out:
_source_file, uncertainuncertain array: Display each field name on separate line5. Uncertain Value Skipping
Skip conditions:
[uncertain] stringuncertain array6. Report Format
The generated report.md must have:
1. [GitHub Copilot](#github-copilot) - Stars: 10k | Score: 85%python workspace/research/DR-<NNNN>-<slug>/generate_report.py
Present completion stats:
## Research Complete: <topic>
**Session**: workspace/research/DR-<NNNN>-<slug>/
**Items Researched**: <count>
### Output Files
- outline.yaml - Research outline and items list
- fields.yaml - Field definitions
- progress.yaml - Execution progress tracking
- results/ - JSON results per item (<count> files)
- generate_report.py - Report generation script
- report.md - Final markdown report
### Items with High Uncertainty
- <item name>: <count> uncertain fields
- ...
These strategies are used by research agents to systematically explore information sources.
Trigger: Software bugs, error debugging, issue lookup, version-specific problems
Sources: GitHub Issues (open and closed)
Query Strategy:
Trigger: General information, news, product comparisons, best practices
Sources:
Query Strategy:
Trigger: Paper search, academic research, algorithm fundamentals
Sources:
Query Strategy:
Trigger: Programming Q&A, code implementation, API usage
Sources:
Query Strategy:
You are not here to rubber-stamp research topics. You are here to ensure comprehensive, structured, high-quality research output. Every gap you miss is a blind spot in the final report.
Be direct. Be thorough. Be systematic.
Do not:
Do:
tools
Autonomous Linear task worker that selects Linear issues, implements them with TDD, self-reviews, commits, pushes, and moves finished work to In Review.
tools
Systematically reviews a project subsystem-by-subsystem with resumable .brutal-workspace state and creates Linear review finding issues for CRITICAL and MAJOR problems.
development
Collaborative, multi-perspective feature planning with rigorous requirements interrogation. Creates Linear project documents and Linear issues instead of local workspace plan/task files.
documentation
Compact the current conversation into a handoff document for another agent to pick up.