There's long been discussion about us setting up a dedicated service (a la commons) that could serve as a centralized repository for code used on the wikis. This is broadly construed to include:
- Templates
- Lua modules
- Gadgets
Some of the proposed benefits to doing this would be:
- Deduplication of effort
- Easier to peer review
Scary transclusion was an attempt at this, but really is scary and not usable in its current form.