
poteto@poteto
のこの講演、エージェントのためにコードベースを良くするコツが本当にたくさん詰まってる • エージェントはフィードバックで育つ。型はその最良のひとつ • 型で不正な状態を表現できなくすれば、コードベース全体にグローバルなルールを強制できる • プロパティベーステスト、ファジング、さらにはシステム全体の決定論的シミュレーションテスト • expect テスト:とにかく出力をプリントしてテストにキャプチャする。挙動が読めるようになる。コンパイラのフィクスチャテストとすごく似てて、レビューの範囲が小さくなる • 形式手法は昔はすごく高コストだった:seL4 は約 8,700 行の C で 25 人年くらい、C の 1 行につき 23 行の証明。でもエージェントが 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