Skip to content
Maxwell CollinsContact

Venue server operating system for AI agents

The control system an AI agent uses to run a venue's live server: every change recorded, every deploy reversible.

What it achieved

Lets an AI agent run a venue's live server, with backups proven to restore every customer payment exactly.

The short version

This system lets an AI agent run an event venue's live server, with backups proven to restore every customer payment exactly, and the machine, not the agent, decides when work is done. A test restore reconciled every recorded customer payment, across 1,224 bookings, to the cent. Every change to the server goes through one door of 18 recorded commands. A gate of 11 checks answers done, not done or unable to tell. The agent may deploy only after a fresh proof that rolling back works. Every scheduled job reports to an outside monitor, so silence is the alarm. Backups count only once restored, and logs ship each night to storage nobody can change. Every incident becomes a rule in code. It is drilled on the venue's new production server.

The problem

A server run by hand through AI sessions depends on each session remembering what the last one learned. The management dashboard showed healthy services as stopped and reported a crashed build as a success. The server holds the venue's recorded customer payments, so it needed a way of running that does not depend on an agent remembering.

In use

  1. The agent asks for a change through one command, which records it in a log that can only be added to.
  2. The gate runs its 11 checks against the live server and answers in one of three states: done, not done, or unable to tell.
  3. Before any deploy, the system proves the rollback works on the real server.
  4. Every incident becomes a line in a 116-row list of lessons, each one moved from a written note into code and then into the gate.
  5. Maxwell judges the work by the verdicts the machine records (pass, fail, proven, unverified) instead of reading every line.

What it achieved

  • An AI agent can run the venue's live server, which holds its customer payment records, without a person approving each step: it may deploy only after the system has freshly proven that a rollback works, and only the machine's checks can declare work done.
  • A test restore of the backup brought back every customer payment across 1,224 bookings exactly, to the cent, checked against the live database.
  • Locking the server down can no longer lock its operator out: a reboot drill on the real server brought remote access back in about 12 seconds, with the proof tied to the new boot.
  • Every incident becomes a rule the machine enforces, so a lesson cannot be forgotten: 116 of them, each marked with how far it has climbed from a note to code to a gate check.
  • Nine rounds of outside review attacked the system, and each round's findings became checks in the gate.
  • The checks that declare work done are themselves attacked every week by 140 planted failures, so a check that has quietly stopped working is caught instead of passing everything.

The full record

On this page
In one sentence

Maxwell built an operating system for a production server that an AI agent runs, 11,520 lines in 87 files (5,083 lines of application code in 53 files, 3,085 lines of tests in 17 files, the rest configuration and governance documents) with 18 commands (audited, one file each) behind one door, an 11-check "done" gate, 140 planted-case files that attack the gate's own checks, a 116-row ratchet that turns every incident into code, and about 500 test cases, so that every change to the venue business's server goes through one door, "done" is a gate's exit code and nothing else, and the right to deploy follows fresh proof that a rollback works; he built it by directing AI agents, in three days and 43 commits, and took it through nine rounds of outside review.

lines in 87 files
11,520
audited commands
18
planted-failure files
140
tests
500

What it does

The whole system is 227 tracked files and 11,520 lines outside the planted-failure fixtures (the 140 fixture files add 290 more): 5,083 lines of application code in 53 files (4,264 lines in 34 files in the languages SCALE.md counts, plus 819 lines in 19 extension-less shell files, the 18 verbs and the launcher), 3,085 lines of tests in 17 files, and about 3,100 lines of governance documents, plans, audits and handoffs besides the configuration files of the server itself. Counting the configuration files too (the crontab, the 92-line job registry, the compose file, the web-server configuration, the cloud-init file, the ledger schema, the secrets template and the ignore list), the non-test, non-document, non-fixture software is 5,336 lines in 60 files, and with the tests the code and configuration come to 8,421 lines. A 52-line Codex copy of the governing rules (AGENTS.md, generated from CLAUDE.md) sits beside them, so a second AI tool is bound by the same rules. It is the operating system for the server that carries a venue business's booking site, customer photo galleries and card payments. Its premise: do not rebuild the application, build the thing that runs the application, so that an AI agent can hold real power over a production machine and the machine's safety does not depend on the agent's memory or honesty. Each part below is a separate piece of that system.

