Core Action or Side Effect?
A question that settles a whole category of design decisions, and most teams answer it by taste instead of by rule: when doing one thing also causes another, where does that second thing live? There's a clean test, and it fell out of an argument about a virtual pet game.
Listening · Core Action or Side Effect?
You hit this constantly. Registering a user also sends a welcome email. Placing an order also awards loyalty points. Opening an item also, sometimes, unlocks an avatar. In every case there's a primary thing and a secondary thing, and you have to decide: does the secondary thing go inline in the primary action, or does it hang off an event in a listener?
Most people decide by feel, and end up inconsistent, some side effects buried in core logic, some core logic hidden in listeners, no principle telling them apart. There is one.
The rule
If using the thing exists to produce X, then X is the core action. If X is a bonus layered on top of some other core action, X is a side effect, and it belongs in a listener.
That's it. One question decides it: is this the point, or a bonus?
It works because it matches what has to be true
The rule isn't arbitrary. It lines up with the guarantees each thing actually needs.
A core action has to succeed, and if it fails, the whole operation should fail. Placing an order that silently doesn't record the order is a catastrophe. So the core action belongs inline, in the transaction, where its failure is loud and total. A side effect is different: it's allowed to be best-effort, to run asynchronously, to fail on its own without taking the main operation down with it. If the loyalty points don't update, you do not want the customer's order to roll back. So the side effect belongs in a listener, decoupled, where it can retry or fail quietly on its own terms.
Put a side effect in the core and you've coupled two things that should have been separable, so now a flaky email server can fail a signup. Put a core action in a listener and you've hidden the actual point of the operation somewhere it can fail silently, which is how you ship an "unlock this avatar" item that charges the player and unlocks nothing.
So the test does double duty. "Is this the point, or a bonus?" tells you where the code goes, and it tells you because the answer is also what determines whether the thing is allowed to fail on its own.
The examples, lined up
Registering a user: the registration is the point, core action; the welcome email is a bonus, listener. Placing an order: the order is the point, core action; the loyalty points are a bonus, listener. An avatar-unlock item: the avatar is the entire point, so unlocking it is the core action, not a listener hanging off some other action. A present that happens to also grant an avatar: opening it is the point, the avatar is a bonus, so the grant is a side effect in a listener.
Notice the last two look almost identical on the surface, item plus avatar, and land on opposite designs, because the question isn't "what happens," it's "what is this for."
This rule came out of a genuine back-and-forth about exactly that pair, an item whose avatar was a bonus and an item whose avatar was the point, in a migration on the game I run. The full story is here. But the rule outgrew the story immediately, because "is this the point, or a bonus?" turns out to answer the same question everywhere: in orders, in signups, in anything where doing one thing also does another. Ask it, and the code writes itself into the right place.