feat: create schema.org vocabulary package - #3
Conversation
ENG-12255 Create schema.org JSON package
SummaryCreate Whyschema.org is the "complete menu" of entity types + properties. Today's
Locked in the 2026-06-01 jam (JP + Kames, w/ Billy). This is the foundation that unblocks ENG-12256 (predicates backfill) and ENG-12257 (classifications Confirmed data source
Package design
Build pipeline
Data shape — decided: defer the flattened view
Open / deferred
Acceptance criteria
Dependencies & sequencingFoundation layer — blocks ENG-12256 (predicates backfill uses the schema.org matrix to find missing predicates), which in turn blocks ENG-12257 (classifications References
|
Summary
Creates
@0xintuition/schema-orgas a standalone public alpha package for the pinned schema.org vocabulary foundation layer.What changed:
packages/schema-orgwith package manifest, README, TypeScript configs, tests, and ESM source entrypoints.packages/schema-org/vendor/schemaorg-v30.0.jsonld.schema:class undersrc/generated/types/<Type>.ts.src/generated/index.tsaggregation plus runtime helpers:getType,getPropertiesFor,hasType,listTypes, andnormalizeSchemaOrgName.schema-org:generate,schema-org:refresh, andschema-org:check-generated.schema-org:check-generated.Approach
The source vocabulary is pinned to schema.org V30.0:
https://schema.org/version/30.0/schemaorg-current-https.jsonldGeneration reads the vendored V30.0 snapshot by default so local generation and CI do not depend on a live network fetch. Maintainers can explicitly refresh the vendored snapshot with
bun run schema-org:refresh.The generator parses the flat
@graph, separatesrdfs:Classfromrdf:Property, filters to schema.orgschema:classes/properties, and inverts propertyschema:domainIncludesonto each owning class. Each type stores only directly declared properties plus its resolvedsubClassOfchain.getPropertiesFor(name)derives inherited properties at runtime and tags each withoriginType/originTypeId.Example: normalized storage vs resolved properties
Generated
Bookstores only Book-owned properties:subClassOf: ['CreativeWork', 'Thing']isbn,bookEdition, andnumberOfPagesnameandauthorare not copied intoBook.tsAt runtime,
getPropertiesFor('Book')walksBook -> CreativeWork -> Thing, dedupes by property id, and tags each property with provenance:namehasoriginType: 'Thing'authorhasoriginType: 'CreativeWork'isbnhasoriginType: 'Book'This keeps generated artifacts normalized while still exposing the resolved inherited view consumers need.
V30.0 generated:
schema:type modulesschema:property recordsReview follow-up
--refreshpath.3DModel, andschema:/ full URL lookup.3DModel,Number,Date, andMap.Open decisions flagged
@0xintuition/schema-org..tsconsts only; no raw.jsonfiles were added.classificationsorpredicatesis introduced in this PR.Validation
Current follow-up validation:
bun run checkbun run schema-org:check-generatedcd packages/schema-org && bun run checkcd packages/schema-org && bun run testcd packages/schema-org && bun run typecheckcd packages/schema-org && bun run buildInitial package validation also covered root build/typecheck/test,
bun run pack:dry-run, andbun run smoke:tarballs. Root tests pass; the existing React test suite still emitsact(...)warnings during passing tests.