work / AI / sales tax compliance checker

Sales tax rules, checked by code.

Sales tax review was manual and slow. I built a read-only agent that applies coded GST/HST rules to the books and writes a review workbook for each client.

role
Sole automation engineer
client
Canadian accounting firm
status
Validated on 4 clients

Languages

JavaScript

Tools & platforms

n8nQuickBooks Online APIGoogle Sheets

AI & LLM

to build it
ClaudeChatGPTPerplexity

Skills

Rules engine designTax logicValidation against expert workReporting
10

rules validated against a reviewer's work

4

clients tested

01// how I approached it

The thinking behind it

  1. 01 · What I noticed

    The rules were known, but they lived in reviewers' heads, so every review was a little different.

  2. 02 · What I decided

    Write the rules as code, keep the agent read-only, and check its results against a reviewer's finished work.

  3. 03 · What I delivered

    Ten rules that matched a reviewer's output on four clients.

02// old vs new

Old system vs new system

Old systempeople as the glue
  1. Export transactions
  2. Check tax on each line
  3. Apply rules from memory
  4. Build the review sheet
New systemthe system does the work
  1. Agent reads the books (read-only)
  2. Coded rules check every line
  3. Findings written automatically
  4. Reviewer gets a ready workbook
03// how it works

Watch it run

Click through the four steps. In step 3, click any box to see what it does.

synthetic data · no client screens
Reconstruction with synthetic data · no client screens
04// the hard part

Turning a reviewer's judgment into rules.

Sales tax rules lived in reviewers' heads. Each one had to be written as a clear, testable rule, then checked against a reviewer's finished work before it could be trusted. Ten rules passed that test on four clients; five more were specified next.

05// key decisions

Why it's built this way

decision 1

Read-only access

The agent can check the books but never change them.

Trade-off: fixes still need a person.
decision 2

Rules as code

Every check is explicit, so anyone can see why a line was flagged.

Trade-off: each rule must be written carefully.
decision 3

Validate against real reviews

Results were compared to a reviewer's finished workbooks on four clients.

Trade-off: slower to roll out.
06// lessons

What made it work

  1. 01

    Write down what experts know

    The hardest part is getting the rule out of someone's head.

  2. 02

    Prove it before people rely on it

    Matching expert output builds trust faster than any demo.

  3. 03

    Read-only is a feature

    An agent that cannot change data is easier to approve.