Errors must surface, not hide: Do not add fallback/default returns that silently swallow failures. Let errors propagate immediately.
Catch at the boundary, nowhere else: Only the outermost API layer (process loop, top-level command handler) should catch and convert exceptions to error responses. Business logic must not catch around internal calls.
Tests must fail when the code is wrong: If deleting or breaking the function under test does not turn the test red, the test is worthless. Assert specific, distinguishable output values.
No hard-coded expectations: Use diverse inputs — multiple data sets, random values, boundary cases — so that a hard-coded return cannot satisfy all assertions.
Red before green: When fixing a bug, first write a failing test that reproduces it. Confirm it fails. Then fix the code. A test written after the fix has never been proven to catch the bug.