niceassos-mesh · the night shift

si-didy-loop

Every night a small AI model on one ordinary laptop dreams up a small piece of software, writes it, tests it and keeps notes on what it learned. si-didy-loop is the set of tested rules that keep that night honest: what the model is reminded of before it dreams, which of its notes may leave the machine, what it may post, which actions wait for a person's signature, and the single page that person reads in the morning.

Each rule is a small, pure piece of code (a kernel: no clock, no files, no network) with its own tests, and every kernel is mutation-tested on GitHub's runner on every push: the gate changes the code on purpose and the tests must notice. The numbers on this page are read from the repo's own receipts, which CI re-derives, so none of them is typed in.

…
kernels mutation-gated on GitHub's runner
…
of them clean (no mutant survived)
…
tests in those suites and the state suite, each counted once
…
the sealed week check (W1 · W2)

Start here

  1. See one night. Read How it works: one dream traced from a real night, step by step, then what the whole week did.
  2. Try the two doors in this page. In Try it, type a share reason and see whether the share door lets it out, then paste some dream titles and see how the fold counts them. Both run the exact kernel files the CI gates, loaded straight from this repo.
  3. Run the tests yourself. Two sibling repos sit beside it (the conductor reads missig; the wisp's exams run on generative-estate's field):
    git clone https://github.com/sjgant80-hub/si-didy-loop
    git clone --depth 1 https://github.com/sjgant80-hub/missig
    git clone --depth 1 https://github.com/sjgant80-hub/generative-estate
    cd si-didy-loop && npm test
  4. Try to break one. Run the mutation gate (witness, pinned at v0.6) on any kernel, for example the share door:
    git clone --depth 1 --branch v0.6 https://github.com/sjgant80-hub/witness.git /tmp/witness
    node /tmp/witness/witness.mjs mutate sharedoor.mjs --test node --test sharedoor.test.mjs
  5. Check the receipts. receipts/gates.json (every gate, re-derived by CI on every push), receipts/dream-week.json (the week check), receipts/night-trace.json (the traced night) and the sealed claims in CLAIMS-dream-week.md.
  6. Wire your own night. The kernels take data in and hand verdicts back; the runners in scripts/ do the file work, and the sandbox night's own loop is yours to write around them. Read Adoption for the order to switch things on.

How it works

The night is a loop. Before it dreams, the resident (the local model, Qwen 2.5 7B through Ollama on this laptop) is handed its own most-repeated dream titles from recent nights. It writes a title and an idea, then code and a test for it. The code is run against its own test and then mutation-tested; failing code gets revision rounds. The resident writes a note, and if it wants the note to leave the machine, the share door judges it. Every step is stamped into a private ledger on the machine, and the next night's reminder is folded from that ledger.