vpsctl, the one door. A launcher (bin/vpsctl, 28 lines) plus 18 verbs, one file each in verbs/, 856 lines in all and none over 126: apply, attest, attest-external, backup, cutover, deploy, evidence, gate, golive, logs, monitors, probe, provision, reboot, rollback, snapshot, status and sync. The launcher accepts only a bare verb name (letters, digits and hyphens), so it can never run a file that is not a verb. Every mutating verb is plan-then-execute: it prints the plan and touches nothing without --execute, so an abort produces zero operations. Every verb records an intent before and an outcome after in the ledger. A shared library gives them the same helpers: the ledger writer, the plan-then-execute guard, the NOT WIRED refusal, privilege escalation that happens inside the verb (so the runbook can run as an unprivileged user and a verb still reaches root-only work, with a swappable sudo so tests can see the exact command it was handed), and a boot-id reader that refuses to treat an unreadable id as a value. What each verb does:

  • apply: the only configuration-changing path. Pulls the repository on the server, installs the web-server, scheduler and ledger configuration, and regenerates the expected snapshot. There is no verb to edit a file on the server; a hand fix stays possible for a person, but the drift check goes red on the next gate run, so a fix survives only by landing in the repository.
  • snapshot: derives the server's real state (packages, scheduled jobs, firewall, system units, containers, script hashes, running processes) so that the reference description is an output, never a document someone has to keep honest.
  • deploy: plan-then-execute deploy of an exact commit. It reads the rollback-proven check and refuses to run under standing authorisation unless the rollback exercise is fresh; otherwise it demands an explicit operator approval flag. Its plan names the heap-size setting that fixes the build crash, a health probe on a side port, an atomic image swap that keeps the previous image tagged :rollback, and a full gate whose exit code is the only thing that lets it claim success.
  • rollback: swaps back to the kept image after proving it starts and reports healthy.
  • backup (run, drill): a database dump to local disk and to write-once off-server storage stamped with its row count, and a restore drill into a scratch database that counts rows and resolves relations.
  • evidence (ship, query): ships the day's logs off the server and pulls a day's bundle back to answer questions months later.
  • monitors: provisions or refreshes the outside dead-man monitors through the door, so the provisioner is something the system runs and not a script path someone must remember.
  • provision: runs the server setup (or one phase of the SSH drill) through the door, validates the trusted addresses first, and refuses to request the SSH cutover unless the drill has passed for the current boot.
  • reboot: the reboot half of the SSH drill, recorded in the ledger, refused out of sequence.
  • sync: moves the server's checkout to an explicit reviewed commit and proves it landed. It takes a literal 40-character commit and never a branch name, refuses a dirty tree, and asserts the exact commit after checkout.
  • golive: writes the LIVE marker, but only after asserting that the scheduler is installed, the dead-man monitors are provisioned and the ledger schema is applied, so the marker cannot make a hollow server look ready.
  • cutover: writes the CUTOVER marker at the moment traffic flips, refuses if any job is still staged, then runs the full gate.
  • attest and attest-external: record a verification verdict, the commit it was taken against and a digest of the evidence, in the ledger; attest-external derives the verdict from an outside verifier's artifact and checks the four-slot quorum.
  • gate, probe, status, logs: run the gate, run the probe, give one small briefing instead of thirty kilobytes of spelunking, and tail logs with a bound. A verb whose server half has no server attached exits with its own code, 3, NOT WIRED, and records the refusal, so an unconnected path can never be mistaken for success.

