mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
Automatic checkpoint created by Claude Code - Branch: v3 - Timestamp: 2026-01-07T04:38:15Z - Changes: 3 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
V3 Architecture Decision Records (ADRs)
This directory contains all Architecture Decision Records for Claude-Flow v3.
ADR Index
| ADR | Title | Status | File |
|---|---|---|---|
| ADR-001 | Adopt agentic-flow as Core Foundation | ✅ Implemented | ADR-001-AGENT-IMPLEMENTATION.md |
| ADR-002 | Implement Domain-Driven Design Structure | ✅ Implemented | ADR-002-DDD-STRUCTURE.md |
| ADR-003 | Single Coordination Engine | ✅ Implemented | ADR-003-CONSOLIDATION-COMPLETE.md |
| ADR-004 | Plugin-Based Architecture | ✅ Implemented | ADR-004-PLUGIN-ARCHITECTURE.md |
| ADR-005 | MCP-First API Design | ✅ Implemented | ADR-005-implementation-summary.md |
| ADR-006 | Unified Memory Service | ✅ Implemented | ADR-006-UNIFIED-MEMORY.md |
| ADR-007 | Event Sourcing for State Changes | ✅ Implemented | ADR-007-EVENT-SOURCING.md |
| ADR-008 | Vitest Over Jest | ✅ Implemented | ADR-008-VITEST.md |
| ADR-009 | Hybrid Memory Backend as Default | ✅ Implemented | ADR-009-IMPLEMENTATION.md |
| ADR-010 | Remove Deno Support | ✅ Implemented | ADR-010-NODE-ONLY.md |
| ADR-011 | LLM Provider System | ✅ Implemented | ADR-011-llm-provider-system.md |
| ADR-012 | MCP Security Features | ✅ Implemented | ADR-012-mcp-security-features.md |
| ADR-013 | Core Security Module | ✅ Implemented | ADR-013-core-security-module.md |
| ADR-014 | Workers System | ✅ Implemented | ADR-014-workers-system.md (Node.js Daemon 2026-01-07) |
| ADR-015 | Unified Plugin System | ✅ Implemented | ADR-015-unified-plugin-system.md |
| ADR-016 | Collaborative Issue Claims | ✅ Implemented | ADR-016-collaborative-issue-claims.md |
Implementation Progress
| Component | Status | Details |
|---|---|---|
| DDD Modules | ✅ 100% | 16 modules, 833 files, ~240K lines |
| Test Coverage | ● In Progress | 85+ test files, target: >90% (ADR-008) |
| Service Integration | ✅ Complete | agentic-flow@alpha integration |
| Performance Benchmarks | ✅ Complete | Full benchmark suite in @claude-flow/performance |
Quick Summary
Core Decisions
- ADR-001: Build on agentic-flow@alpha instead of duplicating (eliminates 10,000+ lines)
- ADR-002: Domain-Driven Design with bounded contexts for clean architecture
- ADR-003: Single UnifiedSwarmCoordinator as canonical coordination engine
- ADR-004: Microkernel with plugins for optional features (HiveMind, Neural, etc.)
- ADR-005: MCP tools as primary API, CLI as thin wrapper
Technical Decisions
- ADR-006: Single MemoryService with SQLite, AgentDB, or Hybrid backends
- ADR-007: Event sourcing for audit trail and state reconstruction
- ADR-008: Vitest for 10x faster testing with native ESM
- ADR-009: Hybrid backend (SQLite + AgentDB) as default for best performance
- ADR-010: Node.js 20+ only, removing Deno complexity
Additional Files
- v3-adrs.md - Complete ADR master document with all decisions
- ADR-003-implementation-status.md - Detailed implementation tracking
Performance Targets (from ADRs)
| Metric | Target | ADR Reference |
|---|---|---|
| Code reduction | <5,000 lines vs 15,000+ | ADR-001 |
| HNSW search | 150x-12,500x faster | ADR-009 |
| Flash Attention | 2.49x-7.47x speedup | ADR-001 |
| Test execution | <5s (10x improvement) | ADR-008 |
| Startup time | <500ms | ADR-004 |
| Query latency | <100ms | ADR-006 |
Security Improvements
All ADRs consider security:
- CVE-1: Command injection prevention (ADR-005 input validation)
- CVE-2: Path traversal prevention (ADR-006 memory sandboxing)
- CVE-3: Credential generation (secure random with rejection sampling)
Last Updated: 2026-01-07 Project: Claude-Flow V3 Version: 3.0.0-alpha.11
Recent Updates (2026-01-07)
Release: @claude-flow/cli@3.0.0-alpha.7
- Hive-Mind CLI: All MCP tools now exposed via CLI subcommands:
hive-mind join <agent-id>- Join agent to hivehive-mind leave <agent-id>- Remove agent from hivehive-mind consensus- Manage consensus proposals and votinghive-mind broadcast -m <msg>- Broadcast messages to workershive-mind memory- Access shared memory (get/set/delete/list)
- Bug Fix: Fixed positional argument parsing for subcommands in CLI parser
- File Persistence: All MCP tools use file-based persistence in
.claude-flow/directories - ADR-014: Node.js Worker Daemon - cross-platform TypeScript daemon replaces shell helpers
- CLI:
daemoncommand with start/stop/status/trigger/enable subcommands - Session Integration: Auto-start daemon on SessionStart, auto-stop on SessionEnd
CLI MCP Tool Coverage
| Category | Tools | CLI Status |
|---|---|---|
| Agent | spawn, terminate, status, list, pool, health, update | ✅ Complete |
| Hive-Mind | init, spawn, status, task, join, leave, consensus, broadcast, memory, optimize-memory, shutdown | ✅ Complete |
| Task | create, status, list, complete, cancel | ✅ Complete |
| Session | save, restore, list, delete, export | ✅ Complete |
| Config | get, set, list, reset, export, import | ✅ Complete |
| Memory | store, retrieve, list, delete, search | ✅ Complete |
| Workflow | create, execute, list, status, delete | ✅ Complete |
Install
npx @claude-flow/cli@v3alpha --help
Release: @claude-flow/cli@3.0.0-alpha.11 (2026-01-07)
New V3 Advanced CLI Commands
All commands include subcommand help and "Created with ❤️ by ruv.io" branding.
| Command | Description | Subcommands |
|---|---|---|
neural |
Neural pattern training, MoE, Flash Attention | train, status, patterns, predict, optimize |
security |
Security scanning, CVE detection, threat modeling | scan, cve, threats, audit, secrets |
performance |
Performance profiling, benchmarking, optimization | benchmark, profile, metrics, optimize, bottleneck |
providers |
AI provider management, models, configurations | list, configure, test, models, usage |
plugins |
Plugin management, installation, lifecycle | list, install, uninstall, toggle, info, create |
deployment |
Deployment management, environments, rollbacks | deploy, status, rollback, history, environments, logs |
claims |
Claims-based authorization, access control | list, check, grant, revoke, roles, policies |
embeddings |
Vector embeddings, semantic search | generate, search, compare, collections, index, providers |
doctor |
System diagnostics | Node version, config, daemon, memory, API keys, MCP, disk |
completions |
Shell completions | bash, zsh, fish, powershell |
P0 Features Completed (alpha.12)
Smart Error Suggestions: Typo detection with Levenshtein distance
$ claude-flow swram
[ERROR] Unknown command: swram
Did you mean one of these?
- swarm
- neural
- start
$ claude-flow memroy
[ERROR] Unknown command: memroy
Did you mean "memory"?
Doctor Command: System health diagnostics
$ claude-flow doctor
Claude Flow Doctor
──────────────────────────────────────────────────
✓ Node.js Version: v22.21.1 (>= 20 required)
✓ npm Version: v10.9.4
✓ Git: v2.52.0
✓ Git Repository: In a git repository
⚠ Config File: No config file (using defaults)
⚠ Daemon Status: Not running
⚠ Memory Database: Not initialized
⚠ API Keys: No API keys found
⚠ MCP Servers: No MCP config found
✓ Disk Space: 73G available
✓ TypeScript: v5.9.3
──────────────────────────────────────────────────
Summary: 6 passed, 5 warnings
Shell Completions: Tab completion for all shells
# Install bash completions
claude-flow completions bash > ~/.bash_completion.d/claude-flow
# Install zsh completions
claude-flow completions zsh > ~/.zfunc/_claude-flow
# Install fish completions
claude-flow completions fish > ~/.config/fish/completions/claude-flow.fish
# Install PowerShell completions
claude-flow completions powershell >> $PROFILE
CLI Roadmap
Priority Recommendations
| Priority | Recommendation | Status | Description |
|---|---|---|---|
| 🔴 P0 | Add doctor command |
✅ Done | System diagnostics, dependency checks, config validation |
| 🔴 P0 | Add completions command |
✅ Done | Shell completions for bash, zsh, fish, powershell |
| 🔴 P0 | Add smart error suggestions | ✅ Done | Levenshtein distance for typo corrections |
| 🟡 P1 | Resolve provider config overlap | Pending | Unify provider configs across embeddings/providers commands |
| 🟡 P1 | Add unified logs command |
Pending | Centralized log viewing across daemon, agents, swarms |
| 🟢 P2 | Add upgrade command |
Pending | Self-update CLI to latest version |
| 🟢 P2 | Add interactive shell/REPL mode | Pending | claude-flow shell for interactive command execution |
Implementation Plan
P0 - Critical (Next Release)
# Doctor command - diagnose system health
claude-flow doctor # Full system check
claude-flow doctor --fix # Auto-fix issues where possible
claude-flow doctor --component mcp # Check specific component
# Shell completions
claude-flow completions bash > ~/.bash_completion.d/claude-flow
claude-flow completions zsh > ~/.zfunc/_claude-flow
claude-flow completions fish > ~/.config/fish/completions/claude-flow.fish
P1 - High Priority
# Unified logs command
claude-flow logs # All logs
claude-flow logs --follow # Tail logs
claude-flow logs --component daemon
claude-flow logs --level error
P2 - Nice to Have
# Self-update
claude-flow upgrade # Upgrade to latest
claude-flow upgrade --check # Check for updates
claude-flow upgrade --version 3.1.0
# Interactive shell
claude-flow shell # Enter REPL
> swarm init mesh
> agent spawn coder
> memory search "patterns"