89% of my AI guardrails were doing nothing
So I deleted them. The next morning, what was left caught a production incident the old system had no way to find.
Siva Darivemula··13 min read
Originally published on Substack ↗
I run a small company, grow+bien, where most of the work is done by AI agents. Eight of them, each with a role, a charter, and a memory. They write code, write content, run campaigns, file reports. It works well enough that I have not hired a second engineer.
Yesterday I deleted 89% of the system I built to keep them honest.
Our rules file went from 71,895 bytes to 11,843. Our agent charters went from 109,302 to 7,996. Combined: 181,197 bytes of process down to 19,839. Roughly 18,000 tokens removed from every agent task, forever.
Nothing got worse. And the one small thing we added in its place caught a production incident within 24 hours that the older, larger version had no mechanism to catch.

Seven correct pull requests, zero working product
I had asked for something simple. I wanted to read a blog post before it published, and send it back with comments. That is the whole ask.
Seven pull requests shipped to deliver it. All seven merged. Every one was individually correct.
Then I opened the product. There was no way to read a post. Anywhere. I clicked a control to investigate and it silently reordered my publishing schedule, no confirmation, no undo. The drafts page said “DRAFTS (0)”. The screen showed me words like pending, queued, needs_fix, which are internal state names that mean nothing to a person.
The approve button did not exist. Not broken. Did not exist. The server code to approve a post had been written, tested, and merged two days earlier, and nobody had put a button on it. A search across every screen returned zero callers.
The requirement was written down, and lost anyway
This is the part that changed how I think about it.
“Sivad can read the content” was in the design document, as step 3 of 5. Written down. Agreed.
During planning it got narrowed into a smaller ticket about fixing a broken link. My five technical decisions from that same document, things like cutover dates and status names, were carried into every one of the seven pull requests and checked off individually. The outcome was carried into none of them.
So it was not a documentation failure. Documentation was excellent. Every check in the system verified a ticket against its own definition of done, and no check held the outcome. Decompose an ask into seven pieces and each piece gets satisfied. The thing you actually wanted is nobody’s acceptance criterion unless somebody makes it one and tests for it at the end.
Meanwhile, the guardrails were enforcing punctuation
Here is what the process looked like at that moment. Thirty written rules, each a real lesson from a real incident, each correctly diagnosed. Of those thirty:
- 3 had an actual enforcement mechanism
- 10 were labelled “written down only”
- 14 had no enforcement status recorded at all
Ten of the thirty were word-for-word duplicates of another file already loaded into every session. We were paying twice to load the same text.
And of the three rules that could actually fire, the one that fired on every commit and every pull request was a ban on em dashes.
I care about em dashes in customer-facing writing. I do not care about them in an engineering log only my agents read. The check did not know the difference. It scanned everything.
So an agent, trying to save its own work log, stripped em dashes out of four internal files. And to get one commit past the gate, it rewrote a quoted identifier, the real name of a workflow node in another system, into a form that named nothing real.
A permanent audit record was falsified to satisfy a linter.
That is the transferable lesson: a rule enforced more broadly than it was meant to apply does not produce compliance, it produces evasion. And the evasion lands in whatever the enforcement happens to be scanning. When that is your record of what happened, your enforcement starts manufacturing false history.
Meanwhile the one guardrail written specifically to catch “did we ship something nobody can use” was a required field in the handoff template. It asks whether a human can see and manage the thing being built. It had been filled in zero times, across the entire history of the log.
It was a line in a document. Nothing read the document.