The three-state gate. gate/gate.py and eleven checks (1,010 lines across the check files and the shared stamp spine) decide "done". Each verdict is PASS, FAIL or PENDING; the gate counts the checks it ran and refuses to pass on zero; a check that crashes is a failing check; the exit code is 0 for green and 1 for red. Every check is a pure function of explicit inputs, so the probe can run the same deployed code against planted directories. A shared stamp spine (_stamps.py) holds three rules: a server that has the SERVER marker but no LIVE marker is FAIL, never a quiet PENDING, and a missing state folder is FAIL; a stamp dated in the future is FAIL, so it cannot pass forever and silently re-arm deploy's standing authorisation; and a true/false value is never a count (in Python True equals 1, so {"rows": true} would otherwise pass a backup of nothing). The eleven checks:

  • backup-fresh: the nightly backup is under 26 hours old and captured at least one row; a local-only dump does not count.
  • cron-liveness (264 lines, the largest): every job registered in cron/jobs.json has reported within its own cadence. The registry is the authority, so a job that never ran is FAIL, and a stamp with no registry entry is FAIL as drift. A job's dead-man monitor is proven by a provisioning receipt that must carry a provider-issued identifier and a ping address on the provider's own host with that exact identifier, and a job's command must be the exact gate command, tested as a token list and not as a substring. A job may be marked staged, which reports PENDING so the gate is not red by design while the old server still serves, but the mute expires by itself: once the CUTOVER marker exists, a staged job is a FAIL.
  • drift: the server's snapshot matches what the repository says it should be, and both snapshots must contain every required section, because two empty snapshots would otherwise match.
  • evidence-fresh: the nightly log ship is under 26 hours old, carries a record count of at least one and a manifest hash.
  • rollback-proven: the weekly rollback exercise is under 8 days old, probed /api/readyz, got HTTP 200, got the body status healthy, and proved that the previous image runs against the current database schema. The application's /api/healthz is hard-coded to return 200 and /api/readyz returns 200 for a degraded service, so the check grades the body and has planted cases for both traps.
  • rebuild-drill: a throwaway server was built from the repository and the latest backup within 30 days and its full gate ran green there; the stamp requires a fresh machine, so a re-run on the real server cannot write it.
  • restore-drill: the quarterly restore drill, under 95 days, looked at at least one relationship and every relationship resolved inside the restored set.
  • site-up: the business is actually serving. It grades a stamp written every 5 minutes by scripts/site-probe.sh that records the HTTPS status through the real proxy, whether the database answers, days left on the certificate (at least 21), disk use (at most 85 percent), memory use (at most 92 percent) and unhealthy or missing containers. The alarm comes from an outside observer when the probe stops reporting, not from the sick server trying to phone out.
  • meta-size: no verb over 150 lines and no more than 2,000 lines of verbs in total.
  • meta-state-sweep: the verbs write state only to the repository, the ledger and the state folder.
  • meta-no-daemon: the verbs contain no background-process shapes (nohup, setsid, disown, a trailing ampersand), so the command stays dispatch-and-exit.

The probe, the trust root. probe/probe.py (127 lines) and 140 fixture files, 56 case folders in all (43 must-fire, 12 must-pass and one must-pending case for the staged-job state) across the 11 checks, with the heaviest coverage on cron-liveness (69 files), drift (16), site-up (14) and rollback-proven (10). For every check it feeds the planted directories through the same deployed code the gate runs. Each case lives in a folder named must_fire or must_pass; timestamp tokens (__NOW__, __AGE_<N>H__) are filled in at run time in a throwaway copy, so a committed fixture cannot age into staleness. The verdicts are works, GUARD DEAD (a check that did not fire where it must) and UNPROVEN (a check with no fixtures, which turns the whole probe red). It runs weekly through the scheduler, and on the server it must be run from the installed copy so a stale install cannot demonstrate fixes it never received.

The runner and the dead-man pipeline. runner/runner.py (148 lines) wraps every scheduled job in a per-job kernel lock, a hard timeout, one timestamped log, a stamp the gate re-derives its verdict from, and a ping to an outside monitor on success: liveness is asserted by the absence of that ping, because a dead server cannot send an alarm about being dead. A broken monitor never breaks the job. Ten jobs are registered and scheduled in the crontab, staggered off the top of the hour, clear of the container registry's midnight rate-limit storm: the site probe every 5 minutes; the snapshot, evidence ship, backup, daily gate and monitor refresh every day; the probe weekly; the rollback exercise weekly; the restore drill quarterly; and the rebuild drill monthly. The lock is flock on a held descriptor, never a file that exists or not, because only one of any number of simultaneous runs may win, and a runner that can double-run would double-send every email, reminder and calendar sync of the business. A skipped run exits with the standard "temporary failure" code 75, which the runner treats as a healthy no-op and never as a failure ping; it writes no stamp either, so if skips persist the stamp goes stale and cron-liveness fires on its own schedule. A lock-directory permission error is not mistaken for contention: only genuine contention is a clean skip, because reading a permission fault as "another run holds it" would leave a job doing nothing, forever, silently. Each job has its own hard timeout in the registry (60 seconds for the site probe up to 3,600 for the rebuild drill), a run that exceeds it is recorded as exit 124, and every run's output and exit code land in one ops.log with a timestamp and job name on every line. On failure the ping goes to the monitor's /fail address carrying the last 9,000 characters of the job's output, so the alarm arrives with its own explanation. The registry, the crontab and the gate all derive from the same cron/jobs.json; the daily gate job is the one entry marked as excluded from liveness (it cannot vouch for itself), and the check accepts that exclusion only for the exact gate command, with planted cases for a wrong command, a prefix and a substring. The site probe's stamp must be under 12 minutes old (0.2 hours) for site-up to pass.

