tierForRule function
Returns the tier name for ruleName, or null if the rule is not
registered in any tier set.
Implementation
String? tierForRule(String ruleName) {
// Build on first access; the tier sets are compile-time constants so
// this is safe to cache for the process lifetime.
_tierIndex ??= _buildTierIndex();
return _tierIndex![ruleName];
}