ADR 0001 — Modular monolith package boundaries

Status

Accepted

Context

Inbox Agent must keep provider SDKs, AI models, and UI from leaking into the canonical domain. MAIL-71 requires CI-enforced package boundaries before later streams implement persistence, auth, and privacy.

Decision

Use one repository with npm workspaces and explicit packages. Enforce forbidden imports with a repository script and Vitest coverage of ui→providers, domain→ai, and ai→providers.

Consequences

Later tickets implement inside these packages instead of inventing a new layout. Domain remains free of Next.js, Graph/Gmail SDKs, Postgres clients, and AI SDKs.