The log as data, not as vibes
Run it. That's the whole artifact — a cleaning log small enough to paste into a memo appendix, structured enough that a script can audit it. Walk the fields:
source— the original export, named and never edited. Cleaning writes a new file. The day someone disputes your numbers, the untouched original is the difference between "let me show you" and "let me explain."steps— one entry per transform, each with a count and a reason that names what was wrong. "Export writes one row per payment retry" survives a hostile read. "Cleanup" does not; "cleanup" is the word people use when they don't know what they deleted.- The reconciliation line — the arithmetic spine of the whole lesson:
rows_in − rows_outmust exactly equal the sum of dropped rows across steps. If 12 went in, 6 came out, and your steps only explain 5, then one row left off the books, and off-the-books is where the $4,400 discrepancy lives.
Two things deliberately have no place in this structure:
Silent null handling. "Drop rows with missing values" is not a step — it's a policy decision about every column at once, wearing a step's clothing. A blank mrr might mean not billed (fill 0.0), unknown (keep the null, exclude from averages), or broken pipeline (stop and ask). Same blank, three different Julys. So nulls get their own ledger, per column, and you'll build it later in this lesson.
Unlogged mutation. Every step takes a list and returns a new list. This sounds like functional-programming piety; it's actually self-defense, and in lesson 3 you'll watch a memo change between two runs on the same data because one step mutated its input. Receipts plus immutability is what makes "rerun it" a safe sentence.
One more habit, because it's cheap now and expensive to retrofit: the log is the AI's work order. When you ask the drafter to clean, you ask for the steps in this shape — name, count, why — and refuse anything that can't fill in the why. You're not slowing the AI down. You're making its work auditable, which is the only kind of fast that survives contact with finance.