Summary

A Chinese-language distillation of 12 engineering rules for CLAUDE.md that reduce Claude’s error rate from 41% (no rules) to 3% (12 rules). The claim, attributed to Karpathy, is that 90% of Claude errors come from missing context, not model weakness. Rules cover: think before coding, simplicity first, surgical edits, goal-driven execution, use model only for judgment tasks, token budgets, expose conflicts, read before write, test intent not behavior, checkpoints, match conventions, and fail loudly.

這篇文章將12條 CLAUDE.md 規則整理成工程師實踐指南,核心主張是「90% 的 Claude 錯誤來自上下文缺失」。無規則時錯誤率 41%,4 條基礎規則降至 11%,12 條規則降至 3%。文章強調紀律永遠比框架重要,CLAUDE.md 是跨會話的組織記憶。

Key Points

  • 41% error rate with no CLAUDE.md → 3% with 12 rules
  • Rule 5: use model only for judgment (classification, drafting, extraction) — not routing/state/deterministic transforms
  • Rule 6: token budgets are hard limits, not suggestions (4k/task, 30k/session)
  • Rule 7: expose conflicts, don’t average — pick one pattern in the codebase
  • Rule 9: tests must validate intent, not just behavior
  • Rule 12: fail loudly — silent skips are the worst bugs

Insights

The token budget rule (rule 6) is rarely stated this explicitly — long debug sessions cause Claude to re-suggest solutions it already rejected. The “expose conflicts, don’t compromise” rule is a direct counter to a common LLM tendency to synthesize contradictory patterns into incoherent mixed output. Rule 5’s separation of “judgment tasks” from “deterministic transforms” is a useful architectural heuristic.

Connections

Raw Excerpt

“真正會複利增長的,不是下一個框架,而是:把 CLAUDE.md 當作跨會話的組織記憶”