Appearance
Keeping Cadence in One Repository: Consolidating on a Modular Monolith
As Cadence's module catalog grew across study design, EDC capture, CTMS, eTMF, safety, and intelligence, we previously explored splitting the codebase into ten separate product repositories consuming published kernel packages. Before executing that split, we audited where real delivery work was happening: every end-to-end clinical slice spanned the kernel, study build, capture, and qualification suites simultaneously.
In ADR-2603, we formally retired the multi-repository extraction program and committed to developing, integrating, and qualifying Cadence in one repository (fderuiter/cadence-clinical).
Why Premature Repository Splits Slow Regulated Software
Splitting an actively evolving pre-release platform across nine satellite repositories introduces friction without adding architectural safety:
- Cross-repo contract tax: Evolving a kernel abstraction or USDM compiler contract would require sequenced package releases, version bumps, and multi-PR choreography before a single integration test could verify the change.
- Fragmented qualification evidence: Under 21 CFR Part 11 and GAMP 5, proving clinical integrity from protocol version activation through database lock is strongest when one immutable commit SHA pins the kernel, every module, the schema, and the test suite together.
- Commercial packaging is not source topology: Product editions and tenant entitlements can be licensed cleanly over one composition host (ADR-2601) without duplicating CI pipelines or splitting git history.
Enforcing Strict Boundaries Inside One Tree
Keeping one repository does not mean tolerating tangled dependencies. Module isolation is enforced mechanically on every change:
- SDK-only module dependencies (
K-XS-2): Application modules reference onlyCadence.Kernel.AbstractionsandCadence.Kernel.Modules—never kernelDomain,Application,Persistence, orApiinternals (ADR-2600). - Single composition host: Legacy scaffold microservices are dispositioned into in-process modules, merged, or retired under ADR-2610 and hosted together in
apps/kernel-api. - Automated architecture sentinels: ArchUnitNET suites and
pnpm cadence checkverify import boundaries, OpenAPI client types, EF Core schema documentation, and GxP traceability on a single branch before merge—keeping velocity high and boundaries crisp, as tracked in our Project Plan and Goals and Priorities.