{"source_url":"https://interplane.io/omega/write/","lang":"en","text":"Omega · Field guide\u000aWrite it. Run it. Check it.\u000aGet the Harness, learn the few rules that shape an Omega program, and use a compiler refusal to test your first working example.\u000aGet the Omega Harness Agent tool index\u000aIllustration of a program at the workbench.\u000aWhat you write\u000aOmega 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.\u000aA 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.\u000aStart with the Omega Harness\u000aThe 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.\u000a```\u000agit clone https://interplane.io/projects/omega-harness/repo.git omega-harness\u000acd omega-harness\u000agit rev-parse HEAD\u000acat PIN\u000acat skills/omega-harness/SKILL.md skills/writing-omega/SKILL.md\u000a```\u000aPin Identify the source, target and compiler hash before writing.\u000aWrite Use the language guide and a nearby compiled example.\u000aCompile and run Capture diagnostics, exit status and output on the named target.\u000aTry to break it Change one input or one rule and require the expected failure.\u000aHand off evidence Retain the exact commands, results and hashes for another run.\u000aThe Harness workflow from source selection to reproducible evidence. Agent prompt: Write and verify an Omega program \u000a```\u000aWrite and verify an Omega program for [task]. Start at https://interplane.io/omega/tools.txt. Obtain the Harness and identify the target project's compiler pin before editing. Use the writing guide and one relevant tested example. Write .om source, run the positive test and a deliberate negative control on the named target, and report the source revision, compiler hash, commands, results and any checks that could not run.\u000a```\u000aOpen plain text\u000aTrace a small program\u000atotal 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.\u000a```\u000afn main to int\u000a  total = int 0\u000a  for i int 4 bound 4\u000a    total = add total i\u000a  end\u000a  ret total\u000aend\u000a```\u000aSave 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.\u000a```\u000aif ./omc < sum.om > omega-sum && chmod +x omega-sum; then\u000a  ./omega-sum\u000a  printf 'exit=%s\\n' \"$?\"\u000afi\u000a```\u000aFor 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.\u000a```\u000ased 's/ret total/ret true/' sum.om > sum-bad.om\u000a./omc < sum-bad.om > sum-bad\u000aprintf 'compiler exit=%s\\n' \"$?\"\u000a```\u000aChoose the guide for your next task\u000aCompiler rules and examples In the Harness clone, read skills/omega-encoding/SKILL.md. The examples/gate.sh runner checks the compiler hash in PIN before compiling or running examples. For work in another repository, use that project's compiler pin. Compiler internals and targets Read seed/omc/omc.om and docs/one_layer/OM_COMPLETION.md in 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. 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. Focused tools Read coder/README.md in the Harness for the optional omp workflow. Use the dedicated Harness guides for Lean 4 proofs, Wolfram calculations and authorized GB10 hardware work only when your task needs them. 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. \u000aOpen the agent tool index See how the compiler was built\u000a","html":"<!doctype html>\u000a<html lang=\"en\"><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><title>Write and check Omega programs | Interplane</title><meta name=\"description\" content=\"Set up the Omega Harness and seeded compiler, write a bounded program, and verify the result with a negative control.\"><meta name=\"theme-color\" content=\"#09090b\"><meta name=\"dropyoururl-verify\" content=\"GZTgasKjUBISN3-M\"><link rel=\"canonical\" href=\"https://interplane.io/omega/write/\"><meta property=\"og:title\" content=\"Write and check Omega programs | Interplane\"><meta property=\"og:description\" content=\"Set up the Omega Harness and seeded compiler, write a bounded program, and verify the result with a negative control.\"><meta property=\"og:type\" content=\"website\"><meta property=\"og:url\" content=\"https://interplane.io/omega/write/\"><link rel=\"icon\" type=\"image/svg+xml\" href=\"/public/favicon.svg\"><link rel=\"stylesheet\" href=\"/public/style.css\"><link rel=\"alternate\" type=\"text/plain\" href=\"/omega/write/index.txt\">\u000a<link rel=\"alternate\" type=\"application/json\" href=\"/omega/write/index.json\">\u000a</head>\u000a<body><a class=\"skip\" href=\"#main\">Skip to content</a>\u000a<header class=\"site-head\"><div class=\"shell head-inner\"><a class=\"brand\" translate=\"no\" href=\"/\" aria-label=\"Interplane home\">interplane<i class=\"dot\">.</i></a><nav aria-label=\"Main\"><a href=\"/omega/\">Omega</a><a href=\"/#strands\">The strands</a><a href=\"https://interplane.io/explore\">Projects</a><a href=\"/hop/\">Hop</a><a href=\"/how-it-works/\">How it works</a><a href=\"/mission/\">Mission</a></nav><a class=\"btn btn-primary btn-sm\" href=\"/omega/#downloads\">Get Omega</a></div></header>\u000a<main id=\"main\" tabindex=\"-1\">\u000a<section class=\"page-head omega-sky omega-feature\"><div class=\"shell\"><div class=\"col wide omega-feature-grid\"><div>\u000a<span class=\"eyebrow\">Omega &middot; Field guide</span><h1>Write it. Run it. Check it.</h1>\u000a<p class=\"lede\">Get the Harness, learn the few rules that shape an Omega program, and use a compiler refusal to test your first working example.</p>\u000a<div class=\"actions\"><a class=\"button orange\" href=\"#harness\">Get the Omega Harness</a><a class=\"text-link\" href=\"/omega/tools.txt\">Agent tool index</a></div>\u000a</div><figure class=\"omega-illustration\"><img src=\"/public/omega-writing.png\" width=\"1200\" height=\"800\" alt=\"Illustration of three clear glass plates etched with parallel lines, two stacked at the back and one large in front, beside a metal block with two raised blocks and a metal scribing pen.\"><figcaption>Illustration of a program at the workbench.</figcaption></figure></div></div></section>\u000a<section class=\"band\"><div class=\"shell\"><article class=\"col prose\">\u000a<h2>What you write</h2>\u000a<p>Omega source uses <code translate=\"no\">.om</code> files. Omegese is the source notation described in the language reference. Operators come first, followed by their inputs. In <code translate=\"no\">add mul a b c</code>, <code translate=\"no\">mul</code> consumes <code translate=\"no\">a</code> and <code translate=\"no\">b</code>, and <code translate=\"no\">add</code> consumes that result and <code translate=\"no\">c</code>. A name introduced inside a block goes out of scope at its <code translate=\"no\">end</code>. Declare shared state before the block that updates it. <a href=\"https://interplane.io/drakestapleton/omega-mv/blob/main/docs/one_layer/OMEGESE.md\">Language reference</a>.</p>\u000a<p>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. <a href=\"https://interplane.io/drakestapleton/omega-mv/blob/main/seed/README.md\">Compiler checks and controls</a>.</p>\u000a<h2 id=\"harness\">Start with the Omega Harness</h2>\u000a<p>The 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 <code translate=\"no\">.om</code>. Use the encoding guide when you need a specific rule, host operation or diagnostic. <a href=\"https://interplane.io/drakestapleton/omega-harness\">Omega Harness project</a>.</p>\u000a<pre translate=\"no\" class=\"wrap\"><code>git clone https://interplane.io/projects/omega-harness/repo.git omega-harness\u000acd omega-harness\u000agit rev-parse HEAD\u000acat PIN\u000acat skills/omega-harness/SKILL.md skills/writing-omega/SKILL.md</code></pre>\u000a<figure class=\"omega-diagram\"><ol class=\"omega-flow omega-workflow\" aria-label=\"Omega writing and verification workflow\">\u000a<li><strong>Pin</strong><span>Identify the source, target and compiler hash before writing.</span></li>\u000a<li><strong>Write</strong><span>Use the language guide and a nearby compiled example.</span></li>\u000a<li><strong>Compile and run</strong><span>Capture diagnostics, exit status and output on the named target.</span></li>\u000a<li><strong>Try to break it</strong><span>Change one input or one rule and require the expected failure.</span></li>\u000a<li><strong>Hand off evidence</strong><span>Retain the exact commands, results and hashes for another run.</span></li>\u000a</ol><figcaption>The Harness workflow from source selection to reproducible evidence.</figcaption></figure>\u000a<details class=\"agent-prompt\" id=\"prompt-write-omega\">\u000a<summary>Agent prompt: Write and verify an Omega program</summary>\u000a<pre translate=\"no\" class=\"wrap\"><code>Write and verify an Omega program for [task]. Start at https://interplane.io/omega/tools.txt. Obtain the Harness and identify the target project's compiler pin before editing. Use the writing guide and one relevant tested example. Write .om source, run the positive test and a deliberate negative control on the named target, and report the source revision, compiler hash, commands, results and any checks that could not run.</code></pre>\u000a<p><a class=\"button dark small\" href=\"/agents/prompts/write-omega.txt\">Open plain text</a></p>\u000a</details>\u000a<h2 id=\"example\">Trace a small program</h2>\u000a<p><code translate=\"no\">total</code> starts as an <code translate=\"no\">int</code> outside the loop. Each iteration adds the counter to it. <code translate=\"no\">bound 4</code> makes the loop limit explicit. <code translate=\"no\">ret total</code> sends the result back as the process exit code.</p>\u000a<pre translate=\"no\" class=\"wrap\"><code id=\"sum-source\">fn main to int\u000a  total = int 0\u000a  for i int 4 bound 4\u000a    total = add total i\u000a  end\u000a  ret total\u000aend</code></pre>\u000a<p>Save <a href=\"/omega/examples/sum.om\"><span translate=\"no\">sum.om</span></a> and obtain the <a href=\"/omega/#downloads\">verified compiler preview</a>. 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 <code translate=\"no\">6</code>.</p>\u000a<pre translate=\"no\" class=\"wrap\"><code>if ./omc &lt; sum.om &gt; omega-sum &amp;&amp; chmod +x omega-sum; then\u000a  ./omega-sum\u000a  printf 'exit=%s\\n' \"$?\"\u000afi</code></pre>\u000a<p>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 <code translate=\"no\">7</code>, a type mismatch at line <code translate=\"no\">6</code>.</p>\u000a<pre translate=\"no\" class=\"wrap\"><code>sed 's/ret total/ret true/' sum.om &gt; sum-bad.om\u000a./omc &lt; sum-bad.om &gt; sum-bad\u000aprintf 'compiler exit=%s\\n' \"$?\"</code></pre>\u000a<h2 id=\"tools\">Choose the guide for your next task</h2>\u000a<dl class=\"deflist\">\u000a<dt>Compiler rules and examples</dt><dd>In the Harness clone, read <code translate=\"no\">skills/omega-encoding/SKILL.md</code>. The <code translate=\"no\">examples/gate.sh</code> runner checks the compiler hash in <code translate=\"no\">PIN</code> before compiling or running examples. For work in another repository, use that project's compiler pin.</dd>\u000a<dt>Compiler internals and targets</dt><dd>Read <code translate=\"no\">seed/omc/omc.om</code> and <code translate=\"no\">docs/one_layer/OM_COMPLETION.md</code> in the <a href=\"https://interplane.io/drakestapleton/omega-mv\">compiler repository</a>. 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. <a href=\"https://interplane.io/drakestapleton/omega-mv/blob/main/seed/README.md\">Backend and smoke-test references</a>.</dd>\u000a<dt>Conversion of existing code</dt><dd><a href=\"https://interplane.io/drakestapleton/omega-bridge\">Omega Bridge</a> 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.</dd>\u000a<dt>Focused tools</dt><dd>Read <code translate=\"no\">coder/README.md</code> in the Harness for the optional <code translate=\"no\">omp</code> workflow. Use the dedicated Harness guides for Lean 4 proofs, Wolfram calculations and authorized GB10 hardware work only when your task needs them.</dd>\u000a<dt>Local agent and editor tools</dt><dd><a href=\"https://interplane.io/drakestapleton/omega-mcp\">Omega MCP</a> offers local language lookup, compilation and execution over standard input and output. Its checkout documents its compiler pin and Bubblewrap requirement. See <a href=\"https://interplane.io/drakestapleton/vscode-omega\">Omega for VS Code</a> for source, syntax highlighting and optional compiler diagnostics.</dd>\u000a</dl>\u000a<div class=\"actions\"><a class=\"button dark\" href=\"/omega/tools.txt\">Open the agent tool index</a><a class=\"text-link\" href=\"/omega/bootstrap/\">See how the compiler was built</a></div>\u000a</article></div></section>\u000a\u000a</main>\u000a<div class=\"rope-band rope-sm foot-rope\" aria-hidden=\"true\"><img src=\"/public/strand-thread.svg\" width=\"2560\" height=\"40\" alt=\"\"></div>\u000a<footer class=\"site-foot\"><div class=\"shell\">\u000a<div class=\"foot-grid\">\u000a<div class=\"foot-col\"><p class=\"foot-h\">Explore</p><a href=\"https://interplane.io/explore\">Projects on the forge</a><a href=\"/yard/\">The yard</a><a href=\"/hop/\">Hop for Mac</a><a href=\"/omega/\">Omega language</a><a href=\"/download/\">Downloads</a><a href=\"/agents/#prompts\">Agent prompts</a><a href=\"https://interplane.io/galaxy/\">The map</a></div>\u000a<div class=\"foot-col\"><p class=\"foot-h\">Trust and proof</p><a href=\"/how-it-works/\">How it works</a><a href=\"/evidence/\">What counts as proof</a><a href=\"/receipts/\">Public receipts</a><a href=\"/mission/\">Mission</a><a href=\"/papers/\">Papers</a><a href=\"/contribute/\">Contributions</a><a href=\"/sovereign-intelligence/\">Sovereign Intelligence&trade;</a><a href=\"/ada/\">ADA advocacy</a></div>\u000a<div class=\"foot-col\"><p class=\"foot-h\">Technical and legal</p><a href=\"/forge/\">About the forge</a><a href=\"/protocol/\">Protocol overview</a><a href=\"/quick-start/\">Quick start</a><a href=\"/concepts/\">Concepts</a><a href=\"/adapter/\">Writing an adapter</a><a href=\"/conformance/\">Conformance</a><a href=\"/status/\">Status</a><a href=\"/privacy/\">Privacy</a><a href=\"/terms/\">Terms</a></div>\u000a</div>\u000a<div class=\"foot-base\">\u000a<p class=\"si-line\">Interplane is part of <a href=\"/sovereign-intelligence/\">Sovereign Intelligence&trade;</a>. SI means sovereign, not super: intelligence you own, run on hardware you own, and can check yourself.</p>\u000a<p class=\"foot-fine\">No scripts, no trackers, no outside fonts. Built and checked in <a href=\"https://interplane.io/drakestapleton/omega-mv\">Omega</a>. <a href=\"https://interplane.io/drakestapleton/interplane.io\">Site source</a> (<span translate=\"no\">AGPL-3.0-or-later</span>).</p>\u000a</div>\u000a<p class=\"foot-fine\" lang=\"en\"><a href=\"/translate/\">Read in your language</a> | <a href=\"/omega/write/index.txt\">Plain text</a> | <a href=\"/omega/write/index.json\">JSON source</a></p>\u000a</div></footer>\u000a</body></html>\u000a"}
