Define clear module boundaries and dependency direction rules (e.g., feature modules can depend on a shared kernel, but not on each other). Enforce it with the build system (separate Gradle/Maven modules), architecture tests, and by exposing only stable interfaces/facades instead of reaching into internals.