glam/.opencode/rules/linkml/slot-naming-convention-current-style.md
kempersc 6e63465196 Add ImageTilingServiceEndpoint class and archive ID class
- Introduced the ImageTilingServiceEndpoint class for tiled high-resolution image delivery, including deep-zoom and transformation capabilities, with multilingual descriptions and structured aliases.
- Archived the ID class as a backwards-compatible alias for Identifier, marking it as deprecated to enforce the use of the canonical Identifier model.
2026-02-15 21:40:13 +01:00

2.2 KiB

Rule: Slot Naming Convention (Current Style)

🚨 CRITICAL: New LinkML slot names MUST follow the current verb-first naming style used in active slot files under modules/slots/.

Core Naming Rules

  1. Use snake_case.
  2. Prefer short, descriptive verb predicates as canonical names.
  3. Keep names ontology-neutral (no ontology namespace prefixes in slot names).
  4. Use singular nouns in object positions (including multivalued slots).
  5. Keep temporal semantics in mappings/definitions when needed, not by forcing a legacy prefix.

Preferred Patterns

1) Simple verb predicates (default)

Use a single verb when it clearly expresses the relation.

Examples from active slots:

  • accept
  • contain
  • catalogue
  • exhibit

2) Verb + particle/preposition when needed

Use compact phrasal forms when a preposition carries core meaning.

Examples:

  • belong_to
  • located_in
  • derived_from

3) Symmetric or directional pair pattern

Use <present>_or_<past_participle> when both directions/states are intentionally modeled in one predicate label.

Examples:

  • contains_or_contained
  • includes_or_included
  • operates_or_operated

Legacy Compatibility

  • For migrations, keep backward compatibility via aliases when renaming to current-style canonical names.
  • Do not rename canonical slots opportunistically; follow migration plans and canonical-slot protection rules.

Anti-Patterns

  • rico_has_or_had_holder (ontology prefix in name)
  • collections (plural noun predicate)
  • has_museum_visitor_count (class-specific slot name)
  • Creating new has_or_had_* names by default when a verb predicate is clearer

Quick Checklist

  • Is the canonical slot name verb-first and descriptive?
  • Is it snake_case?
  • Is the noun part singular?
  • Is the name ontology-neutral?
  • If renaming legacy slots, are aliases/migration constraints handled?

See Also

  • .opencode/rules/archive/DEPRECATED-slot-naming-convention-rico-style.md
  • .opencode/rules/no-ontology-prefix-in-slot-names.md
  • .opencode/rules/slot-noun-singular-convention.md
  • .opencode/rules/generic-slots-specific-classes.md
  • .opencode/rules/canonical-slot-protection-rule.md