The engines are pure TypeScript with no runtime dependencies. You can import them, drive them from tests, and get the same answers the product does.
Money as branded bigint paise, a chart of accounts whose types fix normal balance sides, an append-only journal, and a ledger that projects over it. Statements, cash flow, health scoring, invoicing, tax and bank feeds build on those.
attachErp(org, options) layers periods, contracts, revenue recognition, payables, schedules, FX, reconciliation, metrics, close management, agents and connectors onto an organization — additively, without changing the core.
Every mutation that can reach the engines is enumerated. A command not in the registry is refused rather than executed, so the surface that survives a restart is a list you can read rather than a property you have to trust.
A provider interface, an orchestrator that routes every tool call through the engines, and verifyNarration, which rejects any answer containing a figure no tool produced.
npm install && npm run build && node demo/server.js — the site,
the assistant dashboard and the ERP console, on a seeded company.
node demo/erp-close.js — CRM sync through contract, billing, recognition,
subledgers, agents, close and lock, printed as it happens.
node demo/persistence.js — records one month per invocation into an on-disk
Postgres and rebuilds the books from the log each time. Run it repeatedly; the books grow
across processes and nothing is ever written out as state.
npm test — the whole suite, including replay-identity against real Postgres
compiled to WASM rather than a mock.
Every decision, with its reasoning and the bugs the tests caught.