The append-only ledger. ledger/schema.sql makes an ops_ledger table (phase restricted to intent, done, failed, refused-unwired, a payload digest column) whose permanence lives in the database engine: row triggers refuse UPDATE and DELETE, and a separate statement-level trigger refuses TRUNCATE, because row triggers do not fire on TRUNCATE and one command would otherwise erase the whole ledger past every other protection. The triggers fire for any writer, a verb, a person with psql or a maintainer years later.

The lockout-safe bootstrap. bootstrap/bootstrap.sh (553 lines) turns a fresh Linux machine into the configured server: packages; the deploy user and its pull credentials; remote access; the firewall; an automatic ban on repeated failed logins that can never ban the operator; a journald size cap of 500 MB and 30 days and unattended security updates; a recovery path that needs no network access; a deploy-readable monitoring credential; 4 GB of swap; the remote-access cutover; and the state skeleton. That is nine numbered stages and four sub-stages (2b, 4b, 6b, 6c), idempotent by construction: every stage checks before it acts, so a rerun is harmless. The SERVER marker is written at entry, so from the first instant a missing LIVE marker is an honest FAIL. Stage order is fixed because two operations can strand the operator: the firewall allows the new access path before it enables, and the old one closes only in stage 8, which refuses unless the SSH drill wrote a PASSED marker carrying the current boot identifier, so a drill from before a reboot cannot vouch for the server after it. Its parts:

  • SSH policy (bootstrap/ssh-policy.sh, 160 lines): hardening is monotonic in every dimension of remote access, and a provisioned server whose real state cannot be read fails closed. The floor comes from what is observed, not from a marker: a marker is a claim about state, the listening connection is the state. A rerun may narrow access and never widen it.
  • The SSH drill (bootstrap/ssh-drill.sh, 104 lines): proves SSH survives a service restart and a full reboot, with every confirmation a steady-state test (observe, wait, observe again, perturb, observe again, three samples over six seconds, plus an explicit "no service alongside the socket" test). It writes a machine-readable marker that records the boot identifier.
  • Trusted-address validator (bootstrap/validate-trusted-ips.py, 111 lines): every entry must be a real address or network, and the entries must cover every supplied source: the address running the bootstrap and each declared recovery source. A perfect address for the wrong network protects nobody, and the failure is invisible until the moment it locks the operator out. It is a real parser: addresses written twice in different forms, or CIDR ranges containing a banned address, are caught.
  • Secrets merger (bootstrap/merge-secrets.sh, 126 lines): the only sanctioned writer of the server's secrets file. It backs up first, updates existing keys in place, appends new ones, never truncates, refuses malformed input before touching the target, and serialises with an exclusive lock, so concurrent runs cannot lose an update. It was built because the file held a storage key its provider will not reissue, and one cat > would have destroyed it. Values go through Python, not awk, because awk interprets backslash escapes and would split a secret across two lines.
  • The cloud-init first-boot path (bootstrap/cloud-init.yaml, 40 lines, and scripts/render-cloud-init.sh, 100 lines): the renderer produces the user-data from a literal reviewed 40-character commit, refuses a commit the remote does not have (the new server fetches from the remote, so a local copy proves nothing), refuses any leftover placeholder, refuses to overwrite existing output, and writes through a temporary file so a failed run leaves nothing half-rendered. The new server checks out and asserts that exact commit before running any repository code as root.
  • The monitor provisioner (bootstrap/provision-monitors.py, 567 lines): writes the monitor receipts from the monitoring provider's own management interface instead of local prose. It matches every registered job to a real check, records the provider's own identifier, ping address, alert window and last observed ping, creates missing checks with launch-time schedules (never completion-time, because that is the false-DOWN lesson), prefixes names per server so an old and a new server cannot share one monitor and keep each other green, writes its files with restricted permissions because a ping address is a capability to forge success, and does not resume monitors an operator deliberately paused.

The outside-in verification and attestation chain. Four tools prove the narrowed server from network positions the server cannot vouch for. scripts/verify-ssh-narrowed.sh (272 lines) runs on the operator's machine and separately on an independent recovery host, never on the server; scripts/verify-remote.sh (134 lines) is the read-only on-box half, a committed file so it can be executed against stubbed instruments in tests. Between them they check seven conditions: the old access path refused, the new one accepting only the deploy identity, administrator login denied (checked without a login attempt, because an attempt can trip the login ban against the operator), nothing else listening, the firewall active and consistent, both trusted sources protected from the login ban, and the hardening marker present. scripts/attest-artifact.py (387 lines) validates one verifier artifact completely and records it; scripts/attest-quorum.py (273 lines) requires all four slots (two stages, each from two independent hosts) to be PASS, reopened and re-derived from their artifacts, never from the summary records. Artifacts are read once through a descriptor proven to be a regular file and opened without following links, and the validator is fed that buffer, so no later swap can change what was checked; a content-addressed store holds the snapshots and an existing entry must be the validated bytes. Replaying, reordering, duplicating, swapping or editing evidence fails closed, and a newer FAIL can never be undone by replaying an older PASS.

