Skip to the content.

Aurora — Design & Architecture Spec

Date: 2026-06-13 Status: approved (overlay direction, broad v1, public GH repo, full autonomy) One-liner: A modern, batteries-included overlay distribution for OpenComputers OpenOS.

1. Goal & non-goals

Aurora upgrades a stock OpenOS install with modern programs, libraries, a real package manager, a developer toolchain (“compilers”), shell/UX improvements, and security + reliability + performance patches — without breaking OpenOS compatibility. Any program that runs on stock OpenOS keeps running.

Non-goals:

2. Design principles

  1. Additive, not destructive. New files live under their own names. Core files are only patched when fixing a real bug, and the patch is documented in docs/PATCHES.md with a stock-behavior-preserving rationale. Stock files we replace are kept verbatim under patches/<name>.orig for diffing.
  2. Pure-Lua, OC-portable. Every library runs on Lua 5.3. Hardware acceleration (the data card: sha256, deflate) is used when present, with a pure-Lua fallback so nothing requires a specific tier.
  3. Testable on the host. Pure-Lua modules are unit-tested with the host lua5.3 against an OpenComputers shim (tests/shim/oc.lua). Anything that touches real components is covered by an in-emulator self-test booted under ocvm. Everything is syntax-linted with luac5.3 -p.
  4. Self-documenting. Every user-facing command ships a usr/man/<cmd> page and --help. Libraries carry doc-comments.
  5. Idempotent install. Re-running the installer converges; never corrupts a half-installed state. Downloads are checksum-verified and written atomically.

3. Repository layout

aurora/
├── overlay/                 # files laid over an OpenOS rootfs (the product)
│   ├── bin/                 # new commands (opm, abundle, aminify, atest, alint, arepl, ...)
│   ├── lib/                 # new libraries (aurora/*, json, class, inspect, argparse, ahttp, anet, ...)
│   ├── etc/                 # default config (aurora.cfg, themes, opm sources)
│   └── usr/man/             # man pages for every new command
├── patches/                 # patched core files + *.orig originals + PATCHES rationale
├── install/                 # in-VM installer (install.lua) + host bootstrap
├── registry/                # opm package registry (index.lua + packages/*)
├── tools/                   # host-side: build.sh, test.sh (unit+integration), lint.sh, pack.lua
├── tests/
│   ├── shim/oc.lua          # OpenComputers API shim for host lua5.3
│   ├── unit/*.lua           # host unit tests (fast)
│   └── integration/selftest.lua  # in-VM self-test (boots under ocvm)
├── docs/                    # ARCHITECTURE.md, PATCHES.md, design spec, per-feature docs
├── .github/workflows/ci.yml # lint + host unit tests on push
├── README.md  CHANGELOG.md  LICENSE

/lib/aurora/ is the namespace root for Aurora internals so require("aurora.x") never collides with stock or third-party modules. Top-level convenience libs (json, class, inspect, argparse, ahttp, anet) are placed in /lib directly because they are meant to be required by user programs by short name.

4. Components (v1, all four focus areas)

4.1 Core libraries (overlay/lib)

4.2 Ecosystem, packages & networking

4.3 Dev toolchain & “compilers”

4.4 Shell, UX & editor

4.5 Security, reliability & optimization (patches)

5. Data flow — package install (representative)

opm install foo
  └─ load /etc/opm/sources.lua  (registry base URL)
  └─ ahttp.get(<base>/index.lua) → parse → resolve deps (semver)
  └─ for each file: ahttp download → tmp → hash.sha256 == manifest? 
  └─ atomic move tmp → target; write /etc/opm/installed/foo.lua manifest
  └─ run optional post-install hook

6. Testing strategy

Layer Tool What
Lint luac5.3 -p over all .lua syntax of every shipped + test file
Unit host lua5.3 + tests/shim/oc.lua pure-Lua libs (json, semver, hash, minify, transpiler lexer, argparse, inspect, opm resolver)
Integration ocvm self-test (script -qc) boot OpenOS+overlay, run atest suite, write /selftest.log, shutdown; assert no FAIL

tools/test.sh runs lint → unit → integration and is the canonical signal. A throwaway emulator instance is built by copying stock openos + applying the overlay, so tests never mutate the lab’s pristine tree.

7. Install & distribution

  1. Bootstrap (online): wget <raw>/install/install.lua /tmp/i.lua && /tmp/i.lua — fetches the registry, installs aurora-base meta-package, patches wget, wires .shrc, reboots. Idempotent.
  2. Overlay (offline): tools/build.sh produces dist/aurora-overlay.tar-like directory + an in-VM apply.lua that copies overlay files and applies patches over an existing OpenOS, keeping *.orig backups.
  3. opm thereafter manages individual packages from the GitHub-hosted registry.

8. Risks & mitigations

9. Milestones (autonomous execution order)

  1. Test harness + shim + CI skeleton.
  2. Core libs (json, class, inspect, argparse, util, fsx, hash, semver) + unit tests.
  3. Networking (ahttp, anet) + unit tests (mocked).
  4. opm + registry + unit tests (resolver/manifest) .
  5. Dev toolchain (atest, alint, aminify, abundle, transpiler, arepl) + tests.
  6. Shell/UX (prompt, theme, completion, als, .shrc wiring).
  7. Security/perf patches (wget, transfer review, hardening, optimize).
  8. Installer + offline overlay applier + ocvm integration self-test.
  9. Docs (README, ARCHITECTURE, PATCHES, CHANGELOG, man pages) + CI.
  10. Create public GH repo, topics, description, push. ```