Flow
Decisions

Architecture decisions

ADRs recording calls that had real alternatives, with reasoning.

These records are binding alongside Architecture unless a conversation explicitly relaxes one. Canonical sources also live under docs/decisions/.

ADRDecision
0001Postgres is the source of truth
0002Not event sourcing, not CQRS
0003HTTP/JSON between services, no broker for sync calls
0004RabbitMQ for delivery — superseded by 0041; transactional outbox pattern retained
0005PII is a property of the event type; PII and non-PII events go to separate topics
0006No runtime schema registry
0007Cedar for authorization, evaluated in process
0008Synchronous calls by default; local copies need a reason
0009Withdrawn — two regional stacks were never validated
0010Identifier strategy
0011One entity spec per entity, everything else generated
0012One Postgres server, one database per service
0013JWT authorization at the service with a trust chain
0014Pagination for list endpoints
0015Domain-scoped outbox and table prefixes
0016Azure Service Bus fanout topology per domain
0017Structured logging and request correlation
0018Shared platform code in common/
0019The handler layer: shared, generated, or hand-written
0020Frontend layering: where a file goes in a Next.js app
0021Datadog log search in the DevOps console
0022pgvector in services/intelligence, a single-service carve-out
0023One sqlc package per domain, and no joins between domains
0024Evidence stays in workspace; intelligence stores pointers
0025Knowledge is company-wide; projects control access to evidence
0026Scheduled work is a scheduler calling an endpoint
0027How trusted a claim is, kept separate from where it is in the workflow
0028Evidence does not need a project
0041Azure Service Bus in all environments; RabbitMQ removed
0043The workspace audit log is a workspace domain
0044Broker owns usage, prices, and budgets
0045Communications is the shared send-and-thread pipe
0046Foundry agents are lifetime × run type
0070HTTP tracing with OpenTelemetry and durable trace context
0098Broker picks a cheaper model in the same family when a person is opted in
0100Broker routing is on by default, graded by a Go check, Jev, then a chat model; an API credential is personal or service

When proposing a change that contradicts an ADR, update the ADR or add a new one — do not treat undocumented choices as settled.