← 回到動態
poteto@poteto

註解是沒有結構、也沒辦法強制執行的文字。agent 確實會讀註解,但它們常常被無視、會過時,還會給你的 agent 留一個後門,讓它去貼 OK 繃、搞 hack 或繞路,而不是好好解決。 用這個提示詞審查一下你的程式註解,找找能靠更強的型別、更好的 API 設計來改進程式碼的地方,再加上 lint 規則,這樣就不需要那些註解了!

comments are unstructured and unenforceable text. agents do read them but they are often ignored, go out of date, and gives your agent an escape hatch to do a bandaid, hack or a workaround instead. use this prompt to audit your code comments to find opportunities to improve your code through stronger types, better API design, and create lint rules so the comments aren’t necessary! https://x.com/poteto/status/2110149626133438732?s=46&t=HFNOJ7P2JmfjDfKskFwLUw
動態
poteto
註解是沒有結構、也沒辦法強制執行的文字。agent 確實會讀註解,但它們常常被無視、會過時,還會給你的 agent 留一個後門,讓它去貼 OK 繃、搞 hack 或繞路,而不是好好解決。 用這個提示詞審查一下你的程式註解,找找能靠更強的型別、更好的 API 設計來改進程式碼的地方,再加上 lint 規則,這樣就不需要那些註解了!
← 回到動態