claude-flow-novice 1.3.6 → 1.5.1
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/agents/analysis/code-analyzer.md +3 -20
- package/.claude/agents/analysis/code-review/analyze-code-quality.md +1 -1
- package/.claude/agents/analyst.md +208 -550
- package/.claude/agents/architect.md +136 -469
- package/.claude/agents/architecture/system-architect.md +20 -1
- package/.claude/agents/architecture/system-design/arch-system-design.md +1 -1
- package/.claude/agents/base-template-generator.md +24 -1
- package/.claude/agents/coder.md +87 -303
- package/.claude/agents/consensus/byzantine-coordinator.md +4 -21
- package/.claude/agents/consensus/consensus-builder.md +3 -20
- package/.claude/agents/consensus/crdt-synchronizer.md +4 -21
- package/.claude/agents/consensus/gossip-coordinator.md +4 -21
- package/.claude/agents/consensus/performance-benchmarker.md +4 -21
- package/.claude/agents/consensus/quorum-manager.md +4 -21
- package/.claude/agents/consensus/raft-manager.md +4 -21
- package/.claude/agents/consensus/security-manager.md +4 -21
- package/.claude/agents/coordinator.md +22 -11
- package/.claude/agents/data/ml/data-ml-model.md +2 -2
- package/.claude/agents/development/backend/dev-backend-api.md +2 -2
- package/.claude/agents/devops/ci-cd/ops-cicd-github.md +2 -2
- package/.claude/agents/devops/devops-engineer.md +134 -402
- package/.claude/agents/documentation/api-docs/docs-api-openapi.md +2 -2
- package/.claude/agents/github/code-review-swarm.md +1 -1
- package/.claude/agents/github/github-specialist.md +856 -0
- package/.claude/agents/github/pr-manager.md +1 -1
- package/.claude/agents/github/release-manager.md +1 -1
- package/.claude/agents/neural/neural-pattern-agent.md +762 -0
- package/.claude/agents/optimization/benchmark-suite.md +1 -1
- package/.claude/agents/optimization/perf-analyzer.md +1 -1
- package/.claude/agents/optimization/performance-monitor.md +1 -1
- package/.claude/agents/planner.md +135 -0
- package/.claude/agents/researcher.md +22 -9
- package/.claude/agents/reviewer.md +291 -0
- package/.claude/agents/security/security-specialist.md +1 -1
- package/.claude/agents/sparc/architecture.md +1 -1
- package/.claude/agents/sparc/pseudocode.md +1 -1
- package/.claude/agents/sparc/refinement.md +1 -1
- package/.claude/agents/sparc/specification.md +1 -1
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +2 -2
- package/.claude/agents/tester.md +21 -11
- package/.claude/agents/testing/unit/tdd-london-swarm.md +1 -1
- package/.claude/agents/testing/validation/production-validator.md +1 -1
- package/.claude/commands/claude-soul.js +1 -1
- package/.claude/commands/fullstack.md +134 -0
- package/.claude/commands/index.js +4 -0
- package/.claude/hooks.json +12 -15
- package/{.claude → .claude-flow-novice/.claude}/agents/MIGRATION_SUMMARY.md +1 -1
- package/.claude-flow-novice/.claude/agents/analysis/code-analyzer.md +192 -0
- package/.claude-flow-novice/.claude/agents/analysis/code-review/analyze-code-quality.md +180 -0
- package/.claude-flow-novice/.claude/agents/analyst.md +300 -0
- package/.claude-flow-novice/.claude/agents/architect.md +557 -0
- package/.claude-flow-novice/.claude/agents/architecture/system-architect.md +630 -0
- package/.claude-flow-novice/.claude/agents/architecture/system-design/arch-system-design.md +156 -0
- package/.claude-flow-novice/.claude/agents/base-template-generator.md +65 -0
- package/.claude-flow-novice/.claude/agents/coder.md +180 -0
- package/.claude-flow-novice/.claude/agents/consensus/byzantine-coordinator.md +46 -0
- package/.claude-flow-novice/.claude/agents/consensus/consensus-builder.md +225 -0
- package/.claude-flow-novice/.claude/agents/consensus/crdt-synchronizer.md +980 -0
- package/.claude-flow-novice/.claude/agents/consensus/gossip-coordinator.md +46 -0
- package/.claude-flow-novice/.claude/agents/consensus/performance-benchmarker.md +834 -0
- package/.claude-flow-novice/.claude/agents/consensus/quorum-manager.md +806 -0
- package/.claude-flow-novice/.claude/agents/consensus/raft-manager.md +46 -0
- package/.claude-flow-novice/.claude/agents/consensus/security-manager.md +605 -0
- package/.claude-flow-novice/.claude/agents/coordinator.md +842 -0
- package/.claude-flow-novice/.claude/agents/data/ml/data-ml-model.md +193 -0
- package/.claude-flow-novice/.claude/agents/development/backend/dev-backend-api.md +142 -0
- package/.claude-flow-novice/.claude/agents/devops/ci-cd/ops-cicd-github.md +164 -0
- package/.claude-flow-novice/.claude/agents/devops/devops-engineer.md +638 -0
- package/.claude-flow-novice/.claude/agents/documentation/api-docs/docs-api-openapi.md +174 -0
- package/.claude-flow-novice/.claude/agents/github/code-review-swarm.md +538 -0
- package/.claude-flow-novice/.claude/agents/github/github-modes.md +173 -0
- package/.claude-flow-novice/.claude/agents/github/github-specialist.md +856 -0
- package/.claude-flow-novice/.claude/agents/github/issue-tracker.md +319 -0
- package/.claude-flow-novice/.claude/agents/github/multi-repo-swarm.md +553 -0
- package/.claude-flow-novice/.claude/agents/github/pr-manager.md +191 -0
- package/.claude-flow-novice/.claude/agents/github/project-board-sync.md +509 -0
- package/.claude-flow-novice/.claude/agents/github/release-manager.md +367 -0
- package/.claude-flow-novice/.claude/agents/github/release-swarm.md +583 -0
- package/.claude-flow-novice/.claude/agents/github/repo-architect.md +398 -0
- package/.claude-flow-novice/.claude/agents/github/swarm-issue.md +573 -0
- package/.claude-flow-novice/.claude/agents/github/swarm-pr.md +428 -0
- package/.claude-flow-novice/.claude/agents/github/sync-coordinator.md +452 -0
- package/.claude-flow-novice/.claude/agents/github/workflow-automation.md +635 -0
- package/.claude-flow-novice/.claude/agents/goal/goal-planner.md +73 -0
- package/.claude-flow-novice/.claude/agents/neural/neural-pattern-agent.md +762 -0
- package/.claude-flow-novice/.claude/agents/neural/safla-neural.md +74 -0
- package/.claude-flow-novice/.claude/agents/optimization/benchmark-suite.md +665 -0
- package/.claude-flow-novice/.claude/agents/optimization/load-balancer.md +431 -0
- package/.claude-flow-novice/.claude/agents/optimization/perf-analyzer.md +725 -0
- package/.claude-flow-novice/.claude/agents/optimization/performance-monitor.md +672 -0
- package/.claude-flow-novice/.claude/agents/optimization/resource-allocator.md +674 -0
- package/.claude-flow-novice/.claude/agents/optimization/topology-optimizer.md +808 -0
- package/.claude-flow-novice/.claude/agents/planner.md +135 -0
- package/.claude-flow-novice/.claude/agents/researcher.md +185 -0
- package/.claude-flow-novice/.claude/agents/reviewer.md +291 -0
- package/.claude-flow-novice/.claude/agents/security/security-specialist.md +978 -0
- package/.claude-flow-novice/.claude/agents/sparc/architecture.md +472 -0
- package/.claude-flow-novice/.claude/agents/sparc/pseudocode.md +318 -0
- package/.claude-flow-novice/.claude/agents/sparc/refinement.md +525 -0
- package/.claude-flow-novice/.claude/agents/sparc/specification.md +276 -0
- package/.claude-flow-novice/.claude/agents/specialized/mobile/spec-mobile-react-native.md +226 -0
- package/.claude-flow-novice/.claude/agents/sublinear/consciousness-evolution-agent.md +499 -0
- package/.claude-flow-novice/.claude/agents/sublinear/matrix-solver-agent.md +113 -0
- package/.claude-flow-novice/.claude/agents/sublinear/nanosecond-scheduler-agent.md +644 -0
- package/.claude-flow-novice/.claude/agents/sublinear/pagerank-agent.md +699 -0
- package/.claude-flow-novice/.claude/agents/sublinear/phi-calculator-agent.md +749 -0
- package/.claude-flow-novice/.claude/agents/sublinear/psycho-symbolic-agent.md +543 -0
- package/.claude-flow-novice/.claude/agents/sublinear/sublinear.md +816 -0
- package/.claude-flow-novice/.claude/agents/sublinear/temporal-advantage-agent.md +360 -0
- package/.claude-flow-novice/.claude/agents/swarm/adaptive-coordinator-enhanced.md +746 -0
- package/.claude-flow-novice/.claude/agents/swarm/adaptive-coordinator.md +396 -0
- package/.claude-flow-novice/.claude/agents/swarm/hierarchical-coordinator.md +300 -0
- package/.claude-flow-novice/.claude/agents/swarm/mesh-coordinator.md +435 -0
- package/.claude-flow-novice/.claude/agents/templates/automation-smart-agent.md +205 -0
- package/.claude-flow-novice/.claude/agents/templates/coordinator-swarm-init.md +90 -0
- package/.claude-flow-novice/.claude/agents/templates/github-pr-manager.md +177 -0
- package/.claude-flow-novice/.claude/agents/templates/implementer-sparc-coder.md +259 -0
- package/.claude-flow-novice/.claude/agents/templates/memory-coordinator.md +187 -0
- package/.claude-flow-novice/.claude/agents/templates/migration-plan.md +746 -0
- package/.claude-flow-novice/.claude/agents/templates/orchestrator-task.md +139 -0
- package/.claude-flow-novice/.claude/agents/templates/performance-analyzer.md +199 -0
- package/.claude-flow-novice/.claude/agents/templates/sparc-coordinator.md +183 -0
- package/.claude-flow-novice/.claude/agents/tester.md +663 -0
- package/.claude-flow-novice/.claude/agents/testing/e2e/playwright-agent.md +249 -0
- package/.claude-flow-novice/.claude/agents/testing/unit/tdd-london-swarm.md +244 -0
- package/.claude-flow-novice/.claude/agents/testing/validation/production-validator.md +395 -0
- package/.claude-flow-novice/dist/index.js +12 -24
- package/.claude-flow-novice/dist/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/agents/agent-manager.js +123 -69
- package/.claude-flow-novice/dist/src/agents/agent-manager.js.map +1 -1
- package/.claude-flow-novice/dist/src/agents/github/utils/hook-integration.js +7 -7
- package/.claude-flow-novice/dist/src/agents/github/utils/hook-integration.js.map +1 -1
- package/.claude-flow-novice/dist/src/agents/stage3-integration-validator.js +485 -0
- package/.claude-flow-novice/dist/src/agents/stage3-integration-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/agents/unified-ultra-fast-agent-manager.js +630 -0
- package/.claude-flow-novice/dist/src/agents/unified-ultra-fast-agent-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/cli/commands/agent.js +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/agent.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/config-integration.js +6 -6
- package/.claude-flow-novice/dist/src/cli/commands/enterprise.js +18 -18
- package/.claude-flow-novice/dist/src/cli/commands/enterprise.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/goal-init.js +4 -4
- package/.claude-flow-novice/dist/src/cli/commands/help-new.js +23 -23
- package/.claude-flow-novice/dist/src/cli/commands/help-new.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/help.js +74 -74
- package/.claude-flow-novice/dist/src/cli/commands/help.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/hive-mind/pause.js +2 -2
- package/.claude-flow-novice/dist/src/cli/commands/hive-mind/pause.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/hive.js +4 -4
- package/.claude-flow-novice/dist/src/cli/commands/index.js +103 -132
- package/.claude-flow-novice/dist/src/cli/commands/index.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/mcp.js +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/migrate.js +4 -4
- package/.claude-flow-novice/dist/src/cli/commands/migrate.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/monitor.js +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/neural-init.js +4 -4
- package/.claude-flow-novice/dist/src/cli/commands/ruv-swarm.js +8 -8
- package/.claude-flow-novice/dist/src/cli/commands/sparc.js +12 -12
- package/.claude-flow-novice/dist/src/cli/commands/sparc.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/start/start-command.js +3 -3
- package/.claude-flow-novice/dist/src/cli/commands/status.js +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/swarm.js +7 -7
- package/.claude-flow-novice/dist/src/cli/commands/swarm.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/verification.js +18 -18
- package/.claude-flow-novice/dist/src/cli/completion.js +54 -54
- package/.claude-flow-novice/dist/src/cli/completion.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/ConsolidatedCLI.js +11 -11
- package/.claude-flow-novice/dist/src/cli/consolidated/ConsolidatedCLI.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/core/CommandHandlers.js +31 -31
- package/.claude-flow-novice/dist/src/cli/consolidated/core/TierManager.js +39 -39
- package/.claude-flow-novice/dist/src/cli/consolidated/core/TierManager.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/help/InteractiveHelp.js +25 -25
- package/.claude-flow-novice/dist/src/cli/consolidated/help/InteractiveHelp.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/routing/CommandRouter.js +8 -8
- package/.claude-flow-novice/dist/src/cli/consolidated/routing/CommandRouter.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/utils/IntelligentDefaults.js +6 -6
- package/.claude-flow-novice/dist/src/cli/consolidated/utils/IntelligentDefaults.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/utils/PerformanceOptimizer.js +7 -7
- package/.claude-flow-novice/dist/src/cli/consolidated/utils/PerformanceOptimizer.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/index-remote.js +10 -10
- package/.claude-flow-novice/dist/src/cli/index.js +1 -1
- package/.claude-flow-novice/dist/src/cli/init/directory-structure.js +8 -8
- package/.claude-flow-novice/dist/src/cli/init/index.js +3 -3
- package/.claude-flow-novice/dist/src/cli/init/sparc-environment.js +67 -67
- package/.claude-flow-novice/dist/src/cli/init/swarm-commands.js +18 -18
- package/.claude-flow-novice/dist/src/cli/node-repl.js +2 -2
- package/.claude-flow-novice/dist/src/cli/repl.js +1 -1
- package/.claude-flow-novice/dist/src/cli/simple-cli.js +68 -68
- package/.claude-flow-novice/dist/src/cli/simple-cli.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/simple-commands/session-start-soul.js +271 -0
- package/.claude-flow-novice/dist/src/cli/simple-orchestrator.js +7 -7
- package/.claude-flow-novice/dist/src/cli/simple-orchestrator.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/ui/fallback-handler.js +7 -7
- package/.claude-flow-novice/dist/src/communication/enhanced-event-bus.js +816 -0
- package/.claude-flow-novice/dist/src/communication/enhanced-event-bus.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/failure-recovery-system.js +812 -0
- package/.claude-flow-novice/dist/src/communication/failure-recovery-system.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/optimized-serialization.js +369 -0
- package/.claude-flow-novice/dist/src/communication/optimized-serialization.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/performance-optimizations.js +526 -0
- package/.claude-flow-novice/dist/src/communication/performance-optimizations.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/performance-validator.js +532 -0
- package/.claude-flow-novice/dist/src/communication/performance-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/priority-message-queue.js +525 -0
- package/.claude-flow-novice/dist/src/communication/priority-message-queue.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/shared-buffer-bus.js +218 -0
- package/.claude-flow-novice/dist/src/communication/shared-buffer-bus.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/ultra-fast-communication-bus.js +521 -0
- package/.claude-flow-novice/dist/src/communication/ultra-fast-communication-bus.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/ultra-fast-serialization.js +563 -0
- package/.claude-flow-novice/dist/src/communication/ultra-fast-serialization.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/websocket-cluster.js +344 -0
- package/.claude-flow-novice/dist/src/communication/websocket-cluster.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/zero-copy-structures.js +369 -0
- package/.claude-flow-novice/dist/src/communication/zero-copy-structures.js.map +1 -0
- package/.claude-flow-novice/dist/src/config/config-manager.js +1 -1
- package/.claude-flow-novice/dist/src/config/config-manager.js.map +1 -1
- package/.claude-flow-novice/dist/src/config/core/intelligent-configuration-manager.js +1 -1
- package/.claude-flow-novice/dist/src/config/integration/hooks-integration.js +6 -6
- package/.claude-flow-novice/dist/src/config/integration/hooks-integration.js.map +1 -1
- package/.claude-flow-novice/dist/src/config/migration/config-migration.js +1 -1
- package/.claude-flow-novice/dist/src/config/ruv-swarm-integration.js +1 -1
- package/.claude-flow-novice/dist/src/config/utils/zero-config-setup.js +1 -1
- package/.claude-flow-novice/dist/src/config/utils/zero-config-setup.js.map +1 -1
- package/.claude-flow-novice/dist/src/config/web-portal-config.js +0 -9
- package/.claude-flow-novice/dist/src/config/web-portal-config.js.map +1 -1
- package/.claude-flow-novice/dist/src/config/zero-config-setup.js +18 -18
- package/.claude-flow-novice/dist/src/config/zero-config-setup.js.map +1 -1
- package/.claude-flow-novice/dist/src/core/logger.js +33 -10
- package/.claude-flow-novice/dist/src/core/logger.js.map +1 -1
- package/.claude-flow-novice/dist/src/migration/index.js +1 -1
- package/.claude-flow-novice/dist/src/migration/index.js.map +1 -1
- package/.claude-flow-novice/dist/src/migration/migration-runner.js +4 -4
- package/.claude-flow-novice/dist/src/migration/migration-runner.js.map +1 -1
- package/.claude-flow-novice/dist/src/monitoring/agent-health-monitor.js +430 -0
- package/.claude-flow-novice/dist/src/monitoring/agent-health-monitor.js.map +1 -0
- package/.claude-flow-novice/dist/src/slash-commands/claude-soul.js +248 -365
- package/.claude-flow-novice/dist/src/slash-commands/register-all-commands.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/claude-code-interface.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/claude-flow-executor.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/consensus-coordinator.js +471 -0
- package/.claude-flow-novice/dist/src/swarm/consensus-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm/hive-mind-integration.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/large-scale-coordinator.js +543 -0
- package/.claude-flow-novice/dist/src/swarm/large-scale-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm/optimizations/connection-pool.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/optimizations/optimized-executor.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/types.js.map +1 -1
- package/.claude-flow-novice/dist/src/swarm-fullstack/integrations/communication-bridge.js +709 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/integrations/communication-bridge.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/api-contract-validator.js +612 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/api-contract-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/backend-test-orchestrator.js +679 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/backend-test-orchestrator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/frontend-test-orchestrator.js +654 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/frontend-test-orchestrator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/visual-regression.js +402 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/visual-regression.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/convergence-detector.js +459 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/convergence-detector.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/fix-coordinator.js +513 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/fix-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/index.js +19 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/iterative-build-test.js +568 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/iterative-build-test.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/regression-test-manager.js +418 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/regression-test-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/test-result-analyzer.js +530 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/test-result-analyzer.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/workflow-metrics.js +250 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/workflow-metrics.js.map +1 -0
- package/.claude-flow-novice/dist/src/task/index.js +7 -7
- package/.claude-flow-novice/dist/src/validation/fullstack-integration-validator.js +420 -0
- package/.claude-flow-novice/dist/src/validation/fullstack-integration-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/validation/production-validator.js +1435 -0
- package/.claude-flow-novice/dist/src/validation/production-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/verification/cli-integration.js +3 -3
- package/.claude-flow-novice/dist/src/verification/hooks.js +1 -1
- package/CHANGELOG.md +26 -0
- package/CLAUDE.md +1967 -68
- package/README.md +0 -1
- package/config/build/babel.config.cjs +19 -11
- package/config/typescript/tsconfig.json +1 -1
- package/examples/claude-api-error-handling.ts +2 -2
- package/examples/frontend-testing-demo.ts +470 -0
- package/examples/litellm/config/config.yaml +1 -1
- package/package.json +13 -7
- package/scripts/build/unified-builder.sh +6 -6
- package/scripts/build/validate-agents.js +238 -0
- package/scripts/run-production-validation.ts +590 -0
- package/scripts/test/test-coordination-features.ts +2 -2
- package/scripts/validate-stage3-performance.ts +377 -0
- package/src/cli/simple-commands/hooks.js +1 -0
- package/src/cli/simple-commands/init/agent-copier.js +0 -2
- package/src/cli/simple-commands/init/index.js +5 -97
- package/src/cli/simple-commands/init/templates/CLAUDE.md +163 -1158
- package/src/cli/simple-commands/init/templates/claude-md.js +38 -157
- package/src/swarm-fullstack/integrations/communication-bridge.ts +931 -0
- package/src/swarm-fullstack/testing/api-contract-validator.ts +909 -0
- package/src/swarm-fullstack/testing/backend-test-orchestrator.ts +791 -0
- package/src/swarm-fullstack/testing/frontend-test-orchestrator.ts +853 -0
- package/src/swarm-fullstack/testing/visual-regression.ts +507 -0
- package/src/swarm-fullstack/workflows/convergence-detector.ts +736 -0
- package/src/swarm-fullstack/workflows/fix-coordinator.ts +677 -0
- package/src/swarm-fullstack/workflows/index.ts +75 -0
- package/src/swarm-fullstack/workflows/iterative-build-test.ts +829 -0
- package/src/swarm-fullstack/workflows/regression-test-manager.ts +590 -0
- package/src/swarm-fullstack/workflows/test-result-analyzer.ts +739 -0
- package/src/swarm-fullstack/workflows/workflow-metrics.ts +399 -0
- package/wiki/command-reference/README.md +1 -2
- package/wiki/command-reference/mcp-tools/README.md +1 -1
- package/wiki/getting-started/claude-code-mcp/README.md +1 -2
- package/wiki/getting-started/installation/README.md +2 -10
- package/.claude/commands/flow-nexus/app-store.md +0 -124
- package/.claude/commands/flow-nexus/challenges.md +0 -120
- package/.claude/commands/flow-nexus/login-registration.md +0 -65
- package/.claude/commands/flow-nexus/neural-network.md +0 -134
- package/.claude/commands/flow-nexus/payments.md +0 -116
- package/.claude/commands/flow-nexus/sandbox.md +0 -83
- package/.claude/commands/flow-nexus/swarm.md +0 -87
- package/.claude/commands/flow-nexus/user-tools.md +0 -152
- package/.claude/commands/flow-nexus/workflow.md +0 -115
- package/.claude-flow-novice/dist/cli/index.js +0 -45
- package/.claude-flow-novice/dist/core/index.js +0 -22
- package/.claude-flow-novice/dist/mcp/mcp-server-novice.js +0 -595
- package/.claude-flow-novice/dist/mcp/mcp-server-sdk.js +0 -649
- package/.claude-flow-novice/dist/mcp/mcp-server-with-slash-commands.js +0 -776
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-md.js +0 -1101
- package/src/cli/simple-commands/init/templates/CLAUDE.md.optimized +0 -265
- /package/{.claude → .claude-flow-novice/.claude}/agents/README.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/backend-dev.json +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/code-analyzer.json +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/coder.json +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/consensus/README.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/coder.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/planner.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/researcher.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/reviewer.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/tester.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/optimization/README.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/planner.json +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/researcher.json +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/reviewer.json +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/swarm/README.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/system-architect.json +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/tester.json +0 -0
|
@@ -1,1185 +1,190 @@
|
|
|
1
|
-
# Claude
|
|
1
|
+
# Claude Flow Novice - AI Agent Orchestration
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Core Orchestration Patterns
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 🚨 CRITICAL: CONCURRENT EXECUTION & FILE MANAGEMENT
|
|
6
6
|
|
|
7
|
-
### 🔴 MANDATORY CONCURRENT PATTERNS:
|
|
8
|
-
1. **TodoWrite**: ALWAYS batch ALL todos in ONE call (5-10+ todos minimum)
|
|
9
|
-
2. **Task tool**: ALWAYS spawn ALL agents in ONE message with full instructions
|
|
10
|
-
3. **File operations**: ALWAYS batch ALL reads/writes/edits in ONE message
|
|
11
|
-
4. **Bash commands**: ALWAYS batch ALL terminal operations in ONE message
|
|
12
|
-
5. **Memory operations**: ALWAYS batch ALL memory store/retrieve in ONE message
|
|
13
7
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
[Single Message]:
|
|
20
|
-
- TodoWrite { todos: [10+ todos with all statuses/priorities] }
|
|
21
|
-
- Task("Agent 1 with full instructions and hooks")
|
|
22
|
-
- Task("Agent 2 with full instructions and hooks")
|
|
23
|
-
- Task("Agent 3 with full instructions and hooks")
|
|
24
|
-
- Read("file1.js")
|
|
25
|
-
- Read("file2.js")
|
|
26
|
-
- Write("output1.js", content)
|
|
27
|
-
- Write("output2.js", content)
|
|
28
|
-
- Bash("npm install")
|
|
29
|
-
- Bash("npm test")
|
|
30
|
-
- Bash("npm run build")
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
**Examples of WRONG sequential execution:**
|
|
34
|
-
```javascript
|
|
35
|
-
// ❌ WRONG: Multiple messages (NEVER DO THIS)
|
|
36
|
-
Message 1: TodoWrite { todos: [single todo] }
|
|
37
|
-
Message 2: Task("Agent 1")
|
|
38
|
-
Message 3: Task("Agent 2")
|
|
39
|
-
Message 4: Read("file1.js")
|
|
40
|
-
Message 5: Write("output1.js")
|
|
41
|
-
Message 6: Bash("npm install")
|
|
42
|
-
// This is 6x slower and breaks coordination!
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### 🎯 CONCURRENT EXECUTION CHECKLIST:
|
|
46
|
-
|
|
47
|
-
Before sending ANY message, ask yourself:
|
|
48
|
-
- ✅ Are ALL related TodoWrite operations batched together?
|
|
49
|
-
- ✅ Are ALL Task spawning operations in ONE message?
|
|
50
|
-
- ✅ Are ALL file operations (Read/Write/Edit) batched together?
|
|
51
|
-
- ✅ Are ALL bash commands grouped in ONE message?
|
|
52
|
-
- ✅ Are ALL memory operations concurrent?
|
|
53
|
-
|
|
54
|
-
If ANY answer is "No", you MUST combine operations into a single message!
|
|
55
|
-
|
|
56
|
-
## Project Overview
|
|
57
|
-
This project uses the SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) methodology for systematic Test-Driven Development with AI assistance through Claude-Flow orchestration.
|
|
58
|
-
|
|
59
|
-
**🚀 Batchtools Optimization Enabled**: This configuration includes optimized prompts and parallel processing capabilities for improved performance and efficiency.
|
|
60
|
-
|
|
61
|
-
## SPARC Development Commands
|
|
62
|
-
|
|
63
|
-
### Core SPARC Commands
|
|
64
|
-
- `npx claude-flow sparc modes`: List all available SPARC development modes
|
|
65
|
-
- `npx claude-flow sparc run <mode> "<task>"`: Execute specific SPARC mode for a task
|
|
66
|
-
- `npx claude-flow sparc tdd "<feature>"`: Run complete TDD workflow using SPARC methodology
|
|
67
|
-
- `npx claude-flow sparc info <mode>`: Get detailed information about a specific mode
|
|
68
|
-
|
|
69
|
-
### Batchtools Commands (Optimized)
|
|
70
|
-
- `npx claude-flow sparc batch <modes> "<task>"`: Execute multiple SPARC modes in parallel
|
|
71
|
-
- `npx claude-flow sparc pipeline "<task>"`: Execute full SPARC pipeline with parallel processing
|
|
72
|
-
- `npx claude-flow sparc concurrent <mode> "<tasks-file>"`: Process multiple tasks concurrently
|
|
73
|
-
|
|
74
|
-
### Standard Build Commands
|
|
75
|
-
- `npm run build`: Build the project
|
|
76
|
-
- `npm run test`: Run the test suite
|
|
77
|
-
- `npm run lint`: Run linter and format checks
|
|
78
|
-
- `npm run typecheck`: Run TypeScript type checking
|
|
79
|
-
|
|
80
|
-
## SPARC Methodology Workflow (Batchtools Enhanced)
|
|
81
|
-
|
|
82
|
-
### 1. Specification Phase (Parallel Analysis)
|
|
83
|
-
```bash
|
|
84
|
-
# Create detailed specifications with concurrent requirements analysis
|
|
85
|
-
npx claude-flow sparc run spec-pseudocode "Define user authentication requirements" --parallel
|
|
86
|
-
```
|
|
87
|
-
**Batchtools Optimization**: Simultaneously analyze multiple requirement sources, validate constraints in parallel, and generate comprehensive specifications.
|
|
8
|
+
**ABSOLUTE RULES**:
|
|
9
|
+
1. ALL operations MUST be concurrent/parallel in a single message
|
|
10
|
+
2. **NEVER save working files, text/mds and tests to the root folder**
|
|
11
|
+
3. ALWAYS organize files in appropriate subdirectories
|
|
12
|
+
4. **USE CLAUDE CODE'S TASK TOOL** for spawning agents concurrently, not just MCP
|
|
88
13
|
|
|
89
|
-
###
|
|
90
|
-
```bash
|
|
91
|
-
# Develop algorithmic logic with parallel pattern analysis
|
|
92
|
-
npx claude-flow sparc run spec-pseudocode "Create authentication flow pseudocode" --batch-optimize
|
|
93
|
-
```
|
|
94
|
-
**Batchtools Optimization**: Process multiple algorithm patterns concurrently, validate logic flows in parallel, and optimize data structures simultaneously.
|
|
14
|
+
### ⚡ GOLDEN RULE: "1 MESSAGE = ALL RELATED OPERATIONS"
|
|
95
15
|
|
|
96
|
-
|
|
16
|
+
**MANDATORY PATTERNS:**
|
|
17
|
+
- **TodoWrite**: ALWAYS batch ALL todos in ONE call (5-10+ todos minimum)
|
|
18
|
+
- **Task tool (Claude Code)**: ALWAYS spawn ALL agents in ONE message with full instructions
|
|
19
|
+
- **File operations**: ALWAYS batch ALL reads/writes/edits in ONE message
|
|
20
|
+
- **Bash commands**: ALWAYS batch ALL terminal operations in ONE message
|
|
21
|
+
- **Memory operations**: ALWAYS batch ALL memory store/retrieve in ONE message
|
|
22
|
+
|
|
23
|
+
## 🎯 Claude Code vs MCP Tools
|
|
24
|
+
|
|
25
|
+
### Claude Code Handles ALL EXECUTION:
|
|
26
|
+
- **Task tool**: Spawn and run agents concurrently for actual work
|
|
27
|
+
- File operations (Read, Write, Edit, MultiEdit, Glob, Grep)
|
|
28
|
+
- Code generation and programming
|
|
29
|
+
- Bash commands and system operations
|
|
30
|
+
- Implementation work
|
|
31
|
+
- Project navigation and analysis
|
|
32
|
+
- TodoWrite and task management
|
|
33
|
+
- Git operations
|
|
34
|
+
- Package management
|
|
35
|
+
- Testing and debugging
|
|
36
|
+
|
|
37
|
+
### MCP Tools ONLY COORDINATE:
|
|
38
|
+
- Swarm initialization (topology setup)
|
|
39
|
+
- Agent type definitions (coordination patterns)
|
|
40
|
+
- Task orchestration (high-level planning)
|
|
41
|
+
- Memory management
|
|
42
|
+
- Neural features
|
|
43
|
+
- Performance tracking
|
|
44
|
+
- GitHub integration
|
|
45
|
+
|
|
46
|
+
**KEY**: MCP coordinates the strategy, Claude Code's Task tool executes with real agents.
|
|
47
|
+
|
|
48
|
+
### Agent Coordination Framework
|
|
49
|
+
|
|
50
|
+
#### Pre-Task Hooks (Setup & Validation)
|
|
97
51
|
```bash
|
|
98
|
-
#
|
|
99
|
-
npx claude-flow
|
|
100
|
-
```
|
|
101
|
-
**Batchtools Optimization**: Generate multiple architectural alternatives simultaneously, validate integration points in parallel, and create comprehensive documentation concurrently.
|
|
52
|
+
# Validate safety and prepare resources
|
|
53
|
+
npx claude-flow-novice hooks pre-command --command "[command]" --validate-safety true --prepare-resources true
|
|
102
54
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
# Execute Test-Driven Development with parallel test generation
|
|
106
|
-
npx claude-flow sparc tdd "implement user authentication system" --batch-tdd
|
|
55
|
+
# Auto-assign agents and load context
|
|
56
|
+
npx claude-flow-novice hooks pre-edit --file "[file]" --auto-assign-agents true --load-context true
|
|
107
57
|
```
|
|
108
|
-
**Batchtools Optimization**: Generate multiple test scenarios simultaneously, implement and validate code in parallel, and optimize performance concurrently.
|
|
109
58
|
|
|
110
|
-
|
|
59
|
+
#### Post-Task Hooks (Validation & Quality)
|
|
111
60
|
```bash
|
|
112
|
-
#
|
|
113
|
-
npx claude-flow
|
|
114
|
-
```
|
|
115
|
-
**Batchtools Optimization**: Run integration tests in parallel, generate documentation concurrently, and validate requirements simultaneously.
|
|
116
|
-
|
|
117
|
-
## Batchtools Integration Features
|
|
118
|
-
|
|
119
|
-
### Parallel Processing Capabilities
|
|
120
|
-
- **Concurrent File Operations**: Read, analyze, and modify multiple files simultaneously
|
|
121
|
-
- **Parallel Code Analysis**: Analyze dependencies, patterns, and architecture concurrently
|
|
122
|
-
- **Batch Test Generation**: Create comprehensive test suites in parallel
|
|
123
|
-
- **Concurrent Documentation**: Generate multiple documentation formats simultaneously
|
|
124
|
-
|
|
125
|
-
### Performance Optimizations
|
|
126
|
-
- **Smart Batching**: Group related operations for optimal performance
|
|
127
|
-
- **Pipeline Processing**: Chain dependent operations with parallel stages
|
|
128
|
-
- **Resource Management**: Efficient utilization of system resources
|
|
129
|
-
- **Error Resilience**: Robust error handling with parallel recovery
|
|
130
|
-
|
|
131
|
-
## Performance Benchmarks
|
|
61
|
+
# Track metrics and store results
|
|
62
|
+
npx claude-flow-novice hooks post-command --command "[command]" --track-metrics true --store-results true
|
|
132
63
|
|
|
133
|
-
|
|
134
|
-
-
|
|
135
|
-
- **Code Analysis**: 250% improvement with concurrent pattern recognition
|
|
136
|
-
- **Test Generation**: 400% faster with parallel test creation
|
|
137
|
-
- **Documentation**: 200% improvement with concurrent content generation
|
|
138
|
-
- **Memory Operations**: 180% faster with batched read/write operations
|
|
64
|
+
# Enhanced post-edit pipeline with comprehensive TDD validation
|
|
65
|
+
npx enhanced-hooks post-edit "[file]" --memory-key "swarm/[agent]/[step]" --minimum-coverage 80 --structured
|
|
139
66
|
|
|
140
|
-
|
|
67
|
+
# Manual hook execution (guaranteed working)
|
|
68
|
+
node src/hooks/enhanced-hooks-cli.js post-edit "[file]" --memory-key "[key]" --structured
|
|
141
69
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
- **Environment Safety**: Never hardcode secrets, validate with concurrent checks
|
|
145
|
-
- **Test-First**: Always write tests before implementation using parallel generation
|
|
146
|
-
- **Clean Architecture**: Separate concerns with concurrent validation
|
|
147
|
-
- **Parallel Documentation**: Maintain clear, up-to-date documentation with concurrent updates
|
|
148
|
-
|
|
149
|
-
### Batchtools Best Practices
|
|
150
|
-
- **Parallel Operations**: Use batchtools for independent tasks
|
|
151
|
-
- **Concurrent Validation**: Validate multiple aspects simultaneously
|
|
152
|
-
- **Batch Processing**: Group similar operations for efficiency
|
|
153
|
-
- **Pipeline Optimization**: Chain operations with parallel stages
|
|
154
|
-
- **Resource Management**: Monitor and optimize resource usage
|
|
155
|
-
|
|
156
|
-
## Important Notes (Enhanced)
|
|
157
|
-
|
|
158
|
-
- Always run tests before committing with parallel execution (`npm run test --parallel`)
|
|
159
|
-
- Use SPARC memory system with concurrent operations to maintain context across sessions
|
|
160
|
-
- Follow the Red-Green-Refactor cycle with parallel test generation during TDD phases
|
|
161
|
-
- Document architectural decisions with concurrent validation in memory
|
|
162
|
-
- Regular security reviews with parallel analysis for authentication or data handling code
|
|
163
|
-
- Claude Code slash commands provide quick access to batchtools-optimized SPARC modes
|
|
164
|
-
- Monitor system resources during parallel operations for optimal performance
|
|
165
|
-
|
|
166
|
-
## Available Agents (54 Total)
|
|
167
|
-
|
|
168
|
-
### 🚀 Concurrent Agent Usage
|
|
169
|
-
|
|
170
|
-
**CRITICAL**: Always spawn multiple agents concurrently using the Task tool in a single message:
|
|
171
|
-
|
|
172
|
-
```javascript
|
|
173
|
-
// ✅ CORRECT: Concurrent agent deployment
|
|
174
|
-
[Single Message]:
|
|
175
|
-
- Task("Agent 1", "full instructions", "agent-type-1")
|
|
176
|
-
- Task("Agent 2", "full instructions", "agent-type-2")
|
|
177
|
-
- Task("Agent 3", "full instructions", "agent-type-3")
|
|
178
|
-
- Task("Agent 4", "full instructions", "agent-type-4")
|
|
179
|
-
- Task("Agent 5", "full instructions", "agent-type-5")
|
|
70
|
+
# Validates: formatting, linting, type checking, dependencies, security, tests, TDD compliance
|
|
71
|
+
# Progressive validation: graceful degradation when dependencies missing (beginner-friendly)
|
|
180
72
|
```
|
|
181
73
|
|
|
182
|
-
|
|
74
|
+
## 🎯 **Enhanced Post-Edit Hook System**
|
|
183
75
|
|
|
184
|
-
|
|
185
|
-
- `coder` - Implementation specialist
|
|
186
|
-
- `reviewer` - Code quality assurance
|
|
187
|
-
- `tester` - Test creation and validation
|
|
188
|
-
- `planner` - Strategic planning
|
|
189
|
-
- `researcher` - Information gathering
|
|
76
|
+
### **🚨 MANDATORY: Manual Hook Execution After Every File Edit**
|
|
190
77
|
|
|
191
|
-
**
|
|
192
|
-
```bash
|
|
193
|
-
# Deploy full development swarm
|
|
194
|
-
Task("Research requirements", "...", "researcher")
|
|
195
|
-
Task("Plan architecture", "...", "planner")
|
|
196
|
-
Task("Implement features", "...", "coder")
|
|
197
|
-
Task("Create tests", "...", "tester")
|
|
198
|
-
Task("Review code", "...", "reviewer")
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
#### **Swarm Coordination Agents**
|
|
202
|
-
- `hierarchical-coordinator` - Queen-led coordination
|
|
203
|
-
- `mesh-coordinator` - Peer-to-peer networks
|
|
204
|
-
- `adaptive-coordinator` - Dynamic topology
|
|
205
|
-
- `collective-intelligence-coordinator` - Hive-mind intelligence
|
|
206
|
-
- `swarm-memory-manager` - Distributed memory
|
|
207
|
-
|
|
208
|
-
**Concurrent Swarm Deployment:**
|
|
209
|
-
```bash
|
|
210
|
-
# Deploy multi-topology coordination
|
|
211
|
-
Task("Hierarchical coordination", "...", "hierarchical-coordinator")
|
|
212
|
-
Task("Mesh network backup", "...", "mesh-coordinator")
|
|
213
|
-
Task("Adaptive optimization", "...", "adaptive-coordinator")
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
#### **Consensus & Distributed Systems**
|
|
217
|
-
- `byzantine-coordinator` - Byzantine fault tolerance
|
|
218
|
-
- `raft-manager` - Leader election protocols
|
|
219
|
-
- `gossip-coordinator` - Epidemic dissemination
|
|
220
|
-
- `consensus-builder` - Decision-making algorithms
|
|
221
|
-
- `crdt-synchronizer` - Conflict-free replication
|
|
222
|
-
- `quorum-manager` - Dynamic quorum management
|
|
223
|
-
- `security-manager` - Cryptographic security
|
|
224
|
-
|
|
225
|
-
#### **Performance & Optimization**
|
|
226
|
-
- `perf-analyzer` - Bottleneck identification
|
|
227
|
-
- `performance-benchmarker` - Performance testing
|
|
228
|
-
- `task-orchestrator` - Workflow optimization
|
|
229
|
-
- `memory-coordinator` - Memory management
|
|
230
|
-
- `smart-agent` - Intelligent coordination
|
|
231
|
-
|
|
232
|
-
#### **GitHub & Repository Management**
|
|
233
|
-
- `github-modes` - Comprehensive GitHub integration
|
|
234
|
-
- `pr-manager` - Pull request management
|
|
235
|
-
- `code-review-swarm` - Multi-agent code review
|
|
236
|
-
- `issue-tracker` - Issue management
|
|
237
|
-
- `release-manager` - Release coordination
|
|
238
|
-
- `workflow-automation` - CI/CD automation
|
|
239
|
-
- `project-board-sync` - Project tracking
|
|
240
|
-
- `repo-architect` - Repository optimization
|
|
241
|
-
- `multi-repo-swarm` - Cross-repository coordination
|
|
242
|
-
|
|
243
|
-
#### **SPARC Methodology Agents**
|
|
244
|
-
- `sparc-coord` - SPARC orchestration
|
|
245
|
-
- `sparc-coder` - TDD implementation
|
|
246
|
-
- `specification` - Requirements analysis
|
|
247
|
-
- `pseudocode` - Algorithm design
|
|
248
|
-
- `architecture` - System design
|
|
249
|
-
- `refinement` - Iterative improvement
|
|
250
|
-
|
|
251
|
-
#### **Specialized Development**
|
|
252
|
-
- `backend-dev` - API development
|
|
253
|
-
- `mobile-dev` - React Native development
|
|
254
|
-
- `ml-developer` - Machine learning
|
|
255
|
-
- `cicd-engineer` - CI/CD pipelines
|
|
256
|
-
- `api-docs` - OpenAPI documentation
|
|
257
|
-
- `system-architect` - High-level design
|
|
258
|
-
- `code-analyzer` - Code quality analysis
|
|
259
|
-
- `base-template-generator` - Boilerplate creation
|
|
78
|
+
**CRITICAL RULE**: After **EVERY** file edit operation, you **MUST** run the enhanced post-edit hook:
|
|
260
79
|
|
|
261
|
-
#### **Testing & Validation**
|
|
262
|
-
- `tdd-london-swarm` - Mock-driven TDD
|
|
263
|
-
- `production-validator` - Real implementation validation
|
|
264
|
-
|
|
265
|
-
#### **Migration & Planning**
|
|
266
|
-
- `migration-planner` - System migrations
|
|
267
|
-
- `swarm-init` - Topology initialization
|
|
268
|
-
|
|
269
|
-
### 🎯 Concurrent Agent Patterns
|
|
270
|
-
|
|
271
|
-
#### **Full-Stack Development Swarm (8 agents)**
|
|
272
|
-
```bash
|
|
273
|
-
Task("System architecture", "...", "system-architect")
|
|
274
|
-
Task("Backend APIs", "...", "backend-dev")
|
|
275
|
-
Task("Frontend mobile", "...", "mobile-dev")
|
|
276
|
-
Task("Database design", "...", "coder")
|
|
277
|
-
Task("API documentation", "...", "api-docs")
|
|
278
|
-
Task("CI/CD pipeline", "...", "cicd-engineer")
|
|
279
|
-
Task("Performance testing", "...", "performance-benchmarker")
|
|
280
|
-
Task("Production validation", "...", "production-validator")
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
#### **Distributed System Swarm (6 agents)**
|
|
284
80
|
```bash
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
81
|
+
# After editing any file, IMMEDIATELY run:
|
|
82
|
+
npx enhanced-hooks post-edit "[FILE_PATH]" --memory-key "swarm/[AGENT]/[STEP]" --minimum-coverage 80 --structured
|
|
83
|
+
|
|
84
|
+
# Or via slash command:
|
|
85
|
+
/hooks post-edit [FILE_PATH] --memory-key "[CONTEXT]" --structured
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**⚠️ NO EXCEPTIONS**: This applies to:
|
|
89
|
+
- All JavaScript/TypeScript files
|
|
90
|
+
- All Rust files
|
|
91
|
+
- All Python files
|
|
92
|
+
- All configuration files
|
|
93
|
+
- ALL file modifications
|
|
94
|
+
|
|
95
|
+
### **Enhanced Post-Edit Pipeline Features:**
|
|
96
|
+
- **🧪 TDD Testing**: Single-file testing without full system compilation
|
|
97
|
+
- **📊 Real-time Coverage**: Coverage analysis with configurable thresholds (default: 80%)
|
|
98
|
+
- **🌐 Multi-Language Support**:
|
|
99
|
+
- **JavaScript/TypeScript**: Jest, Mocha, Prettier, ESLint integration
|
|
100
|
+
- **Rust**: cargo check, cargo test, cargo-tarpaulin, rustfmt
|
|
101
|
+
- **Python**: pytest, unittest, black, pylint
|
|
102
|
+
- **Go**: go test, go fmt, go vet
|
|
103
|
+
- **Java**: JUnit, TestNG, google-java-format
|
|
104
|
+
- **C/C++**: GTest, Catch2, clang-format
|
|
105
|
+
- **🎨 Formatting**: Prettier, Black, RustFmt, GoFmt with diff preview
|
|
106
|
+
- **🔒 Security Analysis**: XSS, eval(), hardcoded credentials, SQL injection detection
|
|
107
|
+
- **✅ TDD Compliance**: Red-Green-Refactor phase detection and enforcement
|
|
108
|
+
- **🔍 Framework Detection**: Automatic test framework identification
|
|
109
|
+
- **🤖 Agent Feedback**: Structured JSON with actionable recommendations
|
|
110
|
+
- **💾 Memory Coordination**: Cross-agent state sharing and enhanced persistence
|
|
111
|
+
- **🚫 Blocking Mechanisms**: Quality gates for critical validation failures
|
|
112
|
+
|
|
113
|
+
### **Usage Examples:**
|
|
303
114
|
```bash
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
# important-instruction-reminders
|
|
330
|
-
Message 3: Task("Agent 2")
|
|
331
|
-
Message 4: Read("file1.js")
|
|
332
|
-
Message 5: Write("output1.js")
|
|
333
|
-
Message 6: Bash("npm install")
|
|
334
|
-
// This is 6x slower and breaks coordination!
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
### 🎯 CONCURRENT EXECUTION CHECKLIST:
|
|
338
|
-
|
|
339
|
-
Before sending ANY message, ask yourself:
|
|
340
|
-
|
|
341
|
-
- ✅ Are ALL related TodoWrite operations batched together?
|
|
342
|
-
- ✅ Are ALL Task spawning operations in ONE message?
|
|
343
|
-
- ✅ Are ALL file operations (Read/Write/Edit) batched together?
|
|
344
|
-
- ✅ Are ALL bash commands grouped in ONE message?
|
|
345
|
-
- ✅ Are ALL memory operations concurrent?
|
|
346
|
-
|
|
347
|
-
If ANY answer is "No", you MUST combine operations into a single message!
|
|
348
|
-
|
|
349
|
-
## 🚀 CRITICAL: Claude Code Does ALL Real Work
|
|
350
|
-
|
|
351
|
-
### 🎯 CLAUDE CODE IS THE ONLY EXECUTOR
|
|
352
|
-
|
|
353
|
-
**ABSOLUTE RULE**: Claude Code performs ALL actual work:
|
|
354
|
-
|
|
355
|
-
### ✅ Claude Code ALWAYS Handles:
|
|
356
|
-
|
|
357
|
-
- 🔧 **ALL file operations** (Read, Write, Edit, MultiEdit, Glob, Grep)
|
|
358
|
-
- 💻 **ALL code generation** and programming tasks
|
|
359
|
-
- 🖥️ **ALL bash commands** and system operations
|
|
360
|
-
- 🏗️ **ALL actual implementation** work
|
|
361
|
-
- 🔍 **ALL project navigation** and code analysis
|
|
362
|
-
- 📝 **ALL TodoWrite** and task management
|
|
363
|
-
- 🔄 **ALL git operations** (commit, push, merge)
|
|
364
|
-
- 📦 **ALL package management** (npm, pip, etc.)
|
|
365
|
-
- 🧪 **ALL testing** and validation
|
|
366
|
-
- 🔧 **ALL debugging** and troubleshooting
|
|
367
|
-
|
|
368
|
-
### 🧠 Claude Flow MCP Tools ONLY Handle:
|
|
369
|
-
|
|
370
|
-
- 🎯 **Coordination only** - Planning Claude Code's actions
|
|
371
|
-
- 💾 **Memory management** - Storing decisions and context
|
|
372
|
-
- 🤖 **Neural features** - Learning from Claude Code's work
|
|
373
|
-
- 📊 **Performance tracking** - Monitoring Claude Code's efficiency
|
|
374
|
-
- 🐝 **Swarm orchestration** - Coordinating multiple Claude Code instances
|
|
375
|
-
- 🔗 **GitHub integration** - Advanced repository coordination
|
|
376
|
-
|
|
377
|
-
### 🚨 CRITICAL SEPARATION OF CONCERNS:
|
|
378
|
-
|
|
379
|
-
**❌ MCP Tools NEVER:**
|
|
380
|
-
|
|
381
|
-
- Write files or create content
|
|
382
|
-
- Execute bash commands
|
|
383
|
-
- Generate code
|
|
384
|
-
- Perform file operations
|
|
385
|
-
- Handle TodoWrite operations
|
|
386
|
-
- Execute system commands
|
|
387
|
-
- Do actual implementation work
|
|
388
|
-
|
|
389
|
-
**✅ MCP Tools ONLY:**
|
|
390
|
-
|
|
391
|
-
- Coordinate and plan
|
|
392
|
-
- Store memory and context
|
|
393
|
-
- Track performance
|
|
394
|
-
- Orchestrate workflows
|
|
395
|
-
- Provide intelligence insights
|
|
396
|
-
|
|
397
|
-
### ⚠️ Key Principle:
|
|
398
|
-
|
|
399
|
-
**MCP tools coordinate, Claude Code executes.** Think of MCP tools as the "brain" that plans and coordinates, while Claude Code is the "hands" that do all the actual work.
|
|
400
|
-
|
|
401
|
-
### 🔄 WORKFLOW EXECUTION PATTERN:
|
|
402
|
-
|
|
403
|
-
**✅ CORRECT Workflow:**
|
|
404
|
-
|
|
405
|
-
1. **MCP**: `mcp__claude-flow__swarm_init` (coordination setup)
|
|
406
|
-
2. **MCP**: `mcp__claude-flow__agent_spawn` (planning agents)
|
|
407
|
-
3. **MCP**: `mcp__claude-flow__task_orchestrate` (task coordination)
|
|
408
|
-
4. **Claude Code**: `Task` tool to spawn agents with coordination instructions
|
|
409
|
-
5. **Claude Code**: `TodoWrite` with ALL todos batched (5-10+ in ONE call)
|
|
410
|
-
6. **Claude Code**: `Read`, `Write`, `Edit`, `Bash` (actual work)
|
|
411
|
-
7. **MCP**: `mcp__claude-flow__memory_usage` (store results)
|
|
412
|
-
|
|
413
|
-
**❌ WRONG Workflow:**
|
|
414
|
-
|
|
415
|
-
1. **MCP**: `mcp__claude-flow__terminal_execute` (DON'T DO THIS)
|
|
416
|
-
2. **MCP**: File creation via MCP (DON'T DO THIS)
|
|
417
|
-
3. **MCP**: Code generation via MCP (DON'T DO THIS)
|
|
418
|
-
4. **Claude Code**: Sequential Task calls (DON'T DO THIS)
|
|
419
|
-
5. **Claude Code**: Individual TodoWrite calls (DON'T DO THIS)
|
|
420
|
-
|
|
421
|
-
### 🚨 REMEMBER:
|
|
422
|
-
|
|
423
|
-
- **MCP tools** = Coordination, planning, memory, intelligence
|
|
424
|
-
- **Claude Code** = All actual execution, coding, file operations
|
|
425
|
-
|
|
426
|
-
## 🚀 CRITICAL: Parallel Execution & Batch Operations
|
|
427
|
-
|
|
428
|
-
### 🚨 MANDATORY RULE #1: BATCH EVERYTHING
|
|
429
|
-
|
|
430
|
-
**When using swarms, you MUST use BatchTool for ALL operations:**
|
|
431
|
-
|
|
432
|
-
1. **NEVER** send multiple messages for related operations
|
|
433
|
-
2. **ALWAYS** combine multiple tool calls in ONE message
|
|
434
|
-
3. **PARALLEL** execution is MANDATORY, not optional
|
|
435
|
-
|
|
436
|
-
### ⚡ THE GOLDEN RULE OF SWARMS
|
|
437
|
-
|
|
438
|
-
```
|
|
439
|
-
If you need to do X operations, they should be in 1 message, not X messages
|
|
440
|
-
```
|
|
441
|
-
|
|
442
|
-
### 🚨 MANDATORY TODO AND TASK BATCHING
|
|
443
|
-
|
|
444
|
-
**CRITICAL RULE FOR TODOS AND TASKS:**
|
|
445
|
-
|
|
446
|
-
1. **TodoWrite** MUST ALWAYS include ALL todos in ONE call (5-10+ todos)
|
|
447
|
-
2. **Task** tool calls MUST be batched - spawn multiple agents in ONE message
|
|
448
|
-
3. **NEVER** update todos one by one - this breaks parallel coordination
|
|
449
|
-
4. **NEVER** spawn agents sequentially - ALL agents spawn together
|
|
450
|
-
|
|
451
|
-
### 📦 BATCH TOOL EXAMPLES
|
|
452
|
-
|
|
453
|
-
**✅ CORRECT - Everything in ONE Message:**
|
|
454
|
-
|
|
455
|
-
```javascript
|
|
456
|
-
[Single Message with BatchTool]:
|
|
457
|
-
// MCP coordination setup
|
|
458
|
-
mcp__claude-flow__swarm_init { topology: "mesh", maxAgents: 6 }
|
|
459
|
-
mcp__claude-flow__agent_spawn { type: "researcher" }
|
|
460
|
-
mcp__claude-flow__agent_spawn { type: "coder" }
|
|
461
|
-
mcp__claude-flow__agent_spawn { type: "code-analyzer" }
|
|
462
|
-
mcp__claude-flow__agent_spawn { type: "tester" }
|
|
463
|
-
mcp__claude-flow__agent_spawn { type: "task-orchestrator" }
|
|
464
|
-
|
|
465
|
-
// Claude Code execution - ALL in parallel
|
|
466
|
-
Task("You are researcher agent. MUST coordinate via hooks...")
|
|
467
|
-
Task("You are coder agent. MUST coordinate via hooks...")
|
|
468
|
-
Task("You are code-analyzer agent. MUST coordinate via hooks...")
|
|
469
|
-
Task("You are tester agent. MUST coordinate via hooks...")
|
|
470
|
-
TodoWrite { todos: [5-10 todos with all priorities and statuses] }
|
|
471
|
-
|
|
472
|
-
// File operations in parallel
|
|
473
|
-
Bash "mkdir -p app/{src,tests,docs}"
|
|
474
|
-
Write "app/package.json"
|
|
475
|
-
Write "app/README.md"
|
|
476
|
-
Write "app/src/index.js"
|
|
477
|
-
```
|
|
478
|
-
|
|
479
|
-
**❌ WRONG - Multiple Messages (NEVER DO THIS):**
|
|
480
|
-
|
|
481
|
-
```javascript
|
|
482
|
-
Message 1: mcp__claude-flow__swarm_init
|
|
483
|
-
Message 2: Task("researcher agent")
|
|
484
|
-
Message 3: Task("coder agent")
|
|
485
|
-
Message 4: TodoWrite({ todo: "single todo" })
|
|
486
|
-
Message 5: Bash "mkdir src"
|
|
487
|
-
Message 6: Write "package.json"
|
|
488
|
-
// This is 6x slower and breaks parallel coordination!
|
|
489
|
-
```
|
|
490
|
-
|
|
491
|
-
### 🎯 BATCH OPERATIONS BY TYPE
|
|
492
|
-
|
|
493
|
-
**Todo and Task Operations (Single Message):**
|
|
494
|
-
|
|
495
|
-
- **TodoWrite** → ALWAYS include 5-10+ todos in ONE call
|
|
496
|
-
- **Task agents** → Spawn ALL agents with full instructions in ONE message
|
|
497
|
-
- **Agent coordination** → ALL Task calls must include coordination hooks
|
|
498
|
-
- **Status updates** → Update ALL todo statuses together
|
|
499
|
-
- **NEVER** split todos or Task calls across messages!
|
|
500
|
-
|
|
501
|
-
**File Operations (Single Message):**
|
|
502
|
-
|
|
503
|
-
- Read 10 files? → One message with 10 Read calls
|
|
504
|
-
- Write 5 files? → One message with 5 Write calls
|
|
505
|
-
- Edit 1 file many times? → One MultiEdit call
|
|
506
|
-
|
|
507
|
-
**Swarm Operations (Single Message):**
|
|
508
|
-
|
|
509
|
-
- Need 8 agents? → One message with swarm_init + 8 agent_spawn calls
|
|
510
|
-
- Multiple memories? → One message with all memory_usage calls
|
|
511
|
-
- Task + monitoring? → One message with task_orchestrate + swarm_monitor
|
|
512
|
-
|
|
513
|
-
**Command Operations (Single Message):**
|
|
514
|
-
|
|
515
|
-
- Multiple directories? → One message with all mkdir commands
|
|
516
|
-
- Install + test + lint? → One message with all npm commands
|
|
517
|
-
- Git operations? → One message with all git commands
|
|
518
|
-
|
|
519
|
-
## 🚀 Quick Setup (Stdio MCP - Recommended)
|
|
520
|
-
|
|
521
|
-
### 1. Add MCP Server (Stdio - No Port Needed)
|
|
522
|
-
|
|
523
|
-
```bash
|
|
524
|
-
# Add Claude Flow MCP server to Claude Code using stdio
|
|
525
|
-
claude mcp add claude-flow npx claude-flow@alpha mcp start
|
|
526
|
-
```
|
|
527
|
-
|
|
528
|
-
### 2. Use MCP Tools for Coordination in Claude Code
|
|
529
|
-
|
|
530
|
-
Once configured, Claude Flow MCP tools enhance Claude Code's coordination:
|
|
531
|
-
|
|
532
|
-
**Initialize a swarm:**
|
|
533
|
-
|
|
534
|
-
- Use the `mcp__claude-flow__swarm_init` tool to set up coordination topology
|
|
535
|
-
- Choose: mesh, hierarchical, ring, or star
|
|
536
|
-
- This creates a coordination framework for Claude Code's work
|
|
537
|
-
|
|
538
|
-
**Spawn agents:**
|
|
539
|
-
|
|
540
|
-
- Use `mcp__claude-flow__agent_spawn` tool to create specialized coordinators
|
|
541
|
-
- Agent types represent different thinking patterns, not actual coders
|
|
542
|
-
- They help Claude Code approach problems from different angles
|
|
543
|
-
|
|
544
|
-
**Orchestrate tasks:**
|
|
545
|
-
|
|
546
|
-
- Use `mcp__claude-flow__task_orchestrate` tool to coordinate complex workflows
|
|
547
|
-
- This breaks down tasks for Claude Code to execute systematically
|
|
548
|
-
- The agents don't write code - they coordinate Claude Code's actions
|
|
549
|
-
|
|
550
|
-
## Available MCP Tools for Coordination
|
|
551
|
-
|
|
552
|
-
### Coordination Tools:
|
|
553
|
-
|
|
554
|
-
- `mcp__claude-flow__swarm_init` - Set up coordination topology for Claude Code
|
|
555
|
-
- `mcp__claude-flow__agent_spawn` - Create cognitive patterns to guide Claude Code
|
|
556
|
-
- `mcp__claude-flow__task_orchestrate` - Break down and coordinate complex tasks
|
|
557
|
-
|
|
558
|
-
### Monitoring Tools:
|
|
559
|
-
|
|
560
|
-
- `mcp__claude-flow__swarm_status` - Monitor coordination effectiveness
|
|
561
|
-
- `mcp__claude-flow__agent_list` - View active cognitive patterns
|
|
562
|
-
- `mcp__claude-flow__agent_metrics` - Track coordination performance
|
|
563
|
-
- `mcp__claude-flow__task_status` - Check workflow progress
|
|
564
|
-
- `mcp__claude-flow__task_results` - Review coordination outcomes
|
|
565
|
-
|
|
566
|
-
### Memory & Neural Tools:
|
|
567
|
-
|
|
568
|
-
- `mcp__claude-flow__memory_usage` - Persistent memory across sessions
|
|
569
|
-
- `mcp__claude-flow__neural_status` - Neural pattern effectiveness
|
|
570
|
-
- `mcp__claude-flow__neural_train` - Improve coordination patterns
|
|
571
|
-
- `mcp__claude-flow__neural_patterns` - Analyze thinking approaches
|
|
572
|
-
|
|
573
|
-
### GitHub Integration Tools (NEW!):
|
|
574
|
-
|
|
575
|
-
- `mcp__claude-flow__github_swarm` - Create specialized GitHub management swarms
|
|
576
|
-
- `mcp__claude-flow__repo_analyze` - Deep repository analysis with AI
|
|
577
|
-
- `mcp__claude-flow__pr_enhance` - AI-powered pull request improvements
|
|
578
|
-
- `mcp__claude-flow__issue_triage` - Intelligent issue classification
|
|
579
|
-
- `mcp__claude-flow__code_review` - Automated code review with swarms
|
|
580
|
-
|
|
581
|
-
### System Tools:
|
|
582
|
-
|
|
583
|
-
- `mcp__claude-flow__benchmark_run` - Measure coordination efficiency
|
|
584
|
-
- `mcp__claude-flow__features_detect` - Available capabilities
|
|
585
|
-
- `mcp__claude-flow__swarm_monitor` - Real-time coordination tracking
|
|
586
|
-
|
|
587
|
-
## Workflow Examples (Coordination-Focused)
|
|
588
|
-
|
|
589
|
-
### Research Coordination Example
|
|
590
|
-
|
|
591
|
-
**Context:** Claude Code needs to research a complex topic systematically
|
|
592
|
-
|
|
593
|
-
**Step 1:** Set up research coordination
|
|
594
|
-
|
|
595
|
-
- Tool: `mcp__claude-flow__swarm_init`
|
|
596
|
-
- Parameters: `{"topology": "mesh", "maxAgents": 5, "strategy": "balanced"}`
|
|
597
|
-
- Result: Creates a mesh topology for comprehensive exploration
|
|
598
|
-
|
|
599
|
-
**Step 2:** Define research perspectives
|
|
600
|
-
|
|
601
|
-
- Tool: `mcp__claude-flow__agent_spawn`
|
|
602
|
-
- Parameters: `{"type": "researcher", "name": "Literature Review"}`
|
|
603
|
-
- Tool: `mcp__claude-flow__agent_spawn`
|
|
604
|
-
- Parameters: `{"type": "code-analyzer", "name": "Data Analysis"}`
|
|
605
|
-
- Result: Different cognitive patterns for Claude Code to use
|
|
606
|
-
|
|
607
|
-
**Step 3:** Coordinate research execution
|
|
608
|
-
|
|
609
|
-
- Tool: `mcp__claude-flow__task_orchestrate`
|
|
610
|
-
- Parameters: `{"task": "Research neural architecture search papers", "strategy": "adaptive"}`
|
|
611
|
-
- Result: Claude Code systematically searches, reads, and analyzes papers
|
|
612
|
-
|
|
613
|
-
**What Actually Happens:**
|
|
614
|
-
|
|
615
|
-
1. The swarm sets up a coordination framework
|
|
616
|
-
2. Each agent MUST use Claude Flow hooks for coordination:
|
|
617
|
-
- `npx claude-flow@alpha hooks pre-task` before starting
|
|
618
|
-
- `npx claude-flow@alpha hooks post-edit` after each file operation
|
|
619
|
-
- `npx claude-flow@alpha hooks notify` to share decisions
|
|
620
|
-
3. Claude Code uses its native Read, WebSearch, and Task tools
|
|
621
|
-
4. The swarm coordinates through shared memory and hooks
|
|
622
|
-
5. Results are synthesized by Claude Code with full coordination history
|
|
623
|
-
|
|
624
|
-
### Development Coordination Example
|
|
625
|
-
|
|
626
|
-
**Context:** Claude Code needs to build a complex system with multiple components
|
|
627
|
-
|
|
628
|
-
**Step 1:** Set up development coordination
|
|
629
|
-
|
|
630
|
-
- Tool: `mcp__claude-flow__swarm_init`
|
|
631
|
-
- Parameters: `{"topology": "hierarchical", "maxAgents": 8, "strategy": "specialized"}`
|
|
632
|
-
- Result: Hierarchical structure for organized development
|
|
633
|
-
|
|
634
|
-
**Step 2:** Define development perspectives
|
|
635
|
-
|
|
636
|
-
- Tool: `mcp__claude-flow__agent_spawn`
|
|
637
|
-
- Parameters: `{"type": "system-architect", "name": "System Design"}`
|
|
638
|
-
- Result: Architectural thinking pattern for Claude Code
|
|
639
|
-
|
|
640
|
-
**Step 3:** Coordinate implementation
|
|
641
|
-
|
|
642
|
-
- Tool: `mcp__claude-flow__task_orchestrate`
|
|
643
|
-
- Parameters: `{"task": "Implement user authentication with JWT", "strategy": "parallel"}`
|
|
644
|
-
- Result: Claude Code implements features using its native tools
|
|
645
|
-
|
|
646
|
-
**What Actually Happens:**
|
|
647
|
-
|
|
648
|
-
1. The swarm creates a development coordination plan
|
|
649
|
-
2. Each agent coordinates using mandatory hooks:
|
|
650
|
-
- Pre-task hooks for context loading
|
|
651
|
-
- Post-edit hooks for progress tracking
|
|
652
|
-
- Memory storage for cross-agent coordination
|
|
653
|
-
3. Claude Code uses Write, Edit, Bash tools for implementation
|
|
654
|
-
4. Agents share progress through Claude Flow memory
|
|
655
|
-
5. All code is written by Claude Code with full coordination
|
|
656
|
-
|
|
657
|
-
### GitHub Repository Management Example (NEW!)
|
|
658
|
-
|
|
659
|
-
**Context:** Claude Code needs to manage a complex GitHub repository
|
|
660
|
-
|
|
661
|
-
**Step 1:** Initialize GitHub swarm
|
|
662
|
-
|
|
663
|
-
- Tool: `mcp__claude-flow__github_swarm`
|
|
664
|
-
- Parameters: `{"repository": "owner/repo", "agents": 5, "focus": "maintenance"}`
|
|
665
|
-
- Result: Specialized swarm for repository management
|
|
666
|
-
|
|
667
|
-
**Step 2:** Analyze repository health
|
|
668
|
-
|
|
669
|
-
- Tool: `mcp__claude-flow__repo_analyze`
|
|
670
|
-
- Parameters: `{"deep": true, "include": ["issues", "prs", "code"]}`
|
|
671
|
-
- Result: Comprehensive repository analysis
|
|
672
|
-
|
|
673
|
-
**Step 3:** Enhance pull requests
|
|
674
|
-
|
|
675
|
-
- Tool: `mcp__claude-flow__pr_enhance`
|
|
676
|
-
- Parameters: `{"pr_number": 123, "add_tests": true, "improve_docs": true}`
|
|
677
|
-
- Result: AI-powered PR improvements
|
|
678
|
-
|
|
679
|
-
## Best Practices for Coordination
|
|
680
|
-
|
|
681
|
-
### ✅ DO:
|
|
682
|
-
|
|
683
|
-
- Use MCP tools to coordinate Claude Code's approach to complex tasks
|
|
684
|
-
- Let the swarm break down problems into manageable pieces
|
|
685
|
-
- Use memory tools to maintain context across sessions
|
|
686
|
-
- Monitor coordination effectiveness with status tools
|
|
687
|
-
- Train neural patterns for better coordination over time
|
|
688
|
-
- Leverage GitHub tools for repository management
|
|
689
|
-
|
|
690
|
-
### ❌ DON'T:
|
|
691
|
-
|
|
692
|
-
- Expect agents to write code (Claude Code does all implementation)
|
|
693
|
-
- Use MCP tools for file operations (use Claude Code's native tools)
|
|
694
|
-
- Try to make agents execute bash commands (Claude Code handles this)
|
|
695
|
-
- Confuse coordination with execution (MCP coordinates, Claude executes)
|
|
696
|
-
|
|
697
|
-
## Memory and Persistence
|
|
698
|
-
|
|
699
|
-
The swarm provides persistent memory that helps Claude Code:
|
|
700
|
-
|
|
701
|
-
- Remember project context across sessions
|
|
702
|
-
- Track decisions and rationale
|
|
703
|
-
- Maintain consistency in large projects
|
|
704
|
-
- Learn from previous coordination patterns
|
|
705
|
-
- Store GitHub workflow preferences
|
|
706
|
-
|
|
707
|
-
## Performance Benefits
|
|
708
|
-
|
|
709
|
-
When using Claude Flow coordination with Claude Code:
|
|
710
|
-
|
|
711
|
-
- **84.8% SWE-Bench solve rate** - Better problem-solving through coordination
|
|
712
|
-
- **32.3% token reduction** - Efficient task breakdown reduces redundancy
|
|
713
|
-
- **2.8-4.4x speed improvement** - Parallel coordination strategies
|
|
714
|
-
- **27+ neural models** - Diverse cognitive approaches
|
|
715
|
-
- **GitHub automation** - Streamlined repository management
|
|
716
|
-
|
|
717
|
-
## Claude Code Hooks Integration
|
|
718
|
-
|
|
719
|
-
Claude Flow includes powerful hooks that automate coordination:
|
|
720
|
-
|
|
721
|
-
### Pre-Operation Hooks
|
|
722
|
-
|
|
723
|
-
- **Auto-assign agents** before file edits based on file type
|
|
724
|
-
- **Validate commands** before execution for safety
|
|
725
|
-
- **Prepare resources** automatically for complex operations
|
|
726
|
-
- **Optimize topology** based on task complexity analysis
|
|
727
|
-
- **Cache searches** for improved performance
|
|
728
|
-
- **GitHub context** loading for repository operations
|
|
729
|
-
|
|
730
|
-
### Post-Operation Hooks
|
|
731
|
-
|
|
732
|
-
- **Auto-format code** using language-specific formatters
|
|
733
|
-
- **Train neural patterns** from successful operations
|
|
734
|
-
- **Update memory** with operation context
|
|
735
|
-
- **Analyze performance** and identify bottlenecks
|
|
736
|
-
- **Track token usage** for efficiency metrics
|
|
737
|
-
- **Sync GitHub** state for consistency
|
|
738
|
-
|
|
739
|
-
### Session Management
|
|
740
|
-
|
|
741
|
-
- **Generate summaries** at session end
|
|
742
|
-
- **Persist state** across Claude Code sessions
|
|
743
|
-
- **Track metrics** for continuous improvement
|
|
744
|
-
- **Restore previous** session context automatically
|
|
745
|
-
- **Export workflows** for reuse
|
|
746
|
-
|
|
747
|
-
### Advanced Features (v2.0.0!)
|
|
748
|
-
|
|
749
|
-
- **🚀 Automatic Topology Selection** - Optimal swarm structure for each task
|
|
750
|
-
- **⚡ Parallel Execution** - 2.8-4.4x speed improvements
|
|
751
|
-
- **🧠 Neural Training** - Continuous learning from operations
|
|
752
|
-
- **📊 Bottleneck Analysis** - Real-time performance optimization
|
|
753
|
-
- **🤖 Smart Auto-Spawning** - Zero manual agent management
|
|
754
|
-
- **🛡️ Self-Healing Workflows** - Automatic error recovery
|
|
755
|
-
- **💾 Cross-Session Memory** - Persistent learning & context
|
|
756
|
-
- **🔗 GitHub Integration** - Repository-aware swarms
|
|
757
|
-
|
|
758
|
-
### Configuration
|
|
759
|
-
|
|
760
|
-
Hooks are pre-configured in `.claude/settings.json`. Key features:
|
|
761
|
-
|
|
762
|
-
- Automatic agent assignment for different file types
|
|
763
|
-
- Code formatting on save
|
|
764
|
-
- Neural pattern learning from edits
|
|
765
|
-
- Session state persistence
|
|
766
|
-
- Performance tracking and optimization
|
|
767
|
-
- Intelligent caching and token reduction
|
|
768
|
-
- GitHub workflow automation
|
|
769
|
-
|
|
770
|
-
See `.claude/commands/` for detailed documentation on all features.
|
|
771
|
-
|
|
772
|
-
## Integration Tips
|
|
773
|
-
|
|
774
|
-
1. **Start Simple**: Begin with basic swarm init and single agent
|
|
775
|
-
2. **Scale Gradually**: Add more agents as task complexity increases
|
|
776
|
-
3. **Use Memory**: Store important decisions and context
|
|
777
|
-
4. **Monitor Progress**: Regular status checks ensure effective coordination
|
|
778
|
-
5. **Train Patterns**: Let neural agents learn from successful coordinations
|
|
779
|
-
6. **Enable Hooks**: Use the pre-configured hooks for automation
|
|
780
|
-
7. **GitHub First**: Use GitHub tools for repository management
|
|
781
|
-
|
|
782
|
-
## 🧠 SWARM ORCHESTRATION PATTERN
|
|
783
|
-
|
|
784
|
-
### You are the SWARM ORCHESTRATOR. **IMMEDIATELY SPAWN AGENTS IN PARALLEL** to execute tasks
|
|
785
|
-
|
|
786
|
-
### 🚨 CRITICAL INSTRUCTION: You are the SWARM ORCHESTRATOR
|
|
787
|
-
|
|
788
|
-
**MANDATORY**: When using swarms, you MUST:
|
|
789
|
-
|
|
790
|
-
1. **SPAWN ALL AGENTS IN ONE BATCH** - Use multiple tool calls in a SINGLE message
|
|
791
|
-
2. **EXECUTE TASKS IN PARALLEL** - Never wait for one task before starting another
|
|
792
|
-
3. **USE BATCHTOOL FOR EVERYTHING** - Multiple operations = Single message with multiple tools
|
|
793
|
-
4. **ALL AGENTS MUST USE COORDINATION TOOLS** - Every spawned agent MUST use claude-flow hooks and memory
|
|
794
|
-
|
|
795
|
-
### 🎯 AGENT COUNT CONFIGURATION
|
|
796
|
-
|
|
797
|
-
**CRITICAL: Dynamic Agent Count Rules**
|
|
798
|
-
|
|
799
|
-
1. **Check CLI Arguments First**: If user runs `npx claude-flow@alpha --agents 5`, use 5 agents
|
|
800
|
-
2. **Auto-Decide if No Args**: Without CLI args, analyze task complexity:
|
|
801
|
-
- Simple tasks (1-3 components): 3-4 agents
|
|
802
|
-
- Medium tasks (4-6 components): 5-7 agents
|
|
803
|
-
- Complex tasks (7+ components): 8-12 agents
|
|
804
|
-
3. **Agent Type Distribution**: Balance agent types based on task:
|
|
805
|
-
- Always include 1 task-orchestrator
|
|
806
|
-
- For code-heavy tasks: more coders
|
|
807
|
-
- For design tasks: more system-architects/code-analyzers
|
|
808
|
-
- For quality tasks: more testers/reviewers
|
|
809
|
-
|
|
810
|
-
**Example Auto-Decision Logic:**
|
|
811
|
-
|
|
812
|
-
```javascript
|
|
813
|
-
// If CLI args provided: npx claude-flow@alpha --agents 6
|
|
814
|
-
maxAgents = CLI_ARGS.agents || determineAgentCount(task);
|
|
815
|
-
|
|
816
|
-
function determineAgentCount(task) {
|
|
817
|
-
// Analyze task complexity
|
|
818
|
-
if (task.includes(['API', 'database', 'auth', 'tests'])) return 8;
|
|
819
|
-
if (task.includes(['frontend', 'backend'])) return 6;
|
|
820
|
-
if (task.includes(['simple', 'script'])) return 3;
|
|
821
|
-
return 5; // default
|
|
115
|
+
# For JavaScript/TypeScript files
|
|
116
|
+
npx enhanced-hooks post-edit "src/components/Button.tsx" --memory-key "frontend/button" --structured
|
|
117
|
+
|
|
118
|
+
# For Rust files (full cargo integration)
|
|
119
|
+
npx enhanced-hooks post-edit "src/lib.rs" --memory-key "backend/rust" --minimum-coverage 90 --structured
|
|
120
|
+
|
|
121
|
+
# Via slash commands in Claude Code
|
|
122
|
+
/hooks post-edit your-file.js --memory-key "agent-memory-key" --structured
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### **Response Structure:**
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"success": true,
|
|
129
|
+
"file": "src/component.js",
|
|
130
|
+
"validation": { "passed": true, "issues": [], "coverage": "advanced" },
|
|
131
|
+
"formatting": { "needed": true, "changes": 12, "formatter": "prettier" },
|
|
132
|
+
"testing": { "executed": true, "framework": "jest", "results": {...} },
|
|
133
|
+
"tddCompliance": { "hasTests": true, "coverage": 85, "recommendations": [...] },
|
|
134
|
+
"recommendations": [
|
|
135
|
+
{ "type": "security", "priority": "high", "message": "...", "action": "..." },
|
|
136
|
+
{ "type": "formatting", "priority": "medium", "action": "prettier file.js" }
|
|
137
|
+
],
|
|
138
|
+
"memory": { "stored": true, "enhancedStore": true }
|
|
822
139
|
}
|
|
823
140
|
```
|
|
824
141
|
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
### 🔴 CRITICAL: Every Agent MUST Follow This Protocol
|
|
828
|
-
|
|
829
|
-
When you spawn an agent using the Task tool, that agent MUST:
|
|
830
|
-
|
|
831
|
-
**1️⃣ BEFORE Starting Work:**
|
|
832
|
-
|
|
833
|
-
```bash
|
|
834
|
-
# Check previous work and load context
|
|
835
|
-
npx claude-flow@alpha hooks pre-task --description "[agent task]" --auto-spawn-agents false
|
|
836
|
-
npx claude-flow@alpha hooks session-restore --session-id "swarm-[id]" --load-memory true
|
|
837
|
-
```
|
|
838
|
-
|
|
839
|
-
**2️⃣ DURING Work (After EVERY Major Step):**
|
|
840
|
-
|
|
841
|
-
```bash
|
|
842
|
-
# Store progress in memory after each file operation
|
|
843
|
-
npx claude-flow@alpha hooks post-edit --file "[filepath]" --memory-key "swarm/[agent]/[step]"
|
|
844
|
-
|
|
845
|
-
# Store decisions and findings
|
|
846
|
-
npx claude-flow@alpha hooks notify --message "[what was done]" --telemetry true
|
|
847
|
-
|
|
848
|
-
# Check coordination with other agents
|
|
849
|
-
npx claude-flow@alpha hooks pre-search --query "[what to check]" --cache-results true
|
|
850
|
-
```
|
|
851
|
-
|
|
852
|
-
**3️⃣ AFTER Completing Work:**
|
|
853
|
-
|
|
142
|
+
#### Session Management
|
|
854
143
|
```bash
|
|
855
|
-
#
|
|
856
|
-
npx claude-flow
|
|
857
|
-
npx claude-flow@alpha hooks session-end --export-metrics true --generate-summary true
|
|
858
|
-
```
|
|
859
|
-
|
|
860
|
-
### 🎯 AGENT PROMPT TEMPLATE
|
|
861
|
-
|
|
862
|
-
When spawning agents, ALWAYS include these coordination instructions:
|
|
863
|
-
|
|
864
|
-
```
|
|
865
|
-
You are the [Agent Type] agent in a coordinated swarm.
|
|
866
|
-
|
|
867
|
-
MANDATORY COORDINATION:
|
|
868
|
-
1. START: Run `npx claude-flow@alpha hooks pre-task --description "[your task]"`
|
|
869
|
-
2. DURING: After EVERY file operation, run `npx claude-flow@alpha hooks post-edit --file "[file]" --memory-key "agent/[step]"`
|
|
870
|
-
3. MEMORY: Store ALL decisions using `npx claude-flow@alpha hooks notify --message "[decision]"`
|
|
871
|
-
4. END: Run `npx claude-flow@alpha hooks post-task --task-id "[task]" --analyze-performance true`
|
|
872
|
-
|
|
873
|
-
Your specific task: [detailed task description]
|
|
874
|
-
|
|
875
|
-
REMEMBER: Coordinate with other agents by checking memory BEFORE making decisions!
|
|
876
|
-
```
|
|
877
|
-
|
|
878
|
-
### ⚡ PARALLEL EXECUTION IS MANDATORY
|
|
879
|
-
|
|
880
|
-
**THIS IS WRONG ❌ (Sequential - NEVER DO THIS):**
|
|
881
|
-
|
|
882
|
-
```
|
|
883
|
-
Message 1: Initialize swarm
|
|
884
|
-
Message 2: Spawn agent 1
|
|
885
|
-
Message 3: Spawn agent 2
|
|
886
|
-
Message 4: TodoWrite (single todo)
|
|
887
|
-
Message 5: Create file 1
|
|
888
|
-
Message 6: TodoWrite (another single todo)
|
|
889
|
-
```
|
|
890
|
-
|
|
891
|
-
**THIS IS CORRECT ✅ (Parallel - ALWAYS DO THIS):**
|
|
892
|
-
|
|
893
|
-
```
|
|
894
|
-
Message 1: [BatchTool]
|
|
895
|
-
// MCP coordination setup
|
|
896
|
-
- mcp__claude-flow__swarm_init
|
|
897
|
-
- mcp__claude-flow__agent_spawn (researcher)
|
|
898
|
-
- mcp__claude-flow__agent_spawn (coder)
|
|
899
|
-
- mcp__claude-flow__agent_spawn (code-analyzer)
|
|
900
|
-
- mcp__claude-flow__agent_spawn (tester)
|
|
901
|
-
- mcp__claude-flow__agent_spawn (task-orchestrator)
|
|
902
|
-
|
|
903
|
-
Message 2: [BatchTool - Claude Code execution]
|
|
904
|
-
// Task agents with full coordination instructions
|
|
905
|
-
- Task("You are researcher agent. MANDATORY: Run hooks pre-task, post-edit, post-task. Task: Research API patterns")
|
|
906
|
-
- Task("You are coder agent. MANDATORY: Run hooks pre-task, post-edit, post-task. Task: Implement REST endpoints")
|
|
907
|
-
- Task("You are code-analyzer agent. MANDATORY: Run hooks pre-task, post-edit, post-task. Task: Analyze performance")
|
|
908
|
-
- Task("You are tester agent. MANDATORY: Run hooks pre-task, post-edit, post-task. Task: Write comprehensive tests")
|
|
909
|
-
|
|
910
|
-
// TodoWrite with ALL todos batched
|
|
911
|
-
- TodoWrite { todos: [
|
|
912
|
-
{id: "research", content: "Research API patterns", status: "in_progress", priority: "high"},
|
|
913
|
-
{id: "design", content: "Design database schema", status: "pending", priority: "high"},
|
|
914
|
-
{id: "implement", content: "Build REST endpoints", status: "pending", priority: "high"},
|
|
915
|
-
{id: "test", content: "Write unit tests", status: "pending", priority: "medium"},
|
|
916
|
-
{id: "docs", content: "Create API documentation", status: "pending", priority: "low"},
|
|
917
|
-
{id: "deploy", content: "Setup deployment", status: "pending", priority: "medium"}
|
|
918
|
-
]}
|
|
919
|
-
|
|
920
|
-
// File operations in parallel
|
|
921
|
-
- Write "api/package.json"
|
|
922
|
-
- Write "api/server.js"
|
|
923
|
-
- Write "api/routes/users.js"
|
|
924
|
-
- Bash "mkdir -p api/{routes,models,tests}"
|
|
925
|
-
```
|
|
926
|
-
|
|
927
|
-
### 🎯 MANDATORY SWARM PATTERN
|
|
928
|
-
|
|
929
|
-
When given ANY complex task with swarms:
|
|
930
|
-
|
|
931
|
-
```
|
|
932
|
-
STEP 1: IMMEDIATE PARALLEL SPAWN (Single Message!)
|
|
933
|
-
[BatchTool]:
|
|
934
|
-
// IMPORTANT: Check CLI args for agent count, otherwise auto-decide based on task complexity
|
|
935
|
-
- mcp__claude-flow__swarm_init {
|
|
936
|
-
topology: "hierarchical",
|
|
937
|
-
maxAgents: CLI_ARGS.agents || AUTO_DECIDE(task_complexity), // Use CLI args or auto-decide
|
|
938
|
-
strategy: "parallel"
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
// Spawn agents based on maxAgents count and task requirements
|
|
942
|
-
// If CLI specifies 3 agents, spawn 3. If no args, auto-decide optimal count (3-12)
|
|
943
|
-
- mcp__claude-flow__agent_spawn { type: "system-architect", name: "System Designer" }
|
|
944
|
-
- mcp__claude-flow__agent_spawn { type: "coder", name: "API Developer" }
|
|
945
|
-
- mcp__claude-flow__agent_spawn { type: "coder", name: "Frontend Dev" }
|
|
946
|
-
- mcp__claude-flow__agent_spawn { type: "code-analyzer", name: "DB Designer" }
|
|
947
|
-
- mcp__claude-flow__agent_spawn { type: "tester", name: "QA Engineer" }
|
|
948
|
-
- mcp__claude-flow__agent_spawn { type: "researcher", name: "Tech Lead" }
|
|
949
|
-
- mcp__claude-flow__agent_spawn { type: "task-orchestrator", name: "PM" }
|
|
950
|
-
- TodoWrite { todos: [multiple todos at once] }
|
|
951
|
-
|
|
952
|
-
STEP 2: PARALLEL TASK EXECUTION (Single Message!)
|
|
953
|
-
[BatchTool]:
|
|
954
|
-
- mcp__claude-flow__task_orchestrate { task: "main task", strategy: "parallel" }
|
|
955
|
-
- mcp__claude-flow__memory_usage { action: "store", key: "init", value: {...} }
|
|
956
|
-
- Multiple Read operations
|
|
957
|
-
- Multiple Write operations
|
|
958
|
-
- Multiple Bash commands
|
|
959
|
-
|
|
960
|
-
STEP 3: CONTINUE PARALLEL WORK (Never Sequential!)
|
|
961
|
-
```
|
|
962
|
-
|
|
963
|
-
### 📊 VISUAL TASK TRACKING FORMAT
|
|
964
|
-
|
|
965
|
-
Use this format when displaying task progress:
|
|
966
|
-
|
|
967
|
-
```
|
|
968
|
-
📊 Progress Overview
|
|
969
|
-
├── Total Tasks: X
|
|
970
|
-
├── ✅ Completed: X (X%)
|
|
971
|
-
├── 🔄 In Progress: X (X%)
|
|
972
|
-
├── ⭕ Todo: X (X%)
|
|
973
|
-
└── ❌ Blocked: X (X%)
|
|
974
|
-
|
|
975
|
-
📋 Todo (X)
|
|
976
|
-
└── 🔴 001: [Task description] [PRIORITY] ▶
|
|
977
|
-
|
|
978
|
-
🔄 In progress (X)
|
|
979
|
-
├── 🟡 002: [Task description] ↳ X deps ▶
|
|
980
|
-
└── 🔴 003: [Task description] [PRIORITY] ▶
|
|
981
|
-
|
|
982
|
-
✅ Completed (X)
|
|
983
|
-
├── ✅ 004: [Task description]
|
|
984
|
-
└── ... (more completed tasks)
|
|
985
|
-
|
|
986
|
-
Priority indicators: 🔴 HIGH/CRITICAL, 🟡 MEDIUM, 🟢 LOW
|
|
987
|
-
Dependencies: ↳ X deps | Actionable: ▶
|
|
988
|
-
```
|
|
989
|
-
|
|
990
|
-
### 🎯 REAL EXAMPLE: Full-Stack App Development
|
|
991
|
-
|
|
992
|
-
**Task**: "Build a complete REST API with authentication, database, and tests"
|
|
993
|
-
|
|
994
|
-
**🚨 MANDATORY APPROACH - Everything in Parallel:**
|
|
995
|
-
|
|
996
|
-
```javascript
|
|
997
|
-
// ✅ CORRECT: SINGLE MESSAGE with ALL operations
|
|
998
|
-
[BatchTool - Message 1]:
|
|
999
|
-
// Initialize and spawn ALL agents at once
|
|
1000
|
-
mcp__claude-flow__swarm_init { topology: "hierarchical", maxAgents: 8, strategy: "parallel" }
|
|
1001
|
-
mcp__claude-flow__agent_spawn { type: "system-architect", name: "System Designer" }
|
|
1002
|
-
mcp__claude-flow__agent_spawn { type: "coder", name: "API Developer" }
|
|
1003
|
-
mcp__claude-flow__agent_spawn { type: "coder", name: "Auth Expert" }
|
|
1004
|
-
mcp__claude-flow__agent_spawn { type: "code-analyzer", name: "DB Designer" }
|
|
1005
|
-
mcp__claude-flow__agent_spawn { type: "tester", name: "Test Engineer" }
|
|
1006
|
-
mcp__claude-flow__agent_spawn { type: "task-orchestrator", name: "Lead" }
|
|
1007
|
-
|
|
1008
|
-
// Update ALL todos at once - NEVER split todos!
|
|
1009
|
-
TodoWrite { todos: [
|
|
1010
|
-
{ id: "design", content: "Design API architecture", status: "in_progress", priority: "high" },
|
|
1011
|
-
{ id: "auth", content: "Implement authentication", status: "pending", priority: "high" },
|
|
1012
|
-
{ id: "db", content: "Design database schema", status: "pending", priority: "high" },
|
|
1013
|
-
{ id: "api", content: "Build REST endpoints", status: "pending", priority: "high" },
|
|
1014
|
-
{ id: "tests", content: "Write comprehensive tests", status: "pending", priority: "medium" },
|
|
1015
|
-
{ id: "docs", content: "Document API endpoints", status: "pending", priority: "low" },
|
|
1016
|
-
{ id: "deploy", content: "Setup deployment pipeline", status: "pending", priority: "medium" },
|
|
1017
|
-
{ id: "monitor", content: "Add monitoring", status: "pending", priority: "medium" }
|
|
1018
|
-
]}
|
|
1019
|
-
|
|
1020
|
-
// Start orchestration
|
|
1021
|
-
mcp__claude-flow__task_orchestrate { task: "Build REST API", strategy: "parallel" }
|
|
1022
|
-
|
|
1023
|
-
// Store initial memory
|
|
1024
|
-
mcp__claude-flow__memory_usage { action: "store", key: "project/init", value: { started: Date.now() } }
|
|
1025
|
-
|
|
1026
|
-
[BatchTool - Message 2]:
|
|
1027
|
-
// Create ALL directories at once
|
|
1028
|
-
Bash("mkdir -p test-app/{src,tests,docs,config}")
|
|
1029
|
-
Bash("mkdir -p test-app/src/{models,routes,middleware,services}")
|
|
1030
|
-
Bash("mkdir -p test-app/tests/{unit,integration}")
|
|
1031
|
-
|
|
1032
|
-
// Write ALL base files at once
|
|
1033
|
-
Write("test-app/package.json", packageJsonContent)
|
|
1034
|
-
Write("test-app/.env.example", envContent)
|
|
1035
|
-
Write("test-app/README.md", readmeContent)
|
|
1036
|
-
Write("test-app/src/server.js", serverContent)
|
|
1037
|
-
Write("test-app/src/config/database.js", dbConfigContent)
|
|
1038
|
-
|
|
1039
|
-
[BatchTool - Message 3]:
|
|
1040
|
-
// Read multiple files for context
|
|
1041
|
-
Read("test-app/package.json")
|
|
1042
|
-
Read("test-app/src/server.js")
|
|
1043
|
-
Read("test-app/.env.example")
|
|
1044
|
-
|
|
1045
|
-
// Run multiple commands
|
|
1046
|
-
Bash("cd test-app && npm install")
|
|
1047
|
-
Bash("cd test-app && npm run lint")
|
|
1048
|
-
Bash("cd test-app && npm test")
|
|
144
|
+
# Generate summaries and persist state
|
|
145
|
+
npx claude-flow-novice hooks session-end --generate-summary true --persist-state true --export-metrics true
|
|
1049
146
|
```
|
|
1050
|
-
|
|
1051
|
-
### 🚫 NEVER DO THIS (Sequential = WRONG):
|
|
1052
|
-
|
|
1053
|
-
```javascript
|
|
1054
|
-
// ❌ WRONG: Multiple messages, one operation each
|
|
1055
|
-
Message 1: mcp__claude-flow__swarm_init
|
|
1056
|
-
Message 2: mcp__claude-flow__agent_spawn (just one agent)
|
|
1057
|
-
Message 3: mcp__claude-flow__agent_spawn (another agent)
|
|
1058
|
-
Message 4: TodoWrite (single todo)
|
|
1059
|
-
Message 5: Write (single file)
|
|
1060
|
-
// This is 5x slower and wastes swarm coordination!
|
|
1061
|
-
```
|
|
1062
|
-
|
|
1063
|
-
### 🔄 MEMORY COORDINATION PATTERN
|
|
1064
|
-
|
|
1065
|
-
Every agent coordination step MUST use memory:
|
|
1066
|
-
|
|
1067
|
-
```
|
|
1068
|
-
// After each major decision or implementation
|
|
1069
|
-
mcp__claude-flow__memory_usage
|
|
1070
|
-
action: "store"
|
|
1071
|
-
key: "swarm-{id}/agent-{name}/{step}"
|
|
1072
|
-
value: {
|
|
1073
|
-
timestamp: Date.now(),
|
|
1074
|
-
decision: "what was decided",
|
|
1075
|
-
implementation: "what was built",
|
|
1076
|
-
nextSteps: ["step1", "step2"],
|
|
1077
|
-
dependencies: ["dep1", "dep2"]
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
// To retrieve coordination data
|
|
1081
|
-
mcp__claude-flow__memory_usage
|
|
1082
|
-
action: "retrieve"
|
|
1083
|
-
key: "swarm-{id}/agent-{name}/{step}"
|
|
1084
|
-
|
|
1085
|
-
// To check all swarm progress
|
|
1086
|
-
mcp__claude-flow__memory_usage
|
|
1087
|
-
action: "list"
|
|
1088
|
-
pattern: "swarm-{id}/*"
|
|
1089
|
-
```
|
|
1090
|
-
|
|
1091
|
-
### ⚡ PERFORMANCE TIPS
|
|
1092
|
-
|
|
1093
|
-
1. **Batch Everything**: Never operate on single files when multiple are needed
|
|
1094
|
-
2. **Parallel First**: Always think "what can run simultaneously?"
|
|
1095
|
-
3. **Memory is Key**: Use memory for ALL cross-agent coordination
|
|
1096
|
-
4. **Monitor Progress**: Use mcp**claude-flow**swarm_monitor for real-time tracking
|
|
1097
|
-
5. **Auto-Optimize**: Let hooks handle topology and agent selection
|
|
1098
|
-
|
|
1099
|
-
### 🎨 VISUAL SWARM STATUS
|
|
1100
|
-
|
|
1101
|
-
When showing swarm status, use this format:
|
|
1102
|
-
|
|
1103
|
-
```
|
|
1104
|
-
🐝 Swarm Status: ACTIVE
|
|
1105
|
-
├── 🏗️ Topology: hierarchical
|
|
1106
|
-
├── 👥 Agents: 6/8 active
|
|
1107
|
-
├── ⚡ Mode: parallel execution
|
|
1108
|
-
├── 📊 Tasks: 12 total (4 complete, 6 in-progress, 2 pending)
|
|
1109
|
-
└── 🧠 Memory: 15 coordination points stored
|
|
1110
|
-
|
|
1111
|
-
Agent Activity:
|
|
1112
|
-
├── 🟢 system-architect: Designing database schema...
|
|
1113
|
-
├── 🟢 coder-1: Implementing auth endpoints...
|
|
1114
|
-
├── 🟢 coder-2: Building user CRUD operations...
|
|
1115
|
-
├── 🟢 code-analyzer: Optimizing query performance...
|
|
1116
|
-
├── 🟡 tester: Waiting for auth completion...
|
|
1117
|
-
└── 🟢 task-orchestrator: Monitoring progress...
|
|
1118
|
-
```
|
|
1119
|
-
|
|
1120
|
-
## 📝 CRITICAL: TODOWRITE AND TASK TOOL BATCHING
|
|
1121
|
-
|
|
1122
|
-
### 🚨 MANDATORY BATCHING RULES FOR TODOS AND TASKS
|
|
1123
|
-
|
|
1124
|
-
**TodoWrite Tool Requirements:**
|
|
1125
|
-
|
|
1126
|
-
1. **ALWAYS** include 5-10+ todos in a SINGLE TodoWrite call
|
|
1127
|
-
2. **NEVER** call TodoWrite multiple times in sequence
|
|
1128
|
-
3. **BATCH** all todo updates together - status changes, new todos, completions
|
|
1129
|
-
4. **INCLUDE** all priority levels (high, medium, low) in one call
|
|
1130
|
-
|
|
1131
|
-
**Task Tool Requirements:**
|
|
1132
|
-
|
|
1133
|
-
1. **SPAWN** all agents using Task tool in ONE message
|
|
1134
|
-
2. **NEVER** spawn agents one by one across multiple messages
|
|
1135
|
-
3. **INCLUDE** full task descriptions and coordination instructions
|
|
1136
|
-
4. **BATCH** related Task calls together for parallel execution
|
|
1137
|
-
|
|
1138
|
-
**Example of CORRECT TodoWrite usage:**
|
|
1139
|
-
|
|
1140
|
-
```javascript
|
|
1141
|
-
// ✅ CORRECT - All todos in ONE call
|
|
1142
|
-
TodoWrite { todos: [
|
|
1143
|
-
{ id: "1", content: "Initialize system", status: "completed", priority: "high" },
|
|
1144
|
-
{ id: "2", content: "Analyze requirements", status: "in_progress", priority: "high" },
|
|
1145
|
-
{ id: "3", content: "Design architecture", status: "pending", priority: "high" },
|
|
1146
|
-
{ id: "4", content: "Implement core", status: "pending", priority: "high" },
|
|
1147
|
-
{ id: "5", content: "Build features", status: "pending", priority: "medium" },
|
|
1148
|
-
{ id: "6", content: "Write tests", status: "pending", priority: "medium" },
|
|
1149
|
-
{ id: "7", content: "Add monitoring", status: "pending", priority: "medium" },
|
|
1150
|
-
{ id: "8", content: "Documentation", status: "pending", priority: "low" },
|
|
1151
|
-
{ id: "9", content: "Performance tuning", status: "pending", priority: "low" },
|
|
1152
|
-
{ id: "10", content: "Deploy to production", status: "pending", priority: "high" }
|
|
1153
|
-
]}
|
|
1154
|
-
```
|
|
1155
|
-
|
|
1156
|
-
**Example of WRONG TodoWrite usage:**
|
|
1157
|
-
|
|
147
|
+
**Claude Code's Task tool is the PRIMARY way to spawn agents:**
|
|
1158
148
|
```javascript
|
|
1159
|
-
//
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
-
|
|
1172
|
-
-
|
|
1173
|
-
-
|
|
1174
|
-
-
|
|
1175
|
-
-
|
|
1176
|
-
|
|
1177
|
-
##
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
149
|
+
// ✅ CORRECT: Use Claude Code's Task tool for parallel agent execution
|
|
150
|
+
[Single Message]:
|
|
151
|
+
Task("Research agent", "Analyze requirements and patterns...", "researcher")
|
|
152
|
+
Task("Coder agent", "Implement core features...", "coder")
|
|
153
|
+
Task("Tester agent", "Create comprehensive tests...", "tester")
|
|
154
|
+
Task("Reviewer agent", "Review code quality...", "reviewer")
|
|
155
|
+
Task("Architect agent", "Design system architecture...", "system-architect")
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**MCP tools are ONLY for coordination setup:**
|
|
159
|
+
### MCP Integration
|
|
160
|
+
**TRIGGER WORDS: SWARM, SPAWN, COORDINATE, TEAM**
|
|
161
|
+
- `mcp__claude-flow-novice__swarm_init` - Initialize coordination topology
|
|
162
|
+
- `mcp__claude-flow-novice__agent_spawn` - Define agent types for coordination
|
|
163
|
+
- `mcp__claude-flow-novice__task_orchestrate` - Orchestrate high-level workflows
|
|
164
|
+
- **Monitoring**: `swarm_status`, `agent_metrics`, `task_results`
|
|
165
|
+
- **Memory**: `memory_usage`, `memory_search`
|
|
166
|
+
|
|
167
|
+
## File Organization
|
|
168
|
+
- **Never save working files to root**
|
|
169
|
+
|
|
170
|
+
# Add MCP server
|
|
171
|
+
claude mcp add claude-flow-novice npx claude-flow-novice mcp start
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
## Essential Commands
|
|
175
|
+
- `npx claude-flow-novice status` - System health
|
|
176
|
+
- `npx claude-flow-novice --help` - Available commands
|
|
177
|
+
- `/fullstack "goal"` - Launch full-stack development team with consensus validation
|
|
178
|
+
- `/swarm`, `/sparc`, `/hooks` - Other slash commands (auto-discovered)
|
|
179
|
+
|
|
180
|
+
## DEVELOPMENT FLOW
|
|
181
|
+
1. Execute - Primary swarm (3-8 agents) produces deliverables with confidence score
|
|
182
|
+
1a. Only when the swarm believes its done move to step 2.
|
|
183
|
+
1b. If swarm does not believe it's done (confidence scores < 75%, repeat step 1)
|
|
184
|
+
2. Verify - Consensus swarm (2-4 validators) runs comprehensive checks with Byzantine voting
|
|
185
|
+
3. Decision - PASS (≥90% agreement + critical criteria) OR FAIL
|
|
186
|
+
4. Action -
|
|
187
|
+
- PASS → Store results → Move to next task
|
|
188
|
+
- FAIL → Round++ → If <10: inject feedback → Relaunch swarm | If ≥10: Escalate to human
|
|
189
|
+
5. Repeat - Iterative improvement with accumulated context from all previous rounds
|
|
190
|
+
6. Escalate - Full history + feedback + recommendations after 10 rounds
|