Five steps, one log.
Everything Tideline knows arrives as an event: a submission, a bound policy, an in-term signal, a completed audit. Two consumers turn signals into facts; the forecaster reads the facts as of any date. Replaying the log rebuilds every table exactly.
Log
Append-only events in SQLite (node:sqlite). Same id twice is a no-op. Consumers keep a cursor on arrival order, so a permit dated last month that arrives today is still processed.
Match
Which insured is this record about? A weighted vote over FEIN, website, phone, name, city and street, with a margin check against the runner-up. Look-alikes go to review.
Read
What work does the text describe? A model returns class codes with a quote that must appear in the source. Keywords back it up and can only add codes.
Forecast
Five modules (growth, new operations, misclassification, uninsured subs, pay-as-you-go actuals) feed a 400-run Monte Carlo. Out comes P10, P50, P90 and the cited evidence.
Learn
Completed audits are explained from the audit itself, then book segments are tested. A rule ships only when its 95% Wilson lower bound beats the book rate.
Which policy is this?
This runs the engine's own match.ts in your browser against all 48 insureds. Job boards drop the street, permits misspell names, payroll files add a FEIN. Try a typo, a different city, or a wrong FEIN.
What work is this?
Paste a job post, a services page or a permit. The API sends it to the model, which must quote your text for every class code it returns; a quote that isn't in your text is thrown away. The keyword reader runs alongside, so you can compare.
Why "audited minus declared" is wrong.
Premium audits don't count payroll the way a payroll report does. This runs the engine's rules.ts: overtime premium is excluded, officers are held between state limits, uninsured subcontractors become payroll, and a "clerical" employee with field duties moves to the governing class. Rates are illustrative.
REST and MCP, same engine.
REST
GET /v1/book?asOf=2025-10-01
GET /v1/policies/POL-1033/nowcast?asOf=2025-10-01
GET /v1/policies/POL-1033/explain
GET /v1/audit-queue?asOf=2026-02-01
GET /v1/guidelines.csv?asOf=2026-09-01
POST /v1/signals # validated, then matched,
# read and re-forecast
MCP tools
list_alerts policies likely to move at audit get_nowcast P10/P50/P90 + components + evidence explain_policy underwriter note with citations audit_queue field / mail-phone / waive suggested_guidelines learned rules, JSON or GIA CSV ingest_signal add a job post, permit, payroll…
Every claim is checkable
Forecast components cite evidence ids. A model quote that isn't in the source text is dropped; a citation to an id that doesn't exist is removed from the note.
No model needed to run
Without a key it falls back to keywords and templates. On this site the model is called live, server-side, for notes, signals and the reader above. The key never reaches the browser.
Plain stack
Node 22 with TypeScript type stripping, node:sqlite, zod at the boundary, the MCP SDK. 21 tests: rules, matching, quotes, idempotent replay, forecast modules, end to end.