> ## Documentation Index
> Fetch the complete documentation index at: https://eddy-ac74d702.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# A structured brief to the engine's commands that draw it: the shell, our generic families, terminals, sources, boards and their entered values, with the next requests (`ss.mep.layout/1`, MEP33); with `existing`, the services alone into the document's own building (MEP33b)

> Start an agent's design here, on a new project (`bim_project_create`) with `shell`: the layout reads the document's levels and refuses one that already has walls (`LAYOUT_DOCUMENT_NOT_EMPTY`). Or (MEP33b) into an architect's model already in the project (an imported `.ifc` or `.rvt`) with `existing` in place of `shell`: nothing is drawn but the services, placed into the rooms `bim_mep_rooms` reads (call it first for the storeys and room names to place by); a room it could not read is refused by name (`LAYOUT_ROOM_NOT_READ`), and the answer's `rooms` lists every room not read and every room placed in a rectangle smaller than itself; `placements` gives every component's room. `brief` is `ss.mep.brief/1`, its fields in this request's schema: the shell and its rooms; per discipline what to place and the values the brief gives (air: plants, rooms' diffusers and loads, tee losses, and the return and exhaust where asked; water: meter, heater, fixtures, flows, pressures, pipe sizes, elbow loss, drainage by others or asked; electrical: boards and their supply or feeder, lights, outlets, circuit data); the person's checks. Every number the design rests on comes from the brief; the families' geometry, the placement on a grid in each room and the cable lengths' 20 % allowance are ours, named in `defaults`. The answer: `commands` (each `{command, params, as?}`; run them all with `bim_run_batch` on the project, each an undoable step), `handles` (the names `as` gives, used as `"$name"`), `placed`, `circuits`, `next` (the requests to send after, in order: `bim_route` per tree (each supply, then each return, exhaust and discharge asked for) then `bim_run_batch` on its `commands`, `bim_water` with `propose_sizes` then `bim_run_batch` on `sizing.commands`, then `bim_mep_verdict`; pass `next` as the batch's `fill` to get its names as ids, and set each body's `key` to the project's head when you send it), `could_not` (what this design leaves undone, by code: tell the person), `defaults`, `notes`. Nothing is stored. Refused by name: `LAYOUT_BRIEF`, `LAYOUT_DOCUMENT_NOT_EMPTY`, `LAYOUT_LEVELS`, `LAYOUT_PLENUM_TOO_SHALLOW`, `LAYOUT_ROOM`, `LAYOUT_ROOM_UNKNOWN`, `LAYOUT_ROOM_NOT_READ`, `LAYOUT_NO_ROOMS`, `LAYOUT_ROOMS_OVERLAP`, `LAYOUT_SHAFT`, `LAYOUT_AIR`, `LAYOUT_WATER`, `LAYOUT_ELECTRICAL`, `LAYOUT_VALUE_MISSING`, `LAYOUT_NO_SPACE`, `LAYOUT_TOO_LARGE` (each 400). `questions` (R2 of the rules plan): what the layout asks, typed (`ss.question/1`), beside `air_zoning`, which stays one release. A source's `distribution` the brief leaves out is the layout's starting value, named in `defaults`.



## OpenAPI

````yaml openapi.json POST /v1/bim.mep.layout
openapi: 3.1.0
info:
  description: >-
    Deterministic, content-addressed geometry + structural-FEA engine. Every
    result carries provenance (model hash, pinned solver build, params, runtime
    profile) and is reproducible byte-for-byte from its report. Identical inputs
    return the same result_key with the second call served from cache.


    Authentication: when the deployment sets SS_REQUIRE_AUTH=1, pass an API key
    in the `x-api-key` header (create keys via the admin endpoints or the
    /console app). Admin endpoints require `x-admin-token` when SS_ADMIN_TOKEN
    is set.


    Rate limits: a key may carry a request-rate limit (`limits` on its record:
    requests a minute and a burst, set by an admin at mint or through `POST
    /admin/keys/{key_hash}/limits`), and a deployment may set one for every key
    without its own (SS_KEY_RATE_DEFAULT; unset = unlimited). Past it, any `/v1`
    or `/admin` call by that key is 429 `RATE_LIMITED` with `retry-after`
    (seconds) and `x-ratelimit-limit` / `x-ratelimit-remaining` /
    `x-ratelimit-reset`; an allowed call by a limited key carries the
    `x-ratelimit-*` headers too. The limit holds per gateway replica. Other 429s
    (RESOURCE_LIMIT, SESSION_LIMIT, size caps) are not transient and carry no
    `retry-after`; the SDKs retry a 429 only when it does.


    Errors are always typed: `{"error": {"code": "INVALID_GEOMETRY" |
    "MESH_FAILED" | "SOLVE_DIVERGED" | "RESOURCE_LIMIT" | "UNKNOWN_SOLVER" |
    "UNAUTHORIZED" | "NOT_FOUND" | ..., "message": "..."}}`.
  title: Eddy API
  version: 0.1.0
servers:
  - description: the hosted engine (Sydney)
    url: https://api.eddy.engineer
  - description: a local engine (cargo run -p ss-api)
    url: http://127.0.0.1:8080
security: []
tags:
  - description: 'Eddy IAM: API keys and usage metering'
    name: admin
  - description: Health and documentation
    name: meta
  - description: >-
      Eddy PLM (L track): Teamcenter-class PLM - item masters and revisions,
      EBOMs, ECR/ECO change control with hash-chained signoffs, effectivity +
      configurations, the vault, AP242 structure interchange, the digital-thread
      certificate
    name: plm
  - description: >-
      Eddy Parts, the 3D CAD application on the native kernel: recipes, edits,
      sketches, features, sections, drawings, export.
    name: cad
  - description: 'Eddy Assemblies: assemblies and mates.'
    name: asm
  - description: 'The engine: geometry -> mesh -> FEA -> result'
    name: solve
  - description: >-
      Eddy BIM, on the BIMCraft engine (BC track): projects as content-addressed
      documents with their history, every edit a command run server-side, views,
      schedules and sheets drawn by the engine, IFC and DXF in and out, .rvt in
      behind the rvt feature, measures for the verification matrix.
    name: bim
  - description: 'Eddy Verify and Eddy B3: reports, verification, runs, blobs'
    name: provenance
  - description: >-
      Eddy Bridge (IG20): fixed kinds of job run on the customer's own vendor
      seat under the customer's licence, results back as labelled external
      results
    name: bridge
  - description: CAM.
    name: cam
  - description: Eddy Flow, the CFD application (/cfd).
    name: cfd
  - description: Circuit simulation (MNA).
    name: circuit
  - description: >-
      Eddy Surrogates: corpora, datasets, sweeps and training runs over solver
      traces.
    name: training
  - description: >-
      Eddy ProcessSim (/multisim, A track): multi-method simulation - discrete
      events, agents and stocks-and-flows on one calendar - the AnyLogic-class
      engine.
    name: multisim
  - description: >-
      Eddy Requirements (Q track): DOORS-class requirements platform - modules,
      typed traceability links, baselines, the live verification matrix, the
      authoring recorder, ReqIF interchange
    name: req
  - description: 'Eddy Redline: markup and review.'
    name: review
  - description: 'Eddy Datasets: the data plane.'
    name: data
  - description: >-
      The generative design loop's perception (J12): the design packet — every
      picture an agent needs to see a recipe or assembly, content-addressed.
    name: design
  - description: >-
      Eddy Manufacturability (MF track): a part, an assembly or an imported STEP
      body checked against a process and the shop that will make it — findings
      on the faces and parts they are about, every limit cited with its
      confidence, the rule catalogue and the seeded shop profiles.
    name: dfm
  - description: >-
      Eddy Earthing (EG track): soil surveys and layered soil fitting, the IEEE
      80 hand method, our own boundary-element solver in uniform and layered
      soil, safety (touch and step) against cited criteria, the fault current
      split, risk-based criteria, transferred potentials and hazard zones, large
      farm grids, field test plans and calibration, grid generation, reports and
      sheets - refereed by SimPEG, pyGIMLi, groundinsight and FEA; paid values
      only from adopted value tables
    name: earthing
  - description: 'Eddy Circuits: schematics, boards, the E-track projects.'
    name: eda
  - description: Eddy Fields, the electromagnetics application (/em).
    name: em
  - description: 'Eddy QuickFlow: instant previews.'
    name: preview
  - description: 'Eddy Structures, the FEA application (/fea): studies, meshing, results.'
    name: fea
  - description: >-
      Eddy Kernel, the native B-rep kernel's services: healing, clearance,
      signed distance, STEP import. The kernel's booleans, sketches, features
      and meshers are reached through the cad tag; its ledger is the K track
      (/docs/tracks/k-track), its page /docs/solvers/ss-geometry.
    name: geometry
  - description: >-
      Eddy Generation Plants (GP track): solar, wind and battery plants on
      terrain - the site's buildable area, weather documents (ERA5, NASA POWER,
      EPW, customer files, our TMY), PV yield with rows, trackers and bifacial,
      row packing with piles and blocks edited by commands, wind yield and
      wakes, noise, shadow flicker, visual impact, micro-siting, BESS sizing,
      duty and layout, the MV collector as a power network, access roads and
      civil quantities, P50 / P90 and the yield report - refereed against pvlib,
      PySAM, solarfactors, PyWake, FLORIS and windpowerlib; paid values only
      from adopted value tables; design and screening, never bankable
    name: gp
  - description: >-
      Eddy Product Graph, on ParamDB (PX track): materials and suppliers as
      documents; one dependency graph per product across every document kind —
      BOM lines and items, materials, supplier offers, studies in any solver
      domain, requirement checks — with impact before work, propagation that
      evaluates exactly the frontier, and the derivative layer (rank, tolerance)
      composed over the graph.
    name: graph
  - description: >-
      Eddy Optics (/optics, OP track): lens files, the glass catalogs, the
      vocabulary.
    name: optics
  - description: >-
      The physical-AI interchange (IX track): UsdPhysics / MJCF / URDF in, the
      USD sublayer and MJCF out, calibration of the training engines' parameters
      from the truth, the audit of their rollouts, the foreign-audit corpus
      family.
    name: interop
  - description: >-
      Eddy Knowledge: the curated engineering reference library — standards
      notes, design guides, material data and house rules that staff maintain —
      searched lexically by models and people; live bases only.
    name: knowledge
  - description: >-
      Eddy Math (X track): the MATLAB-style numeric workbench - a stated
      MATLAB-language subset evaluated as a pure function over content-addressed
      workspaces, Octave-refereed
    name: lab
  - description: >-
      Eddy AI Gateway: the Anthropic Messages shape forwarded to the
      deployment's TrueFoundry gateway (Claude on Google Cloud), the caller
      tagged, the model allowlisted per role, the tokens metered.
    name: llm
  - description: >-
      Collaboration (CO16–CO18): the project event stream, presence (who is here
      and which view — nothing finer), comment threads with anchors and
      mentions, and notifications.
    name: collab
  - description: >-
      Eddy IAM - organisations and teams (CO3): the tenancy unit projects, live
      sessions, comments, notifications and activity are scoped by. Invites by
      email bind on first sign-in.
    name: orgs
  - description: >-
      Eddy Motion (MO track): the study document on an assembly's mates, the
      multibody solve, result series, traces, interference over time, loads for
      an FEA study, mate references by stable face name.
    name: motion
  - description: >-
      Eddy ParamDB, the parametric database: the store's management surface
      (status, refs, log, objects, GC, flush, init) behind the console's ParamDB
      service.
    name: pdb
  - description: >-
      Eddy Power Systems (PW track): the network document and device libraries,
      load flow, short circuit, protection and time-current curves,
      coordination, arc flash, sizing, motor starting and harmonics - our own
      solvers, refereed by pandapower and OpenDSS; paid values only from adopted
      value tables
    name: power
  - description: Saved app documents (the console's project library)
    name: projects
  - description: >-
      Eddy Live - live co-editing (CO13): one chain per project on ParamDB,
      every edit a micro-commit with a CAS; the loser of a race gets a typed
      conflict and catches up. Zero per-app code: any registered family's
      vocabulary, or JSON Patch.
    name: live
  - description: >-
      Variants (CO13b): explore your own design or simulation options on a
      private branch forked at zero copy, share it, compare it as a node diff
      with results, and merge it back as one whole state (a two-parent commit)
      when you want.
    name: variants
  - description: Result post-processing.
    name: results
  - description: >-
      Eddy Maps, the spatial engine (/spatial, SP track): frames, terrain,
      volumes and paths — and the S-track spatial aggregates over result fields.
    name: spatial
  - description: >-
      Eddy Build Guides (AQ track, /instructions): the assembly sequence
      document (explode steps, the build as its reverse), the planner with its
      path / stability / tool-access checks and the fast check of a given order,
      the animation with its auto camera, the render (AV1 / GIF / APNG / glTF /
      USD) and the step sheets, public share links, service procedures, DFA
      scoring and the precedence graph.
    name: sequence
  - description: 'Eddy Sim2Real: rigid-body simulation and rollouts.'
    name: sim
  - description: 'Eddy 1D: system simulation, Modelica-style networks and signal flow.'
    name: system
paths:
  /v1/bim.mep.layout:
    post:
      tags:
        - bim
      summary: >-
        A structured brief to the engine's commands that draw it: the shell, our
        generic families, terminals, sources, boards and their entered values,
        with the next requests (`ss.mep.layout/1`, MEP33); with `existing`, the
        services alone into the document's own building (MEP33b)
      description: >-
        Start an agent's design here, on a new project (`bim_project_create`)
        with `shell`: the layout reads the document's levels and refuses one
        that already has walls (`LAYOUT_DOCUMENT_NOT_EMPTY`). Or (MEP33b) into
        an architect's model already in the project (an imported `.ifc` or
        `.rvt`) with `existing` in place of `shell`: nothing is drawn but the
        services, placed into the rooms `bim_mep_rooms` reads (call it first for
        the storeys and room names to place by); a room it could not read is
        refused by name (`LAYOUT_ROOM_NOT_READ`), and the answer's `rooms` lists
        every room not read and every room placed in a rectangle smaller than
        itself; `placements` gives every component's room. `brief` is
        `ss.mep.brief/1`, its fields in this request's schema: the shell and its
        rooms; per discipline what to place and the values the brief gives (air:
        plants, rooms' diffusers and loads, tee losses, and the return and
        exhaust where asked; water: meter, heater, fixtures, flows, pressures,
        pipe sizes, elbow loss, drainage by others or asked; electrical: boards
        and their supply or feeder, lights, outlets, circuit data); the person's
        checks. Every number the design rests on comes from the brief; the
        families' geometry, the placement on a grid in each room and the cable
        lengths' 20 % allowance are ours, named in `defaults`. The answer:
        `commands` (each `{command, params, as?}`; run them all with
        `bim_run_batch` on the project, each an undoable step), `handles` (the
        names `as` gives, used as `"$name"`), `placed`, `circuits`, `next` (the
        requests to send after, in order: `bim_route` per tree (each supply,
        then each return, exhaust and discharge asked for) then `bim_run_batch`
        on its `commands`, `bim_water` with `propose_sizes` then `bim_run_batch`
        on `sizing.commands`, then `bim_mep_verdict`; pass `next` as the batch's
        `fill` to get its names as ids, and set each body's `key` to the
        project's head when you send it), `could_not` (what this design leaves
        undone, by code: tell the person), `defaults`, `notes`. Nothing is
        stored. Refused by name: `LAYOUT_BRIEF`, `LAYOUT_DOCUMENT_NOT_EMPTY`,
        `LAYOUT_LEVELS`, `LAYOUT_PLENUM_TOO_SHALLOW`, `LAYOUT_ROOM`,
        `LAYOUT_ROOM_UNKNOWN`, `LAYOUT_ROOM_NOT_READ`, `LAYOUT_NO_ROOMS`,
        `LAYOUT_ROOMS_OVERLAP`, `LAYOUT_SHAFT`, `LAYOUT_AIR`, `LAYOUT_WATER`,
        `LAYOUT_ELECTRICAL`, `LAYOUT_VALUE_MISSING`, `LAYOUT_NO_SPACE`,
        `LAYOUT_TOO_LARGE` (each 400). `questions` (R2 of the rules plan): what
        the layout asks, typed (`ss.question/1`), beside `air_zoning`, which
        stays one release. A source's `distribution` the brief leaves out is the
        layout's starting value, named in `defaults`.
      operationId: bimMepLayout
      requestBody:
        content:
          application/json:
            schema:
              properties:
                brief:
                  description: >-
                    ss.mep.brief/1. Unknown fields are refused. Plan coordinates
                    are mm from the plate's south-west corner, x east, y north.
                  properties:
                    air:
                      properties:
                        elbow_loss:
                          description: >-
                            a loss coefficient for the duct elbows our CFD
                            computed none for (a flat or tight one), as the
                            brief gives it; the chat proposes 0.3, a starting
                            value of ours
                          type: number
                        exhaust:
                          description: >-
                            MEP33: exhaust air. Exhaust grilles on the ceiling
                            of each exhausted room; an in-line exhaust fan
                            (`fan` category, written to IFC as IfcFan) on each
                            storey with exhaust, its discharge to a louvre in an
                            outside wall; a route from the grilles to the fan
                            (`extract.role: exhaust`) and one from the fan to
                            its louvre (`discharge`), the systems named `Exhaust
                            air EF-<storey>` and `Exhaust discharge
                            EF-<storey>`. The exhaust's airflows are the
                            brief's, else our starting values (per WC placed,
                            else per m²), named in `defaults` and said
                            (`EXHAUST_RATES_STARTING`): never a standard's rates
                          properties:
                            fans:
                              description: >-
                                where a storey's exhaust fan hangs (above a
                                room) and its louvre's wall; absent, above the
                                storey's first exhausted room with the ceiling
                                free for it, the louvre in the outside wall
                                nearest the fan
                              items:
                                properties:
                                  room:
                                    type: string
                                  storey:
                                    type: integer
                                  wall:
                                    description: the outside wall its louvre is in
                                    enum:
                                      - north
                                      - south
                                      - east
                                      - west
                                    type: string
                                required:
                                  - storey
                                  - room
                                type: object
                              type: array
                            l_s_per_m2:
                              description: >-
                                a room's exhaust per m² of its floor, where it
                                gives no airflow and has no WC (our starting
                                value 5 L/s, not AS 1668.2's)
                              type: number
                            l_s_per_wc:
                              description: >-
                                a room's exhaust for each WC the brief's water
                                places in it, where the room gives no airflow
                                (our starting value 20 L/s, not AS 1668.2's)
                              type: number
                            rooms:
                              description: >-
                                the rooms exhausted; absent or empty, every room
                                whose name reads as a toilet or a kitchen
                              items:
                                properties:
                                  airflow_l_s:
                                    description: >-
                                      the room's exhaust, L/s, as the brief or
                                      the ventilation design gives it
                                    type: number
                                  grilles:
                                    description: >-
                                      exhaust grilles in the room (our starting
                                      value one per 20 m², at least one)
                                    type: integer
                                  room:
                                    type: string
                                  storeys:
                                    description: >-
                                      storeys it is on (1 is the ground floor);
                                      all when absent
                                    items:
                                      type: integer
                                    type: array
                                required:
                                  - room
                                type: object
                              type: array
                          type: object
                        limits:
                          description: >-
                            The oversized-mains method's limits, each the
                            brief's or our starting value (named in `defaults`),
                            never a standard's
                          properties:
                            friction_rate_pa_per_m:
                              description: MEP22's friction rate (its default 1.0)
                              type: number
                            max_aspect:
                              description: >-
                                a rectangular section's width over its depth at
                                most (our starting value 4)
                              type: number
                            max_main_flow_l_s:
                              description: >-
                                the most one main may carry, L/s (our starting
                                value 4000)
                              type: number
                            max_velocity_m_s:
                              description: MEP22's velocity limit (its default 10)
                              type: number
                            max_width_mm:
                              description: >-
                                a rectangular section's width at most (our
                                starting value 2000)
                              type: number
                          type: object
                        per_area:
                          description: >-
                            MEP33b: every other room of the storeys a plant
                            serves, by its area (a room in `rooms` is placed as
                            given there)
                          properties:
                            except:
                              description: >-
                                rooms that get no diffuser (a plant room, a
                                store)
                              items:
                                type: string
                              type: array
                            m2_per_diffuser:
                              description: one diffuser for every this many m², rounded up
                              type: number
                            w_per_m2:
                              description: >-
                                peak sensible cooling, W per m² of room, as the
                                brief gives it
                              type: number
                          required:
                            - w_per_m2
                            - m2_per_diffuser
                          type: object
                        plants:
                          items:
                            properties:
                              name:
                                type: string
                              room:
                                type: string
                              serves:
                                description: >-
                                  storeys it is on (1 is the ground floor); all
                                  when absent
                                items:
                                  type: integer
                                type: array
                              storey:
                                type: integer
                            required:
                              - name
                              - storey
                              - room
                            type: object
                          type: array
                        return:
                          description: >-
                            MEP33: return air. Return grilles on the ceiling of
                            every room with diffusers (none in a room
                            exhausted), each air handler with a return inlet on
                            its next side, and a route from them to it
                            (`extract.role: return`). Each air handler returns
                            its supply less its rooms' exhaust, the make-up air
                            for exhausted rooms it does not supply and the
                            pressurisation, shared among its return rooms by
                            their supply; the verdict's return design carries
                            that balance. Every value not given is our starting
                            value, named in `defaults`
                          properties:
                            m2_per_grille:
                              description: >-
                                one return grille per this many m² of a room's
                                floor, rounded up, at least one (our starting
                                value 50)
                              type: number
                            pressurisation_fraction:
                              description: >-
                                the share of each air handler's supply left to
                                pressurise its rooms, not returned, 0 to 0.5
                                (our starting value 0.05)
                              type: number
                          type: object
                        rooms:
                          items:
                            properties:
                              diffusers:
                                type: integer
                              load_w:
                                description: >-
                                  the room's peak sensible cooling, W, as the
                                  brief gives it
                                type: number
                              room:
                                type: string
                              storeys:
                                description: >-
                                  storeys it is on (1 is the ground floor); all
                                  when absent
                                items:
                                  type: integer
                                type: array
                            required:
                              - room
                              - diffusers
                              - load_w
                            type: object
                          type: array
                        split:
                          description: >-
                            Where one main from an air handler won't do: `ahu`
                            (an air handler for each further zone, each with its
                            own main), `mains` (a main to each zone from the
                            plant's own outlets, only where its room carries
                            them all) `larger` (one main, the limits raised as
                            far as it needs) or `keep` (the one main as drawn,
                            within the limits: where no section fits, the route
                            names it in `no_fit`), for every plant or by plant
                            name ({"AHU-2": "ahu"}). One word for every plant
                            applies only where one main won't do; a choice named
                            for a plant applies to it even where the layout's
                            estimate thought one main would (the route found
                            otherwise). Absent for a plant that needs it, the
                            layout asks (`air_zoning`).
                          oneOf:
                            - enum:
                                - ahu
                                - mains
                                - larger
                                - keep
                              type: string
                            - additionalProperties:
                                enum:
                                  - ahu
                                  - mains
                                  - larger
                                  - keep
                                type: string
                              type: object
                        tee_loss:
                          properties:
                            branch:
                              type: number
                            through:
                              type: number
                          required:
                            - through
                            - branch
                          type: object
                      required:
                        - plants
                        - tee_loss
                      type: object
                    by:
                      additionalProperties:
                        type: string
                      description: >-
                        R2 of the rules plan: who wrote each brief value, by its
                        JSON pointer (`/air/split/AHU-1`): `human:<name>` (typed
                        or clicked by the person; `human` alone is the caller,
                        bound by the gateway, and a name not the caller's is
                        refused, ACTOR_MISMATCH), `agent:<…>`, `chat` (proposed
                        by the chat, approved with the plan),
                        `practice:<id>@<rev>` or `ours`. Carried, never read by
                        the layout.
                      type: object
                    checks:
                      description: The person's checks
                      properties:
                        clearance_mm:
                          description: >-
                            A clearance from every routed system to the
                            structure, mm
                          type: number
                        packs:
                          description: >-
                            Pack item ids for MEP7's checker, adopted by a
                            person
                          items:
                            type: string
                          type: array
                        state:
                          type: string
                        values:
                          description: >-
                            Value table ids for the electrical sizing, comma
                            separated
                          type: string
                      type: object
                    electrical:
                      properties:
                        boards:
                          items:
                            properties:
                              feeder:
                                properties:
                                  breaking_ka:
                                    type: number
                                  conductor_mm2:
                                    type: number
                                  derating:
                                    type: number
                                  earth_mm2:
                                    type: number
                                  installation:
                                    type: string
                                  material:
                                    enum:
                                      - copper
                                      - aluminium
                                    type: string
                                  protection_a:
                                    type: number
                                  protection_type:
                                    type: string
                                required:
                                  - protection_a
                                  - protection_type
                                  - breaking_ka
                                  - conductor_mm2
                                  - earth_mm2
                                  - material
                                  - installation
                                  - derating
                                type: object
                              loads:
                                description: false for a main board that only feeds others
                                type: boolean
                              name:
                                type: string
                              room:
                                type: string
                              source:
                                properties:
                                  distribution:
                                    description: >-
                                      The supply's distribution system as the
                                      brief names it. Left out when the brief
                                      names none: the layout's starting value
                                      applies, named in its defaults
                                    type: string
                                  fault_ka:
                                    type: number
                                  loop_impedance_ohm:
                                    type: number
                                required:
                                  - loop_impedance_ohm
                                  - fault_ka
                                type: object
                              storey:
                                type: integer
                              supplied_by:
                                type: string
                              wall:
                                enum:
                                  - north
                                  - south
                                  - east
                                  - west
                                type: string
                            required:
                              - name
                              - storey
                              - room
                              - wall
                            type: object
                          type: array
                        circuit:
                          properties:
                            breaking_ka:
                              type: number
                            conductor_mm2:
                              type: number
                            derating:
                              type: number
                            earth_mm2:
                              type: number
                            installation:
                              type: string
                            material:
                              enum:
                                - copper
                                - aluminium
                              type: string
                            protection_a:
                              type: number
                            protection_type:
                              type: string
                          required:
                            - protection_a
                            - protection_type
                            - breaking_ka
                            - conductor_mm2
                            - earth_mm2
                            - material
                            - installation
                            - derating
                          type: object
                        lights:
                          properties:
                            m2_per_light:
                              type: number
                            per_circuit:
                              type: integer
                            power_factor:
                              type: number
                            va:
                              type: number
                          required:
                            - m2_per_light
                            - va
                            - power_factor
                            - per_circuit
                          type: object
                        outlets:
                          properties:
                            diversity:
                              type: number
                            per_circuit:
                              type: integer
                            power_factor:
                              type: number
                            rooms:
                              items:
                                properties:
                                  count:
                                    type: integer
                                  room:
                                    type: string
                                  storeys:
                                    description: >-
                                      storeys it is on (1 is the ground floor);
                                      all when absent
                                    items:
                                      type: integer
                                    type: array
                                required:
                                  - room
                                  - count
                                type: object
                              type: array
                            va:
                              type: number
                          required:
                            - rooms
                            - va
                            - power_factor
                            - per_circuit
                          type: object
                      required:
                        - boards
                        - circuit
                      type: object
                    existing:
                      description: >-
                        MEP33b: the building is the document's own (an
                        architect's model): its levels (storeys from 1 by
                        elevation), rooms, ceilings and shafts are read from it,
                        as `bim_mep_rooms` gives them; rooms are named as that
                        read names them
                      properties:
                        ceiling_mm:
                          description: >-
                            the ceiling's underside above each level whose model
                            draws no ceiling, mm (entered, never assumed)
                          type: number
                      type: object
                    name:
                      type: string
                    schema:
                      enum:
                        - ss.mep.brief/1
                      type: string
                    shell:
                      description: >-
                        A new building the layout draws on an empty project; or
                        `existing`, never both
                      properties:
                        ceiling_mm:
                          type: number
                        depth_mm:
                          description: north-south
                          type: number
                        rooms:
                          items:
                            properties:
                              name:
                                type: string
                              rect:
                                description: >-
                                  [x0, y0, x1, y1] mm, x east and y north from
                                  the plate's south-west corner; rooms tile the
                                  plate
                                items:
                                  type: number
                                type: array
                              storeys:
                                description: >-
                                  storeys it is on (1 is the ground floor); all
                                  when absent
                                items:
                                  type: integer
                                type: array
                            required:
                              - name
                              - rect
                            type: object
                          type: array
                        shafts:
                          description: '[x0, y0, x1, y1] of each shaft through every slab'
                          items:
                            items:
                              type: number
                            type: array
                          type: array
                        storey_mm:
                          type: number
                        storeys:
                          type: integer
                        width_mm:
                          description: east-west
                          type: number
                      required:
                        - storeys
                        - width_mm
                        - depth_mm
                        - storey_mm
                        - ceiling_mm
                        - rooms
                      type: object
                    water:
                      properties:
                        drainage:
                          enum:
                            - by_others
                            - asked
                          type: string
                        elbow_loss:
                          type: number
                        fixtures:
                          items:
                            properties:
                              basin:
                                type: integer
                              room:
                                type: string
                              sink:
                                type: integer
                              storeys:
                                description: >-
                                  storeys it is on (1 is the ground floor); all
                                  when absent
                                items:
                                  type: integer
                                type: array
                              wc:
                                type: integer
                            required:
                              - room
                            type: object
                          type: array
                        flows:
                          description: L/s
                          properties:
                            basin_cold:
                              type: number
                            basin_hot:
                              type: number
                            sink_cold:
                              type: number
                            sink_hot:
                              type: number
                            wc_cold:
                              type: number
                          type: object
                        heater:
                          properties:
                            room:
                              type: string
                            storey:
                              type: integer
                          required:
                            - storey
                            - room
                          type: object
                        max_velocity_m_s:
                          type: number
                        meter:
                          properties:
                            room:
                              type: string
                            storey:
                              type: integer
                            wall:
                              enum:
                                - north
                                - south
                                - east
                                - west
                              type: string
                          required:
                            - storey
                            - room
                            - wall
                          type: object
                        min_pressure_kpa:
                          type: number
                        pipes:
                          items:
                            properties:
                              bore_mm:
                                type: number
                              outside_mm:
                                type: number
                            required:
                              - outside_mm
                              - bore_mm
                            type: object
                          type: array
                        roughness_mm:
                          type: number
                        supply_pressure_kpa:
                          type: number
                      required:
                        - meter
                        - fixtures
                        - flows
                        - supply_pressure_kpa
                        - min_pressure_kpa
                        - roughness_mm
                        - max_velocity_m_s
                        - pipes
                        - elbow_loss
                        - drainage
                      type: object
                  type: object
                key:
                  description: >-
                    A document key, `b3:<hex>`: the blob store's id for the
                    canonical bytes
                  type: string
              required:
                - key
                - brief
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  air_zoning:
                    description: >-
                      The oversized-mains method (docs/mep/MEP32b.md): each
                      plant whose air one main won't do, estimated from its
                      rooms' ceiling space (the depth about the diffusers' necks
                      the router will read) and the limits, where the brief's
                      `air.split` gives no choice for it (or gives one that
                      can't be done there): {code: AIR_ONE_MAIN_WONT_DO, plant,
                      storeys, why: depth | flow, flow_l_s, depth_mm,
                      max_main_flow_l_s, zones, message, options [{choice: ahu |
                      mains | larger, possible, why_not?, does, limits? {name:
                      {from, to}}}]}. A question for the person, not a refusal:
                      the layout goes on with one main from that plant
                      meanwhile; answer it with `air.split` and lay out again.
                      The choices made are in `placed.air.split`.
                    type: array
                  circuits:
                    type: array
                  commands:
                    type: array
                  could_not:
                    type: array
                  defaults:
                    type: array
                  handles:
                    type: object
                  key:
                    description: >-
                      A document key, `b3:<hex>`: the blob store's id for the
                      canonical bytes
                    type: string
                  name:
                    type: string
                  next:
                    type: array
                  notes:
                    type: array
                  placed:
                    type: object
                  practice:
                    description: >-
                      R4: present when the caller's organisation has a practice
                      pack in force (`practice_adopt`): {item_id, ref
                      (`practice:<id>@<rev>`), used [{pointer, value, param?,
                      code?, source {kind: practice, ref, why},
                      changes_model?}], kept [{pointer, brief, practice}] (the
                      brief's own value stands), skipped [{code, scope?, choice,
                      why}] (an answer for a plant this brief has none of, or a
                      choice that can't be done where asked), sources [{param,
                      value, source {kind: brief | practice | ours, ref?, why}}]
                      (where every air limit came from)}. Practice values are
                      written only where the brief says nothing; a practice
                      answer answers only a question this layout asks (one main
                      won't do), for the plant asked about, and the layout is
                      then run again with it; an answer that changes the
                      person's model is approved with the plan. The `air main
                      limits` line in `defaults` says whose each limit is. A
                      pack in force that no longer reads is named (`unreadable`)
                      and nothing of it applied. Absent with no practice in
                      force.
                    type: object
                  questions:
                    description: >-
                      R2 of the rules plan: what this answer asks, as typed
                      questions (`ss.question/1`): {schema, id (stable over a
                      re-run), code, domain, rung, scope (what one answer
                      covers: a plant, storeys), message, why {class, sentence,
                      measures}, options [{choice, possible, why_not?, does,
                      consequences [{what, limit?, from?, to?, unit?}],
                      changes_model}], answer_at (the brief's JSON pointer the
                      answer is written at), default? (an adopted practice
                      pack's)}. Absent where nothing is asked. Answer by writing
                      the choice into the brief at `answer_at` and running
                      again.
                    items:
                      type: object
                    type: array
                  schema:
                    type: string
                type: object
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: 09b5f888-961d-4054-af51-d317a6fcce25
          description: Typed error
        '404':
          content:
            application/json:
              schema:
                $ref: 09b5f888-961d-4054-af51-d317a6fcce25
          description: Typed error
      security:
        - apiKey: []
        - {}
components:
  securitySchemes:
    apiKey:
      description: Required when the deployment sets SS_REQUIRE_AUTH=1
      in: header
      name: x-api-key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.