08 — AI Consumption & Integration
Prompt Primitives
Prompt primitives are named, reusable instruction fragments for use in AI system prompts. They encode IDL constraints, schema expectations, and validation requirements in natural language form suitable for LLM instruction. Prompt primitives are maintained as part of the IDL governance process and versioned alongside the specification.
Primitive Categories
| Category | Purpose | Example Primitive Name |
|---|---|---|
| Token constraints | Encode token tier rules, alias constraints, and naming conventions. | idl.tokens.tier-reference-rules |
| Component constraints | Encode slot acyclicity, state machine requirements, variant limitations. | idl.components.slot-graph-rules |
| Motion constraints | Encode duration token requirements, easing constraints, choreography models. | idl.motion.duration-requirements |
| Schema format | Encode JSON schema structure for AI output. | idl.schema.output-format-v2 |
| Validation gates | Encode what validation is performed and what failure means. | idl.validation.mandatory-gates |
Using Prompt Primitives
Prompt primitives are injected into system prompts by the consuming application. They are not injected at every call — they are injected during system prompt initialisation and remain active for the duration of the AI session. A system that generates token declarations should inject the token-constraints primitives. A system that generates component specifications should inject the component-constraints primitives.
Primitive Versioning
Each primitive carries a version identifier. When IDL constraints change in a minor or major version, the relevant primitives are updated and re-versioned. Applications that pin to a specific primitive version continue to encode the rules of that version until they update. Primitive version drift — using an old primitive with a new schema — is a common source of AI output that fails validation.