In software, consistency and cohesion tend to get lumped together as the same thing. I’ve found this leads to painfully tedious arguments around product and design decisions.
Consistency focuses on individual parts of a larger whole.
For example, in an app, a primary button may always be blue. This consistency is good. It communicates to people that anytime they see a blue button, an important action is about to take place.
Cohesion relies on multiple parts working together.
For example, let’s use an onboarding flow for a person using a product for the first time. The combination of front-end UI, backend infrastructure, workflows, product strategy, marketing, and customer support working well together creates a cohesive experience. If any one of these parts is inconsistent, it takes away from the cohesion of the experience.
Consistency enables a cohesive experience, but consistency alone is not enough. Aim for cohesion.