[KongchangAI]
· 3 min read· 1,564 words

Is AI-Written Code All Garbage? Grokbot Lead Shares Three Moves to Make Code Trustworthy

Is AI-Written Code All Garbage? Grokbot Lead Shares Three Moves to Make Code Trustworthy

In the AI coding era, rebuild trust through rules, a clean codebase, and evidence review.

Based on Lauren Tan's AI Engineer talk, this article explores ensuring quality when most code is AI-generated. He merged 3,000 PRs solo last month, with review volume jumping from 3 to 300. The answer: engineer trust via three layers—solidify corrections into lint rules and CI gates instead of prompts; keep the codebase clean so AI doesn't copy patches and redundant comments as norms; and review evidence like videos, screenshots, and flowcharts instead of line-by-line diffs. Grokbot's team merged 11,000 PRs last month with only a 0.5% rollback rate.

Title

Is AI-Written Code All Garbage? Grokbot Lead Shares Three Moves to Make Code Trustworthy

Meta Description

Grokbot lead Lauren Tan shares three moves to make AI code trustworthy: turn corrections into automated check rules rather than prompts, treat the codebase as a garden so weeds aren't copied by AI, and turn code review into reviewing AI's self-proven runtime evidence. Plus his practice data: 3,000 PRs merged solo per month, 11,000 PRs merged by the team per month, and a rollback rate of five per thousand.

Article Content

Seeing someone else's code and thinking "what garbage is this" — that's probably a collective subconscious of programmers. At an AI Engineer talk, Lauren Tan (who calls himself Potato), lead of SpaceX's Grokbot intelligent assistant, turned that complaint into his title: Everyone else's code is garbage, except mine.

But what he really wanted to discuss wasn't complaining — it was a more urgent question: when most code is written by AI, why should we believe it isn't garbage?

According to the data he gave in the talk, last month he alone merged 3,000 PRs, many of them merged while he was asleep. A few years ago, he only had to review three PRs written by colleagues at work; now that number is about 300 — a hundredfold increase — because the entity writing code has become AI.

Merged even while he was asleep

His answer is one word: trust. And it took him more than half a year to build this trust mechanism.

Move One: Write Corrections as Rules, Not Prompts

Most people correct AI by adding a line in the conversation like "don't do that next time." The problem is that prompts get forgotten; rules don't.

Lauren Tan's approach: every time you correct AI, solidify it into an automated check rule. He gave an example of a frontend feature — joked about in the community as requiring a PhD to use — that AI also kept getting wrong. The team simply banned it outright, so AI errors out as soon as it writes it. Problems like this no longer need a human watching.

For example, a frontend feature joked about in the community

The logic behind this is worth pondering: prompts are temporary constraints; lint rules, type checking, and CI gates are persistent constraints. The former relies on AI "remembering"; the latter relies on no self-discipline at all. Replacing verbal reminders with engineering means is the first step to making AI output controllable. He mentioned that at a certain stage you'll find there isn't much left that needs manual review, and you can let agents merge most of their own public changes.

Lint Rules and CI Gates: Lint is the collective name for static code analysis tools (such as ESLint, Pylint). It scans syntax and patterns without running code, and reports errors or warnings immediately when it finds suspicious writing. CI (continuous integration) is the pipeline that automatically runs builds, tests, and checks every time code is committed. Combined, this means once a rule is written into configuration, it is enforced on every AI commit, without relying on anyone's memory or discipline. By contrast, a prompt is only a temporary instruction in the conversation context; it expires once the session ends and has no effect at all if you switch agents or open a new window. This is why solidifying corrections into rules is more reliable than repeatedly nagging in conversation.

Move Two: Treat the Codebase as a Garden, Don't Leave Weeds

AI learns from your existing code. Leave a temporary patch, and the next AI thinks it's the rule and copies it directly. Like weeds, once they grow they spread across the whole yard.

Spread across the whole yard

The funniest example in the talk: AI especially loves using timers to patch things, and even writes a long paragraph in comments explaining why what it did is reasonable — essentially writing itself a disclaimer. The next AI sees "well-reasoned" and keeps using timers. So timers multiply, and the app gets laggier and laggier.

