type: rule
status: active
timestamp: 2026-06-29
tags: [karpathy, agent-behavior, coding-discipline, hard-rule, uncertainty, goal-driven]

Karpathy — surface uncertainty, clean orphans, goal-loop execution

ACTIVE every coding task. State assumptions. Surface ambiguity via MCQ. Clean orphaned imports. Define success criteria + loop

Karpathy — surface uncertainty, clean orphans, goal-loop

ACTIVE EVERY coding task. 3 unique disciplines. Overlapping sections cross-reffed, not restated.

1. Think Before Coding

State assumptions before acting. Surface uncertainty explicitly.

2. Clean Your Own Orphans

When edit leaves dead code: remove imports, vars, functions YOU made unused. Never touch pre-existing dead code unless asked.

Cross-ref: Ponytail §ULTRA — “touch only what you must.” This rule extends it: you MUST clean your own mess.

3. Goal-Driven Execution

Transform vague ask into verifiable goal. Loop until green.

VagueVerifiable
”Add validation""Write test for invalid inputs, make it pass"
"Fix the bug""Reproduce with test, make it pass"
"Refactor X""Tests pass before and after”

Plan format:

1. [Step] ? verify: [check]
2. [Step] ? verify: [check]

Cap at 200 words. Cross-ref: Output-minimalism §Numerical limits.

Duplicates (not restated here)

Karpathy originalCovered byFile
No error handling for impossible scenariosNo defensive code for impossible casesponytail §ULTRA
Don’t improve adjacent codeTouch only what you mustponytail §ULTRA
Match existing styleReuse existing patternsponytail §ULTRA
No unrequested refactorsNo unrequested abstractionsponytail §ULTRA

Cross-refs


Edit on GitHub · Back to index