The term “module” can be used for different partitions:
- object groups (“modules” in a colloquial sense), affecting architecture
- libraries (aka Swift modules)
What’s the boundary of a module?
Why does it do X but not Y?
Good justification may result in high cohesion; however, unjustifiable boundaries will result in low cohesion, being merely accidental.
See the example of High Cohesion and Low Coupling with Presenter, View, and View Model, and the counter-example of low cohesion through ‘incidental’ grouping based on superficialities.
A module in each level should be a black box: “Black Box” in software modeling.