Grokbot's countermeasure is direct: replace 99% of comments with automatic errors, explicitly telling AI to fix the root cause and not try to work around it. The ruthless part of this approach is that it doesn't expect AI to judge "is this comment making excuses for itself" — it mechanically makes workarounds fail the check. Codebase cleanliness isn't an aesthetic issue; it directly affects the training signal for the next generation of AI output.

Training Signal and Distribution Shift: "Training signal" here is borrowed terminology. AI coding assistants don't learn your codebase online, but they use the existing code in the repository as context or fine-tuning material, inferring "how this project usually writes things." If the codebase is full of temporary patches, workaround styles, and self-justifying comments, the model will treat these as project conventions and continue them, forming a kind of distribution shift — the more it copies, the more skewed it gets; the more skewed it gets, the more it copies. This is exactly the mechanism behind "weeds spreading across the yard": the problem isn't the quality of a single generation, but the continuous degradation of the codebase's overall quality as a demonstration sample.

Move Three: Review Becomes Reviewing Evidence

Traditional code review looks at the diff: which lines changed, whether the logic is right. But when the amount of change in a single AI commit far exceeds what a human can read line by line, line-by-line review itself becomes the bottleneck.

Grokbot's approach is to let AI run the program itself and submit instructional videos, screenshots, and flowcharts as evidence. Humans review "what it proved," not "what it wrote."

Show you instructional videos, screenshots, flowcharts

He quoted a developer: half a year ago he didn't dare trust AI; now 70% of his daily AI usage goes to verification. His own team merged 11,000 PRs last month — by common sense things should have gone wrong long ago — yet only five per thousand needed rollback, and the app actually got faster.

This data combination is interesting: a low rollback rate shows evidence review is effective, and the app getting faster shows AI-written code isn't just aiming to pass checks. Front-loading verification cost onto AI itself, with humans only making the final judgment, is the key to scaling.

From Diff Review to Evidence Review: A diff is the line-level difference between two commits in version control. The core action of traditional code review is reading the diff line by line and judging whether the logic is correct. The premise of this approach is that a single change is within the range a human can digest line by line. When AI submits hundreds or thousands of lines at once, line-by-line review is both slow and error-prone, and humans become the throughput bottleneck instead. Evidence review shifts the focus from "reading code" to "looking at results": let AI actually run the program and submit screen recordings, screenshots, flowcharts, and even test reports; the reviewer judges whether behavior matches expectations. It doesn't replace diff; it provides a verifiable alternative entry point when the scale of change exceeds manual reading capacity.

Why These Three Moves Form a Set

Looked at separately, none of the three suggestions is new: write lint rules, keep the codebase clean, strengthen test verification. Only together do they form a closed loop —

  • The rule layer intercepts known errors and reduces repeated corrections;
  • Codebase cleanliness ensures AI learns the correct paradigm and reduces the generation of new errors;
  • Evidence review exposes escapees before merge, rather than discovering them after launch.

Each layer handles one segment; miss one layer and all the pressure falls on manual review — and manual review is precisely the link that can't hold up first in the AI era.

Lauren Tan left one line at the end of the talk, roughly: leaving bad code in the loop only brings greater damage. To put it more bluntly — next time you curse AI-written code as garbage, stop and think: who did it learn from?

The codebase is AI's textbook, rules are AI's boundaries, evidence is AI's answer sheet. The quality of these three things determines whether you get three thousand PRs that can be merged, or three thousand messes that need cleaning up.

One-line Summary

In the era of AI-written code, rebuild trust through rules, a clean codebase, and evidence review.

Paragraph Summary

Based on Lauren Tan's sharing at the AI Engineer talk, this article discusses how to ensure output quality when most code is generated by AI. He personally merged 3,000 PRs last month, and his review volume surged from 3 in the past to 300, with the core answer being to engineer the trust mechanism. Specifically, three layers: solidify each correction into lint rules and CI gates rather than easily forgotten prompts; maintain the codebase as a garden to prevent temporary patches and redundant comments from being copied as norms by the next generation of AI; and shift code review from line-by-line diff reading to reviewing videos, screenshots, and flowcharts submitted by AI after running the program itself. The three layers each handle one segment and form a closed loop. Grokbot's team merged 11,000 PRs last month with a rollback rate of only five per thousand, and the app actually got faster.

#AI code#code review#lint rules#CI gates#Grokbot#Lauren Tan#AI Engineer
Share:

Related articles