claude-flow-novice 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-flow-novice/preferences/generation.json +147 -0
- package/.claude-flow-novice/preferences/language-configs/javascript.json +51 -0
- package/.claude-flow-novice/preferences/language-configs/python.json +50 -0
- package/.claude-flow-novice/preferences/language-configs/rust.json +237 -0
- package/.claude-flow-novice/preferences/language-configs/typescript.json +54 -0
- package/.claude-flow-novice/preferences/project-local.json +91 -0
- package/.claude-flow-novice/preferences/resource-delegation.json +120 -0
- package/.claude-flow-novice/preferences/team-shared.json +195 -0
- package/.claude-flow-novice/preferences/user-global.json +247 -0
- package/.claude-flow-novice/templates/claude-md-templates/CLAUDE-JAVASCRIPT.md +769 -0
- package/.claude-flow-novice/templates/claude-md-templates/CLAUDE-PYTHON.md +1214 -0
- package/.claude-flow-novice/templates/claude-md-templates/CLAUDE-RUST.md +475 -0
- package/.claude-flow-novice/templates/claude-md-templates/CLAUDE-TYPESCRIPT.md +851 -0
- package/.claude-flow-novice/templates/claude-md-templates/README.md +263 -0
- package/CLAUDE.md +81 -0
- package/README-NPM.md +0 -0
- package/package.json +11 -7
- package/scripts/build/README.md +167 -0
- package/scripts/build/build-config.js +27 -0
- package/scripts/build/build-prompt-copier.sh +30 -0
- package/scripts/build/performance-monitor.js +869 -0
- package/scripts/build/prepare-publish.js +150 -0
- package/scripts/build/typescript-fixer.js +621 -0
- package/scripts/build/unified-builder.sh +428 -0
- package/scripts/build/update-bin-version.js +32 -0
- package/scripts/dev/README.md +264 -0
- package/scripts/dev/claude-flow-wrapper.sh +35 -0
- package/scripts/dev/claude-monitor.py +419 -0
- package/scripts/dev/claude-sparc.sh +562 -0
- package/scripts/dev/claude-wrapper.sh +17 -0
- package/scripts/dev/demo-phase3-compliance.js +172 -0
- package/scripts/dev/demo-task-system.ts +224 -0
- package/scripts/dev/deployment-validator.js +315 -0
- package/scripts/dev/spawn-claude-terminal.sh +32 -0
- package/scripts/dev/start-portal.sh +506 -0
- package/scripts/dev/start-web-ui.js +15 -0
- package/scripts/dev/stop-portal.sh +311 -0
- package/scripts/dev/validate-examples.ts +288 -0
- package/scripts/dev/validate-phase2.cjs +451 -0
- package/scripts/dev/validate-phase2.js +785 -0
- package/scripts/dev/validate-phase3.cjs +208 -0
- package/scripts/dev/validate-security-remediation.js +1 -0
- package/scripts/legacy/README.md +272 -0
- package/scripts/legacy/batch-fix-ts.sh +54 -0
- package/scripts/legacy/build-migration.sh +105 -0
- package/scripts/legacy/build-monitor.js +209 -0
- package/scripts/legacy/build-with-filter.sh +84 -0
- package/scripts/legacy/build-workaround.sh +71 -0
- package/scripts/legacy/fix-ts-advanced.js +358 -0
- package/scripts/legacy/fix-ts-final.sh +50 -0
- package/scripts/legacy/fix-ts-targeted.sh +49 -0
- package/scripts/legacy/fix-typescript-errors.js +305 -0
- package/scripts/legacy/force-build.sh +63 -0
- package/scripts/legacy/optimize-performance.js +400 -0
- package/scripts/legacy/performance-monitor.js +263 -0
- package/scripts/legacy/performance-monitoring.js +532 -0
- package/scripts/legacy/performance-test-runner.js +645 -0
- package/scripts/legacy/quick-fix-ts.js +281 -0
- package/scripts/legacy/safe-build.sh +63 -0
- package/scripts/migration/README.md +434 -0
- package/scripts/migration/install-arm64.js +78 -0
- package/scripts/migration/install.js +83 -0
- package/scripts/migration/migrate-hooks.js +173 -0
- package/scripts/migration/migration-examples.ts +318 -0
- package/scripts/optimization/build-optimizer.js +438 -0
- package/scripts/optimization/config-validator.js +761 -0
- package/scripts/optimization/test-optimization.js +432 -0
- package/scripts/optimization/unified-activation.js +839 -0
- package/scripts/performance/ACTIVATION_COMMANDS.md +292 -0
- package/scripts/performance/sqlite-enhanced-activation.sh +583 -0
- package/scripts/performance/test-enhanced-backend.sh +504 -0
- package/scripts/performance-test-runner.js +698 -0
- package/scripts/security/README.md +339 -0
- package/scripts/security/install-git-hooks.sh +132 -0
- package/scripts/security/ruv-swarm-safe.js +74 -0
- package/scripts/test/README.md +236 -0
- package/scripts/test/check-links.ts +274 -0
- package/scripts/test/check-performance-regression.ts +168 -0
- package/scripts/test/coverage-report.ts +692 -0
- package/scripts/test/generate-swarm-tests.js +633 -0
- package/scripts/test/integration-test-validation.cjs +253 -0
- package/scripts/test/load-test-swarm.js +576 -0
- package/scripts/test/run-phase3-compliance-tests.js +427 -0
- package/scripts/test/test-batch-tasks.ts +29 -0
- package/scripts/test/test-byzantine-resolution.js +246 -0
- package/scripts/test/test-claude-spawn-options.sh +63 -0
- package/scripts/test/test-cli-wizard.js +331 -0
- package/scripts/test/test-comprehensive.js +401 -0
- package/scripts/test/test-coordination-features.ts +238 -0
- package/scripts/test/test-fallback-systems.js +276 -0
- package/scripts/test/test-init-command.ts +302 -0
- package/scripts/test/test-mcp.ts +251 -0
- package/scripts/test/test-runner.ts +568 -0
- package/scripts/test/test-swarm-integration.sh +92 -0
- package/scripts/test/test-swarm.ts +142 -0
- package/scripts/test/validation-summary.ts +408 -0
- package/scripts/utils/README.md +261 -0
- package/scripts/utils/clean-build-artifacts.sh +94 -0
- package/scripts/utils/cleanup-root.sh +69 -0
- package/scripts/utils/fix-cliffy-imports.js +307 -0
- package/scripts/utils/fix-duplicate-imports.js +114 -0
- package/scripts/utils/fix-error-handling.cjs +70 -0
- package/scripts/utils/fix-import-paths.js +104 -0
- package/scripts/utils/fix-imports.js +116 -0
- package/scripts/utils/fix-shebang.js +78 -0
- package/scripts/utils/fix-test-modules.js +27 -0
- package/scripts/utils/fix-timezone-issue-246.js +200 -0
- package/scripts/utils/fix-ts-comprehensive.py +182 -0
- package/scripts/utils/fix-ts-targeted-batch.js +250 -0
- package/scripts/utils/remove-benchmark-conflicts.sh +140 -0
- package/scripts/utils/simple-test-fixer.js +190 -0
- package/scripts/utils/validate-metrics-structure.cjs +144 -0
- package/scripts/verify-mcp-server.js +86 -0
- package/src/cli/simple-commands/__tests__/agent.test.js +291 -0
- package/src/cli/simple-commands/__tests__/memory.test.js +8 -0
- package/src/cli/simple-commands/__tests__/swarm.test.js +371 -0
- package/src/cli/simple-commands/__tests__/task.test.js +8 -0
- package/src/cli/simple-commands/agent.js +216 -0
- package/src/cli/simple-commands/analysis.js +570 -0
- package/src/cli/simple-commands/automation-executor.js +1603 -0
- package/src/cli/simple-commands/automation.js +627 -0
- package/src/cli/simple-commands/batch-manager.js +338 -0
- package/src/cli/simple-commands/claude-telemetry.js +311 -0
- package/src/cli/simple-commands/claude-track.js +102 -0
- package/src/cli/simple-commands/concurrent-display.js +348 -0
- package/src/cli/simple-commands/config.js +319 -0
- package/src/cli/simple-commands/coordination.js +307 -0
- package/src/cli/simple-commands/enhanced-ui-views.js +654 -0
- package/src/cli/simple-commands/enhanced-webui-complete.js +1038 -0
- package/src/cli/simple-commands/fix-hook-variables.js +363 -0
- package/src/cli/simple-commands/github/gh-coordinator.js +605 -0
- package/src/cli/simple-commands/github/github-api.js +624 -0
- package/src/cli/simple-commands/github/init.js +543 -0
- package/src/cli/simple-commands/github.js +377 -0
- package/src/cli/simple-commands/goal.js +145 -0
- package/src/cli/simple-commands/hive-mind/auto-save-middleware.js +311 -0
- package/src/cli/simple-commands/hive-mind/communication.js +740 -0
- package/src/cli/simple-commands/hive-mind/core.js +1031 -0
- package/src/cli/simple-commands/hive-mind/db-optimizer.js +872 -0
- package/src/cli/simple-commands/hive-mind/mcp-wrapper.js +1364 -0
- package/src/cli/simple-commands/hive-mind/memory.js +1292 -0
- package/src/cli/simple-commands/hive-mind/performance-optimizer.js +618 -0
- package/src/cli/simple-commands/hive-mind/performance-test.js +373 -0
- package/src/cli/simple-commands/hive-mind/queen.js +809 -0
- package/src/cli/simple-commands/hive-mind/session-manager.js +1223 -0
- package/src/cli/simple-commands/hive-mind-optimize.js +361 -0
- package/src/cli/simple-commands/hive-mind-wizard.js +281 -0
- package/src/cli/simple-commands/hive-mind.js +3112 -0
- package/src/cli/simple-commands/hive.js +140 -0
- package/src/cli/simple-commands/hook-safety.js +671 -0
- package/src/cli/simple-commands/hooks.js +1268 -0
- package/src/cli/simple-commands/init/.claude/checkpoints/1756224542.json +7 -0
- package/src/cli/simple-commands/init/.claude/checkpoints/1756224544.json +8 -0
- package/src/cli/simple-commands/init/README.md +106 -0
- package/src/cli/simple-commands/init/VALIDATION_ROLLBACK.md +488 -0
- package/src/cli/simple-commands/init/agent-copier.js +347 -0
- package/src/cli/simple-commands/init/batch-init.js +663 -0
- package/src/cli/simple-commands/init/claude-commands/claude-flow-commands.js +438 -0
- package/src/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.js +876 -0
- package/src/cli/simple-commands/init/claude-commands/optimized-slash-commands.js +356 -0
- package/src/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js +501 -0
- package/src/cli/simple-commands/init/claude-commands/slash-commands.js +57 -0
- package/src/cli/simple-commands/init/claude-commands/sparc-commands.js +296 -0
- package/src/cli/simple-commands/init/copy-revised-templates.js +175 -0
- package/src/cli/simple-commands/init/executable-wrapper.js +122 -0
- package/src/cli/simple-commands/init/gitignore-updater.js +137 -0
- package/src/cli/simple-commands/init/help.js +110 -0
- package/src/cli/simple-commands/init/hive-mind-init.js +749 -0
- package/src/cli/simple-commands/init/index.js +1953 -0
- package/src/cli/simple-commands/init/performance-monitor.js +344 -0
- package/src/cli/simple-commands/init/rollback/backup-manager.js +542 -0
- package/src/cli/simple-commands/init/rollback/index.js +399 -0
- package/src/cli/simple-commands/init/rollback/recovery-manager.js +778 -0
- package/src/cli/simple-commands/init/rollback/rollback-executor.js +521 -0
- package/src/cli/simple-commands/init/rollback/state-tracker.js +486 -0
- package/src/cli/simple-commands/init/sparc/roo-readme.js +61 -0
- package/src/cli/simple-commands/init/sparc/roomodes-config.js +102 -0
- package/src/cli/simple-commands/init/sparc/workflows.js +40 -0
- package/src/cli/simple-commands/init/sparc-structure.js +68 -0
- package/src/cli/simple-commands/init/template-copier.js +640 -0
- package/src/cli/simple-commands/init/templates/CLAUDE.md +1185 -0
- package/src/cli/simple-commands/init/templates/CLAUDE.md.optimized +265 -0
- package/src/cli/simple-commands/init/templates/claude-flow-universal +81 -0
- package/src/cli/simple-commands/init/templates/claude-flow.bat +18 -0
- package/src/cli/simple-commands/init/templates/claude-flow.ps1 +24 -0
- package/src/cli/simple-commands/init/templates/claude-md.js +1101 -0
- package/src/cli/simple-commands/init/templates/commands/analysis/bottleneck-detect.md +162 -0
- package/src/cli/simple-commands/init/templates/commands/automation/auto-agent.md +122 -0
- package/src/cli/simple-commands/init/templates/commands/coordination/swarm-init.md +85 -0
- package/src/cli/simple-commands/init/templates/commands/github/github-swarm.md +121 -0
- package/src/cli/simple-commands/init/templates/commands/helpers/standard-checkpoint-hooks.sh +179 -0
- package/src/cli/simple-commands/init/templates/commands/hooks/notification.md +113 -0
- package/src/cli/simple-commands/init/templates/commands/hooks/post-command.md +116 -0
- package/src/cli/simple-commands/init/templates/commands/hooks/post-edit.md +117 -0
- package/src/cli/simple-commands/init/templates/commands/hooks/post-task.md +112 -0
- package/src/cli/simple-commands/init/templates/commands/hooks/pre-command.md +113 -0
- package/src/cli/simple-commands/init/templates/commands/hooks/pre-edit.md +113 -0
- package/src/cli/simple-commands/init/templates/commands/hooks/pre-search.md +112 -0
- package/src/cli/simple-commands/init/templates/commands/hooks/pre-task.md +111 -0
- package/src/cli/simple-commands/init/templates/commands/hooks/session-end.md +118 -0
- package/src/cli/simple-commands/init/templates/commands/hooks/session-restore.md +118 -0
- package/src/cli/simple-commands/init/templates/commands/hooks/session-start.md +117 -0
- package/src/cli/simple-commands/init/templates/coordination-md.js +340 -0
- package/src/cli/simple-commands/init/templates/coordination.md +16 -0
- package/src/cli/simple-commands/init/templates/enhanced-templates.js +2347 -0
- package/src/cli/simple-commands/init/templates/github-safe-enhanced.js +331 -0
- package/src/cli/simple-commands/init/templates/github-safe.js +106 -0
- package/src/cli/simple-commands/init/templates/memory-bank-md.js +259 -0
- package/src/cli/simple-commands/init/templates/memory-bank.md +16 -0
- package/src/cli/simple-commands/init/templates/readme-files.js +72 -0
- package/src/cli/simple-commands/init/templates/safe-hook-patterns.js +430 -0
- package/src/cli/simple-commands/init/templates/settings.json +109 -0
- package/src/cli/simple-commands/init/templates/settings.json.enhanced +35 -0
- package/src/cli/simple-commands/init/templates/sparc-modes.js +1401 -0
- package/src/cli/simple-commands/init/templates/verification-claude-md.js +432 -0
- package/src/cli/simple-commands/init/validation/config-validator.js +354 -0
- package/src/cli/simple-commands/init/validation/health-checker.js +599 -0
- package/src/cli/simple-commands/init/validation/index.js +388 -0
- package/src/cli/simple-commands/init/validation/mode-validator.js +387 -0
- package/src/cli/simple-commands/init/validation/post-init-validator.js +390 -0
- package/src/cli/simple-commands/init/validation/pre-init-validator.js +290 -0
- package/src/cli/simple-commands/init/validation/test-runner.js +488 -0
- package/src/cli/simple-commands/init.js +4 -0
- package/src/cli/simple-commands/mcp-health.js +163 -0
- package/src/cli/simple-commands/mcp-integration-layer.js +689 -0
- package/src/cli/simple-commands/mcp.js +420 -0
- package/src/cli/simple-commands/memory-consolidation.js +631 -0
- package/src/cli/simple-commands/memory.js +345 -0
- package/src/cli/simple-commands/migrate-hooks.js +63 -0
- package/src/cli/simple-commands/monitor.js +417 -0
- package/src/cli/simple-commands/neural.js +148 -0
- package/src/cli/simple-commands/pair-autofix-only.js +755 -0
- package/src/cli/simple-commands/pair-basic.js +751 -0
- package/src/cli/simple-commands/pair-old.js +623 -0
- package/src/cli/simple-commands/pair-working.js +849 -0
- package/src/cli/simple-commands/pair.js +849 -0
- package/src/cli/simple-commands/performance-hooks.js +149 -0
- package/src/cli/simple-commands/performance-metrics.js +601 -0
- package/src/cli/simple-commands/process-ui-enhanced.js +821 -0
- package/src/cli/simple-commands/process-ui.js +274 -0
- package/src/cli/simple-commands/realtime-update-system.js +659 -0
- package/src/cli/simple-commands/sparc/architecture.js +1750 -0
- package/src/cli/simple-commands/sparc/commands.js +575 -0
- package/src/cli/simple-commands/sparc/completion.js +1831 -0
- package/src/cli/simple-commands/sparc/coordinator.js +1045 -0
- package/src/cli/simple-commands/sparc/index.js +321 -0
- package/src/cli/simple-commands/sparc/phase-base.js +430 -0
- package/src/cli/simple-commands/sparc/pseudocode.js +984 -0
- package/src/cli/simple-commands/sparc/refinement.js +1856 -0
- package/src/cli/simple-commands/sparc/specification.js +736 -0
- package/src/cli/simple-commands/sparc-modes/architect.js +125 -0
- package/src/cli/simple-commands/sparc-modes/ask.js +126 -0
- package/src/cli/simple-commands/sparc-modes/code.js +148 -0
- package/src/cli/simple-commands/sparc-modes/debug.js +112 -0
- package/src/cli/simple-commands/sparc-modes/devops.js +137 -0
- package/src/cli/simple-commands/sparc-modes/docs-writer.js +38 -0
- package/src/cli/simple-commands/sparc-modes/generic.js +34 -0
- package/src/cli/simple-commands/sparc-modes/index.js +201 -0
- package/src/cli/simple-commands/sparc-modes/integration.js +55 -0
- package/src/cli/simple-commands/sparc-modes/mcp.js +38 -0
- package/src/cli/simple-commands/sparc-modes/monitoring.js +38 -0
- package/src/cli/simple-commands/sparc-modes/optimization.js +38 -0
- package/src/cli/simple-commands/sparc-modes/security-review.js +130 -0
- package/src/cli/simple-commands/sparc-modes/sparc-orchestrator.js +167 -0
- package/src/cli/simple-commands/sparc-modes/spec-pseudocode.js +38 -0
- package/src/cli/simple-commands/sparc-modes/supabase-admin.js +149 -0
- package/src/cli/simple-commands/sparc-modes/swarm.js +436 -0
- package/src/cli/simple-commands/sparc-modes/tdd.js +112 -0
- package/src/cli/simple-commands/sparc-modes/tutorial.js +277 -0
- package/src/cli/simple-commands/sparc.js +530 -0
- package/src/cli/simple-commands/start-ui.js +147 -0
- package/src/cli/simple-commands/start-wrapper.js +285 -0
- package/src/cli/simple-commands/start.js +2 -0
- package/src/cli/simple-commands/status.js +303 -0
- package/src/cli/simple-commands/stream-chain-clean.js +221 -0
- package/src/cli/simple-commands/stream-chain-fixed.js +89 -0
- package/src/cli/simple-commands/stream-chain-real.js +408 -0
- package/src/cli/simple-commands/stream-chain-working.js +323 -0
- package/src/cli/simple-commands/stream-chain.js +491 -0
- package/src/cli/simple-commands/stream-processor.js +340 -0
- package/src/cli/simple-commands/swarm-executor.js +253 -0
- package/src/cli/simple-commands/swarm-metrics-integration.js +371 -0
- package/src/cli/simple-commands/swarm-ui.js +741 -0
- package/src/cli/simple-commands/swarm-webui-integration.js +311 -0
- package/src/cli/simple-commands/swarm.js +2277 -0
- package/src/cli/simple-commands/task.js +228 -0
- package/src/cli/simple-commands/templates/mle-star-workflow.json +294 -0
- package/src/cli/simple-commands/timestamp-fix.js +104 -0
- package/src/cli/simple-commands/token-tracker.js +372 -0
- package/src/cli/simple-commands/tool-execution-framework.js +555 -0
- package/src/cli/simple-commands/train-and-stream.js +354 -0
- package/src/cli/simple-commands/training-pipeline.js +874 -0
- package/src/cli/simple-commands/training.js +288 -0
- package/src/cli/simple-commands/verification-hooks.js +336 -0
- package/src/cli/simple-commands/verification-integration.js +464 -0
- package/src/cli/simple-commands/verification-training-integration.js +646 -0
- package/src/cli/simple-commands/verification.js +551 -0
- package/src/cli/simple-commands/web-server.js +929 -0
- package/src/cli/simple-commands/webui-validator.js +136 -0
- package/src/language/README.md +503 -0
- package/src/language/claude-md-generator.js +618 -0
- package/src/language/cli.js +422 -0
- package/src/language/example.js +347 -0
- package/src/language/integration-system.js +619 -0
- package/src/language/language-detector.js +581 -0
|
@@ -0,0 +1,1401 @@
|
|
|
1
|
+
// sparc-modes.js - SPARC mode file templates
|
|
2
|
+
|
|
3
|
+
export function createSparcModesOverview() {
|
|
4
|
+
return `# SPARC Modes Overview
|
|
5
|
+
|
|
6
|
+
SPARC (Specification, Planning, Architecture, Review, Code) is a comprehensive development methodology with 17 specialized modes.
|
|
7
|
+
|
|
8
|
+
## Available Modes
|
|
9
|
+
|
|
10
|
+
### Core Orchestration Modes
|
|
11
|
+
- **orchestrator**: Multi-agent task orchestration
|
|
12
|
+
- **swarm-coordinator**: Specialized swarm management
|
|
13
|
+
- **workflow-manager**: Process automation
|
|
14
|
+
- **batch-executor**: Parallel task execution
|
|
15
|
+
|
|
16
|
+
### Development Modes
|
|
17
|
+
- **coder**: Autonomous code generation
|
|
18
|
+
- **architect**: System design
|
|
19
|
+
- **reviewer**: Code review
|
|
20
|
+
- **tdd**: Test-driven development
|
|
21
|
+
|
|
22
|
+
### Analysis and Research Modes
|
|
23
|
+
- **researcher**: Deep research capabilities
|
|
24
|
+
- **analyzer**: Code and data analysis
|
|
25
|
+
- **optimizer**: Performance optimization
|
|
26
|
+
|
|
27
|
+
### Creative and Support Modes
|
|
28
|
+
- **designer**: UI/UX design
|
|
29
|
+
- **innovator**: Creative problem solving
|
|
30
|
+
- **documenter**: Documentation generation
|
|
31
|
+
- **debugger**: Systematic debugging
|
|
32
|
+
- **tester**: Comprehensive testing
|
|
33
|
+
- **memory-manager**: Knowledge management
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
\`\`\`bash
|
|
37
|
+
# Run a specific mode
|
|
38
|
+
./claude-flow sparc run <mode> "task description"
|
|
39
|
+
|
|
40
|
+
# List all modes
|
|
41
|
+
./claude-flow sparc modes
|
|
42
|
+
|
|
43
|
+
# Get help for a mode
|
|
44
|
+
./claude-flow sparc help <mode>
|
|
45
|
+
\`\`\`
|
|
46
|
+
`;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function createSwarmStrategyTemplates() {
|
|
50
|
+
return {
|
|
51
|
+
'analysis.md': createAnalysisStrategy(),
|
|
52
|
+
'development.md': createDevelopmentStrategy(),
|
|
53
|
+
'examples.md': createExamplesStrategy(),
|
|
54
|
+
'maintenance.md': createMaintenanceStrategy(),
|
|
55
|
+
'optimization.md': createOptimizationStrategy(),
|
|
56
|
+
'research.md': createResearchStrategy(),
|
|
57
|
+
'testing.md': createTestingStrategy(),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function createAnalysisStrategy() {
|
|
62
|
+
return `# Analysis Swarm Strategy
|
|
63
|
+
|
|
64
|
+
## Purpose
|
|
65
|
+
Comprehensive analysis through distributed agent coordination.
|
|
66
|
+
|
|
67
|
+
## Activation
|
|
68
|
+
|
|
69
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
70
|
+
\`\`\`javascript
|
|
71
|
+
mcp__claude-flow__swarm_init {
|
|
72
|
+
topology: "mesh",
|
|
73
|
+
strategy: "analysis",
|
|
74
|
+
maxAgents: 6
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
mcp__claude-flow__task_orchestrate {
|
|
78
|
+
task: "analyze system performance",
|
|
79
|
+
strategy: "distributed"
|
|
80
|
+
}
|
|
81
|
+
\`\`\`
|
|
82
|
+
|
|
83
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
84
|
+
\`\`\`bash
|
|
85
|
+
# Use when running from terminal or MCP tools unavailable
|
|
86
|
+
npx claude-flow swarm "analyze system performance" --strategy analysis
|
|
87
|
+
|
|
88
|
+
# For alpha features
|
|
89
|
+
npx claude-flow@alpha swarm "analyze system performance" --strategy analysis
|
|
90
|
+
\`\`\`
|
|
91
|
+
|
|
92
|
+
### Option 3: Local Installation
|
|
93
|
+
\`\`\`bash
|
|
94
|
+
# If claude-flow is installed locally
|
|
95
|
+
./claude-flow swarm "analyze system performance" --strategy analysis
|
|
96
|
+
\`\`\`
|
|
97
|
+
|
|
98
|
+
## Agent Roles
|
|
99
|
+
- Data Collector: Gathers metrics and logs
|
|
100
|
+
- Pattern Analyzer: Identifies trends and anomalies
|
|
101
|
+
- Report Generator: Creates comprehensive reports
|
|
102
|
+
- Insight Synthesizer: Combines findings
|
|
103
|
+
|
|
104
|
+
## Coordination Modes
|
|
105
|
+
- Mesh: For exploratory analysis
|
|
106
|
+
- Pipeline: For sequential processing
|
|
107
|
+
- Hierarchical: For complex systems
|
|
108
|
+
`;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function createDevelopmentStrategy() {
|
|
112
|
+
return `# Development Swarm Strategy
|
|
113
|
+
|
|
114
|
+
## Purpose
|
|
115
|
+
Coordinated development through specialized agent teams.
|
|
116
|
+
|
|
117
|
+
## Activation
|
|
118
|
+
|
|
119
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
120
|
+
\`\`\`javascript
|
|
121
|
+
mcp__claude-flow__swarm_init {
|
|
122
|
+
topology: "hierarchical",
|
|
123
|
+
strategy: "development",
|
|
124
|
+
maxAgents: 8
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
mcp__claude-flow__task_orchestrate {
|
|
128
|
+
task: "build feature X",
|
|
129
|
+
strategy: "parallel"
|
|
130
|
+
}
|
|
131
|
+
\`\`\`
|
|
132
|
+
|
|
133
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
134
|
+
\`\`\`bash
|
|
135
|
+
# Use when running from terminal or MCP tools unavailable
|
|
136
|
+
npx claude-flow swarm "build feature X" --strategy development
|
|
137
|
+
|
|
138
|
+
# For alpha features
|
|
139
|
+
npx claude-flow@alpha swarm "build feature X" --strategy development
|
|
140
|
+
\`\`\`
|
|
141
|
+
|
|
142
|
+
### Option 3: Local Installation
|
|
143
|
+
\`\`\`bash
|
|
144
|
+
# If claude-flow is installed locally
|
|
145
|
+
./claude-flow swarm "build feature X" --strategy development
|
|
146
|
+
\`\`\`
|
|
147
|
+
|
|
148
|
+
## Agent Roles
|
|
149
|
+
- Architect: Designs system structure
|
|
150
|
+
- Frontend Developer: Implements UI
|
|
151
|
+
- Backend Developer: Creates APIs
|
|
152
|
+
- Database Specialist: Manages data layer
|
|
153
|
+
- Integration Expert: Connects components
|
|
154
|
+
|
|
155
|
+
## Best Practices
|
|
156
|
+
- Use hierarchical mode for large projects
|
|
157
|
+
- Enable parallel execution
|
|
158
|
+
- Implement continuous testing
|
|
159
|
+
`;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function createExamplesStrategy() {
|
|
163
|
+
return `# Examples Swarm Strategy
|
|
164
|
+
|
|
165
|
+
## Common Swarm Patterns
|
|
166
|
+
|
|
167
|
+
### Research Swarm
|
|
168
|
+
\`\`\`bash
|
|
169
|
+
./claude-flow swarm "research AI trends" \\
|
|
170
|
+
--strategy research \\
|
|
171
|
+
--mode distributed \\
|
|
172
|
+
--max-agents 6 \\
|
|
173
|
+
--parallel
|
|
174
|
+
\`\`\`
|
|
175
|
+
|
|
176
|
+
### Development Swarm
|
|
177
|
+
\`\`\`bash
|
|
178
|
+
./claude-flow swarm "build REST API" \\
|
|
179
|
+
--strategy development \\
|
|
180
|
+
--mode hierarchical \\
|
|
181
|
+
--monitor \\
|
|
182
|
+
--output sqlite
|
|
183
|
+
\`\`\`
|
|
184
|
+
|
|
185
|
+
### Analysis Swarm
|
|
186
|
+
\`\`\`bash
|
|
187
|
+
./claude-flow swarm "analyze codebase" \\
|
|
188
|
+
--strategy analysis \\
|
|
189
|
+
--mode mesh \\
|
|
190
|
+
--parallel \\
|
|
191
|
+
--timeout 300
|
|
192
|
+
\`\`\`
|
|
193
|
+
`;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
function createMaintenanceStrategy() {
|
|
197
|
+
return `# Maintenance Swarm Strategy
|
|
198
|
+
|
|
199
|
+
## Purpose
|
|
200
|
+
System maintenance and updates through coordinated agents.
|
|
201
|
+
|
|
202
|
+
## Activation
|
|
203
|
+
|
|
204
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
205
|
+
\`\`\`javascript
|
|
206
|
+
mcp__claude-flow__swarm_init {
|
|
207
|
+
topology: "hierarchical",
|
|
208
|
+
strategy: "maintenance",
|
|
209
|
+
maxAgents: 5
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
mcp__claude-flow__task_orchestrate {
|
|
213
|
+
task: "update dependencies",
|
|
214
|
+
strategy: "sequential",
|
|
215
|
+
priority: "high"
|
|
216
|
+
}
|
|
217
|
+
\`\`\`
|
|
218
|
+
|
|
219
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
220
|
+
\`\`\`bash
|
|
221
|
+
# Use when running from terminal or MCP tools unavailable
|
|
222
|
+
npx claude-flow swarm "update dependencies" --strategy maintenance
|
|
223
|
+
|
|
224
|
+
# For alpha features
|
|
225
|
+
npx claude-flow@alpha swarm "update dependencies" --strategy maintenance
|
|
226
|
+
\`\`\`
|
|
227
|
+
|
|
228
|
+
### Option 3: Local Installation
|
|
229
|
+
\`\`\`bash
|
|
230
|
+
# If claude-flow is installed locally
|
|
231
|
+
./claude-flow swarm "update dependencies" --strategy maintenance
|
|
232
|
+
\`\`\`
|
|
233
|
+
|
|
234
|
+
## Agent Roles
|
|
235
|
+
- Dependency Analyzer: Checks for updates
|
|
236
|
+
- Security Scanner: Identifies vulnerabilities
|
|
237
|
+
- Test Runner: Validates changes
|
|
238
|
+
- Documentation Updater: Maintains docs
|
|
239
|
+
|
|
240
|
+
## Safety Features
|
|
241
|
+
- Automatic backups
|
|
242
|
+
- Rollback capability
|
|
243
|
+
- Incremental updates
|
|
244
|
+
`;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
function createOptimizationStrategy() {
|
|
248
|
+
return `# Optimization Swarm Strategy
|
|
249
|
+
|
|
250
|
+
## Purpose
|
|
251
|
+
Performance optimization through specialized analysis.
|
|
252
|
+
|
|
253
|
+
## Activation
|
|
254
|
+
|
|
255
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
256
|
+
\`\`\`javascript
|
|
257
|
+
mcp__claude-flow__swarm_init {
|
|
258
|
+
topology: "mesh",
|
|
259
|
+
strategy: "optimization",
|
|
260
|
+
maxAgents: 6
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
mcp__claude-flow__task_orchestrate {
|
|
264
|
+
task: "optimize performance",
|
|
265
|
+
strategy: "parallel"
|
|
266
|
+
}
|
|
267
|
+
\`\`\`
|
|
268
|
+
|
|
269
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
270
|
+
\`\`\`bash
|
|
271
|
+
# Use when running from terminal or MCP tools unavailable
|
|
272
|
+
npx claude-flow swarm "optimize performance" --strategy optimization
|
|
273
|
+
|
|
274
|
+
# For alpha features
|
|
275
|
+
npx claude-flow@alpha swarm "optimize performance" --strategy optimization
|
|
276
|
+
\`\`\`
|
|
277
|
+
|
|
278
|
+
### Option 3: Local Installation
|
|
279
|
+
\`\`\`bash
|
|
280
|
+
# If claude-flow is installed locally
|
|
281
|
+
./claude-flow swarm "optimize performance" --strategy optimization
|
|
282
|
+
\`\`\`
|
|
283
|
+
|
|
284
|
+
## Agent Roles
|
|
285
|
+
- Performance Profiler: Identifies bottlenecks
|
|
286
|
+
- Memory Analyzer: Detects leaks
|
|
287
|
+
- Code Optimizer: Implements improvements
|
|
288
|
+
- Benchmark Runner: Measures impact
|
|
289
|
+
|
|
290
|
+
## Optimization Areas
|
|
291
|
+
- Execution speed
|
|
292
|
+
- Memory usage
|
|
293
|
+
- Network efficiency
|
|
294
|
+
- Bundle size
|
|
295
|
+
`;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
function createResearchStrategy() {
|
|
299
|
+
return `# Research Swarm Strategy
|
|
300
|
+
|
|
301
|
+
## Purpose
|
|
302
|
+
Deep research through parallel information gathering.
|
|
303
|
+
|
|
304
|
+
## Activation
|
|
305
|
+
|
|
306
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
307
|
+
\`\`\`javascript
|
|
308
|
+
mcp__claude-flow__swarm_init {
|
|
309
|
+
topology: "distributed",
|
|
310
|
+
strategy: "research",
|
|
311
|
+
maxAgents: 6
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
mcp__claude-flow__task_orchestrate {
|
|
315
|
+
task: "research topic X",
|
|
316
|
+
strategy: "parallel"
|
|
317
|
+
}
|
|
318
|
+
\`\`\`
|
|
319
|
+
|
|
320
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
321
|
+
\`\`\`bash
|
|
322
|
+
# Use when running from terminal or MCP tools unavailable
|
|
323
|
+
npx claude-flow swarm "research topic X" --strategy research
|
|
324
|
+
|
|
325
|
+
# For alpha features
|
|
326
|
+
npx claude-flow@alpha swarm "research topic X" --strategy research
|
|
327
|
+
\`\`\`
|
|
328
|
+
|
|
329
|
+
### Option 3: Local Installation
|
|
330
|
+
\`\`\`bash
|
|
331
|
+
# If claude-flow is installed locally
|
|
332
|
+
./claude-flow swarm "research topic X" --strategy research
|
|
333
|
+
\`\`\`
|
|
334
|
+
|
|
335
|
+
## Agent Roles
|
|
336
|
+
- Web Researcher: Searches online sources
|
|
337
|
+
- Academic Researcher: Analyzes papers
|
|
338
|
+
- Data Analyst: Processes findings
|
|
339
|
+
- Report Writer: Synthesizes results
|
|
340
|
+
|
|
341
|
+
## Research Methods
|
|
342
|
+
- Parallel web searches
|
|
343
|
+
- Cross-reference validation
|
|
344
|
+
- Source credibility assessment
|
|
345
|
+
`;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
function createTestingStrategy() {
|
|
349
|
+
return `# Testing Swarm Strategy
|
|
350
|
+
|
|
351
|
+
## Purpose
|
|
352
|
+
Comprehensive testing through distributed execution.
|
|
353
|
+
|
|
354
|
+
## Activation
|
|
355
|
+
|
|
356
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
357
|
+
\`\`\`javascript
|
|
358
|
+
mcp__claude-flow__swarm_init {
|
|
359
|
+
topology: "distributed",
|
|
360
|
+
strategy: "testing",
|
|
361
|
+
maxAgents: 5
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
mcp__claude-flow__task_orchestrate {
|
|
365
|
+
task: "test application",
|
|
366
|
+
strategy: "parallel"
|
|
367
|
+
}
|
|
368
|
+
\`\`\`
|
|
369
|
+
|
|
370
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
371
|
+
\`\`\`bash
|
|
372
|
+
# Use when running from terminal or MCP tools unavailable
|
|
373
|
+
npx claude-flow swarm "test application" --strategy testing
|
|
374
|
+
|
|
375
|
+
# For alpha features
|
|
376
|
+
npx claude-flow@alpha swarm "test application" --strategy testing
|
|
377
|
+
\`\`\`
|
|
378
|
+
|
|
379
|
+
### Option 3: Local Installation
|
|
380
|
+
\`\`\`bash
|
|
381
|
+
# If claude-flow is installed locally
|
|
382
|
+
./claude-flow swarm "test application" --strategy testing
|
|
383
|
+
\`\`\`
|
|
384
|
+
|
|
385
|
+
## Agent Roles
|
|
386
|
+
- Unit Tester: Tests individual components
|
|
387
|
+
- Integration Tester: Validates interactions
|
|
388
|
+
- E2E Tester: Tests user flows
|
|
389
|
+
- Performance Tester: Measures metrics
|
|
390
|
+
- Security Tester: Finds vulnerabilities
|
|
391
|
+
|
|
392
|
+
## Test Coverage
|
|
393
|
+
- Code coverage analysis
|
|
394
|
+
- Edge case identification
|
|
395
|
+
- Regression prevention
|
|
396
|
+
`;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export function createSparcModeTemplates() {
|
|
400
|
+
return {
|
|
401
|
+
'analyzer.md': createAnalyzerMode(),
|
|
402
|
+
'architect.md': createArchitectMode(),
|
|
403
|
+
'batch-executor.md': createBatchExecutorMode(),
|
|
404
|
+
'coder.md': createCoderMode(),
|
|
405
|
+
'debugger.md': createDebuggerMode(),
|
|
406
|
+
'designer.md': createDesignerMode(),
|
|
407
|
+
'documenter.md': createDocumenterMode(),
|
|
408
|
+
'innovator.md': createInnovatorMode(),
|
|
409
|
+
'memory-manager.md': createMemoryManagerMode(),
|
|
410
|
+
'optimizer.md': createOptimizerMode(),
|
|
411
|
+
'orchestrator.md': createOrchestratorMode(),
|
|
412
|
+
'researcher.md': createResearcherMode(),
|
|
413
|
+
'reviewer.md': createReviewerMode(),
|
|
414
|
+
'swarm-coordinator.md': createSwarmCoordinatorMode(),
|
|
415
|
+
'tdd.md': createTddMode(),
|
|
416
|
+
'tester.md': createTesterMode(),
|
|
417
|
+
'workflow-manager.md': createWorkflowManagerMode(),
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
function createAnalyzerMode() {
|
|
422
|
+
return `# SPARC Analyzer Mode
|
|
423
|
+
|
|
424
|
+
## Purpose
|
|
425
|
+
Deep code and data analysis with batch processing capabilities.
|
|
426
|
+
|
|
427
|
+
## Activation
|
|
428
|
+
|
|
429
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
430
|
+
\`\`\`javascript
|
|
431
|
+
mcp__claude-flow__sparc_mode {
|
|
432
|
+
mode: "analyzer",
|
|
433
|
+
task_description: "analyze codebase performance",
|
|
434
|
+
options: {
|
|
435
|
+
parallel: true,
|
|
436
|
+
detailed: true
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
\`\`\`
|
|
440
|
+
|
|
441
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
442
|
+
\`\`\`bash
|
|
443
|
+
# Use when running from terminal or MCP tools unavailable
|
|
444
|
+
npx claude-flow sparc run analyzer "analyze codebase performance"
|
|
445
|
+
|
|
446
|
+
# For alpha features
|
|
447
|
+
npx claude-flow@alpha sparc run analyzer "analyze codebase performance"
|
|
448
|
+
\`\`\`
|
|
449
|
+
|
|
450
|
+
### Option 3: Local Installation
|
|
451
|
+
\`\`\`bash
|
|
452
|
+
# If claude-flow is installed locally
|
|
453
|
+
./claude-flow sparc run analyzer "analyze codebase performance"
|
|
454
|
+
\`\`\`
|
|
455
|
+
|
|
456
|
+
## Core Capabilities
|
|
457
|
+
- Code analysis with parallel file processing
|
|
458
|
+
- Data pattern recognition
|
|
459
|
+
- Performance profiling
|
|
460
|
+
- Memory usage analysis
|
|
461
|
+
- Dependency mapping
|
|
462
|
+
|
|
463
|
+
## Batch Operations
|
|
464
|
+
- Parallel file analysis using concurrent Read operations
|
|
465
|
+
- Batch pattern matching with Grep tool
|
|
466
|
+
- Simultaneous metric collection
|
|
467
|
+
- Aggregated reporting
|
|
468
|
+
|
|
469
|
+
## Output Format
|
|
470
|
+
- Detailed analysis reports
|
|
471
|
+
- Performance metrics
|
|
472
|
+
- Improvement recommendations
|
|
473
|
+
- Visualizations when applicable
|
|
474
|
+
`;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
function createArchitectMode() {
|
|
478
|
+
return `# SPARC Architect Mode
|
|
479
|
+
|
|
480
|
+
## Purpose
|
|
481
|
+
System design with Memory-based coordination for scalable architectures.
|
|
482
|
+
|
|
483
|
+
## Activation
|
|
484
|
+
|
|
485
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
486
|
+
\`\`\`javascript
|
|
487
|
+
mcp__claude-flow__sparc_mode {
|
|
488
|
+
mode: "architect",
|
|
489
|
+
task_description: "design microservices architecture",
|
|
490
|
+
options: {
|
|
491
|
+
detailed: true,
|
|
492
|
+
memory_enabled: true
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
\`\`\`
|
|
496
|
+
|
|
497
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
498
|
+
\`\`\`bash
|
|
499
|
+
# Use when running from terminal or MCP tools unavailable
|
|
500
|
+
npx claude-flow sparc run architect "design microservices architecture"
|
|
501
|
+
|
|
502
|
+
# For alpha features
|
|
503
|
+
npx claude-flow@alpha sparc run architect "design microservices architecture"
|
|
504
|
+
\`\`\`
|
|
505
|
+
|
|
506
|
+
### Option 3: Local Installation
|
|
507
|
+
\`\`\`bash
|
|
508
|
+
# If claude-flow is installed locally
|
|
509
|
+
./claude-flow sparc run architect "design microservices architecture"
|
|
510
|
+
\`\`\`
|
|
511
|
+
|
|
512
|
+
## Core Capabilities
|
|
513
|
+
- System architecture design
|
|
514
|
+
- Component interface definition
|
|
515
|
+
- Database schema design
|
|
516
|
+
- API contract specification
|
|
517
|
+
- Infrastructure planning
|
|
518
|
+
|
|
519
|
+
## Memory Integration
|
|
520
|
+
- Store architecture decisions in Memory
|
|
521
|
+
- Share component specifications across agents
|
|
522
|
+
- Maintain design consistency
|
|
523
|
+
- Track architectural evolution
|
|
524
|
+
|
|
525
|
+
## Design Patterns
|
|
526
|
+
- Microservices
|
|
527
|
+
- Event-driven architecture
|
|
528
|
+
- Domain-driven design
|
|
529
|
+
- Hexagonal architecture
|
|
530
|
+
- CQRS and Event Sourcing
|
|
531
|
+
`;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
function createBatchExecutorMode() {
|
|
535
|
+
return `# SPARC Batch Executor Mode
|
|
536
|
+
|
|
537
|
+
## Purpose
|
|
538
|
+
Parallel task execution specialist using batch operations.
|
|
539
|
+
|
|
540
|
+
## Activation
|
|
541
|
+
|
|
542
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
543
|
+
\`\`\`javascript
|
|
544
|
+
mcp__claude-flow__sparc_mode {
|
|
545
|
+
mode: "batch-executor",
|
|
546
|
+
task_description: "process multiple files",
|
|
547
|
+
options: {
|
|
548
|
+
parallel: true,
|
|
549
|
+
batch_size: 10
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
\`\`\`
|
|
553
|
+
|
|
554
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
555
|
+
\`\`\`bash
|
|
556
|
+
# Use when running from terminal or MCP tools unavailable
|
|
557
|
+
npx claude-flow sparc run batch-executor "process multiple files"
|
|
558
|
+
|
|
559
|
+
# For alpha features
|
|
560
|
+
npx claude-flow@alpha sparc run batch-executor "process multiple files"
|
|
561
|
+
\`\`\`
|
|
562
|
+
|
|
563
|
+
### Option 3: Local Installation
|
|
564
|
+
\`\`\`bash
|
|
565
|
+
# If claude-flow is installed locally
|
|
566
|
+
./claude-flow sparc run batch-executor "process multiple files"
|
|
567
|
+
\`\`\`
|
|
568
|
+
|
|
569
|
+
## Core Capabilities
|
|
570
|
+
- Parallel file operations
|
|
571
|
+
- Concurrent task execution
|
|
572
|
+
- Resource optimization
|
|
573
|
+
- Load balancing
|
|
574
|
+
- Progress tracking
|
|
575
|
+
|
|
576
|
+
## Execution Patterns
|
|
577
|
+
- Parallel Read/Write operations
|
|
578
|
+
- Concurrent Edit operations
|
|
579
|
+
- Batch file transformations
|
|
580
|
+
- Distributed processing
|
|
581
|
+
- Pipeline orchestration
|
|
582
|
+
|
|
583
|
+
## Performance Features
|
|
584
|
+
- Dynamic resource allocation
|
|
585
|
+
- Automatic load balancing
|
|
586
|
+
- Progress monitoring
|
|
587
|
+
- Error recovery
|
|
588
|
+
- Result aggregation
|
|
589
|
+
`;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
function createCoderMode() {
|
|
593
|
+
return `# SPARC Coder Mode
|
|
594
|
+
|
|
595
|
+
## Purpose
|
|
596
|
+
Autonomous code generation with batch file operations.
|
|
597
|
+
|
|
598
|
+
## Activation
|
|
599
|
+
|
|
600
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
601
|
+
\`\`\`javascript
|
|
602
|
+
mcp__claude-flow__sparc_mode {
|
|
603
|
+
mode: "coder",
|
|
604
|
+
task_description: "implement user authentication",
|
|
605
|
+
options: {
|
|
606
|
+
test_driven: true,
|
|
607
|
+
parallel_edits: true
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
\`\`\`
|
|
611
|
+
|
|
612
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
613
|
+
\`\`\`bash
|
|
614
|
+
# Use when running from terminal or MCP tools unavailable
|
|
615
|
+
npx claude-flow sparc run coder "implement user authentication"
|
|
616
|
+
|
|
617
|
+
# For alpha features
|
|
618
|
+
npx claude-flow@alpha sparc run coder "implement user authentication"
|
|
619
|
+
\`\`\`
|
|
620
|
+
|
|
621
|
+
### Option 3: Local Installation
|
|
622
|
+
\`\`\`bash
|
|
623
|
+
# If claude-flow is installed locally
|
|
624
|
+
./claude-flow sparc run coder "implement user authentication"
|
|
625
|
+
\`\`\`
|
|
626
|
+
|
|
627
|
+
## Core Capabilities
|
|
628
|
+
- Feature implementation
|
|
629
|
+
- Code refactoring
|
|
630
|
+
- Bug fixes
|
|
631
|
+
- API development
|
|
632
|
+
- Algorithm implementation
|
|
633
|
+
|
|
634
|
+
## Batch Operations
|
|
635
|
+
- Parallel file creation
|
|
636
|
+
- Concurrent code modifications
|
|
637
|
+
- Batch import updates
|
|
638
|
+
- Test file generation
|
|
639
|
+
- Documentation updates
|
|
640
|
+
|
|
641
|
+
## Code Quality
|
|
642
|
+
- ES2022 standards
|
|
643
|
+
- Type safety with TypeScript
|
|
644
|
+
- Comprehensive error handling
|
|
645
|
+
- Performance optimization
|
|
646
|
+
- Security best practices
|
|
647
|
+
`;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
function createDebuggerMode() {
|
|
651
|
+
return `# SPARC Debugger Mode
|
|
652
|
+
|
|
653
|
+
## Purpose
|
|
654
|
+
Systematic debugging with TodoWrite and Memory integration.
|
|
655
|
+
|
|
656
|
+
## Activation
|
|
657
|
+
|
|
658
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
659
|
+
\`\`\`javascript
|
|
660
|
+
mcp__claude-flow__sparc_mode {
|
|
661
|
+
mode: "debugger",
|
|
662
|
+
task_description: "fix authentication issues",
|
|
663
|
+
options: {
|
|
664
|
+
verbose: true,
|
|
665
|
+
trace: true
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
\`\`\`
|
|
669
|
+
|
|
670
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
671
|
+
\`\`\`bash
|
|
672
|
+
# Use when running from terminal or MCP tools unavailable
|
|
673
|
+
npx claude-flow sparc run debugger "fix authentication issues"
|
|
674
|
+
|
|
675
|
+
# For alpha features
|
|
676
|
+
npx claude-flow@alpha sparc run debugger "fix authentication issues"
|
|
677
|
+
\`\`\`
|
|
678
|
+
|
|
679
|
+
### Option 3: Local Installation
|
|
680
|
+
\`\`\`bash
|
|
681
|
+
# If claude-flow is installed locally
|
|
682
|
+
./claude-flow sparc run debugger "fix authentication issues"
|
|
683
|
+
\`\`\`
|
|
684
|
+
|
|
685
|
+
## Core Capabilities
|
|
686
|
+
- Issue reproduction
|
|
687
|
+
- Root cause analysis
|
|
688
|
+
- Stack trace analysis
|
|
689
|
+
- Memory leak detection
|
|
690
|
+
- Performance bottleneck identification
|
|
691
|
+
|
|
692
|
+
## Debugging Workflow
|
|
693
|
+
1. Create debugging plan with TodoWrite
|
|
694
|
+
2. Systematic issue investigation
|
|
695
|
+
3. Store findings in Memory
|
|
696
|
+
4. Track fix progress
|
|
697
|
+
5. Verify resolution
|
|
698
|
+
|
|
699
|
+
## Tools Integration
|
|
700
|
+
- Error log analysis
|
|
701
|
+
- Breakpoint simulation
|
|
702
|
+
- Variable inspection
|
|
703
|
+
- Call stack tracing
|
|
704
|
+
- Memory profiling
|
|
705
|
+
`;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
function createDesignerMode() {
|
|
709
|
+
return `# SPARC Designer Mode
|
|
710
|
+
|
|
711
|
+
## Purpose
|
|
712
|
+
UI/UX design with Memory coordination for consistent experiences.
|
|
713
|
+
|
|
714
|
+
## Activation
|
|
715
|
+
|
|
716
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
717
|
+
\`\`\`javascript
|
|
718
|
+
mcp__claude-flow__sparc_mode {
|
|
719
|
+
mode: "designer",
|
|
720
|
+
task_description: "create dashboard UI",
|
|
721
|
+
options: {
|
|
722
|
+
design_system: true,
|
|
723
|
+
responsive: true
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
\`\`\`
|
|
727
|
+
|
|
728
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
729
|
+
\`\`\`bash
|
|
730
|
+
# Use when running from terminal or MCP tools unavailable
|
|
731
|
+
npx claude-flow sparc run designer "create dashboard UI"
|
|
732
|
+
|
|
733
|
+
# For alpha features
|
|
734
|
+
npx claude-flow@alpha sparc run designer "create dashboard UI"
|
|
735
|
+
\`\`\`
|
|
736
|
+
|
|
737
|
+
### Option 3: Local Installation
|
|
738
|
+
\`\`\`bash
|
|
739
|
+
# If claude-flow is installed locally
|
|
740
|
+
./claude-flow sparc run designer "create dashboard UI"
|
|
741
|
+
\`\`\`
|
|
742
|
+
|
|
743
|
+
## Core Capabilities
|
|
744
|
+
- Interface design
|
|
745
|
+
- Component architecture
|
|
746
|
+
- Design system creation
|
|
747
|
+
- Accessibility planning
|
|
748
|
+
- Responsive layouts
|
|
749
|
+
|
|
750
|
+
## Design Process
|
|
751
|
+
- User research insights
|
|
752
|
+
- Wireframe creation
|
|
753
|
+
- Component design
|
|
754
|
+
- Interaction patterns
|
|
755
|
+
- Design token management
|
|
756
|
+
|
|
757
|
+
## Memory Coordination
|
|
758
|
+
- Store design decisions
|
|
759
|
+
- Share component specs
|
|
760
|
+
- Maintain consistency
|
|
761
|
+
- Track design evolution
|
|
762
|
+
`;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
function createDocumenterMode() {
|
|
766
|
+
return `# SPARC Documenter Mode
|
|
767
|
+
|
|
768
|
+
## Purpose
|
|
769
|
+
Documentation with batch file operations for comprehensive docs.
|
|
770
|
+
|
|
771
|
+
## Activation
|
|
772
|
+
|
|
773
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
774
|
+
\`\`\`javascript
|
|
775
|
+
mcp__claude-flow__sparc_mode {
|
|
776
|
+
mode: "documenter",
|
|
777
|
+
task_description: "create API documentation",
|
|
778
|
+
options: {
|
|
779
|
+
format: "markdown",
|
|
780
|
+
include_examples: true
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
\`\`\`
|
|
784
|
+
|
|
785
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
786
|
+
\`\`\`bash
|
|
787
|
+
# Use when running from terminal or MCP tools unavailable
|
|
788
|
+
npx claude-flow sparc run documenter "create API documentation"
|
|
789
|
+
|
|
790
|
+
# For alpha features
|
|
791
|
+
npx claude-flow@alpha sparc run documenter "create API documentation"
|
|
792
|
+
\`\`\`
|
|
793
|
+
|
|
794
|
+
### Option 3: Local Installation
|
|
795
|
+
\`\`\`bash
|
|
796
|
+
# If claude-flow is installed locally
|
|
797
|
+
./claude-flow sparc run documenter "create API documentation"
|
|
798
|
+
\`\`\`
|
|
799
|
+
|
|
800
|
+
## Core Capabilities
|
|
801
|
+
- API documentation
|
|
802
|
+
- Code documentation
|
|
803
|
+
- User guides
|
|
804
|
+
- Architecture docs
|
|
805
|
+
- README files
|
|
806
|
+
|
|
807
|
+
## Documentation Types
|
|
808
|
+
- Markdown documentation
|
|
809
|
+
- JSDoc comments
|
|
810
|
+
- API specifications
|
|
811
|
+
- Integration guides
|
|
812
|
+
- Deployment docs
|
|
813
|
+
|
|
814
|
+
## Batch Features
|
|
815
|
+
- Parallel doc generation
|
|
816
|
+
- Bulk file updates
|
|
817
|
+
- Cross-reference management
|
|
818
|
+
- Example generation
|
|
819
|
+
- Diagram creation
|
|
820
|
+
`;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
function createInnovatorMode() {
|
|
824
|
+
return `# SPARC Innovator Mode
|
|
825
|
+
|
|
826
|
+
## Purpose
|
|
827
|
+
Creative problem solving with WebSearch and Memory integration.
|
|
828
|
+
|
|
829
|
+
## Activation
|
|
830
|
+
|
|
831
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
832
|
+
\`\`\`javascript
|
|
833
|
+
mcp__claude-flow__sparc_mode {
|
|
834
|
+
mode: "innovator",
|
|
835
|
+
task_description: "innovative solutions for scaling",
|
|
836
|
+
options: {
|
|
837
|
+
research_depth: "comprehensive",
|
|
838
|
+
creativity_level: "high"
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
\`\`\`
|
|
842
|
+
|
|
843
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
844
|
+
\`\`\`bash
|
|
845
|
+
# Use when running from terminal or MCP tools unavailable
|
|
846
|
+
npx claude-flow sparc run innovator "innovative solutions for scaling"
|
|
847
|
+
|
|
848
|
+
# For alpha features
|
|
849
|
+
npx claude-flow@alpha sparc run innovator "innovative solutions for scaling"
|
|
850
|
+
\`\`\`
|
|
851
|
+
|
|
852
|
+
### Option 3: Local Installation
|
|
853
|
+
\`\`\`bash
|
|
854
|
+
# If claude-flow is installed locally
|
|
855
|
+
./claude-flow sparc run innovator "innovative solutions for scaling"
|
|
856
|
+
\`\`\`
|
|
857
|
+
|
|
858
|
+
## Core Capabilities
|
|
859
|
+
- Creative ideation
|
|
860
|
+
- Solution brainstorming
|
|
861
|
+
- Technology exploration
|
|
862
|
+
- Pattern innovation
|
|
863
|
+
- Proof of concept
|
|
864
|
+
|
|
865
|
+
## Innovation Process
|
|
866
|
+
- Divergent thinking phase
|
|
867
|
+
- Research and exploration
|
|
868
|
+
- Convergent synthesis
|
|
869
|
+
- Prototype planning
|
|
870
|
+
- Feasibility analysis
|
|
871
|
+
|
|
872
|
+
## Knowledge Sources
|
|
873
|
+
- WebSearch for trends
|
|
874
|
+
- Memory for context
|
|
875
|
+
- Cross-domain insights
|
|
876
|
+
- Pattern recognition
|
|
877
|
+
- Analogical reasoning
|
|
878
|
+
`;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
function createMemoryManagerMode() {
|
|
882
|
+
return `# SPARC Memory Manager Mode
|
|
883
|
+
|
|
884
|
+
## Purpose
|
|
885
|
+
Knowledge management with Memory tools for persistent insights.
|
|
886
|
+
|
|
887
|
+
## Activation
|
|
888
|
+
|
|
889
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
890
|
+
\`\`\`javascript
|
|
891
|
+
mcp__claude-flow__sparc_mode {
|
|
892
|
+
mode: "memory-manager",
|
|
893
|
+
task_description: "organize project knowledge",
|
|
894
|
+
options: {
|
|
895
|
+
namespace: "project",
|
|
896
|
+
auto_organize: true
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
\`\`\`
|
|
900
|
+
|
|
901
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
902
|
+
\`\`\`bash
|
|
903
|
+
# Use when running from terminal or MCP tools unavailable
|
|
904
|
+
npx claude-flow sparc run memory-manager "organize project knowledge"
|
|
905
|
+
|
|
906
|
+
# For alpha features
|
|
907
|
+
npx claude-flow@alpha sparc run memory-manager "organize project knowledge"
|
|
908
|
+
\`\`\`
|
|
909
|
+
|
|
910
|
+
### Option 3: Local Installation
|
|
911
|
+
\`\`\`bash
|
|
912
|
+
# If claude-flow is installed locally
|
|
913
|
+
./claude-flow sparc run memory-manager "organize project knowledge"
|
|
914
|
+
\`\`\`
|
|
915
|
+
|
|
916
|
+
## Core Capabilities
|
|
917
|
+
- Knowledge organization
|
|
918
|
+
- Information retrieval
|
|
919
|
+
- Context management
|
|
920
|
+
- Insight preservation
|
|
921
|
+
- Cross-session persistence
|
|
922
|
+
|
|
923
|
+
## Memory Strategies
|
|
924
|
+
- Hierarchical organization
|
|
925
|
+
- Tag-based categorization
|
|
926
|
+
- Temporal tracking
|
|
927
|
+
- Relationship mapping
|
|
928
|
+
- Priority management
|
|
929
|
+
|
|
930
|
+
## Knowledge Operations
|
|
931
|
+
- Store critical insights
|
|
932
|
+
- Retrieve relevant context
|
|
933
|
+
- Update knowledge base
|
|
934
|
+
- Merge related information
|
|
935
|
+
- Archive obsolete data
|
|
936
|
+
`;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
function createOptimizerMode() {
|
|
940
|
+
return `# SPARC Optimizer Mode
|
|
941
|
+
|
|
942
|
+
## Purpose
|
|
943
|
+
Performance optimization with systematic analysis and improvements.
|
|
944
|
+
|
|
945
|
+
## Activation
|
|
946
|
+
|
|
947
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
948
|
+
\`\`\`javascript
|
|
949
|
+
mcp__claude-flow__sparc_mode {
|
|
950
|
+
mode: "optimizer",
|
|
951
|
+
task_description: "optimize application performance",
|
|
952
|
+
options: {
|
|
953
|
+
profile: true,
|
|
954
|
+
benchmark: true
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
\`\`\`
|
|
958
|
+
|
|
959
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
960
|
+
\`\`\`bash
|
|
961
|
+
# Use when running from terminal or MCP tools unavailable
|
|
962
|
+
npx claude-flow sparc run optimizer "optimize application performance"
|
|
963
|
+
|
|
964
|
+
# For alpha features
|
|
965
|
+
npx claude-flow@alpha sparc run optimizer "optimize application performance"
|
|
966
|
+
\`\`\`
|
|
967
|
+
|
|
968
|
+
### Option 3: Local Installation
|
|
969
|
+
\`\`\`bash
|
|
970
|
+
# If claude-flow is installed locally
|
|
971
|
+
./claude-flow sparc run optimizer "optimize application performance"
|
|
972
|
+
\`\`\`
|
|
973
|
+
|
|
974
|
+
## Core Capabilities
|
|
975
|
+
- Performance profiling
|
|
976
|
+
- Code optimization
|
|
977
|
+
- Resource optimization
|
|
978
|
+
- Algorithm improvement
|
|
979
|
+
- Scalability enhancement
|
|
980
|
+
|
|
981
|
+
## Optimization Areas
|
|
982
|
+
- Execution speed
|
|
983
|
+
- Memory usage
|
|
984
|
+
- Network efficiency
|
|
985
|
+
- Database queries
|
|
986
|
+
- Bundle size
|
|
987
|
+
|
|
988
|
+
## Systematic Approach
|
|
989
|
+
1. Baseline measurement
|
|
990
|
+
2. Bottleneck identification
|
|
991
|
+
3. Optimization implementation
|
|
992
|
+
4. Impact verification
|
|
993
|
+
5. Continuous monitoring
|
|
994
|
+
`;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
function createOrchestratorMode() {
|
|
998
|
+
return `# SPARC Orchestrator Mode
|
|
999
|
+
|
|
1000
|
+
## Purpose
|
|
1001
|
+
Multi-agent task orchestration with TodoWrite/TodoRead/Task/Memory.
|
|
1002
|
+
|
|
1003
|
+
## Activation
|
|
1004
|
+
|
|
1005
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
1006
|
+
\`\`\`javascript
|
|
1007
|
+
mcp__claude-flow__sparc_mode {
|
|
1008
|
+
mode: "orchestrator",
|
|
1009
|
+
task_description: "coordinate feature development",
|
|
1010
|
+
options: {
|
|
1011
|
+
parallel: true,
|
|
1012
|
+
monitor: true
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
\`\`\`
|
|
1016
|
+
|
|
1017
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
1018
|
+
\`\`\`bash
|
|
1019
|
+
# Use when running from terminal or MCP tools unavailable
|
|
1020
|
+
npx claude-flow sparc run orchestrator "coordinate feature development"
|
|
1021
|
+
|
|
1022
|
+
# For alpha features
|
|
1023
|
+
npx claude-flow@alpha sparc run orchestrator "coordinate feature development"
|
|
1024
|
+
\`\`\`
|
|
1025
|
+
|
|
1026
|
+
### Option 3: Local Installation
|
|
1027
|
+
\`\`\`bash
|
|
1028
|
+
# If claude-flow is installed locally
|
|
1029
|
+
./claude-flow sparc run orchestrator "coordinate feature development"
|
|
1030
|
+
\`\`\`
|
|
1031
|
+
|
|
1032
|
+
## Core Capabilities
|
|
1033
|
+
- Task decomposition
|
|
1034
|
+
- Agent coordination
|
|
1035
|
+
- Resource allocation
|
|
1036
|
+
- Progress tracking
|
|
1037
|
+
- Result synthesis
|
|
1038
|
+
|
|
1039
|
+
## Orchestration Patterns
|
|
1040
|
+
- Hierarchical coordination
|
|
1041
|
+
- Parallel execution
|
|
1042
|
+
- Sequential pipelines
|
|
1043
|
+
- Event-driven flows
|
|
1044
|
+
- Adaptive strategies
|
|
1045
|
+
|
|
1046
|
+
## Coordination Tools
|
|
1047
|
+
- TodoWrite for planning
|
|
1048
|
+
- Task for agent launch
|
|
1049
|
+
- Memory for sharing
|
|
1050
|
+
- Progress monitoring
|
|
1051
|
+
- Result aggregation
|
|
1052
|
+
`;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
function createResearcherMode() {
|
|
1056
|
+
return `# SPARC Researcher Mode
|
|
1057
|
+
|
|
1058
|
+
## Purpose
|
|
1059
|
+
Deep research with parallel WebSearch/WebFetch and Memory coordination.
|
|
1060
|
+
|
|
1061
|
+
## Activation
|
|
1062
|
+
|
|
1063
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
1064
|
+
\`\`\`javascript
|
|
1065
|
+
mcp__claude-flow__sparc_mode {
|
|
1066
|
+
mode: "researcher",
|
|
1067
|
+
task_description: "research AI trends 2024",
|
|
1068
|
+
options: {
|
|
1069
|
+
depth: "comprehensive",
|
|
1070
|
+
sources: ["academic", "industry", "news"]
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
\`\`\`
|
|
1074
|
+
|
|
1075
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
1076
|
+
\`\`\`bash
|
|
1077
|
+
# Use when running from terminal or MCP tools unavailable
|
|
1078
|
+
npx claude-flow sparc run researcher "research AI trends 2024"
|
|
1079
|
+
|
|
1080
|
+
# For alpha features
|
|
1081
|
+
npx claude-flow@alpha sparc run researcher "research AI trends 2024"
|
|
1082
|
+
\`\`\`
|
|
1083
|
+
|
|
1084
|
+
### Option 3: Local Installation
|
|
1085
|
+
\`\`\`bash
|
|
1086
|
+
# If claude-flow is installed locally
|
|
1087
|
+
./claude-flow sparc run researcher "research AI trends 2024"
|
|
1088
|
+
\`\`\`
|
|
1089
|
+
|
|
1090
|
+
## Core Capabilities
|
|
1091
|
+
- Information gathering
|
|
1092
|
+
- Source evaluation
|
|
1093
|
+
- Trend analysis
|
|
1094
|
+
- Competitive research
|
|
1095
|
+
- Technology assessment
|
|
1096
|
+
|
|
1097
|
+
## Research Methods
|
|
1098
|
+
- Parallel web searches
|
|
1099
|
+
- Academic paper analysis
|
|
1100
|
+
- Industry report synthesis
|
|
1101
|
+
- Expert opinion gathering
|
|
1102
|
+
- Data compilation
|
|
1103
|
+
|
|
1104
|
+
## Memory Integration
|
|
1105
|
+
- Store research findings
|
|
1106
|
+
- Build knowledge graphs
|
|
1107
|
+
- Track information sources
|
|
1108
|
+
- Cross-reference insights
|
|
1109
|
+
- Maintain research history
|
|
1110
|
+
`;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
function createReviewerMode() {
|
|
1114
|
+
return `# SPARC Reviewer Mode
|
|
1115
|
+
|
|
1116
|
+
## Purpose
|
|
1117
|
+
Code review using batch file analysis for comprehensive reviews.
|
|
1118
|
+
|
|
1119
|
+
## Activation
|
|
1120
|
+
|
|
1121
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
1122
|
+
\`\`\`javascript
|
|
1123
|
+
mcp__claude-flow__sparc_mode {
|
|
1124
|
+
mode: "reviewer",
|
|
1125
|
+
task_description: "review pull request #123",
|
|
1126
|
+
options: {
|
|
1127
|
+
security_check: true,
|
|
1128
|
+
performance_check: true
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
\`\`\`
|
|
1132
|
+
|
|
1133
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
1134
|
+
\`\`\`bash
|
|
1135
|
+
# Use when running from terminal or MCP tools unavailable
|
|
1136
|
+
npx claude-flow sparc run reviewer "review pull request #123"
|
|
1137
|
+
|
|
1138
|
+
# For alpha features
|
|
1139
|
+
npx claude-flow@alpha sparc run reviewer "review pull request #123"
|
|
1140
|
+
\`\`\`
|
|
1141
|
+
|
|
1142
|
+
### Option 3: Local Installation
|
|
1143
|
+
\`\`\`bash
|
|
1144
|
+
# If claude-flow is installed locally
|
|
1145
|
+
./claude-flow sparc run reviewer "review pull request #123"
|
|
1146
|
+
\`\`\`
|
|
1147
|
+
|
|
1148
|
+
## Core Capabilities
|
|
1149
|
+
- Code quality assessment
|
|
1150
|
+
- Security review
|
|
1151
|
+
- Performance analysis
|
|
1152
|
+
- Best practices check
|
|
1153
|
+
- Documentation review
|
|
1154
|
+
|
|
1155
|
+
## Review Criteria
|
|
1156
|
+
- Code correctness
|
|
1157
|
+
- Design patterns
|
|
1158
|
+
- Error handling
|
|
1159
|
+
- Test coverage
|
|
1160
|
+
- Maintainability
|
|
1161
|
+
|
|
1162
|
+
## Batch Analysis
|
|
1163
|
+
- Parallel file review
|
|
1164
|
+
- Pattern detection
|
|
1165
|
+
- Dependency checking
|
|
1166
|
+
- Consistency validation
|
|
1167
|
+
- Automated reporting
|
|
1168
|
+
`;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
function createSwarmCoordinatorMode() {
|
|
1172
|
+
return `# SPARC Swarm Coordinator Mode
|
|
1173
|
+
|
|
1174
|
+
## Purpose
|
|
1175
|
+
Specialized swarm management with batch coordination capabilities.
|
|
1176
|
+
|
|
1177
|
+
## Activation
|
|
1178
|
+
|
|
1179
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
1180
|
+
\`\`\`javascript
|
|
1181
|
+
mcp__claude-flow__sparc_mode {
|
|
1182
|
+
mode: "swarm-coordinator",
|
|
1183
|
+
task_description: "manage development swarm",
|
|
1184
|
+
options: {
|
|
1185
|
+
topology: "hierarchical",
|
|
1186
|
+
max_agents: 10
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
\`\`\`
|
|
1190
|
+
|
|
1191
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
1192
|
+
\`\`\`bash
|
|
1193
|
+
# Use when running from terminal or MCP tools unavailable
|
|
1194
|
+
npx claude-flow sparc run swarm-coordinator "manage development swarm"
|
|
1195
|
+
|
|
1196
|
+
# For alpha features
|
|
1197
|
+
npx claude-flow@alpha sparc run swarm-coordinator "manage development swarm"
|
|
1198
|
+
\`\`\`
|
|
1199
|
+
|
|
1200
|
+
### Option 3: Local Installation
|
|
1201
|
+
\`\`\`bash
|
|
1202
|
+
# If claude-flow is installed locally
|
|
1203
|
+
./claude-flow sparc run swarm-coordinator "manage development swarm"
|
|
1204
|
+
\`\`\`
|
|
1205
|
+
|
|
1206
|
+
## Core Capabilities
|
|
1207
|
+
- Swarm initialization
|
|
1208
|
+
- Agent management
|
|
1209
|
+
- Task distribution
|
|
1210
|
+
- Load balancing
|
|
1211
|
+
- Result collection
|
|
1212
|
+
|
|
1213
|
+
## Coordination Modes
|
|
1214
|
+
- Hierarchical swarms
|
|
1215
|
+
- Mesh networks
|
|
1216
|
+
- Pipeline coordination
|
|
1217
|
+
- Adaptive strategies
|
|
1218
|
+
- Hybrid approaches
|
|
1219
|
+
|
|
1220
|
+
## Management Features
|
|
1221
|
+
- Dynamic scaling
|
|
1222
|
+
- Resource optimization
|
|
1223
|
+
- Failure recovery
|
|
1224
|
+
- Performance monitoring
|
|
1225
|
+
- Quality assurance
|
|
1226
|
+
`;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
function createTddMode() {
|
|
1230
|
+
return `# SPARC TDD Mode
|
|
1231
|
+
|
|
1232
|
+
## Purpose
|
|
1233
|
+
Test-driven development with TodoWrite planning and comprehensive testing.
|
|
1234
|
+
|
|
1235
|
+
## Activation
|
|
1236
|
+
|
|
1237
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
1238
|
+
\`\`\`javascript
|
|
1239
|
+
mcp__claude-flow__sparc_mode {
|
|
1240
|
+
mode: "tdd",
|
|
1241
|
+
task_description: "shopping cart feature",
|
|
1242
|
+
options: {
|
|
1243
|
+
coverage_target: 90,
|
|
1244
|
+
test_framework: "jest"
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
\`\`\`
|
|
1248
|
+
|
|
1249
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
1250
|
+
\`\`\`bash
|
|
1251
|
+
# Use when running from terminal or MCP tools unavailable
|
|
1252
|
+
npx claude-flow sparc run tdd "shopping cart feature"
|
|
1253
|
+
|
|
1254
|
+
# For alpha features
|
|
1255
|
+
npx claude-flow@alpha sparc run tdd "shopping cart feature"
|
|
1256
|
+
\`\`\`
|
|
1257
|
+
|
|
1258
|
+
### Option 3: Local Installation
|
|
1259
|
+
\`\`\`bash
|
|
1260
|
+
# If claude-flow is installed locally
|
|
1261
|
+
./claude-flow sparc run tdd "shopping cart feature"
|
|
1262
|
+
\`\`\`
|
|
1263
|
+
|
|
1264
|
+
## Core Capabilities
|
|
1265
|
+
- Test-first development
|
|
1266
|
+
- Red-green-refactor cycle
|
|
1267
|
+
- Test suite design
|
|
1268
|
+
- Coverage optimization
|
|
1269
|
+
- Continuous testing
|
|
1270
|
+
|
|
1271
|
+
## TDD Workflow
|
|
1272
|
+
1. Write failing tests
|
|
1273
|
+
2. Implement minimum code
|
|
1274
|
+
3. Make tests pass
|
|
1275
|
+
4. Refactor code
|
|
1276
|
+
5. Repeat cycle
|
|
1277
|
+
|
|
1278
|
+
## Testing Strategies
|
|
1279
|
+
- Unit testing
|
|
1280
|
+
- Integration testing
|
|
1281
|
+
- End-to-end testing
|
|
1282
|
+
- Performance testing
|
|
1283
|
+
- Security testing
|
|
1284
|
+
`;
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
function createTesterMode() {
|
|
1288
|
+
return `# SPARC Tester Mode
|
|
1289
|
+
|
|
1290
|
+
## Purpose
|
|
1291
|
+
Comprehensive testing with parallel execution capabilities.
|
|
1292
|
+
|
|
1293
|
+
## Activation
|
|
1294
|
+
|
|
1295
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
1296
|
+
\`\`\`javascript
|
|
1297
|
+
mcp__claude-flow__sparc_mode {
|
|
1298
|
+
mode: "tester",
|
|
1299
|
+
task_description: "full regression suite",
|
|
1300
|
+
options: {
|
|
1301
|
+
parallel: true,
|
|
1302
|
+
coverage: true
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
\`\`\`
|
|
1306
|
+
|
|
1307
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
1308
|
+
\`\`\`bash
|
|
1309
|
+
# Use when running from terminal or MCP tools unavailable
|
|
1310
|
+
npx claude-flow sparc run tester "full regression suite"
|
|
1311
|
+
|
|
1312
|
+
# For alpha features
|
|
1313
|
+
npx claude-flow@alpha sparc run tester "full regression suite"
|
|
1314
|
+
\`\`\`
|
|
1315
|
+
|
|
1316
|
+
### Option 3: Local Installation
|
|
1317
|
+
\`\`\`bash
|
|
1318
|
+
# If claude-flow is installed locally
|
|
1319
|
+
./claude-flow sparc run tester "full regression suite"
|
|
1320
|
+
\`\`\`
|
|
1321
|
+
|
|
1322
|
+
## Core Capabilities
|
|
1323
|
+
- Test planning
|
|
1324
|
+
- Test execution
|
|
1325
|
+
- Bug detection
|
|
1326
|
+
- Coverage analysis
|
|
1327
|
+
- Report generation
|
|
1328
|
+
|
|
1329
|
+
## Test Types
|
|
1330
|
+
- Unit tests
|
|
1331
|
+
- Integration tests
|
|
1332
|
+
- E2E tests
|
|
1333
|
+
- Performance tests
|
|
1334
|
+
- Security tests
|
|
1335
|
+
|
|
1336
|
+
## Parallel Features
|
|
1337
|
+
- Concurrent test runs
|
|
1338
|
+
- Distributed testing
|
|
1339
|
+
- Load testing
|
|
1340
|
+
- Cross-browser testing
|
|
1341
|
+
- Multi-environment validation
|
|
1342
|
+
`;
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
function createWorkflowManagerMode() {
|
|
1346
|
+
return `# SPARC Workflow Manager Mode
|
|
1347
|
+
|
|
1348
|
+
## Purpose
|
|
1349
|
+
Process automation with TodoWrite planning and Task execution.
|
|
1350
|
+
|
|
1351
|
+
## Activation
|
|
1352
|
+
|
|
1353
|
+
### Option 1: Using MCP Tools (Preferred in Claude Code)
|
|
1354
|
+
\`\`\`javascript
|
|
1355
|
+
mcp__claude-flow__sparc_mode {
|
|
1356
|
+
mode: "workflow-manager",
|
|
1357
|
+
task_description: "automate deployment",
|
|
1358
|
+
options: {
|
|
1359
|
+
pipeline: "ci-cd",
|
|
1360
|
+
rollback_enabled: true
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
\`\`\`
|
|
1364
|
+
|
|
1365
|
+
### Option 2: Using NPX CLI (Fallback when MCP not available)
|
|
1366
|
+
\`\`\`bash
|
|
1367
|
+
# Use when running from terminal or MCP tools unavailable
|
|
1368
|
+
npx claude-flow sparc run workflow-manager "automate deployment"
|
|
1369
|
+
|
|
1370
|
+
# For alpha features
|
|
1371
|
+
npx claude-flow@alpha sparc run workflow-manager "automate deployment"
|
|
1372
|
+
\`\`\`
|
|
1373
|
+
|
|
1374
|
+
### Option 3: Local Installation
|
|
1375
|
+
\`\`\`bash
|
|
1376
|
+
# If claude-flow is installed locally
|
|
1377
|
+
./claude-flow sparc run workflow-manager "automate deployment"
|
|
1378
|
+
\`\`\`
|
|
1379
|
+
|
|
1380
|
+
## Core Capabilities
|
|
1381
|
+
- Workflow design
|
|
1382
|
+
- Process automation
|
|
1383
|
+
- Pipeline creation
|
|
1384
|
+
- Event handling
|
|
1385
|
+
- State management
|
|
1386
|
+
|
|
1387
|
+
## Workflow Patterns
|
|
1388
|
+
- Sequential flows
|
|
1389
|
+
- Parallel branches
|
|
1390
|
+
- Conditional logic
|
|
1391
|
+
- Loop iterations
|
|
1392
|
+
- Error handling
|
|
1393
|
+
|
|
1394
|
+
## Automation Features
|
|
1395
|
+
- Trigger management
|
|
1396
|
+
- Task scheduling
|
|
1397
|
+
- Progress tracking
|
|
1398
|
+
- Result validation
|
|
1399
|
+
- Rollback capability
|
|
1400
|
+
`;
|
|
1401
|
+
}
|