Compilation Pipeline
From DMX specification to production-ready platform in 7 deterministic stages. Like LLVM for enterprise software.
End-to-End Flow
Spec Authoring
Developers write .dmx specifications — either directly (zero LLM) or with LLM-assisted authoring validated by the Critics system.
- Native DMX authoring (zero LLM cost)
- LLM-assisted draft generation with critic validation
- Markdown and OpenAPI import paths
- Workshop editor with syntax highlighting and auto-completion
Parsing
The Lark LALR(1) parser transforms .dmx source into a typed, validated ApplicationIR — the compiler's intermediate representation.
- Lark LALR(1) grammar — deterministic, no ambiguity
- 8 validators run on parse output
- Supports DMX, Markdown, and OpenAPI input formats
- Produces unified ApplicationIR
Cognitive Passes
100+ passes across 16 phases enrich, transform, and validate the IR. Pure functional transforms — no side effects, fully deterministic.
- 100+ passes organized in 16 sequential phases
- Type resolution, dependency analysis, security policy injection
- Cross-module reference validation
- IR enrichment: defaults, computed fields, indexes, constraints
- Each pass is a pure function: IR in → IR out
Code Generation
200+ code emitters transform the enriched IR into target-language source code across Python, Java, SQL, Docker, and configurations.
- 200+ emitters across 8 output categories
- Python/FastAPI: models, routes, services, middleware, tests
- Java/Spring Boot: entities, controllers, repositories, security (WIP)
- SQL: DDL, migrations (Alembic + Liquibase), seed data
- Infrastructure: Docker, Compose, Kong, Nginx, Traefik
Quality Gates
270+ automated gates validate both the IR and generated code. Three severity levels ensure nothing ships without passing every check.
- 270+ gates across IR validation and code output
- BLOCK (fatal): compilation halts — must fix
- WARN (advisory): flagged for review
- INFO (telemetry): logged for observability
- OWASP, performance, compliance, architecture validation
Unified Test System (UTS)
1,000+ tests generated and executed per microservice across four tiers. A service reaches the evidence pack only after its tiers run.
- Contracts — OpenAPI conformance and input validation
- Behavior — business logic, nested CRUD, pagination, aggregation, webhooks, data integrity, per-field PATCH
- Security — auth/authz and JWT flow, tenant isolation (IDOR), injection, CSRF, security headers, rate limiting, mass assignment, sensitive-field and error leakage, function-level auth (BFLA)
- Enterprise — audit trail, PII masking, observability, service-to-service integration
- pytest (Python) and JUnit 5 (Java, WIP), with fixtures and seed data
- Merkle-tree provenance: full traceability from spec → IR → code
Running Platform
The complete compiled output: API servers, databases, auth, observability, infrastructure — ready to deploy.
- Fully configured API servers (FastAPI; Spring Boot WIP)
- Database schemas with migrations and RLS policies
- Auth middleware (JWT, RBAC, ABAC, MFA)
- Observability: Prometheus, Jaeger, structured logging
- Docker Compose for platform-wide orchestration
The Compiler Wall
The Compiler Wall is the architectural boundary between probabilistic AI and deterministic infrastructure. LLM involvement (optional) stops at spec authoring. Everything beyond the wall — parsing, cognitive passes, code generation, quality gates — is 100% deterministic.
Before the Wall
Spec authoring — optionally LLM-assisted with critic validation. Non-deterministic by nature, but validated before crossing.
After the Wall
Parsing → Passes → Emission → Gates → Tests. Same IR in, same code out. No heuristics, no fallbacks. Forever.
Quality Gates
270+ automated gates validate both the intermediate representation and the generated code. Three severity levels ensure nothing ships unchecked.
BLOCK
Fatal — compilation halts immediately. Must fix before proceeding. Security violations, type mismatches, missing references.
WARN
Advisory — compilation continues, flagged for review. Performance hints, deprecated patterns, naming conventions.
INFO
Telemetry — logged for observability and audit trail. Compilation metrics, coverage data, provenance events.
DMX vs. AI App Builders
DevMatrix is not an AI app generator — it is a deterministic compiler. The difference is architectural, not incremental.
| Dimension | DevMatrix | Lovable | Replit Agent | Devin | v0 |
|---|---|---|---|---|---|
| Approach | Deterministic compiler | LLM prompt → React app | AI agent + cloud IDE | Autonomous AI engineer | LLM prompt → Next.js app |
| Determinism | 100% — same spec, same output | Non-deterministic | Non-deterministic | Non-deterministic | Non-deterministic |
| Quality Assurance | 270+ automated gates | None built-in | None built-in | Self-review (LLM) | AutoFix model (errors only) |
| Test Generation | 38,000+ auto-generated | None | Manual / suggested | Partial, non-deterministic | None |
| Provenance | Full Merkle-tree traceability | None | None | None | None |
| Backend | Full — FastAPI + DB + auth + middleware (Spring Boot WIP) | BaaS only (Supabase) | LLM-generated (variable quality) | LLM-generated (variable quality) | Minimal (Next.js API routes) |
| Frontend | Roadmap — backend-first compiler | React + Tailwind | LLM-generated (any framework) | LLM-generated (any framework) | Next.js + Tailwind + shadcn |
| Infrastructure | Docker, Compose, Kong, Nginx, Traefik, configs | Managed (no control) | Managed (Replit hosting) | Manual setup required | Managed (Vercel only) |
| Code Ownership | 100% yours — clean architecture, full source | Accessible via GitHub sync | Accessible (export) | Accessible (your repo) | Accessible via GitHub sync |
| Deploy Anywhere | Any provider — Docker portable | Locked to Supabase + Netlify | Locked to Replit (or export) | Any (manual deploy) | Locked to Vercel |
| Reproducibility | Byte-identical across runs | Varies per prompt | Varies per prompt | Varies per run | Varies per prompt |
| Enterprise Compliance | OWASP, SOC 2, HIPAA, PCI DSS, GDPR, ISO 27001 | None | None | None | None |
Domain Agnostic
DMX compiles any domain that can be specified — healthcare, fintech, insurance, logistics, e-commerce, SaaS platforms. The compiler is domain-agnostic: it reads your specification and produces production-ready code for whatever you describe.