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 5 of 6

A commit message that says why

builds on: Scope creep and unasked-for changes in a diff, What 'done' means for a change
BAD: `Update invoice.py`, or `Use Decimal.quantize`. The diff already shows that. BETTER: `Round invoice totals half-up to the cent` `round()` rounds exact halves to even, so a total of 0.125 became 0.12 and invoices were a cent off the tax PDF. Use `Decimal.quantize` with `ROUND_HALF_UP`. Fixes BILL-412. The agent can only write this if you give it the reason in the task.
Terms on this card
commit message
Text stored with a git commit: a short subject line, then an optional body explaining the change.
`Decimal.quantize`
Python method that rounds a Decimal to a fixed exponent, such as 0.01, using the rounding mode you pass.
`ROUND_HALF_UP`
Python decimal rounding mode where exact halves round away from zero: 0.125 becomes 0.13.
diff
The set of line changes between two versions of the code: removed lines start with '-', added lines with '+'.
Decimal
Python's exact decimal number type from the `decimal` module, used for money to avoid floating-point rounding.
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