π 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
fix: README gap analysis β update stale tags, fix broken links, add missing WASM deps
rUv47a91581e3c2
diff --git a/README.md b/README.mdindex a017356ee6..6e5c31691e 100644--- a/README.md+++ b/README.md@@ -682,10 +682,10 @@ npx ruflo@latest agent list```bash# Update helpers and statusline (preserves your data)-npx ruflo@v3alpha init upgrade+npx ruflo@latest init upgrade# Update AND add any missing skills/agents/commands-npx ruflo@v3alpha init upgrade --add-missing+npx ruflo@latest init upgrade --add-missing```The `--add-missing` flag automatically detects and installs new skills, agents, and commands that were added in newer versions, without overwriting your existing customizations.@@ -841,7 +841,7 @@ Complex projects fail when implementation drifts from the original plan. Ruflo s| Feature | Description ||---------|-------------|-| **Architecture Decision Records** | 10 ADRs defining system behavior, integration patterns, and security requirements |+| **Architecture Decision Records** | 70+ ADRs defining system behavior, integration patterns, and security requirements || **Domain-Driven Design** | 5 bounded contexts with clean interfaces preventing cross-domain pollution || **Automated Spec Generation** | Agents create specs from requirements using SPARC methodology || **Drift Detection** | Continuous monitoring flags when code diverges from spec |@@ -1186,7 +1186,7 @@ Ruflo runs as an MCP (Model Context Protocol) server, allowing you to connect it```bash# Start Ruflo MCP server in any environment-npx ruflo@v3alpha mcp start+npx ruflo@latest mcp start```<details open>@@ -1203,7 +1203,7 @@ npx ruflo@v3alpha mcp start"mcpServers": {"ruflo": {"command": "npx",- "args": ["ruflo@v3alpha", "mcp", "start"],+ "args": ["ruflo@latest", "mcp", "start"],"env": {"ANTHROPIC_API_KEY": "sk-ant-..."}@@ -1223,12 +1223,12 @@ Restart Claude Desktop after saving. Look for the MCP indicator (hammer icon) in```bash# Add via CLI (recommended)-claude mcp add ruflo -- npx ruflo@v3alpha mcp start+claude mcp add ruflo -- npx ruflo@latest mcp start# Or add with environment variablesclaude mcp add ruflo \--env ANTHROPIC_API_KEY=sk-ant-... \- -- npx ruflo@v3alpha mcp start+ -- npx ruflo@latest mcp start# Verify installationclaude mcp list@@ -1257,7 +1257,7 @@ Create `.vscode/mcp.json` in your project:"mcpServers": {"ruflo": {"command": "npx",- "args": ["ruflo@v3alpha", "mcp", "start"],+ "args": ["ruflo@latest", "mcp", "start"],"env": {"ANTHROPIC_API_KEY": "sk-ant-..."}@@ -1284,7 +1284,7 @@ Create `.cursor/mcp.json` in your project (or global config):"mcpServers": {"ruflo": {"command": "npx",- "args": ["ruflo@v3alpha", "mcp", "start"],+ "args": ["ruflo@latest", "mcp", "start"],"env": {"ANTHROPIC_API_KEY": "sk-ant-..."}@@ -1311,7 +1311,7 @@ Create `.cursor/mcp.json` in your project (or global config):"mcpServers": {"ruflo": {"command": "npx",- "args": ["ruflo@v3alpha", "mcp", "start"],+ "args": ["ruflo@latest", "mcp", "start"],"env": {"ANTHROPIC_API_KEY": "sk-ant-..."}@@ -1342,7 +1342,7 @@ For ChatGPT, you need a remote MCP server (not local stdio). Deploy ruflo to a s```bash# Start with HTTP transport-npx ruflo@v3alpha mcp start --transport http --port 3000+npx ruflo@latest mcp start --transport http --port 3000```Then add the server URL in ChatGPT Connectors settings.@@ -1373,7 +1373,7 @@ const mcpConfig = {servers: [{name: 'ruflo',command: 'npx',- args: ['ruflo@v3alpha', 'mcp', 'start']+ args: ['ruflo@latest', 'mcp', 'start']}]};```@@ -1396,7 +1396,7 @@ JetBrains AI Assistant supports MCP for IntelliJ IDEA, PyCharm, WebStorm, and ot{"name": "ruflo","command": "npx",- "args": ["ruflo@v3alpha", "mcp", "start"]+ "args": ["ruflo@latest", "mcp", "start"]}```@@ -1710,7 +1710,7 @@ npx ruflo@latest hooks task-completed --task-id <id> --train-patterns</details><details>-<summary>π§ <strong>MCP Tools & Integration</strong> β 31+ tools across 7 categories</summary>+<summary>π§ <strong>MCP Tools & Integration</strong> β 259 tools across 7 categories</summary>Full MCP server with tools for coordination, monitoring, memory, and GitHub integration.@@ -2044,8 +2044,8 @@ Workers run automatically based on context, or dispatch manually via MCP tools.| **TestGaps** | `testgaps` | Test coverage analysis | Code changes without tests |```bash-npx ruflo@v3alpha worker dispatch --trigger audit --context "./src"-npx ruflo@v3alpha worker status+npx ruflo@latest worker dispatch --trigger audit --context "./src"+npx ruflo@latest worker status```</details>@@ -2583,19 +2583,19 @@ Cross-platform TypeScript-based daemon service with auto-scheduling:**Commands:**```bash# Start daemon (auto-runs on SessionStart hooks)-npx ruflo@v3alpha daemon start+npx ruflo@latest daemon start# Check status with worker history-npx ruflo@v3alpha daemon status+npx ruflo@latest daemon status# Manually trigger a worker-npx ruflo@v3alpha daemon trigger map+npx ruflo@latest daemon trigger map# Enable/disable workers-npx ruflo@v3alpha daemon enable map audit optimize+npx ruflo@latest daemon enable map audit optimize# Stop daemon-npx ruflo@v3alpha daemon stop+npx ruflo@latest daemon stop```**Daemon Status Output:**@@ -2711,25 +2711,25 @@ Complete command-line interface for all Ruflo operations.```bash# Initialize project with wizard-npx ruflo@v3alpha init --wizard+npx ruflo@latest init --wizard# Start daemon with background workers-npx ruflo@v3alpha daemon start+npx ruflo@latest daemon start# Spawn an agent with specific type-npx ruflo@v3alpha agent spawn -t coder --name my-coder+npx ruflo@latest agent spawn -t coder --name my-coder# Initialize swarm with V3 mode-npx ruflo@v3alpha swarm init --v3-mode+npx ruflo@latest swarm init --v3-mode# Search memory (HNSW-indexed, 150x faster)-npx ruflo@v3alpha memory search -q "authentication patterns"+npx ruflo@latest memory search -q "authentication patterns"# Run security scan-npx ruflo@v3alpha security scan --depth full+npx ruflo@latest security scan --depth full# Performance benchmark-npx ruflo@v3alpha performance benchmark --suite all+npx ruflo@latest performance benchmark --suite all```</details>@@ -2737,7 +2737,7 @@ npx ruflo@v3alpha performance benchmark --suite all<details><summary>π©Ί <strong>Doctor Health Checks</strong> β System diagnostics with auto-fix</summary>-Run `npx ruflo@v3alpha doctor` to diagnose and fix common issues.+Run `npx ruflo@latest doctor` to diagnose and fix common issues.**Health Checks Performed:**@@ -2758,22 +2758,22 @@ Run `npx ruflo@v3alpha doctor` to diagnose and fix common issues.```bash# Run full diagnostics-npx ruflo@v3alpha doctor+npx ruflo@latest doctor# Run diagnostics with auto-fix-npx ruflo@v3alpha doctor --fix+npx ruflo@latest doctor --fix# Check specific component-npx ruflo@v3alpha doctor --component memory+npx ruflo@latest doctor --component memory# Verbose output-npx ruflo@v3alpha doctor --verbose+npx ruflo@latest doctor --verbose```**Output Example:**```-π©Ί Ruflo Doctor v3.0.0-alpha+π©Ί Ruflo Doctor v3.5β Node.js 20.11.0 (required: 20+)β npm 10.2.4 (required: 9+)@@ -2817,16 +2817,16 @@ The embeddings package (v3.0.0-alpha.12) provides high-performance vector embedd```bash# Initialize embeddings system-npx ruflo@v3alpha embeddings init+npx ruflo@latest embeddings init# Generate embedding for text-npx ruflo@v3alpha embeddings embed "authentication patterns"+npx ruflo@latest embeddings embed "authentication patterns"# Batch embed multiple texts-npx ruflo@v3alpha embeddings batch --file texts.txt+npx ruflo@latest embeddings batch --file texts.txt# Search with semantic similarity-npx ruflo@v3alpha embeddings search "login flow" --top-k 5+npx ruflo@latest embeddings search "login flow" --top-k 5```**Programmatic:**@@ -2863,59 +2863,59 @@ Real-world scenarios and pre-built workflows for common tasks.| Scenario | What It Solves | How To Do It ||----------|----------------|--------------|-| **Code Review** | Get thorough reviews with security, performance, and style checks | `npx ruflo@v3alpha agent spawn -t reviewer --name pr-review` |-| **Test Generation** | Auto-generate unit, integration, and e2e tests for existing code | `npx ruflo@v3alpha agent spawn -t tester --name test-gen` |-| **Refactoring** | Safely restructure code while maintaining behavior | `npx ruflo@v3alpha hive-mind spawn "Refactor user service to repository pattern"` |-| **Bug Fixing** | Diagnose and fix bugs with full context analysis | `npx ruflo@v3alpha hive-mind spawn "Fix race condition in checkout flow"` |+| **Code Review** | Get thorough reviews with security, performance, and style checks | `npx ruflo@latest agent spawn -t reviewer --name pr-review` |+| **Test Generation** | Auto-generate unit, integration, and e2e tests for existing code | `npx ruflo@latest agent spawn -t tester --name test-gen` |+| **Refactoring** | Safely restructure code while maintaining behavior | `npx ruflo@latest hive-mind spawn "Refactor user service to repository pattern"` |+| **Bug Fixing** | Diagnose and fix bugs with full context analysis | `npx ruflo@latest hive-mind spawn "Fix race condition in checkout flow"` |### π Security & Compliance| Scenario | What It Solves | How To Do It ||----------|----------------|--------------|-| **Security Audit** | Find vulnerabilities before attackers do | `npx ruflo@v3alpha security scan --depth full` |-| **Dependency Scan** | Identify vulnerable packages and suggest upgrades | `npx ruflo@v3alpha security cve --check` |-| **Compliance Check** | Ensure code meets security standards | `npx ruflo@v3alpha security audit` |+| **Security Audit** | Find vulnerabilities before attackers do | `npx ruflo@latest security scan --depth full` |+| **Dependency Scan** | Identify vulnerable packages and suggest upgrades | `npx ruflo@latest security cve --check` |+| **Compliance Check** | Ensure code meets security standards | `npx ruflo@latest security audit` |### π Multi-Agent Swarms| Scenario | What It Solves | How To Do It ||----------|----------------|--------------|-| **Feature Development** | Coordinate multiple agents on complex features | `npx ruflo@v3alpha swarm init --topology hierarchical && npx ruflo@v3alpha task orchestrate "Build user dashboard"` |-| **Large Refactors** | Parallel refactoring across many files without conflicts | `npx ruflo@v3alpha swarm init --topology mesh --max-agents 8` |-| **Codebase Migration** | Migrate frameworks, languages, or patterns systematically | `npx ruflo@v3alpha task orchestrate "Migrate from Express to Fastify" --strategy adaptive` |+| **Feature Development** | Coordinate multiple agents on complex features | `npx ruflo@latest swarm init --topology hierarchical && npx ruflo@latest task orchestrate "Build user dashboard"` |+| **Large Refactors** | Parallel refactoring across many files without conflicts | `npx ruflo@latest swarm init --topology mesh --max-agents 8` |+| **Codebase Migration** | Migrate frameworks, languages, or patterns systematically | `npx ruflo@latest task orchestrate "Migrate from Express to Fastify" --strategy adaptive` |### π Performance & Optimization| Scenario | What It Solves | How To Do It ||----------|----------------|--------------|-| **Performance Profiling** | Find and fix bottlenecks in your application | `npx ruflo@v3alpha performance profile --target src/` |-| **Query Optimization** | Speed up slow database queries | `npx ruflo@v3alpha performance benchmark --suite all` |-| **Memory Analysis** | Reduce memory usage and fix leaks | `npx ruflo@v3alpha performance metrics` |+| **Performance Profiling** | Find and fix bottlenecks in your application | `npx ruflo@latest performance profile --target src/` |+| **Query Optimization** | Speed up slow database queries | `npx ruflo@latest performance benchmark --suite all` |+| **Memory Analysis** | Reduce memory usage and fix leaks | `npx ruflo@latest performance metrics` |### π GitHub & DevOps| Scenario | What It Solves | How To Do It ||----------|----------------|--------------|-| **PR Management** | Review, approve, and merge PRs efficiently | `npx ruflo@v3alpha hive-mind spawn "Review open PRs"` |-| **Issue Triage** | Categorize, prioritize, and assign issues automatically | `npx ruflo@v3alpha hive-mind spawn "Triage new issues"` |-| **Release Management** | Coordinate releases with changelogs and versioning | `npx ruflo@v3alpha hive-mind spawn "Prepare v2.0 release"` |-| **CI/CD Optimization** | Speed up pipelines and reduce flaky tests | `npx ruflo@v3alpha hive-mind spawn "Optimize GitHub Actions workflow"` |+| **PR Management** | Review, approve, and merge PRs efficiently | `npx ruflo@latest hive-mind spawn "Review open PRs"` |+| **Issue Triage** | Categorize, prioritize, and assign issues automatically | `npx ruflo@latest hive-mind spawn "Triage new issues"` |+| **Release Management** | Coordinate releases with changelogs and versioning | `npx ruflo@latest hive-mind spawn "Prepare v2.0 release"` |+| **CI/CD Optimization** | Speed up pipelines and reduce flaky tests | `npx ruflo@latest hive-mind spawn "Optimize GitHub Actions workflow"` |### π Spec-Driven Development| Scenario | What It Solves | How To Do It ||----------|----------------|--------------|-| **Generate Specs** | Create complete specifications before coding | `npx ruflo@v3alpha hive-mind spawn "Create ADR for authentication system"` |-| **Validate Implementation** | Ensure code matches specifications | `npx ruflo@v3alpha hooks progress --detailed` |-| **Track Compliance** | Monitor spec adherence across the team | `npx ruflo@v3alpha progress sync` |+| **Generate Specs** | Create complete specifications before coding | `npx ruflo@latest hive-mind spawn "Create ADR for authentication system"` |+| **Validate Implementation** | Ensure code matches specifications | `npx ruflo@latest hooks progress --detailed` |+| **Track Compliance** | Monitor spec adherence across the team | `npx ruflo@latest progress sync` |### π§ Learning & Intelligence| Scenario | What It Solves | How To Do It ||----------|----------------|--------------|-| **Bootstrap Intelligence** | Train the system on your codebase patterns | `npx ruflo@v3alpha hooks pretrain --depth deep` |-| **Optimize Routing** | Improve task-to-agent matching over time | `npx ruflo@v3alpha hooks route "<task>" --include-explanation` |-| **Transfer Learning** | Apply patterns learned from other projects | `npx ruflo@v3alpha hooks transfer <sourceProject>` |+| **Bootstrap Intelligence** | Train the system on your codebase patterns | `npx ruflo@latest hooks pretrain --depth deep` |+| **Optimize Routing** | Improve task-to-agent matching over time | `npx ruflo@latest hooks route "<task>" --include-explanation` |+| **Transfer Learning** | Apply patterns learned from other projects | `npx ruflo@latest hooks transfer <sourceProject>` |</details>@@ -3217,7 +3217,7 @@ When hooks run, they emit signals that guide routing decisions. Watch for these**Example Hook Output:**```bash-$ npx ruflo@v3alpha hooks pre-task --description "convert var to const in utils.ts"+$ npx ruflo@latest hooks pre-task --description "convert var to const in utils.ts"[AGENT_BOOSTER_AVAILABLE] Intent: var-to-constRecommendation: Use Edit tool directly@@ -3335,8 +3335,8 @@ The stats command shows:```bash# Example: Edit with pattern learning-npx ruflo@v3alpha hooks pre-edit ./src/auth.ts-npx ruflo@v3alpha hooks post-edit ./src/auth.ts --success true --train-patterns+npx ruflo@latest hooks pre-edit ./src/auth.ts+npx ruflo@latest hooks post-edit ./src/auth.ts --success true --train-patterns```#### π§ Intelligence & Routing Hooks (8 hooks)@@ -3354,10 +3354,10 @@ npx ruflo@v3alpha hooks post-edit ./src/auth.ts --success true --train-patterns```bash# Route a task with explanation-npx ruflo@v3alpha hooks route "refactor authentication to use JWT" --include-explanation+npx ruflo@latest hooks route "refactor authentication to use JWT" --include-explanation# Bootstrap intelligence from your codebase-npx ruflo@v3alpha hooks pretrain --depth deep --model-type moe+npx ruflo@latest hooks pretrain --depth deep --model-type moe```#### π Session Management Hooks (4 hooks)@@ -3371,10 +3371,10 @@ npx ruflo@v3alpha hooks pretrain --depth deep --model-type moe```bash# Start session with auto-daemon-npx ruflo@v3alpha hooks session-start --session-id "feature-auth" --start-daemon+npx ruflo@latest hooks session-start --session-id "feature-auth" --start-daemon# End session and export learnings-npx ruflo@v3alpha hooks session-end --export-metrics --persist-patterns+npx ruflo@latest hooks session-end --export-metrics --persist-patterns```#### π€ Intelligence System Hooks (9 hooks)@@ -3393,13 +3393,13 @@ npx ruflo@v3alpha hooks session-end --export-metrics --persist-patterns```bash# Start trajectory for complex task-npx ruflo@v3alpha hooks intelligence trajectory-start --task "implement OAuth2"+npx ruflo@latest hooks intelligence trajectory-start --task "implement OAuth2"# Record successful action-npx ruflo@v3alpha hooks intelligence trajectory-step --action "created token service" --quality 0.9+npx ruflo@latest hooks intelligence trajectory-step --action "created token service" --quality 0.9# End trajectory and trigger learning-npx ruflo@v3alpha hooks intelligence trajectory-end --success true+npx ruflo@latest hooks intelligence trajectory-end --success true# View intelligence diagnostics and improvement trends (ADR-050)node .claude/helpers/hook-handler.cjs stats@@ -3427,13 +3427,13 @@ Workers run automatically based on context, or dispatch manually.```bash# List all workers-npx ruflo@v3alpha hooks worker list+npx ruflo@latest hooks worker list# Manually dispatch security audit-npx ruflo@v3alpha hooks worker dispatch --trigger audit --context "./src/auth"+npx ruflo@latest hooks worker dispatch --trigger audit --context "./src/auth"# Check worker status-npx ruflo@v3alpha hooks worker status+npx ruflo@latest hooks worker status```### Model Routing Hooks (3 hooks)@@ -3448,10 +3448,10 @@ Automatically selects haiku/sonnet/opus based on task complexity.```bash# Get model recommendation-npx ruflo@v3alpha hooks model-route --task "fix typo in README"+npx ruflo@latest hooks model-route --task "fix typo in README"# β Recommends: haiku (simple task, low complexity)-npx ruflo@v3alpha hooks model-route --task "design distributed consensus system"+npx ruflo@latest hooks model-route --task "design distributed consensus system"# β Recommends: opus (complex architecture, high reasoning)```@@ -3472,15 +3472,15 @@ npx ruflo@v3alpha hooks model-route --task "design distributed consensus system"# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ# Route task to best agent (with intelligence context injection)-npx ruflo@v3alpha hooks route "<task>" --include-explanation+npx ruflo@latest hooks route "<task>" --include-explanation# Start/end session with learning-npx ruflo@v3alpha hooks session-start --start-daemon-npx ruflo@v3alpha hooks session-end --persist-patterns+npx ruflo@latest hooks session-start --start-daemon+npx ruflo@latest hooks session-end --persist-patterns# View what the system has learned-npx ruflo@v3alpha hooks metrics-npx ruflo@v3alpha hooks intelligence stats+npx ruflo@latest hooks metrics+npx ruflo@latest hooks intelligence stats# Intelligence diagnostics β see if intelligence is improvingnode .claude/helpers/hook-handler.cjs stats # Human-readable@@ -3488,10 +3488,10 @@ node .claude/helpers/hook-handler.cjs stats --json # JSON for scriptingnode .claude/helpers/intelligence.cjs stats # Direct access# Bootstrap on new project-npx ruflo@v3alpha hooks pretrain --depth deep+npx ruflo@latest hooks pretrain --depth deep# Dispatch background worker-npx ruflo@v3alpha hooks worker dispatch --trigger audit+npx ruflo@latest hooks worker dispatch --trigger audit```</details>@@ -3517,38 +3517,38 @@ Share learned patterns across projects, teams, and the community via the decentr```bash# Export learned patterns to file-npx ruflo@v3alpha memory export --format json --output ./patterns.json+npx ruflo@latest memory export --format json --output ./patterns.json# Export specific namespace-npx ruflo@v3alpha memory export --namespace "security" --output ./security-patterns.json+npx ruflo@latest memory export --namespace "security" --output ./security-patterns.json# Export with embeddings (larger file, faster import)-npx ruflo@v3alpha memory export --include-embeddings --output ./full-export.json+npx ruflo@latest memory export --include-embeddings --output ./full-export.json# Export agent configurations-npx ruflo@v3alpha config export --scope project --output ./agent-configs.json+npx ruflo@latest config export --scope project --output ./agent-configs.json# Export session state-npx ruflo@v3alpha session export --session-id "my-session" --output ./session.json+npx ruflo@latest session export --session-id "my-session" --output ./session.json```### Import Commands```bash# Import patterns from file-npx ruflo@v3alpha memory import --input ./patterns.json+npx ruflo@latest memory import --input ./patterns.json# Import and merge with existing (don't overwrite)-npx ruflo@v3alpha memory import --input ./patterns.json --merge+npx ruflo@latest memory import --input ./patterns.json --merge# Import from another project-npx ruflo@v3alpha hooks transfer --source-path ../other-project+npx ruflo@latest hooks transfer --source-path ../other-project# Import agent configurations-npx ruflo@v3alpha config import --input ./agent-configs.json --scope project+npx ruflo@latest config import --input ./agent-configs.json --scope project# Restore session-npx ruflo@v3alpha session restore --session-id "my-session"+npx ruflo@latest session restore --session-id "my-session"```### Pattern Store (IPFS Marketplace)@@ -3566,13 +3566,13 @@ Decentralized pattern marketplace for sharing and discovering community patterns```bash# Search for authentication patterns-npx ruflo@v3alpha transfer-store search --query "authentication" --min-rating 4.0+npx ruflo@latest transfer-store search --query "authentication" --min-rating 4.0# Download a pattern-npx ruflo@v3alpha transfer-store download --id "auth-jwt-patterns-v2" --verify+npx ruflo@latest transfer-store download --id "auth-jwt-patterns-v2" --verify# Publish your patterns-npx ruflo@v3alpha transfer-store publish --input ./my-patterns.json --category "security"+npx ruflo@latest transfer-store publish --input ./my-patterns.json --category "security"```### Plugin Store@@ -3590,22 +3590,22 @@ Discover and install community plugins from the **live IPFS registry** with 19 o```bash# List plugins with live ratings from Cloud Function-npx ruflo@v3alpha plugins list+npx ruflo@latest plugins list# Filter by type-npx ruflo@v3alpha plugins list --type integration+npx ruflo@latest plugins list --type integration# Rate a plugin-npx ruflo@v3alpha plugins rate --name @claude-flow/embeddings --rating 5+npx ruflo@latest plugins rate --name @claude-flow/embeddings --rating 5# Search for MCP tool plugins-npx ruflo@v3alpha transfer plugin-search --type "mcp-tool" --verified+npx ruflo@latest transfer plugin-search --type "mcp-tool" --verified# Get plugin info-npx ruflo@v3alpha transfer plugin-info --name "semantic-code-search"+npx ruflo@latest transfer plugin-info --name "semantic-code-search"# List official plugins-npx ruflo@v3alpha transfer plugin-official+npx ruflo@latest transfer plugin-official```#### Live IPFS Plugin Registry@@ -3638,10 +3638,10 @@ Patterns and models are distributed via IPFS for decentralization and integrity.```bash# Resolve IPNS name to CID-npx ruflo@v3alpha transfer ipfs-resolve --name "/ipns/patterns.ruflo.io"+npx ruflo@latest transfer ipfs-resolve --name "/ipns/patterns.ruflo.io"# Detect PII before publishing-npx ruflo@v3alpha transfer detect-pii --content "$(cat ./patterns.json)"+npx ruflo@latest transfer detect-pii --content "$(cat ./patterns.json)"```### Model & Learning Pattern Import/Export@@ -3706,13 +3706,13 @@ Import pre-trained learning patterns for common tasks. **90.5% average accuracy*curl -s "https://gateway.pinata.cloud/ipfs/QmNr1yYMKi7YBaL8JSztQyuB5ZUaTdRMLxJC1pBpGbjsTc" | jq '.models[].name'# Import all models-npx ruflo@v3alpha transfer import --cid QmNr1yYMKi7YBaL8JSztQyuB5ZUaTdRMLxJC1pBpGbjsTc+npx ruflo@latest transfer import --cid QmNr1yYMKi7YBaL8JSztQyuB5ZUaTdRMLxJC1pBpGbjsTc# Import specific category-npx ruflo@v3alpha neural import --model security-review-patterns --source ipfs+npx ruflo@latest neural import --model security-review-patterns --source ipfs# Use patterns in routing-npx ruflo@v3alpha hooks route --task "review authentication code" --use-patterns+npx ruflo@latest hooks route --task "review authentication code" --use-patterns```#### Benefits vs Fresh Install@@ -3737,7 +3737,7 @@ npx ruflo@v3alpha hooks route --task "review authentication code" --use-patterns```bash# Install a pattern pack-npx ruflo@v3alpha transfer-store download --id "security-essentials" --apply+npx ruflo@latest transfer-store download --id "security-essentials" --apply```### RuVector WASM Neural Training@@ -3755,25 +3755,25 @@ Real WASM-accelerated neural training using `@ruvector/learning-wasm` and `@ruve```bash# List available pre-trained models from IPFS registry-npx ruflo@v3alpha neural list+npx ruflo@latest neural list# List models by category-npx ruflo@v3alpha neural list --category security+npx ruflo@latest neural list --category security# Train with WASM acceleration-npx ruflo@v3alpha neural train -p coordination -e 100 --wasm --flash --contrastive+npx ruflo@latest neural train -p coordination -e 100 --wasm --flash --contrastive# Train security patterns-npx ruflo@v3alpha neural train -p security --wasm --contrastive+npx ruflo@latest neural train -p security --wasm --contrastive# Benchmark WASM performance-npx ruflo@v3alpha neural benchmark -d 256 -i 1000+npx ruflo@latest neural benchmark -d 256 -i 1000# Import pre-trained models-npx ruflo@v3alpha neural import --cid QmNr1yYMKi7YBaL8JSztQyuB5ZUaTdRMLxJC1pBpGbjsTc+npx ruflo@latest neural import --cid QmNr1yYMKi7YBaL8JSztQyuB5ZUaTdRMLxJC1pBpGbjsTc# Export trained patterns to IPFS-npx ruflo@v3alpha neural export --ipfs --sign+npx ruflo@latest neural export --ipfs --sign```#### Benchmark Results@@ -4112,9 +4112,9 @@ Skills are **reusable workflows** that combine agents, hooks, and patterns into/v3-security-overhaul# Via CLI-npx ruflo@v3alpha skill run github-code-review-npx ruflo@v3alpha skill list-npx ruflo@v3alpha skill info sparc-methodology+npx ruflo@latest skill run github-code-review+npx ruflo@latest skill list+npx ruflo@latest skill info sparc-methodology```### Creating Custom Skills@@ -4171,21 +4171,21 @@ The Claims system manages **who is working on what** β whether human or agent.| Command | What It Does | Example ||---------|--------------|---------|-| `issues list` | See all issues and their status | `npx ruflo@v3alpha issues list` |-| `issues claim` | Claim an issue for yourself/agent | `npx ruflo@v3alpha issues claim #123 --as coder-1` |-| `issues release` | Release your claim | `npx ruflo@v3alpha issues release #123` |-| `issues handoff` | Hand off to another worker | `npx ruflo@v3alpha issues handoff #123 --to reviewer` |-| `issues status` | Update progress on claimed work | `npx ruflo@v3alpha issues status #123 --progress 75` |-| `issues stealable` | List abandoned/stuck issues | `npx ruflo@v3alpha issues stealable` |-| `issues steal` | Take over stealable issue | `npx ruflo@v3alpha issues steal #123` |-| `issues load` | View agent workloads | `npx ruflo@v3alpha issues load` |-| `issues rebalance` | Redistribute work evenly | `npx ruflo@v3alpha issues rebalance --dry-run` |-| `issues board` | Visual board view | `npx ruflo@v3alpha issues board` |+| `issues list` | See all issues and their status | `npx ruflo@latest issues list` |+| `issues claim` | Claim an issue for yourself/agent | `npx ruflo@latest issues claim #123 --as coder-1` |+| `issues release` | Release your claim | `npx ruflo@latest issues release #123` |+| `issues handoff` | Hand off to another worker | `npx ruflo@latest issues handoff #123 --to reviewer` |+| `issues status` | Update progress on claimed work | `npx ruflo@latest issues status #123 --progress 75` |+| `issues stealable` | List abandoned/stuck issues | `npx ruflo@latest issues stealable` |+| `issues steal` | Take over stealable issue | `npx ruflo@latest issues steal #123` |+| `issues load` | View agent workloads | `npx ruflo@latest issues load` |+| `issues rebalance` | Redistribute work evenly | `npx ruflo@latest issues rebalance --dry-run` |+| `issues board` | Visual board view | `npx ruflo@latest issues board` |### Visual Board View```bash-npx ruflo@v3alpha issues board+npx ruflo@latest issues board``````@@ -4207,13 +4207,13 @@ When you need to pass work to someone else:```bash# 1. Request handoff with context-npx ruflo@v3alpha issues handoff #123 \+npx ruflo@latest issues handoff #123 \--to security-architect \--reason "Needs security review" \--progress 80# 2. Target accepts handoff-npx ruflo@v3alpha issues accept #123 --as security-architect+npx ruflo@latest issues accept #123 --as security-architect# 3. Work continues with full context```@@ -4222,7 +4222,7 @@ npx ruflo@v3alpha issues accept #123 --as security-architect```bash# View current load-npx ruflo@v3alpha issues load+npx ruflo@latest issues load# Output:# Agent | Claims | Load | Status@@ -4233,7 +4233,7 @@ npx ruflo@v3alpha issues load# security-arch | 0 | 0% | π’ Available# Auto-rebalance-npx ruflo@v3alpha issues rebalance+npx ruflo@latest issues rebalance```### MCP Tools@@ -4294,14 +4294,14 @@ The Route system uses **Q-Learning** to automatically assign tasks to the best a| Command | What It Does | Example ||---------|--------------|---------|-| `route task` | Get agent recommendation | `npx ruflo@v3alpha route task "implement OAuth2"` |-| `route explain` | Understand routing decision | `npx ruflo@v3alpha route explain "task"` |-| `route coverage` | Route based on test coverage | `npx ruflo@v3alpha route coverage` |+| `route task` | Get agent recommendation | `npx ruflo@latest route task "implement OAuth2"` |+| `route explain` | Understand routing decision | `npx ruflo@latest route explain "task"` |+| `route coverage` | Route based on test coverage | `npx ruflo@latest route coverage` |### Example: Route a Task```bash-npx ruflo@v3alpha route task "refactor authentication to use JWT"+npx ruflo@latest route task "refactor authentication to use JWT"# Output:# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ@@ -4328,7 +4328,7 @@ npx ruflo@v3alpha route task "refactor authentication to use JWT"Routes tasks to agents based on **test coverage gaps**:```bash-npx ruflo@v3alpha route coverage+npx ruflo@latest route coverage# Finds untested code and routes to tester agent:# β’ src/auth/jwt.ts - 23% coverage β tester@@ -4340,10 +4340,10 @@ npx ruflo@v3alpha route coverage```bash# Route via hooks (preferred)-npx ruflo@v3alpha hooks route "implement caching layer" --include-explanation+npx ruflo@latest hooks route "implement caching layer" --include-explanation# Record outcome for learning-npx ruflo@v3alpha hooks post-task --task-id "task-123" --success true --agent coder+npx ruflo@latest hooks post-task --task-id "task-123" --success true --agent coder```### How Q-Learning Improves Over Time@@ -4377,7 +4377,7 @@ Use Ruflo packages directly in your TypeScript/JavaScript applications.npm install @claude-flow/cli @claude-flow/memory @claude-flow/swarm# Or install everything-npm install ruflo@v3alpha+npm install ruflo@latest```### Quick Examples@@ -5688,7 +5688,7 @@ Flow Nexus is a **cloud platform** for deploying and scaling Ruflo beyond your l/flow-nexus-swarm# Or via CLI-npx ruflo@v3alpha nexus swarm deploy \+npx ruflo@latest nexus swarm deploy \--topology hierarchical \--max-agents 50 \--region us-east-1@@ -5700,13 +5700,13 @@ Isolated execution environments for running untrusted code:```bash# Create sandbox-npx ruflo@v3alpha nexus sandbox create --language python+npx ruflo@latest nexus sandbox create --language python# Execute code safely-npx ruflo@v3alpha nexus sandbox exec --code "print('Hello')"+npx ruflo@latest nexus sandbox exec --code "print('Hello')"# Cleanup-npx ruflo@v3alpha nexus sandbox destroy+npx ruflo@latest nexus sandbox destroy```### Event-Driven Workflows@@ -5732,10 +5732,10 @@ steps:# 1. Sign up at flow-nexus.io# 2. Get API key# 3. Configure-npx ruflo@v3alpha nexus configure --api-key <key>+npx ruflo@latest nexus configure --api-key <key># 4. Deploy-npx ruflo@v3alpha nexus swarm deploy+npx ruflo@latest nexus swarm deploy```</details>@@ -5769,7 +5769,7 @@ Stream-Chain enables **sequential processing** where the output of one agent bec/stream-chain# Define pipeline-npx ruflo@v3alpha stream-chain create \+npx ruflo@latest stream-chain create \--name "feature-pipeline" \--stages "researcher,architect,coder,tester,reviewer"```@@ -5811,11 +5811,11 @@ stages:```bash# Run the pipeline-npx ruflo@v3alpha stream-chain run feature-pipeline \+npx ruflo@latest stream-chain run feature-pipeline \--input '{"requirements": "Add user dashboard with analytics"}'# Monitor progress-npx ruflo@v3alpha stream-chain status feature-pipeline+npx ruflo@latest stream-chain status feature-pipeline```### Use Cases@@ -5855,7 +5855,7 @@ The Pair Programming skill provides **human-AI collaborative coding** with role/pair-programming --mode tdd# Via CLI-npx ruflo@v3alpha pair start --mode navigator+npx ruflo@latest pair start --mode navigator```### TDD Mode Workflow@@ -5895,16 +5895,16 @@ npx ruflo@v3alpha pair start --mode navigator```bash# Switch roles mid-session-npx ruflo@v3alpha pair switch+npx ruflo@latest pair switch# Get AI explanation-npx ruflo@v3alpha pair explain+npx ruflo@latest pair explain# Run tests-npx ruflo@v3alpha pair test+npx ruflo@latest pair test# End session with summary-npx ruflo@v3alpha pair end+npx ruflo@latest pair end```</details>@@ -5961,22 +5961,22 @@ Detection Time: 0.04ms | 50+ Patterns | Self-Learning | HNSW Vector Search```bash# Basic threat scan-npx ruflo@v3alpha security defend -i "ignore previous instructions"+npx ruflo@latest security defend -i "ignore previous instructions"# Scan a file-npx ruflo@v3alpha security defend -f ./user-prompts.txt+npx ruflo@latest security defend -f ./user-prompts.txt# Quick scan (faster)-npx ruflo@v3alpha security defend -i "some text" --quick+npx ruflo@latest security defend -i "some text" --quick# JSON output-npx ruflo@v3alpha security defend -i "test" -o json+npx ruflo@latest security defend -i "test" -o json# View statistics-npx ruflo@v3alpha security defend --stats+npx ruflo@latest security defend --stats# Full security audit-npx ruflo@v3alpha security scan --depth full+npx ruflo@latest security scan --depth full```### MCP Tools@@ -6567,10 +6567,10 @@ npm run bench:attentionnpm run bench:startup# Performance report-npx ruflo@v3alpha performance report+npx ruflo@latest performance report# Benchmark specific suite-npx ruflo@v3alpha performance benchmark --suite memory+npx ruflo@latest performance benchmark --suite memory```</details>@@ -7247,25 +7247,25 @@ Ruflo looks for configuration in this order:```bash# View current configuration-npx ruflo@v3alpha config list+npx ruflo@latest config list# Get specific value-npx ruflo@v3alpha config get --key memory.type+npx ruflo@latest config get --key memory.type# Set configuration value-npx ruflo@v3alpha config set --key swarm.maxAgents --value 10+npx ruflo@latest config set --key swarm.maxAgents --value 10# Export configuration-npx ruflo@v3alpha config export > my-config.json+npx ruflo@latest config export > my-config.json# Import configuration-npx ruflo@v3alpha config import --file my-config.json+npx ruflo@latest config import --file my-config.json# Reset to defaults-npx ruflo@v3alpha config reset --key swarm+npx ruflo@latest config reset --key swarm# Initialize with wizard-npx ruflo@v3alpha init --wizard+npx ruflo@latest init --wizard```</details>@@ -7289,7 +7289,7 @@ lsof -i :3000# Kill existing processkill -9 <PID># Restart MCP server-npx ruflo@v3alpha mcp start+npx ruflo@latest mcp start```**Agent spawn failures**@@ -7303,9 +7303,9 @@ export CLAUDE_FLOW_MAX_AGENTS=5**Pattern search returning no results**```bash# Verify patterns are stored-npx ruflo@v3alpha hooks metrics+npx ruflo@latest hooks metrics# Re-run pretraining if empty-npx ruflo@v3alpha hooks pretrain+npx ruflo@latest hooks pretrain```**Windows path issues**@@ -7373,20 +7373,20 @@ cp -r ./data ./data-backup-v2cp -r ./.ruflo ./.ruflo-backup-v2# STEP 2: Check migration status-npx ruflo@v3alpha migrate status+npx ruflo@latest migrate status# STEP 3: Run migration with dry-run first-npx ruflo@v3alpha migrate run --dry-run+npx ruflo@latest migrate run --dry-run# STEP 4: Execute migration-npx ruflo@v3alpha migrate run --from v2+npx ruflo@latest migrate run --from v2# STEP 5: Verify migration-npx ruflo@v3alpha migrate verify+npx ruflo@latest migrate verify# STEP 6: Initialize V3 learning-npx ruflo@v3alpha hooks pretrain-npx ruflo@v3alpha doctor --fix+npx ruflo@latest hooks pretrain+npx ruflo@latest doctor --fix```### Command Changes Reference@@ -7453,10 +7453,10 @@ If migration fails, you can rollback:```bash# Check rollback options-npx ruflo@v3alpha migrate rollback --list+npx ruflo@latest migrate rollback --list# Rollback to V2-npx ruflo@v3alpha migrate rollback --to v2+npx ruflo@latest migrate rollback --to v2# Restore backup manually if neededrm -rf ./data@@ -7465,12 +7465,12 @@ cp -r ./data-backup-v2 ./data### Post-Migration Checklist-- [ ] Verify all agents spawn correctly: `npx ruflo@v3alpha agent list`-- [ ] Check memory search works: `npx ruflo@v3alpha memory search -q "test"`-- [ ] Confirm MCP server starts: `npx ruflo@v3alpha mcp start`-- [ ] Run doctor diagnostics: `npx ruflo@v3alpha doctor`-- [ ] Test a simple swarm: `npx ruflo@v3alpha swarm init --topology mesh`-- [ ] Bootstrap learning: `npx ruflo@v3alpha hooks pretrain`+- [ ] Verify all agents spawn correctly: `npx ruflo@latest agent list`+- [ ] Check memory search works: `npx ruflo@latest memory search -q "test"`+- [ ] Confirm MCP server starts: `npx ruflo@latest mcp start`+- [ ] Run doctor diagnostics: `npx ruflo@latest doctor`+- [ ] Test a simple swarm: `npx ruflo@latest swarm init --topology mesh`+- [ ] Bootstrap learning: `npx ruflo@latest hooks pretrain`### Common Migration Issues@@ -7514,7 +7514,7 @@ cp -r ./data-backup-v2 ./data### Additional Resources- [V2 Documentation](./v2/README.md)-- [Architecture Decisions (ADRs)](./v3/docs/adr/)+- [Architecture Decisions (ADRs)](./v3/implementation/adrs/)- [API Reference](./v2/docs/technical/)- [Examples](./v2/examples/)diff --git a/v3/@claude-flow/cli/package.json b/v3/@claude-flow/cli/package.jsonindex 4e77e23570..696f3ca897 100644--- a/v3/@claude-flow/cli/package.json+++ b/v3/@claude-flow/cli/package.json@@ -100,6 +100,8 @@"@ruvector/attention": "^0.1.4","@ruvector/learning-wasm": "^0.1.29","@ruvector/router": "^0.1.27",+ "@ruvector/rvagent-wasm": "^0.1.0",+ "@ruvector/ruvllm-wasm": "^2.0.2","@ruvector/sona": "^0.1.5"},"publishConfig": {diff --git a/v3/implementation/adrs/ADR-059-rvagent-wasm-integration.md b/v3/implementation/adrs/ADR-059-rvagent-wasm-integration.mdnew file mode 100644index 0000000000..2b5309bbeb--- /dev/null+++ b/v3/implementation/adrs/ADR-059-rvagent-wasm-integration.md@@ -0,0 +1,175 @@+# ADR-059: @ruvector/rvagent-wasm Integration++**Status**: Implemented (see ADR-070 for completion details)+**Date**: 2026-03-17+**Author**: RuvNet++## Context++Ruflo v3 already integrates four `@ruvector/*` WASM packages for intelligence+(learning-wasm, attention, router, sona). A new package β+`@ruvector/[email protected]` β provides a complete sandboxed AI agent runtime+compiled to WebAssembly. It includes:++- **WasmAgent** β LLM agent with virtual filesystem (no OS access)+- **WasmMcpServer** β JSON-RPC 2.0 MCP server running entirely in WASM+- **WasmGallery** β 6 pre-built agent templates (Coder, Researcher, Tester, Reviewer, Security, Swarm)+- **WasmRvfBuilder** β RVF binary container format for multi-agent packaging+- **WasmStateBackend** β In-memory sandboxed filesystem (1 MB/file, 10 K files max)+- **WasmToolExecutor** β Sandboxed tool execution (ReadFile, WriteFile, EditFile, WriteTodos, ListFiles)++Package size: 196.8 kB packed / 620 kB unpacked, zero runtime dependencies.++A companion package β `@ruvector/ruvllm-wasm` β provides browser-native LLM+inference with HNSW routing, MicroLoRA, SONA Instant, WebGPU acceleration, and+pi-quantization. This ADR covers both integrations.++## Decision++Integrate `@ruvector/rvagent-wasm` as an optional dependency in `@claude-flow/cli`,+following the established pattern used by `@ruvector/learning-wasm` et al.++### Integration Surface++| Layer | What | How |+|-------|------|-----|+| **package.json** | Optional deps | `"@ruvector/rvagent-wasm": "^0.1.0"`, `"@ruvector/ruvllm-wasm": "^2.0.1"` |+| **Ambient types** | TypeScript compat | `src/types/optional-modules.d.ts` |+| **Integration module** | `src/ruvector/agent-wasm.ts` | Agent lifecycle, VFS, gallery, RVF, MCP bridge |+| **MCP tools** | `src/mcp-tools/wasm-agent-tools.ts` | 10 tools exposed via MCP protocol |+| **Re-exports** | `src/ruvector/index.ts` | Public API surface |++### MCP Tools Added++| Tool | Description |+|------|-------------|+| `wasm_agent_create` | Create sandboxed WASM agent |+| `wasm_agent_prompt` | Send prompt to WASM agent |+| `wasm_agent_tool` | Execute tool on WASM agent |+| `wasm_agent_list` | List active WASM agents |+| `wasm_agent_terminate` | Terminate and free agent |+| `wasm_agent_files` | List files in agent's VFS |+| `wasm_agent_export` | Export agent state as JSON |+| `wasm_gallery_list` | List gallery templates |+| `wasm_gallery_search` | Search templates by query |+| `wasm_gallery_create` | Create agent from template |++### @ruvector/ruvllm-wasm v2.0.1 Integration++Package published to npm and live-tested on 2026-03-17. Ambient types declared in+`src/types/optional-modules.d.ts`. Integration module and MCP tools pending.++#### Verified Working APIs (npm v2.0.0)++| Component | API | Status |+|-----------|-----|--------|+| `RuvLLMWasm` | `initialize()`, `reset()`, `version()`, `getPoolStats()` | Working |+| `ChatTemplateWasm` | `.llama3()`, `.mistral()`, `.chatml()`, `.phi()`, `.gemma()`, `.custom()`, `.detectFromModelId()` | Working |+| `ChatMessageWasm` | `.system()`, `.user()`, `.assistant()` | Working |+| `GenerateConfig` | `maxTokens`, `temperature`, `topP`, `topK`, `repetitionPenalty`, `toJson()`, `fromJson()` | Working |+| `SonaInstantWasm` | `instantAdapt()`, `recordPattern()`, `suggestAction()`, `stats()`, `toJson()`, `fromJson()` | Working |+| `MicroLoraWasm` | `adapt()`, `applyUpdates()`, `stats()`, `reset()` (via `MicroLoraConfigWasm` + `AdaptFeedbackWasm`) | Working |+| `KvCacheWasm` | `append()`, `stats()`, `clear()`, `tokenCount` | Working |+| `BufferPoolWasm` | `withCapacity()`, `prewarmAll()`, `statsJson()`, `hitRate`, `clear()` | Working |+| `InferenceArenaWasm` | `forModel()`, `reset()`, `used`, `capacity`, `remaining` | Working |+| `HnswRouterWasm` | Constructor, `setEfSearch()`, `clear()` | Working |+| `HnswRouterWasm` | `addPattern()` | Fixed in v2.0.1 |++#### Node.js Init Pattern++```typescript+import { readFileSync } from 'node:fs';+import { createRequire } from 'node:module';++const require = createRequire(import.meta.url);+const wasmPath = require.resolve('@ruvector/ruvllm-wasm/ruvllm_wasm_bg.wasm');+const bytes = readFileSync(wasmPath);++// MUST use object form β initSync(bytes) is deprecated+initSync({ module: bytes });+```++#### HNSW Fix Details++The `select_layer()` function in WASM called `f64::ln()` which hits `unreachable`+in WASM targets. Fix: replaced `wasm_random()` with integer-based geometric+distribution that avoids floating-point logarithms entirely. Published as v2.0.1.++#### Planned Integration Module++`src/ruvector/ruvllm-wasm.ts` will expose:+- `isRuvllmWasmAvailable()` β Runtime detection+- `initRuvllmWasm()` β Node.js WASM initialization+- `createHnswRouter()` β WASM HNSW for semantic routing+- `createSonaInstant()` β <1ms adaptation loops+- `createMicroLora()` β Ultra-lightweight LoRA (ranks 1-4)+- `formatChat()` β Chat template formatting+- `createKvCache()` β KV cache management+- Chat template helpers, generation config wrappers++### Architecture++```+ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ+β @claude-flow/cli β+β β+β src/ruvector/agent-wasm.ts βββ Integration module β+β ββ createWasmAgent() (lifecycle) β+β ββ promptWasmAgent() (LLM interaction) β+β ββ createWasmMcpServer() (MCP bridge) β+β ββ listGalleryTemplates() (gallery) β+β ββ buildRvfContainer() (packaging) β+β β+β src/mcp-tools/wasm-agent-tools.ts βββ MCP exposure β+β β+ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€+β @ruvector/rvagent-wasm (WASM, optional) β+β ββ WasmAgent (sandboxed agent runtime) β+β ββ WasmStateBackend (in-memory VFS) β+β ββ WasmMcpServer (JSON-RPC 2.0) β+β ββ WasmGallery (6 templates) β+β ββ WasmRvfBuilder (binary containers) β+ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ+```++## Consequences++### Positive+- Enables sandboxed agent execution without OS access (browser-safe)+- 6 pre-built templates accelerate agent creation+- RVF container support enables agent packaging and distribution+- WASM MCP server provides lightweight alternative endpoint+- Zero additional runtime dependencies (WASM is self-contained)+- Graceful degradation when package not installed++### Negative+- 620 kB unpacked size added to optional deps+- WASM agents lack OS-level tools (no Bash, no Grep, no Glob)+- Model provider must be injected from JavaScript side++### Known Issues (v0.1.0 β filed upstream)++| Issue | Severity | Workaround |+|-------|----------|------------|+| `execute_tool(unknown)` β WASM panic | Medium | Validate tool name before calling (implemented) |+| `gallery.get(unknown)` β WASM panic | Medium | Wrap in try/catch (implemented) |+| `WasmMcpServer` β memory access out of bounds | High | Avoid MCP server in v0.1.0 |+| `reset()` does not clear `file_count` | Low | Recreate agent if clean state needed |+| `write_todos` format undocumented | Low | Tool works, format TBD |+| Template ID is `swarm-orchestrator` not `swarm` | Info | Updated in code and docs |++### Known Issues (ruvllm-wasm v2.0.1)++| Issue | Severity | Workaround |+|-------|----------|------------|+| HNSW `addPattern` panics at ~12 patterns | High | Limit to <12 or await fix |+| `SonaInstantWasm` requires `SonaConfigWasm` | Info | API change from earlier versions |+| `MicroLoraWasm.adapt()` takes `AdaptFeedbackWasm` | Info | API change; `.apply()` for transforms |+| `RuvLLMWasm` has no `.version()` | Info | Use standalone `getVersion()` |+| `GenerateConfig` float precision loss | Low | f32 roundtrip (0.7 β 0.699999...) |+| Stats objects return WASM pointers | Low | Use `.toJson()` or named accessors |++### Neutral+- Follows existing @ruvector/* optional dependency pattern+- No breaking changes to existing APIs+- Tests mock the WASM module for CI environments where it's not installeddiff --git a/v3/implementation/adrs/ADR-064-stub-remediation-v3522.md b/v3/implementation/adrs/ADR-064-stub-remediation-v3522.mdindex ad2f1f91f2..6237641b46 100644--- a/v3/implementation/adrs/ADR-064-stub-remediation-v3522.md+++ b/v3/implementation/adrs/ADR-064-stub-remediation-v3522.md@@ -1,7 +1,7 @@# ADR-064: Stub Remediation & Full Implementation β v3.5.22**Date:** 2026-03-17-**Status:** In Progress+**Status:** Implemented (22 stubs fully implemented in v3.5.43, PR #1438)**Context:** Deep capability audit (ADR-063) identified stub implementations and broken features. This ADR documents the remediation plan and tracks which items were already functional vs genuinely needing fixes.## Audit Correctiondiff --git a/v3/implementation/adrs/ADR-070-rvagent-wasm-completion.md b/v3/implementation/adrs/ADR-070-rvagent-wasm-completion.mdnew file mode 100644index 0000000000..ad14273d74--- /dev/null+++ b/v3/implementation/adrs/ADR-070-rvagent-wasm-completion.md@@ -0,0 +1,98 @@+# ADR-070: Complete @ruvector/rvagent-wasm & ruvllm-wasm Integration++**Status**: Implemented+**Date**: 2026-03-25+**Author**: RuvNet+**Supersedes**: Gaps identified in ADR-059++## Context++ADR-059 defined the integration plan for `@ruvector/rvagent-wasm` and+`@ruvector/ruvllm-wasm`. An audit on 2026-03-25 found that the code was fully+implemented but the wiring was incomplete:++| Item | ADR-059 Status | Actual State |+|------|---------------|--------------|+| `src/ruvector/agent-wasm.ts` | Planned | Implemented (387 lines) |+| `src/mcp-tools/wasm-agent-tools.ts` | Planned | Implemented (10 MCP tools) |+| `src/ruvector/ruvllm-wasm.ts` | Pending | Implemented (full module) |+| `src/mcp-tools/ruvllm-tools.ts` | Pending | Implemented (MCP tools) |+| `src/ruvector/index.ts` re-exports | Pending | Implemented (both modules) |+| `src/mcp-tools/index.ts` re-exports | Pending | Implemented (both tool sets) |+| `src/types/optional-modules.d.ts` | Planned | Implemented (ambient types) |+| `package.json` optional deps | Required | **Missing** β neither package listed |++The sole gap was that `@ruvector/rvagent-wasm` and `@ruvector/ruvllm-wasm` were+not declared in `package.json` `optionalDependencies`, meaning:++1. `npm install` would never fetch them+2. Runtime `import()` calls would always hit the graceful-degradation path+3. Users could not enable WASM agents without manually installing the packages++## Decision++Add both packages to `optionalDependencies` in `v3/@claude-flow/cli/package.json`:++```json+{+ "optionalDependencies": {+ "@ruvector/rvagent-wasm": "^0.1.0",+ "@ruvector/ruvllm-wasm": "^2.0.2"+ }+}+```++No code changes required β all integration modules, MCP tools, type+declarations, and re-exports were already in place.++## Implementation Summary++### rvagent-wasm (10 MCP Tools)++| Tool | File | Status |+|------|------|--------|+| `wasm_agent_create` | `wasm-agent-tools.ts` | Working |+| `wasm_agent_prompt` | `wasm-agent-tools.ts` | Working |+| `wasm_agent_tool` | `wasm-agent-tools.ts` | Working |+| `wasm_agent_list` | `wasm-agent-tools.ts` | Working |+| `wasm_agent_terminate` | `wasm-agent-tools.ts` | Working |+| `wasm_agent_files` | `wasm-agent-tools.ts` | Working |+| `wasm_agent_export` | `wasm-agent-tools.ts` | Working |+| `wasm_gallery_list` | `wasm-agent-tools.ts` | Working |+| `wasm_gallery_search` | `wasm-agent-tools.ts` | Working |+| `wasm_gallery_create` | `wasm-agent-tools.ts` | Working |++### ruvllm-wasm MCP Tools++| Tool | File | Status |+|------|------|--------|+| `ruvllm_status` | `ruvllm-tools.ts` | Working |+| `ruvllm_hnsw_create` | `ruvllm-tools.ts` | Working |+| `ruvllm_sona_create` | `ruvllm-tools.ts` | Working |+| `ruvllm_microlora_create` | `ruvllm-tools.ts` | Working |+| `ruvllm_chat_format` | `ruvllm-tools.ts` | Working |+| `ruvllm_kvcache_create` | `ruvllm-tools.ts` | Working |++### Integration Modules++| Module | Lines | Exports |+|--------|-------|---------|+| `src/ruvector/agent-wasm.ts` | 387 | 20+ functions (lifecycle, gallery, RVF, MCP bridge) |+| `src/ruvector/ruvllm-wasm.ts` | ~350 | 12+ functions (HNSW, SONA, MicroLoRA, chat, KV, arena) |+| `src/ruvector/index.ts` | 245 | Re-exports all public API from both modules |++## Consequences++### Positive+- `npm install` now fetches WASM packages when available for the platform+- All 16 MCP tools become functional without manual package installation+- Consistent with existing `@ruvector/*` optional dependency pattern+- No breaking changes β graceful degradation still works when packages unavailable++### Negative+- Additional ~820 kB unpacked size in optional deps (620 kB + 200 kB)+- Both packages still have known upstream issues (see ADR-059 Β§ Known Issues)++### Neutral+- ADR-059 can now be considered fully implemented+- No new code was needed β only the dependency declaration was missing