All Code Is Slop (Except Mine) — Lauren Tan, SpaceXSI — Transcript
Full transcript
- 0:01[music]
- 0:12>> All right. Um so again I'm my name is
- 0:16Potato. Uh I work on Grokbot at SpaceX
- 0:20SI.
- 0:21And can I just get a quick show of
- 0:22hands? How many of you have ever looked
- 0:25at code that somebody else wrote and you
- 0:27thought that's all slop.
- 0:31Well,
- 0:32I have too.
- 0:35But today I'm going to convince you that
- 0:36you can turn that slop into gold.
- 0:42Uh and so I did something crazy last
- 0:44month and I shipped 3,000 pull requests
- 0:47to production.
- 0:48Now before agents we never really cared
- 0:50about volume uh except for the outliers.
- 0:54And at my previous company we called
- 0:56these people coding machines. People
- 0:58like Brett Taylor who famously rewrote
- 1:00all of Google Maps uh in a weekend.
- 1:03Just an insanely productive engineer.
- 1:06Uh and well with agents anyone can now
- 1:08be a coding machine. And my thesis is
- 1:10that the job of the software engineer,
- 1:13the meta of being a software engineer is
- 1:15figuring out how to maintain or even
- 1:17improve the quality of your code while
- 1:20massively increasing your productivity.
- 1:23To get there some people like to call
- 1:25this a software factory. Uh but I like
- 1:27to keep it simple and I think of it as
- 1:30all about trust.
- 1:32Not blind trust but investing in your
- 1:35agents environment so you can trust that
- 1:37your agents are going to do the right
- 1:39thing.
- 1:40Now it takes quite a lot of effort to
- 1:43get there um and it took me six months
- 1:45to get to a point where I could ship
- 1:48thousands of pull requests, a lot of
- 1:49them in my sleep.
- 1:51But it's certainly possible and it will
- 1:53take you much less time than I did.
- 1:56So let's start by talking about how we
- 1:58move from a low trust
- 1:59to a high-trust one.
- 2:03So, this inverse pyramid is how I think
- 2:05about where to spend time on your
- 2:07agent's environment.
- 2:09The first two layers are deterministic,
- 2:12so using your code itself. So, things
- 2:14like good API design, architecture,
- 2:17refactoring, or using lint rules, type
- 2:20systems, compilers, or you know,
- 2:22different kinds of testing.
- 2:24And you can use both of these layers
- 2:26together to constrain what agents can do
- 2:28and force them to do the right thing by
- 2:30default.
- 2:32Verification, both runtime and formal,
- 2:35are great tools to layer on to find bugs
- 2:38and check properties and the invariance
- 2:40in your system that you want to hold
- 2:41true
- 2:42and also help you check whether or not
- 2:44the agent understood your goals and your
- 2:46intent.
- 2:48And then finally, you want to layer with
- 2:50a little bit of prose. So, things like
- 2:52rules, skills, agents.md, things that
- 2:56require judgment.
- 2:59But let's start with your codebase.
- 3:01Agents generate their outputs based on
- 3:03their inputs. And so the the quality of
- 3:06the input really matters, and it just so
- 3:07happens that your codebase is one of the
- 3:10largest inputs.
- 3:12So, whenever you're correcting your
- 3:13agent, think about how you can make that
- 3:15a deterministic check instead of adding
- 3:18another line to your rules or your
- 3:20agents.md because it's far more
- 3:22reproducible when it's in code and it
- 3:24lets you trust it more.
- 3:27And the analogy that I like to use is
- 3:29that your codebase is kind of like a
- 3:31garden.
- 3:32You know, code used to arrive a few pull
- 3:34requests at a time.
- 3:36And uh I remember going into work in
- 3:382024 and reviewing the three pull
- 3:41requests that my colleagues wrote
- 3:42colleagues wrote.
- 3:44And today, that number is more like 300.
- 3:47So, you know, every engineer is now a
- 3:49team of hundreds or even thousands of
- 3:52agents, and code is arriving so rapidly
- 3:55that it almost feels like a continuous
- 3:58stream, and it almost feels organic,
- 4:01like a living thing.
- 4:03And in this analogy, your codebase, the
- 4:06constraints that you impose, the
- 4:08guardrails that you put up are the
- 4:10concrete foundations that the new code
- 4:12that your agents write grow around, just
- 4:15like uh the building in this picture.
- 4:18And so in many ways, the job of being a
- 4:19software engineer is kind of becoming
- 4:21like gardening.
- 4:24Because code is the biggest input for
- 4:26agents, it means that any workarounds,
- 4:29um anti-patterns, deprecated code, tech
- 4:32debt, it's now likely to be just copied
- 4:35by the next agent since it looks like
- 4:37the established pattern in your
- 4:38codebase.
- 4:39And uh it's like you have some weeds or
- 4:43pests growing in your garden, and then
- 4:45they spread everywhere before you know
- 4:47it.
- 4:51So you want to make your codebase as
- 4:53pristine as possible so that agents are
- 4:55always copying the good stuff.
- 4:58All right, let's look at some real
- 4:59examples.
- 5:00Uh so Dune is a client framework that we
- 5:02created for Graph Bot to implement this
- 5:05idea for organic architecture.
- 5:08It's not really that interesting
- 5:09technically. Uh you can kind of think of
- 5:11Dune as um kind of like Next.js for
- 5:14Electron apps.
- 5:15But the interesting part of Dune is that
- 5:17it has a lot of constraints and lint
- 5:19rules that we've encoded uh a lot of the
- 5:21lessons that we've learned building
- 5:23desktop applications.
- 5:26And one such lesson is that anything
- 5:28that requires nuance to use well often
- 5:31leads to slop.
- 5:33Uh you know your classic example is uh
- 5:35you know use effect in React, right? It
- 5:37has its use cases, uh but it's often
- 5:40misused. You know some people joke that
- 5:42you need a PhD to use use effect.
- 5:45Um and in in other words, it really
- 5:46requires a lot of nuance to use well.
- 5:50And agents are not good at using it.
- 5:52Um so our solution has been to just ban
- 5:55it in product code, and it's really only
- 5:58allowed in some places inside of Dune
- 6:00APIs.
- 6:02And effectively, this problem has now
- 6:04been categorically eliminated, and we
- 6:06never need to catch that during code
- 6:08review again.
- 6:10Another interesting pattern that we use
- 6:12is context through directory structure.
- 6:15Uh so one anti-pattern that we saw with
- 6:17Cursor, which is an Electron app, is
- 6:19that agents would often
- 6:21import main thread code into the
- 6:23renderer thread, which would cause long
- 6:25tasks and jank.
- 6:28So in uh Gulp bot and in Dunanaps, we've
- 6:30made this very very conventional.
- 6:33Uh we have these two top-level
- 6:34directories literally called Electron
- 6:36renderer and Electron main,
- 6:38and imports between them are forbidden
- 6:41or banned by our dependency graph
- 6:43analyzer and some lint rules.
- 6:46And again, you know, these are simple
- 6:47lint rules to set up, but it means one
- 6:50less thing that we need to review and
- 6:52think about uh
- 6:53you know, during code review.
- 6:56And then
- 6:57one more surprising thing that I've seen
- 6:59is agents using Markdown. So things like
- 7:02documentation, uh code comments, rules
- 7:05or skills, and they use this as a place
- 7:08to write down their justifications for
- 7:10not doing the right thing. Or I don't
- 7:13know if you've ever seen this, but
- 7:14they'll over rotate on some small
- 7:16correction that you made, and they treat
- 7:17it like a hard rule that can never be
- 7:19broken ever again.
- 7:22And here's another example from Cursor.
- 7:25So agents really loved using imperative
- 7:27timers, so things like set timeout,
- 7:29request animation frame, request idle
- 7:31callback. And they were using these as
- 7:33quick fixes because
- 7:35they were really patching over an
- 7:37architecture clash between
- 7:39uh VS Code's imperative style and
- 7:41React's declarative style.
- 7:44So our choice of architecture actually
- 7:46made both the client and the agent
- 7:49performance much worse.
- 7:51And if you've ever done any performance
- 7:52work in JavaScript, you'll know that
- 7:54when you have tons of timers being
- 7:56rapidly created and destroyed, causes a
- 7:58lot of uh major garbage collection,
- 8:00which causes a lot of lag and jank.
- 8:03Uh but the worst part is that agents
- 8:05wrote a a of code comments, like you can
- 8:07see in red here, explaining why this
- 8:09quick fix was justified.
- 8:12And before you know it, we had timers
- 8:14spreading everywhere and the you know
- 8:16the performance of the app really
- 8:17suffered.
- 8:20Now in Grabot, uh we learned our lesson
- 8:22there and we decided to just ban 99% of
- 8:25comments
- 8:26uh because they go stale easily. Uh you
- 8:29know humans just really don't bother
- 8:31reading the comment slot anyway.
- 8:33And again it gives an agent the an
- 8:35escape hatch to justify not doing the
- 8:38right thing because it's hard.
- 8:41Um and the worst part about comments
- 8:43though is that they're not enforceable.
- 8:45So what seems well intentioned, you know
- 8:47like I'm going to tell the the next
- 8:49agent not to do something,
- 8:51never ends up actually being anything
- 8:52that you can trust.
- 8:54So
- 8:56in Grabot and Dune and in Dune uh we now
- 8:58have lint rules that give uh
- 9:01good and very helpful error messages
- 9:02telling the agent to fix the root cause,
- 9:05the real problem uh rather than just
- 9:08patch around it.
- 9:10And so our general principle is that
- 9:12every time we correct our agents, it
- 9:13turns into one of these deterministic
- 9:15checks or we think about how to
- 9:17categorically eliminate that problem in
- 9:19the code through better API design,
- 9:21through better architecture.
- 9:23And if you do this enough times, you'll
- 9:26find that you have just less things to
- 9:28look out for in code review.
- 9:30And at some point you'll realize there's
- 9:32there's nothing left to review.
- 9:34And you can just let agents merge their
- 9:36most of their own pull requests.
- 9:40All right. Uh moving on, verification is
- 9:43also a really big part of how we make
- 9:45our agent more autonomous and also
- 9:47increase our confidence and trust in
- 9:49their work.
- 9:50And our code review process has now
- 9:52really shrunk into looking at
- 9:54verification artifacts instead. So
- 9:56things like videos, screenshots,
- 9:58diagrams, formal verification.
- 10:02Um and the most basic example of this is
- 10:04runtime verification
- 10:06uh which is just a fancy way of saying
- 10:07giving your agent a way to run the code
- 10:09for itself and use debugging tools that,
- 10:12you know, human developers use as well,
- 10:14like the Chrome DevTools protocol.
- 10:16Um, in our runtime verification skills,
- 10:18we have this thing that we call a
- 10:20feature map.
- 10:21And that's basically kind of like a site
- 10:23map of all of the features that are
- 10:25available in your application from the
- 10:27user's point of view.
- 10:29And so with this, agents don't need to
- 10:30guess when you say, you know, the thingy
- 10:33in the left sidebar, it gives you some
- 10:35shared vocabulary.
- 10:37And we also make use of custom CLIs
- 10:39inside these skills so that agents can
- 10:42reuse the the CLI and the driver every
- 10:45time, which cuts down on token usage and
- 10:47is also testable.
- 10:50Um, and then recently we've also started
- 10:52looking at formal verification.
- 10:54Uh, so we now use TLA Plus to do some
- 10:56model checking of major user flows such
- 10:59as notifications across multiple devices
- 11:01and platforms.
- 11:03Uh, we use a lean as well for proving
- 11:04certain algorithms.
- 11:06Uh, for example, we have our own we
- 11:08wrote our own custom virtualization
- 11:09library and we use lean there to check
- 11:12that we don't have, you know, flickering
- 11:14or jittering problems.
- 11:16Um, and we're still experimenting with
- 11:17this approach overall. It seems very
- 11:19promising. Uh, we've already found quite
- 11:21a few bugs with formal verification.
- 11:25Uh, but it's certainly not a silver
- 11:26bullet and we're treating it as another
- 11:30tool, another layer in our agents'
- 11:33environment.
- 11:35Uh, and then this is a very fast video,
- 11:37but another thing that we just started
- 11:39looking at is property-based testing as
- 11:41well for UIs.
- 11:43Uh, so we use this library called
- 11:44Bombadil.
- 11:45Um, and this has also caught a few UI
- 11:47bugs for us already.
- 11:52Okay, so zooming out, I saw this tweet
- 11:53from Cindy and 6 months ago she she said
- 11:56that she was
- 11:57oh, she was talking about not being able
- 11:59to trust her agents because of subtle
- 12:01bugs that were getting merged.
- 12:05And really what was missing for her in
- 12:06being able to trust her agents was the
- 12:08verification process. And now, 6 months
- 12:11later, she says that 70% of her daily
- 12:13tokens go into verification. And I'd say
- 12:16that that tracks with what I see as
- 12:18well, that most of my token usage goes
- 12:20to verification.
- 12:22And if you really look closely at her
- 12:23process, none of these things here are
- 12:26new or novel techniques that we've never
- 12:28had before.
- 12:30These are just good software engineering
- 12:32tools, but ones that might have been
- 12:34prohibitively expensive to use before as
- 12:37they were hard to understand or write or
- 12:39maintain.
- 12:40But
- 12:41agents drastically cut this cost down.
- 12:43And really, we are entering a golden age
- 12:45of software testing and verification
- 12:47because agents let us test everything to
- 12:50a much greater degree than used to be
- 12:52economical.
- 12:55And then formal verification can also
- 12:56help you better reason about how your
- 12:58product should work and whether your
- 12:59agents really understand your intent and
- 13:01goals.
- 13:02Uh I made this new skill called state
- 13:04chart uh in my plugin P stack, potato
- 13:07stack, uh which helps you visualize
- 13:09state machines from uh
- 13:11from the user's point of view.
- 13:13Uh and it's I find this much easier to
- 13:14review alongside the videos and
- 13:16screenshots that we provide.
- 13:18Um and so that's been great.
- 13:21Sorry for the flashback.
- 13:22Uh okay, now let's look at what the
- 13:25promised land looks like. What do you
- 13:27get in return for all of this uh you
- 13:29know investment?
- 13:32So on the Growth Bot team, our velocity
- 13:34is uh taking off and rapidly increasing.
- 13:37And last month, our team shipped
- 13:40a ridiculous 11,000 pull requests to
- 13:43production,
- 13:44which is a wild number.
- 13:45And our pace of releasing the client has
- 13:48also increased. And we cut a new stable
- 13:50version about once a day.
- 13:54And then the core team is also shipping
- 13:55much more. And we also have uh a lot
- 13:58more casual or drive-by contributors who
- 14:01don't always have a lot of context,
- 14:04uh but they're also contributing. Um and
- 14:06in October, we had about 227 people who
- 14:10contributed at least one pull request.
- 14:15So So this velocity accelerating, you
- 14:16might be thinking to yourself like isn't
- 14:18this going to be chaos? You know, isn't
- 14:19this going to be a bunch of slop?
- 14:21But actually, the number of PRs that get
- 14:23reverted has actually gotten lower on a
- 14:25relative basis and is steady at about
- 14:27half a percent.
- 14:30But I think the really interesting thing
- 14:32about this shipping pace and this volume
- 14:34of pull requests
- 14:36is that the performance of Graph Bot has
- 14:39stayed not just stable, but has improved
- 14:41on multiple dimensions compared to when
- 14:43we launched. So startup, typing, opening
- 14:46new chats, switching chats, all of this
- 14:49has gotten faster.
- 14:51And keep in mind, Graph Bot is still an
- 14:53Electron app
- 14:55for now.
- 14:56So there is a ceiling, right? But it's
- 14:58already much faster than many other
- 15:00agent UIs out there.
- 15:02And for an Electron app with this high
- 15:05velocity and this many people
- 15:07contributing,
- 15:08I'd say that's pretty good.
- 15:11So before you jump into building out a
- 15:13software factory and you know,
- 15:14automating everything that you can,
- 15:17whenever you correct your agent, try and
- 15:18do it by improving your codebase first.
- 15:21You know, start with a lint rule to
- 15:22prevent new occurrences of anti-patterns
- 15:25and then clean up those old patterns as
- 15:27well.
- 15:28And then make sure that your
- 15:29verification story is really strong.
- 15:33A lot of this work is a prerequisite to
- 15:35automation anyway. And if your inner
- 15:37coding loop produces slop, then
- 15:40automating that loop just produces more
- 15:42slop and you need to throw more and more
- 15:44and more tokens at the problem, which we
- 15:46all know is very expensive.
- 15:49And once you meet these investments
- 15:51into, you know, code into your codebase,
- 15:53static analysis, runtime informal
- 15:55verification,
- 15:56you'll start to find that many things
- 15:58become possible with these foundations
- 16:01and that you can really easily build
- 16:02your own factory on top of these
- 16:04foundations.
- 16:07And when you're ready, Graph Bot is a
- 16:08great way to build that outer loop. We
- 16:11have tons of connectors, routines that
- 16:12can kick off cursor, cloud agents, and
- 16:15projects
- 16:16uh which let you orchestrate thousands
- 16:17of uh hundreds or even thousands of
- 16:19agents.
- 16:21And as a quick example, you know,
- 16:22whenever we cut a new release now,
- 16:24Grokbot will automatically spin up a new
- 16:26cursor project for us that will fuzz the
- 16:29entire application, the entire build,
- 16:31and it will find bugs uh by running the
- 16:33app and using it like a real user.
- 16:35And then it's going to open fixed PRs
- 16:38for each of those bugs that it finds and
- 16:39it's going to auto merge it as uh
- 16:42crazy as that sounds. And that's because
- 16:44our codebase is good enough that pull
- 16:46requests tend to just be good by default
- 16:49and most product code that we land no
- 16:51longer really requires deep human
- 16:53review.
- 16:56So
- 16:57when you have solid foundations and good
- 16:59organic architecture, you can turn slop
- 17:02into gold and you can ship with high
- 17:04quality uh
- 17:06high velocity without compromising on
- 17:08quality.
- 17:09My name is Potato, also known as Lauren.
- 17:11Thanks to you again for listening to my
- 17:13talk.
- 17:14>> [applause]
About this transcript
This page contains the full transcript of All Code Is Slop (Except Mine) — Lauren Tan, SpaceXSI by AI Engineer, generated from the public captions YouTube serves with the video. The transcript has 2,848 words across 470 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.