mintmark

System specification

How Mintmark actually works

The complete machine: what runs where, what calls what, what is stored, and where every check stands in the path between a bank feed and a verified commit. Identifiers in the examples below are synthetic.

Topology

Two repositories and three cloud services. The engine is shareable code with zero personal values in it. The book is one person's private data repository — tables, rows, rules, brain memory, the issues docket, and build artifacts. Compute is three serverless pieces that all converge on the book through git.

Cloud Scheduler daily, fixed hour Inbox bucket statement drop zone Slack mention in a thread pipeline · Cloud Run job rebuild + validate + gate ingester · Cloud Run job files documents into the book Remembrancer · service chat session in a fresh clone The book (git) private per-person repo rows · rules · memory · docket The owner merges branches; rules on the docket commit main, or stage sync/<stamp> ingest/<stamp> chat/<stamp> reviews clones fresh every run — no state outside git
compute (Cloud Run) records (git + object storage) human surfaces
Every writer converges on the book. Only the pipeline's braingate-approved runs touch main; everything else is a branch a human merges.

Three properties fall out of this shape:

The daily run

Once a day — or on demand — the pipeline job rebuilds the entire book from its inputs and proves the result. Rebuilding from scratch is the point: the ledger is a derivation, so any run can be reproduced, and no stale intermediate state can hide.

Aggregator feeds multiple rails per book Statements & exports via the ingester Raw archive (bucket) create-only snapshots, first Reconcile into rows per-account balance gate: match the feed to the cent, or defer Rebuild the book merge · transfer matching · tagger · re-merge Mechanical validators anchors: docs vs ledger, per account integrity: three invariants exchequer: blocking set + docket sweep Prices & dashboard mark to market, render one file The braingate reads evidence + full diff, memory + read-only tools ✓ commit push main directly ⏸ stage branch; human reviews ✕ block nothing is written Slack digest one line + verdict thread Feed failures never abort the run: yesterday's archive still proves the book. Unmatched transfer legs with an in-book destination become tracked expectations, aged daily until the counterpart posts. A failed step publishes its error text into the braingate's evidence — the gate judges failures it can read. Unsure is stage, not commit. Every brain failure is stage.
pipeline steps records human surfaces ✓ commit ⏸ stage ✕ block
The daily derivation. Every arrow is code; the only judgment call in the diagram is the braingate's, and its failure mode is a branch, not a commit.

What is stored, and where

StoreContentsDiscipline
Book repo — inputs Account/asset/anchor/document tables; extraction row files; tag rules; brain memory (working memory, institution quirks, decision journal); the Exchequer docket; tenant config. The editable surface. Machines and humans change inputs through reviewed commits; every row carries its source.
Book repo — artifacts The ledger, validation reports, the blocking set, transfer and in-transit views, price/split caches, the rendered dashboard. Derived, never hand-edited. Rebuilt from inputs every run; fixing an artifact by hand is the cardinal sin. The chat brain is prompt-forbidden from it and the diff would betray it anyway.
Object storage The document archive (statements, exports, tax forms); the inbox drop zone; raw feed snapshots. Create-only. Snapshots archive before any code interprets them, so every downstream decision is reproducible from the raw capture. Originals are never deleted by machines.
Engine repo Pipeline, parsers, validators, braingate, Exchequer, Remembrancer, sync rails, tests, the leak auditor. Tenant-free by construction: no account id, balance, institution binding, or personal path. An automated audit sweeps source, module constants, and git history against a corpus of real values from the book and fails the build on any hit.

The checks, in order of authority

Layered so that each catches what the previous cannot. The first three are mechanical and blocking; the docket holds what is real but not false; the braingate judges meaning.

1 · Conservation, at parse time

Every document parser must reproduce the document's own printed totals — opening balance plus activity equals closing balance — before its rows are accepted. A parser that reads the right columns of the wrong table fails loudly, at the source, not three stages later.

