Back to articles

Grok’s AI Coding Playbook: Scale PRs by Making Errors Harder

3 min read

AI coding tools can increase the volume of code a team produces, but they can also reproduce existing mistakes at greater speed. At the AI Engineer CODE conference, Grok Bot engineer Lauren Tan described how her team tries to manage that trade-off. She said she submitted about 3,000 pull requests in a month; the team as a whole submitted around 11,000 in October, with a reported rollback rate of 0.5%. These are figures from her account, not a guarantee that other teams will see the same results.

Reduce the room for error

Tan frames agent-assisted development as a problem of trust. Her “inverted pyramid of trust” puts code design at the top: APIs, architecture, and refactoring. Next come deterministic controls such as linters, type systems, compilers, and automated tests. Runtime and formal verification follow, while natural-language guidance files such as AGENTS.md sit lower in the hierarchy. The ordering reflects a practical principle: when possible, turn expectations into checks that run consistently instead of relying on an agent to interpret and remember prose.

That principle informs her skepticism toward excessive comments. Tan recalled that, while working at Cursor, agents added timer-based patches in an Electron application where imperative VS Code patterns and declarative React patterns had to coexist. They also left comments explaining those choices. Later agents could treat the patches and explanations as established patterns and repeat them. The Grok Bot team has consequently reduced most comments and relies more on lint rules that flag problematic code and point toward a fix. The point is not that comments are always harmful, but that commentary alone cannot enforce a sound implementation.

Put lessons into tools and architecture

The team also tries to keep agents away from APIs that are easy to misuse. Its Dune client framework turns engineering experience into architectural constraints and lint rules. One example is disabling useEffect in product code while allowing its use through specific framework APIs. When an agent repeatedly makes the same mistake, the preferred response is to redesign the API, add a type or lint check, and clean up similar existing code—not merely append another natural-language warning to AGENTS.md.

Verification is another major part of the workflow. Agents can run the application and use tools such as the Chrome DevTools Protocol. The team also provides a user-oriented map of product features, along with reusable command-line tools and verification skills. It has begun using TLA+ for model checking, Lean to verify particular algorithms, and Bombadil for property-based interface testing. Tan said that some developers spend about 70% of their tokens on verification, and that she spends a similar share. Faster generation, in other words, does not necessarily mean less testing.

Speed depends on engineering safeguards

The team has also built a workflow in which a new release can launch cloud agents to fuzz-test the application. The agents operate it like users, search for bugs, and can create repair PRs—sometimes merging them automatically. Tan said building this process took six months. She also said that most product code merged by the team no longer requires in-depth human review.

The broader lesson is not that teams should simply review less. It is that more of the quality work can move into architecture, static checks, and repeatable verification. Teams adopting coding agents may get more value from removing obsolete patches, designing APIs that are harder to misuse, and automating checks for recurring failures than from endlessly expanding prompt files. Automation amplifies what is already in a codebase, good or bad; reliable safeguards help turn higher output into dependable delivery.

Source: QbitAI

Comments

Checking sign-in status...

Loading comments...

Related articles