2.4 KiB
2.4 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 schemas/20251121/linkml/modules/slots/.
Status
- This rule replaces the deprecated RiC-O naming rule.
- The old
has_or_had_*/is_or_was_*requirement is not mandatory for new slot names.
Core Naming Rules
- Use
snake_case. - Prefer short, descriptive verb predicates as canonical names.
- Keep names ontology-neutral (no ontology namespace prefixes in slot names).
- Use singular nouns in object positions (including multivalued slots).
- 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:
acceptcontaincatalogueexhibit
2) Verb + particle/preposition when needed
Use compact phrasal forms when a preposition carries core meaning.
Examples:
belong_tolocated_inderived_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_containedincludes_or_includedoperates_or_operated
Legacy Compatibility
- Existing
has_or_had_*andis_or_was_*slots can remain where already established. - For migrations, keep backward compatibility via
aliaseswhen 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