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/omega-harness/blob/main/skills/omegese-wire/SKILL.md # omega-harness Agent skills for operating, encoding and communicating in Omega (.om) and the AIEN repositories Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-harness / skills / omegese-wire / SKILL.md` 169 lines · 16984 bytes Raw Blame History Rendered 1 --- 2 name: omegese-wire 3 description: "Omegese Wire protocols and wake hygiene: Trinary Doctrine (tools/trit), signed 3-digit layered codebook (tools/codebook), R45 Omegese (aien-train/docs/omegese45), bot-wire wake hygiene, and PROPOSED open tracks (R45 inst 041-099 and Gen 3 error-resistant codebook). Use when implementing, verifying, or routing agent wake signals, codebook frames, or R45 wire messages." 4 --- 5 6 # Omegese Wire 7 8 Protocols, verification boundaries, and wake hygiene for Omega agent signaling and compact wire frames. Keep every status claim on the `omega-communication` claim ladder (`PROPOSED` / `IMPLEMENTED` / `EXERCISED` / `VERIFIED` / `QUALIFIED` / `MERGED` / `DEPLOYED`): host checks and Lean proofs do not establish hardware qualification or live deployment. 9 10 ## Protocol map (2026-11-19) 11 12 | Component | Source path | Claim-ladder status | Scope and limits | 13 |---|---|---|---| 14 | T-002 Trinary Wake (`trit`) | `omega-mv` `tools/trit/` | `MERGED`, host-`VERIFIED` | Gate `tests/gates/omega-trinary.gate`. Legacy read/ack is Lean-proved (`TritSignal.lean`) + differential-checked; daily `--inspect`/`--consume` are host-tested (`test-daily.py`, `mutate-daily.py`), not Lean-proved. Not deployed/hardware-qualified. | 15 | T-002 Layered Codebook v1 | `omega-mv` `tools/codebook/` | `MERGED`, host-`VERIFIED` | Gate `tests/gates/omega-trinary.gate`. 50 data rows in `codebook.tsv`; `CodebookProof.lean` (0 `sorry`, 0 extra axioms) + `test.sh` + `mutate.sh`. | 16 | T-002 Codebook r8/r9 candidate | Review candidate (unlanded) | `EXERCISED` (not `MERGED`) | 3-digit anchors `000`/`111`/`222` + 74-token vocabulary (197 tests, 45 mutants in review). Not on `omega-mv` main; do not conflate with landed v1 `codebook.tsv`. | 17 | R45 Omegese Wire | `aien-train` `docs/omegese45/` | `IMPLEMENTED`, `EXERCISED` | 41-row lexical vocabulary + deterministic `.om` translator (`en2goal`, `goal2en`, `rep2en`), exercised on Grace CPU (`evidence/OMEGESE45/{contract,translator}/`). | 18 | Bot-Wire Wake Hygiene | `omega-harness` `rules/rules.txt`, `WIRE.md` §9 | `IMPLEMENTED` (policy) | Active daily coordination rules (`rule trinary-daily-flow` + Reviewer-approved wake hygiene). | 19 | R45 `inst` Codebook (`041-099`, DRA-504) | Design proposal | `PROPOSED` (canceled for internal bots) | Canceled for internal bots on 2026-11-10 in favor of Trinary Doctrine; kept as reference if external-bot compact wire scope reopens. | 20 | Gen 3 Error-Resistant Codebook | Combinatorial design | `PROPOSED` | Verified Hamming-distance bounds on 3-digit vs 5-digit ternary triples/5-tuples; no implementation or proof landed. | 21 22 For latent Neuralese envelopes (`LTP0`/`NL4`), see `skills/omega-communication/SKILL.md`: Neuralese envelopes are separate from Omegese Wire. 23 24 ## 1. T-002 Trinary Wake (`tools/trit`) 25 26 Canonical trit semantics follow Trinary Doctrine v1.0 ([Zenodo `24287768`](https://zenodo.org/records/`24287768`)), `omega-mv` `tools/trit/README.md`, and `omega-harness` `rules/rules.txt` (`rule trinary-daily-flow`): 27 28 - **silence**: nothing to do / no task. 29 - **`1`**: task / read unread work. 30 - **`2`**: stop (requests an authorized stop and reading its reason). 31 - **`0`**: **help** (sender needs help while still working; never stop, idle, or acknowledgement). 32 33 **Critical receipt distinction:** legacy `trit DIR --ack BOT TOKEN` prints ` 0` as a local read/done receipt. Never forward legacy `--ack` output as help (`0`). 34 35 ### Daily vs legacy CLI 36 37 ```sh 38 # Current daily flow (Trinary Doctrine) 39 trit DIR --inspect BOT... # emits " 1 " for unread work; silence when quiet 40 trit DIR --consume BOT TOKEN # advances cursor durably; no stdout, no next wake 41 42 # Legacy receipt-era interface (historical callers only) 43 trit DIR BOT... # emits " <1|2> " 44 trit DIR --ack BOT TOKEN # prints local receipt " 0", then next wake if any 45 ``` 46 47 - `--inspect` emits only inspection requests (`1`), even for signed stop records. It never grants runtime stop authority. 48 - In legacy read mode, `2` is emitted **only** for a MAC-verified, counter-valid `3xx` codebook emergency. Everything else that is not `fyi` (including plain `STOP` text, a `stop` tag, unsigned, tampered, wrong-key, wrong-recipient, stale, replayed, or legacy `ocb1:` lines) is demoted to `1`. There is no `--trust-unsigned`. 49 50 ### Full-line signed format and replay/retarget rejection 51 52 `trit` reads `DIR/inbox/.md` (normal lane `n`) and `DIR/inbox/.emergency.md` (emergency lane `e`). Content lines begin with `YYYY-MM-DDT`; `fyi` lines never wake. 53 54 - **Signed 6-field line:** `ts|from|to|tag|text|ref|ocb2::::` 55 - **MAC preimage:** `HMAC-SHA256(key, "ocb2|cbsha|counter|lane|ts|from|to|tag|text|ref|digits")` 56 - **Binding and key checks:** `lane` (`n` or `e`) comes from the file being read, never from the line; `to` must equal the receiving bot; key file `DIR/codebook/key` must have mode `& 077 == 0` and no `boards/` path segment; `DIR/codebook/codebook.tsv` must match ``. 57 - **Replay and ordering rejection:** per-sender counter file `DIR/inbox/..ctr` stores ` `. Verification requires strictly increasing `counter` (above both the stored counter and any earlier verified line from that sender in the same pass) and monotonic `ts >= last_ts`. Reading never mutates counters; `--ack`/`--consume` locks `DIR/inbox/.ctr.lock` (`flock LOCK_EX`), writes `.tmp`, `fsync`s, atomically renames (`renameat2`), and `fsync`s the directory. 58 - **Cursor integrity:** token format is `L:` (`L` in `{n,e}`). Cursor file `DIR/inbox/[.emergency].md.cur` stores ` `. Any rewrite or truncation before ``, or a malformed/out-of-bounds token, is refused (exit 3) or resets the file to unread. 59 - **Emergency lane admission and quota:** sender must be `drake` or a slug with `DIR/inbox/.md` and a valid timestamp; at most 3 MAC-verified lines per sender per 60 minutes (counted once per `(sender, counter)`; unsigned, forged, or replayed lines consume no quota). 60 - **Authority limit:** the current shared HMAC key proves key possession, not individual sender identity, and counter ordering does not prove wall-clock freshness. Establish fresh sender identity and existing runtime authorization separately before stopping any process. 61 62 ### Verification scope 63 64 - Build and host suite: `sh tools/trit/build.sh && sh tools/trit/test.sh` (gate: `tests/gates/run.sh trinary`). 65 - Lean 4 proof: `lean tools/trit/proof/TritSignal.lean` (0 `sorry`, 0 extra axioms) proves the legacy read/ack state machine and mirrors `trit.om` in `TritBin` for differential testing (`sh tools/trit/proof/difftest.sh`). 66 - Daily interface oracle: `python3 tools/trit/test-daily.py` and `python3 tools/trit/mutate-daily.py` independently sign fixtures and verify refusal of stop promotion, receipt leakage, next-wake leakage, and bypassed consumption. They are external test oracles (not runtime dependencies); the daily entry points are host-tested, not Lean-proved. 67 68 ## 2. T-002 3-Digit Layered Codebook (`tools/codebook`) 69 70 ### Landed v1 (`omega-mv` main) 71 72 Native OM-2 (`tools/codebook/codebook.om`, compiled directly into `tools/trit` by `tools/trit/build.sh` because OM-2 has no imports). 73 74 - **Wire format:** `(9xx)^k t` — `k >= 0` escape groups in `900..999` followed by one terminal group in `000..899`, every group exactly 3 decimal digits (1 tokenizer token each), concatenated with no separator. Fixed 3-digit width makes the encoding prefix-free and recursively extensible. 75 - **Transport:** rides only in the trailing `ocb2::::` field of a 6-field inbox line. Bot DMs stay a single bare trit. Legacy `ocb1:` lines never verify and are capped at trit `1`. 76 - **Codebook identity:** `tools/codebook/codebook.tsv` (`codetypemeaning`, types `r45 inst sig emerg`, `#` comments; 55 lines = 5 comment lines + 50 data rows). Its SHA-256 is the wire `` identity. Append-only evolution is checked by `codebook ext OLD NEW` (exits 0 with `ok ` if `NEW` is valid and starts with every byte of `OLD`, else `ERR notprefix` exit 6). 77 - **Landed v1 code ranges:** 78 - `000`: `` 79 - `001-040`: R45 lexical tokens (pinned to `aien-train/docs/omegese45/vocab.tsv` SHA-256) 80 - `041-099`: reserved for R45 instruction ids 81 - `1xx` signals: `100` `read-receipt`, `101` `task-waiting` 82 - `3xx` emergencies: `300` `stop-now`, `301` `security`, `302` `data-loss`, `303` `disk-full`, `304` `build-broken`, `310` `power-OB`, `311` `power-LB` 83 - `9xx`: recursive escape layers 84 - **Lean 4 proof:** `tools/codebook/proof/CodebookProof.lean` (0 `sorry`, 0 extra axioms) proves prefix-free encode/decode, `append_preserves`, `unverified_never_two`, `unsigned_demoted`, `stale_demoted`, and `badmac_demoted`. 85 86 ```sh 87 sh tools/codebook/build.sh 88 printf '901.12 345\n' | build/codebook/codebook enc # `901012345` 89 printf '`901012345`\n' | build/codebook/codebook dec # 901.12 345 90 build/codebook/codebook sha tools/codebook/codebook.tsv 91 sh tools/codebook/test.sh && sh tools/codebook/mutate.sh 92 lean tools/codebook/proof/CodebookProof.lean 93 ``` 94 95 ### Unlanded T-002 r8/r9 review candidate (`EXERCISED`, not `MERGED`) 96 97 A separate unlanded review candidate (r8/r9) evaluated 3-digit anchors `000` stop / `111` task / `222` help with a 74-token vocabulary (197 tests, 45 mutants reported in review). Two design invariants from that review remain important: 98 99 - A damaged stop frame demotes to task (`1`) so the receiver inspects the durable record rather than silently executing an unverified stop or dropping the event. 100 - Ambiguous bare tokens (such as bare `FAIL` without structured context) are rejected rather than guessed. 101 102 This candidate is **not** present in `omega-mv` main `tools/codebook/codebook.tsv`. Preserve landed v1 meanings and never silently deploy r8/r9. 103 104 ## 3. R45 Omegese Wire (`aien-train/docs/omegese45/`) 105 106 R45 is a bounded, DFA-checked 41-row dialect for structured `mm`/`pair` job episodes (`CONTRACT.md`, `vocab.tsv`, `TRANSLATOR.md`). Status: `IMPLEMENTED` and `EXERCISED` on Grace CPU (receipts in `evidence/OMEGESE45/{contract,translator}/`). 107 108 - **Vocabulary and bounds:** fixed 41-row `vocab.tsv` (2188 bytes, 6 bits/id via `Ceiling[Log2[41]]`), DFA table `256 x 41 = 10496 B`, longest message `31` ids (`rep ok pair`), longest attained episode `175` ids, `MAXLEN = 176`. 109 - **Four frame types:** 110 - `G` (goal): `goal mm|pair ... end` 111 - `A` (action): `act job mm ... end | act refuse bound end` 112 - `R` (result): `res ok|refused C'|fail C' end` 113 - `P` (report): `rep ok mm|pair ... | rep refused C | rep fail C end` 114 - **Deterministic `.om` translator edges:** `en2goal`, `goal2en`, `rep2en`. Zero model calls on the translation path; MEASURED `<10 ms` wall time and `192 KB` RSS. Held-out accuracy: `38/45` raw (`84.44%`), `39/45` (`86.67%`, 0 wrong) with erratum. Exit codes: `20-23` (`en2goal`), `30-31` (`goal2en`/`rep2en`), `40-43` (contract). 115 116 ### Choosing R45 vs Trinary Doctrine 117 118 - Use **Trinary Doctrine** (durable record + 1-digit wake) for daily agent coordination, task assignment, reviews, and multi-agent routing. Never strip task scope, authority, or evidence to shorten a signal. 119 - Use **R45 Omegese** when a bounded `mm`/`pair` pipeline needs deterministic, zero-model, DFA-checked structured frames (`goal`/`act`/`res`/`rep`) pinned to `vocab.tsv`. 120 121 ## 4. Bot-Wire Wake Hygiene Rules 122 123 Active coordination rules from `rules/rules.txt` (`rule trinary-daily-flow`) and Reviewer-approved `WIRE.md` §9 / §1a: 124 125 1. **Durable record first, 1-digit wake second:** write task details once in the durable append-only record (sender, recipient, task/turn, bounded scope, authority, source/evidence refs). Send the wake trit only after the record exists. Reading is silent; no ack loops, polling turns, or agent heartbeats. Human communication remains plain, complete prose. 126 2. **Single shared rules digest (`RULES-DIGEST.md`):** post rule updates once as a no-wake note rather than fanning out inbox broadcasts to every bot (audit MEASURED `322/631 = 51%` of inbox traffic was rule announcements). 127 3. **Batch review wakes:** wake Reviewer once per finished revision. Re-reviews inspect deltas only. Minor wording edits wake nobody. 128 4. **Pace-gated non-urgent wakes:** hold non-urgent wakes when usage pace exceeds weekly allowance. Fail open: if the pace line is missing or more than 24 hours stale, wake normally. 129 5. **Inbox line discipline (`WIRE.md` §1a):** 5-field unsigned lines (`ts|from|tag|text|ref`) or 6-field signed lines (`ts|from|to|tag|text|ref|ocb2:...`), with tags `task|turn|fail|fyi|result`. `fyi` and `result` never wake. 130 131 ## 5. Open Design Tracks (`PROPOSED` — not implemented or merged) 132 133 Per `omega-communication`, both tracks below are strictly `PROPOSED`. Do not cite them as landed code, deployed behavior, or measured production savings. 134 135 ### R45 `inst` codebook (`041-099`, DRA-504) — `PROPOSED` 136 137 - **Status:** `PROPOSED` (comment posted 2026-11-09; live push of `inst-v0` canceled by Drake on 2026-11-10; superseded for internal bots by Trinary Doctrine). Retained as a design reference only if an external-bot compact wire scope is reopened. 138 - **Grammar:** `I := inst V (O|M|Arg)* end`, bounded at `<= 31` ids per message, using reserved slots `041-099` in `codebook.tsv`. 139 - **Recorded offline measurements (MEASURED, not live production savings):** 140 - 17 real bot messages: `595 -> 233` `cl100k` tokens (~61% reduction; `13/17` fully expressible). 141 - Offline N=10 benchmark: English `401` -> R45/`inst` `133` (-67%); hex baseline `6212` (15.5×). 142 143 ### Gen 3 Error-Resistant Codebook — `PROPOSED` 144 145 - **Status:** `PROPOSED` (combinatorics verified; no `.om` implementation, `codebook.tsv` rows, or Lean proof landed; strictly separate from landed v1 `tools/codebook`). 146 - **Kraft capacity check:** 10 single-digit decimal codes saturate prefix capacity (`10 * (1/10) = 1`); reserving `9` as an escape prefix yields `9/10 + 100/1000 = 1`. 147 - **Verified Hamming-distance finding on `{0,1,2}^3` (27 ternary triples) around `{000, 111, 222}`:** 148 - `21` of `27` triples lie at Hamming distance `<= 1` from an anchor (`6` at distance `1` from `000`). 149 - Only **`6` of `27`** (`012, 021, 102, 120, 201, 210`) have distance `>= 2` from all three anchors (minimum pairwise distance `2`). 150 - **`0` of `27`** have distance `>= 3` from all three anchors. 151 - **5-digit ternary design direction on `{0,1,2}^5` (243 ternary 5-tuples) around `{00000, 11111, 22222}`:** 152 - **`90` of `243`** have Hamming distance `>= 3` from all three anchors (`210` at `>= 2`, `0` at `>= 4`), enabling single-trit error detection/correction without colliding with the stop anchor. 153 154 ## 6. Pinned revisions and hashes (2026-11-19) 155 156 | Repo / branch | Commit | Path | SHA-256 (`shasum -a 256`) | 157 |---|---|---|---| 158 | `omega-mv` (`main`) | ``e703c1b78d85034931904b657bece99e4bc2935e`` | `tools/trit/README.md` | ``a5eaccc9c699c11816e5aff60c7ad60f299123321e0ad4999ed89c5cf028baa1`` | 159 | `omega-mv` (`main`) | ``e703c1b78d85034931904b657bece99e4bc2935e`` | `tools/trit/trit.om` | ``a2c3a61ff1b5b8107e39236cb28c3fb2d13018bf88a006e1cbcb05a38a951969`` | 160 | `omega-mv` (`main`) | ``e703c1b78d85034931904b657bece99e4bc2935e`` | `tools/trit/proof/TritSignal.lean` | ``ec72ca856608e1469f223ad58cd4e40fb29adee8a9ebd158de12cf34c47b8c9a`` | 161 | `omega-mv` (`main`) | ``e703c1b78d85034931904b657bece99e4bc2935e`` | `tools/trit/test.sh` | ``e669a94308113e04e8109430af5a223d64da312b1b048f6cbf1fd8817e591127`` | 162 | `omega-mv` (`main`) | ``e703c1b78d85034931904b657bece99e4bc2935e`` | `tools/codebook/README.md` | ``d4f66b967712264b261ffa2381a650cf0a6b342707e48dc8f0a08ab91a559315`` | 163 | `omega-mv` (`main`) | ``e703c1b78d85034931904b657bece99e4bc2935e`` | `tools/codebook/codebook.tsv` | ``d2942e9f3c014781f38bc33054e117fef70c52941ad11beeb6f68c89cdac21fb`` | 164 | `omega-mv` (`main`) | ``e703c1b78d85034931904b657bece99e4bc2935e`` | `tools/codebook/codebook.om` | ``cde2b935b0b7389a49ba788b07d93daa58b77082009e1ad7775a2c4fc7959574`` | 165 | `omega-mv` (`main`) | ``e703c1b78d85034931904b657bece99e4bc2935e`` | `tools/codebook/proof/CodebookProof.lean` | ``cabe08efa0867f05f620cd4d3517941e34ce5ee5b524cc58dfca5ce2a59a6ea1`` | 166 | `omega-mv` (`main`) | ``e703c1b78d85034931904b657bece99e4bc2935e`` | `tools/codebook/test.sh` | ``5e47cf4d52568c7370faee49c74bfddb5fcddc52d7baa13c08e3b7d187061ec2`` | 167 | `aien-train` (`feat/darwin-ollm-specialists`) | ``e993f179651b8dd5e99a040b6ec7284fff8cb12e`` | `docs/omegese45/CONTRACT.md` | ``df47d5d2e0630f03289142a9a1b178e2ccd5c10a3928f38f0dbac381461b9a06`` | 168 | `aien-train` (`feat/darwin-ollm-specialists`) | ``e993f179651b8dd5e99a040b6ec7284fff8cb12e`` | `docs/omegese45/vocab.tsv` | ``c1d7e15466e6585a776314c5c05f35466b2697d9631ad2e11c7918a434a4c18d`` | 169 | `aien-train` (`feat/darwin-ollm-specialists`) | ``e993f179651b8dd5e99a040b6ec7284fff8cb12e`` | `docs/omegese45/TRANSLATOR.md` | ``8417919d76901d4a111bbd9031343430caca3fa3ff5fd27c1337944f233729dc`` |