Claude Code 的构建哲学——一个关于"做减法"的产品故事。从 AppleScript 音乐控制到年营收 $500M+,Anthropic 创始工程师揭示了一系列反直觉的构建原则。
Claude Code 的成功不在于写了多少代码,而在于尽可能少写代码——让模型的原始能力直达用户。
行业在拼命造更好的 AI 模型时,Anthropic 发现:模型的能力早已溢出,真正的瓶颈是包裹它的产品层。他们称之为 "Product Overhang"。
一个偶然发现如何变成 $500M+ 产品
2024 年 9 月,Boris Cherny 加入 Anthropic,为了熟悉 API 开始在终端里做各种原型。第一个版本极其简陋——不能读文件,不能运行命令,唯一能做的是通过 AppleScript 告诉他正在听什么音乐。
转折来自一个简单的决定:给它访问文件系统的能力。
I tried giving it some tools to interact with the filesystem… Suddenly, this agent was really interesting. I ran it in our codebase, and just started asking questions. Claude then started exploring the filesystem and reading files. It would read one file, look at the imports, then read the files that were defined in the imports! It went on, until it found a good answer.
Boris 开始每天在工作中使用这个原型,两个月后(2024 年 11 月)发布了内部 dogfooding 版本。
选技术栈的新标准:AI 擅长什么比人擅长什么更重要
Claude Code 的技术栈:TypeScript + React (Ink) + Yoga + Bun。选择标准从"团队熟悉什么"变成了"模型在什么技术上已经很强"。
We wanted a tech stack which we didn't need to teach: one where Claude Code could build itself. And it's working great; around 90% of Claude Code is written with Claude Code.
90% 自构建不是花哨的营销数字——它直接影响了开发速度:每位工程师每天约 5 个 PR,每天 60-100 次内部发布,每天 1 次外部发布。
最反直觉的工程决策——一个随时间变简单的产品
Claude Code 做了很多复杂的事:遍历代码库、读写文件、运行命令。但它的架构出奇简单——只是模型外面裹了一层极薄的壳。
This might sound weird, but the way we build this is we want people to feel the model as raw as possible. We have this belief the model can do much more than products today enable it to do.
When you look at a lot of coding products, they get in the way of the model; they add scaffolding by adding UI elements and other parts that clutter things, so that the model running in those tools feels like it's hobbling on one foot.
软件通常随时间积累复杂度。Claude Code 恰好相反:每次模型升级,他们删除代码。
Every time there's a new model release, we delete a bunch of code. For example, with the 4.0 models, we deleted around half the system prompt because we no longer needed it. We try to put as little code as possible around the model, and this includes minimizing prompting and minimizing the number of tools. We constantly delete tools and experiment with new ones.
是否在 Docker 容器或云端沙箱中运行?团队选了最简单的方案:直接本地运行。读写文件系统,执行 bash 命令,没有虚拟化层。
With every design decision, we almost always pick the simplest possible option. What are the simplest answers to the questions: "where do you run batch commands?" and "where do you read from the filesystem?" It's to do it locally.
Claude Code 中最复杂的部分是什么?不是代码生成,不是文件遍历——是权限系统。
本地运行意味着 agent 可能做不可逆的事(删文件等)。团队设计了一个简单但多层的权限系统:执行操作前请求许可,用户可以一次性授权、永久授权或拒绝。设置可以按项目、用户、公司三级配置,团队间可共享白名单。
AI 如何改变设计探索的经济学
Boris 在两天内为 Todo List 功能做了约 20 个原型。以前两天能做两个原型就算快了。每个原型的迭代循环:
注意有多少方案被丢弃了。药丸按钮、抽屉动画、内联显示——每个都是可行的设计,但都不够"对"。传统流程中,每个方案可能花一天实现,根本不舍得扔;用 AI 迭代,丢弃成本趋近于零。
团队翻倍,产出不降反升 67%
Brooks' Law(《人月神话》,1975):向延期的项目增加人手只会让它更延期。原因:新人需要 onboarding,老人花时间带人,沟通成本 O(n²) 增长。
Anthropic 的工程团队在采用 Claude Code 的同时人数翻倍。按 Brooks' Law,人均 PR 产出应该下降。
核心转变:围绕 AI 重新设计整个工程流程
文章揭示了 Anthropic 内部工程文化的几个特征,可能预示了 AI-first 团队的未来形态:
AI agent 擅长写代码但不擅长自我验证。TDD 提供了客观的正确性标准——先写测试,让 agent 对着测试写实现。在 AI 时代,这成了纯粹的实用约束。
让 AI agent 执行代码审查和测试。人类工程师聚焦在 agent 无法判断的部分:架构决策、产品方向、边界情况。
高频发布(每天 60-100 次内部发布)要求极简的发布流程。Feature flag 的使用是谨慎的——因为它们增加了代码路径的复杂度,而团队的首要原则是简化。
自动化 incident 响应。当系统出问题时,agent 可以参与诊断和修复流程——因为它已经能遍历代码库和运行命令。
从 Claude Code 的构建中提炼出的范式转移
Claude Code 的故事揭示了一个正在发生的范式转移:AI 产品的核心竞争力在于"挡在模型和用户之间的东西有多少能删掉"。最好的 AI 产品,是让你感觉不到产品存在的那一个。