Common ontology
A project's ontology on one map: what layers it consists of, how the layers are linked and by what laws. The ontology page, the ontology of the "Base structure" layer and the build of two ontology lenses.
About the package
The package places the page Project ontology (two groups of layers, the law of links, bridges between layers) and the ontology of the "Base structure" layer itself, /base/ontology/base.md, and builds two lenses from the base's markdown:
build:/base/ontology/layers.html: layers, their types and bridges, contours by layer, where things live. No kit needed.graph:/base/ontology/graph.html: one graph of types and links of all layers, with the kit embedded in the file. The kit comes from thelensespackage (.shtukbase/packages/lenses/kit/); the variableSHTUK_KITcan point to another copy. The graph takes its style and skins (the Kit / Draft switch) the same way aslib/kit.css: from thekit-stylepackage through the kit build.
Where the boundary is
- Here are the common map of the project and its lenses.
- The ontology of a single layer (
/<layer>/ontology.md) is placed by the layer's package. - The "Where things live" map is the
layerspackage; the lens format and the kit are thelensespackage.
The package has no norms: ontology pages describe, they do not require. The build code is TypeScript for Bun, with no external dependencies: actions/build.ts and actions/graph.ts with modules in actions/lib/ (render_ontology.ts, render_layer_ontology.ts, lenshead.ts, lenscommon.ts, mdlite.ts) and templates in actions/lib/templates/. The header of pages is read by Bun.YAML. The actions are run by the shtuk run tool from the project root; the only parameter is --out <file>.
Actions 2
| Name | What it does | File | When |
|---|---|---|---|
| build | Build the "Ontology and contours" lens (base/ontology/layers.html) | actions/build.ts | shtuk run |
| graph | Build the ontology graph of all layers (base/ontology/graph.html), needs the kit | actions/graph.ts | shtuk run |
shtuk check runs the checks; shtuk run ontology <name> runs any action. "After install" actions run by themselves only if the package comes from a trusted source.
Pages 2
They go into the project at these paths.
- /base/
- Project ontology page
- /base/ontology/
- Ontology of the "Base structure" layer page
Package files 10
They go into .shtukbase/packages/ontology/; actions run from there.