Glean 拾遗
Daily /2026-05-28 / Andrej Karpathy wrote something that every Claude Code user has felt b

Andrej Karpathy wrote something that every Claude Code user has felt b

Source x.com Glean’d 2026-05-28 09:24 Read 2 min
AI summary

Andrej Karpathy's three observations about LLM behavior—making silent assumptions, overcomplicating code, and performing careless side effects—inspired a single CLAUDE.md file with four principles: think before coding, prioritize simplicity, make surgical changes, and execute goal-driven. Each principle directly addresses a specific pain point. The file is ready to drop into any project to guide AI coding assistants toward more disciplined output. For every Claude Code user who has experienced these issues but struggled to articulate them.

Original · 2 min
x.com ↗
§ 1

Andrej Karpathy wrote something that every Claude Code user has felt but couldn't articulate.

Three quotes. Read them slowly.

"The models make wrong assumptions on your behalf and just run along with them without checking. They don't manage their confusion, don't seek clarifications, don't surface inconsistencies, don't present tradeoffs, don't push back when they should."

"They really like to overcomplicate code and APIs, bloat abstractions, don't clean up dead code... implement a bloated construction over 1000 lines when 100 would do."

"They still sometimes change/remove comments and code they don't sufficiently understand as side effects, even if orthogonal to the task."

You've seen all three. Probably this week.

Andrej Karpathy写了每个Claude Code用户都感受到但无法表达的事。

三句引用。慢慢读。

"模型会代表你做出错误假设,然后不加检查地继续执行。它们不管理自己的困惑,不寻求澄清,不暴露不一致,不呈现权衡,不在该拒绝时拒绝。"

"它们非常喜欢过度复杂化代码和API,膨胀抽象,不清理死代码……本可以用100行搞定,却写了1000行臃肿的结构。"

"它们有时仍会修改/删除它们并未充分理解的注释和代码,作为副作用,哪怕与任务无关。"

这三个场景你都见过。可能就在本周。

§ 2

Someone turned these three observations into a single CLAUDE[.]md file. Four principles, one install, directly addresses each quote:

有人将这三点观察转化为了一个单一的CLAUDE[.]md文件。四条原则,一次安装,直接回应每句引用:

§ 3

1./ Think before coding Don't assume. Don't hide confusion. State ambiguity explicitly. Present multiple interpretations rather than silently picking one. Push back if a simpler approach exists. Stop and ask rather than guess.

1./ 编码前先思考 不要假设。不要隐藏困惑。明确陈述模糊之处。呈现多种解读,而非无声地选一种。若有更简单的方案就反对。宁可停下来提问,也不要猜测。

§ 4

2./ Simplicity first No features beyond what was asked. No abstractions for single-use code. No "flexibility" that wasn't requested. No error handling for impossible scenarios. The test: would a senior engineer say this is overcomplicated? If yes, rewrite it.

2./ 简单至上 不添加需求之外的功能。不为一次性代码创建抽象。不提供未被要求的“灵活性”。不为不可能的场景加错误处理。测试标准:一位资深工程师会认为这过度复杂吗?如果是,重写。

§ 5

3./ Surgical changes Don't "improve" adjacent code. Don't refactor things that aren't broken. Match the existing style even if you'd do it differently. If you notice unrelated dead code, mention it, don't delete it. Every changed line should trace directly to the request.

3./ 手术式修改 不要“改进”相邻代码。不要重构没坏的东西。即使你有不同做法,也要匹配现有风格。如果发现无关的死代码,提出来,不要删除它。每一行改动都应直接追溯到需求。

§ 6

4./ Goal-driven execution Transform "fix the bug" into "write a test that reproduces it, then make it pass." Transform "add validation" into "write tests for invalid inputs, then make them pass." Give it success criteria and watch it loop until done.

This last one is Karpathy's key insight captured directly: "LLMs are exceptionally good at looping until they meet specific goals... Don't tell it what to do, give it success criteria and watch it go."

It's a single file. Drop it into any project.

4./ 目标驱动执行 将“修复错误”转化为“写一个能复现的测试,然后让它通过”。将“添加验证”转化为“为无效输入编写测试,然后让它们通过”。给它成功标准,看它循环直到完成。

这最后一条正是卡帕西的关键洞见:“LLM极其擅长循环,直到达成特定目标……不要告诉它做什么,给它成功标准,看它施展。”

单一文件。拖入任何项目即可。

§ 7

Open source ↗