The package MUST ship, beside the lenses of commons' configuration, a layered-model lens (commons/docs/lens/layered.ts) that knows no library: given a function that makes LayeredModel values (the package's types-only contract, layered.ts: layers, elements with a stable id, kind, name, definition, source location and properties, trace edges from an element of one layer to what it is made into, and findings) and the files that export the values the models are made of, it MUST make, in the Models section, a page of the layers (what each is for, which code writes it, what may be edited, how to change a model and regenerate what follows, and what an agent reads), a page for each model with a diagram of its concepts, a page for each concept (its definition, where it is written as a link to the file and line, its attributes and relationships, what it projects to and what it is written as), a page for each code list, and registers of what the models annotate; and it MUST add the JSON of each model and of the list of models to the site. It MUST find where an element is written from the identity of the values the given files export, so that a project's own models are documented the same way, and it MUST name in a finding a file that it cannot read.
Enforced (check): .github: cd commons/docs && bun run verify — layered-lens.test.ts: the layers page, a page for each model, concept and code list, registers and JSON; links resolve and sources are links to lines; the data models are on commons' own site with no finding
Proved by: docs/suite/layered-lens.test.ts
Tests: passed: suite/layered-lens.test.ts a file that is told to export models and cannot be read is a finding that names it, and th; failed: suite/layered-lens.test.ts commons' own site has the data models: the layers, each model, each concept with its SQL a; passed: suite/layered-lens.test.ts the JSON of each model and of the list is added to the site, and the same models give the ; passed: suite/layered-lens.test.ts the lens makes the page of the layers, a page for each model, concept and code list, and t
Cited by: Documentation generator, layered, lens/layered, model, Kanon, sql-describe