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

Lauren Tan 建议删除代码库中大部分注释,因为 AI 智能体倾向复制已有内容,一条看似无害的临时绕过方案注释会像杂草般迅速蔓延,让代码库充斥 hack 和过时注释。

正文

ban and delete most if not all code comments!

agents love copying what already exists. a seemingly harmless comment explaining some temporary workaround is one of the worst viruses you can have in your codebase. like a weed it'll spread quickly as a tool for agents to quickly get their job done. before you know it, your codebase is overrun with hacks and stale comments. just one more workaround bro

you can use pstack's /no-comments skill as a weedkiller. it'll seek out useless comments while keeping the ones that actually should exist (like explaining a browser quirk), and figure out how to solve them on a first principles basis

here's a prompt you can try asking @bot:

create a project agent that uses /poteto-mode to spawn a /swarm to use /no-comments and identify useless code comments we can prune in my repo. come back with a high level plan of which of these workarounds would be best solved by refactoring and which we can straight up delete

https://x.ai/bot/plugin/9717366

来源:lauren · x.com