Add a library
A library is a folder of commons/ that declares itself; registering one is adding the folder (commons 0027-commons-libraries).
- Make
commons/<name>/with apackage.json(its name is@intellectual-frontiers/<name>, itsexportspoint at the sources), atsconfig.jsonandsrc/, with tests insuite/. - Write the manifest
library.ts: the name, the conformance level, the spec kit, theverifycommand, the version, the distribution and the exports. If the library is built in layers, add itskanontable. - Write
about.ts: what the library is, its folders and what each may import, its commands and its rules. - Start its spec kit:
spec-kit/registry.tsv,spec-kit/enforcement.tsvand the first specification,0001-<name>, with numbered requirements. - Write the tests that prove each requirement, each naming it with
proves([...]), and makebun run verifypass in the folder. - Run
bun commons/libraries/src/libraries.ts: it writes the one requirement that commons keeps for the library and its row of the register, from the manifest.
This site picks the library up by itself: it has a page, an API reference for every export and its specifications as soon as it has a manifest, a package.json and an about.ts, and the build fails where an export has no description.
The library is then proved by what its changes reach, not by everything: its own suite when a change stays inside it, its importers' seam tests when a public symbol changes, and a tarball when its exports change. Put each test where it belongs and read the plan with bun run repoctl prove --why (proof by blast radius).