glam/.opencode/rules/linkml/polished-slot-storage-location.md
kempersc 554fe520ea Add comprehensive rules for LinkML schema management and ontology mapping
- Introduced Rule 42: No Ontology Prefixes in Slot Names to enforce clean naming conventions.
- Established Rule: No Rough Edits in Schema Files to ensure structural integrity during modifications.
- Implemented Rule: No Version Indicators in Names to maintain stable semantic naming.
- Created Rule: Ontology Detection vs Heuristics to emphasize the importance of verifying ontology definitions.
- Defined Rule 50: Ontology-to-LinkML Mapping Convention to standardize mapping practices.
- Added Rule: Polished Slot Storage Location to specify directory structure for polished slot files.
- Enforced Rule: Preserve Bespoke Slots Until Refactoring to prevent unintended migrations during slot updates.
- Instituted Rule 56: Semantic Consistency Over Simplicity to mandate execution of revisions in slot_fixes.yaml.
- Added new Genealogy Archives Registry Enrichment class with multilingual support and structured aliases.
2026-02-15 19:20:09 +01:00

1.6 KiB

Rule: Polished Slot Storage Location

Summary

Polished (refactored) canonical slot files MUST be stored in the parent slots/ directory:

schemas/20251121/linkml/modules/slots/

They must NOT be stored in the 20260202_matang/ subdirectory.

Rationale

The new/ subdirectory contain draft/unpolished slot definitions that are pending review. Once a slot file has been polished (ontology-aligned, translated, cleaned), it graduates to the canonical slots/ directory.

Directory Structure

schemas/20251121/linkml/modules/slots/
├── *.yaml                          ← Polished canonical slot files go HERE
└── 20260202_matang/
    ├── *.yaml                      ← Draft/unpolished canonical slots (staging area)
    └── new/
        └── *.yaml                  ← Raw/draft slot definitions pending triage

Rule

  • When polishing a slot file, write the result to schemas/20251121/linkml/modules/slots/{slot_name}.yaml
  • If the source file was in 20260202_matang/, remove it from there after writing to slots/
  • If the source file was in 20260202_matang/new/, it should only be deleted after user confirmation of alias absorption (per the no-autonomous-alias-assignment rule)
  • If a file already exists in slots/ (i.e., it was previously polished in an earlier session), overwrite it in place

Examples

CORRECT:

schemas/20251121/linkml/modules/slots/has_pattern.yaml  ← polished file

WRONG:

schemas/20251121/linkml/modules/slots/20260202_matang/has_pattern.yaml  ← should not be here after polishing