Lauren Tan 呼吁删除代码注释,推荐 pstack /no-comments 技能
ban and delete most if not all code comments!
Lauren Tan 主张禁用并删除代码库中大部分甚至全部代码注释,因为 AI 智能体会复制已有内容,临时 workaround 注释会像杂草一样扩散,导致代码库充斥 hack 和过时注释。她推荐用 pstack 的 /no-comments 技能清除无用注释,同时保留解释浏览器怪癖等确有必要的注释,并从第一性原理出发解决 workaround。她还给出提示词示例:创建项目智能体,用 /poteto-mode 启动 /swarm 调用 /no-comments 找出可清理的注释,并输出哪些适合重构、哪些可直接删除的高层计划。
正文
当前显示原文,中文全文译文尚未就绪。
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