The Case Sensitive Flag

By default, all constraints that perform text comparisons operate in a case-insensitive manner.

If the flag case_sensitive: yes is specified in a node-rules definition, all applicable text comparisons for that node become case-sensitive.

Exceptions

  • The matches constraint is exempt from this rule, as its behavior is entirely defined by the regular expression engine in use.

  • The chars and not_chars constraints are also exempt from this rule, as they are always case-sensitive.

Rules for the Case Sensitive Flag

  1. Default Behavior: Text comparisons must be case-insensitive unless explicitly overridden.

    [api.name]
    type: "text"
    starts: "system"
    
    [api]
    name: "System"  # VALID: case-insensitive match
    
  2. Extent of Case Folding: Implementations must support case folding for the ASCII range (a-z / A-Z).

    • Single-character Unicode case folding is recommended.

    • Full Unicode case folding is optional.

    Implementations should clearly document the exact extent of their case-handling behavior.

  3. Boolean Flag: The case_sensitive field requires a boolean value.

    • If omitted, the default value is no.

    • Explicitly specifying case_sensitive: no must be supported.

    [api.name]
    type: "text"
    starts: "system"
    case_sensitive: no  # Redundant, but valid
    
  4. Effect of Enabling Case Sensitivity: If case_sensitive: yes is set, all applicable text constraints in the node-rules definition must be evaluated case-sensitively.

    • The flag does not affect matches constraints, as its behavior is entirely defined by the regular expression engine in use.

    • The flag does not affect chars or not_chars constraints, which are always case-sensitive by definition.

    [api.name]
    type: "text"
    starts: "system"
    case_sensitive: yes
    
    [api]
    name: "System"  # ERROR: uppercase "S" does not match in case-sensitive mode
    

Design Rationale

Case-insensitive comparison is the default because most configuration values (such as identifiers, modes, or keywords) are not intended to be case-sensitive.

The case_sensitive flag provides an explicit and localized way to enforce strict casing rules where required, without complicating constraint semantics or validator implementations.