08 — AI Consumption & Integration
Validation Layer
AI-generated IDL output MUST be validated against the compiler before being accepted into a design system. The validation layer provides a lightweight schema-only validation mode suitable for CI integration. It performs schema structural validation and token tier reference checking without executing the full Transform phase. It is a mandatory prerequisite, not an optional quality gate.
Validation Layer vs. Full Compilation
| Check | Validation Layer | Full Compilation |
|---|---|---|
| JSON schema structural validity | Yes | Yes |
| Token tier reference rules | Yes | Yes |
| Alias chain resolution and depth | Yes | Yes |
| Slot graph acyclicity | No — requires full AST | Yes |
| State machine completeness | No — requires full AST | Yes |
| Composition rule compliance | No — requires full AST | Yes |
| Platform emitter compatibility | No | Yes (per target) |
Validation Layer in CI/CD
The validation layer is designed to run in CI/CD pipelines on AI-generated output before that output is committed to the IDL source tree or submitted for full compilation. It exits with code 0 on valid output, 2 on invalid output. JSON-format error reporting is available via --reporter json. The validation layer is distributed as a separate package from the full compiler to minimize CI dependency weight.
Acceptance Criteria
AI-generated output passes the validation layer MUST then pass full compilation before it is accepted into the design system. Passing the validation layer does not constitute acceptance — it is a necessary but not sufficient condition. The full compiler's conformance evaluation is the final acceptance gate. No AI-generated output bypasses full compilation under any operational condition.