# cad.mino.mobi > Parametric CAD in the browser and headless. The model is a feature tree > (JSON); the engine (Rust → wasm) builds it into exact B-rep solids with > named faces; a person's parts live in their own ATProto repo as records, > so anything here can be opened by AT URI, forked with its lineage, and > saved back with a sign-in. Built to be driven by an agent. This site is the whole package: every file an agent needs is a URL here. ## Start here - [docs/](https://cad.mino.mobi/docs/): the system on one page — the spec, the pipeline, the kernels and their rules, the data model, the backend as it exists, the tests, the three ways an agent gets in, and what is not built yet. - [SKILL.md](https://cad.mino.mobi/SKILL.md): the instruction sheet — the loop (write tree → build → measure → check → render → judge), every command, face naming, which kernel does what, files, hand-over. Also a Claude Code skill when placed at `.claude/skills/cad/SKILL.md`. - [CHANGELOG.md](https://cad.mino.mobi/CHANGELOG.md): what changed and when — read this first if you have used the site before; it says what to stop working around. - [README.md](https://cad.mino.mobi/README.md): the tree schema (params and expressions, sketches, ops, naming), the CLI, the bake-off. - [bench/](https://cad.mino.mobi/bench/clock.json): worked examples — `gear`, `arbor`, `plate`, `escape`, `case`, `case-fillet`, `cam`, `pinion`, `pallet`, `balance`, `hand`, `dial` (parts), `train`, `clock`, `crank`, `lift` (assemblies; `crank` is the crank–slider whose placements are expressions of `theta` and `t`; `lift` is a lead screw, a `screw` mate, and four bolts by `repeat` placed on the platform's holes by reference). `https://cad.mino.mobi/bench/.json`. ## Run it with nothing but node The package is served as-is. Clone the mirror, or fetch the files: `cad.wasm` (the engine), `lib/*.js` (engine ABI, mesh toolkit, kernel adapters, assemblies, measure, interference, the drive), `agent/*.mjs` (build, measure, check, export, render, drive, publish), `vendor/manifold.{js,wasm}` (the preview kernel). - `node agent/build.mjs tree.json` — exact build: volume, area, bbox, χ, watertight, named faces with geometry, STL/STEP out. - `node agent/measure.mjs tree.json --list` — diameters and distances from exact geometry. - `node agent/check.mjs asm.json --t 0.5` — interference through the motion. An assembly's `at`, `rotate`, `drive` and mates take expressions over its `params`, `derived` (any order), `t` (seconds) and `theta` (the driven angle, degrees): `bench/crank.json`. Mates: `gear`, `belt`, `fixed`, `screw` (`lead`), `rack`, `slider`. `repeat: n` with `i`; `at: "@comp.face"` places on a named face — and face names survive a boolean, so a cut body is still a placement target (`{op:'name', face, as}` aliases one). An extrude takes `depth`, `from`/`to` (both along the sketch plane's normal), or `through: true` on a cut, which sizes the tool from the body. `--sweep N` checks a cycle, `--grid [n]` every combination of the document's `inputs` (named axes of motion with a range, consumed by `revolute` and `prismatic` joints: two independent inputs make the question a grid, not a period, and a path through it proves nothing about the corners); `--clearance d` gives every pair's nearest approach with a verdict — collision, contact, expected, fit, close, loose, clear; a document's `fits: [{a, b, min, max}]` declare the clearances it intends (`[*]` on both sides pairs by index, `over: {k: n}` walks one, and `interfere: {max, depth}` raises what a designed touch may share — a fixed mate is not a licence to be the same solid) (the MCP `interference` tool has it too, on the server). `measure.mjs asm.json a.face b.face --t` measures across parts. `drawing.mjs tree.json --out a.svg` (and the MCP `drawing` tool) writes an engineering drawing: three views, hidden lines, overall dimensions, holes called out by count and diameter. `report.mjs asm.json --out asm.html` (and the MCP `report` tool) writes a whole assembly report: those views, an exploded isometric with numbered balloons, a parts list, a drawing per part, and the assembly steps read off the placements, references, mates and fits — with a viewer link on every row. `audit.mjs --at repo` rebuilds a corpus against its recorded invariants. - `node agent/mechanism.mjs asm.json` — what the mechanism DOES, by virtual work: per input, every component's rate and its mechanical advantage (the reciprocal of that rate), the travel and turn end to end, what stays still, and the dead points where a rate passes through zero. `--span a b` is an invariant when it reads zero everywhere on the input (it reports the worst rate over the whole range, not only the state you asked about); `--load comp=fx,fy,fz` is the effort at the input that holds it (N for an input in mm, N·m for degrees, W for a drive) — lossless, so a floor. No geometry is built, so it is free; the MCP `mechanism` tool is the same thing, and the assembly report carries it as a *Motion* section. - `node agent/render.mjs doc.json --out shots` — PNG per view (needs Chromium). - `node agent/drive.mjs ls --at minomobi.com` — the published bench as a file tree. ## Run it with no files at all: MCP `https://cad.mino.mobi/mcp` is a Model Context Protocol server (streamable HTTP, JSON responses; GET returns the descriptor). Tools: `check`, `build`, `measure`, `mechanism`, `interference`, `drawing`, `report`, `step`, `list_files`, `get_file`. Every tool takes a tree object, `bench:` or an `at://` URI; `build` returns the invariants, every named face with its geometry, and a viewer link to hand a human; on an assembly it builds three parts per call and returns `partKeys` and `remaining`, so pass `parts` to continue. There is no render tool (the link is the picture), no write tool (a person's parts are saved with the person's own sign-in), and no shared-volume interference on the server (the preview kernel's glue needs eval, which Workers forbid) — `interference` there answers in clearance mode from the exact meshes: pass `clearance` (mm) and optionally `sweep`; a sweep too big for one request answers `done: false` with `next` — call again with `from: next` (meshes are cached between calls) and take the smallest distance per pair across the windows; `incomplete: "parts"` means more parts to build, `incomplete: "too-big"` means one instant is past the server's budget (pass `res: 64` or `128`, or run it locally); `agent/check.mjs` does volumes locally. Add it to Claude Code with `claude mcp add --transport http cad https://cad.mino.mobi/mcp`. ## Data - Records: `com.minomobi.cad.part` (a head: `path`, `name`, `kind`, `head` strongRef) and `com.minomobi.cad.revision` (immutable: `tree`, `parents[]` strongRefs, `createdAt`, `message`, `kernel`, `invariants`). No floats in records: non-integers are decimal strings, which the tree language reads as expressions. - Read anyone's files without sign-in through this site's gateway: `https://cad.mino.mobi/xrpc/com.atproto.repo.listRecords?repo=&collection=com.minomobi.cad.part` and `…/com.atproto.repo.getRecord?repo=&collection=&rkey=`. `com.minomobi.cad.*` only. - The published bench: repo `minomobi.com` — `parts/`, `train`, `clock`; assemblies reference parts by AT URI. - Open a file in the viewer: `https://cad.mino.mobi/?at=`. Any tree: `https://cad.mino.mobi/#t=`. Hand over a `part` head, not a `revision`: a head always resolves to the newest revision, and an open page re-reads the heads of the document and of every part it references, reloading in place when one moves — so the next revision you save reaches a page someone already has open, with no new link and no reload. A `revision` URI is pinned for ever, which is what a `parts.mino.mobi` post points at. - Writing: sign in on the site (OAuth through auth.mino.mobi, scope `atproto repo:com.minomobi.cad.part repo:com.minomobi.cad.revision`), or headlessly with an app password (`agent/drive.mjs … --login`). ## The social layer `https://cad.mino.mobi/parts/` — communities of parts, Reddit-shaped. Records in the author's own repo: `com.minomobi.cad.community` (founder's repo, rkey = slug), `com.minomobi.cad.post` (`community` and `part` strongRefs — `part` is a REVISION uri — `title`, `text`), `com.minomobi.cad.comment` (`post`, optional `parent`), `com.minomobi.cad.vote` (`subject`, `value` 1 or -1). Read the index: `https://cad.mino.mobi/parts/api/feed?sort=hot`, `…/parts/api/communities`, `…/parts/api/community?name=`, `…/parts/api/post?uri=`, `…/parts/api/thread?uri=`. After writing records to a repo, `POST https://cad.mino.mobi/parts/api/index?repo=` makes them appear at once; a cron finds them anyway through backlinks. ## Where the source lives - Monorepo: https://github.com/minormobius/agent01 — `packages/cad/` (the engine source is `engine/`, Rust). Design record: `docs/CAD.md`. - Small mirror (this package only, 4 MB, on ATProto): `git clone https://tangled.org/morphyxmino.bsky.social/cad` — https://tangled.org/morphyxmino.bsky.social/cad. Refreshed on every push; do not open pull requests there.