Lesson 11 of 15

A.I. action log with undo

When an A.I. assistant can change the books, every change it makes gets a log row with its before and after values, who approved it, and how to undo it. You'll undo two wrong changes the right way, then check that the Admin page ties again.

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15

Learn

Once an A.I. assistant is connected to the books (Lesson 13), it can change things: a category, a draft bill, a journal entry. A.I. doesn't change who's responsible. The person who approves a change is, so the record has to show what changed, who approved it, and how to put it back.

The A.I. action log: one row for every change
  • When, and who: the A.I., or the person who made the change
  • The tool or prompt: the connector's tool, like update_category, or the request
  • What changed, and which record: the bank line, the bill, the entry
  • Before and After: the value before the change, and after it
  • Status: draft, applied or posted, and approved by: the person, by name
  • Undo: exactly how to reverse it, and undone by: the row that reversed it
How to undo each kind of change
  1. A draft (an entry, a bill or an invoice not posted yet): delete or void the draft.
  2. A category or another field: set it back to its Before value. That's why the log keeps it.
  3. A posted entry: post a reversing entry, with the debits and credits swapped, dated in an open period. Never delete or edit posted history: the audit trail must show the entry and its reversal.
  4. Money sent, a filing, an email sent: no button can undo these. A person approves each one before it happens.
  5. Every undo is a log row too, naming the row it undid. Then run the Admin checks again.

Build it with Claude. Your practice workbooks have an A.I. action log sheet with Before, After and Undo columns, beside a December activity sheet with the records it changed. Part 4 of the starter prompt tells the assistant to write a row for every change, and how to reverse each kind:

PART 4. THE A.I. ACTION LOG (IF YOU CAN CHANGE MY BOOKS)
If you're connected to my books and can change anything, like a category, a draft or an entry, add a sheet called "A.I. action log". Write one row for every change you make, as you make it:
- When, the tool you used or the request I made, what changed, and which record.
- Before and After: the value before your change, and after it.
- Status (draft, applied or posted), and who approved it.
- Undo: exactly how to reverse it. A draft: delete or void the draft. A category or another field: set it back to its Before value. A posted entry: post a reversing entry, dated in an open period. Never delete or edit a posted entry.
Never send money, file anything or send an email unless I've approved that exact action first. A button can't undo those, so ask me and wait.
When I ask you to undo a row, do it the way its Undo says, log the undo as a new row that names the row it undid, and run the Admin checks again.
Add this check to the Admin page: "Every A.I. change has a log row and an undo path": the changes you made, minus the log rows with an Undo. It passes only at zero.

Then the Admin page checks the log: count the records the A.I. changed, and the A.I. log rows with an Undo. If they're not the same, some change has no log row or no way back, and that's a red flag.

See it in Leah Books

Open Settings, then Connected apps, then A.I. action log. It lists every change the Claude connector made, with its before and after values and an Undo button. Undo removes a draft or a suggestion and puts back the old value. A posted or approved item can't be undone silently: Leah Books offers a reversing journal entry draft for a person to approve instead. Each undo is logged too, and only owners and admins can see the log.

Do it

Practice tasks with the practice company's files. Try each one, then check your work: the answer opens after you check.

Task 11a

Undo the A.I.'s two wrong changes

  1. Through the connector, the A.I. recategorized 6 December bank lines and posted 1 journal entry, and Jen Alvarez approved them. Here's its log.
  2. Open the A.I. action log and December activity sheets of your starter workbook, and compare 6000 Fuel with the fuel card statement. Click the two changes that are wrong.
  3. Then undo each one the right way, in the workbook: put the record back, and log each undo as a new row (rows 8 and 9).
  • Starter workbook (.xlsx)Reports, Bills and the lines to investigate, with an empty Dashboard sheet and an empty Admin sheet for your formulas.
Practice A.I. action log · December
Picked#RecordWhat changedBeforeAfterStatus
1T1 Chevron 0091, $412.00CategoryNot categorized6000 FuelApplied
2T2 Shell 7740, $388.00CategoryNot categorized6000 FuelApplied
3T3 River Grill, crew lunch, $96.00Category6900 Meals6000 FuelApplied
4T4 Clark County PUD, $362.00CategoryNot categorized6800 Utilities & PhoneApplied
5T5 Valley Tool Rental, $185.00CategoryNot categorized6100 Equipment RentalApplied
6T6 Columbia Fuel Supply, fuel card, $640.00CategoryNot categorized6000 FuelApplied
7JE-AI-1201, $640.00Journal entryNo entryDebit 6000 Fuel, credit 2300 Accrued Liabilities, $640.00Posted

The two wrong changes: click each one in the table above

How do you undo row 3?
How do you undo row 7, the posted entry?
Task 11b

Check that the Admin page ties again

  1. On the Admin sheet, write rows 20 and 22's formulas: every A.I. change has a log row and an undo path, and December Fuel ties to the fuel card statement.
  2. Run them before and after your undos.
  • Starter workbook (.xlsx)Reports, Bills and the lines to investigate, with an empty Dashboard sheet and an empty Admin sheet for your formulas.

The Admin page's checks, after both undos

Every A.I. change has a log row and an undo pathRecords the A.I. changed: 7 · A.I. rows with an Undo: 7
December Fuel ties to the fuel card statementDecember activity: $1,440.00 · Fuel card statement: $1,440.00

Next month, the activity sheet shows 8 changes by the A.I., and the log has 7 rows with an Undo

Every A.I. change has a log row and an undo path8 − 7 = 1
Task 11c

What a button can't undo

  1. Here's what an A.I. assistant could do through a connection. Click every one that no Undo button can reverse.
Changes an A.I. could make
PickedWhat the A.I. did
Drafted a bill, not approved yet
Changed a bank line's category
Posted a journal entry
Sent a $2,480 vendor payment
Filed the quarterly sales tax return
Emailed a payment reminder to a customer

Can't be undone by a button: click each one in the table above

So what does the setup need for those?
Task 11d

Tell Claude to log and undo

  1. Set up your own A.I. assistant the same way. Tick each one when it's done.
My A.I. action log