ruflo

πŸ“‹ Spec-Driven Development

/docs/what-is-it-exactly-agents-that-learn-build-and-work-perpetually/spec-driven-development

Complex projects fail when implementation drifts from the original plan. Ruflo solves this with a spec-first approach: define your architecture through ADRs (Architecture Decision Records), organize code into DDD bounded contexts, and let the system enforce compliance as agents work. The result is implementations that match specifications β€” even across multi-agent swarms working in parallel.

How It Prevents Drift:

CapabilityWhat It Does
🎯 Spec-First PlanningAgents generate ADRs before writing code, capturing requirements and decisions
πŸ” Real-Time ComplianceStatusline shows ADR compliance %, catches deviations immediately
🚧 Bounded ContextsEach domain (Security, Memory, etc.) has clear boundaries agents can't cross
βœ… Validation Gateshooks progress blocks merges that violate specifications
πŸ”„ Living DocumentationADRs update automatically as requirements evolve

Specification Features:

FeatureDescription
Architecture Decision Records70+ ADRs defining system behavior, integration patterns, and security requirements
Domain-Driven Design5 bounded contexts with clean interfaces preventing cross-domain pollution
Automated Spec GenerationAgents create specs from requirements using SPARC methodology
Drift DetectionContinuous monitoring flags when code diverges from spec
Hierarchical CoordinationQueen agent enforces spec compliance across all worker agents

DDD Bounded Contexts:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    Core     β”‚  β”‚   Memory    β”‚  β”‚  Security   β”‚
β”‚  Agents,    β”‚  β”‚  AgentDB,   β”‚  β”‚  AIDefence, β”‚
β”‚  Swarms,    β”‚  β”‚  HNSW,      β”‚  β”‚  Validation β”‚
β”‚  Tasks      β”‚  β”‚  Cache      β”‚  β”‚  CVE Fixes  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Integration β”‚  β”‚Coordination β”‚
β”‚ agentic-    β”‚  β”‚  Consensus, β”‚
β”‚ flow,MCP    β”‚  β”‚  Hive-Mind  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key ADRs:

  • ADR-001: agentic-flow@alpha as foundation (eliminates 10,000+ duplicate lines)
  • ADR-006: Unified Memory Service with AgentDB
  • ADR-008: Vitest testing framework (10x faster than Jest)
  • ADR-009: Hybrid Memory Backend (SQLite + HNSW)
  • ADR-026: Intelligent 3-tier model routing
  • ADR-048: Auto Memory Bridge (Claude Code ↔ AgentDB bidirectional sync)
  • ADR-049: Self-Learning Memory with GNN (LearningBridge, MemoryGraph, AgentMemoryScope)