π 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
rUve39f7539c5b4
diff --git a/CLAUDE.md b/CLAUDE.mdindex 2c6d91bd7e..8ddc5b1801 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -97,6 +97,152 @@ mcp__ruv-swarm__swarm_init({})```+## Dual-Mode Collaboration (Claude Code + Codex)++This repository uses **dual-mode orchestration** to run Claude Code (π΅) and OpenAI Codex (π’) workers in parallel with shared memory coordination. Both platforms collaborate on development tasks with cross-learning.++### Why Dual-Mode?++| Single Platform | Dual-Mode Collaboration |+|----------------|------------------------|+| One model's perspective | Two AI platforms cross-validating |+| Limited reasoning styles | Complementary strengths |+| No external verification | Built-in code review |+| Sequential workflows | Parallel execution |++### Dual-Mode Swarm Protocol++For complex tasks, spawn both Claude and Codex workers in parallel:++```javascript+// STEP 1: Initialize dual-mode swarm+mcp__ruv-swarm__swarm_init({+ topology: "hierarchical",+ maxAgents: 8,+ strategy: "specialized"+})++// STEP 2: Spawn BOTH platforms in parallel via Task tool+// π΅ Claude Code workers (architecture, security, testing)+Task("Architect", "Design the implementation. Store design in memory namespace 'collaboration'.", "system-architect")+Task("Tester", "Write tests based on architect's design. Read from 'collaboration' namespace.", "tester")+Task("Reviewer", "Review code quality and security. Store findings in 'collaboration'.", "reviewer")++// π’ Codex workers (implementation, optimization)+// Spawn via CLI for Codex platform+Bash("npx claude-flow-codex dual run --worker 'codex:coder:Implement the solution based on architect design' --namespace collaboration")+Bash("npx claude-flow-codex dual run --worker 'codex:optimizer:Optimize performance based on implementation' --namespace collaboration")++// STEP 3: Coordinate via shared memory+Bash("npx claude-flow@v3alpha memory store --namespace collaboration --key 'task-context' --value '[task description]'")+```++### Collaboration Templates (Pre-Built Pipelines)++| Template | Workers | Pipeline |+|----------|---------|----------|+| `feature` | π΅ Architect β π’ Coder β π΅ Tester β π’ Reviewer | Full feature development |+| `security` | π΅ Analyst β π’ Scanner β π΅ Reporter | Security audit workflow |+| `refactor` | π΅ Architect β π’ Refactorer β π΅ Tester | Code modernization |+| `bugfix` | π΅ Researcher β π’ Coder β π΅ Tester | Bug investigation & fix |++### Dual-Mode CLI Commands++```bash+# Run a collaboration template+npx claude-flow-codex dual run feature --task "Add user authentication with OAuth"+npx claude-flow-codex dual run security --target "./src"+npx claude-flow-codex dual run refactor --target "./src/legacy"++# Custom multi-platform swarm+npx claude-flow-codex dual run \+ --worker "claude:architect:Design the API structure" \+ --worker "codex:coder:Implement REST endpoints" \+ --worker "claude:tester:Write integration tests" \+ --worker "codex:reviewer:Review code quality" \+ --namespace "api-feature"++# Check collaboration status+npx claude-flow-codex dual status++# List available templates+npx claude-flow-codex dual templates+```++### Shared Memory Coordination++All workers share state via the `collaboration` namespace:++```bash+# Store context for cross-platform sharing+npx claude-flow@v3alpha memory store --namespace collaboration --key "design-decisions" --value "..."++# Search for patterns across all workers+npx claude-flow@v3alpha memory search --namespace collaboration --query "authentication patterns"++# Retrieve specific findings+npx claude-flow@v3alpha memory retrieve --namespace collaboration --key "security-findings"+```++### Cross-Platform Learning++Both platforms learn from each other's outputs:++```bash+# After successful collaboration, train patterns+npx claude-flow@v3alpha hooks post-task --task-id "dual-[id]" --success true --train-neural true++# Store successful collaboration patterns+npx claude-flow@v3alpha memory store --namespace patterns --key "dual-mode-[pattern]" --value "[what worked]"++# Transfer learnings to both platforms+npx claude-flow@v3alpha hooks transfer store --pattern "dual-collab-success"+```++### Worker Dependency Levels++Workers execute in dependency order:++```+Level 0: [π΅ Architect] # No dependencies - runs first+Level 1: [π’ Coder, π΅ Tester] # Depends on Architect+Level 2: [π΅ Reviewer] # Depends on Coder + Tester+Level 3: [π’ Optimizer] # Depends on Reviewer approval+```++### Platform Strengths++| Task Type | Preferred Platform | Reason |+|-----------|-------------------|--------|+| Architecture & Design | π΅ Claude | Strong reasoning, system thinking |+| Implementation | π’ Codex | Fast code generation |+| Security Review | π΅ Claude | Careful analysis, threat modeling |+| Performance Optimization | π’ Codex | Code-level optimizations |+| Testing Strategy | π΅ Claude | Coverage analysis, edge cases |+| Refactoring | π’ Codex | Bulk code transformations |++### Programmatic API++```typescript+import { DualModeOrchestrator, CollaborationTemplates } from '@claude-flow/codex';++const orchestrator = new DualModeOrchestrator({+ namespace: 'my-feature',+ memoryBackend: 'hybrid'+});++// Use pre-built template+const workers = CollaborationTemplates.featureDevelopment('Add OAuth login');++// Run collaboration+const results = await orchestrator.runCollaboration(workers, 'Implement OAuth feature');++// Access shared memory+const designDocs = await orchestrator.getMemory('design-decisions');+```++---+## Swarm Protocols & Routing### Auto-Start Swarm Protocol