跳到正文
lauren· @poteto · X·· 1 小时前AI 评分52
AI 导读

Lauren Tan 回应 AI 生成 slop 代码的争论,认为工程师并非无能为力。她提出两个要点:给 agent 提供验证自身工作的方式,以及把代码库当作 agent 的记忆,将观察到的错误模式逐步转成约束,并通过类型系统、缩小架构选择空间或自建框架(如其为 grok bot 打造的框架)重构代码,让 agent 反模式在结构上不可能出现。

正文

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
在 X 查看被引用的帖子

来源:lauren · x.com