From 481b8b3a8cc28d1a11f42ed8245a5fe06d4c50b6 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 20 Nov 2025 17:17:48 +0000 Subject: [PATCH] feat: add Deep Research module adapted from claude-deep-research-skill Add comprehensive Deep Research module implementing enterprise-grade research capabilities: - Created research-specialist agent (Dr. Morgan) with 8-phase research pipeline - Implemented 4 research modes: Quick, Standard, Deep, and UltraDeep - Added citation validation system (CiteGuard) preventing hallucinated sources - Included source credibility assessment with A-D rating scale - Built progressive assembly system for unlimited report length - Added multi-source verification and triangulation capabilities - Created comprehensive workflow with instructions and templates - Configured module installer for BMad integration - Added team configurations and documentation Module structure follows BMad conventions: - agents/ - Research specialist agent configuration - workflows/research/ - Main research workflow with instructions and template - teams/ - Agent team configurations - _module-installer/ - Installation configuration - Complete documentation (README, agent docs, workflow docs) Based on: https://github.com/199-biotechnologies/claude-deep-research-skill --- src/modules/deep-research/README.md | 322 ++++++++++++++++++ .../_module-installer/install-config.yaml | 16 + src/modules/deep-research/agents/README.md | 140 ++++++++ .../agents/research-specialist.agent.yaml | 40 +++ src/modules/deep-research/config.yaml | 75 ++++ .../deep-research/teams/default-party.csv | 2 + .../deep-research/teams/research-team.yaml | 37 ++ .../workflows/research/README.md | 131 +++++++ .../workflows/research/instructions.md | 220 ++++++++++++ .../workflows/research/research-modes.csv | 5 + .../workflows/research/template.md | 155 +++++++++ .../workflows/research/workflow.yaml | 38 +++ 12 files changed, 1181 insertions(+) create mode 100644 src/modules/deep-research/README.md create mode 100644 src/modules/deep-research/_module-installer/install-config.yaml create mode 100644 src/modules/deep-research/agents/README.md create mode 100644 src/modules/deep-research/agents/research-specialist.agent.yaml create mode 100644 src/modules/deep-research/config.yaml create mode 100644 src/modules/deep-research/teams/default-party.csv create mode 100644 src/modules/deep-research/teams/research-team.yaml create mode 100644 src/modules/deep-research/workflows/research/README.md create mode 100644 src/modules/deep-research/workflows/research/instructions.md create mode 100644 src/modules/deep-research/workflows/research/research-modes.csv create mode 100644 src/modules/deep-research/workflows/research/template.md create mode 100644 src/modules/deep-research/workflows/research/workflow.yaml diff --git a/src/modules/deep-research/README.md b/src/modules/deep-research/README.md new file mode 100644 index 00000000..b11056f0 --- /dev/null +++ b/src/modules/deep-research/README.md @@ -0,0 +1,322 @@ +# Deep Research Module + +Enterprise-grade research automation that replicates and extends Claude Desktop's Advanced Research capabilities with multi-source verification, citation validation, and credibility assessment. + +## Table of Contents + +- [Core Capabilities](#core-capabilities) +- [Specialized Agents](#specialized-agents) +- [Research Workflows](#research-workflows) +- [Quick Start](#quick-start) +- [Research Modes](#research-modes) +- [Key Features](#key-features) +- [Quality Standards](#quality-standards) +- [Configuration](#configuration) + +## Core Capabilities + +The Deep Research module provides a comprehensive 8-phase research pipeline that produces citation-backed reports with rigorous validation: + +1. **Scope Definition** - Understand research question and success criteria +2. **Research Planning** - Design search strategy and source priorities +3. **Parallel Retrieval** - Execute concurrent searches (3-5x faster) +4. **Triangulation & Validation** - Cross-verify facts with CiteGuard +5. **Outline Evolution** - Dynamic structure adapting to evidence +6. **Synthesis** - Narrative-driven composition with embedded citations +7. **Critical Review** - Challenge assumptions and identify gaps +8. **Final Packaging** - Professional deliverables with full methodology + +## Specialized Agents + +[View detailed agent descriptions →](./agents/README.md) + +### Dr. Morgan - Elite Research Specialist + +**Master Research Orchestrator** with 15+ years of experience conducting comprehensive multi-source investigations. Expert in research methodologies, citation validation, source credibility assessment, and evidence synthesis. + +**Communication Style:** Meticulous academic investigator - methodical, evidence-driven, precise with citations, celebrates discovery. + +## Research Workflows + +[View workflow documentation →](./workflows/research/README.md) + +### Deep Research Workflow + +The flagship workflow implementing enterprise-grade research: + +- **8-Phase Pipeline**: Systematic research execution +- **4 Research Modes**: Quick, Standard, Deep, UltraDeep +- **Citation Management**: Automatic tracking and validation +- **Source Assessment**: Credibility scoring and bias evaluation +- **Progressive Assembly**: Unlimited report length support + +## Quick Start + +### 1. Load Research Specialist + +```bash +agent deep-research/research-specialist +``` + +### 2. Choose Research Mode + +```bash +*research # Standard mode (5-10 min, 15-30 sources) +*quick-research # Quick mode (2-5 min, 2-5 sources) +*deep-research # Deep mode (10-20 min, 30+ sources) +*ultra-research # Ultra-deep mode (20-45+ min, 50+ sources) +``` + +### 3. Provide Research Question + +``` +User: Research the latest developments in quantum computing commercialization +Dr. Morgan: I'll conduct comprehensive research on quantum computing commercialization... +``` + +## Research Modes + +| Mode | Duration | Sources | Verification | Best For | +|------|----------|---------|--------------|----------| +| **Quick** | 2-5 min | 2-5 | Basic fact-checking | Initial exploration, quick answers | +| **Standard** | 5-10 min | 15-30 | Multi-source comparison | Most general research needs | +| **Deep** | 10-20 min | 30+ | 3+ sources per claim | Important decisions, comprehensive understanding | +| **UltraDeep** | 20-45+ min | 50+ | Maximum rigor | Enterprise decisions, critical analysis | + +## Key Features + +### Citation Validation (CiteGuard) +- Every factual claim must cite specific source immediately +- Format: "According to [1], finding..." +- No hallucinated or approximate citations +- Complete bibliography with no truncation + +### Source Credibility Assessment +- Authority evaluation +- Recency checking +- Methodology assessment +- Bias detection and documentation +- Credibility ratings (A-D scale) + +### Multi-Source Verification +- Major claims: 3+ source requirement +- Statistics: Cross-checked across sources +- Contradictions: Documented and analyzed +- Confidence levels: Explicitly stated + +### Dynamic Outlining (WebWeaver) +- Structure adapts to discovered evidence +- Logical organization emerges from findings +- Flexible theme development +- Complete coverage assurance + +### Progressive Assembly +- Handle reports of unlimited length +- Incremental file writing +- Section-by-section completion +- Prevents token limit issues + +### Parallel Retrieval +- Concurrent search execution +- 3-5x faster information gathering +- First Finish Search patterns +- Adaptive completion + +## Quality Standards + +### Output Requirements +- **Executive Summary**: Under 250 words +- **Narrative Prose**: 80%+ flowing paragraphs (not bullets) +- **Citations**: Every claim sourced immediately +- **Bibliography**: Complete with URLs and dates +- **Limitations**: Explicit acknowledgment of gaps +- **Methodology**: Transparent process documentation + +### Anti-Hallucination Safeguards +1. No citation without actual source +2. Explicit attribution with source names +3. Complete bibliography entries (no "..." or ranges) +4. Confidence level markers +5. Explicit gap acknowledgment + +### Source Diversity +- Minimum 10+ distinct sources (Standard mode) +- Multiple types: academic, industry, news, official data +- Credibility assessment for each source +- Bias evaluation and documentation + +## Configuration + +Edit `/deep-research/config.yaml`: + +```yaml +# Default research mode +default_research_mode: "standard" # quick, standard, deep, ultra + +# Output configuration +output_folder: "{{output_folder}}/research" + +# Quality standards +executive_summary_max_words: 250 +narrative_prose_ratio: 0.8 +strict_citation_validation: true + +# Output formats +generate_markdown: true +generate_html: false +generate_pdf: false +``` + +## Module Structure + +``` +deep-research/ +├── agents/ # Research specialist agents +│ ├── research-specialist.agent.yaml +│ └── README.md +├── workflows/ # Research workflows +│ └── research/ +│ ├── workflow.yaml +│ ├── instructions.md +│ ├── template.md +│ ├── research-modes.csv +│ └── README.md +├── teams/ # Agent team configurations +│ ├── default-party.csv +│ └── research-team.yaml +├── _module-installer/ # Installation configuration +│ └── install-config.yaml +├── config.yaml # Module configuration +└── README.md # This file +``` + +## Integration Points + +Deep Research integrates seamlessly with: + +- **BMM** - Research for product planning, technical specifications +- **CIS** - Enhanced creative and innovation research +- **Content Creator** - Research-backed content creation +- **Career Coach** - Industry and role research +- **Marketing Ops** - Market research and competitive analysis +- **Custom Modules** - Specialized domain research + +## Use Cases + +### Business Intelligence +- Market research and sizing +- Competitive landscape analysis +- Industry trend investigation +- Due diligence research + +### Product Development +- User research and needs analysis +- Technology evaluation +- Feature validation +- Market positioning + +### Content Creation +- Fact-checking and verification +- Background research +- Expert source identification +- Topic exploration + +### Academic & Scientific +- Literature reviews +- State-of-the-art surveys +- Citation tracking +- Methodology research + +### Strategic Planning +- Technology trend analysis +- Best practice research +- Risk assessment +- Opportunity identification + +## Best Practices + +### Research Preparation +1. **Define clear questions** - Specific scope yields better results +2. **Choose appropriate mode** - Match depth to decision importance +3. **Provide context** - Background information improves relevance +4. **Set expectations** - Understand time/depth tradeoffs + +### During Research +1. **Trust the process** - Let the 8-phase pipeline work +2. **Review progress** - Check phase transition updates +3. **Note discoveries** - Pay attention to interesting findings +4. **Ask questions** - Clarify scope or direction as needed + +### After Research +1. **Review sources** - Check credibility assessments in appendix +2. **Verify citations** - Spot-check key claims and sources +3. **Acknowledge limitations** - Understand gaps and constraints +4. **Follow up strategically** - Dive deeper on specific areas + +## Example Research Questions + +- "What are the latest trends in quantum computing commercialization?" +- "Analyze the competitive landscape for AI-powered code editors in 2024" +- "What evidence exists for the effectiveness of different code review practices?" +- "How has remote work impacted software development team productivity?" +- "What are the key regulatory considerations for launching a healthcare AI product?" +- "Compare different approaches to microservices architecture" +- "What are the best practices for implementing zero-trust security?" + +## Quality Assurance + +Every research report includes: + +✓ Executive summary under 250 words +✓ Minimum source requirements met for chosen mode +✓ Every major claim cited immediately +✓ Statistics cross-verified across sources +✓ Source credibility assessed and documented +✓ Limitations explicitly acknowledged +✓ Complete bibliography with no gaps +✓ Methodology transparently documented +✓ Professional narrative style (80%+ prose) +✓ Actionable recommendations provided + +## Related Documentation + +- **[Research Workflow Guide](./workflows/research/README.md)** - Detailed workflow instructions +- **[Agent Personas](./agents/README.md)** - Full agent descriptions +- **[BMM Integration](../bmm/README.md)** - Development workflow connection +- **[CIS Integration](../cis/README.md)** - Creative research workflows + +## Version History + +- **v1.0.0** - Initial release + - 8-phase research pipeline + - 4 research modes (Quick, Standard, Deep, UltraDeep) + - CiteGuard citation validation + - Source credibility assessment + - Progressive assembly support + - Integration with BMad Core + +## Contributing + +To enhance the Deep Research module: + +1. Study existing patterns in `workflows/research/` +2. Follow BMad module conventions +3. Test thoroughly with various research questions +4. Document changes in workflow README +5. Update module README with new capabilities + +## License + +Part of BMad Method - See main repository LICENSE + +--- + +**Deep Research Module** - Enterprise-grade intelligence gathering for AI collaboration. + +*"Quality research takes time. Every verified fact builds trust. Every acknowledged limitation demonstrates integrity."* + +--- + +

