Mainworthy: one record, one operation layer

Mainworthy: one record, one operation layer An architecture diagram generated by Archify. human · Person in a browser · Architecture component human Person in a browser ci · Pipeline that runs tests · Architecture component ci Pipeline that runs tests agent · Agent using MCP · Architecture component agent Agent using MCP src/web · React browser UI · Architecture component src/web React browser UI src/cli · mainworthy report; mainworthy gate · Architecture component src/cli mainworthy report; mainworthy gate mcp · stdio or HTTP; ten tools · Architecture component mcp stdio or HTTP; ten tools formats/junit · ci-env · parseJUnit · detectTarget · Architecture component formats/junit · ci-env parseJUnit · detectTarget src/core · Pure logic; no I/O · Architecture component · Browser and server src/core Pure logic; no I/O Browser and server http · POST /api/p/:project/:op · mainworthy container · one Bun server process http POST /api/p/:project/:op OPS · 15 operations; one registry · mainworthy container · one Bun server process · src/server/ops/index.ts OPS 15 operations; one registry src/server/ops/index.ts identity · actors · grants · tokens · mainworthy container · one Bun server process identity actors · grants · tokens invoke · invokeAsync · Parse, authorize, execute · mainworthy container · one Bun server process · One operation implementation invoke · invokeAsync Parse, authorize, execute One operation implementation suite · cases · versions · proposals · mainworthy container · one Bun server process · seal facts; adopt standing suite cases · versions · proposals seal facts; adopt standing evidence · tests · results · signatures · mainworthy container · one Bun server process · Basis on every result evidence tests · results · signatures Basis on every result runs · runs · run_tests · slots · mainworthy container · one Bun server process · Four-verdict gate runs runs · run_tests · slots Four-verdict gate decisions · questions · answers · decisions · mainworthy container · one Bun server process · raise; answer; settle; undo decisions questions · answers · decisions raise; answer; settle; undo reportSteps · acceptReport then processBatchSteps · mainworthy container · one Bun server process · COMMIT; then slices of 200 reportSteps acceptReport then processBatchSteps COMMIT; then slices of 200 Witness · Proof of a recorded decision · mainworthy container · one Bun server process · settle is the only mint Witness Proof of a recorded decision settle is the only mint policy · policies; versioned clause table · mainworthy container · one Bun server process · loose · standard · strict policy policies; versioned clause table loose · standard · strict src/server/kernel · Db · Ctx · migrations · app · mainworthy container · one Bun server process · All modules use Db src/server/kernel Db · Ctx · migrations · app All modules use Db app.gate · WriteGate; one queued writer · mainworthy container · one Bun server process app.gate WriteGate; one queued writer app.db · Writer connection · mainworthy container · one Bun server process · Two report transactions app.db Writer connection Two report transactions Reader threads · A read-only connection each · mainworthy container · one Bun server process · A read never waits for a write Reader threads A read-only connection each A read never waits for a write mainworthy.db · One SQLite file; WAL · mainworthy-data · one volume · mainworthy-data volume at /data mainworthy.db One SQLite file; WAL mainworthy-data volume at /data POST report POST schemas schemas OPS MCP_OPS dispatch capabilities report settle adopt linkTest; setExcuse closeRun clauseFor writePolicy via adopt Ctx writes queue one writer read Ctx commit snapshot write Ctx mainworthy container · one Bun server process mainworthy-data · one volume Legend Frontend Backend Database Security External