Jason OuFIAA · Actuarial AI

Method · the journey is the syllabus

I stopped writing code line by line, and had to become the architect.

This is the part of the open-source journey that is not about insurance. Every repository here was built in broken time — hours carved out around a full-time job and childcare — by delegating work to agent loops, never opening the model, and leaving runs unfinished on purpose. The constraint turned out to be a good teacher: it forced exactly the controls a regulated AI deployment needs, and it changed what kind of engineer I am.

agent-loop execution black-box behavioural verification asynchronous HITL lifecycle role: system architect
21.9h
one unattended exam
24 books × 3 runs, resume-safe, one shared local slot
3models
separation of duties
two subjects sat the exam; a third built it
307
harness diary entries
268 of them ending in a harness edit, one hypothesis each
228tests
runnable with no model at all
44 + 139 + 45 offline checks across three repos

Why the constraint became the method

A working evening is not continuous. It is 40 minutes here, 25 minutes there, a Saturday morning if the house is quiet. Anything that needs me to sit and watch it — a long model run, an agent iterating, a build I have to shepherd — cannot exist in that schedule. So every piece of machinery in these repositories had to satisfy one brutal design review: can this be started, left alone, and picked up later by someone who has forgotten what I was thinking? Usually that someone is me, three days later.

Three things fell out of that requirement, and they are the three sections below. The first is what I delegate (loops, not lines). The second is how I know whether the delegation worked (behaviour measured from outside the box). The third is the shape of the work itself (asynchronous, with me as the checkpoint). Only after those were in place did the projects stop being experiments and start being evidence.

The honest framing

This is a personal engineering method, not an audited standard. It was learned by breaking runs at 11pm, and some of what follows is practice rather than measurement. Where a claim has a number behind it, the file is named.

1 · Agent-loop execution: delegate the loop, not the line

The earliest version of me typed instructions and pasted results. The version that shipped a benchmark hands over a loop with an execution surface and comes back to a verdict. Concretely, what I delegate now always has four parts: a written contract, a place to execute, an artefact trail, and a stopping rule.

What a delegated loop has to carryEvery repository below demonstrates at least one of these; the M365 blueprint states all four.
partwhy it is non-negotiablewhere it exists
A written contractThe model cannot ask a clarifying question at 2am; the spec has to outlive my memory of itSPEC.md pre-registered claims · docs/HANDOFF_CONTEXT.md · TEST_INSTRUCTIONS.md
An execution surfaceA loop without an execution log is a chat, not an agent. The log is what makes self-correction possibleM365-Copilot-Agent-Loop watcher → execution_log.txt fed back for self-correction
An artefact trailI need to review outputs, not remember conversation. Per-pass files are what a supervisor can actually readPixel_Storybook: passNN_script.py, passNN_plate.png, critique.json, manifest.json, model_log.jsonl
A stopping ruleAn unbounded loop is a leak, not a tool. Budgets and bounded retries are architecture, not politenesspass caps in the paint loop · bounded retry advice in the bench runbook: a failing validator "produces a retry loop, not a skipped run — bound it"

Two results from this way of working are worth quoting, because they are the opposite of the usual promise.

A

The underwriter's application code was written by the model it studies. Its README says so plainly: the entire application was developed using the local Qwen3.6-35B-A3B — code generation, debugging, refactoring and documentation. That is not a boast, it is the reason the variance study mattered: I could not reason about the system's stability from having written it, because I had not written it. When the code is delegated, only measurement remains.

B

Delegated work has to be shipped with its own air-gap. The M365 loop keeps a manual copy-paste step by design — an air-gap so nothing is auto-injected into a corporate environment — and its README refuses to let the watcher run on a primary host, because a watcher that executes synchronised scripts is a remote-code-execution risk if the model hallucinates something destructive. That blueprint is untested and labelled as such; the constraint it encodes is not.

What delegation did not buy me

The loop can iterate; it cannot decide which failure matters. In the benchmark's harness development, "a human chose which failures to pursue" is written into the record as a limitation of the method, next to the fact that an operator-side agent did the editing. Delegation moves effort; accountability does not move.

2 · Black-box behavioural verification — from testing to a development method

I have never had access to a model's weights, and I do not have it now. That sounds like a limitation and is actually the discipline: the only thing I can observe is the distribution of what comes out. Once you accept that, verification stops being a phase at the end and becomes the whole development method — black-box steering: change something outside the box, measure how the output distribution moved, keep it or revert it.

This is literally the loop the benchmark's harness grew under, written down as six steps in the experiment index. It is worth reproducing because it is the method in miniature:

1

Run the frozen harness over all 23 optimisation books.

2

Score it, then read the evidence per unit — recorded prompt, answer, tool log, the scorer's per-control diff — and say out loud why each miss missed.

3

One hypothesis, one edit: a change to stats_pack.py, the harness rules, or a newly pinned prompt file. Not three changes that might have worked.

4

Test it on the affected books, then re-check the neighbours it could have disturbed. Black-box means side-effects are invisible until measured.

5

Keep or revert. Snapshot the code and the prompt into results/<corpus>/harness_snapshot/ so the claim can be re-derived.

6

Never read a held-out result before deciding an edit, and never feed one back. The held-out split is a wall, not a feedback channel.

Seven optimisation passes ran under that loop, producing v1.0 → v1.6e, 307 per-scenario diary entries of which 268 ended in a harness review or edit, and a diagnostics file that grew from 27 229 to 38 490 bytes. The harness was built by an operator-side agent running a third model — deliberately not one of the two being examined, so no model tuned the exam it later sat. That is a separation-of-duties control on the development process itself, and it is the single design decision I would defend hardest.

What steering a black box actually consists of

Levers outside the box, and the measured response
lever (outside the model)observed behavioural response
Prompt discipline and harness diagnosticsRecall and false-alarm rate moved in opposite directions for the two models under the same edit — which is why the loop allows one change at a time
Combination rule in a multi-agent systemEnd-to-end spread fell from ~20 % to 0 % across 100 runs with the model unchanged — architecture is a steering wheel
Sampling settings (temperature, seed)T 0.1 → 0.0 did not merely tighten the spread, it changed which decision the system returned
Tool surface offered to the modelOffering a tool is not using one: 24 % of runs on one model, 0 of 144 on the other, and two attempts to activate it failed
Concurrency and deployment environmentParallel calls produced a degenerate thinking loop and empty output; sequential calls were clean

The method generalises beyond models

Most of the test surface in these repositories runs with no model at all — 44 offline tests in the paint loop, 139 in the particle-life project, 45 state-machine checks in the status daemon, plus the leak scan and preflight in the benchmark. Offline checks are what make it possible to verify while the one model slot is busy, and they are where a black box can be pinned down cheaply: determinism on a seed, schema and parse validity, isolation boundaries, resume semantics.

3 · Fragmented hours: asynchronous human-in-the-loop engineering

Here is the part I did not plan. Because the hours are broken, I do not work in a session — I work in handoffs. The unit of work is not an hour at the keyboard, it is a document plus a run plus an artefact trail, and the human role inside it is not author but supervisor and validation checkpoint. That is asynchronous HITL, arrived at by necessity rather than ideology.

1

Write the handoff before the work. docs/HANDOFF_CONTEXT.md in the underwriter repo opens with "read this first when continuing in a new chat", and records the task, the state of every section, and which decisions are already made — explicitly so that continuing does not require re-deriving them. The benchmark has the same shape in docs/HANDOFF_RUN_SCENARIOS.md: a command to run, a command to resume.

2

Launch it and leave the physical context. Full optimisation passes are documented as "23 books, unattended, resume-safe" behind setsid nohup; a held-out exam is wrapped in a retry script; the particle-life sweeps run headless on a Pi 2 in another room while the viewer — which reads files and nothing else, bound to loopback — stays on the laptop.

3

Make returning cheap. Resumption is the default rather than a recovery procedure: --skip-existing keeps anything already answered, flock guards against a double launch after I have forgotten I started it, and one status file is rewritten after every scenario (RUNS FINISHED: n/141) so a returning human is oriented in one line.

4

Get called back rather than waiting. A 21.9-hour exam on one shared server makes queue position the real schedule, so LLM_Status_Watch watches the model server's metrics on a Raspberry Pi and pushes my phone when it goes idle. That is the whole point: I leave, the machine tells me when to return.

