research-driven-planning
Loop 1 of the Three-Loop Integrated Development System. Research-driven requirements analysis with iterative risk mitigation through 5x pre-mortem cycles using multi-agent consensus. Feeds validated, risk-mitigated plans to parallel-swarm-implementation. Use when starting new features or projects requiring comprehensive planning with <3% failure confidence and evidence-based technology selection.
What this skill does
# Research-Driven Planning (Loop 1)
## Purpose
Comprehensive planning with research-backed solutions and iterative risk mitigation that prevents 85-95% of problems before coding begins.
## Specialist Agent Coordination
I coordinate multi-agent research and planning swarms using **explicit agent SOPs** from Claude-Flow's 86-agent ecosystem.
**Methodology** (SOP: Specification → Research → Planning → Execution → Knowledge):
1. **Specification Phase**: Requirements capture with structured SPEC.md
2. **Research Phase**: 6-agent parallel research with self-consistency validation
3. **Planning Phase**: MECE task decomposition with research integration
4. **Execution Phase**: 8-agent Byzantine consensus pre-mortem (5 iterations)
5. **Knowledge Phase**: Planning package generation for Loop 2 integration
**Integration**: Loop 1 of 3. Feeds → `parallel-swarm-implementation` (Loop 2), Receives ← `cicd-intelligent-recovery` (Loop 3) failure patterns.
---
## When to Use This Skill
Activate this skill when:
- Starting a new feature or project requiring comprehensive planning
- Need to prevent problems before coding begins (85-95% failure prevention)
- Want research-backed solutions instead of assumptions (30-60% time savings)
- Require risk analysis with <3% failure confidence
- Building something complex with multiple failure modes
- Need evidence-based planning that feeds into implementation
**DO NOT** use this skill for:
- Quick fixes or trivial changes (use direct implementation)
- Well-understood repetitive tasks (use existing patterns)
- Emergency hotfixes (skip to Loop 2)
---
## Input Contract
```yaml
input:
project_description: string (required)
# High-level description of what needs to be built
requirements:
functional: array[string] (required)
# Core features and capabilities
non_functional: object (optional)
performance: string
security: string
scalability: string
constraints:
technical: array[string] (stack, framework, dependencies)
timeline: string (deadlines, milestones)
resources: object (team, budget, infrastructure)
options:
research_depth: enum[quick, standard, comprehensive] (default: standard)
premortem_iterations: number (default: 5, range: 3-10)
failure_threshold: number (default: 3, target: <3%)
```
## Output Contract
```yaml
output:
specification:
spec_file: path # SPEC.md location
requirements_complete: boolean
success_criteria: array[string]
research:
evidence_sources: number # Total research sources
recommendations: array[object]
solution: string
confidence: number (0-100)
evidence: array[url]
risk_landscape: array[object]
risk: string
severity: enum[low, medium, high, critical]
mitigation: string
planning:
enhanced_plan: path # plan-enhanced.json location
total_tasks: number
task_dependencies: object
estimated_complexity: string
risk_analysis:
premortem_iterations: number
final_failure_confidence: number # Target: <3%
critical_risks_mitigated: number
defense_strategies: array[string]
integration:
planning_package: path # loop1-planning-package.json
memory_namespace: string # integration/loop1-to-loop2
ready_for_loop2: boolean
```
---
## SOP Phase 1: Specification
**Objective**: Define initial requirements with clarity and structure.
### Create SPEC.md
Generate a comprehensive specification document in the project root:
```markdown
# Project Specification
## Overview
[High-level description of what needs to be built]
## Requirements
### Functional Requirements
1. [Core feature 1]
2. [Core feature 2]
...
### Non-Functional Requirements
- Performance: [metrics]
- Security: [requirements]
- Scalability: [targets]
- Compliance: [standards]
## Constraints
- Technical: [language, framework, dependencies]
- Timeline: [deadlines, milestones]
- Resources: [team size, budget, infrastructure]
## Success Criteria
1. [Measurable outcome 1]
2. [Measurable outcome 2]
...
## Out of Scope
- [Explicitly excluded features]
```
### Store Initial Context
```bash
npx claude-flow@alpha memory store \
"project_spec" \
"$(cat SPEC.md)" \
--namespace "loop1/specification"
```
**Output**: Structured SPEC.md file and memory-stored specification
---
## SOP Phase 2: Research (Multi-Agent Evidence Collection)
**Objective**: Comprehensive solution discovery using evidence-based research with **self-consistency validation**.
### Execute 6-Agent Parallel Research SOP
**Agent Coordination Pattern** (Claude Code Task tool - Single Message):
```javascript
// RESEARCH PHASE: 6-Agent Parallel Evidence Collection
// Self-Consistency: Multiple research perspectives + cross-validation
[Single Message - All 6 Research Agents]:
// Web Research Agents (3 perspectives for self-consistency)
Task("Web Research Specialist 1",
"Research [primary_technology] best practices 2024. Focus on: security patterns, industry standards, implementation approaches. Provide evidence with source URLs. Store findings in .claude/.artifacts/web-research-1.json. Use hooks: npx claude-flow@alpha hooks pre-task --description 'web research 1' && npx claude-flow@alpha hooks post-task --task-id 'web-research-1'",
"researcher")
Task("Web Research Specialist 2",
"Research [technology] libraries comparison. Focus on: developer experience, community support, production reliability, security track record. Cross-validate findings from Specialist 1. Store in .claude/.artifacts/web-research-2.json. Use hooks for coordination.",
"researcher")
Task("Academic Research Agent",
"Research [domain] security research papers and compliance requirements. Focus on: recent vulnerabilities, mitigation strategies, industry standards, regulatory requirements. Store in .claude/.artifacts/academic-research.json.",
"researcher")
// GitHub Analysis Agents (code quality perspective)
Task("GitHub Quality Analyst",
"Analyze top [technology] libraries on GitHub. Focus on: code quality metrics (test coverage, cyclomatic complexity), issue resolution time, commit frequency, maintainer responsiveness. Generate quality rankings. Store in .claude/.artifacts/github-quality.json.",
"code-analyzer")
Task("GitHub Security Auditor",
"Audit [technology] library security. Focus on: vulnerability history, security advisories, patch response time, dependency security. Flag high-risk libraries. Store in .claude/.artifacts/github-security.json.",
"security-review")
// Synthesis Coordinator (Plan-and-Solve pattern)
Task("Research Synthesis Coordinator",
"Wait for all 5 research agents to complete. Synthesize findings using self-consistency validation: 1) Aggregate all evidence, 2) Cross-validate conflicting recommendations, 3) Calculate confidence scores based on source agreement, 4) Flag any contradictory evidence, 5) Generate ranked recommendations with evidence. Use Byzantine consensus for critical technology decisions (require 3/5 agent agreement). Store final synthesis in .claude/.artifacts/research-synthesis.json. Memory store: npx claude-flow@alpha memory store 'research_findings' \"$(cat .claude/.artifacts/research-synthesis.json)\" --namespace 'loop1/research'",
"analyst")
```
**Evidence-Based Techniques Applied**:
- **Self-Consistency**: 3 web research agents + cross-validation
- **Plan-and-Solve**: Synthesis coordinator waits, then validates systematically
- **Program-of-Thought**: Explicit step-by-step synthesis workflow
- **Byzantine Consensus**: 3/5 agreement required for critical decisions
### Research Output
This produces:
- **Solution Rankings**: Best approaches with evidence and confidence scores
- **Pattern Library**: Proven implementation patterns from real codebases
- **Risk Identification**: Known pitfalls from real implementations
- **Technology Recommendations**: Evidence-based stack selection with justifications
**ValidatiRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.