Service Boundary Design
Core Workflow
- Identify domains, actors, data ownership, latency needs, deployment model, team ownership, and failure tolerance.
- Define service or module responsibilities, owned data, public interfaces, and forbidden dependencies.
- Map synchronous calls, async events, shared storage, and integration points.
- Evaluate coupling, transaction boundaries, consistency needs, and migration path.
- Prefer simpler module boundaries before distributed services unless scale, ownership, isolation, or reliability needs justify separation.
- Document tradeoffs, risks, and review triggers.
Safety Rules
- Do not split services only for abstraction if the current repo can support a simpler module boundary.
- Do not invent reliability, latency, scale, or team-ownership requirements.
- Escalate boundaries involving customer data isolation, payments, auth, compliance, or production reliability.
Deliverable Shape
For service boundary memos, provide:
- Domains and responsibilities
- Data ownership
- Interface boundaries
- Dependency map
- Consistency and transaction model
- Migration path
- Tradeoffs and risks
- Recommendation and review triggers
References
- Read
references/service-boundary-design-checklist.mdwhen defining backend service or module boundaries.