Yesterday I wrote about shutting down an autonomous product factory after 1,109 agent runs and zero euros. That was the commercial lesson: code correctness does not create customer demand.

Lauren Tan’s AI Engineer talk, All Code Is Slop (Except Mine), nails the engineering half of the exact same reality.[1][2] Once software actually has paying clients and real users, coding agents hand every developer the raw output of a coding machine. Lauren personally shipped 3,000 pull requests to production in a single month, many while asleep, as part of a Grok Bot team at SpaceXSI that landed 11,000 PRs in the same period.

Usually a number like 11,000 PRs makes me expect a smoking crater. Instead, Grok Bot cut a stable desktop release roughly once a day across 227 contributors, its revert rate fell to around 0.5%, and the app got faster on startup, typing, and switching chats compared with launch.[1]

Watching the talk felt like hearing someone articulate the exact set of engineering habits I have been forced into running agents on real systems at Comelse—and then push those habits two layers further. I agree with almost every word she says, because every time I tried the softer alternative, the codebase paid for it.

Trust comes from the environment, not the prompt

People love calling high-volume agent setups “software factories.” Lauren strips away the buzzword: the real problem is trust. Not blind trust, and not begging a model to be careful, but investing in the agent’s environment until doing the right thing is the path of least resistance.

Her mental model is an inverse trust pyramid. The widest surface—where your engineering time buys the most leverage—is deterministic code. Architecture and API design sit at the top because removing a bad option once deletes an entire category of mistakes forever. Static analysis, lint rules, type checkers, and tests sit directly underneath to catch everything the language still permits. Verification, both runtime and formal, checks whether real behavior and system invariants hold. Prose—rules, skills, and AGENTS.md—is the narrowest slice at the tip, reserved strictly for decisions that genuinely require judgment.[2]

That mirrors what we learned building our Hermes operating layer. Enforcing boundaries by removing capabilities works; adding stern paragraphs to a Markdown file does not. Telling a model “do not touch production” while leaving production credentials in its shell is not a permission system. It is a motivational poster.

Fig. 01 · Environment leverage

The Inverse Trust Pyramid

The Inverse Trust Pyramid for AI coding agents An inverted four-tier pyramid placing deterministic codebase and API design at the widest top layer, followed by static analysis and automated tests, then runtime and formal verification, with prose rules and AGENTS.md occupying the narrowest bottom tip. HIGHEST LEVERAGE · ENFORCED ONCE IN CODE LOWEST REVIEW COST DETERMINISTIC enforced by code VERIFICATION evidence first PROSE judgment only 01 · CODEBASE & API DESIGN Make bad code impossible to express Clean patterns · directory boundaries · ban nuance-heavy APIs 02 · STATIC ANALYSIS & TESTS Catch every rule violation automatically Lint diagnostics · types · dep graph · build & schema checks 03 · RUNTIME & FORMAL VERIFICATION Prove live behavior & invariants Live app · Playwright/CDP · TLA+ · Lean · Bombadil 04 · PROSE AGENTS.md, rules & skills Smallest layer · drifts easily NARROWEST SURFACE · HIGHEST MARGINAL COST FRAMEWORK: LAUREN TAN
Every recurring correction pushed upward from prose into static checks or API design pays off on every future pull request without spending human review bandwidth again.

Your codebase is a garden, and agents copy the weeds

Agents produce outputs from their inputs, and your repository is the largest input they read. In 2024 you walked in and reviewed three pull requests written by colleagues; with agents, the flow looks closer to three hundred. At that pace, code behaves like something alive, and engineering starts looking like gardening.[1]

Leave one ugly workaround or deprecated pattern lying around, and the next agent reasonably assumes it is the house convention. Within a week, one shortcut becomes twenty copies spread across the repo.

Lauren gives two crisp examples from Dune, the internal framework her team built for Grok Bot’s Electron client:

  • Ban nuance-heavy APIs. React’s useEffect has legitimate uses, yet it takes subtle judgment to get right. Agents misuse it constantly. Dune allows useEffect inside controlled framework primitives and bans it outright in product code. Reviewers never have to debate another bad effect again.[2]
  • Put architecture in the directory names—then enforce it. In Cursor, another Electron app, agents kept importing main-thread modules into the renderer thread, creating long tasks and interface stutter. Dune splits them into two explicit top-level folders, electron-main and electron-renderer, and backs the naming convention with a dependency-graph analyzer and lint rules that reject cross-imports.[2]

