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.
A clean, focused change card 4 of 6

Three lines of fix, the rest is leftovers

builds on: Scope creep and unasked-for changes in a diff, What 'done' means for a change
The fix is the import change plus the `q` and `quantize` lines. Everything else is a tell. The `print` runs on every invoice in production and fills the logs. The commented-out line leaves readers wondering whether to restore it. `_round_v1` is called nowhere. It also rounds half to even and returns a float, the very behaviour being fixed, so whoever reuses it brings the bug back. The scratch file ships in the repo, and the next reader has to work out whether it matters. All of it goes before merge, not in a later cleanup.
// Python
--- a/billing/invoice.py
+++ b/billing/invoice.py
@@ -1 +1 @@
-from decimal import Decimal
+from decimal import Decimal, ROUND_HALF_UP
@@ -12 +12,7 @@
-    return round(total, 2)
+    print("DBG total", total)
+    # return round(total, 2)
+    q = Decimal("0.01")
+    return total.quantize(q, ROUND_HALF_UP)
+
+def _round_v1(x):
+    return float(f"{x:.2f}")
--- /dev/null
+++ b/scratch_test_round.py
Terms on this card
half to even
Rounding where exact halves go to the nearest even digit: 0.125 becomes 0.12. Python's round() uses it.
tell
An observable sign in a diff, transcript or summary that suggests a shortcut or an error.
float
A binary floating-point number. Many decimals, such as 2.675, cannot be stored exactly, so arithmetic on them can be slightly off.
Learn this step by step on Bytewise
Lesson goal: Recognise a mergeable change: one purpose per commit, no debug prints, commented-out code, dead helpers or stray files, it follows the codebase's conventions, and the commit message explains why the change was made. · the whole lesson