Compilers
Compilers are xtyle’s integration surface. Where xript has runtimes that execute scripts, xtyle has compilers that translate definitions into consumer-specific output.
What a Compiler Does
Section titled “What a Compiler Does”A compiler reads a resolved xtyle definition (inheritance already applied) and produces output for a specific consumer.
The spec defines:
- The input contract — what a resolved definition looks like
- The compiler interface — how a compiler declares what it consumes and produces
- Nothing about the output format — that’s the compiler’s business
Compiler Examples
Section titled “Compiler Examples”| Compiler | Consumes | Produces |
|---|---|---|
| CSS | Visual | Custom properties |
| Tailwind | Visual | tailwind.config preset |
| WordPress | Visual + Verbal | theme.json + template strings |
| LLM Prompt | Verbal + Voice | System prompt / voice instruction |
| Brand PDF | All three | Formatted brand guidelines |
The Interface
Section titled “The Interface”interface XtyleCompiler { name: string; consumes: ("visual" | "verbal" | "voice")[]; produces: string; compile(definition: ResolvedXtyleDefinition): CompilerOutput;}First-Party Compilers
Section titled “First-Party Compilers”The xtyle project ships a small set of reference compilers:
- CSS — visual tokens to CSS custom properties (available now)
- Tailwind — visual tokens to Tailwind preset (planned)
- LLM Prompt — verbal + voice to system prompt (planned)
Everything else is community territory.