๐ The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
[feat] Add agentic-flow integration commands to agent --help
rUv51d4cfc317cc
diff --git a/dist-cjs/src/cli/help-text.js b/dist-cjs/src/cli/help-text.jsindex 5fb82bc0d7..1f19406ca8 100644--- a/dist-cjs/src/cli/help-text.js+++ b/dist-cjs/src/cli/help-text.js@@ -772,16 +772,44 @@ export function getStandardizedCommandHelp(command) {const commandConfigs = {agent: {name: 'claude-flow agent',- description: 'Manage individual agents',+ description: 'Manage agents with agentic-flow integration (66+ agents, ultra-fast editing, memory)',usage: 'claude-flow agent <action> [options]',commands: [+ {+ name: 'run <agent> "<task>"',+ description: 'Execute agent with multi-provider (NEW)'+ },+ {+ name: 'agents',+ description: 'List all 66+ agentic-flow agents (NEW)'+ },+ {+ name: 'booster edit <file>',+ description: 'Ultra-fast editing - 352x faster (NEW)'+ },+ {+ name: 'booster batch <pattern>',+ description: 'Batch edit multiple files (NEW)'+ },+ {+ name: 'memory init',+ description: 'Initialize ReasoningBank memory (NEW)'+ },+ {+ name: 'config wizard',+ description: 'Interactive setup wizard (NEW)'+ },+ {+ name: 'mcp start',+ description: 'Start MCP server (NEW)'+ },{name: 'spawn',- description: 'Create a new agent'+ description: 'Create internal agent'},{name: 'list',- description: 'List all active agents'+ description: 'List active internal agents'},{name: 'info',diff --git a/dist-cjs/src/cli/help-text.js.map b/dist-cjs/src/cli/help-text.js.mapindex e284d4c34b..2de4045e59 100644--- a/dist-cjs/src/cli/help-text.js.map+++ b/dist-cjs/src/cli/help-text.js.map@@ -1 +1 @@-{"version":3,"sources":["../../../src/cli/help-text.js"],"sourcesContent":["/**\n * Help text templates for Claude Flow CLI\n * Provides clear, actionable command documentation\n */\n\nimport { HelpFormatter } from './help-formatter.js';\nimport { VERSION } from '../core/version.js';\n\nexport { VERSION };\n\nexport const MAIN_HELP = `\n๐ Claude-Flow v${VERSION} - Enterprise-Grade AI Agent Orchestration Platform\n\n๐ v2.5.0-alpha.130 - SDK Integration & Performance Breakthrough\n\n๐ฅ NEW IN v2.5.0-alpha.130:\n โก 10-20x Faster Agent Spawning - Parallel agent execution with session forking\n ๐ฎ Real-Time Query Control - Pause, resume, terminate queries mid-execution\n ๐ Dynamic Model Switching - Change Claude models during execution (cost optimization)\n ๐ Dynamic Permissions - Change permission modes on-the-fly\n ๐ 90 MCP Tools - 87 existing + 3 new Phase 4 tools\n ๐ 500-2000x Potential Speedup - Combined performance stack (In-Process + Parallel + Hooks)\n\n๐ฏ ENTERPRISE FEATURES:\n โข Complete ruv-swarm integration with 90+ MCP tools\n โข Flow Nexus cloud platform with distributed sandboxes\n โข Claude Code SDK integration for maximum performance\n โข Production-ready infrastructure with enterprise reliability\n\nUSAGE:\n npx claude-flow <command> [options] # Run latest alpha version\n npx claude-flow <command> --help # Get detailed help for any command\n npx claude-flow --help # Show this help\n \n # After local install:\n claude-flow <command> [options]\n claude-flow <command> --help # Get detailed help for any command\n\n๐ QUICK START:\n # First time setup (creates CLAUDE.md & .claude/commands)\n npx claude-flow init\n \n # ๐ FLOW NEXUS CLOUD (NEW!):\n mcp__flow-nexus__user_register # Register for cloud features\n mcp__flow-nexus__user_login # Login to access sandboxes & neural networks\n mcp__flow-nexus__sandbox_create # Create cloud execution environments\n \n # ๐ HIVE MIND QUICK START:\n claude-flow hive-mind wizard # Interactive setup wizard\n claude-flow hive-mind spawn \"objective\" # Create intelligent swarm\n claude-flow hive-mind spawn \"Build API\" --claude # Open Claude Code CLI\n \n # After setup, use without npx:\n claude-flow start --swarm # Start with swarm intelligence\n claude-flow swarm \"build REST API\" # Deploy multi-agent workflow\n claude-flow swarm \"create service\" --claude # Open Claude Code CLI with swarm\n\n๐ HIVE MIND COMMANDS (NEW!):\n hive-mind wizard ๐ฏ Interactive setup wizard (RECOMMENDED)\n hive-mind init Initialize Hive Mind system with SQLite\n hive-mind spawn <task> Create intelligent swarm with objective\n hive-mind status View active swarms and performance metrics\n hive-mind metrics Advanced performance analytics\n\n๐ CORE COMMANDS:\n init Initialize Claude Flow v2.0.0 (creates CLAUDE.md & .claude/commands)\n --monitoring enables token usage tracking\n start [--swarm] Start orchestration system\n swarm <objective> Multi-agent swarm coordination\n agent <action> Agent management (spawn, list, terminate)\n sparc <mode> SPARC development modes (17 available)\n memory <action> Persistent memory operations\n github <mode> GitHub workflow automation (6 modes)\n status System status and health\n \n๐ VERIFICATION COMMANDS (NEW!):\n verify <subcommand> Truth verification system (0.95 threshold)\n truth View truth scores and reliability metrics\n pair [--start] Collaborative development with real-time verification\n \n๐ SWARM INTELLIGENCE COMMANDS:\n training <command> Neural pattern learning & model updates (3 commands)\n coordination <command> Swarm & agent orchestration (3 commands)\n analysis <command> Performance & token usage analytics (real tracking!)\n automation <command> Intelligent agent & workflow management (3 commands)\n hooks <command> Lifecycle event management (5 commands)\n migrate-hooks Migrate settings.json to Claude Code 1.0.51+ format\n monitoring <command> Real-time system monitoring (3 commands)\n optimization <command> Performance & topology optimization (3 commands)\n \n๐ ADDITIONAL COMMANDS:\n task <action> Task and workflow management\n config <action> System configuration\n mcp <action> MCP server management\n batch <action> Batch operations\n stream-chain <workflow> Stream-JSON chaining for multi-agent pipelines\n\n๐ฅ NEW MCP TOOLS (v2.5.0-alpha.130):\n Available via Claude Code after installing:\n claude mcp add claude-flow npx claude-flow@alpha mcp start\n\n mcp__claude-flow__agents_spawn_parallel Spawn agents in parallel (10-20x faster)\n โข Spawn multiple agents concurrently\n โข 10-20x speedup vs sequential spawning\n โข Example: 3 agents in 150ms instead of 2250ms\n\n mcp__claude-flow__query_control Control running queries in real-time\n โข Actions: pause, resume, terminate\n โข Change model mid-execution (Sonnet โ Haiku for cost savings)\n โข Change permissions dynamically\n โข Execute commands in query context\n\n mcp__claude-flow__query_list List active queries with status\n โข View all running queries\n โข Monitor query status and performance\n โข Filter by active or include history\n\n๐ GET HELP:\n npx claude-flow --help Show this help\n npx claude-flow <command> --help Detailed command help\n\n๐ฏ RECOMMENDED FOR NEW USERS:\n npx claude-flow hive-mind wizard # Start here! Interactive guided setup\n npx claude-flow init # Initialize Claude Flow\n npx claude-flow help hive-mind # Learn about Hive Mind features\n npx claude-flow swarm \"Build API\" --claude # Quick start with Claude Code CLI\n\n๐ Documentation: https://github.com/ruvnet/claude-flow\n๐ Hive Mind Guide: https://github.com/ruvnet/claude-flow/tree/main/docs/hive-mind\n๐ ruv-swarm: https://github.com/ruvnet/ruv-FANN/tree/main/ruv-swarm\n๐ฌ Discord Community: https://discord.agentics.org\n\n๐ Created by rUv with love: https://github.com/ruvnet\n`;\n\nexport const COMMAND_HELP = {\n verify: `\n๐ VERIFY COMMAND - Truth Verification System\n\nUSAGE:\n claude-flow verify <subcommand> [options]\n\nDESCRIPTION:\n Enforce truth and accuracy in multi-agent operations with a 0.95 threshold.\n \"Truth is enforced, not assumed\" - every agent claim is verified.\n\nSUBCOMMANDS:\n init <mode> Initialize verification system\n Modes: strict (0.95), moderate (0.85), development (0.75)\n verify <task> Run verification on specific task or agent\n status Show verification system status and metrics\n rollback Trigger manual rollback to last good state\n\nOPTIONS:\n --threshold <n> Custom accuracy threshold (0.0-1.0)\n --agent <type> Specify agent type for verification\n --auto-rollback Enable automatic rollback on failures\n --verbose Detailed verification output\n --json Output in JSON format\n\nEXAMPLES:\n claude-flow verify init strict # Production mode\n claude-flow verify verify task-123 --agent coder\n claude-flow verify status --recent 10\n claude-flow verify rollback --checkpoint last\n`,\n truth: `\n๐ TRUTH COMMAND - Truth Score Analytics\n\nUSAGE:\n claude-flow truth [options]\n\nDESCRIPTION:\n View and analyze truth scores, reliability metrics, and verification history.\n Provides insights into agent accuracy and system reliability.\n\nOPTIONS:\n --report Generate detailed truth score report\n --analyze Analyze failure patterns and trends\n --agent <type> Filter by specific agent type\n --taskId <id> Check specific task truth score\n --threshold <n> Filter scores below threshold\n --json Output in JSON format\n --export <file> Export report to file\n\nEXAMPLES:\n claude-flow truth # Show current scores\n claude-flow truth --report # Detailed report\n claude-flow truth --analyze # Pattern analysis\n claude-flow truth --agent coder --detailed\n claude-flow truth --json | jq .averageScore\n`,\n pair: `\n๐ฅ PAIR COMMAND - Collaborative Development Mode\n\nUSAGE:\n claude-flow pair [options]\n\nDESCRIPTION:\n Real-time collaborative development with AI verification.\n Continuous validation with instant feedback and auto-rollback.\n\nOPTIONS:\n --start Start new pair programming session\n --mode <type> Set verification mode:\n strict (0.95), standard (0.85), development (0.75)\n --threshold <n> Custom accuracy threshold (0.0-1.0)\n --verify Enable real-time verification\n --monitor Show real-time metrics dashboard\n --auto-rollback Enable automatic rollback on failures\n --summary View session summary\n --export <file> Export session metrics\n\nEXAMPLES:\n claude-flow pair --start # Start session\n claude-flow pair --start --mode strict # Production pairing\n claude-flow pair --threshold 0.90 # Custom threshold\n claude-flow pair --summary # View session stats\n claude-flow pair --monitor --verify # Real-time monitoring\n`,\n swarm: `\n๐ง SWARM COMMAND - Multi-Agent AI Coordination\n\nUSAGE:\n claude-flow swarm <objective> [options]\n\nDESCRIPTION:\n Deploy intelligent multi-agent swarms to accomplish complex objectives.\n Agents work in parallel with neural optimization and real-time coordination.\n\nOPTIONS:\n --strategy <type> Execution strategy: research, development, analysis,\n testing, optimization, maintenance\n --mode <type> Coordination mode: centralized, distributed,\n hierarchical, mesh, hybrid\n --max-agents <n> Maximum number of agents (default: 5)\n --parallel Enable parallel execution (2.8-4.4x speed improvement)\n --monitor Real-time swarm monitoring\n --background Run in background with progress tracking\n --claude Open Claude Code CLI\n --executor Use built-in executor instead of Claude Code\n --analysis Enable analysis/read-only mode (no code changes)\n --read-only Enable read-only mode (alias for --analysis)\n\nEXAMPLES:\n claude-flow swarm \"Build a REST API with authentication\"\n claude-flow swarm \"Research cloud architecture patterns\" --strategy research\n claude-flow swarm \"Optimize database queries\" --max-agents 3 --parallel\n claude-flow swarm \"Develop feature X\" --strategy development --monitor\n claude-flow swarm \"Build API\" --claude # Open Claude Code CLI\n claude-flow swarm \"Create service\" --executor # Use built-in executor\n claude-flow swarm \"Analyze codebase for security issues\" --analysis\n claude-flow swarm \"Review architecture patterns\" --read-only --strategy research\n\nAGENT TYPES:\n researcher Research with web access and data analysis\n coder Code development with neural patterns\n analyst Performance analysis and optimization\n architect System design with enterprise patterns\n tester Comprehensive testing with automation\n coordinator Multi-agent orchestration\n\nANALYSIS MODE:\n When using --analysis or --read-only flags, the swarm operates in a safe\n read-only mode that prevents all code modifications. Perfect for:\n \n โข Code reviews and security audits\n โข Architecture analysis and documentation\n โข Performance bottleneck identification\n โข Technical debt assessment\n โข Dependency mapping and analysis\n โข \"What-if\" scenario exploration\n \n In analysis mode, agents can only read files, search codebases, and\n generate reports - no Write, Edit, or system-modifying operations.\n`,\n\n github: `\n๐ GITHUB COMMAND - Workflow Automation\n\nUSAGE:\n claude-flow github <mode> <objective> [options]\n\nDESCRIPTION:\n Automate GitHub workflows with 6 specialized AI-powered modes.\n Each mode handles specific aspects of repository management.\n\nMODES:\n init Initialize GitHub-enhanced checkpoint system (NEW!)\n gh-coordinator GitHub workflow orchestration and CI/CD\n pr-manager Pull request management with reviews\n issue-tracker Issue management and project coordination\n release-manager Release coordination and deployment\n repo-architect Repository structure optimization\n sync-coordinator Multi-package synchronization\n\nOPTIONS:\n --auto-approve Automatically approve safe changes\n --dry-run Preview changes without applying\n --verbose Detailed operation logging\n --config <file> Custom configuration file\n\nEXAMPLES:\n claude-flow github init # Initialize GitHub checkpoint hooks\n claude-flow github pr-manager \"create feature PR with tests\"\n claude-flow github gh-coordinator \"setup CI/CD pipeline\" --auto-approve\n claude-flow github release-manager \"prepare v2.0.0 release\"\n claude-flow github repo-architect \"optimize monorepo structure\"\n claude-flow github issue-tracker \"analyze and label issues\"\n claude-flow github sync-coordinator \"sync versions across packages\"\n`,\n\n agent: `\n๐ค AGENT COMMAND - AI Agent Management\n\nUSAGE:\n claude-flow agent <action> [options]\n\nACTIONS:\n spawn <type> Create new AI agent\n list List all active agents\n terminate <id> Terminate specific agent\n info <id> Show agent details\n hierarchy Manage agent hierarchies\n ecosystem View agent ecosystem\n\nOPTIONS:\n --name <name> Custom agent name\n --verbose Detailed output\n --json JSON output format\n\nAGENT TYPES:\n researcher Research and data analysis\n coder Code generation and refactoring\n analyst Performance and security analysis\n architect System design and architecture\n tester Test creation and execution\n coordinator Task coordination\n reviewer Code and design review\n optimizer Performance optimization\n\nEXAMPLES:\n claude-flow agent spawn researcher --name \"DataBot\"\n claude-flow agent list --verbose\n claude-flow agent terminate agent-123\n claude-flow agent hierarchy create enterprise\n claude-flow agent ecosystem status\n`,\n\n memory: `\n๐พ MEMORY COMMAND - Persistent Memory Management\n\nUSAGE:\n claude-flow memory <action> [options]\n\nACTIONS:\n store <key> <value> Store data in memory\n get <key> Retrieve stored data\n query <search> Search memory contents\n list List all stored items\n delete <key> Delete specific entry\n stats Memory usage statistics\n export <file> Export memory to file\n import <file> Import memory from file\n cleanup Clean old entries\n\nOPTIONS:\n --namespace <ns> Use specific namespace\n --format <type> Output format (json, table)\n --verbose Detailed output\n\nEXAMPLES:\n claude-flow memory store architecture \"microservices pattern\"\n claude-flow memory get architecture\n claude-flow memory query \"API design\"\n claude-flow memory stats\n claude-flow memory export backup.json\n claude-flow memory cleanup --older-than 30d\n`,\n\n sparc: `\n๐ SPARC COMMAND - Development Mode Operations\n\nUSAGE:\n claude-flow sparc [mode] [objective]\n claude-flow sparc <action>\n\nDESCRIPTION:\n SPARC provides 17 specialized development modes for different workflows.\n Each mode optimizes AI assistance for specific tasks.\n\nMODES:\n architect System architecture and design\n code Code generation and implementation\n tdd Test-driven development workflow\n debug Debugging and troubleshooting\n security Security analysis and fixes\n refactor Code refactoring and optimization\n docs Documentation generation\n review Code review and quality checks\n data Data modeling and analysis\n api API design and implementation\n ui UI/UX development\n ops DevOps and infrastructure\n ml Machine learning workflows\n blockchain Blockchain development\n mobile Mobile app development\n game Game development\n iot IoT system development\n\nACTIONS:\n modes List all available modes\n info <mode> Show mode details\n run <mode> Run specific mode\n\nEXAMPLES:\n claude-flow sparc \"design authentication system\" # Auto-select mode\n claude-flow sparc architect \"design microservices\" # Use architect mode\n claude-flow sparc tdd \"user registration feature\" # TDD workflow\n claude-flow sparc modes # List all modes\n claude-flow sparc info security # Mode details\n`,\n\n init: `\n๐ฏ INIT COMMAND - Initialize Claude Flow Environment\n\nUSAGE:\n claude-flow init [options]\n\nDESCRIPTION:\n Initialize Claude Flow v2.0.0 in your project with full MCP integration.\n By default creates standard setup with local Git checkpoints.\n \n TWO INITIALIZATION MODES:\n โข claude-flow init Standard init with local Git checkpoints\n โข claude-flow github init GitHub-enhanced with automatic releases (NEW!)\n\nOPTIONS:\n --force Overwrite existing configuration\n --dry-run Preview what will be created\n --basic Use basic initialization (pre-v2.0.0)\n --sparc SPARC enterprise setup with additional features\n --minimal Minimal setup without examples\n --template <t> Use specific project template\n\nWHAT claude-flow init CREATES (DEFAULT):\n ๐ CLAUDE.md AI-readable project instructions & context\n ๐ .claude/ Enterprise configuration directory containing:\n โโโ commands/ Custom commands and automation scripts\n โโโ settings.json Advanced configuration and hooks\n โโโ hooks/ Pre/post operation automation\n ๐ .roomodes 17 specialized SPARC development modes\n \n CLAUDE.md CONTENTS:\n โข Project overview and objectives\n โข Technology stack and architecture\n โข Development guidelines and patterns\n โข AI-specific instructions for better assistance\n โข Integration with ruv-swarm MCP tools\n \n .claude/commands INCLUDES:\n โข Custom project-specific commands\n โข Automated workflow scripts\n โข Integration hooks for Claude Code\n โข Team collaboration tools\n \n Features enabled:\n โข ruv-swarm integration with 27 MCP tools\n โข Neural network processing with WASM\n โข Multi-agent coordination topologies\n โข Cross-session memory persistence\n โข GitHub workflow automation\n โข Performance monitoring\n โข Enterprise security features\n\nEXAMPLES:\n npx claude-flow init # Standard init with local checkpoints\n npx claude-flow github init # GitHub-enhanced init with releases\n claude-flow init --force # Overwrite existing configuration\n claude-flow github init --force # Force GitHub mode (overwrite)\n claude-flow init --dry-run # Preview what will be created\n claude-flow init --monitoring # Initialize with token tracking\n claude-flow init --sparc # SPARC enterprise setup\n claude-flow init --minimal # Basic setup only\n`,\n\n start: `\n๐ START COMMAND - Start Orchestration System\n\nUSAGE:\n claude-flow start [options]\n\nDESCRIPTION:\n Start the Claude Flow orchestration system with optional swarm intelligence.\n\nOPTIONS:\n --swarm Enable swarm intelligence features\n --daemon Run as background daemon\n --port <port> MCP server port (default: 3000)\n --verbose Detailed logging\n --config <file> Custom configuration file\n\nEXAMPLES:\n claude-flow start # Basic start\n claude-flow start --swarm # Start with swarm features\n claude-flow start --daemon # Background daemon\n claude-flow start --port 8080 # Custom MCP port\n claude-flow start --config prod.json # Production config\n`,\n\n status: `\n๐ STATUS COMMAND - System Status\n\nUSAGE:\n claude-flow status [options]\n\nDESCRIPTION:\n Show comprehensive system status including agents, tasks, and resources.\n\nOPTIONS:\n --verbose Detailed system information\n --json JSON output format\n --watch Live updates\n --interval <ms> Update interval (with --watch)\n\nOUTPUT INCLUDES:\n โข Orchestrator status\n โข Active agents and their state\n โข Task queue and progress\n โข Memory usage statistics\n โข MCP server status\n โข System resources\n โข Performance metrics\n\nEXAMPLES:\n claude-flow status # Basic status\n claude-flow status --verbose # Detailed information\n claude-flow status --json # Machine-readable format\n claude-flow status --watch # Live monitoring\n`,\n\n training: `\n๐ง TRAINING COMMAND - Neural Pattern Learning & Model Updates\n\nUSAGE:\n claude-flow training <command> [options]\n\nDESCRIPTION:\n Train neural patterns from operations, learn from outcomes, and update agent models \n with real ruv-swarm integration for continuous learning and optimization.\n\nCOMMANDS:\n neural-train Train neural patterns from operations data\n pattern-learn Learn from specific operation outcomes \n model-update Update agent models with new insights\n\nNEURAL TRAIN OPTIONS:\n --data <source> Training data source (default: recent)\n Options: recent, historical, custom, swarm-<id>\n --model <name> Target model (default: general-predictor)\n Options: task-predictor, agent-selector, performance-optimizer\n --epochs <n> Training epochs (default: 50)\n\nPATTERN LEARN OPTIONS:\n --operation <op> Operation type to learn from\n --outcome <result> Operation outcome (success/failure/partial)\n\nMODEL UPDATE OPTIONS:\n --agent-type <type> Agent type to update (coordinator, coder, researcher, etc.)\n --operation-result <res> Result from operation execution\n\nEXAMPLES:\n claude-flow training neural-train --data recent --model task-predictor\n claude-flow training pattern-learn --operation \"file-creation\" --outcome \"success\"\n claude-flow training model-update --agent-type coordinator --operation-result \"efficient\"\n claude-flow training neural-train --data \"swarm-123\" --epochs 100 --model \"coordinator-predictor\"\n\n๐ฏ Neural training improves:\n โข Task selection accuracy\n โข Agent performance prediction \n โข Coordination efficiency\n โข Error prevention patterns\n`,\n\n coordination: `\n๐ COORDINATION COMMAND - Swarm & Agent Orchestration\n\nUSAGE:\n claude-flow coordination <command> [options]\n\nDESCRIPTION:\n Initialize swarms, spawn coordinated agents, and orchestrate task execution \n across agents with real ruv-swarm MCP integration for optimal performance.\n\nCOMMANDS:\n swarm-init Initialize swarm coordination infrastructure\n agent-spawn Spawn and coordinate new agents\n task-orchestrate Orchestrate task execution across agents\n\nSWARM-INIT OPTIONS:\n --swarm-id <id> Swarm identifier (auto-generated if not provided)\n --topology <type> Coordination topology (default: hierarchical)\n Options: hierarchical, mesh, ring, star, hybrid\n --max-agents <n> Maximum number of agents (default: 5)\n --strategy <strategy> Coordination strategy (default: balanced)\n\nAGENT-SPAWN OPTIONS:\n --type <type> Agent type (default: general)\n Options: coordinator, coder, developer, researcher, analyst, analyzer, \n tester, architect, reviewer, optimizer, general\n --name <name> Custom agent name (auto-generated if not provided)\n --swarm-id <id> Target swarm for agent coordination\n --capabilities <cap> Custom capabilities specification\n\nTASK-ORCHESTRATE OPTIONS:\n --task <description> Task description (required)\n --swarm-id <id> Target swarm for task execution\n --strategy <strategy> Coordination strategy (default: adaptive)\n Options: adaptive, parallel, sequential, hierarchical\n --share-results Enable result sharing across swarm\n\nEXAMPLES:\n claude-flow coordination swarm-init --topology hierarchical --max-agents 8\n claude-flow coordination agent-spawn --type developer --name \"api-dev\" --swarm-id swarm-123\n claude-flow coordination task-orchestrate --task \"Build REST API\" --strategy parallel --share-results\n claude-flow coordination swarm-init --topology mesh --max-agents 12\n\n๐ฏ Coordination enables:\n โข Intelligent task distribution\n โข Agent synchronization\n โข Shared memory coordination\n โข Performance optimization\n โข Fault tolerance\n`,\n\n analysis: `\n๐ ANALYSIS COMMAND - Performance & Usage Analytics\n\nUSAGE:\n claude-flow analysis <command> [options]\n\nDESCRIPTION:\n Detect performance bottlenecks, generate comprehensive reports, and analyze \n token consumption using real ruv-swarm analytics for system optimization.\n\nCOMMANDS:\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\nBOTTLENECK DETECT OPTIONS:\n --scope <scope> Analysis scope (default: system)\n Options: system, swarm, agent, task, memory\n --target <target> Specific target to analyze (default: all)\n Examples: agent-id, swarm-id, task-type\n\nPERFORMANCE REPORT OPTIONS:\n --timeframe <time> Report timeframe (default: 24h)\n Options: 1h, 6h, 24h, 7d, 30d\n --format <format> Report format (default: summary)\n Options: summary, detailed, json, csv\n\nTOKEN USAGE OPTIONS:\n --agent <agent> Filter by agent type or ID (default: all)\n --breakdown Include detailed breakdown by agent type\n --cost-analysis Include cost projections and optimization\n\nEXAMPLES:\n claude-flow analysis bottleneck-detect --scope system\n claude-flow analysis bottleneck-detect --scope agent --target coordinator-1\n claude-flow analysis performance-report --timeframe 7d --format detailed\n claude-flow analysis token-usage --breakdown --cost-analysis\n claude-flow analysis bottleneck-detect --scope swarm --target swarm-123\n\n๐ฏ Analysis helps with:\n โข Performance optimization\n โข Cost management\n โข Resource allocation\n โข Bottleneck identification\n โข Trend analysis\n`,\n\n automation: `\n๐ค AUTOMATION COMMAND - Intelligent Agent & Workflow Management\n\nUSAGE:\n claude-flow automation <command> [options]\n\nDESCRIPTION:\n Automatically spawn optimal agents, intelligently manage workflows, and select \n optimal configurations with real ruv-swarm intelligence for maximum efficiency.\n\nCOMMANDS:\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\nAUTO-AGENT OPTIONS:\n --task-complexity <level> Task complexity level (default: medium)\n Options: low, medium, high, enterprise\n --swarm-id <id> Target swarm ID for agent spawning\n\nSMART-SPAWN OPTIONS:\n --requirement <req> Specific requirement description\n Examples: \"web-development\", \"data-analysis\", \"enterprise-api\"\n --max-agents <n> Maximum number of agents to spawn (default: 10)\n\nWORKFLOW-SELECT OPTIONS:\n --project-type <type> Project type (default: general)\n Options: web-app, api, data-analysis, enterprise, general\n --priority <priority> Optimization priority (default: balanced)\n Options: speed, quality, cost, balanced\n\nEXAMPLES:\n claude-flow automation auto-agent --task-complexity enterprise --swarm-id swarm-123\n claude-flow automation smart-spawn --requirement \"web-development\" --max-agents 8\n claude-flow automation workflow-select --project-type api --priority speed\n claude-flow automation auto-agent --task-complexity low\n\n๐ฏ Automation benefits:\n โข Optimal resource allocation\n โข Intelligent agent selection\n โข Workflow optimization\n โข Reduced manual configuration\n โข Performance-based scaling\n`,\n\n hooks: `\n๐ HOOKS COMMAND - Lifecycle Event Management\n\nUSAGE:\n claude-flow hooks <command> [options]\n\nDESCRIPTION:\n Execute lifecycle hooks before and after tasks, edits, and sessions with \n real ruv-swarm integration for automated preparation, tracking, and cleanup.\n\nCOMMANDS:\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\nPRE-TASK OPTIONS:\n --description <desc> Task description\n --task-id <id> Task identifier\n --agent-id <id> Executing agent identifier\n --auto-spawn-agents Auto-spawn agents for task (default: true)\n\nPOST-TASK OPTIONS:\n --task-id <id> Task identifier\n --analyze-performance Generate performance analysis\n --generate-insights Create AI-powered insights\n\nPRE-EDIT OPTIONS:\n --file <path> Target file path\n --operation <type> Edit operation type (edit, create, delete)\n\nPOST-EDIT OPTIONS:\n --file <path> Modified file path\n --memory-key <key> Coordination memory key for storing edit info\n\nSESSION-END OPTIONS:\n --export-metrics Export session performance metrics\n --swarm-id <id> Swarm identifier for coordination cleanup\n --generate-summary Create comprehensive session summary\n\nEXAMPLES:\n claude-flow hooks pre-task --description \"Build API\" --task-id task-123 --agent-id agent-456\n claude-flow hooks post-task --task-id task-123 --analyze-performance --generate-insights\n claude-flow hooks pre-edit --file \"src/api.js\" --operation edit\n claude-flow hooks post-edit --file \"src/api.js\" --memory-key \"swarm/123/edits/timestamp\"\n claude-flow hooks session-end --export-metrics --generate-summary --swarm-id swarm-123\n\n๐ฏ Hooks enable:\n โข Automated preparation & cleanup\n โข Performance tracking\n โข Coordination synchronization\n โข Error prevention\n โข Insight generation\n`,\n};\n\nexport function getCommandHelp(command) {\n // Return legacy format for now - to be updated\n return COMMAND_HELP[command] || `Help not available for command: ${command}`;\n}\n\nexport function getStandardizedCommandHelp(command) {\n const commandConfigs = {\n agent: {\n name: 'claude-flow agent',\n description: 'Manage individual agents',\n usage: 'claude-flow agent <action> [options]',\n commands: [\n { name: 'spawn', description: 'Create a new agent' },\n { name: 'list', description: 'List all active agents' },\n { name: 'info', description: 'Show agent details' },\n { name: 'terminate', description: 'Stop an agent' },\n { name: 'hierarchy', description: 'Manage agent hierarchies' },\n { name: 'ecosystem', description: 'View agent ecosystem' },\n ],\n options: [\n {\n flags: '--type <type>',\n description: 'Agent type',\n validValues: [\n 'coordinator',\n 'researcher',\n 'coder',\n 'analyst',\n 'architect',\n 'tester',\n 'reviewer',\n 'optimizer',\n ],\n },\n {\n flags: '--name <name>',\n description: 'Agent name',\n },\n {\n flags: '--verbose',\n description: 'Detailed output',\n },\n {\n flags: '--json',\n description: 'Output in JSON format',\n },\n {\n flags: '--help',\n description: 'Show this help message',\n },\n ],\n examples: [\n 'claude-flow agent spawn researcher --name \"Research Bot\"',\n 'claude-flow agent list --json',\n 'claude-flow agent terminate agent-123',\n 'claude-flow agent info agent-456 --verbose',\n ],\n },\n sparc: {\n name: 'claude-flow sparc',\n description: 'Execute SPARC development modes',\n usage: 'claude-flow sparc <mode> [task] [options]',\n commands: [\n { name: 'spec', description: 'Specification mode - Requirements analysis' },\n { name: 'architect', description: 'Architecture mode - System design' },\n { name: 'tdd', description: 'Test-driven development mode' },\n { name: 'integration', description: 'Integration mode - Component connection' },\n { name: 'refactor', description: 'Refactoring mode - Code improvement' },\n { name: 'modes', description: 'List all available SPARC modes' },\n ],\n options: [\n {\n flags: '--file <path>',\n description: 'Input/output file path',\n },\n {\n flags: '--format <type>',\n description: 'Output format',\n validValues: ['markdown', 'json', 'yaml'],\n },\n {\n flags: '--verbose',\n description: 'Detailed output',\n },\n {\n flags: '--help',\n description: 'Show this help message',\n },\n ],\n examples: [\n 'claude-flow sparc spec \"User authentication system\"',\n 'claude-flow sparc tdd \"Payment processing module\"',\n 'claude-flow sparc architect \"Microservices architecture\"',\n 'claude-flow sparc modes',\n ],\n },\n memory: {\n name: 'claude-flow memory',\n description: 'Manage persistent memory operations',\n usage: 'claude-flow memory <action> [key] [value] [options]',\n commands: [\n { name: 'store', description: 'Store data in memory' },\n { name: 'query', description: 'Search memory by pattern' },\n { name: 'list', description: 'List memory namespaces' },\n { name: 'export', description: 'Export memory to file' },\n { name: 'import', description: 'Import memory from file' },\n { name: 'clear', description: 'Clear memory namespace' },\n ],\n options: [\n {\n flags: '--namespace <name>',\n description: 'Memory namespace',\n defaultValue: 'default',\n },\n {\n flags: '--ttl <seconds>',\n description: 'Time to live in seconds',\n },\n {\n flags: '--format <type>',\n description: 'Export format',\n validValues: ['json', 'yaml'],\n },\n {\n flags: '--help',\n description: 'Show this help message',\n },\n ],\n examples: [\n 'claude-flow memory store \"api_design\" \"REST endpoints specification\"',\n 'claude-flow memory query \"authentication\"',\n 'claude-flow memory export backup.json',\n 'claude-flow memory list --namespace project',\n ],\n },\n };\n\n const config = commandConfigs[command];\n if (!config) {\n return HelpFormatter.formatError(\n `Unknown command: ${command}`,\n 'claude-flow',\n 'claude-flow <command> --help',\n );\n }\n\n return HelpFormatter.formatHelp(config);\n}\n\nexport function getMainHelp(plain = false) {\n // Return the vibrant, emoji-rich version by default\n if (!plain) {\n return MAIN_HELP;\n }\n\n // Return plain standardized format when requested\n const helpInfo = {\n name: 'claude-flow',\n description: 'Advanced AI agent orchestration system',\n usage: `claude-flow <command> [<args>] [options]\n claude-flow <command> --help\n claude-flow --version`,\n commands: [\n {\n name: 'hive-mind',\n description: 'Manage hive mind swarm intelligence',\n aliases: ['hm'],\n },\n {\n name: 'init',\n description: 'Initialize Claude Flow configuration',\n },\n {\n name: 'start',\n description: 'Start orchestration system',\n },\n {\n name: 'swarm',\n description: 'Execute multi-agent swarm coordination',\n },\n {\n name: 'agent',\n description: 'Manage individual agents',\n },\n {\n name: 'sparc',\n description: 'Execute SPARC development modes',\n },\n {\n name: 'memory',\n description: 'Manage persistent memory operations',\n },\n {\n name: 'github',\n description: 'Automate GitHub workflows',\n },\n {\n name: 'status',\n description: 'Show system status and health',\n },\n {\n name: 'config',\n description: 'Manage configuration settings',\n },\n {\n name: 'session',\n description: 'Manage sessions and state persistence',\n },\n {\n name: 'terminal',\n description: 'Terminal pool management',\n },\n {\n name: 'workflow',\n description: 'Manage automated workflows',\n },\n {\n name: 'training',\n description: 'Neural pattern training',\n },\n {\n name: 'coordination',\n description: 'Swarm coordination commands',\n },\n {\n name: 'help',\n description: 'Show help information',\n },\n ],\n globalOptions: [\n {\n flags: '--config <path>',\n description: 'Configuration file path',\n defaultValue: '.claude/config.json',\n },\n {\n flags: '--verbose',\n description: 'Enable verbose output',\n },\n {\n flags: '--quiet',\n description: 'Suppress non-error output',\n },\n {\n flags: '--json',\n description: 'Output in JSON format',\n },\n {\n flags: '--plain',\n description: 'Show plain help without emojis',\n },\n {\n flags: '--help',\n description: 'Show help information',\n },\n {\n flags: '--version',\n description: 'Show version information',\n },\n ],\n examples: [\n 'npx claude-flow init',\n 'claude-flow hive-mind wizard',\n 'claude-flow swarm \"Build REST API\"',\n 'claude-flow agent spawn researcher --name \"Research Bot\"',\n 'claude-flow status --json',\n 'claude-flow memory query \"API design\"',\n ],\n };\n\n return HelpFormatter.formatHelp(helpInfo);\n}\n"],"names":["HelpFormatter","VERSION","MAIN_HELP","COMMAND_HELP","verify","truth","pair","swarm","github","agent","memory","sparc","init","start","status","training","coordination","analysis","automation","hooks","getCommandHelp","command","getStandardizedCommandHelp","commandConfigs","name","description","usage","commands","options","flags","validValues","examples","defaultValue","config","formatError","formatHelp","getMainHelp","plain","helpInfo","aliases","globalOptions"],"mappings":"AAKA,SAASA,aAAa,QAAQ,sBAAsB;AACpD,SAASC,OAAO,QAAQ,qBAAqB;AAE7C,SAASA,OAAO,GAAG;AAEnB,OAAO,MAAMC,YAAY,CAAC;gBACV,EAAED,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0H1B,CAAC,CAAC;AAEF,OAAO,MAAME,eAAe;IAC1BC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BX,CAAC;IACCC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;AAyBV,CAAC;IACCC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BT,CAAC;IACCC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDV,CAAC;IAECC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCX,CAAC;IAECC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCV,CAAC;IAECC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;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BAAED,MAAM;oBAASC,aAAa;gBAAyB;aACxD;YACDG,SAAS;gBACP;oBACEC,OAAO;oBACPJ,aAAa;oBACbO,cAAc;gBAChB;gBACA;oBACEH,OAAO;oBACPJ,aAAa;gBACf;gBACA;oBACEI,OAAO;oBACPJ,aAAa;oBACbK,aAAa;wBAAC;wBAAQ;qBAAO;gBAC/B;gBACA;oBACED,OAAO;oBACPJ,aAAa;gBACf;aACD;YACDM,UAAU;gBACR;gBACA;gBACA;gBACA;aACD;QACH;IACF;IAEA,MAAME,SAASV,cAAc,CAACF,QAAQ;IACtC,IAAI,CAACY,QAAQ;QACX,OAAOjC,cAAckC,WAAW,CAC9B,CAAC,iBAAiB,EAAEb,SAAS,EAC7B,eACA;IAEJ;IAEA,OAAOrB,cAAcmC,UAAU,CAACF;AAClC;AAEA,OAAO,SAASG,YAAYC,QAAQ,KAAK;IAEvC,IAAI,CAACA,OAAO;QACV,OAAOnC;IACT;IAGA,MAAMoC,WAAW;QACfd,MAAM;QACNC,aAAa;QACbC,OAAO,CAAC;;yBAEa,CAAC;QACtBC,UAAU;YACR;gBACEH,MAAM;gBACNC,aAAa;gBACbc,SAAS;oBAAC;iBAAK;YACjB;YACA;gBACEf,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;SACD;QACDe,eAAe;YACb;gBACEX,OAAO;gBACPJ,aAAa;gBACbO,cAAc;YAChB;YACA;gBACEH,OAAO;gBACPJ,aAAa;YACf;YACA;gBACEI,OAAO;gBACPJ,aAAa;YACf;YACA;gBACEI,OAAO;gBACPJ,aAAa;YACf;YACA;gBACEI,OAAO;gBACPJ,aAAa;YACf;YACA;gBACEI,OAAO;gBACPJ,aAAa;YACf;YACA;gBACEI,OAAO;gBACPJ,aAAa;YACf;SACD;QACDM,UAAU;YACR;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IAEA,OAAO/B,cAAcmC,UAAU,CAACG;AAClC"}\ No newline at end of file+{"version":3,"sources":["../../../src/cli/help-text.js"],"sourcesContent":["/**\n * Help text templates for Claude Flow CLI\n * Provides clear, actionable command documentation\n */\n\nimport { HelpFormatter } from './help-formatter.js';\nimport { VERSION } from '../core/version.js';\n\nexport { VERSION };\n\nexport const MAIN_HELP = `\n๐ Claude-Flow v${VERSION} - Enterprise-Grade AI Agent Orchestration Platform\n\n๐ v2.5.0-alpha.130 - SDK Integration & Performance Breakthrough\n\n๐ฅ NEW IN v2.5.0-alpha.130:\n โก 10-20x Faster Agent Spawning - Parallel agent execution with session forking\n ๐ฎ Real-Time Query Control - Pause, resume, terminate queries mid-execution\n ๐ Dynamic Model Switching - Change Claude models during execution (cost optimization)\n ๐ Dynamic Permissions - Change permission modes on-the-fly\n ๐ 90 MCP Tools - 87 existing + 3 new Phase 4 tools\n ๐ 500-2000x Potential Speedup - Combined performance stack (In-Process + Parallel + Hooks)\n\n๐ฏ ENTERPRISE FEATURES:\n โข Complete ruv-swarm integration with 90+ MCP tools\n โข Flow Nexus cloud platform with distributed sandboxes\n โข Claude Code SDK integration for maximum performance\n โข Production-ready infrastructure with enterprise reliability\n\nUSAGE:\n npx claude-flow <command> [options] # Run latest alpha version\n npx claude-flow <command> --help # Get detailed help for any command\n npx claude-flow --help # Show this help\n \n # After local install:\n claude-flow <command> [options]\n claude-flow <command> --help # Get detailed help for any command\n\n๐ QUICK START:\n # First time setup (creates CLAUDE.md & .claude/commands)\n npx claude-flow init\n \n # ๐ FLOW NEXUS CLOUD (NEW!):\n mcp__flow-nexus__user_register # Register for cloud features\n mcp__flow-nexus__user_login # Login to access sandboxes & neural networks\n mcp__flow-nexus__sandbox_create # Create cloud execution environments\n \n # ๐ HIVE MIND QUICK START:\n claude-flow hive-mind wizard # Interactive setup wizard\n claude-flow hive-mind spawn \"objective\" # Create intelligent swarm\n claude-flow hive-mind spawn \"Build API\" --claude # Open Claude Code CLI\n \n # After setup, use without npx:\n claude-flow start --swarm # Start with swarm intelligence\n claude-flow swarm \"build REST API\" # Deploy multi-agent workflow\n claude-flow swarm \"create service\" --claude # Open Claude Code CLI with swarm\n\n๐ HIVE MIND COMMANDS (NEW!):\n hive-mind wizard ๐ฏ Interactive setup wizard (RECOMMENDED)\n hive-mind init Initialize Hive Mind system with SQLite\n hive-mind spawn <task> Create intelligent swarm with objective\n hive-mind status View active swarms and performance metrics\n hive-mind metrics Advanced performance analytics\n\n๐ CORE COMMANDS:\n init Initialize Claude Flow v2.0.0 (creates CLAUDE.md & .claude/commands)\n --monitoring enables token usage tracking\n start [--swarm] Start orchestration system\n swarm <objective> Multi-agent swarm coordination\n agent <action> Agent management (spawn, list, terminate)\n โข agent booster Ultra-fast code editing (352x faster, $0 cost)\n - edit <file> Edit single file with local WASM processing\n - batch <pattern> Batch edit multiple files (1000 files in 1 sec)\n - benchmark Validate 352x speed claim with tests\n sparc <mode> SPARC development modes (13 available)\n memory <action> Persistent memory operations\n github <mode> GitHub workflow automation (6 modes)\n status System status and health\n \n๐ VERIFICATION COMMANDS (NEW!):\n verify <subcommand> Truth verification system (0.95 threshold)\n truth View truth scores and reliability metrics\n pair [--start] Collaborative development with real-time verification\n \n๐ SWARM INTELLIGENCE COMMANDS:\n training <command> Neural pattern learning & model updates (3 commands)\n coordination <command> Swarm & agent orchestration (3 commands)\n analysis <command> Performance & token usage analytics (real tracking!)\n automation <command> Intelligent agent & workflow management (3 commands)\n hooks <command> Lifecycle event management (5 commands)\n migrate-hooks Migrate settings.json to Claude Code 1.0.51+ format\n monitoring <command> Real-time system monitoring (3 commands)\n optimization <command> Performance & topology optimization (3 commands)\n \n๐ ADDITIONAL COMMANDS:\n task <action> Task and workflow management\n config <action> System configuration\n mcp <action> MCP server management\n batch <action> Batch operations\n stream-chain <workflow> Stream-JSON chaining for multi-agent pipelines\n\n๐ฅ NEW MCP TOOLS (v2.5.0-alpha.130):\n Available via Claude Code after installing:\n claude mcp add claude-flow npx claude-flow@alpha mcp start\n\n mcp__claude-flow__agents_spawn_parallel Spawn agents in parallel (10-20x faster)\n โข Spawn multiple agents concurrently\n โข 10-20x speedup vs sequential spawning\n โข Example: 3 agents in 150ms instead of 2250ms\n\n mcp__claude-flow__query_control Control running queries in real-time\n โข Actions: pause, resume, terminate\n โข Change model mid-execution (Sonnet โ Haiku for cost savings)\n โข Change permissions dynamically\n โข Execute commands in query context\n\n mcp__claude-flow__query_list List active queries with status\n โข View all running queries\n โข Monitor query status and performance\n โข Filter by active or include history\n\n๐ GET HELP:\n npx claude-flow --help Show this help\n npx claude-flow <command> --help Detailed command help\n\n๐ฏ RECOMMENDED FOR NEW USERS:\n npx claude-flow hive-mind wizard # Start here! Interactive guided setup\n npx claude-flow init # Initialize Claude Flow\n npx claude-flow help hive-mind # Learn about Hive Mind features\n npx claude-flow swarm \"Build API\" --claude # Quick start with Claude Code CLI\n\n๐ Documentation: https://github.com/ruvnet/claude-flow\n๐ Hive Mind Guide: https://github.com/ruvnet/claude-flow/tree/main/docs/hive-mind\n๐ ruv-swarm: https://github.com/ruvnet/ruv-FANN/tree/main/ruv-swarm\n๐ฌ Discord Community: https://discord.agentics.org\n\n๐ Created by rUv with love: https://github.com/ruvnet\n`;\n\nexport const COMMAND_HELP = {\n verify: `\n๐ VERIFY COMMAND - Truth Verification System\n\nUSAGE:\n claude-flow verify <subcommand> [options]\n\nDESCRIPTION:\n Enforce truth and accuracy in multi-agent operations with a 0.95 threshold.\n \"Truth is enforced, not assumed\" - every agent claim is verified.\n\nSUBCOMMANDS:\n init <mode> Initialize verification system\n Modes: strict (0.95), moderate (0.85), development (0.75)\n verify <task> Run verification on specific task or agent\n status Show verification system status and metrics\n rollback Trigger manual rollback to last good state\n\nOPTIONS:\n --threshold <n> Custom accuracy threshold (0.0-1.0)\n --agent <type> Specify agent type for verification\n --auto-rollback Enable automatic rollback on failures\n --verbose Detailed verification output\n --json Output in JSON format\n\nEXAMPLES:\n claude-flow verify init strict # Production mode\n claude-flow verify verify task-123 --agent coder\n claude-flow verify status --recent 10\n claude-flow verify rollback --checkpoint last\n`,\n truth: `\n๐ TRUTH COMMAND - Truth Score Analytics\n\nUSAGE:\n claude-flow truth [options]\n\nDESCRIPTION:\n View and analyze truth scores, reliability metrics, and verification history.\n Provides insights into agent accuracy and system reliability.\n\nOPTIONS:\n --report Generate detailed truth score report\n --analyze Analyze failure patterns and trends\n --agent <type> Filter by specific agent type\n --taskId <id> Check specific task truth score\n --threshold <n> Filter scores below threshold\n --json Output in JSON format\n --export <file> Export report to file\n\nEXAMPLES:\n claude-flow truth # Show current scores\n claude-flow truth --report # Detailed report\n claude-flow truth --analyze # Pattern analysis\n claude-flow truth --agent coder --detailed\n claude-flow truth --json | jq .averageScore\n`,\n pair: `\n๐ฅ PAIR COMMAND - Collaborative Development Mode\n\nUSAGE:\n claude-flow pair [options]\n\nDESCRIPTION:\n Real-time collaborative development with AI verification.\n Continuous validation with instant feedback and auto-rollback.\n\nOPTIONS:\n --start Start new pair programming session\n --mode <type> Set verification mode:\n strict (0.95), standard (0.85), development (0.75)\n --threshold <n> Custom accuracy threshold (0.0-1.0)\n --verify Enable real-time verification\n --monitor Show real-time metrics dashboard\n --auto-rollback Enable automatic rollback on failures\n --summary View session summary\n --export <file> Export session metrics\n\nEXAMPLES:\n claude-flow pair --start # Start session\n claude-flow pair --start --mode strict # Production pairing\n claude-flow pair --threshold 0.90 # Custom threshold\n claude-flow pair --summary # View session stats\n claude-flow pair --monitor --verify # Real-time monitoring\n`,\n swarm: `\n๐ง SWARM COMMAND - Multi-Agent AI Coordination\n\nUSAGE:\n claude-flow swarm <objective> [options]\n\nDESCRIPTION:\n Deploy intelligent multi-agent swarms to accomplish complex objectives.\n Agents work in parallel with neural optimization and real-time coordination.\n\nOPTIONS:\n --strategy <type> Execution strategy: research, development, analysis,\n testing, optimization, maintenance\n --mode <type> Coordination mode: centralized, distributed,\n hierarchical, mesh, hybrid\n --max-agents <n> Maximum number of agents (default: 5)\n --parallel Enable parallel execution (2.8-4.4x speed improvement)\n --monitor Real-time swarm monitoring\n --background Run in background with progress tracking\n --claude Open Claude Code CLI\n --executor Use built-in executor instead of Claude Code\n --analysis Enable analysis/read-only mode (no code changes)\n --read-only Enable read-only mode (alias for --analysis)\n\nEXAMPLES:\n claude-flow swarm \"Build a REST API with authentication\"\n claude-flow swarm \"Research cloud architecture patterns\" --strategy research\n claude-flow swarm \"Optimize database queries\" --max-agents 3 --parallel\n claude-flow swarm \"Develop feature X\" --strategy development --monitor\n claude-flow swarm \"Build API\" --claude # Open Claude Code CLI\n claude-flow swarm \"Create service\" --executor # Use built-in executor\n claude-flow swarm \"Analyze codebase for security issues\" --analysis\n claude-flow swarm \"Review architecture patterns\" --read-only --strategy research\n\nAGENT TYPES:\n researcher Research with web access and data analysis\n coder Code development with neural patterns\n analyst Performance analysis and optimization\n architect System design with enterprise patterns\n tester Comprehensive testing with automation\n coordinator Multi-agent orchestration\n\nANALYSIS MODE:\n When using --analysis or --read-only flags, the swarm operates in a safe\n read-only mode that prevents all code modifications. Perfect for:\n \n โข Code reviews and security audits\n โข Architecture analysis and documentation\n โข Performance bottleneck identification\n โข Technical debt assessment\n โข Dependency mapping and analysis\n โข \"What-if\" scenario exploration\n \n In analysis mode, agents can only read files, search codebases, and\n generate reports - no Write, Edit, or system-modifying operations.\n`,\n\n github: `\n๐ GITHUB COMMAND - Workflow Automation\n\nUSAGE:\n claude-flow github <mode> <objective> [options]\n\nDESCRIPTION:\n Automate GitHub workflows with 6 specialized AI-powered modes.\n Each mode handles specific aspects of repository management.\n\nMODES:\n init Initialize GitHub-enhanced checkpoint system (NEW!)\n gh-coordinator GitHub workflow orchestration and CI/CD\n pr-manager Pull request management with reviews\n issue-tracker Issue management and project coordination\n release-manager Release coordination and deployment\n repo-architect Repository structure optimization\n sync-coordinator Multi-package synchronization\n\nOPTIONS:\n --auto-approve Automatically approve safe changes\n --dry-run Preview changes without applying\n --verbose Detailed operation logging\n --config <file> Custom configuration file\n\nEXAMPLES:\n claude-flow github init # Initialize GitHub checkpoint hooks\n claude-flow github pr-manager \"create feature PR with tests\"\n claude-flow github gh-coordinator \"setup CI/CD pipeline\" --auto-approve\n claude-flow github release-manager \"prepare v2.0.0 release\"\n claude-flow github repo-architect \"optimize monorepo structure\"\n claude-flow github issue-tracker \"analyze and label issues\"\n claude-flow github sync-coordinator \"sync versions across packages\"\n`,\n\n agent: `\n๐ค AGENT COMMAND - AI Agent Management\n\nUSAGE:\n claude-flow agent <action> [options]\n\nACTIONS:\n spawn <type> Create new AI agent\n list List all active agents\n terminate <id> Terminate specific agent\n info <id> Show agent details\n hierarchy Manage agent hierarchies\n ecosystem View agent ecosystem\n\nOPTIONS:\n --name <name> Custom agent name\n --verbose Detailed output\n --json JSON output format\n\nAGENT TYPES:\n researcher Research and data analysis\n coder Code generation and refactoring\n analyst Performance and security analysis\n architect System design and architecture\n tester Test creation and execution\n coordinator Task coordination\n reviewer Code and design review\n optimizer Performance optimization\n\nEXAMPLES:\n claude-flow agent spawn researcher --name \"DataBot\"\n claude-flow agent list --verbose\n claude-flow agent terminate agent-123\n claude-flow agent hierarchy create enterprise\n claude-flow agent ecosystem status\n`,\n\n memory: `\n๐พ MEMORY COMMAND - Persistent Memory Management\n\nUSAGE:\n claude-flow memory <action> [options]\n\nACTIONS:\n store <key> <value> Store data in memory\n get <key> Retrieve stored data\n query <search> Search memory contents\n list List all stored items\n delete <key> Delete specific entry\n stats Memory usage statistics\n export <file> Export memory to file\n import <file> Import memory from file\n cleanup Clean old entries\n\nOPTIONS:\n --namespace <ns> Use specific namespace\n --format <type> Output format (json, table)\n --verbose Detailed output\n\nEXAMPLES:\n claude-flow memory store architecture \"microservices pattern\"\n claude-flow memory get architecture\n claude-flow memory query \"API design\"\n claude-flow memory stats\n claude-flow memory export backup.json\n claude-flow memory cleanup --older-than 30d\n`,\n\n sparc: `\n๐ SPARC COMMAND - Development Mode Operations\n\nUSAGE:\n claude-flow sparc [mode] [objective]\n claude-flow sparc <action>\n\nDESCRIPTION:\n SPARC provides 17 specialized development modes for different workflows.\n Each mode optimizes AI assistance for specific tasks.\n\nMODES:\n architect System architecture and design\n code Code generation and implementation\n tdd Test-driven development workflow\n debug Debugging and troubleshooting\n security Security analysis and fixes\n refactor Code refactoring and optimization\n docs Documentation generation\n review Code review and quality checks\n data Data modeling and analysis\n api API design and implementation\n ui UI/UX development\n ops DevOps and infrastructure\n ml Machine learning workflows\n blockchain Blockchain development\n mobile Mobile app development\n game Game development\n iot IoT system development\n\nACTIONS:\n modes List all available modes\n info <mode> Show mode details\n run <mode> Run specific mode\n\nEXAMPLES:\n claude-flow sparc \"design authentication system\" # Auto-select mode\n claude-flow sparc architect \"design microservices\" # Use architect mode\n claude-flow sparc tdd \"user registration feature\" # TDD workflow\n claude-flow sparc modes # List all modes\n claude-flow sparc info security # Mode details\n`,\n\n init: `\n๐ฏ INIT COMMAND - Initialize Claude Flow Environment\n\nUSAGE:\n claude-flow init [options]\n\nDESCRIPTION:\n Initialize Claude Flow v2.0.0 in your project with full MCP integration.\n By default creates standard setup with local Git checkpoints.\n \n TWO INITIALIZATION MODES:\n โข claude-flow init Standard init with local Git checkpoints\n โข claude-flow github init GitHub-enhanced with automatic releases (NEW!)\n\nOPTIONS:\n --force Overwrite existing configuration\n --dry-run Preview what will be created\n --basic Use basic initialization (pre-v2.0.0)\n --sparc SPARC enterprise setup with additional features\n --minimal Minimal setup without examples\n --template <t> Use specific project template\n\nWHAT claude-flow init CREATES (DEFAULT):\n ๐ CLAUDE.md AI-readable project instructions & context\n ๐ .claude/ Enterprise configuration directory containing:\n โโโ commands/ Custom commands and automation scripts\n โโโ settings.json Advanced configuration and hooks\n โโโ hooks/ Pre/post operation automation\n ๐ .roomodes 17 specialized SPARC development modes\n \n CLAUDE.md CONTENTS:\n โข Project overview and objectives\n โข Technology stack and architecture\n โข Development guidelines and patterns\n โข AI-specific instructions for better assistance\n โข Integration with ruv-swarm MCP tools\n \n .claude/commands INCLUDES:\n โข Custom project-specific commands\n โข Automated workflow scripts\n โข Integration hooks for Claude Code\n โข Team collaboration tools\n \n Features enabled:\n โข ruv-swarm integration with 27 MCP tools\n โข Neural network processing with WASM\n โข Multi-agent coordination topologies\n โข Cross-session memory persistence\n โข GitHub workflow automation\n โข Performance monitoring\n โข Enterprise security features\n\nEXAMPLES:\n npx claude-flow init # Standard init with local checkpoints\n npx claude-flow github init # GitHub-enhanced init with releases\n claude-flow init --force # Overwrite existing configuration\n claude-flow github init --force # Force GitHub mode (overwrite)\n claude-flow init --dry-run # Preview what will be created\n claude-flow init --monitoring # Initialize with token tracking\n claude-flow init --sparc # SPARC enterprise setup\n claude-flow init --minimal # Basic setup only\n`,\n\n start: `\n๐ START COMMAND - Start Orchestration System\n\nUSAGE:\n claude-flow start [options]\n\nDESCRIPTION:\n Start the Claude Flow orchestration system with optional swarm intelligence.\n\nOPTIONS:\n --swarm Enable swarm intelligence features\n --daemon Run as background daemon\n --port <port> MCP server port (default: 3000)\n --verbose Detailed logging\n --config <file> Custom configuration file\n\nEXAMPLES:\n claude-flow start # Basic start\n claude-flow start --swarm # Start with swarm features\n claude-flow start --daemon # Background daemon\n claude-flow start --port 8080 # Custom MCP port\n claude-flow start --config prod.json # Production config\n`,\n\n status: `\n๐ STATUS COMMAND - System Status\n\nUSAGE:\n claude-flow status [options]\n\nDESCRIPTION:\n Show comprehensive system status including agents, tasks, and resources.\n\nOPTIONS:\n --verbose Detailed system information\n --json JSON output format\n --watch Live updates\n --interval <ms> Update interval (with --watch)\n\nOUTPUT INCLUDES:\n โข Orchestrator status\n โข Active agents and their state\n โข Task queue and progress\n โข Memory usage statistics\n โข MCP server status\n โข System resources\n โข Performance metrics\n\nEXAMPLES:\n claude-flow status # Basic status\n claude-flow status --verbose # Detailed information\n claude-flow status --json # Machine-readable format\n claude-flow status --watch # Live monitoring\n`,\n\n training: `\n๐ง TRAINING COMMAND - Neural Pattern Learning & Model Updates\n\nUSAGE:\n claude-flow training <command> [options]\n\nDESCRIPTION:\n Train neural patterns from operations, learn from outcomes, and update agent models \n with real ruv-swarm integration for continuous learning and optimization.\n\nCOMMANDS:\n neural-train Train neural patterns from operations data\n pattern-learn Learn from specific operation outcomes \n model-update Update agent models with new insights\n\nNEURAL TRAIN OPTIONS:\n --data <source> Training data source (default: recent)\n Options: recent, historical, custom, swarm-<id>\n --model <name> Target model (default: general-predictor)\n Options: task-predictor, agent-selector, performance-optimizer\n --epochs <n> Training epochs (default: 50)\n\nPATTERN LEARN OPTIONS:\n --operation <op> Operation type to learn from\n --outcome <result> Operation outcome (success/failure/partial)\n\nMODEL UPDATE OPTIONS:\n --agent-type <type> Agent type to update (coordinator, coder, researcher, etc.)\n --operation-result <res> Result from operation execution\n\nEXAMPLES:\n claude-flow training neural-train --data recent --model task-predictor\n claude-flow training pattern-learn --operation \"file-creation\" --outcome \"success\"\n claude-flow training model-update --agent-type coordinator --operation-result \"efficient\"\n claude-flow training neural-train --data \"swarm-123\" --epochs 100 --model \"coordinator-predictor\"\n\n๐ฏ Neural training improves:\n โข Task selection accuracy\n โข Agent performance prediction \n โข Coordination efficiency\n โข Error prevention patterns\n`,\n\n coordination: `\n๐ COORDINATION COMMAND - Swarm & Agent Orchestration\n\nUSAGE:\n claude-flow coordination <command> [options]\n\nDESCRIPTION:\n Initialize swarms, spawn coordinated agents, and orchestrate task execution \n across agents with real ruv-swarm MCP integration for optimal performance.\n\nCOMMANDS:\n swarm-init Initialize swarm coordination infrastructure\n agent-spawn Spawn and coordinate new agents\n task-orchestrate Orchestrate task execution across agents\n\nSWARM-INIT OPTIONS:\n --swarm-id <id> Swarm identifier (auto-generated if not provided)\n --topology <type> Coordination topology (default: hierarchical)\n Options: hierarchical, mesh, ring, star, hybrid\n --max-agents <n> Maximum number of agents (default: 5)\n --strategy <strategy> Coordination strategy (default: balanced)\n\nAGENT-SPAWN OPTIONS:\n --type <type> Agent type (default: general)\n Options: coordinator, coder, developer, researcher, analyst, analyzer, \n tester, architect, reviewer, optimizer, general\n --name <name> Custom agent name (auto-generated if not provided)\n --swarm-id <id> Target swarm for agent coordination\n --capabilities <cap> Custom capabilities specification\n\nTASK-ORCHESTRATE OPTIONS:\n --task <description> Task description (required)\n --swarm-id <id> Target swarm for task execution\n --strategy <strategy> Coordination strategy (default: adaptive)\n Options: adaptive, parallel, sequential, hierarchical\n --share-results Enable result sharing across swarm\n\nEXAMPLES:\n claude-flow coordination swarm-init --topology hierarchical --max-agents 8\n claude-flow coordination agent-spawn --type developer --name \"api-dev\" --swarm-id swarm-123\n claude-flow coordination task-orchestrate --task \"Build REST API\" --strategy parallel --share-results\n claude-flow coordination swarm-init --topology mesh --max-agents 12\n\n๐ฏ Coordination enables:\n โข Intelligent task distribution\n โข Agent synchronization\n โข Shared memory coordination\n โข Performance optimization\n โข Fault tolerance\n`,\n\n analysis: `\n๐ ANALYSIS COMMAND - Performance & Usage Analytics\n\nUSAGE:\n claude-flow analysis <command> [options]\n\nDESCRIPTION:\n Detect performance bottlenecks, generate comprehensive reports, and analyze \n token consumption using real ruv-swarm analytics for system optimization.\n\nCOMMANDS:\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\nBOTTLENECK DETECT OPTIONS:\n --scope <scope> Analysis scope (default: system)\n Options: system, swarm, agent, task, memory\n --target <target> Specific target to analyze (default: all)\n Examples: agent-id, swarm-id, task-type\n\nPERFORMANCE REPORT OPTIONS:\n --timeframe <time> Report timeframe (default: 24h)\n Options: 1h, 6h, 24h, 7d, 30d\n --format <format> Report format (default: summary)\n Options: summary, detailed, json, csv\n\nTOKEN USAGE OPTIONS:\n --agent <agent> Filter by agent type or ID (default: all)\n --breakdown Include detailed breakdown by agent type\n --cost-analysis Include cost projections and optimization\n\nEXAMPLES:\n claude-flow analysis bottleneck-detect --scope system\n claude-flow analysis bottleneck-detect --scope agent --target coordinator-1\n claude-flow analysis performance-report --timeframe 7d --format detailed\n claude-flow analysis token-usage --breakdown --cost-analysis\n claude-flow analysis bottleneck-detect --scope swarm --target swarm-123\n\n๐ฏ Analysis helps with:\n โข Performance optimization\n โข Cost management\n โข Resource allocation\n โข Bottleneck identification\n โข Trend analysis\n`,\n\n automation: `\n๐ค AUTOMATION COMMAND - Intelligent Agent & Workflow Management\n\nUSAGE:\n claude-flow automation <command> [options]\n\nDESCRIPTION:\n Automatically spawn optimal agents, intelligently manage workflows, and select \n optimal configurations with real ruv-swarm intelligence for maximum efficiency.\n\nCOMMANDS:\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\nAUTO-AGENT OPTIONS:\n --task-complexity <level> Task complexity level (default: medium)\n Options: low, medium, high, enterprise\n --swarm-id <id> Target swarm ID for agent spawning\n\nSMART-SPAWN OPTIONS:\n --requirement <req> Specific requirement description\n Examples: \"web-development\", \"data-analysis\", \"enterprise-api\"\n --max-agents <n> Maximum number of agents to spawn (default: 10)\n\nWORKFLOW-SELECT OPTIONS:\n --project-type <type> Project type (default: general)\n Options: web-app, api, data-analysis, enterprise, general\n --priority <priority> Optimization priority (default: balanced)\n Options: speed, quality, cost, balanced\n\nEXAMPLES:\n claude-flow automation auto-agent --task-complexity enterprise --swarm-id swarm-123\n claude-flow automation smart-spawn --requirement \"web-development\" --max-agents 8\n claude-flow automation workflow-select --project-type api --priority speed\n claude-flow automation auto-agent --task-complexity low\n\n๐ฏ Automation benefits:\n โข Optimal resource allocation\n โข Intelligent agent selection\n โข Workflow optimization\n โข Reduced manual configuration\n โข Performance-based scaling\n`,\n\n hooks: `\n๐ HOOKS COMMAND - Lifecycle Event Management\n\nUSAGE:\n claude-flow hooks <command> [options]\n\nDESCRIPTION:\n Execute lifecycle hooks before and after tasks, edits, and sessions with \n real ruv-swarm integration for automated preparation, tracking, and cleanup.\n\nCOMMANDS:\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\nPRE-TASK OPTIONS:\n --description <desc> Task description\n --task-id <id> Task identifier\n --agent-id <id> Executing agent identifier\n --auto-spawn-agents Auto-spawn agents for task (default: true)\n\nPOST-TASK OPTIONS:\n --task-id <id> Task identifier\n --analyze-performance Generate performance analysis\n --generate-insights Create AI-powered insights\n\nPRE-EDIT OPTIONS:\n --file <path> Target file path\n --operation <type> Edit operation type (edit, create, delete)\n\nPOST-EDIT OPTIONS:\n --file <path> Modified file path\n --memory-key <key> Coordination memory key for storing edit info\n\nSESSION-END OPTIONS:\n --export-metrics Export session performance metrics\n --swarm-id <id> Swarm identifier for coordination cleanup\n --generate-summary Create comprehensive session summary\n\nEXAMPLES:\n claude-flow hooks pre-task --description \"Build API\" --task-id task-123 --agent-id agent-456\n claude-flow hooks post-task --task-id task-123 --analyze-performance --generate-insights\n claude-flow hooks pre-edit --file \"src/api.js\" --operation edit\n claude-flow hooks post-edit --file \"src/api.js\" --memory-key \"swarm/123/edits/timestamp\"\n claude-flow hooks session-end --export-metrics --generate-summary --swarm-id swarm-123\n\n๐ฏ Hooks enable:\n โข Automated preparation & cleanup\n โข Performance tracking\n โข Coordination synchronization\n โข Error prevention\n โข Insight generation\n`,\n};\n\nexport function getCommandHelp(command) {\n // Return legacy format for now - to be updated\n return COMMAND_HELP[command] || `Help not available for command: ${command}`;\n}\n\nexport function getStandardizedCommandHelp(command) {\n const commandConfigs = {\n agent: {\n name: 'claude-flow agent',\n description: 'Manage agents with agentic-flow integration (66+ agents, ultra-fast editing, memory)',\n usage: 'claude-flow agent <action> [options]',\n commands: [\n { name: 'run <agent> \"<task>\"', description: 'Execute agent with multi-provider (NEW)' },\n { name: 'agents', description: 'List all 66+ agentic-flow agents (NEW)' },\n { name: 'booster edit <file>', description: 'Ultra-fast editing - 352x faster (NEW)' },\n { name: 'booster batch <pattern>', description: 'Batch edit multiple files (NEW)' },\n { name: 'memory init', description: 'Initialize ReasoningBank memory (NEW)' },\n { name: 'config wizard', description: 'Interactive setup wizard (NEW)' },\n { name: 'mcp start', description: 'Start MCP server (NEW)' },\n { name: 'spawn', description: 'Create internal agent' },\n { name: 'list', description: 'List active internal agents' },\n { name: 'info', description: 'Show agent details' },\n { name: 'terminate', description: 'Stop an agent' },\n { name: 'hierarchy', description: 'Manage agent hierarchies' },\n { name: 'ecosystem', description: 'View agent ecosystem' },\n ],\n options: [\n {\n flags: '--type <type>',\n description: 'Agent type',\n validValues: [\n 'coordinator',\n 'researcher',\n 'coder',\n 'analyst',\n 'architect',\n 'tester',\n 'reviewer',\n 'optimizer',\n ],\n },\n {\n flags: '--name <name>',\n description: 'Agent name',\n },\n {\n flags: '--verbose',\n description: 'Detailed output',\n },\n {\n flags: '--json',\n description: 'Output in JSON format',\n },\n {\n flags: '--help',\n description: 'Show this help message',\n },\n ],\n examples: [\n 'claude-flow agent spawn researcher --name \"Research Bot\"',\n 'claude-flow agent list --json',\n 'claude-flow agent terminate agent-123',\n 'claude-flow agent info agent-456 --verbose',\n ],\n },\n sparc: {\n name: 'claude-flow sparc',\n description: 'Execute SPARC development modes',\n usage: 'claude-flow sparc <mode> [task] [options]',\n commands: [\n { name: 'spec', description: 'Specification mode - Requirements analysis' },\n { name: 'architect', description: 'Architecture mode - System design' },\n { name: 'tdd', description: 'Test-driven development mode' },\n { name: 'integration', description: 'Integration mode - Component connection' },\n { name: 'refactor', description: 'Refactoring mode - Code improvement' },\n { name: 'modes', description: 'List all available SPARC modes' },\n ],\n options: [\n {\n flags: '--file <path>',\n description: 'Input/output file path',\n },\n {\n flags: '--format <type>',\n description: 'Output format',\n validValues: ['markdown', 'json', 'yaml'],\n },\n {\n flags: '--verbose',\n description: 'Detailed output',\n },\n {\n flags: '--help',\n description: 'Show this help message',\n },\n ],\n examples: [\n 'claude-flow sparc spec \"User authentication system\"',\n 'claude-flow sparc tdd \"Payment processing module\"',\n 'claude-flow sparc architect \"Microservices architecture\"',\n 'claude-flow sparc modes',\n ],\n },\n memory: {\n name: 'claude-flow memory',\n description: 'Manage persistent memory operations',\n usage: 'claude-flow memory <action> [key] [value] [options]',\n commands: [\n { name: 'store', description: 'Store data in memory' },\n { name: 'query', description: 'Search memory by pattern' },\n { name: 'list', description: 'List memory namespaces' },\n { name: 'export', description: 'Export memory to file' },\n { name: 'import', description: 'Import memory from file' },\n { name: 'clear', description: 'Clear memory namespace' },\n ],\n options: [\n {\n flags: '--namespace <name>',\n description: 'Memory namespace',\n defaultValue: 'default',\n },\n {\n flags: '--ttl <seconds>',\n description: 'Time to live in seconds',\n },\n {\n flags: '--format <type>',\n description: 'Export format',\n validValues: ['json', 'yaml'],\n },\n {\n flags: '--help',\n description: 'Show this help message',\n },\n ],\n examples: [\n 'claude-flow memory store \"api_design\" \"REST endpoints specification\"',\n 'claude-flow memory query \"authentication\"',\n 'claude-flow memory export backup.json',\n 'claude-flow memory list --namespace project',\n ],\n },\n };\n\n const config = commandConfigs[command];\n if (!config) {\n return HelpFormatter.formatError(\n `Unknown command: ${command}`,\n 'claude-flow',\n 'claude-flow <command> --help',\n );\n }\n\n return HelpFormatter.formatHelp(config);\n}\n\nexport function getMainHelp(plain = false) {\n // Return the vibrant, emoji-rich version by default\n if (!plain) {\n return MAIN_HELP;\n }\n\n // Return plain standardized format when requested\n const helpInfo = {\n name: 'claude-flow',\n description: 'Advanced AI agent orchestration system',\n usage: `claude-flow <command> [<args>] [options]\n claude-flow <command> --help\n claude-flow --version`,\n commands: [\n {\n name: 'hive-mind',\n description: 'Manage hive mind swarm intelligence',\n aliases: ['hm'],\n },\n {\n name: 'init',\n description: 'Initialize Claude Flow configuration',\n },\n {\n name: 'start',\n description: 'Start orchestration system',\n },\n {\n name: 'swarm',\n description: 'Execute multi-agent swarm coordination',\n },\n {\n name: 'agent',\n description: 'Manage individual agents',\n },\n {\n name: 'sparc',\n description: 'Execute SPARC development modes',\n },\n {\n name: 'memory',\n description: 'Manage persistent memory operations',\n },\n {\n name: 'github',\n description: 'Automate GitHub workflows',\n },\n {\n name: 'status',\n description: 'Show system status and health',\n },\n {\n name: 'config',\n description: 'Manage configuration settings',\n },\n {\n name: 'session',\n description: 'Manage sessions and state persistence',\n },\n {\n name: 'terminal',\n description: 'Terminal pool management',\n },\n {\n name: 'workflow',\n description: 'Manage automated workflows',\n },\n {\n name: 'training',\n description: 'Neural pattern training',\n },\n {\n name: 'coordination',\n description: 'Swarm coordination commands',\n },\n {\n name: 'help',\n description: 'Show help information',\n },\n ],\n globalOptions: [\n {\n flags: '--config <path>',\n description: 'Configuration file path',\n defaultValue: '.claude/config.json',\n },\n {\n flags: '--verbose',\n description: 'Enable verbose output',\n },\n {\n flags: '--quiet',\n description: 'Suppress non-error output',\n },\n {\n flags: '--json',\n description: 'Output in JSON format',\n },\n {\n flags: '--plain',\n description: 'Show plain help without emojis',\n },\n {\n flags: '--help',\n description: 'Show help information',\n },\n {\n flags: '--version',\n description: 'Show version information',\n },\n ],\n examples: [\n 'npx claude-flow init',\n 'claude-flow hive-mind wizard',\n 'claude-flow swarm \"Build REST API\"',\n 'claude-flow agent spawn researcher --name \"Research Bot\"',\n 'claude-flow status --json',\n 'claude-flow memory query \"API design\"',\n ],\n };\n\n return HelpFormatter.formatHelp(helpInfo);\n}\n"],"names":["HelpFormatter","VERSION","MAIN_HELP","COMMAND_HELP","verify","truth","pair","swarm","github","agent","memory","sparc","init","start","status","training","coordination","analysis","automation","hooks","getCommandHelp","command","getStandardizedCommandHelp","commandConfigs","name","description","usage","commands","options","flags","validValues","examples","defaultValue","config","formatError","formatHelp","getMainHelp","plain","helpInfo","aliases","globalOptions"],"mappings":"AAKA,SAASA,aAAa,QAAQ,sBAAsB;AACpD,SAASC,OAAO,QAAQ,qBAAqB;AAE7C,SAASA,OAAO,GAAG;AAEnB,OAAO,MAAMC,YAAY,CAAC;gBACV,EAAED,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8H1B,CAAC,CAAC;AAEF,OAAO,MAAME,eAAe;IAC1BC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BX,CAAC;IACCC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;AAyBV,CAAC;IACCC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BT,CAAC;IACCC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDV,CAAC;IAECC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCX,CAAC;IAECC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCV,CAAC;IAECC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BX,CAAC;IAECC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCV,CAAC;IAECC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DT,CAAC;IAECC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;AAsBV,CAAC;IAECC,QAAQ,CAAC;;;;;;;;;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C,aAAa;gBAA0B;gBACzD;oBAAED,MAAM;oBAASC,aAAa;gBAAyB;aACxD;YACDG,SAAS;gBACP;oBACEC,OAAO;oBACPJ,aAAa;oBACbO,cAAc;gBAChB;gBACA;oBACEH,OAAO;oBACPJ,aAAa;gBACf;gBACA;oBACEI,OAAO;oBACPJ,aAAa;oBACbK,aAAa;wBAAC;wBAAQ;qBAAO;gBAC/B;gBACA;oBACED,OAAO;oBACPJ,aAAa;gBACf;aACD;YACDM,UAAU;gBACR;gBACA;gBACA;gBACA;aACD;QACH;IACF;IAEA,MAAME,SAASV,cAAc,CAACF,QAAQ;IACtC,IAAI,CAACY,QAAQ;QACX,OAAOjC,cAAckC,WAAW,CAC9B,CAAC,iBAAiB,EAAEb,SAAS,EAC7B,eACA;IAEJ;IAEA,OAAOrB,cAAcmC,UAAU,CAACF;AAClC;AAEA,OAAO,SAASG,YAAYC,QAAQ,KAAK;IAEvC,IAAI,CAACA,OAAO;QACV,OAAOnC;IACT;IAGA,MAAMoC,WAAW;QACfd,MAAM;QACNC,aAAa;QACbC,OAAO,CAAC;;yBAEa,CAAC;QACtBC,UAAU;YACR;gBACEH,MAAM;gBACNC,aAAa;gBACbc,SAAS;oBAAC;iBAAK;YACjB;YACA;gBACEf,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;SACD;QACDe,eAAe;YACb;gBACEX,OAAO;gBACPJ,aAAa;gBACbO,cAAc;YAChB;YACA;gBACEH,OAAO;gBACPJ,aAAa;YACf;YACA;gBACEI,OAAO;gBACPJ,aAAa;YACf;YACA;gBACEI,OAAO;gBACPJ,aAAa;YACf;YACA;gBACEI,OAAO;gBACPJ,aAAa;YACf;YACA;gBACEI,OAAO;gBACPJ,aAAa;YACf;YACA;gBACEI,OAAO;gBACPJ,aAAa;YACf;SACD;QACDM,UAAU;YACR;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IAEA,OAAO/B,cAAcmC,UAAU,CAACG;AAClC"}\ No newline at end of filediff --git a/dist-cjs/src/cli/simple-commands/agent.js b/dist-cjs/src/cli/simple-commands/agent.jsindex d7d07dbe4e..4a94054f42 100644--- a/dist-cjs/src/cli/simple-commands/agent.js+++ b/dist-cjs/src/cli/simple-commands/agent.js@@ -5,6 +5,10 @@ import { promisify } from 'util';const execAsync = promisify(exec);export async function agentCommand(subArgs, flags) {const agentCmd = subArgs[0];+ if (flags.help || flags.h || agentCmd === '--help' || agentCmd === '-h') {+ showAgentHelp();+ return;+ }switch(agentCmd){case 'run':case 'execute':diff --git a/dist-cjs/src/cli/simple-commands/agent.js.map b/dist-cjs/src/cli/simple-commands/agent.js.mapindex fd761b10cb..69c444bab1 100644--- a/dist-cjs/src/cli/simple-commands/agent.js.map+++ b/dist-cjs/src/cli/simple-commands/agent.js.map@@ -1 +1 @@-{"version":3,"sources":["../../../../src/cli/simple-commands/agent.js"],"sourcesContent":["// agent.js - Agent management commands\nimport { printSuccess, printError, printWarning } from '../utils.js';\nimport { onAgentSpawn, onAgentAction } from './performance-hooks.js';\nimport { exec } from 'child_process';\nimport { promisify } from 'util';\n\nconst execAsync = promisify(exec);\n\nexport async function agentCommand(subArgs, flags) {\n const agentCmd = subArgs[0];\n\n switch (agentCmd) {\n case 'run':\n case 'execute':\n await executeAgentTask(subArgs, flags);\n break;\n\n case 'spawn':\n await spawnAgent(subArgs, flags);\n break;\n\n case 'list':\n await listAgents(subArgs, flags);\n break;\n\n case 'agents':\n await listAgenticFlowAgents(subArgs, flags);\n break;\n\n case 'memory':\n await memoryCommand(subArgs, flags);\n break;\n\n case 'hierarchy':\n await manageHierarchy(subArgs, flags);\n break;\n\n case 'network':\n await manageNetwork(subArgs, flags);\n break;\n\n case 'ecosystem':\n await manageEcosystem(subArgs, flags);\n break;\n\n case 'provision':\n await provisionAgent(subArgs, flags);\n break;\n\n case 'terminate':\n await terminateAgent(subArgs, flags);\n break;\n\n case 'info':\n await showAgentInfo(subArgs, flags);\n break;\n\n default:\n showAgentHelp();\n }\n}\n\nasync function executeAgentTask(subArgs, flags) {\n const agentType = subArgs[1];\n const task = subArgs[2];\n\n if (!agentType || !task) {\n printError('Usage: agent run <agent-type> \"<task>\" [--provider <provider>] [--model <model>]');\n console.log('\\nExamples:');\n console.log(' claude-flow agent run coder \"Create a REST API\"');\n console.log(' claude-flow agent run researcher \"Research AI trends\" --provider openrouter');\n console.log(' claude-flow agent run reviewer \"Review code for security\" --provider onnx');\n return;\n }\n\n printSuccess(`๐ Executing ${agentType} agent with agentic-flow...`);\n console.log(`Task: ${task}`);\n\n const provider = flags.provider || 'anthropic';\n if (flags.provider) {\n console.log(`Provider: ${provider}`);\n }\n\n try {\n // Build command for agentic-flow\n const cmd = buildAgenticFlowCommand(agentType, task, flags);\n console.log('\\nโณ Running agent... (this may take a moment)\\n');\n\n // Execute agentic-flow\n const { stdout, stderr } = await execAsync(cmd, {\n timeout: flags.timeout || 300000,\n maxBuffer: 10 * 1024 * 1024,\n });\n\n if (stdout) {\n console.log(stdout);\n }\n\n if (stderr && flags.verbose) {\n console.warn('\\nWarnings:', stderr);\n }\n\n printSuccess('โ Agent task completed successfully!');\n } catch (error) {\n printError('โ Agent execution failed');\n console.error(error.message);\n if (error.stderr) {\n console.error('Error details:', error.stderr);\n }\n process.exit(1);\n }\n}\n\nfunction buildAgenticFlowCommand(agent, task, flags) {\n const parts = ['npx', 'agentic-flow'];\n\n // Agentic-flow uses --agent flag directly (no 'execute' subcommand)\n parts.push('--agent', agent);\n parts.push('--task', `\"${task.replace(/\"/g, '\\\\\"')}\"`);\n\n if (flags.provider) {\n parts.push('--provider', flags.provider);\n }\n\n if (flags.model) {\n parts.push('--model', flags.model);\n }\n\n if (flags.temperature) {\n parts.push('--temperature', flags.temperature);\n }\n\n if (flags.maxTokens) {\n parts.push('--max-tokens', flags.maxTokens);\n }\n\n if (flags.format) {\n parts.push('--output-format', flags.format);\n }\n\n if (flags.stream) {\n parts.push('--stream');\n }\n\n if (flags.verbose) {\n parts.push('--verbose');\n }\n\n // ReasoningBank memory options (NEW in v2.6.0)\n if (flags.enableMemory || flags.memory) {\n parts.push('--enable-memory');\n }\n\n if (flags.memoryDb || flags.memoryDatabase) {\n parts.push('--memory-db', flags.memoryDb || flags.memoryDatabase);\n }\n\n if (flags.memoryK) {\n parts.push('--memory-k', flags.memoryK);\n }\n\n if (flags.memoryDomain) {\n parts.push('--memory-domain', flags.memoryDomain);\n }\n\n if (flags.memoryLearning === false) {\n parts.push('--no-memory-learning');\n }\n\n if (flags.memoryMinConfidence) {\n parts.push('--memory-min-confidence', flags.memoryMinConfidence);\n }\n\n if (flags.memoryTaskId) {\n parts.push('--memory-task-id', flags.memoryTaskId);\n }\n\n return parts.join(' ');\n}\n\nasync function listAgenticFlowAgents(subArgs, flags) {\n printSuccess('๐ Loading available agentic-flow agents...');\n\n try {\n // Agentic-flow uses 'agent list' command\n const { stdout } = await execAsync('npx agentic-flow agent list', {\n timeout: 30000,\n });\n\n console.log('\\n66+ Available Agents:\\n');\n console.log(stdout);\n console.log('\\nUsage:');\n console.log(' claude-flow agent run <agent-type> \"<task>\"');\n console.log('\\nExamples:');\n console.log(' claude-flow agent run coder \"Build a REST API with authentication\"');\n console.log(' claude-flow agent run security-auditor \"Review this code for vulnerabilities\"');\n console.log(' claude-flow agent run full-stack-developer \"Create a Next.js app\"');\n } catch (error) {\n printError('Failed to load agentic-flow agents');\n console.error('Make sure agentic-flow is installed: npm install -g agentic-flow');\n console.error(error.message);\n }\n}\n\nasync function memoryCommand(subArgs, flags) {\n const memoryCmd = subArgs[1];\n\n switch (memoryCmd) {\n case 'init':\n case 'initialize':\n await initializeMemory(subArgs, flags);\n break;\n\n case 'status':\n case 'info':\n await getMemoryStatus(subArgs, flags);\n break;\n\n case 'consolidate':\n case 'prune':\n await consolidateMemory(subArgs, flags);\n break;\n\n case 'list':\n case 'ls':\n await listMemories(subArgs, flags);\n break;\n\n case 'demo':\n await runMemoryDemo(subArgs, flags);\n break;\n\n case 'test':\n await runMemoryTest(subArgs, flags);\n break;\n\n case 'benchmark':\n await runMemoryBenchmark(subArgs, flags);\n break;\n\n default:\n showMemoryHelp();\n }\n}\n\nasync function initializeMemory(subArgs, flags) {\n const dbPath = flags.db || flags.database || '.swarm/memory.db';\n\n printSuccess('๐ง Initializing ReasoningBank memory system...');\n console.log(`Database: ${dbPath}`);\n\n try {\n const { stdout, stderr } = await execAsync('npx agentic-flow reasoningbank init', {\n timeout: 30000,\n });\n\n if (stdout) {\n console.log(stdout);\n }\n\n printSuccess('โ ReasoningBank initialized successfully!');\n console.log('\\nNext steps:');\n console.log(' 1. Run agents with --enable-memory flag');\n console.log(' 2. Check status: claude-flow agent memory status');\n console.log(' 3. View demo: claude-flow agent memory demo');\n } catch (error) {\n printError('โ Failed to initialize ReasoningBank');\n console.error(error.message);\n if (error.stderr) {\n console.error('Details:', error.stderr);\n }\n process.exit(1);\n }\n}\n\nasync function getMemoryStatus(subArgs, flags) {\n printSuccess('๐ง ReasoningBank Status:');\n\n try {\n const { stdout } = await execAsync('npx agentic-flow reasoningbank status', {\n timeout: 30000,\n });\n\n console.log(stdout);\n } catch (error) {\n printError('โ Failed to get memory status');\n console.error(error.message);\n console.log('\\nTip: Initialize first with: claude-flow agent memory init');\n process.exit(1);\n }\n}\n\nasync function consolidateMemory(subArgs, flags) {\n printSuccess('๐ง Consolidating ReasoningBank memories...');\n console.log('This will deduplicate and prune old/low-quality memories');\n\n try {\n const { stdout } = await execAsync('npx agentic-flow reasoningbank consolidate', {\n timeout: 60000,\n });\n\n console.log(stdout);\n printSuccess('โ Memory consolidation complete!');\n } catch (error) {\n printError('โ Consolidation failed');\n console.error(error.message);\n process.exit(1);\n }\n}\n\nasync function listMemories(subArgs, flags) {\n const domain = flags.domain;\n const limit = flags.limit || 10;\n\n printSuccess(`๐ง Listing ReasoningBank memories (limit: ${limit})`);\n if (domain) {\n console.log(`Domain filter: ${domain}`);\n }\n\n try {\n let cmd = 'npx agentic-flow reasoningbank list';\n if (domain) {\n cmd += ` --domain ${domain}`;\n }\n cmd += ` --limit ${limit}`;\n\n const { stdout } = await execAsync(cmd, {\n timeout: 30000,\n });\n\n console.log(stdout);\n } catch (error) {\n printError('โ Failed to list memories');\n console.error(error.message);\n process.exit(1);\n }\n}\n\nasync function runMemoryDemo(subArgs, flags) {\n printSuccess('๐ฏ Running ReasoningBank demo...');\n console.log('This will show how memory improves task success over time\\n');\n\n try {\n const { stdout } = await execAsync('npx agentic-flow reasoningbank demo', {\n timeout: 120000,\n });\n\n console.log(stdout);\n printSuccess('โ Demo complete!');\n } catch (error) {\n printError('โ Demo failed');\n console.error(error.message);\n process.exit(1);\n }\n}\n\nasync function runMemoryTest(subArgs, flags) {\n printSuccess('๐งช Running ReasoningBank integration tests...');\n\n try {\n const { stdout } = await execAsync('npx agentic-flow reasoningbank test', {\n timeout: 120000,\n });\n\n console.log(stdout);\n printSuccess('โ Tests complete!');\n } catch (error) {\n printError('โ Tests failed');\n console.error(error.message);\n process.exit(1);\n }\n}\n\nasync function runMemoryBenchmark(subArgs, flags) {\n printSuccess('โก Running ReasoningBank performance benchmarks...');\n\n try {\n const { stdout } = await execAsync('npx agentic-flow reasoningbank benchmark', {\n timeout: 120000,\n });\n\n console.log(stdout);\n printSuccess('โ Benchmarks complete!');\n } catch (error) {\n printError('โ Benchmark failed');\n console.error(error.message);\n process.exit(1);\n }\n}\n\nfunction showMemoryHelp() {\n console.log('Memory (ReasoningBank) commands:');\n console.log(' init Initialize ReasoningBank database');\n console.log(' status Show memory system status');\n console.log(' consolidate Deduplicate and prune memories');\n console.log(' list [--domain <domain>] List stored memories');\n console.log(' demo Run interactive demo');\n console.log(' test Run integration tests');\n console.log(' benchmark Run performance benchmarks');\n console.log();\n console.log('Options:');\n console.log(' --db, --database <path> Database path [default: .swarm/memory.db]');\n console.log(' --domain <domain> Filter by domain');\n console.log(' --limit <n> Limit results [default: 10]');\n console.log();\n console.log('Examples:');\n console.log(' claude-flow agent memory init');\n console.log(' claude-flow agent memory status');\n console.log(' claude-flow agent memory list --domain web --limit 5');\n console.log(' claude-flow agent memory consolidate');\n console.log(' claude-flow agent memory demo');\n}\n\nasync function spawnAgent(subArgs, flags) {\n const agentType = subArgs[1] || 'general';\n const agentName = getFlag(subArgs, '--name') || flags.name || `agent-${Date.now()}`;\n const agentId = `${agentType}-${Date.now()}`;\n\n // Create the agent object\n const agent = {\n id: agentId,\n name: agentName,\n type: agentType,\n status: 'active',\n activeTasks: 0,\n lastActivity: Date.now(),\n capabilities: getAgentCapabilities(agentType),\n createdAt: Date.now()\n };\n\n // Store agent in session/agents directory\n const { promises: fs } = await import('fs');\n const path = await import('path');\n \n // Ensure agents directory exists\n const agentsDir = '.claude-flow/agents';\n await fs.mkdir(agentsDir, { recursive: true });\n \n // Save agent data\n const agentFile = path.join(agentsDir, `${agentId}.json`);\n await fs.writeFile(agentFile, JSON.stringify(agent, null, 2));\n \n // Update performance metrics\n const perfFile = '.claude-flow/metrics/performance.json';\n try {\n const perfData = JSON.parse(await fs.readFile(perfFile, 'utf8'));\n perfData.totalAgents = (perfData.totalAgents || 0) + 1;\n perfData.activeAgents = (perfData.activeAgents || 0) + 1;\n await fs.writeFile(perfFile, JSON.stringify(perfData, null, 2));\n } catch (e) {\n // Create new performance file if doesn't exist\n await fs.writeFile(perfFile, JSON.stringify({\n startTime: Date.now(),\n totalTasks: 0,\n successfulTasks: 0,\n failedTasks: 0,\n totalAgents: 1,\n activeAgents: 1,\n neuralEvents: 0\n }, null, 2));\n }\n\n printSuccess(`โ Spawned ${agentType} agent: ${agentName}`);\n console.log('๐ค Agent successfully created:');\n console.log(` ID: ${agentId}`);\n console.log(` Type: ${agentType}`);\n console.log(` Name: ${agentName}`);\n console.log(` Capabilities: ${agent.capabilities.join(', ')}`);\n console.log(` Status: ${agent.status}`);\n console.log(` Location: ${agentFile}`);\n \n // Track agent spawn for performance metrics\n await onAgentSpawn(agentId, agentType, { name: agentName });\n}\n\nfunction getAgentCapabilities(type) {\n const capabilities = {\n researcher: ['Research', 'Analysis', 'Information Gathering', 'Documentation'],\n coder: ['Code Generation', 'Implementation', 'Refactoring', 'Debugging'],\n tester: ['Testing', 'Validation', 'Quality Assurance', 'Performance Testing'],\n analyst: ['Data Analysis', 'Pattern Recognition', 'Reporting', 'Optimization'],\n coordinator: ['Task Management', 'Workflow Orchestration', 'Resource Allocation'],\n general: ['Research', 'Analysis', 'Code Generation']\n };\n return capabilities[type] || capabilities.general;\n}\n\nasync function listAgents(subArgs, flags) {\n const { promises: fs } = await import('fs');\n const path = await import('path');\n \n const agentsDir = '.claude-flow/agents';\n const agents = [];\n \n try {\n const agentFiles = await fs.readdir(agentsDir);\n for (const file of agentFiles) {\n if (file.endsWith('.json')) {\n try {\n const content = await fs.readFile(path.join(agentsDir, file), 'utf8');\n const agent = JSON.parse(content);\n agents.push(agent);\n } catch {\n // Skip invalid agent files\n }\n }\n }\n } catch {\n // Agents directory doesn't exist yet\n }\n \n if (agents.length > 0) {\n printSuccess(`Active agents (${agents.length}):`);\n agents.forEach(agent => {\n const statusEmoji = agent.status === 'active' ? '๐ข' : '๐ก';\n console.log(`${statusEmoji} ${agent.name} (${agent.type})`);\n console.log(` ID: ${agent.id}`);\n console.log(` Status: ${agent.status}`);\n console.log(` Tasks: ${agent.activeTasks}`);\n console.log(` Created: ${new Date(agent.createdAt).toLocaleString()}`);\n console.log('');\n });\n } else {\n console.log('๐ No agents currently active');\n console.log('\\nTo create agents:');\n console.log(' claude-flow agent spawn researcher --name \"ResearchBot\"');\n console.log(' claude-flow agent spawn coder --name \"CodeBot\"');\n console.log(' claude-flow agent spawn analyst --name \"DataBot\"');\n }\n}\n\nasync function manageHierarchy(subArgs, flags) {\n const hierarchyCmd = subArgs[1];\n\n switch (hierarchyCmd) {\n case 'create':\n const hierarchyType = subArgs[2] || 'basic';\n printSuccess(`Creating ${hierarchyType} agent hierarchy`);\n console.log('๐๏ธ Hierarchy structure would include:');\n console.log(' - Coordinator Agent (manages workflow)');\n console.log(' - Specialist Agents (domain-specific tasks)');\n console.log(' - Worker Agents (execution tasks)');\n break;\n\n case 'show':\n printSuccess('Current agent hierarchy:');\n console.log('๐ No hierarchy configured (orchestrator not running)');\n break;\n\n default:\n console.log('Hierarchy commands: create, show');\n console.log('Examples:');\n console.log(' claude-flow agent hierarchy create enterprise');\n console.log(' claude-flow agent hierarchy show');\n }\n}\n\nasync function manageNetwork(subArgs, flags) {\n const networkCmd = subArgs[1];\n\n switch (networkCmd) {\n case 'topology':\n printSuccess('Agent network topology:');\n console.log('๐ Network visualization would show agent connections');\n break;\n\n case 'metrics':\n printSuccess('Network performance metrics:');\n console.log('๐ Communication latency, throughput, reliability stats');\n break;\n\n default:\n console.log('Network commands: topology, metrics');\n }\n}\n\nasync function manageEcosystem(subArgs, flags) {\n const ecosystemCmd = subArgs[1];\n\n switch (ecosystemCmd) {\n case 'status':\n printSuccess('Agent ecosystem status:');\n console.log('๐ฑ Ecosystem health: Not running');\n console.log(' Active Agents: 0');\n console.log(' Resource Usage: 0%');\n console.log(' Task Queue: Empty');\n break;\n\n case 'optimize':\n printSuccess('Optimizing agent ecosystem...');\n console.log('โก Optimization would include:');\n console.log(' - Load balancing across agents');\n console.log(' - Resource allocation optimization');\n console.log(' - Communication path optimization');\n break;\n\n default:\n console.log('Ecosystem commands: status, optimize');\n }\n}\n\nasync function provisionAgent(subArgs, flags) {\n const provision = subArgs[1];\n\n if (!provision) {\n printError('Usage: agent provision <count>');\n return;\n }\n\n const count = parseInt(provision);\n if (isNaN(count) || count < 1) {\n printError('Count must be a positive number');\n return;\n }\n\n printSuccess(`Provisioning ${count} agents...`);\n console.log('๐ Auto-provisioning would create:');\n for (let i = 1; i <= count; i++) {\n console.log(` Agent ${i}: Type=general, Status=provisioning`);\n }\n}\n\nasync function terminateAgent(subArgs, flags) {\n const agentId = subArgs[1];\n\n if (!agentId) {\n printError('Usage: agent terminate <agent-id>');\n return;\n }\n\n printSuccess(`Terminating agent: ${agentId}`);\n console.log('๐ Agent would be gracefully shut down');\n}\n\nasync function showAgentInfo(subArgs, flags) {\n const agentId = subArgs[1];\n\n if (!agentId) {\n printError('Usage: agent info <agent-id>');\n return;\n }\n\n printSuccess(`Agent information: ${agentId}`);\n console.log('๐ Agent details would include:');\n console.log(' Status, capabilities, current tasks, performance metrics');\n}\n\nfunction getFlag(args, flagName) {\n const index = args.indexOf(flagName);\n return index !== -1 && index + 1 < args.length ? args[index + 1] : null;\n}\n\nfunction showAgentHelp() {\n console.log('Agent commands:');\n console.log('\\n๐ Agentic-Flow Integration (NEW in v2.6.0):');\n console.log(' run <agent> \"<task>\" [options] Execute agent with multi-provider support');\n console.log(' agents List all 66+ agentic-flow agents');\n console.log('\\n๐ง ReasoningBank Memory (NEW in v2.6.0):');\n console.log(' memory init Initialize memory system');\n console.log(' memory status Show memory statistics');\n console.log(' memory consolidate Prune and deduplicate memories');\n console.log(' memory list List stored memories');\n console.log(' memory demo Run interactive demo');\n console.log('\\n๐ค Internal Agent Management:');\n console.log(' spawn <type> [--name <name>] Create internal agent');\n console.log(' list [--verbose] List active internal agents');\n console.log(' terminate <id> Stop specific agent');\n console.log(' info <id> Show agent details');\n console.log(' hierarchy <create|show> Manage agent hierarchies');\n console.log(' network <topology|metrics> Agent network operations');\n console.log(' ecosystem <status|optimize> Ecosystem management');\n console.log(' provision <count> Auto-provision agents');\n console.log();\n console.log('Execution Options (for run command):');\n console.log(' --provider <provider> Provider: anthropic, openrouter, onnx, gemini');\n console.log(' --model <model> Specific model to use');\n console.log(' --temperature <temp> Temperature (0.0-1.0)');\n console.log(' --max-tokens <tokens> Maximum tokens');\n console.log(' --format <format> Output format: text, json, markdown');\n console.log(' --stream Enable streaming');\n console.log(' --verbose Verbose output');\n console.log();\n console.log('Memory Options (NEW - for run command):');\n console.log(' --enable-memory Enable ReasoningBank learning');\n console.log(' --memory-db <path> Memory database path [default: .swarm/memory.db]');\n console.log(' --memory-k <n> Top-k memories to retrieve [default: 3]');\n console.log(' --memory-domain <domain> Domain filter for memories');\n console.log(' --no-memory-learning Disable post-task learning');\n console.log(' --memory-min-confidence <n> Min confidence threshold [default: 0.5]');\n console.log(' --memory-task-id <id> Custom task ID for tracking');\n console.log();\n console.log('Internal Agent Types:');\n console.log(' researcher Research and information gathering');\n console.log(' coder Code development and analysis');\n console.log(' analyst Data analysis and insights');\n console.log(' coordinator Task coordination and management');\n console.log(' general Multi-purpose agent');\n console.log();\n console.log('Examples:');\n console.log('\\n # Execute with agentic-flow (multi-provider)');\n console.log(' claude-flow agent run coder \"Build REST API with authentication\"');\n console.log(' claude-flow agent run researcher \"Research React 19 features\" --provider openrouter');\n console.log(' claude-flow agent run security-auditor \"Audit code\" --provider onnx');\n console.log(' claude-flow agent agents # List all available agents');\n console.log('\\n # Execute with ReasoningBank memory (learns from experience)');\n console.log(' claude-flow agent run coder \"Build API\" --enable-memory');\n console.log(' claude-flow agent run coder \"Add auth\" --enable-memory --memory-domain api');\n console.log(' claude-flow agent run coder \"Fix bug\" --enable-memory --memory-k 5');\n console.log('\\n # Memory management');\n console.log(' claude-flow agent memory init');\n console.log(' claude-flow agent memory status');\n console.log(' claude-flow agent memory list --domain api --limit 10');\n console.log(' claude-flow agent memory consolidate');\n console.log(' claude-flow agent memory demo # See 23% โ 98% success improvement');\n console.log('\\n # Internal agent management');\n console.log(' claude-flow agent spawn researcher --name \"DataBot\"');\n console.log(' claude-flow agent list --verbose');\n console.log(' claude-flow agent hierarchy create enterprise');\n}\n"],"names":["printSuccess","printError","onAgentSpawn","exec","promisify","execAsync","agentCommand","subArgs","flags","agentCmd","executeAgentTask","spawnAgent","listAgents","listAgenticFlowAgents","memoryCommand","manageHierarchy","manageNetwork","manageEcosystem","provisionAgent","terminateAgent","showAgentInfo","showAgentHelp","agentType","task","console","log","provider","cmd","buildAgenticFlowCommand","stdout","stderr","timeout","maxBuffer","verbose","warn","error","message","process","exit","agent","parts","push","replace","model","temperature","maxTokens","format","stream","enableMemory","memory","memoryDb","memoryDatabase","memoryK","memoryDomain","memoryLearning","memoryMinConfidence","memoryTaskId","join","memoryCmd","initializeMemory","getMemoryStatus","consolidateMemory","listMemories","runMemoryDemo","runMemoryTest","runMemoryBenchmark","showMemoryHelp","dbPath","db","database","domain","limit","agentName","getFlag","name","Date","now","agentId","id","type","status","activeTasks","lastActivity","capabilities","getAgentCapabilities","createdAt","promises","fs","path","agentsDir","mkdir","recursive","agentFile","writeFile","JSON","stringify","perfFile","perfData","parse","readFile","totalAgents","activeAgents","e","startTime","totalTasks","successfulTasks","failedTasks","neuralEvents","researcher","coder","tester","analyst","coordinator","general","agents","agentFiles","readdir","file","endsWith","content","length","forEach","statusEmoji","toLocaleString","hierarchyCmd","hierarchyType","networkCmd","ecosystemCmd","provision","count","parseInt","isNaN","i","args","flagName","index","indexOf"],"mappings":"AACA,SAASA,YAAY,EAAEC,UAAU,QAAsB,cAAc;AACrE,SAASC,YAAY,QAAuB,yBAAyB;AACrE,SAASC,IAAI,QAAQ,gBAAgB;AACrC,SAASC,SAAS,QAAQ,OAAO;AAEjC,MAAMC,YAAYD,UAAUD;AAE5B,OAAO,eAAeG,aAAaC,OAAO,EAAEC,KAAK;IAC/C,MAAMC,WAAWF,OAAO,CAAC,EAAE;IAE3B,OAAQE;QACN,KAAK;QACL,KAAK;YACH,MAAMC,iBAAiBH,SAASC;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GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;AACd"}\ No newline at end of file+{"version":3,"sources":["../../../../src/cli/simple-commands/agent.js"],"sourcesContent":["// agent.js - Agent management commands\nimport { printSuccess, printError, printWarning } from '../utils.js';\nimport { onAgentSpawn, onAgentAction } from './performance-hooks.js';\nimport { exec } from 'child_process';\nimport { promisify } from 'util';\n\nconst execAsync = promisify(exec);\n\nexport async function agentCommand(subArgs, flags) {\n const agentCmd = subArgs[0];\n\n // Handle --help flag explicitly to show full help\n if (flags.help || flags.h || agentCmd === '--help' || agentCmd === '-h') {\n showAgentHelp();\n return;\n }\n\n switch (agentCmd) {\n case 'run':\n case 'execute':\n await executeAgentTask(subArgs, flags);\n break;\n\n case 'spawn':\n await spawnAgent(subArgs, flags);\n break;\n\n case 'list':\n await listAgents(subArgs, flags);\n break;\n\n case 'agents':\n await listAgenticFlowAgents(subArgs, flags);\n break;\n\n case 'create':\n await createAgent(subArgs, flags);\n break;\n\n case 'info':\n await getAgentInfo(subArgs, flags);\n break;\n\n case 'conflicts':\n await checkAgentConflicts(subArgs, flags);\n break;\n\n case 'memory':\n await memoryCommand(subArgs, flags);\n break;\n\n case 'config':\n case 'configure':\n await configAgenticFlow(subArgs, flags);\n break;\n\n case 'mcp':\n case 'mcp-server':\n await mcpAgenticFlow(subArgs, flags);\n break;\n\n case 'hierarchy':\n await manageHierarchy(subArgs, flags);\n break;\n\n case 'network':\n await manageNetwork(subArgs, flags);\n break;\n\n case 'ecosystem':\n await manageEcosystem(subArgs, flags);\n break;\n\n case 'provision':\n await provisionAgent(subArgs, flags);\n break;\n\n case 'terminate':\n await terminateAgent(subArgs, flags);\n break;\n\n case 'booster':\n const { agentBoosterCommand } = await import('./agent-booster.js');\n await agentBoosterCommand(subArgs, flags);\n break;\n\n default:\n showAgentHelp();\n }\n}\n\nasync function executeAgentTask(subArgs, flags) {\n const agentType = subArgs[1];\n const task = subArgs[2];\n\n if (!agentType || !task) {\n printError('Usage: agent run <agent-type> \"<task>\" [--provider <provider>] [--model <model>]');\n console.log('\\nExamples:');\n console.log(' claude-flow agent run coder \"Create a REST API\"');\n console.log(' claude-flow agent run researcher \"Research AI trends\" --provider openrouter');\n console.log(' claude-flow agent run reviewer \"Review code for security\" --provider onnx');\n return;\n }\n\n // Check for memory flags and .env configuration\n if (flags.enableMemory || flags.memory) {\n const { checkEnvConfig, showEnvSetupInstructions } = await import('./env-template.js');\n const envCheck = await checkEnvConfig(process.cwd());\n\n if (!envCheck.exists) {\n printWarning('โ ๏ธ ReasoningBank memory requires .env configuration');\n showEnvSetupInstructions();\n console.log('โ Cannot use --enable-memory without .env file\\n');\n process.exit(1);\n }\n\n if (!envCheck.hasApiKeys) {\n printWarning('โ ๏ธ No API keys found in .env file');\n console.log('\\nโ ๏ธ ReasoningBank will fall back to heuristic mode (regex matching)');\n console.log(' Without API keys, memory will NOT learn from experience!\\n');\n showEnvSetupInstructions();\n console.log('โ Add API keys to .env to enable actual learning\\n');\n process.exit(1);\n }\n\n // Show which keys are configured\n console.log('โ API keys configured:');\n if (envCheck.keys.anthropic) console.log(' โข Anthropic (Claude)');\n if (envCheck.keys.openrouter) console.log(' โข OpenRouter (cost optimization available)');\n if (envCheck.keys.gemini) console.log(' โข Gemini (free tier available)');\n console.log('');\n }\n\n printSuccess(`๐ Executing ${agentType} agent with agentic-flow...`);\n console.log(`Task: ${task}`);\n\n const provider = flags.provider || 'anthropic';\n if (flags.provider) {\n console.log(`Provider: ${provider}`);\n }\n\n try {\n // Build command for agentic-flow\n const cmd = buildAgenticFlowCommand(agentType, task, flags);\n console.log('\\nโณ Running agent... (this may take a moment)\\n');\n\n // Execute agentic-flow\n const { stdout, stderr } = await execAsync(cmd, {\n timeout: flags.timeout || 300000,\n maxBuffer: 10 * 1024 * 1024,\n });\n\n if (stdout) {\n console.log(stdout);\n }\n\n if (stderr && flags.verbose) {\n console.warn('\\nWarnings:', stderr);\n }\n\n printSuccess('โ Agent task completed successfully!');\n } catch (error) {\n printError('โ Agent execution failed');\n console.error(error.message);\n if (error.stderr) {\n console.error('Error details:', error.stderr);\n }\n process.exit(1);\n }\n}\n\nfunction buildAgenticFlowCommand(agent, task, flags) {\n const parts = ['npx', 'agentic-flow'];\n\n // Agentic-flow uses --agent flag directly (no 'execute' subcommand)\n parts.push('--agent', agent);\n parts.push('--task', `\"${task.replace(/\"/g, '\\\\\"')}\"`);\n\n if (flags.provider) {\n parts.push('--provider', flags.provider);\n }\n\n if (flags.model) {\n parts.push('--model', flags.model);\n }\n\n if (flags.temperature) {\n parts.push('--temperature', flags.temperature);\n }\n\n if (flags.maxTokens) {\n parts.push('--max-tokens', flags.maxTokens);\n }\n\n if (flags.format) {\n parts.push('--output-format', flags.format);\n }\n\n if (flags.stream) {\n parts.push('--stream');\n }\n\n if (flags.verbose) {\n parts.push('--verbose');\n }\n\n // ReasoningBank memory options (NEW in v2.6.0)\n if (flags.enableMemory || flags.memory) {\n parts.push('--enable-memory');\n }\n\n if (flags.memoryDb || flags.memoryDatabase) {\n parts.push('--memory-db', flags.memoryDb || flags.memoryDatabase);\n }\n\n if (flags.memoryK) {\n parts.push('--memory-k', flags.memoryK);\n }\n\n if (flags.memoryDomain) {\n parts.push('--memory-domain', flags.memoryDomain);\n }\n\n if (flags.memoryLearning === false) {\n parts.push('--no-memory-learning');\n }\n\n if (flags.memoryMinConfidence) {\n parts.push('--memory-min-confidence', flags.memoryMinConfidence);\n }\n\n if (flags.memoryTaskId) {\n parts.push('--memory-task-id', flags.memoryTaskId);\n }\n\n // Model optimization options (NEW in v2.6.0 - agentic-flow v1.5.0+)\n if (flags.optimize) {\n parts.push('--optimize');\n }\n\n if (flags.priority) {\n parts.push('--priority', flags.priority);\n }\n\n if (flags.maxCost) {\n parts.push('--max-cost', flags.maxCost);\n }\n\n // Additional execution options (NEW in v2.6.0)\n if (flags.retry) {\n parts.push('--retry');\n }\n\n if (flags.agentsDir) {\n parts.push('--agents-dir', flags.agentsDir);\n }\n\n if (flags.timeout) {\n parts.push('--timeout', flags.timeout);\n }\n\n // API key overrides (NEW in v2.6.0)\n if (flags.anthropicKey) {\n parts.push('--anthropic-key', flags.anthropicKey);\n }\n\n if (flags.openrouterKey) {\n parts.push('--openrouter-key', flags.openrouterKey);\n }\n\n if (flags.geminiKey) {\n parts.push('--gemini-key', flags.geminiKey);\n }\n\n return parts.join(' ');\n}\n\nasync function listAgenticFlowAgents(subArgs, flags) {\n printSuccess('๐ Loading available agentic-flow agents...');\n\n try {\n // Agentic-flow uses 'agent list' command\n const { stdout } = await execAsync('npx agentic-flow agent list', {\n timeout: 30000,\n });\n\n console.log('\\n66+ Available Agents:\\n');\n console.log(stdout);\n console.log('\\nUsage:');\n console.log(' claude-flow agent run <agent-type> \"<task>\"');\n console.log('\\nExamples:');\n console.log(' claude-flow agent run coder \"Build a REST API with authentication\"');\n console.log(' claude-flow agent run security-auditor \"Review this code for vulnerabilities\"');\n console.log(' claude-flow agent run full-stack-developer \"Create a Next.js app\"');\n } catch (error) {\n printError('Failed to load agentic-flow agents');\n console.error('Make sure agentic-flow is installed: npm install -g agentic-flow');\n console.error(error.message);\n }\n}\n\nasync function createAgent(subArgs, flags) {\n printSuccess('๐ ๏ธ Creating custom agent with agentic-flow...');\n\n try {\n // Build command for agentic-flow agent create\n let cmd = 'npx agentic-flow agent create';\n\n if (flags.name) {\n cmd += ` --name \"${flags.name}\"`;\n }\n\n if (flags.description) {\n cmd += ` --description \"${flags.description}\"`;\n }\n\n if (flags.category) {\n cmd += ` --category \"${flags.category}\"`;\n }\n\n if (flags.prompt) {\n cmd += ` --prompt \"${flags.prompt}\"`;\n }\n\n if (flags.tools) {\n cmd += ` --tools \"${flags.tools}\"`;\n }\n\n const { stdout, stderr } = await execAsync(cmd, {\n timeout: 60000,\n maxBuffer: 10 * 1024 * 1024,\n });\n\n if (stdout) {\n console.log(stdout);\n }\n\n printSuccess('โ Agent created successfully!');\n console.log('\\nNext steps:');\n console.log(' 1. Run your agent: claude-flow agent run <agent-name> \"<task>\"');\n console.log(' 2. View agent info: claude-flow agent info <agent-name>');\n console.log(' 3. Check for conflicts: claude-flow agent conflicts');\n } catch (error) {\n printError('โ Failed to create agent');\n console.error(error.message);\n if (error.stderr) {\n console.error('Details:', error.stderr);\n }\n process.exit(1);\n }\n}\n\nasync function getAgentInfo(subArgs, flags) {\n const agentName = subArgs[1];\n\n if (!agentName) {\n printError('Usage: agent info <agent-name>');\n console.log('\\nExample:');\n console.log(' claude-flow agent info coder');\n console.log(' claude-flow agent info security-auditor');\n return;\n }\n\n printSuccess(`๐ Getting information for agent: ${agentName}`);\n\n try {\n const { stdout } = await execAsync(`npx agentic-flow agent info ${agentName}`, {\n timeout: 30000,\n });\n\n console.log(stdout);\n } catch (error) {\n printError(`โ Failed to get agent info for: ${agentName}`);\n console.error(error.message);\n console.log('\\nTip: List all agents with: claude-flow agent agents');\n process.exit(1);\n }\n}\n\nasync function checkAgentConflicts(subArgs, flags) {\n printSuccess('๐ Checking for agent conflicts between package and local agents...');\n\n try {\n const { stdout } = await execAsync('npx agentic-flow agent conflicts', {\n timeout: 30000,\n });\n\n console.log(stdout);\n\n if (stdout.includes('No conflicts found')) {\n printSuccess('โ No conflicts detected!');\n } else {\n printWarning('โ ๏ธ Conflicts found! Local agents will override package agents with the same path.');\n }\n } catch (error) {\n printError('โ Failed to check agent conflicts');\n console.error(error.message);\n process.exit(1);\n }\n}\n\nasync function memoryCommand(subArgs, flags) {\n const memoryCmd = subArgs[1];\n\n switch (memoryCmd) {\n case 'init':\n case 'initialize':\n await initializeMemory(subArgs, flags);\n break;\n\n case 'status':\n case 'info':\n await getMemoryStatus(subArgs, flags);\n break;\n\n case 'consolidate':\n case 'prune':\n await consolidateMemory(subArgs, flags);\n break;\n\n case 'list':\n case 'ls':\n await listMemories(subArgs, flags);\n break;\n\n case 'demo':\n await runMemoryDemo(subArgs, flags);\n break;\n\n case 'test':\n await runMemoryTest(subArgs, flags);\n break;\n\n case 'benchmark':\n await runMemoryBenchmark(subArgs, flags);\n break;\n\n default:\n showMemoryHelp();\n }\n}\n\nasync function initializeMemory(subArgs, flags) {\n const dbPath = flags.db || flags.database || '.swarm/memory.db';\n\n printSuccess('๐ง Initializing ReasoningBank memory system...');\n console.log(`Database: ${dbPath}`);\n\n try {\n const { stdout, stderr } = await execAsync('npx agentic-flow reasoningbank init', {\n timeout: 30000,\n });\n\n if (stdout) {\n console.log(stdout);\n }\n\n printSuccess('โ ReasoningBank initialized successfully!');\n console.log('\\nNext steps:');\n console.log(' 1. Run agents with --enable-memory flag');\n console.log(' 2. Check status: claude-flow agent memory status');\n console.log(' 3. View demo: claude-flow agent memory demo');\n } catch (error) {\n printError('โ Failed to initialize ReasoningBank');\n console.error(error.message);\n if (error.stderr) {\n console.error('Details:', error.stderr);\n }\n process.exit(1);\n }\n}\n\nasync function getMemoryStatus(subArgs, flags) {\n printSuccess('๐ง ReasoningBank Status:');\n\n try {\n const { stdout } = await execAsync('npx agentic-flow reasoningbank status', {\n timeout: 30000,\n });\n\n console.log(stdout);\n } catch (error) {\n printError('โ Failed to get memory status');\n console.error(error.message);\n console.log('\\nTip: Initialize first with: claude-flow agent memory init');\n process.exit(1);\n }\n}\n\nasync function consolidateMemory(subArgs, flags) {\n printSuccess('๐ง Consolidating ReasoningBank memories...');\n console.log('This will deduplicate and prune old/low-quality memories');\n\n try {\n const { stdout } = await execAsync('npx agentic-flow reasoningbank consolidate', {\n timeout: 60000,\n });\n\n console.log(stdout);\n printSuccess('โ Memory consolidation complete!');\n } catch (error) {\n printError('โ Consolidation failed');\n console.error(error.message);\n process.exit(1);\n }\n}\n\nasync function listMemories(subArgs, flags) {\n const domain = flags.domain;\n const limit = flags.limit || 10;\n\n printSuccess(`๐ง Listing ReasoningBank memories (limit: ${limit})`);\n if (domain) {\n console.log(`Domain filter: ${domain}`);\n }\n\n try {\n let cmd = 'npx agentic-flow reasoningbank list';\n if (domain) {\n cmd += ` --domain ${domain}`;\n }\n cmd += ` --limit ${limit}`;\n\n const { stdout } = await execAsync(cmd, {\n timeout: 30000,\n });\n\n console.log(stdout);\n } catch (error) {\n printError('โ Failed to list memories');\n console.error(error.message);\n process.exit(1);\n }\n}\n\nasync function runMemoryDemo(subArgs, flags) {\n printSuccess('๐ฏ Running ReasoningBank demo...');\n console.log('This will show how memory improves task success over time\\n');\n\n try {\n const { stdout } = await execAsync('npx agentic-flow reasoningbank demo', {\n timeout: 120000,\n });\n\n console.log(stdout);\n printSuccess('โ Demo complete!');\n } catch (error) {\n printError('โ Demo failed');\n console.error(error.message);\n process.exit(1);\n }\n}\n\nasync function runMemoryTest(subArgs, flags) {\n printSuccess('๐งช Running ReasoningBank integration tests...');\n\n try {\n const { stdout } = await execAsync('npx agentic-flow reasoningbank test', {\n timeout: 120000,\n });\n\n console.log(stdout);\n printSuccess('โ Tests complete!');\n } catch (error) {\n printError('โ Tests failed');\n console.error(error.message);\n process.exit(1);\n }\n}\n\nasync function runMemoryBenchmark(subArgs, flags) {\n printSuccess('โก Running ReasoningBank performance benchmarks...');\n\n try {\n const { stdout } = await execAsync('npx agentic-flow reasoningbank benchmark', {\n timeout: 120000,\n });\n\n console.log(stdout);\n printSuccess('โ Benchmarks complete!');\n } catch (error) {\n printError('โ Benchmark failed');\n console.error(error.message);\n process.exit(1);\n }\n}\n\nfunction showMemoryHelp() {\n console.log('Memory (ReasoningBank) commands:');\n console.log(' init Initialize ReasoningBank database');\n console.log(' status Show memory system status');\n console.log(' consolidate Deduplicate and prune memories');\n console.log(' list [--domain <domain>] List stored memories');\n console.log(' demo Run interactive demo');\n console.log(' test Run integration tests');\n console.log(' benchmark Run performance benchmarks');\n console.log();\n console.log('Options:');\n console.log(' --db, --database <path> Database path [default: .swarm/memory.db]');\n console.log(' --domain <domain> Filter by domain');\n console.log(' --limit <n> Limit results [default: 10]');\n console.log();\n console.log('Examples:');\n console.log(' claude-flow agent memory init');\n console.log(' claude-flow agent memory status');\n console.log(' claude-flow agent memory list --domain web --limit 5');\n console.log(' claude-flow agent memory consolidate');\n console.log(' claude-flow agent memory demo');\n}\n\n// Configuration Management for agentic-flow\nasync function configAgenticFlow(subArgs, flags) {\n const configCmd = subArgs[1];\n\n switch (configCmd) {\n case 'set':\n await agenticConfigSet(subArgs, flags);\n break;\n case 'get':\n await agenticConfigGet(subArgs, flags);\n break;\n case 'list':\n await agenticConfigList(subArgs, flags);\n break;\n case 'delete':\n case 'remove':\n case 'rm':\n await agenticConfigDelete(subArgs, flags);\n break;\n case 'reset':\n await agenticConfigReset(subArgs, flags);\n break;\n case undefined:\n case 'wizard':\n case 'interactive':\n await agenticConfigWizard(subArgs, flags);\n break;\n default:\n showAgenticConfigHelp();\n }\n}\n\nasync function agenticConfigSet(subArgs, flags) {\n const key = subArgs[2];\n const value = subArgs[3];\n\n if (!key || !value) {\n printError('Usage: agent config set <key> <value>');\n console.log('\\nExample:');\n console.log(' claude-flow agent config set ANTHROPIC_API_KEY sk-ant-xxx');\n console.log(' claude-flow agent config set DEFAULT_MODEL claude-3-5-sonnet-20241022');\n return;\n }\n\n printSuccess(`๐ง Setting agentic-flow configuration: ${key}`);\n\n try {\n const { stdout } = await execAsync(`npx agentic-flow config set ${key} \"${value}\"`, {\n timeout: 30000,\n });\n console.log(stdout);\n printSuccess('โ Configuration set successfully!');\n } catch (error) {\n printError(`โ Failed to set configuration: ${key}`);\n console.error(error.message);\n process.exit(1);\n }\n}\n\nasync function agenticConfigGet(subArgs, flags) {\n const key = subArgs[2];\n\n if (!key) {\n printError('Usage: agent config get <key>');\n console.log('\\nExample:');\n console.log(' claude-flow agent config get ANTHROPIC_API_KEY');\n return;\n }\n\n try {\n const { stdout } = await execAsync(`npx agentic-flow config get ${key}`, {\n timeout: 30000,\n });\n console.log(stdout);\n } catch (error) {\n printError(`โ Failed to get configuration: ${key}`);\n console.error(error.message);\n process.exit(1);\n }\n}\n\nasync function agenticConfigList(subArgs, flags) {\n printSuccess('๐ Listing agentic-flow configurations...');\n\n try {\n let cmd = 'npx agentic-flow config list';\n if (flags.showSecrets) {\n cmd += ' --show-secrets';\n }\n\n const { stdout } = await execAsync(cmd, { timeout: 30000 });\n console.log(stdout);\n\n if (!flags.showSecrets) {\n console.log('\\n๐ก Tip: Use --show-secrets to reveal sensitive values');\n }\n } catch (error) {\n printError('โ Failed to list configurations');\n console.error(error.message);\n process.exit(1);\n }\n}\n\nasync function agenticConfigDelete(subArgs, flags) {\n const key = subArgs[2];\n\n if (!key) {\n printError('Usage: agent config delete <key>');\n return;\n }\n\n printWarning(`โ ๏ธ Deleting configuration: ${key}`);\n\n try {\n const { stdout } = await execAsync(`npx agentic-flow config delete ${key}`, {\n timeout: 30000,\n });\n console.log(stdout);\n printSuccess('โ Configuration deleted!');\n } catch (error) {\n printError(`โ Failed to delete configuration: ${key}`);\n console.error(error.message);\n process.exit(1);\n }\n}\n\nasync function agenticConfigReset(subArgs, flags) {\n if (!flags.force) {\n printWarning('โ ๏ธ WARNING: This will reset ALL agentic-flow configurations!');\n console.log('\\nUse --force to confirm: claude-flow agent config reset --force');\n return;\n }\n\n printWarning('๐ Resetting agentic-flow configurations...');\n\n try {\n const { stdout } = await execAsync('npx agentic-flow config reset --force', {\n timeout: 30000,\n });\n console.log(stdout);\n printSuccess('โ Configurations reset!');\n } catch (error) {\n printError('โ Failed to reset configurations');\n console.error(error.message);\n process.exit(1);\n }\n}\n\nasync function agenticConfigWizard(subArgs, flags) {\n printSuccess('๐ง Starting agentic-flow configuration wizard...');\n\n try {\n const { stdout } = await execAsync('npx agentic-flow config wizard', {\n timeout: 300000,\n });\n console.log(stdout);\n printSuccess('โ Configuration wizard completed!');\n } catch (error) {\n printError('โ Configuration wizard failed');\n console.error(error.message);\n process.exit(1);\n }\n}\n\nfunction showAgenticConfigHelp() {\n console.log('Agentic-flow configuration commands:');\n console.log(' set <key> <value> Set configuration value');\n console.log(' get <key> Get configuration value');\n console.log(' list List all configurations');\n console.log(' delete <key> Delete configuration value');\n console.log(' reset --force Reset to defaults');\n console.log(' wizard Run interactive setup wizard');\n console.log();\n console.log('Examples:');\n console.log(' claude-flow agent config wizard');\n console.log(' claude-flow agent config set ANTHROPIC_API_KEY sk-ant-xxx');\n console.log(' claude-flow agent config list --show-secrets');\n}\n\n// MCP Server Management for agentic-flow\nasync function mcpAgenticFlow(subArgs, flags) {\n const mcpCmd = subArgs[1];\n\n switch (mcpCmd) {\n case 'start':\n await agenticMcpStart(subArgs, flags);\n break;\n case 'stop':\n await agenticMcpStop(subArgs, flags);\n break;\n case 'status':\n await agenticMcpStatus(subArgs, flags);\n break;\n case 'list':\n case 'ls':\n await agenticMcpList(subArgs, flags);\n break;\n case 'logs':\n await agenticMcpLogs(subArgs, flags);\n break;\n case 'restart':\n await agenticMcpRestart(subArgs, flags);\n break;\n default:\n showAgenticMcpHelp();\n }\n}\n\nasync function agenticMcpStart(subArgs, flags) {\n printSuccess('๐ Starting agentic-flow MCP server...');\n\n try {\n let cmd = 'npx agentic-flow mcp start';\n if (flags.port) cmd += ` --port ${flags.port}`;\n if (flags.host) cmd += ` --host ${flags.host}`;\n if (flags.daemon || flags.background) cmd += ' --daemon';\n\n const { stdout } = await execAsync(cmd, { timeout: 60000 });\n console.log(stdout);\n printSuccess('โ MCP server started!');\n } catch (error) {\n printError('โ Failed to start MCP server');\n console.error(error.message);\n process.exit(1);\n }\n}\n\nasync function agenticMcpStop(subArgs, flags) {\n printWarning('๐ Stopping agentic-flow MCP server...');\n\n try {\n const { stdout } = await execAsync('npx agentic-flow mcp stop', { timeout: 30000 });\n console.log(stdout);\n printSuccess('โ MCP server stopped!');\n } catch (error) {\n printError('โ Failed to stop MCP server');\n console.error(error.message);\n process.exit(1);\n }\n}\n\nasync function agenticMcpStatus(subArgs, flags) {\n printSuccess('๐ Getting agentic-flow MCP server status...');\n\n try {\n let cmd = 'npx agentic-flow mcp status';\n if (flags.detailed || flags.verbose) cmd += ' --detailed';\n\n const { stdout } = await execAsync(cmd, { timeout: 30000 });\n console.log(stdout);\n } catch (error) {\n printError('โ Failed to get MCP status');\n console.error(error.message);\n process.exit(1);\n }\n}\n\nasync function agenticMcpList(subArgs, flags) {\n printSuccess('๐ Listing agentic-flow MCP tools...');\n\n try {\n let cmd = 'npx agentic-flow mcp list';\n if (flags.server) cmd += ` --server ${flags.server}`;\n if (flags.category) cmd += ` --category ${flags.category}`;\n if (flags.detailed || flags.verbose) cmd += ' --detailed';\n\n const { stdout } = await execAsync(cmd, { timeout: 30000 });\n console.log(stdout);\n } catch (error) {\n printError('โ Failed to list MCP tools');\n console.error(error.message);\n process.exit(1);\n }\n}\n\nasync function agenticMcpLogs(subArgs, flags) {\n printSuccess('๐ Getting agentic-flow MCP logs...');\n\n try {\n let cmd = 'npx agentic-flow mcp logs';\n if (flags.lines) cmd += ` --lines ${flags.lines}`;\n if (flags.follow || flags.f) cmd += ' --follow';\n if (flags.error) cmd += ' --error';\n\n const { stdout } = await execAsync(cmd, {\n timeout: flags.follow ? 0 : 30000,\n maxBuffer: 10 * 1024 * 1024\n });\n console.log(stdout);\n } catch (error) {\n printError('โ Failed to get MCP logs');\n console.error(error.message);\n process.exit(1);\n }\n}\n\nasync function agenticMcpRestart(subArgs, flags) {\n printWarning('๐ Restarting agentic-flow MCP server...');\n\n try {\n await agenticMcpStop(subArgs, { ...flags, quiet: true });\n await new Promise((resolve) => setTimeout(resolve, 2000));\n await agenticMcpStart(subArgs, flags);\n printSuccess('โ MCP server restarted!');\n } catch (error) {\n printError('โ Failed to restart MCP server');\n console.error(error.message);\n process.exit(1);\n }\n}\n\nfunction showAgenticMcpHelp() {\n console.log('Agentic-flow MCP server commands:');\n console.log(' start [--port <port>] Start MCP server');\n console.log(' stop Stop MCP server');\n console.log(' restart Restart MCP server');\n console.log(' status [--detailed] Get server status');\n console.log(' list [--server <name>] List MCP tools');\n console.log(' logs [--lines <n>] [--follow] View server logs');\n console.log();\n console.log('Options:');\n console.log(' --port <number> Server port (default: 3000)');\n console.log(' --host <string> Server host (default: localhost)');\n console.log(' --daemon, --background Run in background');\n console.log(' --server <name> Filter by server name');\n console.log(' --category <type> Filter by tool category');\n console.log(' --detailed, --verbose Detailed output');\n console.log();\n console.log('Examples:');\n console.log(' claude-flow agent mcp start --daemon');\n console.log(' claude-flow agent mcp status --detailed');\n console.log(' claude-flow agent mcp list --server agent-booster');\n console.log(' claude-flow agent mcp logs --lines 50 --follow');\n}\n\nasync function spawnAgent(subArgs, flags) {\n const agentType = subArgs[1] || 'general';\n const agentName = getFlag(subArgs, '--name') || flags.name || `agent-${Date.now()}`;\n const agentId = `${agentType}-${Date.now()}`;\n\n // Create the agent object\n const agent = {\n id: agentId,\n name: agentName,\n type: agentType,\n status: 'active',\n activeTasks: 0,\n lastActivity: Date.now(),\n capabilities: getAgentCapabilities(agentType),\n createdAt: Date.now()\n };\n\n // Store agent in session/agents directory\n const { promises: fs } = await import('fs');\n const path = await import('path');\n \n // Ensure agents directory exists\n const agentsDir = '.claude-flow/agents';\n await fs.mkdir(agentsDir, { recursive: true });\n \n // Save agent data\n const agentFile = path.join(agentsDir, `${agentId}.json`);\n await fs.writeFile(agentFile, JSON.stringify(agent, null, 2));\n \n // Update performance metrics\n const perfFile = '.claude-flow/metrics/performance.json';\n try {\n const perfData = JSON.parse(await fs.readFile(perfFile, 'utf8'));\n perfData.totalAgents = (perfData.totalAgents || 0) + 1;\n perfData.activeAgents = (perfData.activeAgents || 0) + 1;\n await fs.writeFile(perfFile, JSON.stringify(perfData, null, 2));\n } catch (e) {\n // Create new performance file if doesn't exist\n await fs.writeFile(perfFile, JSON.stringify({\n startTime: Date.now(),\n totalTasks: 0,\n successfulTasks: 0,\n failedTasks: 0,\n totalAgents: 1,\n activeAgents: 1,\n neuralEvents: 0\n }, null, 2));\n }\n\n printSuccess(`โ Spawned ${agentType} agent: ${agentName}`);\n console.log('๐ค Agent successfully created:');\n console.log(` ID: ${agentId}`);\n console.log(` Type: ${agentType}`);\n console.log(` Name: ${agentName}`);\n console.log(` Capabilities: ${agent.capabilities.join(', ')}`);\n console.log(` Status: ${agent.status}`);\n console.log(` Location: ${agentFile}`);\n \n // Track agent spawn for performance metrics\n await onAgentSpawn(agentId, agentType, { name: agentName });\n}\n\nfunction getAgentCapabilities(type) {\n const capabilities = {\n researcher: ['Research', 'Analysis', 'Information Gathering', 'Documentation'],\n coder: ['Code Generation', 'Implementation', 'Refactoring', 'Debugging'],\n tester: ['Testing', 'Validation', 'Quality Assurance', 'Performance Testing'],\n analyst: ['Data Analysis', 'Pattern Recognition', 'Reporting', 'Optimization'],\n coordinator: ['Task Management', 'Workflow Orchestration', 'Resource Allocation'],\n general: ['Research', 'Analysis', 'Code Generation']\n };\n return capabilities[type] || capabilities.general;\n}\n\nasync function listAgents(subArgs, flags) {\n const { promises: fs } = await import('fs');\n const path = await import('path');\n \n const agentsDir = '.claude-flow/agents';\n const agents = [];\n \n try {\n const agentFiles = await fs.readdir(agentsDir);\n for (const file of agentFiles) {\n if (file.endsWith('.json')) {\n try {\n const content = await fs.readFile(path.join(agentsDir, file), 'utf8');\n const agent = JSON.parse(content);\n agents.push(agent);\n } catch {\n // Skip invalid agent files\n }\n }\n }\n } catch {\n // Agents directory doesn't exist yet\n }\n \n if (agents.length > 0) {\n printSuccess(`Active agents (${agents.length}):`);\n agents.forEach(agent => {\n const statusEmoji = agent.status === 'active' ? '๐ข' : '๐ก';\n console.log(`${statusEmoji} ${agent.name} (${agent.type})`);\n console.log(` ID: ${agent.id}`);\n console.log(` Status: ${agent.status}`);\n console.log(` Tasks: ${agent.activeTasks}`);\n console.log(` Created: ${new Date(agent.createdAt).toLocaleString()}`);\n console.log('');\n });\n } else {\n console.log('๐ No agents currently active');\n console.log('\\nTo create agents:');\n console.log(' claude-flow agent spawn researcher --name \"ResearchBot\"');\n console.log(' claude-flow agent spawn coder --name \"CodeBot\"');\n console.log(' claude-flow agent spawn analyst --name \"DataBot\"');\n }\n}\n\nasync function manageHierarchy(subArgs, flags) {\n const hierarchyCmd = subArgs[1];\n\n switch (hierarchyCmd) {\n case 'create':\n const hierarchyType = subArgs[2] || 'basic';\n printSuccess(`Creating ${hierarchyType} agent hierarchy`);\n console.log('๐๏ธ Hierarchy structure would include:');\n console.log(' - Coordinator Agent (manages workflow)');\n console.log(' - Specialist Agents (domain-specific tasks)');\n console.log(' - Worker Agents (execution tasks)');\n break;\n\n case 'show':\n printSuccess('Current agent hierarchy:');\n console.log('๐ No hierarchy configured (orchestrator not running)');\n break;\n\n default:\n console.log('Hierarchy commands: create, show');\n console.log('Examples:');\n console.log(' claude-flow agent hierarchy create enterprise');\n console.log(' claude-flow agent hierarchy show');\n }\n}\n\nasync function manageNetwork(subArgs, flags) {\n const networkCmd = subArgs[1];\n\n switch (networkCmd) {\n case 'topology':\n printSuccess('Agent network topology:');\n console.log('๐ Network visualization would show agent connections');\n break;\n\n case 'metrics':\n printSuccess('Network performance metrics:');\n console.log('๐ Communication latency, throughput, reliability stats');\n break;\n\n default:\n console.log('Network commands: topology, metrics');\n }\n}\n\nasync function manageEcosystem(subArgs, flags) {\n const ecosystemCmd = subArgs[1];\n\n switch (ecosystemCmd) {\n case 'status':\n printSuccess('Agent ecosystem status:');\n console.log('๐ฑ Ecosystem health: Not running');\n console.log(' Active Agents: 0');\n console.log(' Resource Usage: 0%');\n console.log(' Task Queue: Empty');\n break;\n\n case 'optimize':\n printSuccess('Optimizing agent ecosystem...');\n console.log('โก Optimization would include:');\n console.log(' - Load balancing across agents');\n console.log(' - Resource allocation optimization');\n console.log(' - Communication path optimization');\n break;\n\n default:\n console.log('Ecosystem commands: status, optimize');\n }\n}\n\nasync function provisionAgent(subArgs, flags) {\n const provision = subArgs[1];\n\n if (!provision) {\n printError('Usage: agent provision <count>');\n return;\n }\n\n const count = parseInt(provision);\n if (isNaN(count) || count < 1) {\n printError('Count must be a positive number');\n return;\n }\n\n printSuccess(`Provisioning ${count} agents...`);\n console.log('๐ Auto-provisioning would create:');\n for (let i = 1; i <= count; i++) {\n console.log(` Agent ${i}: Type=general, Status=provisioning`);\n }\n}\n\nasync function terminateAgent(subArgs, flags) {\n const agentId = subArgs[1];\n\n if (!agentId) {\n printError('Usage: agent terminate <agent-id>');\n return;\n }\n\n printSuccess(`Terminating agent: ${agentId}`);\n console.log('๐ Agent would be gracefully shut down');\n}\n\nasync function showAgentInfo(subArgs, flags) {\n const agentId = subArgs[1];\n\n if (!agentId) {\n printError('Usage: agent info <agent-id>');\n return;\n }\n\n printSuccess(`Agent information: ${agentId}`);\n console.log('๐ Agent details would include:');\n console.log(' Status, capabilities, current tasks, performance metrics');\n}\n\nfunction getFlag(args, flagName) {\n const index = args.indexOf(flagName);\n return index !== -1 && index + 1 < args.length ? args[index + 1] : null;\n}\n\nfunction showAgentHelp() {\n console.log('Agent commands:');\n console.log('\\n๐ Agentic-Flow Integration (NEW in v2.6.0):');\n console.log(' run <agent> \"<task>\" [options] Execute agent with multi-provider support');\n console.log(' agents List all 66+ agentic-flow agents');\n console.log(' create --name <name> [options] Create custom agent');\n console.log(' info <agent-name> Show detailed agent information');\n console.log(' conflicts Check for agent conflicts');\n console.log('\\n๐ง ReasoningBank Memory (NEW in v2.6.0):');\n console.log(' memory init Initialize memory system');\n console.log(' memory status Show memory statistics');\n console.log(' memory consolidate Prune and deduplicate memories');\n console.log(' memory list [--domain <d>] List stored memories');\n console.log(' memory demo Run interactive demo');\n console.log(' memory test Run integration tests');\n console.log(' memory benchmark Run performance benchmarks');\n console.log('\\n๐ง Configuration Management (NEW in v2.6.0):');\n console.log(' config wizard Run interactive setup wizard');\n console.log(' config set <key> <value> Set configuration value');\n console.log(' config get <key> Get configuration value');\n console.log(' config list [--show-secrets] List all configurations');\n console.log(' config delete <key> Delete configuration value');\n console.log(' config reset --force Reset to defaults');\n console.log('\\n๐ MCP Server Management (NEW in v2.6.0):');\n console.log(' mcp start [--port <port>] Start MCP server');\n console.log(' mcp stop Stop MCP server');\n console.log(' mcp restart Restart MCP server');\n console.log(' mcp status [--detailed] Get server status');\n console.log(' mcp list [--server <name>] List MCP tools');\n console.log(' mcp logs [--lines <n>] [-f] View server logs');\n console.log('\\n๐ Agent Booster - Ultra-Fast Code Editing (NEW in v2.6.0):');\n console.log(' booster edit <file> \"<instr>\" Edit file (352x faster, $0)');\n console.log(' booster batch <pattern> \"<i>\" Batch edit files');\n console.log(' booster parse-markdown <file> Parse markdown edits');\n console.log(' booster benchmark [options] Run performance tests');\n console.log(' booster help Show Agent Booster help');\n console.log('\\n๐ค Internal Agent Management:');\n console.log(' spawn <type> [--name <name>] Create internal agent');\n console.log(' list [--verbose] List active internal agents');\n console.log(' terminate <id> Stop specific agent');\n console.log(' hierarchy <create|show> Manage agent hierarchies');\n console.log(' network <topology|metrics> Agent network operations');\n console.log(' ecosystem <status|optimize> Ecosystem management');\n console.log(' provision <count> Auto-provision agents');\n console.log();\n console.log('Execution Options (for run command):');\n console.log(' --provider <provider> Provider: anthropic, openrouter, onnx, gemini');\n console.log(' --model <model> Specific model to use');\n console.log(' --temperature <temp> Temperature (0.0-1.0)');\n console.log(' --max-tokens <tokens> Maximum tokens');\n console.log(' --format <format> Output format: text, json, markdown');\n console.log(' --stream Enable streaming');\n console.log(' --verbose Verbose output');\n console.log();\n console.log('Model Optimization Options (NEW in v2.6.0):');\n console.log(' --optimize Auto-select optimal model (85-98% savings)');\n console.log(' --priority <priority> Priority: quality, cost, speed, privacy, balanced');\n console.log(' --max-cost <dollars> Maximum cost per task in dollars');\n console.log();\n console.log('Advanced Execution Options (NEW in v2.6.0):');\n console.log(' --retry Auto-retry on transient errors');\n console.log(' --agents-dir <path> Custom agents directory');\n console.log(' --timeout <ms> Execution timeout in milliseconds');\n console.log(' --anthropic-key <key> Override Anthropic API key');\n console.log(' --openrouter-key <key> Override OpenRouter API key');\n console.log(' --gemini-key <key> Override Gemini API key');\n console.log();\n console.log('Memory Options (NEW - for run command):');\n console.log(' --enable-memory Enable ReasoningBank learning');\n console.log(' โ ๏ธ REQUIRES .env with API keys');\n console.log(' Run: claude-flow init --env');\n console.log(' --memory-db <path> Memory database path [default: .swarm/memory.db]');\n console.log(' --memory-k <n> Top-k memories to retrieve [default: 3]');\n console.log(' --memory-domain <domain> Domain filter for memories');\n console.log(' --no-memory-learning Disable post-task learning');\n console.log(' --memory-min-confidence <n> Min confidence threshold [default: 0.5]');\n console.log(' --memory-task-id <id> Custom task ID for tracking');\n console.log();\n console.log('Examples:');\n console.log('\\n # Execute with agentic-flow (multi-provider)');\n console.log(' claude-flow agent run coder \"Build REST API with authentication\"');\n console.log(' claude-flow agent run researcher \"Research React 19 features\" --provider openrouter');\n console.log(' claude-flow agent run security-auditor \"Audit code\" --provider onnx');\n console.log(' claude-flow agent agents # List all available agents');\n console.log('\\n # Model optimization (85-98% cost savings)');\n console.log(' claude-flow agent run coder \"Build API\" --optimize');\n console.log(' claude-flow agent run coder \"Fix bug\" --optimize --priority cost');\n console.log(' claude-flow agent run coder \"Critical fix\" --optimize --priority quality --max-cost 0.50');\n console.log('\\n # Execute with ReasoningBank memory (learns from experience)');\n console.log(' claude-flow agent run coder \"Build API\" --enable-memory');\n console.log(' claude-flow agent run coder \"Add auth\" --enable-memory --memory-domain api');\n console.log(' claude-flow agent run coder \"Fix bug\" --enable-memory --memory-k 5');\n console.log('\\n # Memory management');\n console.log(' claude-flow agent memory init');\n console.log(' claude-flow agent memory status');\n console.log(' claude-flow agent memory list --domain api --limit 10');\n console.log(' claude-flow agent memory consolidate');\n console.log(' claude-flow agent memory demo # See 70% โ 88% success improvement');\n console.log('\\n # Configuration management');\n console.log(' claude-flow agent config wizard # Interactive setup');\n console.log(' claude-flow agent config set ANTHROPIC_API_KEY sk-ant-xxx');\n console.log(' claude-flow agent config list --show-secrets');\n console.log(' claude-flow agent config get DEFAULT_MODEL');\n console.log('\\n # MCP server management');\n console.log(' claude-flow agent mcp start --daemon');\n console.log(' claude-flow agent mcp status --detailed');\n console.log(' claude-flow agent mcp list --server agent-booster');\n console.log(' claude-flow agent mcp logs --follow');\n console.log('\\n # Internal agent management');\n console.log(' claude-flow agent spawn researcher --name \"DataBot\"');\n console.log(' claude-flow agent list --verbose');\n console.log(' claude-flow agent hierarchy create enterprise');\n}\n"],"names":["printSuccess","printError","printWarning","onAgentSpawn","exec","promisify","execAsync","agentCommand","subArgs","flags","agentCmd","help","h","showAgentHelp","executeAgentTask","spawnAgent","listAgents","listAgenticFlowAgents","createAgent","getAgentInfo","checkAgentConflicts","memoryCommand","configAgenticFlow","mcpAgenticFlow","manageHierarchy","manageNetwork","manageEcosystem","provisionAgent","terminateAgent","agentBoosterCommand","agentType","task","console","log","enableMemory","memory","checkEnvConfig","showEnvSetupInstructions","envCheck","process","cwd","exists","exit","hasApiKeys","keys","anthropic","openrouter","gemini","provider","cmd","buildAgenticFlowCommand","stdout","stderr","timeout","maxBuffer","verbose","warn","error","message","agent","parts","push","replace","model","temperature","maxTokens","format","stream","memoryDb","memoryDatabase","memoryK","memoryDomain","memoryLearning","memoryMinConfidence","memoryTaskId","optimize","priority","maxCost","retry","agentsDir","anthropicKey","openrouterKey","geminiKey","join","name","description","category","prompt","tools","agentName","includes","memoryCmd","initializeMemory","getMemoryStatus","consolidateMemory","listMemories","runMemoryDemo","runMemoryTest","runMemoryBenchmark","showMemoryHelp","dbPath","db","database","domain","limit","configCmd","agenticConfigSet","agenticConfigGet","agenticConfigList","agenticConfigDelete","agenticConfigReset","undefined","agenticConfigWizard","showAgenticConfigHelp","key","value","showSecrets","force","mcpCmd","agenticMcpStart","agenticMcpStop","agenticMcpStatus","agenticMcpList","agenticMcpLogs","agenticMcpRestart","showAgenticMcpHelp","port","host","daemon","background","detailed","server","lines","follow","f","quiet","Promise","resolve","setTimeout","getFlag","Date","now","agentId","id","type","status","activeTasks","lastActivity","capabilities","getAgentCapabilities","createdAt","promises","fs","path","mkdir","recursive","agentFile","writeFile","JSON","stringify","perfFile","perfData","parse","readFile","totalAgents","activeAgents","e","startTime","totalTasks","successfulTasks","failedTasks","neuralEvents","researcher","coder","tester","analyst","coordinator","general","agents","agentFiles","readdir","file","endsWith","content","length","forEach","statusEmoji","toLocaleString","hierarchyCmd","hierarchyType","networkCmd","ecosystemCmd","provision","count","parseInt","isNaN","i","showAgentInfo","args","flagName","index","indexOf"],"mappings":"AACA,SAASA,YAAY,EAAEC,UAAU,EAAEC,YAAY,QAAQ,cAAc;AACrE,SAASC,YAAY,QAAuB,yBAAyB;AACrE,SAASC,IAAI,QAAQ,gBAAgB;AACrC,SAASC,SAAS,QAAQ,OAAO;AAEjC,MAAMC,YAAYD,UAAUD;AAE5B,OAAO,eAAeG,aAAaC,OAAO,EAAEC,KAAK;IAC/C,MAAMC,WAAWF,OAAO,CAAC,EAAE;IAG3B,IAAIC,MAAME,IAAI,IAAIF,MAAMG,CAAC,IAAIF,aAAa,YAAYA,aAAa,MAAM;QACvEG;QACA;IACF;IAEA,OAAQH;QACN,KAAK;QACL,KAAK;YACH,MAAMI,iBAAiBN,SAASC;YAChC;QAEF,KAAK;YACH,MAAMM,WAAWP,SAASC;YAC1B;QAEF,KAAK;YACH,MAAMO,WAAWR,SAASC;YAC1B;QAEF,KAAK;YACH,MAAMQ,sBAAsBT,SAASC;YACrC;QAEF,KAAK;YACH,MAAMS,YAAYV,SAASC;YAC3B;QAEF,KAAK;YACH,MAAMU,aAAaX,SAASC;YAC5B;QAEF,KAAK;YACH,MAAMW,oBAAoBZ,SAASC;YACnC;QAEF,KAAK;YACH,MAAMY,cAAcb,SAASC;YAC7B;QAEF,KAAK;QACL,KAAK;YACH,MAAMa,kBAAkBd,SAASC;YACjC;QAEF,KAAK;QACL,KAAK;YACH,MAAMc,eAAef,SAASC;YAC9B;QAEF,KAAK;YACH,MAAMe,gBAAgBhB,SAASC;YAC/B;QAEF,KAAK;YACH,MAAMgB,cAAcjB,SAASC;YAC7B;QAEF,KAAK;YACH,MAAMiB,gBAAgBlB,SAASC;YAC/B;QAEF,KAAK;YACH,MAAMkB,eAAenB,SAASC;YAC9B;QAEF,KAAK;YACH,MAAMmB,eAAepB,SAASC;YAC9B;QAEF,KAAK;YACH,MAAM,EAAEoB,mBA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IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;AACd"}\ No newline at end of filediff --git a/src/cli/help-text.js b/src/cli/help-text.jsindex 8a55fecb62..e237fc83da 100644--- a/src/cli/help-text.js+++ b/src/cli/help-text.js@@ -795,11 +795,18 @@ export function getStandardizedCommandHelp(command) {const commandConfigs = {agent: {name: 'claude-flow agent',- description: 'Manage individual agents',+ description: 'Manage agents with agentic-flow integration (66+ agents, ultra-fast editing, memory)',usage: 'claude-flow agent <action> [options]',commands: [- { name: 'spawn', description: 'Create a new agent' },- { name: 'list', description: 'List all active agents' },+ { name: 'run <agent> "<task>"', description: 'Execute agent with multi-provider (NEW)' },+ { name: 'agents', description: 'List all 66+ agentic-flow agents (NEW)' },+ { name: 'booster edit <file>', description: 'Ultra-fast editing - 352x faster (NEW)' },+ { name: 'booster batch <pattern>', description: 'Batch edit multiple files (NEW)' },+ { name: 'memory init', description: 'Initialize ReasoningBank memory (NEW)' },+ { name: 'config wizard', description: 'Interactive setup wizard (NEW)' },+ { name: 'mcp start', description: 'Start MCP server (NEW)' },+ { name: 'spawn', description: 'Create internal agent' },+ { name: 'list', description: 'List active internal agents' },{ name: 'info', description: 'Show agent details' },{ name: 'terminate', description: 'Stop an agent' },{ name: 'hierarchy', description: 'Manage agent hierarchies' },diff --git a/src/cli/simple-commands/agent.js b/src/cli/simple-commands/agent.jsindex 6ee5d2c7c7..46e1a44f02 100644--- a/src/cli/simple-commands/agent.js+++ b/src/cli/simple-commands/agent.js@@ -9,6 +9,12 @@ const execAsync = promisify(exec);export async function agentCommand(subArgs, flags) {const agentCmd = subArgs[0];+ // Handle --help flag explicitly to show full help+ if (flags.help || flags.h || agentCmd === '--help' || agentCmd === '-h') {+ showAgentHelp();+ return;+ }+switch (agentCmd) {case 'run':case 'execute':