feat: add classification metadata predicate matrix - #7
Merged
jonathanprozzi merged 3 commits intoJun 12, 2026
Conversation
jonathanprozzi
force-pushed
the
feat/classification-metadata-predicate-matrix
branch
from
June 9, 2026 18:29
806c593 to
b0ab3b1
Compare
jonathanprozzi
force-pushed
the
feat/classification-metadata-predicates
branch
from
June 9, 2026 18:34
f6bcdef to
c6ddb76
Compare
jonathanprozzi
force-pushed
the
feat/classification-metadata-predicate-matrix
branch
from
June 9, 2026 18:35
b0ab3b1 to
ded03c7
Compare
jonathanprozzi
force-pushed
the
feat/classification-metadata-predicates
branch
from
June 10, 2026 14:38
c6ddb76 to
889b68d
Compare
jonathanprozzi
force-pushed
the
feat/classification-metadata-predicate-matrix
branch
from
June 10, 2026 14:38
ded03c7 to
488f81f
Compare
jonathanprozzi
force-pushed
the
feat/classification-metadata-predicates
branch
from
June 11, 2026 14:16
889b68d to
29ae771
Compare
jonathanprozzi
force-pushed
the
feat/classification-metadata-predicate-matrix
branch
from
June 11, 2026 14:16
488f81f to
69e7b6e
Compare
Member
Author
|
Matrix coverage update: This PR now models every currently promoted Object-target policy:
We intentionally do not fall back to schema.org |
jonathanprozzi
marked this pull request as ready for review
June 12, 2026 19:17
jonathanprozzi
force-pushed
the
feat/classification-metadata-predicates
branch
from
June 12, 2026 19:38
29ae771 to
606e3b8
Compare
jonathanprozzi
force-pushed
the
feat/classification-metadata-predicate-matrix
branch
from
June 12, 2026 19:45
f56b963 to
84f6c2e
Compare
jonathanprozzi
changed the base branch from
feat/classification-metadata-predicates
to
main
June 12, 2026 19:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@0xintuition/classifications.@0xintuition/predicates; predicates remain reusable vocabulary.classification,schema,primitive,same-classification, andany.match: exact | semantic | broader | narrowerso lossy mappings are explicit.(classification, metadataPredicate)pair: 189 promoted pairs, 189 matrix rows, zero missing rows.sameAsmatrix entries for every classification that promotessameAsinmetadataPredicates, while preserving the explicit exclusions from feat: add classification metadata predicate refs #6.music-recording:byArtist->music-group/personmusic-recording:inAlbum->music-albummusic-recording:inPlaylist-> schema.orgMusicPlaylistbecause there is no Intuitionmusic-playlistclassification yetmusic-recording:hasCategory->defined-termwith a broader mapping to schema.orggenremusic-recording:sameAs->same-classificationfor strict identity links like Spotify and Apple Music representations of the same recordingWhy This Lives In Classifications
The matrix is keyed by
(subjectClassification, predicate), so it belongs with classifications rather than predicates. This preserves the package boundary:@0xintuition/predicatesdefines predicate vocabulary.@0xintuition/classificationsdecides which predicates are recommended for each classification and what object targets are expected in that context.@0xintuition/schema-orgremains the schema source/provenance layer.The old predicates-owned
entity-type-mapremains a compatibility/coarse discovery surface, but generated creation UI should use this classification-owned matrix.Object Target Policy
The matrix prefers the narrowest honest target:
classificationwhen Intuition already classifies the object, e.g.movie:director -> person.schemawhen schema.org has the object concept but Intuition has not promoted a matching classification yet, e.g.listedIn -> schema.org Collection.primitivefor literal values, e.g.url -> primitive:url.same-classificationfor strict identity links.anyonly where the predicate is intentionally broad or still product-dependent, e.g.reference,itemReviewed,contain,linkedAccount, anduse.This intentionally avoids falling back to schema.org
Thingas a generic target.Thingwould look more precise thananywhile carrying almost the same runtime behavior, and it would imply schema.org provenance where the intended Intuition object model may still be broader or product-specific.anyis more honest for generated UI: builders should show a broad atom picker and can inspect the requiredreasonbefore narrowing the UX later.sameAs Decision
sameAsis modeled as strict identity linking, not generic related content. Matrix rows useexpectedObjects: [{ kind: 'same-classification' }], which lets builders represent cases likeSpotify song atom -> sameAs -> Apple Music song atomwithout treating reviews, listicles, or adjacent references as the same entity.This PR covers
sameAsfor all classifications that intentionally promote it.Validation
The validator tests check that every matrix entry:
@0xintuition/predicates.metadataPredicates.getPropertiesFor(subject.schema.type).anyobject target.Additional tests assert:
(classification, metadataPredicate)pair has a matrix row.Thingas a catch-all target.sameAshas a matrix row.sameAsmatrix row expectssame-classification.sameAspromotion do not get stealth matrix rows.Deferred
kind: 'any'until product examples sharpen enough to split them into narrower contracts.MusicPlaylist,CreativeWork,Collection,EducationalOrganization, and schema-only software compatibility targets remain schema-backed until Intuition promotes matching classifications.Stack
This branch is stacked on
feat/classification-metadata-predicates, which is stacked onfeat/predicate-metadata-backfill, which is stacked onfeat/schema-org-vocabulary-package.Validation Run
packages/classifications:bun run checkpackages/classifications:bun run testpackages/classifications:bun run typecheckpackages/classifications:bun run buildbun run buildbun run typecheckbun run testbun run check