All code is slop, except mine. How to Write Code With Agents?

---
title: "All code is slop, except mine. How to Write Code With Agents?"
author: "kaize (@0x_kaize)"
source_url: "https://x.com/0x_kaize/status/2121540306822701393"
published_at: "2026-11-14T09:46:40.000Z"
fetched_at: "2026-11-16T15:09:53Z"
updated_at: "2026-11-16T15:09:53Z"
language: "en"
review_status: "source-checked"
---

![](https://pbs.twimg.com/media/HXBhACHbIAAdS1H.jpg)

# All code is slop, except mine. How to Write Code With Agents?

Lauren Tan, known on X as @poteto, submitted more than 3,000 pull requests to the production environment, and her team as a whole submitted about 11,000 over the past month.

What’s unusual here isn’t the increase in the number of PRs itself, but the fact that the number of rejected PRs has decreased.

**Here’s what happened:** a few days ago, on stage at the AI Engineer Code Summit in San Francisco, she explained in detail exactly how she and her team manage to do this,  

**And titled her talk "All Code Is Slop (Except Mine)."**

Below is a complete breakdown of this presentation, along with a practical guide to **writing code CORRECTLY using agents.**

Also, I'll mark some of the things I consider most important as \[RULE\], be sure to remember them.

Save it, because you’ll want to come back to it:

![](https://pbs.twimg.com/media/HXBojQ2akAABozA.jpg)

## Everyone’s code is slop

Lauren begins her talk with a joke that almost every developer will get.

When we write code ourselves, we call it "craft." When someone else does exactly the same thing, we call it "SLOP."

Her point is that "slop" isn’t really a definition at all. It’s just a word we use to describe code that we didn’t write and don’t fully understand, but many people attach a different, incorrect meaning to it.

Code bases have always been full of slop code written by humans, long before agents came along. So the real question isn’t whether code written by AI is "slop".

The real question is whether you’ve built a system that turns that code into something you can truly trust.

![](https://pbs.twimg.com/media/HXBrYQOboAAEMD5.jpg)

## The numbers behind the talk

To show that this isn’t just theory, Lauren displayed her own figures on screen. In March, she sent 68 PRs (pull requests).  
  
July: 1,113 PRs  
August: 2,401 PRs  
October: 3,127 PRs 

Total: 10,732 PRs (since March).

**If we do the math:**

3,000 PRs/month = 100 PRs/day  
no single person could have managed that

**But the most interesting part is how she achieved this:**  
  
She didn’t simply start working longer hours with more agents. She spent about half a year building a system based on their work, and it is this system that allows her to send PRs at such a high speed without compromising quality.

![](https://pbs.twimg.com/media/HXBsEUEbwAAN1im.jpg)

**This brings us to the main idea of her talk:**

Before the advent of agents, only a handful of outstanding engineers could produce products on such a scale, and they were called "programming machines." Now, anyone can become one.

The key skill now isn’t typing faster, but getting a product to market quickly without sacrificing quality.

![](https://pbs.twimg.com/media/HXBsLXAa4AE9AOC.jpg)

## It all comes down to trust

According to Lauren, it all comes down to one curve.

**The more you trust your agents, the more of them you can run at the same time:**

\> If the trust level is low, run ONE agent and monitor it.  
\> If the trust level is high, run HUNDREDS/THOUSANDS agents.

But you can only run a large number of agents when you trust them, when you’re so confident that you don’t need to read every line of code.

![](https://pbs.twimg.com/media/HXBsRnCaYAARH94.jpg)

**The problem is that most people get stuck at the bottom of this curve:**

The Agent writes SLOP code, a human reviews it, finds errors, sends it back, and the cycle repeats indefinitely.

In this cycle, the human is always the "bottleneck."

And the main goal is to move to a different cycle, in which the agent writes high-quality code and checks their own work, and you only step in when your judgment is truly needed.

![](https://pbs.twimg.com/media/HXBsWUrakAAeVQd.jpg)

## The Poteto Pyramid

So how do you move from one level to the next?

**Lauren explains this using an inverted pyramid:**

1) At the top is the codebase itself: well-designed APIs, clean architecture, and regular refactoring.  
2) Static analysis: lint rules, types, compilers, tests, and CI.  
3) Verification, both formal and at runtime.  
4) Documentation: rules, best practices, and AGENTS.md files.  
5) Human review

**The idea is simple:**

The higher up the layer, the more effort it deserves, the lower you go, the more expensive each fix becomes.  
  
Most people do exactly the opposite. They keep increasing the size of their AGENTS.md files and check everything manually, which is the most expensive way to achieve the lowest level of confidence.

![](https://pbs.twimg.com/media/HXCbsIybwAEe7zq.jpg)

## Code is memory

It is precisely this idea that radically changes your perception of the entire project.

Agents learn more from your code than from anything else you provide them. Every workaround, every "quick hack," every piece of technical debt quietly becomes a template that the next agent will copy.

**RULE 1: YOUR CODE IS THE AGENT’S MEMORY.**

![](https://pbs.twimg.com/media/HXBsrLLaEAAfm8P.jpg)

**Lauren compares the codebase to a garden:**

Code no longer arrives in the form of a few neat pull requests, but flows in a continuous stream.

Back in 2024, she was reviewing maybe three PRs a day, but now that number is approaching three hundred.

In a garden growing at that rate, a single weed that you ignore today will spread everywhere by next month. That’s why keeping the codebase clean is more important than ever, so that agents always have good examples to follow.

**RULE 2: YOU SHOULD STILL READ THE CODE FROM TIME TO TIME.**

![](https://pbs.twimg.com/media/HXBsxO7agAAT3f1.jpg)

## Dune, a framework built for agents

To bring all of the above to life, the team created **Dune**, the framework on which Grok Bot runs, you can think of it as Next.js for Electron apps.

There’s nothing magical about the framework itself, its uniqueness lies in its built-in constraints:

One folder per function, strict restrictions on what can be imported and where, and a complete absence of comments in the code.

![](https://pbs.twimg.com/media/HXBs2LobcAA0ZAI.jpg)

One lesson we can learn from these constraints is that nuances often lead to carelessness.

Anything that requires careful judgment to use correctly will, sooner or later, be used incorrectly by an agent.

Lauren’s favorite example is the **"useEffect"** function in React.

**It’s useful, but it’s so easy to misuse that people joke:**

"You need a PhD to use it correctly, and developers constantly make mistakes."

So the team simply banned its use in the product’s code and reserved it solely for Dune’s internal mechanisms.

An entire category of errors disappeared, and no one has to look for them during code reviews anymore.

Instead of explaining the nuances to developers, they built an API where those nuances simply don’t exist.

![](https://pbs.twimg.com/media/HXCfVDRa8AApulC.jpg)

The same applies to folders. In the Cursor project, the team constantly encountered one inefficient practice: 

Agents imported code from the main Electron process into the renderer, which led to long task execution times and UI delays.

In Grok Bot, the folder structure itself now tells the agent what it is allowed to do. The renderer and the main process are located in separate folders that cannot import data from each other at all, not even types, and the only bridge between them is a shared folder for common types.

Lauren even applies this approach in her side project, where any file named tick(.)hot.ts runs on every tick and therefore is not allowed to allocate memory.

![](https://pbs.twimg.com/media/HXBtMKAaoAAlz5-.jpg)

## When agents start making excuses

What surprised Lauren the most was how agents use Markdown. They treat help files, comments, and notes as a place to explain why they didn’t do things the way they should have. Or they do exactly the opposite: you give them one small instruction, and they treat it as an immutable law that must never be broken again.

Lauren even applies this approach in her side project, where any file named tick(.)hot.ts runs on every tick and therefore is not allowed to allocate memory.

![](https://pbs.twimg.com/media/HXBtRFka8AARrQO.jpg)

**Here’s what happens if this isn’t done:**

On September 9, one of the developers fixed a flickering issue in the interface using a quick setTimeout call and left a comment stating that a proper fix "would require more significant changes."  
  
On October 3, this same workaround was copied into a shared module. 

By October 17, there were 183 timers in the app. 

Timers that are created and destroyed at such a rapid pace force the system to perform intensive garbage collection, which manifests as lag and stuttering.

A single SLOP FIX, justified by a single comment, spread throughout the entire app in about five weeks.

**RULE 3: DON'T LET AGENTS WRITE IN MARKDOWN ABOUT THINGS NOBODY ASKED FOR.**

![](https://pbs.twimg.com/media/HXBtb1TaoAEL7pw.jpg)

That is exactly why the Grok Bot team deleted almost all of the comments.

They become outdated, people rarely read them, and developers use them to justify poor code.

Worst of all, it’s impossible to enforce comment guidelines.  
  
On July 31, there were 65,824 comments in the codebase, and today there are 1,227.  
  
If you want to do the same, Lauren’s pstack plugin has a /no-comments command designed specifically for this purpose: [github](https://github.com/cursor/plugins/blob/main/pstack/skills/no-comments/SKILL.md)

**RULE 4: NEVER WRITE COMMENTS WHEN WRITING CODE WITH AGENTS.**

This doesn’t apply to code you write yourself or during learning. Also, if you’re working on a team, you’ll most likely HAVE TO write comments, since this has been standard practice for a long time.

But over time, we’ll likely move away from this established practice and never write comments again.

![](https://pbs.twimg.com/media/HXBtgVsaQAAEfxU.jpg)

## The one rule that changes everything

The most important takeaway from the presentation: 

**IMPORTANT RULE: WHENEVER YOU FIX AGENT CODE, DO NOT ADD ANOTHER LINE TO THE RULES FILE.**

Turn that fix into a lint rule or refactor the code so that this error can no longer occur. The number of custom lint rules on her team grew from 7 in July to 167 by November, and each one represents an error that will never have to be detected manually again.

Do this often enough, and you’ll notice that there’s less and less to check. At some point, you’ll realize there’s almost nothing left to check, and that’s exactly when the agents will be able to start submitting most of their work on their own.

![](https://pbs.twimg.com/media/HXBtmbaagAE3WyL.jpg)

## Verification is the most important step

The second important lesson concerns code review.

Code review in the Grok Bot team now mainly involves analyzing supporting materials: videos, screenshots, diagrams, and formal proofs.

But it certainly doesn’t involve reading every single line of code.

![](https://pbs.twimg.com/media/HXBtsu6bMAItXyI.jpg)

To illustrate why this is important, Lauren cited two posts by Cindy Sridhar (@copyconstruct) written six months apart.

In May, Cindy was frustrated because her team had merged several AI-generated PRs that contained subtle errors, and fixing them took several days of manual review.

She concluded that "speed" isn’t actually increasing when you factor in all the time spent on subsequent revisions.

![](https://pbs.twimg.com/media/HXBtyVMasAAmooI.jpg)

In November, she returned to that position and noted that she no longer faces any of those problems.

Only one thing has changed: she has established a proper verification process.

About 70% of her daily tokens are now spent on verifying patches, while only 20–30% go toward writing them.

Lauren said that this accurately reflects her own experience.

![](https://pbs.twimg.com/media/HXBt65tasAAuEyr.jpg)

By "verification," Cindy means a comprehensive set of methods covering all stages: from unit tests and pre-release fuzzing to "canary" deployment and post-deployment monitoring.

Interestingly, none of this is new.

Each item on this list is a classic software development method that was previously too costly and labor-intensive to implement and maintain.

Agents have made them accessible, which is why Lauren believes we are entering a "golden age" of testing.

![](https://pbs.twimg.com/media/HXBuCtobsAA5QY5.jpg)

## Letting the agent check its own work

In the Grok Bot team, testing begins during execution: the agent must be able to launch the actual application and verify the results of its work.

This is made possible by two components:

**1) Function Map**

It describes which functions exist, how users access them, and what confirms that each one works properly.

**2) Command-Line Tool**

It controls the live application by clicking buttons by name, taking screenshots, and saving them as evidence.

Since these tools are reusable, they also save tokens, as the agent doesn’t need to recreate them each time.

In **pstack**, there is a **/create-verification-skill** command to configure this process.

![](https://pbs.twimg.com/media/HXBuIPDa4AA0P_B.jpg)

**In addition, the team is experimenting with formal verification:**

> They use TLA+ to model state machines, for example, notifications synchronized across devices and verify that all possible states are handled.

> They use Lean to generate proofs from code, for example, to ensure that their own virtualization library does not cause flickering or jitter.

Lauren is careful to avoid calling this a "panacea", because it’s just another layer, but it has already helped uncover real bugs.

**pstack** also includes the **/create-formal-verification-skill** command.

![](https://pbs.twimg.com/media/HXBuOEebUAA0GYQ.jpg)

The final step is to test the interface itself based on its properties using the Bombadil library, which subjects the application to heavy load testing with random input data to identify potential failures.

**The link:** github.com/antithesishq/bombadil.

![](https://pbs.twimg.com/media/HXBuVH_bYAARXGk.jpg)

## What all of this adds up to

So what have all these efforts brought the Grok Bot team?

Last month, they pushed about 11,000 PRs to the production environment, and now they’re releasing a new stable version roughly every day.

In October alone, 227 people submitted at least one PR.

Only about 0.5% of PRs are rejected, and the app has indeed become faster over time: launching, text input, and opening and switching between chats all happen faster than when the project first launched.

Every time the team releases a new version, Grok Bot automatically runs the Cursor project, which uses the app just as a real person would, finds bugs, opens a fix for each one, and submits those fixes on its own.

This works only because the codebase is now so good that most pull requests are of high quality by default.

## What this means for you

**Remember these rules:**

RULE 1: Your code is the agent's memory.  
RULE 2: You should still read the code from time to time.  
RULE 3: Don't let agents write in markdown about things nobody asked for.  
RULE 4: Never write comments when writing code with agents.  
  
IMPORTANT RULE: Whenever you fix agent code, do not add another line to the rules file.   
  
**Lauren’s Final Take:**

If your agent cycle generates "junk," automating it won’t fix anything, it will only lead to even more "junk" and, on top of that, a waste of resources.

Before you start building your own "software factory," strengthen the foundation: turn every adjustment into a check rather than a rule, ban anything that’s too easy to abuse, let your folder structure convey context, get rid of comments and make your agents prove the effectiveness of their work.

It took her six months to get to this point, she promises it will take you much less time.

P.S. I break down stuff like this on AI and agents all the time.   
  
Follow me @0x\_kaize if you want the next one in your feed.