Virgo Documentation

Architecture & Protocol Overview

Virgo is the deterministic intent engine. It isolates probabilistic LLM reasoning from deterministic code generation using the Application Domain Model (ADM) as a mathematical firewall.

1. The Core Thesis

Modern AI code generators (copilots, autonomous coding agents) generate raw source code at speeds human engineers cannot audit or review. In doing so, they rapidly compound Cognitive Debt—the burden placed on human developers to maintain fragile, non-deterministic machine code.

The Simway Axiom
Source code is not an asset; source code is maintenance debt. The only immutable asset an organization possesses is Domain Intent.

Virgo treats the LLM exclusively as a Semantic Mapper. The model's sole responsibility is to translate unstructured human conversational intent into a strongly-typed intermediate mathematical representation: the Application Domain Model (ADM). Once the ADM is validated, a 100% deterministic template-driven compiler takes over to generate the executable application.

2. The 3-Phase Pipeline

Phase 1: Chaos (Semantic Mapping)

Probabilistic LLM extracts business intent, ubiquitous language, commands, and rules from conversational natural language into the strict ADM JSON schema.

Phase 2: Control (The Ingestion Gate)

Deterministic, non-AI verification layer. Validates the ADM against a registry of invariants and executes Bounded Model Checking against human BDD scenarios.

Phase 3: Execution (The Spout Compiler)

Deterministic code generation engine. Transforms the validated ADM into strongly-typed Domain Events, Aggregate Roots, Event Stores, and Spring Boot Applications.

3. The Disposable Code Doctrine

Because the entire backend application is generated deterministically from the ADM, the generated code is 100% disposable.

  • Zero Maintenance Debt: Human engineers never edit, debug, or patch the generated Java/Spring Boot code.
  • Zero Migration Debt: State is persisted as an append-only log of immutable Domain Events. When domain rules evolve, old code is discarded, the new application is compiled, and the event stream is replayed through compiled upcasters.
  • Human Decision Privilege: The human domain expert reviews intent in plain English or visual aggregate topologies, never syntactic code diffs.

4. The Application Domain Model (ADM)

The Application Domain Model (ADM) is the strict JSON Intermediate Representation (IR) bridging the probabilistic LLM and the deterministic compiler.

{
  "boundedContext": "CargoTracking",
  "aggregates": [
    {
      "name": "Cargo",
      "rootEntity": "Cargo",
      "identity": "trackingId",
      "commands": [
        {
          "name": "BookCargo",
          "parameters": [
            { "name": "origin", "type": "LocationId" },
            { "name": "destination", "type": "LocationId" }
          ],
          "emits": "CargoBooked"
        }
      ],
      "events": [
        {
          "name": "CargoBooked",
          "fields": [
            { "name": "trackingId", "type": "String" },
            { "name": "origin", "type": "LocationId" },
            { "name": "destination", "type": "LocationId" }
          ]
        }
      ]
    }
  ]
}

5. The Sub-Turing Boundary

Why doesn't the ADM suffer from the Halting Problem or infinite loops? Because the ADM is mathematically designed to be Sub-Turing.

The ADM is strictly a Finite State Machine (FSM) composed of pure functions:

  • Invariants: Pure functions returning boolean values (State × Command → Boolean).
  • Reducers: Pure functions computing state transitions (State × Event → NewState).
  • Outbound Ports: Any Turing-complete computation (external payment gateways, I/O, heavy algorithms) is pushed across the interface boundary into decoupled plugin adapters.

6. Reference Domains & Empirical Benchmarks

To validate the engine against established industry benchmarks, Virgo executes autonomous machine-first verification against canonical domain models:

Cargo Tracking (Eric Evans)

Autonomous verification harvested via the Domain Actor harness:

  • Domain Coverage: 100% invariant capture across Cargo booking, routing specification, handling events, and carrier movement.
  • ADM Extraction: Synthesized from conversational domain specifications without human code scaffolding.
  • Compilation Target: Compiled cleanly to a strongly-typed Event-Driven Spring Boot Application via Spout.
Public Library Circulation Domain

Multi-aggregate lifecycle and circulation invariant benchmark:

  • Domain Coverage: Full lifecycle modeling across Book, Patron, Hold, and Loan aggregates with overdue calculation and hold-expiry rules.
  • Validation Gate: Strict entity identity and non-empty required state enforcement across aggregates.
  • Event Projection: Deterministic CQRS read-model rehydration from immutable domain events.

7. Founder & Mission

Virgo is designed and built by Simway:

Sim Vincent (Founder & Chief Architect)

Systems architect and founder of Simway. Author of The Day Source Code Became Debt. Leads product vision, domain model governance, and the core intent philosophy.

8. Enterprise Data Sovereignty & Portability

Virgo adheres to strict Enterprise Sovereignty and Zero Lock-In principles:

  • Open Intermediate Representation: The Application Domain Model (ADM) is an open, portable JSON schema owned 100% by the user. You retain full intellectual property over your domain rules, invariants, and aggregate definitions.
  • Standard Enterprise Ecosystem: Generated applications compile cleanly into standard enterprise Java 21 / Spring Boot 3 architectures with zero proprietary runtime SDKs or restrictive licensing encumbrances.
  • Deploy Anywhere: Compiled applications package into standard OCI/Docker container images that run natively on any cloud provider (AWS, Azure, Google Cloud), on-premises Kubernetes clusters, or bare metal.
  • Immutable Auditability: Persisted state lives purely as an immutable, append-only log of domain events, providing complete regulatory audit trails and eliminating traditional database migration debt.