π 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
Checkpoint: File edits
rUva0225a2765d2
diff --git a/.agents/skills/memory-management/SKILL.md b/.agents/skills/memory-management/SKILL.mdindex ebb64d8f83..c337ff95e6 100644--- a/.agents/skills/memory-management/SKILL.md+++ b/.agents/skills/memory-management/SKILL.md@@ -31,76 +31,76 @@ AgentDB memory system with HNSW vector search. Provides 150x-12,500x faster pattStore a pattern or knowledge item in memory```bash-npx @claude-flow$cli memory store --key "[key]" --value "[value]" --namespace patterns+npx @claude-flow/cli memory store --key "[key]" --value "[value]" --namespace patterns```**Example:**```bash-npx @claude-flow$cli memory store --key "auth-jwt-pattern" --value "JWT validation with refresh tokens" --namespace patterns+npx @claude-flow/cli memory store --key "auth-jwt-pattern" --value "JWT validation with refresh tokens" --namespace patterns```### Semantic SearchSearch memory using semantic similarity```bash-npx @claude-flow$cli memory search --query "[search terms]" --limit 10+npx @claude-flow/cli memory search --query "[search terms]" --limit 10```**Example:**```bash-npx @claude-flow$cli memory search --query "authentication best practices" --limit 5+npx @claude-flow/cli memory search --query "authentication best practices" --limit 5```### Retrieve EntryRetrieve a specific memory entry by key```bash-npx @claude-flow$cli memory get --key "[key]" --namespace [namespace]+npx @claude-flow/cli memory get --key "[key]" --namespace [namespace]```**Example:**```bash-npx @claude-flow$cli memory get --key "auth-jwt-pattern" --namespace patterns+npx @claude-flow/cli memory get --key "auth-jwt-pattern" --namespace patterns```### List EntriesList all entries in a namespace```bash-npx @claude-flow$cli memory list --namespace [namespace]+npx @claude-flow/cli memory list --namespace [namespace]```**Example:**```bash-npx @claude-flow$cli memory list --namespace patterns --limit 20+npx @claude-flow/cli memory list --namespace patterns --limit 20```### Delete EntryDelete a memory entry```bash-npx @claude-flow$cli memory delete --key "[key]" --namespace [namespace]+npx @claude-flow/cli memory delete --key "[key]" --namespace [namespace]```### Initialize HNSW IndexInitialize HNSW vector search index```bash-npx @claude-flow$cli memory init --enable-hnsw+npx @claude-flow/cli memory init --enable-hnsw```### Memory StatsShow memory usage statistics```bash-npx @claude-flow$cli memory stats+npx @claude-flow/cli memory stats```### Export MemoryExport memory to JSON```bash-npx @claude-flow$cli memory export --output memory-backup.json+npx @claude-flow/cli memory export --output memory-backup.json```@@ -108,16 +108,16 @@ npx @claude-flow$cli memory export --output memory-backup.json| Script | Path | Description ||--------|------|-------------|-| `memory-backup` | `.agents$scripts$memory-backup.sh` | Backup memory to external storage |-| `memory-consolidate` | `.agents$scripts$memory-consolidate.sh` | Consolidate and optimize memory |+| `memory-backup` | `.agents/scripts/memory-backup.sh` | Backup memory to external storage |+| `memory-consolidate` | `.agents/scripts/memory-consolidate.sh` | Consolidate and optimize memory |## References| Document | Path | Description ||----------|------|-------------|-| `HNSW Guide` | `docs$hnsw.md` | HNSW vector search configuration |-| `Memory Schema` | `docs$memory-schema.md` | Memory namespace and schema reference |+| `HNSW Guide` | `docs/hnsw.md` | HNSW vector search configuration |+| `Memory Schema` | `docs/memory-schema.md` | Memory namespace and schema reference |## Best Practices1. Check memory for existing patterns before startingdiff --git a/.agents/skills/security-audit/SKILL.md b/.agents/skills/security-audit/SKILL.mdindex 1613eaae20..83f7d64958 100644--- a/.agents/skills/security-audit/SKILL.md+++ b/.agents/skills/security-audit/SKILL.md@@ -33,83 +33,83 @@ Comprehensive security scanning and vulnerability detection. Includes input valiRun comprehensive security analysis on the codebase```bash-npx @claude-flow$cli security scan --depth full+npx @claude-flow/cli security scan --depth full```**Example:**```bash-npx @claude-flow$cli security scan --depth full --output security-report.json+npx @claude-flow/cli security scan --depth full --output security-report.json```### Input Validation CheckCheck for input validation issues```bash-npx @claude-flow$cli security scan --check input-validation+npx @claude-flow/cli security scan --check input-validation```**Example:**```bash-npx @claude-flow$cli security scan --check input-validation --path .$src$api+npx @claude-flow/cli security scan --check input-validation --path ./src/api```### Path Traversal CheckCheck for path traversal vulnerabilities```bash-npx @claude-flow$cli security scan --check path-traversal+npx @claude-flow/cli security scan --check path-traversal```### SQL Injection CheckCheck for SQL injection vulnerabilities```bash-npx @claude-flow$cli security scan --check sql-injection+npx @claude-flow/cli security scan --check sql-injection```### XSS CheckCheck for cross-site scripting vulnerabilities```bash-npx @claude-flow$cli security scan --check xss+npx @claude-flow/cli security scan --check xss```### CVE ScanScan dependencies for known CVEs```bash-npx @claude-flow$cli security cve --scan+npx @claude-flow/cli security cve --scan```**Example:**```bash-npx @claude-flow$cli security cve --scan --severity high+npx @claude-flow/cli security cve --scan --severity high```### Security Audit ReportGenerate full security audit report```bash-npx @claude-flow$cli security audit --report+npx @claude-flow/cli security audit --report```**Example:**```bash-npx @claude-flow$cli security audit --report --format markdown --output SECURITY.md+npx @claude-flow/cli security audit --report --format markdown --output SECURITY.md```### Threat ModelingRun threat modeling analysis```bash-npx @claude-flow$cli security threats --analyze+npx @claude-flow/cli security threats --analyze```### Validate SecretsCheck for hardcoded secrets```bash-npx @claude-flow$cli security validate --check secrets+npx @claude-flow/cli security validate --check secrets```@@ -117,16 +117,16 @@ npx @claude-flow$cli security validate --check secrets| Script | Path | Description ||--------|------|-------------|-| `security-scan` | `.agents$scripts$security-scan.sh` | Run full security scan pipeline |-| `cve-remediate` | `.agents$scripts$cve-remediate.sh` | Auto-remediate known CVEs |+| `security-scan` | `.agents/scripts/security-scan.sh` | Run full security scan pipeline |+| `cve-remediate` | `.agents/scripts/cve-remediate.sh` | Auto-remediate known CVEs |## References| Document | Path | Description ||----------|------|-------------|-| `Security Checklist` | `docs$security-checklist.md` | Security review checklist |-| `OWASP Guide` | `docs$owasp-top10.md` | OWASP Top 10 mitigation guide |+| `Security Checklist` | `docs/security-checklist.md` | Security review checklist |+| `OWASP Guide` | `docs/owasp-top10.md` | OWASP Top 10 mitigation guide |## Best Practices1. Check memory for existing patterns before startingdiff --git a/.agents/skills/sparc-methodology/SKILL.md b/.agents/skills/sparc-methodology/SKILL.mdindex a4fb675f80..d48e6ef61b 100644--- a/.agents/skills/sparc-methodology/SKILL.md+++ b/.agents/skills/sparc-methodology/SKILL.md@@ -1,1115 +1,118 @@---name: sparc-methodology-description: SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) comprehensive development methodology with multi-agent orchestration-version: 2.7.0-category: development-tags:- - sparc- - tdd- - architecture- - orchestration- - methodology- - multi-agent-author: Claude Flow+description: >+ SPARC development workflow: Specification, Pseudocode, Architecture, Refinement, Completion. A structured approach for complex implementations that ensures thorough planning before coding.+ Use when: new feature implementation, complex implementations, architectural changes, system redesign, integration work, unclear requirements.+ Skip when: simple bug fixes, documentation updates, configuration changes, well-defined small tasks, routine maintenance.----# SPARC Methodology - Comprehensive Development Framework+# Sparc Methodology Skill-## Overview+## Purpose+SPARC development workflow: Specification, Pseudocode, Architecture, Refinement, Completion. A structured approach for complex implementations that ensures thorough planning before coding.-SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) is a systematic development methodology integrated with Claude Flow's multi-agent orchestration capabilities. It provides 17 specialized modes for comprehensive software development, from initial research through deployment and monitoring.+## When to Trigger+- new feature implementation+- complex implementations+- architectural changes+- system redesign+- integration work+- unclear requirements-## Table of Contents+## When to Skip+- simple bug fixes+- documentation updates+- configuration changes+- well-defined small tasks+- routine maintenance-1. [Core Philosophy](#core-philosophy)-2. [Development Phases](#development-phases)-3. [Available Modes](#available-modes)-4. [Activation Methods](#activation-methods)-5. [Orchestration Patterns](#orchestration-patterns)-6. [TDD Workflows](#tdd-workflows)-7. [Best Practices](#best-practices)-8. [Integration Examples](#integration-examples)-9. [Common Workflows](#common-workflows)+## Commands------## Core Philosophy--SPARC methodology emphasizes:--- **Systematic Approach**: Structured phases from specification to completion-- **Test-Driven Development**: Tests written before implementation-- **Parallel Execution**: Concurrent agent coordination for 2.8-4.4x speed improvements-- **Memory Integration**: Persistent knowledge sharing across agents and sessions-- **Quality First**: Comprehensive reviews, testing, and validation-- **Modular Design**: Clean separation of concerns with clear interfaces--### Key Principles--1. **Specification Before Code**: Define requirements and constraints clearly-2. **Design Before Implementation**: Plan architecture and components-3. **Tests Before Features**: Write failing tests, then make them pass-4. **Review Everything**: Code quality, security, and performance checks-5. **Document Continuously**: Maintain current documentation throughout-------## Development Phases--### Phase 1: Specification-**Goal**: Define requirements, constraints, and success criteria--- Requirements analysis-- User story mapping-- Constraint identification-- Success metrics definition-- Pseudocode planning--**Key Modes**: `researcher`, `analyzer`, `memory-manager`--### Phase 2: Architecture-**Goal**: Design system structure and component interfaces--- System architecture design-- Component interface definition-- Database schema planning-- API contract specification-- Infrastructure planning--**Key Modes**: `architect`, `designer`, `orchestrator`--### Phase 3: Refinement (TDD Implementation)-**Goal**: Implement features with test-first approach--- Write failing tests-- Implement minimum viable code-- Make tests pass-- Refactor for quality-- Iterate until complete--**Key Modes**: `tdd`, `coder`, `tester`--### Phase 4: Review-**Goal**: Ensure code quality, security, and performance--- Code quality assessment-- Security vulnerability scanning-- Performance profiling-- Best practices validation-- Documentation review--**Key Modes**: `reviewer`, `optimizer`, `debugger`--### Phase 5: Completion-**Goal**: Integration, deployment, and monitoring--- System integration-- Deployment automation-- Monitoring setup-- Documentation finalization-- Knowledge capture--**Key Modes**: `workflow-manager`, `documenter`, `memory-manager`-------## Available Modes--### Core Orchestration Modes--#### `orchestrator`-Multi-agent task orchestration with TodoWrite/Task/Memory coordination.--**Capabilities**:-- Task decomposition into manageable units-- Agent coordination and resource allocation-- Progress tracking and result synthesis-- Adaptive strategy selection-- Cross-agent communication--**Usage**:-```javascript-mcp__claude-flow__sparc_mode {- mode: "orchestrator",- task_description: "coordinate feature development",- options: { parallel: true, monitor: true }-}-```--#### `swarm-coordinator`-Specialized swarm management for complex multi-agent workflows.--**Capabilities**:-- Topology optimization (mesh, hierarchical, ring, star)-- Agent lifecycle management-- Dynamic scaling based on workload-- Fault tolerance and recovery-- Performance monitoring--#### `workflow-manager`-Process automation and workflow orchestration.--**Capabilities**:-- Workflow definition and execution-- Event-driven triggers-- Sequential and parallel pipelines-- State management-- Error handling and retry logic--#### `batch-executor`-Parallel task execution for high-throughput operations.--**Capabilities**:-- Concurrent file operations-- Batch processing optimization-- Resource pooling-- Load balancing-- Progress aggregation-------### Development Modes--#### `coder`-Autonomous code generation with batch file operations.--**Capabilities**:-- Feature implementation-- Code refactoring-- Bug fixes and patches-- API development-- Algorithm implementation--**Quality Standards**:-- ES2022+ standards-- TypeScript type safety-- Comprehensive error handling-- Performance optimization-- Security best practices--**Usage**:-```javascript-mcp__claude-flow__sparc_mode {- mode: "coder",- task_description: "implement user authentication with JWT",- options: {- test_driven: true,- parallel_edits: true,- typescript: true- }-}-```--#### `architect`-System design with Memory-based coordination.--**Capabilities**:-- Microservices architecture-- Event-driven design-- Domain-driven design (DDD)-- Hexagonal architecture-- CQRS and Event Sourcing--**Memory Integration**:-- Store architectural decisions-- Share component specifications-- Maintain design consistency-- Track architectural evolution--**Design Patterns**:-- Layered architecture-- Microservices patterns-- Event-driven patterns-- Domain modeling-- Infrastructure as Code--**Usage**:-```javascript-mcp__claude-flow__sparc_mode {- mode: "architect",- task_description: "design scalable e-commerce platform",- options: {- detailed: true,- memory_enabled: true,- patterns: ["microservices", "event-driven"]- }-}-```--#### `tdd`-Test-driven development with comprehensive testing.--**Capabilities**:-- Test-first development-- Red-green-refactor cycle-- Test suite design-- Coverage optimization (target: 90%+)-- Continuous testing--**TDD Workflow**:-1. Write failing test (RED)-2. Implement minimum code-3. Make test pass (GREEN)-4. Refactor for quality (REFACTOR)-5. Repeat cycle--**Testing Strategies**:-- Unit testing (Jest, Mocha, Vitest)-- Integration testing-- End-to-end testing (Playwright, Cypress)-- Performance testing-- Security testing--**Usage**:-```javascript-mcp__claude-flow__sparc_mode {- mode: "tdd",- task_description: "shopping cart feature with payment integration",- options: {- coverage_target: 90,- test_framework: "jest",- e2e_framework: "playwright"- }-}-```--#### `reviewer`-Code review using batch file analysis.--**Capabilities**:-- Code quality assessment-- Security vulnerability detection-- Performance analysis-- Best practices validation-- Documentation review--**Review Criteria**:-- Code correctness and logic-- Design pattern adherence-- Comprehensive error handling-- Test coverage adequacy-- Maintainability and readability-- Security vulnerabilities-- Performance bottlenecks--**Batch Analysis**:-- Parallel file review-- Pattern detection-- Dependency checking-- Consistency validation-- Automated reporting--**Usage**:-```javascript-mcp__claude-flow__sparc_mode {- mode: "reviewer",- task_description: "review authentication module PR #123",- options: {- security_check: true,- performance_check: true,- test_coverage_check: true- }-}-```-------### Analysis and Research Modes--#### `researcher`-Deep research with parallel WebSearch/WebFetch and Memory coordination.--**Capabilities**:-- Comprehensive information gathering-- Source credibility evaluation-- Trend analysis and forecasting-- Competitive research-- Technology assessment--**Research Methods**:-- Parallel web searches-- Academic paper analysis-- Industry report synthesis-- Expert opinion gathering-- Statistical data compilation--**Memory Integration**:-- Store research findings with citations-- Build knowledge graphs-- Track information sources-- Cross-reference insights-- Maintain research history--**Usage**:-```javascript-mcp__claude-flow__sparc_mode {- mode: "researcher",- task_description: "research microservices best practices 2024",- options: {- depth: "comprehensive",- sources: ["academic", "industry", "news"],- citations: true- }-}-```--#### `analyzer`-Code and data analysis with pattern recognition.--**Capabilities**:-- Static code analysis-- Dependency analysis-- Performance profiling-- Security scanning-- Data pattern recognition--#### `optimizer`-Performance optimization and bottleneck resolution.--**Capabilities**:-- Algorithm optimization-- Database query tuning-- Caching strategy design-- Bundle size reduction-- Memory leak detection-------### Creative and Support Modes--#### `designer`-UI/UX design with accessibility focus.--**Capabilities**:-- Interface design-- User experience optimization-- Accessibility compliance (WCAG 2.1)-- Design system creation-- Responsive layout design--#### `innovator`-Creative problem-solving and novel solutions.--**Capabilities**:-- Brainstorming and ideation-- Alternative approach generation-- Technology evaluation-- Proof of concept development-- Innovation feasibility analysis--#### `documenter`-Comprehensive documentation generation.--**Capabilities**:-- API documentation (OpenAPI/Swagger)-- Architecture diagrams-- User guides and tutorials-- Code comments and JSDoc-- README and changelog maintenance--#### `debugger`-Systematic debugging and issue resolution.--**Capabilities**:-- Bug reproduction-- Root cause analysis-- Fix implementation-- Regression prevention-- Debug logging optimization--#### `tester`-Comprehensive testing beyond TDD.--**Capabilities**:-- Test suite expansion-- Edge case identification-- Performance testing-- Load testing-- Chaos engineering--#### `memory-manager`-Knowledge management and context preservation.--**Capabilities**:-- Cross-session memory persistence-- Knowledge graph construction-- Context restoration-- Learning pattern extraction-- Decision tracking-------## Activation Methods--### Method 1: MCP Tools (Preferred in Claude Code)--**Best for**: Integrated Claude Code workflows with full orchestration capabilities--```javascript-// Basic mode execution-mcp__claude-flow__sparc_mode {- mode: "<mode-name>",- task_description: "<task description>",- options: {- // mode-specific options- }-}--// Initialize swarm for complex tasks-mcp__claude-flow__swarm_init {- topology: "hierarchical", // or "mesh", "ring", "star"- strategy: "auto", // or "balanced", "specialized", "adaptive"- maxAgents: 8-}--// Spawn specialized agents-mcp__claude-flow__agent_spawn {- type: "<agent-type>",- capabilities: ["<capability1>", "<capability2>"]-}--// Monitor execution-mcp__claude-flow__swarm_monitor {- swarmId: "current",- interval: 5000-}-```--### Method 2: NPX CLI (Fallback)--**Best for**: Terminal usage or when MCP tools unavailable+### Specification Phase+Define requirements, acceptance criteria, and constraints```bash-# Execute specific mode-npx claude-flow sparc run <mode> "task description"--# Use alpha features-npx claude-flow@alpha sparc run <mode> "task description"--# List all available modes-npx claude-flow sparc modes--# Get help for specific mode-npx claude-flow sparc help <mode>--# Run with options-npx claude-flow sparc run <mode> "task" --parallel --monitor--# Execute TDD workflow-npx claude-flow sparc tdd "feature description"--# Batch execution-npx claude-flow sparc batch <mode1,mode2,mode3> "task"--# Pipeline execution-npx claude-flow sparc pipeline "task description"+npx @claude-flow/cli hooks route --task "specification: [requirements]"```-### Method 3: Local Installation--**Best for**: Projects with local claude-flow installation-+**Example:**```bash-# If claude-flow is installed locally-.$claude-flow sparc run <mode> "task description"-```-------## Orchestration Patterns--### Pattern 1: Hierarchical Coordination--**Best for**: Complex projects with clear delegation hierarchy--```javascript-// Initialize hierarchical swarm-mcp__claude-flow__swarm_init {- topology: "hierarchical",- maxAgents: 12-}--// Spawn coordinator-mcp__claude-flow__agent_spawn {- type: "coordinator",- capabilities: ["planning", "delegation", "monitoring"]-}--// Spawn specialized workers-mcp__claude-flow__agent_spawn { type: "architect" }-mcp__claude-flow__agent_spawn { type: "coder" }-mcp__claude-flow__agent_spawn { type: "tester" }-mcp__claude-flow__agent_spawn { type: "reviewer" }-```--### Pattern 2: Mesh Coordination--**Best for**: Collaborative tasks requiring peer-to-peer communication--```javascript-mcp__claude-flow__swarm_init {- topology: "mesh",- strategy: "balanced",- maxAgents: 6-}-```--### Pattern 3: Sequential Pipeline--**Best for**: Ordered workflow execution (spec β design β code β test β review)--```javascript-mcp__claude-flow__workflow_create {- name: "development-pipeline",- steps: [- { mode: "researcher", task: "gather requirements" },- { mode: "architect", task: "design system" },- { mode: "coder", task: "implement features" },- { mode: "tdd", task: "create tests" },- { mode: "reviewer", task: "review code" }- ],- triggers: ["on_step_complete"]-}-```--### Pattern 4: Parallel Execution--**Best for**: Independent tasks that can run concurrently--```javascript-mcp__claude-flow__task_orchestrate {- task: "build full-stack application",- strategy: "parallel",- dependencies: {- backend: [],- frontend: [],- database: [],- tests: ["backend", "frontend"]- }-}-```--### Pattern 5: Adaptive Strategy--**Best for**: Dynamic workloads with changing requirements--```javascript-mcp__claude-flow__swarm_init {- topology: "hierarchical",- strategy: "adaptive", // Auto-adjusts based on workload- maxAgents: 20-}+npx @claude-flow/cli hooks route --task "specification: user authentication with OAuth2, MFA, and session management"```------## TDD Workflows--### Complete TDD Workflow--```javascript-// Step 1: Initialize TDD swarm-mcp__claude-flow__swarm_init {- topology: "hierarchical",- maxAgents: 8-}--// Step 2: Research and planning-mcp__claude-flow__sparc_mode {- mode: "researcher",- task_description: "research testing best practices for feature X"-}--// Step 3: Architecture design-mcp__claude-flow__sparc_mode {- mode: "architect",- task_description: "design testable architecture for feature X"-}--// Step 4: TDD implementation-mcp__claude-flow__sparc_mode {- mode: "tdd",- task_description: "implement feature X with 90% coverage",- options: {- coverage_target: 90,- test_framework: "jest",- parallel_tests: true- }-}--// Step 5: Code review-mcp__claude-flow__sparc_mode {- mode: "reviewer",- task_description: "review feature X implementation",- options: {- test_coverage_check: true,- security_check: true- }-}--// Step 6: Optimization-mcp__claude-flow__sparc_mode {- mode: "optimizer",- task_description: "optimize feature X performance"-}-```--### Red-Green-Refactor Cycle--```javascript-// RED: Write failing test-mcp__claude-flow__sparc_mode {- mode: "tester",- task_description: "create failing test for shopping cart add item",- options: { expect_failure: true }-}--// GREEN: Minimal implementation-mcp__claude-flow__sparc_mode {- mode: "coder",- task_description: "implement minimal code to pass test",- options: { minimal: true }-}--// REFACTOR: Improve code quality-mcp__claude-flow__sparc_mode {- mode: "coder",- task_description: "refactor shopping cart implementation",- options: { maintain_tests: true }-}-```-------## Best Practices--### 1. Memory Integration--**Always use Memory for cross-agent coordination**:--```javascript-// Store architectural decisions-mcp__claude-flow__memory_usage {- action: "store",- namespace: "architecture",- key: "api-design-v1",- value: JSON.stringify(apiDesign),- ttl: 86400000 // 24 hours-}--// Retrieve in subsequent agents-mcp__claude-flow__memory_usage {- action: "retrieve",- namespace: "architecture",- key: "api-design-v1"-}-```--### 2. Parallel Operations--**Batch all related operations in single message**:--```javascript-// β CORRECT: All operations together-[Single Message]:- mcp__claude-flow__agent_spawn { type: "researcher" }- mcp__claude-flow__agent_spawn { type: "coder" }- mcp__claude-flow__agent_spawn { type: "tester" }- TodoWrite { todos: [8-10 todos] }--// β WRONG: Multiple messages-Message 1: mcp__claude-flow__agent_spawn { type: "researcher" }-Message 2: mcp__claude-flow__agent_spawn { type: "coder" }-Message 3: TodoWrite { todos: [...] }-```--### 3. Hook Integration--**Every SPARC mode should use hooks**:+### Pseudocode Phase+Write high-level pseudocode for the implementation```bash-# Before work-npx claude-flow@alpha hooks pre-task --description "implement auth"--# During work-npx claude-flow@alpha hooks post-edit --file "auth.js"--# After work-npx claude-flow@alpha hooks post-task --task-id "task-123"-```--### 4. Test Coverage--**Maintain minimum 90% coverage**:--- Unit tests for all functions-- Integration tests for APIs-- E2E tests for critical flows-- Edge case coverage-- Error path testing--### 5. Documentation--**Document as you build**:--- API documentation (OpenAPI)-- Architecture decision records (ADR)-- Code comments for complex logic-- README with setup instructions-- Changelog for version tracking--### 6. File Organization--**Never save to root folder**:--```-project/-βββ src/ # Source code-βββ tests/ # Test files-βββ docs/ # Documentation-βββ config/ # Configuration-βββ scripts/ # Utility scripts-βββ examples/ # Example code+npx @claude-flow/cli hooks route --task "pseudocode: [feature]"```------## Integration Examples--### Example 1: Full-Stack Development--```javascript-[Single Message - Parallel Agent Execution]:--// Initialize swarm-mcp__claude-flow__swarm_init {- topology: "hierarchical",- maxAgents: 10-}--// Architecture phase-mcp__claude-flow__sparc_mode {- mode: "architect",- task_description: "design REST API with authentication",- options: { memory_enabled: true }-}--// Research phase-mcp__claude-flow__sparc_mode {- mode: "researcher",- task_description: "research authentication best practices"-}--// Implementation phase-mcp__claude-flow__sparc_mode {- mode: "coder",- task_description: "implement Express API with JWT auth",- options: { test_driven: true }-}--// Testing phase-mcp__claude-flow__sparc_mode {- mode: "tdd",- task_description: "comprehensive API tests",- options: { coverage_target: 90 }-}--// Review phase-mcp__claude-flow__sparc_mode {- mode: "reviewer",- task_description: "security and performance review",- options: { security_check: true }-}--// Batch todos-TodoWrite {- todos: [- {content: "Design API schema", status: "completed"},- {content: "Research JWT implementation", status: "completed"},- {content: "Implement authentication", status: "in_progress"},- {content: "Write API tests", status: "pending"},- {content: "Security review", status: "pending"},- {content: "Performance optimization", status: "pending"},- {content: "API documentation", status: "pending"},- {content: "Deployment setup", status: "pending"}- ]-}-```--### Example 2: Research-Driven Innovation--```javascript-// Research phase-mcp__claude-flow__sparc_mode {- mode: "researcher",- task_description: "research AI-powered search implementations",- options: {- depth: "comprehensive",- sources: ["academic", "industry"]- }-}--// Innovation phase-mcp__claude-flow__sparc_mode {- mode: "innovator",- task_description: "propose novel search algorithm",- options: { memory_enabled: true }-}--// Architecture phase-mcp__claude-flow__sparc_mode {- mode: "architect",- task_description: "design scalable search system"-}--// Implementation phase-mcp__claude-flow__sparc_mode {- mode: "coder",- task_description: "implement search algorithm",- options: { test_driven: true }-}--// Documentation phase-mcp__claude-flow__sparc_mode {- mode: "documenter",- task_description: "document search system architecture and API"-}-```--### Example 3: Legacy Code Refactoring--```javascript-// Analysis phase-mcp__claude-flow__sparc_mode {- mode: "analyzer",- task_description: "analyze legacy codebase dependencies"-}--// Planning phase-mcp__claude-flow__sparc_mode {- mode: "orchestrator",- task_description: "plan incremental refactoring strategy"-}--// Testing phase (create safety net)-mcp__claude-flow__sparc_mode {- mode: "tester",- task_description: "create comprehensive test suite for legacy code",- options: { coverage_target: 80 }-}--// Refactoring phase-mcp__claude-flow__sparc_mode {- mode: "coder",- task_description: "refactor module X with modern patterns",- options: { maintain_tests: true }-}--// Review phase-mcp__claude-flow__sparc_mode {- mode: "reviewer",- task_description: "validate refactoring maintains functionality"-}-```-------## Common Workflows--### Workflow 1: Feature Development-+**Example:**```bash-# Step 1: Research and planning-npx claude-flow sparc run researcher "authentication patterns"--# Step 2: Architecture design-npx claude-flow sparc run architect "design auth system"--# Step 3: TDD implementation-npx claude-flow sparc tdd "user authentication feature"--# Step 4: Code review-npx claude-flow sparc run reviewer "review auth implementation"--# Step 5: Documentation-npx claude-flow sparc run documenter "document auth API"+npx @claude-flow/cli hooks route --task "pseudocode: OAuth2 login flow with token refresh"```-### Workflow 2: Bug Investigation+### Architecture Phase+Design system structure, interfaces, and dependencies```bash-# Step 1: Analyze issue-npx claude-flow sparc run analyzer "investigate bug #456"--# Step 2: Debug systematically-npx claude-flow sparc run debugger "fix memory leak in service X"--# Step 3: Create tests-npx claude-flow sparc run tester "regression tests for bug #456"--# Step 4: Review fix-npx claude-flow sparc run reviewer "validate bug fix"+npx @claude-flow/cli hooks route --task "architecture: [design]"```-### Workflow 3: Performance Optimization-+**Example:**```bash-# Step 1: Profile performance-npx claude-flow sparc run analyzer "profile API response times"--# Step 2: Identify bottlenecks-npx claude-flow sparc run optimizer "optimize database queries"--# Step 3: Implement improvements-npx claude-flow sparc run coder "implement caching layer"--# Step 4: Benchmark results-npx claude-flow sparc run tester "performance benchmarks"+npx @claude-flow/cli hooks route --task "architecture: auth module with service layer, repository, and API endpoints"```-### Workflow 4: Complete Pipeline+### Refinement Phase+Iterate on the design based on feedback```bash-# Execute full development pipeline-npx claude-flow sparc pipeline "e-commerce checkout feature"--# This automatically runs:-# 1. researcher - Gather requirements-# 2. architect - Design system-# 3. coder - Implement features-# 4. tdd - Create comprehensive tests-# 5. reviewer - Code quality review-# 6. optimizer - Performance tuning-# 7. documenter - Documentation-```-------## Advanced Features--### Neural Pattern Training--```javascript-// Train patterns from successful workflows-mcp__claude-flow__neural_train {- pattern_type: "coordination",- training_data: "successful_tdd_workflow.json",- epochs: 50-}+npx @claude-flow/cli hooks route --task "refinement: [feedback]"```-### Cross-Session Memory--```javascript-// Save session state-mcp__claude-flow__memory_persist {- sessionId: "feature-auth-v1"-}--// Restore in new session-mcp__claude-flow__context_restore {- snapshotId: "feature-auth-v1"-}+**Example:**+```bash+npx @claude-flow/cli hooks route --task "refinement: add rate limiting and brute force protection"```-### GitHub Integration+### Completion Phase+Finalize implementation with tests and documentation-```javascript-// Analyze repository-mcp__claude-flow__github_repo_analyze {- repo: "owner$repo",- analysis_type: "code_quality"-}--// Manage pull requests-mcp__claude-flow__github_pr_manage {- repo: "owner$repo",- pr_number: 123,- action: "review"-}+```bash+npx @claude-flow/cli hooks route --task "completion: [final checks]"```-### Performance Monitoring--```javascript-// Real-time swarm monitoring-mcp__claude-flow__swarm_monitor {- swarmId: "current",- interval: 5000-}--// Bottleneck analysis-mcp__claude-flow__bottleneck_analyze {- component: "api-layer",- metrics: ["latency", "throughput", "errors"]-}--// Token usage tracking-mcp__claude-flow__token_usage {- operation: "feature-development",- timeframe: "24h"-}+**Example:**+```bash+npx @claude-flow/cli hooks route --task "completion: verify all tests pass, update API docs, security review"```------## Performance Benefits--**Proven Results**:-- **84.8%** SWE-Bench solve rate-- **32.3%** token reduction through optimizations-- **2.8-4.4x** speed improvement with parallel execution-- **27+** neural models for pattern learning-- **90%+** test coverage standard-------## Support and Resources--- **Documentation**: https:/$github.com$ruvnet$claude-flow-- **Issues**: https:/$github.com$ruvnet$claude-flow$issues-- **NPM Package**: https:/$www.npmjs.com$package$claude-flow-- **Community**: Discord server (link in repository)-------## Quick Reference--### Most Common Commands+### SPARC Coordinator+Spawn SPARC coordinator agent```bash-# List modes-npx claude-flow sparc modes--# Run specific mode-npx claude-flow sparc run <mode> "task"--# TDD workflow-npx claude-flow sparc tdd "feature"--# Full pipeline-npx claude-flow sparc pipeline "task"--# Batch execution-npx claude-flow sparc batch <modes> "task"+npx @claude-flow/cli agent spawn --type sparc-coord --name sparc-lead```-### Most Common MCP Calls-```javascript-// Initialize swarm-mcp__claude-flow__swarm_init { topology: "hierarchical" }+## Scripts-// Execute mode-mcp__claude-flow__sparc_mode { mode: "coder", task_description: "..." }+| Script | Path | Description |+|--------|------|-------------|+| `sparc-init` | `.agents/scripts/sparc-init.sh` | Initialize SPARC workflow for a new feature |+| `sparc-review` | `.agents/scripts/sparc-review.sh` | Run SPARC phase review checklist |-// Monitor progress-mcp__claude-flow__swarm_monitor { interval: 5000 }-// Store in memory-mcp__claude-flow__memory_usage { action: "store", key: "...", value: "..." }-```+## References----+| Document | Path | Description |+|----------|------|-------------|+| `SPARC Overview` | `docs/sparc.md` | Complete SPARC methodology guide |+| `Phase Templates` | `docs/sparc-templates.md` | Templates for each SPARC phase |-Remember: **SPARC = Systematic, Parallel, Agile, Refined, Complete**+## Best Practices+1. Check memory for existing patterns before starting+2. Use hierarchical topology for coordination+3. Store successful patterns after completion+4. Document any new learningsdiff --git a/.agents/skills/swarm-orchestration/SKILL.md b/.agents/skills/swarm-orchestration/SKILL.mdindex c4b727b968..1e2a9df737 100644--- a/.agents/skills/swarm-orchestration/SKILL.md+++ b/.agents/skills/swarm-orchestration/SKILL.md@@ -1,179 +1,114 @@----name: "Swarm Orchestration"-description: "Orchestrate multi-agent swarms with agentic-flow for parallel task execution, dynamic topology, and intelligent coordination. Use when scaling beyond single agents, implementing complex workflows, or building distributed AI systems."+name: swarm-orchestration+description: >+ Multi-agent swarm coordination for complex tasks. Uses hierarchical topology with specialized agents to break down and execute complex work across multiple files and modules.+ Use when: 3+ files need changes, new feature implementation, cross-module refactoring, API changes with tests, security-related changes, performance optimization across codebase, database schema changes.+ Skip when: single file edits, simple bug fixes (1-2 lines), documentation updates, configuration changes, quick exploration.----# Swarm Orchestration+# Swarm Orchestration Skill-## What This Skill Does+## Purpose+Multi-agent swarm coordination for complex tasks. Uses hierarchical topology with specialized agents to break down and execute complex work across multiple files and modules.-Orchestrates multi-agent swarms using agentic-flow's advanced coordination system. Supports mesh, hierarchical, and adaptive topologies with automatic task distribution, load balancing, and fault tolerance.+## When to Trigger+- 3+ files need changes+- new feature implementation+- cross-module refactoring+- API changes with tests+- security-related changes+- performance optimization across codebase+- database schema changes-## Prerequisites+## When to Skip+- single file edits+- simple bug fixes (1-2 lines)+- documentation updates+- configuration changes+- quick exploration-- agentic-flow v1.5.11+-- Node.js 18+-- Understanding of distributed systems (helpful)+## Commands-## Quick Start+### Initialize Swarm+Start a new swarm with hierarchical topology (anti-drift)```bash-# Initialize swarm-npx agentic-flow hooks swarm-init --topology mesh --max-agents 5--# Spawn agents-npx agentic-flow hooks agent-spawn --type coder-npx agentic-flow hooks agent-spawn --type tester-npx agentic-flow hooks agent-spawn --type reviewer--# Orchestrate task-npx agentic-flow hooks task-orchestrate \- --task "Build REST API with tests" \- --mode parallel+npx @claude-flow/cli swarm init --topology hierarchical --max-agents 8 --strategy specialized```-## Topology Patterns--### 1. Mesh (Peer-to-Peer)-```typescript-// Equal peers, distributed decision-making-await swarm.init({- topology: 'mesh',- agents: ['coder', 'tester', 'reviewer'],- communication: 'broadcast'-});+**Example:**+```bash+npx @claude-flow/cli swarm init --topology hierarchical --max-agents 6 --strategy specialized```-### 2. Hierarchical (Queen-Worker)-```typescript-// Centralized coordination, specialized workers-await swarm.init({- topology: 'hierarchical',- queen: 'architect',- workers: ['backend-dev', 'frontend-dev', 'db-designer']-});-```+### Route Task+Route a task to the appropriate agents based on task type-### 3. Adaptive (Dynamic)-```typescript-// Automatically switches topology based on task-await swarm.init({- topology: 'adaptive',- optimization: 'task-complexity'-});+```bash+npx @claude-flow/cli hooks route --task "[task description]"```-## Task Orchestration--### Parallel Execution-```typescript-// Execute tasks concurrently-const results = await swarm.execute({- tasks: [- { agent: 'coder', task: 'Implement API endpoints' },- { agent: 'frontend', task: 'Build UI components' },- { agent: 'tester', task: 'Write test suite' }- ],- mode: 'parallel',- timeout: 300000 // 5 minutes-});+**Example:**+```bash+npx @claude-flow/cli hooks route --task "implement OAuth2 authentication flow"```-### Pipeline Execution-```typescript-// Sequential pipeline with dependencies-await swarm.pipeline([- { stage: 'design', agent: 'architect' },- { stage: 'implement', agent: 'coder', after: 'design' },- { stage: 'test', agent: 'tester', after: 'implement' },- { stage: 'review', agent: 'reviewer', after: 'test' }-]);-```+### Spawn Agent+Spawn a specific agent type-### Adaptive Execution-```typescript-// Let swarm decide execution strategy-await swarm.autoOrchestrate({- goal: 'Build production-ready API',- constraints: {- maxTime: 3600,- maxAgents: 8,- quality: 'high'- }-});+```bash+npx @claude-flow/cli agent spawn --type [type] --name [name]```-## Memory Coordination--```typescript-// Share state across swarm-await swarm.memory.store('api-schema', {- endpoints: [...],- models: [...]-});--// Agents read shared memory-const schema = await swarm.memory.retrieve('api-schema');+**Example:**+```bash+npx @claude-flow/cli agent spawn --type coder --name impl-auth```-## Advanced Features+### Monitor Status+Check the current swarm status-### Load Balancing-```typescript-// Automatic work distribution-await swarm.enableLoadBalancing({- strategy: 'dynamic',- metrics: ['cpu', 'memory', 'task-queue']-});+```bash+npx @claude-flow/cli swarm status --verbose```-### Fault Tolerance-```typescript-// Handle agent failures-await swarm.setResiliency({- retry: { maxAttempts: 3, backoff: 'exponential' },- fallback: 'reassign-task'-});-```+### Orchestrate Task+Orchestrate a task across multiple agents-### Performance Monitoring-```typescript-// Track swarm metrics-const metrics = await swarm.getMetrics();-// { throughput, latency, success_rate, agent_utilization }+```bash+npx @claude-flow/cli task orchestrate --task "[task]" --strategy adaptive```-## Integration with Hooks-+**Example:**```bash-# Pre-task coordination-npx agentic-flow hooks pre-task --description "Build API"+npx @claude-flow/cli task orchestrate --task "refactor auth module" --strategy parallel --max-agents 4+```-# Post-task synchronization-npx agentic-flow hooks post-task --task-id "task-123"+### List Agents+List all active agents-# Session restore-npx agentic-flow hooks session-restore --session-id "swarm-001"+```bash+npx @claude-flow/cli agent list --filter active```-## Best Practices-1. **Start small**: Begin with 2-3 agents, scale up-2. **Use memory**: Share context through swarm memory-3. **Monitor metrics**: Track performance and bottlenecks-4. **Enable hooks**: Automatic coordination and sync-5. **Set timeouts**: Prevent hung tasks+## Scripts-## Troubleshooting+| Script | Path | Description |+|--------|------|-------------|+| `swarm-start` | `.agents/scripts/swarm-start.sh` | Initialize swarm with default settings |+| `swarm-monitor` | `.agents/scripts/swarm-monitor.sh` | Real-time swarm monitoring dashboard |-### Issue: Agents not coordinating-**Solution**: Verify memory access and enable hooks-### Issue: Poor performance-**Solution**: Check topology (use adaptive) and enable load balancing+## References-## Learn More+| Document | Path | Description |+|----------|------|-------------|+| `Agent Types` | `docs/agents.md` | Complete list of agent types and capabilities |+| `Topology Guide` | `docs/topology.md` | Swarm topology configuration guide |-- Swarm Guide: docs$swarm$orchestration.md-- Topology Patterns: docs$swarm$topologies.md-- Hooks Integration: docs$hooks$coordination.md+## Best Practices+1. Check memory for existing patterns before starting+2. Use hierarchical topology for coordination+3. Store successful patterns after completion+4. Document any new learningsdiff --git a/AGENTS.md b/AGENTS.mdindex 0f4eace24c..6e4169f71f 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -44,6 +44,55 @@ npx claude-flow memory store --key "api-created" --value "src/api.ts" --namespac| **CODEX** | EXECUTES | Write files, run tests, create code, shell commands || **claude-flow** | ORCHESTRATES | Track agents, store memory, coordinate tasks |+---++## β DON'T STOP AFTER CALLING CLAUDE-FLOW++```+βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ+β β WRONG: Call claude-flow β STOP β Wait for results β+β β RIGHT: Call claude-flow β IMMEDIATELY continue β YOU do the work β+βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ+```++### β WRONG Pattern (Stopping)+```bash+npx claude-flow swarm init --topology hierarchical+npx claude-flow agent spawn --type coder --name worker-1+npx claude-flow swarm start --objective "Build hello world"+# WRONG: Codex stops here and waits for something to happen+# Nothing will happen! Claude-flow doesn't execute code!+```++### β CORRECT Pattern (Continue Immediately)+```bash+# Step 1: Coordination (optional)+npx claude-flow swarm init --topology hierarchical+npx claude-flow agent spawn --type coder --name worker-1++# Step 2: IMMEDIATELY DO THE WORK YOURSELF - DON'T WAIT!+echo 'console.log("Hello World!");' > hello.js+node hello.js++# Step 3: Report what you did+npx claude-flow memory store --key "result" --value "Hello World printed" --namespace results+```++### The Rule+**After ANY claude-flow command, IMMEDIATELY continue with your own work.**++Claude-flow commands return instantly. They create coordination RECORDS only.+You must ALWAYS follow up with YOUR OWN execution.++| After This... | IMMEDIATELY Do This... |+|---------------|----------------------|+| `swarm init` | Start writing code |+| `agent spawn` | Continue implementation |+| `task create` | Execute the task yourself |+| `swarm start` | Begin actual work |++---+### When to Use Claude-Flow Commands| Use Case | Claude-Flow Command | Then Codex Does |diff --git a/agents/architect.yaml b/agents/architect.yamlindex 93c73be6ae..6d45e30e4f 100644--- a/agents/architect.yaml+++ b/agents/architect.yaml@@ -8,4 +8,4 @@ capabilities:optimizations:- context-caching- memory-persistence-createdAt: "2026-02-07T17:35:46.565Z"+createdAt: "2026-02-07T17:58:52.409Z"diff --git a/agents/coder.yaml b/agents/coder.yamlindex 0dc8242c75..b05e8bb8e1 100644--- a/agents/coder.yaml+++ b/agents/coder.yaml@@ -8,4 +8,4 @@ capabilities:optimizations:- flash-attention- token-reduction-createdAt: "2026-02-07T17:35:46.565Z"+createdAt: "2026-02-07T17:58:52.408Z"diff --git a/agents/reviewer.yaml b/agents/reviewer.yamlindex e95242ce06..6947e6d42f 100644--- a/agents/reviewer.yaml+++ b/agents/reviewer.yaml@@ -7,4 +7,4 @@ capabilities:- best-practicesoptimizations:- incremental-analysis-createdAt: "2026-02-07T17:35:46.566Z"+createdAt: "2026-02-07T17:58:52.409Z"diff --git a/agents/security-architect.yaml b/agents/security-architect.yamlindex fcdfa0cf43..8bae91afd8 100644--- a/agents/security-architect.yaml+++ b/agents/security-architect.yaml@@ -7,4 +7,4 @@ capabilities:- security-reviewoptimizations:- pattern-matching-createdAt: "2026-02-07T17:35:46.565Z"+createdAt: "2026-02-07T17:58:52.409Z"diff --git a/agents/tester.yaml b/agents/tester.yamlindex 15da829ad0..04cf58db82 100644--- a/agents/tester.yaml+++ b/agents/tester.yaml@@ -7,4 +7,4 @@ capabilities:- coverageoptimizations:- parallel-execution-createdAt: "2026-02-07T17:35:46.565Z"+createdAt: "2026-02-07T17:58:52.409Z"