cadrumo.core.identifier_grammar module¶
The grammar for the dotted identifier keys that address operator surfaces.
Two shapes recur wherever a condition, action, scenario or command is named: a FIELD KEY, one or more lowercase segments joined by dots, and a NAMESPACED ID, the same grammar requiring at least two segments so a bare word cannot pass as a namespaced name.
Both regexes were written out six times – twice in core and once each in the modelo preconditions, the operator-action catalogue and the operator-surface models. The redeclarations were not carelessness: the canonical constants lived in an underscore-private core module and were absent from the package’s export map, so no consumer outside core could reach them at all. A constant nobody can import is a constant everybody retypes, which is why this module is public.
NamespacedId carries its bounds as well as its pattern, because every
one of its eleven sites paired the pattern with the same minimum of three and
maximum of a hundred and sixty. FIELD_KEY_PATTERN stays a bare pattern:
its sites legitimately differ on length – an argument name is capped shorter
than a source key – so a single alias would impose a bound one of them does
not want.