All posts

6 min readPost 16

Building with AI: who decides, who executes, gates and evidence

Obituary exists to clean up AI agent debris and stop accidental wipes—and most of its own codebase was built with a multi-agent workflow. Here is how our four-role split, irreversible-action gates, and raw-evidence discipline emerged after we became the first victims of 2.4 GB of forgotten temp folders and a silently grayed-out tray button.

On this page
  1. Four roles: separate judgment from execution
  2. Gates and raw evidence instead of "looks fixed"
  3. Dogfooding first: three bugs we hit on our own machines

Obituary was built to manage the scratch files and accidental deletions caused by AI coding agents—and most of Obituary itself was built through a multi-agent development workflow. That overlap turned our own dev machines into the first proving ground for every problem the tool tries to solve.

On 10 November an audit of our system temp folder uncovered over 70 forgotten test-evidence directories consuming 2.4 GB. Four days later, a daemon CPU benchmark stopped our installed tray service, swapped in a temporary test binary, and forgot to restore the real one—leaving the tray menu's "Open Obituary" item silently grayed out with zero explanation.

Turning multi-agent development from constant cleanup into predictable engineering came down to four clear roles, explicit gates on irreversible actions, and refusing to accept anything short of raw command evidence.

Four roles: separate judgment from execution ​

Work moves across four distinct responsibilities orchestrated through Orca (which launches isolated worktrees, dispatches specs, and collects reports):

RoleResponsibilityBoundary
Product directionSets scope, product trade-offs, and release callsOwns final decisions
CoordinatorBreaks goals into specs, verifies every audit finding against code, merges branches, gates releasesOwns engineering judgment
Execution workersImplement specs and tests inside isolated worktreesNever improvise past ambiguous scope
Read-only reviewersTwo to three parallel passes auditing deletion safety, integration, and regressionsRead-only; files verifiable findings only

The most useful operational rule we learned is simple: keep judgment calls on the coordination side, and hand execution workers concrete specs naming what to build, what to leave alone, which files are off-limits, and what raw evidence is required at handoff.

We also cap parallel worker concurrency—running too many workers at once saturates both API quotas and local SSD I/O.

Gates and raw evidence instead of "looks fixed" ​

1. Explicit gates before irreversible actions ​

Any step that cannot be trivially undone—pushing to a shared repo, tagging a release, or publishing externally—sits behind a mandatory gate. Workers take code, tests, and builds right up to the final line, then pause and wait for approval before crossing it.

2. Raw output, never paraphrases ​

Saying "tests passed" never closes a task. Reports must attach primary evidence:

  • Real unit-test and compile-time mutation output.
  • Proof that reverting a fix into a compiling broken variant makes the new test fail.
  • Real terminal output or screenshots (a rule we carry straight into public docs and videos: every shown command runs in an isolated directory, and preview, pending-approval, or non-restorable flows are never described as fully supported).

3. Stopping rules and coordinator-owned site merges ​

To prevent infinite review loops, severity follows blast radius: only bugs that can delete, move, or overwrite the wrong object count as HIGH (must hit zero); exotic path tricks that cannot cause permanent data loss stay MEDIUM/LOW; tiny patches and test-only edits take one round.

Starting 21 November, the coordinator also took sole ownership of merging and deploying the website after a worker rebase accidentally wiped four CSS rule groups—an error missed because verification only checked one partial screenshot. Every site merge now walks five steps: audit every deleted line → merge onto fresh main → build the final tree → screenshot affected pages → push and verify both overseas and China origins.

Dogfooding first: three bugs we hit on our own machines ​

1. Over 70 leftover temp directories eating 2.4 GB ​

Workers creating logs, repros, and screenshots kept dropping folders in the system temp directory and walking away. By 10 November, 70+ folders sat at 2.4 GB.

That was literally Obituary's reason to exist. We updated our repo rules immediately: debug scripts, logs, and evidence folders are created with obit mktemp 2d or registered via obit mark <path> 2d so they bury themselves automatically while staying restorable for a week. Only sandboxed accounts blocked from writing the ledger fall back to raw temp folders (and must say so in their report), while folders containing .git are never registered and get cleaned up explicitly.

Terminal output creating a 6-second temp directory with obit mktemp 6s, writing a log, watching it expire into the graveyard, and restoring both directory and log with obit resurrect 1
Real worker scratch workflow: a directory created with obit mktemp 6s buries itself automatically on expiry, and obit resurrect 1 restores it with its log intact.

2. Protected ACLs from Python 3.13 mkdtemp on Windows sandboxes ​

Under Windows sandbox accounts, Python 3.13's mkdtemp creates directories with protected ACLs. Pointing tests there broke .git ACL restoration and left behind directories only an administrator could delete. Tests now stick to standard temp paths, and any leftover protected directory is reclaimed cleanly with elevated takeown and icacls on the exact target before normal removal.

3. A CPU test replaced the live tray daemon and grayed out "Open Obituary" ​

On 14 November, a worker measuring daemon CPU stopped the live installed obitd, launched a freshly compiled test binary from a temp folder against the real ledger, and exited without putting the real daemon back. Because the tray looks for obit-gui.exe beside obitd, the missing sibling binary silently disabled "Open Obituary" in the tray menu with no hint why.

A test script mutated real host state, and the only visible symptom was a dead gray menu item.

We fixed both layers:

  • Testing layer: benchmark scripts must restore production services on exit, and ordinary tests never touch real user ledgers.
  • Product layer: when obit-gui.exe is missing, "Open Obituary" stays clickable and fires a clear desktop notification naming the missing executable and how to repair it (shipped in 1.3.0).

One last orchestration lesson: restarting the orchestrator drops live worker connections, so we snapshot every active worker's session ID beforehand and resume cleanly after restart.

All posts