AgentSkillsCN

research

【何】深度研究智能系统——统一的研究编排,兼具递归置信度、多视角综合与会话管理功能。 【如何】根据查询复杂度进行路由:快速(brave/firecrawl)、标准(multi-tool)、深度(valyu+oracle)。 【何时】任何研究、搜索或信息搜集任务。 【为何】消除决策疲劳——只需一个入口,即可智能路由至最优后端。 关键词:search、research、deep、oracle、sherlock、social、investigate、analyze

SKILL.md
--- frontmatter
name: research
version: 1.0.0
aliases: [search, research, deep-research, sherlock, oracle, social-search]
triggers: [/research, /search, /sherlock, /oracle, /deep]
description: |
  [WHAT] Deep Research Intelligence System — Unified research orchestration with recursive confidence, multi-perspective synthesis, and session management.
  [HOW] Routes based on query complexity: QUICK (brave/firecrawl), STANDARD (multi-tool), DEEP (valyu+oracle)
  [WHEN] Any research, search, or information gathering task
  [WHY] Eliminates decision fatigue - one entry point routes to optimal backend(s)

  Keywords: search, research, deep, oracle, sherlock, social, investigate, analyze
skill_type: tool
category: process-research
primary_primitive: get

lifecycle_integration:
  stage: captured
  input_artifact: null
  output_artifact: synthesis.md
  xdg_data: ~/.config/LEV/research

backends:
  timetravel:
    library: plugins/timetravel
    strategies: [quick, full, deep, max, academic, social]
  quick:
    brave: backends/brave-web-quick/BACKEND.md
    firecrawl: backends/firecrawl-scrape-extract/BACKEND.md
    grok: backends/grok-web-twitter-realtime/BACKEND.md
    tavily: backends/tavily-ai-snippets/BACKEND.md
  specialized:
    exa: backends/exa-neural-linkedin-github/BACKEND.md
    last30days: backends/last30days-reddit-trends/BACKEND.md
  deep:
    valyu: backends/valyu-recursive-confidence/BACKEND.md
    multi_query: backends/deep-multi-query-synthesis/BACKEND.md
  synthesis:
    oracle: backends/oracle-ceo-gpt5pro/BACKEND.md

components:
  perspectives: perspectives/COMPONENT.md
  expansion: expansion/COMPONENT.md
  templates: templates/COMPONENT.md

routing:
  quick: timetravel quick (brave+tavily, first-success)
  full: timetravel full (brave+firecrawl+perplexity, parallel)
  deep: timetravel deep (valyu+perplexity+exa, parallel) -> oracle synthesis
  max: timetravel max (all 5, parallel) -> oracle synthesis
  social: timetravel social (grok+hackernews, parallel)
  academic: timetravel academic (arxiv+exa+perplexity, parallel)
  fallback_simple: brave -> firecrawl (fallback)

related_skills:
  - lev-find                         # `lev get` backend (legacy name)
  - lev-cdo                          # Use research for design/spec decisions
  - lev-orch-thinking-parliament     # Multi-model deliberation
  - bd                               # Create tasks from gaps

claude_code_shim:
  command: /search
  scope: claude-code-only
  source: ~/.claude/commands/search.md

/research — Deep Research Intelligence System v1.0

Sherlock Bytes: Where curiosity meets certainty.

code
┌─────────────────────────────────────────────────────────────────────────────┐
│  🔍 RESEARCH DASHBOARD                                                      │
├─────────────────────────────────────────────────────────────────────────────┤
│  (q) Quick Search    — Fast web/news lookup (Brave, Firecrawl)              │
│  (d) Deep Research   — Recursive confidence loops (Valyu)                   │
│  (s) Synthesis       — Multi-source fusion (Oracle + perspectives)          │
│  (e) Extract         — Structured data extraction (Firecrawl)               │
│  (c) Crawl           — Full site analysis (Firecrawl)                       │
│  (t) Track           — Session management (list/resume/export)              │
├─────────────────────────────────────────────────────────────────────────────┤
│  Session: {session_id} | Storage: ~/.config/LEV/research/{date}/{slug}/     │
└─────────────────────────────────────────────────────────────────────────────┘

/search Tag Routing

TagModeToolsDescription
quick⚡ Fastbrave-search, firecrawlWeb lookup, default mode
full🔄 Standardbrave + firecrawl + valyuMulti-source synthesis
deep🐢 Recursivevalyu researchConfidence loops until 85%
max🐢🐢 Teamspawn research teamFull team-based analysis
sherlock🔍 OSINTSherlock Bytes protocolInvestigation mode
cdo🧠 CDOMulti-perspective overlayMBTI + role personas

Usage:

