News listClaude making crazy mistakes and playing dumb while coding? Reworking Andrej Karpathy's 12 rules to help you slash the error rate from 41% to 3%
動區 BlockTempo2026-05-14 08:52:49

Claude making crazy mistakes and playing dumb while coding? Reworking Andrej Karpathy's 12 rules to help you slash the error rate from 41% to 3%

ORIGINALClaude 寫程式瘋狂犯錯裝傻?改造 Andrej Karpathy 的12 條規則幫你把錯誤率從 41% 砍到 3%
AI Impact AnalysisGrok analyzing...
📄Full Article· Automatically extracted by trafilaturaGemini 翻譯7761 words
Andrej Karpathy complained at the beginning of the year that Claude often makes mistakes when coding. Forrest Chang compiled 4 rules, and within 6 weeks, the author added 8 more, covering new scenarios such as multi-step Agents and hook chain triggering. Testing across 30 codebases, the error rate dropped sharply from 41% to 3%. (Context: Why is the SEC lowering the stablecoin discount rate for broker-dealers from 100% to 2% a major bullish signal?) (Background: Anthropic AI Economic Index report: Automated trading workflow frequency has doubled, and Claude is transforming from a tool into a life assistant.) Revealing that the original template silently fails in 4 key scenarios, and adding 8 new rules to suppress the error rate from 41% to 3%. In January 2026, AI expert Andrej Karpathy posted on X complaining about the way Claude writes code—making silent assumptions, over-engineering, and causing collateral damage to unrelated code. Forrest Chang condensed these pain points into 4 behavioral rules, put them into a CLAUDE.md file, and it went viral immediately upon release. However, a few months later, the Claude Code ecosystem evolved from single-shot completion to multi-step Agent collaboration, and the old rules began to fail. A developer tested 30 codebases within 6 weeks. In late January 2026, Andrej Karpathy posted a tweet thread criticizing Claude's coding style. He pointed out three types of typical problems: making incorrect assumptions without explanation, over-complicating, and causing irrelevant damage to code that shouldn't have been touched. Forrest Chang saw this thread, summarized the complaints into 4 behavioral rules, wrote them into a separate CLAUDE.md file, and published it to GitHub. The project received 5,828 Stars on its first day, was bookmarked 60,000 times within two weeks, and now has 120,000 Stars, becoming the fastest-growing single-file code repository in 2026. Subsequently, I tested it on 30 codebases over 6 weeks. These 4 rules are indeed effective. Errors that previously occurred with about a 40% probability dropped to below 3% in tasks where these rules could be applied. But the problem is that this template was originally designed to solve errors that appeared in Claude's coding in January. By May 2026, the problems facing the Claude Code ecosystem were different: conflicts between Agents, hook chain triggering, skill loading conflicts, and interruptions in cross-session multi-step workflows. So, I added 8 more rules. Below is the complete 12-rule version of CLAUDE.md: why each one is worth adding, and the 4 places where the original Karpathy template silently fails. If you want to skip the explanation and copy it directly, the complete file is at the end. Claude Code's CLAUDE.md is the most underrated file in the entire AI programming tech stack. Most developers usually make three types of mistakes: First, treating it as a preference junk drawer, stuffing all their habits into it, eventually bloating it to over 4,000 tokens, causing rule compliance to drop to 30%. Second, not using it at all, prompting from scratch every time. This causes 5x token waste and lacks consistency across different sessions. Third, copying a template and never managing it again. It might work for two weeks, but as the codebase changes, it will fail without you knowing. Anthropic just shipped Dreaming agents review their own sessions between runs, surface recurring mistakes, and rewrite their memory so the next session doesn't repeat them. Karpathy wrote CLAUDE.md for the same reason. > silent wrong assumptions > over-complication >… https://t.co/HqCTygknPK pic.twitter.com/lUkHfhH7hb— Mnimiy (@Mnilax) May 13, 2026 Anthropic's official documentation states clearly: CLAUDE.md is essentially suggestive. Claude follows it about 80% of the time. Once it exceeds 200 lines, compliance drops significantly because important rules are drowned out by noise. Karpathy's template solved this problem: one file, 65 lines, 4 rules. This is the minimum baseline. But the ceiling can be higher. After adding the following 8 rules, it covers not only the coding problems Karpathy complained about in January 2026, but also the Agent orchestration problems that only appeared in May 2026—problems that didn't exist when the original template was written. If you
Data Status✓ Full text extractedRead Original (動區 BlockTempo)
🔍Historical Similar Events· Keyword + Asset Matching6 items
💡 Currently matching via keywords + symbols (MVP) · Will be upgraded to embedding semantic search later
Raw Information
ID:8d94f103e9
Source:動區 BlockTempo
Published:2026-05-14 08:52:49
Category:zh_news · Export Category zh
Symbols:Unspecified
Community Votes:+0 /0 · ⭐ 0 Important · 💬 0 Comments