The Language
How Naze is structured: three layers, a tiered grammar, and code that reads like a document.
The Three-Layer Architecture
One source file compiles into three distinct layers. Humans need all three. AI agents typically need only Layer 1.
Presentation
UI tree, themes, animations, layout, colors, typography
Interaction
Event handlers, navigation, actions, validation
Data
State, computed values, server functions, data bindings
Three Outputs From One Source
The HTML/CSS/JS stack forces AI models to navigate three separate languages, a virtual DOM, bundler configurations, and framework-specific abstractions. Naze eliminates this waste — the compiled binary is the API.
Tiered Grammar
The grammar is partitioned into independent tiers. Lower tiers never depend on higher ones. An agent building dashboards needs only Tier 0.
Layout, elements, state, events, themes, components
Fetch, streams, server functions, storage, timers
Models, declarative queries
Prompt blocks, provider configuration
Concurrency, file IO, networking (future)
The command nazec grammar --format gbnf exports the grammar for constrained decoding, enabling local 3-7B models to match cloud-scale quality at zero cost.
“Simplicity is the ultimate sophistication.”
See It in Action
Components compose with use, themes resolve with dot notation — and the compiler inlines it all. σ stays at 1.
app "Counter" {
state count = 0
let title = "My Counter"
column padding: 20px, gap: 16px {
heading "{title}"
text "Current count: {count}"
rect width: 200px, height: 50px,
color: #2563eb, radius: 8px {
text "Increment"
on click: set count = count + 1
}
rect width: 200px, height: 50px,
color: #dc2626, radius: 8px {
text "Reset"
on click: set count = 0
}
}
}Why curly braces? Modern LLMs handle indentation well in fresh code, but still miscount whitespace when editing existing files — exactly the agentic workflow Naze targets. In Python, one wrong indent is a syntax error; with braces, it's cosmetic. Braces make Naze fault-tolerant by design. Research source ↗