bash
/search quick "query"     # Fast web search
/search deep "query"      # Recursive until confident
/search sherlock "query"  # OSINT investigation
/search cdo               # Multi-perspective on context

Timetravel Integration (v1.0)

The timetravel adapter library provides a unified programmatic layer for all research backends. Individual CLI tools (brave-search, firecrawl, valyu, etc.) remain available for direct use.

Strategy Mapping

Skill ModeTimetravel StrategyAdaptersOrchestration
quickquickbrave, tavilyfirst-success
fullfullbrave, firecrawl, perplexityparallel
deepdeepvalyu, perplexity, exa + oracle synthesisparallel + synthesis
maxmaxbrave, firecrawl, perplexity, exa, valyu + oracle synthesisparallel + synthesis
socialsocialgrok, hackernewsparallel
sherlockdeep + OSINT overlaysvalyu, perplexity, exa + perspectivesparallel + synthesis
cdomax + CDO overlaysall available + multi-perspectiveparallel + synthesis

Programmatic Usage

typescript
import { createDefaultRegistry, STRATEGIES, executeStrategy } from '@lev-os/timetravel';

const registry = createDefaultRegistry();
const result = await executeStrategy(STRATEGIES.deep, 'query', registry);

CLI Usage

bash
timetravel search "query" --strategy quick     # Fast web search
timetravel search "query" --strategy deep      # Recursive with synthesis
timetravel search "query" --strategy social    # Social/trending
timetravel search "query" --strategy academic  # Papers + neural
timetravel search "query" --strategy max       # All adapters + synthesis
timetravel search "query" --adapter brave      # Single adapter
timetravel status                               # Adapter availability dashboard

Job System

bash
timetravel job create -q "AI frameworks 2026" -s deep    # Create recurring job
timetravel job list                                       # List all jobs
timetravel job run <id>                                   # Execute a job

CRITICAL: Read This Entire File First

Before ANY research operation:

  1. This skill file MUST be fully loaded into context
  2. Initialize session via research init "<query>" or auto-create
  3. All outputs save to XDG-compliant ~/.config/LEV/research/ structure
  4. Validate outputs before marking complete

Invocation Contract (Mandatory)

This section is normative and overrides convenience behavior.

  1. If user input contains $research, /search, or an explicit search tag request, route through the /search shim contract first.
  2. /search is a Claude Code command shim only. It is defined in ~/.claude/commands/search.md.
  3. Non-Claude runtimes MUST still apply the same tag parsing semantics from the shim:
    • quick|full|deep|max|sherlock|cdo
    • no tag => quick
    • $research default => deep unless user overrides
  4. Direct backend calls (brave, firecrawl, valyu, etc.) are allowed only:
    • as steps inside the selected mode flow, or
    • as explicit fallback when a routed step fails.
  5. Before execution, print a single route line:
    • research-route: <mode> | source: /search-shim | fallback: <none|reason>
  6. Never bypass the mode router by jumping straight to a single backend tool when $research or /search was requested.

Tool Manifest by Category

🔍 SEARCH (Fast Lookup)

ToolCLI CommandBest ForSpeed
Brave Webbrave-search search "<query>" -n 10General web, news⚡ Fast
Brave Newsbrave-search news "<query>"Breaking news⚡ Fast
Brave Videobrave-search video "<query>"Video content⚡ Fast
Brave Imagebrave-search image "<query>"Visual research⚡ Fast
Firecrawl Searchfirecrawl search "<query>"Web + optional scraping⚡ Fast
Valyu Searchvalyu search "<query>"AI-optimized search🔄 Medium
Exa Neuralbash exa/search.sh "<query>"Semantic/neural search🔄 Medium

📄 CONTENT EXTRACTION

ToolCLI CommandBest ForSpeed
Firecrawl Scrapefirecrawl scrape <url>Single page content⚡ Fast
Firecrawl Batchfirecrawl batch <urls...>Multiple pages🔄 Medium
Firecrawl Extractfirecrawl extract <urls...> -p "<prompt>"Structured data🔄 Medium
Valyu Contentsvalyu contents <urls...>AI-enhanced extraction🔄 Medium

🕷️ CRAWLING (Site-Wide)

ToolCLI CommandBest ForSpeed
Firecrawl Crawlfirecrawl crawl <url> -l 100Full site analysis🐢 Slow
Firecrawl Mapfirecrawl map <url>URL discovery🔄 Medium

🧠 SYNTHESIS (AI-Powered)

ToolCLI CommandBest ForSpeed
Valyu Answervalyu answer "<query>"Grounded AI response🔄 Medium
Valyu Researchvalyu research "<query>" -n 5 -t 0.85Recursive confidence🐢 Slow
Oracle GPT-5oracle -p "<prompt>" -f <files>Complex synthesis🐢 Slow

