08 — AI Consumption & Integration
AI Consumption Model
Section Overview
What This Is
The AI Consumption and Integration section specifies how IDL is serialised for AI consumption and how AI-generated output re-enters the conformance pipeline.
Why It Exists
AI systems that produce design artifacts without a validation gate bypass the compiler's enforcement mechanisms, introducing unvalidated constructs into governed systems.
How It Works
IDL is serialised to JSON at three abstraction levels. AI output is submitted to the validation layer before acceptance. Prompt primitives encode IDL constraints for system prompt injection.
tokens · components · constraints
prompt primitives injected
schema-only compiler pass · mandatory gate
AI-generated output bypasses no conformance gates. The validation layer is a mandatory prerequisite for acceptance.
IDL is designed to be consumed by AI systems at multiple levels of abstraction: the token schema (for understanding the value structure of a design system), component specifications (for understanding interface contracts), and constraint definitions (for understanding validation rules). Each layer has a defined JSON serialisation format optimised for LLM context window constraints.
Why a Defined AI Consumption Model
AI systems increasingly generate design system artifacts — token values, component specifications, pattern compositions. Without a defined consumption model, these systems receive IDL information in ad-hoc formats and produce output that bypasses compiler validation. This section formalises AI as a class of IDL consumer subject to the same conformance requirements as human authors.
Serialisation Levels
| Level | Contents | Context Window Size |
|---|---|---|
| Token schema | All token declarations, types, tier assignments, alias chains | Optimised for single-call consumption (~8K tokens) |
| Component specification | Single component props, slots, states, variants, token references | Optimised for per-component calls (~4K tokens) |
| Constraint definitions | All normative constraint declarations for a given section | Optimised for targeted validation calls (~2K tokens) |
AI as an IDL Producer
AI systems that generate IDL-conformant output are treated as IDL producers. Their output is submitted to the IDL validation layer before acceptance into a governed design system. There is no trust differential between AI-generated and human-authored IDL output — both are evaluated by the same compiler against the same constraints. The compiler is the conformance authority regardless of who or what produced the source.