wiki / concepts / karpathy-four-guidelines
Karpathy's Four Guidelines
Machine ingest — raw context
loading…
~… tokensappend .md to any wiki URL for this view
Karpathy’s Four Guidelines
Behavioral rules reducing common LLM coding mistakes, from andrej karpathy’s pitfall observations. Bias toward caution over speed; judgment on trivial tasks. [source: karpathy-guidelines-skill-2026]
- Think before coding — don’t assume, don’t hide confusion, surface tradeoffs. State assumptions; present competing interpretations instead of picking silently; name what’s confusing and ask.
- Simplicity first — minimum code that solves the problem, nothing speculative. No unrequested features/abstractions/configurability. “Would a senior engineer call this overcomplicated?”
- Surgical changes — touch only what you must; clean up only your own mess. Every changed line traces to the request. Mention unrelated dead code, don’t delete it.
- Goal-driven execution — define verifiable success criteria, loop until verified. “Fix the bug” → “write a test that reproduces it, then make it pass”
Fit with the other layers
#4 is tdd with agents in miniature and powers tracer bullets. #1 is grilling doctrine at code scale. #2-3 are what keeps codebases maintainable for agents.
Related
andrej karpathy, tdd with agents, tracer bullets, grilling doctrine.
Evidence — verified primary sources
| karpathy-guidelines-skill-2026 | https://github.com/multica-ai/andrej-karpathy-skills/blob/main/skills/karpathy-guidelines/SKILL.md | ingested 2026-08-22 sha256:3dbba31cbdb8… |
Graph context
References (3)
Andrej Karpathy's pitfallTDD With Agentsin miniature and powers tracer-bullets. #1 isGrilling Doctrineat code scale. #2-3 are what keeps codebases maintainable for agents. Referenced by (8)
Agentic Manual TestingBuild-From-Scratch Pedagogy#2 (simplicity first)First-Principles Thinking#1 is first principles as coding conduct.Git for Agentic WorkflowsSubagents and Context ManagementTDD With AgentsTracer BulletsAndrej Karpathy: think before coding, simplicity first, surgical changes,