# @openeik/tools

Read, check, hash, diff and store OpenEik building models, and print them as IFC, from the [specification](https://openeik.org/spec/0.8/) alone. A library for apps (Node.js and browsers) and the `openeik` command for people, scripts and AI agents.

| | |
|---|---|
| Version | 0.8.0: reads and writes OpenEik 0.1 to 0.8 (`openeik/0.1-draft`, `openeik/0.1`, `openeik/0.2`, `openeik/0.3`, `openeik/0.4`, `openeik/0.5`, `openeik/0.6`, `openeik/0.7`, `openeik/0.8`, each also with a pre-release suffix); a model is written in its own version, one that names none as 0.1 unless asked for a later one, which migrates it ([Versions](#versions)) |
| Status | Published to npm. The specification it implements is at [openeik.org](https://openeik.org) |
| Conformance | Claims the writer and compiler (core) classes of OpenEik 0.2, and of OpenEik 0.1. Implements the reader, validator and command processor classes, but does not claim them: its checks leave out a rule of Part II and check another in part; and the agent host (Part VII, `openeik mcp`), which is a reader and a command processor too. Implements Part VI's versions, diff, merge and remotes as a client of a store, the IFC bridge (Part VIII, 1) and the drawing validator (Part XIV, 19.2; Part XVIII, 9), which it does not claim either. See [Conformance](#conformance) |
| Runs on | Node.js 20.16 or later; any modern browser or worker for everything that does not take a folder's path |
| Dependencies | None |
| Licence | [Apache-2.0](LICENSE). The bundled copy of `schemas/` (`src/schemas.js`) is [CC0-1.0](https://openeik.org/schemas/0.8/LICENSE), as the schemas are, and the bundled copy of `guides/` (`src/guides.js`), which the agent host serves as its guide, is [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/), as the guides are. The Unicode 13.0.0 data of `src/unicode.js`, derived from the Unicode Character Database, is under the Unicode License v3, and IFC4's and IFC 4.3's property set templates in `src/ifc4-psets.js` and `src/ifc4x3-psets.js`, derived from buildingSMART's ifc-gherkin-rules, are under the MIT License ([`NOTICE`](NOTICE)) |

It is written from the specification and its schemas, not from any implementation. Its version trees have the same root hash as the reference implementation's for the same folder (see [Hashes](#hashes-and-the-reference-implementation)).

## Quick start for an app

Install it with `npm install @openeik/tools`, or run the command with `npx openeik`:

```js
import { readFolder, checkFolder, versionTree, connectStore, pushVersion, readVersion } from "@openeik/tools";

// Read a folder. It is checked whole and refused, with the file and the rule, if it fails.
const house = readFolder("examples/one-storey-house");
house.model.elements;                      // the single-file form: elements, types, views, levels …
house.get("elements", "wall-south");       // a record by list and id
house.pathOf("elements", "wall-south");    // "architecture/level-0/wall/wall-south.json"
house.kept;                                // files that are no record (acme/, README.md …), text by path

// Check it, and read the diagnostics.
const { ok, errors, warnings } = checkFolder("examples/one-storey-house");
// each: {severity, code, path, pointer?, message, rule}, e.g. code "ref-missing", rule "I.7"

// Hash it: the root of its version tree.
const tree = versionTree("examples/one-storey-house");
tree.root;                                 // 64 hex digits; the same folder gives the same root anywhere

// Push it as a version to a store that speaks EikHub's API v0, and read it back.
const store = connectStore({ url: "https://api.eikhub.com", repo: "acme/house", token: process.env.OPENEIK_TOKEN });
const { version } = await pushVersion(store, "examples/one-storey-house", { author: "Jane Doe", name: "Ground floor" });
const back = await readVersion(store, version);   // or readVersion(store, "main")
back.model.elements.length;
```

In a browser, pass the files instead of a path: a `Map` (or an object) of relative paths to texts or bytes, for example from a zip or a file picker:

```js
const files = new Map([["eik.json", "…"], ["project/project.json", "…"], /* … */]);
const house = readFolder(files);
```

### Writing a folder

`writeFolder` writes a model in the single-file form onto a folder, as a writer must (spec, Part III, 13). It checks the model first and refuses it, with the diagnostics, when it has errors; writes only the files whose bytes change; removes the files of records that are no longer in the model and no other file (kept files, hidden files, `AGENTS.md` and files the reader leaves alone stay); and writes `AGENTS.md` only where there is none, under any case, and the model keeps no file of that name in another case (`agents.md`), which it would write over where case is ignored.

A record's path is made of its id, level, category and kind (Part III, 2 and 4.2), and never leads out of the folder, on this system or any other. An id or a level is written as its path segment (Part III, 2): `%` and the characters that common file systems refuse (`/ \ : * ? " < > |` and control characters) as `%` and two upper-case hexadecimal digits, and so a leading `.` or `~`, a trailing `.` or space, and the first letter of a device name with or without an extension (`con`, `Aux.1`, `lpt¹`). So `study-roof:gutter:study-roof:edge:0` is in `study-roof%3Agutter%3Astudy-roof%3Aedge%3A0.json`, `.x` in `%2Ex.json`, and `x\..\..\evil` in `x%5C..%5C..%5Cevil.json`: no id is refused, an empty one aside, and every name is one that Windows, macOS and Linux take and read as it is written. The reader decodes every `%` and two hexadecimal digits, so a folder written before 14 October 2026, with a `:` as it is in a name, reads as the same ids, with a warning naming the path the rules give (`path-unescaped`); writing it moves each such file to its path. A category and a view's kind are not escaped: one that would lead out of the folder where `\` separates folders as on Windows (a category of a later version `a\..\..\..\..\x`), that Windows would read into a hidden folder or file (`.claude`, `.vscode`, `.git`, `.eik`), a reserved name or `eik.json`, or that makes a path segment `.` or `..`, which no file system holds as a name, is refused (`model-invalid`, with a `path-unsafe` diagnostic naming the record), as is one that would make a hidden, reserved or empty name or holds `/` or NUL; one with a `\` between plain names is written as it is. `writeFolder` checks again that every path it touches stays in the folder before anything is written. A write is all or nothing: every path is checked first (two records or two levels' folders whose paths fold to one, at any depth, are refused as `path-collision`, and a kept file whose path folds to one with another of the model's paths, or holds a name a file system refuses or reads otherwise, as `kept-fold` or `kept-name`, since case-insensitive file systems would make them one file and some refuse or read the names otherwise, Part I, 6, rule 7, and Part III, 7, rule 8; the validator compares a model's paths in the same way, `path-fold` an error, and `kept-fold` and `kept-name` warnings of a folder, whose reader leaves such a file alone, and errors of the single-file form, which holds it; an id or a level whose segment is over 200 bytes is refused, Part I, 6, rule 8, as is a name over 255 bytes, and a path over the system's limit as `path-too-long`), the new files are staged in the hidden `.eik/` folder and moved into place, a folder or a file renamed only in case is renamed, and the files of records that went are removed last. A failure on the way is a `write-failed` naming the path, and leaves the folder as it was or as a later write completes it. Nothing is written through a link: a hidden `.eik` that is a link or no folder is refused before anything is staged (`eik-unsafe`), and so is any path the write touches that goes through a link (`path-unsafe`), whatever it points at. A file the reader leaves alone (binary, or over 1 MiB) is never overwritten, and a folder whose `eik.json` names no format this package implements is not written into.

```js
import { readFolder, writeFolder, modelFiles } from "@openeik/tools";

const { model } = readFolder("./house");
const wall = model.elements.find((e) => e.id === "wall-south");
wall.height = 3000;
wall.revision += 1;                        // a record changed by hand: its revision goes up by 1
writeFolder("./house", model);             // {written: ["architecture/level-0/wall/wall-south.json"], removed: [], unchanged: 32}

modelFiles(model);                         // the same files in memory, path to text: anywhere, a browser too
```

A folder read and written back unchanged is what it was, byte for byte (`AGENTS.md` aside), so its version tree has the same root. Each record goes where Part III, 4 puts it; a `component` goes in `structure` when it is `structural`, a plate or a cast-in item (this package has no library of connectors); a `generic` one in the folder its `generic.discipline` names (an element's own, else its type's), else in `architecture` (rule 5). An element or a type of a category this package does not know, one a later version adds, is written back unchanged in the discipline folder it was read from (rule 6): `writeFolder` finds its file in the folder by list and id (through folded names, so an id changed only in case still finds it), `modelFiles(model, {from})` takes the paths of the folder a model was read from, and with none (the single-file form) it goes under `architecture`. A view's detail items are written in chunks by the rule of Part III, 10. From the command line: `openeik write <model.json> <folder>` and `openeik read <folder>`. The pieces are in `@openeik/tools/write` too: `detailChunks`, `chunkNames`, `idHash`, `elementDiscipline`, `typeDiscipline`; and `modelPaths(model)` gives the paths `modelFiles` writes a model at, which the validator compares as the writer does.

### An archive of a folder

From 0.5 (spec, Part III, 11.3, and Security and privacy, 6.5; the proposal `archives` before its cut), a folder travels as one zip file, `<name>.eik.zip`, of the media type `application/vnd.openeik+zip`: what the single-file form is for exchange, with the assets' bytes it cannot carry.

```js
import { writeArchive, readArchive, checkArchive, unpackArchive } from "@openeik/tools/archive";

const bytes = writeArchive("examples/one-storey-house");   // checked whole first; the same bytes every time
const house = readArchive(bytes);                             // as readFolder gives a folder: house.model, house.files …
checkArchive(bytes).ok;                                       // a validator's verdict on the archive and its folder
unpackArchive(bytes, "out/house");                            // its folder, written as writeFolder writes one
```

An archive holds the files of the folder's version at their paths: `eik.json` first, at byte 30, then by code units, each record in the stored form, each kept file's text and each asset's bytes; no `AGENTS.md`, hidden or reserved name, file the reader leaves alone, or folder's entry. Every entry is stored, of 00:00:00 on 1 January 1980, its name flagged UTF-8, made by 4.5 on MS-DOS, with no extra field but a ZIP64 one where its offset needs it: so the same folder, or the same version, gives the same bytes in Node and in a browser. A model in the single-file form gives the archive of the folder `modelFiles` lays it out as, with the assets' bytes `assets` gives by path.

`readArchive` reads any zip a reader reads alike, one another tool wrote, deflated entries included, and warns of what a writer would not write (`archive-form`, `archive-entry`); `checkArchive` reports those as errors. It refuses (`archive-refused`), naming the entry: a zip whose central directory and local headers disagree, whose entries overlap or are encrypted, or of a method other than stored and deflated (`archive-invalid`); a name that would lead out of the folder (`archive-path`); a name twice, or a file's that is a folder's too (`archive-twice`); paths that fold to one (`archive-fold`); a link or a special file (`archive-link`); and, before it inflates anything, an entry over 64 MiB, entries over 4 GiB in all or more than 1 000 000 of them (`archive-too-large`), or a deflated entry that claims more than 1 032 times its compressed size (`archive-ratio`). It inflates no entry past the size its central header gives, and holds each to its CRC-32. A zip of a folder under the folder's own name, as a file manager compresses one, is refused with `archive-root`, which says so.

The command: `openeik archive <folder | model.json> <out.eik.zip>`; `openeik check`, `compile`, `ifc`, `ifcx`, `clash`, `hash` and `read` take a `.eik.zip`, known by its bytes, as they take a folder; and `openeik write <file.eik.zip> <folder>` writes its folder.

### Saving results beside a building

An app keeps its own files in a top-level folder of its own, named by its registered prefix (`acme/<model>/` for an app registered as `acme`), and names what each result set was computed from in a result manifest, `openeik-result/0.1` ([spec, Part VI, 8](https://openeik.org/spec/0.8/history#8)):

```js
import { recordInputs, inputsDigest, intentInputs, runId, resultManifest, resultStatus } from "@openeik/tools";

const select = { categories: ["beam", "column", "slab", "wall"], lists: ["levels", "types"] };
const inputs = inputsDigest(recordInputs(house, select));            // {count, digest}
const model = inputsDigest(intentInputs(house, "acme/frame-a")).digest;
const engine = { kernel: "an-analysis-app 0.5.0" };
const manifest = resultManifest({
  app: { name: "an-analysis-app", version: "0.5.0" }, kind: "structural-analysis",
  version, inputs, model, engine, made: { at: new Date().toISOString(), by: "jane@example.com" },
});
const id = runId({ inputs, model, engine });                         // "r-" and 12 hex digits

// Later: are the results still current?
resultStatus(manifest, { inputs: inputsDigest(recordInputs(readFolder(dir), select)), model });
// {current, inputs, model}
// After a building's change of layout (Part III, 4.4) the digest is another; given the pairs source.json kept and
// today's, a result set whose records only moved is current (Part VI, 8.4, rule 5).
resultStatus(manifest, { inputs, model, pairs: recordInputs(readFolder(dir, { proposals: ["ownership"] }), select), kept: source.inputs });
// Or the whole check from the folder: the manifest, its model folder's source.json and intent files, and which inputs
// changed, were added or went.
resultSetStatus(readFolder(dir), "acme/frame-a/results/r-2e13b39cbc7a/manifest.json");
// {current, inputs, model, selection, changed?}
```

From 0.6 (Part VI, 8.4.1; the proposal `fileInputs` of a folder of 0.5), a selection names files that hold no record, each whole, the ground above all: `{categories: ["foundation"], files: ["project/ground.json"]}` given to `recordInputs` and `resultSetStatus` of a folder of 0.6, or of 0.5 with `{proposals: ["fileInputs"]}`, makes a result computed from the ground stale once the ground changed. In a folder of 0.5 without the proposal, `files` selects nothing, as a reader of 0.5 reads it, and such a result is stale, never current.

### A store's own calls

An application that makes a store's own calls beside the protocol's (Part VI, 6.8.1, rule 7), with the same credential, a token that is refreshed among them, takes the transport `connectStore` speaks through, so that it need not write 6.8.1 to 6.8.3 again:

```js
import { storeTransport, connectStore } from "@openeik/tools";

const token = async () => (await session.fresh()).accessToken;       // asked for before each call
const wire = storeTransport({ url: "https://store.example", token });
await wire.call("GET", wire.path("reviews", "v1", "rounds"));        // a store's own call: {ok: true, …}
const note = new TextEncoder().encode("Calculation, frame A");
await wire.call("POST", `${wire.path("reviews", "v1", "rounds", "r-1", "attachments")}?name=calc.txt`, note, { type: "text/plain" });
const store = connectStore({ url: "https://store.example", repo: "acme/house", token });
```

A body is sent as JSON, a `Uint8Array` as `application/octet-stream`, or, for a store's own call that takes another type, a `Uint8Array` as the call's `type` (`bad-body` where it is no media type or the body no bytes); the `headers` option never changes a body's type. Each segment of a path is plain once percent-decoded: `%2F`, `%5C` and `%2E%2E` are refused as `/`, `\` and `..` are (`bad-path`, Part VI, 6.8.1, rule 2), before anything is sent. Its token goes only over https, or plain http to this computer, and only to the origin given (`insecure-url`, `token-origin`); a redirect is refused (`store-redirect`); an answer whose status is no 2xx or whose body is no JSON object with `ok` `true` is the store's refusal (`store-<code>`), bytes that are no UTF-8 are refused (`utf8-invalid`), and an answer past its bound is refused as soon as it passes it (`answer-too-large`, 16 MiB, `ANSWER_MOST`, unless a call says more). `connectStore` holds each member it reads to its form (`store-answer`; Part VI, 6.8.14, of 0.6).

### A repository that belongs to an application's project

When a store says that a repository belongs to the project of an authoring application (its `source` is set), the main line is that application's. `pushVersion` refuses to write `main` there unless `allowSourceMain` is set (`--allow-source-main`), and an app writes an alternative instead, starting from the main line's version:

```js
await pushVersion(store, folder, { author: "An analysis app for Jane Doe", ref: "alternatives/frame-a-results", parent: mainVersion });
```

An authoring application may keep its own list of the alternatives it shows; this package does not write it. `eikJson: false` leaves `eik.json` out of the tree, as versions saved before 11 October 2026 were built (Part I, 9.2, rule 5); a version of 0.1 holds it (Part VI, 2.2). [Reading and saving an OpenEik model](https://openeik.org/guides/reading-and-saving.md) has the guide's advice.

## Quick start for an AI agent

Work on a folder as on a code base; check after every change.

```sh
openeik check ./house                   # 0: valid; 1: errors, each with its file, rule and code
openeik check ./house --json            # the same as JSON: {ok, files, counts, diagnostics: [{severity, code, path, pointer, message, rule}]}
openeik check ./house --quality         # also: elements under a category that does not fit, and heavy forms (warnings)
openeik tree ./house architecture --leaves   # the layout, with a hash and a count per folder
openeik diff ./before ./after           # what changed, by record and field; exit 1 when anything did
openeik hash ./house                    # the root hash: equal hashes, equal models
```

The loop:

1. Read `AGENTS.md` in the folder. Map with `openeik tree` or `ls`, and read only the records you will change.
2. Change a record's file: keep every member you do not know, add 1 to its `revision`, keep the stored form (sorted keys, two spaces, a member a line). Never write derived data (bodies, areas, joins worked out from geometry).
3. `openeik check <folder>`. Done means no errors. Fix what it names: each diagnostic has a `code` and the `rule` of the specification it comes from. The codes are this library's own, and may be renamed when the specification defines codes, planned for 0.2.
4. `openeik diff` against the folder as it was, and say what changed by record id.

Before you draw, read [Keeping a model light](../../guides/weight.md): a hatch is a `region` with a `pattern`, insulation an `insulation` item, a circle an item of the kind `circle`, a group that stands again an original and its copies, never their strokes or their copies' elements. `openeik check --quality` warns of each heavy form ([Model quality](#model-quality)); change those you wrote, and put to your person those you did not.

Through an agent host, the same loop is a set of tools: `openeik mcp <folder>` serves the folder to an MCP client, with a map, reads in tiers through one filter, commands with dry runs, a check of the folder as it is, and a guide ([The agent host](#the-agent-host)).

With a store, the folder is a working copy ([Remotes](#remotes-clone-push-pull)): `openeik clone` it once, work in the loop, then `openeik push <folder> -m <message>`; when the push says the ref moved, `openeik pull <folder>` and push again.

A store's token is never an argument: put it in `OPENEIK_TOKEN` (or the variable `--token-env` names), and the origin of the store it is for beside it, in `OPENEIK_TOKEN_ORIGIN` (`<NAME>_ORIGIN`). The command refuses `--token`. It sends the token only over https (or plain http to this computer), to a store named with `--url`, or to a folder's remote only when the remote is at that origin: a folder's `.eik/remotes.json` travels with the folder and may come from anyone ([Tokens](#tokens)).

## The agent host

`openeik mcp <folder>` serves a folder to an AI agent as an agent host of [Part VII](https://openeik.org/spec/0.8/agent-interface), headless (Part VII, 8), over the Model Context Protocol's stdio transport: JSON-RPC 2.0 on the standard input and output, one message a line, written from the protocol alone with no dependency. Each operation of Part VII, 1 is a tool of its name, with its arguments' JSON Schema as the tool's input schema; logs go to the standard error. An MCP client starts it as a command:

```json
{
  "mcpServers": {
    "house": {"command": "openeik", "args": ["mcp", "/path/to/house"]}
  }
}
```

From a checkout of the repository, the command is `node packages/openeik/bin/openeik.mjs`. The options: `--read-only` takes no lock and writes nothing; `--person <id>` names the person the host serves, whom an envelope's `by.person` must name (Part XVII, 4.2), and without it envelopes are refused (`person-mismatch`); `--require-envelope` takes an agent's commands only in an envelope (Part XVII, 8, rule 3), a dry run of a bare batch still answered; `--proposal <name>` reads, checks and writes the folder with a proposal, as `openeik check` does; `--review` holds every write of an agent for a person's review (Part VII, 10.2, of 0.6), and needs `--person`, since the host takes an agent's writes only in envelopes then: an `apply` is refused (`mode-not-allowed`) and so is a batch without an envelope that is no dry run (`review-required`), and each envelope in the mode `propose` is kept as a proposal, one for each operation (the same envelope sent again is answered as it was, and the same proposal made by another operation is refused, `proposal-same`, naming it and its state), which the person decides with `openeik proposals <folder> --accept <id> --person <id>` (or `--decline`), the host stopped first, since that command takes the folder's lock too; in a library, `host.decide(id, {accept, person, dryRun})`, which no operation reaches.

The same host is a library that any transport drives, and that tests drive directly:

```js
import { createAgentHost } from "@openeik/tools/agent-host";

const host = createAgentHost("./house", { person: "u-7f3c" });
await host.request("guide");                                                 // the guide core, read once
await host.request("summary");                                               // levels, counts, generic elements
await host.request("tree", { path: "architecture/level-0" });                // one folder of the layout
await host.request("read", { tier: "index", filter: { categories: ["wall"] } });
const command = { kind: "update", id: "wall-west", expectedRevision: 1, patch: { name: "West wall (render)" } };
await host.request("execute", { command, dryRun: true });                    // checked, nothing changed
await host.request("execute", { command });                                  // written to the folder, then answered
await host.request("validate");                                              // done means no errors
host.close();                                                                // gives the lock back
```

`serveMcp(host, {input, write, log})` (`@openeik/tools/mcp`) serves a host over any stream of lines.

| Operation | Part VII | What it answers |
|---|---|---|
| `summary` | 2 | the project, its levels, elements by category and type, how many are generic (Part II, 6.6, rule 5), the other records counted, whether the folder checks, what to call next; small whatever the model's size |
| `tree` | 2 | one folder of the layout: its sub-folders with a count and a line each (`wall` (5): "types: Exterior wall 300 4, Partition 100 1"), its records as index rows, paged; its parent; what next. A level's name stands for its id |
| `read` | 3, 4 | the index tier (`id`, `category`, `typeId`, `name`, `levelId`, `hostId`, `revision`, `bounds`) or the full tier, the records with their derived values apart (`derived`: bounds, quantities, names, hosted elements); through the filter; `offset`, `limit` (at most 500, 50 by default) and a byte `budget`; another list by `ids`; the whole model in the single-file form (`form: "model"`) |
| `query` | 1 | counts, groups (`groupBy`), sums of the compiled quantities (`sum`), a text search, the elements a line passes through, nearest first |
| `execute`, `execute_batch` | 6 | commands of Part V through `applyCommands`, or an envelope of Part XVII; dry runs; `affected`, `verify` and `sequence` in every accepted answer, and the files written |
| `validate` | 6 | `checkFolder` on the folder as it is now, its errors paged, each with its file, rule and code; `quality` adds the warnings of Part III, 15 |
| `guide` | 7 | the guide core ([`guides/agents.md`](../../guides/agents.md) and the list of topics, under 41 270 characters), or a topic under 25 000: each other guide (`weight`, `primer`, `disciplines` …, a longer one in parts), `category/<category>` (the members an element and a type of it may hold, from the schemas of the model's version), `command/<kind>` (its schema) and `folder` (the folder's own `AGENTS.md`, given as the folder's content) |
| `changes` | 1 | the records added, changed and removed since a sequence number of the session (each write and each hand edit the host saw is one), or since a version of the folder's history: a version its remote keeps (`origin/main`, the version it last pulled or pushed, or a version's id) |
| `snapshot_2d` | 1, 8 | a plan, a section or an elevation, or a plan of a level, drawn through the filter by the drawing issuer's generator from the compiled bodies: SVG in the view's millimetres, each element a group with `data-eik-id` and labelled with its id, and a legend of each element drawn with its extent in the view; over MCP the SVG is an embedded resource of type `image/svg+xml` |
| `snapshot_3d` | 8, rule 2 | that it needs a renderer, which a headless host has not |
| `report_problem` | 1 | a structured report, kept in `.eik/problems.jsonl` for the person who runs the host |
| `capabilities` | 10.1, from 0.6 | what the host offers: the model's format, as the model states it (0.1's `openeik/0.1-draft` too), and the formats it reads and writes, each operation with whether it writes and answers here (a write not where the host takes it nowhere), the command kinds it runs on the model and the profiles of Part V it runs whole (`commandCapabilities`), the proposals for a later version than the model's it reads by, none its version makes a rule, its envelopes (`taken`, `required`, `modes`, `person`; none taken by a host that serves no person), whether it holds writes for review, its budget and pages; held to `schemas/0.6/agentInterface/capabilities.schema.json` |
| `proposals` | 10.2, from 0.6 | the proposals it keeps, a row each (`id`, `state`, `intent`, `agent`, `commands`, `made`), paged, of a `state` where one is given; or one by its `id`, its file whole, its state, the operation that made it, who decided it and when, and why an acceptance was refused; held to `schemas/0.6/agentInterface/proposals.schema.json` |
| `schedules` | 1 | of a model of 0.6, or of 0.5 with the proposals `costSchedules` and `workSchedules` (Part XXII, 7): the model's cost and work schedules; a cost schedule's items worked out, each its quantity, and priced by a rate list of the folder's `.eik/rates/` (`rates`), with the schedule's amount and how many items have none; a work schedule's tasks with their days, late days, floats and whether each is critical, and, to a status date, their progress and forecast, valued by a cost schedule and a rate list where asked; paged |

Every answer carries the host's `sequence`, and every list answer the honesty fields `total`, `returned`, `offset`, `nextOffset` and `truncated` (Part VII, 3.3). An answer over 20 000 tokens, counted at 2.5 characters a token, is held: it says what it would hold and how to ask for less, and `whole: true` asks for it whole (Part VII, 5). An answer that cannot be given is `{error: {code, rule, message, fix?}}`; over MCP, it and a refused command are tool errors (`isError`), which the agent reads and mends its call by.

The host reads the folder once and holds the model. Before each request it looks at the folder's files, and where any changed it reads the folder again and checks it whole: a folder that checks is taken, its changed records a step of the sequence; one that does not is reported in every answer (`folder`: each problem with its file, pointer, rule and code) while the last good model is kept and nothing is written (Part VII, 6, rule 4). An accepted write is written to the folder before the answer, only the files whose bytes change (`writeFolder`; Part VII, 6, rule 3). In the folder's hidden `.eik/` it keeps `lock`, while it runs, naming its process, so that only one engine writes the folder (a lock whose process on this computer has ended is taken over); `operations.jsonl`, each operation of an envelope it applied, recorded as pending before the folder is written and as done after, with the digest of the model the change made, so that a record left pending is kept only where the folder holds its change (Part XVII, 3, rule 3), with the client that sent it and the agent the envelope names (4.2, rule 2), for 7 days; `problems.jsonl`; and `proposals/`, each proposal an envelope in the mode `propose` made, `<id>.json`, with its state, kept until a person decides it and after (Part VII, 10.2, of 0.6). None of these is part of the model.

What it does not do: it takes envelopes only for the one person given at its start, whom the operating system's user who started it stands for, and requires them of agents only when asked (`--require-envelope`; Part XVII, 8, rule 3, a SHOULD); `changes` since a version reads only a version a remote of the folder keeps, not git's history; `viewId` keeps what a view's volume holds, generously (Part XIV, 9.3), and does not read a view's `visibility.categories`, `visibility.elementIds` or `visibility.regions`, which the specification does not give a meaning; a 2D snapshot draws only what the core compiler gives a body (a door or a window is the opening it cuts); and it serves MCP on stdio alone, no network transport (Security and privacy, 3.3, rule 3).

The host's own codes, beside the command processor's ([Command codes](#command-codes)):

| Code | Rule | What |
|---|---|---|
| `arguments-invalid` | VII.1 | the arguments do not match the operation's schema, which tools/list (or `operations`) gives |
| `operation-unknown` | VII.1 | no operation of this host has that name |
| `folder-invalid` | VII.6.4 | the folder no longer checks: each file and rule is named; the last good model is kept, and nothing is written until the files are mended |
| `folder-unread` | VII.6.4 | the folder has not checked since the host started, so it holds no model yet: mend the files the problems name |
| `folder-locked` | III.14 | another engine holds .eik/lock on the folder: only one engine writes a folder |
| `read-only` | VII.6 | the host was started to read only, and writes nothing |
| `selection-none` | VII.4 | a headless host has no selection: name the elements by elementIds |
| `filter-unknown` | VII.4 | a filter names a level, an element or a view the model does not hold |
| `path-unknown` | VII.2.1 | the layout has no such folder |
| `list-unknown` | VII.3 | the model has no such record list |
| `topic-unknown` | VII.7 | the guide has no such topic |
| `view-unknown` | VII.1 | the model has no such view |
| `view-not-drawn` | VII.8.2 | a 2D snapshot draws a plan, a section or an elevation |
| `needs-renderer` | VII.8.2 | the operation needs a renderer, which a headless host has not |
| `compile-failed` | IV | the compiler failed on the model, so nothing can be drawn or measured |
| `history-none` | VII.1 | the folder keeps no history this host reads: no remote in .eik/remotes.json, or none that names the version |
| `write-failed` | III.13 | writing the folder failed, naming the path; the next request reads the folder again |
| `review-required` | VII.10.2 | the host holds an agent's writes for a person's review: send the commands in an envelope in the mode propose, or as a dry run |
| `proposal-missing` | VII.10.2 | the host keeps no proposal of that id: proposals lists those it keeps |
| `proposal-decided` | VII.10.2 | a person decided the proposal already: it is accepted or declined, and stays so |
| `proposal-same` | VII.10.2 | another operation made the same proposal, its base, by, commands and intent alike: read it with proposals {id}, and make it again only changed |
| `proposal-not-asked` | XXII.7 | the operation reads what a proposal the host was not started with adds: Part XXII's schedules, of a model of 0.5 |
| `schedule-unknown` | XXII.7 | the model has no cost or work schedule of that id, or its days cannot be worked out |
| `rates-unknown` | XXII.4.3 | the folder has no rate list of that name under .eik/rates/ |
| `rates-invalid` | XXII.4.2 | a rate list of the folder does not hold to its form |
| `host-error` | VII | the host failed in a way it did not foresee: report it (report_problem) |

## The command

```text
openeik check <folder | model.json> ...   [--json] [--quiet] [--verbose] [--quality [--accept <code>[:<path>]]] [--schemas <dir>] [--proposal electrical | drawings | ownership | assets | review | grain | site | classifications | railings | declared | components | adopted]
openeik compile <folder | model.json>     [--json] [--quantities] [--verbose] [--proposal electrical | declared | framing]
openeik ifc <folder | model.json>         [--out <file.ifc>] [--schema IFC4X3_ADD2] [--version <root>] [--version-id <id>] [--at <time>]
                                          [--printed-by <name>] [--crs <EPSG:code> [--vertical-datum <name>]]
                                          [--bodies <file.json>] [--json] [--proposal electrical]
openeik ifcx <folder | model.json>        [--out <file.ifcx>] [--version <root>] [--version-id <id>] [--at <time>]
                                          [--printed-by <name>] [--bodies <file.json>] [--json] [--proposal electrical]
                                          (EXPERIMENTAL: buildingSMART's ifcx_alpha)
openeik hash <folder>                     [--no-eik-json] [--json] [--proposal electrical]
openeik tree <folder> [<path>]            [--leaves] [--depth <n>] [--no-eik-json] [--proposal electrical]
openeik diff <folderA> <folderB>          [--json] [--no-eik-json] [--proposal electrical]
openeik write <model.json> <folder>       [--no-check] [--json] [--verbose] [--proposal electrical]
openeik read <folder>                     [--out <model.json>] [--proposal electrical]
openeik archive <folder | model.json> <out.eik.zip>
                                          [--no-check] [--json] [--proposal <name>]
                                          (of 0.5: check, compile, ifc, ifcx, clash, hash, read and write
                                          also take a model.eik.zip, known by its bytes)
openeik datums <folder> <out>             [--json]
openeik clash <folder | model.json>       [--tolerance <mm>] [--json] [--proposal electrical]
openeik test <folder | model.json>        [--suite <dir>]... [--params <file>] [--at <YYYY-MM-DD>] [--json] [--keep [--by <who>]] [--proposal footprintsWhole] [--proposal roomWayIn]
openeik test --self [<folder>]            [--suite <dir>]... [--json]
                                          (from 0.7: a building's tests, Part XXIII; exit 1 where a check
                                          fails at the severity error, or a fixture is not as its check says)
openeik merge <base> <ours> <theirs>      [--json] [--verbose] [--out <file.json>]
openeik clone <folder> --url <base> --repo <owner/name> [--ref main] [--remote origin] [--json] [--proposal assets | electrical]
openeik push <folder> -m <message>        [--author <name>] [--note <text>] [--remote origin] [--ref <ref>] [--json] [--proposal assets | electrical]
                                          (a folder with .eik/remotes.json; the author also from OPENEIK_AUTHOR)
openeik pull <folder>                     [--choose <key>=ours|theirs ...] [--remote origin] [--ref <ref>] [--json] [--proposal assets | electrical]
                                          (a folder with .eik/remotes.json)
openeik status <folder>                   [--fetch] [--json] [--proposal assets | electrical]
openeik push <folder> --url <base> --repo <owner/name> --author <name>
                      [--name <text>] [--note <text>] [--ref main | alternatives/<slug>] [--parent <hash>]
                      [--no-eik-json] [--allow-source-main] [--no-check]      (a folder without one)
openeik pull <folder> --url <base> --repo <owner/name> [--ref <name> | --version <hash>] [--force]
openeik log  --url <base> --repo <owner/name> [--ref main] [--limit 20]
openeik apply <folder | model.json> <commands.json> [--dry-run] [--json] [--out <model.json>] [--replay] [--sequence <n>] [--proposal <name> …]
```

Exit codes: 0 done (and valid, or no difference, or the commands accepted; for `clone`, `push`, `pull` and `status`, done or nothing to do); 1 errors found, differences found, commands refused, a folder refused, a ref moved meanwhile, a remote ref that no longer descends from the tracked version, or a conflict a pull left; 2 a usage or input problem. `clone`, `status`, and `push` and `pull` of a folder with `.eik/remotes.json`, are in [Remotes](#remotes-clone-push-pull). `compile` prints each element's quantities, then its diagnostics and notes; `--json` gives the whole result, bodies included ([Compiling](#compiling)); it exits 1 when a record breaks a rule its derivation needs. `ifc` prints the model as IFC4 (Part VIII, 1), or with `--schema IFC4X3_ADD2` as IFC 4.3 (Part VIII, 1.13, of 0.5), into `--out`, by default `<folder or file name>.ifc` here, and says what it wrote by class and what it left out or approximated, and why; `--json` gives that fidelity report as JSON. A folder's print names its version by its tree's root, as `hash` gives it, unless `--version` names another; without `--at` its time is fixed, so a version prints to the same bytes; `--printed-by` names the organisation that printed it, `--crs` (with `--vertical-datum`) places it on a map, and `--bodies` gives the bodies an application derives, a JSON file of results keyed `elements/<id>` and `types/<id>` ([IFC](#ifc)). `ifcx` prints the model as IFCX, experimentally, from its IFC4 print, with the same options but `--crs`, into `<folder or file name>.ifcx` by default, and says what IFCX loses of the IFC4 print ([IFCX, experimental](#ifcx-experimental)). `apply` writes the new model only with `--out`: as one file when the path ends in `.json`, else as a folder through the writer ([Commands](#commands)). `pull` writes a version into an empty folder, or with `--force` into an existing one, where it removes only the files of records that are not in the version and leaves every other file alone (Part III, 13).

`merge` lists the conflicts by record and member and the merged model's errors by record; it exits 1 when a conflict is left or the merged model does not check. `merge` and `diff` also say which top folders each change touches (`architecture`, `systems`, `types/systems` …) and name a change to the datums, the project, levels and grids that every discipline shares. `datums` writes a building's datums into a new folder, for a discipline to start its own model from ([Working across disciplines](https://openeik.org/guides/disciplines.md)). `clash` says where the pipes and ducts run into the bodies of the architecture and the structure, through an element or grazing it, from the bodies `compile` derives (`clashModel` in the library); it exits 1 when one does. It is a coordination aid, not a rule of the specification. `--out` writes the merged model, and only when it merged cleanly and checks: as one file (the single-file form, in the stored form) when the path ends in `.json`, otherwise as a folder, through the writer.

## The library

| Function | Does |
|---|---|
| `readFolder(source, {check, lenient, assumeFormat, schemas})` | A folder (a path in Node, or a map of paths to texts or bytes) into the single-file form, with `records`, `kept`, `skipped`, `diagnostics` and `get`, `pathOf`, `hashOf` by list and id. Refuses a folder that does not check by throwing an `OpenEikError` (`code: "folder-refused"`, `diagnostics`) unless `lenient`; but for the layout of its files: a record that is I-JSON in another layout than the stored form is read, and the check's finding on its layout is a warning there (Part III, 5, rule 6). A record or `eik.json` that is not UTF-8, names a member twice, holds a number that is not finite or that expresses more magnitude or precision than a double provides, nests deeper than 256 levels, or is larger than 64 MiB, is refused with or without the check ([codes](#diagnostic-codes)), and so is a folder past a bound of `BOUNDS` (more than 1 000 000 files, a view of more than 50 000 detail chunks), never read in part. With `check: false` it reads a folder that fails only the whole-model check (Part III, 12, rule 5) as it is, and refuses besides only what no reader reads, the list of Part III, 12: `eik.json` that is not JSON, has no `format` or names a version or units it does not implement, a project of another `schemaVersion`, units or up axis, two records of one id in a list Part I, 6, rule 1 names (elements, types, views, levels, grids, sheets and linked references), a file that is not UTF-8 or not JSON, and a kept file in a record's way |
| `readModel(source, {check, lenient, schemas, name})` | The single-file form (Part III, 11), whatever its file is called (11.1, rule 3): its file's bytes, its JSON text or the object, read as `readFolder` reads a folder: `{model, diagnostics}`. Its bytes are read as UTF-8, never with U+FFFD in place of what is no text, and its text as I-JSON, as `readFolder` reads a record, with or without the check. It checks the model whole (`checkModel`) unless `check: false`, and refuses it by throwing an `OpenEikError` (`code: "model-refused"`, `diagnostics`) unless `lenient`; without the check it refuses besides only what no reader reads: bytes that are not UTF-8, text that is not JSON, a number that is not finite, a value that is no object, a schema version, units or an up axis it does not implement, two records of one id in a list Part I, 6, rule 1 names, and an entry of `extras` in a record's way (at its path, its leaf or a folder it needs: Part III, 7, rule 4) |
| `modelFiles(model, {eik, agents, from})`, `writeFolder(dir, model, {check, eik, schemas})` | The writer (Part III, 13), `readFolder`'s inverse: a model in the single-file form as its folder's files, path to text, every JSON file in the stored form; and (Node) onto a folder: checked first (`code: "model-refused"`, `diagnostics`), only the files whose bytes change written, the files of records that went removed and no other file, `AGENTS.md` only where there is none. Returns `{written, removed, unchanged}` |
| `writeArchive(source, {check, proposals, assets, eik})`, `readArchive(bytes or path, {check, lenient, proposals})`, `checkArchive(bytes or path, {schemas, quality, proposals})`, `unpackArchive(bytes or path, dir, {check, proposals})`, `openArchive(bytes)`, `archiveEntries(folder)`, `isArchive(bytes)`, `ARCHIVE_MEDIA_TYPE`, `ARCHIVE_EXTENSION`, `DEFLATE_MOST`, `ARCHIVE_CODES` | An archive of a folder (Part III, 11.3, of 0.5; [below](#an-archive-of-a-folder)): a folder (a path, its files, or a folder `readFolder` or `readArchive` gave) or a model in the single-file form, with its assets' bytes, as one `.eik.zip`, checked whole first, the same bytes for the same folder or version; one read as the folder it holds, `readFolder`'s result with `archive`, refused where rule 11 refuses it (`code: "archive-refused"`); a validator's verdict; (Node) its folder written as `writeFolder` writes one. Also `@openeik/tools/archive` |
| `foldPath(path)`, `writePlan(files, disk)` | The writer's helpers: a path folded as a case-insensitive, normalisation-insensitive file system sees it (each name's fold, Part III, 4.3: in NFD, its case folded by the full case folding of Unicode 13.0.0, then in NFC; `foldName` and `caseFold` fold a name and its case), and the plan of a write from a listing of what is on disk (what to write, rename, remove and refuse), so a write does the same on every file system |
| `modelPaths(model)` | The paths a model in the single-file form is written at, in the writer's order, each with the JSON pointer of what it holds: `eik.json`, the project's files, every record's file and a view's detail chunks (Part III, 4 and 10), and the kept files. The validator compares them as the writer does, name by name where case and Unicode normalisation are ignored (Security and privacy, 6.2) |
| `checkFolder(source, {schemas, quality, proposals})`, `checkModel(model or path or JSON text or bytes, {schemas, name, quality, proposals})` | The validator: `{ok, errors, warnings, infos, diagnostics, files, counts}`. With `quality: true`, also the model-quality warnings ([below](#model-quality)); with `proposals: ["electrical"]`, for a model of 0.1, also a proposal that 0.2 makes a rule ([below](#proposals)) |
| `checkQuality(model, {name, accept})`, `QUALITY_RULES`, `QUALITY_CODES`, `namedCategory(name, category)` | The model-quality warnings of a model in the single-file form (one `readFolder` or `readVersion` gave), without the validator, the categories' and weight's, but those `accept` names; the rules; every quality code; the category a name names |
| `weightOfDetails(items, {scale, thresholds})`, `weightOfElements(elements, {types, thresholds})`, `weightOfSvg(text, {thresholds})` | Weight (Part III, 15, of 0.5; [Weight](#weight)): pure detectors of plain records, a view's detail items, elements and their types, an issued SVG's text; each finding `{code, ids, count, compact, saves, message, data}`. Also `@openeik/tools/weight` |
| `weightChecks(records, report, {files, place})`, `svgChecks(path, text, place, report)`, `WEIGHT_LIMITS`, `WEIGHT_CODES`, `WEIGHT_COMMAND_CODES`, `prismOf(body)`, `circleOf(points)`, `chordsFor(r, sweep, tolerance)` | The validator's wrappers of the detectors; the default thresholds; the codes of the checks and of a command processor's advisories (Part III, 15.8); the prism a declared mesh is, where it is one; the circle through a line's points, where they all lie on one; how many chords draw an arc within a tolerance |
| `loadSchemas(source?)`, `schemasOf(format, schemas?)` | The bundled schemas, or a `schemas/` folder, or a map of them; and the set a folder or a model of a format is held to, the set of 0.2 (`of02()`) for a format of 0.2, which names each schema by its path there (`name`) |
| `canonical(value)`, `storedForm(value)`, `hashOf(text)`, `hashValue(value)`, `keptObject(text)` | RFC 8785 canonical JSON, the stored form of a file, SHA-256 of a text, a record's hash, a kept file's object. A value nested deeper than 259 levels (a model that reads holds a detail item of a 256-level chunk three levels deeper) is a TypeError, as a number that is not finite is |
| `segment(id)`, `unsegment(name)`, `placeOf(leaf)`, `recordPlace(path)`, `keptPath(path)`, `escapable(name)`, `foldedKept(fixed, kept)` | The layout (Part III, 2 to 7): an id as a path segment, escaped as Part III, 2 says, and a name read back, every escape decoded in one pass; a leaf's or a file's record, its id read from its name; whether a path is one Part III, 7, rule 1 lets a kept file have. Rule 8 keeps more paths out: `escapable` is true of a name it keeps out (one Part III, 2's rules 2 to 5 would escape; a `%` is none), and `foldedKept` gives the kept files a reader leaves alone, by their paths, with the path each meets: one that folds to one with a record's path, `eik.json`'s, `AGENTS.md`'s or an earlier kept file's, or that passes through `eik.json` or `AGENTS.md`. `folderFiles`, `readFolder`, the validator and the writer apply both |
| `extensionPrefix(name)`, `extensionAt(pointer)`, `isPrefix(name)`, `isReservedName(name)`, `RESERVED_NAMES` | Extensions (Part I, 11): the prefix of an extension member's name, or of the member a JSON pointer ends at; whether a name has a prefix's form; whether it is reserved; the names OpenEik reserves, as `registry/extensions.json` lists them (`eik-*` for every prefix that starts with `eik-`) |
| `TYPE_PATHS` (`@openeik/tools/check`) | The members that name a type, as the schemas define them: an element's `typeId`, `recesses[].typeId`, `edges[].typeId` and `trussLayout.familyTypeId`, and a view's `assembly.typeId`. The validator's check of unused library records and the command processor's `type.delete` follow these and no others |
| `versionTree(source, {eikJson, proposals})` | `{root, objects, leaves, records, kept}`: the folder as content-addressed objects (Part VI, 1 and 2), shards past 4096 entries; with `proposals: ["electrical"]`, each circuit a record's leaf ([Proposals](#proposals)) |
| `filesOfTree(source, root, {only})`, `listLeaves(…)`, `folderEntries(source, tree, path)`, `parseTree(text, hash, where)`, `memorySource(objects)` | A tree back to files; a folder's entries, its shards read through; a tree object's entries; any object source. A tree whose entry is malformed, whose entry name is no path segment that stays in its folder, or that names two entries alike is refused (`code: "not-a-tree"`, `"tree-name"` or `"tree-duplicate"`, the last two with a diagnostic naming the tree), before anything of it is written. `listLeaves`, `folderEntries` and `filesOfTree`, which read a tree as a folder's, also refuse an entry that no folder gives (`code: "tree-name"`): a hidden name, a `~` that is no shard, a shard that holds a shard, or a name in a shard its hash does not give it; `parseTree`, which reads one tree object alone, does not. `filesOfTree` refuses a version that holds a kept file that a reader of a folder leaves alone or reads as another file: at a path no kept file may have, over 1 MiB or holding NUL, at `AGENTS.md` or at a record's path (`code: "tree-kept"`, a diagnostic naming each such leaf). `listLeaves` and `filesOfTree` take `repair: {unplaced: [], diagnostics: []}`, as `readVersion` with `repair` passes it: no such tree is refused, each such entry is reported and left out ([Reading a version that no folder gives](#reading-a-version-that-no-folder-gives)) |
| `diffTrees(source, a, b, {proposals})`, `diffFolders(a, b, {eikJson, proposals})` | `{changes, kept}`: by record and field, moves found by id, a view's detail items counted (Part VI, 4); with `proposals: ["electrical"]`, the circuits as records of the list `circuits` |
| `mergeModels(base, ours, theirs, {choices, schemas, proposals})`, `mergeFolders(base, ours, theirs)` | A three-way merge by record and member ([below](#merging)): `{ok, model, conflicts, merged, diagnostics, choices}`; `ok` only when no conflict is left and the merged model checks whole; with `proposals: ["electrical"]`, the circuits a record list merged by id (`circuits/<id>`), and the merged model checked by the proposal |
| `resolveMerge(result, choices)` | Settles conflicts, ours or theirs for each (`{"elements/wall-north": "theirs", "levels": "ours", "extras/<path>": …}`), and checks the merged model again |
| `mergeBase(store, a, b)`, `mergeVersions(store, {base, ours, theirs}, {choices, commit})` | The merge base of two versions, from their commits' parents; a merge of two versions of a store, and with `commit` a merge commit when it is clean |
| `connectStore({url, repo, token, tokenOrigin, fetch})` | A repository in a store that speaks API v0: `refs`, `getRef`, `moveRef` (compare-and-swap), `get`, `has`, `put` (within the store's limits: an object larger than one request takes goes in parts, by the store's uploads, [Large objects](#large-objects)), `log`, `getMeta`, `putMeta`, `repoInfo`; and for assets (Part XV), `hasAssets`, `putAsset`, `getAsset` and `assetLimit`. The transport is any `fetch`. A token goes only over https or plain http to this computer (`insecure-url` otherwise), and, with `tokenOrigin`, only to that origin (`token-origin` otherwise), both refused before anything is sent ([Tokens](#tokens)) |
| `readVersion(store, refOrHash, {only, cache, check, lenient, repair, verify})` | A version as `readFolder` gives a folder, plus `version`, `commit`, `tree`, `objects` and `leaves`, each leaf read to its object's hash as `versionTree` gives them, for a writer's cache (`hashOf(list, id)` is the leaf's); `only` reads part of it; objects are checked against their hashes and cached, and each record is parsed once. A version whose tree no folder gives is refused, leniently or not, as `filesOfTree` refuses it; `repair: true` reads it all the same and gives back what it leaves out (`unplaced`); `verify: false` takes the objects of a store of the caller's own that checked them as it took them in, without hashing them again ([Reading a version that no folder gives](#reading-a-version-that-no-folder-gives)) |
| `cachedSource(source, cache, {verify})`, `checkObject(hash, text)`, `canonicalProblem(text)` | An object source that keeps what it read, by hash: each object the source answers checked as it enters (`checkObject`; Security and privacy, 5.3, rule 1), against its name (`hash-mismatch`), for the canonical form of the JSON it parses to (`object-not-canonical`: white space, members out of order or named twice, a number or a string written otherwise, which pass the hash check and two readers would read as two values; `canonicalProblem` says why), and for its length (`code: "file-too-large"`), each refusal naming the object, unless `verify: false`, which is refused for a store `connectStore` connects (`verify-remote`). A connected store's `log` checks each commit so too |
| `pushVersion(store, source, {author, name, note, agents, ref, parent, eikJson, check, summary, confirmCredentials})` | Uploads what the store lacks, writes a commit, moves the ref by compare-and-swap; throws `code: "ref-moved"` with `current` when someone moved it meanwhile, and, before anything is sent, `code: "tree-name"` for a folder whose version would hold a name no reader of versions takes, `code: "version-too-deep"` for one whose version would nest deeper than a reader here reads, and `code: "kept-credential"` when a kept file the store lacks looks like a credential (its diagnostics the warnings, each naming the file, what it looks like and the line, never the secret; Security and privacy, 8, rule 3): take it out, or push again with `confirmCredentials: true` on the person's word, and the answer's `warnings` name it. `agents`: of a folder of 0.2, the agents whose operations the version holds, as envelopes' `by.agent` name them; the commit gets `agents`, each `{name, version?}` once, sorted (`commitAgents`; Part XVII, 4.3, rule 1), and a folder of 0.1, which has none, is refused (`agents-0.1`; the agent goes into the `note`). `push` and `openeik push --agent <name>[@<version>]` take them too, and `openeik log` names them beside the author |
| `clone(store, dir, {ref, remote, url, repo, proposals})` | ([Remotes](#remotes-clone-push-pull)) A ref's head written into an empty or new folder through the writer, and its tracking ref recorded in `.eik/remotes.json`: `{remote, ref, url, repo, version, tree, written}`. A url with credentials, in its user part, a query string or a fragment, is refused (`bad-url`): the url is kept in the folder, and a token never is |
| `push(store, dir, {message, author, note, remote, ref, proposals, confirmCredentials})` | The folder's changes since its tracked version as one named version on top of it, the ref moved by compare-and-swap from it: `{pushed, version, tree, parent, uploaded, commit, warnings?}`; `pushed: false` when there is nothing to push; `code: "ref-moved"` (pull first) when the ref moved meanwhile, and nothing written; `code: "kept-credential"`, and nothing sent, as `pushVersion` |
| `credentialWarnings(kept, {only})`, `credentialFindings(text)`, `CREDENTIAL_CODES` | What a push warns of before it sends kept files (Security and privacy, 8, rule 3): of a folder's kept files (`folderFiles(…).kept`), those `only` names, a warning for each that looks like a credential (`code: "kept-credential"`, [codes](#diagnostic-codes)), naming the file, each kind and its line, never the secret; what one text looks like, each kind with its first line. An application that shows the person what a push would send calls it first |
| `BOUNDS`, `BOUND_CODES` | What a reader of this package reads at most of a source it does not control (Security and privacy, 7.2): `file` 64 MiB, `model` 256 MiB (the single-file form), `depth` 256 (JSON's levels, and a version's folders), `files` 1 000 000 (a folder's files, a version's leaves, a model's records), `chunks` 50 000 (a view's), `entries` 2 000 000 (a version's tree entries, each naming an object) and `object` (an object's text, the longest a file of 64 MiB takes); past each, the whole is refused, naming what met it, never read in part ([codes](#diagnostic-codes): `code: "file-too-large"`, `"too-many-files"`, `"too-many-records"`, `"too-many-chunks"`, `"too-many-objects"`, `"version-too-deep"`); none is below what the specification lets a model hold (rule 5) |
| `pull(store, dir, {remote, ref, choices, proposals})` | What others pushed: `{ok, status, base, theirs, version, tree, written, removed, conflicts, merge, diagnostics}`, `status` one of `up-to-date`, `fast-forward`, `merged`, `conflicts` and `refused`; nothing written unless `ok`; `code: "not-descendant"` (with `current` and `tracked`), and nothing written, when the ref no longer descends from the tracked version |
| `status(dir, {remote, ref})`, `fetchHead(store, ref)` | Per remote and ref, the tracked version and whether the folder changed since: `{tree, changed, refs}`, local; a ref's head in one call, to say whether the remote moved |
| `readRemotes(dir)`, `REMOTES_FILE` | A folder's remotes, as `.eik/remotes.json` holds them |
| `recordInputs`, `inputsDigest`, `intentInputs`, `runId`, `resultManifest`, `resultStatus`, `resultSetStatus`, `changedInputs`, `FILE_INPUTS` | Result manifests (`openeik-result/0.1`; `resultStatus` reads the earlier `openeik-result/0.1-proposal` as the same format). Pairs are matched by the record they name (`pairKey`), in either layout of Part III, 4.4: `changedInputs` names the inputs that only moved. `resultSetStatus` says whether a result set of a folder is current, from the folder itself; from 0.6, and in 0.5 with the proposal `fileInputs`, a selection's `files` select files that hold no record (Part VI, 8.4.1) |
| `REGISTRY`, `registration(prefix)`, `openUrl(entry, {store, building, version, model, run})` | The extension registry (Part I, 11.1), `registry/extensions.json` as the package was built with it (`npm run registry:bundle`), frozen; a prefix's entry, a withdrawn one with its `withdrawn`, or undefined; and the URL at which a host opens one of an application's folders in the application, its entry's `open` with the query of Part VI, 8.1.1, rule 2 (the proposal `appOpen`, [Proposals](#proposals)). Also `@openeik/tools/registry` |
| `OpenEikError`, `CODES`, `formatDiagnostic` | Errors with a `code`, their `diagnostics` and their `details` (a store's refusal's `status` and the store's own details among them, each a member of the error too, but none that would replace its `code`, `message` or `diagnostics`); the diagnostic codes, this library's own until the specification defines codes (planned for 0.2) |
| `applyCommands(model, commands, {dryRun, replay, sequence, schemas, proposals, answers, version, ref, at})`, `CORE_KINDS`, `ELECTRICAL_KINDS`, `REPLAY_LIFTS` | The command processor (Part V): a batch applied to a model in the single-file form, all or nothing, answered as Part V, 9 says; the kinds it implements, the core record operations and Part XIII, 9's; what a replay lifts ([Commands](#commands)). For a model of 0.2, by every rule of 0.2, each command held to the schemas of 0.2: a batch in an envelope, every refusal coded, the categories 0.2 adds made and changed by their rules, and Part XIII, 9's kinds and cascades; for a model of 0.1, so with `proposals: ["envelope"]`, `electrical`, `member` or `provision`, every whole-model check with the proposals asked for ([Proposals](#proposals)) |
| `COMMAND_CODES`, `ENVELOPE_FORMAT`, `MODES`, `PRECONDITIONS`, `ADDED_PRECONDITIONS`, `isEnvelope(value)`, `operationDigest(envelope)`, `proposalForm(proposal)` | Part XVII, commands with an envelope ([Proposals](#proposals)): the codes of the processor's own refusals, with their rules ([below](#command-codes)); the envelope's format and modes; the precondition each kind takes in one, and the fourteen kinds that had none; whether a value is an envelope; its digest; and, with the proposal for 0.5 `hostKept`, which of the three proposals an answer names (`file`, `kept` or `line`; Part XVII, 6.3.1, rule 4). Also `@openeik/tools/envelope` |
| `compileModel(model, {proposals})` | The compiler (Part IV, the class-A rules): `{producer, bodies, quantities, lines, sources, diagnostics, notes}` for a model in the single-file form; with `proposals: ["electrical"]`, also Part XIII's bodies and `legs` ([Proposals](#proposals)). The model is not changed, and the order of its elements does not matter ([Compiling](#compiling)) |
| `quantitiesOf(model, {proposals, compiled})` | From 0.6 (Part XXI; the proposal `quantities` of a model of 0.5): a model's quantities as typed values, `{elements, types, runs, bars, cables, pits, cutList}`: each element's by Part XXI's names, each `{value, unit, basis, rule}` in m, m², m³, kg or a count, each layer's under `layers`; each type's sums; and the lists a schedule reads ([Quantities](#quantities)). Also `@openeik/tools/quantities`, with `QUANTITY_NAMES`, `typedQuantities`, `typedQuantity`, `underZero`, `SUMMED_BY_CATEGORY`, `faceArea` and `strippedOf` |
| `costScheduleOf(model, id, {rates})`, `workScheduleOf(model, id)` | From 0.6 (Part XXII; the proposals `costSchedules` and `workSchedules` of a model of 0.5): a cost schedule worked out, each item's quantity a quantity of Part XXI summed over its selection, and with a project's own rate list, kept apart from the model, each item's rate and amount and each group's and the schedule's; a work schedule's days by the critical path method, each task's late days, floats and elements' quantities ([Cost and work schedules](#cost-and-work-schedules)). Also `@openeik/tools/schedules`, with `selectionOf`, `ratesChecks`, `costSchedulesChecks` and `workSchedulesChecks` |
| `workPartsOf(model, id, {proposals, typed?, compiled?})` | From 0.7 (Part XXII, 5.4.2; the proposal `taskParts` of a model of 0.6): a work schedule's parts, `{id, applied, elements, unplaced, turns, tasks}`. `elements`, by id, each element some task builds or takes a cell of: `{cells, built?, taken?}`, each cell `{layer, function, pour, built?, taken?}`, its layer's id (null for the one layer of a type with none), its function, its pour's id (null for the rest), and when it is built and taken, `{task, start, finish, startDate, finishDate, unplaced?}`, in working days from 0 as real numbers with the dates of the working days they fall on; the element as a whole `{start, finish, startDate, finishDate, first, last}`. `unplaced`, `[{element, side, cells, at, date}]`, the cells no task covers; `turns`, by task id, each task that gives an order, `[{element, start, finish, startDate, finishDate, weight}]` in its order; `tasks`, by task id, `{takes, start, finish, elements}`. `{error}` where the model has no such schedule or its days cannot be worked out. Also `@openeik/tools/schedules` |
| `derivedLayer(model, result)`, `derivedCurrent(model, file)` | The optional derived layer (Part IV, 1.1, in the layout and form 1.1.2 proposes for 0.2): one result per element for `.eik/derived/elements/<id>.json`, naming every record it comes from by hash, its bodies in 1.1.1's kinds; whether such a result may still be used |
| `readDerived(model, files, own?)`, `derivedBodies(body)`, `derivedPath(key)`, `derivedKey(path)`, `DERIVED_CODES`, `DERIVED_FOLDER`, `DERIVED_LISTS`, `DERIVED_SCHEMA` | A folder's derived layer read (Part IV, 1.1.2): the results a reader may use, by key, and why it uses no other file ([Compiling](#compiling)); a compiler's body in 1.1.1's kinds; a result's path from its key, and its key from its path |
| `sectionProperties(section)`, `sectionCells(section)` | A member section's exact area and centroid offset (Part IV, 6.5.5); its convex cells, arcs drawn with chords |
| `COMPILE_CODES`, `PRODUCER` | The compiler's diagnostic codes; its name and version, as a derived result names its producer |
| `ifcOfModel(model, {version, at, printedBy, proposals, crs, bodies, sets})` | The IFC bridge (Part VIII, 1): `{text, report}`, a model in the single-file form printed as IFC4, from the bodies `compileModel` derives, the bodies an application gives (`bodies`) and the bridge's stand-ins where neither is, and its fidelity report. `version` is `{id?, root?, at?}`, named in the print's `OpenEik_Source`; `at` the print's time; `printedBy` `{organisation}`, who printed it; `crs` `{epsg, verticalDatum?}`, a projected system to place it on a map; `bodies`, results of the derived layer keyed `elements/<id>` and `types/<id>` ([Bodies an application gives](#bodies-an-application-gives)); `sets`, an application's own property sets, keyed so ([IFC](#ifc)). No clock and nothing of Node.js: the same model and options give the same bytes, in a browser or a worker as in Node ([IFC](#ifc)). Also `@openeik/tools/ifc` |
| `projectedCrs(epsg)`, `transverseMercator(latitude, longitude, crs)`, `KNOWN_CRS` | The projected systems the bridge places a print in (SWEREF 99 TM and its local zones, EPSG:3006 to 3018; ETRS89 / UTM 28N to 38N; WGS 84 / UTM 1N to 60N) by their published parameters, and a latitude and longitude projected by Krüger's series: `{easting, northing, convergence}`, metres and degrees |
| `ifcxOfModel(model, options)` | EXPERIMENTAL: the IFCX print (Part VIII, 1, its note on IFCX; open questions, 86), `{text, report}`, buildingSMART's `ifcx_alpha`, which will change with its post-alpha format, read from the IFC4 print of `ifcOfModel` with the same options: the same objects, each path its GlobalId as a UUID, classes, predefined types, properties and bodies, as meshes in metres; its report the IFC4 print's, with what IFCX loses of it (`lost`). No clock and nothing of Node.js, as `ifcOfModel` ([IFCX, experimental](#ifcx-experimental)). Also `@openeik/tools/ifcx` |
| `uuidOfGlobalId(globalId)`, `uuid5(namespace, name)`, `IFCX_VERSION`, `IFCX_EXPERIMENTAL`, `IFCX_IMPORTS`, `IFCX_IMPORTED_KEYS`, `IFCX_OWN_SCHEMAS` | A GlobalId as the UUID its 128 bits are, as buildingSMART's converter keeps it; a name-based UUID of version 5 (RFC 9562), a body's path; the version of IFCX written (`ifcx_alpha`), the sentence that says it is experimental, buildingSMART's schemas a print imports and the keys each defines, and the schemas of the print's own keys |
| `readStep(text)`, `StepError` | A reader of ISO 10303-21 text: its header and its instances by id, every string escape of the standard and complex instances; what the IFCX print reads the IFC4 print with, and `tools/ifc-validate.mjs` diffs prints with |
| `eikOfIfc(text, {mesher, producer})` | Reading IFC into OpenEik (Part VIII, 2, of 0.2; in 0.1 the proposal `ifc-read`): an IFC4 or IFC2X3 file read once, to start a project, async, `{model, bodies, report}`: the single-file form, each element's shape a given body (`shape: "given"`), the bodies as results of the derived layer keyed `elements/<id>` and `types/<id>`, and the fidelity report. Deterministic and without a clock or Node.js; `mesher` meshes what it does not read ([Reading IFC](#reading-ifc)). Also `idOfGlobalId`, `IFC_READ_CLASSES`, `IFC_READ_SCHEMAS`, `IFC_READ_RULE`, `IFC_READ_MESHER_RULE`, `PLACEMENT_LENGTH`, and `IFC_READ`, `givenShape` and `ifcReadMembers`, what the proposal adds to records |
| `ifcGuid(projectId, key)`, `stepString(text)`, `printSentence(root)`, `IFC_SCHEMA`, `IFC_BRIDGE`, `IFC_FIXED_TIME`, `IFC_PRINTED_BY`, `IFC_SOURCE_PSET`, `IFC_REPORT_DOCUMENT` | A GlobalId derived as Part VIII, 1, rule 3 asks and the reference bridge derives it (`element:<id>`, `type:<IFC class>:<type id>`, `level:<id>`, `opening:<id>`, `stair-part:<id>:<piece>`, `port:<id>:<index or end>`); a text as an ISO 10303-21 string; the sentence that says a file is a print; the schema written (`IFC4`), the bridge as a print names it, the time of a print given none, who printed it given no one, the name of the property set that names the version and of the document that carries the report's short form |
| `bodyShells(body, dz)`, `shellsClosed(shells)`, `shellsVolume(shells)` | A body of the compiler (Part IV, 8) as faceted shells, plane faces with their holes turned outward, as the bridge writes them; whether shells are closed; the volume they hold |
| `doorOperation(element, type)`, `windowPartitioning(type)` | How a door opens and how a window is divided, as the bridge writes them on a door's or a window's IFC type (Part II, 6.5; Part VIII, 1.2): `{value, label?}`, an `IfcDoorTypeOperationEnum` or an `IfcWindowTypePartitioningEnum` value and, for `USERDEFINED`, its text; for an application that writes its own IFC and wants the same values |
| `facingOf(model, id)`, `roofWindowFacing(model, roofId, windowId)`, `wallFacing(wall)`, `bearingOf(facing, trueNorth)`, `northOf(model)` | Which way an element faces (Part II, 6.8): a wall's, a door's or a window's facing in plan and its bearing, clockwise from true north; a roof window's facing, tilt and bearing, none where it lies level; true north, the site's or plan +Y. Also `@openeik/tools/facing` |
| `trimmedOutlineOf(model, id)`, `edgeTrimProblems(model, id)`, `edgeTrims(element, hostOf)`, `trimHost(wall, type)`, `trimmedOutline(outline, faces)`, `wallFace(a, b, T, face)`, `clipOutline(outline, f)`, `TRIMMED`, `TRIM_ANGLE`, `TRIM_REACH` | Outline edges trimmed to a wall's face (Part II, 6.7; Part IV, 4.5), the functions the validator and the compiler apply: the outline a slab's, foundation's, ceiling's or roof's bodies are built on, `{outline, area, trimmed, trims}`, without compiling; the validator's findings on one element's trims, in its words (a round footing's, and an outline the faces would leave too small, which `trimmedOutlineOf` leaves untrimmed); each entry of `edgeAttachments` with its face, or the rule it breaks; what an entry reads of its wall, from a model of any shape; an outline cut at faces; a wall's face as a line; an outline cut along a line. Also `@openeik/tools/trims` |
| `PROPOSALS`, `ELECTRICAL_CATEGORIES`, `ELECTRICAL_CODES`, `LIGHT_KINDS`, `LIGHT_MEMBERS` | The proposals this package implements (`electrical`, `drawings`, `ownership`, `assets`, `envelope`, `review`), the categories Part XIII adds, its diagnostic codes, and a luminaire's kinds and light output members ([Proposals](#proposals)) |
| `folderAssets(folder)`, `readPointer(leaf, text)`, `pointerText(sha256, bytes)`, `assetsOfTree(source, root)`, `sendAssets(store, assets)`, `fetchAssets(store, pointers, have)`, `mergeAssets(base, ours, theirs)`, `namedAssets(model)`, `ASSET_KINDS`, `ASSET_MOST`, `ASSET_CODES` | Part XV, assets ([Proposals](#proposals)): a folder's assets and the files of `assets/` that are none; a version's pointer read back and made; a version's pointers; the bytes a store lacks sent, and a version's fetched and checked; assets merged file by file; the assets a model names; the kinds, the size limit and the codes. Also `@openeik/tools/assets` |
| `DRAWINGS_CODES`, `DRAWINGS_SVG_CODES`, `DRAWINGS_LATER_CODES`, `DRAWING_FORMATS`, `drawingsChecks`, `drawingFileOf`, `personIdForAccount`, `checkDrawingSvg`, `drawingGroups`, `readDerivation`, `diffDrawingSvg`, `drawingStatus`, `drawingImpact`, `verifyDrawingSignoffs`, `drawingReviewBcf`, `shapeProblem`, `SHAPE_TOLERANCE`, `instanceElements`, `DRAWINGS_HISTORY_CODES` | Part XIV, drawings: the codes of its static checks, of the SVG profile, and of the checks that need cryptography or the history; its files' formats; its checks; the issued SVG's profile, groups, derivation and comparison; freshness; the sign-offs' verification; a review exported as BCF 3.0; why a review item's shape breaks its form (XIV.13.4, rule 9); and the elements the groups' instances derive, such as a copy's, which a drawing names by their ids in their instances, each with the kept element, the original and the copy record it is derived from (XIV.6.12, rule 21; 9.7, rule 3; Part II, 10.1) ([Proposals](#proposals)) |
| `issueDrawing(folder, {sheet, by, status, date, revision?, purpose?, changes?, clouds?, generator?, issue?, superseded?, carry?, statusOnly?, pictures?, code?})`, `ISSUE_CODES`, `ISSUER` | Part XIV, 17.2, the reference drawing issuer: the next revision of a sheet's drawing, drawn from the folder's records, with the files 17.2 writes (`drawing.svg`, `read-set.json`, `revision.json`, the register with its entry, the issue record where `issue` asks for one) returned as texts by path, for the caller to write and record as a version; the codes it refuses with; the generator it draws as ([Issuing a drawing](#issuing-a-drawing)). Also `@openeik/tools/issue` |
| `checkRendition(pdf, {path?, revisions?, project?, kept?, renditions?})`, `checkRenditionInFolder(pdf, folder, {proposals?})`, `RENDITION_CODES`, `PAGE_TOLERANCE`, `pdfAttachments`, `renditionId` | Part XIV, 15, a PDF rendition of issued drawings checked from its bytes, with no renderer: its findings, each naming its rule, what it could not check and why, and what it read (its PDF/A identification, its pages, notes and QR codes, its attachments, its signature); against a folder, the revisions it prints found by its attachments and its QR codes, and whether a register keeps it ([Checking a rendition](#checking-a-rendition)). Also `@openeik/tools/rendition` |
| `readPdf(bytes)`, `Pdf`, `pdfText`, `pdfDate`, `pageMarks(pdf, page)`, `decodeQr`, `encodeQr`, `qrModulesFromSampler` | the reader those checks use, dependency-free: a PDF's objects, its cross-reference (tables, streams, object streams and incremental updates), its filters (FlateDecode with predictors, LZW, ASCIIHex, ASCII85, RunLength), its catalog, pages, name and number trees, text strings and dates (`src/pdf.js`, `src/inflate.js`); what a page paints, each mark with its box, colour, path and text through the fonts' ToUnicode CMaps or encodings (`src/pdf-page.js`); and a QR code (ISO/IEC 18004), encoded, sampled from a page's modules and decoded with its Reed–Solomon correction (`src/qr.js`). Also `@openeik/tools/pdf` |
| `drawingHistoryChecks(folder, history, {complete})`, `DRAWINGS_HISTORY_CODES`, `REVIEW_HISTORY_CODES` | The rules of Parts XIV and XVIII that need the history (XIV.19.2; XVIII.9), which `checkFolder` cannot decide from the folder alone: `{diagnostics, unchecked}` for a folder (a path in Node, or its files: the later state) against `history`, earlier versions, each `{root, version, files?}` (its root tree's hash, its id or null, and its files where the caller has them: a folder, a map of paths to texts, or `readVersion(…).files`). Against each version given with its files, key-removed, issued-file-changed and register-rewritten; against each revision's source version (its `source.root`), where it is among them with its files, read-set-volume and read-set-self-check; against the superseded revision's SVG, where one of them holds it, change-unlisted; and with `complete: true`, the history being the building's whole history, issue-version-unknown. A rule whose input is not given is listed in `unchecked` (`{rule, path, reason}`), with no finding ([codes](#diagnostic-codes)) |
| `REVIEW_CODES`, `REVIEW_LATER_CODES`, `REVIEW_ANCHOR_CODES`, `MODEL_REVIEW_FORMAT`, `MODEL_REVIEWS_FOLDER`, `TERMS_FOLDER`, `ISSUE_PREDICATE_TYPE`, `RECEIPT_PREDICATE_TYPE`, `TERMS_PREDICATE_TYPE`, `reviewChecks`, `reviewFileOf`, `reviewNamedAssets`, `modelReviewPath`, `issueRecordPath`, `modelReviewBcf` | Part XVIII, review and issue: the codes of its static checks, and of those that need the reviewed version, the history or cryptography; its files' format, folders and predicate types; its checks; what a path is of its files; the assets a model's reviews name; and a model review exported as BCF 3.0 ([Proposals](#proposals)). Also `@openeik/tools/review` |
| `verifyReviewStatements(folder, {hostKeys, tsaCerts, now, kinds})`, `verifyReceipts(folder, {hostKeys, tsaCerts, now})`, `readHostKeys(text or bytes)`, `HOST_KEYS_FORMAT`, `HOST_KEYS_PATH`, `HOST_KEYS_SCHEMA` | Part XVIII's statements verified offline (XVIII.4.4; 5.3, rule 7; 6.2, rule 7): an issue's statements, a host's receipts and terms accepted, each signature with its key, a person's of the registry or a host's of the hosts' files of keys given (XVIII.5.6), its RFC 3161 time-stamp chained to a certificate given, and the key's window, then its subjects and predicate type; by the statement's path, each `{ok, problems, warnings, kind, issue, host, hostKeys, keyid, time, …}`, `hostKeys` the SHA-256 of the host's file that verified it. `readHostKeys` holds a host's file to its schema and rule 5.6.4 ([Proposals](#proposals)) |

Types are in `types/` (generated from the JSDoc with `npm run types` in this folder). Each module can be imported on its own (`@openeik/tools/canonical`, `/check`, `/compile`, `/quality`, `/weight`, `/read`, `/write`, `/archive`, `/tree`, `/diff`, `/merge`, `/migrate`, `/disciplines`, `/clash`, `/facing`, `/trims`, `/ownership`, `/assets`, `/envelope`, `/store`, `/remote`, `/result`, `/schemas`, `/commands`, `/electrical`, `/drawings`, `/review`, `/ifc`, `/ifcx`, `/ifc-read`, `/versions`, `/registry`). `readFolder`, `readModel`, `modelFiles` and `writeFolder` take `proposals` as the validator does ([Proposals](#proposals)).

## Commands

`applyCommands` changes a model by typed commands (Part V), never in place: it works on a copy and gives the new model back when the batch is accepted. Each command is checked in the three stages of Part V, 6: its shape against its kind's schema of the model's version, `schemas/0.2/commands/<kind>.schema.json` for a model of 0.2 and `schemas/commands/<kind>.schema.json` for one of 0.1, the rules of its kind (the target exists, the preconditions hold, references name records of the right kind, the patch and delete rules), and, once after the last command, the whole model with `checkModel`, by the model's version: a model of 0.2 by every rule of 0.2, one of 0.1 with the proposals asked for (`proposals`). A refusal names the command by its index, kind and id.

```js
import { readFolder, applyCommands } from "@openeik/tools";

const { model } = readFolder("examples/one-storey-house");
const answer = applyCommands(model, [
  { kind: "update", id: "wall-west", expectedRevision: 1, patch: { name: "West wall (render)" } },
], { dryRun: true });
// {ok: true, dryRun: true, results: [{index: 0, ok: true, kind: "update", result: {…the wall…}}],
//  affected: ["wall-west"], verify: {filter: {elementIds: ["wall-west"]}, snapshot3d: {…}, snapshot2d: [{viewId: "view-plan-0", …}]}}
applyCommands(model, [{ kind: "update", id: "wall-west", expectedRevision: 0, patch: { name: "W" } }]);
// {ok: false, dryRun: false, failed: 1, results: [{index: 0, ok: false, kind: "update", commandId: "wall-west",
//  error: "Command 0 (update wall-west): Revision conflict: expected 0, current 1. Read and retry."}]}
```

- **Kinds**: the 30 core record operations of Part V, 2.1 (`CORE_KINDS`); and, for a model of 0.2, `view.upsert` of the documentation profile (Part V, 2.2; `DOCUMENTATION_KINDS_IMPLEMENTED`), a view written whole, a new one counted as revision 0, and Part XIII's three of section 9, `circuit.upsert`, `circuit.delete` and `view.lighting` (`ELECTRICAL_KINDS`; [Proposals](#proposals)). A kind is implemented for a model whose version's command schemas list it (`x-eik-commands`): those of 0.1, as the tag `v0.1.0` keeps them, list the core record operations alone, so a model of 0.1 refuses the other four as not implemented, with the proposal electrical or without it. With a proposal for 0.5 asked for on a model of 0.4, its kinds: the ground's seven (`GROUND_KINDS`, proposal `ground`), Part XIV, 17.1's seven (`DRAWING_KINDS`, proposal `drawingCommands`), and the rest of the documentation profile with the domain operations that Part V, 2.3.1 defines (`DOMAIN_COMMAND_KINDS`, proposal `domainCommands`), each run as the core record operations it is, its answer's result `{as: [{kind, result}]}`. The domain operations 2.3.1 leaves are refused as not implemented; send such a one as the core operations it leaves. What needs a copy's elements worked out, which the specification does not define, is refused (`original.frame` to another instance, `original.edit` at a copy, `copy.move` of the kept instance, `copy.unique` of a copy).
- **Unknown members**: a member a kind does not define at the top level is refused, with what it may have meant; a member the record schemas do not know, in a record or a patch, is kept, with a warning, and an extension member (`<prefix>:<name>`, Part I, 11.2) is kept without one.
- **The schemas of the model's version** (Part I, 9.4): a command on a model of 0.2 is held to the command schemas of 0.2, `schemas/0.2/commands/`, folded at the cut with every rule of 0.2 (`tools/fold-schemas.mjs`) and written by hand there since: a `create`'s element and a `type.upsert`'s type take every category of 0.2, each held to its category's schema, and every record a command carries to the schema of 0.2 in its place, so that a member a rule of 0.2 adds (a site's `crs` or `trueNorth` alone, an `owner`, `classifications`, a layer's `grain`, a slab's `plane`, a door family's `leafMaterial` …) is a member the schemas know. A command on a model of 0.1 is held to 0.1's, `schemas/commands/`, and, asked for proposals, the record it carries is held as the validator holds it with them (`recordFindings` in `check.js`): the members a proposal adds known and held to their schemas, the site of `project.site` to the proposal site's schema, and a category a proposal adds to its schema.
- **Extension members whose value is `null`**: a command that would write one into a record that did not hold it is refused, naming the record and the member (Part I, 11.2, rule 3; Part V, 1.3). In a record a command writes whole (`create`, the upserts) and in the value a patch gives a member, `null` is a value; a patch's own `null` takes a member away (Part V, 4.2). One a record held, before the command or before the batch, and that the command carries back as it was read, is kept (Part I, 10, rule 1), and so is one in the copy `type.duplicate` makes; a replay keeps one with a warning.
- **Preconditions**: `expectedLevel` is compared with the whole level in the canonical form, every member included, those the schemas do not know and extension members too (Part V, 3.3; Part I, 11.2, rule 5), and a refusal names each member that differs: `Level conflict: level "level-1" is not as the command read it: acme:datum is "N2000" now, and absent from expectedLevel.`
- **What names a type**: `type.delete` is refused while an element names the type by a member the schemas define for it (`TYPE_PATHS`; Part V, 5.4), or a view does in its `assembly.typeId`, since a folder holds every type its records name (Part III, 12). A member no schema defines names nothing: an extension member, or a `typeId` nested in a member the schemas do not know. The validator's `library-unused` follows the same members.
- **Categories**: the 31 of 0.1, and the five 0.2 adds (Part V, 1.5): `electrical`, `cableCarrier` and `cable` (Part XIII), `member` (Part II, 6.2.1) and `provision` (Part II, 6.10), for every model of 0.2, and for a model of 0.1 asked for the proposal that adds them (`electrical`, `member`, `provision`); each record held to the schema `checkModel` holds it to (`categorySchema`) and changed by the proposal's rules ([Proposals](#proposals)). A `generic` element's shape is its declared geometry, its own or its type's, and its type sets none of its sizes; it moves to a category that fits by a `delete` and a `create` with its id, in one batch (Part V, 7.5). No command makes an element or a type of a category the processor does not know; those a model holds are kept as they are, refused an update and removable by a delete (Part V, 1.5).
- **A supplier's parts**: `declaredGeometry` and the railing members of Part II, 12 are written by `type.upsert`, `create` and `update`; a patch replaces them whole, an `update` writes a railing's `posts.at`, and a railing's host and edges must resolve (Part V, 11). No command carries a quote; the specification names no member for a price.
- **Batches**: all or nothing, the whole model checked once after the last command; a failing dry run answers for every command. No clock, no random ids; a command is read as its JSON is stored (NaN refused, a patch's `undefined` refused: send `null`). `replay: true` lifts the admission rules of `REPLAY_LIFTS`.
- **Part XIII, 9** (a model of 0.2; and its deletes in one of 0.1 asked for the proposal electrical, below): `circuit.upsert` writes a circuit whole, a new one at revision 0 and a changed one at its revision plus one, refusing `expectedRevision` for a new one (`null` names it in an envelope); `circuit.delete` removes one and lets go of its devices; `view.lighting` switches luminaires in a 3D view's lighting scene by `ids`, `rooms`, `switches`, `circuits`, `levels`, `kinds` or `all` (a union within a selector, an intersection across them), writes the view with its revision plus one and changes no element, and answers with the view, what it switched (`switched`, each luminaire's level from 0, off, to 100, full) and what selected nothing (`selectsNothing`, each with a warning saying why). A delete takes with it what section 9 says (`removeElements`): a board's circuits (`removedCircuits` in the answer), a circuit's devices let go, their `circuitId` and `from` cleared, and its modelled cables; a device's feeds, each fed from what fed it, its id out of every `controls` (one left empty goes) and the cables to it; a carrier's id out of every cable's `carrierIds` (one left empty goes); and a luminaire's id out of every lighting scene, a scene left with nothing on removed. Each record it changes gets its revision plus one and is `affected`. Within a batch a `delete` may name the revision its element had before such a cascade changed it, and a `delete` of what one took is done (`alreadyDeleted: true`), in a dry run and a replay too. A railing on an outline, a wall's top or a slab edge element gets no profile where Part II, 12.2.1 applies (a model of 0.2, or the proposal railings): only its level and offset follow its host, and a profile a command sends is left out, with a warning.
- **The answer**: `affected` holds what was written or removed and the elements that follow it (hosted, attached, framed, and the walls of changed openings; not joins found from geometry); `verify` filters the affected elements, with a 3D snapshot and up to three plans of their levels.

`openeik apply` does the same from the command line. With `--out` it writes the new model: as one file when the path ends in `.json`, else as a folder through the writer, so `openeik apply ./house batch.json --out ./house` changes only the files the batch changed. With `--proposal`, it reads, checks and writes a model of 0.1 with the proposal, as the processor applies it; a model of 0.2 needs none.

## Versions

This package reads OpenEik 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7 and 0.8, each with or without a pre-release suffix, and refuses any other version, naming the one it found (Part I, 9.2, rule 3): `openeik/0.9` and `openeik/1.0` are `format-unsupported`. A model of 0.2 names its format at its top (the single-file form, Part III, 11, rule 5) and is written as 0.2; a model that names none is one of 0.1, written as 0.1 (`openeik/0.1-draft`, `FORMAT`) unless it is asked for 0.2 by `eik: {format: "openeik/0.2"}`, which migrates it as Part I, 9.8 says (`FORMATS`, `WRITES`, `FORMAT`, from `@openeik/tools/versions`). A model written as 0.2 is written by 0.2's rules: in the owners' layout, its circuits and people as records, a `schemaVersion` it gives kept and none added. `writeFolder` does not take a folder of 0.2 back to 0.1 (`format-unsupported`), and says when it migrates a folder of 0.1 to 0.2 (`migrated: {from, to}`); `compileModel`, `ifcOfModel`, `applyCommands`, `mergeModels` and `diffTrees` apply 0.2's rules to a model or a tree of 0.2, and a derived result of one names the rule set `OpenEik 0.2 Part IV, class A`.

The schemas of 0.2 are in `schemas/0.2/` beside those of 0.1, their `$id`s under `https://openeik.org/schemas/0.2/`, and are edited there: `tools/fold-schemas.mjs` folded them at the cut from the schemas of 0.1 and the proposals 0.2 makes rules; since, each one written by hand is changed where it is, and `tools/generate-schemas.mjs` writes the generated ones from the reference implementation, made 0.2's by the same fold, and no other (`schemas/0.2/README.md`). The schemas of 0.1 at the top of `schemas/`, `schemas/proposed/` among them, are byte for byte as the tag `v0.1.0` keeps them. The bundle (`src/schemas.js`) holds both, 0.2's under `0.2/`; `loadSchemas()` gives 0.1's, `loadSchemas(undefined, {version: "0.2"})` and either set's `of02()` 0.2's. `checkFolder` and `checkModel` hold a model of 0.2 to the schemas of 0.2, a schema a check names by its path of 0.1 standing for the one in its place (`at02`, `src/schema-paths.js`), and a model of 0.1 to 0.1's and the proposals asked for.

**The migration of 0.1 to 0.2** ([Part I, 9.8](https://openeik.org/spec/0.2/foundations#9.8)): `migrateModel(model)` gives a model of 0.1 as a model of 0.2, its format and units at its top, its owners file for the owners' layout, a `fire` emergency luminaire an `electrical` one, a toilet or a basin component a terminal, a railing on an outline without its profile, and `findings` for what stays as it was (`sheet-application-record` for a sheet of 0.1 that is no sheet of Part XIV, which stays an application record); `migrateFiles` and `migrateFolder` (`openeik migrate`) migrate a folder in one write, read by every proposal 0.2 makes a rule whether or not one is asked for and judged by the folder of 0.2 it becomes, its records moved to their owners' folders, and say what moved (`moved`), what was rewritten (`rewritten`) and what stays (`findings`).

A model of 0.1 is read by 0.1's rules, and a proposal applies only where it is asked for. A model of 0.2 is read by 0.2's rules: the proposals 0.2 makes rules of the standard (`RULES_0_2`: `electrical`, `drawings`, `ownership`, `assets`, `envelope`, `review`, `frames`, `stairs`, `grain`, `framing`, `site`, `classifications`, `railings`, `declared`, `components`, `rooms`, `framingLayout`, `ifc-read`, `member`, `slopedSlab`, `provision` and `adopted`: every proposal of 0.1) apply to it whether or not they are asked for, in every function that reads a folder, a version or a single-file model. From 0.2, the single-file form names its format and units at its top, as `eik.json` does for a folder, and `readFolder` gives a folder of 0.2 so: `{format, units, project, …}`; a project of 0.2 needs no `schemaVersion`, and one it gives is not read.

**OpenEik 0.3** (the cut of 31 October 2026): a model of 0.3 is read by every rule of 0.2 and the six that 0.3 adds (`RULES_0_3`: `wallRebar`, `wallTopTolerance`, `commitApp`, `materialCategory`, `estimate`, `groupIds`), whether or not they are asked for, and held to the schemas of 0.3, `schemas/0.3/`, the fold of 0.2's and the proposals' (`tools/fold-schemas-0.3.mjs`): `loadSchemas(undefined, {version: "0.3"})` and every set's `of03()`. `proposalsAt(undefined, "openeik/0.3")`, and so for any pre-release of 0.3, gives `RULES_0_2` and `RULES_0_3`, and `ownersLayout` of it is true. A model or a folder of 0.2 migrates to 0.3 by its format alone (Part I, 9.9): `migrateModel(model, {to: "openeik/0.3"})`, `migrateFiles` and `migrateFolder` with `to: "openeik/0.3"`, and `openeik migrate --to 0.3`; a model of 0.1 so goes by way of 0.2. A model written with `eik: {format: "openeik/0.3"}` is migrated in the same write. A version of a folder of 0.3 names its application with `app`, with no proposal (Part VI, 3.5). `FORMAT_0_3`, `RULES_0_3`, `isFormat03` and `from02` (a format read by 0.2's rules: 0.2's or 0.3's) are exported. A model of 0.2 may still ask for any of the six by name, as before the cut.

**OpenEik 0.4** (the cut of 1 November 2026): a model of 0.4 is read by every rule of 0.2 and 0.3 and the seven that 0.4 adds (`RULES_0_4`: `ifcWalls`, `ifcMembers`, `ifcSlabs`, `bearsOn`, `provisionTerminals`, `masonry`, `storeFormats`), whether or not they are asked for, and held to the schemas of 0.4, `schemas/0.4/`, the fold of 0.3's and the proposals' (`tools/fold-schemas-0.4.mjs`): `loadSchemas(undefined, {version: "0.4"})` and every set's `of04()`. `proposalsAt(undefined, "openeik/0.4")`, and so for any pre-release of 0.4, gives `RULES_0_2`, `RULES_0_3` and `RULES_0_4`, and `ownersLayout` of it is true. A model or a folder of 0.3 migrates to 0.4 by its format alone (Part I, 9.10): `migrateModel(model, {to: "openeik/0.4"})`, `migrateFiles` and `migrateFolder` with `to: "openeik/0.4"`, and `openeik migrate --to 0.4`; a model of 0.1 or 0.2 so goes by way of 0.3. `eikOfIfc(bytes, {format: "openeik/0.4"})` reads IFC as a model of 0.4, recognising walls, beams and columns, slabs and foundations (Part VIII, 2.6); without it, a reader asked for none of them writes 0.2, as before. `compileModel` of a model of 0.4 names each derived member's bearings (`bearsOn`, Part IV, 7.4.13.1 and 7.4.15.1), and a result of it the rule set `OpenEik 0.4 Part IV, class A`. `FORMAT_0_4`, `RULES_0_4`, `isFormat04` and `from03` (a format read by 0.3's rules: 0.3's or 0.4's) are exported. A model of 0.3 may still ask for any of the seven by name, as before the cut.

**OpenEik 0.5** (the cut of 5 November 2026): a model of 0.5 is read by every rule of 0.2 to 0.4 and every proposal for 0.5, which 0.5 makes rules (`RULES_0_5`, the 28 names of `PROPOSALS_0_5`), whether or not they are asked for, and held to the schemas of 0.5, `schemas/0.5/`, the fold of 0.4's and the proposals' (`tools/fold-schemas-0.5.mjs`), where each proposal's members, files, commands and schemas are written in: `loadSchemas(undefined, {version: "0.5"})` and every set's `of05()`; a schema a check names by a proposal's path, `proposed/ground/ground.schema.json` say, is the one of 0.5 in its place (`at05`, `moved05`). `proposalsAt(undefined, "openeik/0.5")`, and so for any pre-release of 0.5, gives `RULES_0_2` to `RULES_0_5`, and `ownersLayout` of it is true. A model or a folder of 0.4 migrates to 0.5 by its format alone (Part I, 9.11): `migrateModel(model, {to: "openeik/0.5"})`, `migrateFiles` and `migrateFolder` with `to: "openeik/0.5"`, and `openeik migrate --to 0.5`; a model of 0.1 to 0.3 so goes by way of 0.4, and a material named by its text stays so named (`migrateMaterialIds` moves a model of 0.4 or 0.5 to ids, apart). `eikOfIfc(bytes, {format: "openeik/0.5"})` reads IFC as a model of 0.5, recognising roofs, railings and electrical devices besides walls, beams and columns, slabs and foundations (Part VIII, 2.6), and reading IFC 4.3 (2.7). `compileModel` of a model of 0.5 applies every rule of Part IV that 0.5 adds, a wall's ends at its corners and tees among them (4.1.1), and a result of it names the rule set `OpenEik 0.5 Part IV, class A`; `applyCommands` runs the kinds of Part V, 2.3.1, Part XIV, 17.1.1, Part XIX, 8 and Part XX, 9 on it. `FORMAT_0_5`, `RULES_0_5`, `PROPOSALS_0_6` (below), `isFormat05` and `from04` (a format read by 0.4's rules: 0.4's or 0.5's) are exported. A model of 0.4 may still ask for any of the proposals by name, as before the cut.

**The proposals for 0.5, as a model of 0.4 asks for them** (`PROPOSALS_0_5`; their indexes in `schemas/0.4/proposed/`): a model of 0.4 may ask for them by name, and no model of an earlier version. `reports` (Part VI, 8.2.1; Part XV, 8.1): a result manifest's `reports`, `{asset, title?}`, held to the proposal's schema; each asset named by its path (`report-asset`) and in the folder (`report-missing`), and counted as used, so that a report PDF is no rendition without its register's entry (`checkFolder(dir, {proposals: ["reports"]})`). `appFolders` (Part XVI, 3.2): an owners file's rule `<prefix>/**` for each application's folder, which `ownersOf` and `ownersForLayout` already read and keep: it changes nothing a check does. `ground` (Part XIX; open questions, 132): `checkFolder(dir, {proposals: ["ground"]})` and `checkModel` check `project/ground.json`, a kept file of a folder and the entry of `extras` of a single-file model (`groundChecks`, `GROUND_CODES`), and hold a project's excavation to the proposal's schema, each member optional (Part II, 2.3.1); `groundColumnAt(model, [x, y])` gives the column of the ground at a point by Part XIX, 5: its ground level and where it comes from, its strata from the top down, each with its top, bottom and properties and the profile they come from, its groundwater, the profiles' weights, and what a tool says of it; `delaunay`, `fannedDelaunay` (Delaunay, four or more profiles on one circle a fan from their point least by x, then by y), `weightsAt`, `strataOrder` and `terrainAt` are its parts, and none of them depends on the order of `profiles`: ties go by id; `stressAt(column, level)` gives σv, u and σ′ (Part XIX, 5.4, rule 3). `ifcOfModel(model, {proposals: ["ground"]})` writes no ground, and says so in its fidelity report (Part XIX, 9). `applyCommands(model, commands, {proposals: ["ground"]})` runs the proposal's seven commands (Part XIX, 8; `GROUND_KINDS`): `ground.levels`, and the upsert and the delete of a profile, a pit and a load on the ground, each held to its schema in the proposal's index, its precondition the record as read (`null` for a new one in an envelope), the file written into the model's `extras` in the stored form, an emptied list left out and an emptied ground's file removed; and it holds a `project.excavation` to the proposal's excavation, each member optional. `appOpen` (Part VI, 8.1.1; open questions, 135): a host opens an application's folder in its application at the registry entry's `open`, with the query `store`, `building`, `version`, `model` and an optional `run`; it changes nothing a check does. `openUrl(entry, {store, building, version, model, run})` (`@openeik/tools/registry`) makes that URL, each value form-urlencoded, and refuses, before it makes one, an entry with no `open` (`open-none`), a withdrawn one (`open-withdrawn`), an `open` that is no https URL without a query and a fragment (`open-endpoint`), a store that is no https URL or holds user information, a query or a fragment (`open-store`), a building that is not `owner/name` (`open-building`), a version that is not 64 lowercase hexadecimal digits (`open-version`), a model that is empty, holds a `/` or `\`, or is `.` or `..` (`open-model`), and a run that is not `r-` and 12 lowercase hexadecimal digits (`open-run`), each an `OpenEikError` with that `code`. `copies` (Part IV, 13; Part V, 2.1.1; open questions, 136): `compileModel(model, {proposals: ["copies"]})` derives the elements of every group's instances, each its kept element turned about the group's origin by the instance's turn less the group's, moved to its place, lifted by its lift less the group's and stood as many levels higher as its level is above the group's base level, what stands in a host following its host's instance element, under its id in the instance (`instanceElements`), and compiles each as any element: its bodies, quantities and lines under that id, a result's sources naming its kept element, its copy, its original and the levels (`copy-id-stored` where a stored element has the id). `applyCommands(model, commands, {proposals: ["copies"]})` runs the commands of groups that write an instance's elements out, which it refuses without the proposal (`copies-not-derived`): `original.frame` to another instance, `original.edit` at one, `copy.move` of the kept instance, `copy.remove` of it while others remain, and `copy.unique` of an instance while others remain. `copyBoxes(model, {proposals: ["copies"]})` and `drawingStatus(folder, {proposals: ["copies"]})` box a copy by its elements. It changes nothing a check does. `ridgeBearings` (Part IV, 7.4.13.2; open questions, 131): `compileModel(model, {proposals: ["ridgeBearings"]})` gives a ridge beam's `bearsOn` the gable at each end where one stands, with or without a framed layer, and a ridge post's, at its foot, the first slab, beam or wall by id whose body's highest point over its middle lies within 1 mm of its base (`topOver`); it changes nothing a check does. `drawingCommands` (Part XIV, 17.1.1 and 17.1.2; open questions, 137): `applyCommands(model, commands, {proposals: ["drawingCommands"]})` runs Part XIV, 17.1's commands (`DRAWING_KINDS`): `sheet.upsert` and `sheet.delete`, a sheet of Part XIV, 2 written whole, at revision 0 when new, or removed, its issued drawing left alone; `person.upsert`, a person written whole, which keeps each key a sign-off in the model's extras names, its `algorithm`, `public`, `validFrom` and `rpId` as they were, and may end it (`key-removed`); and `detail.place`, `detail.update`, `detail.remove` and `detail.draw`, a view's item placed in its place or at the end, merged, removed, or drawn by a sketch operation's thirteen tools (`drawDetail` in `src/detail-draw.js`), each held to the detail item's schema whole and the view at its revision plus one. Of an agent's detail command, in an envelope whose `by` names an `agent`, an item's provenance says `by` agent and `status` proposed, its acceptance taken away; `accepted` is refused (`provenance-accepted`), and so is an item whose provenance does not give its agent, the person it acts for, its instruction's digest and the version it saw (`provenance-agent`). It changes nothing a check does. `hostKept` (Part XVII, 6.3.1; open questions, 117): a proposal a host keeps rather than applies; `applyCommands(model, envelope, {proposals: ["hostKept"], keep: {id, url?}})` answers an envelope in the mode `propose` with `proposal: {id, ref, url?, file}`, `file` the proposal file it gives without `keep`, held to `schemas/0.4/proposed/hostKept/kept.schema.json`; `keep` without the proposal, or not of that form, is a `usage` error; `proposalForm(proposal)` tells the three proposals apart. It changes nothing a check does. `cascadeDeletes` (Part XIII, 9.1; open questions, 118): within one batch, a `circuit.delete` of a circuit that its board's delete took earlier is done, `{deleted, alreadyDeleted: true}`, where it names the circuit's revision then or none, and a replay accepts it alike; another revision is refused (`target-missing`), as without the proposal. It changes nothing a check does. `familyChecks` (Part IV, 6.6.1; open questions, 119): `checkFolder`/`checkModel` report on a beam's or a slab edge element's type, used or not, what its framing family breaks whatever element uses it, `framing-expression` and `framing-part` at the member of `framing` at fault, and on an element only what its `Length` and its parameters make of a family whose type has no such fault; `familyFaults(framing)` gives them, and `familyParse(source, names)` says whether the language takes an expression whatever its names' values. `slopedEdges` (Part IV, 4.6.1; open questions, 120): a slab whose plane slopes hosts slab edge elements, with no `slab-plane-edge`; `compileModel(model, {proposals: ["slopedEdges"]})` places each as on a level slab at its host's `elev(levelId) + offset`, its host's layers k times as deep plumb, and stands its bodies, its host's thickened edges and its chamfers' fills on the plane, plumb (a prism between two planes parallel to the host's, a polyhedron's points raised), so that its volume is the level element's; a railing along it stands on its top over the plane. `wallJoins` (Part IV, 4.1.1; open questions, 104): `compileModel(model, {proposals: ["wallJoins"]})` ends each wall's layers on the lines its corners and tees stop on (Part IV, 7.4.2), a wall without a `wallOutline` in bands where its end's line changes and one with an outline on its main join's line, and a T's host gives way between the ending wall's faces, from its base up to its top, as a framed layer then does (7.4.3, rule 8); `ifcOfModel` writes those bodies, and no longer reports `wall joins` as left out. It changes nothing a check does. `wallEndsOf(model)` gives each wall's ends as those bodies end, the lines each end stops on, with the height each holds to, and `endWallRing(ring, wall, lineAt, reach, keep)` ends a layer's plan on them, as the compiler does (Part IV, 4.1.1, rules 1 and 2). `barShapes` (Part II, 6.3.2; Part IV, 7.7; open questions, 106): a bar set's own centreline, `bars.legs`, and its `bars.mandrel`, held to the proposal's schemas, legs without a mandrel an error (`bars-mandrel`) and legs that make no bar a warning (`bars-legs`); `compileModel(model, {proposals: ["barShapes"]})` derives each bar a circle of its diameter swept along its centreline, its bends arcs of radius mandrel/2 + diameter/2, and its quantities, one bar's `cutLength`, its `count`, their `length` and `volume` (`barShape`, `barPieces`, `barMeshes` in `src/compile-bars.js`); `ifcOfModel` writes each bar as an IfcSweptDiskSolid along its centreline's lines and arcs, the cut length as BarLength, and the shape code and dimensions as its type's BendingShapeCode and BendingParameters. A bar set without legs is written as before. `mepFittings` (Part IV, 12.8; Part VIII, 1.1.1; open questions, 105): `compileModel(model, {proposals: ["mepFittings"]})` lists the fittings between runs and at a run's own corners as its result's `fittings` (`mepFittings` and `standardBends` in `src/mep-fittings.js`): pipes with pipes and ducts with ducts, of one system, two ends that meet within the larger of 5 mm and half the larger `mep.size` a reduction, a bend or a joint, an end on another run a branch, more one junction, and a corner of 1° or more a bend; each `{kind, category, run, end, place, along, runs, system?, sizes, turn?, bends?}`, a bend's standard bends the nearest of its type's within 2.5°, and `fitting-bend` where none makes it; with no body. `ifcOfModel(model, {proposals: ["mepFittings"]})` writes each as an IfcPipeFitting or an IfcDuctFitting, BEND, TRANSITION, CONNECTOR or JUNCTION, with no body, in its first run's system, and a port for each run connected to a port of that run. `grading` (Part IV, 14; Part II, 6.3.3; Part VIII, 1.12; open questions, 107): `compileModel(model, {proposals: ["grading"]})` gives the ground and its grading as its result's `ground`, `{terrains, pads, ground, graded?, cut, fill, step, overlaps}`: each terrain's part of the ground and the graded ground on the terrain whose id comes first, as surfaces in triangles, not bodies; and that terrain's quantities `cut` and `fill`, in m³ (`siteOf`, `terrainOf`, `padOf`, `heightsAt`, `gradedSite` in `src/grading.js`): a terrain's points closer than 0.01 mm one (`terrainPoints`), their fanned Delaunay triangulation clipped exactly to its outline, the terrain whose id comes first where terrains overlap; the pads by order and id, each its plane, ring, batter (1:2 where none is given) or retaining wall, but that no pad's ring or batter changes a point inside another pad's outline; cut and fill on the graded ground drawn in triangles, exact over the ground and the pads' flats and on a grid of 200 mm or more where a ring or a batter reaches, within 0.4 % of the rule's in the seven cases of the reference implementation's sites (`test/fixtures/grading-cases.json`, from `tools/grading-cases.mjs`). It reports a terrain that gives no ground (`terrain-ground`) and a grading element that is no pad (`grading-pad`); `checkFolder` and `checkModel` warn of two terrains whose grounds overlap, on both (`terrain-overlap`, `gradingChecks`); `ifcOfModel(model, {proposals: ["grading"]})` writes the graded ground as one IfcGeographicElement TERRAIN on the terrain whose id comes first, an open IfcTriangulatedFaceSet, and the other terrains and the grading elements in it. `groundColumnAt` and `terrainAt` read a terrain's points alike, with or without the proposal. `pieces` (Part XX; open questions, 124): `checkFolder` and `checkModel` hold a slab edge type's piece rule `pieces` and its section of insulation parts `edgeParts`, a slab's or a foundation's layer's `pieces`, an element's `pieceLayout` and an adopted piece's `pieceHost` to the proposal's schemas, and to the rules a schema cannot state (`piecesChecks`, `PIECES_CODES`, in `src/pieces.js`; a section of parts' notches by `notch-invalid`); `compileModel(model, {proposals: ["pieces"]})` lays out each slab edge element whose type has a rule in its pieces along its edge (its corner pieces where two elements of its type meet and mitre, its straights and closing pieces in runs from each stretch's start, the least cut shifting a run to two cuts, none in a notch where they stop and cut down in one they run through, a threshold angle or stop-ends there; a section of parts its parts and the concrete cast in the room they leave, its host's own body taken out) and each layer with a rule in boards in staggered rows over where its whole thickness lies, its rows centred where an outer one would be narrower than the least cut; each piece with its id (`<element>:a:<k>`, `<element>:o<i>:<k>`, `<element>:board:<layer>:<row>:<cell>`), its cuts, its mark (identical pieces share one, cut ones numbered over the model, the longest first) and its bodies, which are the element's or the layer's; an adopted piece is an element, and its element's runs fit round it. Its result's `pieces` and `pieceSchedule` give them, by element and by mark, with stock and offcuts (`runPieces`, `castRegion`, `boardLayout` and `markPieces` in `src/compile-pieces.js`). `applyCommands` runs `piece.adopt` (`PIECES_KINDS`), and `ifcOfModel` writes a slab on ground as IfcSlab BASESLAB, its edge as IfcFooting STRIP_FOOTING, and each piece as an IfcBuildingElementPart INSULATION under its element, a fitting as an IfcDiscreteAccessory, with a maker's data in Pset_ManufacturerTypeInformation. The steward's four later items (Part XX, 14) are in it too: a notch's floor falls outward, 20 ‰ by default, the type's `opening.fall` or the notch's own `fall` (`notchFall`, `notchFloor`), and the pieces cut through it, the cast region, a threshold angle's top leg and the stop-ends follow it, a height cut giving its `fall`; a pipe or a duct that crosses an edge element's outer face, or a layer's top or underside, cuts a hole of its outer size and the rule's `clearance` (10 mm) all round, square through the section or the layer, in each piece or board it reaches (`axisPieces`, `edgeHoles`, `boardHoles`, `cutHoles`, `clipConvex`), the piece keeping its id and kind and listing a `penetration` cut, its mark followed by `-H<n>`; a layer's `zone` lays its boards in a stronger grade where a wall that bears (`structural`, or named by a truss layout's `bearingWallIds`) or a column stands, its footprint grown by 300 mm, cut at the zone's edge, each board in it `…:z`, marked `<mark>-Z…` and scheduled apart, the element's quantity `zone` their volume (`zoneFootprints`, `boardLayout`'s `zone`); and a plan's `display.pieces` is held to its schema (`pieces-view`), while a drawing's checks accept a piece's id `<element>:<piece>` in `data-eik-id` and ask the viewport's read set for its element and its element's type (`pieceElementOf`, XIV.6.12, rule 21 and 9.7, rules 3 and 4), holding the id to an element whose type has a rule. `weight` (Part III, 15; open questions, 138): a model's weight, recommendations for a writer, an issuer, a reader and a host, which change nothing that is valid of 0.4's members. Asked for, `checkFolder` and `checkModel` hold a detail item's exact arcs, `bulges` (15.2, rule 4), to the proposal's schema and to one for each of its points (`bulges-points`), in a folder's chunks and a model's views alike, and `applyCommands` holds an item a command carries so; and they hold an element's, a type's and a detail item's `weightAccepted` (15.7, rule 5), the heavy forms it keeps on purpose, to the proposal's schema, in the records a command carries too. `applyCommands` gives the advisories of 15.8, `weight-rebuild` and `weight-full-replace`, once a session (`session`, `weightSession()`), and an accepted batch's weight line, the answer's `weight` (Part V, 9.1) ([Weight](#weight)). Its warnings come with `quality`, asked for or not ([Weight](#weight)), and honour `weightAccepted` asked for or not. `ifc43` (Part VIII, 1.13 and 2.7; open questions, 140): IFC 4.3 (IFC4X3_ADD2, ISO 16739-1:2024) as a print and a read target; `ifcOfModel(model, {schema: "IFC4X3_ADD2"})` and `openeik ifc --schema IFC4X3_ADD2` print it and `eikOfIfc(text, {proposals: ["ifc43"]})` reads it ([IFC](#ifc)); it changes nothing a check does. `ifcRoofs`, `ifcRailings` and `ifcElectrical` (Part VIII, 2.6.4 to 2.6.6; open questions, 95): `eikOfIfc(text, {proposals: ["ifcRoofs", "ifcRailings", "ifcElectrical"]})` writes a model of 0.4 and recognises, beside 0.4's classes, a roof (a flat one as a slab, a pitched one from the planes of its faces, its overhangs in its outline), a railing (its 'Axis' on a recognised slab's edges or of its own, its posts its body, its type's `railing` from `Pset_RailingCommon` and `OpenEik_Railing`) and an electrical device (its kind by Part XIII, 10's table read the other way, its box about its placement's origin, its mount by where the origin lies), each held to the body the file draws, the report counting them in `recognised`. `ifcOfModel` writes what they read: a railing's 'Axis' in its own frame, `Pset_RailingCommon.Diameter` and `OpenEik_Railing` on its IFC type, a device placed at its mount's point, and a flat roof's layers by a usage. They change nothing a check does. `stairRailings` (Part IV, 11.2.1; open questions, 18): `compileModel(model, {proposals: ["stairRailings"]})` derives the line of a railing on a straight, L or U stair, the stair's side on its `railing.side` (`stairSide`: each flight's edge at the pitch line's height, the landing's corners at its top) moved onto the stair by its inset, else 40 mm (`offsetPath`), each point at its height, and its given posts, each from the step it stands on, else a riser below the line, up to the underside of its top rail over the line; a declaration in its line frame stands over the line's height (`lineFrame` with heights); a stair Part IV, 7.3 does not lay out, or a railing with no side, has no line (`railing-stair`); it changes nothing a check does. `materialId` (Part II, 4.4; open questions, 11): each object of a type or an element that names a material by its text (`MATERIAL_PLACES`: a type itself, a layer, a framed layer's and a joist layer's rule, a slab edge section's facing, a room's and a room type's finishes, a stair, railing, pipe or duct type's payload, a truss layout's ridge beam, and with `pieces` an edge section's parts, its rule's threshold and stop-ends and a layer rule's zone) may name it by its id, `materialId`, held to the proposal's schema and standing in for a required `material`; `checkModel(model, {proposals: ["materialId"]})` reports an id that names no material (`ref-missing`) and an object that gives both (`material-both`), and counts a material named by its id as used. Every reader takes a material through one helper, `materialOf(materialLibrary(model.materials), holder)`, and `compileModel` and `ifcOfModel` read a model asked for it as `withMaterialNames(model)` gives it, each id read as its material's name, so that a model gives the same bodies, quantities and print with ids as with names, and its derived results name the materials among their sources. `migrateMaterialIds(model)` migrates a model of 0.4 from names to ids: each text that matches exactly one material becomes its `materialId`, and a text that matches none (`material-unmatched`, an info) or several (`material-ambiguous`, a warning) stays; it is deterministic, and changes nothing else. `storeProtocol` (Part VI, 6.8; open questions, 28): the store protocol, version 0, the calls `connectStore` makes, written as the specification's: the store's own answer (`GET /v0`, `storeInfo`) and a repository's (`repoInfo`, its `limits`), its refs moved by compare-and-swap (`refs`, `getRef`, `moveRef`), its objects (`has`, `get`, `put`) and large objects in parts, the log (`log`), its settings (`getMeta`, `putMeta`) and its assets' bytes (`hasAssets`, `putAsset`, `getAsset`), each body and answer held to a schema in `schemas/0.4/proposed/storeProtocol/`, every refusal `{ok: false, error: {code, message, details?}}`, a bearer token sent only over https or to this computer and only to the origin it is for (`insecure-url`, `token-origin`), and the limits every store takes (`LIMITS`). It changes nothing a check does, and nothing `connectStore` does; the repository's `tools/run-conformance-store-protocol.mjs` drives a store's base URL through the calls and checks each answer against the schemas and the rules. `domainCommands` (Part V, 2.3.1; open questions, 139): `applyCommands(model, commands, {proposals: ["domainCommands"]})` runs the documentation profile's other kinds and the domain operations 2.3.1 defines (`DOMAIN_COMMAND_KINDS`), each as the core record operations it is, by the reference implementation's arithmetic (`src/domain.js`), and, for those worked out from what Part IV derives (a wall's framing and a roof's trusses written out, a truss layout's findings, `align`'s faces, a truss plan, a 3D view's fitted crop, `mesh.lay` and `mep.downpipe`), from `compileModel` (`src/domain-derived.js`), its answer's result `{as: [{kind, result}]}`; a bar set anchored to a wall it moves goes with it, and the kind 2.3.1 leaves, `rebar.quick`, is refused as not implemented. Every reader takes a material through one helper, `materialOf(materialLibrary(model.materials), holder)`, and `compileModel` and `ifcOfModel` read a model asked for it as `withMaterialNames(model)` gives it, each id read as its material's name, so that a model gives the same bodies, quantities and print with ids as with names, and its derived results name the materials among their sources. `migrateMaterialIds(model)` migrates a model of 0.4 from names to ids: each text that matches exactly one material becomes its `materialId`, and a text that matches none (`material-unmatched`, an info) or several (`material-ambiguous`, a warning) stays; it is deterministic, and changes nothing else. `localHosts` (Part XVII, 4.2.1; open questions, 142): a host on a local transport authenticates an envelope's writer by the operating system and records every operation as an agent's; the agent host (`createAgentHost(folder, {person})`, `openeik mcp --person <id>`) does what it asks whether or not a model asks for it, since it binds a host and no model. `renditions` (Part XIV, 15.4; open questions, 141 and 143): what a drawing validator checks of a PDF rendition, where it reads PDF (`checkFolder(dir, {proposals: ["renditions"]})`, `checkRendition(pdf, {renditions: true})`, `openeik drawing check-pdf --proposal renditions`): the trailer's first ID entry derived from the project's id, each page's `source.root` and its SVG's digest (`renditionId`), the second the first's as printed (`rendition-id`); the JSON attachments as `application/json` and each attachment's F and UF its path in the folder (`rendition-attachment`); each sign-off attached one of a revision it prints; a note in fonts that map to Unicode (`rendition-note-names`); and every date at midnight UTC (`rendition-date`), each naming its rule as `XIV.15.4.9`. Without it a rendition is checked as before ([Checking a rendition](#checking-a-rendition)). `archives` (Part III, 11.3; Security and privacy, 6.5; open questions, 20): a folder in one zip file, `.eik.zip`, which `writeArchive` writes byte for byte the same from the same folder and `readArchive` reads as the folder it holds ([An archive of a folder](#an-archive-of-a-folder)); calling them asks for it, whatever the version of the folder, since it binds a container and no model.

**OpenEik 0.6** (the cut of 10 November 2026; the steward: "Skär nu, alla 16 (Recommended)"): a model of 0.6 is read by every rule of 0.2 to 0.5 and every proposal for 0.6, which 0.6 makes rules (`RULES_0_6`, the 16 names of `PROPOSALS_0_6`), whether or not they are asked for, and held to the schemas of 0.6, `schemas/0.6/`, the fold of 0.5's and the proposals' (`tools/fold-schemas-0.6.mjs`): `loadSchemas(undefined, {version: "0.6"})` and every set's `of06()`; a schema a check names by a proposal's path is the one of 0.6 in its place. `proposalsAt(undefined, "openeik/0.6")`, and so for any pre-release of 0.6, gives `RULES_0_2` to `RULES_0_6`. A model or a folder of 0.5 migrates to 0.6 by its format alone (Part I, 9.13): `migrateModel(model, {to: "openeik/0.6"})`, `migrateFiles` and `migrateFolder` with `to: "openeik/0.6"`, and `openeik migrate --to 0.6`; a model of 0.1 to 0.4 so goes by way of 0.5; and a model of 0.5 that lists the proposals for 0.6 it is written by keeps none of their names, since 0.6 makes them rules, its list left out where it is left empty (Part I, 9.12, rule 10). `eikOfIfc(bytes, {format: "openeik/0.6"})` reads IFC as a model of 0.6. `compileModel` of a model of 0.6 applies every rule of Part IV that 0.6 adds, a result of it naming the rule set `OpenEik 0.6 Part IV, class A`; `checkModel`, `compileModel`, `ifcOfModel`, `applyCommands`, the agent host and `issueDrawing` read a model of 0.6 by every former proposal for 0.6, none named. `writeFolder` and `modelFiles` write 0.6 where asked (`eik: {format: "openeik/0.6"}`). `FORMAT_0_6`, `RULES_0_6`, `PROPOSALS_0_7` (below), `isFormat06` and `from05` (a format read by 0.5's rules: 0.5's or 0.6's) are exported. A model of 0.5 may still ask for any of the proposals for 0.6 by name, or list it, as before the cut. The package is 0.6.0, on the private registry; the public npm keeps 0.5.0 (the steward: "Behåll 0.5.0 publikt").

**The proposals for 0.6, as a model of 0.5 asks for them** (`PROPOSALS_0_6`; their indexes in `schemas/0.5/proposed/`): a model of 0.5 may ask for them by name, or list them in its `eik.json` (`declaredProposals`, below); a caller that asks for one of a model of an earlier version is not refused: the proposal is not applied, and a validator says so (`proposal-ignored`, an info). `applicableProposals(proposals, format)` gives, of a list a host wants, the proposals a model of a format can be read by, so that a host that holds models of every version asks each read for one list. `quantities` (Part XXI; open questions, 144): quantities as typed values, Part XXI's, beside the compiler's own ([Quantities](#quantities)). `systems` (Part II, 6.9.1; Part IV, 12.9; Part V, 2.3.3; Part VII, 1.1; Part VIII, 1.1.2; open questions, 145): building services as networks, one of the subjects the steward chose for 0.6. A system stays a kind and a number on its runs; a terminal type's connections and outlets may give their `flow`, `in`, `out` or `both`, held to the proposal's schema, else they flow by their system (`defaultFlow`); and a terminal type's kind may be `boiler`, `tank`, `heatExchanger`, `airHandlingUnit`, `chiller` or `fan` (`EQUIPMENT_KINDS`). `checkFolder` and `checkModel` (`proposals: ["systems"]`) report a run's end whose record joins it to a port its terminal does not have (`system-port`, an error), and warn of a joined end away from its port (`system-port-place`), a port joined twice (`system-port-twice`), two systems at one join (`system-mixed`), an open end or an open port of a joined terminal (`system-open`), a loop in a gravity or an air system (`system-loop`) and a stretch the medium reaches or leaves from both sides (`system-flow`), each from `networkFindings`. `compileModel` gives the result's `network` (`systemNetwork`, `networkOf` in `src/systems.js`): each port at its place with its flow (`portsOf`), what joins it, by a run's record or by where an end lies (rule 5), and two terminals' ports that meet (rule 6); the open ends; each run cut into stretches where another run's end lies on it, each with its flow, forward or backward, where cutting it parts its piece into a part that gives and does not take and one that takes and does not give; and each system's runs, components, terminals, sources, sinks, pieces, loops and open ends. `applyCommands` runs `system.assign`, a run put in a system, with `follow` the runs its fittings join it to (`fittedRuns`), and `run.join`, a run's end joined to a port, with `place` moved to it (`SYSTEMS_KINDS`). `ifcOfModel` writes each port's FlowDirection by its flow and a run's at it the other way, a fitting's ports by the flow along its runs, the joins by a place and between two terminals, each terminal in every system it serves, and the six kinds of equipment as IfcBoiler, IfcTank, IfcHeatExchanger, IfcUnitaryEquipment, IfcChiller and IfcFan. The agent host's `query` takes `network`, `{elementId, direction, through}`, and answers the elements the network reaches from one, nearest first (`networkReach`). Without the proposal nothing of it applies, and every print is as before, byte for byte. `agentInterface` (Part VII, 10; open questions, 146): an agent host's `capabilities` and `proposals`, and a host for review (`createAgentHost(folder, {review: true})`, `openeik mcp --review`), whose agent's every write is kept as a proposal that a person accepts or declines whole (`host.decide(id, {accept, person})`, `openeik proposals <folder> --accept <id> --person <id>`); the host does it whatever the folder's version, since it binds a host and no model ([The agent host](#the-agent-host)). `fileInputs` (Part VI, 8.4.1; open questions, 147): a result set's selection names files that hold no record, each whole, the ground above all; `recordInputs(folder, select, {proposals: ["fileInputs"]})` gives their pairs beside the records', and `resultSetStatus(folder, manifestPath, {proposals: ["fileInputs"]})` calls a result computed from the ground stale once `project/ground.json` changed, was added or went ([Saving results beside a building](#saving-results-beside-a-building)); it changes nothing a check does. `storeClients` (Part VI, 6.8.14; open questions, 148): what a client of the store protocol checks of a store's answers, no redirect followed, each member it reads held to its form and each answer bounded, which `connectStore` and `storeTransport` do whatever the version of the models they carry, since it binds a client and no model; the repository's `tools/run-conformance-store-client.mjs` runs a client against a store that misbehaves ([A store's own calls](#a-stores-own-calls)). `quickRebar` (Part V, 2.3.2; open questions, 149): `applyCommands(model, commands, {proposals: ["quickRebar"]})` runs `rebar.quick` (`QUICK_REBAR_KINDS`), the bar sets a host takes by rule, as `create`s of rebar elements whose bar sets give their `legs` and their `mandrel` and no shape code: `slabBottom` and `slabTop`, a slab's or a foundation's bars both ways under its cover, cut to its outline less its voids, bars of one length at places in a row one set; `edgeU`, U-bars along each edge; `cage`, a beam's or a column's closed stirrups, hooked at 135° into one corner, and four corner bars, the column's section turned with it; and `wall`, a straight wall's horizontals and verticals on both faces, each set anchored to its frame. Each row is centred on its reach; where the command gives `lap`, a straight bar longer than `stock` (12 000 mm) is laid in stock lengths, and else written whole with a warning. Ids are `<hostId>:bars` (or the command's `id`), then `-2`, `-3` …, marks numbered on from the model's, names `Bars <mark>, <count> Ø<d>, <which>` (`quickSets`, `row`, `concreteSpan`, `lappedPieces`, `mandrelOf` and `QUICK` in `src/quick-rebar.js`). Asked for, `checkModel` takes a bar set's `legs` in place of the `shape` and `dims` the schemas of 0.5 require, and a command carries such a set so; `ifcOfModel` writes it with no BendingShapeCode. Without the proposal, `rebar.quick` is refused (`kind-not-implemented`) as Part V, 2.3.1 leaves it. `compilerVectors` (Part IV, 10.1; open questions, 150): a compiler that claims the class Compiler (core) passes every vector of `conformance/compiler/` that names no proposal it does not claim, within Part IV, 10, rule 6's tolerances; it changes nothing a check does, and the repository's `node tools/run-conformance-compiler.mjs --claim` says whether a compiler's claim holds, this package's compiler passing all of them. `derivedPits` (Part XIX, 6.1 and 9.1; open questions, 132): each foundation and each slab on the ground dug for, whether or not the ground states pits, as the steward decided. `derivedPitsOf(model, {compiled, proposals})` gives each element's derived pit, `{element, name, floors}`: each body the compiler builds of a foundation or a slab by Part IV, 4.2, its layers, its thickened edges' bands and a round footing's cylinder, whose underside lies more than `IN_THE_GROUND` (1 mm) under the ground level as it lies at a point of its outline, a floor at that underside (its lowest point where it slopes), over its outline less every stated pit's outline, parts narrower than `COVERED_WITHIN` (0.01 mm) none, the floors of one element at one level joined, a round footing's whole circle `{centre, radius, bottom}` where no stated pit's outline comes within it and else its polygon (`circlePolygon`) less them; and `notDerived`, each element none is derived for, its bodies given or declared or the ground level nowhere known over them, with why. None where the excavation is off. Whether a body is in the ground is found exactly, never sampled (`depthUnderGround(outline, under, pieces)`): its underside's own level, the least of its planes where it slopes, against the ground level at the outline's corners, where its edges cross the edges of the ground's planes (a terrain's triangles, the profiles' triangles, strips and nearest parts), and at those planes' corners within it; on a round footing's circle, at its crossings, the planes' corners within it and its point farthest up each plane, so that a ridge between two points 250 mm apart is found; and only of a plane its outline overlaps by an area 0.01 mm wide or more, never of one it only touches, along an edge, the profiles' hull or a terrain's, or at a point. `pitsOf(model, {derived: true, compiled})` digs them after the stated pits, a stated pit first where two dig alike; `ifcOfModel` prints them ([IFC](#ifc)), and `quantitiesOf` lists them among its `pits` where `derivedPits` is among its `proposals`. It changes nothing a check does. `edgeNone` (Part II, 5.6.1; Part IV, 4.6.2; Part VIII, 1.14; open questions, 155): a slab edge that is only its host's thickening, as at a level step inside a slab or under a bearing wall, asked for by the reference implementation for its work 858. `checkFolder` and `checkModel` (`proposals: ["edgeNone"]`) hold a slab edge type's `edgeProfile` to the proposal's schema in place of 0.5's (`EDGE_NONE_SCHEMA`, the index's `swaps`), in a folder, in the single-file form and in a command that carries the type: its `shape` may be `none`, its `width`, `depth`, `web` and `flange` then 0, and else more than 0. They report a section of the shape none without a `beam` or with a `facing`, on a framing family or beside a piece rule, and a railing along an element of it (`edge-none`, `edgeNoneChecks` in `src/edge-none.js`); a chamfer on it is `edge-chamfer` and a notch `notch-invalid`, as before. `compileModel` builds such an element no body and its length its only quantity, thickens its host by its beam as every beam does, counts it as no element that mitres by itself, and gives a railing along it no line (`railing-host`); with `quantities` too, its typed quantities are its `length`, the thickening in its host's volumes. `ifcOfModel` writes no product of it, and its fidelity report names it under `leftOut`. Without the proposal, 0.5's schema refuses such a type (`schema-invalid`), and the compiler builds the element no body (`edge-section`). `slabBearings` (Part IV, 7.4.13.3; open questions, 158): a truss layout that bears on a slab, a deck or a floor with no wall under its ends, asked for by the reference implementation. `compileModel` (`proposals: ["slabBearings"]`) lays out a layout whose `bearingWallIds` names a slab, for one side or both: its bearing line on a side is the edge of its outline along the eaves within 5° on that side's half of the span, the nearest to its eave (`slabBearingLine` in `src/slab-bearings.js`); the trusses bear at its top, both its faces that edge whatever the `bearingReference`, along its length, seated at 0, and nothing is cut from it; a slab with no such edge, or whose plane slopes, is a finding (`framing-layout-roof`). A truss's `bearings` and `bearsOn` and its anchor pairs name the slab, and `ifcOfModel` connects each anchor pair to the slab's product. `checkFolder` and `checkModel` warn of a bearing of another category than a wall, a beam or a slab, and of a sloped slab named (`framing-layout-roof`, `slabBearingsChecks`); `trusses.layout.upsert` lays a layout out with the proposal where the batch asks for it. Found bearings stay walls. Without the proposal, a layout that names a slab is a finding of the compiler, and the validator says nothing of it. `scaleBars` (Part XIV, 2.2.1; open questions, 156): a viewport's scale bar, asked for by the reference implementation for its work 861. `checkFolder` and `checkModel` (`proposals: ["scaleBars"]`) hold each viewport's `scaleBar` of a sheet to the proposal's schema (`SCALE_BAR_SCHEMA`, the index's `members` with the record `sheet`), in a folder and in the single-file form, and `applyCommands` a `sheet.upsert`'s: `{x, y, length, marks?, style?, text?}`. They report one on a viewport of a 3D view, or whose marks do not begin at 0, rise and end at its length (`scale-bar`), and one that does not lie on the paper at its viewport's scale, a dependent view's its primary's (`scale-bar-paper`, a warning; `scaleBarChecks`, `scaleBarMarks` and `viewScale` in `src/scale-bars.js`). `issueDrawing(folder, {proposals: ["scaleBars"]})` draws each in the sheet layer: its words, `{scale}` the viewport's scale, its rule with a tick at each mark or its fields filled by turns, and each mark labelled in metres. Without the proposal a reader keeps the member (`member-unknown`), and the issuer draws no bar. `luminaireAim` (Part XIII, 2.4 and 10.1; open questions, 160): an aimed light, asked for by the reference implementation. `checkFolder` and `checkModel` (`proposals: ["luminaireAim"]`) hold a luminaire's `electrical.aim`, `{tilt, turn}` in degrees, `tilt` from straight down and `turn` from its own facing, and its type's `electrical.throw`, in mm, to the proposal's schemas (`AIM_SCHEMA`, `THROW_SCHEMA`, the index's `members`), and report an aim on a device that is no luminaire (`luminaire-aim`) and a throw on a type that is none (`light-kind`; `luminaireAimChecks` in `src/luminaire-aim.js`). Both are optional: a luminaire without an aim points as its type's `distribution` says. `luminaireBeam(element, type, elevation)` gives a luminaire's beam, its apex, its axis, its cone's angle and its throw, which a drawing and a view's light display read; a `mirror` negates an aim's turn (`aimMirrored`), and a move and a turn leave it. `ifcOfModel` writes an aimed luminaire whose type gives a beam angle and a throw with a 'Lighting' representation of one IfcLightSourceSpot, its colour its type's colour temperature's (`lightColour`), and its aim and its throw in `OpenEik_Light`. Without the proposal, a reader keeps both members (`member-unknown`). `siteWater` (Part II, 6.3.4; Part IV, 14.7; Part VIII, 1.15; open questions, 159): water on the site, a pond, a pool or a basin, asked for by the reference implementation. `checkFolder` and `checkModel` (`proposals: ["siteWater"]`) know the category `water`, in `site`, its elements and types held to the proposal's schemas (`WATER_ELEMENT_SCHEMA`, `WATER_TYPE_SCHEMA`), its outline its `profile` and its payload `water`, `{surface, bottom?, batter?}`; they report an outline that is no simple polygon (`water-outline`) and a bottom at or over the surface (`water-bottom`), and warn of a surface wholly under the ground (`water-dry`, `waterChecks` in `src/water.js`). `compileModel` digs each water after the pads, in the order of their ids, in banks of its batter from its outline to its bottom or where they meet, vertical without one, never over the ground, and gives its body, closed solids between the dug ground and its surface, its quantities `volume`, `area` and `cut`, and the dug ground in the result's `waters`; the terrain's `cut` adds the digs (`siteWaters`: exact where the ground under it is in planes and its outline convex or its banks vertical, else on a grid of 200 mm). `derivedLayer` draws a water's outline in a plan, filled blue with the pattern `water`. `ifcOfModel` writes it as an IfcGeographicElement `WATER` in IFC4 and an IfcGeotechnicalStratum WATER in IFC 4.3, and its dig in IFC 4.3 as an IfcEarthworksCut EXCAVATION. `writeFolder` puts its records in `site`. To the ground of Part XIX (6.2), a water's dug ground is a dug level of the excavation: `pitsOf(model, {waters: true})` puts each pit's cut and its topsoil under it, the lower dug, and gives each water's dig of the ground as it lies, `waters`, `{element, name, volume, topsoilVolume}` in m³, its topsoil `topsoil` deep or down to its dug ground, within its dig, the excavation's `off` notwithstanding; `ifcOfModel` and `quantitiesOf` dig so with the proposal. A water's body presses on its dug ground with γw times its depth: `waterLoadsOf(model, {pits})` gives each water's load on the ground, `{element, name, surface, empties, area, force, centre, pieces, onParts}`, its resultant in kN at the centroid of its pressure, and its pieces each with its dug ground and its pressure in kPa as planes; over a pit's outline the water stands on the building part the pit is dug for, which carries it, and its load there is given apart, `onParts`, each `{pit}` or `{element}` with its area, resultant and pieces (Part XIX, 6.2, rule 5), an action of the water's on the part; where several parts' pits lie under a point, a slab on the ground's and a footing's under it, the uppermost carries it, whose top is highest there, the first by element id of several as high, by each derived outline's `tops`, its element's bodies' outlines and top planes. Over any pit's outline, stated or derived, the uppermost of the elements that may carry the water at a point takes it, those of `CARRYING_CATEGORIES` (`foundation`, `slab`, `slabEdge`, `wall`, `column`, `beam` and `member`) with a body under the ground level within the outline (`within`), their bodies of every kind, prisms, cylinders and sweeps, a derived pit's own element among them, a hollow member's section closed over its void, and of tops as high a slab before its own slab edges; over a stated pit the pit, `{pit}`, only where none lies under the point, its top at the water's dug ground. On a part, the water presses with γw times its depth over the part's top alone, and on none whose top lies at or over the surface; `waterPressureAt` gives the height pressed on, `top`. A water stands only in its open water, the parts of its outline under no such element's top at or over its surface that are joined to where it stands on its dug ground, the ground carrying it, or, where it stands nowhere on it, as over a roof's slab, to its outline's edge: a region elements rising to or over its surface enclose, a basement's within its walls, holds none of it, though it straddles the water's outline, and neither function gives any load or pressure there, unless a water of its own stands there. A wall closes a water out only up to the sill of a door or a window it hosts, where that lies under its top, so that one whose sill lies under the surface lets the water in over its width; what a part carries is still the water over its top. No other record of 0.5 cuts a wall: a provision cuts nothing, and Part IV reads no wall's `voids` or `recesses`. `openWaterOf(model, {water, pits, pieces, …})` gives each water's open water, `open`, convex polygons in mm with its area in m², and the closed rest of its outline where no element closes the water out, `closed` (`openWaterOver(model, pits)` over the pits a caller gives); a piece of the water's plan that spans the edge of `open` is cut along it first, and each part is of its open water where its centroid lies within `open`, as the load functions take it, cutting a caller's pieces themselves. `wallOpeningsOf(model, {compiled, proposals})` gives, for each wall that openings cut, its line's `start` and `end`, its `base` and `top`, and its `openings`, each `{element, category, ring}`, the ring in the wall's plane, `[u, z]` in mm, u along the line from its start; only those that cut the wall's body within its elevation, so that an analysis presses a face only where the wall is. Each of them, `waterLoadsOf`, `waterLoadsOver`, `waterPressureAt` and `waterPressureOver` among them, takes `pieces`, by a water's id, its pieces as `waterResult` gives them (`poly`, `U`, `D`, `ground`), in place of those its terrain gives, so that an analysis that holds a water's dug ground and no terrain loads it. `inTheGroundOf(model)` gives the elements of those categories in the ground, whatever the excavation's `off` says, which Part XIX, 6.2, rule 8 counts dug for. `pits` are the model's where the caller gives none, `pitOutlinesOf(model, {derived, compiled, proposals})`, which compiles the model (none where the excavation is off), else a list, `pitOutlinesOf(model, {derived, compiled, proposals})`, the derived pits' floors among them, or `pitsOf(model, {waters: true})`'s result, whose `outlines` they are. `waterLoadsOf` and `waterPressureAt` find the pits so; `waterLoadsOver(model, pits)` and `waterPressureOver(model, p, pits)` take them as given. `waterPressureAt(model, [x, y], {pits})` gives the pressure at a point, `{element, dug, surface, pressure, empties, part?}`; a water without a bottom, or where no terrain gives ground, none. `empties`, the payload's optional member, says a water is emptied in use, so that its empty state is a persistent one, a lower value of 0 of its load (Part XIX, 6.2, rule 4); `ifcOfModel` writes it in the bridge's own set `OpenEik_Water` (`WATER_PSET`). A pad's fill is no load of Part XIX, but `padFillsOf(model, {site})` gives each pad's fill over the ground as it lies, by the pad's id, `{pad, area, volume, pieces}`, each piece a convex polygon with the ground's plane and the fill's `thickness` as a plane, where the pad sets the graded ground (Part IV, 14.4), the volumes together the terrain's `fill`, so that an analysis can state a load of the `use` `fill` (Part XIX, 6.2, rule 9); `gradedSite(site, {fills: true})` gives them as its `fills`. A water whose payload its schema refuses (`waterPayloadHolds`: a batter of 0 or less or over 100, an `empties` that is no boolean, among them) has no body and digs nothing, and `compileModel` says so (`water-body`); a water's folder changes nothing of it. Without the proposal, a water element is of a category the package does not know (`category-unknown`), and has no body. `declaredProposals` (Part I, 9.12; Part III, 8.1 and 11; open questions, 157): the proposals a model is written by. A model of 0.5 may give `proposals`, the sorted names of the proposals for 0.6 it is written by, in its `eik.json` or at the top of its single-file form, and every reader of this package reads it by them, asked or not (`proposalsAt`, `proposalsOfEik`, `proposalsOfModel`): `readFolder`, `readModel`, `readVersion`, `checkFolder`, `checkModel`, `compileModel`, `ifcOfModel` and `applyCommands`, and `openeik check` with no `--proposal`. A listed proposal this package does not implement refuses the model, with or without the check (`proposal-unread`), and no writer writes it. The package implements every proposal for 0.6, so it skips none; a caller built on it that implements fewer says what it reads, `reads: {proposals, categories, files}` to `readFolder`, `readModel`, `readVersion`, `checkFolder` and `checkModel`: the proposals for 0.6 it implements, the categories of the types and elements it reads, each by its name where it reads their records or as `<category>#derived` where it reads their derived parts as well, its bodies, its quantities and the surfaces Part IV derives of it, and the files it reads, by their paths, `<…>` any text in a segment, a member after `#` by its JSON Pointer, as `project/project.json#/project/excavation`, a list left out being every one. Of each proposal the model lists that it does not implement, the package then reports `proposal-unread`, an error, where the proposal governs a category or a file the caller reads, and else `proposal-skipped`, an info, and the caller reads the model without it (Part I, 9.12, rules 4 and 12). What a proposal governs is its index's `governs` (`governsOf(name)`), what a caller reads of it `readOfProposal(name, reads)`, whether two files meet `filesMeet(read, governed)`, and whether two categories meet `categoriesMeet(read, governed)`: a category a proposal governs by its name meets a reader of either grain, and one it governs as `<category>#derived` (`DERIVED_GRAIN`) a reader of `<category>#derived` alone, so that a reader of a terrain's points skips `siteWater`, which governs `terrain#derived`, `water` and the stated pits. A model that gives the list is read by it alone: a caller's proposal for 0.6 it lacks is not applied (`proposal-ignored`), but `agentInterface`, `storeClients` and `compilerVectors`, which no model lists (`UNLISTED_0_6`). `modelFiles` and `writeFolder` write the list a model's records show (`proposalsUsed`, `listedProposals`): a slab edge type of the shape none (`edgeNone`), a terminal's flow or kind of equipment (`systems`), a bar set's legs without its code (`quickRebar`), a viewport's scale bar (`scaleBars`), a project's quantities (`quantities`), the schedules' files (`costSchedules`, `workSchedules`) and an application's selection of files (`fileInputs`); a name the model's own list gives that no record shows, `derivedPits`, stays. A model of 0.5 that uses no proposal for 0.6 and gives no list is written with none, its `eik.json` as it was. A validator reports a record that needs a proposal the list lacks (`proposal-undeclared`), and a name of a rule of 0.5 or of a proposal no model lists (`proposal-rule`). `proposalsAfterCut` gives a list as the next cut migrates it.

**OpenEik 0.7** (the cut of 23 November 2026; the steward: "ja, kör passage-förslaget och resten också kör på dina rekommendationer. avvakta med npm", and then: "resten build merge and deploy du har grönt ljus"): a model of 0.7 is read by every rule of 0.2 to 0.6 and every proposal for 0.7, which 0.7 makes rules (`RULES_0_7`, the 12 names of `PROPOSALS_0_7`), whether or not they are asked for, and held to the schemas of 0.7, `schemas/0.7/`, the fold of 0.6's and the proposals' (`tools/fold-schemas-0.7.mjs`): `loadSchemas(undefined, {version: "0.7"})` and every set's `of07()`; a schema a check names by a proposal's path is the one of 0.7 in its place. `proposalsAt(undefined, "openeik/0.7")`, and so for any pre-release of 0.7, gives `RULES_0_2` to `RULES_0_7`. A model or a folder of 0.6 migrates to 0.7 by its format (Part I, 9.14): `migrateModel(model, {to: "openeik/0.7"})`, `migrateFiles` and `migrateFolder` with `to: "openeik/0.7"`, and `openeik migrate --to 0.7`; a model of 0.1 to 0.5 so goes by way of 0.6; a model of 0.6 that lists the proposals for 0.7 it is written by keeps none of their names, since 0.7 makes them rules, its list left out where it is left empty (Part I, 9.12, rule 10); and a folder's sheets coded `SP` move from setup's folder to sprinkler's (Part I, 9.14, rule 3). `eikOfIfc(bytes, {format: "openeik/0.7"})` reads IFC as a model of 0.7, an element's status and an opening that nothing fills among it. `compileModel` of a model of 0.7 applies every rule of Part IV that 0.7 adds, a result of it naming the rule set `OpenEik 0.7 Part IV, class A`, and its quantities' rule `OpenEik 0.7 Part XXI` (`QUANTITY_RULES_0_7`); `checkModel`, `compileModel`, `ifcOfModel`, `applyCommands`, the agent host, `issueDrawing` and `openeik test` read a model of 0.7 by every former proposal for 0.7, none named, and `ifcOfModel` writes each element's status, asked for or not. `writeFolder` and `modelFiles` write 0.7 where asked (`eik: {format: "openeik/0.7"}`). `FORMAT_0_7`, `RULES_0_7`, `PROPOSALS_0_8` and `UNLISTED_0_8` (the proposals for 0.8, below, their indexes in `schemas/0.7/proposed/`), `isFormat07` and `from06` (a format read by 0.6's rules: 0.6's or 0.7's) are exported. A model of 0.6 may still ask for any of the proposals for 0.7 by name, or list it, as before the cut. The package is 0.7.0, on the private registry; the public npm keeps 0.5.0 (the steward: "avvakta med npm").


**The proposals for 0.7, as a model of 0.6 asks for them** (`PROPOSALS_0_7`; their indexes in `schemas/0.6/proposed/`; each a rule of a model of 0.7 since the cut of 0.7, which applies it unasked): a model of 0.6 may ask for them by name, or list them in its `eik.json` or at the top of its single-file form (Part I, 9.12), and no model of an earlier version. `replacedOpenings` (Part II, 6.5.1; Part IV, 4.3.2; Part VIII, 1.16; Part XXII, 5.4.1; open question 162): a new opening where a removed one is. `checkFolder`, `checkModel` and `applyCommands` let two doors or windows of one wall overlap where one's `status` is `demolished` and the other is new, its `status` `new` or absent, and report every other pair as before (`opening-overlap`); `workSchedulesChecks` warns of a work schedule's task that builds the new one from a day before a task that takes the old one away has finished (`work-opening-order`). `compileModel` cuts the wall by the openings that are not replaced: the hole the two share is the new one's, in the wall's bodies, its quantities, the members framed round its openings and its rooms' net wall area, and its result names the replaced opening among its sources. `wallOpeningsOf` and a water's open water leave a replaced opening out, and `ifcOfModel` writes no IfcOpeningElement of its own for it. `replacedOpenings(elements, outlineOf)` and `replacedOpeningsOf(model, applies)` give each replaced opening's id with the new ones that replace it, `openingsOverlap(a, b, outlineOf)` how two openings overlap, as Part II, 6.1, rule 5 counts it, and `replacedOpeningsApply(model, proposals)` whether the proposal applies to a model. A writer lists it where a model's records show the pair (`proposalsUsed`, `listedProposals`, `writeFolder`), and a caller that says what it reads is told where it governs it (`governsOf`: `door`, `window`, `room#derived`, `wall#derived`). `openeik check --proposal replacedOpenings` asks for it; a folder that lists it needs no flag. `slabHosts` (Part II, 6.1.2; Part IV, 7.6.1; open question 164): a slab or a roof as a host, by a frame of its own from its first edge, its origin that edge's start on its underside, u along the edge, v in its plane into the element and w its top's normal (`slabFrame(host, look)`, `topPlane(e, z1)`, `framePoint(frame, along, across, up)`). `checkFolder` and `checkModel` hold a component's `insertAt`, its face also `edge` with an `edgeId` and its direction also `across`, and a slab's and a roof's `edges`, `{edge: {edgeId}, typeId, from?, to?}`, to the proposal's schemas; let a roof host a mesh and a rebar element; and report a face, an edge or a direction its host does not have (`insert-face`), a roof of more than one face that hosts by its frame (`slab-frame`), and an edge detail off its outline, past its edge or of a type that is no edge detail (`edge-detail`). `compileModel` places a cast-in item in a slab or a roof in its host's frame and builds its block or its bar there (`slabItems`), and `ifcOfModel` prints it; a slab's or a roof's edge details are reference behaviour, said so. `applyCommands` lays mesh in a roof (`mesh.lay`, at its bottom or its top). A writer lists it where a model's records show it (`proposalsUsed`: a cast-in item in a slab or a roof, a mesh or a rebar element in a roof, a slab's or a roof's `edges`), and it governs `component`, `mesh`, `rebar`, `roof` and `slab` (`governsOf`). `slabHostsApply(model, proposals)` says whether it applies to a model. `openeik check --proposal slabHosts` asks for it. `pitSides` (Part II, 6.3.5; Part XIX, 6.3 and 9.2; open question 165): a pit's own sides. Up to 0.6 every pit, stated or derived, takes the project's `excavation.workingSpace` and `excavation.slope`; with the proposal a foundation or a slab states the sides of the pit derived for it in its `excavation`, `{workingSpace?, slope?}`, and a stated pit of `project/ground.json` its own `workingSpace` and `slope`, a member it does not give being the project's and a slope of 0 plumb sides, a shored pit. `checkFolder` and `checkModel` hold an element's `excavation` to the proposal's schema (`schema-invalid`; one that gives neither member is refused) and each stated pit to the proposal's in place of the ground schema's (`ground-schema`); without the proposal the members are ones the schemas do not know (`member-unknown`), kept and read by nothing. `pitsOf(model, {sides: true})` digs each pit by its own sides, printing it where each of the two is stated by the pit or by the project, its corners' chords by the radius its own sides reach, and the lower dug level where pits meet; `derivedPitsOf(model, {sides: true})` names each derived pit's own sides, and `dugLevelAt(model, [x, y], {derived, sides})` gives the dug level at a point and the pit that digs it, exactly, or null where none digs. `ifcOfModel` prints the pits so in IFC 4.3, and `quantitiesOf` lists them so; the topsoil's depth and `off` stay the project's. `applyCommands` holds a `pit.upsert`'s pit to the proposal's schema, and writes an element's `excavation` by `create` and `update`. A writer lists it where a model's records show it (`proposalsUsed`: a foundation's or a slab's `excavation`, or a stated pit's `workingSpace` or `slope`), and it governs `foundation`, `slab` and `project/ground.json#/ground/pits` (`governsOf`). `ownSides(given)` and `elementSides(element)` give the sides a record states, and `pitSidesApply(model, proposals)` says whether it applies to a model. `openeik check --proposal pitSides` asks for it. `siteEquipment` (Part II, 6.3.6; Part IV, 15; Part VIII, 1.17; Part XXI, 5.15; open question 166): the category `siteEquipment`, in the site's folder, for what stands on a building site for a time and is no part of the building. Its type's `siteEquipment` gives its `kind`, `cabin`, `container`, `crane` or `fence`, and that kind's measures in mm, every one required (`SITE_EQUIPMENT_MEASURES`, their bounds); a cabin, a container and a crane are placed by their profile's point and, where it gives a second, the direction they are turned to, a fence by its line. `checkFolder`, `checkModel` and `applyCommands` know the category, hold its types and its elements to the proposal's schemas, and report a profile that is not its kind's (`site-equipment-profile`); `writeFolder` and `modelFiles` put its records in `site`, in either layout. `compileModel` gives a cabin's and a container's box, a crane's foot, mast, jib and counter-jib, each naming its part, and a fence's sheets, one along each segment of its line, with a fence's `length`; its result's `siteEquipment` names each element's kind and a crane's reach, the circle of its jib's radius about its point; one it cannot read has no body (`site-equipment-body`). `quantitiesOf` gives the site equipment by kind, how many of each and the fences' length together (`siteEquipment`), and `ifcOfModel` prints each as an IfcBuildingElementProxy whose object type is its kind, typed USERDEFINED, in IFC4 and IFC 4.3, with no property set of its own. `siteEquipmentMeasures(payload)` reads a type's payload as its schema holds it, `siteEquipmentOf(element, type, elevation)` says where an element stands, `siteEquipmentBodies(placed)` gives its bodies, each a rectangle in plan between two heights, and `craneReach(placed)` and `fenceLength(placed)` a crane's reach and a fence's length. A writer lists it where a model holds a type or an element of the category (`proposalsUsed`), and it governs `siteEquipment` (`governsOf`). `openeik check --proposal siteEquipment` asks for it. `taskParts` (Part II, 6.3.7; Part XXII, 5.4.2; open question 168): a task's part of its elements. Up to 0.6 a task of a work schedule builds or takes away whole elements. A slab, a foundation and a wall MAY give `pours`, each `{id, name?, outline}`, a part of the element bounded by an outline in plan, what lies in none being its rest; a task MAY give `layers`, the layer functions it builds of its elements, `pours`, the pours it builds of them, and `order`, `{by: "listed" | "along" | "up", direction?}`, how its elements come over its days. `checkFolder`, `checkModel` and `applyCommands` hold an element's pours and each task to the proposal's schemas, and report an id twice (`pour-id-twice`), an outline that is none (`pour-outline`), two pours that overlap (`pour-overlap`) and an order that cannot be read (`work-order`), and warn of a pour that meets no part of its element (`pour-empty`), a pour a task names that no element it keeps has (`work-pour-unknown`), and, on the element, a part of it that no task builds or takes away while one builds or takes another (`work-part-unplaced`); a summary task gives none of the three (`work-summary`). `workPartsOf(model, id, {proposals})` works a schedule's parts out: each element's cells, a layer of its type with one of its pours or its rest (`cellsOf`), the task that builds each and the task that takes it away, the first of those that cover it (`coversCell`) by a pick before a rule, the task that narrows more, the earlier start and the earlier place in the list, the cells no task covers (`unplaced`), the element as a whole, and each element's turn in a task that gives an order, in working days as real numbers and as dates (`turns`); where the proposal does not apply it reads no part, no pour and no order (`applied` false). `workScheduleOf` gives each task's `layers`, `pours` and `order` on its row, and the agent host's `schedules` as three more columns where a task gives one; a task's elements, their quantities, its days and its progress are as in 0.6, and `ifcOfModel` prints nothing of a part, an order or a pour. An element's plan and its box come from its bodies (`plansOf`, `boxesOf`, of `compileModel`'s result); `partsInPlan(plan, outlines)` says which pours meet an element and whether a part of it lies in none, a part no wider than `POUR_WITHIN`, 1 mm, being none; `poursOf(element)`, `pourOutlineProblem(outline)`, `orderOf(task)` and `orderProblem(task)` read the members, and `pourChecks` is what a schema cannot say of an element's pours. A writer lists it where a model holds an element's pours or a task's `layers`, `pours` or `order` (`proposalsUsed`, `taskPartsSeen`), and it governs `foundation`, `slab`, `wall` and `project/work-schedules.json#/workSchedules` (`governsOf`). `openeik check --proposal taskParts` asks for it. `ifcStatus` (Part VIII, 1.18 and 2.8; open question 163): an element's status in a print of IFC, and read back, a proposal no model lists (`UNLISTED_0_7`; Part I, 9.12, rule 7), which binds a bridge alone and governs nothing: a caller asks for it whatever a model lists, a writer leaves it out of a list, and a validator warns of a list that names it (`proposal-rule`). On a model of 0.6, `ifcOfModel(model, {proposals: ["ifcStatus"]})` writes each element's `status` as `Status` in its product's status set, NEW for `new`, EXISTING for `existing` and DEMOLISH for `demolished`, an enumerated value of one IfcLabel of the print's one `PEnum_ElementStatus`, in IFC4 and in IFC 4.3: the set named `Pset_` … `Common` that the schema applies to the product, as buildingSMART's rule PSE001 holds it, whose template defines `Status`, the class's own where several do (`statusSetsOf(owner, tables)`, `statusSetOf`; `Pset_WallCommon`, `Pset_DoorCommon`, `Pset_BeamCommon`, a pipe's `Pset_PipeSegmentTypeCommon`, a rebar's `Pset_ReinforcingBarCommon` in IFC4 and `Pset_ElementComponentCommon` in IFC 4.3), joining that set where the print writes it already and else holding `Status` alone, keyed `pset:<id>:<set>`; an imported `Status` there gives way. An element that gives no status gets none; one whose class has no status set in the schema, a room's IfcSpace, an IfcGeographicElement, an IfcVirtualElement, gets none, and the fidelity report says so (`leftOut`, `status`); parts, openings and types carry none. `statusProperty(status, str, tables)` is the property as the print writes it, and `statusEnumeration(tables)` the enumeration, IFC4's or IFC 4.3's values in their order. `eikOfIfc(text, {format: "openeik/0.6", proposals: ["ifcStatus"]})` reads an element's `Status` of NEW, EXISTING or DEMOLISH, of its first status set that holds one, as its `status`, and leaves the property out of `ifcSource.properties`, a set it empties too; TEMPORARY and every other value, a later set's and a type's stay with the imported sets (`statusIn(properties, owner, tables)`). Without the proposal, and for a model of an earlier version, a print is byte for byte what it was, and a reader keeps `Status` with the imported sets. `checks` (Part XXIII; open questions 169 and 171 to 176): tests for buildings. A check is a sentence (`says`), a rule (`requires`, of the kinds `property`, `relation`, `geometry`, `quantity`, `analysis` and `outside`) and two small buildings, a model that passes and one that fails; checks are gathered in suites, layered base, jurisdiction, organisation and project, a layer tightening a parameter and never loosening one; a building keeps its own suite, the suites it pins, its waivers and its kept runs in its folder `checks/`. `testFolder(source, {suites, library, params, waivers, at})` and `testModel(model, options)` run a building's suites, its own and those it extends, or the universal base suite these tools ship, `library` being the suites a host's runner holds besides those it ships (its stored packs), found where a suite extends one and picked by the site's country, and run on no other ground (`baseSuite()`, `openeik-base` 0.1.0: wet rooms' extract, its flow, gutters' downpipes, their capacity and walls against a plan's limits), and give the run's result, `openeik-run/0.1`: each check's status, `pass`, `fail`, `waived`, `skipped` or `stale`, and each finding on an element or a result set, what was measured and what is required; a run whose suites cannot be run is refused (`checks-suite`, `checks-param`). `selfTest(suites, {check})` runs each check on its own fixtures; `readSuite(dir)` reads a suite's folder, and `suitesOfFolder(source)` a building's suites; `resultSetOf(folder, run)` keeps a run as a result set of Part VI, 8, its model folder `checks/`, current or stale by its inputs (`resultSetStatus`); and `hostCheckRuns(run, {head})` gives the check runs a host posts, one for each suite. `checkFolder` and `checkModel` hold the files of `checks/` to their schemas (`checks-schema`), each check's id to its file's name (`checks-id`) and its fixtures to its folder (`checks-fixture`) (`checksChecks`). A writer lists it where a model's files show it (`checksSeen`: `checks/suite.json`, `checks/waivers.json` or a check), and it governs the files of `checks/` (`governsOf`). `openeik test` runs it, and `openeik check --proposal checks` checks its files. `planLimits` (Part II, 2.4; open question 170): a plan's limits on the site, `project/plan-limits.json`, its facade lines, building limits, no-build areas and height limits, each with the plan and the provision it comes from. `checkFolder` and `checkModel` hold the file to its schema (`plan-limits-schema`), each id once (`plan-limit-id`) and each limit's shape its kind's (`plan-limit-shape`) (`planLimitsChecks`); `planLimitsOf(model)` gives the limits a check reads. A writer lists it where a model holds the file, and it governs the file (`governsOf`). `openeik check --proposal planLimits` asks for it. `drawingSets` (Part XIV, 2.5; open question 180): tags on views and sheets, and drawing sets. A view and a sheet MAY carry `tags`, 1 to 50 short plain names; a drawing set is a record of its own, `drawings/<owner>/sets/<id>.json`, the list `drawingSets` of the single-file form and of `project/order.json`, its owner its `owner`, else `setup`, that holds a model's views and sheets by a rule over `kind`, `discipline` (the drawing's owner), `level`, `area` (a view's scope box; a sheet's level and area those of the views it places), `tag` and `number` (a glob), AND across the fields and OR within one, or by members picked in order, `{view}` or `{sheet}`, never both; and an issue MAY name the set it was issued from, `set`. `readFolder`, `modelFiles` and `writeFolder` read and write each set's file in its owner's folder, a set whose owner changes moved and one that went removed, and a writer lists the proposal where a model's records show it (`proposalsUsed`: a view's or a sheet's `tags`, a set, or an issue's `set`), but for a model that holds a kept file at a set's path, which only a reader without the proposal keeps: it is written without it, the file where it was and its tags and sets as members it does not know, unless its own list names the proposal (Part XIV, 2.5, rule 20, as erratum 0.7-E3 corrects it). `checkFolder` and `checkModel` hold the tags and each set to the proposal's schemas (`schema-invalid`, `drawing-set-schema`), each set's file to its owner's folder (`path-discipline`), each member once (`drawing-set-member-twice`), and an issue to the proposal's schema, which adds its `set` (`issue-id`); and warn of a member the model does not hold, kept in its place (`drawing-set-missing`), a rule's level or scope box the model does not hold (`drawing-set-reference`) and a purpose the drawing profile does not hold (`drawing-set-purpose`) (`drawingSetChecks`). `drawingSetOf(model, id)` and `drawingSetsOf(model)` work out what a set holds, each drawing a view or a sheet by its id and `missing` where the model holds none: a picked set's members in their order, and a rule's matches, the sheets by their numbers in natural order (`naturalOrder`), then the views by kind, by their levels' elevations and by name; `drawingsTagged(model, tag)` gives the drawings that carry a tag, `drawingFactsOf(model)` the facts a rule reads, `ruleMatches(rule, facts)` whether a drawing matches, and `numberGlob(glob)` a number's glob. `applyCommands` runs `drawingSet.upsert` and `drawingSet.delete`, and writes a drawing's tags by `view.upsert`, `view.update` and `sheet.upsert`. `ifcOfModel` prints nothing of either. It governs the views' and the sheets' `tags`, the sets' files and an issue's `set` (`governsOf`). `openeik check --proposal drawingSets` asks for it. A set is a record: `versionTree` holds it at its record's leaf, `drawings/<owner>/sets/<id>`, counted with the records, and `diffTrees`, `diffFolders`, `mergeModels`, `mergeFolders` and `mergeVersions` match it by its id in the list `drawingSets`, so that a set whose owner changed is one record changed, and one changed on both sides conflicts as a record does (`placeOf(leaf, owners, sets)`, `pairKey`). `sprinklerSheets` (Part III, 4.4.1; open question 181): a sheet whose discipline code is `SP` is `sprinkler`'s, filed in `drawings/sprinkler/sheets/`, where 0.6 gives it to `setup` (`sheetOwner(sheet, {sprinklerSheets: true})`, `modelOwners(model, {sprinklerSheets: true})`, `modelPaths` with `sprinklerSheets`, `SPRINKLER_SHEETS`). `modelFiles` and `writeFolder` file such a sheet there where the model lists the proposal or a caller asks for it, moving it from setup's folder in the version that first lists it, and back in one that takes it out; `checkFolder` reports one in another folder (`path-discipline`), and, without the proposal, one in sprinkler's folder, with the list that lacks it (`proposal-undeclared`); a drawing set's `discipline` reads a sheet's owner by it (`drawingSetsOf(model, {proposals})`). It shows in no record of the single-file form, so a writer keeps it as the model's own list gives it, and it governs `drawings/sprinkler/sheets/<id>.json` (`governsOf`). `openeik check --proposal sprinklerSheets` asks for it. `groupExclusions` (Part II, 10.1.1; Part IV, 13.1; Part V, 2.1.2; open question 183): one instance of a group that leaves elements out, an original's `excluded`, by instance, the sorted base ids each leaves out. `instanceElements(model, {excluded: true})` and `instanceRecords(model, {excluded: true})` derive an instance without what it leaves out and what depends on it (`leftOutOf`, `dependentsOf`), its other elements letting go of what they say of one (`untied`, `LET_GO`): a wall's top attachment, an edge trim, a join, an id of a list, a device fed past it; `compileModel`, a drawing's model, a schedule's elements and a copy's box derive so where the model lists the proposal or a caller asks for it (`excludedFor`). `checkModel` and `checkFolder` report a list not sorted, one for the kept instance or for no instance, a base id of no kept element, a list of every one, and one that lacks what depends on what it names (`group-exclusion`, `exclusionChecks`); a reference to an element an instance leaves out names nothing. `applyCommands` runs `original.exclude` (with `keep`, an element of no group under its id there with each `/` a `-`), `original.restore` and `copy.place`'s `excluded` (`GROUP_EXCLUSIONS_KINDS`), refuses `original.frame` to an instance that leaves something out, hands the keeping to an instance that has all of the group, writes an edit at such an instance out whole and back, and keeps the lists to the group after every command. A writer lists it where an original gives `excluded`, and it governs `project/originals/<id>.json#/excluded` (`governsOf`). `openeik check --proposal groupExclusions` asks for it. `wallOpenings` (Part II, 6.5.2; Part IV, 4.3.3; Part VIII, 1.19 and 2.9; Part XXI, 5.16; open question 184): an opening that nothing fills, the category `opening`, in architecture, hosted by a wall and placed as a door; through its wall, or, with `depth`, a recess cut from the exterior face, or from the interior face where it is `flipped`. `checkFolder`, `checkModel` and `applyCommands` know the category, hold its types and its elements to the proposal's schemas, host it by a wall (`host-category`), hold it to its wall as a door (`opening-fit`, `opening-overlap`, with `replacedOpenings` too) and report a recess as deep as its wall or deeper (`opening-depth`, `wallOpeningChecks`); `writeFolder` and `modelFiles` put its records in architecture. `compileModel` gives it no body, cuts its wall by a through-opening as by a door, and by a recess only within its depth, a layer it cuts in part split across the wall there (`recessSpan`); a through-opening counts among the wall's openings in its side areas, its framing (as a door on the wall's base, else as a window), its rooms' net wall area and net perimeter and a water's way through it (`cutsThrough`), a recess in its volumes alone; its quantities are a door's but its volume. `ifcOfModel` writes it as the element's own IfcOpeningElement, OPENING or RECESS, voiding its wall and filled by nothing, with `Qto_OpeningElementBaseQuantities` and, with `ifcStatus`, its status in `Pset_OpeningElementCommon`; `eikOfIfc(text, {format: "openeik/0.6", proposals: ["wallOpenings"]})` reads such an opening of a wall it recognises back as one, of its own type `ifc-opening`, and lists the proposal. A writer lists it where a model holds a type or an element of the category (`proposalsUsed`, `wallOpeningsSeen`), and it governs `opening`, `wall#derived` and `room#derived` (`governsOf`). `wallOpeningsApply(model, proposals)` says whether it applies to a model. `openeik check --proposal wallOpenings` asks for it.

**OpenEik 0.8** (the cut of 26 November 2026; the steward: "ja, kör 0.8-släppet, avvakta med npm"): a model of 0.8 is read by every rule of 0.2 to 0.7 and every proposal for 0.8, which 0.8 makes rules (`RULES_0_8`, the 11 names of `PROPOSALS_0_8`), whether or not they are asked for, and held to the schemas of 0.8, `schemas/0.8/`, the fold of 0.7's and the proposals' (`tools/fold-schemas-0.8.mjs`): `loadSchemas(undefined, {version: "0.8"})` and every set's `of08()`; a schema a check names by a proposal's path is the one of 0.8 in its place (`at08`, `moved08`), `roofFalls`' result schema folded into `quantities/result.schema.json` (`FOLDS_0_8`). `proposalsAt(undefined, "openeik/0.8")`, and so for any pre-release of 0.8, gives `RULES_0_2` to `RULES_0_8`. A model or a folder of 0.7 migrates to 0.8 by its format (Part I, 9.15): `migrateModel(model, {to: "openeik/0.8"})`, `migrateFiles` and `migrateFolder` with `to: "openeik/0.8"`, and `openeik migrate --to 0.8`; a model of 0.1 to 0.6 so goes by way of 0.7; a model of 0.7 that lists the proposals for 0.8 it is written by keeps none of their names, since 0.8 makes them rules, its list left out where it is left empty (Part I, 9.12, rule 10); and a folder's sheets that give their own owner move from their code's owner's folder to their owner's (Part I, 9.15, rule 3). `eikOfIfc(bytes, {format: "openeik/0.8"})` reads IFC as a model of 0.8, a roof whose faces fall inward among it. `compileModel` of a model of 0.8 applies every rule of Part IV that 0.8 adds, a roof that falls inward, its firrings and a wall's top under it among them, a result of it naming the rule set `OpenEik 0.8 Part IV, class A`, and its quantities' rule `OpenEik 0.8 Part XXI` (`QUANTITY_RULES_0_8`); `checkModel`, `compileModel`, `ifcOfModel`, `applyCommands`, the agent host, `issueDrawing` and `openeik test` read a model of 0.8 by every former proposal for 0.8, none named: `testFolder` and `testModel` run the base suite 0.2.0 on it, a footprint measured whole and a room's ways in among it, and a writer writes it back as it was read (Part I, 9.12.1; `writesAsRead`), each unasked. `writeFolder` and `modelFiles` write 0.8 where asked (`eik: {format: "openeik/0.8"}`). `FORMAT_0_8`, `RULES_0_8`, `QUANTITY_RULES_0_8`, `PROPOSALS_0_9` and `UNLISTED_0_9` (the proposals for 0.9, below, their indexes in `schemas/0.8/proposed/`), `isFormat08` and `from07` (a format read by 0.7's rules: 0.7's or 0.8's) are exported. A model of 0.7 may still ask for any of the proposals for 0.8 by name, or list it, as before the cut. The package is 0.8.0, on the private registry; the public npm keeps 0.5.0 (the steward: "avvakta med npm").

**The proposals for 0.8, as a model of 0.7 asks for them** (`PROPOSALS_0_8`; their indexes in `schemas/0.7/proposed/`; each a rule of a model of 0.8 since the cut of 0.8, which applies it unasked): a model of 0.7 may ask for them by name, or list them in its `eik.json` or at the top of its single-file form (Part I, 9.12), and no model of an earlier version. `roofFalls` (Part II, 6.3.8; Part IV, 4.4.1 and 4.4.2; Part VIII, 1.20 and 2.10; Part XXI, 5.17; Part XXIII, 7.2.1; open question 186): a roof that falls inward. `checkFolder` and `checkModel` hold a roof's `roof.edges` to the proposal's schema, each edge's `slope` from −75 to 75 and its `rise`, and its `roof.firrings` to its own, and report a roof whose edges define slopes both below and above 0 (`roof-falls-mixed`), a rise on an edge that defines no slope or one that makes its face steeper than 75° (`roof-rise`), a wall attached raking to a roof that falls inward or cut under one (`roof-falls-top`), and warn of a truss layout on one (`framing-layout-roof`) (`roofFallsChecks`); a wall's attached top reads the roof's planes with their rises, the highest of them where it falls inward. `compileModel` builds each edge's plane with its rise (`edgePlanes`), a roof that falls inward as the highest of its planes, each layer between them lowered, its lines its valleys (`valleys`) and none its ridges or hips, and says a plane that rises over the eaves (`roof-above-eaves`) or slopes both ways (`roof-falls-mixed`); a wall attached level to such a roof takes the lowest point of its face over its core band, found exactly (`lowestOver`), and one attached raking its unconnected top (`attach-falls`); no truss layout is laid out under it; a gutter, a room's boundary and ceiling and a dormer rafter read its faces so; and a roof's `firrings` are laid on the level beams under it (`firringPieces`), each a member of the roof keyed `<roof>:firring:<beam>:<n>` in the result's `firrings`, with the roof's `firrings`, `firringLength` and `firringVolume` (`firrings-not-laid` where it has no faces). Its typed quantities add `valleyLength`, `firringCount`, `firringLength`, `firringVolume` and `firringMass` (`ROOF_FALLS_QUANTITY_NAMES`), and a gutter's `length` is along its fall; `readDerived` holds such a result to the proposal's form (`ROOF_FALLS_RESULT_SCHEMA`). `roofWindowFacing(model, roofId, windowId, {proposals})` faces a window down its plane's steepest way, `mainDirectionOf(roof, {falls})` takes a face that falls, `slabFrame` a roof's one plane with its rise, and a gutter's catchment on a roof that falls inward is not known (`gutterPlace`). `ifcOfModel` writes each firring as an IfcMember USERDEFINED FIRRING under its roof, and `eikOfIfc(text, {format: "openeik/0.7", proposals: ["roofFalls"]})` reads a roof whose faces fall inward from its eaves back as one, and lists the proposal. A writer lists it where a roof edge's slope is below 0, an edge gives a rise or a roof gives firrings (`proposalsUsed`, `roofFallsSeen`), and it governs `roof`, `gutter#derived`, `room#derived` and `wall#derived` (`governsOf`). `roofFallsApply(model, proposals)` says whether it applies to a model. `openeik check --proposal roofFalls` asks for it. `cutPatterns` (Part II, 4.5; open question 187): masonry and crushed stone in a cut. `checkFolder` and `checkModel` hold a material's and a layer's `hatch` and a layer's `block` to the proposal's schemas and report a hatch whose object does not give its base as its pattern (`hatch-base`), a block on a layer not drawn with masonry (`block-hatch`) and a joined layer with no masonry before it (`block-joined`) (`cutPatternChecks`, `drawnHatch`, `blockZones`, `laidMasonry`); `issueDrawing` draws masonry as one pattern of its courses and crushed stone as closed triangles (`masonryDef`, `crushedTriangles`), and without the proposal the base as before. A writer lists it where a material or a layer gives a hatch or a layer a block (`cutPatternsSeen`), and it governs `ceiling`, `foundation`, `roof`, `slab` and `wall` and `project/materials/<id>.json#/hatch`. `runningDimensions` (Part XIV, 3.5; open question 188): running dimensions. `checkFolder` and `checkModel` hold a dimension's `dimensionRunning` and a dimension style's `running` to the proposal's schemas and report a `dimensionRunning` on what does not run (`running-type`) and a running dimension of fewer than two references (`running-references`) (`runningChecks`); `issueDrawing` draws each value from the origin by the style's look (`runningLook`, `runningLaid`), and without the proposal as before. A writer lists it where a dimension gives `dimensionRunning` or a style `running` (`runningSeen`), and it governs a view's detail chunks and `project/dimension-styles/<id>.json#/running`. `ceilingEdges` (Part II, 6.1.2.1; open question 189): a ceiling's edge details, and the situations of a slab's edges. `checkFolder` and `checkModel` hold a ceiling's `edges` to the slab's schema and check them as a slab's in a level slab's frame (`slabHostsChecks` with its `ceilings`, `slabFrame` with a look's `ceilings`), and take three more values of a component type's `edgeDetail.situation`, `bearing`, `slab joint` and `free edge` (`SLAB_SITUATIONS`). A writer lists it where a ceiling gives `edges` or an edge detail one of the three (`ceilingEdgesSeen`), and it governs `ceiling` and `component`. `fallingRoofTops` (Part IV, 4.4.3; Part VIII, 1.21; Part XXI, 5.18; open question 190): a wall's top raking under a roof that falls inward, or cut under one, which `roofFalls` alone refuses; asked for or listed, it applies `roofFalls` with it. `compileModel` gives such a wall the highest of the face's planes as its top, broken where it crosses a valley, each layer cut into the parts where one plane is the face (`wallTop`, `compileWall`), and lays its framed layers under it (`framingFace`, `clipChainUnderHighest`, `memberOut`); `checkFolder` and `checkModel` report no `roof-falls-top` of it (`roofFallsChecks` with `tops`). A writer lists it, and `roofFalls`, where a wall is attached raking to a roof that falls inward or cut under one (`fallingRoofTopsSeen`), and it governs `wall`. `patternLook` (Part II, 4.6; open question 191): a cut pattern's density and angle. `checkFolder` and `checkModel` hold a material's and a layer's `patternScale`, from 0.1 to 10, and `patternAngle`, from −180 to 180, to the proposal's schemas, and warn of either where its cut is drawn `none` or `solid`, or with no pattern (`pattern-look-unread`) (`patternLookChecks`); a layer's cut is drawn with its own, else its material's where it draws its material's pattern, else 1 and 0 (`drawnLook`, `readLook`). `issueDrawing` draws each pattern's tile `patternScale` times its size with its pen kept, never closer than 1 mm on the paper, and turned `patternAngle` degrees counter-clockwise (`patternDef` with a look, its definition's id `hatch-<viewport>-<pattern>-s<scale>a<angle>`); with `cutPatterns` too, a zone's dots, masonry drawn as its base and crushed stone's triangles without a size so too (`hatchFill`, `masonryDef`, `crushedTriangles`), and without the proposal as before. A writer lists it where a material or a layer gives either (`patternLookSeen`), and it governs `ceiling`, `foundation`, `roof`, `slab` and `wall` and a material's `patternAngle` and `patternScale`. `patternLookApply(model, proposals)` says whether it applies to a model. `detailPatterns` (Part XIV, 3.6; open question 192): a drafted region's hatch, density and angle. `checkFolder` and `checkModel` hold a detail item's `hatch`, of the kind `crushed` alone, and its `patternScale` and `patternAngle` to the proposal's schemas, which refer to those of `cutPatterns` and `patternLook`, and report a hatch on a region that does not give `gravel`, its base, as its pattern (`detail-hatch-base`), and warn of any of the three on an item that is no region (`detail-pattern-kind`) and of a density or an angle on a region drawn `none` or `solid` (`detail-pattern-unread`) (`detailPatternChecks`); a region is drawn with its own, else 1 and 0 (`regionHatch`, `regionLook`). `issueDrawing` draws a region of crushed stone white with its triangles over it, each wholly inside it, `size` mm a side, else 2 mm on the paper times `patternScale`, and any other region's pattern at its density from its own `spacing` or the issuer's, never closer than 1 mm on the paper nor than at 1, and turned by its angle (`annotationLayers` with `patternDef` and `crushedTriangles`, the definition's id `hatch-<viewport>-<pattern>[-<spacing>]-s<scale>a<angle>`), and without the proposal as before. A writer lists it where a detail item gives any of the three (`detailPatternsSeen`), and it governs a view's detail chunks; it needs neither `cutPatterns` nor `patternLook`. `detailPatternsApply(model, proposals)` says whether it applies to a model. `footprintsWhole` (Part XXIII, 7.3.1; open questions, 174), a proposal no model lists (Part I, 9.12, rule 7; `UNLISTED_0_8`), which a caller asks for: a check's geometry rule may give `footprint`, `"corners"` or `"whole"`, held to the proposal's schema where it is asked for and refused without it (`checks-schema`; `footprintMember`, `checkNeeds`, a suite's `needs`); `"whole"` measures the greatest distance any point of an element's footprint lies past a plan's limit, a wall's band and a slab's, a foundation's, a ceiling's or a roof's outline with every point inside them, within 0.001 mm and never above it (`wholeFootprintOf`, `outsideReach`, `insideReach`, `lineReach`, `greatestReach`), the finding saying where; and the base suite 0.1.2, its `facade-in-plan-limits` at its version 2 measured so, which `testFolder`, `testModel` and `suitesOfFolder` run as the newest base where they are asked for it (`proposals: ["footprintsWhole"]`; `baseSuite({proposals})`; `openeik test --proposal footprintsWhole`), and 0.1.1 where they are not, refusing a suite that pins 0.1.2 (`checks-suite`). A list that names it is warned of (`proposal-rule`). `footprintsWholeApply(model, proposals)` says whether a run applies it. `roomWayIn` (Part XXIII, 7.5; open questions, 175), a proposal no model lists (Part I, 9.12, rule 7; `UNLISTED_0_8`), which a caller asks for: a room's ways in, derived and never stored (`roomWays`): each door, and each opening through its wall that stands on its base, in its walls as Part IV, 7.5, rule 6 finds them; each room separator along its boundary, but one that ends inside it; each stretch of its boundary against nothing, the room itself; and each straight, L or U stair whose foot or head stands in it (`stairEnds`, `heightsOf`), with the rooms each leads to; a room that a stair with no layout, a shaft beside it (`boundaryDistance`) or a floor's edge may lead into is unsettled. A check's step may read them by the relations `waysIn` and `leadsTo`, held to the proposal's schema where it is asked for and refused without it (`checks-schema`; `wayInRelations`, `wayInNeeds`, `withoutWayIn`, a suite's `needs`), a room unsettled skipped where a step reaches none; and the base suite 0.2.0, 0.1.2's checks and `room-way-in`, that every room people move between has a way in, which `testFolder`, `testModel` and `suitesOfFolder` run as the newest base where they are asked for it and `footprintsWhole` (`openeik test --proposal roomWayIn --proposal footprintsWhole`), refusing a suite that pins 0.2.0 otherwise (`checks-suite`). A list that names it is warned of (`proposal-rule`). `roomWayInApply(model, proposals)` says whether a run applies it. `sheetOwners` (Part III, 4.4.2; open question 182): a sheet's own owner. `sheetOwner(sheet, {sprinklerSheets, sheetOwners})` and `modelOwners(model, {sprinklerSheets, sheetOwners})` give a sheet its `owner`, where it names one of the eight disciplines, over the owner of its discipline code, else its code's, as before; `checkFolder` and `checkModel` hold a sheet's `owner` to the proposal's schema, a view's owner by reference (`schema-invalid`), and its file to its owner's folder (`path-discipline`); `modelFiles` and `writeFolder` file it there and refuse an owner of no discipline, as a view's; `drawingFactsOf`, `drawingSetsOf` and `drawingSetOf` give a set's `discipline` by it, a set's `number` still the sheet's number; and `sheet.upsert` writes it as a sheet's other members. A change of owner moves the sheet's file, which `openeik diff` reports as one sheet changed and `touchedPaths` and `partiesNeeded` as needing the owners of both folders. A writer lists it where a sheet gives `owner` (`proposalsUsed`), and it governs the sheets' files, `drawings/<discipline>/sheets/<id>.json`. `writtenAsRead` (Part I, 9.12.1; open question 193): a model written back as it was read, a proposal no model lists (Part I, 9.12, rule 7; `UNLISTED_0_8`), which a caller asks for, and which, binding a writer alone, applies to a model of 0.5, 0.6 or 0.7 alike (`FROM_05_0_8`). Of a model that gives no list, written onto a folder or a version whose `eik.json` gives none, a proposal its records show that the caller does not ask for, and that the folder it writes into or the version whose files it writes (`from`, a clone's and a pull's) shows as the model holds it, is not listed, and what it governs is written back as it was read: a view's `tags` with no `drawingSets`, a `project/plan-limits.json` that holds no valid plan limits with no `planLimits`, the files of `checks/`, a folder of 0.5's schedules, a sheet's `owner` with the sheet where it was. A proposal shown by a record or a kept file the model holds otherwise than they do, by the members it changed, is listed as before, and so is one asked for. `listedProposals(model, {format, previous, proposals, over})` and `createdParts(model, over)` work it out; `modelFiles` takes `over`, the models it is written over or a function that gives them, and `writeFolder`, `clone` and `pull` (`proposals: ["writtenAsRead"]`) read what they write over. A list that names it is warned of (`proposal-rule`).

**The proposals for 0.9, as a model of 0.8 asks for them** (`PROPOSALS_0_9`; their indexes in `schemas/0.8/proposed/`): a model of 0.8 may ask for them by name, or list them in its `eik.json` or at the top of its single-file form (Part I, 9.12), and no model of an earlier version: a model of 0.5 to 0.7 that lists one is refused (`proposal-unread`). `framedBays` (Part II, 5.1.2; Part XXI, 4, rule 5; open question 194): a framed layer's bays. In a framed layer, a wall type's layer that carries `framing` or a slab type's that carries `joists` (`framedRuleOf(type, layer)`), the layer's own `material` or `materialId`, `thermal.lambda` and `thermal.air` are its bays', and its members' material is its rule's, `C24` where it names none (`MEMBERS_MATERIAL`, `membersNaming`). `framedBaysOf(type, layer, materials)` reads a framed layer for a calculation of EN ISO 6946, 6.7.2: its bays, their material, their λ, the layer's own else its material's, or their air layer; its members, their material and λ, and their share w / s of its area, a joist rule's spacing 600 where it gives none (`JOIST_SPACING`), at most 1. `checkFolder` and `checkModel` warn of a framed layer whose own material is its members', by the same `materialId` or the same name ignoring case and surrounding white space, the rule's default counting (`framed-bays-of-members`; `sameMaterial`, `framedBaysChecks`). `compileModel`'s typed quantities give a framed layer its members' mass by its rule's material alone and its bays', its net volume less its members', by its own, none where they are left empty (`typedQuantities` with `framedBays`); its bodies, its members and its print of IFC, but for the weights it prints, are as without it. No record shows it (`SEEN_0_9` is empty): a writer keeps it where the model's list names it, and a caller that says what it reads is told where it governs it (`governsOf`: `slab`, `wall`). `framedBaysApply(model, proposals)` says whether it applies to a model. `openeik check --proposal framedBays` asks for it; a folder that lists it needs no flag.

## Proposals

Every part and section that OpenEik 0.1 had as a proposal is a rule of 0.2 (`RULES_0_2`), and this package applies it to every model of 0.2, asked for or not, with 0.2's schemas (`schemas/0.2/`). For a model of 0.1, a proposal applies only when it is asked for (`proposals: ["electrical"]`, `--proposal electrical`), with the schemas of 0.1 and of the proposal (`schemas/proposed/`): without it, nothing changes. Each paragraph below names a part by its proposal's name: "with it" is a model of 0.2, or of 0.1 asked for it, and "without it" a model of 0.1 not asked for it.

**Electrical installations**, [Part XIII](https://openeik.org/spec/0.2/electrical), of 0.2 (in 0.1 the proposal `electrical`): devices and boards (category `electrical`), circuits (`project/circuits/<id>.json`), feed chains, control, a 3D view's lighting scene (`display.lighting`), the legends of electrical drawings (`legend.scheme` `electrical` and `circuits`), cable carriers (`cableCarrier`) and modelled cables (`cable`).

```js
checkFolder("./house", { proposals: ["electrical"] });   // the rules of Part XIII too, with the codes below
readFolder("./house", { proposals: ["electrical"] });    // the circuits read as records: model.circuits
versionTree("./house", { proposals: ["electrical"] });   // each circuit a record's leaf, project/circuits/<id>
await clone(store, "./copy", { proposals: ["electrical"] });  // then push, pull and status carry the proposal
compileModel(model, { proposals: ["electrical"] });      // the devices' bodies, the carriers' and cables' runs, the legs
```

```sh
openeik check ./house --proposal electrical
openeik compile ./house --proposal electrical
openeik read ./house --proposal electrical --out house.json    # and openeik write house.json ./house --proposal electrical
node tools/run-conformance.mjs --version 0.1 --proposal electrical    # the proposal's suite of 0.1, as its builder gives it
```

- **Without it**, the elements and types of the three categories are of categories this package does not know: kept, held to the common schemas, a `category-unknown` warning each and a `member-unknown` for each payload; the circuits' files are kept files, and the member `circuits` of `project/order.json` an `order-unknown` (Part I, 10, rule 5; Part III, 7 and 9, rule 5); a view's `display.lighting` is a member the view's schema does not know, kept, a `member-unknown`; a legend's `scheme` `electrical` or `circuits` is a value 0.1's schema does not hold, a `schema-invalid` error. The compiler gives them no body.
- **With it**, a version's tree holds each circuit as a record's leaf, `project/circuits/<id>`, its object the circuit's canonical JSON, and counts it among the records (XIII.3.1; Part VI, 2, rule 1), as the reference implementation stores it: `versionTree`, `pushVersion`, `readVersion` and `filesOfTree`, `diffTrees` and `diffFolders`, and `openeik hash`, `tree` and `diff` with `--proposal electrical`, so that the root of a model with circuits is the reference implementation's. A remote carries the proposal as it carries assets (`clone`, `push`, `pull` and `status` with `proposals: ["electrical"]`, or `--proposal electrical`, kept as `electrical: true` in `.eik/remotes.json`): a push stores each circuit as a record's leaf, and a clone or a pull writes such a leaf as `project/circuits/<id>.json` in the stored form; the model is read, written and checked by the proposal, and a pull merges the circuits by id, as records (`mergeModels` with `proposals: ["electrical"]`). Without it, a circuit's file is a kept file of the tree, and the root is another. `drawingStatus` takes either root as the folder's at its step 1 (Part XIV, 9.4). The validator holds the three categories to the proposal's schemas (`schemas/proposed/electrical/`) and to the `systems` folder (`path-discipline`), reads each circuit's file as a record (its schema, the stored form, its name made from its id; the list `circuits` of `project/order.json`), holds a view's `display.lighting` to its own schema (`view-lighting.schema.json`), in a folder and in the single-file form, as no unknown member, accepts a legend's `scheme` `electrical` or `circuits`, which the proposal's index names in its `values` (XIII.4.4), and checks the rules of sections 2.3, 3.3, 4.1, 4.3, 5 and 6: an error for a breach of a MUST, a warning for one of a SHOULD and for an id of a lighting scene that names no element, each naming its rule as `XIII.4.1.1`. Of the rules of 0.1, those on declared geometry apply to them as to any category.
- **The single-file form** holds the circuits as the list `circuits` (XIII.3.1), in which a kept file at a circuit's path is in a record's way. With the proposal, `readFolder` and `readModel` read them so, and `modelFiles` and `writeFolder` write them back at their paths, name them in `project/order.json` (whose order has no meaning) and remove a circuit's file when it went. A model read with the proposal is written with it: without it, `circuits` is a member the writer does not know, which it writes into `project/project.json` (Part III, 11, rule 4).
- **The compiler** (XIII.7): a device is its declared geometry, its type's placed at its point (origin at `at`, at `elev(levelId) + offset`, x along the facing), else a box of its type's `width` across the facing (a linear device's own, its length, XIII.2.3.3), `depth` along it and `height`, centred on `at`, from `offset` by its mount (a wall device centred on it, a ceiling device under it, a floor device on it); a carrier and a cable are runs as pipes are (Part IV, 12), without insulation, a conduit and a cable round, a tray, a ladder and trunking rectangular; and `legs` gives each modelled leg, the pieces that name one `to`, and its length, the sum of theirs (XIII.6.3). The routes of the other legs, loads and phase balance are applications' (Part XIII, 8).
- **The command processor** (`applyCommands` with a model of 0.2, or of 0.1 with `{ proposals: ["electrical"] }` or `openeik apply --proposal electrical`): `create`, `update`, `delete` and the type commands work on the three categories (Part V, 1, rule 5; XIII.9), each record held to the proposal's schemas; an electrical type sets its elements' height, and their width but for a linear device's, as the validator decides it (`electricalTypeSizes`; XIII.2.3, rule 3), refused where a command sets another (`electrical-size`); the part's own kinds, `circuit.upsert`, `circuit.delete` and `view.lighting`, are implemented for a model of 0.2, held to the schemas of `schemas/0.2/commands/` (0.1's command schemas, as the tag `v0.1.0` keeps them, have none, so a model of 0.1 refuses them with the proposal too), and a delete takes with it what section 9 says, as the reference implementation cascades ([Commands](#commands)); and every batch's model is checked with the proposal, so that a command that breaks a rule of this part is refused, a circuit written on an outlet (`circuit-board`) and a scene on a plan view (`lighting-view`) among them.

**Drawings**, Part XIV, of 0.2 (in 0.1 the proposal `drawings`): sheets as standard records (`drawings/sheets/<id>.json`), detail items' `provenance` and `anchors`, the drawing profile (`drawings/profile.json`), people and their keys (`project/people/<id>.json`), issued drawings (`drawings/issued/<drawing>/`: `drawing.svg`, `revision.json`, `read-set.json`, `signoffs/<n>.json`), registers, issues, reviews and assets by digest (`assets/<sha256>.<ext>`).

```js
checkFolder("./house", { proposals: ["drawings"] });   // the static rules of Part XIV too, with the codes below
readFolder("./house", { proposals: ["drawings"] });    // the people read as records: model.people
```

- **Without it**, a sheet is the application record it is in 0.1, the people's and the drawing files are kept files while they are text of at most 1 MiB, larger or binary files are left alone (`kept-skipped`), and a detail item's `provenance` and `anchors` are members the schema does not know (`member-unknown`).
- **With it**, the validator holds sheets, people and detail items to the proposal's schemas (`schemas/proposed/drawings/`), reads each person's file as a record (the list `people`), holds an issued drawing's SVG and read set up to 64 MiB and the files of `assets/` as bytes, reads each drawing file by its `format` against its schema and the stored form, and checks every rule of sections 2 to 5 and 7 to 15 it can from the folder alone, and those that need unchanged records where the read set shows they are: an error for a breach of a MUST, a warning for one of a SHOULD, each naming its rule as `XIV.8.5.3`. Each issued SVG goes to `checkDrawingSvg` (`src/drawings-svg.js`), the profile's validator, with what the folder says beside it.
- **The single-file form** holds the people as the list `people`, and the drawing files in `extras`; it holds no assets, so whether one is there is not checked.
- **Not here:** the rules that need the history (`key-removed`, `issued-file-changed`, `register-rewritten` and the like), and verifying signatures, which `verifyDrawingSignoffs` (`src/drawings-verify.js`) does.

### Issuing a drawing

`issueDrawing(folder, options)` (`src/drawings-issue.js`) is the reference drawing issuer (Part XIV, 17.2; the class of 19.2): it issues the next revision of a sheet's drawing from a folder at a version, and returns the files 17.2 writes, which the caller writes together and records as a version (step 8). `openeik drawing issue` writes them into the folder.

```js
const r = issueDrawing("./house", { sheet: "A-101", by: "person-k2m9xa", status: "S3", date: "2026-11-05" });
// r.files: drawings/issued/A-101/drawing.svg, read-set.json, revision.json, drawings/register/A-101.json
// r.revision.revision: "P01"; r.carried: the viewports copied from the superseded revision; r.changes: what differs
```

```sh
openeik drawing issue ./house A-101 --status S3 --date 2026-11-05 --by person-k2m9xa [--to person-x7q2mz] [--dry-run] [--json]
```

- **What it draws** (`src/drawings-draw.js`, `src/drawings-cut.js`): each element's bodies as the core compiler derives them (Part IV; `compileModel`, the instances of groups placed, so that a copy's elements are drawn under their ids in their instances, XIV.6.12, rule 21), as the faceted shells the IFC bridge writes. A plan cuts them at its cut plane (the level and `cutHeight`, or the view range's `cut`), fills each body's cut by its layer's pattern (one `pattern` of `defs` each) and draws the element's outline over it; what lies under the cut and over the range's bottom is drawn in projection, each upward face filled white over what lies beneath, between its bottom and its depth as `beyond`, and over the cut, where the view draws it, as `overhead`. A section or an elevation cuts at its origin's plane and draws what lies behind it to `far`. Everything is clipped to the crop; datums (grids, levels) are drawn where the view names them. With the proposal `pieces` (`proposals: ["pieces"]`), a plan whose `display.pieces` asks for them draws each piece of those layers and edges as a group of its own, `<element>:<piece>`, seen from above, with its mark (Part XX, 6.1). Detail items (`src/drawings-items.js`): every kind of Part II, 10, in the `drafted` or the `agent` layer by their provenance, with their anchors' state (3.3), an orphan drawn dashed with "?", bulges as arcs, hatches, insulation, components and symbols as patterns, markers and `use`s (Part III, 15.5). The sheet layer (`src/drawings-sheet.js`): the border, the title block of 2.3's fields, the revision table from the register, each viewport's title and scale, and with `code`, the derivation's code (6.8). Clouds follow the visible change (10.2), and change items are proposed from the comparison with the superseded revision (`by` `derived`) where the caller gives none.
- **What is simplified:** hidden lines are not worked out. The order is `paint` (6.7): each element's projection far to near, then every cut, an element in both drawn in parts; two elements that each hide part of the other are painted whole, one over the other. Rooms, terrain, doors' swings, section marks and cast joins are not drawn, and are read in `inVolume` where their boxes meet a volume. The drawing style is this package's (XIV.1.2): its line weights and sizes, whose digest is `generator.styles`.
- **The read set** holds every record the compiled result names as read for each element drawn, the materials its cuts are filled by, the view and its chunks (a dependent view's primary's too), the datums and the records items name, and in `inVolume` every element and placed copy whose box meets the volume by the checker's own boxes: so a revision is `current` against its own source version (9.7, rule 6), which the tests check on both examples.
- **Carrying** (17.2): a viewport whose entry, view, read set and sheet pairs are unchanged at the version, by the same generator and fonts, is copied from the superseded revision (the folder's, or `superseded`); the bytes are those drawing it again gives. `carry: false` draws every viewport.
- **Refusals** (`ISSUE_CODES`): a proposed agent's item on a placed view (3.4, rule 4), a sheet of 0.1, a status, purpose or person the folder does not give, no profile or no font, a withdrawn drawing, a date before the superseded one, and a 3D view (`issue-3d-view`): its picture is a PNG, which this package cannot render; a caller that can gives it in `pictures`. With `statusOnly`, a change of status alone over the same `drawing.svg` (8.2). It draws twice and compares the bytes (17.2, step 2; `twice: false` draws once).

### Checking a rendition

`checkRendition(pdf, context)` (`src/drawings-pdf.js`) checks a PDF rendition of issued drawings (Part XIV, 15) from its bytes, as a drawing validator with a PDF reader does (19.2): no renderer and no dependency, the file read by `src/pdf.js`, its pages' marks by `src/pdf-page.js` and its QR codes by `src/qr.js`. `checkFolder` checks so every rendition a register keeps (`assets/<sha256>.pdf`, named by a `rendition` entry), and `openeik drawing check-pdf` a PDF given on its own, such as one a host prints on demand, with `--folder` against a folder (`checkRenditionInFolder`).

```js
const r = checkRendition(bytes, { revisions: [{ drawing: "A-101", sequence: 1, record, svg, date, root, files }], project: { id, name }, kept: true });
// r.diagnostics: rendition-* findings, each naming its rule (XIV.15.2.2 …); r.notChecked: what it could not check, and why
```

```sh
openeik drawing check-pdf print.pdf [--folder ./house] [--json]   # exit 1 on an error
```

- **15.2, rule 2:** the XMP identification (`pdfaid:part` 3, a conformance level of B, or A or U), and the requirements of ISO 19005-3 a reader of the file's structure decides: the header and its binary comment, nothing after the last `%%EOF` but an end of line, an ID, no encryption, a cross-reference that leads to its objects, the Metadata stream, an output intent `GTS_PDFA1` with a valid ICC profile (one for all), every font text is shown in embedded, no forbidden action or JavaScript and no additional actions, and each embedded file with F, UF, an AFRelationship, a MIME type and an AF array (`rendition-pdfa`); each page the sheet's paper, the issued SVG's width and height, to within half a point (`rendition-page`); the SVG attached as Source with `image/svg+xml`, the revision record and read set as Data, the sign-offs as Supplement (`rendition-attachment`). The rest of ISO 19005-3, which needs the font programs or a renderer, is a PDF/A validator's: listed as not checked.
- **15.2, rule 3:** each attachment byte for byte the issued file: the SVG by its SHA-256, the revision record and the read set by their bytes, or by their hashes and the stored form where the folder holds a later revision, each sign-off a file of the drawing's `signoffs/`, and an attachment's own Size and CheckSum its bytes' (`rendition-attachment-bytes`). On its own, the attachments are held to one another.
- **15.3, rules 1 and 2:** the note is the text the page shows that is not the issued SVG's own, with its QR code; it lies wholly below the drawing frame, taken as the box of the SVG's line work (its text and the paper's background left out: a shape filled white with no stroke over the whole paper, which a file may draw, 6.2) mapped onto the page at exact scale, on the page, and meets no mark of the drawing (`rendition-note`); its text names the drawing's number, its revision code, the building (its project's name or id) and at least the first 12 hexadecimal digits of the version (`rendition-note-names`). Whether a sentence says that the print is a copy is a matter of wording: not checked; a note in a font that maps no text is not checked either.
- **15.3, rule 3:** a QR code, sampled module by module from the vector fills or the image the page draws (an image in a filter it does not decode is not checked), decoded with its error correction, whose URL names the revision by its SVG's SHA-256 (or its asset's), at the page's bottom right corner (nothing lies between it and the right or the bottom edge), on a white square (`rendition-qr`).
- **15.3, rule 4:** every date the file holds (the document information, every date of its XMP metadata, its pages' and annotations' modification dates, its attachments' Params) is the revision's date, the latest of several, at no time but midnight (`rendition-date`); the trailer's ID is two byte strings (`rendition-id`). Its derivation the text does not give (open question 141): not checked.
- **In 0.5, or with the proposal `renditions`** (15.4, of 0.5): the identifier's first entry derived as rule 9 says (`renditionId(projectId, lines)`), and its second the first's in the file as printed; the JSON attachments as `application/json`, every attachment named by its path in the folder, and each sign-off one of a revision it prints; a note in a font with no Unicode map an error, not unchecked; and every date at midnight UTC, `D:YYYYMMDD000000Z` and `YYYY-MM-DDT00:00:00Z`. Its cases are in `conformance/proposed/renditions/`.
- **15.2, rule 5**, for a rendition a register keeps whose entry says it is signed: a signature field whose ByteRange covers the file but its Contents, whose CMS message digest (SHA-256, SHA-384 or SHA-512) is that of those bytes, and which covers the attachments, so that none changed after it (`rendition-unsigned`, a warning). Verifying the signature itself, its certificate and trust, is a PAdES validator's.

The fixtures of its tests are real renditions, checked with veraPDF as PDF/A-3b: `packages/openeik/test/fixtures/renditions/`, written by `tools/build-rendition-fixtures.mjs` with the fixtures' writer `tools/lib/rendition-pdf.mjs` (not part of the package), whose sRGB output intent is a profile it makes itself and dedicates to CC0-1.0 (`tools/lib/srgb-icc.mjs`).

**A review as BCF 3.0** (Part XIV, 13 and 18): `drawingReviewBcf(folder, review)` exports a review round, `drawings/reviews/<review>.json`, as buildingSMART's BCF-XML 3.0, whose schemas its files validate against (`src/drawings-bcf.js`); `openeik drawing bcf` writes it to a file.

```js
const { bytes, topics, document } = drawingReviewBcf("./house", "rv-01jc4n2x8q");
// bytes: the .bcf zip; topics: [{item: "i-1", guid: "4032da67-…", status: "New", viewpoint: "3eb31f93-…"}, …];
// document: {path: "drawings/issued/A-101/drawing.svg", sha256: "3b455c40…", embedded: true}
```

```sh
openeik drawing bcf ./house rv-01jc4n2x8q --out review.bcf    # default: <review>.bcf here; --json says what it wrote
```

- **Topics:** one per item, in a folder named by its GUID: the item's `bcf`, which a round trip keeps, else one made from the review's id and the item's (a UUID of version 8, from SHA-256), so that the same review always gives the same topics. Its title is the first line of the item's text, its description the text, its type the item's kind, its status the drawing profile's name of its state (else the state's code), its comments the replies, and its labels the drawing's number, the change item it is about and `proposed` for an agent's item no person has accepted; `extensions.xml` lists them all.
- **The drawing reviewed** travels in the file (`documents.xml`, `documents/<guid>`), named by its SHA-256, where the folder holds it with the review's digest: the current revision's `drawing.svg`, or an unlinked drawing's PDF. A review of an earlier revision names it by its path and digest only.
- **Viewpoints:** an anchored item's elements are selected by their OpenEik ids (`AuthoringToolId`, `OriginatingSystem` `OpenEik`; BCF's `IfcGuid` is optional, and an id is none), the model visible round them, and framed by the orthogonal camera BCF 3.0 asks of every viewpoint, in metres, as the anchor's viewport looks: a plan from its cut, a section or an elevation from its own plane, any other view from the south-east. It frames their boxes (9.3), or the model's where none can be boxed.
- **Bytes:** the same folder and review give the same entries, byte for byte; the zip (`src/zip.js`, no dependency, its own CRC-32) stores them, never deflated, with fixed times, so that every runtime, a browser too, writes the same file. A review that is not in the folder, does not validate or that BCF cannot carry is refused (`review-missing`, `review-invalid`).

**Review and issue**, [Part XVIII](https://openeik.org/spec/0.2/review), of 0.2, from plan 688 (in 0.1 the proposal `review`): a review round on a version of the model in 3D, `project/reviews/<review>.json`; an issue that releases a version and names its prints by digest (`versions`, `renditions` and `terms` in Part XIV's issue); an issue's statements, `issued`, `received` and `withdrawn`, and a host's receipts, beside the issue in `drawings/issues/<issue>/signoffs/` and `receipts/`; and terms accepted, `project/terms-accepted/`. Asking for it asks for the proposal drawings too, on whose registry, profile, issues and statements it builds.

```js
checkFolder("./house", { proposals: ["review"] });       // Part XIV's rules and Part XVIII's, with the codes below
modelReviewBcf("./house", "mr-01jcq7d2v9");               // {bytes, topics, model}: the round as BCF 3.0
await verifyReviewStatements("./house", { hostKeys: [hostKeysText], tsaCerts: [tsaPem] });   // by path: {ok, problems, …}
await checkReviewAnchors("./house", connectStore({ url, repo, token }));   // {diagnostics, checked, unchecked}: XVIII.2.5.4
```

```sh
openeik check ./house --proposal review
openeik review bcf ./house mr-01jcq7d2v9 --out round.bcf   # default: <review>.bcf here; --json says what it wrote
openeik review verify ./house --host-keys host-keys.json --tsa tsa.pem   # exit 1 when a statement fails; --json
openeik review anchors ./house                                 # against the folder's remote; or --url <base> --repo <owner/name>
```

- **Without it**, the part's files are kept files, as every 0.1 reader keeps them; with the proposal drawings alone, an issue's `versions`, `renditions` and `terms` are held to its schema, and nothing more.
- **With it**, the validator reads each file of the part by its `format` against its schema and the stored form, decodes each statement's payload to an in-toto Statement v1 of its predicate type, and checks every rule of sections 2.5, 3.2, 4.3, 5.3 and 6.2 it can from the folder alone (`src/review.js`): an error for a breach of a MUST, a warning for one of a SHOULD, each naming its rule as `XVIII.2.5.7`. A receipt's key is the host's, which the building's registry does not hold.
- **BCF** (XVIII.2.6): one topic per item, each with its own viewpoint: its camera, perspective with its field of view or orthogonal with its height, in metres; its shape as lines; its section as clipping planes, a box as six; its anchors' elements selected by their OpenEik ids; and the version reviewed as the topics' document reference, `version/<root>`. The same folder and review give the same bytes (`src/review-bcf.js`).
- **Verifying** (`src/review-verify.js`, XVIII.4.4; 5.3, rule 7; 5.6; 6.2, rule 7): `verifyReviewStatements` and `openeik review verify` check each statement about an issue, receipt and record of terms accepted as `verifyDrawingSignoffs` checks a sign-off, and with its code (`verifySignatures`): each signature with its key over DSSE's pre-authentication encoding, its RFC 3161 time-stamp chained to a certificate given (`tsaCerts`, `--tsa`), and the key's window at the time-stamp's time; then its subjects against the issue record by its hash, or the terms by their digest, and its predicate type. A statement about an issue, and terms accepted `by` `person`, are signed with a key of the signer's record of the registry; a receipt, and terms attested `by` `host`, with a key of a host's file of keys the caller gives (`hostKeys`, `--host-keys`: `/.well-known/openeik/host-keys.json` as fetched from the host and pinned), whose `host.name` is the statement's. `readHostKeys` holds such a file to `schemas/proposed/review/host-keys.schema.json` and to rule 5.6.4 (each key id once, a public key of its algorithm, no window that ends before it begins); a file that is not taken gives no key, and the command refuses it. Each receipt's result names the SHA-256 of the host's file that verified it, which the caller records as the file it trusted (rule 5.6.6); comparing a pinned file with a later one is the caller's. It reports with the part's codes: a signature, a time-stamp or a key's window that does not verify as `issue-signoff-signature`, `receipt-signature` and `terms-signature`; a key that is not the signer's as `issue-signoff-signer` and `terms-signer` (a receipt's as `receipt-signature`); the subjects as `issue-signoff-subject`, `receipt-subject` and `terms-subject`; and the file as `*-shape` and a missing time-stamp as `*-timestamp`.
- **The version reviewed** (`src/review-anchors.js`, XVIII.2.5, rule 4): `checkReviewAnchors(folder, source)` and `openeik review anchors` read each model review's version from an object source, a store or objects in memory, by its `model.root`, and look each anchor's element up among that tree's element records, whose leaves are their records' hashes (Part III, 6), so no record is read: an anchor's `hash` that is not its record's there is an error, an element that version does not hold a warning, both `model-review-anchor`. A round whose version the source does not hold is listed in `unchecked`, with why, and reported nothing of; one tree is read once for every round of it.
- **Not here:** the rule that needs the history (XVIII.3.2, rule 4); fetching a host's file of keys, which the caller does; and an IFC print, whose bridge is written apart (XVIII.7.2).

**Ownership by folder**, [Part XVI](https://openeik.org/spec/0.2/ownership), of 0.2 (in 0.1 the proposal `ownership`): `project/owners.json` names a project's parties and the paths each owns, by globs, the last matching rule deciding; a change to an owned path needs one owner's approval, or every owner's where a rule says `all`.

```js
checkFolder("./house", { proposals: ["ownership"] });    // project/owners.json checked too, with the codes below
ownersOf(owners, "systems/level-0/duct/d1");            // {owners: ["hvac"], all: false, rule: 2}: the last rule that matches
partiesNeeded(owners, touchedPaths(await diffFolders("./before", "./after")));   // what a change needs, rule by rule
```

```sh
openeik check ./house --proposal ownership
openeik owners ./house                                   # the parties and the rules, the file checked first
openeik owners ./house systems/level-0/duct/d1.json project/levels   # the owners of paths
openeik diff ./before ./after                            # owners: the change needs arch for 1 path (…); hvac for 9 paths
openeik merge ./base ./ours ./theirs                     # owners    theirs needs …, by ours' file
```

- **Without it**, `project/owners.json` is a kept file, as every 0.1 reader keeps it.
- **Globs** (XVI.3) match a version's leaf paths: a record's path without `.json`, a kept file's own. `*` stands for any part of one segment, `**` for any number of whole segments; a glob that ends in `.json` also matches as if the `.json` were not there. The order index `project/order` has no owner.
- **What a change needs** is the owners of what it touches by the ownership of the line it joins, as it stood before: `diff` reads folderA's file, and `merge` reads ours', for what theirs changed against the base. A host holds a change until it has those approvals (XVI.4, rule 4); this package only says what they are.

**Folders that follow owners**, [Part III, 4.4](https://openeik.org/spec/0.2/code-base#4.4), of 0.2, with ownership (open question 85): a record's discipline folder is the discipline that owns it, one of Part XVI's eight, so that an owners file says who owns what by plain globs, `<discipline>/**`, `types/<discipline>/**` and `drawings/<discipline>/**`.

```js
readFolder("./house", { proposals: ["ownership"] });     // either layout, record for record the same model
modelFiles(model, { proposals: ["ownership"] });         // the owners' layout: structure/level-0/wall/w1.json for a bearing wall
modelOwners(model).element(wall);                        // "structure": one function gives a record's owner and its folder
migrateFiles(files);                                     // {files, from, to, moved, rewritten, findings, owners, touched, needs, message}: to 0.2, in one write
migrateFolder("./house");                                // the same, written onto the folder
```

```sh
openeik migrate ./house [--dry-run] [--json]             # a folder of 0.1 to 0.2 in one write (Part I, 9.8); a folder of 0.2 only moves
openeik check ./house --proposal ownership               # each record in 0.1's folder or its owner's (path-discipline)
openeik diff ./before ./after --proposal ownership       # moved  elements wall-1  architecture/… -> structure/…
```

- **The owners** (4.4, rules 1 to 5): an element's, a type's and a view's `owner`, one of the eight, set by hand, wins; else `modelOwners` gives it: `structure` for a framing member, a wall, slab or roof that is `structural`, a stair that carries (`structural`, or a type of concrete or cross-laminated timber), the structural categories and a component that is structural or of a plate's or a cast-in item's type; `ventilation` for ducts and air devices (`airTerminal`, `airType`); `plumbing` for pipes and every other terminal; `electrical` for Part XIII's categories; `site` for terrain, grading, property lines, planting, roads and parking; `architecture` for every other element. A wall, slab, roof or stair type is `structure`'s while an element that bears uses it (`bearingTypes`); a view is `setup`'s unless it says; a sheet's owner is its discipline code's (`sheetCode`, `sheetOwner`). A component of another family, which may be a connector of its writer's library, and a record of a category this package does not know, stay in the folder they were read from.
- **Reading** (4.4, rule 7): with the proposal, `placeOf(leaf, true)` and `recordPlace(path, true)` take both layouts, which never give one path two meanings; `readFolder`, `readVersion`, `versionTree`, `diffTrees` and `mergeFolders` do so with `proposals: ["ownership"]`. A remote carries the proposal as it carries the proposal electrical (`clone`, `push`, `pull` and `status` with `proposals: ["ownership"]`, or `--proposal ownership`, kept as `ownership: true` in `.eik/remotes.json`): a version's records are read in either layout, and a clone and a pull write the owners' layout. Without it, a record in an owners' folder of 0.1's (`ventilation/…`, `drawings/<discipline>/…`) is a kept file, as a 0.1 reader keeps it.
- **Writing**: `modelFiles` and `writeFolder` with the proposal write the owners' layout; onto a folder in 0.1's they move its records, which is the change of layout. An `owner` that is none of the eight is refused (`model-invalid`).
- **The change of layout** (4.4, rule 8): `migrateFiles` and `migrateFolder` move each record whose folder changes, a view with its detail chunks, in the write that migrates a folder of 0.1 to 0.2 (Part I, 9.8), which also names the folder's format `openeik/0.2` and rewrites what 0.2 deprecates; for a folder of 0.2 they move records and nothing else: the project's files, `project/order.json` among them, kept files and files a reader leaves alone stay as they were, and every record's object and hash with them. A folder in the owners' layout moves nothing. Where the folder has `project/owners.json`, `ownersForLayout` rewrites it in the same change (XVI.3.1): each glob that names `systems/`, a view's or a sheet's folder of 0.1 or a category goes, and a rule for each discipline whose parties owned one is added, `disciplineGlobs`, owned by those parties and the parties that lead; a party that names no discipline and loses its globs is reported (`unplaced`), for a person to give it paths. The result names what moved, the paths the change touches, and what it needs by the file as it was (`needs`): a version that every owner approves, or that a party that owns `**` makes.
- **Diff** (Part VI, 4, rule 3): a record whose path alone changed is `moved`, with both its paths, and touches both (XVI.4, rule 1); `byFolder` counts it as moved in the folder it went to.
- **The validator** accepts each record in 0.1's folder or its owner's (`path-discipline` for any other), holds `owner` to its schema (`schemas/0.2/ownership/owner.schema.json`), and warns of a folder in both layouts at once (`layout-mixed`).

**Commands with an envelope**, Part XVII, of 0.2 (in 0.1 the proposal `envelope`): a batch sent in an envelope, `{format, operationId, by, target, mode, intent, commands}`; every refusal with a code, a JSON pointer into the command, a message and a fix where one is known; and a precondition on every command.

```js
const answers = new Map();                               // the operations applied, kept by the caller
applyCommands(model, {
  format: "openeik-envelope/0.1",
  operationId: "0b6f6a4e-2c1d-4f7e-9a51-3d2b8c7e1f00",
  by: { person: "u-7f3c", agent: { name: "an-agent", version: "2.1" } },
  target: { ref: "main", version: null },
  mode: "apply",                                          // or "dryRun", or "propose"
  intent: "Rename the west wall",
  commands: [{ kind: "update", id: "wall-west", expectedRevision: 1, patch: { name: "W" } }],
}, { proposals: ["envelope"], answers });
// {ok: true, dryRun: false, mode: "apply", operation: {id, digest, kept: true}, target: {ref: "main", base: null, version: null, compared: false},
//  results, affected: ["wall-west"], verify, model}
applyCommands(model, [{ kind: "update", id: "wall-west", expectedRevision: 0, patch: { name: "W" } }], { proposals: ["envelope"] });
// …results: [{index: 0, ok: false, kind: "update", commandId: "wall-west", error: "Command 0 (update wall-west): Revision conflict: …",
//  refusals: [{code: "revision-conflict", rule: "V.3.1", pointer: "/expectedRevision", message: "Revision conflict: expected 0, current 1. Read and retry.",
//  fix: {read: [{list: "elements", id: "wall-west"}]}, data: {expected: 0, current: 1}}]}]
```

```sh
openeik apply ./house envelope.json --proposal envelope --json    # an envelope, or a batch answered with codes
```

- **Without it**, nothing changes: an envelope is an object without a `kind`, refused as a command, and an answer carries no codes. `openeik apply` reads an envelope's `commands` as it reads `{"commands": […]}`.
- **With it**, a batch without an envelope is applied as 0.1 applies it, and answered with `mode` and its refusals coded. An envelope is checked against `schemas/proposed/envelope/envelope.schema.json` (`envelope-format`, `envelope-schema`), and answered with its `operation` and `target` too (`schemas/proposed/envelope/answer.schema.json`).
- **Codes** (XVII.10): each refusal carries `{code, rule, pointer, message, fix?, data?, record?}`, in `results[i].refusals`, and the envelope's and the model's errors before the batch in `refusals`. A rule the validator checks too keeps the validator's code (`opening-fit`, `ref-missing`, `type-size`), with the record it is on; the processor's own are below. A fix is a JSON Patch of the command (a misspelt member moved, a size the type sets given or left out, a patch's `undefined` sent as `null`), or the records to read again: a conflict's fix never writes the current revision in.
- **Preconditions** (XVII.9): in an envelope every command gives its kind's (`PRECONDITIONS`); an upsert gives `null` for a record that does not exist yet, and a number only for one that does. The fourteen kinds that had none get one (`ADDED_PRECONDITIONS`); of them this package implements `project.excavation`, `project.precast`, `project.standards`, `original.make`, `copy.place`, `original.frame` and `original.edit`. A replay is not refused for a precondition it lacks.
- **Operations** (XVII.3): with `answers`, a `Map` the caller keeps, an operation applied is recorded by its id with the envelope's digest and its answer (without the model); the same id and envelope again gets that answer back, `operation.repeated: true`, applied once; the same id with another envelope is refused (`operation-reused`). A refusal, a dry run and a proposal are not recorded. Without `answers`, `operation.kept` is `false`, and the preconditions refuse a repeat. A store or a host keeps the record itself, durably and with the change, and refuses an id that comes again while it is being applied.
- **Target** (XVII.5): the model is the newest version of the ref `ref` names, `main` by default, as a processor that keeps one line of work calls it; an envelope for another ref is refused (`target-unknown`). With `version`, the version the model is, the base is compared; a ref that moved is applied to, the preconditions deciding, unless the envelope asks for its base `exact` (`base-moved`). The store moves the ref by compare-and-swap. Every envelope that validates is answered with its `operation` and `target`, refused or not.
- **Versions** (XVII.4.3, rule 1): a version of 0.2 made from operations has the person as its `author` and, in its commit, `agents`, each agent whose operations it holds as `{name, version?}`, once, sorted: `pushVersion(store, folder, {author, agents})` writes them from the envelopes' `by.agent`, and `readVersion` gives them back in `commit`. A version of 0.1 has none.
- **Propose** (XVII.6.3): nothing changes, and an accepted batch gives `proposal`, a proposal file of Part VI, 8.7 (its base's records by hash and revision, `by.app` or the agent, in 0.2 `by.agent` as the envelope gives it (XVII.4.3, rule 2), and its `dryRun` when `at` is given), for the application to keep at `<application>/<model>/proposals/<id>.json`.
- **Not here:** who a person is and what a host lets them do (`person-mismatch`, `not-permitted`, `mode-not-allowed`), operations in progress, size limits and envelopes required: a host's.

**Assets**, [Part XV](https://openeik.org/spec/0.2/assets), of 0.2 (in 0.1 the proposal `assets`): binary files kept by the SHA-256 of their bytes, as Git LFS keeps large files. In a folder an asset is the file `assets/<sha256>.<ext>`; in a version, a pointer at that path, `{"asset":{"bytes":<n>,"sha256":"<sha256>"}}`; its bytes are the store's, beside its objects.

```js
checkFolder("./house", { proposals: ["assets"] });          // the files of assets/ checked too, with the codes below
versionTree("./house", { proposals: ["assets"] });          // each asset a pointer leaf; .assets gives them with their bytes
await pushVersion(store, "./house", { author, proposals: ["assets"] });   // the bytes the store lacks first, then the objects and the ref
await clone(store, "./copy", { proposals: ["assets"] });    // every asset fetched and checked before anything is written
await readVersion(store, "main", { proposals: ["assets"] }); // .assets: the version's pointers, by path
```

```sh
openeik check ./house --proposal assets
openeik clone ./copy --url <base> --repo <owner/name> --proposal assets   # then push, pull and status carry the assets
openeik push ./house --url <base> --repo <owner/name> --author <name> --proposal assets   # a folder without a remote, too
```

- **Without it**, `assets/` is what it is in 0.1: a binary file or one over 1 MiB is left alone (`kept-skipped`), and no version holds it; a folder without assets has the same tree either way. A reader of versions without it reads a pointer as a kept file holding the pointer's text, as it reads any leaf at no record's place; a store that keeps assets refuses that text back under `assets/`.
- **With it**, every file of `assets/` is held as bytes (`folderAssets`): one whose name is not its bytes' SHA-256 and a kind's extension, one in a folder there, one of another kind and one over 64 MiB are no assets, reported and left alone, never in a version (XV.2 and 4). A version's tree holds each asset's pointer, and its root commits to the bytes (XV.3). `readVersion` and `filesOfTree` check each pointer (`asset-pointer`) and keep it out of the files.
- **Push, clone, pull** (XV.6): `pushVersion` asks the store which bytes it holds (`assets/has`), refuses before sending anything when one is larger than the store takes (`asset-too-large`, the store's `limits.assetBytes`), sends the rest (`PUT assets/<sha256>`), then the objects and the ref; a store refuses a ref that would name bytes it lacks (`store-asset-missing`, 409, with the assets). `clone` and `pull` fetch every asset of the version they write, each checked by its SHA-256 and length, before they write anything (`asset-missing`, `asset-mismatch`). A pull's merge keeps the assets added on either side and drops one removed on a side, never one the merged model names (`asset-removed`, XV.3, rule 7). The remote keeps the choice (`"assets": true` in `.eik/remotes.json`), so its next push, pull and status carry the assets too.
- **Withheld** (XV.7): an asset the store has let go is reported, and no file is written for it; the remote keeps its pointer (`withheld`), so the folder's versions keep it.
- **A later version's kind** (XV.4, rule 3): a pointer of a kind this version does not know (`readPointer` gives it `known: false`) is neither fetched nor written by a clone or a pull, as a writer of 0.2 writes no such asset; the remote keeps its pointer (`later`, checked to be a pointer at its name when it is read), and the folder's next push and status write it back unchanged. `openeik pull` without a remote writes none either, and says how many it left.
- **Not here:** the single-file form, which carries no asset (XV.9.1), large meshes (a later kind), and checking what a Part XIV member names against the assets present beyond what the proposal drawings checks.

**A door's and a window's own body**, [Part IV, 4.3.1](https://openeik.org/spec/0.2/compiler#4.3.1), of 0.2 (in 0.1 the proposal `frames`): its frame, its leaves or sashes in their grid and its glass, closed, from its type's `openingFamily` or `windowFamily`, as open question 71 decided on 26 October 2026. It adds no file and no member: the sizes are those of 0.1's families.

```js
compileModel(model, { proposals: ["frames"] });   // each door's and window's frame, sash, leaf and glass bodies, each naming its part
ifcOfModel(model, { proposals: ["frames"] });     // written as its body, a shape aspect and a material constituent per part
```

- **Without it**, a door's or a window's own body is reference behaviour, as in 0.1: the compiler gives it none, and the bridge writes the box of its opening, which its fidelity report calls approximated. Nothing else changes: on the reference implementation's seven examples and this repository's, every print and every compiled result is the same, byte for byte, with the other proposals or without them.
- **With it**, the compiler gives each door and window whose type has a family a body per part (`part`: `frame`, `sash`, `leaf`, `glass`), in its wall, and a `volume` quantity (`IV.4.3.1`); a family whose sizes leave no room has none, and a `frames-fit` warning says why. A door or a window whose type has neither family keeps its body reference behaviour. A declared envelope stands in place of its bodies (IV.11.1). The bridge writes the parts as its body, each an IfcShapeAspect, its material an IfcMaterialConstituentSet, the glass styled as glass; its operation type stays on its type, and it no longer calls it approximated. `checkFolder` and `checkModel` hold a door family's `leafMaterial` to its schema (`wood`, `aluminium`, `steel`; rule 14), so that it is no unknown member, and warn of it on a family of another kind (`leaf-material`).
- **Profiles** (rule 15): a family's `frameProfile`, `mullionProfile` and `sashProfile` (a `windowFamily`'s `frameProfile` and `mullionProfile`), each an outline of a `custom` section (Part II, 5.2) whose bounding box is the width by the depth of the members it shapes. With one, the compiler gives each member it shapes as a `sweep` of that section: the frame's and a sash's members the ring round their outline, mitred at the corners (`cuts`), a door's jambs square on its bottom, and each mullion and transom as wide as `mullionWidth` from end to end; a mullion of its own width, and a shaped opening's mullions and sashes, keep their boxes. The volume is exact, each member's area along the line through its centroid. A profile that breaks Part II, 5.2's rules of an outline, whose box is not its members', or on a frame that follows its wall is an error at the type (`frames-profile`), and the compiler gives such a door or window no body of its own (`familyProfiles`, `PROFILES`, `PROFILE_SCHEMA`).
- **Against the reference** (`test/fixtures/frames-bodies.json`, from `tools/frames-reference.mjs`): a probe of 18 doors and windows of every kind, each part's volume and box; a window's parts and every frame agree exactly, and a leaf within the clearances 4.3.1 leaves to the product (8 mm in its box, 2 % in its volume).

**A stair's numbers and layout**, [Part IV, 7.3](https://openeik.org/spec/0.2/compiler#7.3), of 0.2 (in 0.1 the proposal `stairs`): every straight stair's, and every L's and U's with a landing, risers, going, location line, treads, nosing lines and landings, and a cast concrete stair's flights and landings, as open question 76 decided on 26 October 2026. It adds no file and no member.

```js
compileModel(model, { proposals: ["stairs"] });   // result.stairs: each stair's numbers, flights (treads, nosings) and landings; a concrete stair's bodies
ifcOfModel(model, { proposals: ["stairs"] });     // a concrete stair's IfcStairFlights and IfcSlab (LANDING) by rule
```

- **Without it**, stair runs and landings are reference behaviour, as in 0.1: the compiler lays out nothing, and the bridge writes its stand-ins, which its fidelity report calls approximated. Nothing else changes: on the reference implementation's seven examples and this repository's, every print and every compiled result is the same, byte for byte, with the other proposals or without them.
- **With it**, the compiler's result has `stairs`, one entry per straight, L or U stair it lays out: its `numbers` (risers, riser height, going, treads, width, base and top), its `flights`, each with its treads (numbered from 1 up the stair, each its plan outline, its top and its nosing line, from left to right looking up), and its `landings` (outline and top). A cast concrete stair (`construction` `concreteCast`) has its bodies too: each flight its steps down to its soffit, named `part` `flight` and `piece` `flight:<k>`, and each landing a slab, `landing` and `landing:<k>`, and a `volume` quantity (`IV.7.3.6`). A stair it cannot lay out has none, and a `stairs-layout` warning says why; another construction's parts, winders, spiral and helical stairs and `repeatOf` are reference behaviour. The bridge writes a concrete stair's flights and landing as its parts, named and numbered as its stand-ins were, and no longer calls them approximated; another construction's stays approximated. `checkFolder` warns of a stair it cannot lay out.
- **Against the reference** (`test/fixtures/stairs.json`, from `tools/stairs-reference.mjs`): a probe of eight stairs, every number, tread, nosing line and landing, and every concrete flight's and landing's volume and box, exactly.

**A framed wall layer's members, a roof's trusses and a floor's joists**, [Part IV, 7.4](https://openeik.org/spec/0.2/compiler#7.4), of 0.2 (in 0.1 the proposal `framingLayout`): the plates, studs, end and corner studs, a T's backing, each opening's jacks, kings, headers, sill and cripples, the noggings, battens and heel members of each layer of a wall whose type gives it a `framing` rule; each roof's truss layout, its trusses, a roof opening's trimmers, headers and dormer rafters, a ridge beam and its posts, and the walls it bears on; and each floor's joists, trimmers, rim joists, headers and blocking, as open question 83, part 2, decided on 29 October 2026. It adds one member, a horizontal rule's `battens` (`service`, `nailing` or `counter`), and no file.

```js
compileModel(model, { proposals: ["framingLayout"] });   // result.framingLayout: each framed wall's layers, roof's trusses and floor's joists, each member with its bodies
ifcOfModel(model, { proposals: ["framingLayout"] });     // each member under its wall, roof or floor, keyed framing:<id>; each truss an IfcElementAssembly TRUSS
```

- **Without it**, timber framing is reference behaviour, as in 0.1: the compiler lays out nothing, and the bridge writes the members an application gives (`bodies`), or none. Nothing else changes: this repository's examples print the same, byte for byte, with the other proposals or without them.
- **With it**, the compiler's result has `framingLayout`, one entry per framed wall: its `layers`, each its top's `mode` (`raking`, `levelPlate` or `underFloor`) and its `members`, each with its `id` (`<wall>:<layer>:<role>:<key>`), `role`, IFC `class`, `predefined` and `objectType`, `name`, `section`, `material`, `length`, `line`, its `outline` in the layer's elevation and the `across` it lies between, its `volume` and its `bodies` (prisms, cut by the faces the layer is cut by); and the records it comes from (`sources`). It finds the corners and tees it needs by Part IV, 7.4.2 (`compile-framing-joins.js`), and changes no wall's own body. Each roof with a `trussLayout` has an entry too (`compile-framing-roofs.js`, Part IV, 7.4.13): its `trusses`, each with its `id` (`<roof>:truss:<key>`), `mark`, `name`, `position`, its line from `a` to `b` at its bearing plane (`elevation`), its `span`, the `parameters` it gives its family, its `bearings` and its `seat` on each side; its `connections`, an anchor pair where a truss rests and a hanger where a hip truss or a jack hangs; and its `members`, each truss's family parts (`truss`, keyed `<truss id>:<part id>`) and the headers, dormer rafters, ridge beam and posts, each a box of eight corners. The walls a layout bears on are laid out with its trusses (7.4.14): studs under them (`alignToTrusses`), their bottom chords across a batten layer, the heel zone they hold, the heel plate at their seat, and a ridge beam's pocket and post in a gable. Each floor whose type has a layer's `joists` has an entry (`compile-framing-floors.js`, 7.4.15): its `joists` (its layer, the joists' `direction`, the layer's `z`, its `bearings` and the `posts` through it) and its `layers`, whose members are its joists, trimmers, rim joists, headers and blocking. A layout of two sides frames its hip ends (`compile-framing-hips.js`, 7.4.16): a girder of plies where the ridge ends, hip trusses of plies up the hip lines and jacks square to the end and the sides, or a girder along a short ridge with half trusses hanging on it, the hip trusses and jacks of the layout's jack family and the girder along the ridge of its flat-top family, both made of its own family where the model holds none (`<family type>-jack`, `-flat`); each such truss has its `role` (`girder`, `hip`, `jack`), its `family` (`jack`, `flatTop`), its `hipEnd` and its `ply`. A wall whose members, or a roof whose trusses, are materialised is not laid out (`framing-layout-materialised`); a top, a floor, a rule, a truss layout or a joist rule it cannot take is said (`framing-layout-top`, `framing-layout-floor`, `framing-layout-rule`, `framing-layout-roof`, `framing-layout-joists`), and what a layout says is an info (`framing-layout-note`). The bridge writes each member under its wall, roof or floor (IfcRelAggregates), keyed and typed as the reference bridge keys them, its material `Timber <material>` (a nail plate's steel); each truss as an IfcElementAssembly TRUSS with its members under it; each anchor pair as an IfcMechanicalFastener without a body, connecting its truss to its wall, and each hanger as an IfcMechanicalFastener HANGER that connects no element; and no longer writes a given member of a wall, roof or floor it lays out. `checkFolder` holds `battens` and a roof opening's `header` to their schemas and warns of a rule, a truss layout, a model's own jack or flat-top family or a joist rule that cannot be laid out as it stands (`framing-layout-rule`, `framing-layout-roof`, `framing-layout-joists`).
- **Against the reference** (`test/fixtures/framing-layout.json`, from `tools/framing-layout-reference.mjs`): a probe of 22 walls and 715 members, every id, name, section, class, outline, length, box and volume exactly, but one top plate whose volume the reference counts with a cap twice. On the reference implementation's garage, guesthouse and villa (29 October 2026, its `main` `f2bc53d2`), all 856 members exactly, and the same GlobalIds, classes, names and tags in the print. Truss layouts and joists (`test/fixtures/framing-roofs.json`, from `tools/framing-roofs-reference.mjs`): a probe of five roofs and two floors, 745 members of walls, roofs and floors, 43 trusses and 82 anchor pairs, exactly; on its garage, second version, and its villa's frame, all 360 and 821 framing members, 11 and 38 trusses and 22 and 65 anchor pairs, with the same GlobalIds, classes, names and tags in the print, but for nine top plates of the villa frame's gables, whose volume the reference counts with a cap twice. Hip ends (`test/fixtures/framing-hips.json`, from `tools/framing-hips-reference.mjs`, none of the reference's examples having one): a probe of nine hipped roofs, 272 trusses, 2049 members of roofs and walls and 533 anchor pairs and hangers, exactly, with the same GlobalIds, classes, names, tags and object types in the print. A truss, a ridge beam, a ridge post and an anchor pair are named in English (`Truss T3`, `Hip truss H1 (ply 2)`, `Jack truss J3`, `Truss T1 (girder, along the ridge)`, `ridge beam`, `ridge post`, `Truss clip pair`), as the steward decided on 30 October 2026; the reference's fixtures hold its Swedish words, and the tests compare names with them put into the rules' English one for one (`test/support/reference-names.mjs`).

**A layer's grain and an element's main direction**, [Part II, 5.1.1](https://openeik.org/spec/0.2/language#5.1.1), of 0.2 (in 0.1 the proposal `grain`), as open question 90 decided on 28 October 2026: a layer of a slab, wall, roof, ceiling or foundation type may carry `grain`, `"along"` or `"across"` the element's main direction; a slab's, a ceiling's or a foundation's main direction runs square to its panels' `direction`, or is its `mainDirection` where it has no panels; a wall's is `"vertical"` (the default) or `"horizontal"`; a roof's is each face's fall line, or its `mainDirection` projected onto the face. It adds two members and no file.

```js
checkModel(model, { proposals: ["grain"] });          // the members held to schemas/proposed/grain/, and main-direction
mainDirectionOf(element);                             // degrees in plan (0 up to 180), "vertical" or "horizontal", or undefined
mainDirectionOf(roof, { edgeId: "roof-a:edge:1" });   // a roof's face: its mainDirection, else that edge's fall line
```

- **Without it**, both are members a schema of 0.1 does not know: kept, and warned of (`member-unknown`).
- **With it**, a layer's `grain` and an element's `mainDirection` are held to their schemas, a value of the wrong kind a `schema-invalid` error at its place; a slab's, a ceiling's or a foundation's `mainDirection` more than 0.01° off square to its panels' `direction` (modulo 180), and `mainDirection` on any other category but a roof's or a wall's, are errors (`main-direction`). The grain changes no body: the compiler and the bridge read neither member.

**The reference implementation's members that 0.2 takes**, [Part II, 14](https://openeik.org/spec/0.2/language#14), with Part II, 4, rule 4 and 7, Part IV, 4.6, rules 12 to 14, and Part I, 11.5, of 0.2 (in 0.1 the proposal `adopted`), as open question 115 decided on 30 October 2026: an element's `castWith` and a slab edge element's `notches`; a layer's `drawing`, a terminal type's `tagSize` and the cut pattern `clt`; a view's `display.electrical`, `display.levelLabels`, `display.sideMarks`, `assembly.pitch`, `lineWeights` and `camera`; a detail item's `cloud`, `schedule.headings`, `legend.title`, `buildUp`, `follows`, `cutBy` and `notDimension`; a detail family's `insertion`; and the reference of a bolt group's `bolts.through`. It adds these members and no file. Their schemas, `schemas/0.2/adopted/`, are generated from the reference implementation's, as 0.1's are, and the proposal's index names them (`adoptedMembers` finds them in a record).

```js
checkModel(model, { proposals: ["adopted"] });     // the members held to their schemas, clt taken, the references followed, the rules checked
compileModel(model, { proposals: ["adopted"] });   // a slab edge element's notches cut, its host's chamfer fill along its whole stretches
ifcOfModel(model, { proposals: ["adopted"] });     // the notched bodies printed
applyCommands(model, [move], { proposals: ["adopted"] });  // copy.move moves and turns the 2D items that follow the instance
unprefixedMembers(view, "views");                  // the reference implementation's own members without their prefix (Part I, 11.5)
```

- **Without it**, the members are members a schema of 0.1 does not know: kept, and warned of (`member-unknown`); `clt` is a value 0.1's schemas refuse (`schema-invalid`); a bolt group's `through` is followed by no check; the compiler builds a notched slab edge element whole, and notes its notches as reference behaviour (`not-derived`).
- **With it**, each member is held to its schema in a folder and in the single-file form; `clt` is taken in a material's and a layer's `pattern`; a member on a category it does not belong to is an error (`adopted-category`: `notches` on any element but a slab edge element), and on a view or a detail item of a kind it means nothing on a warning (`adopted-kind`), but `notDimension` on an item that is no text, an error (`not-dimension`); a bolt group's `through` that names no element is an error (`ref-missing`), and a `castWith`, a layer's family, a build-up's type, a `follows` or a `cutBy` that names nothing a warning (`ref-dangling`); and the rules a schema cannot state are checked: `notch-invalid`, `cast-with`, `layer-drawing`, `camera-points`, `follows-free`, `build-up-type`, `insertion-parameter`. The reference implementation's own members of Part I, 11.5's table, without their prefix, are each a `member-unprefixed` warning that names the extension member it stands for, in place of a `member-unknown`.
- **The compiler** cuts a slab edge element's notches (Part IV, 4.6, rules 12 to 14): its outside upstand and its facing stretch by stretch, its chamfer on its whole stretches alone, and its host's chamfer fill along them; notches rule 12 does not allow are not cut (`edge-notches`). The bridge prints the bodies the compiler gives.
- **The command processor**: `copy.move` moves and turns the plans' free 2D items that follow the instance, and `copy.remove`, `copy.unique` and `original.dissolve` let the items that followed what went follow nothing, and take it out of the regions it cut (Part II, 14.4, rules 6 and 7).
- **Against the reference** (`test/fixtures/notched-edges.json`, from `tools/notches-reference.mjs`): a probe of four notched slab edge elements, an L and a U with chamfers, mitred and square ends, a facing and a flipped element, and their host, every body's volume and box exactly.

**A framing family's parts**, [Part IV, 6.6](https://openeik.org/spec/0.2/compiler#6.6), of 0.2 (in 0.1 the proposal `framing`), as open question 83 decided on 26 October 2026 and amended on 29 October 2026, with no stand-in: a beam's or a slab edge element's framing family (Part II, 5.4) evaluated with the element's parameters, and each part that exists outlined in the family's plane, cut by its cuts, its tail and the parts it is joined to, and carried across the plane by its width. It adds no file and no member.

```js
compileModel(model, { proposals: ["framing"] });  // each family's parts' bodies, by part (and member), and the element's volume
ifcOfModel(model, { proposals: ["framing"] });    // a truss's members as IfcMember, IfcBeam, IfcColumn or IfcPlate under its IfcBeam
checkModel(model, { proposals: ["framing"] });    // framing-expression and framing-part: a family that cannot be evaluated or built
```

- **Without it**, a framing family's body is reference behaviour, as in 0.1: the compiler derives none (`framing-family`, `edge-family`) and the bridge leaves the element out, or writes the bodies an application gives. Nothing else changes: on the reference implementation's seven examples and this repository's, every print and every compiled result is the same, byte for byte, with the other proposals or without them.
- **With it**, the compiler gives each piece of each part that exists a closed body (`polyhedron`, or `mesh` where its outline is not convex) named by its part's id (`part`), and the element a `volume` quantity (`IV.6.6.12`). Where the family has a `member` part or a plate that exists, each part is a member of the element, its bodies tagged `member` as the derived layer tags a framing member (Part IV, 1.1.1): `{id: "<element id>:<part id>", class, predefined, objectType?, name, section}`, its class by its role. A family that cannot be evaluated (`framing-expression`) or built (`framing-part`) gives no body, and an error says why; nothing stands in for it. A beam's joins, connection and holes do not cut its parts (`not-derived`). The bridge writes a family of profiles as the element's own body, each part an IfcShapeAspect with a material constituent of its own; and a family with members as its element's product (an IfcBeam, or a slab edge element's IfcBuildingElementProxy) without a body of its own, its parts under it (IfcRelAggregates), each placed in its placement and keyed `framing:<element id>:<part id>`, typed by class, predefined type and section, a nail plate of steel. `checkFolder` and `checkModel` report, as errors, a family that cannot be evaluated or built, from the records alone.
- **Against the reference** (`test/fixtures/framing-bodies.json`, from `tools/framing-reference.mjs`): a probe of every feature of the language, each part's volume and box, exactly; and the reference implementation's own bodies of its villa's 117 imported rafters (129 parts) and its guesthouse's 78 trusses and rafters (326 parts), exactly, part by part, in count, name, volume and box.
- **Its reference line** ([Part IV, 6.5.1](https://openeik.org/spec/0.2/compiler#6.5.1), open question 10): with the proposal, a family's beam's `reference` in `lines` runs from `(P0, z0 + height/2)` to `(P1, z0 + endRise + height/2)`, the middle of its height over its set-out line, and its `axis` stays `null`: it has no single axis, an analysis taking each `member` part as a member of its own. Without it, both are `null`.

**Reading IFC**, [Part VIII, 2](https://openeik.org/spec/0.2/bridges#2), of 0.2 (in 0.1 the proposal `ifc-read`), as open question 95 decided on 29 October 2026: an element whose shape is the body its reader gave, `shape: "given"`, and the predefined type and the user-defined type an object was read with, `ifcSource.predefinedType` and `objectType`. It adds those members and no file; `eikOfIfc` writes them ([Reading IFC](#reading-ifc)).

```js
const { model, bodies, report } = await eikOfIfc(text);              // records, given bodies and the fidelity report
checkModel(model, { proposals: ["ifc-read"] });                       // the members held to schemas/proposed/ifc-read/
compileModel(model, { proposals: ["ifc-read"] });                     // no body from a given shape's members (given-shape)
ifcOfModel(model, { bodies, proposals: ["ifc-read"] });               // the given bodies, as the classes they were read with
```

- **Without it**, `shape` and the two members of `ifcSource` are members a schema of 0.1 does not know: kept, and warned of (`member-unknown`); and the compiler and the bridge derive bodies from the members that place the element, which are no shape.
- **With it**, they are held to their schemas; an element whose shape is given is held to its category's schema and its references, and to none of the rules that place a body or size one (a door's fit in its wall among them); the compiler derives no body from it and cuts nothing with it (`given-shape`, info); and the bridge prints its given body, as the class and the predefined type it was read with, where the class is one it writes, and no opening for it.
**The site**, [Part II, 2.2](https://openeik.org/spec/0.2/language#2.2), of 0.2 (in 0.1 the proposal `site`), as open questions 44 and 79 decided on 22 and 26 October 2026: a project's `site` may give `trueNorth` alone, which way north is without where the site lies; its `latitude`, `longitude` and `timeZone` are its location, given together or not at all, and with `trueNorth`; and with its location it may name its coordinate reference systems by their EPSG codes, `crs`, `{horizontal, vertical?}` (`"EPSG:3006"`, `"EPSG:5613"`), which the bridge projects into ([Part VIII, 1.7](https://openeik.org/spec/0.2/bridges#1.7)). It adds one member and no file.

```js
checkModel(model, { proposals: ["site"] });   // the project's site held to schemas/proposed/site/site.schema.json
ifcOfModel(model, { proposals: ["site"] });   // an IfcMapConversion into the system site.crs names, where the bridge projects it
siteCrs(site);                                // {horizontal: 3006, vertical: "EPSG:5613"}, or undefined
```

- **Without it**, a site gives all four members, as 0.1's project schema asks: a site of `trueNorth` alone is a `schema-invalid` error at `/project/site`, and `crs` a member the schema does not know (`member-unknown`), which the bridge does not read.
- **With it**, the validator holds a project's site to the proposal's schema in place of 0.1's (`project/project.json` and the single-file form alike): `{trueNorth}`, or all four; part of the location, or the location without `trueNorth`, is a `schema-invalid` error at `/project/site`, and so is a `crs` without the latitude and the longitude or with a code not of the form `EPSG:<number>`. The bridge writes true north in its context, and no latitude or longitude where the site gives none, with the proposal or without it; with it, where its caller names no system (`crs`, which goes first), it writes the IfcMapConversion the site's `crs` names, for the systems it projects (`KNOWN_CRS`), and for any other says in its report that it writes none.
- **The command processor** holds the site of `project.site`, and its `expectedSite`, to the schema the validator holds the project's site to: with it `{trueNorth}` or all four, and `crs` known; without it, 0.1's four members.

**A hosted railing's profile**, [Part II, 12.2.1](https://openeik.org/spec/0.2/language#12.2.1), of 0.2 (in 0.1 the proposal `railings`), as open question 18 decided on 21 and 24 October 2026: the line of a railing on the outline of a slab or a shaft, on a wall's top or along a slab edge element is derived, and its `profile`, the writer's copy 0.1 asks for, is deprecated and may be left out; a railing on a stair keeps its copy. It adds no file and no member.

```js
checkModel(model, { proposals: ["railings"] });   // a hosted railing on no stair without a profile; railing-profile where it has one
```

- **Without it**, every railing carries a `profile` (0.1's element schema), and a hosted railing's is its writer's copy (Part II, 12.2, rule 4).
- **With it**, a railing that names a host and no `railing.side` need not carry a profile; the profile of one on an outline, a wall's top or a slab edge element is a warning (`railing-profile`). The compiler and the bridge derive such a railing's line from its host with the proposal or without it, and read no profile for it. The command processor writes none: such a railing's level and offset follow its host, a profile a command sends is left out with a warning, and a railing whose host's outline changes is not written again.

**Provisions for voids**, [Part II, 6.10](https://openeik.org/spec/0.2/language#6.10) and [Part VIII, 1.10](https://openeik.org/spec/0.2/bridges#1.10), of 0.2 (in 0.1 the proposal `provision`), as the steward decided on 30 October 2026 (open questions, section 4, D9): a void that a run asks of an element it crosses, an element of the category `provision` that carries `provision`, its host, its frame (`axis`, `up`), its `depth`, whether it is `round`, the runs it is for and its host's owner's `answer`, `cut` with what the cut made or `declined` with a sentence. It adds a category and its member, and no file.

```js
checkModel(model, { proposals: ["provision"] });   // provision-frame, provision-host, provision-run, provision-cut
compileModel(model, { proposals: ["provision"] }); // each provision's body, the void asked for
ifcOfModel(model, { proposals: ["provision"] });   // an IfcBuildingElementProxy PROVISIONFORVOID with its property set
```

- **Without it**, a provision is an element of a category 0.1 does not know: kept, checked against the common schema only, with a warning (`category-unknown`), and given no body and no IFC object.
- **With it**, a provision and its type are held to `schemas/0.2/provision/`, and `checkFolder` and `checkModel` report a frame that is no frame (`provision-frame`), a host that is no wall, slab, foundation, ceiling, roof, beam or column (`provision-host`), a run that is no pipe, duct or cable carrier (`provision-run`), and a cut that names a recess its host does not have or an element that is not in the model (`provision-cut`); a host or a run that is not there is a reference that does not resolve (`ref-dangling`). The compiler gives each provision its body (`provisionBody`): a box of its width along across, `up` × `axis`, by its height along `up`, or a rod of its width, its depth along its axis, centred on its point at its level plus its offset; it cuts nothing and has no quantities, and a clash check leaves it out. The bridge writes it as an IfcBuildingElementProxy whose type carries PROVISIONFORVOID, with IFC4's `Pset_BuildingElementProxyProvisionForVoid` (`Shape`, `Width` and `Height` or `Diameter`, `Depth`, `System`), and no opening. In the owners' layout (Part III, 4.4) a provision is its asker's: the owner of the run its `forIds` names first, else `setup`. The command processor (`applyCommands` with a model of 0.2, or of 0.1 with `{ proposals: ["provision"] }`) makes and changes provisions and their types (Part II, 6.10, rule 8), refuses a host or a run of another category (`provision-host`, `provision-run`), and keeps a provision whose host is deleted, with the whole model's warning.

**Declared geometry's nominal sizes, and a stair kit's and a prefabricated wall's frame**, [Part II, 12.1.1](https://openeik.org/spec/0.2/language#12.1.1), of 0.2 (in 0.1 the proposal `declared`), as open question 17 decided on 21 October 2026: the sizes a type sets stay its nominal sizes, whatever its declared envelope says; a stair's type's declaration is placed at the stair's start, x up its first run, and a wall's type's at its baseline's first point, x along it, each y to the left and z up from the base. It adds no file and no member.

```js
checkModel(model, { proposals: ["declared"] });     // declared-size where a type's width or height is off its envelope
compileModel(model, { proposals: ["declared"] });   // a stair kit's and a prefabricated wall's envelope placed on its elements
```

- **Without it**, a declaration on a stair's or a wall's type is kept, not placed (`declared-frame`), and nothing is said of a type's sizes against its envelope.
- **With it**, a type that sets its elements' sizes (Part II, 5.3) and declares an envelope is warned of where its `width` or `height` differs from the envelope's extent along x or z by more than the tolerance for `envelope`, its own or the default (`declared-size`); a stair's and a wall's type's declaration is placed in its frame, its envelope standing for the element's bodies, and its volume the space it takes.

**Components' families deprecated at 0.2**, [Part II, 5](https://openeik.org/spec/0.2/language#5), of 0.2 (in 0.1 the proposal `components`), as open question 73 decided: the families `toilet` and `basin` are deprecated, a terminal of the kind `wc` or `washbasin` standing for each. With the proposal, `checkFolder` and `checkModel` warn about each such component type (`component-retired`). The frames and bodies question 73 makes class-A rules are not written yet (open questions, 99).

**A component's frame and its bodies**, [Part IV, 7.6](https://openeik.org/spec/0.2/compiler#7.6), of 0.2 (in 0.1 with the same proposal), as open questions 73 and 99 decided: every component's frame, its `axes` whatever its family, else its profile in plan, flipped to the right, a plate on a column on its centre at its top, a cast-in item at each item of its row on its wall by `insertAt`; and its bodies that are boxes and prisms. With the proposal, `compileModel` gives a timber section its box, a plate its outline less its holes (a level prism, or convex pieces stood on its edge or in its own axes; its holes' circles in 16 pieces as the reference draws them, its volume exact), a weld its fillet, a bolt group each bolt's shank, a cylinder of its diameter from z = 0 to its `grip` (a rod in axes of its own), and a cast-in item its block or its bar at each item, each element its `volume` (`IV.7.6`); it says what stays reference behaviour (`not-derived`: a bolt's head, washers and nut, the holes bolts drill, a bracket's or a hanger's legs, a lattice tie, a conduit, a recess, a void form), and gives a component that has no frame no body (`component-frame`), which `checkFolder` and `checkModel` warn of too. `ifcOfModel` writes plates, bolt groups, welds and the others by rule, by their classes, and a given body over a bolt group or a drilled plate. Against the reference (`test/fixtures/components-bodies.json`, from `tools/components-reference.mjs`): 25 probe components, plates, timber sections, welds and cast-in items exactly in volume and box, each shank across as the reference's and along within it; a timber section in axes of its own differs, as question 99 decided (`componentFrame`, `castInItems`, `componentBodies`, `holeRing` and `HOLE_SIDES` in `src/compile-components.js`, also the package's).

**Classification references**, [Part II, 11](https://openeik.org/spec/0.2/language#11), of 0.2 (in 0.1 the proposal `classifications`), as open questions 4 and 86 decided: any record may carry `classifications`, references `{system, code, edition?, uri?}` to codes of systems OpenEik does not list, at its top (the project in its `project`, a level, any record of a record list). It adds one member and no file.

```js
checkModel(model, { proposals: ["classifications"] });   // each record's classifications held to its schema
ifcOfModel(model, { proposals: ["classifications"] });   // an IfcClassificationReference for each reference (Part VIII, 1.8)
classificationsOf(record);                               // its references of the form rule 2 gives, each once
```

- **Without it**, `classifications` is a member a schema of 0.1 does not know: kept, and warned of (`member-unknown`); the bridge does not read it.
- **With it**, each record's `classifications` is held to `schemas/proposed/classifications/classifications.schema.json`, a breach a `schema-invalid` error at its place (an empty list, a reference without a system or a code, a `uri` that is not absolute, one reference twice); a member a reference does not define is a `member-unknown` warning. No system or code is checked against a list. The bridge writes one IfcClassification per system and edition, one IfcClassificationReference per reference and an IfcRelAssociatesClassification relating it to the products, spaces, IFC types, project and storeys whose records carry it; the references of a record it writes no object for (a view, a grid, an unused type, a material) are named in its report's `leftOut`.

**A member between two points**, [Part II, 6.2.1](https://openeik.org/spec/0.2/language#6.2.1) and [Part IV, 6.7](https://openeik.org/spec/0.2/compiler#6.7), of 0.2 (in 0.1 the proposal `member`), as open question 110 decided on 30 October 2026: the category `member`, in `structure`, for a brace, a strut, a tie or a truss's member, neither a beam nor a column. Its profile's two points, at its `levelId` and `offset` and at its `end`'s (`{levelId, offset}`), are the ends of its reference line, the line through the middle of its section; they may be one point in plan, so that it stands plumb. It takes a beam's section, `roll`, `taper` and `joins`.

```js
checkModel(model, { proposals: ["member"] });     // held to schemas/0.2/member/; member-length, member-plumb
compileModel(model, { proposals: ["member"] });   // its section swept along its line, its line and axis in result.lines
ifcOfModel(model, { proposals: ["member"] });     // an IfcMember, NOTDEFINED, its section an IfcMaterialProfileSet on its type
memberLine(element, (levelId) => elevation);      // its ends, its length, its direction and whether it is plumb
memberFrame(line, roll);                          // its section's x and v, before and after its roll
```

- **Without it**, `member` is a category this package does not know: kept, checked against the common schema, given no body, and left out of a print.
- **With it**, a member's element and type are held to their schemas and filed in `structure`; its two ends lie 10 mm apart or more (`member-length`), its `end.levelId` names a level (`ref-missing`), and plan points under 1 mm apart but not one point are a warning (`member-plumb`). The compiler sweeps its section along its line, centred on it: `x` the left normal of its plan direction, or the model's x where it is plumb, `v = t × x`, both turned right-handed about the line by its `roll`; a taper is centred on the line; its joins, its axis, its volume and its length are a beam's. A beam and a column are read as before. Extension members, as an analysis application's own, are kept on it as on any record. The command processor (`applyCommands` with a model of 0.2, or of 0.1 with `{ proposals: ["member"] }`) makes and changes members and their types (Part II, 6.2.1, rule 9): it refuses an `end` on no level (`ref-missing`) and a height other than its section's depth (`type-size`), and a `level.delete` with `moveTo` moves an end on the level, keeping its height.

**A slab on a sloped plane**, [Part II, 6.3.1](https://openeik.org/spec/0.2/language#6.3.1) and [Part IV, 4.2.1](https://openeik.org/spec/0.2/compiler#4.2.1), of 0.2 (in 0.1 the proposal `slopedSlab`), as open question 111 decided on 30 October 2026: a slab may carry `plane`, the plane of its top, as `slope` (degrees) or `rise` over `run`, rising from an edge `edgeId` into its outline, or falling along `fall` (degrees in plan) from its profile's first point, at its level plus its offset. It adds one member and no file.

```js
checkModel(model, { proposals: ["slopedSlab"] });     // plane held to its schema; slab-plane, slab-plane-edge
compileModel(model, { proposals: ["slopedSlab"] });   // each layer between the plane lowered by its depths square to it
slabPlane(slab, elevation + offset);                  // its top as z0 + gx·x + gy·y, its slope, its fall and k
```

- **Without it**, `plane` is a member a schema of 0.1 does not know: kept, warned of, and the slab is level.
- **With it**, `plane` is held to `schemas/0.2/slopedSlab/plane.schema.json`; `plane` on another category, an `edgeId` that names no edge, and a `rise` over `run` over 75° are errors (`slab-plane`), and so is a slab edge element on a slab whose plane slopes (`slab-plane-edge`). The compiler builds each layer as a prism of the outline between the plane lowered by its depths measured square to it, its edges plumb and its voids cut plumb, with a `slopedArea` beside its `area` in plan; an attached column base or wall top, a railing on its outline and, with the proposal `rooms`, a room's ceiling read the plane; with `framingLayout` it has no joists and bears no framed wall. The bridge writes it as an IfcSlab whose layers' bodies lie between the planes.

**A room's boundary, ceiling and quantities**, [Part IV, 7.5](https://openeik.org/spec/0.2/compiler#7.5), of 0.2 (in 0.1 the proposal `rooms`), as open question 72 decided on 26 October 2026: a room placed by a point is bounded by the face of its level's plan that holds its point, its walls joined as Part IV, 7.4.2 joins them and a roof that comes down through its floor among what bounds it, its holes the walls and columns that stand free in it; its ceiling is its own height, the undersides of the slabs, ceilings and roofs over it, the next storey, or its element's height; and it measures what IFC's `Qto_SpaceBaseQuantities` names. It adds no file and no member.

```js
compileModel(model, { proposals: ["rooms"] });   // result.rooms: each room's boundary, ceiling, edges, openings and volume; its quantities
ifcOfModel(model, { proposals: ["rooms"] });     // an IfcSpace for every room with a boundary, its volume its body, its eight base quantities
checkModel(model, { proposals: ["rooms"] });     // rooms-enclosed, rooms-shared
```

- **Without it**, room boundaries are reference behaviour, as in 0.1: the compiler finds none, and the bridge writes an `IfcSpace` only for a room drawn by hand, its outline up to its height, which its fidelity report calls approximated where the height is the element's. Nothing else changes: on the reference implementation's examples and this repository's, every print and every compiled result is the same, byte for byte, with the other proposals or without them.
- **With it**, the compiler's result has `rooms`, one entry per room with a boundary (`compile-rooms.js`): its `boundary` (outer ring counter-clockwise, holes clockwise); its `ceiling`, where it comes from (`room`, `found`, `storey` or `height`) and its planes, a roof's over its extent (`over`) and the plane beyond the roofs (`beyond`); its `edges`, what each stretch of its boundary lies against (`wall`, `column`, `separator` or `open`, and the element); the doors and windows in its walls (`openings`); and its `volume`, prisms from its floor up to its ceiling. Its quantities are IFC's names, camel-cased: `height`, `grossPerimeter`, `netPerimeter`, `netFloorArea`, `grossWallArea`, `netWallArea`, `netCeilingArea` and `netVolume` (`IV.7.5.6`, `IV.7.5.7`). A room placed by a point in no closed face has no boundary (`rooms-enclosed`), and one in the face of a room whose id comes first in code-unit order neither (`rooms-shared`); a room under a barrel vault has its boundary, area and perimeter, and its ceiling is not derived (`not-derived`). The bridge writes an `IfcSpace` for every room with a boundary and a ceiling, its body its volume, with its eight base quantities; a room without one is left out, and the report says why; a room imported as an IfcSpace keeps its GlobalId and its imported property sets (VIII.1.5). `checkFolder` and `checkModel` warn of the same two (`rooms-enclosed`, `rooms-shared`).
- **Against the reference** (`test/fixtures/rooms.json`, from `tools/rooms-reference.mjs`): a probe of 14 rooms (a free-standing column, a room separator, a room on its line, two rooms in one face, an open room, a 20 mm joint, a wall that bounds no room and a high one, a room round the outer corner of two joined walls, a corner whose wall stops 125 mm short, a gable wall drawn by its outline, a gable roof over a room, a room drawn by hand beyond its eaves, a loft under a roof that comes down through its floor, the project's `openingMinArea`), and the 25 rooms of the reference's one example with rooms, each kept to what rooms read. 32 rooms agree exactly: boundary, area, perimeter, ceiling, height, walls, skirting, openings, ceiling area and volume. The other seven lie beside a room separator or a floor's edge, which 7.5 draws as a line and the reference as a strip 0.2 mm wide: each is larger by 0.1 mm along it, which the test checks to 10⁻⁷ m², and with strips in place of the lines the example's rooms agree to 10⁻⁹ m².

## Diagnostic codes

The rule is the specification's: `I.11.2.8` is Part I, 11.2, rule 8, and `SP.7.3.1` the security and privacy considerations, 7.3, rule 1.

| Code | Severity | Rule | What |
|---|---|---|---|
| `eik-missing` | error | I.9.2.5 | the folder has no `eik.json` |
| `eik-format-missing` | error | I.9.2.4 | `eik.json` has no `format` |
| `format-unsupported` | error | I.9.2.3 | `eik.json`, or a single-file model's `format`, names a format this package does not implement (it implements `openeik/0.1` and `openeik/0.2`, any pre-release); or a write would take a folder of 0.2 back to 0.1 |
| `schema-version-deprecated` | info | I.9.3 | a model of 0.2 gives `schemaVersion`, which 0.2 deprecates and does not read: its format is its version; a writer of 0.2 adds none, and a migrated model keeps its own until 1.0 removes it |
| `eik-assumed` | info | VI.2.2 | a version without `eik.json`, read as `openeik/0.1-draft` because its project has `schemaVersion` 1 |
| `file-missing` | error | III.12 | `project/project.json` or `project/levels.json` is missing |
| `json-invalid` | error | III.12.3 | a record file is not JSON |
| `json-too-deep` | error | III.12.3 | a file nests deeper than 256 levels of objects and arrays, the most this tool reads; in the single-file form, each file the model is written as (the project file, the levels, each record, each view and its chunks of detail items), so that what is written reads back and what reads is written. A record nests about ten, and the limit keeps every walk of the package far from the end of its stack. Refused, as a file that is not JSON is, naming the file and the member under which it nests too deep (`pointer`), never a crash: by the check, the reader, `versionTree`, `filesOfTree`, the writer, the command processor and the merge |
| `number-not-finite` | error | I.3.5 | a number that is not finite: `1e999` is valid JSON text, and JSON.parse reads it as Infinity. Refused where it is (`pointer`), as `NaN` is |
| `string-not-unicode` | error | SP.7.3.1 | a string or a member's name holds a lone surrogate: `"\ud800"` is valid JSON text, and JSON.parse reads it as half of a pair, which no UTF-8 text holds, nor the canonical form (RFC 8785; Part III, 6.1), so no record that holds one has a hash. Refused where it is (`pointer`), as a file that is not JSON is, as Security and privacy, 7.3, rule 1 asks a reader (a SHOULD: no rule of Parts I to III refuses it outright): by the check, the reader, `readModel`, `versionTree`, `filesOfTree` and the diff |
| `number-not-double` | error | SP.7.3.1 | a number that expresses more magnitude or precision than a double provides (RFC 7493, 2.2), by the test of Security and privacy, 7.3: beyond ±(2⁵³ − 1), where no reader can be expected to hold it exactly (`9007199254740993`, `1e16`; a value, as a check of a model given as one and the writer see it), or neither the double it reads as, rounded to as many significant digits as it is written with (either way at a tie), nor, however spelled, that double's shortest form (Part III, 5, rule 5): more precise than a double (`3.141592653589793238462643383279`, which reads as 3.141592653589793115997963468544 to its 31 digits) or nearer 0 than any double but 0 (`1E-400`, read as 0). `0.1`, `1.0`, `1e2` and `-0` pass, and so do `0.10000000000000001`, as C's `%.17g` writes 0.1, a double's exact value, however many digits it has, and the shortest form of 2⁻⁴⁴, `5.684341886080802e-14`, though that double rounded to its 16 digits is 5.684341886080801e-14. A number is named as it is written. `scripts/number-test.mjs` holds the scan to the test, computed exactly in Python, on some 270 000 literals. Refused where it is (`pointer`), as a file that is not JSON is: by the check, the reader, `readModel`, `versionTree`, `filesOfTree` and the diff; the writer writes no such value |
| `member-repeated` | error | SP.7.3.1 | an object of a model's file names a member twice, its escapes read (`"a"` and `"\u0061"`; RFC 7493, 2.3): JSON.parse reads the last and other readers the first, so two readers would read two records. Refused where it is (`pointer`), as a file that is not JSON is, by the same readers. Security and privacy, 7.3, rule 1 asks a reader to refuse it |
| `utf8-invalid` | error | III.12 | a model's file is not UTF-8: no text, which no reader can read, so every reader refuses it, with or without the whole-model check (Part III, 12; the stored form is UTF-8, 5, rule 1): a record or `eik.json` in a folder, a single-file model (`checkModel`, `readModel`), a store's answer, or a kept file's object of a version that holds a lone surrogate. Refused, naming the file, and never read with U+FFFD in place of what is no text. `AGENTS.md`, no file of the model, is read as it is; a kept file that is not UTF-8 is left alone, an info (kept-skipped) |
| `category-unknown` | warning | I.10.5 | an element or type of a category this tool does not know: kept, and checked against the common schema only |
| `schema-invalid` | error | III.3.2 | a record does not validate against its schema; `pointer` says where |
| `member-unknown` | warning | I.10 | a member the schema does not know: one that no subschema applying to its object names, as `unevaluatedProperties: false` would read `"x-eik-closed": true` there (Part I, 10, rule 3). Kept, never refused |
| `application-extension` | warning | I.11.2.8 | an extension member at the top of a result manifest or a proposal (the prefix in `data.prefix`), where the application's own data goes in `engine`, `summary` and `evidence` (Part VI, 8): kept |
| `member-extension` | info | I.11.2 | an extension member, `<prefix>:<name>`, that an application adds to a record, or to an object of a result manifest or a proposal whose members its schema names (`app`, `made`, `base.records[…]`) (the prefix in `data.prefix`): kept, and not called a misspelling. A name with a reserved prefix (`eik:`, `eik-tools:`, `project:` …) or one not of a prefix's form is a `member-unknown` |
| `extension-null` | warning | I.11.2.3 | an extension member whose value is `null`, which no application writes of its own, since in a patch `null` takes a member away (Part V, 4.2): kept, as every member a reader reads is (Part I, 10, rule 1). The command processor refuses a command that would write one into a record that did not hold it |
| `eik-extension` | warning | I.11.2.8 | `eik.json` carries a member this version does not define, an extension member or another: no application adds a member to it, and only a later version of the specification does (Part III, 8.1); kept |
| `proposal-unread` | error | I.9.12.4 | in 0.6, or in 0.5 with the proposal declaredProposals: a model lists, in `eik.json` or at the top of its single-file form, a proposal this tool does not implement, or, where the caller says what it reads (`reads`), one the caller does not implement that governs a category or a file it reads; a reader refuses it, with or without the check, and no writer writes it |
| `proposal-skipped` | info | I.9.12.4 | in 0.6, or in 0.5 with the proposal declaredProposals: a model lists a proposal for the next version that the caller, saying what it reads (`reads`), does not implement, and that governs no category and no file it reads; the caller reads the model without it |
| `proposal-undeclared` | error | I.9.12.5 | in 0.6, or in 0.5 with the proposal declaredProposals: a record, a member or a file of a model that lists its proposals needs a proposal for the next version that the list lacks |
| `proposal-ignored` | info | I.9.12.6 | a proposal the caller asked for that the reader does not apply: the model's version takes none such, or the model lists the proposals for the next version it is written by and not this one |
| `proposal-rule` | warning | I.9.12.1 | in 0.6, or in 0.5 with the proposal declaredProposals: a model's list of proposals names a rule of its own version, or a proposal no model lists |
| `order-unknown` | warning | I.11.2.8 | a member of `project/order.json` that names no record list, an extension member or another: no application adds one. The file is an index of the record lists, not a record, so this package's reader and writer do not keep the member (Part III, 9, rule 5) |
| `stored-form` | error | III.5 | a file is not in the stored form. `readFolder` reads the file all the same and gives the finding as a warning: a reader reads any I-JSON layout of a record (Part III, 5, rule 6) |
| `path-id`, `path-level`, `path-category`, `path-view-kind` | error | III.4.2 | a file's name or folder disagrees with its record: a name made from an id that reads (Part III, 2, rule 7) as another id, as `wall%41.json` (`wallA`) for the record `wall%41` |
| `path-unescaped` | warning | III.2.9 | a record's file name, its level folder or its view's folder reads as its id or `levelId`, but is not the path segment Part III, 2 makes of it: a character the rules escape left as it is, as in a folder written before 14 October 2026 (`study-roof:gutter:study-roof:edge:0.json` for `study-roof%3Agutter%3Astudy-roof%3Aedge%3A0.json`), or an escape they do not make (`%3a`, `%41`). The record is read, the message names the path the rules give, and `writeFolder` moves the file there |
| `path-discipline` | error | III.4.1 | a record is in a folder that neither layout gives it, 0.1's (III.4.1) nor its owner's (III.4.4); in 0.1 without the proposal ownership, in another discipline folder than its category's |
| `path-fold` | error | I.6.7 | two records whose paths fold to one, compared name by name by their folds (Part III, 4.3: each name in Normalization Form D, its case folded by the full case folding of Unicode 13.0.0, then in Normalization Form C; canonical caseless matches): two files (`Wall-A.json` and `wall-a.json`, `straße.json` and `strasse.json`, `café` in two normalisations) or two of their folders; or two levels whose folders do (`Level-1` and `level-1`), whether an element stands on them or not. Where names fold (macOS, Windows) the two are one file or folder, and the two are not both in a model (Part I, 6, rule 7). The later path in code-unit order, or the later level, is named, with the other; a folder that two spellings make one is named once, on the first file in it. The writer refuses such a model (`path-collision`, with `path-fold` diagnostics), comparing the paths as the validator does. Two levels whose ids fold to one but whose folders do not (`con` and `Con`, which make `%63on` and `%43on`) are no error |
| `id-duplicate` | error | I.6.1 | two records of one list share an id |
| `id-slash` | error | I.6.4 | an id contains `/`; in a model of 0.3, or of 0.2 with the proposal `groupIds`, an original's or a copy's id contains `/`, or a stored id begins with a copy's id and a `/` where that copy is not its original's `frame` (I.6.1.2) |
| `id-derived` | error | II.10.1.4 | in a model of 0.3, or of 0.2 with the proposal `groupIds`: a stored element has an id an instance of a group derives |
| `group-frame` | error | II.10.1.1 | in a model of 0.3, or of 0.2 with the proposal `groupIds`: an original's `frame` names no copy of it, or one that does not stand where the original says its kept elements stand, or a group's first instance has a copy record while its elements are the kept ones |
| `group-exclusion` | error | II.10.1.1.1 | in 0.7, or in 0.6 with the proposal groupExclusions: a group's excluded gives a list not sorted, one for its kept instance or for no instance of it, a base id that is no kept element's, a list that names every kept element, or one that names an element and not what depends on it |
| `group-id` | error | II.10.1.2 | in a model of 0.3, or of 0.2 with the proposal `groupIds`: a kept element drawn in another instance than the kept one has an id that does not begin with the `frame` and a `/` |
| `id-too-long` | error | I.6.8 | an id whose path segment (Part III, 2) is longer than 200 bytes of UTF-8, escapes counted as written (`:` is `%3A`, three bytes): a level's, a view's, or the id of a record kept in a file of its own, so that `<segment>.json` stays well inside the 255 bytes a file system takes for a name. The writer refuses it (`model-invalid`, with an `id-too-long` diagnostic) |
| `path-unsafe` | error | III.2 | the writer's refusal of a record whose path would not stay a file of the model's folder: a category or a view's kind, which are not escaped, that makes a path segment `.` or `..`, a path that would lead out of the folder where `\` separates folders, as on Windows (a category of a later version `a\..\..\..\..\x`), or a path whose reading there holds a name `.` or `..`, a hidden one (`.claude`, `.vscode`, `.git`, `.eik`) or a reserved one (`~`), or is `eik.json`; an id or a level never does, escaped as Part III, 2 says. It names the record; the validator does not report it, since a category may be one a later version adds. Also `insidePath`'s refusal of a path on disk that leaves the folder or goes through a link |
| `ref-missing` | error | I.7 | a reference that must resolve (a type, a level, a top constraint's level, an opening's, a slab edge's, a gutter's or a railing's host, a wall's attached top, a column's base, a member's join) names nothing |
| `ref-dangling` | warning | I.7.3 | a reference that should resolve names nothing |
| `type-category` | error | I.7.1 | an element's type is of another category |
| `host-category` | error | II.6.1 | an opening's host is no wall; a slab edge's host is not a slab or foundation, a rebar's not a slab, a foundation, a beam, a column or a slab edge, a mesh's not a slab, a foundation or a wall; a gutter's is no roof; a railing's is not a stair, a slab or a shaft (II.12.2) |
| `cost-code-member` | error | II.11.1.3 | in a model of 0.3, or of 0.2 with the proposal `estimate`: a cost code gives an `angle` with no `item` `bend`, an `insulation` with no `item` `insulation`, or `includes` with an `item` |
| `profile-short` | error | II.6.1.2 | a wall's or beam's two profile points are less than 10 mm apart in plan |
| `room-number` | error | II.6.1.4 | two rooms on one level share a number |
| `edge-ids` | error | II.6.1.10 | an outline's edge ids are not unique, or not one per point |
| `bridge-kind-twice` | error | II.2.1 | two thermal bridges of the project's envelope have the same `kind`, so a tool would not know which ψ to take |
| `lambda-missing` | warning | II.4.3 | a layer of a part of the thermal envelope (a type an element uses that has an insulation layer), other than a membrane or an air layer, with no design thermal conductivity: neither its own `thermal.lambda` nor its material's `lambda` |
| `frames-fit` | warning | IV.4.3.1 | in 0.2, or in 0.1 with the proposal frames, a door or window whose type's family leaves no room for its frame, a light's sash or glass, or a leaf's glass, or whose glass is thicker than what holds it: a compiler derives it no body of its own |
| `main-direction` | error | II.5.1.1 | in 0.2, or in 0.1 with the proposal grain, a slab's, ceiling's or foundation's `mainDirection` that is not square to its panels' `direction` within 0.01° (rule 2), or `mainDirection` on an element of a category other than slab, ceiling, foundation, roof or wall (rule 5) |
| `member-length` | error | II.6.2.1.3 | in 0.2, or in 0.1 with the proposal member, a member whose two ends, its profile's points at its level plus its offset and at its end's, lie less than 10 mm apart |
| `member-plumb` | warning | II.6.2.1.4 | in 0.2, or in 0.1 with the proposal member, a member whose two plan points lie less than 1 mm apart but not within 10⁻⁶ mm: its section turns with the direction from one to the other; a plumb member's are one point |
| `slab-plane` | error | II.6.3.1.6 | in 0.2, or in 0.1 with the proposal slopedSlab, `plane` on an element other than a slab, or a slab's plane whose `edgeId` names no edge of its outline, or whose `rise` over `run` is steeper than 75° |
| `slab-plane-edge` | error | IV.4.2.1.6 | in 0.2, or in 0.1 with the proposal slopedSlab, a slab edge element hosted by a slab whose plane slopes, which hosts none in 0.2 to 0.4; none in 0.5, or in 0.4 with the proposal slopedEdges (Part IV, 4.6.1) |
| `declared-size` | warning | II.12.1.1.1 | in 0.2, or in 0.1 with the proposal declared, a type that sets its elements' sizes declares an envelope whose extent along its frame's x or z differs from its `width` or `height` by more than the declaration's tolerance; the sizes stay nominal |
| `leaf-material` | warning | IV.4.3.1.14 | in 0.2, or in 0.1 with the proposal frames, a window's or a garage door's family gives `leafMaterial`: only a door has a leaf of its own |
| `frames-profile` | error | IV.4.3.1.15 | in 0.2, or in 0.1 with the proposal frames, a family's `frameProfile`, `mullionProfile` or `sashProfile` is no outline of Part II, 5.2 (rule 9), its bounding box is not the width by the depth of the members it shapes, or it shapes a frame that follows its wall |
| `derived-path` | warning | IV.1.1.2.1 | a file in a folder's derived layer at no result's path: a result lies at `.eik/derived/elements/<id>.json` or `.eik/derived/types/<id>.json`, its id written as a path segment; a reader ignores it (by `readDerived`) |
| `derived-form` | warning | IV.1.1.2.2 | a result of a folder's derived layer that is not JSON, breaks its schema (`derived/bodies.schema.json`) or does not name its own record among its sources: a reader discards it (by `readDerived`) |
| `derived-stale` | info | IV.1.1.2.4 | a result of a folder's derived layer whose sources no longer hold, by their hashes, or of a record the model does not have, or, for a reader that wants its own rules' result, of another producer or rule: a reader discards it, and derives it again or does without (by `readDerived`) |
| `provision-frame` | error | II.6.10.1 | in 0.2, or in 0.1 with the proposal provision, a provision whose `axis` or `up` is no unit vector, or whose `up` is not square to its `axis` |
| `provision-host` | error | II.6.10.3 | in 0.2, or in 0.1 with the proposal provision, a provision whose host is no wall, slab, foundation, ceiling, roof, beam or column |
| `provision-run` | error | II.6.10.4 | in 0.2, or in 0.1 with the proposal provision, a provision for an element that is no pipe, duct or cable carrier; in 0.4, or in 0.3 with the proposal provisionTerminals (II.6.10.1), no terminal and no component on a pipe or a duct either |
| `provision-cut` | warning | II.6.10.5 | in 0.2, or in 0.1 with the proposal provision, a cut answer that names a recess its host does not have, or an element that is not in the model |
| `material-both` | error | II.4.4.3 | in 0.5, or in 0.4 with the proposal materialId, an object that names its material both by its `materialId` and by its `material` text |
| `material-unmatched` | info | II.4.4.6 | the migration to materials named by id (`migrateMaterialIds`): a material text that no material of the model is named, a material of its own, which stays named by its text |
| `material-ambiguous` | warning | II.4.4.6 | the migration to materials named by id (`migrateMaterialIds`): a material text that two or more of the model's materials are named, which stays named by its text |
| `masonry-category` | error | II.4.3.1 | in 0.4, or in 0.3 with the proposal masonry, a material that carries masonry and whose category is not masonry, brick, block or stone, or that has none |
| `ground-schema` | error | XIX.2.1 | with the proposal ground, project/ground.json does not read as I-JSON, does not validate against its schema, or is not in the stored form: a diameter on a stated profile, a layer that gives both bottom and thickness or neither, drains on a fine layer, a law outside its bounds, a load that gives both q and fill or neither, a category on a permanent load, among them |
| `ground-id-twice` | error | XIX.2.3 | with the proposal ground, two profiles, two pits or two loads on the ground of one id |
| `ground-layer-twice` | error | XIX.4.2.1 | with the proposal ground, two layers of one name, one stratum, in a profile |
| `ground-layer-order` | error | XIX.4.2.4 | with the proposal ground, a layer whose bottom lies at or above its top: the layer above's bottom, or the profile's top |
| `ground-law` | error | XIX.4.3.6 | with the proposal ground, a clay whose sigmaL lies below its sigmaC |
| `ground-strata-order` | error | XIX.5.1.3 | with the proposal ground, two profiles that order two strata oppositely, or several that order strata in a cycle |
| `ground-profile-point` | error | XIX.5.2.5 | with the proposal ground, two profiles at one point in plan |
| `ground-outline` | error | XIX.6.1 | with the proposal ground, a pit's outline or a load's region that is not a simple polygon: edges that cross or touch but at the corners they share, two equal points, or no area |
| `terrain-overlap` | warning | IV.14.1.4 | with the proposal grading, two terrains whose grounds overlap in plan: the one whose id comes first is the ground there, and the other's points are not read there; reported on both |
| `ground-pit-off` | warning | XIX.6.4 | with the proposal ground, a stated pit in a project whose excavation is off |
| `costs-schema` | error | XXII.3.1.1 | in 0.6, or in 0.5 with the proposal costSchedules: project/cost-schedules.json does not read as I-JSON or does not validate against its schema: an item that states a quantity both by a name and by a value, a layer's quantity of a name no layer has, a kind of schedule the schema does not name among them |
| `costs-id-twice` | error | XXII.3.1.3 | in 0.6, or in 0.5 with the proposal costSchedules: two cost schedules, or two items of one schedule, of one id |
| `cost-item-parent` | error | XXII.3.3.2 | in 0.6, or in 0.5 with the proposal costSchedules: a cost item's parent is no item of its schedule, is itself, or leads round to it |
| `cost-item-group` | error | XXII.3.3.3 | in 0.6, or in 0.5 with the proposal costSchedules: a cost item that is a group, the parent of others, states a quantity |
| `cost-reference` | warning | XXII.2.3 | in 0.6, or in 0.5 with the proposal costSchedules: a cost item's selection names an element, a type or a level the model does not have; it keeps the elements that are there |
| `cost-selection-empty` | warning | XXII.2.4 | in 0.6, or in 0.5 with the proposal costSchedules: a cost item's selection keeps no element of the model |
| `cost-layer` | warning | XXII.3.4.3 | in 0.6, or in 0.5 with the proposal costSchedules: a cost item's quantity names a layer that no type of the elements it keeps has |
| `rates-in-model` | error | XXII.4.1.2 | in 0.6, or in 0.5 with the proposal costSchedules: a kept file of the model is a rate list (openeik-rates/…): a project's rates are never part of a model, which gives them to everyone who reads a version |
| `rates-schema` | error | XXII.4.2 | a rate list (Part XXII, 4.2, of 0.6) does not read as I-JSON or does not validate against its schema; it is no model's file |
| `rates-twice` | error | XXII.4.2.3 | a rate list (Part XXII, 4.2, of 0.6) gives two rates for one item of a schedule, or for one code, edition and unit |
| `work-schema` | error | XXII.5.1.1 | in 0.6, or in 0.5 with the proposal workSchedules: project/work-schedules.json does not read as I-JSON or does not validate against its schema |
| `work-id-twice` | error | XXII.5.1.3 | in 0.6, or in 0.5 with the proposal workSchedules: two calendars, two work schedules, or two tasks of one schedule, of one id |
| `work-calendar` | error | XXII.5.3.3 | in 0.6, or in 0.5 with the proposal workSchedules: a work schedule names a calendar the file does not have |
| `work-task-unknown` | error | XXII.5.4.2 | in 0.6, or in 0.5 with the proposal workSchedules: a task's parent, or a task it follows, is no task of its schedule |
| `work-cycle` | error | XXII.5.5.4 | in 0.6, or in 0.5 with the proposal workSchedules: a task is its own parent or follows itself, directly or through other tasks |
| `work-summary` | error | XXII.5.4.3 | in 0.6, or in 0.5 with the proposal workSchedules: a summary task, the parent of others, gives a duration, a sequence, a day it starts no earlier than or elements, or a task follows it |
| `work-duration` | error | XXII.5.4.3 | in 0.6, or in 0.5 with the proposal workSchedules: a task that is no summary gives no duration |
| `work-reference` | warning | XXII.2.3 | in 0.6, or in 0.5 with the proposal workSchedules: a task's selection names an element, a type or a level the model does not have; it keeps the elements that are there |
| `work-selection-empty` | warning | XXII.2.4 | in 0.6, or in 0.5 with the proposal workSchedules: a task's selection keeps no element of the model |
| `work-status-date` | error | XXII.5.8.1 | in 0.6, or in 0.5 with the proposal workSchedules: a task reports progress, and its schedule gives no status date it is reported to |
| `work-actual-order` | error | XXII.5.8.2 | in 0.6, or in 0.5 with the proposal workSchedules: a task's actual finish lies before its actual start, or it gives one without the other, or a per cent above 0 without an actual start |
| `work-after-status` | error | XXII.5.8.5 | in 0.6, or in 0.5 with the proposal workSchedules: a task's actual start or finish, or a day an element was built, lies after its schedule's status date |
| `work-progress-basis` | error | XXII.5.8.3 | in 0.6, or in 0.5 with the proposal workSchedules: a task that names elements reports a per cent, or one that names none reports elements built or a progressBy |
| `work-built-outside` | warning | XXII.5.8.3 | in 0.6, or in 0.5 with the proposal workSchedules: a task has an element built that its selection does not keep; it counts for nothing |
| `work-out-of-sequence` | warning | XXII.5.8.6 | in 0.6, or in 0.5 with the proposal workSchedules: a task has started, and a task it follows from its finish or its start has not |
| `work-opening-order` | warning | XXII.5.4.1.1 | in 0.7, or in 0.6 with the proposal replacedOpenings: a task builds a new opening from a day before the task that takes away the demolished opening it replaces has finished, by the schedule's planned days; said on the task's `elements`, and only where the schedule holds both tasks |
| `pour-id-twice` | error | II.6.3.7.2 | in 0.7, or in 0.6 with the proposal taskParts: two pours of one element of one id |
| `pour-outline` | error | II.6.3.7.3 | in 0.7, or in 0.6 with the proposal taskParts: a pour's outline of fewer than three distinct points, of no area, that names a point twice (its first at its end among them) or that crosses itself |
| `pour-empty` | warning | II.6.3.7.4 | in 0.7, or in 0.6 with the proposal taskParts: a pour that meets no part of its element in plan, a part no wider than 1 mm being none |
| `pour-overlap` | error | II.6.3.7.5 | in 0.7, or in 0.6 with the proposal taskParts: two pours of one element that overlap in area; two that touch along an edge share none |
| `work-pour-unknown` | warning | XXII.5.4.2.3 | in 0.7, or in 0.6 with the proposal taskParts: a task names a pour that no element it keeps has |
| `work-part-unplaced` | warning | XXII.5.4.2.8 | in 0.7, or in 0.6 with the proposal taskParts, on the element: a part of it, by its layers' functions and its pours, that no task of a work schedule builds, or takes away, while a task builds, or takes away, another part of it; read as built, or taken away, when the last of them is |
| `work-order` | error | XXII.5.4.2.10 | in 0.7, or in 0.6 with the proposal taskParts: a task's order that cannot be read: `listed` where its selection gives no `elementIds`, `along` with no direction or with the direction [0, 0], or a direction with another order |
| `insert-face` | error | II.6.1.2.3 | in 0.7, or in 0.6 with the proposal slabHosts: a cast-in item's `insertAt` whose face, `edgeId` or `direction` its host does not have: in a slab or a roof the faces `top`, `bottom` and `edge`, the last with an `edgeId` of its outline, and rows `along` or `across`; in a wall a wall's faces, no `edgeId`, and rows `along` or `up` |
| `slab-frame` | error | II.6.1.2.6 | in 0.7, or in 0.6 with the proposal slabHosts: a roof whose slope-defining edges give more than one plane hosts a cast-in item placed by `insertAt`, a mesh or a rebar element, or carries `edges`: it has no frame of its own |
| `edge-detail` | error | II.6.1.2.5 | in 0.7, or in 0.6 with the proposal slabHosts: an edge detail on a slab's or a roof's edge names no edge of its outline, runs from a `from` that is not before its `to`, lies past its edge's end in the element's plane, or names a type that is no edge detail |
| `checks-schema` | error | XXIII.2.3 | in 0.7, or in 0.6 with the proposal checks: a file of a building's `checks/`, a suite's manifest, a check, the waivers or a kept run's result, that does not read as I-JSON or does not validate against its schema; a runner refuses to run it |
| `checks-id` | error | XXIII.4.1 | in 0.7, or in 0.6 with the proposal checks: a check whose `id` is not its file's name, `tests/<id>.json` |
| `checks-fixture` | error | XXIII.4.9 | in 0.7, or in 0.6 with the proposal checks: a fixture a check names that its suite's folder does not hold at `tests/<id>/<name>` |
| `checks-suite` | error | XXIII.3.3 | in 0.7, or in 0.6 with the proposal checks: a suite a run cannot run: one it extends that no one keeps, ships or gives, one of its own layer or above, two versions of one suite in a run, or a suite a building keeps that is not named as its folder or is of the project's layer |
| `checks-param` | error | XXIII.3.4 | in 0.7, or in 0.6 with the proposal checks: a value a suite or a caller gives a check's parameter that is not of its type or bounds, that names no parameter or no check, or that loosens the value of a layer below |
| `plan-limits-schema` | error | II.2.4.1 | in 0.7, or in 0.6 with the proposal planLimits: `project/plan-limits.json` does not read as I-JSON or does not validate against its schema |
| `plan-limit-id` | error | II.2.4.2 | in 0.7, or in 0.6 with the proposal planLimits: two limits of one id in `project/plan-limits.json` |
| `plan-limit-shape` | error | II.2.4.3 | in 0.7, or in 0.6 with the proposal planLimits: a facade line of fewer than two points or with two in a row one, or an outline of fewer than three points, that names a point twice, crosses itself or has no area |
| `drawing-set-schema` | error | XIV.2.5.3 | in 0.7, or in 0.6 with the proposal drawingSets: a drawing set's file does not read as I-JSON, or a set does not validate against its schema: no id, name or revision, a rule and members both or neither, a rule's field the schema does not name, or a member that names no view or sheet by its id |
| `drawing-set-reference` | warning | XIV.2.5.8 | in 0.7, or in 0.6 with the proposal drawingSets: a set's rule names a level or a scope box the model does not hold, and matches nothing by it |
| `drawing-set-member-twice` | error | XIV.2.5.9 | in 0.7, or in 0.6 with the proposal drawingSets: a picked set names one view or one sheet twice |
| `drawing-set-missing` | warning | XIV.2.5.10 | in 0.7, or in 0.6 with the proposal drawingSets: a picked set names a view or a sheet the model does not hold; it is kept in its place and listed as missing, never dropped |
| `drawing-set-purpose` | warning | XIV.2.5.14 | in 0.7, or in 0.6 with the proposal drawingSets: a set's purpose is no purpose of the model's drawing profile, or the model holds no drawing profile |
| `opening-depth` | error | II.6.5.2.3 | in 0.7, or in 0.6 with the proposal wallOpenings: a recess's depth that is not less than its wall's thickness |
| `roof-falls-mixed` | error | II.6.3.8.2 | in 0.8, or in 0.7 with the proposal roofFalls: a roof whose edges define slopes both below 0, falling inward, and above 0, rising |
| `roof-rise` | error | II.6.3.8.3 | in 0.8, or in 0.7 with the proposal roofFalls: a roof edge's rise on an edge that defines no slope, or one whose face, by its slope and its rise together, is steeper than 75° |
| `roof-falls-top` | error | IV.4.4.1.6 | in 0.7 with the proposal roofFalls and not fallingRoofTops, which 0.8 makes a rule with it: a wall whose top is attached raking to a roof that falls inward, or cut under one |
| `hatch-base` | error | II.4.5.2 | in 0.8, or in 0.7 with the proposal cutPatterns: a material's or a layer's hatch whose object gives no pattern, or one that is not the hatch's base, diagonal for masonry and gravel for crushed stone |
| `block-hatch` | warning | II.4.5.10 | in 0.8, or in 0.7 with the proposal cutPatterns: a layer's block where the layer is not drawn with masonry, which is not read |
| `block-joined` | warning | II.4.5.10 | in 0.8, or in 0.7 with the proposal cutPatterns: a layer joined to the layer before it where none is before it or that one is not drawn with masonry |
| `pattern-look-unread` | warning | II.4.6.6 | in 0.8, or in 0.7 with the proposal patternLook: a material's or a layer's patternScale or patternAngle where its cut is drawn none or solid, or with no pattern at all, which is not read |
| `framed-bays-of-members` | warning | II.5.1.2.5 | with the proposal framedBays, proposed for 0.9: a framed layer, a wall type's layer that carries framing or a slab type's that carries joists, whose own material is its members', its rule's material, C24 where the rule names none, by the same materialId or the same name ignoring case and surrounding white space: its own material is its bays', which would be read as solid as its members |
| `running-type` | warning | XIV.3.5.1 | in 0.8, or in 0.7 with the proposal runningDimensions: a dimensionRunning on a dimension that is neither linear nor aligned, or on an item that is no dimension, which is not read |
| `running-references` | error | XIV.3.5.2 | in 0.8, or in 0.7 with the proposal runningDimensions: a running dimension that gives fewer than two references, an origin and a target |
| `detail-pattern-kind` | warning | XIV.3.6.1 | in 0.8, or in 0.7 with the proposal detailPatterns: a hatch, a patternScale or a patternAngle on a detail item that is no region, which is not read |
| `detail-hatch-base` | error | XIV.3.6.2 | in 0.8, or in 0.7 with the proposal detailPatterns: a region's hatch whose region gives no pattern, or one that is not gravel, the base of crushed stone |
| `detail-pattern-unread` | warning | XIV.3.6.6 | in 0.8, or in 0.7 with the proposal detailPatterns: a region's patternScale or patternAngle where it is drawn none or solid, which is not read |
| `site-equipment-profile` | error | II.6.3.6.3 | in 0.7, or in 0.6 with the proposal siteEquipment: an element of the category `siteEquipment` whose profile is not its kind's: a fence's of fewer than two points or with two in a row one (rule 4), or a cabin's, a container's or a crane's of more than two (rule 3) |
| `pieces-rule` | error | XX.2.1.2 | with the proposal pieces, a piece rule on a framing family, a least cut over half a straight, a layer's rule on a round footing's type or a layer of no thickness, or a board shorter than it is wide or a least cut over half its width |
| `pieces-zone` | warning | XX.2.2.4 | with the proposal pieces, a layer's zone of the layer's own grade, its material the layer's |
| `pieces-section` | error | XX.2.3.1 | with the proposal pieces, a section of parts beside an edgeProfile or a framing family, a part that is no simple polygon or that overlaps another, or a top that is not at 0 |
| `pieces-layout` | error | XX.2.4.2 | with the proposal pieces, an element's layout of boards that names no layer of its type with a piece rule, or one twice; a layout on an element whose type has no rule; a shift not less than its type's straight |
| `pieces-fitting` | warning | XX.4.5.5 | with the proposal pieces, stop-ends on a slab edge type whose section has no cast region: it has none |
| `pieces-adopted` | error | XX.8.2 | with the proposal pieces, an adopted piece that names no element with a piece rule, a piece of another element, a stretch off its edge, shorter than 10 mm or over another adopted piece or a notch, a layer with no rule, or a piece another adopted piece names |
| `pieces-view` | warning | XX.6.1.1 | with the proposal pieces, a view's display.pieces on a view that is no plan, or naming a layer that no slab or foundation type of the model gives a piece rule |
| `railing-profile` | warning | II.12.2.1.4 | in 0.2, or in 0.1 with the proposal railings, a railing on the outline of a slab or a shaft, on a wall's top or along a slab edge element carries a `profile`, which is deprecated: its line is derived |
| `component-frame` | warning | IV.7.6 | in 0.2, or in 0.1 with the proposal components, a component that has no frame: axes whose x is zero or whose y runs along it, a profile whose two points are one, a plate's column without a level, a centre or a height, or a cast-in item whose `hostId` names no wall with a straight baseline: a compiler derives it no body |
| `adopted-category` | error | I.10.4 | in 0.2, or in 0.1 with the proposal adopted, a member it adds on an element or a type of a category it does not belong to: `notches` on any element but a slab edge element (Part IV, 4.6, rule 12) |
| `adopted-kind` | warning | II.14 | in 0.2, or in 0.1 with the proposal adopted, a member it adds on a view or a detail item of a kind it means nothing on: `display.electrical` on a view that is no plan, `camera` on one that is not 3D, `cloud` on a detail item that is no line, `buildUp` on one that is no leader, `cutBy` on one that is no region; kept, and not read |
| `notch-invalid` | error | IV.4.6.12 | in 0.2, or in 0.1 with the proposal adopted, a slab edge element's `notches` that rule 12 does not allow: on a section without an outside upstand, shorter than 10 mm, ending past its edge, below the flange, shallower than the chamfer, or overlapping |
| `cast-with` | warning | II.14.1.1 | in 0.2, or in 0.1 with the proposal adopted, an element whose `castWith` names itself |
| `layer-drawing` | warning | II.14.2.1 | in 0.2, or in 0.1 with the proposal adopted, a layer's `drawing` that names a family's type and no family, or a type its family does not have |
| `camera-points` | error | II.14.3.6 | in 0.2, or in 0.1 with the proposal adopted, a view's `camera` whose position and target are less than 1 mm apart |
| `follows-free` | warning | II.14.4.5 | in 0.2, or in 0.1 with the proposal adopted, a detail item that follows an instance of a group and is tied to an element or a view, or is not in a plan: its `follows` is not read |
| `build-up-type` | warning | II.14.4.4 | in 0.2, or in 0.1 with the proposal adopted, a build-up text whose `typeId` names a type without layers |
| `not-dimension` | error | II.14.4.8 | in 0.2, or in 0.1 with the proposal adopted, `notDimension` on a detail item that is not a text |
| `insertion-parameter` | error | II.14.5.1 | in 0.2, or in 0.1 with the proposal adopted, a detail family's `insertion` bound to a parameter the family does not have |
| `member-unprefixed` | warning | I.11.5.2 | in 0.2, or in 0.1 with the proposal adopted, a member of the reference implementation's own written without its prefix (`calloutShape` for `stomra:calloutShape`, and the others of Part I, 11.5); kept, a member 0.2 does not know |
| `component-retired` | warning | II.5 | in 0.2, or in 0.1 with the proposal components, a component type of the family `toilet` or `basin`, deprecated at 0.2: a terminal of the kind `wc` or `washbasin` stands for it |
| `stairs-layout` | warning | IV.7.3.1 | in 0.2, or in 0.1 with the proposal stairs, a straight, L or U stair that cannot be laid out (no risers or going, its top not above its base, a first run of as many risers as it has, an L's landing shallower than its run is wide): a compiler gives it no layout and no body |
| `framing-expression` | error | IV.6.6.1 | in 0.2, or in 0.1 with the proposal framing, a beam or a slab edge element whose type's framing family does not evaluate (an expression that is invalid, a parameter outside its range or named twice, or one the element gives that is not of scope instance): a compiler derives it no body. In 0.5, or in 0.4 with the proposal familyChecks (Part IV, 6.6.1), also a beam's or a slab edge element's type, used or not, whose family has an expression the language does not take or that names an unknown name or function, or a parameter that breaks Part II, 5.4's rules; its elements are then not reported for it |
| `framing-part` | error | IV.6.6.1 | in 0.2, or in 0.1 with the proposal framing, a beam or a slab edge element whose type's framing family's parts cannot be built (a Length, a width, a depth or a plate's thickness outside its range, a member under 1 mm long, an outline that is not simple, a cut through a part's centre, a joint by a part that is no part or is not convex, a tail without its parameters, a part cut away, a plate off its members or on a slab edge element): a compiler derives it no body. In 0.4 with the proposal familyChecks, also such a type whose family has a part with no id, or two parts with one id |
| `framing-layout-roof` | warning | IV.7.4.13 | in 0.2, or in 0.1 with the proposal framingLayout, a roof whose truss layout's family type is no beam type whose framing is a truss family, one that declares the instance parameters Pitch, HeelHeight, OverhangLeft and OverhangRight: a compiler does not lay it out; or whose model's own jack or flat-top family (its family type's id and -jack or -flat) is no truss family, or a flat-top family declares no FlatLength of the scope instance: a compiler leaves out each hip truss, jack or girder along the ridge built of it (IV.7.4.16.2); in 0.6, or in 0.5 with the proposal slabBearings, a bearing that names an element no wall, beam or slab (IV.7.4.13.3.1), or a slab whose plane slopes (IV.7.4.13.3.4) |
| `framing-layout-joists` | warning | IV.7.4.15 | in 0.2, or in 0.1 with the proposal framingLayout, a layer's joist rule that cannot be laid out as it stands (on a type that is not a slab type, on a layer of no thickness, or with a joist deeper than its layer): a compiler lays it out as Part IV, 7.4.15, rule 1 says, or not at all |
| `framing-layout-rule` | warning | IV.7.4.1 | in 0.2, or in 0.1 with the proposal framingLayout, a framed layer whose rule cannot be laid out as it stands (a stud, a plate, a header's plies or a sill deeper than the layer, a spacing less than the stud's width, tiers out of order, a relyOn that names no other framed layer, a rule on a type that is not a wall's, a layer with no thickness): a compiler lays it out as Part IV, 7.4.1, rule 3 says, or not at all |
| `rooms-enclosed` | warning | IV.7.5.3 | in 0.2, or in 0.1 with the proposal rooms, a room placed by a point that lies in no closed face of the walls, columns and room separators on its level: a compiler gives it no boundary |
| `rooms-shared` | warning | IV.7.5.4 | in 0.2, or in 0.1 with the proposal rooms, a room placed by a point in the face of another room whose id comes first in code-unit order: that room keeps the face, and a compiler gives this one no boundary |
| `north-missing` | warning | II.6.8.5 | the project gives no `site.trueNorth`, and the model holds a door, a window or a roof window: their bearings take plan +Y as north |
| `roof-window-type` | error | II.6.3 | a roof window's `typeId` (`roof.windows[]`) names a type of a category other than `window` |
| `library-unused` | warning | III.13.2 | a type or material no record uses (a writer should not write library records the model does not use) |
| `details-orphan` | warning | III.10 | detail chunks without their `view.json` |
| `kept-collision` | error | III.7.4 | a kept file sits where a record is, or where a record needs a folder |
| `kept-path` | error | III.7.1 | a kept file of the single-file form has a path that is not plain: a name that starts with `.` or `~`, a `\` or NUL, or the path `eik.json` or `AGENTS.md`. Such a file in a folder is left alone, with an info. A name that begins as a Windows drive does (`C:/notes.md`) is plain, and holds a `:`, which Part III, 7, rule 8 keeps out of kept paths (below) |
| `kept-skipped` | info | III.7.2 | a binary file, one over 1 MiB, or one with a path that is not plain: left alone, not part of the model |
| `kept-name` | warning | III.7.8 | a file at a plain path that holds a name a file system refuses or reads otherwise, which Part III, 2 would escape (its rules 2 to 5): a character a common file system refuses (`: * ? " < > \|` and control characters; so a name that begins as a Windows drive does, `C:`), a trailing dot or space, or a device name (`con.txt`, `Aux`, `lpt¹.txt`). A `%` is none (rule 1 escapes it only so that an escape reads back as one), so an application's folder named by its ids' segments (`acme/frame%3Aa/`) holds kept files. A kept path is not escaped, so the file is no kept file: the reader leaves it alone, not part of the model, never removed and in no version, and warns. In the single-file form an error at its entry of `extras`, which the model holds as it was given and no writer writes (the writer refuses it, `kept-name`) |
| `kept-fold` | warning | III.7.8 | a kept file whose path folds to one, as `path-fold` compares paths, with a record's path, `eik.json`'s or `AGENTS.md`'s, whether or not the folder has them, or the path of a kept file that comes before it in code-unit order: `Eik.json`, `agents.md`, `Types/notes.md` beside the type folders, `notes/readme.md` beside `notes/README.md`; or one that passes through `eik.json` or `AGENTS.md` as through a folder (`AGENTS.md/notes.md`), each a file at the top of the folder. The reader leaves it alone, not part of the model, never removed and in no version, and warns; in the single-file form an error at its entry of `extras`, which the model holds as it was given and no writer writes (the writer refuses it, `kept-fold`). Two such kept files that a merge brings together, one from each side, are a conflict, `in the way`, on the later |
| `name-reserved` | warning | III.1.2 | a name starting with `~` is reserved; the file is not read |
| `eik-unsafe` | error | III.1.1 | the hidden folder `.eik` is a link or no plain folder, or `.eik/remotes.json` or its temporary file is a link or no plain file: nothing is staged, written or read through it. A folder may arrive (in an archive, a git clone) with `.eik` a link that leads anywhere; `writeFolder` stages its files in `.eik/`, and the remotes keep their tracking refs there, so each refuses it before anything is written, read or sent |
| `tree-name` | error | VI.2 | a version tree's entry name is no path segment that stays in its folder: empty, `.` or `..`, or holding `/`, `\` or NUL; or no name a folder gives: a hidden one (`.git`), which a reader of a folder skips, one that starts with `~` and is no shard (a sub-tree named `~` and two lowercase hexadecimal digits, in a folder's own tree whose entries are all shards; a shard holds no shard), or one in a shard its name's hash does not give it (Security and privacy, 5.3, rule 2). A name with a `:` is one, as the file of a record written before Part III, 2 escaped it may hold (its rule 9); a kept file's with one is no kept file's (below). A reader of versions (`listLeaves`, `folderEntries`, `filesOfTree`, `readVersion`, `clone`, `pull`, the diff) refuses the tree, naming it by its hash and the entry by its pointer (`/tree/<n>/0`), and `parseTree`, which reads one tree object alone, refuses a name that is no path segment; `pushVersion` refuses a folder whose version would hold such a name (a record's file named with a `\` as it is, by hand or by a writer before Part III, 2 escaped it, which Linux and macOS keep; the writer names it `%5C`), so that every version written reads back. A version that holds such a name stays unread, as Security and privacy, 5.3, rule 2 asks |
| `tree-duplicate` | error | VI.2 | two entries of one folder of a version tree have the same name, in one tree or in two of its shards: refused, naming the tree that holds the second |
| `tree-kept` | error | III.7.8 | a version holds a kept file that a reader of a folder leaves alone or reads as another file: at a path no kept file may have (Part III, 7, rule 8), a name a file system refuses or reads otherwise (`C:/notes.md`, `notes/con.txt`), a path that folds to one with another of the version's (`notes/a.md` beside `Notes/b.md`, `EIK.json`, `agents.md`) or one through `eik.json` or `AGENTS.md`; a text over 1 MiB, or holding NUL (rule 2); or a leaf read as a kept file (a JSON string, or an object at no record's place) at a path no kept file has (rules 1 and 4): `AGENTS.md`, which a reader of a folder reads as no file of the model, or a record's file, `<leaf>.json` where `<leaf>` is a record's place (`project/materials/notes.json`, `drawings/views/plan/v1/view.json`), which it reads as that record. No folder gives such a version, and a reader that left the file out, as it leaves one out of a folder, would drop it from the next version it stores; so `filesOfTree`, and through it `readVersion`, `clone`, `pull` and a merge of versions, refuse the version, leniently or not, naming each such leaf (Security and privacy, 5.3, rule 2); `readVersion` with `repair` leaves each out and gives it back (rule 4). A `%` is no such character: `notes/50%.md` is a kept file |
| `file-too-large` | error | SP.7.2.2 | a record's file or `eik.json` larger than 64 MiB of UTF-8 (`BOUNDS.file`), the largest file this tool reads, and the largest any part lets a folder hold (an issued drawing, a read set, an asset), or a model in the single-file form larger than 256 MiB (`BOUNDS.model`): refused whole, naming the file, never read in part, by the check, the reader, `versionTree`, `filesOfTree` and `readModel`. A file on disk is read no further than the bound and a byte (`readDirectory`); a kept file larger is left alone (`kept-skipped`), as one over 1 MiB is. An object of a store longer than any file of 64 MiB takes as an object (`BOUNDS.object`) is refused before it is parsed, naming the object (Security and privacy, 7.2, rules 1 and 2) |
| `too-many-files` | error | SP.7.2.4 | a folder of more than 1 000 000 files (`BOUNDS.files`; its hidden ones not counted, as `readDirectory` walks it), or a version of more than 1 000 000 leaves (`listLeaves`, naming the tree it met the bound in): refused whole, before more is read, never read in part |
| `too-many-records` | error | SP.7.2.4 | a model in the single-file form of more than 1 000 000 records, every list's counted (`readModel`): refused whole |
| `too-many-chunks` | error | SP.7.2.4 | a view of more than 50 000 detail chunks (`BOUNDS.chunks`), more than its detail items may be: its schema holds at most 50 000 items, each chunk at least one, and whoever chooses its items' ids chooses where its chunks end (7.2, rule 3). Refused whole, naming the view's folder |
| `too-many-objects` | error | SP.7.2.4 | a version whose trees hold more than 2 000 000 entries (`BOUNDS.entries`), read, each naming an object: sub-trees and shards counted, and a tree as often as the version holds it, so that a tree that holds one tree twice, nested, is refused before its paths double past any count. Refused whole, naming the tree it met the bound in |
| `version-too-deep` | error | SP.7.2.4 | a version whose trees nest more than 256 folders below its root (`BOUNDS.depth`; shards not counted), refused whole, naming the tree, by `listLeaves` and every read of a version, with or without `repair`; and a folder that holds a file more than 256 folders deep, which `pushVersion` refuses before anything is sent, since no reader here would read the version back |
| `kept-credential` | warning | SP.8.3 | a kept file that a push is about to send, one the store lacks, that looks like a credential (`credentialWarnings`): a private key's block; a token by its issuer's prefix and length (GitLab, GitHub, npm, an AWS access key, Slack, Stripe's secret keys, Google's API keys, Anthropic, OpenAI, Hugging Face); a JSON Web Token; a URL with a password in it; a `KEY=secret` line whose name has a part that says it holds a secret (`PASSWORD`, `PASS`, `SECRET`, `TOKEN`, `API_KEY`, `PRIVATE_KEY`, `CREDENTIALS` …) and no last part that says it names one (`_FILE`, `_PATH`, `_URL`, `_NAME`, `_ID` …), and whose value is no placeholder (`<token>`, `${TOKEN}`, `changeme`, `xxx`, under 8 characters); or a list of password hashes (`htpasswd`, a shadow file) or a `.netrc`'s passwords. It names the file, each kind and its line, and never the secret. `pushVersion` and `push` stop on it before anything is sent (`code: "kept-credential"`, these its diagnostics), unless `confirmCredentials`, given on the person's word, when the answer's `warnings` hold them. A file over 1 MiB, an issuer's drawing or read set, is not searched, nor one the store holds already |
| `outline-points` | error | II.6.1.3 | a foundation's profile is neither an outline of three points or more nor, for a round footing type, one point (the other categories' point counts are the schemas') |
| `outline-gap` | error | II.6.1.3 | two consecutive points of a profile's outline, the last and the first included, are less than 0.1 mm apart (Part II states the rule for profiles, not for the outlines in `voids`) |
| `outline-area` | error | II.6.1.3 | a profile's outline has an area of less than 100 mm² |
| `outline-crossing` | error | II.6.1.3 | edges of a profile's outline cross or touch; neighbouring edges meet only at their shared point, so one folding back over the other counts. Within 10⁻⁶ mm (10⁻¹² of the coordinates beyond 10⁶ mm), so that decimal coordinates on a line or an edge are on it, whatever binary rounding does |
| `component-points` | error | II.6.1.8 | a component's two profile points, its insertion point and its orientation, are one point (a cast-in item placed by `insertAt` excepted) |
| `opening-fit` | error | II.6.1.5 | a door or window reaches past its wall's length, has its bottom below the wall's base, or its top over the wall's height (from the wall's top constraint, Part IV, 5.1) where the wall's attached top does not rise over it (5.3). Under an attached top Part IV does not derive (a barrel vault; a host, its type or a layer missing, which their own codes report) the height is not judged |
| `opening-overlap` | error | II.6.1.5 | two doors or windows of one wall overlap in its elevation: by their boxes, or by their outlines where either one's type has one, as Part IV, 4.3 cuts them (reported once, on the one whose id sorts later); openings that only touch do not; in 0.7, or in 0.6 with the proposal replacedOpenings, a demolished one and a new one of one wall may overlap (Part II, 6.5.1) |
| `top-below-base` | error | IV.5.1 | a wall's, shaft's or stair's top constraint does not lie above its base |
| `type-size` | error | II.5.3 | an element's `width` or `height` differs from the size its type sets (a door or window of a family; a component, unless it is a contour plate, bolt group or weld, carrying `plate`, `bolts` or `weld`; a round footing; a cast-in item), or a sectioned beam's `height` from its section's depth |
| `footing-diameter` | error | II.5 | a round footing type's `width` differs from its diameter |
| `section-size` | error | II.5.2 | a section's `web` is not less than its `width`, or twice its `flange` not less than its `depth`; an `L`'s or a `T`'s `flange` not less than its `depth`; a `2L`'s `gap` not less than its `width`, its `web` not less than `(width − gap) / 2`, or its `flange` not less than its `depth`; a `round` section's `width` and `depth` not equal; a `rectangle`'s `radius` more than half its smaller side; a `custom` section's `width` or `depth` more than 0.1 mm from its outline's bounding box |
| `section-outline` | error | II.5.2.9 | a `custom` section's outline breaks rule 9: a contour of fewer than three entries or two corners, two `through` entries together, entries less than 0.1 mm apart, a `through` point on its chord, a corner radius where the contour does not turn, beside an arc or too large for its sides, a contour that crosses or touches itself, a void outside the outline or meeting it or another void, or inside another |
| `layer-thickness` | error | II.5.1.2 | a layer other than a membrane has thickness 0, or a type's layers sum to 0 |
| `layer-id` | error | II.5.1.3 | two layers of one type share an id |
| `layer-member` | error | II.5.1.5 | a layer has an `inset` in a type other than a slab or roof type, or an `extent` in a type other than a roof type |
| `base-host` | error | IV.5.2.1 | a column's attached base is on something other than a foundation or slab, or its centre is outside the host's footprint (on its boundary counts) |
| `base-length` | error | IV.5.2.4 | a column's attached base is not below its top: its derived length is not positive |
| `top-host` | error | IV.5.3.1 | a wall's attached top is on something other than a roof, ceiling, slab or foundation, or the host's footprint does not cover the wall's whole centreline. A pitched roof's footprint is its outline and each edge's overhang, mitred at its convex corners (Part IV, 4.4.3); a round footing's, its circle |
| `top-layer` | error | II.6.4 | a wall's attached top names a layer (`{layerId}`) its host's type does not have |
| `top-face` | error | IV.5.3.6 | the face a wall's top is attached to does not rise above the wall's base anywhere along its centreline, or falls below it by more than the host's own depth there; or, in the level mode, the level top (the face's lowest over the core band, 5.3.5) is not above the base |
| `trim-edge` | error | II.6.7.1 | an outline edge trimmed to a wall's face (`edgeAttachments`) is no edge of the outline (its `edgeIds`, else `<id>:edge:<n>`), is trimmed a second time, or is a round footing's, which has no edges |
| `trim-host` | error | II.6.7.2 | an outline edge is trimmed to the face of an element that is not a wall (a host not in the model is `ref-missing`) |
| `trim-parallel` | error | II.6.7.3 | an outline edge trimmed to a wall's face turns more than 5° from the wall's baseline, either way along it |
| `trim-face` | error | II.6.7.4 | an end of an outline edge trimmed to a wall's face lies more than 1 mm beyond the face, on the side away from the wall: a trim cuts an edge back to the face and never moves it out. The face is the baseline moved by half the wall's thickness, its type's layers or else its `width` (Part IV, 4.5, rule 1) |
| `trim-area` | error | II.6.7.5 | the outline trimmed at every face its edges are trimmed to keeps less than 100 mm²; judged where every entry's face is known |
| `beam-rise` | error | IV.6.2.2 | a beam with neither a section nor a framing family has a non-zero `endRise` |
| `join-mitre` | error | IV.6.4.3 | a mitre join's `to` is not a beam or column, or the join has `extend: false` |
| `join-duplicate` | error | IV.6.4.5 | two joins of one member share an id |
| `join-self` | error | IV.6.4.5 | a member is joined to itself |
| `declared-load` | error | II.12.1.4 | a load of a declaration names no fixing the declaration declares (an element's declaration that declares no fixings: none its type's declares) |
| `declared-fixing` | error | II.12.1.8 | a fixing's `direction` is not a unit vector (its length more than 0.001 from 1) |
| `declared-body` | error | II.12.1.4 | a declared body is no body of its kind: a prism's or cylinder's `top` not above its `bottom`, a rod from a point to itself, a face naming a vertex the body does not have, a `polyhedron` that is not convex, a `mesh` that is not closed |
| `declared-basis` | warning | II.12.1.5 | a record a declaration's `basis` names has changed since (its hash differs) or is not in the model: the declaration is kept, and unconfirmed |
| `declared-faces` | warning | II.6.6.6 | a record's declared geometry holds 10 000 faces or more (each face of a polyhedron or a mesh, n + 2 for a prism of n points, 3 for a cylinder or a rod) |
| `railing-type` | error | II.12.2.1 | a railing's type has no `railing` payload |
| `railing-host` | error | II.12.2.2 | a railing on a stair names no `side`, one on a slab's or a shaft's outline no `edges`, or one on a wall's top or along a slab edge element a `side`, `edges` or `insets` |
| `railing-edges` | error | II.12.2.3 | a railing names an edge its host does not have (its `edgeIds`, else `<host id>:edge:<n>`) |
| `railing-run` | error | II.12.2.2 | a railing's edges do not follow one another round its host's outline as one run (naming every edge is a closed run) |
| `railing-posts` | error | II.12.2 | a railing's `posts.at` is not in increasing order |
| `railing-post-layout` | warning | II.12.2 | a given post stands past the railing's line's end, or two stand farther apart in plan than its type's `postSpacing` (by more than 0.5 mm): reported, not refused. The line of a railing on an outline is its run moved by its insets (Part IV, 11.2); with no host, its profile; on a stair it is not measured |
| `generic-points` | error | II.6.1.12 | a generic element's two profile points are one point |
| `generic-shape` | error | II.6.6.2 | a generic element has no declared geometry, its own or its type's |
| `edge-section` | error | II.5.6.1 | a slab edge type's L or U section whose flange is as deep as its depth, or whose web (a U's twice) is as wide as its width: it has no inside |
| `edge-chamfer` | error | II.5.6.2 | a slab edge type's chamfer on a rectangle or, with the proposal edgeNone, a section of the shape none, wider than its upstand's web, or higher than its depth less its flange |
| `edge-none` | error | II.5.6.1.2 | in 0.6, or in 0.5 with the proposal edgeNone, a slab edge section of the shape `none` without a `beam` (rule 2), with a `facing` (rule 3), on a framing family or beside a piece rule (rule 4), or a railing whose `hostId` names an element of it (rule 5); each names its rule |
| `water-outline` | error | II.6.3.4.2 | in 0.6, or in 0.5 with the proposal siteWater, a water element whose outline, its profile, is no simple polygon: fewer than three points, two in a row one, no area, or edges that cross or touch |
| `water-bottom` | error | II.6.3.4.3 | in 0.6, or in 0.5 with the proposal siteWater, a water element whose bottom lies at or over its surface |
| `water-dry` | warning | II.6.3.4.5 | in 0.6, or in 0.5 with the proposal siteWater, a water element whose surface lies wholly under the ground under it, dug or not: it holds no water, and has no body |
| `gutter-section` | error | II.5.6.3 | a gutter type's half-round section without its diameter, or its box section without its width or its depth |
| `edge-host` | error | II.6.1.6 | a slab edge element whose `hostEdgeId` is missing or names no edge of its host's outline |
| `gutter-host` | error | II.6.1.13 | a gutter without a `hostId`, or whose `hostEdgeId` is missing or names no edge of its roof's outline (a host that is no roof: `host-category`) |
| `edge-thickening` | error | IV.4.6.11 | a slab or a foundation whose thickened edges do not fit it: at a depth a beam reaches, the edges moved in by the beams' widths close no simple outline inside it, or a void reaches into them |
| `opening-hinge` | warning | II.6.5.6 | a door's or a side-hinged garage door's family that hinges at its `top` or its `bottom`: its operation is not defined |
| `opening-operation` | warning | II.6.5.6 | an opening family of another kind than `door` whose `operation` is `slide` or `pocket`: not read |
| `insulation-bti` | warning | II.6.9.4 | a pipe type's `pipe.bti` or a pipe's `mep.insulation.bti`, which is deprecated: the warning names the code and the thickness to write instead |
| `insulation-member` | warning | II.6.9.3 | a run's own `mep.insulation` gives `none` and more, a duct's a `bti`, or its own `code` without its own `thickness` |
| `component-host` | error | II.6.9.6 | a terminal whose type mounts on a pipe (a component) does not name a pipe of the model in `hostId`, or one whose type mounts on a duct names something other than a duct of the model there (a duct part with no `hostId` is valid; a dangling one is also `ref-missing`) |
| `component-along` | warning | II.6.9.7 | a component's `along` is past the end of its pipe or duct, by more than 1 mm; it stands at the run's end |
| `component-place` | warning | II.6.9.8 | a component's `levelId`, `profile` or `offset` is not where its pipe or duct and `along` put it, within 1 mm and 1°, or a component in a duct's `width` or `height` is not its size across, within 1 mm |
| `component-ports` | warning | II.6.9.9 | a type that mounts on a pipe or a duct has `connections` or `outlets` of its own |
| `room-tag` | error | II.13.6.4 | a tag of the field `room` does not name a room of the model |
| `connect-symbol` | error | II.13.6.7 | a line's end is joined (`connect`) to a detail item that is no symbol of the line's view |
| `application-invalid` | warning | VI.8 | a kept file whose `format` is a result manifest's or a proposal's (by its id or an earlier one) does not validate against its schema: kept, and not read as one; the model stays valid |
| `application-format` | warning | VI.8 | a kept file names an `openeik-result/…` or `openeik-proposal/…` format this tool does not implement: kept, and not read as one |
| `report-asset` | error | VI.8.2.1.2 | in 0.5, or in 0.4 with the proposal reports, a result manifest's report gives no asset's path, `assets/<sha256>.<ext>`, as its `asset`: a bare digest, another text, or none |
| `report-missing` | error | VI.8.2.1.2 | in 0.5, or in 0.4 with the proposal reports, a result manifest's report names an asset the folder does not hold (Part XV, 8, rule 2) |
| `bars-mandrel` | error | II.6.3.2.2 | in 0.5, or in 0.4 with the proposal barShapes, a bar set that gives its `legs` and no `mandrel` |
| `bars-legs` | warning | II.6.3.2.3 | in 0.5, or in 0.4 with the proposal barShapes, a bar set whose legs make no bar: a leg shorter than its bends take of it, R tan(θ/2) at each bent end, two points in a row that are one, or a turn straight back; a compiler derives it no body |
| `system-port` | error | II.6.9.1.5 | in 0.6, or in 0.5 with the proposal systems, a run's end whose record (`mep.joins`) names an element that is no terminal, a component in a run, or a port its terminal does not have; the end is then joined by where it lies |
| `system-port-place` | warning | II.6.9.1.5 | with the proposal systems, a run's end its record joins to a port, farther from the port's place than the larger of 5 mm and half the larger of the run's size and the port's |
| `system-port-twice` | warning | II.6.9.1.7 | with the proposal systems, a terminal's port that two runs' ends or more join, by their records or where they lie |
| `system-mixed` | warning | II.6.9.1.8 | with the proposal systems, a run's end its record joins to a port of another kind of system or category, or runs of one kind and two numbers that meet |
| `system-open` | warning | II.6.9.1.9 | with the proposal systems, a run's end that joins nothing, or a terminal's port that joins nothing while another of its ports is joined, of a kind of system the model has runs of |
| `system-loop` | warning | II.6.9.1.10 | with the proposal systems, a piece of network of a system that falls by gravity or carries air that closes a loop |
| `system-flow` | warning | II.6.9.1.11 | with the proposal systems, a stretch of a run that the medium reaches from both sides, or leaves to both sides (Part IV, 12.9, rule 6), once for each run |
| `quality-likely-railing` | warning | II.6.2 | with `--quality`: an element of another category looks like a railing |
| `quality-likely-window` | warning | II.6.2 | with `--quality`: an element of another category looks like a window |
| `quality-likely-door` | warning | II.6.2 | with `--quality`: an element of another category looks like a door |
| `quality-likely-stair` | warning | II.6.2 | with `--quality`: an element of another category looks like a stair, or a tread of one |
| `quality-likely-beam` | warning | II.6.2 | with `--quality`: an element of another category looks like a beam |
| `bulges-points` | error | III.15.2.4 | in 0.5, or in 0.4 with the proposal weight, a detail item whose `bulges` are not one for each of its `points`, on an item of a kind other than `line`, `region` or `mask`, or with an open line's last bulge not 0 ([Weight](#weight)) |
| `weight-hatch-strokes` | warning | III.15.1 | with `--quality`: a view holds 100 or more strokes that are parallel and of one length, a hatch drawn as its strokes ([Weight](#weight)) |
| `weight-split-path` | warning | III.15.1 | with `--quality`: a view holds 200 or more points where two open lines of one style meet end to end |
| `weight-duplicate-items` | warning | III.15.1 | with `--quality`: a view holds 10 or more items that repeat another of its items exactly, but for their ids |
| `weight-arc-points` | warning | III.15.2 | with `--quality`: a line, region or mask has 64 or more points on one circle, a full circle as its chords or an arc's chords four times finer than its paper shows |
| `weight-precision` | warning | III.15.3 | with `--quality`: a view's items give 1 000 or more numbers to more than three decimals |
| `weight-copies` | warning | III.15.4 | with `--quality`: a group of elements stands again, as it is, at 3 places or more, 24 records or more in all, of any kinds, where an original and copies would store it once |
| `weight-same-types` | warning | III.15.4 | with `--quality`: 20 or more types are another type again, but for their ids and names |
| `weight-mesh-prism` | warning | III.15.2 | with `--quality`: 10 or more declared bodies are meshes or polyhedra of one outline between two heights, prisms |
| `weight-shared-shape` | warning | III.15.4 | with `--quality`: 10 or more elements of one type carry the same declared geometry of their own, which their type would hold once |
| `weight-rebuild` | warning | III.15.8 | a command processor's advisory in a command's answer, never a refusal: in one session, a record deleted and one nearly the same created again. Not given by this package's processor yet |
| `weight-full-replace` | warning | III.15.8 | a command processor's advisory: a command sends a whole set to change a few of it, where a patch would do. Not given by this package's processor yet |
| `weight-svg-path` | warning | III.15.5 | with `--quality`: an issued SVG holds a path of 20 000 or more segments |
| `weight-svg-hatch` | warning | III.15.5 | with `--quality`: an issued SVG strokes 500 or more like strokes outside its patterns |
| `electrical-profile` | error | XIII.2.3.1 | in 0.2, or in 0.1 with the proposal electrical ([Proposals](#proposals)): an electrical element's profile is not exactly two points, `at` and `toward`, at least 1 mm apart in plan |
| `electrical-size` | error | XIII.2.3.3 | in 0.2, or in 0.1 with the proposal electrical: an electrical element's `width` or `height` differs from its type's, which sets them; a linear device's (a track, or a light on a ceiling or a floor at least three times as wide as it is deep) `height` differs from its type's, or its `width`, its own length, is not from 1 to 50 000 mm |
| `controls-kind` | error | XIII.2.3.4 | in 0.2, or in 0.1 with the proposal electrical: an element names what it controls (`electrical.controls`), and its type's kind is not `switch`, `dimmer`, `button` or `sensor` |
| `controls-missing` | error | XIII.2.3.4 | in 0.2, or in 0.1 with the proposal electrical: an id of `electrical.controls` names no element of category `electrical` |
| `controls-self` | error | XIII.2.3.4 | in 0.2, or in 0.1 with the proposal electrical: an element names itself in `electrical.controls` |
| `fire-emergency-light` | warning | XIII.2.3.7 | in 0.2, or in 0.1 with the proposal electrical, a `fire` type whose `fire.kind` is `emergencyLight`, deprecated at 0.2: an emergency luminaire is an `electrical` element of the kind `emergencyLight` |
| `light-kind` | error | XIII.2.3.6 | in 0.2, or in 0.1 with the proposal electrical: a type gives a luminaire's light output (`luminousFlux`, `colorTemperature`, `beamAngle`, `distribution`, and in 0.6, or in 0.5 with the proposal luminaireAim, `throw`), and its kind is not `light`, `spot`, `emergencyLight` or `track` |
| `luminaire-aim` | error | XIII.2.4.1 | in 0.6, or in 0.5 with the proposal luminaireAim, an electrical element that gives an aim, whose type is no luminaire: of a kind other than `light`, `spot`, `emergencyLight` and `track` |
| `circuit-missing` | error | XIII.3.3.1 | in 0.2, or in 0.1 with the proposal electrical: an element's `electrical.circuitId` names no circuit of the model |
| `circuit-board` | error | XIII.3.3.2 | in 0.2, or in 0.1 with the proposal electrical: a circuit's `boardId` names no element, or one that is not an electrical element of kind `board` or `meterCabinet` (`null` is the supply) |
| `circuit-designation-twice` | warning | XIII.3.3.3 | in 0.2, or in 0.1 with the proposal electrical: two circuits of one board have the same designation, or two supplies, which count as one board's circuits. The later by id is named, with the other |
| `board-cycle` | error | XIII.3.3.4 | in 0.2, or in 0.1 with the proposal electrical: following a board's feed, board by board (its `circuitId`, that circuit's `boardId`), comes back to it; each board on the loop is named |
| `feed-missing` | error | XIII.4.1.1 | in 0.2, or in 0.1 with the proposal electrical: `electrical.from` names no element of category `electrical` |
| `feed-other-circuit` | error | XIII.4.1.1 | in 0.2, or in 0.1 with the proposal electrical: a device that has `from` has no `circuitId`, or another than the device its `from` names |
| `feed-cycle` | error | XIII.4.1.2 | in 0.2, or in 0.1 with the proposal electrical: following `from`, device by device, comes back to where it started; each device on the loop is named |
| `lighting-view` | error | XIII.4.3.1 | in 0.2, or in 0.1 with the proposal electrical: a view gives a lighting scene (`display.lighting`), and its kind is not `3d` |
| `lighting-kind` | error | XIII.4.3.2 | in 0.2, or in 0.1 with the proposal electrical: an id of a lighting scene's `on` names an element that is no luminaire, an electrical element of the kind `light`, `spot`, `emergencyLight` or `track` |
| `lighting-dim` | error | XIII.4.3.3 | in 0.2, or in 0.1 with the proposal electrical: a key of a lighting scene's `dim` is not on: not in its `on`, or, where `on` is `"all"`, an element that is no luminaire |
| `lighting-missing` | warning | XIII.4.3.2 | in 0.2, or in 0.1 with the proposal electrical: an id of a lighting scene's `on` names no element of the model, a luminaire deleted since the scene was made; and, where `on` is `"all"`, a key of its `dim` that names none (XIII.4.3.4, the rule the finding names) |
| `run-invalid` | error | XIII.5.1 | in 0.2, or in 0.1 with the proposal electrical: a cable carrier or a modelled cable is no run as Part IV, 12.1 says of a pipe (no `mep`, not one height of `mep.z` for each point, fewer than two points, or all at one place) |
| `cable-to` | error | XIII.6.1 | in 0.2, or in 0.1 with the proposal electrical: a modelled cable's `cable.to` names no electrical element, or one whose `circuitId` is not `cable.circuitId` |
| `cable-carrier` | error | XIII.6.2 | in 0.2, or in 0.1 with the proposal electrical: an id of `cable.carrierIds` names no element of category `cableCarrier` |
| `cable-ends` | warning | XIII.6.4 | in 0.2, or in 0.1 with the proposal electrical: no piece of a modelled leg starts within 500 mm of its upstream device or board, or none ends within 500 mm of its `to`, measured in 3D from each point at `elev(levelId) + offset` or its height; a leg of a supply only at its end. Named on the leg's first piece by id, at `/cable/to` |
| `sheet-application-record` | warning | XIV.2.1.1 | in a model of 0.2, a sheet that does not give every member Part XIV, 2.1 requires (`number`, `name`, `revision`, `width`, `height` and `viewports`): a sheet of 0.1 kept as an application record, which no drawing is issued on; the migration to 0.2 leaves it so and names it (Part I, 9.8, rule 5) |
| `sheet-number-twice` | error | XIV.2.4.1 | in 0.2, or in 0.1 with the proposal drawings ([Proposals](#proposals)): two sheets have the same number, or numbers whose path segments fold to one: each names a folder of drawings/issued/ |
| `sheet-number-pattern` | warning | XIV.2.4.2 | in 0.2, or in 0.1 with the proposal drawings: a sheet's number does not match the drawing profile's numbering |
| `sheet-viewport-view` | error | XIV.2.4.3 | in 0.2, or in 0.1 with the proposal drawings: a sheet's viewport places a view that is not in the model |
| `sheet-viewport-twice` | error | XIV.2.4.3 | in 0.2, or in 0.1 with the proposal drawings: two viewports of a sheet have the same id |
| `sheet-detail-number-twice` | warning | XIV.2.4.4 | in 0.2, or in 0.1 with the proposal drawings: two viewports of a sheet have the same detail number |
| `sheet-title-block` | warning | XIV.2.4.5 | in 0.2, or in 0.1 with the proposal drawings: a sheet's titleBlockId, not none, names no title block of the model |
| `sheet-renumbered` | error | XIV.2.4.7 | in 0.2, or in 0.1 with the proposal drawings: a sheet that has an issued drawing now carries another number, and the drawing's register does not end in withdrawn |
| `scale-bar` | error | XIV.2.2.1.3 | in 0.6, or in 0.5 with the proposal scaleBars: a viewport's scale bar on a 3D view, whose picture has no scale (rule 2), or whose marks do not begin at 0, rise and end at its length (rule 3); each names its rule |
| `scale-bar-paper` | warning | XIV.2.2.1.4 | in 0.6, or in 0.5 with the proposal scaleBars: a viewport's scale bar that does not lie on its sheet's paper at its viewport's scale |
| `detail-ref-unresolved` | warning | XIV.3.4.1 | in 0.2, or in 0.1 with the proposal drawings: a reference of a detail item names no record of the model: the item is an orphan, kept |
| `provenance-agent` | error | XIV.3.4.2 | in 0.2, or in 0.1 with the proposal drawings: an item whose provenance.by is agent lacks agent, actingFor, instruction.digest, made.version or status (by schema) |
| `provenance-accepted` | error | XIV.3.4.3 | in 0.2, or in 0.1 with the proposal drawings: an accepted item lacks acceptedBy or acceptedAt (by schema), or is accepted by an agent |
| `issued-with-proposed-item` | error | XIV.3.4.4 | in 0.2, or in 0.1 with the proposal drawings: a sheet was issued while a view placed on it held an item whose provenance.status is proposed, and its detail chunks are unchanged since; a dependent view holds its primary's items, which it draws (XIV.3) |
| `provenance-instruction` | error | XIV.3.4.5 | in 0.2, or in 0.1 with the proposal drawings: provenance.instruction holds more than digest and ref: never the instruction's text (by schema) |
| `profile-schema` | error | XIV.4.3.1 | in 0.2, or in 0.1 with the proposal drawings: the drawing profile does not validate against its schema, or its numbering is no regular expression |
| `profile-code-twice` | error | XIV.4.3.2 | in 0.2, or in 0.1 with the proposal drawings: a code is twice in the drawing profile's statuses, purposes, decisions or reviewStates, or a family twice in its fonts |
| `profile-missing` | error | XIV.4.3.3 | in 0.2, or in 0.1 with the proposal drawings: the folder holds an issued drawing and no drawings/profile.json |
| `profile-font-missing` | warning | XIV.4.3.4 | in 0.2, or in 0.1 with the proposal drawings: a font of the drawing profile is not in the folder at assets/<sha256>.<ext>: no one else can draw the sheet again |
| `profile-fonts` | error | XIV.4.3.5 | in 0.2, or in 0.1 with the proposal drawings: the folder holds a linked issued drawing, and the drawing profile gives no `fonts`; a profile that only gives a model's reviews their codes needs none |
| `person-schema` | error | XIV.5.2.1 | in 0.2, or in 0.1 with the proposal drawings: a person's record does not validate against its schema |
| `person-unknown` | error | XIV.5.2.2 | in 0.2, or in 0.1 with the proposal drawings: a member of the part's files that names a person names no record of project/people/ |
| `person-email` | error | XIV.5.2.3 | in 0.2, or in 0.1 with the proposal drawings: a member that names a person, or a person's id, holds an email address |
| `key-twice` | error | XIV.5.2.4 | in 0.2, or in 0.1 with the proposal drawings: a keyid is used twice in the registry |
| `key-window` | error | XIV.5.2.4 | in 0.2, or in 0.1 with the proposal drawings: a key's validUntil is before its validFrom |
| `key-removed` | error | XIV.5.2.5 | in 0.2, or in 0.1 with the proposal drawings: a key of the registry that a sign-off names (a drawing's, an issue's statement, terms accepted), in the earlier version or this one, was removed since an earlier version, or its `algorithm` or `public` changed, where a writer ends it with `validUntil`. Needs the history: `drawingHistoryChecks`, against each earlier version given with its files, names the person's record; not checked by `checkFolder` |
| `svg-bytes` | error | XIV.6.12.1 | in 0.2, or in 0.1 with the proposal drawings: an issued SVG is not UTF-8 without a byte-order mark, or holds CR or NUL (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-markup` | error | XIV.6.12.2 | in 0.2, or in 0.1 with the proposal drawings: an issued SVG holds an XML declaration, DOCTYPE, entity declaration, comment, processing instruction or CDATA section (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-not-canonical` | error | XIV.6.12.3 | in 0.2, or in 0.1 with the proposal drawings: an issued SVG is not its own Canonical XML 1.1 form followed by one LF (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-lines` | warning | XIV.6.12.4 | in 0.2, or in 0.1 with the proposal drawings: an issued SVG is not written one element per line (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-root` | error | XIV.6.12.5 | in 0.2, or in 0.1 with the proposal drawings: an issued SVG's root is not svg in the SVG namespace, or another namespace is declared (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-paper` | error | XIV.6.12.6 | in 0.2, or in 0.1 with the proposal drawings: an issued SVG's width, height or viewBox is not the sheet's paper in mm (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-title` | error | XIV.6.12.7 | in 0.2, or in 0.1 with the proposal drawings: an issued SVG's first child is not a title that is not empty (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-element` | error | XIV.6.12.8 | in 0.2, or in 0.1 with the proposal drawings: an issued SVG holds an element the profile does not allow (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-attribute` | error | XIV.6.12.9 | in 0.2, or in 0.1 with the proposal drawings: an element of an issued SVG holds an attribute the profile does not allow it (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-value` | error | XIV.6.12.10 | in 0.2, or in 0.1 with the proposal drawings: a colour, transform, orient or unit of an issued SVG is not as the profile says (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-number` | error | XIV.6.12.11 | in 0.2, or in 0.1 with the proposal drawings: a number of an issued SVG is not written as the profile says (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-reference` | error | XIV.6.12.12 | in 0.2, or in 0.1 with the proposal drawings: an href or url() of an issued SVG names no element of the file of the right kind, or something outside it (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-use` | error | XIV.6.12.13 | in 0.2, or in 0.1 with the proposal drawings: a use of an issued SVG recurses, or the file expanded through its uses holds more than 1 000 000 elements (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-id-twice` | error | XIV.6.12.14 | in 0.2, or in 0.1 with the proposal drawings: an id is used twice in an issued SVG (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-too-large` | error | XIV.6.12.15 | in 0.2, or in 0.1 with the proposal drawings: an issued SVG is over 64 MiB, or holds over 2 000 000 elements or a depth over 32 (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-font` | error | XIV.6.12.16 | in 0.2, or in 0.1 with the proposal drawings: a font-family of an issued SVG names no family of the drawing profile's font set, or the derivation's fonts do not name each family used with the set's digest (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-layers` | error | XIV.6.12.17 | in 0.2, or in 0.1 with the proposal drawings: an issued SVG's root children, viewport groups or layers are not in the order the profile says, with one sheet layer, before the viewport groups or after them, or the viewport groups are not the derivation's (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-order` | error | XIV.6.12.18 | in 0.2, or in 0.1 with the proposal drawings: where generator.order is id, the children of a layer of an issued SVG are not sorted by id (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-derived-unnamed` | error | XIV.6.12.19 | in 0.2, or in 0.1 with the proposal drawings: a drawn primitive of a derived layer, but a 3D view's picture and the generator's annotation groups, has no ancestor-or-self carrying data-eik-id or data-eik-record, or several (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-element-twice` | error | XIV.6.12.20 | in 0.2, or in 0.1 with the proposal drawings: a derived layer of an issued SVG holds two groups of one element (where generator.order is paint, two of one element and part), an element's groups there are not all parts numbered 0, 1, 2, … in the order of the file, or data-eik-part is on anything but a part (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-element-unknown` | error | XIV.6.12.21 | in 0.2, or in 0.1 with the proposal drawings: a data-eik-id of an issued SVG names no element of the model, while the records it read are unchanged (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-hash` | error | XIV.6.12.22 | in 0.2, or in 0.1 with the proposal drawings: an element's group or a shared path of an issued SVG has no data-eik-hash, or one that is not the hash of its canonical bytes (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-annotation` | error | XIV.6.12.23 | in 0.2, or in 0.1 with the proposal drawings: an annotation group of an issued SVG names no item of its viewport's view, or its origin disagrees with its layer (by `checkDrawingSvg`, `src/drawings-svg.js`). A dependent view's items are its primary's, which it draws (XIV.3), checked while they are those of the issue: the derivation names the primary as it is now, or the read set holds its view.json and its chunks as they are now |
| `svg-viewport` | error | XIV.6.12.24 | in 0.2, or in 0.1 with the proposal drawings: data-eik-viewport or data-eik-view of an issued SVG disagree with the derivation and the sheet (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-derivation` | error | XIV.6.12.25 | in 0.2, or in 0.1 with the proposal drawings: an issued SVG holds no metadata openeik-derivation whose text is the derivation in canonical JSON, valid against its schema (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-outside-crop` | warning | XIV.6.12.26 | in 0.2, or in 0.1 with the proposal drawings: an element's group of an issued SVG lies wholly outside its viewport's crop (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `svg-anchor` | error | XIV.6.12.27 | in 0.2, or in 0.1 with the proposal drawings: an annotation's data-eik-anchor is not attached, moved, elementOnly or orphaned (by `checkDrawingSvg`, `src/drawings-svg.js`) |
| `issued-file-unknown` | warning | XIV.7.4.1 | in 0.2, or in 0.1 with the proposal drawings: a drawing's folder holds a file that is none of drawing.svg, revision.json, read-set.json and signoffs/<n>.json |
| `issued-folder-name` | error | XIV.7.4.2 | in 0.2, or in 0.1 with the proposal drawings: a drawing's folder's name, read back, is not its revision record's drawing |
| `drawing-file-schema` | error | XIV.7.4.3 | in 0.2, or in 0.1 with the proposal drawings: a drawing file names no format, or another than the format of its place: it is not read as one |
| `issued-file-changed` | error | XIV.7.4.4 | in 0.2, or in 0.1 with the proposal drawings: since an earlier version, an issued drawing's `drawing.svg`, `revision.json` or `read-set.json` was removed, or changed while `revision.json` is no later revision of the same drawing (its `sequence` greater; a change of status alone keeps the SVG and the read set as they were, 8.2), or a sign-off of `signoffs/` was removed or changed. Needs the history: `drawingHistoryChecks`, naming each file; not checked by `checkFolder` |
| `asset-digest` | error | XIV.7.4.5 | in 0.1 with the proposal drawings and not the proposal assets: an asset's name is not the SHA-256 of its bytes and one of the extensions of Part XIV, 7.3 of 0.1 (`pdf`, `ttf`, `otf` and `asice`); in 0.2, Part XV, 2 says what an asset is, and reports a file that is none (asset-name) |
| `register-missing` | error | XIV.7.4.6 | in 0.2, or in 0.1 with the proposal drawings: a folder of drawings/issued/ has no register, or a register no folder |
| `revision-schema` | error | XIV.8.5.1 | in 0.2, or in 0.1 with the proposal drawings: a revision record does not validate against its schema |
| `revision-derivation` | error | XIV.8.5.2 | in 0.2, or in 0.1 with the proposal drawings: a revision's drawing, revision or title is not its derivation's, or its drawing not the number of the sheet the derivation names, unchanged since |
| `revision-svg-digest` | error | XIV.8.5.3 | in 0.2, or in 0.1 with the proposal drawings: a revision's svg.sha256 or svg.bytes is not drawing.svg's (an unlinked revision's file.sha256 or file.bytes not its asset's) |
| `revision-derivation-differs` | error | XIV.8.5.4 | in 0.2, or in 0.1 with the proposal drawings: a revision's derivation is not the derivation in its drawing.svg, member for member |
| `revision-read-set` | error | XIV.8.5.5 | in 0.2, or in 0.1 with the proposal drawings: a derivation's readSet.hash is not read-set.json's hash, or its count not its number of distinct pairs |
| `revision-sequence` | error | XIV.8.5.6 | in 0.2, or in 0.1 with the proposal drawings: a revision's sequence is not its superseded revision's plus 1, or supersedes disagrees with the register |
| `revision-status` | error | XIV.8.5.7 | in 0.2, or in 0.1 with the proposal drawings: a revision's status is not of the drawing profile, or its state, sharedFor or purpose disagree with it |
| `revision-code` | warning | XIV.8.5.8 | in 0.2, or in 0.1 with the proposal drawings: a revision's code is not the one the profile's series gives for its status and sequence |
| `revision-date` | warning | XIV.8.5.10 | in 0.2, or in 0.1 with the proposal drawings: a revision's date is earlier than the superseded revision's |
| `revision-by-missing` | warning | XIV.8.5.12 | in 0.2, or in 0.1 with the proposal drawings: a shared, published or as-built revision does not say who issued it (`by`) |
| `unlinked-shape` | error | XIV.8.5.11 | in 0.2, or in 0.1 with the proposal drawings: an unlinked revision has svg or derivation, or no file, or its folder holds drawing.svg or read-set.json |
| `read-set-shape` | error | XIV.9.7.1 | in 0.2, or in 0.1 with the proposal drawings: a read set does not validate, is not of its revision, or a list is not sorted by path, each path once |
| `read-set-viewports` | error | XIV.9.7.2 | in 0.2, or in 0.1 with the proposal drawings: a read set's viewports are not exactly the derivation's, by id and view |
| `read-set-incomplete` | error | XIV.9.7.3 | in 0.2, or in 0.1 with the proposal drawings: a read set lacks the pair of an element drawn, its type, the view or a detail chunk, or the sheet's list one of the sheet, its title block, the project, the levels or the profile (a missing type, or a pair of the sheet's list, names rule XIV.9.7.4) |
| `read-set-volume` | error | XIV.9.7.5 | in 0.2, or in 0.1 with the proposal drawings: at the revision's source version (its derivation's `source.root`), an element whose box (9.3) meets a viewport's volume and that neither `read` nor `inVolume` holds, or an `inVolume` pair whose hash is not its record's there, or of what it does not hold. Needs the source version: `drawingHistoryChecks`, where the history given holds it with its files (else listed as not checked), at `/viewports/<i>/inVolume`; not checked by `checkFolder` |
| `read-set-self-check` | error | XIV.9.7.6 | in 0.2, or in 0.1 with the proposal drawings: a revision is stale against its own source version, so its read set is incomplete: steps 2 to 4 of 9.4 find a cause there that rule 5 does not name (a pair of the sheet's list or of a viewport's `read` whose record is another or gone, a sheet record or a detail chunk its lists do not hold). Needs the source version: `drawingHistoryChecks`, at `/sheet` or `/viewports/<i>/read`; not checked by `checkFolder` |
| `cloud-change-unknown` | error | XIV.10.3.1 | in 0.2, or in 0.1 with the proposal drawings: a cloud or mark of the revisions layer names no change item of the revision, or no viewport of the sheet |
| `change-twice` | error | XIV.10.3.2 | in 0.2, or in 0.1 with the proposal drawings: two change items of a revision have the same id |
| `cloud-when-off` | error | XIV.10.3.3 | in 0.2, or in 0.1 with the proposal drawings: a revision whose clouds are off or throughout holds a cloud of its own |
| `cloud-earlier` | warning | XIV.10.3.4 | in 0.2, or in 0.1 with the proposal drawings: the revisions layer holds an earlier revision's cloud, and the profile keeps no earlier clouds |
| `change-unlisted` | warning | XIV.10.3.6 | in 0.2, or in 0.1 with the proposal drawings: an element whose `data-eik-hash` differs between the superseded revision's SVG and this one's (any of its parts', in any viewport), or that is in one only, and that no change item's `elements` names. Needs the superseded SVG, a `drawing.svg` of the drawing among the versions given whose SHA-256 is `supersedes.svg`: `drawingHistoryChecks`, on `revision.json` at `/changes`; not checked by `checkFolder` |
| `register-schema` | error | XIV.11.3.1 | in 0.2, or in 0.1 with the proposal drawings: a register does not validate against its schema |
| `register-order` | error | XIV.11.3.2 | in 0.2, or in 0.1 with the proposal drawings: a register's issued entries are not in sequence from 1, a rendition names a sequence not issued before it, or an entry follows withdrawn |
| `register-behind` | error | XIV.11.3.3 | in 0.2, or in 0.1 with the proposal drawings: a register's last issued entry is not the drawing's folder: its sequence, record, svg or asset |
| `register-rewritten` | error | XIV.11.3.4 | in 0.2, or in 0.1 with the proposal drawings: a register does not hold every entry of an earlier version's, unchanged and in order (each, by its canonical form, in the same order among the later entries), or was removed. Needs the history: `drawingHistoryChecks`; not checked by `checkFolder` |
| `register-kind` | error | XIV.11.3.5 | in 0.2, or in 0.1 with the proposal drawings: a register's kind is not its revisions', or an entry does not give what its kind gives |
| `issue-id` | error | XIV.12.2.1 | in 0.2, or in 0.1 with the proposal drawings: an issue does not validate, or its id is not its name read back |
| `issue-revision-unknown` | error | XIV.12.2.2 | in 0.2, or in 0.1 with the proposal drawings: a revision an issue lists is not in its drawing's register with that sequence and record |
| `issue-purpose` | error | XIV.12.2.3 | in 0.2, or in 0.1 with the proposal drawings: an issue's purpose is not a code of the drawing profile's purposes |
| `issue-drawing-twice` | error | XIV.12.2.4 | in 0.2, or in 0.1 with the proposal drawings: an issue lists a drawing twice |
| `review-id` | error | XIV.13.4.1 | in 0.2, or in 0.1 with the proposal drawings: a review does not validate, or its id is not its name read back |
| `review-revision-unknown` | error | XIV.13.4.2 | in 0.2, or in 0.1 with the proposal drawings: a review's drawing, sequence, svg or asset, and record name no revision of the drawing's register |
| `review-code` | error | XIV.13.4.3 | in 0.2, or in 0.1 with the proposal drawings: a review's profile, an item's state or a decision is not the drawing profile's; where the profile lists no `reviewStates` or no `decisions`, no state or decision is |
| `review-anchor-unknown` | warning | XIV.13.4.4 | in 0.2, or in 0.1 with the proposal drawings: a review item's anchor names an element the reviewed revision does not draw, or a viewport not of its sheet |
| `review-after-close` | error | XIV.13.4.5 | in 0.2, or in 0.1 with the proposal drawings: an item, reply, state or decision of a closed review is later than its close |
| `review-carried-from` | warning | XIV.13.4.6 | in 0.2, or in 0.1 with the proposal drawings: an item's carriedFrom names no item of another review of the same drawing the folder holds |
| `review-change-unknown` | warning | XIV.13.4.7 | in 0.2, or in 0.1 with the proposal drawings: a review item's change names no change item of the reviewed revision |
| `review-shape` | error | XIV.13.4.9 | in 0.2, or in 0.1 with the proposal drawings: a review item's shape breaks its `form`: a closed polyline; a polygon, rectangle or ellipse that is not closed; a polygon of fewer than three points; a rectangle or an ellipse that is not the four corners of a rectangle in order, within 0.01 mm |
| `signoff-shape` | error | XIV.14.7.1 | in 0.2, or in 0.1 with the proposal drawings: a sign-off does not validate, or its payload does not decode to an in-toto Statement v1 |
| `signoff-predicate-type` | error | XIV.14.7.2 | in 0.2, or in 0.1 with the proposal drawings: a sign-off's predicateType is not the drawing sign-off's, or its predicate does not validate |
| `signoff-subject` | error | XIV.14.7.3 | in 0.2, or in 0.1 with the proposal drawings: a sign-off's subjects are not the drawing's SVG (or asset) and revision.json with the digests of the register's entry it names |
| `signoff-predicate` | error | XIV.14.7.4 | in 0.2, or in 0.1 with the proposal drawings: a sign-off's predicate's drawing, sequence, revision or status are not those of a revision of the register |
| `signoff-key-unknown` | error | XIV.14.7.5 | in 0.2, or in 0.1 with the proposal drawings: a sign-off's signer names no person of the registry, or a signature's keyid no key of that record |
| `signoff-agent-action` | error | XIV.14.7.6 | in 0.2, or in 0.1 with the proposal drawings: an agent signs another action than checkedByTool, or a person signs checkedByTool |
| `signoff-decision` | error | XIV.14.7.7 | in 0.2, or in 0.1 with the proposal drawings: a sign-off's decision is not a code of the profile's decisions, of which a profile that lists none has none (a warning when a decision action gives none) |
| `signoff-timestamp-missing` | error | XIV.14.7.8 | in 0.2, or in 0.1 with the proposal drawings: a signature of a sign-off has no time-stamp |
| `signoff-signature` | error | XIV.14.7.9 | in 0.2, or in 0.1 with the proposal drawings: a sign-off's signature or time-stamp does not verify, or the key was not valid at the time-stamp's time (by `verifyDrawingSignoffs`, `src/drawings-verify.js`, not `checkFolder`) |
| `signoff-withdraws` | error | XIV.14.7.10 | in 0.2, or in 0.1 with the proposal drawings: a withdrawal names no sign-off of the same revision by the same signer |
| `signoff-review` | error | XIV.14.7.11 | in 0.2, or in 0.1 with the proposal drawings: a sign-off's review is not a closed review of the same revision by its hash |
| `signoff-required` | warning | XIV.14.7.12 | in 0.2, or in 0.1 with the proposal drawings: a sign-off the profile requires for the revision's status is not present, or withdrawn |
| `signoff-name` | warning | XIV.14.7.13 | in 0.2, or in 0.1 with the proposal drawings: a sign-off's file is not named s- and the first 12 hexadecimal digits of its envelope's hash |
| `rendition-unregistered` | error | XIV.15.2.1 | in 0.2, or in 0.1 with the proposal drawings: a PDF asset kept in the folder is named by no register |
| `rendition-unsigned` | warning | XIV.15.2.5 | in 0.2, or in 0.1 with the proposal drawings: a register keeps an unsigned rendition, which is derived: its entry says it is unsigned, or the PDF holds no signature over the whole file, whose message digest is that of the bytes it covers, and which covers its attachments |
| `rendition-unreadable` | error | XIV.15.2.2 | a rendition that is no PDF this reader reads: no %PDF- header, or no catalog (`checkRendition`, and `checkFolder` for each rendition a register keeps) |
| `rendition-pdfa` | error | XIV.15.2.2 | a rendition that is not PDF/A-3b: its identification, or a requirement of ISO 19005-3 that a reader of its structure decides |
| `rendition-page` | error | XIV.15.2.2 | a rendition's page is not the sheet's paper to within half a point, or its pages are not one for each revision it prints |
| `rendition-attachment` | error | XIV.15.2.2 | a rendition lacks an attachment of 15.1, or attaches one with another relationship or, the SVG, another media type |
| `rendition-attachment-bytes` | error | XIV.15.2.3 | an attachment of a rendition is not byte for byte the issued file |
| `rendition-note` | error | XIV.15.3.1 | a rendition's page carries no margin note below the drawing frame, or the note reaches above it, runs off the page or lies over the drawing |
| `rendition-note-names` | error | XIV.15.3.2 | a rendition's note does not name the drawing's number, its revision code, the building or the version |
| `rendition-qr` | error | XIV.15.3.3 | a rendition's page has no QR code that decodes to a URL naming the revision by its SVG's SHA-256, or it is not at the bottom right corner on a white square |
| `rendition-date` | error | XIV.15.3.4 | a date a rendition holds is not the revision's date, or holds a time of day |
| `rendition-id` | error | XIV.15.3.4 | a rendition's trailer has no ID of two byte strings |
| `rendition-not-checked` | info | XIV.15 | a rule of 15.2 or 15.3, or a part of one, that the rendition's checks could not check, and why |
| `model-review-schema` | error | XVIII.2.5.1 | in 0.2, or in 0.1 with the proposal review ([Proposals](#proposals)): a model review, `project/reviews/<review>.json`, does not read, names another format, does not validate against its schema, or its id is not its name read back |
| `model-review-code` | error | XVIII.2.5.2 | in 0.2, or in 0.1 with the proposal review: a model review's profile, an item's state or a decision is not the drawing profile's (where it lists no `reviewStates` or no `decisions`, none is), or the folder holds no drawing profile |
| `model-review-reviewer` | error | XVIII.2.5.3 | in 0.2, or in 0.1 with the proposal review: a model review's reviewer is not a person of the registry of the kind `person`: an agent gives no decision |
| `model-review-anchor` | error | XVIII.2.5.4 | in 0.2, or in 0.1 with the proposal review: an anchor names an element the reviewed version does not hold (a warning), or a hash that is not its record's there (by `checkReviewAnchors`, `src/review-anchors.js`, with that version, not `checkFolder`) |
| `model-review-after-close` | error | XVIII.2.5.5 | in 0.2, or in 0.1 with the proposal review: an item, reply, state or decision of a closed model review is later than its close |
| `model-review-carried-from` | warning | XVIII.2.5.6 | in 0.2, or in 0.1 with the proposal review: an item's `carriedFrom` names no item of another review, a model review or a drawing's, that the folder holds |
| `model-review-camera` | error | XVIII.2.5.7 | in 0.2, or in 0.1 with the proposal review: a viewpoint's camera has a direction or an up that is zero, or the two are parallel, or it gives the field of view or the height its projection does not take |
| `model-review-section` | error | XVIII.2.5.8 | in 0.2, or in 0.1 with the proposal review: a viewpoint's section has a plane whose normal is zero, or a box whose min is not below its max on each axis |
| `model-review-shape` | error | XVIII.2.5.9 | in 0.2, or in 0.1 with the proposal review: a model review item's shape breaks its form, as XIV.13.4, rule 9 says |
| `model-review-issue` | error | XVIII.2.5.10 | in 0.2, or in 0.1 with the proposal review: a model review's `issue` names no issue of the folder by its record's hash, or one that does not release the reviewed version |
| `issue-version-twice` | error | XVIII.3.2.1 | in 0.2, or in 0.1 with the proposal review: an issue lists a version twice, by its root |
| `issue-rendition-of` | error | XVIII.3.2.2 | in 0.2, or in 0.1 with the proposal review: an issue's rendition (a print) was printed from a version or a revision that the issue does not release |
| `issue-version-unknown` | error | XVIII.3.2.4 | in 0.2, or in 0.1 with the proposal review: a version an issue releases whose `root` no version of the building's history has, or, where the issue and the history both give its id, no version of that id with that root. Needs the whole history: `drawingHistoryChecks` with `complete: true` (without it, listed as not checked), at `/versions/<j>`; no static check reports it |
| `issue-signoff-shape` | error | XVIII.4.3.1 | in 0.2, or in 0.1 with the proposal review: a statement about an issue, `drawings/issues/<issue>/signoffs/<n>.json`, does not validate, its payload is no in-toto Statement v1, its predicateType is not `https://openeik.org/attestation/issue/v0.1`, or its predicate does not validate |
| `issue-signoff-subject` | error | XVIII.4.3.2 | in 0.2, or in 0.1 with the proposal review: a statement about an issue's subject is not exactly the issue record of its folder by its hash, or its predicate's issue is not that issue |
| `issue-signoff-signer` | error | XVIII.4.3.3 | in 0.2, or in 0.1 with the proposal review: a statement about an issue's signer is no person of the registry of the kind `person`, or a signature's keyid no key of that record |
| `issue-signoff-action` | error | XVIII.4.3.4 | in 0.2, or in 0.1 with the proposal review: an `issued` statement is not signed by the issue's `sent.by`, or a `received` one neither by a recipient the issue names by `person` nor by a person a receipt of the issue names as its recipient |
| `issue-signoff-timestamp` | error | XVIII.4.3.5 | in 0.2, or in 0.1 with the proposal review: a signature of a statement about an issue has no time-stamp |
| `issue-signoff-signature` | error | XVIII.4.3.6 | in 0.2, or in 0.1 with the proposal review: a statement about an issue's signature or time-stamp does not verify, or the key was not valid at the time-stamp's time (by `verifyReviewStatements`, `src/review-verify.js`, not `checkFolder`) |
| `issue-signoff-withdraws` | error | XVIII.4.3.7 | in 0.2, or in 0.1 with the proposal review: a withdrawal names no statement of the same issue by the same signer |
| `issue-signoff-name` | warning | XVIII.4.3.8 | in 0.2, or in 0.1 with the proposal review: a statement about an issue is not named `s-` and the first 12 hexadecimal digits of its envelope's hash |
| `receipt-shape` | error | XVIII.5.3.1 | in 0.2, or in 0.1 with the proposal review: a host's receipt, `drawings/issues/<issue>/receipts/<n>.json`, does not validate, its payload is no in-toto Statement v1, its predicateType is not `https://openeik.org/attestation/issue-receipt/v0.1`, or its predicate does not validate |
| `receipt-subject` | error | XVIII.5.3.2 | in 0.2, or in 0.1 with the proposal review: a receipt's subject is not exactly the issue record of its folder by its hash, or its predicate's issue is not that issue |
| `receipt-recipient` | error | XVIII.5.3.3 | in 0.2, or in 0.1 with the proposal review: a receipt's recipient is not one the issue names, as it names them, and the receipt gives no `sentBy` or no `transmittal`, which a recipient the host sent the issue to needs |
| `receipt-event-order` | error | XVIII.5.3.4 | in 0.2, or in 0.1 with the proposal review: a receipt's events are not in the order of their times, or one is later than the receipt |
| `receipt-event-unknown` | error | XVIII.5.3.5 | in 0.2, or in 0.1 with the proposal review: a receipt's event names a revision or a version the issue does not release, a print it does not name and gives no `of`, or, with `of`, a print of what it does not release |
| `receipt-timestamp` | error | XVIII.5.3.6 | in 0.2, or in 0.1 with the proposal review: a signature of a receipt has no time-stamp |
| `receipt-signature` | error | XVIII.5.3.7 | in 0.2, or in 0.1 with the proposal review: a receipt's signature or time-stamp does not verify with a key of a host's file of keys given whose `host.name` is the receipt's (XVIII.5.6), or the key was not valid at the time-stamp's time (by `verifyReviewStatements` and `verifyReceipts`, `src/review-verify.js`, not `checkFolder`) |
| `receipt-earlier` | warning | XVIII.5.3.8 | in 0.2, or in 0.1 with the proposal review: a host's later receipt for a recipient does not hold every event of that host's earlier one, the receipts of one host told by their `host.name`; two hosts' receipts are not compared |
| `receipt-name` | warning | XVIII.5.3.9 | in 0.2, or in 0.1 with the proposal review: a receipt is not named `s-` and the first 12 hexadecimal digits of its envelope's hash |
| `terms-shape` | error | XVIII.6.2.1 | in 0.2, or in 0.1 with the proposal review: a record of terms accepted, `project/terms-accepted/<n>.json`, does not validate, its payload is no in-toto Statement v1, its predicateType is not `https://openeik.org/attestation/terms-accepted/v0.1`, or its predicate does not validate |
| `terms-subject` | error | XVIII.6.2.2 | in 0.2, or in 0.1 with the proposal review: terms accepted name other subjects than the terms by their digest and, for an issue, the issue record by its hash |
| `terms-person` | error | XVIII.6.2.3 | in 0.2, or in 0.1 with the proposal review: the person who accepted terms is no person of the registry of the kind `person` |
| `terms-signer` | error | XVIII.6.2.4 | in 0.2, or in 0.1 with the proposal review: terms accepted by a person's own signature (`by` `person`) are signed with a key that is not that person's |
| `terms-for` | error | XVIII.6.2.5 | in 0.2, or in 0.1 with the proposal review: terms accepted for a project that is not the building's, or for an issue the folder does not hold by that hash |
| `terms-timestamp` | error | XVIII.6.2.6 | in 0.2, or in 0.1 with the proposal review: a signature of a record of terms accepted has no time-stamp |
| `terms-signature` | error | XVIII.6.2.7 | in 0.2, or in 0.1 with the proposal review: a record of terms accepted's signature or time-stamp does not verify, by the person's key or, attested `by` `host`, the host's (XVIII.5.6), or the key was not valid at the time-stamp's time (by `verifyReviewStatements`, `src/review-verify.js`, not `checkFolder`) |
| `terms-name` | warning | XVIII.6.2.8 | in 0.2, or in 0.1 with the proposal review: a record of terms accepted is not named `s-` and the first 12 hexadecimal digits of its envelope's hash |
| `owners-schema` | error | XVI.2.1 | in 0.2, or in 0.1 with the proposal ownership: `project/owners.json` does not read as I-JSON, names another format, does not validate against its schema, or is not in the stored form (then `stored-form`) |
| `owners-party-twice` | error | XVI.2.2 | in 0.2, or in 0.1 with the proposal ownership: a party's id is in the owners file twice |
| `owners-party-unknown` | error | XVI.2.2 | in 0.2, or in 0.1 with the proposal ownership: a rule's owners name a party the owners file does not have |
| `owners-glob` | error | XVI.3.2 | in 0.2, or in 0.1 with the proposal ownership: a rule's path is no glob (empty, a `/` at either end, an empty segment, `.` or `..`) |
| `layout-mixed` | warning | III.4.4.7 | in 0.2, or in 0.1 with the proposal ownership: a folder holds records in both layouts, some where only 0.1's puts them and others where only the owners' does |
| `asset-name` | error | XV.2.3 | in 0.2, or in 0.1 with the proposal assets: a file of `assets/` is not named by the SHA-256 of its bytes and an extension: no asset, left alone, never in a version |
| `asset-folder` | error | XV.2.1 | in 0.2, or in 0.1 with the proposal assets: `assets/` holds a folder |
| `asset-kind` | error | XV.4.1 | in 0.2, or in 0.1 with the proposal assets: an asset's extension is none of `pdf`, `ttf`, `otf`, `asice`, `png`, `jpg` |
| `asset-size` | error | XV.4.2 | in 0.2, or in 0.1 with the proposal assets: a file of `assets/` larger than 64 MiB |
| `asset-start` | warning | XV.4.1 | in 0.2, or in 0.1 with the proposal assets: an asset's bytes do not begin as its kind's do |
| `asset-pointer` | error | XV.3.2 | in 0.2, or in 0.1 with the proposal assets, reading a version: a leaf under `assets` is no pointer in the canonical form, names other bytes than its name's, or sits in a folder there; the version is refused |
| `asset-missing` | error | XV.6.3 | in 0.2, or in 0.1 with the proposal assets: a clone or a pull finds the store without the bytes of an asset the version names; nothing is written |
| `asset-mismatch` | error | XV.5.1 | in 0.2, or in 0.1 with the proposal assets: the store answered an asset with bytes that are not its pointer's; nothing is written |
| `asset-removed` | error | XV.3.7 | in 0.2, or in 0.1 with the proposal assets: a pull's merge would remove an asset that the merged model names; nothing is written |
| `archive-invalid` | error | III.11.3.11.1 | an archive of 0.5, or one asked for the proposal archives (Part III, 11.3): an archive is no zip every reader reads alike: no end of central directory record, more than one disk, a central directory that does not fill its room, a central header whose local header is not where it says or disagrees with it on the name, the method, the flags, the CRC-32 or the sizes, a ZIP64 record that disagrees with the end record, an Info-ZIP Unicode path that names an entry otherwise, entries whose bytes overlap, an entry encrypted or of a method other than stored and deflated, or one whose bytes do not give its size and CRC-32: refused whole (`archive-refused`) |
| `archive-path` | error | III.11.3.11.2 | an archive's entry whose name is not UTF-8 or would lead out of the folder: empty, beginning with `/` or a drive (`C:`), holding `\` or NUL, or a name that is empty, `.` or `..`; refused whole, before anything is inflated |
| `archive-twice` | error | III.11.3.11.3 | an archive holds two entries of one name, or a name that is a file's and a folder's at once; refused whole |
| `archive-fold` | error | III.11.3.11.3 | two entries of an archive, neither hidden nor reserved, whose paths fold to one (Part III, 4.3); refused whole |
| `archive-link` | error | III.11.3.11.4 | an archive's entry is a link or a special file, by the mode its external attributes give where it was made on Unix or macOS; refused whole |
| `archive-too-large` | error | SP.6.5.2 | an archive of more than 1 000 000 entries, an entry over 64 MiB, or entries over 4 GiB in all, as its central directory gives their sizes (`BOUNDS.files`, `BOUNDS.file`, `BOUNDS.archive`); refused whole, before anything is inflated |
| `archive-ratio` | error | SP.6.5.2 | a deflated entry of an archive claims more than 1 032 times its compressed size (`DEFLATE_MOST`), which deflate never gives; refused whole, before anything is inflated |
| `archive-root` | error | III.11.3.1 | an archive holds no `eik.json` at its top, and every entry under one folder that holds one, as a zip tool compresses a folder: refused, saying where its entries belong |
| `archive-entry` | error | III.11.3.1 | an archive holds an entry a writer does not write: a folder's entry, a hidden or reserved name, `AGENTS.md`, or a file a reader of the folder leaves alone; each reason once, with how many entries share it. `readArchive` reads it as a reader of a folder reads such a file, and warns; `checkArchive` reports it as an error (rule 12) |
| `archive-form` | error | III.11.3.4 | an archive is not in the form a writer writes (rules 3 to 6): its entries out of order, deflated, of another time, flags, versions or attributes, with an extra field or a comment, ZIP64 where none is needed, or bytes before, between or after its entries; each kind once, naming its rule. `readArchive` reads it and warns; `checkArchive` reports it as an error |

The rules of heating, ventilation and plumbing (`src/mep.js`, Part II, 6.9 and 13) check a run's insulation, a component in its pipe or its duct (its host, its `along`, the place its run gives it, in a duct its size across, its type's ports), room tags and lines joined to symbols, across a view's detail items. The rules that need geometry or the types' sizes (`src/rules.js`) read the geometry Part IV states from the records alone: outlines (their area, the gaps between their points, edges that cross or touch), a component's two points, doors and windows in their walls (the wall's length, its base, its height from its top constraint or its attached top where that rises higher, and overlaps), tops above bases, the sizes types set, sections and layers, attached column bases and wall tops over their hosts (footprints, and the faces of flat hosts and of pitched roofs, Part IV, 4.4 and 5.3), outline edges trimmed to a wall's face (Part II, 6.7: the edge, the wall, parallel within 5°, reaching the face within 1 mm, 100 mm² left), sloped beams and member joins. Bodies, the joins found from geometry and quantities are a compiler's, and are not built here. A comparison the specification states exactly allows 10⁻⁶ mm for rounding, and a point within 0.001 mm of a boundary is on it.

### Command codes

In 0.2, and in 0.1 with the proposal envelope (Part XVII), each refusal of `applyCommands` carries a code: one of these, the processor's own, or the validator's code above for a rule the validator checks too. Of the envelope's codes (rules XVII), this package gives `envelope-schema`, `envelope-format`, `operation-reused`, `target-unknown` and `base-moved`, and its agent host `person-mismatch` and `envelope-required` ([The agent host](#the-agent-host)); the others are a host's: what it lets a writer do, what it holds in progress, and its limits. A refusal's pointer names the member that is wrong, a required one that is missing too (`/intent`, `/expectedRevision`).

| Code | Rule | What |
|---|---|---|
| `command-not-object` | V.1.1 | a command is no JSON object |
| `kind-missing` | V.1.1 | a command names no kind, as a string, in kind |
| `kind-unknown` | V.1.2 | a command's kind is none of the vocabulary's |
| `kind-not-implemented` | V.2 | a command's kind is of a profile or of the reference vocabulary that the processor does not implement |
| `command-member-unknown` | V.1.4 | a command holds a member at its top level that its kind does not define, as a misspelt expectedRevison |
| `command-schema` | V.1.2 | a command does not match its kind's schema |
| `command-not-json` | V.8.2 | a command holds what JSON cannot: NaN, an infinity, a BigInt, or itself |
| `command-too-deep` | V.8.2 | a command nests deeper than any record may |
| `patch-undefined` | V.4.3 | a patch says undefined for a member its record has, which a logged command would not remove: send null |
| `patch-fixed` | V.4.2 | a patch writes an element's id, category or revision |
| `patch-legacy` | V.4.6 | a patch writes topRoofId, topCeilingId or roofCutId |
| `patch-removes` | V.4.2 | a patch takes away, with null, a member every element has |
| `target-missing` | V.6.2 | the record a command changes, deletes, copies or names as its target is not in the model |
| `element-of-copy` | II.10 | a command names an element of a placed copy, which is worked out from its original and never stored |
| `revision-conflict` | V.3.1 | a precondition names a revision, and the record's revision is another: it changed since it was read |
| `state-conflict` | V.3.3 | a precondition names a state (a level, the project's name, its site …), and the state is another: it changed since it was read |
| `precondition-missing` | V.3.2 | a command gives no precondition where one is required: a strict upsert of a record that exists, or any command in an envelope (Part XVII, 9) |
| `precondition-target` | V.3.2 | a precondition names a record that is not there: a revision of a new record, a host's revision for an element without a host, a level that is gone |
| `in-use` | V.5.4 | a delete is refused while records use what it would remove: a type, a level and its plans |
| `level-last` | II.3 | a command would remove a project's last level |
| `level-move-to` | V.5.4 | a level's delete names in moveTo no other level of the project |
| `group-member` | II.10 | a command changes an element of a group other than in the group's edit (original.edit) |
| `group-by-hand` | II.10 | a command writes original, copy or born itself: an element joins a group by original.make and original.add, and an instance is placed |
| `group-twice` | II.10 | an element, or one that stands in it, is of another group already: an element is in one group |
| `group-not-member` | II.10 | a command takes out of a group an element that is not of it |
| `group-hosted` | II.10 | a command takes out of a group an element that stands in another element of the group, without that element |
| `group-instances` | II.10 | a group is dissolved while it has other instances |
| `group-origin` | II.10 | a group is made of elements none of which has a place of its own, and no origin is given |
| `edit-nested` | II.10 | an original.edit holds another |
| `copies-not-derived` | II.10 | a command needs a copy's elements worked out, which the processor does not derive |
| `envelope-schema` | XVII.2 | an envelope does not match its schema |
| `envelope-format` | XVII.2 | an envelope names a format the processor does not implement |
| `envelope-required` | XVII.8 | a host takes this writer's commands only in an envelope |
| `operation-reused` | XVII.3 | an operation id the processor has recorded comes with another envelope |
| `operation-in-progress` | XVII.3 | an operation id comes again while the processor is still applying it |
| `person-mismatch` | XVII.4.2 | an envelope names another person than the one its writer signed in as, or one they may act for |
| `target-unknown` | XVII.5 | an envelope's target names a ref the processor does not have, or one it does not write |
| `base-moved` | XVII.5 | the target's ref has moved since the envelope's base, and the envelope asks for its base exactly |
| `mode-not-implemented` | XVII.6.4 | an envelope asks for a mode the processor does not implement |
| `mode-not-allowed` | XVII.6.4 | a host does not let this writer apply to this ref, and the writer did not ask for a proposal |
| `not-permitted` | XVII.12 | the writer may not change the target, or a record the commands change |
| `too-large` | XVII.12 | an envelope holds more commands or bytes than the processor takes in one |

## Model quality

`openeik check --quality` (or `checkFolder(…, {quality: true})`, `checkModel(…, {quality: true})`, `checkQuality(model)`) also warns about elements modelled under a category that does not fit them: a railing drawn as a generic component or as a thin wall, a window or a door as a box set in a wall, a stair as slabs stacked in steps, a beam as a component or a wall. A supplier invited to a project finds its parts by category (spec, Part II, 12), and so does every check that works by category; a part under the wrong category is missed by both. The warnings tell the model's author which category fits, and why.

**Off by default.** `check` is the validator of the specification: its errors and warnings name rules a model must or should meet, and "0 errors, 0 warnings" means that for writers and for CI. The quality warnings are heuristics about modelling practice, not rules, and a model can be valid with them. So they come only when asked for. They are warnings: they never change `ok` or the exit code.

**What counts as evidence.** Each rule of `QUALITY_RULES` names the category that fits:

| Code | Fits | A name is evidence for | A shape alone is evidence for | The shape |
|---|---|---|---|---|
| `quality-likely-railing` | `railing` | component, furniture, generic, wall, beam | a plain component, furniture, a generic element, a wall | long and thin (at most 120 mm; a wall at most 60 mm; at least 800 mm and 8 times its thickness long), its top 850 to 1300 mm above a slab's top, its bottom no more than 600 mm below that top or 300 mm above it, and along the slab's edge: within 10° and 300 mm, over at least half its length |
| `quality-likely-window` | `window` | component, furniture, generic, wall | a plain component, furniture, a generic element | 300 to 4000 mm wide and 300 to 2600 mm high, set in a wall (within 5° of it, its middle within the wall's thickness, its ends within the wall's length, no deeper than the wall plus 100 mm, within the wall's height), its bottom at least 100 mm above the wall's base |
| `quality-likely-door` | `door` | component, furniture, generic, wall | a plain component, furniture, a generic element | 600 to 2500 mm wide and 1900 to 2700 mm high, set in a wall as a window is, standing on the wall's base (within 50 mm) |
| `quality-likely-stair` | `stair` | component, furniture, generic, slab | a plain component, a generic element, a slab | one of three or more tread-like pieces (600 to 3000 mm by 180 to 450 mm, at most 300 mm thick; a slab's outline a rectangle) that rise by 120 to 220 mm each and step 180 to 450 mm along, parallel (within 3°) and in line (within 100 mm), with an even rise (within 10 mm) and going (within 25 mm) |
| `quality-likely-beam` | `beam` | component, furniture, generic, wall, slab | a plain component, a generic element | a horizontal member at least 1500 mm long, 90 mm wide and 140 mm deep, and at least 6 times as long as its larger side |

- **A name**: the element's name or its type's name names the category, in English and, for the common words, in Swedish, Norwegian, Danish, German, Dutch and French (`railing`, `balustrade`, `handrail`, `räcke`, `Geländer`, `leuning` …; `window`, `fönster`, `raam` …). The lists are in `src/quality.js`. Words match whole; a few heads also match at the end of a compound word (`balkongräcke`, `Wendeltreppe`, `stålbalk`), but never inside one (`outdoor` is no door, `Balkong` no beam). Camel case and underscores split words (`GlassBalustrade_1100`).
- **An IFC class**: the element was imported as `IfcRailing`, `IfcWindow`, `IfcDoor`, `IfcStair` or `IfcStairFlight`, or `IfcBeam` (`ifcSource.entity`).
- **A shape**: only on elements whose category says little about them: a component that is a plain box (the `timberSection` family, not a bolt, a plate, a hanger or a cast-in item), furniture, or an IFC proxy (`IfcBuildingElementProxy`); and, where the table says so, a wall or slabs. The shapes are read from the records alone, without a compiler: a wall's centreline, thickness (its type's layers) and height; a beam's axis and section; a component as a box `width` along its orientation, its type's `component.depth` across and `height` up, centred on its insertion point, as the reference implementation draws one; furniture placed along a line; a slab's outline and top.

**Keeping false positives low.**

- A name that names a part, a fitting or a place of a thing is no evidence: `door handle`, `window sill`, `joist hanger`, `railing post`, `stair landing`, `Fönsterbänk`, `Dörrhandtag`.
- A name that names the element's own category is no evidence: a wall named `Stair wall`, `Window wall` or `Balcony parapet` stays a wall.
- A name is read up to its first preposition, and its last category word decides: `Stair railing` and `Railing for stair` are railings, `Door lintel` and `Lintel over door` beams.
- A shape alone counts only on generic elements (and on walls for railings, at most 60 mm thick: glass or sheet, not a parapet; on slabs for stairs). A low wall, a batten, a bookshelf along a balcony and two steps are not flagged.
- Each element gets at most one warning. When rules disagree, the heaviest evidence decides: the element's own name, then its type's name, then its IFC class, then its shape.
- On the two examples here and on the nine synthetic example projects of the reference implementation (about 830 elements, with components, slab edges, beams, walls and openings), `--quality` finds nothing.

**What it does not do.** It reads no derived geometry, so it does not see curved or sloped stand-ins, stairs that turn, railings on a stair, on a shaft's edge or on a wall's top, or a window drawn as a void. It does not move anything: the fix is the author's (a new element of the category that fits, with its type), or a supplier's proposal.

Each warning carries `data`: `{elementId, category, fits, evidence}`, `evidence` being the kinds that counted (`name`, `type`, `ifc`, `shape`). The message says which category fits and why, for example:

```text
architecture/level-1/component/item-17.json: likely a railing, modelled as a component: 3000 mm long and 40 mm thick,
its top 1100 mm above slab "slab-balcony", along its edge "slab-balcony:edge:0". Category railing fits, and a search
for railings by category misses it [quality-likely-railing, II.6.2]
```

Their rule is Part II, 6.2, the categories; they are not requirements of it.

### Weight

With `--quality` come the warnings of weight too (`src/weight.js`; the spec's Part III, 15, of 0.5, and for a model of 0.4 the proposal `weight`): forms far heavier than a compact one that says the same, which make a model slow for every tool that reads it. The format allows every one of them, so they are warnings, never errors, and each names the compact form and what it saves, so that a person or an agent can change it in one step. [Keeping a model light](../../guides/weight.md) gives the rules as tips.

| Code | Where | Finds | Threshold (`WEIGHT_LIMITS`) | The compact form |
|---|---|---|---|---|
| `weight-hatch-strokes` | a view's items | straight two-point lines that are parallel (within 1°) and of one length (within 10 %) | 100 in one set; one warning a view, the sets summed | a `region` with a `pattern`; a material's or layer's `pattern`; an `insulation` item |
| `weight-split-path` | a view's items | points where exactly two open lines of one style (every member but the id, the points and the provenance alike) meet end to end, to 0.01 mm; a hatch's strokes are left out | 200 points | one `line` per path, with its points |
| `weight-duplicate-items` | a view's items | items that repeat another exactly, but for their ids | 10 | each once |
| `weight-arc-points` | each `line`, `region` and `mask` without arcs of its own (`bulges`) | points that all lie on one circle (within 0.1 mm or 10⁻⁴ of its radius), one way round, each chord under a quarter turn: a closed full circle; or an arc with four times the chords that draw it within 0.1 mm on the paper at its view's scale | 64 points | an item of the kind `circle`, its box; the arc exact, its ends and its `bulges` |
| `weight-precision` | a view's items | numbers given to more than three decimals | 1 000 | three decimals |
| `weight-copies` | elements with plan points (`profile`) | elements that are another of the same kind (every member but the id, the name, the revision and the level alike, its plan points moved alike and its references to elements aside) moved by one offset in plan, on one level or onto another; a group, the elements of its first place at an offset, standing again at each offset where every one of them does, onto elements of no other place of it, nearest first; a run of a smaller group (a row of posts taken two at a time) is no group; elements a group keeps (`original`), framing a rule laid out (`frameHost`) and a kind of more than 64 elements are left out | 3 places or more (`copies`), a group of 2 elements or more (`copyGroup`), 24 records or more in all, places × elements (`copyRecords`), of any number of kinds | an original and copies (Part II, 10) |
| `weight-mesh-prism` | elements' and types' declared bodies | a `mesh` or a `polyhedron` whose vertices lie on two heights, the same outline at each, which a face of it gives in order or which is convex | 10 bodies | a `prism`: its outline, bottom and top |
| `weight-shared-shape` | elements | elements of one type that carry the same `declaredGeometry` of their own | 10 | the shape on the type, once (`type.upsert`) |
| `weight-same-types` | types | types that are another again, but for their ids, names and revisions | 20 | one type per build-up |
| `weight-svg-path` | each issued `drawing.svg` | the segments of one `path` | 20 000 | a `pattern`, a `use`, arcs (`A`) |
| `weight-svg-hatch` | each issued `drawing.svg` | single straight strokes (`<line>`, or a subpath of one segment) of one direction and length, outside any `pattern` | 500 in one set | one `pattern` in `defs`, filled `url(#…)` |

**No false alarms.** On the two examples here and every model of the conformance suite (1 126 of them, with 151 issued SVGs), `--quality` finds no weight. On a reference implementation's example of 249 elements whose 30 views hold 21 094 detail items, a drafting view among them converted from a PDF, it finds 12: like strokes of hatches (up to 7 542 in a view), paths cut into segments (up to 970 points), items drawn twice (up to 188) and numbers to seventeen digits (up to 105 676), in under three seconds.

**A heavy form on purpose.** A survey's points, a converted drawing kept as it was traced, two groups that are to change apart: keep them, and accept the warning once, everywhere or under a path:

```sh
openeik check ./house --quality --accept weight-hatch-strokes:drawings/architecture/views/drafting/survey/ --accept weight-copies
```

In code, `checkFolder(dir, {quality: true, accept: ["weight-copies", "weight-hatch-strokes:drawings/…/survey/"]})`.

**Kept in the model.** `--accept` is one check's; a record says it for every tool that reads the model by its `weightAccepted` (Part III, 15.7, rule 5, with the proposal `weight`): an element, a type or a detail item lists `{code, reason, by?, at?}`, `by` as a detail item's provenance names who made it, `{person}` or `{agent: {name, version}, actingFor}`:

```json
"weightAccepted": [{"at": "2026-11-05T10:00:00Z", "by": {"person": "person-a1"}, "code": "weight-hatch-strokes", "reason": "The survey's strokes, kept as traced."}]
```

One record of a heavy form keeps the whole of it: a set of like strokes, a path, an item and the one it repeats, an item's points or numbers, a group that stands again, a declared body, a set of elements of one shape, a set of types. The detectors leave that form out and find the others of the view or the model as before (`keeps(record, code)`). An entry is a code of a quality warning, or a code, a colon and the start of the paths (in the single-file form, of the pointers) it holds for; a code of anything else is refused (`accept-unknown`), since a rule of the specification cannot be accepted. An agent changes the heavy forms it wrote, and puts to its person those it did not (Part III, 15.7, rule 3).

Each warning carries `data` with its counts, as `{strokes, sets, largest: {strokes, length, angle}, items}` for a hatch, `{points, radius, sweep, form, saved}` for an arc, and `{elements, copies, group, offset, levels?, others}` for copies: the elements derived, the places, the group's elements, the nearest place's offset and levels, and how many other groups stand again apart from it. The rule is Part III, 15; they are not requirements of it.

**In an application.** The checks are thin wrappers over pure detectors, which take plain records and do no I/O, so that an application, an editor or an agent's host calls them on what it holds, before it writes:

```js
import { weightOfDetails, weightOfElements, weightOfSvg, WEIGHT_LIMITS } from "@openeik/tools/weight";

const found = weightOfDetails(view.details, { scale: view.scale });           // a view's items, as its chunks hold them
const more = weightOfElements(model.elements, { types: model.types });         // elements, and the types for same-types
const svg = weightOfSvg(text, { thresholds: { svgStrokes: 200 } });            // an issued drawing; stricter than the default
for (const f of found) console.log(f.code, f.count, f.saves, f.compact);
```

Each finding is `{code, ids, count, compact, saves, message, data}`: `ids`, the ids of the records it is in (for an issued SVG, of its paths); `count`, of the strokes, joints, items, points, numbers, elements, bodies or types; `saves`, what the compact form saves, `{items}`, `{points}`, `{elements}`, `{types}` or `{bytes}`; and `compact`, the compact form, ready to write, `kind` saying what it is:

| Code | `compact` |
|---|---|
| `weight-hatch-strokes` | a detail item, `{kind: "region", a, b, color, pattern, spacing}`: the box of the strokes, `diagonal` (or `cross` where they run two ways) and how far apart they lie |
| `weight-split-path` | a detail item, `{kind: "line", …style, a, b, points}`: the longest path, its points in order (at most 500) |
| `weight-duplicate-items` | a command, `{kind: "detail.remove", ids}` |
| `weight-arc-points` | a detail item: `{kind: "circle", a, b, …style}` for a circle; for an arc, the item exact (Part III, 15.2, rule 4): its first and last points, a point between where it turns more than a half, and their `bulges`, without `curveKind`; `data.needed` says how many chords its paper needs, for a reader without the proposal |
| `weight-precision` | `{kind: "round", decimals: 3}` |
| `weight-copies` | the commands, `{kind: "original.make", elementIds, copies: [{at, levelId?}], remove}`: make the group an original, place a copy at each other place, and remove the elements the copies derive |
| `weight-mesh-prism` | a body, `{kind: "prism", profile, bottom, top}`, the first of them |
| `weight-shared-shape` | a command, `{kind: "type.upsert", typeId, declaredGeometry}` |
| `weight-same-types` | `{kind: "retype", typeId, from}`: name `typeId` in every element of the types `from` (`update`), then delete those types (`type.delete`) |
| `weight-svg-path`, `weight-svg-hatch` | `{kind: "pattern", …}`: draw it by a pattern, a `use` or arcs |

**Exact arcs.** With the proposal, a detail item's `bulges` give its arcs exactly, one for each of its points, as a DXF polyline does (Part III, 15.2, rule 4): `arcOfBulge(p, q, b)` gives a segment's arc, `{c, r, start, sweep}`, its centre `(1 − b²) / 4b` chords to the left of the chord's middle; `bulgeOf(sweep)` a bulge, `tan(sweep / 4)`; `bulgesFault(item)` what is wrong with an item's bulges; and `itemPathData(item)` the path data an issuer draws it with, `M`, then `L` for each straight segment and `A r r 0 large sweep x y` for each arc, and `Z` for a region, a mask or a closed line, its numbers as Part XIV, 6.4 writes them. The weight checks leave an item with arcs of its own alone, join a path's segments with their bulges (a reversed one's turned), and count no bulge among the numbers given too finely: a bulge is no length. `detail.draw`'s `tangentArc` and `fillet` keep an item's bulges on the points they keep.

`thresholds` takes any of `WEIGHT_LIMITS` (`hatchStrokes` 100, `splitJoints` 200, `duplicateItems` 10, `arcPoints` 64, `arcFiner` 4, `paperTolerance` 0.1 mm, `precision` 1 000, `copies` 3, `copyGroup` 2, `copyRecords` 24, `sameTypes` 20, `meshPrisms` 10, `sharedShapes` 10, `svgSegments` 20 000, `svgStrokes` 500); the others keep these defaults. A view of 50 000 items, the most its schema allows, takes under two seconds on a laptop.

**Commands.** Part III, 15.8 lets a command processor answer a session with two advisories in its answer's `warnings` (Part V, 9), never refusals (`WEIGHT_COMMAND_CODES`). `applyCommands(model, commands, {proposals: ["weight"], session})` gives them, on a model of 0.4:

- `weight-rebuild`: an element a `delete` took, or a detail item a `detail.remove` took, earlier in the batch or the session, made again by a `create` or a `detail.place` nearly the same: of its category or kind (and view), three quarters or more of its other members alike but its id, revision, name and provenance (`nearlyAgain`, `rebuildShare` 0.75). Its compact form is the `update` or the `detail.update` of the record deleted, at its revision as read, the patch that makes it the one made.
- `weight-full-replace`: an `update` or a `detail.update` whose patch sends 6 members or more (`replaceMembers`), three quarters or more of the record's, and changes at least one and at most a quarter of them (`replaceShare`); or a `view.upsert` of a standing view that sends 20 items or more (`replaceItems`) and changes, adds or removes at least one and at most a quarter. Its compact form is the patch of what changes, or, with the proposal `drawingCommands` and the view's own members alike, the batch of `detail.update`, `detail.place` and `detail.remove` that writes the same, `{kind: "batch", commands}`. `type.upsert` and the other kinds that write a record whole get none.

Each is judged against the records as they were before the command (`resent`): a resend that changes nothing, as one of what the processor wrote, is no full replace, and a revision and an agent's item's provenance are not counted as sent. A record made is paired with one deleted, one to one, never with one that stands, and the weight line finds no copies in what a batch wrote: no advice makes distinct elements a group. An advisory comes once for each code and target in a session (`elements/<id>`, `views/<id>`, `views/<id>/details/<item>`), and its repeats are counted; a record that keeps the code (`weightAccepted`) gets none. The warning is worded as every warning is, `Command <i> (<kind> <id>): …`, and carries the compact form as JSON, what it saves and the guide's topic, `[weight-rebuild, III.15.8.1]` at its end. The session is plain data the caller keeps between batches, `weightSession()`, `{deleted, advised, written}`; an applied batch writes into it, a dry run and a refused batch do not.

An accepted batch's answer gains its running weight line, `weight` (Part V, 9.1; `schemas/0.4/proposed/weight/answer.schema.json`): `written` and `removed`, the records by kind (`details` for a view's items); `session`, the session's so far; `heavy`, what `weightOfDetails` and `weightOfElements` find in what the batch wrote, each finding with its compact form and, for items, its `view`; `advice`, each advisory as data, `{code, rule, command, target, message, compact?, saves, guide}`; and `repeats`, `{code, target, count}`. An application's own codes carry its prefix (`acme:copied-geometry`).

## Merging

A three-way merge joins two lines of work, ours and theirs, against the version both started from (spec, Part VI, 5). Records are matched by id, never by path or text, so a wall moved to another level on one side and renamed on the other is one record.

```js
import { mergeFolders, mergeVersions, resolveMerge } from "@openeik/tools";

const result = mergeFolders("base", "ours", "theirs");  // or mergeModels(base, ours, theirs) on single-file models
result.ok;           // true: no conflict is left, and the merged model checks whole
result.model;        // the merged model, in the single-file form
result.merged;       // what it took: [{list: "elements", id: "wall-east", from: "theirs", kind: "changed"}, …]
result.conflicts;    // [{key: "elements/wall-north", list, id, kind: "both changed", path: "/height", base: 2700, ours: 2800, theirs: 2900}]
result.diagnostics;  // the check, named by record: {code: "ref-missing", path: "elements/window-3", …}

// A person chooses ours or theirs for a conflicted record; the merged model is checked again.
const settled = resolveMerge(result, { "elements/wall-north": "theirs" });

// Two versions of a store: the base is found from the commits' parents.
const merge = await mergeVersions(store, { ours: "main", theirs: "alternatives/frame-a" });
```

- A record changed on one side only is taken from that side. Changed on both, it merges member by member: objects recursively, a list whose items all have an `id` (a type's layers, a view's detail items) item by item, in our order with their new items after the item before them on their side, and anything else (a number, a point list) as a whole. A record merged from both sides gets the revision max(ours, theirs) + 1.
- The conflicts are `both changed` (with the member's path), `changed and deleted`, `added twice`, and `in the way`: a kept file of one side where the other side's records or kept files need its path (Part III, 7.4). A conflicted record keeps our side until a choice settles it. A record settled by a choice, which both sides hold, keeps the chosen side's revision when that is the higher; otherwise it gets the revision past both (5.4), so that no earlier read of either side's record can name it. The project record and the project information merge as one record each; the levels as a list by id, with one conflict for the whole list; kept files file by file.
- The merged model must pass the whole-model check: a merge that leaves a host missing, or a type deleted under its elements, is not `ok`, and its diagnostics name the records.
- With `commit: {author, write}`, `mergeVersions` writes a merge commit (`kind: "merge"`, two parents) when the merge is clean and checks, and moves the ref by compare-and-swap from ours' version (`pushVersion` takes `parents` and `expected` for it). `write` turns the merged model into a folder's files; by default this package's writer (`modelFiles`, with ours' `eik.json`).
- When two lines have merged each other, `mergeBase` takes the common ancestor with the fewest parent steps from both, then the newest, then the smallest hash.

## Remotes: clone, push, pull

A folder works with a store (API v0) as a git working copy works with a remote (spec, Part VI, 6): cloned from a ref once, edited locally with any tool, pushed deliberately with a message, and pulled to bring in what others pushed. The calls `connectStore` makes are the store protocol, version 0, which 0.5 writes into the specification (Part VI, 6.8; the proposal `storeProtocol` before its cut): any store that serves it can be connected, and `tools/run-conformance-store-protocol.mjs` in the repository drives a store's base URL through it.

```js
import { connectStore, clone, push, pull, status } from "@openeik/tools";

const store = connectStore({ url: "https://api.eikhub.com", repo: "acme/house", token: process.env.OPENEIK_TOKEN });
await clone(store, "./house");             // main's head into a new folder, tracked in ./house/.eik/remotes.json
// … edit records in ./house, and check them …
status("./house").changed;                 // true: something to push (local: the store is not asked)
await push(store, "./house", { message: "Taller south wall", author: "Jane Doe" });
// {pushed: true, version, parent: the version cloned, …}; or code "ref-moved": someone pushed meanwhile, pull first
const r = await pull(store, "./house");    // r.status: "up-to-date", "fast-forward", "merged", "conflicts" or "refused"
if (r.status === "conflicts") await pull(store, "./house", { choices: { "elements/wall-north": "theirs" } });
```

- **The tracking ref.** `.eik/remotes.json` records, per remote and ref, the version last fetched from or pushed to it, and the folder's tree when it held that version: `{"origin": {"url": "…", "repo": "acme/house", "refs": {"main": {"version": "<hash>", "tree": "<hash>"}}}}`, in the stored form. It is hidden, so no part of the model or of any version's tree, and never sent to the store. The token is never in it: it comes from `OPENEIK_TOKEN`, or the variable `--token-env` names, and goes to the remote's url only at the origin given beside it ([Tokens](#tokens)). `origin` is the default remote; the default ref is the one ref the remote tracks, else `main`.
- **clone** reads the ref's head, writes it into an empty or new folder (hidden files aside) through the writer, checked whole, `AGENTS.md` written, and records the tracking ref. Its tree is the folder's, as `versionTree` computes it: the version's own, unless the version leaves `eik.json` out of its tree, as versions saved before 11 October 2026 do. A ref without a version is not cloned: push a first version with `pushVersion` (`openeik push --url --repo`) and clone that.
- **push** compares the folder's tree with the tracked tree. Equal: nothing to push, and the store is not asked. Otherwise one version: `kind: "named"`, named by the message, its tree the folder's, its only parent the tracked version, its summary every change since that version, whatever states the folder passed through; only the objects the store lacks are sent. The ref moves by compare-and-swap from the tracked version. When it moved meanwhile, nothing is written, and the error (`ref-moved`, with `current`) says to pull first. Then the tracking ref is the new version. A push never makes an automatic version, and never rewrites one.
- **pull**: the base is the tracked version, theirs the ref's head. Theirs the base: nothing to do. Theirs must descend from the base: a ref moved back, or onto a line that never held the tracked version, is refused (`not-descendant`, with `current` and `tracked`), nothing written and the tracking ref left as it was, since a remote ref only moves forward (Part VI, 6.3, rule 2) and a fast-forward or a merge against the base would undo, in silence, what theirs no longer holds; clone the ref into a new folder to take it as it is. The folder unchanged since the base: a fast-forward, theirs written through the writer. Otherwise the folder (ours) and theirs merge against the base by record and member ([Merging](#merging)); merged cleanly and checked whole, the merge is written, and the tracking ref becomes theirs, so that the next push's parent is theirs and its tree the merged one. While a conflict is left, or the merged model does not check, nothing is written: the result lists the conflicts and holds the merge, and a pull with `choices` (as `resolveMerge` takes them) settles them.
- **What a pull writes**: only the files that change (Part III, 13). The files of records that went are removed, and so is a kept file theirs removed that the folder had not changed (the history removed it; the next push would otherwise bring it back). Which files are records' is told by the rules of the version written, and the proposals it lists and the remote carries: from 0.2 a person's (`project/people/<id>.json`) and a circuit's (`project/circuits/<id>.json`), and from 0.7, or in a folder of 0.6 that lists `drawingSets`, a drawing set's (`drawings/<owner>/sets/<id>.json`), are records' files, never removed as kept files, whatever the folder held them as before the pull. Kept files theirs did not change, files the reader leaves alone (binary, over 1 MiB), `AGENTS.md` and hidden files are not touched. Kept files and members this package does not know come in and go back unchanged.
- **status** is local and cheap: per remote and ref, the tracked version, and whether the folder changed since. `fetchHead(store, ref)` asks the store for the ref's head in one call, to say whether the remote moved; `openeik status --fetch` does.

From the command line:

```sh
export OPENEIK_TOKEN=…  OPENEIK_TOKEN_ORIGIN=https://api.eikhub.com  OPENEIK_AUTHOR="Jane Doe"
openeik clone ./house --url https://api.eikhub.com --repo acme/house
openeik status ./house                       # the version it tracks, and whether it changed since
openeik push ./house -m "Taller south wall"  # exit 1, nothing written, when the ref moved: pull first
openeik pull ./house                         # a fast-forward or a merge; exit 1, nothing written, on a conflict:
openeik pull ./house --choose elements/wall-north=theirs
```

A folder with `.eik/remotes.json` pushes and pulls with its remote, and refuses the flags of the low-level commands (`--url`, `--repo`, `--parent`, `--name`, `--version`, `--force` …). A folder without one pushes and pulls as before; `openeik pull --force` into a folder that holds files removes the file of each record the version does not hold, and no other file, a record's file told by the rules of the version written (`recordFiles`): from 0.2 a person's and a circuit's, and a record's of either layout.

### Large objects

A push sends the objects the store lacks in batches of `objects/put`, and an object larger than one request takes, as a large kept file or record may be, in parts, by the store's uploads (API v0):

- **What the store takes** is read once for the connection, at the first object `put` sends, from the repository's answer (`GET /v0/repos/{owner}/{name}`): `limits.putObjectBytes`, the most one request carries (EikHub's: 40 MB); `limits.objectBytes`, the most an object may be, never above `BOUNDS.object` (6 × 64 MiB + 2, the longest a file of 64 MiB takes as an object); and `limits.uploadPart`, the part size (32 MiB). A store that states none takes objects of up to `LIMITS.object` (40 MiB) in one request, and nothing in parts, as before.
- **In parts.** `POST objects/{hash}/uploads` starts an upload (`{upload, partSize, most}`); `PUT objects/{hash}/uploads/{upload}/{n}` sends part n, numbered from 1, the raw bytes of a slice of the object's UTF-8, each but the last exactly `partSize`; `POST objects/{hash}/uploads/{upload}` with `{parts: [{part, etag}]}`, in order, completes it, and the store checks the whole against its hash. The object's bytes are encoded once, and each part is a view of them, not a copy.
- **A commit** always goes by `objects/put`, never in parts, after the objects it names.
- **Refusals.** An object above the store's `objectBytes` (or the `most` its upload gives), and a commit above `putObjectBytes`, are refused before they are sent (`object-too-large`, with `bytes` and `most`). An upload that fails is aborted (`DELETE objects/{hash}/uploads/{upload}`) and thrown: `object-upload-hash-mismatch` where the store answered 400 `hash_mismatch` (the bytes sent do not hash to the object's name), `object-upload-failed` otherwise, with `object`, `status` (the HTTP status, where the store answered), `storeCode` (its code), `upload` and `part` (where a part failed), and the store's refusal as `cause`. An upload the store names by no plain segment is not followed, so that nothing goes, with the token, to another path of its API.
- **Reading** needs nothing of this: `objects/get` gives a large object whole.

A store answers each call itself, never by a redirect, and the client follows none, so that no token goes on to another origin: a redirect is refused (`store-redirect`; Part VI, 6.8, of 0.5).

### Tokens

A token is a credential: it goes only where the person who holds it sends it.

- **Over https.** `connectStore` refuses a token for a url that is not https (`insecure-url`), but for plain http to this computer (`localhost`, 127.0.0.0/8, `[::1]`), as a local store or a test server uses; an `Authorization` header in `headers` counts as a token. Nothing is sent first.
- **To its own origin.** With `tokenOrigin` (scheme, host and port: `https://api.eikhub.com`), a url of another origin is refused (`token-origin`), before anything is sent. A url read from a folder (`.eik/remotes.json`, which travels with the folder in an archive or a git clone, and may come from anyone) is connected so.
- **The command.** `openeik` reads the token from `OPENEIK_TOKEN` (or the variable `--token-env <NAME>` names) and the origin it is for from `OPENEIK_TOKEN_ORIGIN` (`<NAME>_ORIGIN`). A store named on the command line (`--url`: `clone`, and the low-level `push`, `pull` and `log`) gets the token, unless `OPENEIK_TOKEN_ORIGIN` names another origin. A folder's remote (`push`, `pull` and `status --fetch` of a folder with `.eik/remotes.json`) gets it only at the origin `OPENEIK_TOKEN_ORIGIN` names: without one, or at another origin, the command stops and says why (exit 2), and nothing is sent.
- **Anonymous reads stay open.** Without a token, any url is read as anyone may read it: a public repository clones, pulls and fetches with no token at all.
- **A credential in a kept file.** A push carries every kept file, and one that holds a credential discloses it to everyone who reads the version (Security and privacy, 8, rule 3). `push` and `pushVersion` stop before anything is sent on each kept file the store lacks that looks like one (`kept-credential`: a private key, a token by its issuer's prefix, a `KEY=secret` line, a list of passwords), naming the file, what it looks like and the line, never the secret. Take it out of the folder, or, on the person's word, push again with `confirmCredentials: true` (`openeik push --confirm-credentials`).
- **Names in a store's URL.** A repository (`owner/name`), a ref (`main`, `alternatives/<slug>`) and a meta key are made of plain segments: none empty, `.` or `..`, none holding `\` or NUL, and `/` only between a ref's segments. `connectStore` refuses another repository name (`bad-repo`), each call another ref (`bad-ref`) or key (`bad-key`), before anything is sent, and `readRemotes` refuses a folder's remotes that name one (`remotes-invalid`): `refs/../../../admin/users` would ask another part of the store's API, with the token. An object's upload is named by the store, and is followed only when its name is such a segment ([Large objects](#large-objects)).

### Reading a version that no folder gives

A reader of versions refuses a version whose tree no folder gives (Security and privacy, 5.3, rule 2): a reader of a folder would leave such an entry out, or read it as another file, and the next version stored would drop it. Every such refusal, by code, with what triggers it:

| Code | What triggers it | Where a read that repairs puts it |
|---|---|---|
| `tree-name` | an entry's name that is no path segment: empty, `.` or `..`, or holding `/`, `\` or NUL | left out, given back |
| `tree-name` | a hidden name, one that starts with `.` (`.git`, `.draft.md`), which a reader of a folder skips (Part III, 1) | left out, given back |
| `tree-name` | a name that starts with `~` and is no shard: a leaf (`~x`), a sub-tree of a folder whose entries are not all shards, one not named `~` and two lowercase hexadecimal digits (`~zz`, `~CA`), or a shard in a shard (Part VI, 2, rule 3) | left out, given back (a sub-tree whole) |
| `tree-name` | a name in a shard other than the one its name's hash gives (rule 3) | read where it is, as the folder's entry, and reported |
| `tree-duplicate` | a name twice in one folder: in one tree, or in two of its shards (Part VI, 2) | the first read, each later one left out and given back |
| `tree-kept` | a kept file at a path that Part III, 7, rule 8 keeps from kept files: a name a file system refuses or reads otherwise (`notes/con.txt`, `notes/c:draft.md`, `C:/notes.md`), a path that folds to one with a record's, `eik.json`'s, `AGENTS.md`'s or an earlier kept file's (`Types/notes.md`, `agents.md`, `notes/Readme.md` beside `notes/README.md`), or one through `eik.json` or `AGENTS.md` (`AGENTS.md/notes.md`) | left out, given back |
| `tree-kept` | a kept file over 1 MiB, or holding NUL (rule 2); with the proposal drawings, an issued drawing over 64 MiB (XIV.7.3) | left out, given back |
| `tree-kept` | a leaf read as a kept file (a JSON string, or an object at no record's place, kept as its text) at a path no kept file has (rules 1 and 4): `AGENTS.md`, or a record's file, `<leaf>.json` where `<leaf>` is a record's place (`project/materials/notes.json`, `drawings/views/plan/v1/view.json`; with the proposal electrical, `project/circuits/<id>.json`) | left out, given back |

A tree or an entry of another shape is no tree (`not-a-tree`), an object that does not hash to its name is no object (`hash-mismatch`), and one that is not the canonical form of the JSON it parses to is none either (`object-not-canonical`; 5.3, rule 1): a read that repairs refuses each, as every read does. So does it a version past a bound of this tool (`BOUNDS`: `too-many-files`, `too-many-objects`, `version-too-deep`; 7.2, rule 4).

`readVersion(source, version, {repair: true})` reads such a version all the same, and loses nothing of it (rule 4). Each entry that no folder gives is left out of the model, of `files` and of `leaves`, reported in `diagnostics` with its code (an error, the entry in its `data`: `{entry, kind, hash, placed}`), and given back in `unplaced`:

```js
const read = await readVersion(source, root, { repair: true, check: false, lenient: true });
read.unplaced;   // [{path: "agents.md", folder: "", name: "agents.md", kind: "b", hash: "…", code: "tree-kept", why: "a kept file whose path folds to one with AGENTS.md …"}]
read.leaves;     // Map: every other leaf, path to hash, as versionTree gives them
```

Whoever stores the next version from such a read holds each entry of `unplaced` in it, unchanged at its path (its object is in the store, by `hash`), unless the application that owns the file, or a person, renamed or removed it. `repair` is not `lenient`: a lenient read is never written back, while a read that repairs is made so that the next version can be stored from it, with what it gave back. A clone and a pull never repair: the folder they write could not hold what is left out. To find such versions without opening them, read each with `repair` and look at `unplaced`, or read it without, and look at the refusal's `code` and `diagnostics`.

Two more options of `readVersion` are for an application that keeps its own store:

- `verify: false` takes the objects as the source answers them, without hashing each again (rule 5): only for a store of the application's own that checked each object against its hash as it took it in, and refused what failed, or for objects it made itself from their text (`versionTree`, its own writer). Never for another store's: a store `connectStore` connects is refused (`verify-remote`). A cache filled so holds what the source gave, and is shared only with reads of that source.
- `leaves` (always given) is each leaf read, path to its object's hash, as `versionTree` gives them, and `hashOf(list, id)` the hash of the leaf a record is in: a writer that keeps them finds the records that did not change without hashing them again. The model stays the single-file form.

Each record is parsed once, from its object, and the files' texts are its stored form. On the reference implementation's examples, read from memory as it reads them (`check: false`, `lenient`, every proposal), this reads a version in 0.53 to 0.66 of the time it took before (the guesthouse villa, 1181 objects, 25 ms where it took 38; the villa, 910 objects and 5.5 MB, 87 ms where it took 148; a version of 16 597 objects, 171 ms where it took 259); `verify: false` saves another 1 to 6 %, since hashing every object was never the main cost. Most of what is left is the I-JSON check of every record (Security and privacy, 7.3) and the stored form of each record's file.

## Compiling

`compileModel(model)` (and `openeik compile`) derives from a model's records what the class-A rules of Part IV give: the bodies of walls, slabs, foundations, ceilings, roofs, beams, columns, slab edge elements, gutters, pipes and ducts, with the openings shafts cut in their hosts, their quantities, and members' reference lines and axes; the line of a railing on a slab's or a shaft's outline, on a wall's level top or along a slab edge element, and its given posts; and a supplier's declared geometry, placed in its frame, on any element, a generic element's only shape. These are the requirements of the compiler (core) class, which this package claims of OpenEik 0.1 and of 0.2 ([Conformance](#conformance)): Part IV, 1 (nothing derived is stored; unknown categories), 4, 5, 6, 11 and 12; and, of 0.2, the rules 0.2 adds to those sections (a slab on a sloped plane, a door's and a window's own body, a slab edge element's notches, a framing family's parts and its beam's lines, a member between two points), the class-A rules of Part IV, 7.3 to 7.6 (straight, L and U stairs, a framed wall layer's members, a roof's truss layout and its hip ends, a floor's joists, a room's boundary, ceiling and quantities, a component's frame and its bodies), which the class asks of 0.2 by erratum 0.2-E1 ([`errata/0.2.md`](https://openeik.org/errata/0.2)), and Part XIII's bodies (Conformance, 1.1), which it derives for every model of 0.2 ([Proposals](#proposals)). What it does not derive (below) is reference behaviour, which the class does not require. It is a pure function of the records: it changes nothing in the model, and the same records give the same result in any element order (1.2, 1.3). For `examples/one-storey-house` it gives the quantities worked in Part IV, 9.

```js
import { readFolder, compileModel } from "@openeik/tools";

const { bodies, quantities, lines, railings, declared, diagnostics, notes } = compileModel(readFolder("examples/one-storey-house").model);
quantities["wall-south"].grossArea;    // {value: 27.0358…, unit: "m2", basis: "one side, on the centreline: …", rule: "IV.4.1"}
quantities["roof-main"].ridge.value;   // 10.6 (m)
```

**What is derived, rule by rule.**

| Rule | Derived |
|---|---|
| 4.1 Walls | One body per layer of non-zero thickness, between d_1 = T/2 and d_(i+1) = d_i − t_i along the left normal; without layers, one body of the wall's `width`. Limited by its `wallOutline` and its top |
| 4.3 Openings | A door or window cuts, through every layer, the box from `along` to `along + width` and from `offset` to `offset + height` above the wall's base, or its type's `outline` (x from the opening's near edge, y up from its bottom) |
| 4.2 Slabs, foundations, ceilings, flat roofs | One body per layer, top first, down from the top face; a layer's `inset` offsets the outline inwards; `voids` cut through every layer; a round footing is a cylinder. A slab or a foundation is thickened under a slab edge element whose type has a `beam`, and fills a chamfer's wedge (4.6) |
| 4.2, rule 8 Shafts | Each shaft takes the prism of its outline, from its base to its top, out of every body of the slabs, ceilings and roofs it overlaps in height by more than 0.5 mm, and a stair's shaft out of a foundation's too; through a body where it reaches within 0.5 mm of its underside or top. `shaftOpenings` gives each opening, `through` where it takes all of its host within its outline, else a recess. A slab's, ceiling's or flat roof's `area` loses the shafts through its whole thickness |
| 4.4 Pitched roofs | One plane per slope-defining edge, the top surface the least of them, the outline pushed out by each edge's overhang; each layer between the planes lowered by its depths times √(1 + gx² + gy²) |
| 4.5 Edges trimmed to a wall's face | The outline, or a pitched roof's extent, cut along the line of each face an edge is trimmed to (`edgeAttachments`): the wall's baseline moved by half its thickness, to its left for the exterior face, to its right for the interior one. The side away from the wall is kept, before the layers, their insets and the voids, but for a pitched roof's insets, which are measured from its eaves and then trimmed at the face; a pitched roof's planes stay its recorded edges'. The record keeps its outline, and the walls and their types are sources of the result. `trimmedOutlineOf` gives the trimmed outline without compiling |
| 4.6 Slab edge elements | The section (a rectangle centred on the edge's line; an L's upstand outside it and its bottom leg inside; a U's second upstand), hung from the host's top or the underside of its structure, raised by `verticalOffset`, moved in by `horizontalOffset`, mirrored by `flipped`; its facing outside it, its upstand's chamfer cut; each rectangle a prism along the edge, its ends square or mitred on the bisector of the host's corner (`miterEnds`, else where the edge round the corner carries an element that mitres by itself; square where the edges run straight on, the corner is sharper than 2·arctan(1/4), or the element is too short for its mitres). The host's thickened edges in bands under its structure, its lower layers giving way, and the wedge of a chamfer filled by its structure |
| 4.7 Gutters | The section (a half-round about its back lip on the eave line, its arc in 16 straight pieces; or a box) along its roof's edge moved out by its overhang, from where the moved lines of the edges beside it meet it, its top at the roof's top surface at each end, moved out by its horizontal offsets (the other way where `flipped`) and up by its vertical ones; left out where another roof of its roof's `joinGroup` lies more than 20 mm over its roof's top, found exactly, and where a piece of 10 mm or less is left. Its `length` in plan and its `volume`, the section's exact area by that length |
| 5.1 Top constraints | The height from the constraint's level and offset |
| 5.2 Column bases | The host's top or underside at the column's centre, plus the offset; the top stays where the record puts it |
| 5.3 Attached tops | The host's face (its top, its underside or a layer's underside) lowered square to a pitched roof's planes and raised by the offset; raking (the body cut by the face's planes) or level (flat at the face's lowest point over the core band) |
| 6.1 to 6.3 Members | The section, or the member's own `width` and `height`, swept along the reference line, square to the set-out line; a column turned by `turn`, a beam rolled by `roll` and tapered by `taper` |
| 6.4 Member joins | A `mitre` cuts both members on the plane bisecting their reference lines at their corner; a `butt` stops the end at the face of `to` its reference line enters first, held back by `gap`. A joined end runs on to its cut, or is cut back to it; `extend: false` only cuts |
| 6.5 Lines | Each member's reference line, through the middle of its section, and its axis, through the centroid: the reference line moved by the section's centroid offset, turned by the roll or the turn |
| 11.2 Railing lines | On a slab's or a shaft's outline: the edges `railing.edges` names, in their order round the outline as one run (closed when it names them all), each moved towards the walking side (inside a slab, outside a shaft) by its inset (`insets[<edge id>]`, else `inset`, else 50 mm). With one inset for the whole run, every corner moves along its bisector by the inset over the cosine of half the turn, at most 4 times the inset; otherwise every corner is where the moved lines cross, or halfway between their ends where they are parallel or cross farther than 4 times the larger inset. The validator finds the same line, point for point. The line stands on the host's top (a shaft's: 5.1). A railing with no host runs along its profile, on its level plus offset |
| 11.2 Railing lines on a wall's top and along a slab edge element | On a wall's level top: along its baseline, `T/2 − inset` to its left (the middle of its top without an inset), on its top. Along a slab edge element: its outer face moved in by the inset (the middle of its top without one), between its own ends, square or mitred, on its top and never under its slab's |
| 11.2 Given posts | A prism at each distance in `railing.posts.at` along the line in plan, and nowhere else: `postWidth` along the line by `postDepth` across it (`post` by `post` without them), centred on the line, square to its segment, or within 0.5 mm of a corner to the corner's bisector; from the base (`belowBase` below it when `mount` is `side`) to the underside of the top rail, `height` less the rail's depth |
| 12 Pipes and ducts | The run's points at their heights above the level (`elev(levelId) + mep.z[i]`, the offset not added); its outer width `W = mep.size + 2·insulation` (a rectangular duct also `H = (mep.height ?? mep.size) + 2·insulation`); each corner an arc of radius `W`, its ends `W·tan(θ/2)` from the corner but at most half the shorter piece (the radius shrinking to fit), sampled every π/12 or less; a circle (20 points for a duct, 14 for a pipe) carried without twisting, or an upright rectangle whose width stays level, along the path; one closed mesh. Faceted as the reference implementation facets it, so that its numbers are the reference's |
| 12.6 Terminals and components in a pipe or a duct | A terminal's declared geometry, else a box of its type's `terminal.width` across the way it faces (`profile[0]` toward `profile[1]`, else plan +y), `terminal.depth` along it and `terminal.height` high, centred on its point, from `elev(levelId) + offset` up; a component in a pipe or a duct the same box on its run's axis at `along`, facing along the run, placed from the run rather than its stored profile and offset; in a duct `max(terminal.width, W + 20)` across and `max(terminal.height, H + 20)` high, `W` and `H` the duct's outer size, rather than its stored `width` and `height`. A duct part that names no duct is a terminal as any other |
| 11.1 Declared geometry | Each aspect (`envelope`, `fixings`, `clearances`, `positions`, `parts`) from the element's declaration, else its type's, placed in that declaration's frame: an element's `world` frame (plan coordinates, heights over its base) or `line` frame (`[s, w, z]` along its line); a type's frame at the element's insertion point (component, furniture, terminal, column, generic), in its opening (door, window: x along the wall from the near edge, y towards the exterior, z up from the opening's bottom) or as a `swept` section along its line (railing, beam). A placed envelope stands in place of the bodies its category's rules derive; `loads` and `fabrication` are passed on as declared |
| 11.3 Generic elements | Their declared bodies only, at the insertion point, turned to the orientation, on the base; a volume from the closed ones with the basis `declared` |
| 1, rule 4 Unknown categories | Kept, with no body but their own declared geometry in the `world` frame; a type's declaration is not placed, since its frame depends on its category |
| XIII.7 and 6.3 | A device's box, a carrier's or a cable's run, and each modelled leg's length ([Proposals](#proposals)) |

**Bodies** are JSON, in millimetres, in project coordinates with z up. Each names its `element`, and its `layer` where the type has layers. A railing's post names its `part` (`"post"`) and where it stands along the line (`at`), and a slab edge element's facing its `part` (`"facing"`); a chamfer's fill and a band of a thickened edge are bodies of their host's structure layer; a body of declared geometry names whose declaration it comes from (`declared`: `"element"` or `"type"`) and its `aspect` (`"envelope"`; in `declared`, `"clearances"` or `"parts"`).

- `prism` (N1, and N3 with planes): `{profile, holes?, bottom?, top?, bottomPlanes?, topPlanes?}`: the plan polygon `profile` (counter-clockwise) less its `holes` (clockwise), from its underside up to its top. The top is the least of `top` and the planes of `topPlanes` at each point; the underside is `bottom`, or the least of `bottomPlanes`. A plane is `{gx, gy, z0}`: z = z0 + gx·x + gy·y. Where the underside is above the top, the body is empty. A wall's layer is one prism per span between, under and over its openings; a pitched roof's layer is one prism between the planes of its two surfaces.
- `sweep` (N4): `{line, across, up, section, extent?, cuts?}`: the section swept along `line`, the member's reference line from its start to its end. A point (x, v) of the section, x across and v up from the middle of its bounding box, lies at line(λ) + across·x + up·v. A tapered section's depth runs from `section.depth` at λ = 0 to `section.endDepth` at λ = 1, its underside on the set-out line. `extent` (default [0, 1]) is the range of λ swept, longer where a joined end runs on to its cut; a cut `{point, normal}` keeps the points p with (p − point)·normal ≤ 0.
- `cylinder` (N5): `{centre, radius, bottom, top}`, a round footing or a declared cylinder; `rod` (N5): `{from, to, diameter}`, a declared round bar.
- `polyhedron` (N2, convex) and `mesh` (N6): `{vertices, faces}`, each face a list of vertex indices, counter-clockwise seen from outside where the body is closed. A declared `swept` body is placed as one closed `mesh` per segment of its line, `at` the distance where the segment starts. A pipe or a duct is one closed `mesh`: a ring of points at each point of its rounded path, joined by four-sided faces, its first ring (reversed) and its last closing its ends.

**Quantities** are `{value, unit, basis, rule}`, in m³, m² or m, or a `count`, per element: its `volume` (openings and voids deducted, wall ends square, overlaps with other elements not deducted) and the volume of each of its `layers`; a wall's `length`, and its `grossArea`, `openingArea` and `netArea` on one side, on its centreline; a slab's, foundation's or ceiling's `area`; a pitched roof's `slopedArea` (its top surface over the outline extended by the overhangs, measured on the slope), `planArea`, `ridge` (the level lines where two of its planes meet on its top) and `hips` (the sloping ones); a member's `length`; a railing's `length` (its line in plan) and, with `posts.at`, its `posts`; a pipe's or a duct's `volume` (its outer section, insulation included, along its rounded path as sampled: not what the faceted mesh holds) and `length` (along its points in 3D, each bend as its corner). Where a declared envelope is placed, the `volume` is its closed bodies' (summed, overlaps not deducted), with the basis `declared`, and the volumes of the layers it replaces are not given; the quantities measured on the record (lengths, areas) stay. `lines` gives each member's `setOut` line (beams), `reference` line and `axis`, its section's `centroidOffset` in the section's own coordinates before roll or turn, and its `length`. Analysis tools use the axis (Part IV, 6.5). `railings` gives each railing's `line` (its points on its base, closing on its first where it is `closed`), its `length`, its walking side (`walk`: `left` or `right` of the line) and its `posts` (`at`, `centre`, the unit vector `along` its width, `width`, `depth`, `bottom`, `top`). `declared` gives, per element with declared geometry, each aspect's `from` (`element` or `type`), `level`, `tolerance` and `status` (`placed`, with its `frame`; `passed on`, for loads and fabrication; `kept`, with `why`), the placed `clearances`, `parts`, `fixings` and `positions`, the `loads` and `fabrication` as declared, and its `basis` records, each `confirmed` while its hash is unchanged. `sources` names, per element, the records its results come from.

**Where Part IV leaves a choice**, the compiler takes this one, and says so in its code:

- A raking attached top cuts the wall's bodies with the face's planes, so that across the wall the top follows the face; the areas are taken on the centreline. An attached wall's `wallOutline` is its unconnected outline (5.3.7) and is not applied. A level top's core band runs from the first core layer to the last, or across the whole wall without one.
- Each layer of a pitched roof lies between the least of its planes lowered by the layer's upper depth and the least lowered by its lower depth, as an attached face is found (5.3.3), so layers under faces of different slopes meet without a step. A pitched roof's layer `inset` is measured from the eaves (the extended outline), and a face its edges are trimmed to then trims the layer as it trims the extent (4.5, rule 4: the layers fill what is left), so that the layer reaches the face unless its inset lies beyond it; and `voids` cut pitched roofs too.
- An inset is mitred: each edge parallel to its own at the inset distance, corners where the moved edges meet. Where edges collapse, what turns inside out drops out, and a region that pinches off splits in two. There is no mitre limit.
- A roll turns right-handed about the set-out line's direction (counter-clockwise seen with the member coming towards you). A tapered beam turns about the line through the middle of its section at its start.
- An `L` section's legs meet at its `angleCorner`, bottom left (−x, the underside) by default; a `U`'s web is on its −x side; `radius` is a root fillet of an `L`, `U` or `I` (a `T`'s and a `2L`'s are where Part II, 5.2, rule 5 puts them), and an `RHS`'s outer corner radius (inside, the radius less the wall); a `CHS`'s `width` is its outer diameter and its `web` its wall, and a `round` section is the disc of its `width`. Areas and centroids are exact, arcs included.
- A mitre's corner is the middle of the closest points of the two reference lines. A butt meets the other member's body as built before its own joins; a round tube's or bar's face is the plane touching it where the reference line meets it. A joined end grows by at most the distance to the joint plus both sections' larger dimensions, as Part IV, 6.4 describes the reference behaviour. `gap` is a butt's (6.4.2).
- A host covers a wall's centreline, or a column's centre, within 0.001 mm: the boundary counts. A pitched roof's footprint is its outline extended by its overhangs.
- Over an outline with a re-entrant corner whose edges define slopes (an L), the least of the planes runs below the eaves inside the outline. The compiler builds what 4.4.2 says and warns (`roof-below-eaves`); such a roof is drawn as two roofs.
- A railing's corners take the bisector rule only where the whole run has one inset, as the reference implementation and the validator do; with two insets or more, a corner whose two edges share one takes the crossing rule too (the two differ at turns sharper than about 151°, where the bisector stops at 4 times the inset and the crossing gives way to the halfway point). A half-round top rail is half its `railWidth` deep, a flat one `railDepth`. A railing with no host walks on its line's left. A post stands at a corner when it is within 0.5 mm of it; given posts are placed on a railing with no host too, and a position off the line is reported (`railing-post-layout`), not placed.
- A railing on an outline measures its `line` frame's heights, and its type's section, from its base (the host's top); a beam's line is its plan axis, level at its base, and its `w` runs to its left. A line-frame body is mapped by the one segment that holds all its points within 0.5 mm, else point by point; a swept section is swept square to each segment, the pieces not mitred.
- A declared body's volume: a prism's area by its height, a cylinder's and a rod's exact, a closed mesh's by the divergence theorem (turned outwards first), a convex polyhedron's with its faces turned away from its centroid. A mesh whose faces do not pair up the other way round, or a polyhedron whose edges are not each met by two faces, is placed without a volume (`declared-open`).
- The opening frame does not turn with `flipped` or `handFlipped`; a column's point frame turns with its `turn` and stands on its attached base where it has one; a component placed by `insertAt`, a slab edge's or a gutter's line, and a type of any other category (a stair kit) have no frame here: their declarations are kept, not placed (`declared-frame`). A declaration's `basis` is looked for as the validator looks for it, among the elements, the types, the views and then the other lists; an id that names no record (an edge's) leaves it unconfirmed.

- A pipe or a duct whose points come within 1 mm of each other, or that turns straight back, is built by the rule and reported (`run-shape`): the reference implementation's validator refuses it. A run without `mep`, or without a height for each point, is not built (`run-heights`); the reference implementation reads it with fallbacks of its own (Part IV, 12, note).
- A rectangular duct's section keeps its side vector where the run is vertical and never reverses it (Part IV, 12.3, rule 3). The reference implementation does the same since `d0774a48`; all eighteen fixture runs (`test/fixtures/run-bodies.json`) are its own numbers.

**Not derived** (reference behaviour, classes B and C; Part IV, 2, 7.1 and 7.2): wall joins (the ends are square, and the result's `notes` say so), framing families (a beam built from one has no body or lines), a `sheet` section's profile (Part IV does not fix one: no area, volume or axis), trusses and timber framing, roof windows, join groups, vaults, square edge cuts and layer extents, slab joints, panels and edge attachments, recesses and edge details, a wall's cut roof and extended exterior layers, column connections, a slab edge element's notches and a framing family's section, and the bodies of doors and windows, components, stairs, rebar, mesh and site elements, but for their declared geometry; a gutter on a barrel vault; a shaft's cut in a round footing or in a chamfer's fill (`shaft-uncut`); the shapes the reference implementation draws for some terminals (a terminal is a box of its type's size, 12.6); the MEP fittings between runs (branches, reductions, joints) and a downpipe's path from its gutter; a railing's line on a stair, its post layout without `posts.at` (`railing-posts-reference`), its rails, infill and handrails; room boundaries; placed copies. An element that uses one of them gets an info diagnostic (`not-derived`), and the `notes` list what the model leaves out. Of these, it derives for a model of 0.2, and for one of 0.1 asked for the proposals, what 0.2 makes rules ([Proposals](#proposals)): a framing family's parts and its beam's lines (Part IV, 6.5.1 and 6.6), a framed wall layer's members, a roof's truss layout and its hip ends, and a floor's joists (7.4), a slab edge element's notches (4.6, rules 12 to 14), a door's and a window's own body (4.3.1), a straight, L or U stair's layout and a cast concrete stair's flights and landings (7.3), a component's frame and the bodies of 7.6, and a room's boundary, ceiling and quantities (7.5).

**The derived layer** (Part IV, 1.1, in the layout and the form 1.1.2 proposes for 0.2, open question 98, which 0.1 leaves open and they meet): `derivedLayer(model, result)` gives one result per element for `.eik/derived/elements/<id>.json`, `{sources, producer, rule, result}`, naming each record its result comes from by its hash. Its keys are `<list>/<id>` (`levels` for the levels), since an id is unique only within its list; a record the result looked for and did not find (a missing host) is named with the hash `null`; and `referrers/<id>` hashes the sorted ids of the elements whose `hostId` or `joins[].to` name the element, so that an opening added to a wall, or a join made from another member's record, makes the wall's or the member's result stale; `categories/<category>` hashes every element of a category, sorted by id, where any of them may change the result (a shaft for a slab, a roof of its group for a gutter). `derivedCurrent(model, file)` says whether each named record still has that hash. A result's `result` holds the element's `bodies`, in the kinds of Part IV, 1.1.1 alone (`derivedBodies`: a level prism an `extrusion`, a sweep carried whole a `swept` with its roll, a cylinder and a rod themselves, and a sloped prism, a sweep with cuts or a taper, a polyhedron and a mesh `faces`, a body for each closed shell), and its `quantities` and a member's `line` where it has them, and nothing else; an element with declared geometry also names the records of its `basis`. The package writes no such file: a model is complete without them, and a result is never in a version (1.1, rule 3). Its file is named by the element's id as a path segment (Part III, 2), so every path stays in `.eik/derived/`. `readDerived(model, files)` reads a folder's layer, the files by their paths: the results a reader may use, by their keys, and a diagnostic for each other file, a warning for one at no result's path (`derived-path`) or not in its form (`derived-form`), an info for one that is stale (`derived-stale`), or, given `own` (`{producer, rule}`), of another producer's rules (1.1.2, rule 5); none of them makes a model invalid.

Diagnostics are `{severity, code, element?, message, rule}`, sorted by element:

| Code | Severity | Rule | What |
|---|---|---|---|
| `id-duplicate` | error | I.6.1 | two elements, types or levels share an id: none of them is used |
| `level-missing` | error | I.4.3 | an element's level is not in the model: it is not compiled |
| `type-missing` | error | I.7.1 | an element's type is not in the model or is of another category: its own width and height are used |
| `profile-invalid` | error | II.6.1 | an element's profile lacks the points its category needs: it is not compiled |
| `size-invalid` | error | II.5.1 | an element's thickness, width or height is not positive: it is not compiled |
| `top-invalid` | error | IV.5.1 | a top constraint names no level or is not above the base: the unconnected height is used |
| `attach-host` | error | IV.5.3.1 | an attached top's host is missing or cannot host it: the unconnected top is used |
| `attach-cover` | error | IV.5.3.1 | an attached top's host does not cover the wall's whole centreline in plan: the unconnected top is used |
| `attach-face` | error | IV.5.3.2 | an attached top names a layer its host does not have: the unconnected top is used |
| `attach-below` | error | IV.5.3.6 | an attached face does not rise above the wall's base, or falls below it by more than the host's depth: the unconnected top is used |
| `attach-outline` | info | IV.5.3.7 | an attached wall's wallOutline is its unconnected outline: the face sets its top, and the outline is not applied |
| `base-host` | error | IV.5.2.1 | an attached column base's host is missing or not a foundation or slab: the recorded base is used |
| `base-cover` | error | IV.5.2.1 | an attached column base's host does not contain the column's centre: the recorded base is used |
| `base-length` | error | IV.5.2.4 | an attached column base leaves no positive length: the recorded base is used |
| `opening-host` | warning | IV.4.3 | a door or window whose host is not a wall cuts nothing |
| `frames-fit` | warning | IV.4.3.1 | in 0.2, or in 0.1 with the proposal frames, a door or window whose family's sizes leave no room for its frame, its leaves or sashes or its glass, or whose wall has no size: it has no body of its own |
| `frames-profile` | error | IV.4.3.1.15 | in 0.2, or in 0.1 with the proposal frames, a door or window whose family gives a profile that is no outline of Part II, 5.2, whose bounding box is not its members' width by their depth, or that shapes a frame that follows its wall: it has no body of its own |
| `component-frame` | warning | IV.7.6 | in 0.2, or in 0.1 with the proposal components, a component that has no frame: axes whose x is zero or whose y runs along x, a profile whose two points are one, a plate's column or its own level missing, or a cast-in item whose `hostId` names no wall with a straight baseline: it has no body |
| `stairs-layout` | warning | IV.7.3.1 | in 0.2, or in 0.1 with the proposal stairs, a straight, L or U stair that cannot be laid out (no risers or going, its top not above its base, a first run of as many risers as it has, an L's landing shallower than its run is wide): it has no layout, and no body |
| `framing-expression` | error | IV.6.6.1 | in 0.2, or in 0.1 with the proposal framing, a beam or a slab edge element whose framing family does not evaluate (an expression that is invalid, a parameter outside its range or named twice, or one the element gives that is not of scope instance): it has no body |
| `framing-part` | error | IV.6.6.1 | in 0.2, or in 0.1 with the proposal framing, a beam or a slab edge element whose framing family's parts cannot be built (a Length, a width, a depth or a plate's thickness outside its range, a member under 1 mm long, an outline that is not simple, a cut through a part's centre, a joint by a part that is no part or is not convex, a tail without its parameters, a part cut away, a plate off its members or on a slab edge element): it has no body |
| `framing-layout-rule` | warning | IV.7.4.1 | in 0.2, or in 0.1 with the proposal framingLayout, a layer's framing rule that cannot be read, or a layer with no thickness: that layer has no layout |
| `framing-layout-top` | warning | IV.7.4.3 | in 0.2, or in 0.1 with the proposal framingLayout, a framed wall whose top these rules cannot take (its attached or cut face not one of Part IV, 5.3, a barrel vault, a top constraint below its base, no envelope, or a top plate with no room under it): it has no layout |
| `framing-layout-floor` | warning | IV.7.4.4 | in 0.2, or in 0.1 with the proposal framingLayout, a framed wall whose framingTop.floorId names no slab: it has no layout |
| `framing-layout-materialised` | info | IV.7.4.12 | in 0.2, or in 0.1 with the proposal framingLayout, a framed wall whose members, or a roof whose trusses, are materialised as elements (Part II, 10): no layout is derived for it |
| `framing-layout-roof` | warning | IV.7.4.13 | in 0.2, or in 0.1 with the proposal framingLayout, a roof whose truss layout cannot be laid out (its family, its faces, its bearings, its range, a truss's span or heel; with the proposal slabBearings, a named slab with no edge along its eaves on its side, or whose plane slopes): it has no layout, and its walls are laid out without its trusses |
| `framing-layout-joists` | warning | IV.7.4.15 | in 0.2, or in 0.1 with the proposal framingLayout, a floor whose joist rule cannot be read, or that has no level or outline: it has no joists |
| `framing-layout-note` | info | IV.7.4 | in 0.2, or in 0.1 with the proposal framingLayout, what a layout says of a framed layer, a truss layout or a floor's joists: an opening above its frame, two openings too close for their jacks and kings, a header cut at the plates, a joint outside the frame, a heel zone too low for heel members, a roof opening not framed, bearings out of line, a hip end too short to frame, a hip truss or a jack left out or with no bearing, an edge of a floor not framed |
| `rooms-enclosed` | warning | IV.7.5.3 | in 0.2, or in 0.1 with the proposal rooms, a room placed by a point that lies in no closed face of the walls, columns and room separators on its level: it has no boundary |
| `rooms-shared` | warning | IV.7.5.4 | in 0.2, or in 0.1 with the proposal rooms, a room placed by a point in the face of another room whose id comes first in code-unit order: that room keeps the face, and this one has no boundary |
| `provision-shape` | error | II.6.10.2 | in 0.2, or in 0.1 with the proposal provision, a provision whose frame, size or centre gives no body: it has none |
| `inset-empty` | warning | IV.4.2.2 | a layer's inset leaves nothing of the outline |
| `footing-invalid` | error | IV.4.2.5 | a round footing without a centre or a diameter: it is not compiled |
| `roof-edge` | warning | IV.4.4 | a roof edge rule names no edge of the roof's outline |
| `roof-below-eaves` | warning | IV.4.4.2 | a pitched roof's top surface, the least of its planes, falls below its edges' height inside its outline: a slope-defining edge's plane runs on past a re-entrant corner |
| `roof-falls-mixed` | error | IV.4.4.1.2 | in 0.8, or in 0.7 with the proposal roofFalls, a roof whose edges define slopes both below 0 and above 0: it has no body |
| `roof-above-eaves` | warning | IV.4.4.1.4 | in 0.8, or in 0.7 with the proposal roofFalls, a roof that falls inward whose top surface, the highest of its planes, rises over its eaves inside its outline: a slope-defining edge's plane runs on past a re-entrant corner |
| `attach-falls` | error | IV.4.4.1.6 | in 0.7 with the proposal roofFalls and not fallingRoofTops, which 0.8 makes a rule with it, a wall whose top is attached raking to a roof that falls inward: its unconnected top is used |
| `firrings-not-laid` | warning | IV.4.4.2 | in 0.8, or in 0.7 with the proposal roofFalls, a roof's firrings that are not laid: a roof with no faces by these rules (a barrel vault, a roof with no body) |
| `trim-invalid` | error | II.6.7 | an outline edge trimmed to a wall's face that breaks a rule of Part II, 6.7 (an edge its outline does not have, or one trimmed twice, or a round footing's; a host that is not in the model or not a wall; an edge not parallel to the wall, or short of its face), or whose face cannot be found (a wall without a baseline or a thickness): it trims nothing |
| `trim-empty` | error | II.6.7.5 | the trims of an outline's edges leave less than 100 mm² of it: none of them is applied |
| `member-line` | error | IV.6.7.1 | in 0.2, or in 0.1 with the proposal member, a member without a line: its profile not two points, its end or its end's level missing, or its two ends less than 10 mm apart: it has no body |
| `slab-plane` | error | IV.4.2.1.7 | in 0.2, or in 0.1 with the proposal slopedSlab, a slab whose plane cannot be read (its gradient or its direction not given once, an edge its outline does not have, a slope over 75°): it has no body |
| `slab-plane-edge` | error | IV.4.2.1.6 | in 0.2, or in 0.1 with the proposal slopedSlab, a slab edge element on a slab whose plane slopes: it has no body, and the slab no thickened edge or chamfer's fill |
| `beam-rise` | error | IV.6.2.2 | a beam with neither a section nor a framing family has an endRise: it is built level |
| `taper-shape` | warning | IV.6.2.4 | a taper on a member that is not a rectangular section is not applied |
| `roll-family` | warning | IV.6.6.15 | a roll on a beam built from a framing family, whose parts it does not turn, is not applied |
| `sheet-section` | warning | IV.6.5.6 | a sheet section's profile is not fixed by Part IV: its area, volume and axis are not derived |
| `section-outline` | error | II.5.2.9 | a custom section's outline breaks a rule of Part II, 5.2, rule 9: its member is not compiled |
| `framing-family` | info | IV.6.2.6 | a beam built from a framing family: its body and lines are not derived here |
| `join-invalid` | error | IV.6.4.5 | a member join that breaks a rule of Part IV, 6.4: it is not applied |
| `join-open` | warning | IV.6.4 | a member join whose cut cannot be found (the members do not meet, or the other has no body here): it is not applied |
| `join-capped` | info | IV.6.4 | a joined end would have to grow further than the reference behaviour lets it to reach its cut |
| `not-derived` | info | IV.2 | a member whose effect on the body is reference behaviour (class B or C), not derived here |
| `category-unknown` | info | IV.1.4 | an element of a category this compiler does not know: no body, or the declared geometry of its own it could place |
| `generic-shape` | error | II.6.6.2 | a generic element without declared geometry, its own or its type's: it has no body |
| `copy-id-stored` | error | IV.13.8 | in 0.5, or in 0.4 with the proposal copies, an element an instance of a group derives has the id of a stored element (Part II, 10.1, rule 4): the stored element is compiled, and the instance's is not derived |
| `given-shape` | info | VIII.2.3.6 | in 0.2, or in 0.1 with the proposal ifc-read, an element whose shape is given (`shape: "given"`): no body is derived from its members, which place it and nothing more, and it cuts nothing; its body is the one its reader gave |
| `declared` | info | IV.11.1.3 | an element with declared geometry: which results come from the declaration, and which from its category's own rules |
| `declared-frame` | warning | II.12.1 | declared geometry this compiler cannot place (a frame Part II, 12.1 does not give, a line the element does not have here, a body its frame cannot hold): it is kept, not placed |
| `declared-open` | warning | II.12.1.4 | a declared mesh or polyhedron whose faces do not close a surface, one way round: it is placed, and the element's volume is not given |
| `declared-basis` | warning | II.12.1.5 | a record a declaration's basis names has changed since, or is gone: the declaration is placed and used, and unconfirmed |
| `railing-host` | error | II.12.2.2 | a railing whose host is not a stair, a slab, a shaft, a wall or a slab edge element, or has no outline, baseline or level, or, with the proposal edgeNone, is a slab edge element of the shape none (Part IV, 4.6.2, rule 4): it has no line |
| `railing-wall-top` | info | IV.11.2.8 | a railing on a wall's top that is attached or has an elevation outline: its line over that top is not derived here (a level top is) |
| `railing-edges` | error | II.12.2.3 | a railing on an outline names no edges, or an edge its host does not have: it has no line |
| `railing-run` | error | II.12.2.2 | a railing's edges do not follow one another round its host's outline as one run: it has no line |
| `railing-type` | error | II.12.2.1 | a railing whose type has no railing payload, or one without a post size or height: its posts are not derived |
| `railing-stair` | info | IV.11.2 | a railing on a stair: its line follows the stair's flights, reference behaviour, not derived here |
| `railing-posts-reference` | info | IV.11.2.6 | a railing without posts.at: its post layout is reference behaviour, and no posts are derived |
| `railing-post-layout` | warning | II.12.2 | a position in posts.at off the railing's line, past its end: no post stands there |
| `edge-host` | error | II.6.1.6 | a slab edge element whose host is not a slab or a foundation with an outline and a level, or whose hostEdgeId names no edge of it: it has no body |
| `edge-section` | error | II.5.6.1 | a slab edge element whose section has no size, or an L's or a U's whose flange or web leaves it no inside, or one of the shape `none` without the proposal edgeNone: it has no body |
| `edge-family` | info | II.5.4 | a slab edge element whose type is a framing family: its section is its family's, not derived here |
| `quantity-negative` | warning | XXI.2.4 | in 0.6, or in 0.5 with the proposal quantities, a quantity whose rule gives a value under 0: it is left out, never 0 |
| `pieces-not-laid` | warning | XX.3.6 | with the proposal pieces, an element or a layer whose pieces are not laid out, and why (an error of Part XX, 12 on it, its type, its host or an adopted piece of it; a slab on a sloped plane; corner pieces' legs longer than their edge): it is built as 0.4 builds it |
| `pieces-opening` | warning | XX.4.5.7 | with the proposal pieces, a notch that reaches into a corner piece's leg: the element's pieces are not laid out |
| `pieces-short` | info | XX.4.3.6 | with the proposal pieces, a run shorter than its type's least cut, laid as one cut piece |
| `pieces-uncut` | warning | XX.4.3.7 | with the proposal pieces, what is left at a run's end where its pieces may not be cut, which no piece fills |
| `edge-chamfer` | warning | II.5.6.2 | a chamfer Part II, 5.6, rule 2 does not allow (on a rectangle, wider than the upstand or higher than its inner face): it is not cut, and its host fills nothing |
| `edge-notches` | warning | IV.4.6.12 | with the proposal adopted, a slab edge element's notches that rule 12 does not allow (no outside upstand, shorter than 10 mm, past their edge, below the flange, shallower than the chamfer, overlapping): they are not cut, and the element is built whole |
| `edge-thickening` | warning | IV.4.6.11 | a slab's thickened edges that do not fit it (the edges moved in by their beams' widths close no simple outline inside it, or a void reaches into them): the slab is built without them |
| `gutter-host` | error | II.6.1.13 | a gutter whose host is not a roof with an outline and a level, or whose hostEdgeId names no edge of it, or whose type gives no section it can be built from (Part II, 5.6, rule 3): it has no body |
| `gutter-buried` | info | IV.4.7.6 | a gutter that other roofs of its group bury along its whole eave line, but for pieces of 10 mm or less: it has no body |
| `shaft-uncut` | info | IV.4.2.8 | a body a shaft meets that this compiler does not cut: a round footing's cylinder, or a chamfer's fill |
| `run-heights` | error | IV.12.1.1 | a pipe or a duct without mep, or whose mep.z does not give a height for each point of its profile: it is not compiled |
| `fitting-bend` | warning | IV.12.8.3 | with the proposal `mepFittings`, a bend, at a run's corner or where two runs meet, whose run's type lists standard bends of which none makes its turn within 2.5°, nor two of them: it is listed, its `bends` `[]` |
| `terrain-ground` | warning | IV.14.1 | with the proposal grading, a terrain whose outline has fewer than three points or no area, whose level is missing, or whose points make no triangle: it gives no ground |
| `water-body` | warning | IV.14.7.1 | in 0.6, or in 0.5 with the proposal siteWater, a water element whose level is missing, whose outline is no simple polygon, whose payload its schema refuses (no surface, a batter of 0 or less or over 100, among them), or whose bottom lies at or over its surface: it has no body, digs nothing, and no shape is guessed for it |
| `site-equipment-body` | warning | IV.15.6 | in 0.7, or in 0.6 with the proposal siteEquipment, an element of the category `siteEquipment` whose level or type is missing, whose type's `siteEquipment` its schema refuses (no kind, a measure of its kind missing or out of its bounds, or a measure of another kind), or whose profile is not its kind's: it has no body, and no shape is guessed for it |
| `grading-pad` | warning | IV.14.2.1 | with the proposal grading, a grading element whose outline has fewer than three points, or whose level is missing: it is no pad, and grades nothing |
| `run-shape` | warning | IV.12.1.4 | a pipe or a duct with two points in a row within 1 mm of each other, or a turn straight back: it is built as Part IV, 12 says, and is no run the reference implementation would write |
| `electrical-profile` | error | XIII.2.3.1 | in 0.2, or in 0.1 with the proposal electrical: an electrical element whose profile is not two distinct points, `at` and `toward`: it has no body |
| `electrical-type` | error | XIII.2.3.2 | in 0.2, or in 0.1 with the proposal electrical: an electrical element whose type has no payload `electrical` with its `mount` and `depth`: it has no body |
| `component-host` | error | II.6.9.6 | a component in a pipe or a duct whose `hostId` names no element of its run's category, or whose run, level or type's `terminal` size is malformed: it has no body |
| `terminal-size` | info | IV.12.6 | a terminal whose type gives no `terminal` width, depth and height, or whose profile gives no point: it has no body but its declared geometry |
| `bar-shape` | error | IV.7.7.2 | in 0.5, or in 0.4 with the proposal barShapes, a bar set whose legs make no bar: a leg shorter than its bends take of it, legs without a mandrel, a turn straight back, or a frame or a row it cannot be laid in: it has no body |

### Quantities

From 0.6 ([Part XXI](https://openeik.org/spec/0.6/quantities); open question 144), on a model of 0.6, and on a model of 0.5 with the proposal `quantities`, `compileModel(model)`, or `compileModel(model, {proposals: ["quantities"]})` of a model of 0.5, gives, beside the compiler's own `quantities`, which stay as they are for the readers that read them, `typedQuantities`: each element's quantities by the names Part XXI gives them, one unit and one meaning each, net on its bodies with every door, window, void and shaft taken out and gross without them, each layer's under its id, and a mass by its materials' densities. `quantitiesOf` gives them with each type's and the lists a schedule reads.

```js
import { quantitiesOf } from "@openeik/tools/quantities";

const q = quantitiesOf(model);                              // a model of 0.5
q.elements["wall-south"].netExteriorArea;                    // {value: 23.0550…, unit: "m2", basis: "net: its exterior face, …", rule: "XXI.5.1.4"}
q.elements["wall-south"].layers.render.netArea.value;        // 23.0619… (m²), its volume over its 20 mm
q.elements["slab-ground"].netMass.value;                     // 37895.76 (kg), by its layers' densities
q.types["type-wall-exterior-300"].netSideArea;               // {value: 100.3671…, unit: "m2", …, of: 4}, its four walls'
q.runs;       // pipes, ducts, carriers and cables: their length by category, type, system and size
q.bars;       // bar sets by diameter: every set's bars; length, volume, mass, each with how many sets give it
q.cables;     // the modelled legs' length, cable by cable
q.pits;       // each stated pit's dug volume and its topsoil; with derivedPits asked for too, each derived pit's
q.cutList;    // Part XX's schedule, in m and m²
```

- **Gross** quantities come from a second, lean compile of `strippedOf(model)`, the model without its doors, windows and shafts and with no `voids`, so that gross less net is what they take and nothing else (Part XXI, 3): a member's gross volume keeps its joins, as its net one does. A foundation's net area loses a stair's shaft through it, as its volume does (5.2, rule 2).
- **Masses** (Part XXI, 4): a layered element's by its layers' materials; a wall's framed layer and a slab's joist layer by their members as Part IV, 7.4 lays them out, at their rule's material's density, else their layer's, and none for a framed layer whose members are materialised; a bar set's its nominal mass at `BAR_DENSITY`, 7850 kg/m³, whatever density its steel gives, a bar of another category of material at its own; a slab edge element's by its section's and its facing's materials. A bar set given without legs has its `barCount`, and nothing its centreline gives.
- **Nothing under 0**: a value a rule gives under 0 is left out, never 0, and the compiler says so (`quantity-negative`); `underZero` tells a caller which. Each quantity's `rule` is a numbered rule of Part XXI.
- **Sums**: a type's and a list's sums carry `of`, how many of the elements or sets summed give them; the agent host's `query` sums `length`, which each category measures its own way, within one category, by category where the elements it keeps are of more than one (`SUMMED_BY_CATEGORY`).
- **A wall's faces** are measured on its bodies, `faceArea(bodies, origin, normal, offset)`: the faces of its prisms that lie in the plumb plane of its exterior or its interior face, as its corners and tees end them and its top cuts them (Part XXI, 5.1, rule 4).
- **Where they go**: `derivedLayer` writes them in a result, its rule naming Part XXI, and `readDerived(model, files, own, {proposals: ["quantities"]})` holds a result to `schemas/0.5/proposed/quantities/result.schema.json`, which holds a result whose rule names Part XXI to its names' units, a basis and a rule each and counts that are whole; the agent host's `query` sums them and its full read gives them beside a record; `ifcOfModel(model, {proposals: ["quantities"]})` prints them as IFC's base quantities (`QTO_SETS`), the rest in `OpenEik_Quantities`.
- **A project's method of measurement**: `project.quantities`, `{method}`, its name alone, which the command `project.quantities` sets; it changes no quantity.

### Cost and work schedules

From 0.6 ([Part XXII](https://openeik.org/spec/0.6/schedules); open questions 151 to 154), on a model of 0.6, and on a model of 0.5 with the proposals `costSchedules` and `workSchedules`, each of which applies `quantities` too. A model's cost schedules are in `project/cost-schedules.json`, each item what is priced and how much of it, and no price; its work schedules and their calendars in `project/work-schedules.json`. A project's own rates are a rate list, `openeik-rates/0.1`, kept apart from the model: under `.eik/rates/` in a folder, which no version holds, or beside the building on a host. `checkModel` and `checkFolder` check the files when asked, and report a rate list among a model's kept files as an error (`rates-in-model`).

```js
import { costScheduleOf, ratesChecks, workScheduleOf } from "@openeik/tools/schedules";

const { value: rates } = ratesChecks({ schemas, text: fs.readFileSync(".eik/rates/example.json", "utf8") });
const estimate = costScheduleOf(model, "estimate", { rates }); // a model of 0.5 with its cost schedules
estimate.items.find((i) => i.id === "ew-render").quantity;    // {value: 101.7106…, unit: "m2", of: 4, elements: 4, rule: "XXII.3.5.1"}
estimate.amount;                                               // {value: 26417.50…, currency: "EUR", unpriced: 1}
const plan = workScheduleOf(model, "construction");
plan.tasks.find((t) => t.id === "roof");                      // {start: "2027-03-22", finish: "2027-03-30", totalFloat: 0, critical: true, …}
// Reported to a status date: each task's progress, its forecast from the data day, and by the estimate's rates its value.
workScheduleOf(model, "construction", { costSchedule: "estimate", rates }).progress; // {forecastFinish: "2027-04-02", earned: …, scheduleVariance: …}
```

- **A selection** keeps elements by ids, types, categories, levels, statuses and tender parts, the instances of placed copies among them (`selectionOf`); one that names what the model lacks, or keeps nothing, is a warning.
- **Commands**: `costSchedule.upsert` and `.delete`, `costItem.upsert` and `.delete`, `workSchedule.upsert` and `.delete`, `task.upsert` and `.delete`, `calendar.upsert` and `.delete`, each the whole state as read its precondition; and progress, `task.progress`, a task's actual days and its elements built (or its per cent where it names none), and `workSchedule.status`, its status date, who reports it the envelope's writer.
- **The agent host** answers `schedules`, pricing by the folder's own rate lists; **the IFC bridge** prints IfcCostSchedule, IfcCostItem, IfcWorkSchedule, IfcTask, IfcRelSequence and IfcWorkCalendar, and a rate only where it is given a rate list: `ifcOfModel(model, {proposals: ["costSchedules", "workSchedules"], rates})`.

## IFC

`ifcOfModel(model, options)` (and `openeik ifc`) prints a model as IFC4: the IFC bridge of Part VIII, 1, written from the specification. An IFC file is a print of a model version, as a PDF is of a drawing: it is never the record and never compared, and it names the version it was printed from. So that EikHub, Femra, Varmra and every other application print IFC the same way, it runs wherever the library runs: it imports nothing of Node.js and reads no clock.

```js
import { readFolder, ifcOfModel } from "@openeik/tools";

const { text, report } = ifcOfModel(readFolder("examples/one-storey-house").model, {
  version: { root: "747068e0…", id: "v-42" },   // named in the print's OpenEik_Source, where given
  at: "2026-10-25T12:00:00Z",                   // the print's time; else the version's `at`; else 1970-01-01T00:00:00Z
  printedBy: { organisation: "EikHub" },        // who printed it; else "OpenEik reference tools"
  crs: { epsg: 3006, verticalDatum: "RH2000" }, // on a map, where asked: an IfcMapConversion to SWEREF 99 TM
});
// report: {schema: "IFC4", products: {total: 10, byClass: {IfcDoor: 1, IfcRoof: 1, IfcSlab: 1, IfcWall: 5, IfcWindow: 2}},
//          openings: {total: 3, …}, types: {total: 6, …}, storeys: 2, spaces: 0, zones: 0, systems: 0, circuits: 0, profiles: 0,
//          ports: 0, portLinks: 0, sourceGlobalIds: 0, map: {epsg: 3006, eastings: 319758.020082, northings: 6400326.036182, …},
//          leftOut: […], approximated: […], …}
```

What it writes:

- **The project, a site and a building**, the site with the project's latitude, longitude, elevation and true north (Part II, 2), and **a storey for each level** at its elevation. Lengths in millimetres, areas in m², volumes in m³, as the reference bridge writes them.
- **Every element of a category of 0.1 that has a body** (VIII.1, rule 1), in its level's storey, from the bodies `compileModel` derives: each body as an `IfcPolygonalFaceSet` of plane faces with their holes, closed where its faces close it (a prism with sloped planes in convex pieces, a member's section carried along its line and cut by its joins), a closed set being one closed shell, every edge met once each way, so that the convex pieces of a sloped prism, which meet face to face, are each a set of their own (buildingSMART's rule GEM001), and a round footing's cylinder as an extruded circle; styled with its layer's or its type's colour.
- **Each element's type**, as the IFC element type of its class, with its material: a material layer set for a type with layers, else the type's material, matched to the model's materials by name (Part II, 4). The type carries its occurrences' predefined type, and a door's or a window's operation, which a typed occurrence leaves unset, as IFC4 has it (buildingSMART's rules OJT001, BLT001 and BLT002); where the occurrences of one type record need it to carry another (two doors of one type that open the two ways, silencers in a round and a rectangular duct), the first keeps the IFC type keyed as the reference bridge keys it (`type:<class>:<type id>`), and each other value has an IFC type of its own (`type:<class>:<type id>:<what it carries, as JSON>`).
- **Openings as voids**: each door's and window's opening an `IfcOpeningElement` through its wall's thickness, the box or the type's outline of Part IV, 4.3, voiding the wall, and the door or window filling it, with its `OverallHeight` and `OverallWidth` and its type (`IfcDoorType`, `IfcWindowType`). The wall's bodies have their openings cut already, as the IFC4 Reference View has them.
- **How a door opens and a window is divided** (`src/ifc-ports.js`), on its type, or on the occurrence where it has none, where the type's family says it (Part II, 5): a door's `OperationType` from its type's `openingFamily` and its own `handFlipped` and `flipped`, its hinge side the opening's start along its wall for `hinge: "left"`, as the reference implementation reads it. Left and right are as IFC4 sees them, looking the way the leaf opens (its "viewed in the direction of the positive y-axis"; Part II, 6.5; Part VIII, 1.2). A door that slides on its wall's face or past its other leaves (`operation: "slide"`) or into the wall (`"pocket"`) `SLIDING_TO_LEFT` where it slides toward its left, its hinge side, and `SLIDING_TO_RIGHT` toward its right, and a pocket door of two leaves `DOUBLE_DOOR_SLIDING`; a door that swings `SINGLE_SWING_LEFT` where its hinges are on the left and `SINGLE_SWING_RIGHT` otherwise, two leaves `DOUBLE_DOOR_SINGLE_SWING`; a garage door `ROLLINGUP`, `DOUBLE_DOOR_FOLDING`, swinging by its `panels`, or `USERDEFINED` `SECTIONAL`; one that does not open, or whose type has no family, `NOTDEFINED`. A window's `PartitioningType` from its lights across and up (an `openingFamily`'s `lightsX` and `lightsY`, or its given mullions; a `windowFamily`'s `panes` and `transoms`): `SINGLE_PANEL`, `DOUBLE_PANEL_VERTICAL` or `TRIPLE_PANEL_VERTICAL` side by side, `DOUBLE_PANEL_HORIZONTAL` or `TRIPLE_PANEL_HORIZONTAL` one above the other, any other grid `USERDEFINED` `<across> x <up>`. A type carries its occurrences' operation, and where they open differently each way has an IFC type of its own (above); the reference bridge writes only a sliding door's, on the occurrence, and `NOTDEFINED` on every type.
- **Stand-ins where the compiler derives none** (`src/ifc-approximate.js`), each said to be approximated in the report, with why: Part IV gives these no body, their shapes being reference behaviour, so the bridge builds a simple one from the records alone, where the reference bridge puts the real one. A door or a window, unless it declares a body: the box of its opening, or its type's outline, through its wall's thickness. A component (`IfcBuildingElementProxy`): a box `width` along its orientation, its type's `component.depth` across and `height` up (down where `componentInverted`), centred on its insertion point. A slab edge element of a framing family (`IfcBuildingElementProxy`): its section's bounding rectangle along its host's edge, hanging from its anchor; every other slab edge element and gutter has the compiler's body (Part IV, 4.6 and 4.7). A gutter on a barrel vault (`IfcPipeSegment` GUTTER): its section along its roof's edge moved out by the edge's overhang and its offsets, its top at the roof's top surface there. A stair: an `IfcStair` of its shape (STRAIGHT_RUN_STAIR, QUARTER_TURN_STAIR, HALF_TURN_STAIR, QUARTER_WINDING_STAIR and HALF_WINDING_STAIR where it turns in winders, SPIRAL_STAIR, CURVED_RUN_STAIR, as the reference bridge writes them; its type NOTDEFINED; with `Pset_StairCommon`), its risers its own count, else the fewest its type's `maxRiser` allows, and its parts aggregated under it, keyed `stair-part:<id>:<piece>` as the reference bridge keys them and placed in the stair's placement (buildingSMART's rule OJP001), each flight with its numbers in `Pset_StairFlightCommon` (IFC4 deprecates `IfcStairFlight`'s own, which are unset: rule IFC102), laid out from the records as the reference implementation lays them: a straight stair's one `IfcStairFlight` (`flight:0`), a solid of its treads down to its base, on its location line; an L's or a U's two flights (`flight:0`, `flight:1`) of `firstRunRisers` and the rest (half, rounded up, where it gives none), each a solid of its treads down to the stair's base, and its landing (`landing:0`, an `IfcSlab` LANDING, `landingDepth` deep, else as deep as the stair is wide, a U's spanning both runs and their `gap`, 100 mm where none is given) from the base up to its top; an L that turns in winders, its two flights and its winders (`winders`, an `IfcStairFlight` WINDER, their going on the walkline at half the width), the box of the turn's square up to the last winder; a spiral or a helical stair, one flight (SPIRAL, CURVED), the sector of a cylinder its treads sweep from its start, its going measured midway between its radii, from its centre for a spiral, between its inner and outer radii for a helical stair (a ring where it turns round more than once), up to its last tread; a stair that turns in balanced winders, or a U in winders round a newel, the box round its runs and its turn, the stair's own body. Its stringers, waist, nosings and a spiral's column are the reference's, and not written. What cannot be stood in is left out, and the report says why: a component placed by `axes` or `insertAt`, a plate, a bolt group or a weld, a void form or an edge detail; a stair with no risers or going, no width, or a first run as long as the stair.
- **Shafts' openings** (Part IV, 4.2, rule 8; Part VIII, 1.3): in each slab, ceiling, roof or, for a stair's shaft, foundation that a shaft cuts and that is written, an `IfcOpeningElement` named by the shaft, keyed `shaft:<shaft id>:<host id>` as the reference bridge keys it, `OPENING` where it takes all of the host within its outline and `RECESS` where it ends inside it, its outline extruded over the heights it cuts and a millimetre past them, voiding the host (`void:shaft:<shaft id>:<host id>`). The host's bodies have the shaft cut already.
- **Rooms as spaces**: a room drawn by hand as an `IfcSpace` (`room:<id>`), aggregated under its storey (`spaces:<level id>`), named by its number, its long name its name, its body its outline from its base up to `room.height`, else its element's height (approximated: the ceiling under the floors and roofs above is reference behaviour); `Qto_SpaceBaseQuantities` (`Height`, `GrossPerimeter`, `NetFloorArea`, `NetCeilingArea`, `NetVolume`), `Pset_SpaceCommon` (`Reference`, its type's name), `Pset_SpaceCoveringRequirements` from its and its type's finishes, and its department and unit as `IfcZone`s. A room placed by a point is left out: its boundary is found from the walls round it, which is reference behaviour (Part IV, 2). With the proposal `rooms` (Part IV, 7.5), every room with a boundary and a ceiling is an `IfcSpace`, its body its volume under its ceiling, with all eight of its base quantities (`NetPerimeter`, `GrossWallArea` and `NetWallArea` among them).
- **Member sections**: a beam's or a column's section on its type as an `IfcMaterialProfileSet` of one `IfcMaterialProfile` named by its designation (`material-profile-rel:<class>:<type id>`): a rectangle, I, T and U as IFC4's own profiles, a rectangle with a `radius` as an `IfcRoundedRectangleProfileDef`, an L and an RHS whose legs or walls are one thickness, a CHS, a round bar, and a `custom` section's outline as an `IfcArbitraryClosedProfileDef` (with voids, an `IfcArbitraryProfileDefWithVoids`) of `IfcIndexedPolyCurve`s, its arcs `IfcArcIndex`es, its points less the middle of its bounding box (Part VIII, 1.4); a `2L`, a `sheet`, an outline that breaks Part II, 5.2, rule 9, or sizes the profile's where rules refuse, none, and the report says so. The occurrences' bodies stay faceted, the profile not placed on them, as in the reference bridge.
- **On a map, where the caller asks** (`crs`, `--crs EPSG:3006`): an `IfcMapConversion` from the model's context to an `IfcProjectedCRS` (`EPSG:<code>`, its name, its geodetic datum, `verticalDatum` where given, `Transverse Mercator`, its zone, in metres): the plan's origin at the site's latitude and longitude, projected by Krüger's series (`src/ifc-geo.js`; it agrees with the reference bridge to the micrometre), the plan's x axis east turned by true north and the grid's convergence, the scale 0.001 from millimetres to metres, and the project's elevation offset as its height. Without `crs` none is written, since 0.1 names no coordinate reference system.
- **The reference bridge's classes and predefined types**, and those of Part VIII, 1.1 for heating, ventilation and plumbing: a terminal by its kind, a silencer ROUND or RECTANGULAR by its duct, a fan in a duct `IfcFan` USERDEFINED `INLINE`; **a component by its type** (VIII.1, its note on components; open questions, 73), from the records alone: a plate (its type's `component.family` `plate`) an `IfcPlate`, a bolt group (its `bolts`, its type's family `bolt` holding a `component.bolt`) an `IfcMechanicalFastener`, ANCHORBOLT for an anchor bolt and a threaded rod with one nut, DOWEL for a rod with none, else BOLT, with its bolt's diameter and its group's `length` where it gives one (`NominalDiameter`, `NominalLength`), and a weld (its `weld`, its type's family `weld`) an `IfcFastener` WELD, their types NOTDEFINED and keyed by their class; any other component an `IfcBuildingElementProxy`, a bolt or a weld type's element without `bolts` or `weld` too; **the systems** of 1.1, one `IfcDistributionSystem` per system and number, named by its code and number (`VS20`: a project's own code in its `standards`, else the Swedish drawing codes the reference implementation gives by default), with its runs and terminals; a run's insulation (`OpenEik_Insulation`: its code and thickness), a terminal's heat (`OpenEik_Heat`: its power, design difference, flow, kv and presetting) and a space heater's power (`Pset_SpaceHeaterTypeCommon.OutputCapacity`); with the proposal electrical, a luminaire's light output from its type (`OpenEik_Light`: luminous flux in lm, colour temperature in K, beam angle and distribution; Part XIII, 10).
- **Ports** (`src/ifc-ports.js`): each terminal's connections, its type's `terminal.connections` and then one for each of a manifold's `outlets`, as `IfcDistributionPort`s nested in it (`IfcRelNests` 'Ports', `ports:<id>`), keyed `port:<terminal id>:<index>`, the index a run's `mep.joins` names; and at each end of a run its record joins to one of them (Part II, 6.9) a port of its own at that connection (`port:<run id>:start` or `:end`), connected run to terminal by an `IfcRelConnectsPorts` (`joins:<run id>:<end>`). Each named by its system's code and its size (`KV 15`), `PIPE` or `DUCT` by whether its system carries air, its system's `IfcDistributionSystemEnum`, placed in its element's placement, and flowing `SOURCEANDSINK` on a heating or a cooling system (Part VIII, 1.1); on another, out of the terminal (`SOURCE`) and into the run's end (`SINK`) where what the system carries leaves the terminal (the waste of the systems that fall by gravity, extract, exhaust and kitchen exhaust air), else the other way, as the reference bridge has it. Part II gives a connection's `at` no frame and an outlet no place: the bridge reads them as the reference implementation does (x across to the left of the way the terminal faces, y along it, z up from its base; outlets in rows across its width at most 60 mm apart, 20 mm in from its sides, the rows evenly through its depth), and the report says the ports are approximated. A component's connections (Part II, 6.9, rule 9), and a join to a connection that is not printed, are left out, and said so.
- **Electrical installations, with the proposal electrical** (`proposals: ["electrical"]`, `--proposal electrical`; Part XIII, 10; `src/ifc-electrical.js`): each device as the class and predefined type of its type's kind (`IfcOutlet` POWEROUTLET, DATAOUTLET, AUDIOVISUALOUTLET or USERDEFINED `LIGHTINGOUTLET`; `IfcSwitchingDevice` TOGGLESWITCH, DIMMERSWITCH, MOMENTARYSWITCH where its type is `momentary`; `IfcSensor` MOVEMENTSENSOR; `IfcLightFixture` DIRECTIONSOURCE, POINTSOURCE, SECURITYLIGHTING or USERDEFINED `LIGHTINGTRACK`; `IfcJunctionBox` POWER; `IfcElectricDistributionBoard` DISTRIBUTIONBOARD or USERDEFINED `METERCABINET`; `IfcElectricAppliance` NOTDEFINED or USERDEFINED `EVCHARGER`; `IfcAudioVisualAppliance` SPEAKER; `IfcCommunicationsAppliance` USERDEFINED `ACCESSPOINT`; the kind `other` the class its type's `ifcClass` names), a cable carrier as an `IfcCableCarrierSegment` of its kind and a modelled cable as an `IfcCableSegment`; the standard property sets IFC has for a device (`Pset_ElectricalDeviceCommon`, its rated current the upper bound of an `IfcPropertyBoundedValue`; `Pset_OutletTypeCommon`; `Pset_SwitchingDeviceTypeCommon` by section 10's switch table, its switch function an `IfcPropertyEnumeratedValue` of IFC4's `PEnum_SwitchFunctionType`; `Pset_LightFixtureTypeCommon`), as IFC4 defines them, `OpenEik_Light`, and `OpenEik_Electrical` for its designation, purpose, power and what it controls, by GlobalId. **The circuits**: one `IfcDistributionSystem` `LV`, ELECTRICAL, aggregating an `IfcDistributionCircuit` for each circuit that has something printed (its designation, its name, and `OpenEik_Circuit`: its board or that it is a supply, phases, voltage, protection and cable), in the natural order of their designations (`G2` before `G10`), its devices and modelled cables its members; its start its board's SOURCE port `Circuit#n` (`IfcRelAssignsToProduct`), n its place among the board's circuits in that order; each leg an `IfcRelConnectsPorts` from that port, or a SOURCE port `Out` of the device its `from` names, to the `Line` SINK port of the device it feeds, through the `Input` and `Output` of each piece of its modelled route; each port an `IfcDistributionPort` CABLE, ELECTRICAL, nested in its element at its point, as the reference bridge keys them (`el-port:<id>:<port>`, `el-circuit:<id>`, `el-leg:<circuit id>:<to>`, `el-system:LV`). Where a device or a board feeds two legs or more, each further leg leaves a SOURCE port of its own (`Out 2`, `Circuit#1 2`): IFC4 connects a port to one port at most, and the reference bridge's prints break that rule there.
- **Reinforcement**: a rebar element as an `IfcReinforcingBar` with its bars' diameter and section, a mesh as an `IfcReinforcingMesh` with its sheets' size and its bars' diameter and section where the record gives them, each with `OpenEik_Reinforcement` (its mark, shape code, grade, count, spacing, face and cover, as given). Their bodies are stand-ins: a bar set (`bars`) a rod of its diameter along each bar's first leg, `dims.a` from its `origin` along its `xAxis`, the bars `spacing` apart along `along` (its shape's other legs come from a national shape code, Part II, 8, and are not written); reinforcement in a layer (`reinforcement`, or a mesh's `sheet`) a sheet two bars thick over its host's layer (its `layerId`; a sheet's `layer`, else its host's structure layer), its cover in from the face it lies at. A bar set in a beam, a column or a slab edge element is placed as one in a slab, in the model's axes. A rebar or a mesh whose host Part II, 6.1, rule 6 does not allow (a rebar in a wall, a mesh in a beam) is left out, as the validator's `host-category` error says it is invalid; a mesh in a wall too, and reinforcement in a layer of a column, where they lie in their host being reference behaviour.
- **Plants, roads and parkings**: a plant as an `IfcGeographicElement` USERDEFINED of its type's kind (`TREE`, `SHRUB`, `HEDGE`), its body a cylinder of its crown up to its height (a hedge, a band as wide as its crown along its line); a road and a parking as an `IfcBuildingElementProxy` USERDEFINED `ROAD` or `PARKING`, as the reference bridge writes them, a band of the road's width along its line its type's thickness deep, and the band a parking's spaces take beside its line; all approximated. A terrain's ground and its gradings are not written.
- **A railing on a stair** as an `IfcRailing` aggregated under its stair after the stair's parts, as the reference bridge aggregates it: its body along its record's own line, rising evenly from the stair's base to its top, as high as the railing and as thick as it is wide (approximated: the line on a stair follows its derived flights, reference behaviour in 0.1).
- **A generic element** as the IFC4 entity its `ifcClass` names, USERDEFINED with what it stands for, else as an `IfcBuildingElementProxy`, and the report says so (VIII.1, rule 4).
- **GlobalIds** derived as the reference bridge derives them (VIII.1, rule 3): an element keeps its GlobalId across versions, alternatives and copies, and a print of this bridge and one of the reference bridge give an element the same GlobalId. An element or a type imported from IFC keeps the GlobalId it was imported with (`ifcSource.globalId`), as a round trip should and the reference bridge does: an element's own, an opening's where it was imported as its `IfcOpeningElement`, a space's where it was imported as its `IfcSpace`; where several records carry one (types imported from one IFC type), the first in the code-unit order of its key, `elements/<id>` or `types/<id>` (an element before a type), of those the print writes an object for keeps it, whatever the order the print writes them in, and the others are derived; so is one another object of the print has already; and the report says so (`sourceGlobalIds` counts those kept).
- **Imported property sets** (`ifcSource.properties`; Part VIII, 1, rule 5, and 1.5; `src/ifc-properties.js`): an element's on the object it was imported as (its opening where it was imported as an `IfcOpeningElement`), else on its product or its space; a type's as each of its IFC types' own sets (`HasPropertySets`). A set IFC4 defines and whose template applies to the object, by its class, its predefined type and whether the set is driven by types or by occurrences, as buildingSMART's rule PSE001 holds it, is written under its name, each property its template defines typed as the template has it: its measure, an enumerated value of its enumeration, a bounded value's set point, a list value of one value; a number in the record's units (millimetres, degrees, the SI unit of any other measure) written in the print's, whose unit assignment declares each measure's SI unit, derived ones such as W/(m²·K) among them. Every other property, of a set IFC4 does not define or apply, one its template lacks, and a value it cannot type, goes into a set named without `Pset_`, or `Imported_` and the set's whole name where that name is empty, starts with `Pset` in any case, with `OpenEik_` or `Imported_`, is one of the bridge's own sets on the object, or is taken by another imported set; a text an `IfcLabel` (an `IfcText` beyond 255 characters), a number an `IfcReal`, a truth value an `IfcBoolean`. An imported set of the name of one the bridge writes itself joins it, the bridge's own values kept and the imported ones left out. The report lists each (`imported properties`). The templates are buildingSMART's table of its validation service, `features/resources/IFC4/pset_definitions.csv` of ifc-gherkin-rules 1.0.2, in `src/ifc4-psets.js` (written by `scripts/ifc4-psets.py`; MIT License, [`NOTICE`](NOTICE)): where it gives a property no data type, or an enumeration no values, the value is one it cannot type.
- **A railing's height** (Part VIII, 1, rule 6): `Pset_RailingCommon.Height` on each `IfcRailing` whose type gives `railing.height`, as an `IfcPositiveLengthMeasure` in millimetres, the height its top rail carries it to (Part IV, 11.2, rule 5), as the reference bridge writes it; an imported `Pset_RailingCommon` joins it, its `Height` left out.
- **An application's own property sets** (`sets`; Part VIII, 1, rule 7; `applicationSets` in `src/ifc-properties.js`), data the model does not hold, keyed `elements/<id>` and `types/<id>`, each `{<set name>: {<property name>: text | number | truth value}}`: an element's on its product and a room's on its space, after the bridge's own sets and the imported ones; a type's as the own sets (`HasPropertySets`) of each IFC type written for it. A text an `IfcLabel` (an `IfcText` beyond 255 characters), a number an `IfcReal`, a truth value an `IfcBoolean`; the sets and their properties in the code-unit order of their names, so that the same sets give the same bytes whatever the order of their members; keyed `app-pset:<record key>:<set name>` for their GlobalIds, a type's `app-pset:type:<its IFC type's key>:<set name>`. A set named with a prefix IFC or the bridge reserves (`Pset` in any case, `Qto_`, `OpenEik_`, `Imported_`), or as a set the bridge writes on that object, is left out, not merged; so is a set with no name or no property, and a property that is no text, finite number or truth value; a key that names no printed object is not used, and is no error; the report lists each (`application property sets`). Name your sets with a prefix of your own, as the reference implementation's `Stomra_Railing`. Sets that are not an object are a usage error; without them, a print is what it was.
- **The version it was printed from**: the property set `OpenEik_Source` on the `IfcProject`, with `VersionRoot` and `VersionId` where they are given, `ProjectId`, `Bridge` (`@openeik/tools 0.4.0`) and `Print` (`IfcBoolean` true), the machine's mark.
- **That it is a print, where people read it**: the sentence `A print of OpenEik version <the first 12 digits of its root>: a copy, like paper. The OpenEik building is the source.` (without a root, `A print of an OpenEik building: …`) as the header's second description and as the `IfcProject`'s description (`printSentence`, `report.print`).
- **Who printed it, and with what**: the one `IfcOwnerHistory`, which every root names, names the organisation that printed it (`printedBy.organisation`, `--printed-by`: EikHub writes `EikHub`, Stomra `Stomra`; by default `OpenEik reference tools`), also in the header's `FILE_NAME`, and no person; its `IfcApplication` is the bridge, `@openeik/tools` and its version, developed by OpenEik.
- **The fidelity report's short form**, so that it travels with the print: an `IfcDocumentInformation` named `Fidelity report` on the `IfcProject` (`IfcRelAssociatesDocument`), its description a few lines (the schema and the bridge; what is written by class; what is left out and approximated; the declared envelopes), and its counts in a third line of the header's description. Both are `report.summary` and the counts of `report`, so they are as deterministic as the rest; the reasons are only in the whole report beside the print.

### Bodies an application gives

An application hands the bridge the bodies the specification does not derive yet, so that it prints its IFC with the bridge rather than with a writer of its own, until the specification derives them all (the steward's decision of 26 October 2026). They come as results of the derived layer (Part IV, 1.1), in the form of 0.2 (Part IV, 1.1.1; `schemas/0.2/derived/bodies.schema.json`), keyed by the record each is of:

```js
import { hashValue, ifcOfModel } from "@openeik/tools";

const door = model.elements.find((e) => e.id === "door-1");
const bodies = {
  "elements/door-1": {
    sources: { "elements/door-1": hashValue(door) },          // used only while these hashes hold (Part IV, 1.1, rule 2)
    producer: "My app 2.1", rule: "door-bodies",
    result: { bodies: [
      { kind: "extrusion", profile: [[0, -50], [1000, -50], [1000, 50], [0, 50]], holes: [[[60, 45], [940, 45], [940, -45], [60, -45]]], z0: 0, height: 2100, part: "frame", material: "Timber" },
      { kind: "faces", vertices: [/* … */], faces: [{ outer: [0, 3, 2, 1] } /* … */], part: "leaf" },
    ] },
  },
  "types/bracket": { /* a type's representation, which elements place with {kind: "mapped", origin: [x, y, z]} */ },
};
const { text, report } = ifcOfModel(model, { bodies });
// report.given: [{what: "door bodies", count: 1, elements: ["door-1"], reason: "given by My app 2.1 (door-bodies)"}]
```

The kinds: `extrusion` (a plan polygon less its holes, from `z0` up by `height`), `faces` (plane faces with their holes, and normals where smooth), `rod`, `cylinder`, `swept` (a section of Part II, 5.2 or a polygon, along a line, in a member's frame, with its `roll`) and `mapped` (a type's representation placed). The tags: `material`, `layer`, `part` (a door's or a window's frame, sash, glass, leaf …), `piece` (a stair's `flight:0`, `landing:0`, `stringer:0:left` …), `member` (`{id, class, predefined, objectType, name, section}`, a framing member), `color` and `glass`. In millimetres, z up, in the model's coordinates; a type's in its own frame.

- **Where it is used.** Where the compiler derives no body, and over the bridge's own stand-in, which the report then no longer calls approximated. Over a compiled body where the compiler reports some of it not derived (`not-derived`, Part IV, 2: a wall cut to a roof or with its type's `wallAttach`, a roof's windows, join group, square-cut edges or layer extents, a column's or a beam's connection, recesses and the like), and where a wall's end meets another wall that its result names among its sources, by its record or `categories/wall` (Part IV, 1.1, rule 1), whose join the compiler does not derive (7.1: an end its `joinEnds` leaves free within twice the thicker wall's thickness of another's free end, their bases at one height, or within half the other's thickness and 50 mm of its axis, part-way along it, at more than 10°); the report says it is written over the compiled body, and why (`given`). Elsewhere the compiled body is written, which the rules of class A derive whole. And only while every record its result names has the hash it recorded. A result of a record the model does not have, one no longer current and one given over a compiled body that is written are not used, and the report lists them (`leftOut`, `given bodies`), with why. A result that breaks the schema, an index past its vertices, normals not one a vertex, a key that names no record, and a member given by two elements are refused (`ifc-bodies`), naming where.
- **The forms.** An extrusion, a rod, a cylinder and a swept section an `IfcExtrudedAreaSolid`: of an `IfcArbitraryClosedProfileDef` (with voids, `IfcArbitraryProfileDefWithVoids`), an `IfcCircleProfileDef`, or the section's IFC4 profile (`IfcLShapeProfileDef` …, its outline where IFC4 has none, a 2L's two angles as an `IfcCompositeProfileDef`), placed by its axis and its reference direction both where they are not the storey's. Faces an `IfcPolygonalFaceSet`, closed where every edge is met once each way; an `IfcTriangulatedFaceSet`, with its normals, where they come in triangles or a face is not plane (each face in triangles of its own points, its holes bridged; the report says how many were not plane). A type's representation an `IfcRepresentationMap` of its IFC type, written once; each element that places it an `IfcMappedItem`. One representation holds one kind of item (IFC4's rule CorrectItemsForType): an element's bodies are swept solids only where all of them are, else faces, an extrusion then the faces of its prism, a circle a polygon, said so.
- **Pieces, members and parts.** A piece is a part of its element, aggregated under it and placed in its placement, keyed as the reference bridge keys a stair's (`stair-part:<id>:<piece>`; another element's `piece:<id>:<piece>`): a flight or the winders an `IfcStairFlight`, with the numbers the bridge works out for the stair; a landing an `IfcSlab` LANDING; a stringer an `IfcMember` STRINGER; a landing beam an `IfcBeam` LANDING_BEAM; a bearing an `IfcDiscreteAccessory` BEARING_PAD; a newel or a column an `IfcMember` POST. A member is an element of its `class` and `predefined` type (a predefined type the class does not have written USERDEFINED, said so), keyed `framing:<member id>`, aggregated under its element (`framing-aggregates:<id>`), with its material; members of one class, predefined type and `section` share an IFC type (`type:<class>:framing:<predefined>:<user type>:<section>`), as the reference bridge writes them. An element's parts (`part`, on the bodies of any element), where its bodies name two or more, make its material an `IfcMaterialConstituentSet`, a constituent a part with the part's material, and each part an `IfcShapeAspect` of its bodies, as a type's representation's parts make its type's; one part, or none, adds nothing, and the element keeps its type's material (Part IV, 1.1.1; open question 91).
- **The same bytes.** Without `bodies`, or with none, a print is what it was, byte for byte. With them, the same results give the same bytes, whatever the order of their keys: elements by id, and each element's bodies in their given order.

Against the reference implementation's own print (Stomra, its work 727, `eikBodies`, read and run apart, 26 October 2026): for its garage example, with its bodies given and its framing members among them, both prints have the same 493 objects, every GlobalId, class, predefined type, property set and quantity the same (to 0.05, `OpenEik_*` and its own sets left out, with `tools/ifc-validate.mjs diff`), and the bridge's passes IfcOpenShell 0.8.4's validation with no issue. On its extension, its balcony and its steel frame, both prints have the same 131, 181 and 668 objects, every GlobalId, class and predefined type the same, since a component takes its class by its type (above; the steward's word of 26 October 2026, "steel plates and bolts should be plates and fasteners"): 3 plates and their type, 6 and theirs, and 312 plates, 151 bolt groups (114 BOLT, 31 ANCHORBOLT, 6 DOWEL) and their 63 types; every plate's and bolt group's attributes are the reference's too, its bolts' diameter and length among them; and the bridge's prints pass with no issue.

**buildingSMART's rules.** Since 27 October 2026 the prints pass buildingSMART's normative rules, those of its validation service (release 1.0.2 of its ifc-gherkin-rules, run with IfcOpenShell 0.8.5 by `tools/ifc-validate.mjs --gherkin`): those of the examples, the conformance suite's installation, the electrical fixture and the test houses with bodies given, and of the reference implementation's garage, extension, balcony, steel frame, installations and villa with a garage and a guesthouse, with their bodies given and without. Two rules of that release stop on errors of their own, whatever the file, and the suite lists them apart, as rule errors: PSE001 on a property set its table defines in Python's notation (`Pset_StairCommon` and `Pset_ElectricalDeviceCommon` among them), GRP001 on a group that is not an `IfcGroup` itself. A third, TAS001, stops on a face with voids whose voids have different numbers of points, which it reads into one array, as a given wall's face with two openings of different shapes has.

**The same bytes for one version.** The header's time stamp and the owner history's creation date are the time `at` gives, else the version's `at`, else `IFC_FIXED_TIME`. Nothing else depends on when, where or in what order the model was read: the same model, options and bridge give the same bytes, and another time changes only those two lines.

**The fidelity report** (VIII.1, rule 2) beside every print, and its short form in it (`summary`): the schema; who printed it (`printedBy`) and the sentence that says it is a print (`print`); the counts of products, openings and types by class; the storeys, spaces, zones, systems (the electrical `LV` among them), circuits and profiled member types; the ports and the joins between them (`ports`, `portLinks`); the GlobalIds kept from an IFC imported (`sourceGlobalIds`); the map conversion, where one is written (`map`); what is left out (`leftOut`) and what is approximated (`approximated`), each with the elements and the reason; which bodies are declared envelopes, and at which level (`declared`, Part IV, 11.1, rule 6); and the compiler's errors and warnings. What it approximates are the stand-ins above. What it leaves out: a room placed by a point, a stair or a component it cannot stand in, the other reference behaviour of Part IV, 2 and 7 with no stand-in (wall joins: walls end square; the fittings between runs, so runs that meet are not connected port to port, and a run's end its record joins to no terminal has no port; a terrain's ground and its gradings); a rebar or a mesh on a host Part II does not allow; a space's net perimeter and wall areas, which rest on the walls round it; a leg's route where no cable is modelled for it (its ports are connected, with no `IfcCableSegment`); a wired control's wiring (what a switch works is in `OpenEik_Electrical.Controls`); and a map conversion unless `crs` names a system. Circles are polygons of 32 sides, where a footing's cylinder is not written whole.

Against the reference bridge (Stomra `main` `cc93660b`, 26 October 2026): for `examples/one-storey-house` both write 10 products, 3 openings and 6 types, every GlobalId, class and predefined type the same. For `examples/l-house` both write 130 products, 13 openings and 18 types, with the same GlobalIds and classes (the components and slab edges `IfcBuildingElementProxy`, the gutters `IfcPipeSegment` GUTTER), and five `IfcMaterialProfileSet`s; the stand-ins lie where the reference's bodies do, the components' boxes to the millimetre, but for the doors and windows (the reference writes their frames, thinner than the wall); the slab edges, compiled by Part IV, 4.6, are the reference's to the millimetre, mitred ends included, and the gutters' boxes too but where the reference, sampling at 25 points, runs a gutter on to the first point another roof of its group buries (Part IV, 4.7, rule 6; Conformance, 3). With a straight stair and two rooms added to the house, both write the stair, its flight and its type, the drawn room's space and its department's zone, with the same GlobalIds and bodies; the reference also writes the room placed by a point, its boundary found from the walls; and with `crs: {epsg: 3006}` the same map conversion to six decimals. For a building with every pipe, duct and fixture type of the reference's library (112 products, 108 types, 17 systems), both write the same products, types and systems, with the same GlobalIds, classes, predefined types, names and members, and since 26 October 2026 the same 118 ports, each with the same name, flow direction, type, system and point, nested alike (Stomra `main` `bd839668`). With an L stair on a landing, a U, an L in winders, a spiral and a helical stair, four doors and a window with families of their own, and a basin with two pipes joined to it added to the house, both write the same 71 objects with the same GlobalIds and classes: every stair, flight, winders and landing, each flight's numbers, the five ports and their two connections; the parts' plans lie where the reference's do (a flight's and a landing's solid reaching down to the stair's base, where the reference's waist and landing slab do not), and a stair in balanced winders fills the box round the reference's parts exactly. The reference also writes a helical stair's stringers and a spiral's column. The doors that slide open as the reference writes them where they open to the wall's exterior; where they open to its interior, the reference writes the other side, since it does not look the way the leaf opens (Part VIII, 1.2); the reference writes a swinging door, and every type, `NOTDEFINED`. On the four example projects of the reference implementation's own comparison (Stomra `main` `0c8fcea1`, 26 October 2026), every object both write has the same GlobalId and class, but for one of two slab types imported with one GlobalId, which the order of writing decided until 28 October 2026 (since then the first by its id keeps it): an example villa imported from IFC, 199 objects with the GlobalIds it was imported with (100 of 194 the same before); its installations with the proposal electrical, 808 objects, every device and its type, the 36 circuits, the `LV` system, the reference's 207 ports (and 19 more where a device feeds two legs) and the four railings on its two stairs; a villa with a garage and a guesthouse, 664 objects, 89 bar sets, its meshes, its 12 plants, its road and parking; and a garage as before. What the reference writes there and this bridge does not: the framing members of framing families, the rooms placed by a point, a terrain's ground, and 23 bar sets an edge beam hosts, which Part II, 6.1, rule 6 does not allow. The prints of these buildings pass IfcOpenShell 0.8.4's validation against the IFC4 schema, its where rules included (checks run by hand on 26 October 2026; IfcOpenShell is no dependency); the reference's print of the installations does not: 86 issues, 14 of them a port connected to two ports where a device or a board feeds two legs.

### IFC 4.3

`ifcOfModel(model, {schema: "IFC4X3_ADD2"})` (`openeik ifc --schema IFC4X3_ADD2`) prints IFC 4.3, the schema IFC4X3_ADD2 (ISO 16739-1:2024, documentation 4.3.2.0): Part VIII, 1.13, of 0.5, the proposal `ifc43` before its cut, by the steward's decision of 5 November 2026 (open questions, 140). IFC4 stays the default, and its prints are unchanged. A print of IFC 4.3 holds the same products, openings, types, GlobalIds, relationships, property sets, quantities and bodies as the IFC4 print of the same version and options, but where 1.13's table says what IFC 4.3 writes instead (`src/ifc-schemas.js`):

- a storey's `Elevation` unset, its placement giving its height; a room's `IfcSpace` SPACE, with `Pset_SpaceCommon.IsExternal` false, where IFC4's is INTERNAL;
- a provision an `IfcVirtualElement` PROVISIONFORVOID, typed by an `IfcTypeProduct`, with `Pset_ProvisionForVoid` (its shape `VoidShape`) and no material; a distribution board and a meter cabinet an `IfcDistributionBoard`; a switch's `NumberOfPoles` and `NumberOfGangs` and an outlet type's `NumberOfSockets` `IfcCountMeasure`s;
- an element read with a predefined type IFC 4.3 deprecates written as its documentation says (a cable carrier fitting's TEE a JUNCTION, a proxy's PROVISIONFORSPACE an `IfcVirtualElement` CLEARANCE, a wall's STANDARD NOTDEFINED …, `classIn4x3`), and a generic element's `ifcClass` that IFC 4.3 adds (`IfcPavement`, `IfcCourse`, `IfcKerb`, `IfcEarthworksFill` …) written as that class;
- imported property sets typed by IFC 4.3's templates, PSE001's table of buildingSMART's ifc-gherkin-rules (`SCHEMA_TABLES`, `src/ifc4x3-psets.js`, written by `scripts/ifc4-psets.py <rules> IFC4X3_ADD2`);
- the attributes IFC 4.3 appends unset (`IfcCartesianPointList3D.TagList`, `IfcDerivedUnit.Name`; `rowIn4x3`), and the header's view IFC 4.3's Reference View;
- with `grading`, cut and fill as an `IfcEarthworksCut` EXCAVATION voiding the graded ground's `IfcGeographicElement` and an `IfcEarthworksFill` NOTDEFINED in its storey, each body a closed `IfcPolygonalFaceSet` over each triangle of the graded ground that is cut or filled (`gradedSite(site, {earthworks: true})`), their volumes the compiler's cut and fill, in `Qto_EarthworksCutBaseQuantities.UndisturbedVolume` and `Qto_EarthworksFillBaseQuantities.CompactedVolume`;
- with `ground`, on a model of 0.4, the ground of Part XIX as its section 9 says (rule 7 of 1.13): each soil profile an `IfcBorehole` contained in the site at its point and its top (`placedProfile`), its `source` in `OpenEik_SoilProfile` and its groundwater `Pset_BoreholeCommon.GroundwaterDepth`; its layers `IfcGeotechnicalStratum` SOLID aggregated under it, each its 'Axis' from its top to its bottom and, where the profile gives `diameter`, its 'Body', an `IfcSweptDiskSolid` along the axis; `Qto_LinearStratumBaseQuantities`, `Pset_SolidStratumComposition.CompositeFractions` where IFC 4.3 names the soil, `Pset_SolidStratumCapacity` (φ′, c′, an elastic ν), and the layer's other members in `OpenEik_Stratum` by their names (`groundStratumProperties`). And, where the project's excavation states its slope and its working space, each stated pit an `IfcEarthworksCut` BASE_EXCAVATION and its topsoil a TOPSOILREMOVAL (`pitsOf` in `src/pits.js`): the ground Part XIX, 6 digs, closed convex face sets over cells where the dug level and the ground are each one plane, each corner faceted within 1 mm (`cornerSegments`), voiding the graded ground's `IfcGeographicElement` or else the ground's own, under the grading's cut, with `Qto_EarthworksCutBaseQuantities.UndisturbedVolume`. No `IfcGeomodel`, which the Reference View leaves out, and no load, each said in the report.
- on a model of 0.6, and with `derivedPits` on a model of 0.5, with or without a ground file: each pit derived from a foundation or a slab on the ground (Part XIX, 6.1 and 9.1; `derivedPitsOf`, `pitsOf(model, {derived: true, compiled})`) after the stated ones, an `IfcEarthworksCut` BASE_EXCAVATION, `ground-pit-derived:<element id>`, named by its element's name and `pit` and tagged by its id, and its TOPSOILREMOVAL, faceted as a stated pit's, each floor at its own bottom and a round footing's circle one corner of a whole turn; the report names each not printed, and each element none is derived for, `ground/derived-pits/<element id>`. A print of IFC4 writes none, and says so.

Every type keeps the GlobalId of its IFC4 print, keyed by its IFC4 class. Part XIX's ground stays out of the IFC4 print, with the reason in the report, and a reader of IFC 4.3 reads no ground from a file's boreholes, which it reads as generic elements of the site (Part XIX, 9, rule 11). `eikOfIfc(text, {proposals: ["ifc43"]})` reads a file of IFC 4.3 as it reads IFC4 (Part VIII, 2.7), by IFC 4.3's supertypes, a class the table renames read as IFC4's (`classOf4x3`); without the proposal it refuses one. The IFCX print reads the IFC4 print whatever schema it is asked for. The seventeen prints of `test/support/ifc-corpus.mjs`, the examples and the proposals' fixtures, the ground's among them, pass IfcOpenShell's validation against IFC4X3_ADD2 and buildingSMART's rules with no issue (`test/proposals-0.5-ifc43.test.mjs`, with `OPENEIK_IFC_PYTHON`).

### Reading IFC

`eikOfIfc(text, options)` reads an IFC file into OpenEik once, to start a project: Part VIII, 2, of 0.2 (in 0.1 the proposal `ifc-read`), by the steward's decision of 29 October 2026 (open questions, 95). It is the bridge the other way, and as the bridge it imports nothing of Node.js, reads no clock and has no dependency: the same file gives the same bytes. It is no live link to the file, and it tracks no revisions between deliveries; an assistant reviews what it read, and upgrades it.

```js
import { checkModel, eikOfIfc, ifcOfModel } from "@openeik/tools";

const { model, bodies, report } = await eikOfIfc(text, { mesher });   // mesher: optional, for what it does not read
checkModel(model, { proposals: ["ifc-read"] }).ok;                     // true for the examples' prints read back
const again = ifcOfModel(model, { bodies, proposals: ["ifc-read"] }); // the same elements and types, GlobalId by GlobalId
// report: {schema: "IFC4", view, units: {length, millimetres, angle, degrees}, project, levels, materials,
//   elements: {total, byCategory}, types: {total, byCategory, own}, classes: {IfcWall: {count, category, core, mesher, none}, …},
//   bodies: {core, mesher, none, types}, properties: {sets, values}, mesher, approximated, leftOut, withoutBody, summary}
```

- **What it writes.** The project, its id the IfcProject's GlobalId's; a level for each storey; an element for each element of the file (an IfcElement but feature and virtual elements) and each IfcSpace, of the category its class maps to (`IFC_READ_CLASSES`: a wall, a slab, a roof, a foundation, a ceiling, a beam, a column, a door or a window in a wall's opening, a railing, a pipe, a duct, furniture, a room), else `generic` with its class; a type for each IFC type; materials by name. Ids are GlobalIds as UUIDs (`idOfGlobalId`), records in code-unit order of their ids.
- **What it keeps.** Each object's GlobalId, class, predefined type and user-defined type, in `ifcSource`; its property sets in this specification's units (`units: "specification"`), converted by the file's IfcUnitAssignment, SI prefixes, conversion-based units such as feet and degrees, and derived units.
- **Shapes.** Each product's shape a body given in the derived layer, never its record's geometry: its record carries `shape: "given"`, and `profile`, `offset`, `width` and `height` place it and say nothing of its shape (Part VIII, 2.3, rule 2). It meshes itself an IfcExtrudedAreaSolid of a rectangle, a rounded rectangle, a circle, a hollow circle or rectangle, an ellipse, an I, L, U, T or C shape, an arbitrary profile with or without voids (polylines, indexed poly curves, composite curves of polylines and trimmed lines and circles) and composite and derived profiles; IfcPolygonalFaceSet, IfcTriangulatedFaceSet, IfcFacetedBrep, IfcShellBasedSurfaceModel and IfcFaceBasedSurfaceModel; placed by IfcLocalPlacement chains and IfcMappedItem; an upright extrusion an `extrusion`, a circle's a `cylinder`, a circle swept square to itself a `rod`, a body that is its type's representation placed a `mapped` body of the type's result (`types/<id>`), any other `faces`; arcs in chords, four a quarter turn.
- **The mesher.** A boolean result, the voids of a file that is no Reference View, and every other item go to `options.mesher`, `(ifcText) => Promise<Map<GlobalId, {positions: Float64Array, indices: Uint32Array, color?, part?}[]>>`, positions in millimetres in the file's world, which a separate package builds on web-ifc; it is asked once, and only where it is needed, and its meshes are written as `faces` in triangles, the rule `ifc-read, mesher`. Without it, a difference is written as its first operand and a voided body as the file draws it, said to be approximated, and a product whose shape holds an item it does not read is kept without a body, and named in `report.withoutBody`. It never guesses a shape.
- **Refused** (`ifc-read`): a text that is no ISO 10303-21, a schema other than IFC4 and IFC2X3 (and IFC 4.3, with the proposal `ifc43`), a file without one IfcProject, a mesher's answer that is no Map.

Read back and printed again with the proposal, the prints of `examples/one-storey-house` and `examples/l-house` give every element and type again, each with the same GlobalId, class, predefined type and property sets, and each body the volume the compiler gives it (`test/ifc-read.test.mjs`); the project, its site, building and storeys, and the openings differ, since 0.1 holds no GlobalId for them.

### IFCX, experimental

`ifcxOfModel(model, options)` (and `openeik ifcx`) prints a model as IFCX, buildingSMART's JSON form of what was called IFC 5, **experimentally**: it writes buildingSMART's alpha, `ifcx_alpha`, which will change with its post-alpha format, so it is proof that OpenEik maps to IFCX, not a promise of a format, and no conformance class covers it (Part VIII, 1, its note on IFCX; open questions, 86, the steward's decision of 27 October 2026). Like the IFC4 print it is a print of a version, never the record.

```js
import { readFolder, ifcxOfModel } from "@openeik/tools";

const { text, report } = ifcxOfModel(readFolder("examples/one-storey-house").model, { version: { root: "747068e0…" } });
// report: {schema: "ifcx_alpha", from: "IFC4", products: {total: 10, …}, openings: {total: 3, …}, types: {total: 6, …},
//          nodes: 55, meshes: 31, triangles: 968, leftOut: […], approximated: […], lost: […], summary: "…"}
```

It takes `ifcOfModel`'s options and reads the model once, through the IFC4 writer: it prints the model as IFC4 and reads that print back (`readStep`), so that both prints have the same objects, GlobalIds, classes, predefined types, property sets and bodies, and the IFC4 print stays what it is, byte for byte. What it writes, as buildingSMART's hello-wall example writes it:

- **The file**: `header` {id `<project id>@<root>.ifcx`, `ifcxVersion` `ifcx_alpha`, `dataVersion` the version's root, `author` who printed it, `timestamp` the IFC4 print's time, so no clock}; `imports` of buildingSMART's published schemas (`ifc@v5a`, `prop@v5a` and `usd@v1` at ifcx.dev, `IFCX_IMPORTS`); `schemas`, one of the print's own for every key they do not define; and `data`, one entry per node, `{path, children?, inherits?, attributes?}`, one line each.
- **Paths**: an object's GlobalId as the UUID its 128 bits are, as buildingSMART's converter keeps it (`2JUHrTM_j3UxZiBnyBfByx` is `93791d5d-5beb-437b-b8ec-2f1f0ba4bf3b`); a body, which has none, the version-5 UUID of its object's and its name.
- **The tree**, as the IFC4 print relates its objects: the project, its site, building and storeys; under a storey its spaces and elements; under an element its parts, its openings and its ports. An element inherits its type's node (`inherits: {type}`), so that it takes, key by key, what the IFC4 print has its type carry: its predefined type, a door's operation, a window's partitioning, its type's name. The systems and circuits under the project; their members name them (`bsi::ifc::system::partofsystem`), and a port the ports it connects to and its flow (`connectsto`, `flowdirection`).
- **Each node**: its class, `bsi::ifc::class` {code, uri}, the URI that of the class in bSDD's IFC 4.3 dictionary, as buildingSMART's examples point to it; its name and description (`bsi::ifc::prop::Name`, a type's `TypeName`, `Description`); and the IFC4 attributes the published schemas give no key, `openeik::ifc::<attribute>`: `globalId`, `tag` (the OpenEik record's id), `objectType`, `predefinedType`, `elementType`, `operationType`, `partitioningType`, a door's and a window's `overallHeight` and `overallWidth`, a storey's `elevation`, the site's `refLatitude` and `refLongitude` in degrees.
- **Properties and quantities flat**: `bsi::ifc::prop::<Name>`, the bridge's own sets (`OpenEik_*`, no buildingSMART sets) `openeik::prop::<Name>`, each value in IFCX's units, a length in metres, with its quantity kind. IFCX has no property sets: their names are lost, and a property named as another of its object's, in another set and with another value, is not written.
- **Bodies**: each element's, opening's and space's body as `usd::usdgeom::mesh` {points, faceVertexIndices}, triangles whose face has points of its own, a child `Body` of their object, one for each colour (`Body_001` …), at most 65535 points, with its colour and opacity (`bsi::ifc::presentation::diffuseColor`, `opacity`); an opening's hidden (`usd::usdgeom::visibility`), as buildingSMART's examples hide a void. A swept solid is meshed, a circle as a polygon of 32 sides; a type's representation placed by its occurrences is meshed into each. **Placements** as `usd::xformop` {transform}, a 4×4 matrix in the parent node, its rows the axes and the origin, as OpenUSD writes them, where it is not the identity. Lengths in metres.
- **The print's own record**, on the project: `openeik::source`, the fields of the IFC4 print's `OpenEik_Source` (`VersionRoot`, `VersionId`, `ProjectId`, `Bridge`, `Print`), and `openeik::print`: the sentence that says it is a print, who printed it, that it is experimental, and the short form of its report.

**The fidelity report** counts again what the print writes (products, openings and types by class; storeys, spaces, systems, circuits, ports; nodes, meshes and triangles), gives what the bridge leaves out, approximates and is given as the IFC4 print reports it (`leftOut`, `approximated`, `given`, `declared`, `diagnostics`), and adds what IFCX loses of the IFC4 print, and why (`lost`): property-set names; materials, layer sets, profile sets and constituent sets (`bsi::ifc::material` names one bSDD class, with no layers or thicknesses); which door or window fills an opening; zones; where a circuit starts; shape aspects; a bounded value's bounds; the map conversion and true north; a relation's own GlobalId; and any class of the IFC4 print it does not read.

**Checked**, by hand on 27 October 2026, on this machine only: the prints of `examples/one-storey-house` and `examples/l-house` (10 products and 6 types; 130 products and 18 types), and of the house with bodies of every kind given, the conformance suite's installation and the electrical fixture, compose and pass the schema validation of buildingSMART's reference library (`ifcx-core` and its command line, `compose`, from a clone of its IFC5 development repository), and IFClite (`@ifc-lite/ifcx` 4.5.1) parses them with every product and type. For the two examples, each product's box in the IFCX print agrees with IfcOpenShell 0.8.5's geometry of the IFC4 print to a nanometre, and its volume with the compiler's to a millionth.

## Hashes and the reference implementation

A record's object is its canonical JSON (RFC 8785); a kept file's is its text as a JSON string; a folder's is `{"tree": [[name, "t" | "b", hash], …]}` sorted by name, split into `~xx` shards past 4096 entries; a version is a commit object (Part VI). By default `eik.json` is a leaf of the root, as Part VI, 2.2 requires. `versionTree(folder, {eikJson: false})` (`openeik hash --no-eik-json`) builds a tree without it, as versions saved before 11 October 2026 were built.

`test/fixtures/roots.json` holds roots the reference implementation computed with its own code at commit `88f0b375` (`scripts/reference-roots.mts`), whose trees had no `eik.json`, and the tests hold this package's trees without `eik.json` to them: both examples, a folder with kept files of every kind beside the records, and one with 5000 records in one folder (sharded). Exported folders with the reference implementation's whole library (295, 435 and 398 files) gave equal roots too. The fixture also records the roots with `eik.json`, which this package computes and which the reference implementation gave for the same four folders at `09ead506`.

Since 14 October 2026 the names of files are escaped as Part III, 2 says: the L-house's two gutters, whose ids hold colons, are named `study-roof%3Agutter%3Astudy-roof%3Aedge%3A0.json` and `…%3A2.json`. The reference implementation follows the rule since Stomra 506 (`a34cc1a1`), and at that commit its own code gave the roots with `eik.json` of all four folders, the renamed L-house's among them, equal to this package's (`referenceWithEikJson`). The tests hold the L-house as it was before, its two files named with colons, to the root the reference implementation computed at `88f0b375`, and read it as the same model.

## Conformance

The specification's [Conformance](https://openeik.org/spec/0.8/conformance) defines twelve classes for OpenEik 0.2: the reader, the validator, the writer, the compiler (core), the command processor, the version store, the agent host and the bridge, and the four that Parts XIV and XVIII add, the drawing validator, the drawing issuer, the host and the authoring tool (1). A claim to a class of 0.2 is a claim to what Parts XIII to XVIII ask of it too (1.1); a claim to 0.1 is a claim to the eight classes of 0.1 as the tag `v0.1.0` has them, without Parts XIII to XVIII. An implementation claims a class only when it meets every requirement the class lists. This package claims the **writer** and **compiler (core)** classes of OpenEik 0.2, and of OpenEik 0.1.

| Class | This package | Tested in `test/` | Not met |
|---|---|---|---|
| Writer | claims it of 0.1 and of 0.2: `modelFiles`, `writeFolder`. A model of 0.2 is written by 0.2's rules, in the owners' layout (Part III, 4.4), its circuits and people as records at their paths; a model of 0.1 written as 0.2 is migrated (Part I, 9.8; [Versions](#versions)). An asset of a kind it does not know it never writes: a clone or a pull keeps its pointer and writes no file of it, and the next push writes the pointer back (Part XV, 4, rule 3; `later` in `.eik/remotes.json`). Measured on 30 October 2026: both examples of 0.2 read and written back change no file, byte for byte (Conformance, 2), and every test of the column passes | `write.test.mjs`, `canonical.test.mjs`, `tree.test.mjs`; of 0.2, `versions.test.mjs`, `owner-folders.test.mjs`, `migrate-model.test.mjs`, `electrical.test.mjs`, `drawings.test.mjs`, `assets.test.mjs` | |
| Compiler (core) | claims it of 0.1 and of 0.2: `compileModel`. For a model of 0.2 it derives the rules 0.2 adds to Part IV, 4 and 6 too, the class-A rules of Part IV, 7.3 to 7.6 (erratum 0.2-E1), and Part XIII's bodies (Conformance, 1 and 1.1; [Compiling](#compiling)) | `compile.test.mjs`, `hosted.test.mjs`, `trims.test.mjs`, `runs.test.mjs`, `derived.test.mjs`; of 0.2, `sloped-slab.test.mjs`, `frames.test.mjs`, `adopted.test.mjs`, `framing.test.mjs`, `framing-lines.test.mjs`, `member.test.mjs`, `stairs.test.mjs`, `framing-layout.test.mjs`, `framing-roofs.test.mjs`, `rooms.test.mjs`, `components.test.mjs`, `electrical.test.mjs`, `versions.test.mjs` | |
| Reader | implements it: `readFolder`, `readVersion`, `readModel` on the single-file form, each with the whole-model check, or without it (`check: false`), refusing only what Part III, 12 lists (a file that is not UTF-8 among it), and, with or without it, a file that is not I-JSON (Security and privacy, 7.3, rule 1). It keeps no member of `project/order.json` that names no record list, with a warning, as Part III, 9, rule 5 allows. A model of 0.2 it reads by 0.2's rules: its circuits and people as records, a record in either layout (Part III, 4.4), `project/owners.json`, and the files of `assets/` as bytes | `read.test.mjs`, `check.test.mjs`, `store.test.mjs`, `ijson.test.mjs`; of 0.2, `versions.test.mjs`, `owner-folders.test.mjs`, `drawings.test.mjs`, `assets.test.mjs`, `conformance.test.mjs` | its check of the whole model (Part III, 12, rule 5) leaves out the two rules below |
| Validator | implements it: `checkFolder`, `checkModel`, `openeik check`. A model of 0.2 it checks by every rule of 0.2, Parts XIII to XVIII among them, with no proposal: every case of the conformance suite of 0.2 passes | `check.test.mjs`, `rules.test.mjs`, `validator.test.mjs`, `conformance.test.mjs` | it does not check that a sheet section's sizes follow its profiled sheet (Part II, 5.2); and it checks a framing family's expressions and parameters (Part II, 5.4) only in a model of 0.2, or of 0.1 asked for the proposal `framing`, and there only in a family a beam or a slab edge element is built from (Part IV, 6.6, rule 1), not in one no element uses |
| Command processor | implements it for the core record operations, and for a model of 0.2 `view.upsert` (Part V, 2.2) and Part XIII, 9's kinds, which the command schemas of 0.2 list: `applyCommands`, `openeik apply` | `commands.test.mjs` | the whole-model check after every command leaves out the same two rules |
| Version store | implements Part VI's objects and trees, diff and merge, and push, pull and a clone of one ref into a folder, as a client of a store; of 0.2, a version's assets as pointers, their bytes sent before a push moves its ref and fetched and checked before a clone or a pull writes anything (Part XV, 3 and 6) | `tree.test.mjs`, `diff.test.mjs`, `merge.test.mjs`, `store.test.mjs`, `remote.test.mjs`; of 0.2, `assets.test.mjs` | it keeps no versions of its own: the store does |
| Bridge (IFC) | implements it: `ifcOfModel`, `openeik ifc`, IFC4 (Part VIII, 1, rules 1 to 4, and Part IV, 11.1, rule 6: the fidelity report names the declared envelopes); of 0.2, a print names the version it was printed from, the bridge and who printed it, and says that it is a print (Part XVIII, 7.2) | `ifc.test.mjs` | |
| Bridge (IFCX) | experimental, and no conformance class covers it (open questions, 86): `ifcxOfModel`, `openeik ifcx`, buildingSMART's `ifcx_alpha`, from the IFC4 print | `ifcx.test.mjs` | it follows buildingSMART's alpha, which will change |
| Agent host | implements it: `createAgentHost`, `openeik mcp` ([The agent host](#the-agent-host)), over a folder, headless: every operation of Part VII, 1, the MUST ones and the SHOULD ones, with sections 2 to 8, and the count of generic elements (Part II, 6.6, rule 5); for a model of 0.2 it authenticates the writer of an envelope as the person it serves and records each agent's operation with its client (Part XVII, 4.2). It does not claim it: an agent host is a reader and a command processor too, which this package implements and does not claim (above) | `agent-host.test.mjs`, `agent-host-mcp.test.mjs`; the agent host's 19 conformance cases, `conformance-agent-host.test.mjs` | a 3D snapshot, which needs a renderer (Part VII, 8, rule 2, allows it); a view's `visibility.categories`, `elementIds` and `regions` in the filter's `viewId`, which the specification gives no meaning; envelopes required of agents only when asked (Part XVII, 8, rule 3, a SHOULD) |
| Drawing validator | implements it, for a model of 0.2 and for one of 0.1 asked for the proposals `drawings` and `review`: the validator above; freshness (Part XIV, 9.4), `drawingStatus` and `openeik drawing status`; sign-offs verified (14.3), `verifyDrawingSignoffs` and `openeik drawing verify`, the legal tier reported as not verified; a round's anchors where it has the version reviewed (Part XVIII, 2.5, rule 4), `checkReviewAnchors` and `openeik review anchors`; statements, receipts and acceptances verified (Part XVIII, 4.3, rule 6; 5.3, rule 7; 6.2, rule 7), `verifyReviewStatements`, `verifyReceipts` and `openeik review verify`; PDF renditions checked from their bytes (Part XIV, 15.2, rules 2, 3 and 5; 15.3, rules 1 to 4), every one a register keeps by `checkFolder` and any by `checkRendition` and `openeik drawing check-pdf` ([Checking a rendition](#checking-a-rendition)) | `drawings-freshness.test.mjs`, `drawings-verify.test.mjs`, `review-anchors.test.mjs`, `review-verify.test.mjs`, `drawings-pdf.test.mjs`, `conformance.test.mjs` | everything a validator must, which the validator does not meet (above); it records the SHA-256 of the file of a host's keys that verified a receipt, and leaves comparing a pinned file with a later one (Part XVIII, 5.6, rule 6) to its caller; of a rendition, ISO 19005-3 in full, a rendition's identifier's derivation (open question 141) and whether its note's sentence says it is a copy, which it lists as not checked, and a PAdES signature's own verification |
| Drawing issuer | implements it, for a model of 0.2 and for one of 0.1 asked for the proposal `drawings`: `issueDrawing`, `openeik drawing issue` (Part XIV, 17.2; [Issuing a drawing](#issuing-a-drawing)). Every drawing it issues of both examples is valid, current against its own source version and the same bytes twice | `drawings-issue.test.mjs`, `drawings.test.mjs`, `conformance.test.mjs` (the cases' issued drawings are its own) | a 3D view's picture, which it cannot render and takes from its caller; it records no version of what it issues (step 8), which its caller does; hidden lines are painted, not worked out |
| Host | not a host: a client of one, through a store's API ([Remotes](#remotes-clone-push-pull)) | | |
| Authoring tool | not one: it saves no receipt or statement a host offers, and records no version of what it issues (Part XVIII, 9) | | |

For a model of 0.2 the compiler derives a framing family's parts and its beam's lines (Part IV, 6.5.1 and 6.6), which 0.2 makes class-A rules, and the class-A rules of Part IV, 7.3 to 7.6, which the class asks of 0.2 too since erratum 0.2-E1: on a model of 0.2, with no proposal, it gives the stairs, framing layouts, rooms and component bodies of the fixtures below that it gives their models of 0.1 asked for the proposals (`versions.test.mjs`). In a model of 0.1 they are reference behaviour, which the compiler (core) class of 0.1 does not require (Part IV, 2; Part II, 5.4 binds only an implementation that derives framing bodies), and it derives them only when asked for the proposals that make them rules of 0.2 (`framing`, `stairs`, `framingLayout`, `rooms`, `components`). The conformance vectors of Part IV, 10 are not published, so the compiler is tested against the rules of Part IV, the quantities it works out in Part IV, 9, and the reference implementation's own results where `test/fixtures/` holds them: bodies (`*-bodies.json`, `notched-edges.json`), stairs, framing layouts and rooms.

## Tests

```sh
npm test                                   # at the repository's root: node --test packages/openeik/test/*.test.mjs
EIKHUB_DIR=<eikhub-checkout> npm test      # also against EikHub's own Worker, in memory, through its test harness
OPENEIK_PLUMBING_TEST=<folder> npm test    # also the IFC print of a folder with every pipe, duct and fixture type
```

The tests cover RFC 8785's number samples and examples, planted errors and their codes, each rule that needs geometry or the types' sizes (valid, broken each way and at its boundary) and the geometry under them, the model-quality rules on a synthetic model (each rule by name, by type name, by IFC class and by shape, and the cases that must not be flagged), the validator against Ajv on more than 11 000 values (Ajv is a development dependency of the repository, not of the package), the roots above, diffs, result manifests, a store in memory that speaks API v0 (its limits and its uploads of large objects included), remotes against it (clone, push, pull, their refusals and conflicts), the command, pipe and duct bodies against the reference implementation's own `runSolids` (`test/fixtures/run-bodies.json`, written by `node tools/run-bodies-reference.mjs <reference-checkout>` at the root), the IFC bridge (`test/ifc.test.mjs`: the examples, the installation of Part II, 6.9 with ducts and duct parts, GlobalIds pinned to the reference bridge's, the stand-ins where the reference bridge puts its bodies, stairs, rooms as spaces, member profiles, the map conversion against the reference bridge's and the meridian's arc, the same bytes twice and without Node's built-in modules, and a reader of the STEP text in `test/support/step.mjs`), the experimental IFCX print (`test/ifcx.test.mjs`: the examples' products and types as the IFC4 print counts them, each path the UUID of its GlobalId, every key with a schema and every value held to it, one tree and no cycle, the same bytes, the compiler's volumes, inheritance from types, properties, systems, ports and bodies given), and, with `EIKHUB_DIR`, EikHub's Worker. `OPENEIK_PLUMBING_TEST=<folder> npm test` also prints a folder with every pipe, duct and fixture type and holds it to Part VIII, 1.1, reading it in place.

After a change to `schemas/`, run `npm run schemas:bundle` at the root: a test fails until the bundled copy matches.

`test/conformance.test.mjs` runs the repository's [conformance suite](https://openeik.org/conformance) against this package, one test per case; a known failure is a todo. `test/electrical.test.mjs` tests the proposal electrical: each rule of Part XIII kept and broken, the circuits read and written, the bodies and legs, the command, and that nothing changes without it, on `test/fixtures/electrical`, an installation of two storeys as a writer of the proposal writes it (`openeik check test/fixtures/electrical --proposal electrical` gives no diagnostic). `test/conformance-proposed.test.mjs` runs the proposal's conformance cases (the proposal electrical's suite of 0.1, built by `tools/build-conformance.mjs --version 0.1 --proposal electrical` into a temporary folder; the suite of 0.2, [`conformance/`](https://openeik.org/conformance), folds its cases in), and checks their quotes against `spec/13-electrical.md` where the checkout has it. `test/drawings.test.mjs` tests the proposal drawings: each rule of its static checks kept and broken on the base of its conformance cases (`tools/conformance-cases-drawings.mjs`), the people read and written, issued files held up to 64 MiB and assets as bytes, and that nothing changes without it; `test/conformance-proposed.test.mjs` runs its cases too (the proposal drawings's suite of 0.1, built by `tools/build-conformance.mjs --version 0.1 --proposal drawings` into a temporary folder; the suite of 0.2, [`conformance/`](https://openeik.org/conformance), folds its cases in). `test/mep.test.mjs` tests heating, ventilation and plumbing (Part II, 6.9 and 13): the members and values in the schemas of 0.1, each code planted on the conformance suite's installation, a run's insulation and a deprecated `bti`, where a component stands on its pipe or its duct and its size across a duct, a duct part that names no duct, and the compiler's bodies.

`test/read-version.test.mjs` tests the reader of versions: every tree-* refusal, refused and read by a read that repairs, with what it gives back; `verify: false`, and the refusal of an object that does not hash to its name; the leaves and each record's hash against `versionTree`'s; and the writers of the two text forms against their earlier selves on random values.

## Not here

The compiler derives the class-A rules of Part IV only, and for a model of 0.2 the rules 0.2 adds, framing families and the members they make, framed walls, truss layouts and joists among them: wall joins (corners and tees, 7.1), a profiled sheet's section, roof windows and the other reference behaviour of Part IV, 2, 7.1 and 7.2 are not derived ([Compiling](#compiling)). The IFC bridge writes IFC4 only, from those bodies, the bodies an application gives and its own stand-ins, which it says are approximated: IFC 4.3 is planned for later (Part VIII, 1). It reads IFC4 and IFC2X3 once, to start a project (Part VIII, 2), and keeps no live link to the file ([Reading IFC](#reading-ifc)). It issues no drawings, and is no host and no authoring tool ([Conformance](#conformance)).
