claude-flow 2.5.0-alpha.141 → 2.7.0-alpha

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.
Files changed (149) hide show
  1. package/.claude/agents/reasoning/README.md +171 -0
  2. package/.claude/agents/reasoning/agent.md +816 -0
  3. package/.claude/agents/reasoning/example-reasoning-agent-template.md +362 -0
  4. package/.claude/agents/reasoning/goal-planner.md +73 -0
  5. package/.claude/commands/coordination/README.md +9 -0
  6. package/.claude/commands/memory/README.md +9 -0
  7. package/.claude/settings.json +3 -3
  8. package/.claude/sparc-modes.json +108 -0
  9. package/README.md +1 -6
  10. package/bin/claude-flow +1 -1
  11. package/dist/src/cli/command-registry.js +70 -6
  12. package/dist/src/cli/command-registry.js.map +1 -1
  13. package/dist/src/cli/help-formatter.js +0 -3
  14. package/dist/src/cli/help-formatter.js.map +1 -1
  15. package/dist/src/cli/help-text.js +53 -5
  16. package/dist/src/cli/help-text.js.map +1 -1
  17. package/dist/src/cli/simple-cli.js +182 -172
  18. package/dist/src/cli/simple-cli.js.map +1 -1
  19. package/dist/src/cli/simple-commands/agent-booster.js +415 -0
  20. package/dist/src/cli/simple-commands/agent-booster.js.map +1 -0
  21. package/dist/src/cli/simple-commands/agent.js +856 -13
  22. package/dist/src/cli/simple-commands/agent.js.map +1 -1
  23. package/dist/src/cli/simple-commands/env-template.js +180 -0
  24. package/dist/src/cli/simple-commands/env-template.js.map +1 -0
  25. package/dist/src/cli/simple-commands/init/help.js +23 -0
  26. package/dist/src/cli/simple-commands/init/help.js.map +1 -1
  27. package/dist/src/cli/simple-commands/init/index.js +63 -0
  28. package/dist/src/cli/simple-commands/init/index.js.map +1 -1
  29. package/dist/src/cli/simple-commands/memory.js +307 -16
  30. package/dist/src/cli/simple-commands/memory.js.map +1 -1
  31. package/dist/src/cli/simple-commands/proxy.js +304 -0
  32. package/dist/src/cli/simple-commands/proxy.js.map +1 -0
  33. package/dist/src/cli/simple-commands/sparc.js +16 -19
  34. package/dist/src/cli/simple-commands/sparc.js.map +1 -1
  35. package/dist/src/cli/validation-helper.js.map +1 -1
  36. package/dist/src/core/version.js +1 -1
  37. package/dist/src/execution/agent-executor.js +181 -0
  38. package/dist/src/execution/agent-executor.js.map +1 -0
  39. package/dist/src/execution/index.js +12 -0
  40. package/dist/src/execution/index.js.map +1 -0
  41. package/dist/src/execution/provider-manager.js +110 -0
  42. package/dist/src/execution/provider-manager.js.map +1 -0
  43. package/dist/src/hooks/redaction-hook.js +89 -0
  44. package/dist/src/hooks/redaction-hook.js.map +1 -0
  45. package/dist/src/memory/swarm-memory.js +340 -421
  46. package/dist/src/memory/swarm-memory.js.map +1 -1
  47. package/dist/src/utils/key-redactor.js +108 -0
  48. package/dist/src/utils/key-redactor.js.map +1 -0
  49. package/dist/src/utils/metrics-reader.js +37 -39
  50. package/dist/src/utils/metrics-reader.js.map +1 -1
  51. package/docs/AGENT-BOOSTER-INTEGRATION.md +407 -0
  52. package/docs/AGENTIC-FLOW-INTEGRATION-GUIDE.md +753 -0
  53. package/docs/AGENTIC_FLOW_EXECUTION_FIX_REPORT.md +474 -0
  54. package/docs/AGENTIC_FLOW_INTEGRATION_STATUS.md +143 -0
  55. package/docs/AGENTIC_FLOW_MVP_COMPLETE.md +367 -0
  56. package/docs/AGENTIC_FLOW_SECURITY_TEST_REPORT.md +369 -0
  57. package/docs/COMMAND-VERIFICATION-REPORT.md +441 -0
  58. package/docs/COMMIT_SUMMARY.md +247 -0
  59. package/docs/DEEP_REVIEW_COMPREHENSIVE_REPORT.md +922 -0
  60. package/docs/DOCKER-VALIDATION-REPORT.md +281 -0
  61. package/docs/ENV-SETUP-GUIDE.md +270 -0
  62. package/docs/FINAL_PRE_PUBLISH_VALIDATION.md +823 -0
  63. package/docs/FINAL_VALIDATION_REPORT.md +165 -0
  64. package/docs/HOOKS-V2-MODIFICATION.md +146 -0
  65. package/docs/INDEX.md +568 -0
  66. package/docs/INTEGRATION_COMPLETE.md +414 -0
  67. package/docs/MEMORY_REDACTION_TEST_REPORT.md +300 -0
  68. package/docs/PERFORMANCE-SYSTEMS-STATUS.md +340 -0
  69. package/docs/PRE_RELEASE_FIXES_REPORT.md +435 -0
  70. package/docs/README.md +35 -0
  71. package/docs/REASONING-AGENTS.md +482 -0
  72. package/docs/REASONINGBANK-AGENT-CREATION-GUIDE.md +813 -0
  73. package/docs/REASONINGBANK-ANALYSIS-COMPLETE.md +479 -0
  74. package/docs/REASONINGBANK-BENCHMARK-RESULTS.md +166 -0
  75. package/docs/REASONINGBANK-BENCHMARK.md +396 -0
  76. package/docs/REASONINGBANK-CLI-INTEGRATION.md +455 -0
  77. package/docs/REASONINGBANK-CORE-INTEGRATION.md +658 -0
  78. package/docs/REASONINGBANK-COST-OPTIMIZATION.md +329 -0
  79. package/docs/REASONINGBANK-DEMO.md +419 -0
  80. package/docs/REASONINGBANK-INTEGRATION-COMPLETE.md +249 -0
  81. package/docs/REASONINGBANK-VALIDATION.md +532 -0
  82. package/docs/REASONINGBANK_ARCHITECTURE.md +475 -0
  83. package/docs/REASONINGBANK_INTEGRATION_COMPLETE.md +558 -0
  84. package/docs/REASONINGBANK_INTEGRATION_PLAN.md +1188 -0
  85. package/docs/REGRESSION-ANALYSIS-REPORT.md +500 -0
  86. package/docs/RELEASE_v2.6.0-alpha.2.md +658 -0
  87. package/docs/api/API_DOCUMENTATION.md +721 -0
  88. package/docs/architecture/ARCHITECTURE.md +1690 -0
  89. package/docs/ci-cd/README.md +368 -0
  90. package/docs/development/DEPLOYMENT.md +2348 -0
  91. package/docs/development/DEVELOPMENT_WORKFLOW.md +1333 -0
  92. package/docs/development/build-analysis-report.md +252 -0
  93. package/docs/development/pair-optimization.md +156 -0
  94. package/docs/development/token-tracking-status.md +103 -0
  95. package/docs/development/training-pipeline-demo.md +163 -0
  96. package/docs/development/training-pipeline-real-only.md +196 -0
  97. package/docs/epic-sdk-integration.md +1269 -0
  98. package/docs/experimental/RIEMANN_HYPOTHESIS_PROOF.md +124 -0
  99. package/docs/experimental/computational_verification.py +436 -0
  100. package/docs/experimental/novel_approaches.md +560 -0
  101. package/docs/experimental/riemann_hypothesis_analysis.md +263 -0
  102. package/docs/experimental/riemann_proof_attempt.md +124 -0
  103. package/docs/experimental/riemann_synthesis.md +277 -0
  104. package/docs/experimental/verification_results.json +12 -0
  105. package/docs/experimental/visualization_insights.md +720 -0
  106. package/docs/guides/USER_GUIDE.md +1138 -0
  107. package/docs/guides/token-tracking-guide.md +291 -0
  108. package/docs/reference/AGENTS.md +1011 -0
  109. package/docs/reference/MCP_TOOLS.md +2188 -0
  110. package/docs/reference/SPARC.md +717 -0
  111. package/docs/reference/SWARM.md +2000 -0
  112. package/docs/sdk/CLAUDE-CODE-SDK-DEEP-ANALYSIS.md +649 -0
  113. package/docs/sdk/CLAUDE-FLOW-SDK-INTEGRATION-ANALYSIS.md +242 -0
  114. package/docs/sdk/INTEGRATION-ROADMAP.md +420 -0
  115. package/docs/sdk/MCP-TOOLS-UPDATE.md +270 -0
  116. package/docs/sdk/SDK-ADVANCED-FEATURES-INTEGRATION.md +723 -0
  117. package/docs/sdk/SDK-ALL-FEATURES-INTEGRATION-MATRIX.md +612 -0
  118. package/docs/sdk/SDK-INTEGRATION-COMPLETE.md +358 -0
  119. package/docs/sdk/SDK-INTEGRATION-PHASES-V2.5.md +750 -0
  120. package/docs/sdk/SDK-LEVERAGE-REAL-FEATURES.md +676 -0
  121. package/docs/sdk/SDK-VALIDATION-RESULTS.md +400 -0
  122. package/docs/sdk/epic-sdk-integration.md +1269 -0
  123. package/docs/setup/remote-setup.md +93 -0
  124. package/docs/validation/final-validation-summary.md +220 -0
  125. package/docs/validation/verification-integration.md +190 -0
  126. package/docs/validation/verification-validation.md +349 -0
  127. package/docs/wiki/background-commands.md +1213 -0
  128. package/docs/wiki/session-persistence.md +342 -0
  129. package/docs/wiki/stream-chain-command.md +537 -0
  130. package/package.json +4 -2
  131. package/src/cli/command-registry.js +70 -5
  132. package/src/cli/help-text.js +26 -5
  133. package/src/cli/simple-cli.ts +18 -7
  134. package/src/cli/simple-commands/agent-booster.js +515 -0
  135. package/src/cli/simple-commands/agent.js +1001 -12
  136. package/src/cli/simple-commands/agent.ts +137 -0
  137. package/src/cli/simple-commands/config.ts +127 -0
  138. package/src/cli/simple-commands/env-template.js +190 -0
  139. package/src/cli/simple-commands/init/help.js +23 -0
  140. package/src/cli/simple-commands/init/index.js +84 -6
  141. package/src/cli/simple-commands/memory.js +363 -16
  142. package/src/cli/simple-commands/proxy.js +384 -0
  143. package/src/cli/simple-commands/sparc.js +16 -19
  144. package/src/execution/agent-executor.ts +306 -0
  145. package/src/execution/index.ts +19 -0
  146. package/src/execution/provider-manager.ts +187 -0
  147. package/src/hooks/redaction-hook.ts +115 -0
  148. package/src/utils/key-redactor.js +178 -0
  149. package/src/utils/key-redactor.ts +184 -0
@@ -8,6 +8,7 @@ import { taskCommand } from './simple-commands/task.js';
8
8
  import { configCommand } from './simple-commands/config.js';
9
9
  import { statusCommand } from './simple-commands/status.js';
10
10
  import { mcpCommand } from './simple-commands/mcp.js';
11
+ import { proxyCommand } from './simple-commands/proxy.js';
11
12
  import { monitorCommand } from './simple-commands/monitor.js';
12
13
  import { startCommand } from './simple-commands/start.js';
13
14
  import { swarmCommand } from './simple-commands/swarm.js';
@@ -145,14 +146,77 @@ Benefits:
145
146
  });
146
147
  commandRegistry.set('agent', {
147
148
  handler: agentCommand,
148
- description: 'Manage AI agents and hierarchies',
149
+ description: 'Manage AI agents, memory, and agentic-flow integration (NEW in v2.6.0)',
149
150
  usage: 'agent <subcommand> [options]',
150
151
  examples: [
151
- 'agent spawn researcher --name "DataBot"',
152
- 'agent list --verbose',
153
- 'agent hierarchy create enterprise',
154
- 'agent ecosystem status'
155
- ]
152
+ 'agent run coder "Build REST API" --optimize # Multi-provider execution',
153
+ 'agent agents # List 66+ available agents',
154
+ 'agent memory init # Initialize ReasoningBank',
155
+ 'agent config wizard # Configure API keys',
156
+ 'agent mcp start --daemon # Start MCP server',
157
+ 'agent spawn researcher --name "DataBot" # Internal agent management'
158
+ ],
159
+ details: `
160
+ Agent management features:
161
+ • Multi-provider execution (Anthropic, OpenRouter, ONNX, Gemini)
162
+ • ReasoningBank memory system (70% → 88% success improvement)
163
+ • Model optimization (85-98% cost savings)
164
+ • MCP server management (213+ tools)
165
+ • Configuration management (API keys, models, settings)
166
+ • Custom agent creation and management
167
+ • Internal agent hierarchies and coordination
168
+
169
+ Subcommands:
170
+ run - Execute agents with multi-provider support
171
+ agents - List all 66+ available agents
172
+ create - Create custom agents
173
+ info - Show agent information
174
+ conflicts - Check for agent conflicts
175
+ memory - ReasoningBank memory management
176
+ config - Configuration management
177
+ mcp - MCP server management
178
+ spawn - Internal agent management
179
+ list - List internal agents
180
+
181
+ See 'claude-flow help agent' for full documentation.`
182
+ });
183
+ commandRegistry.set('proxy', {
184
+ handler: proxyCommand,
185
+ description: 'OpenRouter proxy server for 85-98% cost savings (NEW in v2.6.0)',
186
+ usage: 'proxy <subcommand> [options]',
187
+ examples: [
188
+ 'proxy start --daemon # Start proxy server',
189
+ 'proxy status --verbose # Check status',
190
+ 'proxy config # Configuration guide',
191
+ 'proxy logs --follow # View logs'
192
+ ],
193
+ details: `
194
+ OpenRouter Proxy Features:
195
+ • Transparent API translation (Anthropic → OpenRouter)
196
+ • 85-98% cost savings vs direct Anthropic API
197
+ • Works with Claude Code out of the box
198
+ • Zero code changes required
199
+ • Supports all OpenRouter models
200
+
201
+ Cost Savings Examples:
202
+ • Claude 3.5 Sonnet: $3.00 → $0.30 per million tokens (90% savings)
203
+ • Claude 3 Opus: $15.00 → $2.25 per million tokens (85% savings)
204
+ • DeepSeek R1: Free (100% savings)
205
+
206
+ Setup:
207
+ 1. Get OpenRouter API key: https://openrouter.ai/keys
208
+ 2. claude-flow agent config set OPENROUTER_API_KEY sk-or-xxx
209
+ 3. claude-flow proxy start --daemon
210
+ 4. export ANTHROPIC_BASE_URL=http://localhost:8080
211
+ 5. Use Claude Code normally → automatic savings!
212
+
213
+ Commands:
214
+ start - Start proxy server
215
+ stop - Stop proxy server
216
+ restart - Restart proxy server
217
+ status - Get server status
218
+ logs - View server logs
219
+ config - Configuration guide`
156
220
  });
