Audit evidence and production-hard code from commit one.
Fail-closed Postgres RLS, S3 Object-Lock WORM, and an append-only audit chain sit on the same base as token metering, on-device inference, and signed provenance. Pick the door that fits — the base underneath is the same. Every package is free and on GitHub.
The compliance wedge: fail-closed RLS, WORM evidence storage, an append-only audit chain, per-tenant field encryption, and an evidence-pack generator you run — the technical controls an audit checks for, mapped to SOC 2, HIPAA, ISO 27001, NIST 800-53, PCI DSS, and GDPR, with an ISO 27001 Statement-of-Applicability export. Never a certification we claim.
Five composable module families on one base: token metering and spend caps, on-device inference behind a privacy egress gate, a governed-agent kernel, and cryptographic provenance. Compose what you need — never a fork.
-- tenant context was never set
$ SELECT count(*) FROM invoices;
count
-------
0
(1 row)$ bunx --package @caisson-sh/cli create-caisson
The load-bearing infrastructure cheap boilerplates skip.
Happy-path starter kits get you a login screen. They do not get you through an audit. Retrofitting RLS, WORM storage, and an audit chain into a live multi-tenant database costs months. Start with them.
Prevention at the application layer, with the receipts.
Each control ships with a live artifact you can read, run, and hand to an auditor. No diagrams standing in for behaviour.
Postgres row-level security with FORCE. A query that never set the tenant context returns nothing, never everything. Cross-tenant isolation is a test in CI, not a convention you hope each developer remembers.
ALTER TABLE invoices FORCE ROW LEVEL SECURITY;SOC 2 CC6.1 · HIPAA §164.312(a)(1)
S3 Object-Lock WORM in GOVERNANCE mode, with a recorded escalation to COMPLIANCE mode when you choose it. Inside the retention window an evidence object cannot be overwritten or deleted through any normal path: not by an application bug, and not by an ordinary operator. In GOVERNANCE mode only a principal holding the bypass-governance permission can remove it; COMPLIANCE mode removes that path too.
ObjectLockMode: GOVERNANCE · Retain: 7ySOC 2 CC7.2 · HIPAA §164.312(c)(1)
Every privileged action commits SHA-256 over the previous hash plus its own payload. Tampering with any historical row breaks every link after it, and the break is detectable, provable, and exportable.
sha256(prev ‖ payload) — verifyChain() over every rowSOC 2 CC7.2 · HIPAA §164.312(b)
Real paths. Real code. No screenshots.
The structure of this page is the structure of the codebase. Every path is a real directory; every snippet is copied verbatim from the file its header names (the honest-artifact floor, not a mockup).
Click a highlighted package to read its real code.
- apps/
- sitemarketing + docs, static
- demosthe live module demos
- packages/
- ai-metertoken metering + spend caps
- uithe Apache-2.0 component base
- tooling/
- standards-gatethe one lint / tsconfig / test gate
ALTER TABLE invoices ENABLE ROW LEVEL SECURITY;
ALTER TABLE invoices FORCE ROW LEVEL SECURITY;
CREATE POLICY invoices_tenant_isolation ON invoices
USING (
account_id = NULLIF(current_setting('app.current_account', true), '')
);export function hashChainLink(
prevHash: string | null,
payload: JsonValue,
): string {
return createHash("sha256")
.update(canonicalize([prevHash, payload]))
.digest("hex");
} async verify(accountId: string): Promise<ChainVerification> {
return withTenant(this.db, accountId, async (tx) => {
const entries = await loadEntries(tx, accountId);
// Truncation guard (TM-I): the WORM store is the trusted length oracle. An anchor for a length
// past what the DB can now produce means the tail was dropped — invalid even if the surviving
// prefix is internally consistent (which, being a true prefix, it always is).
const beyond = await this.store.head(
anchorKey(accountId, entries.length + 1),
);
if (beyond !== null) {
return { valid: false, brokenAt: entries.length };
}
if (entries.length === 0) {
return { valid: true, brokenAt: null };
}
const anchorObj = await this.store.get(
anchorKey(accountId, entries.length),
);
const anchor = decodeAnchor(anchorObj.body);
return verifyChain(entries, anchor);
});
} async decryptField(
tenantId: string,
stored: string,
columnContext: string,
): Promise<string> {
const env = parseEnvelope(stored);
const key = await this.provider.keyFor(tenantId, env.keyVersion);
const aad = buildAad(tenantId, env.keyVersion, columnContext);
const cipher = cipherForAlg(env.algId);
let plaintext: Buffer | undefined;
try {
plaintext = cipher.decrypt(
key,
{ nonce: env.nonce, ciphertext: env.ciphertext, tag: env.tag },
aad,
);
return plaintext.toString("utf8");
} finally {
plaintext?.fill(0);
key.fill(0);
}
}The boundary and the evidence trail, drawn to real behaviour.
Two diagrams of shipped behaviour: the fail-closed isolation boundary and the write-to-verify evidence lifecycle. Nothing aspirational, this is what the RLS, audit-chain, and WORM modules already do.
Per-tenant isolation, fail-closed
Tenant context sets one Postgres GUC; the FORCE policy denies any row that doesn't match it. A query that never set the context returns nothing, never everything.
Evidence lifecycle, write to verify
Every privileged write joins the append-only chain, anchors to WORM under S3 Object-Lock, and stays verifiable and exportable as an evidence pack.
- 1 · writea privileged action inserts an audit row
- 2 · audit chainsha256(prev ‖ payload) — append-only, one break cascades
- 3 · WORM anchorS3 Object-Lock GOVERNANCE retention, COMPLIANCE-upgradable
- 4 · verify + exportcaisson audit verify → evidence-pack export
It installs into the stack you already have.
Not a hosted platform, not a new service to stand up. The module layer is packages on your Postgres, and telemetry exports to the collector you already run.
One thing attaches to that stack without a rewrite:
Module or module family: same catalog, two shapes.
Take a single module, or a module family that composes several for one job, and run any of them live in your browser first. Open the marketplace to browse the rest.
27 modules
A single package on its own: field encryption, the eval harness, the agent runner. Every module composes onto the base alone.
5 module families
Compliance, AI-Production, Local-first, Agentic-Dev, or Provenance, each composes the same audited base, never a fork. Everything takes the whole catalog.
26 live demos
Each demo runs the module's own code in your browser: seal a value, tamper with a chain, trip a spend cap, and watch it fail closed.
Five module families, one audited base.
Compliance leads; every module family, and the whole catalog together, draws from the same audited base, never a fork.
Fail-closed RLS, S3 WORM, append-only audit chain, per-tenant field encryption, and a SOC 2 / HIPAA evidence-pack generator.
ALTER TABLE evidence FORCE ROW LEVEL SECURITY;The production-rigor layer cheap AI boilerplate skips: token metering, spend caps, a circuit breaker, versioned prompts, and guardrails.
breaker open: tenant spend cap hitCompute seam, privacy gate, and on-device vector search. Your data stays on-device by default. Own the source.
egress: blocked at the privacy gateThe governed-agent kernel: typed agent/skill/rule schema, a lifecycle state machine, and a hooks dispatcher.
agent · skill · rule — typed, validated, hookedDetached Ed25519 + RFC-3161 signing, an append-only audit chain where one altered row breaks every link after it, and per-tenant field encryption.
caisson evidence verify pack.json → sig ✓ · tsa ✓ · root 2c9f…b7Every module family and every module, including the platform capabilities no persona module family carries: the whole library.
27 modules · one audited baseCompose, don’t fork.
Every module family draws from the same audited base. Modules differ by composition, never by a divergent copy.
| Module | Compliance | AI-Production | Local-first | Agentic-Dev | Provenance |
|---|---|---|---|---|---|
| Postgres base: fail-closed RLS, auth (Apache-2.0) | |||||
| RLS-force evidence collector + isolation tests | — | — | — | — | |
| WORM evidence store | — | — | — | ||
| Append-only audit chain | — | — | — | ||
| Per-tenant field encryption | — | ||||
| Evidence-pack generator + framework mappings | — | — | — | — | |
| Detached Ed25519 + RFC-3161 evidence signing | — | — | — | ||
| Alert pipeline + retention runner | — | — | — | — | |
| Token metering · spend caps · credit ledger | — | — | — | — | |
| Versioned prompts + guardrails | — | — | — | — | |
| CI eval harness | — | — | — | — | |
| On-device vector search | — | — | — | ||
| On-device inference + offline sync | — | — | — | — | |
| Privacy gate (no-egress) | — | — | — | — | |
| Governed-agent kernel + sandboxed runner + tool-exec gate | — | — | — | — |
Pick the path. The module family follows.
Three ways in. Each opens the matching module family's viewer on the marketplace, live demo included.
Every claim is a check in CI.
The proof is the pipeline: the controls are verified on every commit, and the run is green.
Caisson is open source under Apache-2.0, built and maintained by Caisson Software LLC.
The honesty boundary is fixed: Caisson ships the technical controls and generates the evidence. Your organizational controls and the audit itself remain yours. We never imply a certification we don’t hold.
No logo wall yet. Here's what you can check instead.
We're early. No logo wall to point at yet, and we'd rather say that than fake one. Here's what you can verify instead: the base is open source you can read, the changelog is public, the source ships to you to audit, and every UI module card in the marketplace renders its real component, live.
Every package ships under Apache-2.0: the 15-package base (the kernel, auth, tenant isolation, billing drivers, and the generator) and all five module families. Read them, audit them, and share them.
Every release is logged in the open, in plain English: what shipped, release by release. No private roadmap you have to take on faith.
Every module in the marketplace links to its docs and a live demo that runs the real component in your browser. Try it before you read the source.
Handing this to a security review? See the evidence pack
Start with the evidence in place.
Scaffold the audited base in one command, then open the marketplace for the module family or module you need.
$ bunx --package @caisson-sh/cli create-caisson