Services
Shared packages
Packages provide configuration, contracts, permission resolution, Drizzle schema/database access, authentication helpers, provider clients, structured logging, and UI primitives.Request and job flow
Trust boundaries
- Browser input never supplies authoritative workspace roles or provider membership.
- OAuth audiences and host-scoped sessions are separated by product surface.
- Studio ingress signs the exact JSON bytes with an experience-scoped secret.
- Provider credentials stay in server configuration or protected storage.
- Cross-workspace and restricted-record reads are checked in the API and database queries.
Data model principles
- Reviewed SQL migrations evolve operational constraints.
- Append-only audit and history structures preserve important changes.
- Identity ownership is distinct from imported or discovered member records.
- Queued work records requested, desired, and observed provider state separately.
Guided walkthrough

The user-visible Activity model reflects the architecture's durable request, worker, and provider boundaries.
Operating procedure
1
Trace the ingress
Identify browser, Discord, Studio, webhook, or member portal as the trust boundary.
2
Resolve tenant and actor
Authenticate the correct audience and bind every operation to its workspace.
3
Commit durable intent
Persist idempotency, policy revision, and target information before provider work.
4
Execute in the worker
Recheck authority and current state immediately before external mutation.
5
Read back and audit
Store the provider-confirmed outcome and expose it to the originating record.