Вы говорите про это?
The Specification Pattern is a way to encapsulate business rules into reusable, composable objects.
Instead of cluttering your domain objects or services with multiple conditions, you define clear and testable specifications that determine whether an object meets certain criteria.