Skip to content

feat(content): add typed item relationships - #213

Merged
gcomneno merged 1 commit into
mainfrom
feat/item-relationships-206
Jul 20, 2026
Merged

feat(content): add typed item relationships#213
gcomneno merged 1 commit into
mainfrom
feat/item-relationships-206

Conversation

@gcomneno

Copy link
Copy Markdown
Owner

Summary

  • add an optional, ordered and domain-neutral relations contract to catalog item YAML;
  • normalize and expose typed relationships through the standard item content layer;
  • validate malformed relationship structures while preserving legacy items without relations;
  • preserve existing relationships when an item is edited through Studio;
  • document the contract with non-genealogical examples.

Relationship contract

relations:
  - type: inspired-by
    target: earlier-work
    label: Earlier study
  - type: part-of
    target: summer-project
  • type and target are required non-empty strings;
  • label is optional;
  • values are trimmed and blank labels are omitted;
  • relation order is preserved;
  • missing relations is normalized to [].

Validation in this issue is intentionally structural only. Target existence, self-references, duplicates, inverse relationships and graph semantics remain outside this scope.

Verification

  • focused relationship tests: 2 passed, 0 failed;
  • full test suite: 301 passed, 0 failed;
  • npm run content:validate;
  • npm run check: 0 errors and 0 warnings;
  • npm run build;
  • git diff --check.

Closes #206

@gcomneno
gcomneno merged commit d495360 into main Jul 20, 2026
1 check passed
@gcomneno
gcomneno deleted the feat/item-relationships-206 branch July 20, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add first-class typed relationships between catalog items

1 participant