the language · · synced from the layer's source

Genie is the programming language of agentic commerce. Every word it says is a member of the layer's sets; every program compiles to the layer's documents.

Not from scratch
A thin surface over three bases: CUE gives the sets (every venue, chain, vault with its caps, product, operation, protocol with its stages, hop, guard) and the shapes a program compiles into; activegraph gives the runtime (the graph is the world, behaviors are physics, the trace is the proof); Motoko gives agents as actors with a total machine.
The core primitive
The sale, twelve hops: offer in, classify, listed, hired, delivered, graded, settled, legs, accrued, split, paid, recorded. A hop is a move, a leg is a line of an agreement, a vault is a first citizen with its caps under grid metering, a subscription is a move that renews a period.
The policy
No open venue, no undefined definition. A program is refused, with the code and the nearest names, unless every machine is total, every signature stands behind a guard, every money move names a vault within the register's caps on a meter product, every symptom has a fix, every door proposes a next step on every state and ends with a person.
System One native
The grader is a word of the language, not a library. assure 0.7 on a move means the move happens only when System One has graded what the move claims (a delivery, an answer, a fill) at least that score; asks spec_met unsupported_claim ending cheat_shaped names which of the four questions are put (all four when absent), each a score question with its criteria, composed under fixed thresholds (complete 0.7 · review 0.4 · cheat 0.5) into one grade and a verdict (complete · needs_review · reject). The generated agent carries the client: it grades, bills the grade on the move's meter product, records score, verdict, the four answers and the tokens used in the event, and refuses assure_below with the answers. The IDE completes only those questions.
Every chain, no unimplemented paths
use chain every, on every, cap USDC every: a money move names every chain its vault caps, with a cap per chain, and is refused (chain_uncovered) when a chain the vault pays on has no move. The layer's compatibility is compiled into the program, not patched per venue. The registers translated below are every protocol, vault, programmable venue, lambda and flow of the layer as programs, with the coverage matrix.
Extensions, never core changes
A venue or a protocol adds sets and clauses in a pack: a trading venue's time compressor, the layer's on-chain intents, subscriptions. The checker types the arguments; the compiler carries them through.
Compiled, not promised
One source → the coord documents (vetted), a runnable agent, collectors, a policy contract, transition tables, an n8n workflow, a Show Me Around tour and this helpdesk's graph. What a compiler cannot honestly produce is said so below.

a program · the checker runs here, in your browser, on the same sets

Write a program. Every refusal names its line, its code and the nearest member of the set.

the sets · what a program may say

The vocabulary is the register. Nothing else is a word.

the compile map · and what is too difficult

From one source to every face of the layer.

targetwhat it ishow it is proven
flow · tour · .cuethe program as the coord language: one #LambdaFlow per agent, one per door with its #TourMetacue vet against the package
helpdeskthe #HdGraph: product → surfaces → symptoms → fixes, rules, policies, terms — the graphs the studio runscue vet; connected from the product
.mjsthe runnable agent: guards, the judge, caps per transfer and per day, the carrier, signers, meters; behaviors, fork, diff, replay; one pipe envelope per event; the trace as a twig heada full sale in the tests; over the cap, below the grade, past a final state refused
.pycollectors (header collectors, harvesters) and a mirror of the machine; stdlib only; never a keycompiles, runs, prints its summary
.solthe policy contract: states, allowed moves, guards, caps per settle with a day accumulator; checkSettle a carrier consults; holds and sends nothingsolc --bin
.rstransition tables for the pipe: states, moves, guards, caps, extensions; totality testsrustc --test green
n8nan importable workflow: trigger, request per read and per op, IF per guarded move; no signer node is ever generatedimports; not executed

Too difficult, said plainly. Solidity and Rust get policy and tables, not business logic: a compiler cannot write the body of a carrier, a hook or an adapter from a program and must not pretend to. Python gets collectors and a mirror of the machine, never a key. The n8n export is a shape to import. The words a visitor reads are the author's; the compiler never invents copy. There is no tree-sitter grammar yet (Vim and TextMate grammars and a language server are shipped). A partner studio's integration needs their side; this ships the symbols, the language server and the flow documents a studio reads.

the topology · classified from the registers, not by hand

A programmable venue, a genie protocol, a client program, a pack.

programmable venue
a row of the venue register with an adapter lane: a program's move names it with venue; envelopes to it carry the venue. Without an adapter a venue is supply we buy or a directory we list on — a member, never a settle target.
genie protocol
a program whose agent follows protocol with stages in the register and an agreement with legs: the machine is the register's; the program adds the door, the knowledge, the collectors. Every protocol with a program is automatically a tour and a helpdesk.
client program
a program without follows: an agent of ours — a payout, a case, a subscription — that speaks venues and protocols through operations and components and settles through a vault.
pack
a venue or a protocol's own sets and clauses; the core grammar never changes for it.

the registers translated · genie import · every program generated from the layer's source, never edited

Every protocol with stages, every capped vault, every programmable venue, every lambda and every flow of the layer is a program.


  

The matrix is the check: a vault × chain, a protocol, a programmable venue or a chain no program touches is a gap and the gate refuses it; a gap the registers have themselves (a vault serving a chain it caps nothing on, a protocol without stages) is listed for the owner and closed in the register, not in a program.

the loop · phases, each testable, each confirmed in production before the next

From the language to clients onboarded on the pipe.

the grammar · and the extension packs

Line-oriented. One statement per line. A block is the indented lines under its header.

grammar.ebnf
extension packs

The source of this page is the language's own README and LOOP, synced from the layer's repository at every merge; a check refuses a page that drifts. IDE: a Vim syntax, a TextMate grammar (Zed, VS Code) and a language server whose completions come only from these sets.