Choosing a Compiler
Compilers translate resolved xtyle definitions into platform-specific output. The xtyle project ships reference compilers; the community builds the rest.
Available Compilers
Section titled “Available Compilers”| Compiler | Package | Status | Consumes |
|---|---|---|---|
| CSS | @xtylejs/compiler-css | Available | Visual |
| LLM Prompt | @xtylejs/compiler-llm-prompt | Available | Visual + Verbal + Voice |
| Svelte | @xtylejs/compiler-svelte | Available | Visual (components) |
| Tailwind | — | Planned | Visual |
How Compilers Work
Section titled “How Compilers Work”- Resolve — Walk the parent chain, merge tokens bottom-up, apply context variants
- Compile — Feed the resolved definition to a compiler
- Output — CSS custom properties, config files, system prompts, whatever the compiler produces
The resolution step is shared across all compilers. A resolved definition is flat — no inheritance references, no parent pointers, just tokens.
Building a Compiler
Section titled “Building a Compiler”A compiler implements the XtyleCompiler interface:
interface XtyleCompiler { name: string; consumes: ("visual" | "verbal" | "voice")[]; produces: string; compile(definition: ResolvedXtyleDefinition): CompilerOutput;}Your compiler declares which pillars it reads and what it produces. The spec doesn’t constrain output formats — that’s your business.