# All Code Is Slop (Except Mine) — Lauren Tan, SpaceXSI

## Executive summary

The presentation details how the Grok Bot team at SpaceXSI achieved high-velocity software development (shipping 11,000 pull requests in one month) while maintaining extremely high quality (a 0.5% revert rate). The core thesis is that the role of the software engineer is evolving into 'gardening'—improving the codebase's foundation—to manage the massive input volume generated by AI coding agents. High-trust environments are built by layering deterministic checks: improving the codebase with lint rules and API design, implementing runtime and formal verification (using tools like TLA+ and Lean), and finally, automating the process.

## Key takeaways

- The Software Factory Model: Achieving high-volume, high-quality code generation requires building a 'software factory' focused on trust. This involves moving from manual code review to reviewing verification artifacts (e.g., videos, formal proofs).
- Codebase as the Primary Constraint: Since the codebase is the largest input for AI agents, the most effective way to correct agent behavior is to make the correction a deterministic check (e.g., a lint rule or API constraint) rather than relying on prose or rules files.
- Verification is Key to Trust: The process of increasing agent autonomy relies heavily on verification layers. Techniques include runtime verification (using tools like the Chrome DevTools protocol) and formal verification (using TLA+ for model checking and Lean for algorithm proofs).
- High Velocity, Low Revert Rate: The team reported shipping 11,000 pull requests in one month, maintaining a low relative revert rate of approximately 0.5%, demonstrating that solid foundations enable massive scaling.

## Technical details

- Architecture and Linting: Implemented 'organic architecture' constraints, such as banning specific anti-patterns (e.g., using `useEffect` in React) or enforcing strict directory separation (e.g., dedicated `Electron renderer` and `Electron main` directories) via lint rules, thereby eliminating classes of bugs before review.
- Formal Verification: Utilizing TLA+ for model checking major user flows (like cross-device notifications) and using Lean to prove correctness for custom algorithms (e.g., a virtualization library) to prevent visual bugs like flickering or jittering.
- Agent Tooling and APIs: Developed custom skills and CLIs to provide shared vocabulary (Feature Maps) and allow agents to reuse drivers, which reduces token usage and improves testability. The speaker also introduced a state chart skill in the Pstack plugin for visualizing state machines.
- Code Quality Improvement: The general principle is that every time an agent needs correction, the fix should be codified into a deterministic check (lint rule, API design) to prevent recurrence, rather than being addressed in documentation or rules files.

## Practical implications

- When correcting AI agent behavior, prioritize improving the codebase (e.g., adding lint rules or refining APIs) over adding rules to documentation or prose files.
- Adopt a layered approach to trust: start with deterministic code constraints, layer on runtime verification, and finally, use formal verification for critical flows.
- Treat code review as a process of reviewing verification artifacts (proofs, videos, diagrams) rather than just reviewing code changes.
- Focus on making the codebase 'pristine' to ensure agents copy best practices and avoid propagating technical debt or anti-patterns.

## Topics

AI Coding Agents, Software Architecture, Code Quality, Formal Verification, Build Automation, Software Testing, Grok Bot, Dune, TLA+, Lean, Pstack (Potato Stack)

Source: https://www.youtube.com/watch?v=O_zcc6Xl12g
