IF Commons GitHub

The ontologies of commons

0001Draft

0001-ontologies · owner if · domain commons

The ontologies

FR-001checkno test run

The library ontology MUST hold the ontologies of commons as typed values over the library rdf: Mizan (mz), IFCCM, IFQS, IFR, the audit of packaging and the software supply chain, each a folder of src/ with a mod.ts, and the data of the standards they cite.

Enforced (check): .github: cd commons/ontology && bun run verify — the package is built, inspected and packed, the suite runs, and the library's own trace and spec kit are held

Written in: ontology/about.ts, ontology/library.ts, ontology/src/kanon/kanon.ts, ontology/src/kanon/mod.ts, ontology/src/supply-chain/commands.ts, ontology/src/supply-chain/downloads.ts

FR-002checkno test run

Every class, property and code list of an ontology MUST be stated once in its module, and the generators of Turtle, RDF/XML, SHACL and JSON Schema MUST be made from those values, not from a copy (commons 0012-ontology).

Enforced (check): .github: cd commons/ontology && bun test suite/ — ifccm-ontology.test.ts: the classes and properties of IFCCM are values of the library, and the tests of the other ontologies in commons/ts/tests read them by package name

FR-003checkpassing

The ontologies MUST import only core and rdf by package name and each other by relative path, so that an ontology is read without a harness.

Enforced (check): .github: cd commons/ontology && bun test suite/ — ontology-boundaries.test.ts: the modules import only core and rdf and the library's own modules

Proved by: ontology/suite/ontology-boundaries.test.ts

Tests: passed: suite/ontology-boundaries.test.ts the ontologies import only core and rdf and each other

FR-004checkno test run

The library MUST be published to npm as compiled modules with their declarations, one entry for the package (., which names the ontologies as namespaces) and one for each module.

Enforced (check): .github: cd commons/ontology && bun run verify — the package is built, inspected and packed by tools/pack.ts; tests/commons-packages.test.ts installs the tarball, runs every entry on Node 26 and Bun and type-checks a consumer

Written in: ontology/tools/check.ts, ontology/tools/pack.ts

Acceptance scenarios

  1. Given the ontology of IFCCM, When a test reads its classes and properties, Then each is a value of the library, per FR-001 and FR-002.
  2. Given the modules of the library, When their imports are read, Then none is outside core, rdf and the library itself, per FR-003.

Out of scope

  • The generators of the ontologies and the register (libraries), and the decisions about kept-unaligned terms, which are the repository's.

Edge cases

  • An ontology that extends another (IFR extends IFQS, which extends Mizan's) imports it by relative path, per FR-003.

Assumptions

  • The decision to publish the ontologies as one library is 0032-libraries-by-concern FR-008: the ontology of IFR extends the one of IFQS, which extends Mizan's, so no one of them could be a file of the library that uses it without a cycle.

Open questions

  • None.

Key entities

  • Ontology - a set of classes, properties and code lists stated as TypeScript values.

Success criteria

SC-001success criterion

Every library of commons reads an ontology of commons by package name.

Review & acceptance checklist

  • [x] Every requirement is testable (MUST / MUST NOT), not aspirational
  • [x] No company fact is asserted here
  • [x] Every open item is marked, not silently decided

Titles, headings, exports, tables, columns and requirements. Esc closes.