📊 SPECIALIZED

ToolCLI CommandBest ForSpeed
Grok (X/Twitter)bash grok/research.sh "<query>"Real-time social⚡ Fast
Last30Daysbash last30days/search.sh "<topic>"Trend analysis🔄 Medium
Tavilybash tavily/search.sh "<query>"AI snippets🔄 Medium

Session Management

XDG-Compliant Storage Structure

code
~/.config/LEV/research/
├── sessions/
│   └── {YYYY-MM-DD}/
│       └── {session-id}_{semantic-slug}/
│           ├── session.json          # Metadata + state
│           ├── queries.jsonl         # All queries issued
│           ├── sources.jsonl         # All sources found
│           ├── artifacts/            # Raw outputs
│           │   ├── search_001.json
│           │   ├── crawl_002.json
│           │   └── synthesis_003.md
│           ├── synthesis.md          # Final synthesis
│           └── validation.json       # Output validation
├── templates/
│   ├── synthesis.md.tmpl
│   ├── report.md.tmpl
│   └── citations.md.tmpl
└── config.json                       # Global settings

Session ID Format

code
{timestamp}_{slug}
Example: 20260203-2248_ai-agent-frameworks

CLI Commands

bash
# Initialize new research session
research init "What are the best AI agent frameworks in 2026?"

# Resume existing session
research resume 20260203-2248_ai-agent-frameworks

# List all sessions
research list [--status=open|completed|all]

# Export session to markdown
research export <session-id> --format=md|json|pdf

# Validate session outputs
research validate <session-id>

# Mark session complete
research complete <session-id>

Complexity Assessment (Auto-Routing)

QUICK (Direct execution)

Triggers: "search", "quick search", "lookup", "find" Route: brave -> firecrawl (fallback) Example: "search React hooks documentation"

SOCIAL (Specialized path)

Triggers: "twitter", "reddit", "social", "trending", "sentiment" Route: grok + last30days Example: "what's trending about AI on Twitter"

DEEP (Full orchestration)

Triggers: "research", "deep", "comprehensive", "analyze", "compare", "investigate", "sherlock" Route: valyu research -> oracle (synthesis) Example: "research the state of AI safety in 2026"


Workflow Patterns

Pattern 1: Quick Search (1-2 min)

bash
# User: "What is X?"
brave search "X" -n 5
# → Return top results with snippets

Pattern 2: Standard Research (5-10 min)

bash
# User: "Research X thoroughly"
research init "X"
brave search "X"                    # Get overview
firecrawl scrape <top-3-urls>       # Deep content
valyu answer "X"                    # Synthesize
research complete

Pattern 3: Deep Research (15-30 min)

bash
# User: "Deep dive into X"
research init "X" --depth=deep
valyu research "X" -n 5 -t 0.85     # Recursive until confident

# Multi-perspective overlay:
valyu answer "X from engineering perspective"
valyu answer "X market analysis"
valyu answer "X user experience implications"