5

Return as the checkpoint, not the typist. Read the manifest and the per-unit diffs; decide keep or revert; choose which failure to pursue next; write the next handoff. In the paint loop this is formalised: the best pass ships, not the last one — the supervisor selects among delegated attempts using measured scores, which is a completely different skill from producing them.

STEP 1 Write the handoff before the work starts STEP 2 Launch, then leave unattended, resume-safe STEP 3 Get called back the shared server frees up STEP 4 Return as supervisor read, decide, keep or revert NOTHING FROM ME HERE days of other life
The unit of work is not an hour at the keyboard. It is a handoff, a run that survives being left, and a return where the only job is judgement.

What the constraint actually cost, and what it bought

Cost

  • Everything must be resumable, idempotent and observable, which is more design work than writing the script.
  • The handoff document is a real deliverable and is easy to skip — every time I skipped it, I paid interest later.
  • Long cycles mean slow feedback: seven harness passes is weeks of calendar time for a small number of decisions.

Bought

  • Runs large enough to be evidence — 141 generations, 600 repeat decisions, 250 000-policy books.
  • Artefacts designed for a suspicious reader, because the returning supervisor is one.
  • Recovery paths that get exercised for real, since I rejoin interrupted runs constantly.

4 · The role shift: from developer to system architect

The honest summary of the last two years of this work is that my contribution moved outward — from inside the code to the boundaries around it. I did not set out to make that change; the schedule and the delegation made it for me, and the governance habit finished the job.

What I gave up

  • Authoring every line — the underwriter's code and most of the benchmark harness were written by models
  • Reading each generated line before it runs, replaced by validators, schema checks, budgets, and a jail I have admitted is still only advisory
  • Being inside the loop while it iterates: watching a run is not supervision, it is waiting
  • Trusting a plan I can describe over a behaviour I can measure

What I do instead

  • Define contracts and invariants: answer schema, per-unit scoring, what must never leak into a prompt
  • Design the observation surface — manifests, per-pass artefacts, status files, decision logs in JSONL
  • Set risk appetite and stopping rules: how many passes, what triggers escalation, which repair is declined
  • Choose which failures are worth a pass, and write the handoff that hands the next one over
  • Sign for the result, and publish the limits beside it

The learning arc, as the repositories record it

Movement 1 · tooling

Propose, then let a human execute

Schema analyser and the Excel automator: natural language to a reviewable list of actions, every step editable before it runs, and a rule-based mode for when there is no model at all.

learned: propose-then-execute is a control, not a crutch
Movement 2 · delegation

Build the loop and let it run

The Copilot agent-loop blueprint, the multi-agent underwriter, the paint-and-critique loop. Loops got execution logs, artefact trails, pass caps, sandboxes; untested ones got labelled untested.

learned: a loop without an execution log is a chat; delegation without an artefact trail is unverifiable
Movement 3 · measurement

Own the instrument and the sign-off

The A/E benchmark, the output-variance study, the status watcher. Once delegated work does the building, the only thing left to own is the answer key, the scorer, the queue and the judgement.

learned: the examiner is the job

Five failures that taught more than any success

01

A loop that retried forever. A malformed tool request — an invalid JSON escape — could not be parsed, so the tool never ran, the answer validator failed, and the run retried indefinitely instead of stopping. The escape-repair was deliberately declined: a documented defect stays auditable, a silently patched one becomes a gap. The runbook now says to bound the retry.

02

A sandbox that only advised. "Sandbox" written by me turns out to mean limits I hoped would hold. Real jails need rlimits or a container with no network, a read-only data mount and write-only output. Still on the list, and stated as a gap rather than a feature.

03

A tool nobody used. Two attempts to make the second model call its tool failed: 0 calls in 144 runs. Offering capability is not obtaining behaviour — the very heart of black-box verification.

04

A failure that only appeared under load. Parallel calls put the reasoning model into a thinking loop that emitted nothing. The harness was clean, the model was clean, and the interaction was neither: concurrency is now a variable in test plans.

05

