Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/tree-sitter-omega # tree-sitter-omega aien-dev/tree-sitter-omega Brought by drakestapleton Unfinished: not checked yet There is no published receipt of a rebuild from its source yet. What a receipt is Get this repository Git over HTTPS `git clone --no-checkout https://interplane.io/projects/tree-sitter-omega/repo.git tree-sitter-omega && git -C tree-sitter-omega checkout --detach 7b9820da408f4320996bc9bf02f2040e4fdd44fb` Source archive of `7b9820da408f4320996bc9bf02f2040e4fdd44fb` Download ZIP · tar.gz Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers README.md # tree-sitter-omega A tree-sitter grammar for Omega (`.om`), the language of aien-dev/omega-mv . It gives editors and tools a fast, error-tolerant syntax tree of Omega source: blocks, declarations, statements, comments, text, numbers, plus highlight and scope queries. grammar Connected repos: aien-dev/omega-mv (the language and `omc`; this grammar is measured against commit `e5b32567` in `omega.ref` ) · aien-dev/vscode-omega (VS Code support whose TextMate grammar follows this one). ## How well it parses real Omega I measure the grammar against every `*.om` file in omega-mv, and I use the real compiler as the judge of which files are valid. CI clones omega-mv at `omega.ref`, rebuilds `omc` from the 408-byte seed (`sh seed/omega-from-seed.sh`), feeds each file to `omc`, and parses each file with this grammar. (The seed chain's own limits: the 408 bytes are a binary written as commented hex text and turned into bytes by a POSIX shell script whose `printf` is the one outside tool; the chain runs only on AArch64 Linux; matching the published omc hash is a fixed-output reproducibility check along one build path, not diverse double compilation, and it does not prove omc correct.) MEASURED at omega-mv `e5b32567a7aff3ce594e3254a622a846a6cd190b` (local run on a DGX Spark, 2026-10-28, grammar of this commit; the file rows match CI on `ubuntu-24.04-arm` for the previous grammar, run `40430760804` ): files count parse with zero ERROR/MISSING nodes all `*.om` files 811 789 files `omc` accepts on its own 393 393 (the CI gate: this must stay 100%) files `omc` refuses 418 396 parse clean, 22 show ERROR library units composed as their build scripts compose them (`test/units/omega-mv.units` ) 16, all accepted by `omc` 16 (also a CI gate) Read the third row carefully. Most refused files are not broken syntax: library units such as `om/tls/*.om` are compiled only after their build script prepends an `om2` line and concatenates them with their neighbours (`om/tls/build.sh`), so `omc` refuses each one alone (for these, error 16), and many test fixtures are refused for type or contract reasons that a syntax tree does not see. The 22 files that show ERROR are all deliberate syntax-error fixtures, for example a missing `end`, an unclosed `(`, an upper-case word, or OM-1/OM-2 brace and bracket probes: ``` seed/omc/om2/s1/diag-eof.om seed/omc/om2/s1/diag-noend.om seed/omc/om2/s3/l-bad-noend.om seed/omc/om2/s4/x-bad-nofn.om seed/omc/tests/float/neg_dot.om seed/omc/tests/paren/neg_unclosed.om seed/omc/tests/struct/no_end.om seed/qualification/om2/sec/s0s2/s0/upper.om seed/qualification/om2/sec/s0s2/s1/{d-eof-left,d-eof-mid,d-eof-noend,d-unknown-args}.om seed/qualification/om2/sec/s0s2/s2bnd/{om1,om2}-{brace,bracket,group-open,left-paren,short-eof}.om ``` Run it yourself on any AArch64 Linux machine: ``` git clone https://github.com/aien-dev/tree-sitter-omega && cd tree-sitter-omega npm ci --ignore-scripts && (cd node_modules/tree-sitter-cli && node install.js) sha256sum -c tree-sitter-cli.sha256 # the CLI binary install.js fetched (linux-arm64) git clone https://github.com/aien-dev/omega-mv /tmp/omega-mv git -C /tmp/omega-mv checkout --detach e5b32567a7aff3ce594e3254a622a846a6cd190b (cd /tmp/omega-mv && sh seed/omega-from-seed.sh) sh scripts/coverage.sh --omc /tmp/omega-mv/seed/out/omc --units test/units/omega-mv.units /tmp/omega-mv ``` `scripts/coverage.sh [--omc OMC] [--units MANIFEST]... [LABEL=]DIR...` measures any list of directories (the label defaults to the directory's name). It prints one tab-separated line per file (`path omc=accept|refuse parse=clean|error first-error-node`), one `unit:NAME` line per composed unit (the first error is located as `in MEMBER:LINE`), and `COVERAGE` lines that end with every directory's commit. A manifest line `unit NAME MEMBER...` concatenates its members in order, as `cat` in a build script does; `each NAME LABEL:GLOB MEMBER...` makes one unit per matching file or directory; a member is `LABEL:PATH` or `@om2` / `@ir` for that profile line. The script exits 1 if any file or unit `omc` accepts fails to parse clean, and 2 on a usage error (an unknown label, a member that matches no file). Without `--omc` it reports the `all` row and marks the oracle rows NOT_RUN. `omc` is a static AArch64 Linux program; on x86_64 the oracle needs qemu-user, and I have not measured that path. ### Every other public aien-dev repository with Omega in it MEASURED 2026-10-28 on a DGX Spark with the same `omc` (sha256 `2c824805…029f`), one `coverage.sh` run over omega-mv and the 25 other public aien-dev repositories that hold `*.om` files, with every manifest in `test/units/` . "Before" is the previous grammar (`9b63612`) under the same script and manifests. repository @ commit `*.om` files `omc` accepts accepted files clean, before → after omega-rosetta @ `a5b7330a` (branch `corpus/200`: 216 tasks; 47 exercises with stub, `test.om`, `.meta/example.om`) 357 296 296 → 296; all 357 clean omega-bridge @ `358c5051` 128 126 126 → 126 CUDApp @ `e7b9e1fc` 116 34 34 → 34 sovereign-intelligence @ `d0f6939a` 95 52 52 → 52 aienos.com @ `ee3833cf` 29 14 13 → 14 aien-architecture-mv @ `df796a8a` 13 12 12 → 12 omnet @ `83f605b1` 47 9 9 → 9 babel @ `13ad42d9` (with `build/`, from its `build.sh`) 10 2 1 → 2 AienOS-nv @ `240ee9af` 9 2 2 → 2 omega-harness @ `82b89c28` 2 2 2 → 2 omega-blas, omega-dnn, omega-gpu-bench, omega-kernel-template, omega-packages, omega-bridge-kit 7 6 6 → 6 cortex, omtex, omega-gpu-driver, aien-sovereign-core-mv, synapse-{board,claims,map,mcp,pulse} 75 0 — all, with omega-mv 1699 948 946 → 948 composed units in `test/units/` (94 of them omega-rosetta exercises: stub + test, example + test) 169 164 160 → 164 On omega-rosetta `main` (`60dcf9b2`, 39 files, 34 accepted) the result was the same: 34 → 34. Files `omc` refuses alone are mostly library units and exercise parts; the manifests compile them the way their repositories' build scripts do, and those 164 units cover 209 of them. The 5 refused units are the synapse tools, whose sources are marked work in progress (`omc` errors 3, 9, 12 and 23 at omega-mv `e5b32567`). Beyond the 22 fixtures above, two refused files show ERROR: synapse-map `src/40-xerj.om` line 134 (a stray `end`; its unit is refused with error 3) and aien-architecture-mv `tools/zero-legacy/fixtures/tree/src/sh.om` (a shell script fixture). The two defects these runs found are fixed in this grammar: the `note` comment was lexed inside text (`" note "`, `"x\nnote add three\nfn"`: a MISSING `"` in seven files and four units), and a name that starts with `note` (`notes`, `noted`) was split into a comment and a name without any ERROR node (`omc` ends the `note` word at a blank, a parenthesis or the end). Both are cases in `test/corpus/notes.txt` . ## What the grammar knows, and where it stops Omega is line oriented: one statement per line, words separated by blanks, `(` and `)` as words of their own, `note` starting a comment line. As in `omc`, the comment word is exactly `note`, ended by a blank, a parenthesis or the end of the line (`notes` and `noted` are names), and a `note` inside text is text. The grammar gives structure to everything that is context free: - `fn ... to ...` / `export fn` definitions with parameter list and return type, closed by `end` - `if` / `else`, `while` (with an optional `bound`), `for`, `layout` with `field` lines, one-line `struct ... end` - `global`, `text`, `const`, `abstract`, `holds` declarations and the `om2 ...` / `ir` profile line - `ret`, `put`, `trap`, `exit`, `break`, `continue`, `name = value` assignments and call lines - integers (decimal, `0x` hex), floats (`1.5`, `2.5e-3`, `3f32`), text with escapes, `*` unsized views Values stay a flat sequence of words. Omega values are prefix expressions whose arity depends on each word and, for calls, on the callee's signature, so a context-free grammar cannot build the call tree honestly; I leave that to `omc`. Operator, type, contract and host words (`add`, `uint`, `requires`, `fopen`, ...) are ordinary identifiers in the tree and get their colour from `queries/highlights.scm` , because OM-1 units may use OM-2 words such as `open` or `field` as names; a name a declaration defines (`fn rotr`, `global out`, `at = ...`) keeps the definition's colour. A word the Omega lexer would reject, like `0xG1`, can still split into tokens here without an ERROR node. This is a syntax tree for editors, not a checker; `omc` remains the authority. ## Tests and CI - `tree-sitter test` runs `test/corpus/` (16 cases, 4 of them must produce ERROR) and the highlight assertions in `test/highlight/` (22 assertions in 2 files). - CI regenerates `src/` with the pinned CLI and fails if it differs from the committed parser. - The coverage gate: every omega-mv file `omc` accepts, and the 16 units in `test/units/omega-mv.units` , must parse clean. - Negative control 1: `test/negative/malformed.om` must parse with ERROR. - Negative control 2: the coverage gate, given an oracle that accepts everything, must fail on that malformed file. - Negative control 3: the same fake oracle and a unit that composes the malformed file with a valid one must fail as `unit:... parse=error ... in malformed.om:`, naming the malformed member. ## Use it The `tree-sitter.json` metadata, generated parser and bindings for C, Go, Node, Python, Rust and Swift are in this repository (from `tree-sitter init`). CI builds the parser through `tree-sitter test`; I have not yet published the bindings to npm, crates.io or PyPI, and I have not yet run them inside Neovim, Helix or Zed. For VS Code, use aien-dev/vscode-omega . ## Editors and registries Where I checked each project's rule for taking a new grammar (2026-10-27), and where Omega stands: project rule status GitHub Linguist CONTRIBUTING: usage requirements : at least 2000 files per extension indexed in the last year, spread across many users; the language owner's own repos are filtered out not met. GitHub code search on 2026-10-27: `extension:om "fn main to int"` gives 718 files, and `-org:aien-dev` gives 0. No PR until Omega is used widely outside my repos nvim-treesitter CONTRIBUTING: Parsers : the filetype must be detected by Neovim nightly, the parser tested by users, CI via tree-sitter/workflows, queries checked by `ts_query_ls` gated: Neovim does not detect `.om` as Omega yet, and the grammar has no outside users yet Helix Adding new languages : a `languages.toml` entry, Helix-named queries in `runtime/queries//`, `cargo xtask docgen` no written usage gate; not submitted, because I have not run the grammar inside Helix (Helix uses its own capture names) Zed Publishing prerequisites : a Zed extension repo, tested manually in Zed at the submitted commit, then a PR to zed-industries/extensions gated: needs a manual test in Zed, which I have not run ## Foreign dependencies These are packaging and editor glue, not part of Omega: dependency version what it does here tree-sitter-cli (npm, Rust binary) 0.27.1, linux-arm64 binary sha256 in `tree-sitter-cli.sha256` generates `src/parser.c` from `grammar.js`, runs the tests, parses the corpus Node.js 24 evaluates `grammar.js` and runs the CLI wrapper tree-sitter (npm), node-addon-api, node-gyp-build, prebuildify as locked in `package-lock.json` Node binding scaffold from `tree-sitter init`; not used by CI The Omega side has no replacement yet: an Omega-native parser generator would be the first-party path, and until it exists the generated C parser is the tree-sitter project's format. ## Licence Apache-2.0 WITH LLVM-exception. See LICENSE and NOTICE . ## Human-Directed Agentic Engineering Development follows Human-Directed Agentic Engineering (HDAE): humans define goals, architecture, constraints, acceptance criteria, and stopping points; agents implement, execute checks, diagnose failures, and revise within those boundaries. Human review retains responsibility for claims, acceptance, and release decisions. This describes the development method, not a change to runtime autonomy or historical evidence. For the documented method and a systems-software case study, see Gregory M. Kurtzer (2026), *Ginux: Building an Independent Kernel That Runs Linux Userspace through Human-Directed Agentic Engineering*, technical report, v1, Zenodo, https://doi.org/10.5281/zenodo.`23682548` . ## For developers: proof and records The full record of this project. Words that are used only here are explained once: ID The project's permanent id on Interplane: the SHA-256 of its first signed record. This one is `git:7b9b4b9126ab7c8e5e91e4b09ca7c3161242ca1b86fd9ebdcd639a0e085bbbf1`. Its old id, kept only so that old links still work: `z3Jfv1utyaw4Nm83pgmJ4yQfVmpse`. Owner The key that signs every record of the project. This forge lists the project under drakestapleton; its key is `SHA256:qg3vxoE9ul3Cgk5heosQvPmO9pqIJNsdcsGJ2cHghTs`. Refs and HEAD Refs are the names that point at versions: branches and tags. HEAD is the version a fresh copy starts from, the newest commit of the default branch. Patch A proposed change, reviewed before it is merged. This forge does not show proposed changes from its own store yet. The list is under Proposed changes . Receipt A public record that someone checked a claim, with the fingerprint of its evidence file. The state at the top of this page is read from the list at interplane.io/receipts . This project has no receipt in that list yet. Clones and fetches over HTTPS: 0 by visitors (git smart-HTTP `info/refs` requests answered 200 in the front-door download log; our own addresses and bots left out; since 2026-11-08) · not measured `git-upload-pack` requests from all clients (the source of this count is retired) Downloads: 1 by visitors (1 source archives, 0 release assets; forged access log; our own addresses left out; since 2026-11-07) commit `7b9820da408f4320996bc9bf02f2040e4fdd44fb` Branches Tags History `7b9820d` Merge pull request #1 from aien-dev/grammar/note-word-and-units aien-spark committed 2026-10-30 ``` .github/ bindings/ queries/ scripts/ src/ test/ .crumb 1708 .editorconfig 597 .gitattributes 1055 .gitignore 391 .goals.json 1670 CMakeLists.txt 3514 Cargo.toml 755 LICENSE 12278 Makefile 4213 NOTICE 1858 Package.swift 1172 README.md 13865 binding.gyp 764 go.mod 109 grammar.js 7496 omega.ref 184 package-lock.json 12887 package.json 1262 pyproject.toml 819 setup.py 2396 tree-sitter-cli.sha256 107 tree-sitter.json 897 ``` Every record: History (commits) · Branches · Tags · Releases, with the SHA-256 of each download · Patches · Issues · This project as JSON