Skip to main content

Requirements-as-Code

At the heart of FlowOn is a revolutionary philosophy: The requirements documentation is the executable code.

This principle which we call Requirements-as-Code (RaC) embodies the idea that code should serve as the ultimate source of truth. Instead of maintaining separate, often outdated documentation for software requirements, we express requirements in a well-structured domain-specific language. The code becomes the authoritative reference for what the system does.

The Problem with Traditional Documentation

┌─────────────────────────────────────────────────────────────────────┐
│ TRADITIONAL REQUIREMENTS LIFECYCLE │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ MONTH 1 MONTH 6 MONTH 12 │
│ ──────── ──────── ───────── │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌──────────┐ │
│ │ SRS │ │ SRS │ │ SRS │ │
│ │ Document │ │ Document │ │ Document │ │
│ │ │ │ (outdated) │ │ (fiction)│ │
│ │100% accurate│ │ 60% accurate│ │ 20% acc. │ │
│ └──────┬──────┘ └──────┬──────┘ └────┬─────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────┐ ┌─────────────┐ ┌──────────┐ │
│ │ System │ │ System │ │ System │ │
│ │ Code │ │ Code │ │ Code │ │
│ │ │ │ (evolved) │ │(diverged)│ │
│ │ Matches SRS │ │ Partially │ │ Bears no │ │
│ │ │ │ matches SRS │ │ relation │ │
│ └─────────────┘ └─────────────┘ └──────────┘ │
│ │
│ RESULT: Documentation debt, knowledge loss, compliance risk │
│ │
└─────────────────────────────────────────────────────────────────────┘

Traditional software development frequently involves maintaining separate requirement documents that outline how the system should behave. However, these documents suffer from critical flaws:

ProblemImpact
Rapid ObsolescenceDocuments become outdated as software evolves
Translation LossesRequirements interpreted differently by different people
No EnforcementCode can diverge from documented requirements
Maintenance BurdenKeeping docs and code in sync doubles the work
AmbiguityNatural language requirements are open to interpretation

The Requirements-as-Code Solution

┌─────────────────────────────────────────────────────────────────────┐
│ REQUIREMENTS-AS-CODE LIFECYCLE │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ MONTH 1 MONTH 6 MONTH 12 │
│ ──────── ──────── ───────── │
│ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ │ │
│ │ FLOWON LANGUAGE (FoL) ARTIFACTS │ │
│ │ │ │
│ │ • Logic Formulas define calculations and rules │ │
│ │ • Decision Tables define business decisions │ │
│ │ • Validations define data constraints │ │
│ │ • Flows define process automation │ │
│ │ • BPM Processes define workflows │ │
│ │ • Events define system, domain, and integration triggers │ │
│ │ • APIs define standardized service interfaces for │ │
│ │ external access │ │
│ │ │ │
│ │ ═══════════════════════════════ │ │
│ │ THESE ARE THE REQUIREMENTS AND │ │
│ │ THE EXECUTABLE SYSTEM - ONE AND │ │
│ │ THE SAME, ALWAYS IN SYNC │ │
│ │ ═══════════════════════════════ │ │
│ │ │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────┐ ┌─────────────┐ ┌──────────┐ │
│ │ Generated │ │ Generated │ │ Generated│ │
│ │ Docs │ │ Tests │ │ APIs │ │
│ │ │ │ │ │ │ │
│ │ Always │ │ Always │ │ Always │ │
│ │ accurate │ │ complete │ │ current │ │
│ └─────────────┘ └─────────────┘ └──────────┘ │
│ │
│ RESULT: Single source of truth, zero drift, complete traceability │
│ │
└─────────────────────────────────────────────────────────────────────┘

With Requirements-as-Code:

  • Requirements ARE the system: No translation, no interpretation, no drift
  • Version Control: Requirements tracked in Git with full history
  • Auto-Generated Documentation: PDF/Word docs generated from the living system
  • Auto-Generated Tests: Test cases derived directly from requirements
  • CI/CD Integration: Requirements changes flow through automated pipelines
  • AI Assistance: Specialized AI agents help build and validate models

The RaC Workflow

┌─────────────────────────────────────────────────────────────────────┐
│ REQUIREMENTS-AS-CODE WORKFLOW │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────┐ │
│ │ DOMAIN EXPERT │ │
│ │ (Citizen Dev) │ │
│ └────────┬────────┘ │
│ │ │
│ │ Models requirements using FlowOn Tools │
│ ▼ │
│ ┌─────────────────┐ │
│ │ FLOWON LOGIC │ │
│ │ FLOWON BPM │ ◄── Visual design, no coding │
│ │ FLOWON API │ │
│ └────────┬────────┘ │
│ │ │
│ │ Commits changes to source control │
│ ▼ │
│ ┌─────────────────┐ │
│ │ GIT REPO │ │
│ │ │ ◄── Full version history │
│ │ • .flop files │ ◄── Branch/merge workflows │
│ │ • Data maps │ ◄── Code review process │
│ └────────┬────────┘ │
│ │ │
│ │ Triggers CI/CD pipeline │
│ ▼ │
│ ┌─────────────────┐ │
│ │ AUTOMATION │ │
│ │ PIPELINE │ │
│ │ │ │
│ │ • Build │ │
│ │ • Test │ ◄── Auto-generated tests │
│ │ • Deploy │ ◄── Environment transformations │
│ │ • Validate │ │
│ └────────┬────────┘ │
│ │ │
│ │ Reports results │
│ ▼ │
│ ┌─────────────────┐ │
│ │ DOMAIN EXPERT │ ◄── Immediate feedback │
│ │ NOTIFICATION │ ◄── Test results │
│ └─────────────────┘ ◄── Deployment status │
│ │
└─────────────────────────────────────────────────────────────────────┘

By making "the requirements documentation the executable code itself," we ensure that software remains accurate, up-to-date, and aligned with its intended behavior at all times. Instead of relying on static documents, we embrace a living system where the code, tests, and infrastructure declaratively define what the software should be.

Key Benefits of RaC

BenefitDescription
Single Source of TruthRequirements and implementation are one and the same
Zero Documentation DriftImpossible for docs to become outdated
Complete TraceabilityEvery behavior traces to a requirement
Instant Impact AnalysisSee exactly what changes affect
Compliance ReadyAlways audit-ready with full history
AI-Assisted DevelopmentAI can help build and validate models

Next Steps