Dev.to WebDev πŸ›  Dev πŸ‘ 0 πŸ“– 3 min read

Unit tests caught 2 of 5 tax bugs. A real browser caught all 5.

I built Tickmark for the KaneCLI Hackathon: an invoice maker for India (GST) and the US (sales tax) where an AI coding agent isn't allowed to say "done" until a real browser has checked every invoice. The bug t

I built Tickmark for the KaneCLI Hackathon: an invoice maker for India (GST) and the US (sales tax) where an AI coding agent isn't allowed to say "done" until a real browser has checked every invoice.

The bug that started it

I asked Claude Code to apply a teammate's "one-line refactor". The unit tests stayed green.

But the change made the place of supply default to the seller's state. So every client in Mumbai, billed by a company in Bengaluru, got CGST + SGST instead of IGST. In India that means the client can't claim their tax credit and the invoice has to be re-issued.

The unit tests never saw it, because the tax logic was fine. The bug was in what the customer sees.

How Tickmark works

  1. Tax rules are plain English. Each rulebook is a Markdown file anyone can read and edit: > 8. If the supplier's state and the place of supply are different states, every tax line must be IGST and no CGST or SGST line may appear.
  2. Kane CLI checks them in a real Chrome. It opens each invoice the way a client would and checks every rule as its own assertion.
  3. A Claude Code Stop hook closes the loop. When Claude tries to finish, the hook runs Kane. If a check fails, Claude gets Kane's bug title, root cause, evidence and a suggested fix, fixes the code, and Kane checks again.

Lesson 1: Kane reads brilliantly and adds up badly

In testing, Kane passed "each amount equals quantity Γ— rate" on a line showing 12 Γ— $45.00 = $450.00.

So I split the job: Kane reads, code does the math. Kane copies the numbers and dates off the page, and plain code re-adds every sum and counts every due date.

Even better, Kane can export a test it wrote to Playwright. So Kane writes the "reader" once, and from then on the math check runs offline, in about a second, for 0 credits.

Lesson 2: test what the customer sees

I planted 5 realistic tax bugs, one at a time:

Planted bug Unit tests Kane CLI
IGST only for registered buyers βœ… βœ…
Place of supply defaults to the seller's state ❌ βœ…
Resale certificate ignored βœ… βœ…
Sales tax charged on the whole subtotal ❌ βœ…
Amount in words uses the wrong number ❌ βœ…

Kane 5/5. Unit tests 2/5. Three of the bugs lived in templates and UI defaults, not in the tax logic.

Lesson 3: try it on code you didn't write

I pointed Tickmark at a popular open-source GST billing app (531β˜…) and audited a PDF it exported.

  • Its GST was correct: IGST for an inter-state client, matching GSTINs, the right amount in words.
  • But the invoice contradicted itself: "payment due within 7 days" in the terms, and a due date 15 days out. Both were the app's own defaults.

It also showed me my own mistakes. My rules assumed my own invoice layout. And Kane missed the 7-vs-15-day contradiction until I moved date counting into code. I wrote all of that down in the repo, including a bug Kane didn't confirm.

Use it from any agent

Tickmark is also an MCP server. Ask Claude Code, Claude Desktop or Cursor:

"Does this invoice match the contract we signed?"

…and Kane flags things like a $165/hour rate against an agreed $150, or Net 15 instead of Net 30.

Try it

No account needed for the demo:

npm install
npx playwright install chromium
npm run demo

Built with Claude Code for the #KaneCLIHackathon by TestMu AI. Feedback and new country rulebooks are very welcome. πŸ™Œ

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.