Work / Fintech & RegTech

AccountWard

Turns a conservator’s bank statements into a balanced draft California court accounting, reconciled to the penny.

Status
in-build
Role
Solo: designed and specified it, directed Claude Code agents through the build
Timeline
Jul 2026 →
  • TypeScript
  • Next.js 15
  • React 19
  • Tailwind CSS 4
  • Postgres 16
  • PGlite
  • pdf-lib
  • pdf.js
  • Tesseract OCR
  • Rust (Tauri shell)
  • Vitest
  • GitHub Actions
  • Gitleaks

Live demo

Break the ledger

Twenty synthetic transactions, two accounts, one quarter. Re-file any row and watch the schedules and the tie-out recompute in integer cents.

Tied out to the penny.

Charges
$91,260.82
Credits
$91,260.82
Δ
$0.00

Try one

Or re-file any row yourself. Every total below is recomputed in integer cents.

Transactions · Synthetic conservatorship, Q1 · 20 rows

  1. 01/02SOCIAL SECURITY BENEFIT · CHK$1,843.000.98. Votes: Rules: Public benefits; Exemplar: Public benefits; Model: Public benefits.
  2. 01/03MONTHLY PENSION DEPOSIT · CHK$2,216.400.98. Votes: Rules: Pensions and annuities; Exemplar: Pensions and annuities; Model: Pensions and annuities.
  3. 01/05RESIDENTIAL CARE FACILITY JAN · CHK−$6,450.000.98. Votes: Rules: Residential care facility; Exemplar: Residential care facility; Model: Residential care facility.
  4. 01/08PHARMACY #0417 · CHK−$84.370.92. Votes: Rules: Medical and insurance; Exemplar: Medical and insurance; Model: abstained.
  5. 01/12IN-HOME CAREGIVER WEEKLY · CHK−$1,120.000.98. Votes: Rules: Caregiver expenses; Exemplar: Caregiver expenses; Model: Caregiver expenses.
  6. 01/15ONLINE TRANSFER TO SAVINGS · CHK−$2,500.000.98. Votes: Rules: Transfer between own accounts; Exemplar: Transfer between own accounts; Model: Transfer between own accounts.
  7. 01/15ONLINE TRANSFER FROM CHECKING · SAV$2,500.000.98. Votes: Rules: Transfer between own accounts; Exemplar: Transfer between own accounts; Model: Transfer between own accounts.
  8. 01/20SUPPLEMENTAL HEALTH PREMIUM · CHK−$312.180.75. Votes: Rules: Medical and insurance; Exemplar: Medical and insurance; Model: General administration.
  9. 01/31INTEREST PAID · SAV$41.270.98. Votes: Rules: Interest; Exemplar: Interest; Model: Interest.
  10. 02/02SOCIAL SECURITY BENEFIT · CHK$1,843.000.98. Votes: Rules: Public benefits; Exemplar: Public benefits; Model: Public benefits.
  11. 02/03MONTHLY PENSION DEPOSIT · CHK$2,216.400.98. Votes: Rules: Pensions and annuities; Exemplar: Pensions and annuities; Model: Pensions and annuities.
  12. 02/05RESIDENTIAL CARE FACILITY FEB · CHK−$6,450.000.98. Votes: Rules: Residential care facility; Exemplar: Residential care facility; Model: Residential care facility.
  13. 02/10HOME HEALTH AGENCY COMBINED INVOICE · CHK−$1,000.01you. Votes: Rules: Caregiver expenses; Exemplar: Medical and insurance; Model: Caregiver expenses.
  14. 02/14RETAIL STORE CLOTHING · CHK−$146.520.92. Votes: Rules: abstained; Exemplar: Living expenses; Model: Living expenses.
  15. 02/18COUNTY CLERK CERTIFIED COPIES · CHK−$45.000.60. Votes: Rules: General administration; Exemplar: abstained; Model: abstained.
  16. 02/27INSURANCE REIMBURSEMENT CLAIM · CHK$268.440.75. Votes: Rules: Refunds and reimbursements; Exemplar: Medical and insurance; Model: Refunds and reimbursements.
  17. 02/28INTEREST PAID · SAV$38.910.98. Votes: Rules: Interest; Exemplar: Interest; Model: Interest.
  18. 03/02SOCIAL SECURITY BENEFIT · CHK$1,843.000.98. Votes: Rules: Public benefits; Exemplar: Public benefits; Model: Public benefits.
  19. 03/05DIVIDEND INDEX FUND · CHK$187.660.98. Votes: Rules: Dividends; Exemplar: Dividends; Model: Dividends.
  20. 03/16PROFESSIONAL FIDUCIARY FEE COURT APPROVED · CHK−$1,875.000.75. Votes: Rules: Fiduciary and attorney fees; Exemplar: General administration; Model: Fiduciary and attorney fees.

