Entry 03

Teaching the AI how the office works

I recorded my screen, imported six months of spreadsheets and let the AI work night shifts. It found mistakes in my own data before I found any in its code. How to teach an AI your real process.

Covers 1 – 14 June 20265 min read

One of our old trips was dated 1907.

Nobody in the office had noticed, because nothing ever checked. It sat in a monthly kilometre sheet alongside 25 other trips and 43 bookings typed in with the wrong year. The AI found them in June, in the middle of importing six months of history. By then I had stopped assuming the spreadsheets were the truth.

The paper trail

By June the app could store bookings and trips. It did not yet do the job the office does, and that job is a paper trail. Every trip produces a load number, a diesel order, a petty cash voucher for the driver, a trip sheet, and at the end a signed delivery note. Each has its own book and its own numbering, and the clerks know the order by heart.

Explaining that in writing was slow, so I stopped writing and started recording. I made nine screen recordings of my real working day, including the Excel booking form we used for every load, and handed them over.

Claude worked through them and wrote a requirements document built around that sequence: load number, diesel order, petty cash voucher, trip sheet, delivery note. It ended with seven decisions for me. Two mattered most: run the app alongside the old dispatch system for a while instead of switching over in one go, and start fresh number series instead of continuing the old ones.

Then I cut. The plan had a temperature reading at trip close. My reply: “leave out the temp, just the odo meter close and dnote number.” The driver document pack had a delivery-note page we did not need, because drivers carry a separate book. Out it went.

All four phases (diesel orders, petty cash vouchers, a one-click driver document pack, and trip close) went live on 13 June.

Three loads, one trip

The hardest question that month had nothing to do with code. A truck might go from our depot to the port at the coast, from there to a city in South Africa, then home. That is three loads and one trip, with one set of night-outs for the driver and one odometer reading at each end.

We settled it with four rules:

  • A truck has at most one open trip.
  • Every new booking for that truck joins the open trip.
  • When the truck is home, someone closes the trip once, with closing kilometres, night-outs, assistant and fuel.
  • Payroll reads kilometres and night-outs from the closed trip, so nobody types them twice.

Five months later that model is still standing, with small changes. It mattered more than anything in the code.

Six months of history

I told Claude early on: “the entire purpose of this website is that I can move away from the Excel sheets.” For that, the app needed our past. We imported six months from the monthly kilometre sheets: 565 trips, 862 bookings and 188 payroll rows.

Halfway through, a quirk in an older version of Windows PowerShell quietly mangled 376 of the 565 trips. We only caught it because we reconciled every total against the source sheets afterwards. The same check turned up the year-1907 trip, the wrong years and one trip missing altogether. Once those were fixed, the income in the app matched the source sheets to the cent.

The night shift

Around the same time I tried letting the AI work while I slept. Windows Task Scheduler started Claude Code four times a day with nobody at the keyboard: at midnight to work on side projects, at six for a morning briefing, at noon to improve our document templates, and at six in the evening to write a daily review.

Night one failed twice. The midnight run hit the usage limit, and the six o’clock run could not save its files. Night two ran clean: four fixes, and 24 things flagged for me, including an impossible date, 31 September.

Night two also made me nervous. A program with no one watching can do a lot of damage. So we wrote rules for unattended runs before going any further.

Build it yourself: teach it your process

Record, don’t write. Use the screen recorder built into Windows (Snipping Tool can record) or your phone. Do the real job at normal speed and talk while you work: “this number comes from the diesel book”, “I always check this column first”. Five to ten short recordings cover most office jobs.

Ask for a plan that ends in questions. Ask for a requirements document with a numbered list of decisions only you can make. Answer them before any building starts. This is where you cut scope, and you should cut hard.

Map your paper trail. For each document write: its name, its number series, who fills it in, when, and what it must match. That list becomes the backbone of the system.

Settle the hard business rules in words first. Ours was “what is a trip?” Yours might be “when is an order complete?” or “which month does a job belong to?” Write the rule as three or four short sentences and get everyone to agree before it becomes code.

Import history with a reconciliation checklist:

  • row counts match the source, per month
  • money totals match the source, per month
  • no impossible dates (future dates, wrong years, 31 September)
  • every child record has its parent (every load belongs to a trip)
  • a short list of everything that did not match, for a human to look at

Write rules before you let it run alone. Ours, still a good starting point for anyone:

  • Never do anything that cannot be undone without a person present.
  • Never overwrite an original file; write a new copy.
  • Never invent data to fill a gap; flag it instead.

What June taught me

Show the AI your real process and let it ask questions. Cut the plan down to what you need this month. And when you bring old data in, reconcile every total, because the old data has mistakes in it too.

Next: why the AI forgot everything every morning, and the memory I built it.

Written from my build notes. I keep a running memory of every session with the AI, and each entry is drafted from those notes with Claude's help, then checked and edited by me.

A question about this entry? Ask it here →