1d ago

Tip: Scan Codebase to Eliminate All LLM-Copied Bad Patterns

0
Original post

PRO-TIP: When you find that LLM did something stupid, ask it to scan through the whole code base and fix ALL occurrences of the same mistake. Example: I found LLM written safe_normalize for camera direction/up vector in per-object check. I asked it to ensure camera validity at beginning of the frame and normalize vectors. Then remove all similar normalize and length = 0 safety checks around the codebase. And do the same for light vectors and similar. LLM loves copying bad patterns. It's likely that it used the same pattern elsewhere. Important to kill all bad examples so that AI doesn't copy them in future. If the bad pattern is generic, ask LLM to write a rule about it in the AGENTS.md file.

1:28 AM · May 19, 2026 View on X