diff --git a/.claude/commands/sparc/analyzer.md b/.claude/commands/sparc/analyzer.md index 5189c2df90..299fb586c8 100644 --- a/.claude/commands/sparc/analyzer.md +++ b/.claude/commands/sparc/analyzer.md @@ -1,15 +1,35 @@ # SPARC Analyzer Mode ## Purpose -Deep code and data analysis with batch processing capabilities using MCP tools and swarm coordination. +Deep code and data analysis with batch processing capabilities. ## Activation + +### Option 1: Using MCP Tools (Preferred in Claude Code) +```javascript +mcp__claude-flow__sparc_mode { + mode: "analyzer", + task_description: "analyze codebase performance", + options: { + parallel: true, + detailed: true + } +} +``` + +### Option 2: Using NPX CLI (Fallback when MCP not available) ```bash -# Using CLI +# Use when running from terminal or MCP tools unavailable npx claude-flow sparc run analyzer "analyze codebase performance" -# Using MCP tools -mcp__claude-flow__sparc_mode mode="analyzer" task_description="analyze codebase performance" +# For alpha features +npx claude-flow@alpha sparc run analyzer "analyze codebase performance" +``` + +### Option 3: Local Installation +```bash +# If claude-flow is installed locally +./claude-flow sparc run analyzer "analyze codebase performance" ``` ## Core Capabilities @@ -19,38 +39,14 @@ mcp__claude-flow__sparc_mode mode="analyzer" task_description="analyze codebase - Memory usage analysis - Dependency mapping -## MCP Integration -```javascript -// Initialize swarm for analysis -mcp__claude-flow__swarm_init topology="mesh" strategy="auto" - -// Spawn analysis agents -mcp__claude-flow__agent_spawn type="analyst" capabilities=["code-analysis", "performance-profiling"] - -// Execute analysis -mcp__claude-flow__sparc_mode mode="analyzer" task_description="analyze codebase" -``` - ## Batch Operations - Parallel file analysis using concurrent Read operations - Batch pattern matching with Grep tool - Simultaneous metric collection - Aggregated reporting -## Workflow Example -```bash -# 1. Initialize analysis swarm -mcp__claude-flow__swarm_init topology="hierarchical" maxAgents=5 - -# 2. Run comprehensive analysis -mcp__claude-flow__sparc_mode mode="analyzer" options={"parallel": true} task_description="analyze performance bottlenecks" - -# 3. Collect results -mcp__claude-flow__performance_report format="detailed" timeframe="24h" -``` - ## Output Format - Detailed analysis reports - Performance metrics - Improvement recommendations -- Visualizations when applicable +- Visualizations when applicable \ No newline at end of file diff --git a/.claude/commands/sparc/architect.md b/.claude/commands/sparc/architect.md index 3faef7f934..5f41c5ab52 100644 --- a/.claude/commands/sparc/architect.md +++ b/.claude/commands/sparc/architect.md @@ -1,15 +1,35 @@ # SPARC Architect Mode ## Purpose -System design with Memory-based coordination for scalable architectures using MCP tools. +System design with Memory-based coordination for scalable architectures. ## Activation + +### Option 1: Using MCP Tools (Preferred in Claude Code) +```javascript +mcp__claude-flow__sparc_mode { + mode: "architect", + task_description: "design microservices architecture", + options: { + detailed: true, + memory_enabled: true + } +} +``` + +### Option 2: Using NPX CLI (Fallback when MCP not available) ```bash -# Using CLI +# Use when running from terminal or MCP tools unavailable npx claude-flow sparc run architect "design microservices architecture" -# Using MCP tools -mcp__claude-flow__sparc_mode mode="architect" task_description="design microservices architecture" +# For alpha features +npx claude-flow@alpha sparc run architect "design microservices architecture" +``` + +### Option 3: Local Installation +```bash +# If claude-flow is installed locally +./claude-flow sparc run architect "design microservices architecture" ``` ## Core Capabilities @@ -19,26 +39,11 @@ mcp__claude-flow__sparc_mode mode="architect" task_description="design microserv - API contract specification - Infrastructure planning -## MCP Integration -```javascript -// Initialize architecture swarm -mcp__claude-flow__swarm_init topology="hierarchical" strategy="auto" - -// Spawn architect agents -mcp__claude-flow__agent_spawn type="architect" capabilities=["system-design", "api-design"] - -// Execute architecture mode -mcp__claude-flow__sparc_mode mode="architect" task_description="design system" -``` - ## Memory Integration -```javascript -// Store architecture decisions -mcp__claude-flow__memory_usage action="store" key="architecture-decisions" value="microservices-design" namespace="architecture" - -// Share component specifications -mcp__claude-flow__memory_usage action="store" key="component-specs" value="api-contracts" namespace="architecture" -``` +- Store architecture decisions in Memory +- Share component specifications across agents +- Maintain design consistency +- Track architectural evolution ## Design Patterns - Microservices @@ -46,15 +51,3 @@ mcp__claude-flow__memory_usage action="store" key="component-specs" value="api-c - Domain-driven design - Hexagonal architecture - CQRS and Event Sourcing - -## Workflow Example -```bash -# 1. Initialize architecture swarm -mcp__claude-flow__swarm_init topology="star" maxAgents=8 - -# 2. Design system architecture -mcp__claude-flow__sparc_mode mode="architect" options={"patterns": ["microservices", "event-driven"]} task_description="design scalable e-commerce platform" - -# 3. Store architecture in memory -mcp__claude-flow__memory_persist sessionId="architecture-session" -``` diff --git a/.claude/commands/sparc/batch-executor.md b/.claude/commands/sparc/batch-executor.md index 2a29a0aa2c..24dc1f6fd2 100644 --- a/.claude/commands/sparc/batch-executor.md +++ b/.claude/commands/sparc/batch-executor.md @@ -1,15 +1,35 @@ # SPARC Batch Executor Mode ## Purpose -Parallel task execution specialist using batch operations with MCP tools. +Parallel task execution specialist using batch operations. ## Activation + +### Option 1: Using MCP Tools (Preferred in Claude Code) +```javascript +mcp__claude-flow__sparc_mode { + mode: "batch-executor", + task_description: "process multiple files", + options: { + parallel: true, + batch_size: 10 + } +} +``` + +### Option 2: Using NPX CLI (Fallback when MCP not available) ```bash -# Using CLI +# Use when running from terminal or MCP tools unavailable npx claude-flow sparc run batch-executor "process multiple files" -# Using MCP tools -mcp__claude-flow__sparc_mode mode="batch-executor" task_description="process multiple files" +# For alpha features +npx claude-flow@alpha sparc run batch-executor "process multiple files" +``` + +### Option 3: Local Installation +```bash +# If claude-flow is installed locally +./claude-flow sparc run batch-executor "process multiple files" ``` ## Core Capabilities @@ -19,19 +39,6 @@ mcp__claude-flow__sparc_mode mode="batch-executor" task_description="process mul - Load balancing - Progress tracking -## MCP Integration -```javascript -// Initialize batch execution swarm -mcp__claude-flow__swarm_init topology="mesh" strategy="balanced" - -// Spawn batch executor agents -mcp__claude-flow__agent_spawn type="specialist" capabilities=["batch-processing", "parallel-execution"] - -// Execute batch operations -mcp__claude-flow__batch_process items=["file1", "file2", "file3"] operation="transform" -mcp__claude-flow__parallel_execute tasks=["task1", "task2", "task3"] -``` - ## Execution Patterns - Parallel Read/Write operations - Concurrent Edit operations @@ -45,18 +52,3 @@ mcp__claude-flow__parallel_execute tasks=["task1", "task2", "task3"] - Progress monitoring - Error recovery - Result aggregation - -## Workflow Example -```bash -# 1. Initialize batch processing swarm -mcp__claude-flow__swarm_init topology="mesh" maxAgents=10 strategy="balanced" - -# 2. Execute batch operations -mcp__claude-flow__sparc_mode mode="batch-executor" options={"parallel": true, "batch-size": 50} task_description="process 1000 log files" - -# 3. Load balance work -mcp__claude-flow__load_balance swarmId="current" tasks=["parse", "analyze", "report"] - -# 4. Monitor execution -mcp__claude-flow__swarm_monitor swarmId="current" interval=1000 -``` diff --git a/.claude/commands/sparc/coder.md b/.claude/commands/sparc/coder.md index 03fb0d3ca2..2dc852433c 100644 --- a/.claude/commands/sparc/coder.md +++ b/.claude/commands/sparc/coder.md @@ -1,15 +1,35 @@ # SPARC Coder Mode ## Purpose -Autonomous code generation with batch file operations using MCP tools. +Autonomous code generation with batch file operations. ## Activation + +### Option 1: Using MCP Tools (Preferred in Claude Code) +```javascript +mcp__claude-flow__sparc_mode { + mode: "coder", + task_description: "implement user authentication", + options: { + test_driven: true, + parallel_edits: true + } +} +``` + +### Option 2: Using NPX CLI (Fallback when MCP not available) ```bash -# Using CLI +# Use when running from terminal or MCP tools unavailable npx claude-flow sparc run coder "implement user authentication" -# Using MCP tools -mcp__claude-flow__sparc_mode mode="coder" task_description="implement user authentication" +# For alpha features +npx claude-flow@alpha sparc run coder "implement user authentication" +``` + +### Option 3: Local Installation +```bash +# If claude-flow is installed locally +./claude-flow sparc run coder "implement user authentication" ``` ## Core Capabilities @@ -19,18 +39,6 @@ mcp__claude-flow__sparc_mode mode="coder" task_description="implement user authe - API development - Algorithm implementation -## MCP Integration -```javascript -// Initialize coding swarm -mcp__claude-flow__swarm_init topology="mesh" strategy="auto" - -// Spawn coder agents -mcp__claude-flow__agent_spawn type="coder" capabilities=["feature-implementation", "refactoring"] - -// Execute coding mode -mcp__claude-flow__sparc_mode mode="coder" task_description="implement authentication" -``` - ## Batch Operations - Parallel file creation - Concurrent code modifications @@ -44,15 +52,3 @@ mcp__claude-flow__sparc_mode mode="coder" task_description="implement authentica - Comprehensive error handling - Performance optimization - Security best practices - -## Workflow Example -```bash -# 1. Initialize coding swarm -mcp__claude-flow__swarm_init topology="hierarchical" maxAgents=6 - -# 2. Implement feature with parallel processing -mcp__claude-flow__sparc_mode mode="coder" options={"parallel": true, "test": true} task_description="implement JWT authentication with refresh tokens" - -# 3. Run code quality checks -mcp__claude-flow__quality_assess target="authentication-module" criteria=["security", "performance", "maintainability"] -``` diff --git a/.claude/commands/sparc/debugger.md b/.claude/commands/sparc/debugger.md index 8241dee031..7627dae303 100644 --- a/.claude/commands/sparc/debugger.md +++ b/.claude/commands/sparc/debugger.md @@ -1,15 +1,35 @@ # SPARC Debugger Mode ## Purpose -Systematic debugging with TodoWrite and Memory integration using MCP tools. +Systematic debugging with TodoWrite and Memory integration. ## Activation + +### Option 1: Using MCP Tools (Preferred in Claude Code) +```javascript +mcp__claude-flow__sparc_mode { + mode: "debugger", + task_description: "fix authentication issues", + options: { + verbose: true, + trace: true + } +} +``` + +### Option 2: Using NPX CLI (Fallback when MCP not available) ```bash -# Using CLI +# Use when running from terminal or MCP tools unavailable npx claude-flow sparc run debugger "fix authentication issues" -# Using MCP tools -mcp__claude-flow__sparc_mode mode="debugger" task_description="fix authentication issues" +# For alpha features +npx claude-flow@alpha sparc run debugger "fix authentication issues" +``` + +### Option 3: Local Installation +```bash +# If claude-flow is installed locally +./claude-flow sparc run debugger "fix authentication issues" ``` ## Core Capabilities @@ -19,18 +39,6 @@ mcp__claude-flow__sparc_mode mode="debugger" task_description="fix authenticatio - Memory leak detection - Performance bottleneck identification -## MCP Integration -```javascript -// Initialize debugging swarm -mcp__claude-flow__swarm_init topology="hierarchical" strategy="auto" - -// Spawn debugger agents -mcp__claude-flow__agent_spawn type="debugger" capabilities=["error-analysis", "performance-profiling"] - -// Execute debugging mode -mcp__claude-flow__sparc_mode mode="debugger" task_description="fix memory leak" -``` - ## Debugging Workflow 1. Create debugging plan with TodoWrite 2. Systematic issue investigation @@ -44,18 +52,3 @@ mcp__claude-flow__sparc_mode mode="debugger" task_description="fix memory leak" - Variable inspection - Call stack tracing - Memory profiling - -## Workflow Example -```bash -# 1. Initialize debugging swarm -mcp__claude-flow__swarm_init topology="star" maxAgents=4 - -# 2. Analyze error patterns -mcp__claude-flow__error_analysis logs=["error.log", "debug.log"] - -# 3. Run debugging session -mcp__claude-flow__sparc_mode mode="debugger" options={"trace": true, "profile": true} task_description="debug authentication failure" - -# 4. Store findings -mcp__claude-flow__memory_usage action="store" key="debug-findings" value="auth-issue-analysis" namespace="debugging" -``` diff --git a/.claude/commands/sparc/designer.md b/.claude/commands/sparc/designer.md index 0a50bce0ca..c15d54b705 100644 --- a/.claude/commands/sparc/designer.md +++ b/.claude/commands/sparc/designer.md @@ -1,15 +1,35 @@ # SPARC Designer Mode ## Purpose -UI/UX design with Memory coordination for consistent experiences using MCP tools. +UI/UX design with Memory coordination for consistent experiences. ## Activation + +### Option 1: Using MCP Tools (Preferred in Claude Code) +```javascript +mcp__claude-flow__sparc_mode { + mode: "designer", + task_description: "create dashboard UI", + options: { + design_system: true, + responsive: true + } +} +``` + +### Option 2: Using NPX CLI (Fallback when MCP not available) ```bash -# Using CLI +# Use when running from terminal or MCP tools unavailable npx claude-flow sparc run designer "create dashboard UI" -# Using MCP tools -mcp__claude-flow__sparc_mode mode="designer" task_description="create dashboard UI" +# For alpha features +npx claude-flow@alpha sparc run designer "create dashboard UI" +``` + +### Option 3: Local Installation +```bash +# If claude-flow is installed locally +./claude-flow sparc run designer "create dashboard UI" ``` ## Core Capabilities @@ -19,18 +39,6 @@ mcp__claude-flow__sparc_mode mode="designer" task_description="create dashboard - Accessibility planning - Responsive layouts -## MCP Integration -```javascript -// Initialize design swarm -mcp__claude-flow__swarm_init topology="star" strategy="auto" - -// Spawn designer agents -mcp__claude-flow__agent_spawn type="specialist" capabilities=["ui-design", "ux-research"] - -// Execute design mode -mcp__claude-flow__sparc_mode mode="designer" task_description="design responsive dashboard" -``` - ## Design Process - User research insights - Wireframe creation @@ -43,18 +51,3 @@ mcp__claude-flow__sparc_mode mode="designer" task_description="design responsive - Share component specs - Maintain consistency - Track design evolution - -## Workflow Example -```bash -# 1. Initialize design swarm -mcp__claude-flow__swarm_init topology="star" maxAgents=5 - -# 2. Create design system -mcp__claude-flow__sparc_mode mode="designer" options={"system": true, "responsive": true} task_description="create comprehensive design system" - -# 3. Store design tokens -mcp__claude-flow__memory_usage action="store" key="design-tokens" value="color-typography-spacing" namespace="design" - -# 4. Share across teams -mcp__claude-flow__memory_sync target="frontend-team" -``` diff --git a/.claude/commands/sparc/documenter.md b/.claude/commands/sparc/documenter.md index 27b81c9011..fba3d97a11 100644 --- a/.claude/commands/sparc/documenter.md +++ b/.claude/commands/sparc/documenter.md @@ -1,15 +1,35 @@ # SPARC Documenter Mode ## Purpose -Documentation with batch file operations for comprehensive docs using MCP tools. +Documentation with batch file operations for comprehensive docs. ## Activation + +### Option 1: Using MCP Tools (Preferred in Claude Code) +```javascript +mcp__claude-flow__sparc_mode { + mode: "documenter", + task_description: "create API documentation", + options: { + format: "markdown", + include_examples: true + } +} +``` + +### Option 2: Using NPX CLI (Fallback when MCP not available) ```bash -# Using CLI +# Use when running from terminal or MCP tools unavailable npx claude-flow sparc run documenter "create API documentation" -# Using MCP tools -mcp__claude-flow__sparc_mode mode="documenter" task_description="create API documentation" +# For alpha features +npx claude-flow@alpha sparc run documenter "create API documentation" +``` + +### Option 3: Local Installation +```bash +# If claude-flow is installed locally +./claude-flow sparc run documenter "create API documentation" ``` ## Core Capabilities @@ -19,18 +39,6 @@ mcp__claude-flow__sparc_mode mode="documenter" task_description="create API docu - Architecture docs - README files -## MCP Integration -```javascript -// Initialize documentation swarm -mcp__claude-flow__swarm_init topology="star" strategy="auto" - -// Spawn documenter agents -mcp__claude-flow__agent_spawn type="documenter" capabilities=["api-docs", "user-guides"] - -// Execute documentation mode -mcp__claude-flow__sparc_mode mode="documenter" task_description="generate comprehensive docs" -``` - ## Documentation Types - Markdown documentation - JSDoc comments @@ -44,18 +52,3 @@ mcp__claude-flow__sparc_mode mode="documenter" task_description="generate compre - Cross-reference management - Example generation - Diagram creation - -## Workflow Example -```bash -# 1. Initialize documentation swarm -mcp__claude-flow__swarm_init topology="star" maxAgents=5 - -# 2. Generate documentation -mcp__claude-flow__sparc_mode mode="documenter" options={"format": "markdown", "examples": true} task_description="create full API documentation with examples" - -# 3. Store documentation structure -mcp__claude-flow__memory_usage action="store" key="doc-structure" value="api-guide-reference" namespace="documentation" - -# 4. Export documentation -mcp__claude-flow__workflow_export workflowId="documentation" format="markdown" -``` diff --git a/.claude/commands/sparc/innovator.md b/.claude/commands/sparc/innovator.md index e4d72c5656..5a11c1a9f3 100644 --- a/.claude/commands/sparc/innovator.md +++ b/.claude/commands/sparc/innovator.md @@ -1,15 +1,35 @@ # SPARC Innovator Mode ## Purpose -Creative problem solving with WebSearch and Memory integration using MCP tools. +Creative problem solving with WebSearch and Memory integration. ## Activation + +### Option 1: Using MCP Tools (Preferred in Claude Code) +```javascript +mcp__claude-flow__sparc_mode { + mode: "innovator", + task_description: "innovative solutions for scaling", + options: { + research_depth: "comprehensive", + creativity_level: "high" + } +} +``` + +### Option 2: Using NPX CLI (Fallback when MCP not available) ```bash -# Using CLI +# Use when running from terminal or MCP tools unavailable npx claude-flow sparc run innovator "innovative solutions for scaling" -# Using MCP tools -mcp__claude-flow__sparc_mode mode="innovator" task_description="innovative solutions for scaling" +# For alpha features +npx claude-flow@alpha sparc run innovator "innovative solutions for scaling" +``` + +### Option 3: Local Installation +```bash +# If claude-flow is installed locally +./claude-flow sparc run innovator "innovative solutions for scaling" ``` ## Core Capabilities @@ -19,18 +39,6 @@ mcp__claude-flow__sparc_mode mode="innovator" task_description="innovative solut - Pattern innovation - Proof of concept -## MCP Integration -```javascript -// Initialize innovation swarm -mcp__claude-flow__swarm_init topology="mesh" strategy="adaptive" - -// Spawn innovator agents -mcp__claude-flow__agent_spawn type="specialist" capabilities=["creative-thinking", "research"] - -// Execute innovation mode -mcp__claude-flow__sparc_mode mode="innovator" task_description="innovative scaling solutions" -``` - ## Innovation Process - Divergent thinking phase - Research and exploration @@ -44,18 +52,3 @@ mcp__claude-flow__sparc_mode mode="innovator" task_description="innovative scali - Cross-domain insights - Pattern recognition - Analogical reasoning - -## Workflow Example -```bash -# 1. Initialize innovation swarm -mcp__claude-flow__swarm_init topology="mesh" maxAgents=8 strategy="adaptive" - -# 2. Research current trends -mcp__claude-flow__sparc_mode mode="innovator" options={"research": true, "brainstorm": true} task_description="explore AI-driven optimization techniques" - -# 3. Store innovative ideas -mcp__claude-flow__memory_usage action="store" key="innovation-ideas" value="ai-optimization-concepts" namespace="innovation" - -# 4. Generate innovation report -mcp__claude-flow__performance_report format="detailed" timeframe="7d" -``` diff --git a/.claude/commands/sparc/memory-manager.md b/.claude/commands/sparc/memory-manager.md index 29f1470651..c3de400508 100644 --- a/.claude/commands/sparc/memory-manager.md +++ b/.claude/commands/sparc/memory-manager.md @@ -1,15 +1,35 @@ # SPARC Memory Manager Mode ## Purpose -Knowledge management with Memory tools for persistent insights using MCP tools. +Knowledge management with Memory tools for persistent insights. ## Activation + +### Option 1: Using MCP Tools (Preferred in Claude Code) +```javascript +mcp__claude-flow__sparc_mode { + mode: "memory-manager", + task_description: "organize project knowledge", + options: { + namespace: "project", + auto_organize: true + } +} +``` + +### Option 2: Using NPX CLI (Fallback when MCP not available) ```bash -# Using CLI +# Use when running from terminal or MCP tools unavailable npx claude-flow sparc run memory-manager "organize project knowledge" -# Using MCP tools -mcp__claude-flow__sparc_mode mode="memory-manager" task_description="organize project knowledge" +# For alpha features +npx claude-flow@alpha sparc run memory-manager "organize project knowledge" +``` + +### Option 3: Local Installation +```bash +# If claude-flow is installed locally +./claude-flow sparc run memory-manager "organize project knowledge" ``` ## Core Capabilities @@ -19,17 +39,6 @@ mcp__claude-flow__sparc_mode mode="memory-manager" task_description="organize pr - Insight preservation - Cross-session persistence -## MCP Integration -```javascript -// Initialize memory management -mcp__claude-flow__swarm_init topology="star" strategy="auto" - -// Memory operations -mcp__claude-flow__memory_usage action="store" key="project-insights" value="architecture-decisions" namespace="knowledge" -mcp__claude-flow__memory_search pattern="design-patterns" namespace="knowledge" limit=20 -mcp__claude-flow__memory_persist sessionId="knowledge-session" -``` - ## Memory Strategies - Hierarchical organization - Tag-based categorization @@ -43,19 +52,3 @@ mcp__claude-flow__memory_persist sessionId="knowledge-session" - Update knowledge base - Merge related information - Archive obsolete data - -## Workflow Example -```bash -# 1. Initialize knowledge swarm -mcp__claude-flow__swarm_init topology="hierarchical" maxAgents=4 - -# 2. Organize knowledge -mcp__claude-flow__sparc_mode mode="memory-manager" options={"organize": true, "index": true} task_description="organize project documentation and decisions" - -# 3. Create knowledge namespaces -mcp__claude-flow__memory_namespace action="create" namespace="architecture" -mcp__claude-flow__memory_namespace action="create" namespace="implementation" - -# 4. Backup knowledge base -mcp__claude-flow__memory_backup path="/backups/knowledge-base" -``` diff --git a/.claude/commands/sparc/optimizer.md b/.claude/commands/sparc/optimizer.md index 0692deba8f..94a246adcf 100644 --- a/.claude/commands/sparc/optimizer.md +++ b/.claude/commands/sparc/optimizer.md @@ -1,15 +1,35 @@ # SPARC Optimizer Mode ## Purpose -Performance optimization with systematic analysis and improvements using MCP tools. +Performance optimization with systematic analysis and improvements. ## Activation + +### Option 1: Using MCP Tools (Preferred in Claude Code) +```javascript +mcp__claude-flow__sparc_mode { + mode: "optimizer", + task_description: "optimize application performance", + options: { + profile: true, + benchmark: true + } +} +``` + +### Option 2: Using NPX CLI (Fallback when MCP not available) ```bash -# Using CLI +# Use when running from terminal or MCP tools unavailable npx claude-flow sparc run optimizer "optimize application performance" -# Using MCP tools -mcp__claude-flow__sparc_mode mode="optimizer" task_description="optimize application performance" +# For alpha features +npx claude-flow@alpha sparc run optimizer "optimize application performance" +``` + +### Option 3: Local Installation +```bash +# If claude-flow is installed locally +./claude-flow sparc run optimizer "optimize application performance" ``` ## Core Capabilities @@ -19,18 +39,6 @@ mcp__claude-flow__sparc_mode mode="optimizer" task_description="optimize applica - Algorithm improvement - Scalability enhancement -## MCP Integration -```javascript -// Initialize optimization swarm -mcp__claude-flow__swarm_init topology="hierarchical" strategy="auto" - -// Spawn optimizer agents -mcp__claude-flow__agent_spawn type="optimizer" capabilities=["performance-analysis", "code-optimization"] - -// Run optimization -mcp__claude-flow__daa_optimization target="application" metrics=["speed", "memory", "cpu"] -``` - ## Optimization Areas - Execution speed - Memory usage @@ -44,18 +52,3 @@ mcp__claude-flow__daa_optimization target="application" metrics=["speed", "memor 3. Optimization implementation 4. Impact verification 5. Continuous monitoring - -## Workflow Example -```bash -# 1. Initialize optimization swarm -mcp__claude-flow__swarm_init topology="star" maxAgents=6 - -# 2. Analyze bottlenecks -mcp__claude-flow__bottleneck_analyze component="api-server" metrics=["response-time", "throughput"] - -# 3. Execute optimization -mcp__claude-flow__sparc_mode mode="optimizer" options={"target": "performance", "aggressive": true} task_description="optimize API response times" - -# 4. Verify improvements -mcp__claude-flow__performance_report format="detailed" timeframe="24h" -``` diff --git a/.claude/commands/sparc/orchestrator.md b/.claude/commands/sparc/orchestrator.md index ee29fefcb4..b577751bc2 100644 --- a/.claude/commands/sparc/orchestrator.md +++ b/.claude/commands/sparc/orchestrator.md @@ -4,12 +4,28 @@ Multi-agent task orchestration with TodoWrite/TodoRead/Task/Memory using MCP tools. ## Activation + +### Option 1: Using MCP Tools (Preferred in Claude Code) +```javascript +mcp__claude-flow__sparc_mode { + mode: "orchestrator", + task_description: "coordinate feature development" +} +``` + +### Option 2: Using NPX CLI (Fallback when MCP not available) ```bash -# Using CLI +# Use when running from terminal or MCP tools unavailable npx claude-flow sparc run orchestrator "coordinate feature development" -# Using MCP tools -mcp__claude-flow__sparc_mode mode="orchestrator" task_description="coordinate feature development" +# For alpha features +npx claude-flow@alpha sparc run orchestrator "coordinate feature development" +``` + +### Option 3: Local Installation +```bash +# If claude-flow is installed locally +./claude-flow sparc run orchestrator "coordinate feature development" ``` ## Core Capabilities @@ -19,16 +35,41 @@ mcp__claude-flow__sparc_mode mode="orchestrator" task_description="coordinate fe - Progress tracking - Result synthesis -## MCP Integration +## Integration Examples + +### Using MCP Tools (Preferred) ```javascript // Initialize orchestration swarm -mcp__claude-flow__swarm_init topology="hierarchical" strategy="auto" maxAgents=8 +mcp__claude-flow__swarm_init { + topology: "hierarchical", + strategy: "auto", + maxAgents: 8 +} // Spawn coordinator agent -mcp__claude-flow__agent_spawn type="coordinator" capabilities=["task-planning", "resource-management"] +mcp__claude-flow__agent_spawn { + type: "coordinator", + capabilities: ["task-planning", "resource-management"] +} // Orchestrate tasks -mcp__claude-flow__task_orchestrate task="feature development" strategy="parallel" dependencies=["auth", "ui", "api"] +mcp__claude-flow__task_orchestrate { + task: "feature development", + strategy: "parallel", + dependencies: ["auth", "ui", "api"] +} +``` + +### Using NPX CLI (Fallback) +```bash +# Initialize orchestration swarm +npx claude-flow swarm init --topology hierarchical --strategy auto --max-agents 8 + +# Spawn coordinator agent +npx claude-flow agent spawn --type coordinator --capabilities "task-planning,resource-management" + +# Orchestrate tasks +npx claude-flow task orchestrate --task "feature development" --strategy parallel --deps "auth,ui,api" ``` ## Orchestration Patterns @@ -46,16 +87,46 @@ mcp__claude-flow__task_orchestrate task="feature development" strategy="parallel - Result aggregation ## Workflow Example + +### Using MCP Tools (Preferred) +```javascript +// 1. Initialize orchestration swarm +mcp__claude-flow__swarm_init { + topology: "hierarchical", + maxAgents: 10 +} + +// 2. Create workflow +mcp__claude-flow__workflow_create { + name: "feature-development", + steps: ["design", "implement", "test", "deploy"] +} + +// 3. Execute orchestration +mcp__claude-flow__sparc_mode { + mode: "orchestrator", + options: {parallel: true, monitor: true}, + task_description: "develop user management system" +} + +// 4. Monitor progress +mcp__claude-flow__swarm_monitor { + swarmId: "current", + interval: 5000 +} +``` + +### Using NPX CLI (Fallback) ```bash # 1. Initialize orchestration swarm -mcp__claude-flow__swarm_init topology="hierarchical" maxAgents=10 +npx claude-flow swarm init --topology hierarchical --max-agents 10 # 2. Create workflow -mcp__claude-flow__workflow_create name="feature-development" steps=["design", "implement", "test", "deploy"] +npx claude-flow workflow create --name "feature-development" --steps "design,implement,test,deploy" # 3. Execute orchestration -mcp__claude-flow__sparc_mode mode="orchestrator" options={"parallel": true, "monitor": true} task_description="develop user management system" +npx claude-flow sparc run orchestrator "develop user management system" --parallel --monitor # 4. Monitor progress -mcp__claude-flow__swarm_monitor swarmId="current" interval=5000 -``` +npx claude-flow swarm monitor --interval 5000 +``` \ No newline at end of file diff --git a/.claude/commands/sparc/researcher.md b/.claude/commands/sparc/researcher.md index f477047724..ecd6be34fd 100644 --- a/.claude/commands/sparc/researcher.md +++ b/.claude/commands/sparc/researcher.md @@ -1,15 +1,35 @@ # SPARC Researcher Mode ## Purpose -Deep research with parallel WebSearch/WebFetch and Memory coordination using MCP tools. +Deep research with parallel WebSearch/WebFetch and Memory coordination. ## Activation + +### Option 1: Using MCP Tools (Preferred in Claude Code) +```javascript +mcp__claude-flow__sparc_mode { + mode: "researcher", + task_description: "research AI trends 2024", + options: { + depth: "comprehensive", + sources: ["academic", "industry", "news"] + } +} +``` + +### Option 2: Using NPX CLI (Fallback when MCP not available) ```bash -# Using CLI +# Use when running from terminal or MCP tools unavailable npx claude-flow sparc run researcher "research AI trends 2024" -# Using MCP tools -mcp__claude-flow__sparc_mode mode="researcher" task_description="research AI trends 2024" +# For alpha features +npx claude-flow@alpha sparc run researcher "research AI trends 2024" +``` + +### Option 3: Local Installation +```bash +# If claude-flow is installed locally +./claude-flow sparc run researcher "research AI trends 2024" ``` ## Core Capabilities @@ -19,18 +39,6 @@ mcp__claude-flow__sparc_mode mode="researcher" task_description="research AI tre - Competitive research - Technology assessment -## MCP Integration -```javascript -// Initialize research swarm -mcp__claude-flow__swarm_init topology="mesh" strategy="adaptive" - -// Spawn researcher agents -mcp__claude-flow__agent_spawn type="researcher" capabilities=["web-research", "analysis"] - -// Execute research mode -mcp__claude-flow__sparc_mode mode="researcher" task_description="research latest trends" -``` - ## Research Methods - Parallel web searches - Academic paper analysis @@ -44,18 +52,3 @@ mcp__claude-flow__sparc_mode mode="researcher" task_description="research latest - Track information sources - Cross-reference insights - Maintain research history - -## Workflow Example -```bash -# 1. Initialize research swarm -mcp__claude-flow__swarm_init topology="mesh" maxAgents=8 strategy="adaptive" - -# 2. Conduct research -mcp__claude-flow__sparc_mode mode="researcher" options={"depth": "comprehensive", "sources": "academic,industry"} task_description="research quantum computing applications" - -# 3. Store findings -mcp__claude-flow__memory_usage action="store" key="research-quantum" value="findings-2024" namespace="research" - -# 4. Search and analyze -mcp__claude-flow__memory_search pattern="quantum" namespace="research" limit=50 -``` diff --git a/.claude/commands/sparc/reviewer.md b/.claude/commands/sparc/reviewer.md index 85b9ed9575..1464aca931 100644 --- a/.claude/commands/sparc/reviewer.md +++ b/.claude/commands/sparc/reviewer.md @@ -1,15 +1,35 @@ # SPARC Reviewer Mode ## Purpose -Code review using batch file analysis for comprehensive reviews using MCP tools. +Code review using batch file analysis for comprehensive reviews. ## Activation + +### Option 1: Using MCP Tools (Preferred in Claude Code) +```javascript +mcp__claude-flow__sparc_mode { + mode: "reviewer", + task_description: "review pull request #123", + options: { + security_check: true, + performance_check: true + } +} +``` + +### Option 2: Using NPX CLI (Fallback when MCP not available) ```bash -# Using CLI +# Use when running from terminal or MCP tools unavailable npx claude-flow sparc run reviewer "review pull request #123" -# Using MCP tools -mcp__claude-flow__sparc_mode mode="reviewer" task_description="review pull request #123" +# For alpha features +npx claude-flow@alpha sparc run reviewer "review pull request #123" +``` + +### Option 3: Local Installation +```bash +# If claude-flow is installed locally +./claude-flow sparc run reviewer "review pull request #123" ``` ## Core Capabilities @@ -19,18 +39,6 @@ mcp__claude-flow__sparc_mode mode="reviewer" task_description="review pull reque - Best practices check - Documentation review -## MCP Integration -```javascript -// Initialize review swarm -mcp__claude-flow__swarm_init topology="hierarchical" strategy="auto" - -// Spawn reviewer agents -mcp__claude-flow__agent_spawn type="reviewer" capabilities=["code-quality", "security-analysis"] - -// Execute review mode -mcp__claude-flow__sparc_mode mode="reviewer" task_description="review codebase" -``` - ## Review Criteria - Code correctness - Design patterns @@ -44,18 +52,3 @@ mcp__claude-flow__sparc_mode mode="reviewer" task_description="review codebase" - Dependency checking - Consistency validation - Automated reporting - -## Workflow Example -```bash -# 1. Initialize review swarm -mcp__claude-flow__swarm_init topology="hierarchical" maxAgents=6 - -# 2. Perform code review -mcp__claude-flow__sparc_mode mode="reviewer" options={"depth": "comprehensive", "security": true} task_description="review authentication module" - -# 3. GitHub integration -mcp__claude-flow__github_code_review repo="owner/repo" pr=123 - -# 4. Quality assessment -mcp__claude-flow__quality_assess target="pull-request-123" criteria=["code-quality", "security", "performance"] -``` diff --git a/.claude/commands/sparc/sparc-modes.md b/.claude/commands/sparc/sparc-modes.md index ef8e847a7d..ed477d9f11 100644 --- a/.claude/commands/sparc/sparc-modes.md +++ b/.claude/commands/sparc/sparc-modes.md @@ -31,11 +31,45 @@ SPARC (Specification, Planning, Architecture, Review, Code) is a comprehensive d ## Usage -### CLI Commands +### Option 1: Using MCP Tools (Preferred in Claude Code) +```javascript +// Execute SPARC mode directly +mcp__claude-flow__sparc_mode { + mode: "", + task_description: "", + options: { + // mode-specific options + } +} + +// Initialize swarm for advanced coordination +mcp__claude-flow__swarm_init { + topology: "hierarchical", + strategy: "auto", + maxAgents: 8 +} + +// Spawn specialized agents +mcp__claude-flow__agent_spawn { + type: "", + capabilities: ["", ""] +} + +// Monitor execution +mcp__claude-flow__swarm_monitor { + swarmId: "current", + interval: 5000 +} +``` + +### Option 2: Using NPX CLI (Fallback when MCP not available) ```bash -# Run a specific mode +# Use when running from terminal or MCP tools unavailable npx claude-flow sparc run "task description" +# For alpha features +npx claude-flow@alpha sparc run "task description" + # List all modes npx claude-flow sparc modes @@ -46,49 +80,95 @@ npx claude-flow sparc help npx claude-flow sparc run "task" --parallel --monitor ``` -### MCP Tool Integration -```javascript -// Initialize swarm for SPARC mode -mcp__claude-flow__swarm_init topology="hierarchical" strategy="auto" maxAgents=8 - -// Execute SPARC mode -mcp__claude-flow__sparc_mode mode="" task_description="" options={} - -// Spawn specialized agents -mcp__claude-flow__agent_spawn type="" capabilities=["", ""] - -// Monitor execution -mcp__claude-flow__swarm_monitor swarmId="current" interval=5000 +### Option 3: Local Installation +```bash +# If claude-flow is installed locally +./claude-flow sparc run "task description" ``` ## Common Workflows ### Full Development Cycle + +#### Using MCP Tools (Preferred) +```javascript +// 1. Initialize development swarm +mcp__claude-flow__swarm_init { + topology: "hierarchical", + maxAgents: 12 +} + +// 2. Architecture design +mcp__claude-flow__sparc_mode { + mode: "architect", + task_description: "design microservices" +} + +// 3. Implementation +mcp__claude-flow__sparc_mode { + mode: "coder", + task_description: "implement services" +} + +// 4. Testing +mcp__claude-flow__sparc_mode { + mode: "tdd", + task_description: "test all services" +} + +// 5. Review +mcp__claude-flow__sparc_mode { + mode: "reviewer", + task_description: "review implementation" +} +``` + +#### Using NPX CLI (Fallback) ```bash -# 1. Initialize development swarm -mcp__claude-flow__swarm_init topology="hierarchical" maxAgents=12 +# 1. Architecture design +npx claude-flow sparc run architect "design microservices" -# 2. Architecture design -mcp__claude-flow__sparc_mode mode="architect" task_description="design microservices" +# 2. Implementation +npx claude-flow sparc run coder "implement services" -# 3. Implementation -mcp__claude-flow__sparc_mode mode="coder" task_description="implement services" +# 3. Testing +npx claude-flow sparc run tdd "test all services" -# 4. Testing -mcp__claude-flow__sparc_mode mode="tdd" task_description="test all services" - -# 5. Review -mcp__claude-flow__sparc_mode mode="reviewer" task_description="review implementation" +# 4. Review +npx claude-flow sparc run reviewer "review implementation" ``` ### Research and Innovation + +#### Using MCP Tools (Preferred) +```javascript +// 1. Research phase +mcp__claude-flow__sparc_mode { + mode: "researcher", + task_description: "research best practices" +} + +// 2. Innovation +mcp__claude-flow__sparc_mode { + mode: "innovator", + task_description: "propose novel solutions" +} + +// 3. Documentation +mcp__claude-flow__sparc_mode { + mode: "documenter", + task_description: "document findings" +} +``` + +#### Using NPX CLI (Fallback) ```bash # 1. Research phase -mcp__claude-flow__sparc_mode mode="researcher" task_description="research best practices" +npx claude-flow sparc run researcher "research best practices" # 2. Innovation -mcp__claude-flow__sparc_mode mode="innovator" task_description="propose novel solutions" +npx claude-flow sparc run innovator "propose novel solutions" # 3. Documentation -mcp__claude-flow__sparc_mode mode="documenter" task_description="document findings" +npx claude-flow sparc run documenter "document findings" ``` diff --git a/.claude/commands/sparc/swarm-coordinator.md b/.claude/commands/sparc/swarm-coordinator.md index a7dc451e61..0454c51e9a 100644 --- a/.claude/commands/sparc/swarm-coordinator.md +++ b/.claude/commands/sparc/swarm-coordinator.md @@ -1,15 +1,35 @@ # SPARC Swarm Coordinator Mode ## Purpose -Specialized swarm management with batch coordination capabilities using MCP tools. +Specialized swarm management with batch coordination capabilities. ## Activation + +### Option 1: Using MCP Tools (Preferred in Claude Code) +```javascript +mcp__claude-flow__sparc_mode { + mode: "swarm-coordinator", + task_description: "manage development swarm", + options: { + topology: "hierarchical", + max_agents: 10 + } +} +``` + +### Option 2: Using NPX CLI (Fallback when MCP not available) ```bash -# Using CLI +# Use when running from terminal or MCP tools unavailable npx claude-flow sparc run swarm-coordinator "manage development swarm" -# Using MCP tools -mcp__claude-flow__sparc_mode mode="swarm-coordinator" task_description="manage development swarm" +# For alpha features +npx claude-flow@alpha sparc run swarm-coordinator "manage development swarm" +``` + +### Option 3: Local Installation +```bash +# If claude-flow is installed locally +./claude-flow sparc run swarm-coordinator "manage development swarm" ``` ## Core Capabilities @@ -19,18 +39,6 @@ mcp__claude-flow__sparc_mode mode="swarm-coordinator" task_description="manage d - Load balancing - Result collection -## MCP Integration -```javascript -// Initialize swarm -mcp__claude-flow__swarm_init topology="mesh" strategy="balanced" maxAgents=8 - -// Spawn coordinator -mcp__claude-flow__agent_spawn type="coordinator" capabilities=["swarm-management", "load-balancing"] - -// Coordinate swarm -mcp__claude-flow__coordination_sync swarmId="development-swarm" -``` - ## Coordination Modes - Hierarchical swarms - Mesh networks @@ -44,21 +52,3 @@ mcp__claude-flow__coordination_sync swarmId="development-swarm" - Failure recovery - Performance monitoring - Quality assurance - -## Workflow Example -```bash -# 1. Initialize advanced swarm -mcp__claude-flow__swarm_init topology="hierarchical" maxAgents=12 strategy="adaptive" - -# 2. Spawn specialized agents -mcp__claude-flow__agent_spawn type="researcher" capabilities=["analysis"] -mcp__claude-flow__agent_spawn type="coder" capabilities=["implementation"] -mcp__claude-flow__agent_spawn type="tester" capabilities=["validation"] - -# 3. Coordinate swarm execution -mcp__claude-flow__sparc_mode mode="swarm-coordinator" options={"auto-scale": true} task_description="coordinate full-stack development" - -# 4. Monitor and optimize -mcp__claude-flow__topology_optimize swarmId="current" -mcp__claude-flow__swarm_status swarmId="current" -``` diff --git a/.claude/commands/sparc/tdd.md b/.claude/commands/sparc/tdd.md index c891d3f323..a711770938 100644 --- a/.claude/commands/sparc/tdd.md +++ b/.claude/commands/sparc/tdd.md @@ -1,15 +1,35 @@ # SPARC TDD Mode ## Purpose -Test-driven development with TodoWrite planning and comprehensive testing using MCP tools. +Test-driven development with TodoWrite planning and comprehensive testing. ## Activation + +### Option 1: Using MCP Tools (Preferred in Claude Code) +```javascript +mcp__claude-flow__sparc_mode { + mode: "tdd", + task_description: "shopping cart feature", + options: { + coverage_target: 90, + test_framework: "jest" + } +} +``` + +### Option 2: Using NPX CLI (Fallback when MCP not available) ```bash -# Using CLI +# Use when running from terminal or MCP tools unavailable npx claude-flow sparc run tdd "shopping cart feature" -# Using MCP tools -mcp__claude-flow__sparc_mode mode="tdd" task_description="shopping cart feature" +# For alpha features +npx claude-flow@alpha sparc run tdd "shopping cart feature" +``` + +### Option 3: Local Installation +```bash +# If claude-flow is installed locally +./claude-flow sparc run tdd "shopping cart feature" ``` ## Core Capabilities @@ -19,19 +39,6 @@ mcp__claude-flow__sparc_mode mode="tdd" task_description="shopping cart feature" - Coverage optimization - Continuous testing -## MCP Integration -```javascript -// Initialize TDD swarm -mcp__claude-flow__swarm_init topology="hierarchical" strategy="auto" - -// Spawn TDD agents -mcp__claude-flow__agent_spawn type="tester" capabilities=["unit-testing", "integration-testing"] -mcp__claude-flow__agent_spawn type="coder" capabilities=["implementation", "refactoring"] - -// Execute TDD mode -mcp__claude-flow__sparc_mode mode="tdd" task_description="implement shopping cart" -``` - ## TDD Workflow 1. Write failing tests 2. Implement minimum code @@ -45,18 +52,3 @@ mcp__claude-flow__sparc_mode mode="tdd" task_description="implement shopping car - End-to-end testing - Performance testing - Security testing - -## Workflow Example -```bash -# 1. Initialize TDD swarm -mcp__claude-flow__swarm_init topology="star" maxAgents=6 - -# 2. Create test plan -mcp__claude-flow__workflow_create name="tdd-cycle" steps=["write-tests", "implement", "refactor"] - -# 3. Execute TDD cycle -mcp__claude-flow__sparc_mode mode="tdd" options={"coverage": "100%", "parallel-tests": true} task_description="implement user authentication with JWT" - -# 4. Validate quality -mcp__claude-flow__quality_assess target="authentication" criteria=["test-coverage", "code-quality", "performance"] -``` diff --git a/.claude/commands/sparc/tester.md b/.claude/commands/sparc/tester.md index 882e62bab9..1d02c7eed5 100644 --- a/.claude/commands/sparc/tester.md +++ b/.claude/commands/sparc/tester.md @@ -1,15 +1,35 @@ # SPARC Tester Mode ## Purpose -Comprehensive testing with parallel execution capabilities using MCP tools. +Comprehensive testing with parallel execution capabilities. ## Activation + +### Option 1: Using MCP Tools (Preferred in Claude Code) +```javascript +mcp__claude-flow__sparc_mode { + mode: "tester", + task_description: "full regression suite", + options: { + parallel: true, + coverage: true + } +} +``` + +### Option 2: Using NPX CLI (Fallback when MCP not available) ```bash -# Using CLI +# Use when running from terminal or MCP tools unavailable npx claude-flow sparc run tester "full regression suite" -# Using MCP tools -mcp__claude-flow__sparc_mode mode="tester" task_description="full regression suite" +# For alpha features +npx claude-flow@alpha sparc run tester "full regression suite" +``` + +### Option 3: Local Installation +```bash +# If claude-flow is installed locally +./claude-flow sparc run tester "full regression suite" ``` ## Core Capabilities @@ -19,18 +39,6 @@ mcp__claude-flow__sparc_mode mode="tester" task_description="full regression sui - Coverage analysis - Report generation -## MCP Integration -```javascript -// Initialize testing swarm -mcp__claude-flow__swarm_init topology="mesh" strategy="balanced" - -// Spawn tester agents -mcp__claude-flow__agent_spawn type="tester" capabilities=["unit-testing", "e2e-testing", "performance-testing"] - -// Execute testing mode -mcp__claude-flow__sparc_mode mode="tester" task_description="run comprehensive test suite" -``` - ## Test Types - Unit tests - Integration tests @@ -44,18 +52,3 @@ mcp__claude-flow__sparc_mode mode="tester" task_description="run comprehensive t - Load testing - Cross-browser testing - Multi-environment validation - -## Workflow Example -```bash -# 1. Initialize testing swarm -mcp__claude-flow__swarm_init topology="mesh" maxAgents=10 strategy="balanced" - -# 2. Run parallel tests -mcp__claude-flow__sparc_mode mode="tester" options={"parallel": true, "coverage": true} task_description="execute full test suite with coverage" - -# 3. Execute specific test types -mcp__claude-flow__parallel_execute tasks=["unit-tests", "integration-tests", "e2e-tests"] - -# 4. Generate test report -mcp__claude-flow__performance_report format="detailed" timeframe="24h" -``` diff --git a/.claude/commands/sparc/workflow-manager.md b/.claude/commands/sparc/workflow-manager.md index 3d6610e129..5c449de7a3 100644 --- a/.claude/commands/sparc/workflow-manager.md +++ b/.claude/commands/sparc/workflow-manager.md @@ -1,15 +1,35 @@ # SPARC Workflow Manager Mode ## Purpose -Process automation with TodoWrite planning and Task execution using MCP tools. +Process automation with TodoWrite planning and Task execution. ## Activation + +### Option 1: Using MCP Tools (Preferred in Claude Code) +```javascript +mcp__claude-flow__sparc_mode { + mode: "workflow-manager", + task_description: "automate deployment", + options: { + pipeline: "ci-cd", + rollback_enabled: true + } +} +``` + +### Option 2: Using NPX CLI (Fallback when MCP not available) ```bash -# Using CLI +# Use when running from terminal or MCP tools unavailable npx claude-flow sparc run workflow-manager "automate deployment" -# Using MCP tools -mcp__claude-flow__sparc_mode mode="workflow-manager" task_description="automate deployment" +# For alpha features +npx claude-flow@alpha sparc run workflow-manager "automate deployment" +``` + +### Option 3: Local Installation +```bash +# If claude-flow is installed locally +./claude-flow sparc run workflow-manager "automate deployment" ``` ## Core Capabilities @@ -19,18 +39,6 @@ mcp__claude-flow__sparc_mode mode="workflow-manager" task_description="automate - Event handling - State management -## MCP Integration -```javascript -// Initialize workflow swarm -mcp__claude-flow__swarm_init topology="hierarchical" strategy="auto" - -// Create workflow -mcp__claude-flow__workflow_create name="deployment-pipeline" steps=["build", "test", "deploy"] triggers=["push", "merge"] - -// Execute workflow -mcp__claude-flow__workflow_execute workflowId="deployment-pipeline" params={"branch": "main"} -``` - ## Workflow Patterns - Sequential flows - Parallel branches @@ -44,18 +52,3 @@ mcp__claude-flow__workflow_execute workflowId="deployment-pipeline" params={"bra - Progress tracking - Result validation - Rollback capability - -## Workflow Example -```bash -# 1. Initialize workflow swarm -mcp__claude-flow__swarm_init topology="hierarchical" maxAgents=8 - -# 2. Design automation workflow -mcp__claude-flow__sparc_mode mode="workflow-manager" options={"automation": true} task_description="create CI/CD pipeline" - -# 3. Setup automation -mcp__claude-flow__automation_setup rules=[{"trigger": "commit", "action": "test"}, {"trigger": "merge", "action": "deploy"}] - -# 4. Create pipeline -mcp__claude-flow__pipeline_create config={"stages": ["lint", "test", "build", "deploy"]} -``` diff --git a/src/cli/simple-commands/init/claude-commands/sparc-commands.js b/src/cli/simple-commands/init/claude-commands/sparc-commands.js index 10aaa65670..1806c42038 100644 --- a/src/cli/simple-commands/init/claude-commands/sparc-commands.js +++ b/src/cli/simple-commands/init/claude-commands/sparc-commands.js @@ -39,34 +39,66 @@ ${ ## Usage -To use this SPARC mode, you can: - -1. **Run directly**: \`./claude-flow sparc run ${mode.slug} "your task"\` -2. **TDD shorthand** (if applicable): \`./claude-flow sparc ${mode.slug} "your task"\` -3. **Use in workflow**: Include \`${mode.slug}\` in your SPARC workflow -4. **Delegate tasks**: Use \`new_task\` to assign work to this mode - -## Example Commands +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__sparc_mode { + mode: "${mode.slug}", + task_description: "${getExampleTask(mode.slug)}", + options: { + namespace: "${mode.slug}", + non_interactive: false + } +} +\`\`\` +### Option 2: Using NPX CLI (Fallback when MCP not available) \`\`\`bash -# Run this specific mode +# Use when running from terminal or MCP tools unavailable +npx claude-flow sparc run ${mode.slug} "${getExampleTask(mode.slug)}" + +# For alpha features +npx claude-flow@alpha sparc run ${mode.slug} "${getExampleTask(mode.slug)}" + +# With namespace +npx claude-flow sparc run ${mode.slug} "your task" --namespace ${mode.slug} + +# Non-interactive mode +npx claude-flow sparc run ${mode.slug} "your task" --non-interactive +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally ./claude-flow sparc run ${mode.slug} "${getExampleTask(mode.slug)}" - -# Use with memory namespace -./claude-flow sparc run ${mode.slug} "your task" --namespace ${mode.slug} - -# Non-interactive mode for automation -./claude-flow sparc run ${mode.slug} "your task" --non-interactive \`\`\` ## Memory Integration +### Using MCP Tools (Preferred) +\`\`\`javascript +// Store mode-specific context +mcp__claude-flow__memory_usage { + action: "store", + key: "${mode.slug}_context", + value: "important decisions", + namespace: "${mode.slug}" +} + +// Query previous work +mcp__claude-flow__memory_search { + pattern: "${mode.slug}", + namespace: "${mode.slug}", + limit: 5 +} +\`\`\` + +### Using NPX CLI (Fallback) \`\`\`bash # Store mode-specific context -./claude-flow memory store "${mode.slug}_context" "important decisions" --namespace ${mode.slug} +npx claude-flow memory store "${mode.slug}_context" "important decisions" --namespace ${mode.slug} # Query previous work -./claude-flow memory query "${mode.slug}" --limit 5 +npx claude-flow memory query "${mode.slug}" --limit 5 \`\`\` `; } @@ -137,26 +169,52 @@ ${modeList} ## Quick Start -### Run SPARC orchestrator (default): +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +// Run SPARC orchestrator (default) +mcp__claude-flow__sparc_mode { + mode: "sparc", + task_description: "build complete authentication system" +} + +// Run a specific mode +mcp__claude-flow__sparc_mode { + mode: "architect", + task_description: "design API structure" +} + +// TDD workflow +mcp__claude-flow__sparc_mode { + mode: "tdd", + task_description: "implement user authentication", + options: {workflow: "full"} +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) \`\`\`bash +# Run SPARC orchestrator (default) +npx claude-flow sparc "build complete authentication system" + +# Run a specific mode +npx claude-flow sparc run architect "design API structure" +npx claude-flow sparc run tdd "implement user service" + +# Execute full TDD workflow +npx claude-flow sparc tdd "implement user authentication" + +# List all modes with details +npx claude-flow sparc modes --verbose + +# For alpha features +npx claude-flow@alpha sparc run "your task" +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally ./claude-flow sparc "build complete authentication system" -\`\`\` - -### Run a specific mode: -\`\`\`bash -./claude-flow sparc run "your task" ./claude-flow sparc run architect "design API structure" -./claude-flow sparc run tdd "implement user service" -\`\`\` - -### Execute full TDD workflow: -\`\`\`bash -./claude-flow sparc tdd "implement user authentication" -\`\`\` - -### List all modes with details: -\`\`\`bash -./claude-flow sparc modes --verbose \`\`\` ## SPARC Methodology Phases @@ -169,10 +227,29 @@ ${modeList} ## Memory Integration -Use memory commands to persist context across SPARC sessions: +### Using MCP Tools (Preferred) +\`\`\`javascript +// Store specifications +mcp__claude-flow__memory_usage { + action: "store", + key: "spec_auth", + value: "OAuth2 + JWT requirements", + namespace: "spec" +} + +// Store architectural decisions +mcp__claude-flow__memory_usage { + action: "store", + key: "arch_decisions", + value: "Microservices with API Gateway", + namespace: "architecture" +} +\`\`\` + +### Using NPX CLI (Fallback) \`\`\`bash # Store specifications -./claude-flow memory store "spec_auth" "OAuth2 + JWT requirements" --namespace spec +npx claude-flow memory store "spec_auth" "OAuth2 + JWT requirements" --namespace spec # Store architectural decisions ./claude-flow memory store "arch_api" "RESTful microservices design" --namespace arch diff --git a/src/cli/simple-commands/init/templates/sparc-modes.js b/src/cli/simple-commands/init/templates/sparc-modes.js index afd1bc50d8..72357a1800 100644 --- a/src/cli/simple-commands/init/templates/sparc-modes.js +++ b/src/cli/simple-commands/init/templates/sparc-modes.js @@ -65,7 +65,35 @@ function createAnalysisStrategy() { Comprehensive analysis through distributed agent coordination. ## Activation -\`./claude-flow swarm "analyze system performance" --strategy analysis\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__swarm_init { + topology: "mesh", + strategy: "analysis", + maxAgents: 6 +} + +mcp__claude-flow__task_orchestrate { + task: "analyze system performance", + strategy: "distributed" +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow swarm "analyze system performance" --strategy analysis + +# For alpha features +npx claude-flow@alpha swarm "analyze system performance" --strategy analysis +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow swarm "analyze system performance" --strategy analysis +\`\`\` ## Agent Roles - Data Collector: Gathers metrics and logs @@ -87,7 +115,35 @@ function createDevelopmentStrategy() { Coordinated development through specialized agent teams. ## Activation -\`./claude-flow swarm "build feature X" --strategy development\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__swarm_init { + topology: "hierarchical", + strategy: "development", + maxAgents: 8 +} + +mcp__claude-flow__task_orchestrate { + task: "build feature X", + strategy: "parallel" +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow swarm "build feature X" --strategy development + +# For alpha features +npx claude-flow@alpha swarm "build feature X" --strategy development +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow swarm "build feature X" --strategy development +\`\`\` ## Agent Roles - Architect: Designs system structure @@ -144,7 +200,36 @@ function createMaintenanceStrategy() { System maintenance and updates through coordinated agents. ## Activation -\`./claude-flow swarm "update dependencies" --strategy maintenance\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__swarm_init { + topology: "hierarchical", + strategy: "maintenance", + maxAgents: 5 +} + +mcp__claude-flow__task_orchestrate { + task: "update dependencies", + strategy: "sequential", + priority: "high" +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow swarm "update dependencies" --strategy maintenance + +# For alpha features +npx claude-flow@alpha swarm "update dependencies" --strategy maintenance +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow swarm "update dependencies" --strategy maintenance +\`\`\` ## Agent Roles - Dependency Analyzer: Checks for updates @@ -166,7 +251,35 @@ function createOptimizationStrategy() { Performance optimization through specialized analysis. ## Activation -\`./claude-flow swarm "optimize performance" --strategy optimization\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__swarm_init { + topology: "mesh", + strategy: "optimization", + maxAgents: 6 +} + +mcp__claude-flow__task_orchestrate { + task: "optimize performance", + strategy: "parallel" +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow swarm "optimize performance" --strategy optimization + +# For alpha features +npx claude-flow@alpha swarm "optimize performance" --strategy optimization +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow swarm "optimize performance" --strategy optimization +\`\`\` ## Agent Roles - Performance Profiler: Identifies bottlenecks @@ -189,7 +302,35 @@ function createResearchStrategy() { Deep research through parallel information gathering. ## Activation -\`./claude-flow swarm "research topic X" --strategy research\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__swarm_init { + topology: "distributed", + strategy: "research", + maxAgents: 6 +} + +mcp__claude-flow__task_orchestrate { + task: "research topic X", + strategy: "parallel" +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow swarm "research topic X" --strategy research + +# For alpha features +npx claude-flow@alpha swarm "research topic X" --strategy research +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow swarm "research topic X" --strategy research +\`\`\` ## Agent Roles - Web Researcher: Searches online sources @@ -211,7 +352,35 @@ function createTestingStrategy() { Comprehensive testing through distributed execution. ## Activation -\`./claude-flow swarm "test application" --strategy testing\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__swarm_init { + topology: "distributed", + strategy: "testing", + maxAgents: 5 +} + +mcp__claude-flow__task_orchestrate { + task: "test application", + strategy: "parallel" +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow swarm "test application" --strategy testing + +# For alpha features +npx claude-flow@alpha swarm "test application" --strategy testing +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow swarm "test application" --strategy testing +\`\`\` ## Agent Roles - Unit Tester: Tests individual components @@ -256,7 +425,33 @@ function createAnalyzerMode() { Deep code and data analysis with batch processing capabilities. ## Activation -\`./claude-flow sparc run analyzer "analyze codebase performance"\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__sparc_mode { + mode: "analyzer", + task_description: "analyze codebase performance", + options: { + parallel: true, + detailed: true + } +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow sparc run analyzer "analyze codebase performance" + +# For alpha features +npx claude-flow@alpha sparc run analyzer "analyze codebase performance" +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow sparc run analyzer "analyze codebase performance" +\`\`\` ## Core Capabilities - Code analysis with parallel file processing @@ -286,7 +481,33 @@ function createArchitectMode() { System design with Memory-based coordination for scalable architectures. ## Activation -\`./claude-flow sparc run architect "design microservices architecture"\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__sparc_mode { + mode: "architect", + task_description: "design microservices architecture", + options: { + detailed: true, + memory_enabled: true + } +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow sparc run architect "design microservices architecture" + +# For alpha features +npx claude-flow@alpha sparc run architect "design microservices architecture" +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow sparc run architect "design microservices architecture" +\`\`\` ## Core Capabilities - System architecture design @@ -317,7 +538,33 @@ function createBatchExecutorMode() { Parallel task execution specialist using batch operations. ## Activation -\`./claude-flow sparc run batch-executor "process multiple files"\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__sparc_mode { + mode: "batch-executor", + task_description: "process multiple files", + options: { + parallel: true, + batch_size: 10 + } +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow sparc run batch-executor "process multiple files" + +# For alpha features +npx claude-flow@alpha sparc run batch-executor "process multiple files" +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow sparc run batch-executor "process multiple files" +\`\`\` ## Core Capabilities - Parallel file operations @@ -349,7 +596,33 @@ function createCoderMode() { Autonomous code generation with batch file operations. ## Activation -\`./claude-flow sparc run coder "implement user authentication"\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__sparc_mode { + mode: "coder", + task_description: "implement user authentication", + options: { + test_driven: true, + parallel_edits: true + } +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow sparc run coder "implement user authentication" + +# For alpha features +npx claude-flow@alpha sparc run coder "implement user authentication" +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow sparc run coder "implement user authentication" +\`\`\` ## Core Capabilities - Feature implementation @@ -381,7 +654,33 @@ function createDebuggerMode() { Systematic debugging with TodoWrite and Memory integration. ## Activation -\`./claude-flow sparc run debugger "fix authentication issues"\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__sparc_mode { + mode: "debugger", + task_description: "fix authentication issues", + options: { + verbose: true, + trace: true + } +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow sparc run debugger "fix authentication issues" + +# For alpha features +npx claude-flow@alpha sparc run debugger "fix authentication issues" +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow sparc run debugger "fix authentication issues" +\`\`\` ## Core Capabilities - Issue reproduction @@ -413,7 +712,33 @@ function createDesignerMode() { UI/UX design with Memory coordination for consistent experiences. ## Activation -\`./claude-flow sparc run designer "create dashboard UI"\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__sparc_mode { + mode: "designer", + task_description: "create dashboard UI", + options: { + design_system: true, + responsive: true + } +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow sparc run designer "create dashboard UI" + +# For alpha features +npx claude-flow@alpha sparc run designer "create dashboard UI" +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow sparc run designer "create dashboard UI" +\`\`\` ## Core Capabilities - Interface design @@ -444,7 +769,33 @@ function createDocumenterMode() { Documentation with batch file operations for comprehensive docs. ## Activation -\`./claude-flow sparc run documenter "create API documentation"\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__sparc_mode { + mode: "documenter", + task_description: "create API documentation", + options: { + format: "markdown", + include_examples: true + } +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow sparc run documenter "create API documentation" + +# For alpha features +npx claude-flow@alpha sparc run documenter "create API documentation" +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow sparc run documenter "create API documentation" +\`\`\` ## Core Capabilities - API documentation @@ -476,7 +827,33 @@ function createInnovatorMode() { Creative problem solving with WebSearch and Memory integration. ## Activation -\`./claude-flow sparc run innovator "innovative solutions for scaling"\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__sparc_mode { + mode: "innovator", + task_description: "innovative solutions for scaling", + options: { + research_depth: "comprehensive", + creativity_level: "high" + } +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow sparc run innovator "innovative solutions for scaling" + +# For alpha features +npx claude-flow@alpha sparc run innovator "innovative solutions for scaling" +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow sparc run innovator "innovative solutions for scaling" +\`\`\` ## Core Capabilities - Creative ideation @@ -508,7 +885,33 @@ function createMemoryManagerMode() { Knowledge management with Memory tools for persistent insights. ## Activation -\`./claude-flow sparc run memory-manager "organize project knowledge"\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__sparc_mode { + mode: "memory-manager", + task_description: "organize project knowledge", + options: { + namespace: "project", + auto_organize: true + } +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow sparc run memory-manager "organize project knowledge" + +# For alpha features +npx claude-flow@alpha sparc run memory-manager "organize project knowledge" +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow sparc run memory-manager "organize project knowledge" +\`\`\` ## Core Capabilities - Knowledge organization @@ -540,7 +943,33 @@ function createOptimizerMode() { Performance optimization with systematic analysis and improvements. ## Activation -\`./claude-flow sparc run optimizer "optimize application performance"\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__sparc_mode { + mode: "optimizer", + task_description: "optimize application performance", + options: { + profile: true, + benchmark: true + } +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow sparc run optimizer "optimize application performance" + +# For alpha features +npx claude-flow@alpha sparc run optimizer "optimize application performance" +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow sparc run optimizer "optimize application performance" +\`\`\` ## Core Capabilities - Performance profiling @@ -572,7 +1001,33 @@ function createOrchestratorMode() { Multi-agent task orchestration with TodoWrite/TodoRead/Task/Memory. ## Activation -\`./claude-flow sparc run orchestrator "coordinate feature development"\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__sparc_mode { + mode: "orchestrator", + task_description: "coordinate feature development", + options: { + parallel: true, + monitor: true + } +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow sparc run orchestrator "coordinate feature development" + +# For alpha features +npx claude-flow@alpha sparc run orchestrator "coordinate feature development" +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow sparc run orchestrator "coordinate feature development" +\`\`\` ## Core Capabilities - Task decomposition @@ -604,7 +1059,33 @@ function createResearcherMode() { Deep research with parallel WebSearch/WebFetch and Memory coordination. ## Activation -\`./claude-flow sparc run researcher "research AI trends 2024"\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__sparc_mode { + mode: "researcher", + task_description: "research AI trends 2024", + options: { + depth: "comprehensive", + sources: ["academic", "industry", "news"] + } +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow sparc run researcher "research AI trends 2024" + +# For alpha features +npx claude-flow@alpha sparc run researcher "research AI trends 2024" +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow sparc run researcher "research AI trends 2024" +\`\`\` ## Core Capabilities - Information gathering @@ -636,7 +1117,33 @@ function createReviewerMode() { Code review using batch file analysis for comprehensive reviews. ## Activation -\`./claude-flow sparc run reviewer "review pull request #123"\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__sparc_mode { + mode: "reviewer", + task_description: "review pull request #123", + options: { + security_check: true, + performance_check: true + } +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow sparc run reviewer "review pull request #123" + +# For alpha features +npx claude-flow@alpha sparc run reviewer "review pull request #123" +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow sparc run reviewer "review pull request #123" +\`\`\` ## Core Capabilities - Code quality assessment @@ -668,7 +1175,33 @@ function createSwarmCoordinatorMode() { Specialized swarm management with batch coordination capabilities. ## Activation -\`./claude-flow sparc run swarm-coordinator "manage development swarm"\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__sparc_mode { + mode: "swarm-coordinator", + task_description: "manage development swarm", + options: { + topology: "hierarchical", + max_agents: 10 + } +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow sparc run swarm-coordinator "manage development swarm" + +# For alpha features +npx claude-flow@alpha sparc run swarm-coordinator "manage development swarm" +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow sparc run swarm-coordinator "manage development swarm" +\`\`\` ## Core Capabilities - Swarm initialization @@ -700,7 +1233,33 @@ function createTddMode() { Test-driven development with TodoWrite planning and comprehensive testing. ## Activation -\`./claude-flow sparc run tdd "shopping cart feature"\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__sparc_mode { + mode: "tdd", + task_description: "shopping cart feature", + options: { + coverage_target: 90, + test_framework: "jest" + } +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow sparc run tdd "shopping cart feature" + +# For alpha features +npx claude-flow@alpha sparc run tdd "shopping cart feature" +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow sparc run tdd "shopping cart feature" +\`\`\` ## Core Capabilities - Test-first development @@ -732,7 +1291,33 @@ function createTesterMode() { Comprehensive testing with parallel execution capabilities. ## Activation -\`./claude-flow sparc run tester "full regression suite"\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__sparc_mode { + mode: "tester", + task_description: "full regression suite", + options: { + parallel: true, + coverage: true + } +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow sparc run tester "full regression suite" + +# For alpha features +npx claude-flow@alpha sparc run tester "full regression suite" +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow sparc run tester "full regression suite" +\`\`\` ## Core Capabilities - Test planning @@ -764,7 +1349,33 @@ function createWorkflowManagerMode() { Process automation with TodoWrite planning and Task execution. ## Activation -\`./claude-flow sparc run workflow-manager "automate deployment"\` + +### Option 1: Using MCP Tools (Preferred in Claude Code) +\`\`\`javascript +mcp__claude-flow__sparc_mode { + mode: "workflow-manager", + task_description: "automate deployment", + options: { + pipeline: "ci-cd", + rollback_enabled: true + } +} +\`\`\` + +### Option 2: Using NPX CLI (Fallback when MCP not available) +\`\`\`bash +# Use when running from terminal or MCP tools unavailable +npx claude-flow sparc run workflow-manager "automate deployment" + +# For alpha features +npx claude-flow@alpha sparc run workflow-manager "automate deployment" +\`\`\` + +### Option 3: Local Installation +\`\`\`bash +# If claude-flow is installed locally +./claude-flow sparc run workflow-manager "automate deployment" +\`\`\` ## Core Capabilities - Workflow design