Claude Code rules: property tests for invariants and old-system-as-oracle migrations
minchoi · x · 2026-11-19
Rules 3-4 from minchoi's thread: write property tests for invariants that must never break, throwing thousands of generated inputs at them (fast-check for JS/TS, Hypothesis for Python, proptest for Rust). For migrations, let the old system be the oracle: run old and new on the same inputs, treat any output difference as a bug or breaking change, normalize noise, and keep a list of approved differences.
More from coding & agent
- From $180 first gig to $20k AI installs: two pricing plays for selling AI to mid-size firms — aryanXmahajan · 2026-11-19
- Claude Code verification rules: differential tests, REVIEW.md isolation, and mined rules — minchoi · 2026-11-19
- Claude Code rules: 3 failed fixes then a human, and checks a change can't edit — minchoi · 2026-11-19
- Property tests for invariants: throw thousands of generated inputs at rules that must never break — minchoi · 2026-11-19
- Give Claude a way to run the change, not just the tests: verify skill in .claude/skills/ — minchoi · 2026-11-19
- Claude Code team says Claude writes and reviews ~90% of their code, aided by 7 verification rules — minchoi · 2026-11-19