Lauren Tan 转发用 /poteto-mode 提示词整治代码库的做法
Lauren Tan 转发 @RayFernando1337 分享的一份代码库整治提示词,建议用 /poteto-mode 让 Agent 读 git log、历史 bug 修复和 review 评论,找出反复出现的错误并从架构、类型、lint 到测试逐层把问题变得不可能再发生。其他要点包括删除复述代码的注释、对并发和重试等真实 bug 写形式化模型并放进 CI、每步提交一个可验证 PR 并先证明检查能捕获真实历史错误。
it’s a good day to do some gardening of your codebase!
在 X 查看被引用的帖子Sharing my pstack NSWF prompt. Your repo will never be the same...in a good way of course:
Use /poteto-mode on this repo. First, find the mistakes agents and humans keep repeating here: read the git log, past bug fixes and review comments. Then make each one impossible instead of documenting it. Try architecture first, then types, then a lint whose error names the fix, then a test. Delete comments that restate code, and encode the constraint behind any comment that matters (/no-comments). Where concurrency, retries or state machines cause real bugs, write a formal model that replays a past bug and fails on it (/create-formal-verification-skill), and run it in CI. Replace unit tests that pin implementation with those models plus real DB and e2e tests, but keep every test that guards security or legal behavior. Ship one verifiable PR per step, and prove each check catches a real past mistake before you trust it.
来源:lauren · x.com