跳到正文
原文
Drew Breunig· Drew Breunig·· 2026/05/05AI 评分62

Agentic Coding 的 10 条经验

原文标题:10 Lessons for Agentic Coding

AI 导读

Drew Breunig 整理出 agentic coding 的 10 条经验,面向刚上手 Codex、Claude Code、Pi 等智能体的人。他主张代码变便宜后应通过实现来学习、频繁重建,把投入放在端到端测试、记录意图和保持 spec 同步上,并自动化简单工作、把精力留给设计、性能、安全等难的部分。他强调代码便宜但维护、支持和安全并不便宜,智能体也会放大开发者已有的经验与品味。

正文

当前语言的正文正在等待翻译,暂时显示原文。

What should we do when code is cheap?

Illustration for the section “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.

来源:Drew Breunig · dbreunig.com