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.

Conceptual Model
IDL spec → JSON
tokens · components · constraints
AI system context
prompt primitives injected
↓ AI-generated IDL JSON output
Validation layer
schema-only compiler pass · mandatory gate
Accepted into design system
or
Rejected — schema violation

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

LevelContentsContext Window Size
Token schemaAll token declarations, types, tier assignments, alias chainsOptimised for single-call consumption (~8K tokens)
Component specificationSingle component props, slots, states, variants, token referencesOptimised for per-component calls (~4K tokens)
Constraint definitionsAll normative constraint declarations for a given sectionOptimised 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.