Lauren Tan 提出让 Agent 写出更正确代码的起点是验证(verification):让 Agent 像真实用户一样运行并交互使用自己的产出,无论接口是 CLI、API 还是 UI。她建议让 Agent 产出视频或截图等工件,证明工作正确、符合意图且比通读整个 PR 更易审查;也可用 TLA+ 建模检查状态机 bug。她指出并非所有领域都易验证,验证只是近似手段,仍可能出错。
okay now that we're past that tired discussion, let's talk about how we get agents to write more correct code (note: this won't mean the code will be Good, but it should at least work)
this is the entrypoint into your most basic agentic loop: verification. it means giving your agent the ability to verify its own work, most commonly by actually running and interacting with it like a real user would. whether your interface is a cli/api/ui/whatever, you want to start here so that your agents can close the loop. if you want you can even have your agents model the problem in TLA+ and attempt to verify if you have things like state machine bugs.
the point is to give yourself confidence in the agents' work by them producing some kind of artifact that proves that 1) that the work is correct, 2) that it matches what you intended, and 3) is easier to review than reading the whole PR. most commonly this would be a video and/or screenshots for UI work.
everything else like skill packs are really bonus and optional, all you need is a way for your agents to verify their own work to start using them more autonomously. some caveats are that not all domains can be verified easily yet, and that verification is just approximation and can still be wrong. it's no different than trusting that a human actually ran the code they wrote and trusting it
so start here!
pstack now includes 2 skills i recommend everyone use or copy: /create-verification-skill https://github.com/cursor/plugins/blob/main/pstack/skills/create-verification-skill/SKILL.md /maintain-verification-skill https://github.com/cursor/plugins/blob/main/pstack/skills/maintain-verification-skill/SKILL.md if you don't already have one, /create-verification-skill creates a skill that teaches your agent how to run, control, and debug your app. it also creates something i call the feature map: a map of all the features in your app and how to get to it and use it from a user's pov. it allows agents to navigate and use the app just like a real user which greatly increases its ability to verify its own work. but of course, this feature map goes out of date very quickly. run /maintain-verification-skill as a daily automation with cursor cloud agents. this skill will check your app for changes and keep your feature map up to date. having a strong verification skill will end up becoming critical infra for your team and become the foundation of boosting everyone's productivity and quality and also enable more interesting automations to be built. install https://cursor.com/marketplace/cursor/pstack and you'll get auto updates for my skills. enjoy!在 X 查看被引用的帖子
来源:lauren · x.com