Entity / One domain declaration

How one domain feeds the server, client, and checks

Every rule and query in the domain module uses the Expr language (Expressions), so three independent consumers interpret the exact same declarations:

  1. The server (foldkit-remote-drizzle): Binds Entities to SQL tables (bind), compiles queries and guard rules to SQL (query, source), attaches CHECK constraints (checkConstraints), and executes declared writes (writer, GuardServer.writer).
  2. The browser (foldkit-remote, foldkit-form, foldkit-crud): Tracks cached rows, applies optimistic write layers, places rows in lists, computes Data.can hints, and validates form inputs against Entity.input.
  3. Offline checks (Entity.judge, Laws.check): Evaluates invariants against test rows and verifies declared writes against every rule without touching a database.