
poteto@poteto
這場關於怎麼為 agent 改進程式庫的演講裡,乾貨和金句太多了 • agent 靠回饋成長,而型別是最好的回饋之一 • 用型別讓非法狀態無法表示,這樣就能在整個程式庫裡強制執行全域規則 • 屬性測試、fuzzing,甚至全系統確定性模擬測試 • expect 測試:直接把東西印出來,在測試裡捕捉。讓行為變得可讀。這跟編譯器的 fixture 測試很像,能縮小需要 review 的範圍 • 形式化方法過去非常昂貴:seL4 大約有 8,700 行 C 程式碼,花了約 25 人年,每行 C 程式碼對應 23 行證明,但 agent 改變了 ROI
so many gems and great tips in this talk from @yminsky about how to improve your codebase for agents
• agents thrive on feedback, and types are one of the best kinds
• make illegal states unrepresentable with types, and it enforces global rules across your codebase
• property based tests, fuzzing, and even full-system deterministic simulation testing
• expect tests: just print stuff out and capture it in the test. makes behavior legible. it's very similar to how compilers have fixture tests, it reduces the review surface area
• formal methods used to be very expensive: seL4 is about 8,700 lines of C and took around 25 person-years, with 23 lines of proof for every line of C code, but agents change the roi
https://www.youtube.com/watch?v=rUYP4C29yCw