代理编码的经验教训:当代码成本低廉时,我们应该怎么做?
Lessons for Agentic Coding: What should we do when code is cheap?

原始链接: https://www.dbreunig.com/2026/05/04/10-lessons-for-agentic-coding.html

随着强大的人工智能编码代理的出现,“代码成本低廉”——这开启了令人兴奋的新可能性,但也需要开发实践的转变。本文概述了有效“代理编码”的十个经验教训,重点是最大化学习和长期价值。 主要收获包括:通过频繁重建和实验,优先考虑**通过实现来学习**;以及投资于强大的**端到端测试**,关注代码*做什么*,而非*如何做*。至关重要的是,**记录意图**并保持**规范与代码同步更新**,这对于持续进展至关重要。 不要回避**难题**——真正的价值在于那里——并**自动化简单任务**,以便专注于它们。培养强大的**技术品味**和领域专业知识,以有效指导代理。最后,请记住,虽然代码生成成本低廉,但**维护、安全和支持并非如此**。将代理代码视为“免费小狗”——令人愉快,但需要持续的照料。

一场 Hacker News 的讨论围绕着日益廉价的代码生成(通过人工智能)对软件开发格局的影响。用户们担心很多人错误地将廉价代码等同于廉价*工程*,导致不切实际的期望和对熟练工程师价值的潜在贬低。 一位来自印度的评论员指出,初级开发人员的招聘显著下降,尤其是在系统管理员、DevOps 和前端等职位上,认为这是因为人工智能减少了外包并自动化了传统上分配给初级职位的“杂务工作”。尽管如此,他个人在独立应用程序开发中找到了满足感。 其他人强调,如果过度依赖人工智能导致核心工程技能的丧失以及维护复杂系统的能力下降,未来可能会产生高昂的成本。一个名为“get-shit-done”的工具旨在通过在人工智能辅助开发期间强制进行更好的规划和上下文管理来缓解这种情况。
相关文章

原文

What should we do when code is cheap?

Lately, this blog has featured a lot of writing about agentic coding. Frontier models are really good at coding these days, much better than they are at other tasks. Coding with agents feels like a preview of the future, a playground for seeing how far we can push agent capabilities. It’s invigorating, rewarding, and deeply weird.

I’ve been keeping a running list of tips for agentic coding: guidelines or rules one might give to someone just getting started with Codex, Claude Code, Pi, or any other agent. Ideally each tip is generalizable guidance, relevant to any agentic programming. I’m also looking for durable lessons that will stick around as models and harnesses improve.

Below is my current list: 10 Lessons for Agentic Coding. Ten’s a nice round number; a good time to put this out there.

To be clear: I take credit only for honing and compiling these guidelines. As Kshetrajna Raghavan said to me today, “It’s crazy how we’re all converging on similar lessons.”

(If you think I’ve missed anything below, please reach out!)


10 Lessons for Agentic Coding

  1. Implement to learn. You can go far with Spec-Driven Development, but the act of writing code surfaces decisions you hadn’t considered and makes your spec better. When code is cheap, implement to learn.
  2. Rebuild often. Implement early and often to learn more. Fork and recode crazy thought experiments. Find out how far you can take feature. Of course, you want to iterate and compound your efforts, but cheap code means you can reconnoiter and reinvent in ways you never could.
  3. Invest in end-to-end tests. When we can reinvent our code cheaply, we should spend time writing tests that measure our product’s functions, not how it performs them. We want behavioral contracts that grant us the freedom to rebuild and reimplement.
  4. Document intent. Tests detail our goals while code encodes our methods, but neither captures the why. Your intent motivates your decisions, and persisting it alongside the code helps you and your agent compound those decisions in a consistent direction.
  5. Keep your specs in sync. Update your specs, the markdown files containing your goals and plans, as you advance your code and your tests. Treating your spec as a frozen artifact written before work begins, you’ll fail to capture learnings during implementation. Keeping it current lets it constantly inform your and your agents’ choices, and makes frequent rebuilds easier.
  6. Find the hard stuff. Work on a project long enough and things will stop being easy. You’ll speed through the boilerplate work, the obvious design decisions, and start hitting the ugly, difficult work: intuitive design, performance, security, resilience, and systemic architecture. Anyone can vibe the easy stuff. The hard work is where the value is. Find it and dig in.
  7. Automate everything that’s easy. To spend more time on the hard stuff, minimize the time you spend on easy things. Distill learnings into skills, build loops, automate code reviews, and let your tools compound. But careful: don’t get stuck in a Mystery House.
  8. Develop your taste. When code arrives fast but feedback doesn’t, the only source of feedback that keeps up is your own. The better you know your domain, your users, and their problems, the further you can go without checking in.
  9. Agents amplify experience. Talented developers underestimate how much intuition they bring to their prompts: the right terms, the right framing, and the right level of specificity. If you know your stack, you can save countless cycles during both implementation and debugging, and cut down needless agent exploration. Pair technical expertise coupled with great taste for an unbeatable advantage.
  10. Code is cheap, but maintenance, support, and security aren’t. Agentic code is “free as in puppies.” Support isn’t cheap and neither is security. Build fast, but mind the maintenance you’re adopting.

联系我们 contact @ memedata.com