# The Karpathy rules are the kind of thing you'd write at the top of a team style guide. Here is the ... Canonical URL: https://www.traeai.com/articles/32fa254d-e357-46b5-bbb2-8f2135a96c37 Original source: https://x.com/augmentcode/status/2050250463422066801 Source name: Augment Code(@augmentcode) Content type: tweet Language: 中文 Score: 7.8 Reading time: 2 分钟 Published: 2026-05-01T16:26:16+00:00 Tags: 软件工程, 编程规范, 团队协作, 工程文化 ## Summary 文章提炼了广受关注的‘Karpathy规则’:强调编码前思考、极简主义设计、精准修改和目标驱动执行,适合作为工程团队风格指南的核心原则。 ## Key Takeaways - 编码前必须明确假设、权衡与问题边界,避免盲目实现 - 拒绝推测性功能和一次性抽象,坚持用最少代码解决当前问题 - 修改应精准隔离、风格一致,杜绝连带重构 ## Outline - 引言 — 指出Karpathy规则是高成熟度工程团队风格指南的理想开篇。 - 规则一:Think before coding — 强调在写代码前需显式陈述假设、暴露权衡、主动提问。 - 规则二:Simplicity first — 要求拒绝 speculative features 和 single-use abstractions,追求最小可行代码。 - 规则三:Surgical changes — 修改须严格限定范围,匹配既有风格,禁止顺手重构。 - 规则四:Goal-driven execution — 定义可验证的成功标准,并持续迭代直至达成。 ## Highlights - > Think before coding: state assumptions, surface tradeoffs, ask if unclear — 第 1 条规则 - > Simplicity first: no speculative features, no single-use abstractions, minimum code — 第 2 条规则 - > Surgical changes: don't touch adjacent code, match existing style, no drive-by refactors — 第 3 条规则 - > Goal-driven execution: define verifiable success criteria, loop until met — 第 4 条规则 ## Citation Guidance When citing this item, prefer the canonical traeai article URL for the AI-readable summary and include the original source URL when discussing the underlying source material.