IF Commons GitHub

Data

Governance (what a business domain is and what must be true of its data), a logical schema made from it, and a physical schema for PostgreSQL, SQLite or DuckDB made from that, with extensions to each, and the lifecycle that changes a database from one physical schema to the next. Modules (governance/module.ts: a subject area as a value that a project composes with others into one domain, so that a module not listed has no table) let a project adopt only the models it needs. Models written as modules: the party model (models/arca), tenancy (models/arca-tenancy: tenants and their hierarchy for B2B and B2B2C) and identity as composable modules on one principal of five kinds (a person, a machine, a device, an AI agent, a group): models/identity (the core: accounts, credentials that hold no secret in the clear, sessions, invitations, domains, policies, a hash-chained audit trail), identity-access (roles with inheritance, separation of duties, role assignments for every kind), identity-abac (attributes and policies), identity-rebac (relationship tuples), identity-pki, identity-machine (workload identities, API keys), identity-device (attestation and posture), identity-delegation (attenuated on-behalf-of) and identity-agent (versions pinned by model and prompt hash, tool grants, runs, budgets, single-use approvals). A library of commons with its own specifications. Roadmap: views that leave out removed rows, a type change that proves it loses nothing, masks and vector indexes as features, and interchange formats for other migration tools (Flyway, Liquibase and Atlas exports).

FactValue
Version0.10.1
Conformance levelL1
Distributedgithub, npm
LicensePolyForm-Noncommercial-1.0.0, source-available: free for noncommercial use, commercial use needs a license from the owner (see Licensing in Start here)
Import it as@intellectual-frontiers/data

Areas

Dataengine/api.ts, governance/api.ts, sql/logical/api.ts, sql/physical/api.ts, issues/mod.ts, models/issues/mod.ts, models/flow/mod.ts, models/proof/mod.ts, models/operations/mod.ts, models/contract/mod.ts, models/meaning/mod.ts, sql/extensions/issues/mod.ts, models/arca-tenancy/mod.ts, models/arca/mod.ts, models/identity/mod.ts, models/identity-access/mod.ts, models/identity-abac/mod.ts, models/identity-rebac/mod.ts, models/identity-pki/mod.ts, models/identity-machine/mod.ts, models/identity-device/mod.ts, models/identity-delegation/mod.ts, models/identity-agent/mod.ts, sql/dialects/postgres/mod.ts, sql/dialects/sqlite/mod.ts, sql/dialects/duckdb/mod.ts, sql/lifecycle/api.ts, sql/extensions/documentation/mod.ts, sql/extensions/views/mod.ts, sql/extensions/access/mod.ts, sql/extensions/routines/mod.ts, sql/extensions/partitions/mod.ts, sql/extensions/generators/mod.ts, sql/extensions/idempotency/mod.ts, sql/extensions/protected-access/mod.ts, sql/extensions/safety/mod.ts, sql/extensions/plan-report/mod.ts, sql/extensions/rewrite/mod.ts, sql/extensions/history/mod.ts, sql/extensions/convergence/mod.ts, sql/extensions/rollout/mod.ts, sql/extensions/integrations/mod.ts, sql/extensions/transforms/mod.ts, sql/extensions/queries/mod.ts, sql/extensions/target/mod.ts, sql/extensions/kinds/mod.ts, sql/extensions/osquery/mod.ts, sql/extensions/osquery-atc/mod.ts, sql/extensions/operations/mod.ts, sql/extensions/invariants/mod.ts, sql/extensions/objects/mod.ts, sql/extensions/assertions/mod.ts, sql/quality/mod.ts, sql/drivers/mod.ts, sql/typed/mod.ts, sql/loads/mod.ts, sql/describe/mod.ts, sql/federate/mod.ts, sql/flow/mod.ts, sql/proof/mod.ts, sql/operations/mod.ts, sql/contract/mod.ts, sql/meaning/mod.ts, sql/typed/generate.ts, sql/typed/models/mod.ts, sql/presets/mod.ts, sql/cli/mod.ts

Imports

Core, Lang Sql, Mizan

Specifications

Folders

