Update slot naming convention references to current style and add new slot naming convention rule
This commit is contained in:
parent
89b8b7e198
commit
363fd206b9
17 changed files with 91 additions and 16 deletions
|
|
@ -174,6 +174,6 @@ This approach:
|
|||
## See Also
|
||||
|
||||
- Rule 38: Slot Centralization and Semantic URI Requirements
|
||||
- Rule 39: Slot Naming Convention (RiC-O Style)
|
||||
- Rule: Slot Naming Convention (Current Style)
|
||||
- Rule 49: Slot Usage Minimization
|
||||
- LinkML Documentation: [slot_usage](https://linkml.io/linkml-model/latest/docs/slot_usage/)
|
||||
|
|
|
|||
|
|
@ -135,6 +135,6 @@ The following class files have been identified as defining their own slots and r
|
|||
## See Also
|
||||
|
||||
- Rule 38: Slot Centralization and Semantic URI Requirements
|
||||
- Rule 39: Slot Naming Convention (RiC-O Style)
|
||||
- Rule: Slot Naming Convention (Current Style)
|
||||
- Rule 42: No Ontology Prefixes in Slot Names
|
||||
- Rule 43: Slot Nouns Must Be Singular
|
||||
|
|
|
|||
|
|
@ -368,6 +368,6 @@ Before marking a slot as processed:
|
|||
|
||||
- Rule 9: Enum-to-Class Promotion (single source of truth principle)
|
||||
- Rule 0b: Type/Types File Naming Convention
|
||||
- Rule 39: Slot Naming Convention (RiC-O Style)
|
||||
- Rule: Slot Naming Convention (Current Style)
|
||||
- `.opencode/ENUM_TO_CLASS_PRINCIPLE.md`
|
||||
- `schemas/20251121/linkml/modules/slots/slot_fixes.yaml` - **AUTHORITATIVE** master list of migrations
|
||||
|
|
|
|||
|
|
@ -126,4 +126,4 @@ If you encounter an overly specific slot:
|
|||
|
||||
## See Also
|
||||
* Rule 55: Broaden Generic Predicate Ranges
|
||||
* Rule 39: Slot Naming Convention (RiC-O Style)
|
||||
* Rule: Slot Naming Convention (Current Style)
|
||||
|
|
|
|||
|
|
@ -174,6 +174,6 @@ This approach:
|
|||
## See Also
|
||||
|
||||
- Rule 38: Slot Centralization and Semantic URI Requirements
|
||||
- Rule 39: Slot Naming Convention (RiC-O Style)
|
||||
- Rule: Slot Naming Convention (Current Style)
|
||||
- Rule 49: Slot Usage Minimization
|
||||
- LinkML Documentation: [slot_usage](https://linkml.io/linkml-model/latest/docs/slot_usage/)
|
||||
|
|
|
|||
|
|
@ -128,6 +128,6 @@ Files that match need refactoring:
|
|||
## See Also
|
||||
|
||||
- Rule 38: Slot Centralization and Semantic URI Requirements
|
||||
- Rule 39: Slot Naming Convention (RiC-O Style)
|
||||
- Rule: Slot Naming Convention (Current Style)
|
||||
- Rule 42: No Ontology Prefixes in Slot Names
|
||||
- Rule 43: Slot Nouns Must Be Singular
|
||||
|
|
|
|||
75
.opencode/rules/slot-naming-convention-current-style.md
Normal file
75
.opencode/rules/slot-naming-convention-current-style.md
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
# 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
|
||||
|
||||
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
|
||||
|
||||
- Existing `has_or_had_*` and `is_or_was_*` slots can remain where already established.
|
||||
- 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`
|
||||
|
|
@ -76,5 +76,5 @@ When creating or renaming slots:
|
|||
|
||||
## See Also
|
||||
|
||||
- `.opencode/rules/slot-naming-convention-rico-style.md` - RiC-O naming patterns
|
||||
- `.opencode/rules/slot-naming-convention-current-style.md` - Current slot naming patterns
|
||||
- `.opencode/rules/slot-centralization-and-semantic-uri-rule.md` - Slot centralization requirements
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"generated": "2026-02-15T14:54:26.856Z",
|
||||
"generated": "2026-02-15T14:58:54.703Z",
|
||||
"schemaRoot": "/schemas/20251121/linkml",
|
||||
"totalFiles": 2369,
|
||||
"categoryCounts": {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"generated": "2026-02-15T14:58:54.703Z",
|
||||
"generated": "2026-02-15T15:02:31.403Z",
|
||||
"schemaRoot": "/schemas/20251121/linkml",
|
||||
"totalFiles": 2369,
|
||||
"categoryCounts": {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ slots:
|
|||
slot_uri: dqv:hasQualityAnnotation
|
||||
description: "Notes regarding data quality."
|
||||
range: string # uriorcurie
|
||||
# range: DigitalPlatformV2DataQualityNotes
|
||||
# range: DigitalPlatformDataQualityNotes
|
||||
multivalued: true
|
||||
annotations:
|
||||
custodian_types: '["*"]'
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ slots:
|
|||
slot_uri: schema:employee
|
||||
description: "Key contact person for the organization."
|
||||
range: string # uriorcurie
|
||||
# range: DigitalPlatformV2KeyContact
|
||||
# range: DigitalPlatformKeyContact
|
||||
multivalued: true
|
||||
annotations:
|
||||
custodian_types: '["*"]'
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ slots:
|
|||
slot_uri: org:linkedTo
|
||||
description: "Detailed profile of the organization."
|
||||
range: string # uriorcurie
|
||||
# range: DigitalPlatformV2OrganizationProfile
|
||||
# range: DigitalPlatformOrganizationProfile
|
||||
multivalued: true
|
||||
related_mappings:
|
||||
- org:linkedTo
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ slots:
|
|||
slot_uri: org:classification
|
||||
description: "Status of the organization (e.g., active, dissolved)."
|
||||
range: string # uriorcurie
|
||||
# range: DigitalPlatformV2OrganizationStatus
|
||||
# range: DigitalPlatformOrganizationStatus
|
||||
multivalued: true
|
||||
annotations:
|
||||
custodian_types: '["*"]'
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ slots:
|
|||
slot_uri: schema:mainEntity
|
||||
description: "Primary digital platform of the organization."
|
||||
range: string # uriorcurie
|
||||
# range: DigitalPlatformV2PrimaryPlatform
|
||||
# range: DigitalPlatformPrimaryPlatform
|
||||
multivalued: false
|
||||
annotations:
|
||||
custodian_types: '["*"]'
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ slots:
|
|||
slot_uri: schema:serviceOutput
|
||||
description: "Details about services provided."
|
||||
range: string # uriorcurie
|
||||
# range: DigitalPlatformV2ServiceDetails
|
||||
# range: DigitalPlatformServiceDetails
|
||||
multivalued: true
|
||||
annotations:
|
||||
custodian_types: '["*"]'
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ slots:
|
|||
slot_uri: prov:wasGeneratedBy
|
||||
description: "Metadata regarding data transformation processes."
|
||||
range: string # uriorcurie
|
||||
# range: DigitalPlatformV2TransformationMetadata
|
||||
# range: DigitalPlatformTransformationMetadata
|
||||
multivalued: true
|
||||
annotations:
|
||||
custodian_types: '["*"]'
|
||||
|
|
|
|||
Loading…
Reference in a new issue