mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-25 22:53:17 +09:00
Closes design half of #1723 (and dup #1724). Builds on ADR-086 (Agent
Federation) and the G2 work that landed real Ed25519 signing in
6f495369. Audit-trail-style ADR following the same shape as
ADR-093/094/095/096.
Four cohesive parts, each shippable as one iteration:
P1 — Budget envelope on federation_send
Optional { maxTokens, maxUsd } + maxHops (default 8, generous but
finite). Budget decremented on the receiving peer, propagated to
onward delegation as remaining-budget, refused with BUDGET_EXCEEDED
on overshoot. Hop counter alone closes the recursion-loop class.
P2 — Peer state machine: ACTIVE / SUSPENDED / EVICTED
Trust-score-driven breaker. Suspended on (trailing-24h cost >
$5 default OR trailing-1h failure ratio > 50%). Auto-recovery
after 30min cooldown + health probe. Eviction permanent until
admin re-adds.
P3 — Cost-tracker integration
federation_spend event published on every send completion.
cost-tracker aggregates rolling windows; breaker queries on each
transition decision. One-way coupling — federation publishes,
cost-tracker exposes via the existing cost-report skill.
P4 — Doctor + observability
ruflo doctor reports peer states + cost; new
federation_breaker_status MCP tool returns the same data
programmatically; structured logs on every transition.
Trade-offs documented:
- Optional budget (backward compat) over required-everywhere
- max_hops=8 over unlimited
- Peer state owned by federation plugin over cost-tracker (federation
owns peer identity; cost-tracker provides numbers)
- Pull-on-decision over push-on-spend (one direction of coupling)
Acceptance criteria pin: synthetic recursion ring terminates at
maxHops; cost-threshold breach auto-suspends + auto-recovers; full
1917-test baseline stays green.
Issue #1724 was an exact duplicate (24s after #1723) — closed with a
pointer comment to this ADR.
Claude Flow V3 - Architecture Decision Records
All ADRs are located in /v3/implementation/adrs/.
Quick Links
| ADR | Title | Status |
|---|---|---|
| ADR-001 | Adopt agentic-flow as Core Foundation | Complete |
| ADR-002 | Domain-Driven Design Structure | Complete |
| ADR-003 | Single Coordination Engine | Complete |
| ADR-004 | Plugin Architecture | Complete |
| ADR-005 | MCP-First API Design | Complete |
| ADR-006 | Unified Memory Service | Complete |
| ADR-007 | Event Sourcing | Complete |
| ADR-008 | Vitest Testing | Complete |
| ADR-009 | Hybrid Memory Backend | Complete |
| ADR-010 | Node.js Only | Complete |
| ADR-011 | LLM Provider System | Complete |
| ADR-012 | MCP Security Features | Complete |
| ADR-013 | Core Security Module | Complete |
| ADR-014 | Workers System | Complete |
| ADR-015 | Unified Plugin System | Complete |
| ADR-016 | Collaborative Issue Claims | Complete |
| ADR-017 | RuVector Integration | Complete |
| ADR-018 | Claude Code Integration | Complete |
| ADR-019 | Headless Runtime Package | Complete |
| ADR-020 | Headless Worker Integration | Complete |
| ADR-046 | Dual Umbrella: claude-flow + ruflo | Accepted |
| ADR-047 | Fast Mode Integration | Proposed |
Summary Documents
- ADR Status Summary - Implementation status overview
- V3 ADRs Master - Complete ADR document
- Full README - Detailed index with roadmap
Performance Targets
| Metric | Target | Status |
|---|---|---|
| HNSW Search | 150x-12,500x faster | ✅ Achieved |
| Flash Attention | 2.49x-7.47x speedup | ✅ Achieved (alpha.102) |
| Memory Reduction | 50-75% | ✅ Achieved |
| MCP Response | <100ms | ✅ Achieved |
| CLI Startup | <500ms | ✅ Achieved |
Neural Features (alpha.102+)
| Component | Status | Lines | Notes |
|---|---|---|---|
| SONA Optimizer | ✅ Real | 841 | Pattern learning from trajectories |
| EWC++ Consolidation | ✅ Real | ~600 | Fisher matrix, prevents forgetting |
| MoE Router | ✅ Real | ~500 | 8 experts with gating network |
| Flash Attention | ✅ Real | ~500 | O(N) block attention |
| LoRA Adapter | ✅ Real | ~400 | 128x compression (rank=8) |
| Hyperbolic Embeddings | ✅ Real | - | Poincaré ball model |
| Int8 Quantization | ✅ Real | - | 3.92x memory savings |
Security Status
| CVE | Severity | Status |
|---|---|---|
| CVE-2 | Critical | ✅ Fixed |
| CVE-3 | Critical | ✅ Fixed |
| HIGH-1 | High | ✅ Fixed |
| HIGH-2 | High | ✅ Fixed |
Security Score: 10/10
Last Updated: 2026-01-14 CLI Version: @claude-flow/cli@3.0.0-alpha.104