Added in git-flow
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
# Analysis Swarm Strategy
|
||||
|
||||
## Purpose
|
||||
Comprehensive analysis through distributed agent coordination.
|
||||
|
||||
## Activation
|
||||
|
||||
### Using MCP Tools
|
||||
```javascript
|
||||
// Initialize analysis swarm
|
||||
mcp__claude-flow__swarm_init({
|
||||
"topology": "mesh",
|
||||
"maxAgents": 6,
|
||||
"strategy": "adaptive"
|
||||
})
|
||||
|
||||
// Orchestrate analysis task
|
||||
mcp__claude-flow__task_orchestrate({
|
||||
"task": "analyze system performance",
|
||||
"strategy": "parallel",
|
||||
"priority": "medium"
|
||||
})
|
||||
```
|
||||
|
||||
### Using CLI (Fallback)
|
||||
`npx claude-flow swarm "analyze system performance" --strategy analysis`
|
||||
|
||||
## Agent Roles
|
||||
|
||||
### Agent Spawning with MCP
|
||||
```javascript
|
||||
// Spawn analysis agents
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "analyst",
|
||||
"name": "Data Collector",
|
||||
"capabilities": ["metrics", "logging", "monitoring"]
|
||||
})
|
||||
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "analyst",
|
||||
"name": "Pattern Analyzer",
|
||||
"capabilities": ["pattern-recognition", "anomaly-detection"]
|
||||
})
|
||||
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "documenter",
|
||||
"name": "Report Generator",
|
||||
"capabilities": ["reporting", "visualization"]
|
||||
})
|
||||
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "coordinator",
|
||||
"name": "Insight Synthesizer",
|
||||
"capabilities": ["synthesis", "correlation"]
|
||||
})
|
||||
```
|
||||
|
||||
## Coordination Modes
|
||||
- Mesh: For exploratory analysis
|
||||
- Pipeline: For sequential processing
|
||||
- Hierarchical: For complex systems
|
||||
|
||||
## Analysis Operations
|
||||
```javascript
|
||||
// Run performance analysis
|
||||
mcp__claude-flow__performance_report({
|
||||
"format": "detailed",
|
||||
"timeframe": "24h"
|
||||
})
|
||||
|
||||
// Identify bottlenecks
|
||||
mcp__claude-flow__bottleneck_analyze({
|
||||
"component": "api",
|
||||
"metrics": ["response-time", "throughput"]
|
||||
})
|
||||
|
||||
// Pattern recognition
|
||||
mcp__claude-flow__pattern_recognize({
|
||||
"data": performanceData,
|
||||
"patterns": ["anomaly", "trend", "cycle"]
|
||||
})
|
||||
```
|
||||
|
||||
## Status Monitoring
|
||||
```javascript
|
||||
// Monitor analysis progress
|
||||
mcp__claude-flow__task_status({
|
||||
"taskId": "analysis-task-001"
|
||||
})
|
||||
|
||||
// Get analysis results
|
||||
mcp__claude-flow__task_results({
|
||||
"taskId": "analysis-task-001"
|
||||
})
|
||||
```
|
||||
@@ -0,0 +1,96 @@
|
||||
# Development Swarm Strategy
|
||||
|
||||
## Purpose
|
||||
Coordinated development through specialized agent teams.
|
||||
|
||||
## Activation
|
||||
|
||||
### Using MCP Tools
|
||||
```javascript
|
||||
// Initialize development swarm
|
||||
mcp__claude-flow__swarm_init({
|
||||
"topology": "hierarchical",
|
||||
"maxAgents": 8,
|
||||
"strategy": "balanced"
|
||||
})
|
||||
|
||||
// Orchestrate development task
|
||||
mcp__claude-flow__task_orchestrate({
|
||||
"task": "build feature X",
|
||||
"strategy": "parallel",
|
||||
"priority": "high"
|
||||
})
|
||||
```
|
||||
|
||||
### Using CLI (Fallback)
|
||||
`npx claude-flow swarm "build feature X" --strategy development`
|
||||
|
||||
## Agent Roles
|
||||
|
||||
### Agent Spawning with MCP
|
||||
```javascript
|
||||
// Spawn development agents
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "architect",
|
||||
"name": "System Designer",
|
||||
"capabilities": ["system-design", "api-design"]
|
||||
})
|
||||
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "coder",
|
||||
"name": "Frontend Developer",
|
||||
"capabilities": ["react", "typescript", "ui"]
|
||||
})
|
||||
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "coder",
|
||||
"name": "Backend Developer",
|
||||
"capabilities": ["nodejs", "api", "database"]
|
||||
})
|
||||
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "specialist",
|
||||
"name": "Database Expert",
|
||||
"capabilities": ["sql", "nosql", "optimization"]
|
||||
})
|
||||
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "tester",
|
||||
"name": "Integration Tester",
|
||||
"capabilities": ["integration", "e2e", "api-testing"]
|
||||
})
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
- Use hierarchical mode for large projects
|
||||
- Enable parallel execution
|
||||
- Implement continuous testing
|
||||
- Monitor swarm health regularly
|
||||
|
||||
## Status Monitoring
|
||||
```javascript
|
||||
// Check swarm status
|
||||
mcp__claude-flow__swarm_status({
|
||||
"swarmId": "development-swarm"
|
||||
})
|
||||
|
||||
// Monitor agent performance
|
||||
mcp__claude-flow__agent_metrics({
|
||||
"agentId": "architect-001"
|
||||
})
|
||||
|
||||
// Real-time monitoring
|
||||
mcp__claude-flow__swarm_monitor({
|
||||
"swarmId": "development-swarm",
|
||||
"interval": 5000
|
||||
})
|
||||
```
|
||||
|
||||
## Error Handling
|
||||
```javascript
|
||||
// Enable fault tolerance
|
||||
mcp__claude-flow__daa_fault_tolerance({
|
||||
"agentId": "all",
|
||||
"strategy": "auto-recovery"
|
||||
})
|
||||
```
|
||||
@@ -0,0 +1,168 @@
|
||||
# Examples Swarm Strategy
|
||||
|
||||
## Common Swarm Patterns
|
||||
|
||||
### Research Swarm
|
||||
|
||||
#### Using MCP Tools
|
||||
```javascript
|
||||
// Initialize research swarm
|
||||
mcp__claude-flow__swarm_init({
|
||||
"topology": "mesh",
|
||||
"maxAgents": 6,
|
||||
"strategy": "adaptive"
|
||||
})
|
||||
|
||||
// Spawn research agents
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "researcher",
|
||||
"name": "AI Trends Researcher",
|
||||
"capabilities": ["web-search", "analysis", "synthesis"]
|
||||
})
|
||||
|
||||
// Orchestrate research
|
||||
mcp__claude-flow__task_orchestrate({
|
||||
"task": "research AI trends",
|
||||
"strategy": "parallel",
|
||||
"priority": "medium"
|
||||
})
|
||||
|
||||
// Monitor progress
|
||||
mcp__claude-flow__swarm_status({
|
||||
"swarmId": "research-swarm"
|
||||
})
|
||||
```
|
||||
|
||||
#### Using CLI (Fallback)
|
||||
```bash
|
||||
npx claude-flow swarm "research AI trends" \
|
||||
--strategy research \
|
||||
--mode distributed \
|
||||
--max-agents 6 \
|
||||
--parallel
|
||||
```
|
||||
|
||||
### Development Swarm
|
||||
|
||||
#### Using MCP Tools
|
||||
```javascript
|
||||
// Initialize development swarm
|
||||
mcp__claude-flow__swarm_init({
|
||||
"topology": "hierarchical",
|
||||
"maxAgents": 8,
|
||||
"strategy": "balanced"
|
||||
})
|
||||
|
||||
// Spawn development team
|
||||
const devAgents = [
|
||||
{ type: "architect", name: "API Designer" },
|
||||
{ type: "coder", name: "Backend Developer" },
|
||||
{ type: "tester", name: "API Tester" },
|
||||
{ type: "documenter", name: "API Documenter" }
|
||||
]
|
||||
|
||||
devAgents.forEach(agent => {
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": agent.type,
|
||||
"name": agent.name,
|
||||
"swarmId": "dev-swarm"
|
||||
})
|
||||
})
|
||||
|
||||
// Orchestrate development
|
||||
mcp__claude-flow__task_orchestrate({
|
||||
"task": "build REST API",
|
||||
"strategy": "sequential",
|
||||
"dependencies": ["design", "implement", "test", "document"]
|
||||
})
|
||||
|
||||
// Enable monitoring
|
||||
mcp__claude-flow__swarm_monitor({
|
||||
"swarmId": "dev-swarm",
|
||||
"interval": 5000
|
||||
})
|
||||
```
|
||||
|
||||
#### Using CLI (Fallback)
|
||||
```bash
|
||||
npx claude-flow swarm "build REST API" \
|
||||
--strategy development \
|
||||
--mode hierarchical \
|
||||
--monitor \
|
||||
--output sqlite
|
||||
```
|
||||
|
||||
### Analysis Swarm
|
||||
|
||||
#### Using MCP Tools
|
||||
```javascript
|
||||
// Initialize analysis swarm
|
||||
mcp__claude-flow__swarm_init({
|
||||
"topology": "mesh",
|
||||
"maxAgents": 5,
|
||||
"strategy": "adaptive"
|
||||
})
|
||||
|
||||
// Spawn analysis agents
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "analyst",
|
||||
"name": "Code Analyzer",
|
||||
"capabilities": ["static-analysis", "complexity-analysis"]
|
||||
})
|
||||
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "analyst",
|
||||
"name": "Security Analyzer",
|
||||
"capabilities": ["security-scan", "vulnerability-detection"]
|
||||
})
|
||||
|
||||
// Parallel analysis execution
|
||||
mcp__claude-flow__parallel_execute({
|
||||
"tasks": [
|
||||
{ "id": "analyze-code", "command": "analyze codebase structure" },
|
||||
{ "id": "analyze-security", "command": "scan for vulnerabilities" },
|
||||
{ "id": "analyze-performance", "command": "identify bottlenecks" }
|
||||
]
|
||||
})
|
||||
|
||||
// Generate comprehensive report
|
||||
mcp__claude-flow__performance_report({
|
||||
"format": "detailed",
|
||||
"timeframe": "current"
|
||||
})
|
||||
```
|
||||
|
||||
#### Using CLI (Fallback)
|
||||
```bash
|
||||
npx claude-flow swarm "analyze codebase" \
|
||||
--strategy analysis \
|
||||
--mode mesh \
|
||||
--parallel \
|
||||
--timeout 300
|
||||
```
|
||||
|
||||
## Error Handling Examples
|
||||
|
||||
```javascript
|
||||
// Setup fault tolerance
|
||||
mcp__claude-flow__daa_fault_tolerance({
|
||||
"agentId": "all",
|
||||
"strategy": "auto-recovery"
|
||||
})
|
||||
|
||||
// Handle errors gracefully
|
||||
try {
|
||||
await mcp__claude-flow__task_orchestrate({
|
||||
"task": "complex operation",
|
||||
"strategy": "parallel"
|
||||
})
|
||||
} catch (error) {
|
||||
// Check swarm health
|
||||
const status = await mcp__claude-flow__swarm_status({})
|
||||
|
||||
// Log error patterns
|
||||
await mcp__claude-flow__error_analysis({
|
||||
"logs": [error.message]
|
||||
})
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,102 @@
|
||||
# Maintenance Swarm Strategy
|
||||
|
||||
## Purpose
|
||||
System maintenance and updates through coordinated agents.
|
||||
|
||||
## Activation
|
||||
|
||||
### Using MCP Tools
|
||||
```javascript
|
||||
// Initialize maintenance swarm
|
||||
mcp__claude-flow__swarm_init({
|
||||
"topology": "star",
|
||||
"maxAgents": 5,
|
||||
"strategy": "sequential"
|
||||
})
|
||||
|
||||
// Orchestrate maintenance task
|
||||
mcp__claude-flow__task_orchestrate({
|
||||
"task": "update dependencies",
|
||||
"strategy": "sequential",
|
||||
"priority": "medium",
|
||||
"dependencies": ["backup", "test", "update", "verify"]
|
||||
})
|
||||
```
|
||||
|
||||
### Using CLI (Fallback)
|
||||
`npx claude-flow swarm "update dependencies" --strategy maintenance`
|
||||
|
||||
## Agent Roles
|
||||
|
||||
### Agent Spawning with MCP
|
||||
```javascript
|
||||
// Spawn maintenance agents
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "analyst",
|
||||
"name": "Dependency Analyzer",
|
||||
"capabilities": ["dependency-analysis", "version-management"]
|
||||
})
|
||||
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "monitor",
|
||||
"name": "Security Scanner",
|
||||
"capabilities": ["security", "vulnerability-scan"]
|
||||
})
|
||||
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "tester",
|
||||
"name": "Test Runner",
|
||||
"capabilities": ["testing", "validation"]
|
||||
})
|
||||
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "documenter",
|
||||
"name": "Documentation Updater",
|
||||
"capabilities": ["documentation", "changelog"]
|
||||
})
|
||||
```
|
||||
|
||||
## Safety Features
|
||||
|
||||
### Backup and Recovery
|
||||
```javascript
|
||||
// Create system backup
|
||||
mcp__claude-flow__backup_create({
|
||||
"components": ["code", "config", "dependencies"],
|
||||
"destination": "./backups/maintenance-" + Date.now()
|
||||
})
|
||||
|
||||
// Create state snapshot
|
||||
mcp__claude-flow__state_snapshot({
|
||||
"name": "pre-maintenance-" + Date.now()
|
||||
})
|
||||
|
||||
// Enable fault tolerance
|
||||
mcp__claude-flow__daa_fault_tolerance({
|
||||
"agentId": "all",
|
||||
"strategy": "checkpoint-recovery"
|
||||
})
|
||||
```
|
||||
|
||||
### Security Scanning
|
||||
```javascript
|
||||
// Run security scan
|
||||
mcp__claude-flow__security_scan({
|
||||
"target": "./",
|
||||
"depth": "comprehensive"
|
||||
})
|
||||
```
|
||||
|
||||
### Monitoring
|
||||
```javascript
|
||||
// Health check before/after
|
||||
mcp__claude-flow__health_check({
|
||||
"components": ["dependencies", "tests", "build"]
|
||||
})
|
||||
|
||||
// Monitor maintenance progress
|
||||
mcp__claude-flow__swarm_monitor({
|
||||
"swarmId": "maintenance-swarm",
|
||||
"interval": 3000
|
||||
})
|
||||
```
|
||||
@@ -0,0 +1,117 @@
|
||||
# Optimization Swarm Strategy
|
||||
|
||||
## Purpose
|
||||
Performance optimization through specialized analysis.
|
||||
|
||||
## Activation
|
||||
|
||||
### Using MCP Tools
|
||||
```javascript
|
||||
// Initialize optimization swarm
|
||||
mcp__claude-flow__swarm_init({
|
||||
"topology": "mesh",
|
||||
"maxAgents": 6,
|
||||
"strategy": "adaptive"
|
||||
})
|
||||
|
||||
// Orchestrate optimization task
|
||||
mcp__claude-flow__task_orchestrate({
|
||||
"task": "optimize performance",
|
||||
"strategy": "parallel",
|
||||
"priority": "high"
|
||||
})
|
||||
```
|
||||
|
||||
### Using CLI (Fallback)
|
||||
`npx claude-flow swarm "optimize performance" --strategy optimization`
|
||||
|
||||
## Agent Roles
|
||||
|
||||
### Agent Spawning with MCP
|
||||
```javascript
|
||||
// Spawn optimization agents
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "optimizer",
|
||||
"name": "Performance Profiler",
|
||||
"capabilities": ["profiling", "bottleneck-detection"]
|
||||
})
|
||||
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "analyst",
|
||||
"name": "Memory Analyzer",
|
||||
"capabilities": ["memory-analysis", "leak-detection"]
|
||||
})
|
||||
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "optimizer",
|
||||
"name": "Code Optimizer",
|
||||
"capabilities": ["code-optimization", "refactoring"]
|
||||
})
|
||||
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "tester",
|
||||
"name": "Benchmark Runner",
|
||||
"capabilities": ["benchmarking", "performance-testing"]
|
||||
})
|
||||
```
|
||||
|
||||
## Optimization Areas
|
||||
|
||||
### Performance Analysis
|
||||
```javascript
|
||||
// Analyze bottlenecks
|
||||
mcp__claude-flow__bottleneck_analyze({
|
||||
"component": "all",
|
||||
"metrics": ["cpu", "memory", "io", "network"]
|
||||
})
|
||||
|
||||
// Run benchmarks
|
||||
mcp__claude-flow__benchmark_run({
|
||||
"suite": "performance"
|
||||
})
|
||||
|
||||
// WASM optimization
|
||||
mcp__claude-flow__wasm_optimize({
|
||||
"operation": "simd-acceleration"
|
||||
})
|
||||
```
|
||||
|
||||
### Optimization Operations
|
||||
```javascript
|
||||
// Optimize topology
|
||||
mcp__claude-flow__topology_optimize({
|
||||
"swarmId": "optimization-swarm"
|
||||
})
|
||||
|
||||
// DAA optimization
|
||||
mcp__claude-flow__daa_optimization({
|
||||
"target": "performance",
|
||||
"metrics": ["speed", "memory", "efficiency"]
|
||||
})
|
||||
|
||||
// Load balancing
|
||||
mcp__claude-flow__load_balance({
|
||||
"swarmId": "optimization-swarm",
|
||||
"tasks": optimizationTasks
|
||||
})
|
||||
```
|
||||
|
||||
### Monitoring and Reporting
|
||||
```javascript
|
||||
// Performance report
|
||||
mcp__claude-flow__performance_report({
|
||||
"format": "detailed",
|
||||
"timeframe": "7d"
|
||||
})
|
||||
|
||||
// Trend analysis
|
||||
mcp__claude-flow__trend_analysis({
|
||||
"metric": "performance",
|
||||
"period": "30d"
|
||||
})
|
||||
|
||||
// Cost analysis
|
||||
mcp__claude-flow__cost_analysis({
|
||||
"timeframe": "30d"
|
||||
})
|
||||
```
|
||||
@@ -0,0 +1,136 @@
|
||||
# Research Swarm Strategy
|
||||
|
||||
## Purpose
|
||||
Deep research through parallel information gathering.
|
||||
|
||||
## Activation
|
||||
|
||||
### Using MCP Tools
|
||||
```javascript
|
||||
// Initialize research swarm
|
||||
mcp__claude-flow__swarm_init({
|
||||
"topology": "mesh",
|
||||
"maxAgents": 6,
|
||||
"strategy": "adaptive"
|
||||
})
|
||||
|
||||
// Orchestrate research task
|
||||
mcp__claude-flow__task_orchestrate({
|
||||
"task": "research topic X",
|
||||
"strategy": "parallel",
|
||||
"priority": "medium"
|
||||
})
|
||||
```
|
||||
|
||||
### Using CLI (Fallback)
|
||||
`npx claude-flow swarm "research topic X" --strategy research`
|
||||
|
||||
## Agent Roles
|
||||
|
||||
### Agent Spawning with MCP
|
||||
```javascript
|
||||
// Spawn research agents
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "researcher",
|
||||
"name": "Web Researcher",
|
||||
"capabilities": ["web-search", "content-extraction", "source-validation"]
|
||||
})
|
||||
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "researcher",
|
||||
"name": "Academic Researcher",
|
||||
"capabilities": ["paper-analysis", "citation-tracking", "literature-review"]
|
||||
})
|
||||
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "analyst",
|
||||
"name": "Data Analyst",
|
||||
"capabilities": ["data-processing", "statistical-analysis", "visualization"]
|
||||
})
|
||||
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "documenter",
|
||||
"name": "Report Writer",
|
||||
"capabilities": ["synthesis", "technical-writing", "formatting"]
|
||||
})
|
||||
```
|
||||
|
||||
## Research Methods
|
||||
|
||||
### Information Gathering
|
||||
```javascript
|
||||
// Parallel information collection
|
||||
mcp__claude-flow__parallel_execute({
|
||||
"tasks": [
|
||||
{ "id": "web-search", "command": "search recent publications" },
|
||||
{ "id": "academic-search", "command": "search academic databases" },
|
||||
{ "id": "data-collection", "command": "gather relevant datasets" }
|
||||
]
|
||||
})
|
||||
|
||||
// Store research findings
|
||||
mcp__claude-flow__memory_usage({
|
||||
"action": "store",
|
||||
"key": "research-findings-" + Date.now(),
|
||||
"value": JSON.stringify(findings),
|
||||
"namespace": "research",
|
||||
"ttl": 604800 // 7 days
|
||||
})
|
||||
```
|
||||
|
||||
### Analysis and Validation
|
||||
```javascript
|
||||
// Pattern recognition in findings
|
||||
mcp__claude-flow__pattern_recognize({
|
||||
"data": researchData,
|
||||
"patterns": ["trend", "correlation", "outlier"]
|
||||
})
|
||||
|
||||
// Cognitive analysis
|
||||
mcp__claude-flow__cognitive_analyze({
|
||||
"behavior": "research-synthesis"
|
||||
})
|
||||
|
||||
// Cross-reference validation
|
||||
mcp__claude-flow__quality_assess({
|
||||
"target": "research-sources",
|
||||
"criteria": ["credibility", "relevance", "recency"]
|
||||
})
|
||||
```
|
||||
|
||||
### Knowledge Management
|
||||
```javascript
|
||||
// Search existing knowledge
|
||||
mcp__claude-flow__memory_search({
|
||||
"pattern": "topic X",
|
||||
"namespace": "research",
|
||||
"limit": 20
|
||||
})
|
||||
|
||||
// Create knowledge connections
|
||||
mcp__claude-flow__neural_patterns({
|
||||
"action": "learn",
|
||||
"operation": "knowledge-graph",
|
||||
"metadata": {
|
||||
"topic": "X",
|
||||
"connections": relatedTopics
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
### Reporting
|
||||
```javascript
|
||||
// Generate research report
|
||||
mcp__claude-flow__workflow_execute({
|
||||
"workflowId": "research-report-generation",
|
||||
"params": {
|
||||
"findings": findings,
|
||||
"format": "comprehensive"
|
||||
}
|
||||
})
|
||||
|
||||
// Monitor progress
|
||||
mcp__claude-flow__swarm_status({
|
||||
"swarmId": "research-swarm"
|
||||
})
|
||||
```
|
||||
@@ -0,0 +1,131 @@
|
||||
# Testing Swarm Strategy
|
||||
|
||||
## Purpose
|
||||
Comprehensive testing through distributed execution.
|
||||
|
||||
## Activation
|
||||
|
||||
### Using MCP Tools
|
||||
```javascript
|
||||
// Initialize testing swarm
|
||||
mcp__claude-flow__swarm_init({
|
||||
"topology": "star",
|
||||
"maxAgents": 7,
|
||||
"strategy": "parallel"
|
||||
})
|
||||
|
||||
// Orchestrate testing task
|
||||
mcp__claude-flow__task_orchestrate({
|
||||
"task": "test application",
|
||||
"strategy": "parallel",
|
||||
"priority": "high"
|
||||
})
|
||||
```
|
||||
|
||||
### Using CLI (Fallback)
|
||||
`npx claude-flow swarm "test application" --strategy testing`
|
||||
|
||||
## Agent Roles
|
||||
|
||||
### Agent Spawning with MCP
|
||||
```javascript
|
||||
// Spawn testing agents
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "tester",
|
||||
"name": "Unit Tester",
|
||||
"capabilities": ["unit-testing", "mocking", "coverage"]
|
||||
})
|
||||
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "tester",
|
||||
"name": "Integration Tester",
|
||||
"capabilities": ["integration", "api-testing", "contract-testing"]
|
||||
})
|
||||
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "tester",
|
||||
"name": "E2E Tester",
|
||||
"capabilities": ["e2e", "ui-testing", "user-flows"]
|
||||
})
|
||||
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "tester",
|
||||
"name": "Performance Tester",
|
||||
"capabilities": ["load-testing", "stress-testing", "benchmarking"]
|
||||
})
|
||||
|
||||
mcp__claude-flow__agent_spawn({
|
||||
"type": "monitor",
|
||||
"name": "Security Tester",
|
||||
"capabilities": ["security-testing", "penetration-testing", "vulnerability-scanning"]
|
||||
})
|
||||
```
|
||||
|
||||
## Test Coverage
|
||||
|
||||
### Coverage Analysis
|
||||
```javascript
|
||||
// Quality assessment
|
||||
mcp__claude-flow__quality_assess({
|
||||
"target": "test-coverage",
|
||||
"criteria": ["line-coverage", "branch-coverage", "function-coverage"]
|
||||
})
|
||||
|
||||
// Edge case detection
|
||||
mcp__claude-flow__pattern_recognize({
|
||||
"data": testScenarios,
|
||||
"patterns": ["edge-case", "boundary-condition", "error-path"]
|
||||
})
|
||||
```
|
||||
|
||||
### Test Execution
|
||||
```javascript
|
||||
// Parallel test execution
|
||||
mcp__claude-flow__parallel_execute({
|
||||
"tasks": [
|
||||
{ "id": "unit-tests", "command": "npm run test:unit" },
|
||||
{ "id": "integration-tests", "command": "npm run test:integration" },
|
||||
{ "id": "e2e-tests", "command": "npm run test:e2e" }
|
||||
]
|
||||
})
|
||||
|
||||
// Batch processing for test suites
|
||||
mcp__claude-flow__batch_process({
|
||||
"items": testSuites,
|
||||
"operation": "execute-test-suite"
|
||||
})
|
||||
```
|
||||
|
||||
### Performance Testing
|
||||
```javascript
|
||||
// Run performance benchmarks
|
||||
mcp__claude-flow__benchmark_run({
|
||||
"suite": "performance-tests"
|
||||
})
|
||||
|
||||
// Security scanning
|
||||
mcp__claude-flow__security_scan({
|
||||
"target": "application",
|
||||
"depth": "comprehensive"
|
||||
})
|
||||
```
|
||||
|
||||
### Monitoring and Reporting
|
||||
```javascript
|
||||
// Monitor test execution
|
||||
mcp__claude-flow__swarm_monitor({
|
||||
"swarmId": "testing-swarm",
|
||||
"interval": 2000
|
||||
})
|
||||
|
||||
// Generate test report
|
||||
mcp__claude-flow__performance_report({
|
||||
"format": "detailed",
|
||||
"timeframe": "current-run"
|
||||
})
|
||||
|
||||
// Get test results
|
||||
mcp__claude-flow__task_results({
|
||||
"taskId": "test-execution-001"
|
||||
})
|
||||
```
|
||||
Reference in New Issue
Block a user