Please find some suggestions below.
* The current concept of ##rights## and ##skins## and target etc. shall be extended.
* The aim is similar to T63007 and perhaps in other places.
* However, the syntax is extended within the current style.
* Packaging shall be based on properties which can be evaluated immediately on loading.
* The target is to avoid loading of meaningless modules, therefore each rule is further limiting the scope of gadgets required within the current page under current conditions.
* In cache some more module packages will be founded per site, but repeating the same aggregation.
* The rules still follow a simple AND combination. Some might wish an entire boolean language, but no implementation expected within this century.
== Separators ==
Currently comma separation only is expected for multi-value.
* Introduce space separator as regular syntax as well.
* Keywords are simple ASCII words with no space inside, dependencies with dot, sometimes hyphen.
* Tokenization is rather easy then, and quite usual.
* Trimming between equal sign and pipe is no big deal.
* Comma+space should not disturb anywhere.
* Even {key Tab} may be used instead of space, or any whitespace.
That would improve readability.
== Namespace ==
Syntax:
namespaces=
Value is separated list of namespace numbers.
//Example://
|namespaces=14|
Load on category pages only. Otherwise the gadget will always start, first check namespace, abort immediately on most pages.
== Special pages ==
Syntax:
specials=
Value is separated list of special page name keywords, case insensitive.
* Keyword could be ##specialpages## if desired, but only one of them.
//Example://
|specials=Recentchanges,Watchlist,EditWatchlist|
== Action ==
Syntax:
actions=
Value is separated list of ##&action=## keywords.
* ##edit## shall cover ##submit## as well.
* If editing is not permitted to this user, ##view## might be required and ##edit## is bounced back (no editing tools meaningful).
* Some special pages are rewriting themselves into ##action=##, e.g. ##Diff##. That needs to be considered. It depends on the moment when the current situation is resolved.
//Example://
|actions=view,edit,parsermigration-edit|
Do not load on ##history## or ##info##.
== Content model ==
Syntax:
contentmodels=
Value is separated list of case insensitive content model names.
//Example://
|contentmodels=css|
Run linter etc. on appropriate language only. Or limit to ##wikitext## editing.
== User groups ==
Syntax:
groups=
Value is separated list of case insensitive user group names.
* If element starting with ##-## that might be exclusion rule.
* ##all## is not required but basic set anyway. Members may be subtracted.
//Examples://
|groups=sysop|
|groups=-user|
|groups=user -sysop|
The second one is matching anonymous users. The third one are registered accounts, but might be not too experienced and powerful.
== User language ==
Syntax:
userlangs=
Value is separated list of case insensitive language codes.
* If element starting with ##-## that might be exclusion rule.
* Current user language ##pt-BR## shall match
##|userlangs=pt|##.
//Example://
|userlangs=en-US,fr,zh-Hant,simple|
Shall exploit right-to-left scripting, translation helpers, special letter support, spellchecking etc.
== Content language ==
Syntax:
contentlangs=
Same as ##userlangs## but for page content language.