← rooo.pro

Month-end close had quietly become "just verifying" — what a Power Query person saw after handing aggregation to the AI

2026-05-17 / Vol 11 / draft at the time of publishing

In Vol 7 I wrote about how Claude hardened my Microsoft 365 tenant over 5 rounds while I took a morning bath, went for a walk, and made lunch.
That was "mostly automated" in a domain where Claude already knows the shape — security configuration backed by tons of public docs.

What I noticed today (2026-05-17) is that the same texture has reached my accounting work. "Noticed" is the right word, because I've been running monthly input this way for months. The automation had quietly been in place.


Caveat first: I'm a Power Query person

Before the main story, a confession. I'm reasonably confident at pushing big CSVs around with Power Query and pivot tables. Amazon's all-orders report, Yamato's monthly billing CSV, the Mercari Shops sales export, the Square settlements file. Once I know what each column means and the order of operations, I can build the monthly summary.

In other words, I built the automation from the side of "I don't have to delegate the aggregation to the AI". That matters for the second half of this post.

What the accounting workflow looks like now (sole proprietor, one-person EC)

I sell on BASE / Qoo10 / Color Me / Yahoo! Shopping, plus Amazon, Mercari Shops, and Square. Books are kept in Yayoi Aoiro Online.

The monthly input routine splits into 3 "days":

Start of month: previous month's sales (settlement statements from each mall, carrier invoices, point rebates, building fees — about 10 tasks)
The 11th: Yahoo 10th-day close + Amazon sales + Amazon fees + Amazon-route shipping + Yayoi monthly report download
The 21st: various card statements, other recurring subscriptions

Almost all of it is automated by Claude + a small in-house Python tool (yayoi_auto) + the Chrome extension. The shape is the same every time:

1) Claude logs into each site through my existing session and grabs the source data (web page, PDF, or API).
2) Adapters normalize the raw data into a RawTxn.
3) A single YAML rule file applies the journal mapping (account, sub-account, tax category, partner, qualified-invoice flags) by first-match.
4) The result is written as Yayoi's import CSV (27 columns, CP932, CRLF).
5) I drop the CSV into Yayoi's "import journals" and verify what landed.

My work is only step (5). Did the file actually go in. Do the amounts match the primary source. Do tax categories, sub-accounts, and partners line up with what's already in the book.
The month-end report (the Excel balance-transition sheet) is automated too — monthly snapshots quietly stack up in a fixed folder on OneDrive.

A concrete example: yesterday's 11th-of-the-month work

Yesterday (2026-05-16) the 11th-day task looked like this. Hands-on time was maybe 30 minutes:

StepWhat happenedMy involvement
1Pull Yahoo's 10th-day settlement detail → generate 2 journal lines (sales + fees) as CSVSaid "do it"
2Download Amazon's all-orders report + transaction reportClicked the approval dialogs
3Download Amazon-fee and shipping PDFs, rename themRead the PDF to verify the figure firsthand
4Build 3 Amazon journals (sales, fees, shipping — each posted to a different sub-account)Skimmed
5Merge the Yahoo + Amazon journals and import into YayoiConfirmed the count and accounts after import
6Download the balance-transition table as Excel into the designated folder

The one check I keep manual: opening the shipping PDF and reading the figure directly. Web-page OCR has misread before, so for primary-source PDFs the tax-inclusive total comes from the PDF body, not the screen.

Bonus: I asked the AI to summarize a dataset whose answer I knew

The real story of today was a side experiment. A new Amazon all-orders report had landed (CP932, tab-separated, a few thousand rows over several months). I handed it to Claude and asked for monthly sales.
This was a verification-only aggregation. The real journals were already in Yayoi by a different route, so I already held the correct answers — for last month, for the peak month, and for one month that happened to have a single small order.

It took 3 rounds:

Round 1: Claude added item-price + item-tax + ship-price + ship-tax together. Since item-tax is already included inside item-price, every month came out about 10% too high. I corrected: "the peak month should be the number I have."

Round 2: Claude switched to item-price alone. Most months were right, but the one month where shipping was billed separately (the single-order month) dropped its shipping portion. I corrected again with the right figure.

Round 3: item-price + shipping-price (with shipping only present on a few months) — finally every month matched.

The lesson: AI aggregation is dangerous without preconditions

Column names (item-price / item-tax / shipping-price) look universal, but "is item-price tax-inclusive or exclusive?" "is shipping inside item-price or separate?" changes by vendor. For Amazon JP:

item-price = item price, tax-inclusive total
item-tax = the included tax amount (informational — never add)
shipping-price = shipping, tax-inclusive, separate (add)

When you build this in Power Query, you decide what each column means before you write the formula, so this kind of mix-up is caught at the start.
Hand it to an AI as "summarize this," and the AI has to infer from names. Today's 3 rounds are the count of inferences that missed.

The takeaway is plain:

If a checker who knows the answer sits next to you, AI aggregation is a useful first-draft generator.
Without that checker, asking an AI to "summarize" a dataset is dangerous.

This landed safely only because I held the correct values for April and December. If I hadn't, I might have published the Round-3 table as fact.

The conditions that make the accounting automation work

Looking back, what makes the current setup safe is 4 guardrails:

1) Journal rules live in code (YAML). Account, sub-account, tax category, qualified-invoice flag — all written once, to exactly match the existing Yayoi entries. I never ask the AI to "split this nicely."

2) Primary-source principle. For items where the PDF is the source of truth (Yamato, Amazon fees and shipping), I open the PDF with the Read tool and verify the figure. Web OCR has misread before.

3) Mandatory duplicate check. Before each batch, the workflow searches Yayoi's "input journals" for the same memo/partner to physically prevent double posting.

4) Anything that doesn't match a rule lands in a "未確定" (undetermined) account. Transactions that need judgment are isolated for me to classify by hand. The AI never picks an account by inference.

All 4 are why I can "leave it to it." Drop any one of them and I wouldn't trust the monthly close. Same structure as Vol 7's M365 work.

Next

Next week is likely either the 4-mall order operations (intake → packing → shipping → notification) from Vol 10, or porting today's yayoi_auto into a different domain (karaha.org's books).
Either way, I'll write.