The evidence plane. evidence/ship.sh and evidence/query.sh: each night the web server's JSON access log, the application's output, container events and database errors are compressed and shipped to write-once storage with a SHA-256 manifest and a record-count floor; the query tool answers what last Thursday's 502 was from the bundle alone. The web server's access log is configured as its source, and the compose file pins the application's logging so output survives the container swap at every deploy.

The runtime stack. compose/docker-compose.yml (33 lines) runs the application (2 GB memory cap, with its reason in a comment), the database (1 GB cap, unreachable from outside) and a web server with automatic HTTPS, from secrets in one root-only file. The web server's configuration (49 lines) carries the apex and www blocks in which API paths are proxied and never redirected, with a test (tests/test_caddyfile.py, 115 lines) that grades the shipped file and fires on any configuration in which /api/* is redirected. The deploy pipeline (deploy/deploy.sh, 41 lines), the weekly rollback exercise (deploy/rollback-exercise.sh, 32) and the monthly rebuild drill (deploy/rebuild-drill.sh, 27) are written as server-side scripts that exit NOT WIRED whenever no server is attached. Their specification carries lessons in the file: the deploy reads the real exit code of every step and never a platform's status column; it checks the application's real endpoints; and it refreshes the site probe synchronously against the new container before it consults the gate, because the 5-minute probe would otherwise let a broken deploy exit 0 on evidence captured from the old container. The rollback exercise boots the kept :rollback image on a side port against a scratch database restored from the latest dump, so it doubles as restore practice, and its stamp must carry four evidence fields (probe path, HTTP status, body status, schema compatibility) or the gate rejects it. The rebuild drill creates a throwaway server, runs the full gate on it, ships the result and always destroys the server; the monthly cost is cents. The runtime is compose/docker-compose.yml's three services (application, database, web server), with the application tag swapped atomically and the previous one kept; the rebuild drill is specified to hand the provider only rendered user-data, never the raw template.

The test suites. Seventeen suites, 3,085 lines and about 500 cases, the three largest carrying 77, 73 and 42: test_verbs, test_monitors, test_hostile_counterexamples, test_bootstrap_no_widen, test_bootstrap_first_boot, test_verify_remote, test_verify_artifact_contract, test_cloud_init, test_render_cloud_init, test_merge_secrets, test_ssh_policy, test_trusted_ips, test_runner_lock, test_gate, test_caddyfile, test_bootstrap_gate and test_fixtures_tracked. They are written by the hostile-counterexample method: put the named fault back and watch the suite go red. test_bootstrap_no_widen (325 lines) drives bootstrap.sh itself, not only the helper library it sources, so a mutation that widens access is caught at the real boundary. test_fixtures_tracked proves every one of the probe's inputs is tracked in git, so an unanchored ignore line can never silently drop fixtures from a fresh clone.

The learnings ratchet. LEARNINGS.md, 116 rows (L1 to L116), each an incident, the rule it produced and how far it has climbed the ladder (prose, then verb or library logic, then a gate check). It was seeded with the old server's real incidents, so the lessons arrive before the incidents can recur, then grew with every lesson from the build itself, written as it happened.