One night of the sandbox A vertical flow. One: the prompt, folded by lessonsfold from Kar's own dream titles. Two: dream, a title and an idea from the local 7B model. Three: render, a kernel and its test; if the model returns nothing the runner records a no-render note. Four: gate, the code's own tests then witness, with revision rounds. Five: note, learned or failure noted, private. Six: the share door judges the note; open notes go to the shares log stamped with a time, shut notes stay in the private ledger with the reason. Seven: the private ledger records every step with a time; a dashed arrow returns to the prompt for the next night, and the week check reads the ledger. 1 · the prompt foldDreams: own titles, by family lessonsfold.mjs · "you have been here before" 2 · dream the local 7B writes TITLE + IDEA … 3 · render ===KERNEL=== + ===TEST=== nothing back → "no render" (the runner's failure) … 4 · gate its own tests, then witness fails → revision rounds … 5 · note "learned:" / "failure noted:" — private 6 · the share door judgeShare: stamp · shut · label sharedoor.mjs open → shares … shut → private … 7 · the private ledger every step, timed, on the machine dreamweek.mjs reads it for the week check

Counts beside the boxes are the sealed week (window B) from dream-week.json and night-trace.json.

One dream, traced from a real night

This is the last dream of the sealed week that went all the way through, as the ledger recorded it (titles and the gate's verdict only; no text leaves the ledger).

  1. loading the trace…

Read it like this: the model dreamed a title, wrote code and a test that ran, and the mutation gate showed the test missed a change to the code, so the code is not trusted. The resident noted the failure and tried to share it; the share door shut it because the reason named nothing a reader could go and check.

Around the night

The same repo holds the parts of the loop that act during the day, each gated the same way: the operator runs operational work on its own (building, gating, drafting) but queues a payment, a spend, a binding commitment, anything legal and any venture going live until the key-holder signs it (Ed25519; the operator holds only the key-holder's public key, so it can check the key-holder's signature but never make it; its own key pair signs only its own work, and approval refuses any signature but the key-holder's); the rail is the one outward action that runs without a signature, and its runner sends a post only through postScrubbedProven: the model's fingerprints scrubbed first (scrub.mjs), then every claim checked against the build receipt the draft carries (receiptgate.mjs: no receipt, no post), then its score, spacing and daily cap; and the morning brief folds the night's files into one page ending in one first action, and is never published.

The week check

On 2026-10-28 two things changed in the night: the dream prompt began naming Kar's own most-dreamed titles, and the model moved from the 14B (which did not fit this laptop and timed out) to the 7B. The build's memory set the check then: after a week, did more dreams become code, and did the named repeats fall? The claims, windows and definitions were sealed in CLAIMS-dream-week.md and pushed before the code that measures them; both earlier rough looks at the ledger are declared there, so this is a recorded check, not a blind test. A failure stays on the record.

claimbefore (A)the 7B week (B)verdict
loading the receipt…

What the fold fix changed in the prompt

The week also showed why the reminder list was weak: the 7B re-dreams one thing under version markers (++, +++, Optimized, Redux…). The fold already ignored punctuation, but the words split the family and the prompt named the latest spelling. The fold in this repo now strips trailing version markers (…, and V followed by digits) before counting, gated by its suite and witness. Its first version was one regular expression whose time grew exponentially with a gap of spaces or plus signs inside a title, so one strange title could have hung the night's fold; it now reads the same rule right to left, one marker at a time, in time linear in the title, and its suite holds it to the first version's answer on 20,000 generated titles and times a 100,000-character gap. Kar's night carries its own byte-for-byte copy of this file on the laptop; until that copy is replaced with this one, the night still folds by exact spelling. The prompt's list at the check date, as shipped and as fixed:

as shipped (exact spelling)dreamsfamily-foldeddreams
loading…

Try it

These two run in your browser on the real kernels, imported from sharedoor.mjs and lessonsfold.mjs: the same files the CI gates. Nothing you type leaves this page.

The share door

A share needs a reason that points at something a reader could check: an estate word (gate, kernel, witness, ledger…) or a code-shaped name such as sharedoor.mjs, foldDreams or 16/16. Addressees and the share's own title do not count.

The verdict appears here.

The dream fold

One dream title per line, newest last. The fold counts each family once, under the plain name of its latest spelling, and names those dreamed at least twice: the list the next night's prompt carries.

The list appears here.

Blueprint

Organ by organ. Each row is one kernel with its suite; the test counts and mutation verdicts are read from receipts/gates.json, which scripts/gates-check.mjs re-derives from the runner's own witness output on every push (CI turns red if a single number differs). An argued exemption is a mutant that cannot change behaviour, written down with its reason in witness.baseline.json.

kernelwhat it doestestsmutants caughtgate
loading the gate receipt…

The runners in scripts/ (nightly study, operate, train, brief, rail, wisp-collapse, the week check and trace) do the file and network work and are not mutation-gated; they only wire files to the kernels above. The rail's runner, the one that can reach a platform, has its own behaviour suite (scripts/rail-runner.test.mjs): it runs the real runner on a copy with the network replaced by a stub, and proves an unreceipted or overclaiming draft never reaches the wire. Kar's own body (si-didy's sandbox runner, which vendors lessonsfold.mjs and sharedoor.mjs) lives on the laptop, outside this repo.

Adoption

What it does for a team: if you run any AI work unattended (an overnight agent, a batch that writes code or copy, a bot that posts), you wake up to output nobody watched being made. These kernels make that output checkable in the morning: every step is timed in a ledger you hold; code the model writes is run against its own test and mutation-checked before it is trusted; a note leaves only with a reason that names something checkable; a post goes out only if a build receipt backs every claim in it; a payment, a spend, a binding commitment, anything legal or a launch waits for a person's signature; and a weekly question is written down before it is measured, with failures kept.

What it needs: Node.js 20 or later and git; the kernels have no dependencies. For the night itself, a local model server (Ollama) with a model that fits the machine's memory: on this laptop the 14B did not fit and timed out, and the 7B does. The model and Ollama are separate software under their own licences. The runners also expect the sibling checkouts they load beside this one (missig, generative-estate, fallkard-forge, fallforce), and they carry one machine's paths until you point them at yours.

How a team rolls it out

  1. Gate it on your own CI first. Fork, keep .github/workflows/ci.yml, and let your runner reproduce every verdict in receipts/gates.json. Nothing else is trusted until that is green.
  2. Run the doors read-only over logs you already have. Feed last month's agent notes through judgeShare and last month's job titles through foldDreams. That is how the share door was proven before it went live: a backtest over the real shares log.
  3. Wire the runner to your paths. The kernels never touch files; the runners in scripts/ do, and they are written for one machine's paths. Point them at yours, and keep state in safejson files so a crash mid-write cannot kill the next night. The sandbox night's own loop is not in this repo: write it in the order How it works draws (fold the prompt, dream, render, gate, note, the share door, the ledger), calling these kernels at each step.
  4. Make the key yours. Generate the operator's key pair on the key-holder's machine (scripts/master-key.mjs --init); the night only ever holds the public key, so it can prepare a threshold action but never execute one.
  5. Switch on outward actions last. The rail needs a platform token pasted by the key-holder into a local config file; it never rides through chat, a repo or a prompt, and the brief never prints it. Once the token is in, posts need no signature, so the draft writer must attach the build receipt each post's claims rest on: a draft without one is refused at the gate and stays in the outbox.
  6. Seal a week check before you look. Write the claim, the windows and the definitions in a new file, commit it, then measure with a kernel, and keep the result whichever way it falls.

For business

For a company deciding whether to run unattended AI work this way. Supplied by AI Native Solutions.

Benefits by role

CEO

One page each morning ending in one first action, instead of a heap of logs. Anything the system says in public is limited to what a build receipt backs, so an AI cannot overclaim in the company's name.

CFO

The work runs on a model on hardware you already own, so the running cost is electricity, worked out below from sourced figures. The code is MIT-licensed: no seat licence and no subscription for the kernels.

COO

The night runs on its own as scheduled tasks, and its state survives a crash mid-write. A runner fault is recorded as the runner's fault ("no render"), not learned by the model as a lesson, so the process does not quietly teach itself the wrong thing.

CTO / CISO

Pure kernels (no clock, no files, no network), mutation-gated on GitHub's runner. Threshold actions need an Ed25519 signature the system cannot make. The posting token lives only in a local file the brief is tested never to print. The ledger stays on the machine.

Engineering

Code the model writes arrives with its own test and a mutation verdict, so a reviewer starts from what was proven, not from a guess. The week check is a template for measuring an AI change honestly.

Comms and operations

No platitude leaves the machine: the share door shuts reasons that name nothing. Posts go out on the platform's own sanctioned rail, spaced and capped, scrubbed of model fingerprints, and only with claims a receipt backs.

The cost case: your process, your numbers

The case for one process: the hours your people spend each week on work an unattended AI could take a share of (for example checking and triaging overnight output), what renting AI adds, and what owning it costs to run. The hours, the share and the counts are yours; every other figure is read from a sourced basis (listed under the result). It is computed in your browser by liveware's gated cost-case kernel, vendored byte for byte and gated here too. No price of ours appears: these are your costs. The example inputs are the kernel's defaults, not a measurement of this system: replace them with yours.

loading the kernel and the basis…
Where every figure comes from

    How each route is costed: today is the staff time at the UK median wage (on-costs left out, so it is a floor); rented seats add assistant seats that help each person but take no work off; cloud API takes the same share of the work off as owning it and adds a frontier model's per-call bill on every case; own takes the same share off and adds the always-on extra electricity of a laptop already in use. Later years rise by CPI. The electricity line counts an extra … watts (a laptop processor's base power) for every one of the basis's … hours a year: a processor running a local model flat out can draw more than its base power, and a night that runs a few hours draws for fewer hours, so check that line against your own machine's meter. Not in this case: the one-off time your team spends wiring the runners to your own paths (Adoption, step 3) and building the sandbox night's own runner (not inside), and any support terms you agree with the supplier. Add your own figures for those; this page does not guess them.

    Against what you pay now

    The comparison uses only sourced prices: rented assistant seats at the Microsoft 365 Copilot enterprise list price, and a cloud model at the Claude Sonnet 5 API list rates, each from the basis above. The rows in the result are exactly that comparison for your inputs. Like for like, the cloud route and the owned route take the same share of work off; what separates them is the per-call bill and where your data goes.

    Security and data protection

    Roll-out

    The six steps in Adoption are the roll-out: CI first, read-only over your own logs, wire the runner, make the key yours, outward actions last, then a sealed week check. A team can stop after any step and still keep what it has: each step is useful on its own.

    Ownership, support and exit

    Risks, answered straight

    The case for the board

    Unattended AI is cheap to start and expensive to trust. This is a way to run it where the trust is earned in public: every rule is code with a test, every test is attacked by a mutation gate on a neutral runner, every claim the system makes outward is limited to what a receipt backs, nothing with money or legal weight moves without a person's signature, and the company measures its own AI changes by writing the prediction down first and keeping the failures. It runs on hardware the company owns, under a licence the company keeps.

    White paper: keeping an unattended AI honest

    The problem. A model that works while nobody watches produces output that looks like progress. In this estate's own night, looking closely found five kinds of theatre: nightly "ideas" that were one fill-in template over three names; a memory probe that scored zero by construction because the model was never shown the memory it was asked about; a share rule ("an explicit reason, logged and justified") that had quietly narrowed to "three real words", so platitudes went out; a reminder list folded from a log that had stopped moving, so it named the same dead lessons every night; and a model too big for the laptop, whose timeouts the resident then wrote up as lessons.

    The method. Each fix is a small pure kernel with its own tests, mutation-gated on a neutral runner, and wired by a separate runner script. Words come from evidence only (plainsay says a route from the edges it walked, or says that a reason was not kept). Doors are floors with written refusals (sharedoor, operator, receiptgate). State survives crashes (safejson). Runner faults are named as runner faults. And a change to the night is judged by a claim sealed before the measuring code exists.

    The result so far. Moving the night to a model that fits raised the share of dreams that became code (W1 holds). Naming Kar's repeats did not reduce them in that week (W2 fails); the fold that names them now counts a title's whole family, so once the resident carries it the next measurement is about the real repeat rather than its latest spelling. Only a small share of the code passes its own gate, which is the gate doing its job.

    The limits. One laptop, one resident, one week, two changes on the same day. The check is recorded, not blind. The doors are floors, not judges of quality. None of this makes the model wiser; it makes what the model did checkable.

    Credits

    Built by the estate (sjgant80-hub). Powered by the Konomi architecture, created by Thomas Frumkin.

    The night's dream-and-review shape (the deepening loop's dream holds what it finds apart and never writes the graph; a dreamed kernel is trusted only once its gate passes) draws on Gary W. Floyd, Lumiea Systems Research Division — ThunderStruck Service, LLC — "Dream State Architecture: GEP-Guided Memory Consolidation and Entropy Regulation in Artificial Consciousness Systems," 2025. The deepening loop's remember step was specified as "remember like Gary".

    The receipt gate is post-proof's kernel and the scrub is fallscrub's, both from this estate and vendored with their own suites; the cost case is liveware's kernel over the estate's sourced basis. Mutation gate: witness v0.6.