FolderWhat it isMay import
spec-kit/The library's own specifications, numbered from 0001.nothing: Markdown and TSV
engine/The extension host: contribution points and handles that layers declare, manifests, compose and lazy activation.the kernel, by package name
governance/The governance layer: domains of concepts and code lists, typed annotations, the vocabularies (documentation, requirements, privacy, security, ownership, quality), identity, the trace graph and lint.engine/, by package name
sql/The logical schema (tables, columns, keys and indexes made from governance by a projection, with the report of the flow and the types of rows), the physical schema (a logical schema bound to a dialect and a case style, as statements) and the dialects of PostgreSQL, SQLite and DuckDB, which are extensions; the extensions are in sql/extensions/: documentation (comments, documentation tables, governance tables), views, access (row-level security and grants from governance), routines and partitions; names that carry a schema are in sql/physical/; protected access (tables in a schema, views over them, rights and a guard) is in sql/extensions/protected-access/; the safety features (quarantine instead of drop, lock discipline, verification) are in sql/extensions/safety/; the plan report (what a plan does in the words of governance, and who must approve it) is in sql/extensions/plan-report/; the rewrite (a table made again where the engine cannot change it, a type cast) is in sql/extensions/rewrite/; the history strategy (a plan frozen into files, replayed, or delivered as a release package or a procedure in the database) is in sql/extensions/history/; the convergence strategy (the plan from the state a database is in, reviewed or autonomous) is in sql/extensions/convergence/; parallel versions (two versions of an application on one database through schemas of views, an expand that destroys nothing, and the retirement of the older) are in sql/extensions/rollout/; integrations (rows, CSV text, an attached database or an adapter landed, checked and loaded by append, upsert, replace or snapshot in one transaction, with a ledger and lineage) are in sql/extensions/integrations/; transforms (models whose SQL asks for names by their words, built in order, each in one transaction with its tests, so that a model whose tests find wrong rows is not published) are in sql/extensions/transforms/; queries (a catalog of read-only queries over the names of a schema, with typed parameters that enter only as literals, verified against a database and compared between versions of a schema) are in sql/extensions/queries/; the ephemeral target (a database that is a build product: one SQL file from governance and typed rows, the same bytes every time, committed and diffed in Git, made into a database in one transaction and checked for staleness) is in sql/extensions/target/; kinds (reference data kept as CSV, read into typed rows, checked against a table and written as a TypeScript module) are in sql/extensions/kinds/; osquery ATC (the auto_table_construction configuration that makes osquery tables from a SQLite database, made from a logical schema) is in sql/extensions/osquery-atc/; operations (the business operations of a model: contracts in governance, run by sql/extensions/operations in one transaction, held to what they declare, with the audit trail written with them) are in sql/extensions/operations/, with the identity decision engine (one decide() for every kind of principal: roles, groups, inheritance, relationships and policies, refusal wins, unknown never allows, delegation never adds), the audit chain and the operations of delegation and agents (delegate, revoke, tool calls with budgets and single-use approvals, the kill switch) in sql/extensions/operations/identity/; the presets (team-managed, dba-managed, reviewed-convergence and autonomous-convergence: each a strategy with the features it needs and the settings it calls for) are in sql/presets/; the generators (diagrams in Mermaid and D2, the data dictionary in Markdown and HTML, row types in Rust and Zod, the register of personal data and security) are in sql/extensions/generators/governance/, engine/, by package name
sql/lifecycle/What changes a database from one physical schema to the next: the hashed state of a database, the changes between two states, the plan of classified steps, the hash-chained ledger and the run on a driver. Strategies and features of migration (idempotency first) are extensions of it.sql/physical/, sql/logical/, governance/, engine/, by package name
models/Arca's typical data models as governance: the party model first.governance/, engine/, by package name
acceptance/The acceptance kits (acceptance/README.md): testing by people or agents, for the experience beyond the code, with their own specifications (acceptance/spec-kit), made-up data and checks, and run apart from the library's tests by bun run acceptance. The first is arcactl-pg, a UAT of arcactl and row-level security on PostgreSQL. Not packed.governance/, sql/, models/, by package name
suite/The tests.anything here

Commands

CommandWhat it does
bun run verifyThe compiler, the specification checker and the rules on spec-kit/, and the tests.

Quality

Quality: 451 tests: 451 passed, 0 failed, 0 skipped, 537 of 537 requirements proved, 13 open issues, 1 open ticket. The tests and issues of the library

Titles, headings, exports, tables, columns and requirements. Esc closes.