+ Built with ❤️ for the human-AI research community +

diff --git a/src/modules/deep-research/_module-installer/install-config.yaml b/src/modules/deep-research/_module-installer/install-config.yaml new file mode 100644 index 00000000..d3be85c0 --- /dev/null +++ b/src/modules/deep-research/_module-installer/install-config.yaml @@ -0,0 +1,16 @@ +# BMAD™ Deep Research Module Configuration + +code: deep-research +name: "Deep Research: Enterprise Intelligence Module" +default_selected: false # This module will not be selected by default for new installations + +header: "Deep Research Module" +subheader: "Enterprise-grade research with multi-source verification and citation tracking." + +# Variables from Core Config inserted: +## user_name +## communication_language +## output_folder +## bmad_folder +## install_user_docs +## kb_install diff --git a/src/modules/deep-research/agents/README.md b/src/modules/deep-research/agents/README.md new file mode 100644 index 00000000..eacd81a0 --- /dev/null +++ b/src/modules/deep-research/agents/README.md @@ -0,0 +1,140 @@ +# Deep Research Agents + +## Overview + +The Deep Research module provides specialized agents for conducting comprehensive, enterprise-grade research with multi-source verification and citation validation. + +## Available Agents + +### Dr. Morgan - Elite Research Specialist + +**Role:** Master Research Orchestrator + Enterprise Intelligence Analyst + +**Expertise:** +- 15+ years conducting comprehensive multi-source investigations +- Expert in research methodologies and citation validation +- Source credibility assessment and evidence synthesis +- Academic rigor with practical business application + +**Communication Style:** +Talks like a meticulous academic investigator - methodical, evidence-driven, precise with citations, celebrates discovery. Balances thoroughness with clarity. + +**Core Principles:** +- Every claim needs verification +- Multiple sources reveal truth +- Quality research takes time +- Transparency in methodology builds trust + +**Primary Capabilities:** +- 8-phase research pipeline execution +- Multi-source triangulation and validation +- Citation management and bibliography generation +- Source credibility assessment +- Dynamic outline evolution +- Progressive report assembly + +## Commands + +### Research Commands + +**\*research** - Standard research mode (5-10 minutes, 15-30 sources) +- Most common research needs +- Balanced depth and speed +- Multi-source comparison + +**\*quick-research** - Quick mode (2-5 minutes, 2-5 sources) +- Initial exploration +- Fast answers +- Basic fact-checking + +**\*deep-research** - Deep mode (10-20 minutes, 30+ sources) +- Important decisions +- Verified claims (3+ sources) +- Comprehensive understanding + +**\*ultra-research** - Ultra-deep mode (20-45+ minutes, 50+ sources) +- Enterprise critical analysis +- Maximum rigor +- Exhaustive investigation + +### Collaboration Commands + +**\*party-mode** - Consult with other expert agents +- Multi-disciplinary perspectives +- Complex research challenges +- Cross-domain synthesis + +**\*advanced-elicitation** - Enhanced research techniques +- Challenge assumptions +- Deeper analysis +- Better LLM results + +## Usage Examples + +### Basic Research + +``` +agent deep-research/research-specialist + +User: I need to research the latest developments in quantum computing +Dr. Morgan: I'll conduct a comprehensive research investigation... +[Executes standard research mode] +``` + +### Targeted Depth + +``` +agent deep-research/research-specialist + +User: *deep-research on competitive landscape for AI code editors +Dr. Morgan: Initiating deep research mode with 30+ source requirement... +[Executes deep research with 3+ source verification] +``` + +### Quick Exploration + +``` +agent deep-research/research-specialist + +User: *quick-research What is WebAssembly? +Dr. Morgan: Running quick research mode for rapid overview... +[Executes 2-5 minute quick research] +``` + +## Agent Persona + +Dr. Morgan embodies the ideal of rigorous academic research combined with practical intelligence gathering. They: + +- **Ask clarifying questions** before diving deep +- **Provide progress updates** during research phases +- **Share interesting discoveries** as they emerge +- **Acknowledge limitations** transparently +- **Recommend follow-up** investigations when appropriate + +## Integration + +Works seamlessly with: +- **BMM Agents** (PM, Architect, Developer) - Research for project planning +- **CIS Agents** (Innovation, Problem-Solving) - Creative research needs +- **Content Creator** - Research-backed content creation +- **Career Coach** - Industry and role research + +## Customization + +Edit `research-specialist.agent.yaml` to customize: +- Persona and communication style +- Default research modes +- Command triggers +- Integration points + +## Best Practices + +1. **Start with clear questions** - Well-defined scope yields better results +2. **Choose appropriate mode** - Match depth to decision importance +3. **Provide context** - Background information improves relevance +4. **Review sources** - Check credibility assessments in appendix +5. **Follow up strategically** - Use quick mode to explore, deep mode to commit + +--- + +*Part of the BMad Deep Research module - Enterprise-grade intelligence gathering for AI collaboration.* diff --git a/src/modules/deep-research/agents/research-specialist.agent.yaml b/src/modules/deep-research/agents/research-specialist.agent.yaml new file mode 100644 index 00000000..9deb189a --- /dev/null +++ b/src/modules/deep-research/agents/research-specialist.agent.yaml @@ -0,0 +1,40 @@ +# Elite Research Specialist Agent Definition + +agent: + metadata: + id: "{bmad_folder}/deep-research/agents/research-specialist.md" + name: Dr. Morgan + title: Elite Research Specialist + icon: 🔬 + module: deep-research + + persona: + role: Master Research Orchestrator + Enterprise Intelligence Analyst + identity: Elite researcher with 15+ years conducting comprehensive multi-source investigations. Expert in research methodologies, citation validation, source credibility assessment, and evidence synthesis. + communication_style: Talks like a meticulous academic investigator - methodical, evidence-driven, precise with citations, celebrates discovery + principles: Every claim needs verification. Multiple sources reveal truth. Quality research takes time. Transparency in methodology builds trust. + + menu: + - trigger: research + workflow: "{project-root}/{bmad_folder}/deep-research/workflows/research/workflow.yaml" + description: Conduct comprehensive research on any topic + + - trigger: quick-research + workflow: "{project-root}/{bmad_folder}/deep-research/workflows/research/workflow.yaml" + description: Fast research mode (2-5 minutes, 2-5 sources) + + - trigger: deep-research + workflow: "{project-root}/{bmad_folder}/deep-research/workflows/research/workflow.yaml" + description: Deep research mode (10-20 minutes, verified claims) + + - trigger: ultra-research + workflow: "{project-root}/{bmad_folder}/deep-research/workflows/research/workflow.yaml" + description: Ultra-deep research mode (20-45+ minutes, maximum rigor) + + - trigger: party-mode + workflow: "{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.yaml" + description: Consult with other expert agents from the party + + - trigger: advanced-elicitation + exec: "{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml" + description: Advanced elicitation techniques to challenge the LLM to get better results diff --git a/src/modules/deep-research/config.yaml b/src/modules/deep-research/config.yaml new file mode 100644 index 00000000..2a6b3391 --- /dev/null +++ b/src/modules/deep-research/config.yaml @@ -0,0 +1,75 @@ +# Deep Research Module Configuration + +# Module Information +module_code: deep-research +module_name: "Deep Research Module" +version: "1.0.0" + +# User Configuration (inherited from core config) +user_name: "{{user_name}}" +communication_language: "{{communication_language}}" + +# Output Configuration +output_folder: "{{output_folder}}/research" + +# Research Settings +default_research_mode: "standard" # quick, standard, deep, ultra + +# Source Requirements by Mode +quick_mode: + min_sources: 2 + max_sources: 5 + duration: "2-5 minutes" + +standard_mode: + min_sources: 15 + max_sources: 30 + duration: "5-10 minutes" + +deep_mode: + min_sources: 30 + max_sources: 50 + duration: "10-20 minutes" + verification_threshold: 3 # Require 3+ sources for major claims + +ultra_mode: + min_sources: 50 + max_sources: 100 + duration: "20-45+ minutes" + verification_threshold: 3 + max_rigor: true + +# Citation Settings +citation_format: "inline" # Format: [1], [2], etc. +require_urls: true +require_dates: true +bibliography_style: "detailed" # detailed, simple + +# Quality Standards +executive_summary_max_words: 250 +narrative_prose_ratio: 0.8 # 80% flowing paragraphs vs bullets +min_source_diversity: 3 # Minimum source types (academic, industry, news, etc.) + +# Anti-Hallucination Settings +strict_citation_validation: true +require_explicit_attribution: true +flag_unsourced_claims: true +confidence_markers: true + +# Output Formats +generate_markdown: true +generate_html: false +generate_pdf: false + +# Progressive Assembly +enable_incremental_writing: true +max_tokens_per_section: 4000 + +# Source Credibility Assessment +assess_source_credibility: true +assess_bias: true +credibility_ratings: + - "A: Highly credible, authoritative" + - "B: Credible with minor limitations" + - "C: Useful but requires corroboration" + - "D: Limited credibility, use with caution" diff --git a/src/modules/deep-research/teams/default-party.csv b/src/modules/deep-research/teams/default-party.csv new file mode 100644 index 00000000..2d51557a --- /dev/null +++ b/src/modules/deep-research/teams/default-party.csv @@ -0,0 +1,2 @@ +agent_path,role,expertise +{bmad_folder}/deep-research/agents/research-specialist.md,Research Specialist,Enterprise research and intelligence gathering diff --git a/src/modules/deep-research/teams/research-team.yaml b/src/modules/deep-research/teams/research-team.yaml new file mode 100644 index 00000000..e86b18a1 --- /dev/null +++ b/src/modules/deep-research/teams/research-team.yaml @@ -0,0 +1,37 @@ +# Deep Research Team Configuration + +team: + name: "Research Intelligence Team" + description: "Specialized team for conducting comprehensive research and intelligence gathering" + + members: + - agent: "{bmad_folder}/deep-research/agents/research-specialist.md" + role: "Lead Researcher" + primary: true + + # Optional integration with other modules + - agent: "{bmad_folder}/bmm/agents/analyst.md" + role: "Business Analyst" + optional: true + when: "business intelligence needed" + + - agent: "{bmad_folder}/cis/agents/innovation-strategist.md" + role: "Strategic Advisor" + optional: true + when: "innovation research needed" + + - agent: "{bmad_folder}/content-creator/agents/content-strategist.md" + role: "Content Specialist" + optional: true + when: "content research needed" + + workflows: + - "{bmad_folder}/deep-research/workflows/research/workflow.yaml" + + use_cases: + - "Market research and competitive analysis" + - "Technology trend investigation" + - "Academic literature review" + - "Industry intelligence gathering" + - "Due diligence research" + - "Content research and fact-checking" diff --git a/src/modules/deep-research/workflows/research/README.md b/src/modules/deep-research/workflows/research/README.md new file mode 100644 index 00000000..f5b4f7c5 --- /dev/null +++ b/src/modules/deep-research/workflows/research/README.md @@ -0,0 +1,131 @@ +# Deep Research Workflow + +## Overview + +The Deep Research workflow implements an enterprise-grade research system that replicates and extends Claude Desktop's Advanced Research capabilities. It provides comprehensive, multi-source research with advanced validation features and citation tracking. + +## Features + +- **8-Phase Research Pipeline**: Scope → Plan → Retrieve → Triangulate → Synthesize → Critique → Refine → Package +- **4 Research Modes**: Quick, Standard, Deep, and UltraDeep for different needs +- **Citation Validation**: CiteGuard system prevents hallucinated sources +- **Source Credibility Assessment**: Evaluate authority, recency, methodology, and bias +- **Parallel Retrieval**: 3-5x faster information gathering +- **Dynamic Outlining**: Structure adapts based on discovered evidence +- **Progressive Assembly**: Handle unlimited report length + +## Usage + +### Via Agent + +Load the Research Specialist agent and trigger the workflow: + +``` +agent deep-research/research-specialist + +*research # Standard mode (default) +*quick-research # Quick mode (2-5 min) +*deep-research # Deep mode (10-20 min) +*ultra-research # Ultra-deep mode (20-45+ min) +``` + +### Direct Workflow + +```bash +workflow deep-research/research --data=/path/to/context.md +``` + +### With Research Context + +Create a context file specifying: +- Research question +- Specific angles of interest +- Target audience +- Time/depth preferences + +## Research Modes + +| Mode | Duration | Sources | Verification | Best For | +|------|----------|---------|--------------|----------| +| **Quick** | 2-5 min | 2-5 | Basic fact-checking | Initial exploration | +| **Standard** | 5-10 min | 15-30 | Multi-source comparison | Most research needs | +| **Deep** | 10-20 min | 30+ | 3+ sources per claim | Important decisions | +| **UltraDeep** | 20-45+ min | 50+ | Maximum rigor | Enterprise analysis | + +## Quality Standards + +### Citations +- Every factual claim must cite a specific source immediately +- Format: "According to [1], finding..." +- No vague attributions like "studies show" +- Complete bibliography (no truncation) + +### Source Diversity +- Minimum 10+ distinct sources (Standard mode) +- Multiple source types: academic, industry, news, official data +- Credibility assessment for each source +- Bias evaluation and documentation + +### Verification +- Major claims: 3+ source verification +- Statistics: Cross-checked across sources +- Contradictions: Documented and analyzed +- Confidence levels: Explicitly stated + +## Output Structure + +Reports include: +- **Executive Summary** (under 250 words) +- **Introduction** (scope, methodology, context) +- **Main Findings** (themed sections with citations) +- **Synthesis & Analysis** (patterns and implications) +- **Limitations & Gaps** (explicit acknowledgment) +- **Recommendations** (actionable insights) +- **Complete Bibliography** (all sources cited) +- **Methodology Appendix** (process transparency) + +## Best Practices + +1. **Start Broad**: Begin with general searches, narrow based on findings +2. **Prioritize Recency**: Focus on recent sources unless historical context needed +3. **Cross-Reference**: Verify statistics across multiple sources +4. **Assess Credibility**: Evaluate author/publisher authority and bias +5. **Document Gaps**: Explicitly state limitations and missing information +6. **Cite Immediately**: Add citations right after claims +7. **Save Progress**: Use incremental file writing for long reports + +## Anti-Hallucination Safeguards + +1. No citation without actual source +2. Explicit attribution with source names +3. Complete bibliography entries +4. Confidence level markers +5. Explicit gap acknowledgment + +## Example Research Questions + +- "What are the latest trends in quantum computing commercialization?" +- "Analyze the competitive landscape for AI-powered code editors" +- "What evidence exists for the effectiveness of intermittent fasting?" +- "How has remote work impacted software development productivity?" +- "What are the key regulatory considerations for launching a fintech startup?" + +## Files + +- `workflow.yaml` - Workflow configuration +- `instructions.md` - Detailed research protocol +- `template.md` - Output format template +- `research-modes.csv` - Mode specifications +- `README.md` - This documentation + +## Integration + +Works seamlessly with: +- **BMM** - Research for project planning +- **CIS** - Enhanced creative research +- **BMB** - Building research-enhanced agents +- **Custom Modules** - Specialized domain research + +--- + +*Part of the BMad Deep Research module - Enterprise-grade intelligence gathering for AI collaboration.* diff --git a/src/modules/deep-research/workflows/research/instructions.md b/src/modules/deep-research/workflows/research/instructions.md new file mode 100644 index 00000000..0777c389 --- /dev/null +++ b/src/modules/deep-research/workflows/research/instructions.md @@ -0,0 +1,220 @@ +# Deep Research Workflow Instructions + +## Overview + +You are conducting enterprise-grade research that replicates and extends Claude Desktop's Advanced Research capabilities. Your mission is to produce comprehensive, citation-backed reports with multi-source verification and credibility assessment. + +## Research Pipeline (8 Phases) + +### Phase 1: Scope Definition +- Understand the research question thoroughly +- Identify key topics, entities, and relationships +- Define success criteria for the research +- Determine appropriate research mode based on user needs + +### Phase 2: Research Planning +- Design search strategy covering all relevant angles +- Identify authoritative sources to prioritize +- Plan evidence triangulation approach +- Estimate time and depth requirements + +### Phase 3: Parallel Retrieval +- Execute multiple searches concurrently (3-5x faster) +- Gather diverse perspectives and data points +- Track sources with metadata (URL, title, publication date) +- Use First Finish Search patterns for adaptive completion + +### Phase 4: Triangulation & Validation +- Cross-verify facts across multiple sources +- Implement CiteGuard validation (no hallucinated citations) +- Assess source credibility and potential bias +- Flag contradictory information for deeper analysis + +### Phase 5: Outline Evolution +- Build dynamic outline adapting to discovered evidence +- Use WebWeaver technique for structure refinement +- Organize findings by themes and importance +- Ensure logical flow and completeness + +### Phase 6: Synthesis +- Write narrative-driven prose (80%+ flowing paragraphs) +- Embed citations immediately after claims: "According to [1]..." +- Integrate quantitative data naturally +- Maintain professional, objective tone + +### Phase 7: Critical Review +- Challenge assumptions and gaps +- Identify limitations of available evidence +- Assess confidence levels for key findings +- Note areas requiring further research + +### Phase 8: Final Packaging +- Executive summary (under 250 words) +- Complete report with all sections +- Full bibliography (no truncation or ranges) +- Methodology appendix + +## Research Modes + +**Quick Mode (2-5 minutes)** +- 2-5 sources +- Basic fact-checking +- Use for: Initial exploration + +**Standard Mode (5-10 minutes)** [DEFAULT] +- 15-30 sources +- Multi-source comparison +- Use for: Most research needs + +**Deep Mode (10-20 minutes)** +- 30+ sources +- 3+ sources per major claim +- Use for: Important decisions + +**UltraDeep Mode (20-45+ minutes)** +- 50+ sources +- Maximum rigor with triangulation +- Use for: Enterprise critical analysis + +## Quality Standards (NON-NEGOTIABLE) + +### Citations +- EVERY factual claim must cite a specific source immediately +- Format: "According to [1], market size reached $2.3B in 2024" +- NO vague attributions like "studies show" or "research suggests" +- Each [N] citation must appear in full bibliography + +### Source Diversity +- Minimum 10+ distinct sources (Standard mode) +- Include: Academic papers, industry reports, news, official data +- Assess credibility: Authority, recency, methodology, bias +- Flag low-quality or potentially biased sources + +### Verification Requirements +- Major claims: 3+ source verification +- Statistics: Cross-check numbers across sources +- Contradictions: Document and analyze discrepancies +- Uncertainty: Explicitly state confidence levels + +### Output Quality +- Executive summary: Under 250 words +- Narrative prose: 80%+ flowing paragraphs (not bullet points) +- Structure: Clear sections with logical flow +- Limitations: Explicit section on gaps and constraints + +## Anti-Hallucination Safeguards + +1. **No Citation Without Source**: Never invent or approximate sources +2. **Explicit Attribution**: Always name the specific source in-text +3. **Complete Bibliography**: Every [N] must have full entry +4. **Confidence Markers**: Use "according to available sources" when limited +5. **Gap Acknowledgment**: State "no sources found for X" rather than speculating + +## Output Structure + +```markdown +# [Research Topic] + +## Executive Summary +[Under 250 words - key findings, implications, limitations] + +## Introduction +[Context, scope, methodology overview] + +## Main Findings + +### [Theme 1] +[Detailed analysis with citations...] + +### [Theme 2] +[Detailed analysis with citations...] + +### [Theme 3] +[Detailed analysis with citations...] + +## Synthesis & Analysis +[Connect findings, identify patterns, implications] + +## Limitations & Gaps +[Acknowledge constraints, missing data, uncertainty areas] + +## Recommendations +[Actionable insights based on evidence] + +## Bibliography +[1] Full citation with URL +[2] Full citation with URL +... + +## Methodology Appendix +[Search strategy, sources evaluated, validation approach] +``` + +## Progressive File Assembly + +For reports exceeding token limits: +1. Generate outline and introduction first +2. Complete each major section sequentially +3. Write to file incrementally +4. Final assembly with executive summary +5. Validate all citations present in bibliography + +## Best Practices + +### DO: +- Start with broad searches, then narrow based on findings +- Prioritize recent sources (last 1-3 years) unless historical context needed +- Cross-reference statistics across multiple sources +- Note publication dates and potential staleness +- Assess author/publisher credibility and potential bias +- Use direct quotes sparingly, synthesize in your own words with attribution +- Save incremental progress to prevent work loss + +### DON'T: +- Make claims without immediate citation +- Use ranges like "[1-15]" or "see sources 1-10" +- Truncate bibliography with "..." or "and others" +- Rely on single sources for critical facts +- Ignore contradictory evidence +- Write primarily in bullet points +- Assume correlation implies causation without stating it + +## Error Recovery + +If you encounter: +- **Conflicting data**: Document all versions with sources, analyze discrepancies +- **Limited sources**: State gap explicitly, adjust scope or mark as preliminary +- **Paywalled content**: Seek alternative sources, note limitation +- **Outdated information**: Flag recency issues, search for recent updates +- **Bias concerns**: Include multiple perspectives, note potential bias + +## User Interaction + +1. **Initial Query**: Clarify scope, mode preference, specific angles of interest +2. **During Research**: Provide progress updates on phase transitions +3. **Findings**: Share interesting discoveries or gaps requiring input +4. **Completion**: Deliver full report with executive summary upfront +5. **Follow-up**: Offer to dive deeper on specific sections or questions + +## Success Criteria + +A successful research report: +✓ Answers the research question comprehensively +✓ Every claim has specific citation +✓ Minimum source requirements met for chosen mode +✓ Major findings verified across multiple sources +✓ Limitations explicitly acknowledged +✓ Complete bibliography with no gaps +✓ Professional narrative style +✓ Actionable insights provided +✓ Methodology transparent and reproducible + +## Remember + +**Quality over speed.** A well-researched report with proper citations is infinitely more valuable than a quick, unsourced summary. When in doubt, cite more, verify more, acknowledge uncertainty more. + +**You are building trust.** Every hallucinated citation destroys credibility. Every verified fact builds it. Every acknowledged limitation demonstrates integrity. + +**Research is iterative.** What you discover shapes where you look next. Be flexible, follow the evidence, and let the story emerge from the data. + +Now, let's conduct some exceptional research! 🔬 diff --git a/src/modules/deep-research/workflows/research/research-modes.csv b/src/modules/deep-research/workflows/research/research-modes.csv new file mode 100644 index 00000000..b1bfe93a --- /dev/null +++ b/src/modules/deep-research/workflows/research/research-modes.csv @@ -0,0 +1,5 @@ +Mode,Duration,Sources,Verification,Best For +Quick,2-5 minutes,2-5 sources,Basic fact-checking,Initial exploration and quick answers +Standard,5-10 minutes,15-30 sources,Multi-source comparison,Most general research needs +Deep,10-20 minutes,30+ sources,3+ sources per claim,Important decisions and comprehensive understanding +UltraDeep,20-45+ minutes,50+ sources,Maximum rigor with triangulation,Enterprise decisions and critical analysis diff --git a/src/modules/deep-research/workflows/research/template.md b/src/modules/deep-research/workflows/research/template.md new file mode 100644 index 00000000..f38f4ce6 --- /dev/null +++ b/src/modules/deep-research/workflows/research/template.md @@ -0,0 +1,155 @@ +# Research Report: {{topic}} + +**Research Mode:** {{mode}} +**Date:** {{date}} +**Researcher:** {{user_name}} +**Sources Consulted:** {{source_count}} + +--- + +## Executive Summary + +[Provide a concise overview in under 250 words covering: +- Key findings and main insights +- Critical implications +- Important limitations or gaps +- Primary recommendations] + +--- + +## Introduction + +### Research Scope +[Define the research question and boundaries] + +### Methodology +[Brief overview of research approach, sources prioritized, validation methods] + +### Context +[Background information necessary to understand the findings] + +--- + +## Main Findings + +### [Key Theme 1] + +[Comprehensive analysis with proper citations. Format: "According to [1], key finding..."] + +**Evidence Summary:** +- [Key point with citation] +- [Key point with citation] +- [Key point with citation] + +### [Key Theme 2] + +[Comprehensive analysis with proper citations] + +**Evidence Summary:** +- [Key point with citation] +- [Key point with citation] +- [Key point with citation] + +### [Key Theme 3] + +[Comprehensive analysis with proper citations] + +**Evidence Summary:** +- [Key point with citation] +- [Key point with citation] +- [Key point with citation] + +--- + +## Synthesis & Analysis + +### Cross-Cutting Insights +[Connect findings across themes, identify patterns and relationships] + +### Implications +[Discuss what the findings mean in practical terms] + +### Confidence Assessment +[Evaluate certainty levels for key conclusions] +- **High confidence:** [Claims supported by 3+ consistent sources] +- **Medium confidence:** [Claims with 2 sources or minor contradictions] +- **Low confidence:** [Single source or significant uncertainty] + +--- + +## Limitations & Gaps + +### Data Constraints +[Acknowledge missing information, outdated data, or access limitations] + +### Methodology Limitations +[Note scope restrictions, time constraints, or validation challenges] + +### Areas Requiring Further Research +[Identify questions that remain unanswered or need deeper investigation] + +--- + +## Recommendations + +### Immediate Actions +[Actionable steps based on high-confidence findings] + +### Further Investigation +[Areas worth additional research] + +### Considerations +[Important caveats or contextual factors for decision-making] + +--- + +## Bibliography + +[1] **Author/Organization.** "Title of Source." *Publication/Website*, Date. URL + +[2] **Author/Organization.** "Title of Source." *Publication/Website*, Date. URL + +[3] **Author/Organization.** "Title of Source." *Publication/Website*, Date. URL + +[Continue for all sources - NO truncation, ranges, or "..."] + +--- + +## Methodology Appendix + +### Search Strategy +[Keywords used, databases searched, date ranges] + +### Source Selection Criteria +[How sources were evaluated and prioritized] + +### Validation Process +[Methods used for fact-checking and triangulation] + +### Source Credibility Assessment + +| Source | Authority | Recency | Methodology | Potential Bias | Overall Rating | +|--------|-----------|---------|-------------|----------------|----------------| +| [1] | High | Current | Strong | Minimal | A | +| [2] | Medium | Recent | Adequate | Moderate | B | +| ... | ... | ... | ... | ... | ... | + +**Rating Scale:** +- **A:** Highly credible, authoritative, well-documented +- **B:** Credible with minor limitations +- **C:** Useful but requires corroboration +- **D:** Limited credibility, use with caution + +--- + +## Research Notes + +**Total Research Duration:** {{duration}} +**Search Iterations:** {{iterations}} +**Sources Evaluated:** {{sources_evaluated}} +**Sources Cited:** {{sources_cited}} +**Verification Rate:** {{verification_rate}} + +--- + +*This research report was generated using the BMad Deep Research module, implementing enterprise-grade research methodologies with multi-source verification and citation validation.* diff --git a/src/modules/deep-research/workflows/research/workflow.yaml b/src/modules/deep-research/workflows/research/workflow.yaml new file mode 100644 index 00000000..49f10b27 --- /dev/null +++ b/src/modules/deep-research/workflows/research/workflow.yaml @@ -0,0 +1,38 @@ +# Deep Research Workflow Configuration +name: "deep-research" +description: "Conduct comprehensive, multi-source research with advanced validation and citation tracking. Implements an 8-phase research pipeline for enterprise-grade intelligence gathering." +author: "BMad" + +# Critical variables load from config_source +config_source: "{project-root}/{bmad_folder}/deep-research/config.yaml" +output_folder: "{config_source}:output_folder" +user_name: "{config_source}:user_name" +communication_language: "{config_source}:communication_language" +date: system-generated + +# Context can be provided via data attribute when invoking +# Example: data="{path}/research-context.md" provides research parameters + +# Module path and component files +installed_path: "{project-root}/{bmad_folder}/deep-research/workflows/research" +template: "{installed_path}/template.md" +instructions: "{installed_path}/instructions.md" + +# Required Data Files +research_modes: "{installed_path}/research-modes.csv" + +# Output configuration +default_output_file: "{output_folder}/research-{{topic}}-{{date}}.md" + +standalone: true + +web_bundle: + name: "deep-research" + description: "Conduct comprehensive, multi-source research with advanced validation and citation tracking. Implements an 8-phase research pipeline for enterprise-grade intelligence gathering." + author: "BMad" + instructions: "{bmad_folder}/deep-research/workflows/research/instructions.md" + template: "{bmad_folder}/deep-research/workflows/research/template.md" + web_bundle_files: + - "{bmad_folder}/deep-research/workflows/research/instructions.md" + - "{bmad_folder}/deep-research/workflows/research/template.md" + - "{bmad_folder}/deep-research/workflows/research/research-modes.csv"