The plan, the standard and the audit.

  • docs/DESIGN.md (64 lines) states the architecture as seven layers: Layer 0, the repository replaces the document (reference state generated and diffed, rebuildable from zero); Layer 1, a boring runtime (a web server, compose and a deploy script he owns, with no management platform); Layer 2, one door; Layer 3, the probe and operate identities split plus the ledger; Layer 4, the gate; Layer 5, the watchers (runner, outside monitors, the weekly probe); Layer 6, the ratchet; and the evidence plane beside them. It also lists the deliberate non-features, among them no log-search stack (the evidence is files and DuckDB, since a search stack would be the old platform with a search box) and no time-based automatic upgrades of infrastructure images.
  • README.md (75 lines) opens with a recovery table to read before the need arises and the one-breath wiring order, and CLAUDE.md (43 lines) holds the operating rules every agent in the repository follows.
  • docs/BUILD-PLAN.md (413 lines): every piece of AI work in dependency order, phases A to P (base provision, the disposition inventory, runtime, the real container build, the real-data restore, serving end to end, secrets, the ledger and scheduler and LIVE, the verbs wired for real, the rollback exercise, the evidence plane, the probe and operate identity split, the rebuild drill, soak, the data-parity grader, the cutover rehearsal, the cutover itself and the post-cutover watch), each with a named machine grader, eight operator inputs (O-1 to O-8), stop conditions to re-derive rather than argue, a table of 13 review findings folded in with where each was closed, and no time estimates anywhere.
  • docs/PRODUCTION-READINESS-DEFINITION-OF-DONE.md (355 lines): the acceptance contract in plain language, 14 items (DOD-1 to DOD-14) from "agents cannot bypass the safety system" through from-zero rebuild, complete inventory, the application end to end, secrets, backups that restore the business, monitoring that detects disappearance, SSH hardening and recovery, deploy and rollback with a real bad release, honest gate and tests, migration that cannot lose or duplicate customer money, a full cutover rehearsal, production cutover and observation, and a future operator able to run and recover it. Each item has child boxes and an "Automatic NOT DONE" paragraph, and a sign-off table of commit reviewed, real environment, hostile failure demonstrated, evidence, builder, independent reviewer, date and verdict.
  • The rebaseline audit (plans/, 536 lines): a claim-and-evidence table written by a fresh-context agent with no write access to either server, grading every inherited claim as PROVEN, CONTRADICTED, UNPROVEN or STALE, kept current in place across all nine review rounds.
  • plans/RUNBOOK_ssh-completion.md (381 lines): the SSH narrowing as an executable procedure with seven preconditions, exact commands and abort criteria.
  • plans/handoffs/ (580 and 523 lines): two handoffs (580 and 523 lines) that carry understanding across agent sessions, each bound to the hash of its source transcript and gated by coverage of every operator turn (U1 to U37 and U1 to U11), with a commitment ledger that records each promise as DELIVERED, NARROWED, ROUTED or DROPPED, stale references, and evidence gaps found by chunk readers.

The cutover design. Inside the build plan, and tested where it can be, is the move of the business from the old server to the new one without losing a customer payment: ownership of the address through a fixed address that is remapped (an instant flip and an instant rollback, instead of a DNS wait during which both servers accept bookings into different databases); a write fence on the old database that is enforced and proven (the old application stopped, or its database role made read-only, with pg_stat_activity showing no application writers, and a retryable 503 so the payment company redelivers its notices afterwards instead of recording a permanent failure); a final dump and restore; the image pre-built at the final hostname so only a tag swap happens in the window; certificates by DNS challenge so they issue before the flip; and parity and the full gate run between the restore and the traffic change. The parity grader compares content or deterministic digests, across every table a customer-facing path writes, with the table's real timestamp column, and must fire on a one-row difference, an updated row, an equal-count substitution and a changed money total. The point of no return is placed before the first write to the new database that did not come from the dump, and the runbook says so in those words.

What it achieved

  • 43 commits (saved steps of work) in three days: about 12,000 lines in all (11,520 in 87 files outside the fixtures, 290 more in the fixtures, and the rest governance documents), 8,000 and more of them application code and tests (8,168 counted).
  • Eighteen commands, an 11-check gate, 140 planted-failure files (43 must-fire and 12 must-pass cases), 17 test suites and about 500 cases, and 116 lessons on the ratchet, each marked with how far it has climbed from prose to code to gate.
  • Nine rounds of external adversarial review, ending on a re-audit.
  • The reboot drill ran on the real server: the boot identifier changed, SSH was restored in about 12 seconds, and the PASSED marker carried the new boot identifier.
  • The money baseline for the migration: a restore reconciled every payment to the cent across 1,224 bookings, against the live database.

The problem it solves

  • A server run by hand through AI sessions depends on each session remembering. A lesson kept as prose is forgotten; a lesson kept as code cannot be.
  • He saw that the fix was to stop rebuilding the application and build the operating system that runs it, so that the server could be handed, with the venue's recorded customer payments (an exact money baseline across 1,224 bookings, reconciled to the cent), to an AI agent under an operator who judges the work by the evidence the machine produces instead of reading every line. He reads verdicts (exit codes, gate lines, claims marked proven or unverified), so his review surface is the size of the truth and not the size of the codebase.
  • Asking approval for every action gives maximum friction and maximum improvisation. Trust should move from the agent to the commands it is allowed to run.
  • A management platform's picture of a server drifts from the server. Its dashboard showed healthy services as stopped, and a failed build presented itself as a success (the build had crashed and the platform cast the empty exit code to zero).
  • A check can pass on emptiness: a freshness check that counts only the jobs that reported, or two empty snapshots that match. So every check grades the full list of what should exist.
  • A backup is proven only by restoring it. A listing of its contents is not a restore.
  • One misplaced redirect can drop the payment company's notices and lose customer payments. So what gets graded is the configuration that ships, not the intention behind it.
  • Hardening can lock its own operator out, through a fault in remote access or a login ban catching the operator's own address. A recovery path that needs a working command line is not a recovery path.
  • A business's own scheduled scripts can live only on its server, in no repository. A rebuild that left them out would silently stop the business while every check stayed green.
  • An agent fixing a class of fault tends to reintroduce it one layer down, or to test the fix one boundary away from the real one. So every fix goes to independent outside review and is graded at the real boundary.
  • A risk written down with nothing done about it is only a paper trail for the incident. He turned the question "what did you do about it?" into a rule and a refusal in the code.
  • An AI agent can claim work done when it is not: a plan row marked closed while the file is unchanged, or "I removed the paragraph" while it stays. He made false completion claims a named failure the system is built to catch.

