xAI 工程师建议删除代码注释,推出 /no-comments 技能
xAI 工程师建议删除代码注释,推 /no-comments 技能
xAI 工程师 Lauren Tan 建议删除代码库中大部分甚至全部注释,理由是智能体倾向于复制已有内容,一条看似无害的临时绕过注释会像杂草一样扩散,最终让代码库充斥 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
来源:Lauren Tan · x.com