Engineering leads of multi-app deployments
When Cadence + Relay + Quorum run together, the tenancy posture, schema discipline, and cross-app references have to hold. Atlas turns 'we agreed on this' into 'CI verifies this'.
01.5 — Atlas
Atlas declares what every Portiko app must be true about — tenancy posture, schema discipline, cross-app references, polymorphic dispatch — and verifies them mechanically against the live repo. Fails closed on drift; composes the library as one library, not four.
A — Who Atlas is for
Atlas is calibrated for engineering teams running multiple Portiko apps (Cadence + Relay, Cadence + Quorum, or all of them) who want architectural drift caught at CI time, not at the next inspection.
When Cadence + Relay + Quorum run together, the tenancy posture, schema discipline, and cross-app references have to hold. Atlas turns 'we agreed on this' into 'CI verifies this'.
Architectural decisions become enforceable — not just documented. Each invariant is declared, verified, and revisited explicitly. Drift is observable, not implicit.
When Portiko adds a fifth app (or a partner adds their own app alongside ours), Atlas declares what that app must be true about to compose. New apps inherit the invariants; the library stays coherent.
B — How it works
Atlas is organised around the discipline of cross-system architectural enforcement. Each invariant is declared in writing, verified in code, fails closed when it drifts, and composes with the others without redundancy.
01
Every invariant is a markdown file in `atlas/invariants/` naming scope, source ADR, exemptions, and verification path. The declaration is the contract; the script is the enforcement.
02
Each invariant has an executable verifier that reads live repo state — schemas, READMEs, configs, seeded data — and checks the invariant. Verification runs in CI on every push.
03
If an app drifts from a declared invariant, the gate fails the build. There is no 'we'll fix it next sprint' mode. The library composes coherently because every app is held to its declared posture, mechanically.
04
Cadence, Relay, Quorum, Beacon each own their own substrate; Atlas owns what they have in common. The result: four apps that compose as one library, not four parallel codebases.
C — Invariants
Each invariant is a markdown declaration plus an executable verifier. The set is small by design — every invariant has to justify its presence, and every app it applies to has to satisfy it. New invariants are added when the architectural concern is genuinely cross-cutting.
Every app declares its tenancy model (org-id-multi-tenant, institutional-identity, single-tenant) in its README; declarations are non-empty and well-formed.
Apps declaring `org-id-multi-tenant` carry `org_id NOT NULL` on every non-exempt schema table. Exemptions are explicit.
`org-id-multi-tenant` apps depend on `@portiko/schemas` rather than reinventing tenancy primitives.
Every soft-FK column in Relay's SQLite resolves against a live row. Polymorphic (kind, id) references are typed-dispatched; vocabulary drift fails closed.
References from one app's data into another's (e.g. Relay safety-net → Cadence incident) resolve via the published snapshot contracts, not direct DB access.
D — What Atlas shows
Atlas has no UI. The artefacts are the verifier scripts and their CLI output, captured against the live repo state. Both outputs below are verbatim from a recent run — green where every app satisfies the declared invariant, red where any one drifts.
$ pnpm atlas:verify-invariants [atlas-verify-invariants] ok — I1: 5 apps declare posture; I2: 44 tables verified (5 exempt); I3: 2 apps depend on @portiko/schemas.
$ pnpm atlas:verify-references
[atlas-verify-references] ok —
20 fixed edge(s) verified (154 non-null, 0 dangling);
3 polymorphic edge(s) verified
(22 resolved, 4 institutional-fact skipped,
0 dangling, 0 unknown kinds).E — Honest notes
It does not federate queries across apps, broker cross-app data access, or own any persistent state. It verifies; it does not store.
There is no Atlas UI. The artefact is the invariant declarations + executable verifiers. The value is architectural integrity, not a dashboard.
Architectural decisions still get made by humans, with judgement, in written ADRs. Atlas mechanically enforces the decisions once made — the substance is yours, the enforcement is Atlas's.
Five invariants, 13 acceptance tests, verified across all four apps. Engineering-verified; pilot access for teams running multi-app Portiko deployments is by application.
F — Access
Atlas — pilot access
By application
Pricing follows multi-app deployment validation.
G — Common questions