/** * Help text templates for Claude Flow CLI * Provides clear, actionable command documentation */ import { HelpFormatter } from './help-formatter.js'; import { VERSION } from '../core/version.js'; export { VERSION }; export const MAIN_HELP = ` 🌊 Claude-Flow v${VERSION} - Enterprise-Grade AI Agent Orchestration Platform 🎯 ENTERPRISE FEATURES: Complete ruv-swarm integration with 90+ MCP tools, neural networking, and production-ready infrastructure 🐝 NEW: Claude Code 1.0.51+ full compatibility with enhanced hooks and batch processing ⚡ ALPHA 89: Major Quality & Verification Update 🔍 ALPHA 89 HIGHLIGHTS: ✅ Truth Verification System - "Truth is enforced, not assumed" (0.95 threshold) 👥 Pair Programming Mode - Real-time collaborative development with AI 🔧 Non-interactive Fixes - Proper prompt injection for CI/CD & automation USAGE: npx claude-flow@alpha [options] # Run latest alpha version npx claude-flow@alpha --help # Get detailed help for any command npx claude-flow@alpha --help # Show this help # After local install: claude-flow [options] claude-flow --help # Get detailed help for any command 🚀 QUICK START: # First time setup (creates CLAUDE.md & .claude/commands) npx claude-flow@alpha init # 🐝 HIVE MIND QUICK START (NEW!): claude-flow hive-mind wizard # Interactive setup wizard claude-flow hive-mind spawn "objective" # Create intelligent swarm claude-flow hive-mind spawn "Build API" --claude # Open Claude Code CLI # After setup, use without npx: claude-flow start --ui --swarm # Start with swarm intelligence UI claude-flow swarm "build REST API" # Deploy multi-agent workflow claude-flow swarm "create service" --claude # Open Claude Code CLI with swarm 🐝 HIVE MIND COMMANDS (NEW!): hive-mind wizard 🎯 Interactive setup wizard (RECOMMENDED) hive-mind init Initialize Hive Mind system with SQLite hive-mind spawn Create intelligent swarm with objective hive-mind status View active swarms and performance metrics hive-mind metrics Advanced performance analytics 📋 CORE COMMANDS: init Initialize Claude Flow v2.0.0 (creates CLAUDE.md & .claude/commands) --monitoring enables token usage tracking start [--ui] [--swarm] Start orchestration system swarm Multi-agent swarm coordination agent Agent management (spawn, list, terminate) sparc SPARC development modes (17 available) memory Persistent memory operations github GitHub workflow automation (6 modes) status System status and health 🔍 VERIFICATION COMMANDS (NEW!): verify Truth verification system (0.95 threshold) truth View truth scores and reliability metrics pair [--start] Collaborative development with real-time verification 📋 SWARM INTELLIGENCE COMMANDS: training Neural pattern learning & model updates (3 commands) coordination Swarm & agent orchestration (3 commands) analysis Performance & token usage analytics (real tracking!) automation Intelligent agent & workflow management (3 commands) hooks Lifecycle event management (5 commands) migrate-hooks Migrate settings.json to Claude Code 1.0.51+ format monitoring Real-time system monitoring (3 commands) optimization Performance & topology optimization (3 commands) 📋 ADDITIONAL COMMANDS: task Task and workflow management config System configuration mcp MCP server management batch Batch operations stream-chain Stream-JSON chaining for multi-agent pipelines (NEW!) 🔍 GET HELP: npx claude-flow@alpha --help Show this help npx claude-flow@alpha --help Detailed command help 🎯 RECOMMENDED FOR NEW USERS: npx claude-flow@alpha hive-mind wizard # Start here! Interactive guided setup npx claude-flow@alpha init # Initialize Claude Flow npx claude-flow@alpha help hive-mind # Learn about Hive Mind features npx claude-flow@alpha swarm "Build API" --claude # Quick start with Claude Code CLI 📚 Documentation: https://github.com/ruvnet/claude-flow 🐝 Hive Mind Guide: https://github.com/ruvnet/claude-flow/tree/main/docs/hive-mind 🐝 ruv-swarm: https://github.com/ruvnet/ruv-FANN/tree/main/ruv-swarm 💬 Discord Community: https://discord.agentics.org 💖 Created by rUv with love: https://github.com/ruvnet `; export const COMMAND_HELP = { verify: ` 🔍 VERIFY COMMAND - Truth Verification System USAGE: claude-flow verify [options] DESCRIPTION: Enforce truth and accuracy in multi-agent operations with a 0.95 threshold. "Truth is enforced, not assumed" - every agent claim is verified. SUBCOMMANDS: init Initialize verification system Modes: strict (0.95), moderate (0.85), development (0.75) verify Run verification on specific task or agent status Show verification system status and metrics rollback Trigger manual rollback to last good state OPTIONS: --threshold Custom accuracy threshold (0.0-1.0) --agent Specify agent type for verification --auto-rollback Enable automatic rollback on failures --verbose Detailed verification output --json Output in JSON format EXAMPLES: claude-flow verify init strict # Production mode claude-flow verify verify task-123 --agent coder claude-flow verify status --recent 10 claude-flow verify rollback --checkpoint last `, truth: ` 📊 TRUTH COMMAND - Truth Score Analytics USAGE: claude-flow truth [options] DESCRIPTION: View and analyze truth scores, reliability metrics, and verification history. Provides insights into agent accuracy and system reliability. OPTIONS: --report Generate detailed truth score report --analyze Analyze failure patterns and trends --agent Filter by specific agent type --taskId Check specific task truth score --threshold Filter scores below threshold --json Output in JSON format --export Export report to file EXAMPLES: claude-flow truth # Show current scores claude-flow truth --report # Detailed report claude-flow truth --analyze # Pattern analysis claude-flow truth --agent coder --detailed claude-flow truth --json | jq .averageScore `, pair: ` 👥 PAIR COMMAND - Collaborative Development Mode USAGE: claude-flow pair [options] DESCRIPTION: Real-time collaborative development with AI verification. Continuous validation with instant feedback and auto-rollback. OPTIONS: --start Start new pair programming session --mode Set verification mode: strict (0.95), standard (0.85), development (0.75) --threshold Custom accuracy threshold (0.0-1.0) --verify Enable real-time verification --monitor Show real-time metrics dashboard --auto-rollback Enable automatic rollback on failures --summary View session summary --export Export session metrics EXAMPLES: claude-flow pair --start # Start session claude-flow pair --start --mode strict # Production pairing claude-flow pair --threshold 0.90 # Custom threshold claude-flow pair --summary # View session stats claude-flow pair --monitor --verify # Real-time monitoring `, swarm: ` 🧠 SWARM COMMAND - Multi-Agent AI Coordination USAGE: claude-flow swarm [options] DESCRIPTION: Deploy intelligent multi-agent swarms to accomplish complex objectives. Agents work in parallel with neural optimization and real-time coordination. OPTIONS: --strategy Execution strategy: research, development, analysis, testing, optimization, maintenance --mode Coordination mode: centralized, distributed, hierarchical, mesh, hybrid --max-agents Maximum number of agents (default: 5) --parallel Enable parallel execution (2.8-4.4x speed improvement) --monitor Real-time swarm monitoring --ui Interactive user interface --background Run in background with progress tracking --claude Open Claude Code CLI --executor Use built-in executor instead of Claude Code --analysis Enable analysis/read-only mode (no code changes) --read-only Enable read-only mode (alias for --analysis) EXAMPLES: claude-flow swarm "Build a REST API with authentication" claude-flow swarm "Research cloud architecture patterns" --strategy research claude-flow swarm "Optimize database queries" --max-agents 3 --parallel claude-flow swarm "Develop feature X" --strategy development --monitor --ui claude-flow swarm "Build API" --claude # Open Claude Code CLI claude-flow swarm "Create service" --executor # Use built-in executor claude-flow swarm "Analyze codebase for security issues" --analysis claude-flow swarm "Review architecture patterns" --read-only --strategy research AGENT TYPES: researcher Research with web access and data analysis coder Code development with neural patterns analyst Performance analysis and optimization architect System design with enterprise patterns tester Comprehensive testing with automation coordinator Multi-agent orchestration ANALYSIS MODE: When using --analysis or --read-only flags, the swarm operates in a safe read-only mode that prevents all code modifications. Perfect for: • Code reviews and security audits • Architecture analysis and documentation • Performance bottleneck identification • Technical debt assessment • Dependency mapping and analysis • "What-if" scenario exploration In analysis mode, agents can only read files, search codebases, and generate reports - no Write, Edit, or system-modifying operations. `, github: ` 🐙 GITHUB COMMAND - Workflow Automation USAGE: claude-flow github [options] DESCRIPTION: Automate GitHub workflows with 6 specialized AI-powered modes. Each mode handles specific aspects of repository management. MODES: init Initialize GitHub-enhanced checkpoint system (NEW!) gh-coordinator GitHub workflow orchestration and CI/CD pr-manager Pull request management with reviews issue-tracker Issue management and project coordination release-manager Release coordination and deployment repo-architect Repository structure optimization sync-coordinator Multi-package synchronization OPTIONS: --auto-approve Automatically approve safe changes --dry-run Preview changes without applying --verbose Detailed operation logging --config Custom configuration file EXAMPLES: claude-flow github init # Initialize GitHub checkpoint hooks claude-flow github pr-manager "create feature PR with tests" claude-flow github gh-coordinator "setup CI/CD pipeline" --auto-approve claude-flow github release-manager "prepare v2.0.0 release" claude-flow github repo-architect "optimize monorepo structure" claude-flow github issue-tracker "analyze and label issues" claude-flow github sync-coordinator "sync versions across packages" `, agent: ` 🤖 AGENT COMMAND - AI Agent Management USAGE: claude-flow agent [options] ACTIONS: spawn Create new AI agent list List all active agents terminate Terminate specific agent info Show agent details hierarchy Manage agent hierarchies ecosystem View agent ecosystem OPTIONS: --name Custom agent name --verbose Detailed output --json JSON output format AGENT TYPES: researcher Research and data analysis coder Code generation and refactoring analyst Performance and security analysis architect System design and architecture tester Test creation and execution coordinator Task coordination reviewer Code and design review optimizer Performance optimization EXAMPLES: claude-flow agent spawn researcher --name "DataBot" claude-flow agent list --verbose claude-flow agent terminate agent-123 claude-flow agent hierarchy create enterprise claude-flow agent ecosystem status `, memory: ` 💾 MEMORY COMMAND - Persistent Memory Management USAGE: claude-flow memory [options] ACTIONS: store Store data in memory get Retrieve stored data query Search memory contents list List all stored items delete Delete specific entry stats Memory usage statistics export Export memory to file import Import memory from file cleanup Clean old entries OPTIONS: --namespace Use specific namespace --format Output format (json, table) --verbose Detailed output EXAMPLES: claude-flow memory store architecture "microservices pattern" claude-flow memory get architecture claude-flow memory query "API design" claude-flow memory stats claude-flow memory export backup.json claude-flow memory cleanup --older-than 30d `, sparc: ` 🚀 SPARC COMMAND - Development Mode Operations USAGE: claude-flow sparc [mode] [objective] claude-flow sparc DESCRIPTION: SPARC provides 17 specialized development modes for different workflows. Each mode optimizes AI assistance for specific tasks. MODES: architect System architecture and design code Code generation and implementation tdd Test-driven development workflow debug Debugging and troubleshooting security Security analysis and fixes refactor Code refactoring and optimization docs Documentation generation review Code review and quality checks data Data modeling and analysis api API design and implementation ui UI/UX development ops DevOps and infrastructure ml Machine learning workflows blockchain Blockchain development mobile Mobile app development game Game development iot IoT system development ACTIONS: modes List all available modes info Show mode details run Run specific mode EXAMPLES: claude-flow sparc "design authentication system" # Auto-select mode claude-flow sparc architect "design microservices" # Use architect mode claude-flow sparc tdd "user registration feature" # TDD workflow claude-flow sparc modes # List all modes claude-flow sparc info security # Mode details `, init: ` 🎯 INIT COMMAND - Initialize Claude Flow Environment USAGE: claude-flow init [options] DESCRIPTION: Initialize Claude Flow v2.0.0 in your project with full MCP integration. By default creates standard setup with local Git checkpoints. TWO INITIALIZATION MODES: • claude-flow init Standard init with local Git checkpoints • claude-flow github init GitHub-enhanced with automatic releases (NEW!) OPTIONS: --force Overwrite existing configuration --dry-run Preview what will be created --basic Use basic initialization (pre-v2.0.0) --sparc SPARC enterprise setup with additional features --minimal Minimal setup without examples --template Use specific project template WHAT claude-flow init CREATES (DEFAULT): 📄 CLAUDE.md AI-readable project instructions & context 📁 .claude/ Enterprise configuration directory containing: └── commands/ Custom commands and automation scripts └── settings.json Advanced configuration and hooks └── hooks/ Pre/post operation automation 📋 .roomodes 17 specialized SPARC development modes CLAUDE.md CONTENTS: • Project overview and objectives • Technology stack and architecture • Development guidelines and patterns • AI-specific instructions for better assistance • Integration with ruv-swarm MCP tools .claude/commands INCLUDES: • Custom project-specific commands • Automated workflow scripts • Integration hooks for Claude Code • Team collaboration tools Features enabled: • ruv-swarm integration with 27 MCP tools • Neural network processing with WASM • Multi-agent coordination topologies • Cross-session memory persistence • GitHub workflow automation • Performance monitoring • Enterprise security features EXAMPLES: npx claude-flow@alpha init # Standard init with local checkpoints npx claude-flow@alpha github init # GitHub-enhanced init with releases claude-flow init --force # Overwrite existing configuration claude-flow github init --force # Force GitHub mode (overwrite) claude-flow init --dry-run # Preview what will be created claude-flow init --monitoring # Initialize with token tracking claude-flow init --sparc # SPARC enterprise setup claude-flow init --minimal # Basic setup only `, start: ` 🚀 START COMMAND - Start Orchestration System USAGE: claude-flow start [options] DESCRIPTION: Start the Claude Flow orchestration system with optional UI and swarm intelligence. OPTIONS: --ui Enable interactive user interface --swarm Enable swarm intelligence features --daemon Run as background daemon --port MCP server port (default: 3000) --verbose Detailed logging --config Custom configuration file EXAMPLES: claude-flow start # Basic start claude-flow start --ui --swarm # Full UI with swarm features claude-flow start --daemon # Background daemon claude-flow start --port 8080 # Custom MCP port claude-flow start --config prod.json # Production config `, status: ` 📊 STATUS COMMAND - System Status USAGE: claude-flow status [options] DESCRIPTION: Show comprehensive system status including agents, tasks, and resources. OPTIONS: --verbose Detailed system information --json JSON output format --watch Live updates --interval Update interval (with --watch) OUTPUT INCLUDES: • Orchestrator status • Active agents and their state • Task queue and progress • Memory usage statistics • MCP server status • System resources • Performance metrics EXAMPLES: claude-flow status # Basic status claude-flow status --verbose # Detailed information claude-flow status --json # Machine-readable format claude-flow status --watch # Live monitoring `, training: ` 🧠 TRAINING COMMAND - Neural Pattern Learning & Model Updates USAGE: claude-flow training [options] DESCRIPTION: Train neural patterns from operations, learn from outcomes, and update agent models with real ruv-swarm integration for continuous learning and optimization. COMMANDS: neural-train Train neural patterns from operations data pattern-learn Learn from specific operation outcomes model-update Update agent models with new insights NEURAL TRAIN OPTIONS: --data Training data source (default: recent) Options: recent, historical, custom, swarm- --model Target model (default: general-predictor) Options: task-predictor, agent-selector, performance-optimizer --epochs Training epochs (default: 50) PATTERN LEARN OPTIONS: --operation Operation type to learn from --outcome Operation outcome (success/failure/partial) MODEL UPDATE OPTIONS: --agent-type Agent type to update (coordinator, coder, researcher, etc.) --operation-result Result from operation execution EXAMPLES: claude-flow training neural-train --data recent --model task-predictor claude-flow training pattern-learn --operation "file-creation" --outcome "success" claude-flow training model-update --agent-type coordinator --operation-result "efficient" claude-flow training neural-train --data "swarm-123" --epochs 100 --model "coordinator-predictor" 🎯 Neural training improves: • Task selection accuracy • Agent performance prediction • Coordination efficiency • Error prevention patterns `, coordination: ` 🐝 COORDINATION COMMAND - Swarm & Agent Orchestration USAGE: claude-flow coordination [options] DESCRIPTION: Initialize swarms, spawn coordinated agents, and orchestrate task execution across agents with real ruv-swarm MCP integration for optimal performance. COMMANDS: swarm-init Initialize swarm coordination infrastructure agent-spawn Spawn and coordinate new agents task-orchestrate Orchestrate task execution across agents SWARM-INIT OPTIONS: --swarm-id Swarm identifier (auto-generated if not provided) --topology Coordination topology (default: hierarchical) Options: hierarchical, mesh, ring, star, hybrid --max-agents Maximum number of agents (default: 5) --strategy Coordination strategy (default: balanced) AGENT-SPAWN OPTIONS: --type Agent type (default: general) Options: coordinator, coder, developer, researcher, analyst, analyzer, tester, architect, reviewer, optimizer, general --name Custom agent name (auto-generated if not provided) --swarm-id Target swarm for agent coordination --capabilities Custom capabilities specification TASK-ORCHESTRATE OPTIONS: --task Task description (required) --swarm-id Target swarm for task execution --strategy Coordination strategy (default: adaptive) Options: adaptive, parallel, sequential, hierarchical --share-results Enable result sharing across swarm EXAMPLES: claude-flow coordination swarm-init --topology hierarchical --max-agents 8 claude-flow coordination agent-spawn --type developer --name "api-dev" --swarm-id swarm-123 claude-flow coordination task-orchestrate --task "Build REST API" --strategy parallel --share-results claude-flow coordination swarm-init --topology mesh --max-agents 12 🎯 Coordination enables: • Intelligent task distribution • Agent synchronization • Shared memory coordination • Performance optimization • Fault tolerance `, analysis: ` 📊 ANALYSIS COMMAND - Performance & Usage Analytics USAGE: claude-flow analysis [options] DESCRIPTION: Detect performance bottlenecks, generate comprehensive reports, and analyze token consumption using real ruv-swarm analytics for system optimization. COMMANDS: bottleneck-detect Detect performance bottlenecks in the system performance-report Generate comprehensive performance reports token-usage Analyze token consumption and costs BOTTLENECK DETECT OPTIONS: --scope Analysis scope (default: system) Options: system, swarm, agent, task, memory --target Specific target to analyze (default: all) Examples: agent-id, swarm-id, task-type PERFORMANCE REPORT OPTIONS: --timeframe