<critical_constraints> ❌ NO fixing without reproducing first ❌ NO changing random things hoping it works ❌ NO fixing symptoms instead of root cause ✅ MUST read full error message including stack trace ✅ MUST form hypothesis before making changes ✅ MUST write test after fixing to prevent recurrence </critical_constraints>
<common_patterns>
-
Off-by-one: range(len(x)-1) → should be range(len(x))
-
Null reference: user.name without checking user is None
-
Race condition: check-then-act pattern
-
State mutation: items.sort() modifies original </common_patterns>
<when_stuck>
-
Take a break
-
Explain to someone (rubber duck)
-
Check the obvious (is server running?)
-
Search for similar issues
-
Create minimal reproduction </when_stuck>