2 · Balance gates, at the rails

Feed rows book only if the account's rebuilt ledger then matches the feed's stated balance to the cent. No match — that account's rows wait, and the gap is named. One bad account never poisons the rest of the book.

3 · Anchors and integrity, at the book

Anchors: hundreds of balances printed by real documents, reconciled against the rebuilt ledger per account, per date, exactly. Integrity: three invariants over all accounts and all time —

A violation of any of these means the book is false, and the run cannot commit. There is deliberately no override button — the only exits are fixing the data, or declaring a documented exception in config through the same reviewed-commit path as everything else.

4 · The Exchequer

Everything open but not false: a transfer leg past its pairing window, a staged branch nobody merged, a feed account with no mapping, a question the braingate wants a human to answer. One row per stable fingerprint, a per-class deadline, and a lifecycle the machine drives:

pending condition inside its window ⏱ open on the docket, in the digest snoozed until a date the owner names ✓ resolved auto, when the condition clears wontfix terminal, by the owner only deadline passes owner rules snooze expires condition returns → reopens, never duplicates ✕ blocking integrity + anchors derived every run no close button — opens because the computation says so, closes when it stops saying so
⏱ open (late) ✓ resolved ✕ blocking (false)
False versus late. The right-hand lane never mixes with the left: a blocking issue cannot be snoozed, resolved, or wontfixed by anyone.
Docket classDeadlineBorn from
transit-leg-unpaired10 daysa transfer leg whose counterpart hasn't posted on its own rail inside the window
stale-staged-branch3 daysa machine branch nobody merged — age read from the timestamp in its name
unmapped-feed-accountimmediatea feed account with no mapping: invisible money is an issue from day one
brain-flagraised by the braingate's verdict; the one class never closed by machine, because a question is answered by a human

Deadlines are per-class and tenant-tunable. The tag-review backlog is deliberately not docketed — a queue with a thousand rows is a queue nobody opens; categorization has its own surface.

5 · The braingate

The last check reads for meaning. A headless AI session runs inside the rebuilt working tree with the evidence (step results, counts, validator output, error tails of anything that failed), the full diff, its three memory files, and read-only tools to verify anything the evidence leaves open. Its contract:

This layer earns its keep on the failures arithmetic cannot see: it has refused a run whose only defect was silently corrupted reference data — every mechanical validator green — because the diff contained a change the evidence didn't explain.

The Remembrancer

The conversational half. The daily digest threads into Slack; the owner answers in the thread; the Remembrancer turns the answer into a reviewed change:

  1. A mention opens a session: fresh clone of the book, an AI with full tools inside that clone, prompted with the thread and the brain's memory files.
  2. It applies the decision the owner stated — row edits, rule changes, docket rulings, journal entries — citing the owner's words as authority. Ambiguity means it asks instead of editing; a question with no changes is a valid outcome.
  3. Code, not the model, decides what happens next: git status says whether anything changed, and the validators say whether it may be pushed. Green and changed → a chat/<stamp> branch with the diff summary in-thread. Validator failure → the verbatim report, and nothing pushed.
  4. The owner merges. The mainline is unreachable from this service by construction — the branch namespace is a compile-time constant, and the refspec is re-checked before every push.

Transport security is the boring kind that works: every request must carry a valid signature inside a five-minute replay window, an unset signing secret refuses all traffic rather than defaulting open, and duplicate event deliveries collapse on an id ring so a retry can never run a second session.

The engine/book boundary

The engine repo can be read by anyone; the book repo can be read by its owner. Holding that line is a build gate, not a promise: a leak auditor builds a corpus of thousands of real values from the book — account numbers, institution strings, document ids, amounts — and sweeps the engine's source, its module-level constants at import time, and its entire git history for any of them. Any hit fails the build. Institution formats are engine code; institution bindings are tenant data reaching the engine as parameters.


Why it works this way →