EVIDENCE CASE
Tightening Contracts boundaries without distributing the architecture
A real STRATA Contracts review used the complete Architecture & Engineering pack to preserve a justified modular monolith, reverse a persistence dependency, centralize lifecycle legality, document the decision, and land the correction as a bounded verified refactor.
01
Problem
Correct ownership and lifecycle-rule drift in an active Contracts slice without adding a network service, migration, UI feature, replacement service, or speculative transaction framework.
02
Methods applied
- 01Choosing Application ArchitectureMakes architectural topology a traceable trade-off decision and avoids distributed complexity that lacks a demonstrated requirement.
- 02Designing Software BoundariesReduces change coupling and keeps consumers dependent on stable capabilities instead of implementation details.
- 03Documenting Architecture DecisionsPreserves the rationale behind expensive decisions so future changes can evaluate the original trade-offs instead of reopening them from memory.
- 04Planning Safe RefactorsReduces refactor blast radius while keeping the system releasable and making structural progress observable at every slice.
Decision record
- 01
Keep the least-distributed architecture that satisfies the forces
Retain the existing modular Next.js + Prisma monolith because tenant isolation, lifecycle consistency, and transactional invariants did not require an independently deployed service.
- 02
Make the feature own its read contract
Move the narrow read source types into the Contracts feature so the Prisma repository satisfies that contract instead of exporting persistence-owned payload types upward.
- 03
Put replacement legality in the domain
Define replacement eligibility once in the canonical status policy and let presentation delegate to it instead of duplicating FINALIZED/SENT lifecycle semantics.
- 04
Refactor only the proven seam
Use two RED architecture contracts and a six-file follow-up, while explicitly deferring a generic retry abstraction until a second real operation needs the same semantics.
03
Verification
Treat this report as evidence for the methods and verification shown here. Related-pack overlap alone is not proof that a pack was used or fully validated.
04
Result
- 01
The Contracts read model no longer imports server repository implementation types.
- 02
The repository keeps Prisma selects private while satisfying feature-owned source contracts.
- 03
Replacement eligibility is now owned by the canonical Contracts domain policy.
- 04
The bounded follow-up passed 376/376 tests plus typecheck, lint, formatting, dependency audit, and post-merge main CI.
- 05
All four Architecture & Engineering methods materially shaped the reviewed and merged external change.