智能体写代码时,小批量提交依然重要
Small batches still matter when agents write the code
有团队尝试把 pull request 限制在 500 行以内却屡屡失败,因为智能体不会疲倦,会一直写到功能看起来完成为止。作者仍建议把大改动拆成可独立评审和部署的小块,最简单的方式是让智能体把计划写进 Markdown 文件并持续更新,每次改动用新的智能体会话读取并更新该计划。
Spoke with a team this week who told me they try to cap pull requests at 500 lines and keep failing.
The cap is there to stop people throwing slop grenades with 10k lines of code at each other. Agents never get tired. They keep going until the feature looks complete. Before AI, some people worked the same way, spending days or weeks in a branch and only asking for review when they felt done.
Continuous Delivery taught us to ship in small batches for two reasons: so a human can understand each change, and so we can roll it back quickly when something breaks. Agents writing the code doesn’t change the fact that people need to understand the systems they’re responsible for.
So I still recommend splitting large changes into chunks that can be reviewed and deployed on their own. The simplest way today is to have the agent write a plan in a Markdown file and keep it updated as it goes. Then each change gets a fresh agent session that reads the plan at the start and updates it at the end.
The best unit of work is still what fits inside our head.
来源:Hacker News · markoanastasov.com