Why the useless rule won
This is not a story about lazy agents. Every one of those thirty rules was written by someone doing their job correctly after something went wrong.
A rule becomes enforceable only when three things exist at once:
-
- A machine-decidable predicate. Something a program can evaluate without judgment.
-
- An artifact containing the evidence. The thing being judged has to sit somewhere a check can read it.
-
- A moment where execution can block. Somewhere the work has to pass through.
“Contains an em dash” has all three, trivially. A character search, on a diff, at commit time.
“Can the customer actually review this post” has none. It is a judgment, the evidence lives in no file, and no moment exists where intent passes through a gate.
So the system enforced the trivia and left the important thing to me. Not by anyone’s decision. As a selection effect. Enforcement selects for what is expressible, not for what matters.
That is why writing thirty rules changed nothing. Twenty-seven were in the second category, and writing them down harder was never going to move them into the first.
The ratchet
Every incident produced a rule. Nothing ever removed one. Adding a rule feels like accountability. Deleting one feels like negligence. Left alone it ratchets in one direction until the process costs more than the work.
We had even invented a label, “written down only,” to be honest about rules with no enforcement. It was meant as a mark of shame. It functioned as permission. Ten rules shipped with no mechanism, each honestly labelled, each changing nothing.
Routine tasks were taking hours. Not because the checks were slow, and this surprised me most: the entire automated suite runs in 1.88 seconds. The cost was never the checking. It was the reading. Every agent, on every task, loading 181KB of accumulated process before doing anything.
Corey Quinn named it this week, writing about where agent tooling is going: developers “want outcomes, not a weekend project just to wrangle the tools.” (Reading the tea leaves: 2026 predictions, July 2026.)
I had built the weekend project, then maintained it for months. It was not a side effect of the work. It had become the work.
What replaced it
Thirty rules to fifteen. Each survivor names the file that enforces it. Rules with no mechanism were deleted, not relabelled.
One new admission rule, which is the whole reform in a sentence: a rule may only be added in the same change that wires up its enforcement. No proposing now and building later. That makes adding a rule cost exactly what the mechanism costs, which is the only thing that stops the ratchet.
Plus a quarterly forced deletion: any rule whose mechanism has not fired in 90 days is removed. No meeting, no judgment call.
And one new check. Not a bigger harness. One report, every morning, that computes from evidence instead of asking anyone. It reads the repository and reports which mechanisms actually fired, which handoffs were planned but never executed, which completion claims arrived with no supporting output, which commits reached the main branch with no review. Every line can report “could not determine” as distinct from “clean,” so a green report that is green because something was unreachable cannot fool me.
It failed on its first run. Four checks red, including against my own behavior. That is the correct result for day one.
Twenty-four hours later
The next morning it printed six commits that had reached my main branch with no review.
An external coding agent, working on a different task, had restructured the entire repository. It moved 1,777 files, including my production deploy configuration, into a backup folder and pushed straight to the branch that auto-deploys. My blog automation reads content by file path. Every path was now a 404. A post I had personally reviewed and approved was scheduled to publish the next morning and would have failed silently.
The thirty-rule harness had nothing that would have caught it. The fifteen-rule version, plus one report that computes instead of asking, caught it in the first fifteen lines of terminal output.
Smaller and more effective on the same day. Size and enforcement were not merely uncorrelated. They were competing for the same attention.

