0002. In-gem implementations before wrapping proven gems
- Status: Accepted
- Date: 2026-08
Context
The original plan was to wrap proven gems (acts_as_tenant, pundit,
paper_trail, Rails Event Store, Avo) behind OpenLoam conventions. But the value OpenLoam
is proving is the fusion — that tenancy, policy, audit, events, and encryption
all agree with each other and with the tenant boundary on day zero — and whether
an agent can extend that fusion. A pile of third-party dependencies would make
that harder to reason about and test end to end.
Decision
Ship minimal in-gem implementations behind OpenLoam’s own public conventions first —
the smallest surface that proves the conventions and the agent flow. The OpenLoam::
API is the contract; its internals are replaceable.
Consequences
- Fewer moving parts to reason about while proving the thesis; every pillar is readable in one place.
- Swapping a proven gem back in behind the same convention is a later refactor, not a reversal — the contract does not change.
- Some features are intentionally minimal (single-process SSE, deterministic HKDF keys) with the scaling seam documented, not faked.