157
221
  commandRegistry.set('task', {
158
222
  handler: taskCommand,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/cli/command-registry.js"],"sourcesContent":["// command-registry.js - Extensible command registration system\nimport process from 'process';\nimport { initCommand } from './simple-commands/init/index.js';\nimport { memoryCommand } from './simple-commands/memory.js';\nimport { memoryConsolidationCommand } from './simple-commands/memory-consolidation.js';\nimport { sparcCommand } from './simple-commands/sparc.js';\nimport { agentCommand } from './simple-commands/agent.js';\nimport { taskCommand } from './simple-commands/task.js';\nimport { configCommand } from './simple-commands/config.js';\nimport { statusCommand } from './simple-commands/status.js';\nimport { mcpCommand } from './simple-commands/mcp.js';\nimport { monitorCommand } from './simple-commands/monitor.js';\nimport { startCommand } from './simple-commands/start.js';\nimport { swarmCommand } from './simple-commands/swarm.js';\nimport { batchManagerCommand } from './simple-commands/batch-manager.js';\nimport { githubCommand } from './simple-commands/github.js';\nimport { trainingAction } from './simple-commands/training.js';\nimport { analysisAction } from './simple-commands/analysis.js';\nimport { automationAction } from './simple-commands/automation.js';\nimport { coordinationAction } from './simple-commands/coordination.js';\nimport { hooksAction } from './simple-commands/hooks.js';\nimport { hookSafetyCommand } from './simple-commands/hook-safety.js';\nimport { hiveMindCommand } from './simple-commands/hive-mind.js';\nimport { HelpFormatter } from './help-formatter.js';\nimport hiveMindOptimizeCommand from './simple-commands/hive-mind-optimize.js';\nimport { neuralCommand } from './simple-commands/neural.js';\nimport { goalCommand } from './simple-commands/goal.js';\nimport {\n showUnifiedMetrics,\n fixTaskAttribution,\n} from './simple-commands/swarm-metrics-integration.js';\nimport { migrateHooksCommand, migrateHooksCommandConfig } from './simple-commands/migrate-hooks.js';\nimport {\n fixHookVariablesCommand,\n fixHookVariablesCommandConfig,\n} from './simple-commands/fix-hook-variables.js';\nimport { \n initializePerformanceTracking,\n trackCommandExecution \n} from './simple-commands/performance-hooks.js';\n// Maestro commands integrated with clean implementation\n// Note: Maestro TypeScript commands now integrated directly in ./commands/maestro.ts\n// Note: TypeScript imports commented out for Node.js compatibility\n// import { ruvSwarmAction } from './commands/ruv-swarm.ts';\n// import { configIntegrationAction } from './commands/config-integration.ts';\n\n// Command registry for extensible CLI\nexport const commandRegistry = new Map();\n\n// Register core commands\nexport function registerCoreCommands() {\n commandRegistry.set('init', {\n handler: initCommand,\n description: 'Initialize Claude Code integration files and SPARC development environment',\n usage: 'init [--force] [--minimal] [--sparc]',\n examples: [\n 'npx claude-flow@latest init --sparc # Recommended: Full SPARC setup',\n 'init --sparc # Initialize with SPARC modes',\n 'init --force --minimal # Minimal setup, overwrite existing',\n 'init --sparc --force # Force SPARC setup',\n ],\n details: `\nThe --sparc flag creates a complete development environment:\n • .roomodes file containing 17 specialized SPARC modes\n • CLAUDE.md for AI-readable project instructions\n • Pre-configured modes: architect, code, tdd, debug, security, and more\n • Ready for TDD workflows and automated code generation\n \nFirst-time users should run: npx claude-flow@latest init --sparc`,\n });\n\n commandRegistry.set('start', {\n handler: startCommand,\n description: 'Start the Claude-Flow orchestration system',\n usage: 'start [--daemon] [--port <port>] [--verbose] [--ui] [--web]',\n examples: [\n 'start # Start in interactive mode',\n 'start --daemon # Start as background daemon',\n 'start --port 8080 # Use custom MCP port',\n 'start --verbose # Show detailed system activity',\n 'start --ui # Launch terminal-based UI',\n 'start --web # Launch web-based UI',\n ],\n });\n\n // Add start-ui as a convenient alias for launching the UI\n commandRegistry.set('start-ui', {\n handler: async (args, flags) => {\n // Import and use the direct UI launcher\n const { launchUI } = await import('./simple-commands/start-ui.js');\n // Pass the full raw arguments from process.argv\n const fullArgs = process.argv.slice(3); // Skip node, script, and command\n return launchUI(fullArgs);\n },\n description: 'Start the UI interface (web UI by default)',\n usage: 'start-ui [--port <port>] [--terminal]',\n examples: [\n 'start-ui # Launch web-based UI (default)',\n 'start-ui --port 3000 # Use custom port',\n 'start-ui --terminal # Launch terminal-based UI instead',\n ],\n });\n\n commandRegistry.set('memory', {\n handler: memoryCommand,\n description: 'Memory management operations',\n usage: 'memory <subcommand> [options]',\n examples: [\n 'memory store key \"value\"',\n 'memory query search_term',\n 'memory stats',\n 'memory export backup.json',\n ],\n });\n\n commandRegistry.set('memory-consolidate', {\n handler: memoryConsolidationCommand,\n description: 'Consolidate fragmented memory stores into unified database',\n usage: 'memory-consolidate <command> [options]',\n examples: [\n 'memory-consolidate scan # Scan for all memory stores',\n 'memory-consolidate plan # Create consolidation plan',\n 'memory-consolidate execute --force # Execute consolidation',\n 'memory-consolidate report # Generate report',\n ],\n details: `\nMemory Consolidation Features:\n • Discovers all memory storage locations (JSON & SQLite)\n • Creates automatic backups before consolidation\n • Merges all stores into unified SQLite database\n • Optimizes with indices for better performance\n • Maintains backward compatibility\n \nBenefits:\n • Single source of truth for all memory data\n • Improved query performance with indices\n • Reduced disk fragmentation\n • Easier backup and restore\n • Cross-session persistence`,\n });\n\n commandRegistry.set('sparc', {\n handler: sparcCommand,\n description: 'SPARC development mode operations',\n usage: 'sparc [subcommand] [options]',\n examples: [\n 'sparc \"orchestrate full app development\" # Default: sparc orchestrator',\n 'sparc modes # List available modes',\n 'sparc run code \"implement feature\" # Run specific mode',\n 'sparc tdd \"feature description\" # TDD workflow',\n 'sparc info architect # Mode details',\n ],\n });\n\n // Note: Maestro commands are now handled by TypeScript module\n // See src/cli/commands/maestro.ts for the clean implementation\n commandRegistry.set('maestro', {\n handler: () => {\n console.log('⚠️ Maestro commands have been moved to TypeScript.');\n console.log('Please use: npx claude-flow maestro help');\n console.log('Or import from: ./commands/maestro.js after compilation');\n },\n description: 'Maestro: Specs-Driven Development with Hive Mind Integration',\n usage: 'maestro <subcommand> [options]',\n examples: [\n 'maestro create-spec my-feature --request \"Implement user auth\"',\n 'maestro generate-design my-feature',\n 'maestro generate-tasks my-feature',\n 'maestro implement-task my-feature 1',\n 'maestro approve-phase my-feature',\n 'maestro status my-feature --detailed',\n 'maestro init-steering api-design',\n 'maestro help',\n ],\n });\n\n commandRegistry.set('agent', {\n handler: agentCommand,\n description: 'Manage AI agents and hierarchies',\n usage: 'agent <subcommand> [options]',\n examples: [\n 'agent spawn researcher --name \"DataBot\"',\n 'agent list --verbose',\n 'agent hierarchy create enterprise',\n 'agent ecosystem status',\n ],\n });\n\n commandRegistry.set('task', {\n handler: taskCommand,\n description: 'Manage tasks and workflows',\n usage: 'task <subcommand> [options]',\n examples: [\n 'task create research \"Market analysis\"',\n 'task list --filter running',\n 'task workflow examples/dev-flow.json',\n 'task coordination status',\n ],\n });\n\n commandRegistry.set('config', {\n handler: configCommand,\n description: 'Manage system configuration',\n usage: 'config <subcommand> [options]',\n examples: [\n 'config init',\n 'config set terminal.poolSize 15',\n 'config get orchestrator.maxConcurrentTasks',\n 'config validate',\n ],\n });\n\n commandRegistry.set('status', {\n handler: statusCommand,\n description: 'Show system status and health',\n usage: 'status [--verbose] [--json]',\n examples: ['status', 'status --verbose', 'status --json'],\n });\n\n commandRegistry.set('mcp', {\n handler: mcpCommand,\n description: 'Manage MCP server and tools',\n usage: 'mcp <subcommand> [options]',\n examples: ['mcp status', 'mcp start --port 8080', 'mcp tools --verbose', 'mcp auth setup'],\n });\n\n commandRegistry.set('monitor', {\n handler: monitorCommand,\n description: 'Real-time system monitoring',\n usage: 'monitor [--watch] [--interval <ms>]',\n examples: [\n 'monitor',\n 'monitor --watch',\n 'monitor --interval 1000 --watch',\n 'monitor --format json',\n ],\n });\n\n commandRegistry.set('swarm', {\n handler: swarmCommand,\n description: 'Swarm-based AI agent coordination',\n usage: 'swarm <objective> [options]',\n examples: [\n 'swarm \"Build a REST API\"',\n 'swarm \"Research cloud architecture\" --strategy research',\n 'swarm \"Analyze data\" --max-agents 3 --parallel',\n 'swarm \"Development task\" --ui --monitor --background',\n ],\n });\n\n commandRegistry.set('hive-mind', {\n handler: hiveMindCommand,\n description: '🧠 Advanced Hive Mind swarm intelligence with collective decision-making',\n usage: 'hive-mind <subcommand> [options]',\n examples: [\n 'hive-mind init # Initialize hive mind system',\n 'hive-mind spawn \"Build microservices\" # Create swarm with objective',\n 'hive-mind wizard # Interactive setup wizard',\n 'hive-mind status # View active swarms',\n 'hive-mind consensus # View consensus decisions',\n 'hive-mind metrics # Performance analytics',\n ],\n customHelp: true, // Use command's own help function\n details: `\nHive Mind System Features:\n • Queen-led coordination with specialized worker agents\n • Collective memory and knowledge sharing\n • Consensus building for critical decisions \n • Auto-scaling based on workload\n • Parallel task execution with work stealing\n • Real-time monitoring and metrics\n • SQLite-backed persistence\n • MCP tool integration for 87+ operations\n\nQueen Types:\n • Strategic - Long-term planning and optimization\n • Tactical - Task prioritization and rapid response\n • Adaptive - Learning and strategy evolution\n\nWorker Types:\n • Researcher, Coder, Analyst, Tester\n • Architect, Reviewer, Optimizer, Documenter\n\nUse 'hive-mind wizard' for interactive setup or 'hive-mind help' for full documentation.`,\n });\n\n commandRegistry.set('hive-mind-optimize', {\n handler: hiveMindOptimizeCommand,\n description: '🔧 Optimize hive mind database for better performance',\n usage: 'hive-mind-optimize [options]',\n examples: [\n 'hive-mind-optimize # Interactive optimization wizard',\n 'hive-mind-optimize --auto # Auto-optimize with defaults',\n 'hive-mind-optimize --report # Generate optimization report',\n 'hive-mind-optimize --clean-memory --memory-days 60',\n 'hive-mind-optimize --auto --vacuum --archive-tasks',\n ],\n details: `\nHive Mind Database Optimization Features:\n • Safe, backward-compatible optimizations\n • Performance indexes for 50% faster queries\n • Memory cleanup and archiving\n • Task archival for space management\n • Behavioral pattern tracking\n • Database integrity checking\n \nOptimization Levels:\n • v1.0 → v1.1: Basic performance indexes\n • v1.1 → v1.2: Advanced query optimization\n • v1.2 → v1.3: Performance tracking tables\n • v1.3 → v1.4: Memory optimization features\n • v1.4 → v1.5: Behavioral analysis tracking\n\nSafety Features:\n • Automatic backups before major operations\n • All changes are backward-compatible\n • Existing data is always preserved\n • Rollback capability on errors`,\n });\n\n commandRegistry.set('swarm-metrics', {\n handler: async (args, flags) => {\n const subcommand = args[0];\n if (subcommand === 'fix') {\n return await fixTaskAttribution();\n } else {\n return await showUnifiedMetrics();\n }\n },\n description: 'Unified swarm metrics and task attribution diagnostics',\n usage: 'swarm-metrics [fix] [options]',\n examples: [\n 'swarm-metrics # Show unified metrics from all swarm systems',\n 'swarm-metrics fix # Fix task attribution issues between systems',\n ],\n details: `\nSwarm Metrics Integration Features:\n • Unified view of hive-mind and ruv-swarm metrics\n • Task attribution diagnosis and repair\n • Cross-system swarm performance comparison\n • Database integration status checking\n • Automatic sample task creation for empty swarms\n\nThis command helps resolve issues where:\n • Overall task statistics show correctly but per-swarm shows 0/0\n • Multiple swarm systems are not properly integrated\n • Task assignments are missing or incorrectly attributed\n\nUse 'swarm-metrics fix' to automatically repair attribution issues.`,\n });\n\n commandRegistry.set('batch', {\n handler: batchManagerCommand,\n description: 'Batch operation management and configuration utilities',\n usage: 'batch <command> [options]',\n examples: [\n 'batch create-config my-batch.json',\n 'batch create-config --interactive',\n 'batch validate-config my-batch.json',\n 'batch estimate my-batch.json',\n 'batch list-templates',\n 'batch list-environments',\n ],\n details: `\nBatch operations support:\n • Multiple project initialization with templates\n • Environment-specific configurations (dev, staging, prod)\n • Parallel processing with resource management\n • Progress tracking and detailed reporting\n • Configuration validation and estimation tools\n \nUse with init command:\n claude-flow init --batch-init project1,project2,project3\n claude-flow init --config batch-config.json --parallel`,\n });\n\n commandRegistry.set('github', {\n handler: githubCommand,\n description: 'GitHub workflow automation with 6 specialized modes',\n usage: 'github <mode> <objective> [options]',\n examples: [\n 'github pr-manager \"create feature PR with automated testing\"',\n 'github gh-coordinator \"setup CI/CD pipeline\" --auto-approve',\n 'github release-manager \"prepare v2.0.0 release\"',\n 'github repo-architect \"optimize repository structure\"',\n 'github issue-tracker \"analyze project roadmap issues\"',\n 'github sync-coordinator \"sync package versions across repos\"',\n ],\n details: `\nGitHub automation modes:\n • gh-coordinator: GitHub workflow orchestration and coordination\n • pr-manager: Pull request management with multi-reviewer coordination\n • issue-tracker: Issue management and project coordination\n • release-manager: Release coordination and deployment pipelines\n • repo-architect: Repository structure optimization\n • sync-coordinator: Multi-package synchronization and version alignment\n \nAdvanced features:\n • Multi-reviewer coordination with automated scheduling\n • Intelligent issue categorization and assignment\n • Automated testing integration and quality gates\n • Release pipeline orchestration with rollback capabilities`,\n });\n\n commandRegistry.set('training', {\n handler: trainingAction,\n description: 'Neural pattern learning and model updates',\n usage: 'training <command> [options]',\n examples: [\n 'training neural-train --data recent --model task-predictor',\n 'training pattern-learn --operation \"file-creation\" --outcome \"success\"',\n 'training model-update --agent-type coordinator --operation-result \"efficient\"',\n ],\n details: `\nNeural training commands:\n • neural-train: Train neural patterns from operations\n • pattern-learn: Learn from specific operation outcomes\n • model-update: Update agent models with new insights\n \nImproves task selection accuracy, agent performance prediction, and coordination efficiency.`,\n });\n\n commandRegistry.set('analysis', {\n handler: analysisAction,\n description: 'Performance and usage analytics',\n usage: 'analysis <command> [options]',\n examples: [\n 'analysis bottleneck-detect --scope system',\n 'analysis performance-report --timeframe 7d --format detailed',\n 'analysis token-usage --breakdown --cost-analysis',\n ],\n details: `\nAnalysis commands:\n • bottleneck-detect: Detect performance bottlenecks in the system\n • performance-report: Generate comprehensive performance reports\n • token-usage: Analyze token consumption and costs\n \nHelps with performance optimization, cost management, and resource allocation.`,\n });\n\n commandRegistry.set('automation', {\n handler: automationAction,\n description: 'Intelligent agent and workflow management with MLE-STAR and Claude integration',\n usage: 'automation <command> [options]',\n examples: [\n 'automation auto-agent --task-complexity enterprise --swarm-id swarm-123',\n 'automation smart-spawn --requirement \"web-development\" --max-agents 8',\n 'automation workflow-select --project-type api --priority speed',\n 'automation run-workflow my-workflow.json --claude --non-interactive',\n 'automation mle-star --dataset data/train.csv --target price --claude',\n ],\n details: `\nAutomation commands:\n • auto-agent: Automatically spawn optimal agents based on task complexity\n • smart-spawn: Intelligently spawn agents based on specific requirements\n • workflow-select: Select and configure optimal workflows for project types\n • run-workflow: Execute workflows from JSON/YAML files with Claude integration\n • mle-star: Run MLE-STAR Machine Learning Engineering workflow (flagship)\n \nNew features:\n • Claude CLI integration for actual execution\n • MLE-STAR methodology for ML engineering\n • Non-interactive mode for CI/CD integration\n • Comprehensive workflow templates\n \nProvides optimal resource allocation, intelligent agent selection, and complete automation workflows.`,\n });\n\n commandRegistry.set('coordination', {\n handler: coordinationAction,\n description: 'Swarm and agent orchestration',\n usage: 'coordination <command> [options]',\n examples: [\n 'coordination swarm-init --topology hierarchical --max-agents 8',\n 'coordination agent-spawn --type developer --name \"api-dev\" --swarm-id swarm-123',\n 'coordination task-orchestrate --task \"Build REST API\" --strategy parallel',\n ],\n details: `\nCoordination commands:\n • swarm-init: Initialize swarm coordination infrastructure\n • agent-spawn: Spawn and coordinate new agents\n • task-orchestrate: Orchestrate task execution across agents\n \nEnables intelligent task distribution, agent synchronization, and shared memory coordination.`,\n });\n\n commandRegistry.set('hooks', {\n handler: hooksAction,\n description: 'Lifecycle event management',\n usage: 'hooks <command> [options]',\n examples: [\n 'hooks pre-task --description \"Build API\" --task-id task-123',\n 'hooks post-task --task-id task-123 --analyze-performance --generate-insights',\n 'hooks session-end --export-metrics --generate-summary',\n ],\n details: `\nHooks commands:\n • pre-task: Execute before task begins (preparation & setup)\n • post-task: Execute after task completion (analysis & cleanup)\n • pre-edit: Execute before file modifications (backup & validation)\n • post-edit: Execute after file modifications (tracking & coordination)\n • session-end: Execute at session termination (cleanup & export)\n \nEnables automated preparation & cleanup, performance tracking, and coordination synchronization.`,\n });\n\n commandRegistry.set('hook-safety', {\n handler: hookSafetyCommand,\n description: '🚨 Critical hook safety system - Prevent infinite loops & financial damage',\n usage: 'hook-safety <command> [options]',\n examples: [\n 'hook-safety validate # Check for dangerous hook configurations',\n 'hook-safety validate --config ~/.claude/settings.json',\n 'hook-safety status # View safety status and context',\n 'hook-safety reset # Reset circuit breakers',\n 'hook-safety safe-mode # Enable safe mode (skip all hooks)',\n ],\n details: `\n🚨 CRITICAL: Stop hooks calling 'claude' commands create INFINITE LOOPS that can:\n • Bypass API rate limits\n • Cost thousands of dollars per day \n • Make your system unresponsive\n\nHook Safety commands:\n • validate: Check Claude Code settings for dangerous patterns\n • status: Show current safety status and execution context\n • reset: Reset circuit breakers and execution counters \n • safe-mode: Enable/disable safe mode (skips all hooks)\n\nSAFE ALTERNATIVES:\n • Use PostToolUse hooks instead of Stop hooks\n • Implement flag-based update patterns\n • Use 'claude --skip-hooks' for manual updates\n • Create conditional execution scripts\n\nFor more information: https://github.com/ruvnet/claude-flow/issues/166`,\n });\n\n commandRegistry.set('migrate-hooks', migrateHooksCommandConfig);\n\n commandRegistry.set('fix-hook-variables', {\n handler: fixHookVariablesCommand,\n ...fixHookVariablesCommandConfig,\n });\n\n // Verification system commands\n commandRegistry.set('verify', {\n handler: async (args, flags) => {\n try {\n const { verificationCommand } = await import('./simple-commands/verification.js');\n return await verificationCommand(args, flags);\n } catch (error) {\n console.error('❌ Error loading verification module:', error.message);\n console.log('Error details:', error);\n }\n },\n description: '🔍 Verification and truth enforcement system',\n usage: 'verify <subcommand> [options]',\n examples: [\n 'verify status # Show verification system status',\n 'verify check --taskId task-123 # Run verification checks',\n 'verify validate --taskId task-456 # Validate task results',\n 'verify config # Manage verification config',\n 'verify cleanup --force # Clean up old verification data',\n ],\n details: `\nVerification system commands:\n • status: Show current system status and health\n • check: Run verification checks on tasks\n • validate: Validate task completion and results\n • config: Manage verification configuration\n • cleanup: Clean up old verification data\n • pre-task: Execute pre-task verification\n • post-task: Execute post-task validation\n • integration: Run integration tests\n • truth: Execute truth telemetry checks\n • rollback: Trigger rollback if needed\n\nTruth enforcement features:\n • 0.95 minimum truth threshold\n • Cross-agent integration testing\n • Automated rollback on failures\n • Cryptographic verification\n • Byzantine fault tolerance`,\n });\n\n commandRegistry.set('truth', {\n handler: async (args, flags) => {\n try {\n const { truthCommand } = await import('./simple-commands/verification.js');\n return await truthCommand(args, flags);\n } catch (error) {\n console.error('❌ Error loading verification module:', error.message);\n console.log('Error details:', error);\n }\n },\n description: '🎯 Truth telemetry and accuracy scoring',\n usage: 'truth [options]',\n examples: [\n 'truth # Show current truth scores',\n 'truth --taskId task-123 # Check truth for specific task',\n 'truth --threshold 0.95 # Set minimum truth threshold',\n 'truth --report # Generate truth report',\n ],\n details: `\nTruth scoring system:\n • Real-time truth metrics collection\n • Agent performance scoring\n • System-wide truth accuracy tracking\n • Automated alerting for threshold violations\n • Dashboard data export functionality\n\nTarget metrics:\n • >95% truth accuracy rate\n • <10% human intervention rate\n • >90% integration success rate\n • <5% automated rollback frequency`,\n });\n\n commandRegistry.set('neural', {\n handler: neuralCommand,\n description: '🧠 Neural module commands for SAFLA self-learning systems',\n usage: 'neural <command> [options]',\n examples: [\n 'neural init # Initialize neural module',\n 'neural init --force # Force overwrite existing',\n 'neural init --target ./agents # Custom location',\n ],\n details: `\nNeural Module Features:\n • Self-Aware Feedback Loop Algorithm (SAFLA)\n • 4-tier memory system (Vector, Episodic, Semantic, Working)\n • 172,000+ ops/sec processing with WASM optimization\n • 60% memory compression while maintaining recall\n • Cross-session learning and persistence\n • Distributed neural training with MCP integration`,\n });\n\n commandRegistry.set('goal', {\n handler: goalCommand,\n description: '🎯 Goal module commands for GOAP intelligent planning',\n usage: 'goal <command> [options]',\n examples: [\n 'goal init # Initialize goal module',\n 'goal init --force # Force overwrite existing',\n 'goal init --target ./agents # Custom location',\n ],\n details: `\nGoal Module Features:\n • Goal-Oriented Action Planning (GOAP) algorithm\n • A* pathfinding for optimal plan generation\n • OODA loop execution monitoring\n • Adaptive replanning on failures\n • Mixed LLM + code execution\n • Cost-optimized action sequences`,\n });\n\n commandRegistry.set('pair', {\n handler: async (args, flags) => {\n try {\n const pairCommand = (await import('./simple-commands/pair.js')).default;\n return await pairCommand(args, flags);\n } catch (error) {\n console.error('❌ Error loading pair module:', error.message);\n console.log('Error details:', error);\n }\n },\n description: '👥 Interactive pair programming with AI assistance',\n usage: 'pair [options]',\n examples: [\n 'pair --start # Start pair programming session',\n 'pair --start --mode driver # You write, AI assists',\n 'pair --start --verify --test # Enable verification and testing',\n 'pair --status # Show session status',\n 'pair --end # End current session',\n ],\n details: `\nPair programming features:\n • Three modes: driver, navigator, switch\n • Real-time code assistance\n • Optional verification and testing\n • Session persistence\n • Background execution support`,\n });\n\n commandRegistry.set('verify-train', {\n handler: async (args, flags) => {\n try {\n const { verificationTrainingCommand } = await import('./simple-commands/verification-training-integration.js');\n return await verificationTrainingCommand(args, flags);\n } catch (error) {\n console.error('❌ Error loading verification-training module:', error.message);\n console.log('Error details:', error);\n }\n },\n description: '🧠 Verification-Training integration for continuous improvement',\n usage: 'verify-train <command> [options]',\n examples: [\n 'verify-train status # Show training status',\n 'verify-train feed # Feed verification data to training',\n 'verify-train predict coder # Predict verification outcome',\n 'verify-train recommend # Get agent recommendations',\n 'verify-train train # Trigger neural training',\n ],\n details: `\nVerification-Training Integration:\n • Feeds verification results to training system\n • Learns from agent performance over time\n • Predicts verification outcomes\n • Recommends best agents for tasks\n • Improves reliability through continuous learning`,\n });\n\n commandRegistry.set('train-pipeline', {\n handler: async (args, flags) => {\n try {\n // Always use real execution - no more simulation\n const { trainingPipelineCommand } = await import('./simple-commands/training-pipeline.js');\n return await trainingPipelineCommand(args, flags);\n } catch (error) {\n console.error('❌ Error loading training-pipeline module:', error.message);\n console.log('Error details:', error);\n }\n },\n description: '🚀 Real training pipeline with actual code execution and learning',\n usage: 'train-pipeline <command> [options]',\n examples: [\n 'train-pipeline run # Run training with real code',\n 'train-pipeline run --complexity hard --iterations 5',\n 'train-pipeline generate # Generate real training tasks',\n 'train-pipeline validate # Validate current performance',\n 'train-pipeline status # Show pipeline status with real metrics',\n ],\n details: `\nReal Training Pipeline Features:\n • Creates actual code files and tests\n • Runs real npm test commands\n • Learns from actual test results\n • Validates improvements with real metrics\n • Applies learned optimizations to production\n \nPipeline Stages:\n 1. Generate real code tasks (easy/medium/hard)\n 2. Execute with different strategies using npm\n 3. Learn from real test results\n 4. Validate actual improvements\n 5. Apply to production configuration\n \nOptions:\n --complexity <level> Task complexity (easy/medium/hard)\n --iterations <n> Number of training iterations`,\n });\n\n commandRegistry.set('stream-chain', {\n handler: async (args, flags) => {\n try {\n const { streamChainCommand } = await import('./simple-commands/stream-chain.js');\n return await streamChainCommand(args, flags);\n } catch (error) {\n console.error('❌ Error loading stream-chain module:', error.message);\n console.log('Error details:', error);\n }\n },\n description: '🔗 Connect multiple Claude instances via stream-json for chained workflows',\n usage: 'stream-chain <subcommand> [options]',\n examples: [\n 'stream-chain run \"analyze\" \"design\" \"implement\" # Custom chain',\n 'stream-chain demo # Run demo chain', \n 'stream-chain pipeline analysis # Run analysis pipeline',\n 'stream-chain test # Test stream connection',\n 'stream-chain help # Show detailed help',\n ],\n details: `\n📚 SUBCOMMANDS\n run <p1> <p2> [...] Execute custom chain (min 2 prompts)\n demo Run 3-step demo chain\n pipeline <type> Run predefined pipeline (analysis/refactor/test/optimize)\n test Test stream connection\n help Show comprehensive documentation\n\n⚙️ OPTIONS\n --verbose Show detailed execution info\n --timeout <seconds> Timeout per step (default: 30)\n --debug Enable debug mode\n\n🔄 STREAM CHAINING\n Chains multiple Claude Code calls with context preservation:\n • Step 1 outputs stream-json → Step 2 receives context → Step 3...\n • 100% context preservation between steps\n • Real execution with Claude Code (not simulated)\n\n🚀 PIPELINES\n analysis - Analyze → Identify issues → Generate report\n refactor - Find opportunities → Create plan → Apply changes\n test - Analyze coverage → Design cases → Generate tests\n optimize - Profile code → Find bottlenecks → Apply optimizations\n\n⚡ PERFORMANCE\n • Latency: ~10-30s per step\n • Context: Full preservation\n • Streaming: No intermediate files\n\n📖 For full documentation: stream-chain help`,\n });\n\n commandRegistry.set('hive', {\n handler: async (args, flags) => {\n try {\n // Try to load the hive command module\n const { hiveAction } = await import('./commands/hive.js');\n return hiveAction({ args, flags, command: 'hive' });\n } catch (error) {\n // Fallback to simple implementation if module not found\n console.log('🐝 Hive Mind - Advanced Multi-Agent Coordination');\n console.log('');\n console.log('The Hive Mind system provides:');\n console.log(' • Consensus-based decision making');\n console.log(' • Distributed task orchestration');\n console.log(' • Quality-driven execution');\n console.log(' • Real-time swarm monitoring');\n console.log('');\n console.log('Usage: hive <objective> [options]');\n console.log('');\n console.log('For full functionality, ensure the hive module is properly built.');\n }\n },\n description: 'Hive Mind - Advanced multi-agent swarm with consensus',\n usage: 'hive <objective> [options]',\n examples: [\n 'hive \"Build microservices architecture\"',\n 'hive \"Optimize database performance\" --consensus unanimous',\n 'hive \"Develop ML pipeline\" --topology mesh --monitor',\n 'hive \"Create REST API\" --sparc --max-agents 8',\n 'hive \"Research cloud patterns\" --background --quality-threshold 0.9',\n ],\n details: `\nHive Mind features:\n • 👑 Queen-led orchestration with specialized agents\n • 🗳️ Consensus mechanisms (quorum, unanimous, weighted, leader)\n • 🏗️ Multiple topologies (hierarchical, mesh, ring, star)\n • 📊 Real-time monitoring dashboard\n • 🧪 SPARC methodology integration\n • 💾 Distributed memory and knowledge sharing\n \nAgent types:\n • Queen: Orchestrator and decision maker\n • Architect: System design and planning \n • Worker: Implementation and execution\n • Scout: Research and exploration\n • Guardian: Quality and validation\n \nOptions:\n --topology <type> Swarm topology (default: hierarchical)\n --consensus <type> Decision mechanism (default: quorum)\n --max-agents <n> Maximum agents (default: 8)\n --quality-threshold <n> Min quality 0-1 (default: 0.8)\n --sparc Use SPARC methodology\n --monitor Real-time monitoring\n --background Run in background`,\n });\n\n // Temporarily commented out for Node.js compatibility\n /*\n commandRegistry.set('ruv-swarm', {\n handler: ruvSwarmAction,\n description: 'Advanced AI swarm coordination with neural capabilities',\n usage: 'ruv-swarm <command> [options]',\n examples: [\n 'ruv-swarm init --topology mesh --max-agents 8',\n 'ruv-swarm spawn researcher --name \"AI Researcher\"',\n 'ruv-swarm orchestrate \"Build a REST API\"',\n 'ruv-swarm neural train --iterations 20',\n 'ruv-swarm benchmark --type swarm',\n 'ruv-swarm config show',\n 'ruv-swarm status --verbose'\n ],\n details: `\nAdvanced swarm coordination features:\n • 84.8% SWE-Bench solve rate\n • 32.3% token reduction through coordination\n • 2.8-4.4x speed improvement via parallel execution\n • 27+ neural models for cognitive approaches\n • Persistent memory across sessions\n • Automatic topology optimization\n \nCommands:\n init - Initialize swarm with specified topology\n status - Get current swarm status and metrics\n spawn - Spawn specialized agents (researcher, coder, analyst, etc.)\n orchestrate - Coordinate complex tasks across agents\n neural - Neural pattern training and management\n benchmark - Performance testing and optimization\n config - Configuration management\n memory - Memory usage and coordination data`\n });\n */\n\n // Additional ruv-swarm coordination commands - temporarily commented out\n /*\n commandRegistry.set('swarm-init', {\n handler: async (args, flags) => {\n const { ruvSwarmAction } = await import('./commands/ruv-swarm.js');\n return ruvSwarmAction({ args: ['init', ...args], flags });\n },\n description: 'Quick swarm initialization with topology selection',\n usage: 'swarm-init [--topology <type>] [--max-agents <n>] [--strategy <type>]',\n examples: [\n 'swarm-init --topology mesh --max-agents 8',\n 'swarm-init --topology hierarchical --strategy specialized',\n 'swarm-init --topology star --max-agents 5 --strategy balanced'\n ]\n });\n\n commandRegistry.set('neural-spawn', {\n handler: async (args, flags) => {\n const { ruvSwarmAction } = await import('./commands/ruv-swarm.js');\n return ruvSwarmAction({ args: ['spawn', ...args], flags });\n },\n description: 'Spawn neural agents with cognitive capabilities',\n usage: 'neural-spawn <type> [--name <name>] [--capabilities <list>]',\n examples: [\n 'neural-spawn researcher --name \"Data Analyst\"',\n 'neural-spawn coder --capabilities \"typescript,react,api\"',\n 'neural-spawn coordinator --name \"Project Manager\"'\n ]\n });\n\n commandRegistry.set('memory-coordinate', {\n handler: async (args, flags) => {\n const { ruvSwarmAction } = await import('./commands/ruv-swarm.js');\n return ruvSwarmAction({ args: ['memory', ...args], flags });\n },\n description: 'Coordinate memory across swarm agents',\n usage: 'memory-coordinate [--detail <level>] [--sync] [--compress]',\n examples: [\n 'memory-coordinate --detail summary',\n 'memory-coordinate --detail detailed --sync',\n 'memory-coordinate --compress --sync'\n ]\n });\n\n commandRegistry.set('config-integration', {\n handler: configIntegrationAction,\n description: 'Enhanced configuration management with ruv-swarm integration',\n usage: 'config-integration <command> [options]',\n examples: [\n 'config-integration setup --enable-ruv-swarm',\n 'config-integration preset development',\n 'config-integration sync --force',\n 'config-integration status --verbose',\n 'config-integration export my-config.json',\n 'config-integration validate --fix'\n ],\n details: `\nAdvanced configuration management features:\n • Unified configuration across Claude-Flow and ruv-swarm\n • Configuration presets for different environments\n • Automatic synchronization between config systems\n • Import/export capabilities with validation\n • Real-time status monitoring and validation\n \nPresets:\n development - Hierarchical topology, specialized strategy, 8 agents\n research - Mesh topology, adaptive strategy, 12 agents \n production - Star topology, balanced strategy, 6 agents\n \nCommands:\n setup - Initialize ruv-swarm integration\n sync - Synchronize configurations\n status - Show integration status\n validate - Validate all configurations\n preset - Apply configuration preset\n export - Export unified configuration\n import - Import and apply configuration`\n });\n */\n}\n\n// Register a new command\nexport function registerCommand(name, command) {\n if (commandRegistry.has(name)) {\n console.warn(`Command '${name}' already exists and will be overwritten`);\n }\n\n commandRegistry.set(name, {\n handler: command.handler,\n description: command.description || 'No description available',\n usage: command.usage || `${name} [options]`,\n examples: command.examples || [],\n hidden: command.hidden || false,\n });\n}\n\n// Get command handler\nexport function getCommand(name) {\n return commandRegistry.get(name);\n}\n\n// List all registered commands\nexport function listCommands(includeHidden = false) {\n const commands = [];\n for (const [name, command] of commandRegistry.entries()) {\n if (includeHidden || !command.hidden) {\n commands.push({\n name,\n ...command,\n });\n }\n }\n return commands.sort((a, b) => a.name.localeCompare(b.name));\n}\n\n// Check if command exists\nexport function hasCommand(name) {\n return commandRegistry.has(name);\n}\n\n// Execute a command\nexport async function executeCommand(name, subArgs, flags) {\n const command = commandRegistry.get(name);\n if (!command) {\n throw new Error(`Unknown command: ${name}`);\n }\n\n try {\n // Track command execution for performance metrics\n await trackCommandExecution(name, command.handler, subArgs, flags);\n } catch (err) {\n throw new Error(`Command '${name}' failed: ${err.message}`);\n }\n}\n\n// Helper to show command help\nexport function showCommandHelp(name) {\n const command = commandRegistry.get(name);\n if (!command) {\n console.log(\n HelpFormatter.formatError(\n `Unknown command: ${name}`,\n 'claude-flow',\n 'claude-flow <command> [options]',\n ),\n );\n return;\n }\n\n // If command has custom help, call it with help flag\n if (command.customHelp) {\n command.handler(['--help'], { help: true });\n return;\n }\n\n // Convert command info to standardized format\n const helpInfo = {\n name: `claude-flow ${name}`,\n description: HelpFormatter.stripFormatting(command.description),\n usage: `claude-flow ${command.usage}`,\n details: command.details, // Pass through the details section\n };\n\n // Parse examples\n if (command.examples && command.examples.length > 0) {\n helpInfo.examples = command.examples.map((ex) => {\n if (ex.startsWith('npx')) {\n return ex;\n }\n return `claude-flow ${ex}`;\n });\n }\n\n // Parse options from details if available\n if (command.details) {\n const optionsMatch = command.details.match(/Options:([\\s\\S]*?)(?=\\n\\n|$)/);\n if (optionsMatch) {\n const optionsText = optionsMatch[1];\n const options = [];\n const optionLines = optionsText.split('\\n').filter((line) => line.trim());\n\n for (const line of optionLines) {\n const match = line.match(/^\\s*(--.+?)\\s{2,}(.+)$/);\n if (match) {\n let [_, flags, description] = match;\n // Check for default value in description\n const defaultMatch = description.match(/\\(default: (.+?)\\)/);\n const option = {\n flags: flags.trim(),\n description: description.replace(/\\(default: .+?\\)/, '').trim(),\n };\n if (defaultMatch) {\n option.defaultValue = defaultMatch[1];\n }\n options.push(option);\n }\n }\n\n if (options.length > 0) {\n helpInfo.options = options;\n }\n }\n }\n\n console.log(HelpFormatter.formatHelp(helpInfo));\n}\n\n// Helper to show all commands\nexport function showAllCommands() {\n const commands = listCommands();\n\n console.log('Available commands:');\n console.log();\n\n for (const command of commands) {\n console.log(` ${command.name.padEnd(12)} ${command.description}`);\n }\n\n console.log();\n console.log('Use \"claude-flow help <command>\" for detailed usage information');\n}\n\n// Initialize the command registry\nregisterCoreCommands();\n\n// Initialize performance tracking\ninitializePerformanceTracking().catch(err => {\n // Performance tracking is optional, don't fail if it errors\n console.error('Failed to initialize performance tracking:', err.message);\n});\n"],"names":["process","initCommand","memoryCommand","memoryConsolidationCommand","sparcCommand","agentCommand","taskCommand","configCommand","statusCommand","mcpCommand","monitorCommand","startCommand","swarmCommand","batchManagerCommand","githubCommand","trainingAction","analysisAction","automationAction","coordinationAction","hooksAction","hookSafetyCommand","hiveMindCommand","HelpFormatter","hiveMindOptimizeCommand","neuralCommand","goalCommand","showUnifiedMetrics","fixTaskAttribution","migrateHooksCommandConfig","fixHookVariablesCommand","fixHookVariablesCommandConfig","initializePerformanceTracking","trackCommandExecution","commandRegistry","Map","registerCoreCommands","set","handler","description","usage","examples","details","args","flags","launchUI","fullArgs","argv","slice","console","log","customHelp","subcommand","verificationCommand","error","message","truthCommand","pairCommand","default","verificationTrainingCommand","trainingPipelineCommand","streamChainCommand","hiveAction","command","registerCommand","name","has","warn","hidden","getCommand","get","listCommands","includeHidden","commands","entries","push","sort","a","b","localeCompare","hasCommand","executeCommand","subArgs","Error","err","showCommandHelp","formatError","help","helpInfo","stripFormatting","length","map","ex","startsWith","optionsMatch","match","optionsText","options","optionLines","split","filter","line","trim","_","defaultMatch","option","replace","defaultValue","formatHelp","showAllCommands","padEnd","catch"],"mappings":"AACA,OAAOA,aAAa,UAAU;AAC9B,SAASC,WAAW,QAAQ,kCAAkC;AAC9D,SAASC,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,0BAA0B,QAAQ,4CAA4C;AACvF,SAASC,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,WAAW,QAAQ,4BAA4B;AACxD,SAASC,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,UAAU,QAAQ,2BAA2B;AACtD,SAASC,cAAc,QAAQ,+BAA+B;AAC9D,SAASC,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,mBAAmB,QAAQ,qCAAqC;AACzE,SAASC,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,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AAU,CAACpB;AACvC;AAGA,OAAO,SAASqB;IACd,MAAMpC,WAAWF;IAEjBtB,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG;IAEX,KAAK,MAAMa,WAAWU,SAAU;QAC9BxB,QAAQC,GAAG,CAAC,CAAC,EAAE,EAAEa,QAAQE,IAAI,CAAC6C,MAAM,CAAC,IAAI,CAAC,EAAE/C,QAAQxB,WAAW,EAAE;IACnE;IAEAU,QAAQC,GAAG;IACXD,QAAQC,GAAG,CAAC;AACd;AAGAd;AAGAJ,gCAAgC+E,KAAK,CAAC3B,CAAAA;IAEpCnC,QAAQK,KAAK,CAAC,8CAA8C8B,IAAI7B,OAAO;AACzE"}
1
+ {"version":3,"sources":["../../../src/cli/command-registry.js"],"sourcesContent":["// command-registry.js - Extensible command registration system\nimport process from 'process';\nimport { initCommand } from './simple-commands/init/index.js';\nimport { memoryCommand } from './simple-commands/memory.js';\nimport { memoryConsolidationCommand } from './simple-commands/memory-consolidation.js';\nimport { sparcCommand } from './simple-commands/sparc.js';\nimport { agentCommand } from './simple-commands/agent.js';\nimport { taskCommand } from './simple-commands/task.js';\nimport { configCommand } from './simple-commands/config.js';\nimport { statusCommand } from './simple-commands/status.js';\nimport { mcpCommand } from './simple-commands/mcp.js';\nimport { proxyCommand } from './simple-commands/proxy.js';\nimport { monitorCommand } from './simple-commands/monitor.js';\nimport { startCommand } from './simple-commands/start.js';\nimport { swarmCommand } from './simple-commands/swarm.js';\nimport { batchManagerCommand } from './simple-commands/batch-manager.js';\nimport { githubCommand } from './simple-commands/github.js';\nimport { trainingAction } from './simple-commands/training.js';\nimport { analysisAction } from './simple-commands/analysis.js';\nimport { automationAction } from './simple-commands/automation.js';\nimport { coordinationAction } from './simple-commands/coordination.js';\nimport { hooksAction } from './simple-commands/hooks.js';\nimport { hookSafetyCommand } from './simple-commands/hook-safety.js';\nimport { hiveMindCommand } from './simple-commands/hive-mind.js';\nimport { HelpFormatter } from './help-formatter.js';\nimport hiveMindOptimizeCommand from './simple-commands/hive-mind-optimize.js';\nimport { neuralCommand } from './simple-commands/neural.js';\nimport { goalCommand } from './simple-commands/goal.js';\nimport {\n showUnifiedMetrics,\n fixTaskAttribution,\n} from './simple-commands/swarm-metrics-integration.js';\nimport { migrateHooksCommand, migrateHooksCommandConfig } from './simple-commands/migrate-hooks.js';\nimport {\n fixHookVariablesCommand,\n fixHookVariablesCommandConfig,\n} from './simple-commands/fix-hook-variables.js';\nimport { \n initializePerformanceTracking,\n trackCommandExecution \n} from './simple-commands/performance-hooks.js';\n// Maestro commands integrated with clean implementation\n// Note: Maestro TypeScript commands now integrated directly in ./commands/maestro.ts\n// Note: TypeScript imports commented out for Node.js compatibility\n// import { ruvSwarmAction } from './commands/ruv-swarm.ts';\n// import { configIntegrationAction } from './commands/config-integration.ts';\n\n// Command registry for extensible CLI\nexport const commandRegistry = new Map();\n\n// Register core commands\nexport function registerCoreCommands() {\n commandRegistry.set('init', {\n handler: initCommand,\n description: 'Initialize Claude Code integration files and SPARC development environment',\n usage: 'init [--force] [--minimal] [--sparc]',\n examples: [\n 'npx claude-flow@latest init --sparc # Recommended: Full SPARC setup',\n 'init --sparc # Initialize with SPARC modes',\n 'init --force --minimal # Minimal setup, overwrite existing',\n 'init --sparc --force # Force SPARC setup',\n ],\n details: `\nThe --sparc flag creates a complete development environment:\n • .roomodes file containing 17 specialized SPARC modes\n • CLAUDE.md for AI-readable project instructions\n • Pre-configured modes: architect, code, tdd, debug, security, and more\n • Ready for TDD workflows and automated code generation\n \nFirst-time users should run: npx claude-flow@latest init --sparc`,\n });\n\n commandRegistry.set('start', {\n handler: startCommand,\n description: 'Start the Claude-Flow orchestration system',\n usage: 'start [--daemon] [--port <port>] [--verbose] [--ui] [--web]',\n examples: [\n 'start # Start in interactive mode',\n 'start --daemon # Start as background daemon',\n 'start --port 8080 # Use custom MCP port',\n 'start --verbose # Show detailed system activity',\n 'start --ui # Launch terminal-based UI',\n 'start --web # Launch web-based UI',\n ],\n });\n\n // Add start-ui as a convenient alias for launching the UI\n commandRegistry.set('start-ui', {\n handler: async (args, flags) => {\n // Import and use the direct UI launcher\n const { launchUI } = await import('./simple-commands/start-ui.js');\n // Pass the full raw arguments from process.argv\n const fullArgs = process.argv.slice(3); // Skip node, script, and command\n return launchUI(fullArgs);\n },\n description: 'Start the UI interface (web UI by default)',\n usage: 'start-ui [--port <port>] [--terminal]',\n examples: [\n 'start-ui # Launch web-based UI (default)',\n 'start-ui --port 3000 # Use custom port',\n 'start-ui --terminal # Launch terminal-based UI instead',\n ],\n });\n\n commandRegistry.set('memory', {\n handler: memoryCommand,\n description: 'Memory management operations',\n usage: 'memory <subcommand> [options]',\n examples: [\n 'memory store key \"value\"',\n 'memory query search_term',\n 'memory stats',\n 'memory export backup.json',\n ],\n });\n\n commandRegistry.set('memory-consolidate', {\n handler: memoryConsolidationCommand,\n description: 'Consolidate fragmented memory stores into unified database',\n usage: 'memory-consolidate <command> [options]',\n examples: [\n 'memory-consolidate scan # Scan for all memory stores',\n 'memory-consolidate plan # Create consolidation plan',\n 'memory-consolidate execute --force # Execute consolidation',\n 'memory-consolidate report # Generate report',\n ],\n details: `\nMemory Consolidation Features:\n • Discovers all memory storage locations (JSON & SQLite)\n • Creates automatic backups before consolidation\n • Merges all stores into unified SQLite database\n • Optimizes with indices for better performance\n • Maintains backward compatibility\n \nBenefits:\n • Single source of truth for all memory data\n • Improved query performance with indices\n • Reduced disk fragmentation\n • Easier backup and restore\n • Cross-session persistence`,\n });\n\n commandRegistry.set('sparc', {\n handler: sparcCommand,\n description: 'SPARC development mode operations',\n usage: 'sparc [subcommand] [options]',\n examples: [\n 'sparc \"orchestrate full app development\" # Default: sparc orchestrator',\n 'sparc modes # List available modes',\n 'sparc run code \"implement feature\" # Run specific mode',\n 'sparc tdd \"feature description\" # TDD workflow',\n 'sparc info architect # Mode details',\n ],\n });\n\n // Note: Maestro commands are now handled by TypeScript module\n // See src/cli/commands/maestro.ts for the clean implementation\n commandRegistry.set('maestro', {\n handler: () => {\n console.log('⚠️ Maestro commands have been moved to TypeScript.');\n console.log('Please use: npx claude-flow maestro help');\n console.log('Or import from: ./commands/maestro.js after compilation');\n },\n description: 'Maestro: Specs-Driven Development with Hive Mind Integration',\n usage: 'maestro <subcommand> [options]',\n examples: [\n 'maestro create-spec my-feature --request \"Implement user auth\"',\n 'maestro generate-design my-feature',\n 'maestro generate-tasks my-feature',\n 'maestro implement-task my-feature 1',\n 'maestro approve-phase my-feature',\n 'maestro status my-feature --detailed',\n 'maestro init-steering api-design',\n 'maestro help',\n ],\n });\n\n commandRegistry.set('agent', {\n handler: agentCommand,\n description: 'Manage AI agents, memory, and agentic-flow integration (NEW in v2.6.0)',\n usage: 'agent <subcommand> [options]',\n examples: [\n 'agent run coder \"Build REST API\" --optimize # Multi-provider execution',\n 'agent agents # List 66+ available agents',\n 'agent memory init # Initialize ReasoningBank',\n 'agent config wizard # Configure API keys',\n 'agent mcp start --daemon # Start MCP server',\n 'agent spawn researcher --name \"DataBot\" # Internal agent management',\n ],\n details: `\nAgent management features:\n • Multi-provider execution (Anthropic, OpenRouter, ONNX, Gemini)\n • ReasoningBank memory system (70% → 88% success improvement)\n • Model optimization (85-98% cost savings)\n • MCP server management (213+ tools)\n • Configuration management (API keys, models, settings)\n • Custom agent creation and management\n • Internal agent hierarchies and coordination\n\nSubcommands:\n run - Execute agents with multi-provider support\n agents - List all 66+ available agents\n create - Create custom agents\n info - Show agent information\n conflicts - Check for agent conflicts\n memory - ReasoningBank memory management\n config - Configuration management\n mcp - MCP server management\n spawn - Internal agent management\n list - List internal agents\n\nSee 'claude-flow help agent' for full documentation.`,\n });\n\n commandRegistry.set('proxy', {\n handler: proxyCommand,\n description: 'OpenRouter proxy server for 85-98% cost savings (NEW in v2.6.0)',\n usage: 'proxy <subcommand> [options]',\n examples: [\n 'proxy start --daemon # Start proxy server',\n 'proxy status --verbose # Check status',\n 'proxy config # Configuration guide',\n 'proxy logs --follow # View logs',\n ],\n details: `\nOpenRouter Proxy Features:\n • Transparent API translation (Anthropic → OpenRouter)\n • 85-98% cost savings vs direct Anthropic API\n • Works with Claude Code out of the box\n • Zero code changes required\n • Supports all OpenRouter models\n\nCost Savings Examples:\n • Claude 3.5 Sonnet: $3.00 → $0.30 per million tokens (90% savings)\n • Claude 3 Opus: $15.00 → $2.25 per million tokens (85% savings)\n • DeepSeek R1: Free (100% savings)\n\nSetup:\n 1. Get OpenRouter API key: https://openrouter.ai/keys\n 2. claude-flow agent config set OPENROUTER_API_KEY sk-or-xxx\n 3. claude-flow proxy start --daemon\n 4. export ANTHROPIC_BASE_URL=http://localhost:8080\n 5. Use Claude Code normally → automatic savings!\n\nCommands:\n start - Start proxy server\n stop - Stop proxy server\n restart - Restart proxy server\n status - Get server status\n logs - View server logs\n config - Configuration guide`,\n });\n\n commandRegistry.set('task', {\n handler: taskCommand,\n description: 'Manage tasks and workflows',\n usage: 'task <subcommand> [options]',\n examples: [\n 'task create research \"Market analysis\"',\n 'task list --filter running',\n 'task workflow examples/dev-flow.json',\n 'task coordination status',\n ],\n });\n\n commandRegistry.set('config', {\n handler: configCommand,\n description: 'Manage system configuration',\n usage: 'config <subcommand> [options]',\n examples: [\n 'config init',\n 'config set terminal.poolSize 15',\n 'config get orchestrator.maxConcurrentTasks',\n 'config validate',\n ],\n });\n\n commandRegistry.set('status', {\n handler: statusCommand,\n description: 'Show system status and health',\n usage: 'status [--verbose] [--json]',\n examples: ['status', 'status --verbose', 'status --json'],\n });\n\n commandRegistry.set('mcp', {\n handler: mcpCommand,\n description: 'Manage MCP server and tools',\n usage: 'mcp <subcommand> [options]',\n examples: ['mcp status', 'mcp start --port 8080', 'mcp tools --verbose', 'mcp auth setup'],\n });\n\n commandRegistry.set('monitor', {\n handler: monitorCommand,\n description: 'Real-time system monitoring',\n usage: 'monitor [--watch] [--interval <ms>]',\n examples: [\n 'monitor',\n 'monitor --watch',\n 'monitor --interval 1000 --watch',\n 'monitor --format json',\n ],\n });\n\n commandRegistry.set('swarm', {\n handler: swarmCommand,\n description: 'Swarm-based AI agent coordination',\n usage: 'swarm <objective> [options]',\n examples: [\n 'swarm \"Build a REST API\"',\n 'swarm \"Research cloud architecture\" --strategy research',\n 'swarm \"Analyze data\" --max-agents 3 --parallel',\n 'swarm \"Development task\" --ui --monitor --background',\n ],\n });\n\n commandRegistry.set('hive-mind', {\n handler: hiveMindCommand,\n description: '🧠 Advanced Hive Mind swarm intelligence with collective decision-making',\n usage: 'hive-mind <subcommand> [options]',\n examples: [\n 'hive-mind init # Initialize hive mind system',\n 'hive-mind spawn \"Build microservices\" # Create swarm with objective',\n 'hive-mind wizard # Interactive setup wizard',\n 'hive-mind status # View active swarms',\n 'hive-mind consensus # View consensus decisions',\n 'hive-mind metrics # Performance analytics',\n ],\n customHelp: true, // Use command's own help function\n details: `\nHive Mind System Features:\n • Queen-led coordination with specialized worker agents\n • Collective memory and knowledge sharing\n • Consensus building for critical decisions \n • Auto-scaling based on workload\n • Parallel task execution with work stealing\n • Real-time monitoring and metrics\n • SQLite-backed persistence\n • MCP tool integration for 87+ operations\n\nQueen Types:\n • Strategic - Long-term planning and optimization\n • Tactical - Task prioritization and rapid response\n • Adaptive - Learning and strategy evolution\n\nWorker Types:\n • Researcher, Coder, Analyst, Tester\n • Architect, Reviewer, Optimizer, Documenter\n\nUse 'hive-mind wizard' for interactive setup or 'hive-mind help' for full documentation.`,\n });\n\n commandRegistry.set('hive-mind-optimize', {\n handler: hiveMindOptimizeCommand,\n description: '🔧 Optimize hive mind database for better performance',\n usage: 'hive-mind-optimize [options]',\n examples: [\n 'hive-mind-optimize # Interactive optimization wizard',\n 'hive-mind-optimize --auto # Auto-optimize with defaults',\n 'hive-mind-optimize --report # Generate optimization report',\n 'hive-mind-optimize --clean-memory --memory-days 60',\n 'hive-mind-optimize --auto --vacuum --archive-tasks',\n ],\n details: `\nHive Mind Database Optimization Features:\n • Safe, backward-compatible optimizations\n • Performance indexes for 50% faster queries\n • Memory cleanup and archiving\n • Task archival for space management\n • Behavioral pattern tracking\n • Database integrity checking\n \nOptimization Levels:\n • v1.0 → v1.1: Basic performance indexes\n • v1.1 → v1.2: Advanced query optimization\n • v1.2 → v1.3: Performance tracking tables\n • v1.3 → v1.4: Memory optimization features\n • v1.4 → v1.5: Behavioral analysis tracking\n\nSafety Features:\n • Automatic backups before major operations\n • All changes are backward-compatible\n • Existing data is always preserved\n • Rollback capability on errors`,\n });\n\n commandRegistry.set('swarm-metrics', {\n handler: async (args, flags) => {\n const subcommand = args[0];\n if (subcommand === 'fix') {\n return await fixTaskAttribution();\n } else {\n return await showUnifiedMetrics();\n }\n },\n description: 'Unified swarm metrics and task attribution diagnostics',\n usage: 'swarm-metrics [fix] [options]',\n examples: [\n 'swarm-metrics # Show unified metrics from all swarm systems',\n 'swarm-metrics fix # Fix task attribution issues between systems',\n ],\n details: `\nSwarm Metrics Integration Features:\n • Unified view of hive-mind and ruv-swarm metrics\n • Task attribution diagnosis and repair\n • Cross-system swarm performance comparison\n • Database integration status checking\n • Automatic sample task creation for empty swarms\n\nThis command helps resolve issues where:\n • Overall task statistics show correctly but per-swarm shows 0/0\n • Multiple swarm systems are not properly integrated\n • Task assignments are missing or incorrectly attributed\n\nUse 'swarm-metrics fix' to automatically repair attribution issues.`,\n });\n\n commandRegistry.set('batch', {\n handler: batchManagerCommand,\n description: 'Batch operation management and configuration utilities',\n usage: 'batch <command> [options]',\n examples: [\n 'batch create-config my-batch.json',\n 'batch create-config --interactive',\n 'batch validate-config my-batch.json',\n 'batch estimate my-batch.json',\n 'batch list-templates',\n 'batch list-environments',\n ],\n details: `\nBatch operations support:\n • Multiple project initialization with templates\n • Environment-specific configurations (dev, staging, prod)\n • Parallel processing with resource management\n • Progress tracking and detailed reporting\n • Configuration validation and estimation tools\n \nUse with init command:\n claude-flow init --batch-init project1,project2,project3\n claude-flow init --config batch-config.json --parallel`,\n });\n\n commandRegistry.set('github', {\n handler: githubCommand,\n description: 'GitHub workflow automation with 6 specialized modes',\n usage: 'github <mode> <objective> [options]',\n examples: [\n 'github pr-manager \"create feature PR with automated testing\"',\n 'github gh-coordinator \"setup CI/CD pipeline\" --auto-approve',\n 'github release-manager \"prepare v2.0.0 release\"',\n 'github repo-architect \"optimize repository structure\"',\n 'github issue-tracker \"analyze project roadmap issues\"',\n 'github sync-coordinator \"sync package versions across repos\"',\n ],\n details: `\nGitHub automation modes:\n • gh-coordinator: GitHub workflow orchestration and coordination\n • pr-manager: Pull request management with multi-reviewer coordination\n • issue-tracker: Issue management and project coordination\n • release-manager: Release coordination and deployment pipelines\n • repo-architect: Repository structure optimization\n • sync-coordinator: Multi-package synchronization and version alignment\n \nAdvanced features:\n • Multi-reviewer coordination with automated scheduling\n • Intelligent issue categorization and assignment\n • Automated testing integration and quality gates\n • Release pipeline orchestration with rollback capabilities`,\n });\n\n commandRegistry.set('training', {\n handler: trainingAction,\n description: 'Neural pattern learning and model updates',\n usage: 'training <command> [options]',\n examples: [\n 'training neural-train --data recent --model task-predictor',\n 'training pattern-learn --operation \"file-creation\" --outcome \"success\"',\n 'training model-update --agent-type coordinator --operation-result \"efficient\"',\n ],\n details: `\nNeural training commands:\n • neural-train: Train neural patterns from operations\n • pattern-learn: Learn from specific operation outcomes\n • model-update: Update agent models with new insights\n \nImproves task selection accuracy, agent performance prediction, and coordination efficiency.`,\n });\n\n commandRegistry.set('analysis', {\n handler: analysisAction,\n description: 'Performance and usage analytics',\n usage: 'analysis <command> [options]',\n examples: [\n 'analysis bottleneck-detect --scope system',\n 'analysis performance-report --timeframe 7d --format detailed',\n 'analysis token-usage --breakdown --cost-analysis',\n ],\n details: `\nAnalysis commands:\n • bottleneck-detect: Detect performance bottlenecks in the system\n • performance-report: Generate comprehensive performance reports\n • token-usage: Analyze token consumption and costs\n \nHelps with performance optimization, cost management, and resource allocation.`,\n });\n\n commandRegistry.set('automation', {\n handler: automationAction,\n description: 'Intelligent agent and workflow management with MLE-STAR and Claude integration',\n usage: 'automation <command> [options]',\n examples: [\n 'automation auto-agent --task-complexity enterprise --swarm-id swarm-123',\n 'automation smart-spawn --requirement \"web-development\" --max-agents 8',\n 'automation workflow-select --project-type api --priority speed',\n 'automation run-workflow my-workflow.json --claude --non-interactive',\n 'automation mle-star --dataset data/train.csv --target price --claude',\n ],\n details: `\nAutomation commands:\n • auto-agent: Automatically spawn optimal agents based on task complexity\n • smart-spawn: Intelligently spawn agents based on specific requirements\n • workflow-select: Select and configure optimal workflows for project types\n • run-workflow: Execute workflows from JSON/YAML files with Claude integration\n • mle-star: Run MLE-STAR Machine Learning Engineering workflow (flagship)\n \nNew features:\n • Claude CLI integration for actual execution\n • MLE-STAR methodology for ML engineering\n • Non-interactive mode for CI/CD integration\n • Comprehensive workflow templates\n \nProvides optimal resource allocation, intelligent agent selection, and complete automation workflows.`,\n });\n\n commandRegistry.set('coordination', {\n handler: coordinationAction,\n description: 'Swarm and agent orchestration',\n usage: 'coordination <command> [options]',\n examples: [\n 'coordination swarm-init --topology hierarchical --max-agents 8',\n 'coordination agent-spawn --type developer --name \"api-dev\" --swarm-id swarm-123',\n 'coordination task-orchestrate --task \"Build REST API\" --strategy parallel',\n ],\n details: `\nCoordination commands:\n • swarm-init: Initialize swarm coordination infrastructure\n • agent-spawn: Spawn and coordinate new agents\n • task-orchestrate: Orchestrate task execution across agents\n \nEnables intelligent task distribution, agent synchronization, and shared memory coordination.`,\n });\n\n commandRegistry.set('hooks', {\n handler: hooksAction,\n description: 'Lifecycle event management',\n usage: 'hooks <command> [options]',\n examples: [\n 'hooks pre-task --description \"Build API\" --task-id task-123',\n 'hooks post-task --task-id task-123 --analyze-performance --generate-insights',\n 'hooks session-end --export-metrics --generate-summary',\n ],\n details: `\nHooks commands:\n • pre-task: Execute before task begins (preparation & setup)\n • post-task: Execute after task completion (analysis & cleanup)\n • pre-edit: Execute before file modifications (backup & validation)\n • post-edit: Execute after file modifications (tracking & coordination)\n • session-end: Execute at session termination (cleanup & export)\n \nEnables automated preparation & cleanup, performance tracking, and coordination synchronization.`,\n });\n\n commandRegistry.set('hook-safety', {\n handler: hookSafetyCommand,\n description: '🚨 Critical hook safety system - Prevent infinite loops & financial damage',\n usage: 'hook-safety <command> [options]',\n examples: [\n 'hook-safety validate # Check for dangerous hook configurations',\n 'hook-safety validate --config ~/.claude/settings.json',\n 'hook-safety status # View safety status and context',\n 'hook-safety reset # Reset circuit breakers',\n 'hook-safety safe-mode # Enable safe mode (skip all hooks)',\n ],\n details: `\n🚨 CRITICAL: Stop hooks calling 'claude' commands create INFINITE LOOPS that can:\n • Bypass API rate limits\n • Cost thousands of dollars per day \n • Make your system unresponsive\n\nHook Safety commands:\n • validate: Check Claude Code settings for dangerous patterns\n • status: Show current safety status and execution context\n • reset: Reset circuit breakers and execution counters \n • safe-mode: Enable/disable safe mode (skips all hooks)\n\nSAFE ALTERNATIVES:\n • Use PostToolUse hooks instead of Stop hooks\n • Implement flag-based update patterns\n • Use 'claude --skip-hooks' for manual updates\n • Create conditional execution scripts\n\nFor more information: https://github.com/ruvnet/claude-flow/issues/166`,\n });\n\n commandRegistry.set('migrate-hooks', migrateHooksCommandConfig);\n\n commandRegistry.set('fix-hook-variables', {\n handler: fixHookVariablesCommand,\n ...fixHookVariablesCommandConfig,\n });\n\n // Verification system commands\n commandRegistry.set('verify', {\n handler: async (args, flags) => {\n try {\n const { verificationCommand } = await import('./simple-commands/verification.js');\n return await verificationCommand(args, flags);\n } catch (error) {\n console.error('❌ Error loading verification module:', error.message);\n console.log('Error details:', error);\n }\n },\n description: '🔍 Verification and truth enforcement system',\n usage: 'verify <subcommand> [options]',\n examples: [\n 'verify status # Show verification system status',\n 'verify check --taskId task-123 # Run verification checks',\n 'verify validate --taskId task-456 # Validate task results',\n 'verify config # Manage verification config',\n 'verify cleanup --force # Clean up old verification data',\n ],\n details: `\nVerification system commands:\n • status: Show current system status and health\n • check: Run verification checks on tasks\n • validate: Validate task completion and results\n • config: Manage verification configuration\n • cleanup: Clean up old verification data\n • pre-task: Execute pre-task verification\n • post-task: Execute post-task validation\n • integration: Run integration tests\n • truth: Execute truth telemetry checks\n • rollback: Trigger rollback if needed\n\nTruth enforcement features:\n • 0.95 minimum truth threshold\n • Cross-agent integration testing\n • Automated rollback on failures\n • Cryptographic verification\n • Byzantine fault tolerance`,\n });\n\n commandRegistry.set('truth', {\n handler: async (args, flags) => {\n try {\n const { truthCommand } = await import('./simple-commands/verification.js');\n return await truthCommand(args, flags);\n } catch (error) {\n console.error('❌ Error loading verification module:', error.message);\n console.log('Error details:', error);\n }\n },\n description: '🎯 Truth telemetry and accuracy scoring',\n usage: 'truth [options]',\n examples: [\n 'truth # Show current truth scores',\n 'truth --taskId task-123 # Check truth for specific task',\n 'truth --threshold 0.95 # Set minimum truth threshold',\n 'truth --report # Generate truth report',\n ],\n details: `\nTruth scoring system:\n • Real-time truth metrics collection\n • Agent performance scoring\n • System-wide truth accuracy tracking\n • Automated alerting for threshold violations\n • Dashboard data export functionality\n\nTarget metrics:\n • >95% truth accuracy rate\n • <10% human intervention rate\n • >90% integration success rate\n • <5% automated rollback frequency`,\n });\n\n commandRegistry.set('neural', {\n handler: neuralCommand,\n description: '🧠 Neural module commands for SAFLA self-learning systems',\n usage: 'neural <command> [options]',\n examples: [\n 'neural init # Initialize neural module',\n 'neural init --force # Force overwrite existing',\n 'neural init --target ./agents # Custom location',\n ],\n details: `\nNeural Module Features:\n • Self-Aware Feedback Loop Algorithm (SAFLA)\n • 4-tier memory system (Vector, Episodic, Semantic, Working)\n • 172,000+ ops/sec processing with WASM optimization\n • 60% memory compression while maintaining recall\n • Cross-session learning and persistence\n • Distributed neural training with MCP integration`,\n });\n\n commandRegistry.set('goal', {\n handler: goalCommand,\n description: '🎯 Goal module commands for GOAP intelligent planning',\n usage: 'goal <command> [options]',\n examples: [\n 'goal init # Initialize goal module',\n 'goal init --force # Force overwrite existing',\n 'goal init --target ./agents # Custom location',\n ],\n details: `\nGoal Module Features:\n • Goal-Oriented Action Planning (GOAP) algorithm\n • A* pathfinding for optimal plan generation\n • OODA loop execution monitoring\n • Adaptive replanning on failures\n • Mixed LLM + code execution\n • Cost-optimized action sequences`,\n });\n\n commandRegistry.set('pair', {\n handler: async (args, flags) => {\n try {\n const pairCommand = (await import('./simple-commands/pair.js')).default;\n return await pairCommand(args, flags);\n } catch (error) {\n console.error('❌ Error loading pair module:', error.message);\n console.log('Error details:', error);\n }\n },\n description: '👥 Interactive pair programming with AI assistance',\n usage: 'pair [options]',\n examples: [\n 'pair --start # Start pair programming session',\n 'pair --start --mode driver # You write, AI assists',\n 'pair --start --verify --test # Enable verification and testing',\n 'pair --status # Show session status',\n 'pair --end # End current session',\n ],\n details: `\nPair programming features:\n • Three modes: driver, navigator, switch\n • Real-time code assistance\n • Optional verification and testing\n • Session persistence\n • Background execution support`,\n });\n\n commandRegistry.set('verify-train', {\n handler: async (args, flags) => {\n try {\n const { verificationTrainingCommand } = await import('./simple-commands/verification-training-integration.js');\n return await verificationTrainingCommand(args, flags);\n } catch (error) {\n console.error('❌ Error loading verification-training module:', error.message);\n console.log('Error details:', error);\n }\n },\n description: '🧠 Verification-Training integration for continuous improvement',\n usage: 'verify-train <command> [options]',\n examples: [\n 'verify-train status # Show training status',\n 'verify-train feed # Feed verification data to training',\n 'verify-train predict coder # Predict verification outcome',\n 'verify-train recommend # Get agent recommendations',\n 'verify-train train # Trigger neural training',\n ],\n details: `\nVerification-Training Integration:\n • Feeds verification results to training system\n • Learns from agent performance over time\n • Predicts verification outcomes\n • Recommends best agents for tasks\n • Improves reliability through continuous learning`,\n });\n\n commandRegistry.set('train-pipeline', {\n handler: async (args, flags) => {\n try {\n // Always use real execution - no more simulation\n const { trainingPipelineCommand } = await import('./simple-commands/training-pipeline.js');\n return await trainingPipelineCommand(args, flags);\n } catch (error) {\n console.error('❌ Error loading training-pipeline module:', error.message);\n console.log('Error details:', error);\n }\n },\n description: '🚀 Real training pipeline with actual code execution and learning',\n usage: 'train-pipeline <command> [options]',\n examples: [\n 'train-pipeline run # Run training with real code',\n 'train-pipeline run --complexity hard --iterations 5',\n 'train-pipeline generate # Generate real training tasks',\n 'train-pipeline validate # Validate current performance',\n 'train-pipeline status # Show pipeline status with real metrics',\n ],\n details: `\nReal Training Pipeline Features:\n • Creates actual code files and tests\n • Runs real npm test commands\n • Learns from actual test results\n • Validates improvements with real metrics\n • Applies learned optimizations to production\n \nPipeline Stages:\n 1. Generate real code tasks (easy/medium/hard)\n 2. Execute with different strategies using npm\n 3. Learn from real test results\n 4. Validate actual improvements\n 5. Apply to production configuration\n \nOptions:\n --complexity <level> Task complexity (easy/medium/hard)\n --iterations <n> Number of training iterations`,\n });\n\n commandRegistry.set('stream-chain', {\n handler: async (args, flags) => {\n try {\n const { streamChainCommand } = await import('./simple-commands/stream-chain.js');\n return await streamChainCommand(args, flags);\n } catch (error) {\n console.error('❌ Error loading stream-chain module:', error.message);\n console.log('Error details:', error);\n }\n },\n description: '🔗 Connect multiple Claude instances via stream-json for chained workflows',\n usage: 'stream-chain <subcommand> [options]',\n examples: [\n 'stream-chain run \"analyze\" \"design\" \"implement\" # Custom chain',\n 'stream-chain demo # Run demo chain', \n 'stream-chain pipeline analysis # Run analysis pipeline',\n 'stream-chain test # Test stream connection',\n 'stream-chain help # Show detailed help',\n ],\n details: `\n📚 SUBCOMMANDS\n run <p1> <p2> [...] Execute custom chain (min 2 prompts)\n demo Run 3-step demo chain\n pipeline <type> Run predefined pipeline (analysis/refactor/test/optimize)\n test Test stream connection\n help Show comprehensive documentation\n\n⚙️ OPTIONS\n --verbose Show detailed execution info\n --timeout <seconds> Timeout per step (default: 30)\n --debug Enable debug mode\n\n🔄 STREAM CHAINING\n Chains multiple Claude Code calls with context preservation:\n • Step 1 outputs stream-json → Step 2 receives context → Step 3...\n • 100% context preservation between steps\n • Real execution with Claude Code (not simulated)\n\n🚀 PIPELINES\n analysis - Analyze → Identify issues → Generate report\n refactor - Find opportunities → Create plan → Apply changes\n test - Analyze coverage → Design cases → Generate tests\n optimize - Profile code → Find bottlenecks → Apply optimizations\n\n⚡ PERFORMANCE\n • Latency: ~10-30s per step\n • Context: Full preservation\n • Streaming: No intermediate files\n\n📖 For full documentation: stream-chain help`,\n });\n\n commandRegistry.set('hive', {\n handler: async (args, flags) => {\n try {\n // Try to load the hive command module\n const { hiveAction } = await import('./commands/hive.js');\n return hiveAction({ args, flags, command: 'hive' });\n } catch (error) {\n // Fallback to simple implementation if module not found\n console.log('🐝 Hive Mind - Advanced Multi-Agent Coordination');\n console.log('');\n console.log('The Hive Mind system provides:');\n console.log(' • Consensus-based decision making');\n console.log(' • Distributed task orchestration');\n console.log(' • Quality-driven execution');\n console.log(' • Real-time swarm monitoring');\n console.log('');\n console.log('Usage: hive <objective> [options]');\n console.log('');\n console.log('For full functionality, ensure the hive module is properly built.');\n }\n },\n description: 'Hive Mind - Advanced multi-agent swarm with consensus',\n usage: 'hive <objective> [options]',\n examples: [\n 'hive \"Build microservices architecture\"',\n 'hive \"Optimize database performance\" --consensus unanimous',\n 'hive \"Develop ML pipeline\" --topology mesh --monitor',\n 'hive \"Create REST API\" --sparc --max-agents 8',\n 'hive \"Research cloud patterns\" --background --quality-threshold 0.9',\n ],\n details: `\nHive Mind features:\n • 👑 Queen-led orchestration with specialized agents\n • 🗳️ Consensus mechanisms (quorum, unanimous, weighted, leader)\n • 🏗️ Multiple topologies (hierarchical, mesh, ring, star)\n • 📊 Real-time monitoring dashboard\n • 🧪 SPARC methodology integration\n • 💾 Distributed memory and knowledge sharing\n \nAgent types:\n • Queen: Orchestrator and decision maker\n • Architect: System design and planning \n • Worker: Implementation and execution\n • Scout: Research and exploration\n • Guardian: Quality and validation\n \nOptions:\n --topology <type> Swarm topology (default: hierarchical)\n --consensus <type> Decision mechanism (default: quorum)\n --max-agents <n> Maximum agents (default: 8)\n --quality-threshold <n> Min quality 0-1 (default: 0.8)\n --sparc Use SPARC methodology\n --monitor Real-time monitoring\n --background Run in background`,\n });\n\n // Temporarily commented out for Node.js compatibility\n /*\n commandRegistry.set('ruv-swarm', {\n handler: ruvSwarmAction,\n description: 'Advanced AI swarm coordination with neural capabilities',\n usage: 'ruv-swarm <command> [options]',\n examples: [\n 'ruv-swarm init --topology mesh --max-agents 8',\n 'ruv-swarm spawn researcher --name \"AI Researcher\"',\n 'ruv-swarm orchestrate \"Build a REST API\"',\n 'ruv-swarm neural train --iterations 20',\n 'ruv-swarm benchmark --type swarm',\n 'ruv-swarm config show',\n 'ruv-swarm status --verbose'\n ],\n details: `\nAdvanced swarm coordination features:\n • 84.8% SWE-Bench solve rate\n • 32.3% token reduction through coordination\n • 2.8-4.4x speed improvement via parallel execution\n • 27+ neural models for cognitive approaches\n • Persistent memory across sessions\n • Automatic topology optimization\n \nCommands:\n init - Initialize swarm with specified topology\n status - Get current swarm status and metrics\n spawn - Spawn specialized agents (researcher, coder, analyst, etc.)\n orchestrate - Coordinate complex tasks across agents\n neural - Neural pattern training and management\n benchmark - Performance testing and optimization\n config - Configuration management\n memory - Memory usage and coordination data`\n });\n */\n\n // Additional ruv-swarm coordination commands - temporarily commented out\n /*\n commandRegistry.set('swarm-init', {\n handler: async (args, flags) => {\n const { ruvSwarmAction } = await import('./commands/ruv-swarm.js');\n return ruvSwarmAction({ args: ['init', ...args], flags });\n },\n description: 'Quick swarm initialization with topology selection',\n usage: 'swarm-init [--topology <type>] [--max-agents <n>] [--strategy <type>]',\n examples: [\n 'swarm-init --topology mesh --max-agents 8',\n 'swarm-init --topology hierarchical --strategy specialized',\n 'swarm-init --topology star --max-agents 5 --strategy balanced'\n ]\n });\n\n commandRegistry.set('neural-spawn', {\n handler: async (args, flags) => {\n const { ruvSwarmAction } = await import('./commands/ruv-swarm.js');\n return ruvSwarmAction({ args: ['spawn', ...args], flags });\n },\n description: 'Spawn neural agents with cognitive capabilities',\n usage: 'neural-spawn <type> [--name <name>] [--capabilities <list>]',\n examples: [\n 'neural-spawn researcher --name \"Data Analyst\"',\n 'neural-spawn coder --capabilities \"typescript,react,api\"',\n 'neural-spawn coordinator --name \"Project Manager\"'\n ]\n });\n\n commandRegistry.set('memory-coordinate', {\n handler: async (args, flags) => {\n const { ruvSwarmAction } = await import('./commands/ruv-swarm.js');\n return ruvSwarmAction({ args: ['memory', ...args], flags });\n },\n description: 'Coordinate memory across swarm agents',\n usage: 'memory-coordinate [--detail <level>] [--sync] [--compress]',\n examples: [\n 'memory-coordinate --detail summary',\n 'memory-coordinate --detail detailed --sync',\n 'memory-coordinate --compress --sync'\n ]\n });\n\n commandRegistry.set('config-integration', {\n handler: configIntegrationAction,\n description: 'Enhanced configuration management with ruv-swarm integration',\n usage: 'config-integration <command> [options]',\n examples: [\n 'config-integration setup --enable-ruv-swarm',\n 'config-integration preset development',\n 'config-integration sync --force',\n 'config-integration status --verbose',\n 'config-integration export my-config.json',\n 'config-integration validate --fix'\n ],\n details: `\nAdvanced configuration management features:\n • Unified configuration across Claude-Flow and ruv-swarm\n • Configuration presets for different environments\n • Automatic synchronization between config systems\n • Import/export capabilities with validation\n • Real-time status monitoring and validation\n \nPresets:\n development - Hierarchical topology, specialized strategy, 8 agents\n research - Mesh topology, adaptive strategy, 12 agents \n production - Star topology, balanced strategy, 6 agents\n \nCommands:\n setup - Initialize ruv-swarm integration\n sync - Synchronize configurations\n status - Show integration status\n validate - Validate all configurations\n preset - Apply configuration preset\n export - Export unified configuration\n import - Import and apply configuration`\n });\n */\n}\n\n// Register a new command\nexport function registerCommand(name, command) {\n if (commandRegistry.has(name)) {\n console.warn(`Command '${name}' already exists and will be overwritten`);\n }\n\n commandRegistry.set(name, {\n handler: command.handler,\n description: command.description || 'No description available',\n usage: command.usage || `${name} [options]`,\n examples: command.examples || [],\n hidden: command.hidden || false,\n });\n}\n\n// Get command handler\nexport function getCommand(name) {\n return commandRegistry.get(name);\n}\n\n// List all registered commands\nexport function listCommands(includeHidden = false) {\n const commands = [];\n for (const [name, command] of commandRegistry.entries()) {\n if (includeHidden || !command.hidden) {\n commands.push({\n name,\n ...command,\n });\n }\n }\n return commands.sort((a, b) => a.name.localeCompare(b.name));\n}\n\n// Check if command exists\nexport function hasCommand(name) {\n return commandRegistry.has(name);\n}\n\n// Execute a command\nexport async function executeCommand(name, subArgs, flags) {\n const command = commandRegistry.get(name);\n if (!command) {\n throw new Error(`Unknown command: ${name}`);\n }\n\n try {\n // Track command execution for performance metrics\n await trackCommandExecution(name, command.handler, subArgs, flags);\n } catch (err) {\n throw new Error(`Command '${name}' failed: ${err.message}`);\n }\n}\n\n// Helper to show command help\nexport function showCommandHelp(name) {\n const command = commandRegistry.get(name);\n if (!command) {\n console.log(\n HelpFormatter.formatError(\n `Unknown command: ${name}`,\n 'claude-flow',\n 'claude-flow <command> [options]',\n ),\n );\n return;\n }\n\n // If command has custom help, call it with help flag\n if (command.customHelp) {\n command.handler(['--help'], { help: true });\n return;\n }\n\n // Convert command info to standardized format\n const helpInfo = {\n name: `claude-flow ${name}`,\n description: HelpFormatter.stripFormatting(command.description),\n usage: `claude-flow ${command.usage}`,\n details: command.details, // Pass through the details section\n };\n\n // Parse examples\n if (command.examples && command.examples.length > 0) {\n helpInfo.examples = command.examples.map((ex) => {\n if (ex.startsWith('npx')) {\n return ex;\n }\n return `claude-flow ${ex}`;\n });\n }\n\n // Parse options from details if available\n if (command.details) {\n const optionsMatch = command.details.match(/Options:([\\s\\S]*?)(?=\\n\\n|$)/);\n if (optionsMatch) {\n const optionsText = optionsMatch[1];\n const options = [];\n const optionLines = optionsText.split('\\n').filter((line) => line.trim());\n\n for (const line of optionLines) {\n const match = line.match(/^\\s*(--.+?)\\s{2,}(.+)$/);\n if (match) {\n let [_, flags, description] = match;\n // Check for default value in description\n const defaultMatch = description.match(/\\(default: (.+?)\\)/);\n const option = {\n flags: flags.trim(),\n description: description.replace(/\\(default: .+?\\)/, '').trim(),\n };\n if (defaultMatch) {\n option.defaultValue = defaultMatch[1];\n }\n options.push(option);\n }\n }\n\n if (options.length > 0) {\n helpInfo.options = options;\n }\n }\n }\n\n console.log(HelpFormatter.formatHelp(helpInfo));\n}\n\n// Helper to show all commands\nexport function showAllCommands() {\n const commands = listCommands();\n\n console.log('Available commands:');\n console.log();\n\n for (const command of commands) {\n console.log(` ${command.name.padEnd(12)} ${command.description}`);\n }\n\n console.log();\n console.log('Use \"claude-flow help <command>\" for detailed usage information');\n}\n\n// Initialize the command registry\nregisterCoreCommands();\n\n// Initialize performance tracking\ninitializePerformanceTracking().catch(err => {\n // Performance tracking is optional, don't fail if it errors\n console.error('Failed to initialize performance tracking:', err.message);\n});\n"],"names":["process","initCommand","memoryCommand","memoryConsolidationCommand","sparcCommand","agentCommand","taskCommand","configCommand","statusCommand","mcpCommand","proxyCommand","monitorCommand","startCommand","swarmCommand","batchManagerCommand","githubCommand","trainingAction","analysisAction","automationAction","coordinationAction","hooksAction","hookSafetyCommand","hiveMindCommand","HelpFormatter","hiveMindOptimizeCommand","neuralCommand","goalCommand","showUnifiedMetrics","fixTaskAttribution","migrateHooksCommandConfig","fixHookVariablesCommand","fixHookVariablesCommandConfig","initializePerformanceTracking","trackCommandExecution","commandRegistry","Map","registerCoreCommands","set","handler","description","usage","examples","details","args","flags","launchUI","fullArgs","argv","slice","console","log","customHelp","subcommand","verificationCommand","error","message","truthCommand","pairCommand","default","verificationTrainingCommand","trainingPipelineCommand","streamChainCommand","hiveAction","command","registerCommand","name","has","warn","hidden","getCommand","get","listCommands","includeHidden","commands","entries","push","sort","a","b","localeCompare","hasCommand","executeCommand","subArgs","Error","err","showCommandHelp","formatError","help","helpInfo","stripFormatting","length","map","ex","startsWith","optionsMatch","match","optionsText","options","optionLines","split","filter","line","trim","_","defaultMatch","option","replace","defaultValue","formatHelp","showAllCommands","padEnd","catch"],"mappings":"AACA,OAAOA,aAAa,UAAU;AAC9B,SAASC,WAAW,QAAQ,kCAAkC;AAC9D,SAASC,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,0BAA0B,QAAQ,4CAA4C;AACvF,SAASC,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,WAAW,QAAQ,4BAA4B;AACxD,SAASC,aAAa,QAAQ,8B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IAAI;YAEtE,KAAK,MAAMD,QAAQH,YAAa;gBAC9B,MAAMH,QAAQM,KAAKN,KAAK,CAAC;gBACzB,IAAIA,OAAO;oBACT,IAAI,CAACQ,GAAG3D,OAAOL,YAAY,GAAGwD;oBAE9B,MAAMS,eAAejE,YAAYwD,KAAK,CAAC;oBACvC,MAAMU,SAAS;wBACb7D,OAAOA,MAAM0D,IAAI;wBACjB/D,aAAaA,YAAYmE,OAAO,CAAC,oBAAoB,IAAIJ,IAAI;oBAC/D;oBACA,IAAIE,cAAc;wBAChBC,OAAOE,YAAY,GAAGH,YAAY,CAAC,EAAE;oBACvC;oBACAP,QAAQtB,IAAI,CAAC8B;gBACf;YACF;YAEA,IAAIR,QAAQP,MAAM,GAAG,GAAG;gBACtBF,SAASS,OAAO,GAAGA;YACrB;QACF;IACF;IAEAhD,QAAQC,GAAG,CAAC3B,cAAcqF,UAAU,CAACpB;AACvC;AAGA,OAAO,SAASqB;IACd,MAAMpC,WAAWF;IAEjBtB,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG;IAEX,KAAK,MAAMa,WAAWU,SAAU;QAC9BxB,QAAQC,GAAG,CAAC,CAAC,EAAE,EAAEa,QAAQE,IAAI,CAAC6C,MAAM,CAAC,IAAI,CAAC,EAAE/C,QAAQxB,WAAW,EAAE;IACnE;IAEAU,QAAQC,GAAG;IACXD,QAAQC,GAAG,CAAC;AACd;AAGAd;AAGAJ,gCAAgC+E,KAAK,CAAC3B,CAAAA;IAEpCnC,QAAQK,KAAK,CAAC,8CAA8C8B,IAAI7B,OAAO;AACzE"}
@@ -24,9 +24,6 @@ export class HelpFormatter {
24
24
  if (info.examples && info.examples.length > 0) {
25
25
  sections.push(this.formatSection('EXAMPLES', info.examples));
26
26
  }
27
- if (info.details) {
28
- sections.push('\n' + info.details);
29
- }
30
27
  if (info.commands && info.commands.length > 0) {
31
28
  sections.push(`Run '${info.name} <command> --help' for more information on a command.`);
32
29
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/cli/help-formatter.js"],"sourcesContent":["/**\n * Standardized CLI Help Formatter\n * Follows Unix/Linux conventions for help output\n */\n\nexport class HelpFormatter {\n static INDENT = ' ';\n static COLUMN_GAP = 2;\n static MIN_DESCRIPTION_COLUMN = 25;\n\n /**\n * Format main command help\n */\n static formatHelp(info) {\n const sections = [];\n\n // NAME section\n sections.push(this.formatSection('NAME', [`${info.name} - ${info.description}`]));\n\n // SYNOPSIS section\n if (info.usage) {\n sections.push(this.formatSection('SYNOPSIS', [info.usage]));\n }\n\n // COMMANDS section\n if (info.commands && info.commands.length > 0) {\n sections.push(this.formatSection('COMMANDS', this.formatCommands(info.commands)));\n }\n\n // OPTIONS section\n if (info.options && info.options.length > 0) {\n sections.push(this.formatSection('OPTIONS', this.formatOptions(info.options)));\n }\n\n // GLOBAL OPTIONS section\n if (info.globalOptions && info.globalOptions.length > 0) {\n sections.push(this.formatSection('GLOBAL OPTIONS', this.formatOptions(info.globalOptions)));\n }\n\n // EXAMPLES section\n if (info.examples && info.examples.length > 0) {\n sections.push(this.formatSection('EXAMPLES', info.examples));\n }\n\n // DETAILS section (additional information)\n if (info.details) {\n sections.push('\\n' + info.details);\n }\n\n // Footer\n if (info.commands && info.commands.length > 0) {\n sections.push(`Run '${info.name} <command> --help' for more information on a command.`);\n }\n\n return sections.join('\\n\\n');\n }\n\n /**\n * Format error message with usage hint\n */\n static formatError(error, command, usage) {\n const lines = [`Error: ${error}`, ''];\n\n if (usage) {\n lines.push(`Usage: ${usage}`);\n }\n\n lines.push(`Try '${command} --help' for more information.`);\n\n return lines.join('\\n');\n }\n\n /**\n * Format validation error with valid options\n */\n static formatValidationError(value, paramName, validOptions, command) {\n return this.formatError(\n `'${value}' is not a valid ${paramName}. Valid options are: ${validOptions.join(', ')}.`,\n command,\n );\n }\n\n static formatSection(title, content) {\n return `${title}\\n${content.map((line) => `${this.INDENT}${line}`).join('\\n')}`;\n }\n\n static formatCommands(commands) {\n const maxNameLength = Math.max(\n this.MIN_DESCRIPTION_COLUMN,\n ...commands.map((cmd) => {\n const nameLength = cmd.name.length;\n const aliasLength = cmd.aliases ? ` (${cmd.aliases.join(', ')})`.length : 0;\n return nameLength + aliasLength;\n }),\n );\n\n return commands.map((cmd) => {\n let name = cmd.name;\n if (cmd.aliases && cmd.aliases.length > 0) {\n name += ` (${cmd.aliases.join(', ')})`;\n }\n const padding = ' '.repeat(maxNameLength - name.length + this.COLUMN_GAP);\n return `${name}${padding}${cmd.description}`;\n });\n }\n\n static formatOptions(options) {\n const maxFlagsLength = Math.max(\n this.MIN_DESCRIPTION_COLUMN,\n ...options.map((opt) => opt.flags.length),\n );\n\n return options.map((opt) => {\n const padding = ' '.repeat(maxFlagsLength - opt.flags.length + this.COLUMN_GAP);\n let description = opt.description;\n\n // Add default value\n if (opt.defaultValue !== undefined) {\n description += ` [default: ${opt.defaultValue}]`;\n }\n\n // Add valid values on next line if present\n if (opt.validValues && opt.validValues.length > 0) {\n const validValuesLine =\n ' '.repeat(maxFlagsLength + this.COLUMN_GAP) + `Valid: ${opt.validValues.join(', ')}`;\n return `${opt.flags}${padding}${description}\\n${this.INDENT}${validValuesLine}`;\n }\n\n return `${opt.flags}${padding}${description}`;\n });\n }\n\n /**\n * Strip ANSI color codes and emojis from text\n */\n static stripFormatting(text) {\n // Remove ANSI color codes\n text = text.replace(/\\x1b\\[[0-9;]*m/g, '');\n\n // Remove common emojis used in the CLI\n const emojiPattern =\n /[\\u{1F300}-\\u{1F9FF}]|[\\u{2600}-\\u{27BF}]|[\\u{1F000}-\\u{1F6FF}]|[\\u{1F680}-\\u{1F6FF}]/gu;\n text = text.replace(emojiPattern, '').trim();\n\n // Remove multiple spaces\n text = text.replace(/\\s+/g, ' ');\n\n return text;\n }\n}\n"],"names":["HelpFormatter","INDENT","COLUMN_GAP","MIN_DESCRIPTION_COLUMN","formatHelp","info","sections","push","formatSection","name","description","usage","commands","length","formatCommands","options","formatOptions","globalOptions","examples","details","join","formatError","error","command","lines","formatValidationError","value","paramName","validOptions","title","content","map","line","maxNameLength","Math","max","cmd","nameLength","aliasLength","aliases","padding","repeat","maxFlagsLength","opt","flags","defaultValue","undefined","validValues","validValuesLine","stripFormatting","text","replace","emojiPattern","trim"],"mappings":"AAKA,OAAO,MAAMA;IACX,OAAOC,SAAS,OAAO;IACvB,OAAOC,aAAa,EAAE;IACtB,OAAOC,yBAAyB,GAAG;IAKnC,OAAOC,WAAWC,IAAI,EAAE;QACtB,MAAMC,WAAW,EAAE;QAGnBA,SAASC,IAAI,CAAC,IAAI,CAACC,aAAa,CAAC,QAAQ;YAAC,GAAGH,KAAKI,IAAI,CAAC,GAAG,EAAEJ,KAAKK,WAAW,EAAE;SAAC;QAG/E,IAAIL,KAAKM,KAAK,EAAE;YACdL,SAASC,IAAI,CAAC,IAAI,CAACC,aAAa,CAAC,YAAY;gBAACH,KAAKM,KAAK;aAAC;QAC3D;QAGA,IAAIN,KAAKO,QAAQ,IAAIP,KAAKO,QAAQ,CAACC,MAAM,GAAG,GAAG;YAC7CP,SAASC,IAAI,CAAC,IAAI,CAACC,aAAa,CAAC,YAAY,IAAI,CAACM,cAAc,CAACT,KAAKO,QAAQ;QAChF;QAGA,IAAIP,KAAKU,OAAO,IAAIV,KAAKU,OAAO,CAACF,MAAM,GAAG,GAAG;YAC3CP,SAASC,IAAI,CAAC,IAAI,CAACC,aAAa,CAAC,WAAW,IAAI,CAACQ,aAAa,CAACX,KAAKU,OAAO;QAC7E;QAGA,IAAIV,KAAKY,aAAa,IAAIZ,KAAKY,aAAa,CAACJ,MAAM,GAAG,GAAG;YACvDP,SAASC,IAAI,CAAC,IAAI,CAACC,aAAa,CAAC,kBAAkB,IAAI,CAACQ,aAAa,CAACX,KAAKY,aAAa;QAC1F;QAGA,IAAIZ,KAAKa,QAAQ,IAAIb,KAAKa,QAAQ,CAACL,MAAM,GAAG,GAAG;YAC7CP,SAASC,IAAI,CAAC,IAAI,CAACC,aAAa,CAAC,YAAYH,KAAKa,QAAQ;QAC5D;Q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AY,EAAE,EAAE,IAAI,CAACT,MAAM,GAAG+C,iBAAiB;YACjF;YAEA,OAAO,GAAGL,IAAIC,KAAK,GAAGJ,UAAU9B,aAAa;QAC/C;IACF;IAKA,OAAOuC,gBAAgBC,IAAI,EAAE;QAE3BA,OAAOA,KAAKC,OAAO,CAAC,mBAAmB;QAGvC,MAAMC,eACJ;QACFF,OAAOA,KAAKC,OAAO,CAACC,cAAc,IAAIC,IAAI;QAG1CH,OAAOA,KAAKC,OAAO,CAAC,QAAQ;QAE5B,OAAOD;IACT;AACF"}
1
+ {"version":3,"sources":["../../../src/cli/help-formatter.ts"],"sourcesContent":["/**\n * Standardized CLI Help Formatter\n * Follows Unix/Linux conventions for help output\n */\n\nexport interface CommandInfo {\n name: string;\n description: string;\n usage?: string;\n commands?: CommandItem[];\n options?: OptionItem[];\n examples?: string[];\n globalOptions?: OptionItem[];\n}\n\nexport interface CommandItem {\n name: string;\n description: string;\n aliases?: string[];\n}\n\nexport interface OptionItem {\n flags: string;\n description: string;\n defaultValue?: string;\n validValues?: string[];\n}\n\nexport class HelpFormatter {\n private static readonly INDENT = ' ';\n private static readonly COLUMN_GAP = 2;\n private static readonly MIN_DESCRIPTION_COLUMN = 25;\n\n /**\n * Format main command help\n */\n static formatHelp(info: CommandInfo): string {\n const sections: string[] = [];\n\n // NAME section\n sections.push(this.formatSection('NAME', [`${info.name} - ${info.description}`]));\n\n // SYNOPSIS section\n if (info.usage) {\n sections.push(this.formatSection('SYNOPSIS', [info.usage]));\n }\n\n // COMMANDS section\n if (info.commands && info.commands.length > 0) {\n sections.push(this.formatSection('COMMANDS', this.formatCommands(info.commands)));\n }\n\n // OPTIONS section\n if (info.options && info.options.length > 0) {\n sections.push(this.formatSection('OPTIONS', this.formatOptions(info.options)));\n }\n\n // GLOBAL OPTIONS section\n if (info.globalOptions && info.globalOptions.length > 0) {\n sections.push(this.formatSection('GLOBAL OPTIONS', this.formatOptions(info.globalOptions)));\n }\n\n // EXAMPLES section\n if (info.examples && info.examples.length > 0) {\n sections.push(this.formatSection('EXAMPLES', info.examples));\n }\n\n // Footer\n if (info.commands && info.commands.length > 0) {\n sections.push(`Run '${info.name} <command> --help' for more information on a command.`);\n }\n\n return sections.join('\\n\\n');\n }\n\n /**\n * Format error message with usage hint\n */\n static formatError(error: string, command: string, usage?: string): string {\n const lines: string[] = [`Error: ${error}`, ''];\n\n if (usage) {\n lines.push(`Usage: ${usage}`);\n }\n\n lines.push(`Try '${command} --help' for more information.`);\n\n return lines.join('\\n');\n }\n\n /**\n * Format validation error with valid options\n */\n static formatValidationError(\n value: string,\n paramName: string,\n validOptions: string[],\n command: string,\n ): string {\n return this.formatError(\n `'${value}' is not a valid ${paramName}. Valid options are: ${validOptions.join(', ')}.`,\n command,\n );\n }\n\n private static formatSection(title: string, content: string[]): string {\n return `${title}\\n${content.map((line) => `${this.INDENT}${line}`).join('\\n')}`;\n }\n\n private static formatCommands(commands: CommandItem[]): string[] {\n const maxNameLength = Math.max(\n this.MIN_DESCRIPTION_COLUMN,\n ...commands.map((cmd) => {\n const nameLength = cmd.name.length;\n const aliasLength = cmd.aliases ? ` (${cmd.aliases.join(', ')})`.length : 0;\n return nameLength + aliasLength;\n }),\n );\n\n return commands.map((cmd) => {\n let name = cmd.name;\n if (cmd.aliases && cmd.aliases.length > 0) {\n name += ` (${cmd.aliases.join(', ')})`;\n }\n const padding = ' '.repeat(maxNameLength - name.length + this.COLUMN_GAP);\n return `${name}${padding}${cmd.description}`;\n });\n }\n\n private static formatOptions(options: OptionItem[]): string[] {\n const maxFlagsLength = Math.max(\n this.MIN_DESCRIPTION_COLUMN,\n ...options.map((opt) => opt.flags.length),\n );\n\n return options.map((opt) => {\n const padding = ' '.repeat(maxFlagsLength - opt.flags.length + this.COLUMN_GAP);\n let description = opt.description;\n\n // Add default value\n if (opt.defaultValue !== undefined) {\n description += ` [default: ${opt.defaultValue}]`;\n }\n\n // Add valid values on next line if present\n if (opt.validValues && opt.validValues.length > 0) {\n const validValuesLine =\n ' '.repeat(maxFlagsLength + this.COLUMN_GAP) + `Valid: ${opt.validValues.join(', ')}`;\n return `${opt.flags}${padding}${description}\\n${this.INDENT}${validValuesLine}`;\n }\n\n return `${opt.flags}${padding}${description}`;\n });\n }\n\n /**\n * Strip ANSI color codes and emojis from text\n */\n static stripFormatting(text: string): string {\n // Remove ANSI color codes\n text = text.replace(/\\x1b\\[[0-9;]*m/g, '');\n\n // Remove common emojis used in the CLI\n const emojiPattern =\n /[\\u{1F300}-\\u{1F9FF}]|[\\u{2600}-\\u{27BF}]|[\\u{1F000}-\\u{1F6FF}]|[\\u{1F680}-\\u{1F6FF}]/gu;\n text = text.replace(emojiPattern, '').trim();\n\n // Remove multiple spaces\n text = text.replace(/\\s+/g, ' ');\n\n return text;\n }\n}\n"],"names":["HelpFormatter","INDENT","COLUMN_GAP","MIN_DESCRIPTION_COLUMN","formatHelp","info","sections","push","formatSection","name","description","usage","commands","length","formatCommands","options","formatOptions","globalOptions","examples","join","formatError","error","command","lines","formatValidationError","value","paramName","validOptions","title","content","map","line","maxNameLength","Math","max","cmd","nameLength","aliasLength","aliases","padding","repeat","maxFlagsLength","opt","flags","defaultValue","undefined","validValues","validValuesLine","stripFormatting","text","replace","emojiPattern","trim"],"mappings":"AA4BA,OAAO,MAAMA;IACX,OAAwBC,SAAS,OAAO;IACxC,OAAwBC,aAAa,EAAE;IACvC,OAAwBC,yBAAyB,GAAG;IAKpD,OAAOC,WAAWC,IAAiB,EAAU;QAC3C,MAAMC,WAAqB,EAAE;QAG7BA,SAASC,IAAI,CAAC,IAAI,CAACC,aAAa,CAAC,QAAQ;YAAC,GAAGH,KAAKI,IAAI,CAAC,GAAG,EAAEJ,KAAKK,WAAW,EAAE;SAAC;QAG/E,IAAIL,KAAKM,KAAK,EAAE;YACdL,SAASC,IAAI,CAAC,IAAI,CAACC,aAAa,CAAC,YAAY;gBAACH,KAAKM,KAAK;aAAC;QAC3D;QAGA,IAAIN,KAAKO,QAAQ,IAAIP,KAAKO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QAG1C,OAAOE,QAAQe,GAAG,CAAC,CAACY;YAClB,MAAMH,UAAU,IAAIC,MAAM,CAACC,iBAAiBC,IAAIC,KAAK,CAAC9B,MAAM,GAAG,IAAI,CAACX,UAAU;YAC9E,IAAIQ,cAAcgC,IAAIhC,WAAW;YAGjC,IAAIgC,IAAIE,YAAY,KAAKC,WAAW;gBAClCnC,eAAe,CAAC,WAAW,EAAEgC,IAAIE,YAAY,CAAC,CAAC,CAAC;YAClD;YAGA,IAAIF,IAAII,WAAW,IAAIJ,IAAII,WAAW,CAACjC,MAAM,GAAG,GAAG;gBACjD,MAAMkC,kBACJ,IAAIP,MAAM,CAACC,iBAAiB,IAAI,CAACvC,UAAU,IAAI,CAAC,OAAO,EAAEwC,IAAII,WAAW,CAAC3B,IAAI,CAAC,OAAO;gBACvF,OAAO,GAAGuB,IAAIC,KAAK,GAAGJ,UAAU7B,YAAY,EAAE,EAAE,IAAI,CAACT,MAAM,GAAG8C,iBAAiB;YACjF;YAEA,OAAO,GAAGL,IAAIC,KAAK,GAAGJ,UAAU7B,aAAa;QAC/C;IACF;IAKA,OAAOsC,gBAAgBC,IAAY,EAAU;QAE3CA,OAAOA,KAAKC,OAAO,CAAC,mBAAmB;QAGvC,MAAMC,eACJ;QACFF,OAAOA,KAAKC,OAAO,CAACC,cAAc,IAAIC,IAAI;QAG1CH,OAAOA,KAAKC,OAAO,CAAC,QAAQ;QAE5B,OAAOD;IACT;AACF"}
@@ -61,8 +61,20 @@ USAGE:
61
61
  start [--swarm] Start orchestration system
62
62
  swarm <objective> Multi-agent swarm coordination
63
63
  agent <action> Agent management (spawn, list, terminate)
64
- sparc <mode> SPARC development modes (17 available)
65
- memory <action> Persistent memory operations
64
+ agent booster Ultra-fast code editing (352x faster, $0 cost)
65
+ - edit <file> Edit single file with local WASM processing
66
+ - batch <pattern> Batch edit multiple files (1000 files in 1 sec)
67
+ - benchmark Validate 352x speed claim with tests
68
+ • agent memory ReasoningBank learning memory (46% faster, 88% success)
69
+ - init Initialize ReasoningBank database
70
+ - status Show memory statistics
71
+ - list List stored memories
72
+ sparc <mode> SPARC development modes (13 available)
73
+ memory <action> ReasoningBank persistent memory system
74
+ proxy <action> OpenRouter proxy server (85-98% cost savings)
75
+ - start Start proxy server
76
+ - status Check proxy status
77
+ - config Configuration guide
66
78
  github <mode> GitHub workflow automation (6 modes)
67
79
  status System status and health
68
80
 
@@ -768,16 +780,52 @@ export function getStandardizedCommandHelp(command) {
768
780
  const commandConfigs = {
769
781
  agent: {
770
782
  name: 'claude-flow agent',
771
- description: 'Manage individual agents',
783
+ description: 'Manage agents with agentic-flow integration (66+ agents, ultra-fast editing, ReasoningBank memory)',
772
784
  usage: 'claude-flow agent <action> [options]',
773
785
  commands: [
786
+ {
787
+ name: 'run <agent> "<task>"',
788
+ description: 'Execute agent with multi-provider (NEW)'
789
+ },
790
+ {
791
+ name: 'agents',
792
+ description: 'List all 66+ agentic-flow agents (NEW)'
793
+ },
794
+ {
795
+ name: 'booster edit <file>',
796
+ description: 'Ultra-fast editing - 352x faster (NEW)'
797
+ },
798
+ {
799
+ name: 'booster batch <pattern>',
800
+ description: 'Batch edit multiple files (NEW)'
801
+ },
802
+ {
803
+ name: 'memory init',
804
+ description: 'Initialize ReasoningBank learning memory - 46% faster execution (NEW)'
805
+ },
806
+ {
807
+ name: 'memory status',
808
+ description: 'Show ReasoningBank status and statistics (NEW)'
809
+ },
810
+ {
811
+ name: 'memory list',
812
+ description: 'List stored ReasoningBank memories (NEW)'
813
+ },
814
+ {
815
+ name: 'config wizard',
816
+ description: 'Interactive setup wizard (NEW)'
817
+ },
818
+ {
819
+ name: 'mcp start',
820
+ description: 'Start MCP server (NEW)'
821
+ },
774
822
  {
775
823
  name: 'spawn',
776
- description: 'Create a new agent'
824
+ description: 'Create internal agent'
777
825
  },
778
826
  {
779
827
  name: 'list',
780
- description: 'List all active agents'
828
+ description: 'List active internal agents'
781
829
  },
782
830
  {
783
831
  name: 'info',