# ADR-0002: Monorepo with Bun workspaces

# Context

Three services share a protocol (@bdi/contracts), a signing profile (@bdi/crypto), a policy engine (@bdi/policy), and observability primitives. Independent repositories would make protocol changes expensive (multi-repo PRs) and encourage drift.

# Decision

Use a single repository with Bun workspaces. Each service and each shared package is its own workspace with @bdi/<name>. The root tsconfig.base.json declares path mappings so services resolve @bdi/kernel directly to the source — no build step needed in dev.

# Consequences

# Alternatives considered