# Part V. Commands

A command is a typed, validated change to a model. Commands are how a host changes a model on behalf of a person or an agent: each is checked before anything changes, applied all or nothing, and answered with what it touched. Hand edits of files are also allowed (Part III, section 14); they are checked when the folder is read.

## 1. The command

1. A command is a JSON object whose `kind` names it; its other members are fixed by its kind.
2. A command processor MUST refuse a command whose `kind` it does not implement, and a command that does not match its kind's schema, naming the member that is wrong.
3. The records a command carries (an element in `create`, a type in `type.upsert`, a view in `view.upsert`) and an element's `patch` MUST match their schemas. A member the schemas do not know MUST be kept in the record it is written to (Part I, section 10); the processor SHOULD warn, naming it, since it is often a misspelling. An extension member (Part I, 11.2) is no misspelling, and needs no warning. But a processor MUST refuse a command that would write an extension member whose value is `null` into a record that did not hold it, naming the record and the member (Part I, 11.2, rule 3): in a record a command writes whole (`create` and the upserts) and in the value a patch gives a member, `null` is a value, and only a member of the patch itself takes a member away with `null` (4.2). One that the record held, and that the command carries back as it was read, is kept (Part I, 10, rule 1).
4. A member a command's kind does not define at the top level of the command (for example a misspelt `expectedRevison`) MUST NOT be dropped silently: the processor SHOULD refuse the command or warn.
5. A processor MUST NOT create an element or a type of a category it does not know, and MUST keep those a model holds, through every command that does not delete them (Part I, 10, rule 5). A processor of 0.2 knows the categories 0.2 adds, in every model of 0.2: Part XIII's `electrical`, `cableCarrier` and `cable`, Part II, 6.2.1's `member`, and Part II, 6.10's `provision`. It makes and changes records of them by the rules of the part that adds them: it holds each to that part's schema, refuses what those rules refuse where it refuses the like of a category of 0.1 (a host of another category, a level that is not there, a size the type sets: section 6, stage 2), and checks the whole model by them (stage 3). In a model of 0.1, read by 0.1's rules (Part I, 9.6, rule 3), they are a later version's categories, which it does not know, unless it is asked for the proposal of 0.1 that adds them.

Reference: `commandSchema` in `src/core/model/model.ts` (a union of 91 kinds keyed by `kind`).

*Note (informative).* The reference processor differs on both points. It refuses an unknown member of an element, a patch or a view (their schemas are strict: "Unrecognized key(s) in object"), against rule 3; and it drops an unknown member at the top level of a command, or of a type, without a word, against rules 3 and 4. Since Stomra pull request #778 (live since 11 October 2026, `main` `8ebedf05`) it makes one exception, and keeps a record's own: a member that a record of the model holds with the same value, carried back in a command as it was read, is not refused, and a record a command changes keeps the members it holds. So of a command that would add an extension member whose value is `null` (rule 3), it refuses one in an element, a patch or a view, as it refuses any member it does not know there, and drops one in a type, against rule 3. `@openeik/tools` refuses it, and keeps one carried back as it was read. See the open questions.

## 2. The command set

The reference vocabulary has 91 kinds. They fall into core record operations, which every command processor MUST implement for the core records, and domain operations, which a processor MAY implement as a vocabulary profile.

From 0.6, and in a model of 0.5 with the proposals `costSchedules` and `workSchedules`, twelve kinds write a project's cost schedules and their items, and its work schedules, their tasks and their calendars, each whole, and report a task's progress and a schedule's status date, the whole state as read its precondition ([Part XXII, 6](https://openeik.org/spec/0.7/schedules#6)); none writes a price.

### 2.1 Core record operations

| Kind | Does | Precondition |
|---|---|---|
| `create` | adds an element; its id MUST be new | `expectedHostRevision` (optional) |
| `update` | patches an element (section 4) | `expectedRevision` |
| `delete` | removes an element and what depends on it (section 5) | `expectedRevision` |
| `type.upsert` | writes a type whole | `expectedRevision` (optional) |
| `type.delete` | removes a type no element uses | `expectedRevision` |
| `type.duplicate` | copies a type under a new id and name, optionally assigning it to one element | `expectedSourceRevision` |
| `level.upsert` | adds or changes a level; a new level gets its own plan unless `plan: false` | `expectedLevel` (optional) |
| `level.delete` | removes a level with its plans; refused while anything stands on it unless `moveTo` names a level | `expectedLevel` |
| `material.upsert` | writes a material | `expectedRevision` (optional) |
| `grid.upsert` | writes a grid line | `expectedRevision` (required when the grid exists) |
| `project.rename`, `project.elevationOffset`, `project.site`, `project.envelope`, `rooms.settings`, `project.information` | change the project record | `expectedName`, `expectedOffset`, `expectedSite`, `expectedEnvelope`, `expectedSettings`, `expectedInformation` |
| `project.excavation`, `project.precast`, `project.standards` | set or clear a project rule | none |
| `original.make`, `original.add`, `original.remove`, `original.rename`, `original.dissolve`, `original.frame`, `original.edit`, `copy.place`, `copy.move`, `copy.remove`, `copy.unique` | groups placed many times | `expectedRevision` on most |
| `original.exclude`, `original.restore` (from 0.7, section 2.1.2) | an instance of a group leaves elements out, or brings them back | `expectedRevision` |

### 2.1.1 Commands that write an instance's elements out