Her sharpest observation is about code comments. Agents love using comments and Markdown as an escape hatch to rationalize shortcuts. At Cursor, agents reached for setTimeout, requestAnimationFrame, and requestIdleCallback to paper over an architectural clash between VS Code’s imperative model and React’s declarative rendering—and wrote earnest comments beside every timer explaining why the hack was justified. The next agent read the comment, copied the pattern, and soon timer churn was triggering major garbage-collection pauses and visible lag.[1]

Grok Bot’s answer was blunt: ban roughly 99% of comments. Comments go stale, humans skip them, and a comment cannot fail a build. Instead, put the explanation inside the lint rule’s diagnostic message. When an agent hits the guardrail, the error tells it immediately why the shortcut is rejected and points it back to the root cause.

Fig. 02 · Feedback dynamics

Why prose compounds slop while guardrails compound trust

Track A: The Slop Loop A four-step self-reinforcing loop where an agent adds a workaround, justifies it with a comment, the next agent copies it as house style, app performance degrades, and the cycle repeats on every PR. A · THE SLOP LOOP COMPOUNDS DEBT REPEATS EVERY PR 01 · AGENT HITS FRICTION Ships a quick workaround e.g. setTimeout to patch timing 02 · RATIONALIZES IN PROSE Adds a justifying comment Explains why the hack is “needed” 03 · NEXT AGENT COPIES IT Treats hack as house style Weeds spread across the repo 04 · COST ESCALATES Lag, GC pauses, noisy diffs More tokens spent patching symptoms
Track B: The Guardrail Loop A four-step engineering progression where a recurring mistake becomes a lint rule with actionable diagnostics, legacy examples are pruned, API boundaries are tightened, and the bug class disappears from manual review. B · THE GUARDRAIL LOOP COMPOUNDS TRUST 01 · CATCH RECURRING MISTAKE Block it with a lint rule Error message points to the root fix 02 · PULL THE OLD WEEDS Clean legacy examples out Next agent only sees clean patterns 03 · TIGHTEN THE BOUNDARY Encode constraint in API / folder Remove nuance-heavy primitives 04 · RESULT Bug class deleted for good Human review shrinks · PRs merge safely
Do not just block the new mistake—clean up the old examples too. Otherwise every subsequent agent still treats the surviving workaround as permission.

Every recurring correction becomes code

This is the single highest-leverage habit I already apply across my own repositories: whenever I have to correct an agent twice, I stop editing the prompt and change the repository instead.

You can see the pattern right inside the source code of this website. During the site’s rebuild, a live deploy once shipped new HTML while browsers still served an older cached stylesheet. Instead of writing a reminder to hard-refresh after deploys, we put content-hashed CSS fingerprinting straight into scripts/build.py. The build fails if a page does not reference the single stylesheet cleanly, and every release carries its own SHA-256 fingerprint.

The same principle runs through scripts/check_site.py. No agent has to remember canonical URLs, unique titles, Open Graph tags, JSON-LD validity, image dimensions, analytics bootstrap parity, canonical studio domains, or real HTTP 404 responses. The audit script parses every HTML page and hits every local route before a build counts as green.

In my night-shift support worktrees, when a binary Git patch quietly dropped an untracked test file and left tests green in the wrong directory, the fix was not a sterner instruction. It became a deterministic inventory and destination-verification procedure before any worker can claim completion.

Repeat that loop long enough and your manual code review checklist starts evaporating. You stop policing the same ten recurring flaws because the build refuses them before a human ever opens the diff.

Spend most of your tokens on verification

Once architecture and static checks shoulder the structural review, human review changes shape. Instead of reading every line of generated code, you inspect verification artifacts: screenshots, recordings, state diagrams, and check outputs.

Lauren points to distributed-systems engineer Cindy Sridharan, who ran into subtle bugs slipping into merged AI patches—and six months later credited a strict verification workflow with fixing it. Roughly 70% of her daily tokens now go into verifying patches, and only 20–30% into writing them.[3] Lauren’s own usage on Grok Bot follows the same split.

That number makes complete sense once you give agents the tools to verify their own changes properly:

  • Runtime verification. Give the agent a running app and real browser tooling such as the Chrome DevTools Protocol or Playwright. On this site, every article release runs through scripts/playwright_qa.cjs at 1440×1000 and 390×844—asserting zero horizontal overflow, loaded webfonts, visible 3px keyboard focus, 44px touch targets, and clean console logs while saving full-page screenshots as proof. And the builder never grades its own homework: verification checks the rendered artifact, not the author’s summary.
  • Feature maps and reusable CLIs. Running the app still fails if the agent has to guess what “the thing in the left sidebar” means. Grok Bot packages a feature map—a user-facing sitemap of every product feature—alongside custom CLI drivers inside its runtime skills.[2] Shared vocabulary removes ambiguity, and reusing one tested CLI cuts token waste across runs.
  • Property-based UI testing and formal proofs. This is where Grok Bot pushes well past what most teams run today. They use TLA+ to model-check multi-device flows like cross-platform notifications,[4] Lean to prove algorithm properties in a custom virtualization library so flicker and jitter are caught mathematically,[5] and Bombadil—Antithesis’s open-source property-based UI framework—to explore randomized browser interactions against UI invariants.[6]
  • Intent diagrams. Passing tests still leave one gap: did the agent actually understand what the user wanted? Lauren built a statechart skill in Cursor’s pstack plugin to visualize user-facing state machines alongside live screenshots and videos.[7] A wrong assumption about what happens next jumps off a transition diagram in five seconds.

