sovereign-intelligence
Front door to Drake Stapleton's sovereign stack.
Brought by drakestapleton
sovereign-intelligence / harness / coder / README.md
| 1 | # coder: an Omega-only coding session for omp |
| 2 | |
| 3 | Harness configuration that makes an `omp` session write Omega and nothing else, with the pinned |
| 4 | seeded compiler in the loop. It is not product code and not part of the trusted Omega stack: the |
| 5 | extension is TypeScript because `omp` extensions are TypeScript, and the builders are small shell |
| 6 | scripts. "Only Omega" is enforced by the harness and the compiler, not by model weights. |
| 7 | |
| 8 | | File | What it does | |
| 9 | |---|---| |
| 10 | | `omega-guard.ts` | `omp` extension (load with `-e`). Refuses every write or edit except `.om` files and `NOTES.md` inside the session directory; refuses reads outside the session directory and the context pack; compiles each written `.om` with the pinned `omc` (sha256 checked before every compile) and appends the result, with the error meaning and offending line, to the tool result; adds the `omega_run` tool (compile, then run in a `bwrap` sandbox with no network); refuses to let the session finish while a touched `.om` fails to compile, or, with `OMEGA_CASES` set, until the om2 gate passes those cases. | |
| 11 | | `omega-prompt-head.md` | Rules part of the system prompt (tools, check loop, `DONE <file>`). | |
| 12 | | `omega-observed.md` | Compiler facts observed with the pinned `omc` that the skill does not state. | |
| 13 | | `build-context.sh` | Builds the context pack: `OMEGA.md` = rules + `skills/omega-encoding` sections 2-11 (citation links stripped) + observed facts + eight examples that must each compile with the pinned `omc`; `CONTROL.md` = rules only. | |
| 14 | | `eval/` | Held-out eval: 27 tasks (`tasks/ID/{spec.md,stdin,expected.out,expected.exit}`), manifest `tasks.json`, runner `run.sh`. | |
| 15 | |
| 16 | ## Environment read by the guard |
| 17 | |
| 18 | | Variable | Default | Meaning | |
| 19 | |---|---|---| |
| 20 | | `OMEGA_HOME` | `~/.local/share/aien-omega` | holds `omc`, the built `gate` and `seed/qualification/om2/fixtures` | |
| 21 | | `OMEGA_CONTEXT` | `$OMEGA_HOME/context` | the one directory outside the session the model may read | |
| 22 | | `OMEGA_CASES` | unset | om2 gate case file that must pass before the session may finish | |
| 23 | | `OMEGA_STOP_LIMIT` | `0` (no limit) | after this many refused finishes the finish is allowed and logged | |
| 24 | | `OMEGA_LOG` | unset | append-only log of every allowed/refused tool call, compile and finish | |
| 25 | |
| 26 | The required `omc` sha256 (`2c824805...029f`, aien-dev/omega-mv `f1b9ecb5d` `seed/out/omc`) is fixed in |
| 27 | `omega-guard.ts`; a mismatch refuses every compile. `omega_run` and the finish check run the program |
| 28 | with a read-only root, no network and a 10 s timeout (the finish check gives the gate 120 s). |
| 29 | |
| 30 | ## Running it |
| 31 | |
| 32 | Build the pack, install the guard, then start `omp` in the project directory with no shell tool: |
| 33 | |
| 34 | ```sh |
| 35 | OMEGA_MV=/path/to/omega-mv OMC=$HOME/.local/share/aien-omega/omc sh coder/build-context.sh ~/.local/share/aien-omega/context |
| 36 | cp coder/omega-guard.ts ~/.local/share/aien-omega/ |
| 37 | omp --model PROVIDER/MODEL --tools read,edit,write,grep,glob,omega_run --no-skills --no-rules \ |
| 38 | --no-extensions --no-lsp --no-context-files -e ~/.local/share/aien-omega/omega-guard.ts \ |
| 39 | --system-prompt ~/.local/share/aien-omega/context/OMEGA.md |
| 40 | ``` |
| 41 | |
| 42 | `--no-extensions` does not stop an extension named with `-e`. Use an isolated `omp` profile with |
| 43 | advisors off and no other providers so the session cannot fall back to another model. |
| 44 | |
| 45 | ## Eval |
| 46 | |
| 47 | `sh coder/eval/run.sh omega|control OUTDIR coder/eval/tasks` runs every task in a fresh empty |
| 48 | directory, one after another. The `control` arm keeps the model, tools, guard and check loop and swaps |
| 49 | the system prompt for `CONTROL.md` with an empty readable context, so the only variable is the Omega |
| 50 | context. Scoring does not trust the session: the runner compiles `main.om` with the pinned `omc` |
| 51 | (non-zero exit or no file = compile-fail) and runs the om2 gate on the task's case line in a fresh |
| 52 | scratch directory (FAIL = wrong-output). |
| 53 | |
| 54 | The reference solutions are held out: they are not in this repository, the context pack or any |
| 55 | session directory; `tasks.json` records only their sha256. They were checked with the pinned gate |
| 56 | (27/27 PASS, with a negative control that failed as it should). Keep `coder/eval/` out of any |
| 57 | training corpus built from this repository, or the eval stops measuring anything. |