*Part of 0.5, with [Part IV, 13](https://openeik.org/spec/0.7/compiler#13). OpenEik 0.4 had it as the proposal `copies` (open questions, 136): a model of 0.4, read by 0.4's rules (Part I, 9.6, rule 3), is processed by it only where a caller asks for it (decision D12).*

A command processor runs the commands of groups that write an instance's elements out, as the reference implementation runs them; one of a model of 0.4 that does not apply the proposal MAY refuse them (`copies-not-derived`, [Part XVII, 10.4](https://openeik.org/spec/0.7/envelope#10.4)), since 0.4 does not say what an instance's elements are. Each writes an instance's elements as Part IV, 13 derives them, and no others.

1. **Which.** `original.frame` to an instance that is not the kept one, `original.edit` at one, `copy.move` of the kept instance, `copy.remove` of the kept instance while its group has another, and `copy.unique` of an instance while its group has another. The other commands of groups write no instance's elements, and run as 2.1 has them.
2. **`original.frame`** to the instance `t`: the group's kept elements go, and `t`'s elements, as Part IV, 13 derives them, less `copy`, are the kept ones, each under its id in `t` and at its revision. The group's `origin`, `turned` and `lifted` become `t`'s `at`, `turn` and `lift`, `turned` and `lifted` left out at 0, and its `frame` `t`, left out where `t` is the first instance. Where the first instance was the kept one, it gets a record of its own: `{id, of, at, turn, lift, revision}`, its `id` and `of` the group's, its `at`, `turn` and `lift` the group's `origin`, `turned` and `lifted`, each 0 where absent, and its `revision` 0. `t`'s record goes where `t` is the first instance, and else loses its `levelId`; and where `t` named a level other than the group's base level (Part IV, 13, rule 2), each other instance of the group that names no level is given the base level, so that it stays where it stood. Nothing moves, and no revision changes, the group's among them. Where `t` derives fewer elements than the group keeps (Part II, 10.1, rules 2 and 4), the processor refuses the command (`copies-not-derived`).
3. **`original.edit`** at an instance that is not the kept one: first `original.frame` to it, as rule 2 says; then the edit's commands, which name the group's elements by their ids there.
4. **`copy.move` of the kept instance.** The kept elements move as Part IV, 13, rules 1 to 5 move an instance's, from where the group stands to where the command puts it, its `at`, `turn` and `lift` where it gives them and else the group's, and on the level it names; each keeps its id and what it names, at its revision plus one. The group's `origin`, `turned` and `lifted` become that place, at its revision plus one, and the kept instance's record, where it has one, gets that `at`, `turn` and `lift`, at its revision plus one. Where the command names a level other than the group's base level, each other instance that names no level is given the base level. No other instance moves.
5. **`copy.remove` of the kept instance** while its group has others: first `original.frame` to the first of the others, its first instance where that has a record, else its copy whose id comes first as people count marks (runs of digits compared as numbers, `H2` before `H10`); then the instance goes, as a copy does.
6. **`copy.unique` of an instance** while its group has others: a kept instance first steps aside, as rule 5 says; then its elements, as Part IV, 13 derives them, are stored elements of no group, less `copy`, `original` and `born`, each under its id in the instance and at its revision plus one, so that what named them still names them; and its record goes. The last instance made unique ends its group, as without the proposal.

Reference: `reframe` and `applyCopyCommand` in `src/core/model/copyCommands.ts`; `movedKept` and `editCommands` in `src/core/model/copies.ts`; `instancesOf` and `byMark` in `src/core/model/groups.ts`. In `@openeik/tools`: `applyCommands(model, commands)` on a model of 0.5, and with `{proposals: ["copies"]}` on a model of 0.4.

*Note (informative).* Rule 2's "nothing moves" holds to within rounding: each written-out element is computed by Part IV, 13's motion, which the reference implementation does not round, so a group written out at a turned instance and back again stands where it stood to within about 10⁻⁹ mm. A tie of a group's element to an element outside it, which the reference implementation's rules for groups refuse, is carried into the written-out elements as Part IV, 13, rule 6 says, and the whole model's check (section 6, stage 3) refuses a batch that leaves it broken, such as a wall whose top no longer meets the roof it names.

### 2.1.2 Leaving elements out of an instance

*Part of 0.7, with [Part II, 10.1.1](https://openeik.org/spec/0.7/language#10.1.1). OpenEik 0.6 had it as the proposal `groupExclusions` (open questions, 183): a command processor runs these commands for a model of 0.6 only where it lists the proposal or is asked for it; without it `original.exclude` and `original.restore` are kinds it does not implement (`kind-not-implemented`), and `copy.place`'s `excluded` a member its kind does not define (`command-member-unknown`). Their schemas are in [`schemas/0.7/commands/`](https://openeik.org/schemas/0.7/commands/index.json), `copy.place`'s with its `excluded`, and `schemas/0.7/index.json` names the proposal in its `rules`.*

An instance's list in its group's `excluded` (Part II, 10.1.1) is written by these commands, and kept to the group by the others. Each that changes a group's `excluded` changes its record, and the group's revision goes up by one, once in the command (Part I, 8, rule 2).

1. **`original.exclude`** `{id, expectedRevision, at, elementIds, keep?}` leaves elements out of one instance of the group `id`, at its revision: `at` names one of its instances (`target-missing` where it names none), and `elementIds` 1 to 5000 elements of that instance, each by its id there (Part II, 10.1, rules 2 and 3) and each once; one that is no element of it is refused (`group-not-member`). Each leaves the instance with what depends on it there (Part II, 10.1.1, rule 4): their base ids join `at`'s list, which stays sorted, and the instance derives none of them (Part II, 10.1.1, rule 5). Every other instance keeps them, and an edit of the group still reaches them there. The 2D items of views that name an element that leaves, by its id in the instance, are removed, and the views stop hiding it, as for a delete (section 5, rule 3). The answer names the elements that left, by their ids in the instance (`excluded`).
2. **Not every element.** An instance that would leave out every kept element is refused (`group-exclusion`, the validator's code of Part II, 10.1.1, whose rule it would break): it is removed instead (`copy.remove`).
3. **At the kept instance.** Where `at` is the kept instance, which leaves nothing out (Part II, 10.1.1, rule 2), its keeping first goes to another instance that leaves nothing out, as `original.frame` writes it (2.1.1, rule 2), the first of them in 2.1.1, rule 5's order: its first instance where that has a record, else its copy whose id comes first as people count marks. Nothing moves and no element's id changes; then `at`, a copy now, leaves the elements out. Where no other instance has all of the group, the command is refused (`group-exclusion`): one instance always has all of it.
4. **Kept as its own.** With `keep: true`, each element that leaves the instance, those named and what depends on them, stays where it stands there, as an element of no group: its record in the instance as Part IV, 13 derives it, less `copy`, `original` and `born`, at its revision plus one. It lets go of what it names of the instance's elements that stay, as Part II, 10.1.1, rule 6 lets go of an element left out, so that a stored element names no element an instance derives. Its id is its id in the instance where that holds no `/`, and else that id with each `/` a `-`, `H2/wall-n` becoming `H2-wall-n`; where an element of the model, stored or derived, has that id, `-2`, `-3` and on after it, the first that none has (section 8, rule 3). What named it by its id in the instance names it by its own: the element references of the model's elements (Part II, 7), and the 2D items and the hidden elements of its views. An element that stands in one that stays, a door named without its wall, is refused (`group-hosted`): keep its host with it, or leave it out without keeping it. The answer names the elements kept, by their ids (`kept`).
5. **`original.restore`** `{id, expectedRevision, at, elementIds?}` brings elements back into the instance `at` of the group `id`, at its revision, as the group has them: `elementIds`, 1 to 5000, each by the id it has there, each one `at` leaves out (`target-missing` where it leaves out none of that id, or nothing at all); left out, every one it leaves out. What depends on one comes back with it; one that depends on an element that stays out is refused (`group-hosted`): restore it with what it depends on. Their base ids leave `at`'s list, a list left empty goes, and `excluded` left with no member goes. Where an element of the model has the id one would come back under, or that id with each `/` a `-`, the one it was kept as (rule 4), the command is refused (`id-duplicate`): the element stands there as its own already; delete it first. The answer names the elements that came back, by their ids in the instance (`restored`).
6. **`copy.place`'s `excluded`.** From 0.7, and in a model of 0.6 with the proposal, `copy.place` MAY give `excluded`, 1 to 5000 base ids, each once: the new instance's list, written sorted as its member of the group's `excluded`, so that a copy of an instance, its array or its paste, leaves out what that instance leaves out. The whole model's check holds the list to Part II, 10.1.1, rules 1 to 4 (section 6, stage 3).
7. **The other commands of groups.**
    - `original.frame` to an instance that leaves something out is refused (`group-exclusion`): the kept instance leaves out nothing.
    - `original.edit` at an instance that leaves something out writes the kept elements out there whole, what it leaves out among them, as 2.1.1, rule 3 does at any instance; runs its commands, which may name every element of the group by its id there; and then writes the kept elements out at the instance kept before, as `original.frame` writes them, so that the kept instance still leaves nothing out. `at`'s list stays as it was.
    - `copy.remove` and `copy.unique` of the kept instance, while its group has others, step aside for the first other instance that leaves nothing out, in 2.1.1, rule 5's order, and are refused where none has all of the group (`group-exclusion`).
    - `copy.unique` of an instance that leaves something out writes out the elements it derives, and none it leaves out.
    - After every command, an instance that is gone takes its list with it (`copy.remove`, `copy.unique`, `original.dissolve`); a base id that is no kept element's any more, taken out of the group by `original.remove` or deleted in `original.edit`, leaves every list; and a list left empty goes, and `excluded` left with no member.
8. **Replay.** No command here makes an id it is not given but by rule 4's derivation, and none reads a clock (section 8): run again on the same model, each writes the same records.

Reference: `original.exclude`, `original.restore` and `copy.place` in `applyCopyCommand`, `exclude`, `restore`, `aside` and `ownIds` in `src/core/model/copyCommands.ts`; `editBack` and `followOriginals` in `src/core/model/copies.ts`; `tidyExclusions` in `src/core/model/groupExclusions.ts` (work 1041). In `@openeik/tools`: `applyCommands(model, commands)` on a model of 0.7, and on one of 0.6 that lists the proposal, or with `{proposals: ["groupExclusions"]}`.

*Note (informative).* The reference implementation hands the keeping, at rule 3, to the first instance that leaves nothing out in the order it lists them, the kept one first; rule 3 takes 2.1.1, rule 5's order, which a processor already has. It writes `copy.place`'s list as given and leaves the group's revision as it was; rule 6 sorts the list, and the record that changes counts on (Part I, 8, rule 2). An element kept as its own (rule 4) gets the id it gives, `<instance>-<id>`, numbered as its `slashFree` numbers it.

### 2.2 Documentation profile

| Kind | Does | Precondition |
|---|---|---|
| `view.upsert` | writes a view whole | `expectedRevision` (optional) |
| `view.update` | changes a view's settings by name; `display` merges into the view's own | `expectedRevision` |
| `view.delete` | removes a view; refused while a sheet, a dependent view, a callout or a report uses it | `expectedRevision` |
| `view.camera` | sets a 3D view's camera for a sheet | `expectedRevision` |
| `detail.place`, `detail.update`, `detail.remove`, `detail.draw` | place, change, remove or draw one 2D item of a view | `expectedRevision` (the view's) |
| `scopeBox.upsert`, `dimensionStyle.upsert`, `detailFamily.upsert` | write those records | `expectedRevision` (required when the record exists) |

[Part XIV, 17.1](https://openeik.org/spec/0.7/drawings#17.1) moves `sheet.upsert` and `sheet.delete` into this profile, adds `person.upsert`, and has the detail commands carry provenance; their members, the detail commands' among them, are given from 0.5 by [Part XIV, 17.1.1](https://openeik.org/spec/0.7/drawings#17.1.1) and [17.1.2](https://openeik.org/spec/0.7/drawings#17.1.2), by this part's rules. The members and the rules of the profile's other kinds, `view.update`, `view.delete`, `view.camera` and the three upserts, are given from 0.5 by section 2.3.1.

### 2.3 Domain operations (the reference vocabulary)

| Group | Kinds |
|---|---|
| Transforms | `move`, `rotate`, `mirror`, `offset`, `array`, `radialArray`, `align`, `split`, `trim`, `sketch.edit` |
| Walls, columns and outlines | `wall.join`, `wall.attach`, `wall.detach`, `wall.flip`, `column.attach`, `column.detach`, `edge.attach` |
| Timber framing and trusses | `framing.rule.upsert`, `floor.framing.upsert`, `framing.materialise`, `framing.update`, `framing.detach`, `trusses.layout.upsert`, `trusses.plan`, `trusses.materialise`, `trusses.update`, `trusses.detach` |
| Systems | `mep.fall`, `mep.downpipe` |
| Reinforcement | `rebar.quick`, `mesh.lay` |
| Fabrication | `piece.upsert`, `piece.delete`, `joint.upsert`, `joint.delete` |
| Application records | `sheet.upsert`, `sheet.delete`, `titleBlock.upsert`, `titleBlock.delete`, `image.upsert`, `image.delete`, `render.upsert`, `render.delete`, `report.upsert`, `report.delete`, `deviation.upsert`, `deviation.delete`, `areaAdjustment.upsert`, `areaAdjustment.delete`, `reference.upsert`, `reference.delete` |

[Part XIX](https://openeik.org/spec/0.7/ground), from 0.5, adds seven kinds that change the ground, `ground.levels` and the upserts and deletes of a profile, a pit and a load on the ground (its section 8), by this part's rules.

[Part XX](https://openeik.org/spec/0.7/pieces), from 0.5, adds one kind, `piece.adopt`, which writes a piece of an element's layout as an element of its own (its section 9), by this part's rules.

A domain operation is defined by the records it produces: it MUST leave the model exactly as some sequence of core record operations would. Several are written that way in the reference: `framing.rule.upsert` and `floor.framing.upsert` become a `type.upsert`, `trusses.layout.upsert` and `mep.fall` an `update`, `trusses.plan` a `view.upsert`, `mesh.lay` a `create`, `rebar.quick` a batch of `create`s, `view.update` and `detail.draw` a `view.upsert`. Section 2.3.1, of 0.5, says for each kind it defines which core record operations it is.

Reference: `run` in `src/core/model/store.ts`.

### 2.3.1 Domain operations defined

*Part of 0.5. OpenEik 0.4 had it as the proposal `domainCommands` (open questions, 139): a model of 0.4, read by 0.4's rules (Part I, 9.6, rule 3), is processed by it only where a caller asks for it (decision D12).*

Section 2.3 names the domain operations and says what one is, and section 2.2 names the documentation profile's kinds; neither says which members a kind has, nor which records it writes. This section says both for the kinds below, each written from the reference implementation's command, so that two processors make the same records of the same command. A command processor runs them, as one of a model of 0.4 that applies the proposal does; one of 0.4 without it MAY refuse them (`kind-not-implemented`). Their schemas are in [`schemas/0.5/commands/`](https://gitlab.com/openeik/spec/-/blob/main/schemas/0.5/commands/README.md), each closed (section 1, rule 4) and listed with its precondition in `schemas/0.5/commands/index.json`.

| Kind | Members | Precondition | Run as | Written from the reference's |
|---|---|---|---|---|
| `view.update` | `id`, `patch` | `expectedRevision` | a `view.upsert` | `patchedView` |
| `view.delete` | `id` | `expectedRevision` | the view removed | `viewDeleteRefusal`, `viewUsers` |
| `view.camera` | `id`, `corner` or `position` and `target`, `fit`, `margin` | `expectedRevision` | a `view.upsert` | `viewWithCamera`, `fitAxonometricCrop` |
| `scopeBox.upsert`, `dimensionStyle.upsert`, `detailFamily.upsert` | `scopeBox`, `style`, `family` | `expectedRevision`, strict | the record written | their branches of `run` |
| `move` | `id`, `delta` | `expectedRevision` | `update`s | `translateElement` |
| `rotate`, `radialArray` | `id`, `centre`, `degrees`, `copyId` or `copyIds` | `expectedRevision` | `update`s and `create`s | `transformElements`, `turnElement` |
| `mirror` | `id`, `axis`, `copyId` | `expectedRevision` | `update`s and `create`s | `transformElements` |
| `offset` | `id`, `distance`, `copyId` | `expectedRevision` | `update`s and `create`s | `transformElements` |
| `array` | `id`, `delta`, `copyIds` | `expectedRevision` | `create`s | `transformElements` |
| `split` | `id`, `distance`, `gap`, `newId` | `expectedRevision` | `update`s and a `create` | `editLinearElements`, `splitEdges`, `splitInserts` |
| `trim` | `id`, `boundaryId`, `end` | `expectedRevision`, `expectedBoundaryRevision` | `update`s | `editLinearElements`, `trimmedInserts` |
| `sketch.edit` | `id`, `operation` | `expectedRevision` | an `update` | `applySketchTool` |
| `wall.join` | `id`, `otherId`, `allow` | `expectedRevision`, `expectedOtherRevision` | `update`s | its branch of `run`, `wallEndPair`, `teeHost`, `joinPartner` |
| `wall.flip` | `id` | `expectedRevision` | `update`s and `view.upsert`s | its branch of `run`, `flippedEdges`, `flippedInsert`, `flippedBars` |
| `wall.attach`, `wall.detach` | `id`; `hostId`, `face`, `offset`, `mode` | `expectedRevision`; `expectedHostRevision` | an `update` | their branch of `run` |
| `column.attach`, `column.detach` | `id`; `hostId`, `face`, `offset` | `expectedRevision`; `expectedHostRevision` | an `update` | their branch of `run` |
| `edge.attach` | `id`, `edgeId`, `hostId`, `face` | `expectedRevision`; `expectedHostRevision` | an `update` | its branch of `run` |
| `framing.rule.upsert` | `typeId`, `layerId`, `rule`, `setStructure` | `expectedRevision` | a `type.upsert` | `framingRuleAsTypeUpsert` |
| `floor.framing.upsert` | `typeId`, `layerId`, `rule` | `expectedRevision` | a `type.upsert` | `floorFramingAsTypeUpsert` |
| `framing.detach`, `trusses.detach` | `wallId` or `roofId`, `deleteMembers` | `expectedRevision` | `update`s or `delete`s | their branches of `run` |
| `mep.fall` | `id`, `fall`, `toward` | `expectedRevision` | an `update` | its branch of `run`, `heightsForFall` |
| `piece.upsert`, `joint.upsert` | `piece`, `joint` | `expectedRevision` (optional) | the record written | their branches of `run` |
| `piece.delete`, `joint.delete` | `id` | `expectedRevision` (optional) | the record removed | their branches of `run` |
| `titleBlock.upsert`, `render.upsert`, `report.upsert`, `deviation.upsert`, `areaAdjustment.upsert` | `family`, `render`, `report`, `deviation`, `adjustment` | `expectedRevision` (optional) | the record written | their branches of `run` |
| `titleBlock.delete`, `render.delete`, `report.delete`, `deviation.delete`, `areaAdjustment.delete` | `id` | `expectedRevision` (required for a title block, else optional) | the record removed | their branches of `run` |
| `image.upsert`, `image.delete` | `image`, or `id` | `expectedHash` (optional) | the record written or removed | their branches of `run` |
| `reference.upsert`, `reference.delete` | `reference`, or `id` | `expectedRevision` (strict; required) | the record written or removed | their branches of `run` |
| `framing.materialise`, `framing.update` | `wallId` | `expectedRevision` | `type.upsert`s, `delete`s, `update`s and `create`s | `materialisedElements`, `memberElement`, `memberType` |
| `trusses.materialise`, `trusses.update` | `roofId` | `expectedRevision` | `type.upsert`s, `delete`s, `update`s and `create`s | `trussElement`, `trussTypeOf` |
| `trusses.layout.upsert` | `roofId`, `layout` | `expectedRevision` | an `update` | its branch of `run` |
| `align` | `reference`, `moving` | `expectedRevision`, `expectedReferenceRevision` | an `update` | `facesFor`, `alignmentDelta` |
| `trusses.plan` | `roofId`, `id` | `expectedRevision` (optional) | a `view.upsert` | `trussPlanView` |
| `mesh.lay` | `hostId`, `designation`, `face`, `layer`, `cover`, `lap`, `grade`, `mark`, `id` | `expectedHostRevision` (optional) | a `create` | `meshOn` |
| `mep.downpipe` | `gutterId`, `typeId`, `size`, `end`, `levelId`, `foot`, `kickOut`, `id` | `expectedHostRevision` (optional) | a `create` | `downpipeFor`, `facadeUnder` |

1. **Run as core record operations.** A kind run as core record operations runs them in order, each as a command of its own kind inside it: each sees the model as the ones before it left it and is checked by its own kind's rules (section 6, stage 2), and the records they write and touch are the operation's, in its answer's `affected` too (section 9). An element the operation works out is written by an `update` whose patch holds each member whose value changes and `null` for each it takes away, where its revision or one of its members differs from the stored element; by a `create` where it is new; and not at all where it is as it was. A view it changes is written by a `view.upsert` at its revision. Its answer's `result` is `{as: [{kind, result}, …]}`: the core operations' kinds and results, in order. A core operation's refusal refuses the command with its code, its message naming the core operation (`as its update of "wall-a": …`). What follows an element that changes, a railing on an outline among it (Part II, 12.2, rule 4), follows it as it follows an `update`; and a bar set anchored to a wall the operation changes or makes (Part II, 6.1.1, rule 4), whose anchor is no longer the wall's frame or whose level is not the wall's, is carried to the frame by an `update` of its own, after the operation's elements: turned about the vertical from the anchor's direction to the wall's, then moved from the anchor's point to the wall's start at its base, its origin, its `xAxis`, its `yAxis` and its `along` each to a millionth of a millimetre, its `anchor` the wall's frame, its `levelId` the wall's and its `profile` its origin's point. An element of a group is changed in the group's edit alone (Part II, 10), as by an `update`.

2. **`view.update`.** The view `id` names, at `expectedRevision`, takes each member of `patch` in place of its own, and `null` takes one away; `display` merges into the view's own display member by member, `null` taking one away, and a view that has none starts from `{style: "shaded", shadows: true, sunPath: false}` where its kind is `3d` and from `{style: "hiddenLine", shadows: true, sunPath: false}` else. A patch that writes `id`, `kind`, `revision` or `details` is refused (`patch-fixed`): a view's 2D items change by the detail commands (Part XIV, 17.1). A patch that says undefined for a member the view or its display has is refused (`patch-undefined`, section 4, rule 3). It is run as a `view.upsert` of the view so patched at its revision; a view the patch leaves invalid is refused there (`command-schema`), named in the patch.

3. **`view.delete`.** The view `id` names, at `expectedRevision`, is removed with its own 2D items. It is refused while something uses it (section 5, rule 4; `in-use`, the users named): a sheet that places it in a viewport, under its scale bar (`scaleBar.viewId`) or in a key plan (`keyPlans[].viewId`); a view that depends on it (`dependentOn`); a callout of it (`parentViewId`); an item of another view whose `viewReference.viewId` names it; a report one of whose blocks of the kind `figure` names it (`viewId`). No core record operation removes a view: this one is the profile's own.

4. **`view.camera`.** The view `id` names, at `expectedRevision`, is a 3D view (else `command-schema`). Its camera is given by `corner`, or by `position` and `target`, one of the two (`command-schema`).
   1. `corner` `SW`, `SE`, `NE` or `NW`: `direction` is (s_x·√½, s_y·√½), s_x −1 for `SW` and `NW` and +1 else, s_y −1 for `SW` and `SE` and +1 else, and `axonometricElevation` the true isometric's, atan(1/√2) in degrees; `top`: `direction` (0, −1) and the elevation 90. `origin` stays.
   2. `position` and `target`, [x, y, z] mm: with d = position − target and f = √(d_x² + d_y²), they lie 1 mm apart or more, and the position is not below the target, d_z ≥ −10⁻⁶ (else `command-schema`). The elevation e is atan2(max(d_z, 0), f) in degrees; `direction` is (d_x, d_y)/f, or (0, −1) where f < 10⁻⁶; and `origin` is the target's x and y less `direction` times target_z · cos e / sin e where sin e > 0.05, the target's x and y else: where the line of sight through the target meets z 0.
   3. `origin` is written to the millimetre, `direction` to six decimals and `axonometricElevation` to three, each as a decimal number reads them, and never −0. It is run as a `view.upsert` of the view so changed, at its revision, its `crop` as it was.
   4. With `fit` other than `false`, the left out among it, the crop is fitted round what the view shows. The view shows each element of the model but those its `hiddenElementIds` name, those of a category its `hiddenCategories` names, and those of a discipline its display's `hiddenDisciplines` names, `architectural`, `structural`, `systems` and `site` being the folders `architecture`, `structure`, `systems` and `site` of Part III, 4.1. Each such element's **box** is the least and greatest x, y and z of its bodies as Part IV derives them, within 0.1 mm (Part IV, 10); an element with no body has none. Each box's eight corners are seen by the view's camera: with e its `axonometricElevation`, (d_x, d_y) its `direction` made a unit vector and o its `origin` at z 0, a corner p lies u = (p − o)·(−d_y, d_x, 0) across and v = (p − o)·(−d_x sin e, −d_y sin e, cos e) up. The crop is [u_min − g, u_max + g, v_min − g, v_max + g], g the `margin` (500 mm where it is left out), each rounded out to 10 mm, the least down and the greatest up. A view that shows no element with a box keeps its crop.

5. **The strict upserts.** `scopeBox.upsert`, `dimensionStyle.upsert` and `detailFamily.upsert` write `scopeBox`, `style` or `family` whole, held to `project/scope-box.schema.json`, `project/dimension-style.schema.json` and `project/detail-family.schema.json`, into `scopeBoxes`, `dimensionStyles` or `detailFamilies`: one that is there in its place at its revision plus one, a new one at the end of the list at revision 0. Their precondition is strict (section 3, rule 2): a record that exists is refused without `expectedRevision` (`precondition-missing`) and with another revision (`revision-conflict`), and a new one with one (`precondition-target`); in an envelope a new one says `null` (Part XVII, 9.1). What a record names is the whole model's to check (section 6, stage 3).

6. **`move`.** The element `id` names, at `expectedRevision`, moves by `delta`, [d_x, d_y, d_z] mm, at its revision plus one:
   1. One with no host: the points of its `profile`, of a terrain's `points` (their heights stay), of each recess's `profile` or its frame's `origin` (its height stays), of its `voids`, of a slab's `joints` (`a` and `b`) and a roof's windows' `center` move by (d_x, d_y); its declared geometry moves with it (Part II, 12.1, rule 6), but for one in the `line` frame, which needs nothing; and its `offset` rises by d_z.
   2. A door or a window moves along its wall's line or up it. With its wall's u and n (Part IV, 3), the move's part across the wall, d_x·n_x + d_y·n_y, is within 0.01 mm of 0, else it is refused (`command-schema`); `along` gains d_x·u_x + d_y·u_y, from 0 where it gives none, `offset` gains d_z, and its declared geometry moves by (d_x, d_y).
   3. Another hosted element follows its host, and is refused (`command-schema`).

   It is run as an `update` of the element.

7. **Transforms.** `rotate`, `radialArray`, `mirror`, `offset` and `array` change the element `id` names, at `expectedRevision`, or copy it.
   1. **Copies.** With `copyId` (`rotate`, `mirror`, `offset`) the element stays as it is, and one copy is made; `radialArray` and `array` make one copy for each id of `copyIds`, the k-th, counted from 1, turned k times by `degrees` or moved k times by `delta`. An id given twice, or one the model holds, is refused (`id-duplicate`). A copy is the element as the rules below change it, under its id, named with " — Copy" after the element's name, at revision 0: its top lets go of its host (`top.attach` goes; its constraint and its cut stay); an attached base goes, `base` whole; and of its edge attachments it keeps, in their order, each that Part II, 6.7's rules 1 to 5 still hold for where it lands, with those kept before it, and has no `edgeAttachments` where none holds. Each element it hosts (`hostId`) is copied with it, as the rules below leave it, under `<copy id>:<its id>`, hosted by the copy, at revision 0.
   2. **`rotate` and `radialArray`.** The turn is θ = `degrees`, anticlockwise about `centre`: a point p goes to centre + R(θ)(p − centre). A hosted element is refused (turn its host), and so is one that hosts a mesh or a rebar element that does not go with it by itself (`command-schema`): one goes with it where it is a mesh laid over a floor's seams (`sheet.face` `seams`), or where the element is a wall and it is a mesh in its layer (`sheet`) or a bar set anchored to it (`bars.anchor`). The element turns as an instance's element turns (Part IV, 13, rule 4): its outline, its declared geometry, a terrain's points, its voids, a slab's joints, a roof's windows' centres, a grading's fall's direction (a unit vector), its panels' direction (degrees from +x in [0, 360), to a millionth), a provision's axis and up; each recess's outline, or its frame, its origin a point and its u, v and w the images of origin plus each less the image of origin, their heights kept; a component's own axes x and y, each the image of the vector less the image of the origin, its z kept; and a column's `turn` becomes its turn plus θ, in (−180, 180] to a millionth, left out where 0. Its revision goes up by one; what it hosts stays as it is.
   3. **`mirror`.** The mirror is the line through `axis`'s two points, 0.001 mm apart or more (`command-schema`); a point goes to its reflection in the line. A column is mirrored about a line along x or along y alone, |d_x·d_y| ≤ 0.001 for the axis's d (`command-schema`), and an element that hosts a slab edge element, a mesh or a rebar element that does not go with it by itself (rule 7.2) is refused (`command-schema`). A door or a window moves along its wall to where the mirror takes its middle, as rule 6.2 moves it, and its `handFlipped` turns where the mirror takes a step along the wall's u to one against it; another hosted element is refused (`command-schema`). One with no host, at its revision plus one:
      - its outline, a terrain's points, its voids, a slab's joints, a roof's windows' centres, each recess, a component's axes, its panels' direction and a grading's fall's direction are mirrored, as rule 7.2 turns them;
      - its declared geometry is mirrored and turned over: a prism's outline runs the other way, each face of a polyhedron and of a mesh runs the other way, and a load's moment is mirrored and its sign changed;
      - a column's `turn` becomes 2α − turn, α the axis's angle from +x in degrees, written as rule 7.2 writes it; a beam's `roll` changes its sign; a component's `flipped` turns;
      - a stair's `turn` becomes `left` where it was `right` and `right` else, its `locationLine` swaps `left` and `right`, and each railing it hosts swaps its `railing.side`;
      - a wall's baseline runs the other way: after the mirror its two points are swapped, its `wallOutline`'s x become L − x, L its length, its `joinEnds` swap, and its edge details are flipped as rule 11.1 flips them. Of what it hosts, a bar set anchored to it is reflected, its origin a point and its axes and `along` directions, x and y to a millionth, and anchored to the wall as the mirror leaves it; a cast-in item gets `along` = L less the greatest along of its items, to a tenth of a millimetre, its `face`, its path and its `tilt` as rule 11.2 turns them, at its revision plus one; a mesh in its layer stays; and every other element it hosts gets `along` = L − along − width and its `handFlipped` turned, at its revision plus one.
   4. **`offset`.** A wall or a beam (else `command-schema`) moves by `distance` along its left normal n (Part IV, 3), as rule 6 moves it.
   5. **`array`.** The step `delta` is 0.001 mm long or more (`command-schema`); the k-th copy is the element moved by k·`delta`, as rule 6 moves it.
   6. It is run as an `update` of each element it changes and a `create` of each copy, the element first and then what it hosts, copy by copy.

8. **`split` and `trim`.** The element `id` names, at `expectedRevision`, is a wall or a beam of two profile points, with no `wallOutline` and of a type without `framing` (else `command-schema`). Let a and b be its points, L its length, u its direction, and r its `endRise`, or 0.
   1. `split` at `distance`, with `gap` (0 where it is left out): the first part ends at l = distance − gap/2 and the second starts at r₂ = distance + gap/2, each 1 mm or more from its end (`command-schema`); `newId` is new (`id-duplicate`); and an element it hosts that is no cast-in item and lies across them (along < r₂ and along + width > l) refuses it (`command-schema`). The element keeps [a, a + u·l] at its revision plus one, its `endRise` r·l/L where it gives one; the second part is the element under `newId`, its name with " - Split" after it, [a + u·r₂, b], its `offset` raised by r·r₂/L, its `endRise` r·(L − r₂)/L, at revision 0. Its edge details are shared out: `start`'s stay on the first part, `end`'s go to the second, a `top`'s or a `bottom`'s span [from, to], 0 and L where left out, is cut to [from, min(to, l)] on the first where from < l and to [max(from, r₂) − r₂, to − r₂] on the second where to > r₂, and an opening's go with the opening; a part left with none has no `edges`. Each element it hosts at along ≥ r₂ moves to the second part, its `along` less r₂, at its revision plus one. A cast-in item goes with the part its whole reach lies on, within 0.5 mm (its row's items, or its conduit's way), on the second with `along` and its path's alongs less r₂, to a tenth of a millimetre, and one across the split refuses it (`command-schema`).
   2. `trim` to the line of `boundaryId`, another straight wall or beam, at `expectedBoundaryRevision` (else `command-schema`), not parallel to the element (|u × v| ≥ 10⁻⁷ for its direction v, else `command-schema`): the lines meet at t along the element from a. `end` 0 trims its start: the element becomes [a + u·t, b], its `offset` raised by r·t/L, its `endRise` r·(L − t)/L, and each element it hosts that is no cast-in item has its `along` less t, at its revision plus one; `end` 1 trims its end: [a, a + u·t], its `endRise` r·t/L. A t over L − 1 at the start, or under 1 at the end, refuses it (`command-schema`). A cast-in item stays where it is: each place of its reach, less how far the start moved, lies on the trimmed wall within 0.5 mm, else the trim is refused, but in a replay, which leaves the item as it was (section 8, rule 4); one with its own `along` or a path, where the start moved, has them less that, to a tenth of a millimetre, at its revision plus one.

   It is run as an `update` of the element, a `create` of the second part, and an `update` of each element it hosts that it changes.

9. **`sketch.edit`.** The element `id` names, at `expectedRevision`, is a wall, a slab, a roof, a ceiling, a foundation or a room whose `profile` has three points or more (else `command-schema`). Its `operation` is a sketch operation of [Part XIV, 17.1.2](https://openeik.org/spec/0.7/drawings#17.1.2), its tool's picks counted (`command-schema`), which edits the wall's `wallOutline`, or [[0, 0], [L, 0], [L, height], [0, height]] where it has none, or the element's `profile`: `line` appends its two picks, the first left out where it lies within 1 mm of the last point, and the last point dropped where the path then closes on its first within 1 mm; `arc3`, `centerArc`, `tangentArc`, `partialEllipse` and `spline` go on from it, `fillet` rounds one of its corners, and `rectangle`, `polygon`, `circumscribed`, `circle`, `circle3` and `ellipse` draw a new outline in its place, each by 17.1.2's arithmetic. An operation that draws no shape is refused (`command-schema`). It is run as an `update` of `wallOutline` or of `profile`.

10. **`wall.join`.** `id` and `otherId` name two walls, at `expectedRevision` and `expectedOtherRevision` (else `target-missing`). The ends that pair are the last pair [i, j] of (0, 0), (0, 1), (1, 0), (1, 1) whose ends meet as Part IV, 7.4.2 pairs two ends (`wallEndPair`); where none pairs, the first of the first wall's ends 0 and 1, then the other's, that meets the other wall's side as a T, read with its own `joinEnds` left out (Part IV, 7.4.2, `teeHost`); where neither, the command is refused (`command-schema`). The pair's two ends, or the T's end, take `allow` in their walls' `joinEnds`, which are [true, true] where a wall gives none, each wall at its revision plus one. With `allow` true, a corner whose join is not then found (`joinPartner`: a third wall meets it, or the walls stand on different storeys), or a T whose end then meets another side, refuses it (`command-schema`). It is run as an `update` of each wall it changes.

11. **`wall.flip`.** The wall `id` names, at `expectedRevision`, of length L, keeps its place and turns its baseline round, so that its exterior and its interior swap (Part II, 6.8, rule 1):
    1. its `profile` is [b, a]; its `wallOutline`'s points [x, z] become [min(L, max(0, L − x)), z], in the reverse order; its `joinEnds` swap; and its edge details turn: `start` and `end` swap, a `top`'s or a `bottom`'s span [from, to], where it gives either, becomes [L − to, L − from], to and from L and 0 where left out, and an opening's sides `left` and `right` swap; at its revision plus one;
    2. a cast-in item it hosts stays where it is along it and in its layer: its `face` `start` and `end` swap, its `along` becomes L less its last item's along, to a tenth of a millimetre, its path's alongs become L less each, and its `tilt` changes its sign where its length runs along the wall (on a face other than `start` and `end`, with no `turn` 90);
    3. a bar set anchored to it is mirrored about the vertical plane through the baseline, its origin about the anchor's point and its axes and `along` as directions, x and y to a millionth, its `anchor` the wall's other end, at the anchor's height, with the anchor's direction reversed, and its `profile` its origin's point;
    4. a door or a window it hosts gets `along` = max(0, L − along − width), and its `flipped` and `handFlipped` turn, each written where true and left out where false, so that it faces and swings as before (Part II, 6.8, rule 2);
    5. an element whose edge attachments name the wall swaps the `face` of each such entry, `interior` for `exterior` and back (Part II, 6.7);
    6. each view of whose items an object anywhere names the wall by `elementId` and one of its faces by `face`, `exterior`, `interior`, `start` or `end`, names the other.

    Each element it changes is at its revision plus one. It is run as an `update` of each element and a `view.upsert` of each view, at its revision.

12. **`wall.attach` and `wall.detach`.** The wall `id` names is at `expectedRevision`; its top is its `top`, or what its legacy members say where it has none (Part II, 6.4). `wall.attach` with `hostId` attaches it to a roof, a slab, a foundation or a ceiling (`top-host`; one not in the model, `ref-missing`) at `expectedHostRevision`, which is then given (`precondition-missing`): `top.attach` becomes `{hostId, face, offset, mode}`, `face` `underside` where it is left out, `offset` where it is given and not 0, `mode` where it is given. Without `hostId`, or with `null`, the top lets go of its host: `top.attach` goes. `wall.detach` lets it go too, and takes `top.cutRoofFace` with it where the top gives no `cutRoofId`. It is run as an `update` of the wall's `top`; that the face meets the wall is the whole model's to check (Part IV, 5.3).

13. **`column.attach` and `column.detach`.** The column `id` names is at `expectedRevision`. `column.attach` writes its `base` whole, `{attach: {hostId, face, offset}}`: the host a foundation or a slab (`base-host`; one not in the model, `ref-missing`) at `expectedHostRevision`, `face` `top` where it is left out, `offset` where it is given and not 0. `column.detach` takes `base` away. It is run as an `update` of the column's `base`.

14. **`edge.attach`.** The element `id` names is a roof, a slab, a foundation or a ceiling at `expectedRevision`, and `edgeId` names an edge of its outline (Part I, 6.6; else `trim-edge`). Its entry of `edgeAttachments` for that edge goes; with `hostId` a wall (`trim-host`; one not in the model, `ref-missing`) at `expectedHostRevision`, which is then given (`precondition-missing`), `{edgeId, hostId, face}` is added at the end, `face` `interior` where it is left out; with `hostId` `null` none is. An element left with none has no `edgeAttachments`. It is run as an `update` of `edgeAttachments`; Part II, 6.7's rules 3 to 5 are the whole model's to check.

15. **`framing.rule.upsert` and `floor.framing.upsert`.** The type `typeId` names, at `expectedRevision`, is a wall type or a slab type, and `layerId` names one of its layers (else `target-missing`). `framing.rule.upsert` sets the layer's `framing` to `rule`, or takes it away where `rule` is `null`; where the type has an `assembly`, the assembly's layer whose type layer is `<type id>-<its id>` gets or loses it too (`target-missing` where none is), and with `setStructure` and a rule it takes the `role` `frame`; and with `setStructure` and a rule the type's layer takes the `function` `structure` and `core` true. `floor.framing.upsert` sets the layer's `joists` to `rule`, or takes them away, and refuses a joist deeper than its layer (the rule's `member.depth`, the layer's thickness where it gives none, more than 10⁻⁶ mm over the layer's `thickness`; `command-schema`). Each is run as a `type.upsert` of the type so changed, at its revision.

16. **`framing.detach` and `trusses.detach`.** The wall `wallId` names, or the roof `roofId` names, at `expectedRevision`, has members materialised from it, elements that name it in `frameHost.wallId` or `frameHost.roofId` (Part IV, 7.4.12, rule 2), else it is refused (`target-missing`). Each lets go of it: it is run as an `update` of each that takes `frameHost` away, in the model's order, or with `deleteMembers` true a `delete` of each, which takes what depends on it with it (section 5), one that an earlier delete took being gone already.

17. **`mep.fall`.** The pipe or duct `id` names, at `expectedRevision`, gets the heights of its fall `fall`, in ‰, from the end it flows to, `toward` (`end` where it is left out), which keeps its height. Its heights are `mep.z`, or its `offset` at each point where it gives none; walking from that end, each point is the one before it plus its segment's run in plan times `fall`/1000, but where a segment stands, its run in plan under 1 mm or under a fifth of its rise as it was, which keeps that rise; each height is written to a tenth of a millimetre. It is run as an `update` of its `mep`, its other members as they were and `z` the heights.

18. **Pieces and joints.** `piece.upsert` and `joint.upsert` write `piece` or `joint` whole, held to `fabrication/piece.schema.json` and `fabrication/joint.schema.json`, into `pieces` or `joints`: one that is there in its place at its revision plus one, a new one at the end of the list at revision 0. A given `expectedRevision` is the record's (`revision-conflict`), and for a new record it is refused (`precondition-target`; section 3, rule 2). `piece.delete` and `joint.delete` remove the record `id` names (`target-missing`), at a given `expectedRevision`. In an envelope a new record's upsert says `null` (Part XVII, 9.1).

19. **The application records.** A title block, an image, a render, a report, a deviation, an area adjustment and a linked reference are application records (Part I, 11; `application-record.schema.json`), in `titleBlocks`, `images`, `renders`, `reports`, `deviations`, `areaAdjustments` and `references`; their upserts write the record whole, one that is there in its place, a new one at the end of its list.
    1. `titleBlock.upsert`, `report.upsert`, `deviation.upsert` and `areaAdjustment.upsert`: at its revision plus one, a new one at revision 0; a given `expectedRevision` is the record's, and for a new record it is refused (`precondition-target`). An area adjustment's `levelId` names a level of the model (`ref-missing`). A title block that gives its `width` and `height` as numbers resizes each sheet whose `titleBlockId` names it and whose size is another: the sheet takes them, at its revision plus one.
    2. `render.upsert`: at its revision plus one, a new one at revision 0, which counts as revision 0 for a given `expectedRevision` (section 3, rule 2).
    3. `reference.upsert`: at its revision plus one, a new one at revision 0; its precondition is strict, as rule 5 says.
    4. `image.upsert`: as it is given; an image has no revision. A given `expectedHash` is the hash (Part III, 6) of the image's record as read, `null` for a new one (Part XVII, 9.2); another refuses it (`revision-conflict`; for a new image, `precondition-target`).
    5. Their deletes remove the record `id` names (`target-missing`), at a given `expectedRevision`, or for an image a given `expectedHash`; `titleBlock.delete` and `reference.delete` give their `expectedRevision`. A title block is refused while a sheet names it in `titleBlockId`, and an image while a sheet shows it (`images[].imageId`) or a title block does (an item of its `items` of the kind `image` whose `imageId` names it) (`in-use`, section 5, rule 4).

    No core record operation writes these lists: these are their own. What a record holds besides its id and revision is its application's (Part I, 11).

20. **`framing.materialise` and `framing.update`.** The wall `wallId` names, at `expectedRevision`, is a wall (else `target-missing`). Its **members** are those Part IV, 7.4 lays out of its framed layers, with the elements materialised from it (those that name it in `frameHost.wallId`) left out of the model: layer by layer in its type's order, and each layer's in its order (Part IV, 7.4.1, rule 6). A wall of which no member is laid out refuses it (`target-missing`), naming why. A member of outline P in its wall's elevation, from x0 to x1 along and z0 to z1 up, from y0 to y1 across (Part IV, 7.4.1, rule 4), and of line from s to e (Part IV, 7.4.9, rule 1), becomes an element:
    1. **Its category and its place**, each on the wall's level, each plan point in the model as Part IV, 7.4.1, rule 4 places a point of the elevation at the middle of y0 and y1, and each point, `offset` and `height` to a millionth of a millimetre. Where its line is plumb (s and e within 10⁻⁶ mm in x), a `column` at the middle of x0 and x1, its `offset` the wall's plus z0, its `height` z1 − z0, and its `turn` the wall's direction from +x in degrees, in (−180, 180] to a millionth, left out where 0. Where its line is level (within 10⁻⁶ mm in z), a `beam` from the point at x0 to the one at x1, set out on its underside: its `offset` the wall's plus z0. Else a `member` (Part II, 6.2.1) along the middle of P's box in the frame of its line: from the least to the greatest of P's reach along the line, at the middle of its reach square to it; its `offset` the wall's plus its start's z, and its `end` the wall's level and the wall's `offset` plus its end's z.
    2. **Its type** is `framing-<category>-<w>x<d>-<grade>`, of a section w by d, each to a tenth of a millimetre and written as decimal numbers read them: a column's w is x1 − x0, its section's width along its x before its turn, and its d is y1 − y0; a beam's w is y1 − y0, across, and its d is z1 − z0; a member's w is y1 − y0 and its d P's reach square to its line; `<grade>` is its rule's `material` (Part IV, 7.4.9, rule 1), each character but an ASCII letter, a digit, `_`, `:` and `-` a `-`. Where the model holds a type of that id it is the element's; where it does not, the type `{id, category, name: "Framing <w> × <d> <grade>", material: "Timber", color: "#d8b57a", width: w, height: d, revision: 0, section: {shape: "rectangle", width: w, depth: d, web: 1, flange: 1, designation: "<w> × <d>", grade}}` is written. A beam's and a member's `height` is its type's section's depth (Part II, 5.3 and 6.2.1, rule 5) and its `width` the section's width; a column's `width` is its section's width.
    3. **Its id, its name and its host.** Its id is `frame-` and its member's id, each character but an ASCII letter, a digit, `_`, `:` and `-` a `-`; its `name` its member's (`stud 3`); `structural` true; `frameHost` `{wallId, layerId, memberId, role}`: the wall, its layer, its member's id and its role; at revision 0.

    `framing.materialise` is refused for a wall that has elements materialised from it (`command-schema`), and `framing.update` for one that has none (`target-missing`). Each is run as a `type.upsert` of each type it writes, in the order of their first use; then, for an update, a `delete` of each element materialised from the wall that is no member's now, in the model's order; then, member by member, a `create` of each element that is new and an `update` of each that differs, its patch what changed (rule 1). An element materialised from the wall whose `frameHost.edited` is true is a person's own: it is kept as it is, neither deleted nor updated.

21. **`trusses.materialise` and `trusses.update`.** The roof `roofId` names, at `expectedRevision`, is a roof (else `target-missing`) whose `trussLayout` Part IV, 7.4.13 lays out with the elements materialised from it (those that name it in `frameHost.roofId`) left out of the model; one that it does not lay out refuses it (`target-missing`), naming its finding. A layout that frames a roof opening refuses it (`command-schema`): a trimmer of one side, a truss whose top chords lose a band to an opening, a header and a dormer rafter (Part IV, 7.4.13, rule 10) are the layout's own, and a truss of a family carries no band. Its trusses, its ridge beam and its posts become elements, each `structural`, at revision 0, with `frameHost` `{roofId, memberId, role}`, its id as rule 20 makes it of its truss's or its member's id:
    1. **A truss**, in the layout's order, its hip sets' among them (Part IV, 7.4.16): a `beam` from its a to its b, each to a millionth, on the highest level at or under its bearing plane E (within 10⁻⁶ mm; of two at one elevation the first by id; else the roof's level), its `offset` E less that level's elevation, to a thousandth; of the layout's `familyTypeId`, but a hip truss's and a jack's `<familyTypeId>-jack` and a girder's along the ridge `<familyTypeId>-flat` (7.4.16, rule 2), which, where the model holds no type of the id, is written: `{id, name: its family's name, category: "beam", material, color, width, height, revision: 0, framing}`, its family as 7.4.16, rule 2 makes it and the rest the layout's type's; its `framingParameters` its parameters (7.4.13, rule 7); its `width` its family's `Width` (45 where it has none) and its `height` its type's; named as 7.4.13, rule 13 and 7.4.16, rule 10 name it (`Truss T3`); its role `truss`.
    2. **A ridge beam** (7.4.13, rule 11): a `beam` from the middle of its four corners at its start to the middle of those at its end, each to a millionth, set out on its underside, its corners' least height, on the level rule 1 gives that height, its `offset` to a thousandth; of the type `framing-beam-<width>x<depth>-<grade>` of rule 20, its grade its layout's `ridgeBeam.material`, else its layout's type's `material`; named `ridge beam` and its key; its role `ridgeBeam`. A ridge beam whose underside or top lies at its two ends more than 10⁻⁶ mm apart is no beam's body, and refuses the command (`command-schema`). **Each of its posts**: a `column` at the middle of its corners, from their least height up to their greatest, its `offset` and its `height` to a thousandth, turned as the ridge runs (rule 20.1), of the type `framing-column-<width>x<width>-<grade>`; named `ridge post` and its key; its role `post`.

    `trusses.materialise` and `trusses.update` are refused, and run, as rule 20 says of a wall's.

22. **`trusses.layout.upsert`.** The roof `roofId` names, at `expectedRevision`, is a roof (else `target-missing`). Its `trussLayout` becomes `layout`, written whole, or goes where `layout` is `null`: the command is run as an `update` of the roof's `trussLayout`, and refused only where that update is: by its schema (`command-schema`, named in `layout`), or by the whole model's check (section 6, stage 3). A layout that Part IV, 7.4.13 cannot lay out is stored, as any record whose derived results a rule cannot give is (Part IV, 7.4.12). The processor then lays the layout out, and says each finding as a warning of its answer: that it has no layout and why (`framing-layout-roof`, 7.4.13, rule 1), or each note of one that it has (`framing-layout-note`, 7.4.12).

23. **`align`.** `moving.elementId` names the element that moves, at `expectedRevision`, and `reference.elementId` another (one element named twice, `command-schema`), at `expectedReferenceRevision`. Each `face` names a face that its element offers, a plane worked out from its record by a point and a normal (else `target-missing`, the element's faces named):
    1. **A wall** of two profile points a and b, its direction u, its left normal n (Part IV, 3), its thickness T (its type's layers' together, else its `width`; Part IV, 7.4.2, rule 1) and its base z_b (its level's elevation plus its `offset`): `exterior` through a + n·T/2, its normal n; `interior` through a − n·T/2, −n; `centreline` through a, n; `start` through a, −u; `end` through b, u; `bottom` at z_b, down; and `top`, up, at its top by Part IV, 5.1, where it is not attached (`top.attach`) nor cut (`top.cutRoofId`), carries no legacy member of either (Part II, 6.4) and no `wallOutline`.
    2. **A slab, a foundation or a ceiling** of three outline points or more: each edge, `edge:<edge id>` by its id (its `edgeIds`, else `<id>:edge:<i>`; Part I, 6, rule 6), through its first point, its normal square to it in plan and out of the outline; and, where it carries no `plane` (Part II, 6.3.1), `top` at its level's elevation plus its `offset`, up, and `bottom` its thickness under that (its type's layers' together, else its `height`), down.
    3. **A column** of centre c, base z_b and turn t, with x′ = (cos t, sin t), y′ = (−sin t, cos t), and w and d its section's `width` and `depth` (each its `width` where its type has no section): `side:0` through c − y′·d/2, its normal −y′; `side:1` through c + x′·w/2, x′; `side:2` through c + y′·d/2, y′; `side:3` through c − x′·w/2, −x′; and, where its base is not attached (`base`), `bottom` at z_b and `top` at z_b plus its `height`.
    4. **A beam** of two profile points a and b, its direction u and its left normal n, w and d its section's `width` and `depth` (its own `width` and `height` where its type has no section), set out on its underside z_b (Part IV, 6.2): `left` through a + n·w/2, n; `right` through a − n·w/2, −n; `start` through a, −u; `end` through b, u; and, where its `endRise` and its `roll` are 0 or left out, `bottom` at z_b and `top` at z_b + d.

    No other element offers a face. The two faces are parallel, their normals' product 0.999999 or more in size (else `command-schema`). With n_r and p_r the reference face's normal and point and p_m the moving face's point, the element moves by n_r·((p_r − p_m)·n_r), each part to a millionth of a millimetre, as rule 6 moves it: the command is run as an `update` of the element.

24. **`trusses.plan`.** Its roofs are the roof `roofId` names (a roof, else `target-missing`), or, without `roofId`, every roof of the model, by id, whose truss layout Part IV, 7.4.13 lays out with a truss or more, as the model stands; where there is none, it is refused (`target-missing`). Its plan is the view `id` names, else `truss-plan-<roofId>`, else `truss-plan`; a view of that id that is not a plan refuses it (`command-schema`). The plan is that view as it was, where there is one, with these members:
    1. `levelId`: the level of the first wall or beam its layouts bear on, each layout's left side's bearings and then its right side's, each side's in order (7.4.13, rule 3); else its first roof's level;
    2. `cutHeight` c = h − E_l + 300, rounded to the millimetre, h the highest of its roofs' boxes (rule 4.4) and of its trusses' bearing planes, and E_l its level's elevation; and `viewRange` `{direction: "down", top: {offset: c}, cut: {offset: c}, bottom: {offset: 0}, depth: {offset: 0}}`;
    3. `crop`: the least and greatest x and y of its trusses' points a and b, grown by 1500 mm, each to a millionth;
    4. `kind` `plan`; and `display` its own, else `{style: "hiddenLine", shadows: false, sunPath: false}`, with `hiddenDisciplines` `["architectural", "systems"]` and `trussMarks` true;
    5. and, where it had none of them, `name` `Truss plan · <the roof's name>` where the command names a roof and `Truss plan` else, `origin` [0, 0], `direction` [0, 1], `far` 10000, `scale` 100 and `hiddenCategories` `["rebar", "mesh"]`.

    Its precondition, `expectedRevision`, is optional outside an envelope. Given, it is the plan's revision as read (`revision-conflict`), and `null` for a plan of that id that is not there yet: `null` for one that is there is refused (`revision-conflict`), and a number for one that is not (`precondition-target`). It is run as a `view.upsert` of the plan, at its revision.

25. **`mesh.lay`.** The element `hostId` names is a slab, a foundation or a wall, as a mesh element's host is (Part II, 6.1; else `target-missing`). Over a slab or a foundation of three outline points or more its `face` is `bottom`, `top` or `seams`, `bottom` where it is left out, and it names no `layer`; in a straight wall its `face` is `exterior`, `interior`, `both` or `middle`, `both` where it is left out (else `command-schema`). The mesh element is `{id, category: "mesh", name, typeId, levelId, offset, height: 8, width: 8, profile, revision: 0, hostId, sheet}`:
    1. its `id` the command's, else the first of `<hostId>:mesh`, `<hostId>:mesh-2`, `<hostId>:mesh-3` … that the model does not hold; its `typeId` the model's mesh type whose id comes first (none, `ref-missing`); its `levelId` its host's; its `offset` a wall's `offset`, else 0; its `profile` its host's first point;
    2. its `sheet`: `designation` the command's, a national value (open questions, 4), which the command gives; `length` 5000 and `width` 2300, over seams 2300 and 600; `face`; `cover` the command's, else 25 in a wall and 35 else; `lap`, `layer` and `grade` where the command gives them; and `mark` the command's, else `N` and n + 1, n the number of the model's elements that carry `sheet`;
    3. its `name` `Mesh <designation>, <face>`, its face said `bottom`, `top`, `exterior face`, `interior face`, `both faces` or `middle`; over seams `Seam mesh <designation>`.

    It is run as a `create` of the element, naming its host's revision where the command gives `expectedHostRevision` (in an envelope it does, Part XVII, 9.1).

26. **`mep.downpipe`.** The element `gutterId` names is a gutter (else `target-missing`) with a body (Part IV, 4.7; else `command-schema`), `typeId` names a pipe type (`ref-missing`, `type-category`), and `size` is the pipe's diameter: the command gives both, since OpenEik names no downpipe product. With a and b the ends of the gutter's eave line, the edge of its roof's domain that its `hostEdgeId` names (Part IV, 4.4, rule 3), L its length, t its direction and o its normal out of the roof; z_g the least height of the gutter's body; and r = `size`/2:
    1. **The facade under it**: of each straight piece of a wall whose base lies at z_g or under it, within 10° of t, whose outer face lies f in from the eave line along −o, more than 0 and at most 2500 mm (the piece's distance in less half the wall's thickness, its type's layers' together, else its `width`), and whose reach along t from a, u_0 to u_1 (its ends', grown by half its thickness), meets 0 to L: the one of the least f, the first by id of equals.
    2. **Its place**: at the gutter's `end` (`end` where it is left out) u = L − i, at its `start` u = i, with i = min(150, L/2); with a facade, at the end min(L − i, u_1 − 100 − r), at the start max(i, u_0 + 100 + r); held within 0 and L. Its top q is the point u along the eave from a, moved along o to the middle m of the gutter's body's reach along o from there, at z_g.
    3. **Its path** runs down from q. Where a facade stands off by s = max(0, f + m − r − 30) more than 20 mm, it drops 80 mm, then runs s back along −o while it falls s / tan β, β 70° where s is more than 250 mm and 45° else. Then it runs down to its foot: φ is the elevation of the level `levelId` names (else the level nearest elevation 0, the first by id of equals; `ref-missing`) plus `foot` (−150 where it is left out); with `kickOut` (true where it is left out) down to φ + 200 and then 200 mm out along o down to φ, else down to φ. A lowest point less than 100 mm under the point before it refuses it (`command-schema`).
    4. **The pipe** is `{id, category: "pipe", name: "Downpipe Ø<size>", typeId, levelId, offset: 0, height: size, width: size, profile, revision: 0, hostId: gutterId, mep: {z, size, downpipe: {end, foot, kickOut, from}}}`: its `id` the command's, else the first of `<gutterId>:downpipe`, `<gutterId>:downpipe-2` … that the model does not hold; its `levelId` that level's; its `profile` its path's points in plan and `mep.z` their heights over the level, each to a tenth of a millimetre; `from`, what its path was worked out from, a's and b's x and y, z_g, f, u_0 and u_1, each to a tenth, written as decimal numbers read them and joined by spaces, the last three empty where there is no facade.

    It is run as a `create` of the pipe, naming its gutter's revision where the command gives `expectedHostRevision`.

27. **The kind left.** `rebar.quick` is not defined here, and a processor that applies the proposal refuses it as one that does not (`kind-not-implemented`). From 0.6, a processor runs it by section 2.3.2, and one of a model of 0.5 that applies the proposal `quickRebar` does so too. The sets it lays out, a slab's or a foundation's bars both ways, U-bars along its edges, a beam's or a column's cage and a wall's two faces, are bar sets whose record holds a bending sheet's shape code and its dimensions (`bars.shape` and `bars.dims`, Part II, 6.3), national values of which OpenEik carries no list (open questions, 4), and the reference laps its long bars by a design code's anchorage lengths in the concrete's class. A writer that knows a code lays the sets out and sends them as `create`s, with their legs and mandrel where it has them (Part II, 6.3.2).

Reference: the functions the table names, in `src/core/geometry/transforms.ts`, `src/core/geometry/modifications.ts`, `src/core/elements/lineEdits.ts`, `edgeDetails.ts`, `inserts.ts`, `bars.ts`, `mep.ts`, `wallJoins.ts` and `wallTop.ts`, `src/core/sketch/sketchTools.ts`, `src/core/views/viewPatch.ts`, `viewUsers.ts` and `axonometric.ts`, `src/core/model/typeRuleCommands.ts`, and the branches of `run` in `src/core/model/store.ts`; `materialisedElements`, `memberElement`, `memberType` and `memberElementId` in `src/core/elements/framingMaterialise.ts`; `trussElement`, `trussTypeOf`, `trussElementId` and `deriveTrussLayout` in `src/core/elements/trussLayout.ts`; `jackType` and `flatTopType` in `src/core/elements/trussFamilies.ts`; `trussPlanView` in `src/core/views/trussPlan.ts`; `meshOn` in `src/core/elements/meshSheets.ts`; `downpipeFor` and `facadeUnder` in `src/core/elements/downpipes.ts`; and, for the kind left, `quickSet` and `lapLongBars` in `src/core/elements/bars.ts` and `barLaps.ts`. In `@openeik/tools`: `applyCommands(model, commands)` on a model of 0.5, and with `{proposals: ["domainCommands"]}` on a model of 0.4 (`DOMAIN_COMMAND_KINDS`; `src/domain.js`, and `src/domain-derived.js` for rules 4.4 and 20 to 26).

*Note (informative).* The reference processor applies these kinds in its own store, and differs in ways that change no record's values but its order and its revision, or refuse less. It puts each record it changes at the end of its list, where a core `update` changes it in place. A mirror of a stair writes its railings' sides, and a title block the sheets it resizes, without raising their revisions, which an `update` and a sheet's write raise. It takes a precondition for a new piece, joint or render without comparing it. A detach that deletes the members leaves the 2D items that named them, which a `delete` takes with it (section 5, rule 3). Its `view.delete` refuses two more, a view of the id `view-3d` and a project's last plan, which are its own screens' rules. And after every command its store lets more follow what changed, a stair's opening, a pipe's ends, a cast-in item's place in plan and others, which this part asks of no command, core or domain; rule 1 asks it of a bar set anchored to a wall, as Part II, 6.1.1, rule 4 does. Its `wall.attach` also takes the members `roofId`, `ceilingId`, `expectedRoofRevision` and `expectedCeilingRevision` of an earlier form, which a writer of `top` does not send (Part II, 6.4).

*Note (informative).* Rules 4.4 and 20 to 26 were written on 5 November 2026 by the editors (question 126), the second part of the proposal (open questions, 139), and the reference implementation differs from them where it decides what OpenEik did not say. It writes a wall's member as a column where its line stands more than it lies and as a beam else, a raking top plate as a level box round it, a beam with its `offset` at its top where a beam is set out on its underside (Part IV, 6.2), and a stud unturned on a wall that runs other than along x; it names a type by its section alone (`framing-column-45x145`), whatever its grade, and in its trade's Swedish, and a member by its role and its section; it refuses a member type that the batch does not send before it, where rule 20 writes it; and it writes no ridge beam and no post, so that a roof written out loses them (Part IV, 7.4.12, rule 2). It refuses a truss layout that its engine cannot lay out, some twenty ways, where rule 22 stores it and says so. It finds `align`'s faces on its renderer's bodies, and fits a crop round each of its renderer's bodies' points, where rules 23 and 4.4 work them out from the records and from each element's box; it names a truss plan in Swedish. Its `mesh.lay` gives a sheet the designation `6150` and its grade where the command gives none, both national values, and checks a layer's or a slab's thickness against the cover and the wires its designation names, which needs that national list; its `mep.downpipe` takes a type of its own presets and sizes it by the gutter's width, 75, 87 or 100 mm, and works the pipe out again when its gutter or its facade moves (`followedDownpipes`), which this part asks of no command.

### 2.3.2 Quick reinforcement

*Part of 0.6. OpenEik 0.5 had it as the proposal `quickRebar` (open questions, 149): a command processor runs `rebar.quick` on a model of 0.5 by this section only where its caller asks for it (decision D12) or the model lists it (Part I, 9.12), and one that does not refuses it as section 2.3.1, rule 27 says (`kind-not-implemented`); a processor of a model of 0.1 to 0.4 never runs it. Its schema is [`schemas/0.6/commands/rebar.quick.schema.json`](https://openeik.org/schemas/0.6/commands/rebar.quick.schema.json).*

Section 2.3.1, rule 27 leaves `rebar.quick` undefined: the sets it lays were bar sets of a bending sheet's shape codes and dimensions, national values of which OpenEik carries no list, and the reference laps its long bars by a design code. On the neutral bar shapes of 0.5 (Part II, 6.3.2) a bar set gives its own centreline and its mandrel, from which every reader derives its bends, its body and its cut length (Part IV, 7.7), so the sets can be said with no national value. This section says which sets the command lays, from which members, and which records it writes, as section 2.3.1 says it of the other kinds. Its rules of construction, the sizes, covers and spacings where the command gives none, where a row's first bar lies, a stirrup's hooks, the mandrel and the stock length, were put to the steward with question 149, and he decided each as recommended on 6 November 2026; its members, its records with their ids and marks, and a bar set without a code are the format's, decided by the editors (question 126).

| Kind | Members | Precondition | Run as | Written from the reference's |
|---|---|---|---|---|
| `rebar.quick` | `hostId`, `set`, `diameter`, `spacing`, `cover`, `stirrup`, `bar`, `leg`, `lap`, `stock`, `grade`, `id` | `expectedHostRevision` (optional) | `create`s | `quickSet`, `slabBars`, `edgeUBars`, `memberBars`, `wallBars`, `lapLongBars` |

1. **The set.** `set` is `slabBottom` or `slabTop`, a slab's or a foundation's bars both ways at its underside or at its top; `edgeU`, U-bars along a slab's or a foundation's edges; `cage`, a beam's or a column's stirrups and corner bars; or `wall`, a wall's bars on both faces. `auto`, where it is left out, is `slabBottom` in a slab or a foundation, `cage` in a beam or a column and `wall` in a wall. The element `hostId` names is of a category its set lies in (else `target-missing`, as an element that is not in the model is).
2. **Its members.** Each set reads `grade` and `id`, and its own, which are: `diameter`, `spacing`, `cover`, `lap` and `stock` for `slabBottom`, `slabTop` and `wall`; `diameter`, `spacing`, `cover` and `leg` for `edgeU`; and `stirrup`, `bar`, `spacing`, `cover`, `lap` and `stock` for `cage`. A command that gives a member its set does not read is refused (`command-schema`), naming it. Where the command leaves one out, it is, in mm:

   | Set | Bars | `spacing` | `cover` | Other |
   |---|---|---|---|---|
   | `slabBottom`, `slabTop` | `diameter` 12 | 200 | 35 | |
   | `edgeU` | `diameter` 10 | 300 | 35 | `leg` 500 |
   | `cage` | `stirrup` 8, `bar` 16 | 200 | 30 | |
   | `wall` | `diameter` 10 | 200 | 30 | |

   `stock` is 12 000 where it is left out; `lap` and `grade` have none.
3. **Rows, concrete and cover.** A **row** of bars over a reach r, from where its first bar's centre may lie to where its last bar's may, at the spacing s, holds n = ⌊r/s⌋ + 1 bars, s apart and centred on the reach: the first lies (r − (n − 1)s)/2 from the reach's start; a reach less than 0 holds none. A host's **concrete** lies from its first layer its type marks `structure` to its last, measured from its first face, a slab's or a foundation's top, its layers running down, and a wall's left face, its layers running across to its right (Part II, 6.1.1, rule 3), or over the whole of it where its type marks none; its thickness T is its type's layers' together, else its `height`, a wall's its `width`. The **cover** c is measured from the concrete's faces to the bars' outer faces, and along a bar to its ends. A bar's centreline lies half its diameter in from its outer faces (Part II, 6.3.2, rule 4).
4. **`slabBottom` and `slabTop`.** The host has an outline of three points or more and no `plane` that slopes (else `command-schema`). Its concrete's top z_t lies at its level's elevation plus its `offset`, less the depth its concrete starts at, and its underside z_b at the depth it ends at under that; with d the `diameter` and s the `spacing`, z_t − z_b is c + 2d or more (else `command-schema`).
   1. **Its two layers.** u is the direction of its outline's first edge, from its first point to its second, and n is u turned 90° anticlockwise. Layer 1 runs along e = u and is placed along a = n; layer 2 runs along n and is placed along u. At the underside layer k lies at z_b + c + d/2 + (k − 1)d, at the top at z_t − c − d/2 − (k − 1)d.
   2. **Its bars.** A layer's row is over the reach from the least a · p of the outline's points plus c + d/2 to the greatest less c + d/2. At each place t of its row, the line a · p = t crosses the edges of the outline and of its `voids`: an edge where one of its ends lies before the line (a · p < t) and the other on it or past it. The crossings, by e · p in order and paired from the first, are its pieces inside the floor, and each piece from h_0 to h_1 longer than 2c + 2d holds a bar from h_0 + c to h_1 − c.
   3. **Its sets.** A bar at a place of the row continues the first set, by the order below, whose bars ended at the place before it and whose first bar's two ends lie each within 5 mm of its own; any other bar begins a set. The sets are layer 1's and then layer 2's, each layer's by its first bar's place and then by its start along e. Each set's bars are its first bar's length L.
   4. **Its records.** A set's `origin` is its first bar's start, at its layer's height; `xAxis` e, `yAxis` [0, 0, 1], `along` a, `count` its bars, `spacing` s, `face` `bottom` or `top`, and `legs` [[0, 0], [L, 0]].
5. **`edgeU`.** The host is as rule 4 asks, and h = z_t − z_b − 2c, the U's height to its outer faces, is more than 2d (else `command-schema`). Each edge of its outline, in the outline's order, from a to b, of length l and direction t, takes one set where l is 3c or more; i is t turned 90° anticlockwise where the outline runs anticlockwise (its signed area is more than 0), and clockwise else, into the floor. Its row is along the edge over the reach l − 2c, from c. With g the `leg`: `origin` a + t·(c + its first bar's place) + i·(c + g), at z_t − c; `xAxis` [0, 0, −1], `yAxis` i, `along` t; `count` its row's bars, `spacing` s; and `legs` [[d/2, 0], [d/2, d/2 − g], [h − d/2, d/2 − g], [h − d/2, 0]]: the bar's back at the edge's cover, its two legs reaching g in from it under the top's cover and over the underside's.
6. **`cage`.** In a beam of two profile points a and b, of direction u, whose `endRise`, `roll` and `taper` are 0 or left out: L = |b − a| along u from a; across it runs u turned 90° anticlockwise, and up [0, 0, 1]; its section, w by d_s, its type's section's `width` and `depth` (its own `width` and `height` where its type gives no section), lies from −w/2 to w/2 across and from 0 to d_s up from its underside at its level's elevation plus its `offset` (Part IV, 6.2). In a column whose base is not attached (`base`), of centre p and `turn` θ: L its `height` up from p at its level's elevation plus its `offset`; across it runs x′ = (cos θ, sin θ, 0) and up y′ = (−sin θ, cos θ, 0); its section, w by d_s, its type's section's `width` and `depth` (each its `width` where its type gives no section), lies from −w/2 to w/2 across and from −d_s/2 to d_s/2 up (section 2.3.1, rule 23.3). A section of a shape other than `rectangle`, and a beam or a column this rule does not describe, refuse it (`command-schema`). With s_d the `stirrup`, b the `bar`, W = w − 2c and H = d_s − 2c the stirrups' outer size, and e the corner bars' inset of rule 6.2, W − 2e and H − 2e, the distances between the centres of a row's two corner bars, are each 2b or more, the bars a diameter clear of each other (else `command-schema`):
   1. **The stirrups.** A stirrup lies in a frame of x across from its outer face at the cover, y up from its outer face at the cover and z along the member. With q = s_d/2, its centreline turns at A = (q, q, 0), B = (W − q, q, 0), C = (W − q, H − q, 0) and D = (q, H − q, 0), and its `legs` are [T, D, C, B, A, D + (0, 0, s_d), T + (0, 0, s_d)], T = D + k·(1, −1, 0)/√2 and k = R tan 67.5° + max(10 s_d, 70), R being its mandrel's half plus s_d/2: a closed stirrup whose two ends are hooked into the corner D at 135°, each with a straight end of ten diameters, and of 70 mm at least, after its bend; it passes D the second time one stirrup diameter further along the member, so that it does not run through itself. A hook whose end T lies past the stirrup's opposite sides (its x more than W − q, or its y less than q) refuses it (`command-schema`). The row is along the member over the reach L − 2c − 2s_d, from c + s_d/2; the set's `origin` is its first stirrup's frame's origin, `xAxis` the across direction, `yAxis` up, `along` the member's direction.
   2. **The corner bars.** Two sets of two straight bars, each from c along the member to L − c, `legs` [[0, 0], [L − 2c, 0]], each bar seated in a stirrup's bend: its centre on the bend's bisector and the bar touching the bend's inner face, whose radius r is the stirrups' mandrel's half (rule 9.2), so that its centre lies e = s_d + b/2 + (r − b/2)(1 − 1/√2) inside the stirrups' outer faces on each; where b/2 is r or more, the bar is too large for the bend and bears on the stirrup's two straight legs, e = s_d + b/2. The sets lie across at −w/2 + c + e and W − 2e apart (`spacing`, along the across direction), and up at the section's start plus c + e, a beam's `bottom` and a column's `side 0`, and at its end less that, `top` and `side 2`; `xAxis` the member's direction, `yAxis` up, `along` the across direction, `count` 2. Stirrups of 8 mm, bent on 32 mm, and bars of 16 mm give e = 16 + 8(1 − 1/√2) = 18.343 mm: a bar s_d + b/2 = 16 mm in on each face would lie 11.3 mm from the bend's centre, where it may lie 8 mm from it at most, and overlap the bend by 3.3 mm.
   3. The stirrups come first, then the bars at the section's start, then those at its end.
7. **`wall`.** The wall is straight, of two profile points a and b, of length l and direction t, n its left normal; it has no `wallOutline`, its top is neither attached nor cut and carries no legacy member of either (Part II, 6.4), and its height H is up to its top constraint's level's elevation plus its offset, else its `height` (else `command-schema`). Its concrete's faces lie T/2 less the depth its concrete starts at, and T/2 less the depth it ends at, along n from its centreline, and lie 2c + 4d apart or more (else `command-schema`). At each face, the left, its exterior (Part II, 6.8), first:
   1. **its verticals**, the inner bars: their centres c + 3d/2 inside the face, in a row along the wall over the reach l − 2c − d from c + d/2, from its base plus c up for H − 2c; `xAxis` [0, 0, 1], `yAxis` n, `along` t, `legs` [[0, 0], [H − 2c, 0]];
   2. **its horizontals**, the outer bars: their centres c + d/2 inside the face, from c along the wall to l − c, in a row up it over the reach H − 2c − d from its base plus c + d/2; `xAxis` t, `yAxis` [0, 0, 1], `along` [0, 0, 1], `legs` [[0, 0], [l − 2c, 0]].

   A row of no bar, a reach less than 0, refuses it (`command-schema`). Each set gives `anchor`, the wall's frame (Part II, 6.1.1, rule 4).
8. **Stock lengths.** A set of straight bars of length λ more than `stock` is laid, where the command gives `lap`, as pieces along its `xAxis`, each a set of its own at its place: ⌈(λ − lap)/(stock − lap)⌉ pieces, each `stock` − `lap` on from the one before it and `stock` long, the last what is left; where the last is shorter than two laps, it and the one before it are made equal, each ⌈(λ − f + lap)/2⌉ mm, f being the start of the one before it, and the last starts one lap before that one's end. A lap is a design code's value, of the bar, its place and the concrete, which the command gives: OpenEik reads no code. Without `lap`, the set is written whole, and the answer warns that its bars are longer than a stock bar.
9. **The records.** Each set, in the order rules 4 to 8 give, is a rebar element `{id, category: "rebar", name, typeId, levelId, offset: 0, height: d, width: d, profile, revision: 0, hostId, bars}`:
   1. its `id` the first of `<id>`, `<id>-2`, `<id>-3` … that neither the model nor an earlier set holds, `<id>` being the command's, else `<hostId>:bars`; its `typeId` the model's rebar type whose id comes first (none, `ref-missing`); its `levelId` its host's; and its `profile` its `origin`'s point in plan;
   2. its `bars`: `diameter`; `mark`, the first set's one more than the greatest of the model's bar sets' and mesh sheets' marks that are written in digits alone (0 where there is none), and each next set's the next; the members rules 4 to 8 give; `mandrel` 4d where its diameter d is 16 mm or less and 7d above; `grade` the command's, where it gives one; and in a wall `anchor`. It gives no `shape` and no `dims` (rule 10).
   3. its `name` `Bars <mark>, <count> Ø<d>, <which>`, which being `bottom layer 1`, `top layer 2`, `U-bars, edge 3` (its edge's place in the outline, from 1), `stirrups`, `corner bars, bottom`, `corner bars, top`, `corner bars, side 0`, `corner bars, side 2`, `verticals, exterior face`, `horizontals, interior face` and the like, with `, piece <i> of <n>` after it for a piece of rule 8;
   4. `origin` and each point of `legs` to a thousandth of a millimetre, and each part of `xAxis`, `yAxis` and `along` to a millionth.

   A set whose legs make no bar (Part II, 6.3.2, rule 3), and a host that takes no set, refuse the command (`command-schema`). It is run as a `create` of each set, in order, naming its host's revision where the command gives `expectedHostRevision` (in an envelope it does, Part XVII, 9.1).
10. **A bar set without a code.** A bar set that gives its `legs` MAY leave out its `shape` and its `dims`, which the schemas of 0.5 require and those of 0.6 do not where `legs` is given: its legs and its mandrel are its geometry (Part IV, 7.7), and its code, the national value it is ordered and scheduled by (Part II, 6.3.2), is a writer's that knows it, which adds it by an `update`. A validator of 0.6, and one of 0.5 that applies the proposal, reports neither missing where `legs` is given. A bridge writes such a set's IFC type with no BendingShapeCode and no BendingParameters (Part VIII, 1.11, rule 3).

Reference: `quickSet`, `quickBars`, `slabBars`, `edgeUBars`, `memberBars`, `wallBars`, `coreSpan`, `concreteFaces` and `nextMark` in `src/core/elements/bars.ts`; `lappedPieces` and `lapLongBars` in `src/core/elements/barLaps.ts`; its branch of `run` in `src/core/model/store.ts`. In `@openeik/tools`: `applyCommands(model, commands)` on a model of 0.6, and with `{proposals: ["quickRebar"]}` on a model of 0.5 (`QUICK_REBAR_KINDS` in `src/commands.js`; `quickSets`, `row`, `concreteSpan`, `lappedPieces` and `mandrelOf` in `src/quick-rebar.js`), and `checkModel` for rule 10, so too.

*Note (informative).* The reference implementation lays the same sets from the same members, and differs where it writes national values or decides what this section says otherwise. It writes the letters `A`, `C` and `K` of a Swedish bending sheet with their dimensions, the grade `B500B` and names in Swedish, and no `legs`; it starts a row at the cover where rule 3 centres it, and puts a set's outer dimensions on its centreline, half a diameter outside the cover; it hooks a stirrup's two ends in one plane, a little apart; it takes a column's cage square, of its `width`, unturned; it lays a floor's bars on the longest piece of each line inside its outline, its `voids` and a second arm of an outline that turns back left out; it lays two stirrups at least, the second past the member's end where the member is shorter than a spacing and its two covers; and it laps a straight bar longer than 12 m by EN 1992-1-1, 8.7.3's lap in its host's concrete. A line of rule 4.2 that runs along an edge of a void, which neither end of that edge crosses, is not cut there; a writer that wants such bars moved, or bars round a shaft's opening (Part IV, 4.2, rule 8) or a recess, moves or cuts them after.

### 2.3.3 Commands of a system's network

*Part of 0.6, with Part II, 6.9.1. OpenEik 0.5 had it as the proposal `systems` (open questions, 145): a command processor runs them for a model of 0.6, and for a model of 0.5 that asks for the proposal or lists it (Part I, 9.12), and refuses them for any other (`kind-not-implemented`). Their schemas are in [`schemas/0.6/commands/`](https://gitlab.com/openeik/spec/-/blob/main/schemas/0.6/commands/README.md), `system.assign.schema.json` and `run.join.schema.json`.*

A system is its runs' kind and number, and a join is a run's record or where its end lies (Part II, 6.9.1, rules 1 and 5): two commands change them as a person does, each run as the core record operations it is (section 2.3.1, rule 1).

| Kind | Members | Precondition | Run as |
|---|---|---|---|
| `system.assign` | `id`, `system`, `number`, `follow` | `expectedRevision` | an `update` of each run's `mep` |
| `run.join` | `id`, `end`, `terminalId`, `port`, `place` | `expectedRevision` | an `update` of the run |

1. **`system.assign`.** The pipe or the duct `id` names (else `target-missing`), at `expectedRevision`, is put in the system `system`, a kind of Part II, 6.9's table, and `number`, 1 to 99, 1 where it is left out: its `mep.system` becomes `system`, and its `mep.number` `number`, none where it is 1. With `follow`, so is every run its fittings join it to (`fittedRuns`): the runs of its category and its kind before the change that one reaches from it through ends that meet and ends that lie on a run (Part IV, 12.8, rule 1), ports left out, so that a supply main and its branches move together and its return does not. It is run as an `update` of each, in code-unit order of their ids, its `mep` whole with its other members as they were: the run `id` names at `expectedRevision`, each other at its revision as the model holds it, as a cascade's (Part XIII, 9). A component in a run goes with it, its system being its run's (Part II, 6.9).
2. **`run.join`.** The pipe or the duct `id` names, at `expectedRevision`, has its end `end`, `start` or `end`, joined to the port `port`, 0 to 103 (Part II, 6.9.1, rule 3), of the terminal `terminalId` names: its `mep.joins.<end>` becomes `{terminalId, connection: port}`, its other end's join as it was. The terminal is one of the model (else `ref-missing`), a terminal that is no component in a run, and has the port (Part II, 6.9.1, rule 5; else `system-port`, which `port` left out with a `terminalId` is too). A port of another kind of system or category is joined, with a warning (`system-mixed`, rule 8). With `place`, the end moves to the port's place (Part II, 6.9.1, rule 3): its profile's first or last point to the place in plan, and its height in `mep.z` to the place's height less its level's elevation; a port with no place is refused (`system-port`). With `terminalId` null, the end's join is taken away, and `mep.joins` with it where the other end has none; it names no port, and a `port`, or `place` true, beside it does not match the kind's schema and is refused (`command-schema`; section 1, rule 2), not taken silently: no end is moved, and a caller that meant to move one learns so. It is run as an `update` of the run, its `mep` whole and, with `place`, its `profile`.

Reference: none in the reference implementation, which writes `mep.joins` when a run is drawn to a terminal's connection, and a run's system and number by its own commands. In `@openeik/tools`: `SYSTEMS_KINDS` and the handlers of `system.assign` and `run.join` in `packages/openeik/src/commands.js`, with `fittedRuns` and `portsOf` in `packages/openeik/src/systems.js`.

## 3. Preconditions

A precondition names the state a command was based on; a mismatch is refused, so two writers cannot overwrite each other unseen.

1. When a command gives `expectedRevision`, the target's current revision MUST equal it, or the command MUST be refused (the reference message: "Revision conflict: expected 3, current 4. Read and retry.").
2. Upserts. For `grid.upsert`, `scopeBox.upsert`, `reference.upsert`, `detailFamily.upsert` and `dimensionStyle.upsert` the precondition is strict: when the record exists, `expectedRevision` MUST be given and MUST equal its revision; when it does not, `expectedRevision` MUST be absent. For the other upserts a given `expectedRevision` MUST equal the record's revision; `material.upsert`, `report.upsert`, `deviation.upsert` and `areaAdjustment.upsert` refuse one for a new record, and `type.upsert`, `view.upsert`, `sheet.upsert` and `render.upsert` count a new record as revision 0.
3. Other preconditions compare the named state: `expectedLevel` the whole level (every member of it, those the processor does not know and extension members included: Part I, 10 and 11.2, rule 5), `expectedName` the project's name, `expectedSite` the site (or `null` for none), `expectedHostRevision` the host's revision. A state is compared as a JSON value: the order of its members and the way a number is written do not count (Part III, 6), and a member that one side has and the other lacks is a difference.
4. Where a precondition is optional and left out, the command is applied to whatever is there. Writers SHOULD always give one.

Reference: the revision checks in `run`.

*Note (informative).* In the reference vocabulary, preconditions are required on 51 kinds, optional on 26 and absent on 14 (`image.upsert`, `image.delete`, `project.excavation`, `project.precast`, `project.standards`, `rebar.quick`, `mesh.lay`, `mep.downpipe`, `trusses.plan`, `render.delete`, `original.make`, `copy.place`, `original.frame`, `original.edit`). A precondition on every command is 0.2's (decided 11 October 2026): rule 4 becomes a requirement in an envelope, and the kinds that had none get one. [Part XVII](https://openeik.org/spec/0.7/envelope), of 0.2, says how: in an envelope every command gives its kind's precondition, an upsert `null` for a record that does not exist yet ([9.1](https://openeik.org/spec/0.7/envelope#9.1)), and each of the fourteen kinds gets one ([9.2](https://openeik.org/spec/0.7/envelope#9.2)).

## 4. Patches

An `update` carries `patch`: the element members to write.

1. Each member of the patch replaces the element's member of that name, whole: nested objects are not merged.
2. `null` removes a member the element may lack (`top`, `joins`, `taper`, `hostId` …). The members every element has (`name`, `typeId`, `levelId`, `offset`, `height`, `width`, `profile`) can only be replaced, and `id`, `category` and `revision` cannot be patched.
3. A patch MUST NOT say `undefined` (or leave out a member it means to remove): JSON drops an undefined member, so a logged command would not remove it. A processor MUST refuse a patch that holds an undefined value for a member the record has, and tell the caller to send `null`.
4. A patch that changes `typeId` MUST name a type of the element's category.
5. A patch that sets a `width` or `height` the element's type sets (Part II, 5.3) MUST be refused.
6. A patch MUST NOT write the legacy members `topRoofId`, `topCeilingId` and `roofCutId`.
7. After the patch, the element's revision is the old one plus one.

`view.update` patches a view the same way, except that `display` is merged into the view's own. `detail.update` merges its patch into one detail item, `null` removing a member, and the item is checked whole again.

Reference: `elementPatchSchema` and `patchedElement` in `src/core/model/model.ts`; `refuseLostClears` and the `update` branch of `run` in `src/core/model/store.ts`; `refuseTypeSetSizes` in `src/core/model/typeSets.ts`.

## 5. Deletes and what depends on them

1. Deleting an element MUST also delete the elements that depend on it: those hosted by it (`hostId`) and the framing members or trusses materialised from it (`frameHost`). The answer names them (`removedDependents`).
2. A shaft hosted by a deleted stair survives as a plain shaft: its `hostId` goes and its revision goes up by one.
3. 2D items of views that name the deleted element are removed with it, and views stop hiding it.
4. `type.delete` MUST be refused while a record names the type, an element or a view's assembly (a folder holds every type its records name, Part III, 12); `view.delete` while a sheet, a dependent view, a callout, a view reference or a report uses the view; `level.delete` while anything stands on the level or reaches up to it, unless `moveTo` names the level they move to.

Reference: `dependsOn` and the `delete` branch of `run`; `viewDeleteRefusal` in `src/core/views/viewUsers.ts`; `deleteLevel` in `src/core/model/levels.ts`.

## 6. Validation and refusal

A command is checked in three stages, and refused at the first that fails:

1. **Shape**: the command matches its kind's schema (section 1).
2. **The command's own rules**: its target exists, its preconditions hold, its references name records of the right kind, and the rules of its kind (a wall attaches only to a host that covers it; an opening fits its wall).
3. **The whole model**: the model after the command MUST pass every rule of Parts I and II. A command that would leave the model invalid MUST be refused, even when the command itself is well formed.

A refusal MUST say, in the terms of the domain, what is wrong and SHOULD say how to fix it. In a batch, it MUST name the command by its index, kind and id.

From the reference processor, on `examples/one-storey-house`, after the south wall was attached (revision 1):

```json
{
  "ok": false,
  "dryRun": true,
  "failed": 3,
  "results": [
    {"index": 0, "ok": false, "kind": "update", "commandId": "wall-south",
     "error": "Command 0 (update wall-south): Revision conflict: expected 0, current 1. Read and retry."},
    {"index": 1, "ok": false, "kind": "update", "commandId": "wall-north",
     "error": "Command 1 (update wall-north): A wall or beam requires two distinct endpoints."},
    {"index": 2, "ok": false, "kind": "update", "commandId": "window-south",
     "error": "Command 2 (update window-south): Opening must fit within its host wall: it reaches 10500 mm along a wall 10000 mm long."},
    {"index": 3, "ok": true, "kind": "update"}
  ]
}
```

Reference: `validateWhole` and `validateManifest`; `batchError` and `dryRunReport` in `src/core/model/store.ts`.

*Note (informative).* The reference refusals are text. Machine-readable error codes are 0.2's (decided 11 October 2026); the plan proposed codes such as `EIK-WALL-012`, JSON pointers to the member that is wrong, and a separate `fix`. [Part XVII, 10](https://openeik.org/spec/0.7/envelope#10), of 0.2, gives them: the validator's codes rather than numbered ones, so that a rule has one code whether a command is refused for it or a folder reported, each refusal with its rule, a JSON pointer into the command, a message and a fix where one is known, and a catalogue of the codes.

## 7. Batches, atomicity and dry runs

1. A batch is an ordered list of commands applied as one: each command sees the model as the commands before it left it, and the whole model is checked once after the last. If any command or the final check fails, the batch MUST change nothing.
2. One command is a batch of one.
3. A dry run (`dryRun: true`) MUST run every check a real run does and MUST change nothing. A dry run of a batch that fails SHOULD answer for every command: each is tried in order on a copy, a failing one is reported and left out, and the rest go on, so that the caller learns everything it has to fix at once.
4. A batch that changes the model is one undo step.
5. A generic element is moved to a category that fits by a batch of a `delete` and a `create` with the same id (Part II, 6.6, rule 7); no command kind does it alone.

Reference: `dispatchBatch` (a preview store, all or nothing) and `dryRunReport` in `src/core/model/store.ts`; `execute_batch` in `src/automation.ts`.

## 8. Determinism and replay

1. Applying a command MUST be a function of the model and the command alone.
2. A command MUST be applied as its JSON text would be stored: what JSON cannot hold (undefined members, `NaN`, infinities, dates) is resolved before the command runs, so the processor that sends a command and one that replays it later get the same model.
3. A command MUST NOT mint a random id or read the clock. An id a command makes is named by the caller or derived from its input: the reference derives `<host>:bars`, then `<host>:bars-2`, `-3` and so on.
4. A processor that replays commands it has already accepted (opening a project from a log) MUST NOT refuse them by a rule made after they were accepted. Admission rules apply to new commands; application is deterministic.

Reference: `asLogged` and `madeId` in `src/core/model/store.ts`; `replay` (the `replaying` flag lifts the newer refusals, such as type-set sizes and edits of placed copies, for accepted commands).

## 9. The answer

A command processor answers an accepted command or batch with at least:

| Member | Meaning |
|---|---|
| `ok` | `true` |
| `dryRun` | whether anything was committed |
| `affected` | the ids of every record the command or batch changed, including those changed as a consequence (joined walls, dependents) |
| `verify` | how to check the result: a filter that selects exactly the affected elements (Part VII), and the views and snapshots to look at |
| `sequence` | the host's change sequence after the command |
| `warnings` | what the caller should know but that did not refuse the command (optional) |

and, per command, its `result`: the record written, or for a delete `{deleted, removedDependents?}`.

From the reference processor, renaming the west wall:

```json
{
  "ok": true,
  "dryRun": false,
  "sequence": 1,
  "affected": ["wall-west"],
  "verify": {
    "filter": {"elementIds": ["wall-west"]},
    "snapshot3d": {"filter": {"elementIds": ["wall-west"]}, "corners": ["SW", "NE"], "hideOthers": false},
    "snapshot2d": [{"viewId": "view-plan-0", "filter": {"elementIds": ["wall-west"]}}]
  }
}
```

Reference: the `execute` and `execute_batch` actions and `verifyHints` in `src/automation.ts`.

### 9.1 The weight line

*Part of 0.5, with [Part III, 15.8](https://openeik.org/spec/0.7/code-base#15.8). OpenEik 0.4 had it as part of the proposal `weight` (open questions, 138): a processor of a model of 0.4 gives it only where a caller asks for the proposal (decision D12).*

A command processor MAY add to an accepted batch's answer its running weight line, the member `weight`, held to [`schemas/0.5/weight/answer.schema.json`](https://openeik.org/schemas/0.5/weight/answer.schema.json), which the answer's schema of 0.5 names as its `weight`:

| Member | | Meaning |
|---|---|---|
| `written` | always | the records the batch wrote, by kind: a list's name (`elements`, `types`, `views`, `sheets`, …), and `details` for a view's detail items |
| `removed` | where it removed any | the records the batch removed, by kind |
| `session` | where the caller keeps a session | the records the session wrote so far, this batch's with them, by kind |
| `heavy` | always | the heavy forms the checks of Part III, 15.7 find in what the batch wrote, judged by itself, each `{code, ids, count, compact, saves}` with its message, its counts and, for a view's items, the view; never `weight-copies` (Part III, 15.8, rule 3.4) |
| `advice` | where it gave any | the advisories of Part III, 15.8, each `{code, rule, command, target, message, compact?, saves, guide}`: the data of the warnings it gave in `warnings` |
| `repeats` | where any came again | `{code, target, count}`: an advisory not given again in the session, and how many times it came |

1. The weight line is advice, as the advisories are: it refuses nothing, and an answer without it is as complete.
2. What the batch wrote is judged by itself: the heavy forms of the whole model are a validator's (Part III, 15.7).
3. A dry run's answer MAY carry it; a session takes only a batch applied.

From `@openeik/tools`, a wall written whole again by an `update` to change its height, in a model of 0.5 (the message shortened):

```json
"warnings": ["Command 0 (update wall-a): the patch sends 7 members of the record, 6 of them as they were, to change 1 (height): … [weight-full-replace, III.15.8.2]"],
"weight": {
  "advice": [{"code": "weight-full-replace", "command": 0, "compact": {"expectedRevision": 0, "id": "wall-a", "kind": "update", "patch": {"height": 2800}}, "guide": "guides/weight.md#commands", "message": "the patch sends 7 members of the record, …", "rule": "III.15.8.2", "saves": {"bytes": 111, "members": 6}, "target": "elements/wall-a"}],
  "heavy": [],
  "written": {"elements": 1}
}
```

## 10. The log (informative)

The reference implementation keeps a cloud project as a snapshot plus an append-only log of accepted batches, each stored as JSON and sequenced with a compare-and-swap; opening a project replays the log (section 8). 0.1 does not specify the log's format. A common command envelope is 0.2's (decided 11 October 2026). The plan proposed it around each batch: an operation id for idempotency, attribution per person and per agent, a target branch and base, a mode (`apply`, `dryRun`, `propose`) and an intent text. [Part XVII](https://openeik.org/spec/0.7/envelope), of 0.2, gives it in full, with what a processor that keeps a log records of each operation.

## 11. A supplier's parts

This section says what a supplier's parts (Part II, 12) ask of commands.

1. **No new command kind.** A supplier writes a type with declared geometry, or with the railing members of Part II, 12.2, by `type.upsert`; places or changes elements by `create` and `update`, where a patch of `declaredGeometry` or of `railing` replaces it whole (section 4); and materialises a railing's post positions by an `update` that writes `railing.posts.at`.
2. **Transforms carry declared geometry.** `move`, `rotate`, `mirror`, `array`, `radialArray` and the other transforms MUST move, turn, mirror or copy an element's declared geometry with the element (Part II, 12.1, rule 6).
3. **A proposal's quote is not a command.** It travels with the proposal on the host, and no command writes it into the model, nor into a proposal file (Part VI, 8.7).

Reference: `mappedDeclaration` in `src/core/model/declaredGeometry.ts`, called by the transforms in `src/core/geometry/transforms.ts` and `src/core/geometry/modifications.ts`.

*Note (informative).* The reference processor accepts and checks declared geometry and the railing members since Stomra pull requests #786 and #787 (live since 12 October 2026, `main` `1e1089db`).
