What is ARIA
An AI-optimized intermediate representation for the prompt-to-binary pipeline.
The Problem
AI generates Python. A compiler compiles Python. No human reads the Python. So why is the Python there?
Today's AI code generation pipeline produces code in languages designed for human ergonomics. Tab completion. Readable variable names. Syntactic sugar. These features exist for an audience that is increasingly absent from the pipeline: the human author.
The Insight
The Goldilocks zone between natural language (too ambiguous for compilers) and machine code (too low-level for AI) is an AI-optimized intermediate representation.
Not LLVM IR. That was designed for compiling human languages. Something designed from first principles for the AI-author, compiler-consumer pipeline. A representation where the AI can express intent, the compiler can verify correctness, and no one pretends a human needs to read it.
ARIA-IR Design Principles
S-expression syntax
Zero ambiguity, no precedence rules. Every structure is explicitly delimited. The syntax is the AST.
Type-suffixed operations
add.i32, mul.f64. No implicit coercion. Every operation declares its types.
First-class intent annotations
(intent "...") nodes let the AI state why, not just what. Preserved through compilation for verification.
Effect declarations
pure, mem, io, div. Verified at compile time. A pure function cannot perform I/O. The type checker enforces this.
SSA form
%immutable bindings, $mutable locals with explicit set. No hidden reassignment. Every data flow is visible.
The Pipeline
Why Not Just Use Clojure as the Target?
This is the obvious question. Clojure is s-expressions. ARIA-IR is s-expressions. Why not skip the IR and have the AI generate Clojure directly?
Because Clojure is still designed for humans. Namespaces, macros, lazy sequences, ergonomic abstractions. These features make Clojure productive for human authors. They add ambiguity and complexity for AI authors. ARIA-IR keeps the syntax but strips the ergonomics, replacing them with what the AI-to-machine pipeline actually needs: explicit types, declared effects, and verifiable intent.
Why Implement the Toolchain in Clojure?
The structural DNA argument. Parsing s-expressions in a language that is s-expressions. The parser collapses. The Clojure reader does most of the work. An ARIA-IR file is something Clojure can practically read natively. This is not a coincidence. It is the right choice.
The toolchain does not fight the representation. It is the representation. A Lisp compiler for a Lisp IR. The tool and the material are the same substance.