Layered service-oriented system design, dependency injection boundaries, circular import elimination, and separation of business logic from I/O.