Skip to content
View original post on X: laurenX· 44/100AI score44/100

Lauren Tan says codebases act as agent memory, so fix recurring agent mistakes with constraints

AISummary

Lauren Tan argues engineers can control AI-generated code slop by giving agents a way to verify their own work and treating the codebase as memory. She says every recurring agent mistake should become a lint rule, type constraint, or refactor that makes the anti-pattern impossible.

Post on XView on X
laurenVerified on X
@poteto

something that keeps bothering me is how some people see slop as something that is happening to them, like they're some kind of helpless bystander powerless to do anything about it

excuse me but you are a software engineer, you literally learned how to make sand think and make computers do your bidding?! and now you can't do anything about it? please

the 2 things you should know to cut through all the noise:

  1. you need to give your agent a way to verify its own work (i just posted about this so won't rehash)
  2. your codebase is memory

the 2nd is not new either, we have always had lint rules, compilers with good diagnostics and strong type systems, LSPs, etc to help us write better code. there is no difference when agents write the code instead, you just need more of them, and stronger ones.

forget rules and skills. you can add those later.

yes, your codebase is a form of memory to agents! agents love extending what already exists. so every nit and every annoyance you've ever seen, every mistake and bad pattern you observe from agents, needs to turn into a constraint, or the agents will just keep repeating those same mistakes like a virus in your code. then you keep observing and repeating this process until your codebase is locked down enough that even agents with little context can one shot a high quality PR.

an even better direction is to refactor/rewrite your code such that agent anti-patterns become categorically impossible. use type systems to your advantage, use libraries/frameworks that reduce the architectural search space, or heck, create your own framework like we did for grok bot and design high quality primitives and well thought out APIs

dax@thdxr
the slop conversation is so one sided, it's not just that you can produce more code you can also observe, debug, and refactor more code even if the code is slop you have such good tools to deal with it. even if you write code manually, it's still 100x easier to maintain it
View quoted post on X

Source: lauren · x.comPublished