Skip to content

feat: add metadata predicate backfill tranche - #4

Merged
jonathanprozzi merged 2 commits into
mainfrom
feat/predicate-metadata-backfill
Jun 12, 2026
Merged

feat: add metadata predicate backfill tranche#4
jonathanprozzi merged 2 commits into
mainfrom
feat/predicate-metadata-backfill

Conversation

@jonathanprozzi

@jonathanprozzi jonathanprozzi commented Jun 2, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds a curated first tranche of 36 proposed metadata predicates to @0xintuition/predicates.
  • Prioritizes exact schema.org-style relationships whose object type maps to a currently supported classification.
  • Regenerates the predicate spec index and standalone subpath modules for the expanded registry.
  • Tightens follow-up review items: founder / founded are cross-linked as inverses, provider is categorized with contribution-style predicates, and proposed identity predicates now carry examples.
  • Marks the existing predicates-owned entity-type map as legacy/coarse discovery guidance, not the source of truth for generated creation UI object targets.

Semantic Coverage

This PR intentionally uses existing predicates where the meaning and direction are already close enough, instead of adding exact schema.org-name duplicates.

Examples:

  • author -> authoredBy
  • creator -> createdBy
  • citation -> reference
  • genre / category -> hasCategory
  • keywords / many lightweight topic-style links -> hasTag
  • sponsor -> sponsoredBy
  • affiliation -> affiliatedWith
  • worksFor -> employedBy
  • isPartOf -> listedIn where collection/list containment is sufficient
  • image URL-like fields such as logo / screenshot -> imgUrl unless a first-class image atom relationship is needed

Date-like schema.org fields such as datePublished and datePosted are intentionally deferred. publishedAt remains venue/platform/location semantics only; literal date predicates need a separate object/literal policy.

Relationship Modeling Note

@0xintuition/predicates owns reusable predicate vocabulary: keys, names, descriptions, deterministic IDs, launch constants, and display helpers.

The legacy entity-type-map export remains available for compatibility and broad predicate discovery, but its expectedObjectType values are human-readable hints. Classification-specific relationship contracts now belong in the @0xintuition/classifications metadata predicate matrix, keyed by (subjectClassification, predicate) with typed object targets.

Scope

This PR only adds missing predicate specs, generated exports, tests, and the compatibility note above.

Out of scope here:

  • Classification metadataPredicates wiring.
  • Predicate relationship metadata such as expected object types or subject classification maps.
  • Promoting every schema.org property automatically.
  • Primitive-heavy metadata fields that still need a separate modeling decision.

The predicate relationship metadata experiment remains split into a separate stacked draft PR so it can be reviewed as an inter-package contract decision.

Stack

This branch is stacked on feat/schema-org-vocabulary-package. After the schema.org package branch merges, this branch can be rebased/retargeted in sequence.

Validation

  • packages/predicates: bun run test
  • packages/predicates: bun run typecheck
  • packages/predicates: bun run build
  • root: bun run predicates:check-generated
  • root: bun run build
  • root: bun run typecheck
  • root: bun run test
  • root: bun run check

@jonathanprozzi
jonathanprozzi force-pushed the feat/predicate-metadata-backfill branch from 9d3cc01 to 95dafee Compare June 2, 2026 17:20
@linear

linear Bot commented Jun 2, 2026

Copy link
Copy Markdown
ENG-12256 Backfill predicates package with missing 'metadata predicates' that we'll need for classifications references

Scope

Backfill @0xintuition/predicates with the missing predicates identified by the atom-data vs. triple-metadata matrix. This is the implementation step after the matrix, not another planning-only pass.

Transcript/spec sequence:

  1. @0xintuition/schema-org provides the neutral schema.org V30.0 foundation.
  2. The matrix decides which schema properties are atom fields, predicates, both, aliases, or deferred.
  3. This issue adds the missing predicate specs and their generated IDs/exports.
  4. Only after those predicates exist can classifications reference them through metadataPredicates.

First backfill tranche

Object relationships that map cleanly to current or near-current classification support:

  • byArtist
  • inAlbum
  • inPlaylist
  • brand
  • manufacturer
  • provider
  • areaServed
  • itemReviewed
  • hiringOrganization
  • jobLocation
  • organizer
  • performer
  • actor
  • director
  • productionCompany
  • publisher
  • partOfSeries
  • containedInPlace
  • containsPlace
  • parentOrganization
  • subOrganization
  • founder

Example model from the transcript:

SpotifySongAtom
  classification: music-recording / MusicRecording

SpotifySongAtom -> inPlaylist -> MySongsPlaylist
SpotifySongAtom -> inAlbum -> SomeAlbum
SpotifySongAtom -> byArtist -> SomeArtist

SpotifySongAtom is a concrete atom created with the music-recording classification. inPlaylist, inAlbum, and byArtist must exist as predicates before music-recording.metadataPredicates can reference them.

Predicate spec shape

When adding these predicates, evolve predicate metadata toward the transcript/spec plan:

  • Add relationships as dictionary pointers to classification slugs/types instead of duplicating classification metadata.
  • Make expectedObjectType an array, not a single scalar.
  • Consider subject/object direction metadata (in/out or equivalent) as recommendations, not backend enforcement.

Out of scope

  • Do not add classification metadataPredicates here; that comes after this package has the predicate IDs/keys.
  • Do not automatically promote every schema.org property into a predicate.
  • Defer primitive-heavy properties until literal value-object policy is explicit: duration, datePublished, ratingValue, telephone, address, caption, transcript, etc.

Inputs

@jonathanprozzi
jonathanprozzi force-pushed the feat/predicate-metadata-backfill branch 2 times, most recently from 8101682 to ace5ba1 Compare June 3, 2026 18:31
@jonathanprozzi
jonathanprozzi force-pushed the feat/predicate-metadata-backfill branch from 03ec77f to 86358a2 Compare June 11, 2026 14:16
@jonathanprozzi
jonathanprozzi marked this pull request as ready for review June 12, 2026 19:16
@jonathanprozzi
jonathanprozzi force-pushed the feat/predicate-metadata-backfill branch from 86358a2 to b1b4e50 Compare June 12, 2026 19:31
@jonathanprozzi
jonathanprozzi changed the base branch from feat/schema-org-vocabulary-package to main June 12, 2026 19:32
@jonathanprozzi
jonathanprozzi merged commit 15df3ff into main Jun 12, 2026
1 check passed
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.

1 participant