π 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:
| Capability | What It Does |
|---|---|
| π― Spec-First Planning | Agents generate ADRs before writing code, capturing requirements and decisions |
| π Real-Time Compliance | Statusline shows ADR compliance %, catches deviations immediately |
| π§ Bounded Contexts | Each domain (Security, Memory, etc.) has clear boundaries agents can't cross |
| β Validation Gates | hooks progress blocks merges that violate specifications |
| π Living Documentation | ADRs update automatically as requirements evolve |
Specification Features:
| Feature | Description |
|---|---|
| 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 |
| Hierarchical Coordination | Queen 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)