mintmark

System specification

How Mintmark actually works

What the book is, how data enters it, how it derives from nothing but its own files, and where every check stands between an arriving value and a number you trust.

The book is a list of transactions

One atom: the transaction — a dated, signed quantity of one unit in one account. The book is that list. There are no transaction types: spend, income, transfer, buy, sell and corporate action are readings of structure, computed at read time, never stored kinds. A negative quantity is money out; a positive one is money in; a group ties legs into one event and must balance to the cent.

Every transaction carries its source — a document, a feed record, or your explicit instruction — and a status:

  • Pending: work in progress — a one-legged transfer, an uncategorized charge.
  • Settled: may violate nothing. The full rule set runs at settle time; any failure refuses. Settled is true state.

The cast

A small cast of officers keeps the book. Each role is enforced by code.

The Tidewaiter works the intake lines

The customs officer who boarded arriving ships on the tide. Every feed row and statement is opened here — rows read out, printed balances set aside as anchors, every value stamped with its source.

The Binder derives the book

Bookbinding is assembling loose pages into a volume; the Binder does the same from truth files alone — merge, transfer-matching, tagging, the lots fold. Any state the book has ever been in can be reproduced by replaying those files.

The Gauger runs the audit

The excise officer who measured every cask against its declaration. Reconciles each account's cumulative settled transactions against every balance your documents printed — to the cent — and checks the archive, references and registries. Runs continuously; reports, never vetoes.

The Exchequer keeps the docket

The court of open matters. Every question the book cannot answer — a dedupe suspect, a judgment call, an audit failure — is filed as a docket item, fingerprinted, aged, and closed only by a recorded ruling.

The Remembrancer the agent

The medieval officer who kept the record of outstanding matters. In-app chat and the MCP connector an AI assistant speaks through. Reads the whole book, drives the same actions the screens do: propose, tag, group, draft a parser. May propose anything; settles nothing.

Intake: how a row is admitted

A rail is a live feed — a bank aggregator, a price source — fast and untrusted; it creates pending transactions and quotes but never verifies. A document is evidence: a statement, a form, a receipt, hashed into a content-addressed archive, which creates pending transactions and the anchors the book must reconcile against. Both run the same six-stage sequence; deterministic layers run first so the model handles only the residue.

Rails (feeds) fast, untrusted Documents evidence + anchors 1 · Receive stamp the source 2 · Resolve accounts map, or discover 3 · Dedup pending & settled 4 · Structure group the legs 5 · Meaning rules, then a guess 6 · The queue pending, for you Every stage emits proposals, never truth. Each proposal names its proposer — source, rule, matcher, or model — and the rationale behind it. A document with no parser stops at Receive and waits for one to be written.
feeds documents pending queue
The six stages of intake. Deterministic work shrinks the problem; the model runs last, over the residue.

Documents are parsed in two layers. Format parsers ship with the engine and are institution-blind: bytes to raw structure by file type — PDF to text and tables, CSV to rows, OFX to records, images to OCR text. Extractors live in your book, one per statement layout, turning that raw structure into rows and anchors. When no extractor matches, the agent reads the layout once and drafts one as code you review and settle — from then on, that layout is deterministic. Saved code, never a fresh guess per document.

One derivation path

Actions never touch the read model directly. An action validates, writes the truth files, and the read model re-derives from those files — the same function that runs on a cold start from a fresh clone. The commit that follows is serialization, not logic.

action arrives (settle a batch, edit a tag, move a panel)
  → validate against the current read model
  → write the truth files in the working checkout   ← the ONLY write
  → re-derive the read model from the files          ← the ONLY derivation
  → debounced git commit of the touched files        ← plumbing, no logic

The read model — a SQLite database of closures, running sums, the lots fold, concept outputs — is disposable: delete it and it re-derives identically from the truth files.

The audit, and why it never blocks

Validity is checked in two places. The settlement gate is synchronous and entity-local: tags exist and fit, requirements met, the group balances — any failure refuses the settle. The audit is asynchronous and whole-book:

  • Anchor reconciliation — cumulative settled transactions per account and unit, measured against every settled anchor, to the cent.
  • Archive integrity — every document hash still resolves to a stored blob that still hashes to it.
  • Referential and registry integrity — no dangling references; the tag graph acyclic; every requirement's target real.
  • Aging — in-flight transfer legs and pending work past their deadline.

A failed check changes derived state, never truth. It marks the affected span unreconciled — a badge that follows every figure drawn from that span — and raises a fingerprinted docket item. It never undoes a settlement or blocks one.

The docket

Items are snoozable to a date with a reason, and carry a deadline. Resolved items stay: the durable record of point-fact decisions (“these two are not the same money”) that no general rule can encode. The agent reads the docket before it proposes.

The agent

Everything in the system is an action — create, edit, tag, group, settle, resolve. The screens, the MCP connector, and the agent all drive the same actions through the same validation and derivation.

The agent reads the whole book, proposes in plain language, and waits for your reply before executing. Even an approved action lands as pending; settlement still requires its own explicit ask and confirmation. The confirmation is conversational and cannot be self-approved. Tags you settle feed back into the meaning stage as rules — so future charges arrive pre-tagged, and the proposals improve from your decisions.

Analytics

Spend and income are not tags — they are concepts: named, versioned SQL queries over the read model. The engine ships a few (spend, income, net worth, returns); yours are SQL the agent drafts and you settle — saved definitions in your book, not one-off renders.

A panel renders one concept. Pin it to your home screen and it updates itself from the same definition next month. Your home is a composable grid you arrange. Returns report both ways: time-weighted to judge the holdings, money-weighted to judge your timing.

Topology

Two repositories and one running writer. The engine is shareable code, tenant-free. The book is your private data repository — registries, transaction files, the archive, rules, concepts, the docket. One writer owns the book at a time; every screen and the agent are thin clients.

Web & phone (PWA) thin clients Agent · chat & MCP natural language Rails & documents feeds in, statements in The writer one running process read model · one action API rail pollers The book (git) your private repo files · archive · rules Engine (code) shareable, tenant-free commits runs
compute records (git) human surfaces
One writer, many thin clients. Every change to the book is a git commit with an author, a diff, and a reason.

Git is the datastore: every book state is a commit hash, backup is a push, and the record of your rulings is the log — a commit maps to an action, not a keystroke. Any git remote works. The same engine runs on your laptop or your own always-on infrastructure without a single code path branching on which.

What is stored, and where

StoreContentsDiscipline
Book — inputs Account, unit, anchor and document registries; transaction files; tag rules; concepts; the docket; book settings. The editable surface. You and the agent change inputs; every row carries its source.
Book — derived The read model — closures, running sums, the lots fold, concept outputs — re-derived on boot and after every write. Derived, never hand-edited. Delete it and it reproduces byte-identically from the inputs.
Document archive Statements, forms and receipts, content-addressed by sha256, stored in the repo (or an object backend for outsized archives). Immutable and append-only. The audit verifies every hash still resolves and still matches.
Engine Truth stores, the derivation, intake, rails and format parsers, the audit, the actions and API, shipped defaults. Tenant-free by construction: no account id, balance or institution binding lives in engine code.

Why it works this way →  ·  Source on GitHub →