Design Pattern: Working with Groups in Rules

replying to myself:
found the answer (more or less) here: