glam/.opencode/rules/linkml/no-deletion-from-slot-fixes.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.5 KiB

Rule: Do Not Delete From slot_fixes.yaml

Identifier: no-deletion-from-slot-fixes Severity: CRITICAL

Core Directive

NEVER delete entries from slot_fixes.yaml.

The slot_fixes.yaml file serves as the historical record and audit trail for all schema migrations. Removing entries destroys this history and violates the project's data integrity principles.

Workflow

When processing a migration:

  1. Do NOT Remove: Never delete the entry for the slot you are working on.
  2. Update processed: Instead, update the processed block:
    • Set status: true.
    • Set date to the current date (YYYY-MM-DD).
    • Add a detailed notes string explaining what was done (e.g., "Fully migrated to [new_slot] + [Class] (Rule 53). [File].yaml updated. Slot archived.").
  3. Preserve History: The entry must remain in the file permanently as a record of the migration.

Rationale

  • Audit Trail: We need to know what was migrated, when, and how.
  • Reversibility: If a migration introduces a bug, the record helps us understand the original state.
  • Completeness: The file tracks the total progress of the schema refactoring project.

Example

WRONG (Deletion):

# DELETED from file
# - original_slot_id: ...

CORRECT (Update):

- original_slot_id: https://nde.nl/ontology/hc/slot/has_some_slot
  processed:
    status: true
    date: '2026-01-27'
    notes: Fully migrated to has_or_had_new_slot + NewClass (Rule 53).
  revision:
    ...