Work effectively with AI coding agents. Understand them as language models running in a tool loop with limited context, which is why they guess, game the visible signal and report confidently. Recognise the shortcut and correctness tells in their code across Python, TypeScript/JavaScript, Rust, Java and Go, and know the damage each one does later. Verify changes instead of trusting them, review diffs fast for quality and security, judge when work is truly finished, and choose, design and steer tasks so agents can finish them well.
See it fail: red before green and break-it checks card 3 of 6

The two checks, step by step

builds on: What makes a test able to fail
**Red before green** 1. While the fix is still uncommitted, remove it but keep the test: `git stash push -- <source files>`. 2. Run the new test. It must be **red** *for the right reason*: an assertion showing the buggy value, not an import or compile error. 3. Restore the fix (`git stash pop`). It must be **green**. **Break-it check:** make one small wrong change the tests should notice, such as flipping `<` to `<=` or returning a constant. The suite must go red. Then revert. This is the core idea of mutation testing, done by hand. A mutation testing tool makes many such changes automatically.
Terms on this card
red before green
Checking that a new test fails on the code without the fix, then passes with the fix.
uncommitted
Changes in your working files that have not yet been saved into a Git commit.
git stash push
Git command that saves uncommitted changes aside and removes them from the working files; with paths after `--`, only those files. `git stash pop` restores them.
mutation testing
Deliberately making small wrong changes to code, usually automatically with a tool, then checking that the test suite fails for each. A change the suite misses reveals a gap.
break-it check
A manual, one-off mutation: break the code in one small way, run the tests, expect red, then revert.
Learn this step by step on Bytewise
Lesson goal: Confirm a new test is red without the fix and green with it. Temporarily break the code to check that the suite catches the break, which is the core idea of mutation testing. · the whole lesson