# OMNASCRIPT — START HERE

You opened the guide for **OmnaScript**: the family's behavioural tongue.
Omnix authors plans; **OmnaScript authors behaviour** — and compiles it to
JavaScript, so a program written once runs anywhere JavaScript runs
(browser, phone, Node).

Founded 2026-11-11 by founder ruling ("Can we create a language called
OmnaScript? JavaScript and Omnix?"), in answer to the question the voxel
gym forced: the gym's *brain* — a stateful policy — had no home in any
dialect of Omnix, because every Omnix dialect is a declarative plan
language by filed design. OmnaScript is the smallest honest answer: keep
Omnix's grammar and discipline exactly; let JavaScript carry the
arithmetic and the state.

```text
omnascript 0
program gym-brain
seed 20261110
agent proposer nomos
agent reviewer witness
gate deterministic

vocabulary {
  verb forward forward
  verb place place
  ...
}

family explore {
  weight 25
  verbs look_left, look_right, forward, forward, jump
  prefer unvisited-chunk
}
...
```

## The shape of the tongue

- A **policy program** declares: a closed `vocabulary` binding OmnaScript
  verb names to host primitives; `family` blocks whose **weights sum to
  100** (Omnix's sum-to-1 law, in percent); and a `policy` block naming a
  closed-set **strategy**, the **curiosity** dial, the governed families,
  a probe set and a goal span. The strategy's mathematics is *runtime
  law* in the compiler — source never contains arithmetic, exactly as
  Omnix's `op height` never contains the heightfield's.
- An **instruments program** declares measurement definitions
  (`instrument` blocks: label, rung, watch, trigger) that compile to a
  `deriveFirsts()` reader over session records. Dormant instruments
  declare `trigger none` — the roadmap lives in the source, honestly.
- A **launcher program** (Amendment A2) declares every decision of a
  launch in one `launcher {}` block — pinned game version, manifest,
  offline username, verify gate, natives, entry, pinned mod loader and
  mods, the house resource-pack slot — and compiles to a
  `createLauncherPlan()`. Its executor provisions once (complete,
  hash-verified) and launches offline forever after.
  `examples/launcher.omna` is the first: the Minecraft launcher,
  re-founded from the founder's T-Launcher specimen.
- Every program swears the **deterministic gate** and names a
  **proposer ≠ reviewer** pair, or it does not compile. Refusals are one
  line, in OmnaScript's own voice, with a line number.

## Compile

```sh
node omnascript.cjs program.omna                 # -> program.compiled.cjs (node target)
node omnascript.cjs program.omna --target browser
node --test omnascript.test.cjs                  # the founding test suite
```

## Program #1

`examples/gym-brain.omna` + `examples/gym-instruments.omna` — Nomos's
free-play mind and the voxel gym's learning log, the first real programs
in the language. The running copies live with the gym
(`~/workspace/nomos-gym/voxel-gym/omnix/`), compiled by a byte-identical
vendored compiler, flown by the proof driver there.

## Read next

- `SPEC.md` — OMNASCRIPT-SPEC v0, the founding record (grammar, runtime
  law, compilation contract, limits, frontier debt).
- `CATALOG-ENTRY-DRAFT.md` — the family's catalogue entry, **drafted,
  awaiting ratification by the language seat**. OmnaScript does not
  canonise itself.

Credit: N8toriousAi.