Synthetic data written for this demo: no real accounts, payees or client records. The votes are scripted to show the scoring rule.

TL;DR

  • A pure TypeScript engine that works only in bigint cents turns bank and brokerage statements into draft California GC-400 court accountings that tie out to the penny.
  • Three separate methods vote on every transaction. Anything under 0.9 confidence, including every split vote, goes to a human, least certain first.
  • 924 tests pass in CI. Every court page stays stamped DRAFT until an attorney and a design partner sign off on the field maps.

The problem

A California conservator has to account to the court for every dollar they manage. The Judicial Council’s GC-400 schedules want receipts, disbursements, gains, losses and property at carry value, period by period, and the charges have to equal the credits. The raw material is a stack of bank and brokerage statements.

There are 913 professional fiduciaries with an active California license (state bureau count, December 2025). The tools with California-format output still depend on manual entry, and service bureaus sell the same result as human labor. A 25-entrant market map I had research agents build mid-project, with every claim graded by source quality, found no verified product that goes from statements in to a court accounting out, end to end.

In a court filing, one wrong cent is a problem. A silently dropped transaction is worse.

What I built

I designed and specified AccountWard as a product, not a demo, then directed Claude Code agents through the build: 143 commits in a TypeScript monorepo with engine, ingest, PDF, store, web and desktop-shell packages. I opened the repo the day after the estate-settlement hackathon where a friend and I built Warrant + Forge.

  • Engine. Pure TypeScript with no floats and no I/O. The whole accounting is recomputed deterministically from the transactions. It nets transfers between accounts, tracks property at its inventory carry value and books gains and losses on sale. It enforces two invariants: charges equal credits in every period, and every transaction lands on a schedule.
  • Screens. The same engine runs five deterministic elder-financial-abuse detectors, checks bond sufficiency against the CRC 7.207(b) tiers and drafts Reg E dispute letters that cite only verified sections.
  • Classifier. Three separate methods vote on each transaction: deterministic payee rules, a nearest match against human-approved examples, and a model vote that has to pass a strict JSON gate or abstain. Agreement sets the confidence: 0.98 for three of three, 0.92 for two plus an abstention, 0.75 for a two-to-one split. A local or hosted model plugs into the third slot; the demo runs a deterministic stand-in.
  • Ingest. CSV in several bank layouts, OFX/QFX, text PDFs, and scans read by local OCR. A PDF or scanned statement has to reconcile to its own printed balances, or the whole statement is refused instead of guessed at.
  • Output. Fills the real Judicial Council PDFs with pdf-lib: 49 of the 52 forms in its rulebook. Every page is stamped “DRAFT — NOT FOR FILING”.
  • Security. Tenant row-level security in Postgres, a SHA-256 hash-chained append-only audit log with an in-app verifier, AES-256-GCM encrypted case archives, TOTP MFA and secret scanning in CI.
  • Rulebook. 106 records (forms, statutes, county rules and state bureau facts), each citing its primary source and the date it was retrieved.

The guardrails are part of the product: AccountWard never holds or moves client money, never gives legal advice and never trains on client data.

Key decisions

  • Decision: bigint cents in a pure, I/O-free engine. Why: zero floating-point drift, and a recompute anyone can audit. Trade-off: more verbose arithmetic, with conversions at every edge.
  • Decision: three methods vote and a human takes the split. Why: a wrong category should need several methods to fail the same way. Trade-off: in the default build the rules and the stand-in both read payee text, so the votes are only partly independent, and consensus accuracy isn’t measured yet.
  • Decision: refuse rather than guess. Why: a quiet error must never reach a court filing. Trade-off: a fiduciary reviews every output, and some statements need manual entry.
  • Decision: provenance on every legal fact. Why: any form or statute traces back to courts.ca.gov or leginfo. Trade-off: the sources have to be re-checked as they change.

The hard part

Balanced is not the same as correct. A tie-out that only checks charges against credits passes even when a transaction is silently dropped, because the missing money never reaches either side of the equation.

So completeness is a second invariant. Every transaction has to land on a schedule, and the engine works out which unaccounted items a recategorization could fix and puts those at the top of the review queue, ahead of low-confidence items. The tie-out banner has three states: green “to the penny”, red with the exact delta to chase, and “incomplete”, which overrides both.

The fixtures balance across three consecutive periods and cover transfer netting, gains and losses against carry value, bond tiers and a rounding-torture test that splits odd cents twelve ways. After the agents built it, I turned agents on it: a 112-agent adversarial audit confirmed 43 defects, two independent verifier agents re-checked each one, and each fix landed behind a test that failed first.