oracle -p "Synthesize all findings" -f artifacts/*.json
research validate && research complete

Pattern 4: Comprehensive (30-60 min, spawn team)

bash
# User: "Complete analysis of X"
# Spawn research team:
#   • Lead Researcher (coordinator)
#   • Domain Expert (valyu recursive)
#   • Source Validator (firecrawl extraction)
#   • Synthesizer (oracle GPT-5)
# Parallel workstreams with validation gates
# Consolidated final report

Multi-Perspective Overlays

MBTI-Inspired Personas

PersonaLensQuery Modification
Architect (INTJ)Systems/Strategy"architectural implications of X"
Analyst (INTP)Logic/Theory"theoretical foundations of X"
Commander (ENTJ)Execution/ROI"business case for X"
Visionary (ENTP)Innovation"disruptive potential of X"
Mediator (INFP)Values/Ethics"ethical considerations of X"
Advocate (INFJ)Long-term Impact"societal implications of X"

Role-Based Perspectives

RoleFocusExample Query
UX DesignerUser needs"user pain points with X"
Security EngineerVulnerabilities"security risks of X"
Product ManagerMarket fit"competitive landscape for X"
DevOpsOperations"operational complexity of X"
LegalCompliance"regulatory requirements for X"

CDO (Cognitive Diversity Overlay)

Run these in parallel for comprehensive coverage:

  1. Breadth First: Wide exploration, many sources
  2. Depth First: Deep dive into top 3 sources
  3. Contrarian: "arguments against X"
  4. Historical: "evolution of X over time"
  5. Future: "X predictions 2027-2030"

Output Templates

Synthesis Template

markdown
# Research Synthesis: {query}

**Session**: {session_id}
**Date**: {date}
**Confidence**: {confidence}%

## Executive Summary
{2-3 sentence overview}

## Key Findings
1. {finding with source citation}
2. {finding with source citation}
3. {finding with source citation}

## Evidence
| Claim | Source | Confidence |
|-------|--------|------------|
| {claim} | [{source}]({url}) | {high/medium/low} |

## Perspectives Analyzed
- **{perspective_1}**: {summary}
- **{perspective_2}**: {summary}

## Open Questions
- {question requiring further research}

## Sources
{numbered list with URLs}

---
*Generated by Sherlock Bytes v1.0 | Validated: {validation_status}*

Validation Rules

Before marking any research session complete, validate:

Structure Validation

  • session.json exists and has valid schema
  • At least 3 unique sources in sources.jsonl
  • synthesis.md follows template structure
  • All URLs are reachable (sample check)

Content Validation

  • Executive summary ≤ 100 words
  • Each claim has source citation
  • Confidence levels justified
  • No hallucinated sources (cross-check)

Quality Validation

  • Addresses original query directly
  • Multiple perspectives represented
  • Contrarian view included if controversial
  • Open questions identified

Validation Output

json
{
  "session_id": "...",
  "validated_at": "ISO8601",
  "structure": {"passed": true, "checks": 4},
  "content": {"passed": true, "checks": 4},
  "quality": {"passed": true, "checks": 4},
  "overall": "PASS",
  "warnings": [],
  "errors": []
}

Team Configuration (Complex Requests)

For requests requiring >30 min or multi-domain expertise:

yaml
# Team spawned via Task tool
name: Deep Research Team
roles:
  - Lead Researcher (coordinator): valyu, brave, research-cli
  - Source Hunter (worker): firecrawl, brave
  - Domain Expert (worker): valyu, oracle
  - Validator (qa): research-cli validation

Environment Variables

bash
# Required (in ~/.env.local)
BRAVE_API_KEY=...        # Brave Search API
FIRECRAWL_API_KEY=...    # Firecrawl API
VALYU_API_KEY=...        # Valyu API
OPENAI_API_KEY=...       # Oracle (GPT-5)

# Optional
EXA_API_KEY=...          # Exa neural search
XAI_API_KEY=...          # Grok/X search
TAVILY_API_KEY=...       # Tavily AI search

Quick Reference

CommandPurpose
brave-search search "<query>"Fast web search
brave-search news "<query>"News search
firecrawl scrape <url>Extract page content
firecrawl crawl <url>Crawl entire site
firecrawl search "<query>"Search + scrape
valyu search "<query>"AI-optimized search
valyu answer "<query>"Grounded AI answer
valyu research "<query>"Recursive confidence
oracle -p "<prompt>" -f ...GPT-5.2 Pro synthesis

Backend Reference

BackendCLITools
bravebrave-searchsearch, news, video, image, local, status
firecrawlfirecrawlscrape, crawl, map, extract, batch, search, status
valyuvalyusearch, answer, contents, research
oracleoracleprompt + file synthesis
exascriptssearch, content
grokscriptsresearch
tavilyscriptssearch, extract
last30daysscriptssearch, trends

Version History

VersionDateChanges
1.0.02026-02-09Timetravel adapter library integration, 10 adapters, 6 strategies, job system
0.9.02026-02-03Unified skill, XDG storage, validation, CLI tools
0.8.x2026-01Individual backend skills

🔍 Sherlock Bytes — "When you have eliminated the impossible, whatever remains, however improbable, must be the truth."

Technique Map

  • Role definition - Clarifies operating scope and prevents ambiguous execution.
  • Context enrichment - Captures required inputs before actions.
  • Output structuring - Standardizes deliverables for consistent reuse.
  • Step-by-step workflow - Reduces errors by making execution order explicit.
  • Edge-case handling - Documents safe fallbacks when assumptions fail.

Technique Notes

These techniques improve reliability by making intent, inputs, outputs, and fallback paths explicit. Keep this section concise and additive so existing domain guidance remains primary.

Prompt Architect Overlay

Role Definition

You are the prompt-architect-enhanced specialist for lev-research, responsible for deterministic execution of this skill's guidance while preserving existing workflow and constraints.

Input Contract

  • Required: clear user intent and relevant context for this skill.
  • Preferred: repository/project constraints, existing artifacts, and success criteria.
  • If context is missing, ask focused questions before proceeding.

Output Contract

  • Provide structured, actionable outputs aligned to this skill's existing format.
  • Include assumptions and next steps when appropriate.
  • Preserve compatibility with existing sections and related skills.

Edge Cases & Fallbacks

  • If prerequisites are missing, provide a minimal safe path and request missing inputs.
  • If scope is ambiguous, narrow to the highest-confidence sub-task.
  • If a requested action conflicts with existing constraints, explain and offer compliant alternatives.