If you've ever asked Claude Code, Cursor, or Copilot to "add a function" to a TypeScript project, you've watched it happen in real time: the function takes any , returns any , asserts a network response with as User , swallows a promise it never awaits, and the type checker — the one tool you turned on for exactly this reason — shrugs and lets it through. That's not because TypeScript is broken. It's because the model's training data is half a decade of Stack Overflow answers from the era when any was the answer, when // @ts-ignore was a pragma instead of a smell, and when "type assertion" meant "tell the compiler to shut up". Drop a CLAUDE.md at the root of your repo and the AI reads it before every task. Here are the four rules that fix the worst patterns. The full pack has sixteen. Rule 1: strict: true and friends — the compiler is your first reviewer strict: true is table stakes. It's the flags strict doesn't include where the AI runs wild.…