A work MUST have a typed record, the file <work>/release.ts, whose only export is release, an object literal of data that a program reads as data and never runs (as 0020-ifccm reads a harness's declaration, so that a version from Git reads like the present one): slug (lower-case letters, digits and hyphens; the prefix of its tags), kind (the name of an ifr:WorkKind), title, authors (a list of objects with a name), and version (written by the scheme of its kind; absent for a Specification); and it MAY carry iri, partOf (the slug of the work it is part of), position, identifier (a DOI or an ISBN), repository, exclude (paths of the folder that are not the work's files), paths (paths of the repository outside the folder that are also the work's files, FR-039), snapshot (digest, schemaVersion and, where the schema's files are named, schemaPaths, for data), replaces (the slug of the work it replaces, FR-007), approval (for a controlled document, FR-013), retention (FR-027), retired (FR-028) and migratedFrom (FR-037); a decoder MUST check it, an unknown field or a wrong type MUST be a finding that names the file and the field, and a tool MUST write it through a template and never by a hand edit.
Enforced (check): .github: cd commons/mizan && bun test suite/ — versions-pure.test.ts: the record decodes as data and never runs (an expression and a second export are refused), an unknown field and a wrong type name the field, a kind's own rules hold (no version on a specification, a snapshot only on data), and the one template writes a layout that reads back
Proved by: mizan/suite/versions-pure.test.ts
Tests: passed: suite/versions-pure.test.ts the record decodes as data and never runs, an unknown field and a wrong type are findings
Cited by: Mizan, versions/record, ifr/ifr, Ontology, Commons libraries, Libraries by concern