Requests for comment/Shadow namespaces

This is a request for comments regarding implementing shadow namespaces.

Background
Currently we have Manual:$wgEnableScaryTranscluding and Commons. [FIXME]

Scope
For the purposes of this RFC, we're looking at least:


 * Global Scribunto/Lua modules (bug T41610)
 * Global templates (bug 4547)
 * Global user pages

In this context, "global" means MediaWiki-wide, so any and all MediaWiki installations should be able to use these (possibly requiring installation of extensions/setting up configuration). In addition, wiki farms would be able to designate one of their wikis to be used as the central repository if they choose not to use the default one.

Compatibility
MediaWiki installations using global scripts will not keep pace with WMF deployments, so we need a method to continue to support older versions (or maybe just versions that are still supported with code/security updates?).

Usage tracking
For media on Commons, we have GlobalUsage tracking, (and for gadgets, T35355 and T21288) however that's only Wikimedia-wide, and captures no usage information about non-WMF installations using InstantCommons. This means that Commons administrators have no idea whether a file is actually used or not when doing destructive operations like renaming (without leaving a redirect behind) or deleting.

When a new version of a file is updated on commons, it will automatically update on InstantCommons sites since images are hotlinked. However if a template is updated, it should cause HTMLCacheUpdate jobs to be queued so all pages are updated.

See also: Mentorship programs/Possible projects (T48525)

Current progress / Implementation status

 * $wgEnableScaryTranscluding exists in core, but isn't usable and could probably be removed in favor of a real solution.

Considerations

 * Licensing(!)
 * Interwiki search suddenly becomes a lot more important