How he built it

He built it by directing AI agents. The organisation that did the work, and the rules he set for it:

  • One door: vpsctl verbs. All server operations go through a small vocabulary of commands. Each is at most 150 lines, plans before it executes, and records itself. If an operation has no verb, the agent writes the verb; it does not improvise a command.
  • Done = the gate's exit code. A three-state gate (PASS, FAIL, PENDING) counts its checks and refuses to pass on zero. A deploy, fix or change without a fresh green gate after it may not be reported as done. A green gate is necessary but not sufficient for production readiness: only the master acceptance in the definition of done permits "ready for production".
  • A pass must not be achievable by emptiness. Every check carries a hollow-pass guard: a minimum count, relations that resolve, real evidence. A check grades the full list of what should exist, never only what happens to be there.
  • Guards prove themselves: the probe. The probe fires planted violations at every check, through the deployed code. A check that does not fire is reported GUARD DEAD. A check with no planted case is UNPROVEN and turns the probe red. Every new check ships with a must-fire and a must-pass case in the same commit.
  • Never make a stub lie. A path with no server attached exits with its own code, NOT WIRED. A stamp of proof may only come from the real action running, and is never written by hand; a check flips from PENDING by the LIVE marker, never by hand.
  • Permission follows evidence. Under standing authorisation, deploy runs without per-action approval only while a weekly rollback exercise is proven fresh. When the proof lapses it drops back to asking. Destructive operations (restoring in place, the firewall, rotating secrets, teardown, the domain's address records) always need his explicit go.
  • Claims expire. Backup under 26 hours, rollback proof under 8 days, rebuild drill under 30 days, restore drill under 95 days. Silence has a deadline the gate enforces.
  • The append-only ledger. Every mutation's intent and outcome is written to a ledger that the database itself refuses to update, delete or empty.
  • The server is a projection of the repository. Nothing is configured by hand on the machine. The reference description of the server is generated from its real state and compared with the repository every day (the drift check), and a monthly drill rebuilds the whole server from nothing on a fresh machine.
  • The five hardenings. His review produced five decisions, each now a mechanism: bootstrap rot answered by the daily drift check, an apply-only configuration path and a monthly fresh-machine drill whose freshness is a gate check; the tool must not become the platform it replaced, answered by three meta-checks; the probe sandbox, answered by checks that are pure functions fed planted folders with timestamps filled in at run time; rollback as deploy's precondition, answered by the weekly exercise that forces expand-contract migrations; and the evidence plane. Where the probe cannot run a parallel environment, alert delivery gets a parallel endpoint, never a parallel environment.
  • The tool must not become the platform it replaced. Three meta-checks sit in the gate: no verb over 150 lines and no more than 2,000 in all (meta-size), no state kept outside the repository, the ledger and one folder (meta-state-sweep), and no resident process (meta-no-daemon). If the gate reds on size, split or delete; never raise the ceiling.
  • The depth ladder. Every boundary sits at the lowest level the technology allows: the ledger's permanence in the database engine, read-only access in the connection itself (a remote-access account limited to one command and a database role that cannot write), limits at the verb chokepoint, and blocks inside the AI tool as the top rung, never the one that carries the weight. Where the system owns neither substrate nor destination, detect early, keep its own copy, and prove the copy restores.
  • Two identities. A probe identity that can only look, and an operate identity for the verbs.
  • The runner and the dead-man ping. Every scheduled job runs inside one wrapper: lock, time limit, log, stamp, and a ping to an observer outside the server. If the ping stops, the silence is the alarm.
  • The evidence plane. Each night the logs are shipped off the server, write-once, with a fingerprint of each file, so a question can be answered months later. A quarterly drill proves it can.
  • The learnings ratchet. Incident, then rule, then code or gate check: 116 rows, seeded with the old server's incidents so the lessons arrive before the incidents can recur. A learning that could be code may not stay prose.
  • What the ratchet holds. Its rules are written from real incidents. A confirmation that something is up takes several samples separated in time, never one instant. A marker is a claim about the server; the listening connection is the server. Authorise the actor, never the crowd it came in with. Any switch that silences a check needs an expiry and a refusal in the same commit. Never demand evidence the system gives no way to produce, because that teaches people to fake it. A risk that is written down with nothing done about it is only a paper trail for the incident. An audit's own checks are instruments too, and a silent no-op edit means every edit made the same way is unproven until audited. A test that stubs the thing it grades proves nothing, and a test that only checks the accepting side never proves a discrimination.
  • Every guard declares its failure direction. Each script states in its header what a failure does, because the AI tool treats only one exit code as a block. He established that by measurement; it was documented nowhere.
  • Hardening is monotonic. A rerun may harden, never relax. The setup refuses to narrow access to the server unless a recovery path is set, so a human way back in always exists. One explicit, deliberate setting is the only way to widen again.
  • The drill is a gate. The remote-access cutover is refused unless the drill has passed for the current boot. He imposed three conditions: the drill encoded as a hard gate, every assertion made steady-state, and a snapshot taken before every irreversible stage.
  • Producer is not reviewer. The sessions that build may not grade. A reviewer is handed a fixed commit, and every fix goes back to the reviewers; none is closed by its author. Review rounds used more than one outside reviewer, among them a second AI model, and the last ended on a re-audit.
  • Executable closure. Findings are closed by artifacts, not sentences, graded at the real boundary: bootstrap.sh itself and not the library it sources, verbs/sync by invocation, and the status of the unwired-guard flags through the verb.
  • Push before complete. A claim that work is done requires the work to be on GitHub, not only on the local machine.
  • Operator inputs. The build plan lists the eight things that are his to supply or decide, such as the machine, the storage approval and the final go. Everything else is the AI's.
  • The disposition inventory. Every job, service, alert, backup, secret and outside connection on the old server is listed and marked migrate, replace or retire, with a reason and a grader, before anything is built. It is the input to what gets built, and it is made from a fresh inspection, never from memory or an earlier document.
  • Single writer of record. One agent owned the old server and this build only read it, so two agents never wrote to the same production machine.
  • Deliberate non-features. No web dashboard, no queue, no resident process, no log-search stack and no automatic upgrades. Each is something the old platform had and could not be seen into.
  • The production-readiness definition of done. His acceptance contract in plain language: 14 items, from "agents cannot bypass the safety system" to "a future operator can run and recover it". The builder may only propose. Only a different, fresh reviewer may tick a box. Proof must be taken at the real boundary the claim names ("alerts work" ends with an alert received outside the server), must include a planted failure caught there, and expires. Each item lists what makes it automatically not done, such as a backup nobody has restored.
  • The money-safe move. For moving the business to a new server: a real barrier against writes before the final backup, databases compared by content and not by counts, the point of no return placed before the first write to the new database, and a rehearsal made to fail once on each side of that point.
  • Evidence-bound handoffs. Understanding crosses agent sessions in committed handoff documents tied to their source transcript by hash and checked against every operator turn, so an inherited claim is treated as unverified until re-derived.
  • How the result reaches the operator. He reads exit codes, gate lines and proven-or-unverified labels, and the definition of done is a checklist the machinery reads; the README opens with a recovery table to read before the need arises.

Named concepts

The named concepts, defined

One door · vpsctl verbs · the server as a projection of the repository · Done = the gate's exit code · the three-state gate · the hollow-pass guard · the probe · GUARD DEAD · UNPROVEN · NOT WIRED · Never make a stub lie · Permission follows evidence · standing auth · Claims expire · the five hardenings · the depth ladder · meta-size, meta-state-sweep, meta-no-daemon · the runner · the dead-man ping · the evidence plane · the rebuild drill · the rollback exercise · the learnings ratchet · FAILURE DIRECTION · Hardening is monotonic · Automatic NOT DONE · Producer ≠ reviewer · Push before complete · operator inputs · deliberate non-features · the disposition inventory · the money-safe move · the point of no return · the write fence · the LIVE marker · the SERVER marker · the CUTOVER marker · staged jobs · must_fire and must_pass · the attestation quorum

What it shows

He can give an AI agent real power over a production server and make that safe by design: the agent's claims are graded by a machine, its permission depends on fresh proof, and every lesson becomes code.