Skip to content

Choosing a Compiler

Compilers translate resolved xtyle definitions into platform-specific output. The xtyle project ships reference compilers; the community builds the rest.

CompilerPackageStatusConsumes
CSS@xtylejs/compiler-cssAvailableVisual
LLM Prompt@xtylejs/compiler-llm-promptAvailableVisual + Verbal + Voice
Svelte@xtylejs/compiler-svelteAvailableVisual (components)
TailwindPlannedVisual
  1. Resolve — Walk the parent chain, merge tokens bottom-up, apply context variants
  2. Compile — Feed the resolved definition to a compiler
  3. 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.

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.