Claims that died at their own noise floor. Two of three pre-registered claims in the particle-life project failed once the sweeps ran. Writing the question before the sweep is the only reason that was visible at all — in the models, and in myself.

The method as a checklist

If another engineer asked me how to work this way — fragmented hours, delegated loops, models you cannot inspect — this is what I would hand them.

  1. Write the handoff before you start. Assume the person returning has forgotten everything, because it is you.
  2. Give every loop an execution log and an artefact trail. No log, no agent.
  3. One hypothesis, one edit, then re-check the neighbours. Black boxes hide side-effects.
  4. Verify offline whenever possible. The model slot is the scarce resource; tests that need no model run any time.
  5. Make resume the default. Skip-existing, lock files, one status line a stranger can read in five seconds.
  6. Budget every loop. Bounded retries, pass caps, escalation when the budget is spent.
  7. Separate duties across models. The model that builds the test should not be the model that sits it.
  8. Pre-register the question and publish the noise floor. Yours is a black box too.
  9. Label the untested. A blueprint that says "untested" is honest engineering; one that doesn't is a liability.
  10. Keep one failure on the record, unpatched, on purpose. It is worth more as evidence than as a fixed bug.

Why a personal habit is also a governance argument

The pattern that broke time forced on me — delegate, walk away, come back with artefacts and make the call — is structurally identical to what I ask for in a deployed AI system. The human in a compliant loop is not a typist and not a spectator: they are a supervisor with a decision record, able to arrive late, read what happened, and either accept it or stop it. Everything that made my evenings survivable — handoff documents, per-pass artefacts, bounded retries, offline checks, resume-by-default — is the same furniture a model-risk manager would ask to see.

Which is the most useful thing this journey taught me. The governance controls were not a compliance burden bolted onto hobby projects; they were the reason hobby projects could run without me at all. The architect's job is to build the loop so that a tired, interrupted, forgettable-today human can still be a competent checkpoint — and then to be honest, in writing, about what the loop has not proven.

Limits of this page

Single operator, one machine, no independent audit. The evidence cited is real and file-referenced, but the method has not been tested on a team, on a deadline imposed by someone else, or under a production on-call rota. Treat it as a working practice report, not a framework.

Sources

Development statements and loop artefacts from Multi-Agents_Underwriter (README "AI-Generated Project Showcase"; docs/HANDOFF_CONTEXT.md) at cbedb1b; harness growth, operator-side agent build and unattended run commands from Life_Insurance_Experience_Bench (docs/EXPERIMENT_INDEX.md §"Who builds the harness", §8; docs/HANDOFF_RUN_SCENARIOS.md; docs/HARNESS_GROWTH.md) at 8067f00; loop artefacts and timings from Pixel_Storybook; pre-registration and Pi architecture from Piticle_Life; air-gap HITL and RCE warnings from M365-Copilot-Agent-Loop; offline state-machine checks from LLM_Status_Watch. Variance figures come from study 02; behaviour-response figures from study 01.

Run a review plane across the chain

The same six steps the work goes through, in order, each one leaving something on the record. Move the pointer across the line — or use the arrow keys — to stand at a station. The plane changes what you are shown; it changes nothing that was measured. If you have asked for less movement the plane sits still and the ledger below holds all of it.

Station 1 / 6
Station
—
What happens here
—
What is on record
—
StationWhat happensOn recordStanding
Synthetic bookSeeded generation of 250 000 lives across four benefit lines, with anomalies planted on purpose.src/generate.py · f629feein service
Sealed exam47 scenarios built so the answer key stays out of the models’ reach.47 sealed scenarios · 8067f00measured
Experience benchA/E measurement and harness comparison against that sealed key.41.9 % false alarms · 58.1 % precision · 8067f00measured
Variance probeOne applicant, decided twice by the same underwriting agent.0–47 % · 600 repeat runs, 0 diverged · cbedb1bmeasured
Decision engineThree agent roles debate under fixed rules; a named actuary signs the outcome.pipeline/decision · 66a73d0demonstrated
Async HITL methodThe working method this site is built with — human input in broken time, still being built.no figure claimedblueprint

The standings and figures are the ones stated on the study pages; the plane adds none of its own.