@@ -3708,6 +3708,80 @@ and makes it clear when the state described by the flags is reset.
37083708
37093709<!-- TODO: add examples -->
37103710
3711+ <h3 id="registries">Use registries to allow constrained extensions outside the original standards track</h3>
3712+
3713+ When you expect a feature to need to be extended over time,
3714+ and it would be inappropriate to
3715+ manage that change through the same standards process that defined the original feature,
3716+ then a registry is usually the right design.
3717+
3718+ [[spec-variability#variability|"Variability complicates interoperability."]]
3719+ When a feature needs optional components,
3720+ it is easiest to manage the complication if
3721+ a single group is in charge of the whole design.
3722+ This implies that most optional features should be defined
3723+ in the same specification that defined the original feature.
3724+
3725+ Sometimes new extensions are expected to be needed in the future.
3726+ In this case, the right plan is often to
3727+ have the original standards body continue or restart
3728+ a working group to produce an update to the feature's full specification.
3729+
3730+ However, if extensions need to be defined through
3731+ a different process than updating the full specification,
3732+ a registry is usually the right way to manage the known extensions.
3733+ Default to defining either
3734+ an IANA registry governed by [[RFC8126]] or a [[w3c-process#registries|W3C Registry]] ,
3735+ but another similar mechanism is also acceptable.
3736+
3737+ Registries are helpful because they
3738+
3739+ 1. Reduce name collisions.
3740+ 1. Help readers find the name for a desired purpose.
3741+ 1. Direct readers to a specification for each name
3742+ (if the registry requires this).
3743+
3744+ Items in a registry generally need to implement a defined interface
3745+ in order to plug into the specification they're extending.
3746+ The definition of the registry must be clear about this interface,
3747+ and it should require new entries to include a specification that follows it.
3748+ This roughly corresponds to
3749+ the IETF's [[RFC8126#section-4.6|Specification Required]] registration policy.
3750+ It's difficult to be confident in an interface definition
3751+ before that interface has several implementations,
3752+ so any new registry should start with at least 2-3 entries defined.
3753+
3754+ It is tempting to additionally require that registry entries be
3755+ "good" in some way beyond simply being specified.
3756+ Use a permissive registration policy instead of doing this
3757+ unless the feature includes
3758+ some way to enforce that no implementation can use an unregistered name.
3759+ The IETF has found that
3760+ when it's too hard to add entries to a registry,
3761+ implementers will often simply use names without registering them.
3762+
3763+ When a feature's main specification defines some initial registry entries,
3764+ each one can be either required or optional for implementations to recognize.
3765+ If implementations need to pick an understood registry entry to send to their recipients,
3766+ then the registry should include at least 1 required entry.
3767+ If implementations can be
3768+ divided into distinct [[spec-variability#subdivision-profile|profiles]]
3769+ that tend not to need to communicate with other profiles,
3770+ it can be sufficient for each profile to require a registry entry
3771+ even if the main specification leaves them all optional.
3772+
3773+ It can be tempting to use URLs instead of registered strings to identify extensions.
3774+ This has the benefit of making it very easy to extend the feature,
3775+ by just picking a URL from a domain that the extender controls.
3776+ However, there's no way to ensure that
3777+ these URLs point to a specification for the extension they name,
3778+ or even that the domain stays under the control of the entity that defined the extension.
3779+ URLs are appropriate for a few kinds of completely-permissionless extension,
3780+ but most of the time a WG-managed permissive registry table will work better.
3781+
3782+ See [[qaframe-spec#extensions]] for
3783+ more guidance on how to design extensibility.
3784+
37113785<h3 id="implementability">Resolving tension between interoperability and implementability</h3>
37123786
37133787<!--
0 commit comments