I've added a bit to the Cockpit Coding Guidelines about AMD modules:
Some of us were discussing AMD modules  with global side-effects.
Normally this would be frowned on, but in real life this comes up all
We decided that because of our component system, we would allow
side-effects, with the caveat:
"Modules that return API (as above) should avoid global side-effects.
And modules that have global side-effects should not return or define API."
Hope that makes sense,