Results

  • 924 tests pass in CI on main, including a store suite that runs against a real Postgres 16 service.
  • 49 of 52 court forms fill from field maps marked PROPOSED.
  • The synthetic demo corpus (684 transactions over 24 months across 3 accounts, with 12 planted hard cases) shows the hard part working. Charges equal credits at $2,072,757.95 in both periods, yet 9 transactions reach no schedule, so the engine reports the account as balanced but not complete and refuses to fill the court summary form. Those 9 are the review queue. After 8 review decisions the account is complete, and the GC-400(SUM) fills with line 7 = line 14 = $1,129,130.70.
  • The DRAFT gate is deliberate: it stays shut until an attorney and a design partner sign off on the field maps.

What I’d do next

  • Run the model vote against a real local model and measure accuracy by vote pattern: three of three, two to one, single vote.
  • Get the attorney and design-partner sign-offs that open the DRAFT gate.
  • Fold the Warrant + Forge estate-settlement engine into the same platform for professional fiduciaries (planned; no shared code yet).
  • Fix the scheduled source-staleness check so the rulebook is re-verified on schedule.
  • Code: private repo, walkthrough on request.
  • Where it started: Warrant + Forge
  • The design rule behind the classifier: The Council

Verified numbers

MetricValueSource
Tests passing in CI on main (16 skipped)924github.com/mit37/BPJ1/actions/runs/35751911649
Court forms that fill from field maps, every page stamped DRAFT49 of 52mit37/BPJ1/packages/pdf/test/form-coverage.test.ts
Active California professional fiduciary licenses, Dec 2025913mit37/BPJ1/rules/pfb.json
Legal rulebook records, each with its primary source and retrieval date106mit37/BPJ1/rules/*.json
Defects confirmed and fixed by a 112-agent adversarial audit43mit37/BPJ1/docs/next.md:28-36
Synthetic demo corpus, balanced to the penny in both periods684 transactions · 24 months · $2,072,757.95mit37/BPJ1/README.md:15-25
m.mittal
Home
Work
Research
Lab
About
Experience
Now
Résumé
Uses
Colophon
Contact
AccountWardin-build
Redlbuilt
The Councilresearch
BEMAresearch
EXIT LIQUIDITYin-build
NEXUSarchived
Warrant + Forgebuilt
Concordarchived
BlueCollarPalin-build
Chispenbuilt
Warrant Portalbuilt
JobAppin-build
Night/Dayexplored
BLACKSITE: NULLin-build
SlugBitesbuilt
Riptidebuilt
AeroBitesarchived
Internbuilt
CAD & 3D printingexplored
ForgeCouncilexplored
ADDE: adversarial due-diligence engineexplored
Model routing in practiceexplored
AI due-diligence market mapexplored
Quorumarchived
Colossus Wakeexplored
FitFindrbuilt
Project Omniexplored
Oblivionexplored
MeetWisebuilt
EyeOSexplored
LinkLeap AIexplored
Up-Toexplored
Offline speech-to-notes (Java)explored
AI-assisted game production pipelineexplored
COLLAPSEarchived
THE TRIALSarchived
EcoNodearchived
ESP32-S3 / LoRa benchexplored
CleanPlaybuilt
Rezonyrbuilt
Habit Tracker Telegram Botbuilt
Job Board Aggregatorin-build
Visual Hand Trackbuilt
CLI Task Trackerbuilt
All work44 entries
Can’t Hallucinate, Can Still Be Wrong: Calibration of a Typed-Decision Model Under Input Noisepaper
Disagreement as Signal: A Hybrid Multi-Agent and Council Architecture for Error Detection in LLM Systemspaper
Killing Good Ideasessay
Uncorrelated Failure Modesessay
ADDE: adversarial due-diligence engineexplored
AI due-diligence market mapexplored
AI-assisted game production pipelineexplored
Aura Chatexplored
Colossus Wakeexplored
EcoNodearchived
ESP32-S3 / LoRa benchexplored
EyeOSexplored
FitFindrbuilt
ForgeCouncilexplored
LinkLeap AIexplored
MeetWisebuilt
Model routing in practiceexplored
Offline speech-to-notes (Java)explored
Oblivionexplored
Print benchexplored
Project Omniexplored
Provably-fair outcome enginebuilt
Quorumarchived
Up-Toexplored
Copy hello@mitanshm.com
Switch theme
Play motion
RésuméPDF
Open GitHub ↗mit37
Open LinkedIn ↗
Toggle layout gridh
Toggle single-key shortcuts/ h