None of these techniques are brand new. Formal methods, property-based testing, and exhaustive custom linters simply used to be too expensive for small teams to write and maintain by hand. Agents collapsed that cost. Spending 70% of your tokens on verification is not waste—it is why we are entering a golden age of software verification.

Fig. 03 · Verification economics

The 70/30 token split & four-layer verification stack

Ratio reported by Cindy Sridharan and echoed by Lauren Tan on Grok Bot.

01 · Runtime

Live app + feature map

CDP or Playwright driving a real build through a reusable CLI, anchored by a user-facing feature map.

CATCHES: Broken flows, layout overflow, wiring bugs
02 · Property-based

Autonomous UI fuzzing

Bombadil explores randomized browser interaction sequences against declarative UI properties.

CATCHES: Edge-case state sequences happy-path tests miss
03 · Formal

Model checks & proofs

TLA+ for multi-device flows like notifications; Lean for core algorithms such as custom virtualization.

CATCHES: Concurrency races, flicker, invariant violations
04 · Intent

Statecharts + recordings

pstack state diagrams reviewed next to videos and screenshots to check whether behavior matches intent.

CATCHES: Valid code that solves the wrong product behavior
Agents made writing and maintaining serious verification cheap enough to run on ordinary product code, shifting human review from line-by-line diffs to concrete artifacts.

The session harness: memory and hostile review

Keeping prose at the narrow tip of the pyramid does not mean throwing away workflow skills. It means turning that narrow layer into small, repeatable commands—and backing every dangerous step with deterministic Git and shell checks instead of hoping the agent remembers.

Across my daily repositories, six local slash commands handle the two places coding sessions quietly decay: session amnesia and builder self-review bias.

Three commands keep context clean and memory durable without stuffing forty documents into every prompt:

  • /wt spins up a parallel Git worktree, clones node_modules via APFS copy-on-write (cp -Rc) so a second agent boots instantly without reinstalling packages, symlinks gitignored local instructions and environment files, and symlinks the project’s auto-memory store so isolated branches never start with amnesia.
  • /start-session loads project instructions, detects worktree state, and reads only the documentation index (such as .ai/index.md)—explicitly the map, not the territory—pulling individual docs on demand and flagging stale paths. It also runs diff -q CLAUDE.md CLAUDE.bkp.md to catch accidental instruction clobbering since the last session.
  • /end-session audits git status and recent diffs, writes new patterns and gotchas back into CLAUDE.md, AGENTS.md, and TODO.md, refreshes the local CLAUDE.bkp.md snapshot under .git/info/exclude (so it never pollutes the team’s .gitignore), fast-forward merges clean worktrees, and runs safe teardown with git worktree remove and git branch -d.

The other three commands separate building from judging and keep Git mutations deterministic:

  • /regression-check spawns a fresh, hostile subagent briefed not to ask “is this fine?” but “what is the bug?” It skips lockfile noise, greps callers of every changed function, scrutinizes deletions—because removed code breaks more things than new code—hunts null, off-by-one, and concurrency edge cases, checks side effects, error paths, security against documented repo conventions, and traces cross-repo impact when shared modules change. It can even audit an external .patch file read-only via git apply --stat and git apply --check without touching the tree. It returns a ranked HIGH / MEDIUM / LOW punch list with exact file:line citations, treats an empty list as a clean pass rather than inventing nits, and never auto-fixes unprompted.
  • /qa-plan converts the diff into concrete, step-by-step human test cases with expected results saved under .test-plans/, so reviewers test real user flows rather than squinting at code.
  • /commit pushes the branch and runs git merge --ff-only into the default-branch worktree, with hard bans on force-pushes, --no-verify, forced branch deletes, or silent rebases. If the default branch diverged, it stops and hands control back to a human.

None of those commands rely on a model being unusually clever or polite. They force memory to survive between sessions, put an adversarial second pair of eyes in front of every commit, and leave Git’s own safety checks in charge of the merge.

Fig. 04 · Session harness

Six commands for memory, hostile review, and safe shipping

