Express pure business intent—resources, temporal intervals, exact rates, guarded workflows, notifications, and responsive UI. AIR compiles and runs the rest with zero application-specific JS or CSS.
air version=2
app customer_manager title="Customer Manager" subtitle="Instant CRM with search, validation, and status lifecycle" initial=overview
theme mode=dark accent=violet
capability storage.local
resource customers label=name
field customers.name text required min=2
field customers.email email required unique
field customers.company text
field customers.status enum values=Active,Trial,Inactive required default=Trial
field customers.joined date required default=today
field customers.notes text long
manage customers lifecycle=archive
access customers view=role:admin|role:user edit=role:admin|role:user
overview
insight customers.total op=count field=name label="Total Customers"
Developers still think in familiar concepts: resources, forms, tables, workflows, permissions, and responsive layouts. AIR eliminates repetitive mechanics by moving scaffolding into a reusable compiler/runtime.
Write compact semantic declarations defining entities, fields, enums, unique constraints, and workflow transitions.
resource customers
name text required min=2
email email required unique
status enum Active,Trial,Inactive
manage customers
AIR compiler infers data tables, search filters, modal edit drawers, responsive record cards, and validation automatically.
Compare exact source footprint and modification context against conventional React 19 + TypeScript + Tailwind reference stacks.
Four carefully curated benchmark applications highlighting AIR's frozen architectural layers.
30-second introduction: Resources, unique email constraints, enum lifecycles, search, filter, and responsive edit drawers.
Guarded state transitions, role-based transition authority, separation-of-duty (no self-approval), and append-only audit history.
Temporal intervals, zero-overlap conflict prevention, exact hourly money rates, duration-based quote calculation, and calendar agenda views.
Flagship supply chain system: Exact integer stock, computed order totals, order fulfillment lifecycle, and edge-triggered low-stock notification alerts.
| Domain Layer | What You / AI Declare (AIR Source) | What AIR Compiler & Runtime Own Automatically |
|---|---|---|
| Data & Schema | Entities, scalar fields, enums, unique constraints | Storage normalization, indexing, input coercion, dirty state detection |
| Workflows | States, transitions, role authority, guards | State machine engine, separation of duty, audit event streams |
| Money & Math | Rates (`rate |
BigInt rational arithmetic, minor-unit rounding, zero float drift |
| User Interface | Overview, insights, manage declarations | Sortable tables, responsive cards, slide-over drawers, form validation |
| Notifications | Condition edge rules (`when="..."`) or events (`on=...`) | Edge triggering, deduplication, unread counts, popover & sheet UI |
| Accessibility | Semantic types and action intent | Keyboard navigation, ARIA live regions, focus management |
AIR is not a black-box prompt engine or runtime LLM dependency. It is a precise, declarative language that AI agents generate cleanly and humans read with total clarity.
Checked into Git. Diffable. Reviewable. Tested in CI. Zero AI required at runtime.
Every metric and feature demonstrated in this showcase is grounded in the public GitHub repository.
Canonical codebase, compiler, runtime, CLI, documentation, and test suites.
Deterministic regression coverage across compiler, state machines, and temporal intervals.
npm test
Automated verification against cl100k_base tokenizer and reference implementations.
npm run benchmark:check
Choose your workflow: let your AI agent write AIR, or write it directly by hand.
Provide this one-shot prompt to Cursor, Claude Code, GitHub Copilot, or ChatGPT to generate valid AIR:
Write an AIR application for a customer CRM.
Include name (required), email (unique), company,
and status (Active, Trial, Inactive).
Add search, filtering, and responsive edit drawers.
Clone the repository, start the dev server, and check declarations using the verified CLI:
git clone https://github.com/joaquimpsoares/AIR.git
cd AIR
npm install
npm run dev
AIR provides an integrated semantic compiler and runtime with nine fully verified capability layers.
Declare business resources with typed scalars (`text`, `email`, `phone`, `date`, `money`, `integer`), unique constraints, enum sets, and relational references.
resource products label=name
field products.sku text required unique
field products.price money currency=USDEnforce role-based authority, separation of duty (preventing self-approval), mandatory comments, and append-only audit history streams below the UI layer.
process expenses state=status
transition submit from=Draft to=Submitted by=owner
transition approve from=Submitted to=Approved by=role:manager separate=submitterFull drawer life-cycle supporting detail inspection, in-place edit hydration, context menus, focus trapping, dirty-state protection, and mobile sheet transformation.
manage customers lifecycle=archive
# Inferred: collection table, mobile cards, right drawer, context menuEvent rules and condition-transition edge triggers (`false → true`) with deduplication, user-scoped read states, unread badge count, desktop popover, and mobile sheet.
notify low_stock when="qty <= reorder_level & qty > 0" tone=warning
notify out_of_stock when="qty <= 0" tone=dangerFirst-class interval types with 10-scenario non-overlap matrix validation, blackout windows, duration algebra, and responsive calendar/agenda artifacts.
field booking_period interval start=start_at end=end_at
invariant no_overlap none=reservations overlaps=booking_periodStrongly-typed rates (`rate
field hourly_rate rate currency=USD unit=h
field quote money computed="booking_period.duration * hourly_rate"Exact integer quantities, multi-resource line items, and declarative child aggregates (`sum`, `count`) without floating point drift.
field total money computed="subtotal - discount + tax"
insight total_rev op=sum field=totalPlatform-neutral 4-level UI hierarchy automatically transforms complex data tables into stacked record cards on mobile and sliding drawers into bottom sheets.
# Zero media queries or CSS needed in app source
Table (≥768px) ⇄ Cards (<768px)
Drawer (≥640px) ⇄ Sheet (<640px)Intent-driven time series trends, workflow DAG graphs, timeline audit events, and accessible exact numeric fallback tables.
# Automatic graph compilation
Workflow DAGs, Audit Timelines, SparklinesEvery metric is mathematically derived from checked-in source code and verified in continuous integration.
| Showcase Module | AIR Canonical Tokens | AIR cl100k Tokens | Conventional cl100k Tokens | Source Compression | App Files | Status |
|---|---|---|---|---|---|---|
| Customer Manager | 56 tokens | 123 tokens | 6,047 tokens | 49.2x | 1 vs 10 | Verified & Measured |
| Approval Workflow | 136 tokens | 300 tokens | 3,907 tokens | 13.0x | 1 vs 7 | Verified & Measured |
| Reservation Hub | 246 tokens | 559 tokens | — | — | 1 file | Curated Showcase |
| Inventory Hub | 283 tokens | 711 tokens | — | — | 1 file | Flagship Showcase |
| Modification Task | AIR Context | AIR Patch | Conventional Context | Conventional Patch | Patch Compression |
|---|---|---|---|---|---|
| Customer MOD1 (Add Suspended status) | 11 tokens | 12 tokens | 38 tokens | 58 tokens | 4.8x |
| Customer MOD2 (Add account_manager field) | 20 tokens | 21 tokens | 21 tokens | 39 tokens | 1.9x |
| Customer MOD3 (Make email optional) | 6 tokens | 5 tokens | 29 tokens | 19 tokens | 3.8x |
| Approval MOD1 (Add Rejected state & transition) | 28 tokens | 43 tokens | 26 tokens | 47 tokens | 1.1x |