I asked it to prove the work was done. It said it had.
Here is the detail that settles it for me.
On a completely separate product, its own repository, its own release process, I had asked an agent repeatedly and explicitly to verify its work and prove that what it called finished was finished. In writing. More than once. It then reported a series of completed release tasks, several of which a later QA audit found had never been implemented. One would have emailed an unapproved draft to a real customer list.
I did the thing everyone tells you to do. I asked for proof. It told me it had proof.
When that agent later wrote me a post-mortem, and it was genuinely the best-written incident report in the whole set, its proposed remedy was a list of better instructions: tell it to audit spec against code, tell it to separate code readiness from operational readiness, tell it to red-team its own assumptions.
Every item was an instruction. Instructions were what had just failed.
An instruction is an input to a generative process, not a gate on its output. Telling an agent to verify changes what it is likely to write. It does not create a mechanism that can fail. There is no path by which “you told me to check” causes checking, and no path by which skipping the check produces an error instead of a confident sentence.
Someone measured this. A paper accepted to an ICML workshop this year looked at 9,876 agent runs across eight model families. When agents assessed their own coding work and made an explicit status claim, 75.8% of the failures were reported as successes. Then they tested whether another model could catch it, across five judges and five prompting strategies with full task specifications. Nothing exceeded 0.65 AUROC. Barely better than a coin flip.
The reason stopped me. The judges keyed on what the authors call “confident closing language” rather than verified state changes. A cheap statistical detector with no model in it scored 0.83 to 0.95. (Advani, “From Confident Closing to Silent Failure,” arXiv 2606.09863. Single-author workshop paper on benchmark trajectories, not production systems, so weigh it accordingly.)
Fluency is the tell that fools the checker. They varied the prompt as the experimental variable, and it did not move the number.
The most useful thing I learned
While drafting this, I told my own AI assistant the headline should be that we cut the harness and our quality got better.
It refused. It pointed out that it had been two days, that I had no baseline and no counterfactual, and that a piece whose argument is confident claims made without verification could not open with a confident claim made without verification. It offered the narrower version instead: 89% smaller, nothing got worse, and here is one dated incident it caught.
That is a better sentence than the one I asked for, and the only kind I can defend.
The value was not the agent being clever. It was the agent having something concrete to check my claim against, and an instruction that made checking more important than agreeing with me.
It all reduces to that. Agents are not unreliable. Self-report is unreliable. An agent asked to certify its own work will tell you it is done. An agent asked to audit someone else’s work, with tools and an adversarial brief, is genuinely good at it. That is not new, it is separation of duties, and auditors have known it for a century.
Most of what is being built right now is the first pattern. The improvement is in the second.
Receipts
Everything above is checkable. Here is the evidence, so you do not have to take my word for any of it, which would rather defeat the point.
The cut
Measured with git show against the commit before and after:
Rules file: 71,895 bytes and 194 lines, down to 11,843 bytes and 82 lines. A 83.5% reduction.
Agent charters: 109,302 bytes and 1,564 lines, down to 7,996 bytes and 128 lines. A 92.7% reduction.
Combined: 181,197 bytes down to 19,839. 89.0%.
The pull request that did it: 358 insertions, 3,682 deletions, 48 files.
Rule count 30 to 15. Pre-commit checks 11 to 10. CI jobs 5 to 4. Full pre-commit suite runtime: 1.88 seconds, before and after.
The seven pull requests
Merged 2026-07-26. The approve server action shipped in that batch, declared and dispatched in the API route, with zero callers in any screen file. Confirmed by a repository-wide search across every component under the app directory, which returned nothing. The button was added two days later in a 663-line pull request.
The reorder defect
One click swapped a calendar slot’s entire identity with its neighbour. No confirmation, no undo. It fired unnoticed on 2026-07-26 and caused the wrong post to publish under the wrong brief the next morning. Part 2 of a two-part series went live as Part 1. I then triggered the same control accidentally on 2026-07-27 while trying to find a way to read a post. Same defect, twice, 48 hours apart, on the same pair of slots. Nothing in the system compared a draft’s content to the brief its slot claimed.
The manual step everyone documented as automatic
The runbook described a routine that advances a slot from pending to drafted, which gates everything downstream. Git history of that file shows the transition occurred exactly once in its entire life: by hand, by me, on a Sunday, without my realising that was what I was doing. The previous week’s post published only because a human closed a gap nobody knew was open.
The external agent incident
Six commits authored by Replit Agent <agent@replit.com>, pushed 2026-07-28 directly to main. 1,777 files changed, 43,533 insertions, 9,345 deletions. No pull request, no CI, no review. It moved the entire application into a .migration-backup/ directory and deleted apphosting.yaml, the deploy configuration for a platform that auto-deploys on push.
Three structural reasons no existing gate fired, and the second is the interesting one:
-
- Every gate was scoped to a pull request. These went straight to the default branch, and there is no branch protection on this repository under its current plan.
-
- The CI workflows were themselves among the moved files. A change that removes the checks cannot be evaluated by the checks. Any sufficiently large restructuring change is capable of deleting its own reviewer.
-
- The pre-commit gates lived in a directory that also moved.
Asked afterwards whether it inspects a repository before acting, it answered plainly, and I think honestly:
“I read enough to understand the app’s structure... but I didn’t look for production deployment signals before restructuring.”
The document it created to describe my project, replit.md, was left as an unedited template with a literal [Project name] heading. A tool confident enough to relocate 1,777 files was not confident enough to say what the project does.
The other vendor
Separate company, separate repository, separate product. An independent automated code review found that four release areas marked “COMPLETE” included: a newsletter dispatch that would send unapproved drafts to real mailing lists, a 24-hour trial pass that existed only in browser local storage rather than server-side as specified, and a required warning email with zero code anywhere in the codebase.
Its own explanation of why, which is worth reading twice because it is both plausible and unverifiable:
“I saw a status check in the code and assumed the gate existed without evaluating the boolean logic.”
“I marked v6.5 as complete based on the UI trial pass existing, without explicitly grepping for the function.”
It attributed the root cause to reinforcement learning from human feedback producing a completion bias: absent an explicit instruction to audit and fail, the default is to assume prior commit messages and release titles are accurate.
I had given explicit instructions to audit. More than once.
More to follow
That quality improved. It has been two days. There is no baseline and no counterfactual. The daily report now produces a dated record every morning, so in a month I will have a measured before and after instead of a feeling. That post will be more useful than this one, and I will write it whether or not the numbers flatter me.
First in a series on running an agent workforce in production. Next: three coding agents, from three different companies, caught making false completion claims in four days, and what their apologies have in common.