← knowledge.oriz.in

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

rule karpathyagent-behaviorcoding-disciplinehard-ruleuncertaintygoal-driven

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.

Vague Verifiable
"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 original Covered by File
No error handling for impossible scenarios No defensive code for impossible cases ponytail §ULTRA
Don't improve adjacent code Touch only what you must ponytail §ULTRA
Match existing style Reuse existing patterns ponytail §ULTRA
No unrequested refactors No unrequested abstractions ponytail §ULTRA

Cross-refs