OpenCode 的 AGENTS.md 成了 agent 提示词范本
OpenCode 的 AGENTS.md 值得拥有,专治 Codex 的过度设计,茫茫多的防御性代码,一坨坨几乎根本不会发生的极端边界。
不仅仅是这一点,整个文件的内容都值得一看 ,style guide 一节写的很好,我已经用于我大部分 agent 的默认提示词了
“Before adding complexity for a speculative or vanishingly unlikely race or security edge case, explain the concrete failure mode, likelihood, and complexity cost to the user and get their buy-in. Do not silently expand scope for theoretical robustness.”
让 AI 翻译一下:
“在为推测性的、或者几乎不可能发生的竞态条件/安全边界情况增加复杂度之前,先向用户讲清楚:具体会出什么问题、发生的概率有多大、以及增加这些复杂度的成本,并得到用户的明确同意。不要为了理论上的健壮性,就悄悄把范围扩大。”
非常贴切