Six-command agent coding session lifecycle A six-step workflow from /wt and /start-session through /regression-check, /qa-plan, /commit, and /end-session, with a feedback loop from /end-session back to /start-session for documentation writeback and backup drift checks. ISOLATE & BOOT HOSTILE REVIEW GATE VERIFY, SHIP & REMEMBER 01 /wt 02 /start-session 03 · ADVERSARIAL /regression-check 04 /qa-plan 05 /commit 06 · WRITEBACK /end-session MEMORY LOOP: DOC WRITEBACK + CLAUDE.BKP.MD DRIFT CHECK
/wt01 · Isolate

Spins up a parallel Git worktree with APFS CoW node_modules, gitignored configs, and symlinked auto-memory.

RAIL: Isolated branches, shared project memory
/start-session02 · Boot context

Reads project instructions, checks worktree state, and loads only the docs index—the map, not every doc.

RAIL: diff -q catches CLAUDE.md clobbers & stale paths
/regression-check03 · Hostile review

Fresh subagent assumes the diff is broken: traces callers, deletions, security, cross-repo impact, and read-only .patch files.

RAIL: Ranked High / Med / Low · never auto-fixes
/qa-plan04 · Human QA

Turns code diffs into concrete step-by-step test plans with expected outcomes written to .test-plans/.

RAIL: Verifies user behavior, not raw diffs
/commit05 · Safe ship

Commits and pushes the branch, then fast-forward merges cleanly into the default-branch worktree.

RAIL: --ff-only · no --no-verify · no force push
/end-session06 · Writeback

Updates project docs with discoveries, backs up CLAUDE.bkp.md in .git/info/exclude, and tears down cleanly.

RAIL: git branch -d only · next session starts warm
This is how Tier 4 prose stays small and trustworthy: modular lifecycle commands backed by fresh adversarial context and hard Git boundaries.

Foundations first, software factories second

Lauren’s closing warning is the part most teams skip: do not rush into building an automated outer-loop software factory if your inner coding loop still produces slop. Automating a leaky loop only manufactures slop faster and forces you to burn more tokens cleaning up after it.[1]

When the foundations actually hold, wild things become boring. Every time Grok Bot cuts a new release now, it spins up cloud agents that fuzz the entire build like a real user, log bugs they hit, open fix pull requests, and auto-merge them. That sounds reckless only if you ignore the six months of codebase discipline, lint diagnostics, and verification infrastructure sitting underneath it. Even accounting for the fair caveat that revert rate (~0.5%) does not capture bugs fixed forward in later PRs, shipping 11,000 PRs a month while making an Electron desktop client faster than at launch is serious proof.[2]

Putting Lauren’s talk next to my own postmortem from yesterday gives the complete operator order of operations. Put a commercial demand gate at Stage 0 so you never automate products nobody agreed to pay for. Then lock down the inner loop, wire real verification, and only after both hold, turn up the outer-loop factory.

Fig. 05 · Order of operations

Earn the software factory one layer at a time

  1. Gate 00
    Demand before code Confirm a paying client or live user needs the work. A pristine factory building unvalidated products is just cleaner waste.
  2. Stage 01
    Harden the inner loop Prune legacy workarounds, tighten API and folder boundaries, and replace recurring review comments with failing lint diagnostics.
  3. Stage 02
    Make the app verify itself Wire runtime checks, feature maps, reusable CLIs, screenshots, recordings, and—where stakes justify it—property-based or formal checks.
  4. Stage 03
    Automate the outer loop Spin up cloud agents on each release to fuzz live builds, open fix PRs, and merge safely on top of trusted foundations.

Skip Stage 01 & 02 at your own expense: automating a noisy inner loop multiplies slop and token burn instead of shipping quality.

What those foundations unlocked on Grok Bot (reported in talk)

11,000 Team PRs shipped to production in one month
3,000 Personal PRs merged in a month, many overnight
~0.5% PR revert rate (fell as shipping volume rose)
227 Contributors landing at least one PR in October
~1 / day Stable desktop client release cadence
Faster Startup, typing, and chat switching vs. launch
Revert rate tracks reverted pull requests and does not capture bugs fixed forward in subsequent PRs; pairing it with user-facing latency metrics is what proves quality held.

Stop writing longer prompts

Generating code is cheap now. Adding one more paragraph to a rules file telling an agent to “write clean, maintainable code” is cheaper still, and worth roughly what you paid for it.

If you want agent output you can trust—and eventually merge without babysitting every line—treat the repository itself as the control plane. Pull the weeds, remove APIs that invite bad judgment, turn every second review comment into a check that fails the build, and make the agent prove the running application works before a human ever looks at the diff.