What you write
11Omega source uses .om files. Omegese is the source notation described in the language reference. Operators come first, followed by their inputs. In add mul a b c, mul consumes a and b, and add consumes that result and c. A name introduced inside a block goes out of scope at its end. Declare shared state before the block that updates it. Language reference.
A function spells out its argument and return types. The compiler checks the types of operations and rejects incompatible operands. Loops can carry explicit bounds, and the executable can trap if it crosses a bound at runtime. Choose a small positive case and a deliberately broken input, and record the expected outcome of each before running. Compiler checks and controls.
13Start with the Omega Harness
14The Harness gives people and agents a shared workflow, with language guides, compiler pins and executable examples. Get the Git checkout, then read the workflow and writing guide before editing .om. Use the encoding guide when you need a specific rule, host operation or diagnostic. Omega Harness project.
git clone https://interplane.io/projects/omega-harness/repo.git omega-harness
16 cd omega-harness
17 git rev-parse HEAD
18 cat PIN
19 cat skills/omega-harness/SKILL.md skills/writing-omega/SKILL.md
20 -
21
- PinIdentify the source, target and compiler hash before writing. 22
- WriteUse the language guide and a nearby compiled example. 23
- Compile and runCapture diagnostics, exit status and output on the named target. 24
- Try to break itChange one input or one rule and require the expected failure. 25
- Hand off evidenceRetain the exact commands, results and hashes for another run. 26
Agent prompt: Write and verify an Omega program
29{{agents/prompts/write-omega.txt}}
30
31 Trace a small program
33total starts as an int outside the loop. Each iteration adds the counter to it. bound 4 makes the loop limit explicit. ret total sends the result back as the process exit code.
fn main to int
35 total = int 0
36 for i int 4 bound 4
37 total = add total i
38 end
39 ret total
40 end
41 Save sum.om and obtain the verified compiler preview. These commands assume you extracted the preview into the same scratch directory and are running 64-bit Arm Linux. The example reports through its exit status. The expected status is 6.
if ./omc < sum.om > omega-sum && chmod +x omega-sum; then
43 ./omega-sum
44 printf 'exit=%s\n' "$?"
45 fi
46 For a negative control, replace the integer return value with a boolean in a separate file. The published preview refuses this program with compiler error 7, a type mismatch at line 6.
sed 's/ret total/ret true/' sum.om > sum-bad.om
48 ./omc < sum-bad.om > sum-bad
49 printf 'compiler exit=%s\n' "$?"
50 Choose the guide for your next task
51-
52
- Compiler rules and examples
- In the Harness clone, read
skills/omega-encoding/SKILL.md. Theexamples/gate.shrunner checks the compiler hash inPINbefore compiling or running examples. For work in another repository, use that project's compiler pin.
53 - Compiler internals and targets
- Read
seed/omc/omc.omanddocs/one_layer/OM_COMPLETION.mdin the compiler repository. The scalar OSC IR backends cover specific WebAssembly and SPIR-V subsets. Start with the target's test and refusal evidence, and check your runtime separately. Backend and smoke-test references.
54 - Conversion of existing code
- Omega Bridge documents accepted source subsets and refusals. Use its source and tests for a migration, and use the seeded compiler and Harness for new Omega source. 55
- Focused tools
- Read
coder/README.mdin the Harness for the optionalompworkflow. Use the dedicated Harness guides for Lean 4 proofs, Wolfram calculations and authorized GB10 hardware work only when your task needs them.
56 - Local agent and editor tools
- Omega MCP offers local language lookup, compilation and execution over standard input and output. Its checkout documents its compiler pin and Bubblewrap requirement. See Omega for VS Code for source, syntax highlighting and optional compiler diagnostics. 57
