An agentic hardware development environment: an agent harness with deterministic
viewers for KiCad boards, schematics and STEP models. The hub is Rust (native/host),
the desktop client is GPUI (native/gpui), the phone apps are native (mobile/).
There is no JavaScript hub and no web client in this tree.
- Work happens in your own worktree on your own branch:
git worktree add .backplane/worktrees/<name> -b <name> main. - The source is one clone:
~/Documents/Backplane/Backplane(BackplaneWorks/Backplane). Every lane is a worktree of it under.backplane/worktrees/, and so is the main builder's checkout (.backplane/worktrees/main-build). Make no other clone or copy of the tree to work in: when~/Documents/i2cjak/backplane-bendwas deleted on 2026-11-09, every worktree of it lost its git data and the unpushed commits in them had to be rebuilt from the files. - FreeCAD runs headless everywhere but the person's own use: probes, conversions and test hubs use
freecadcmdor the GUI withQT_QPA_PLATFORM=offscreenand noDISPLAY/WAYLAND_DISPLAY(the hub does:stepglb::headless). A test hub gets noDISPLAYfrom the live hub's environment; a FreeCAD that has one puts its windows (a--versionbox) on the person's screen. - Upstream main (
origin/main) is the one main; always rebase on it. Start your branch fromorigin/main, and land withscripts/land.shfrom your worktree: it fetches, rebases ontoorigin/main, runs the tests (scripts/dev-build.sh --gate --no-cut), pushes to origin main as a fast-forward and then fast-forwards localmain. A rejected push (origin moved) fetches, rebases, tests and tries again; anything it cannot do fails loudly (land: FAILED ...) and lands nothing. Nevergit rebase main, never merge into localmainby hand (the main hook refuses a localmainthat is not onorigin/main), never force, never merge-commit. Landing pushes: that is the person's standing go (2026-11-10). Details:docs/git.md(Landing). - Every move of
origin/mainis built on this machine (scripts/main-build.shbuilds only commits that are onorigin/main, fetching every minute; started by a hook fromscripts/install-hooks.sh;docs/MAIN-BUILD.md). After landing,scripts/main-build.sh statusshowsbuilt:reach your tip, and~/.backplane-gpui-dev/main-build.logsayspublishedorFAILED. A red test publishes nothing and leaves the bar red until the next merge fixes it, so land.sh runs the tests before it pushes. - A published build reaches the running app (the fresh hub on
~/.backplane-gpui-fresh,scripts/fresh.sh) only through its watcher,scripts/fresh-watch.sh: it shows the build bar, swaps the window at once, and offers Restart now while turns run (docs/HUB-RESILIENCE.md,docs/DEV-RELOAD.md). The watchdog timer (scripts/hub-watchdog.sh install) brings a dead watcher back. Both act on the person's live app, so the person starts them in their own terminal; an agent never does (a watcher started from an agent turn carriesBACKPLANE_AGENT_OWNERand the next hub restart kills it). If~/.backplane-gpui-dev/CURRENTnames your build but the runningbackplane-gpui(readlink /proc/<pid>/exe) is older, the watcher is not running: tell the person, and checkscripts/hub-watchdog.sh status; never relaunch the app yourself.
native/host/: the Rust hub (backplane-hub). HTTP + WebSocket, event store, agent processes (Claude, Codex, Grok, OpenCode, Muse, Antigravity, Pi, Oh My Pi), KiCad (in-process IPC, plots, STEP), bots and rooms, pairing, far threads, terminals. The presenter (present/,presenter.rs) is Rust only; there is no helper process and no--policy-bin. The CBOR dictionaries are insrc/wire_dict.rs(append-only forever, the wire depends on the order).native/voice/: the voice helper (backplane-voice), a child process of the hub: speech to text by OpenAI or locally through sherpa-onnx's C API, NDJSON on stdout (itsREADME.md).native/gpui/: the GPUI desktop client (backplane-gpui);vendor/is vendored crates. Its colours come fromassets/web/style.css, its logo fromassets/web/favicon*.svg.mobile/ios,mobile/android: the phone apps. They speak the hub's data/1 protocol (docs/PHONE-DATA.md).native/step2glb/: the STEP mesher (backplane-step2glb), C++ on OpenCascade, a helper the hub runs from beside itself (kicad/stepglb.rs).scripts/build-step2glb.shbuilds it (STATIC=1: the pinned OpenCascade fromscripts/build-occt.sh, as a release does).tools/: helper programs that are not Rust:browser(headless Chromium over NDJSON),cef,voice,platform. Built byscripts/build-*.sh.order/: the order server (fabsrv, Python) and deploy.skills/: agent skills.deploy/kistack: KiStack's skills, pinned bydeploy/kistack.lock(python3 scripts/kistack.py bump <commit>).i18n/: message catalogs.assets/: fonts, icons, web colours.scripts/: dev, build, fresh/watch, side-by-side, switch and device scripts;migrate-from-bend.shcopies an old~/.backplane-bendhome into a Backplane home (the old one is only read). The hub's own import (native/host/src/import014/,docs/IMPORT-0.14.md) is what a person uses: setup and Settings offer it, and it copies into a home already in use.test/: fixtures, oracles and e2e drivers;test/tools/claude_standin.tsandperf_standin.ts: the stand-in agents.docs/: how this tree works (BUILD.md,DEV-RELOAD.md,MAIN-BUILD.md,SIDE-BY-SIDE.md,COPY-GUARD.md,HUB-API.md,PHONE-DATA.md). Otherdocs/*.mddescribe features the hub keeps.
cd native/host && cargo test --offline # hub tests
cd native/gpui && cargo test --offline # client tests
scripts/dev-build.sh --gate --no-cut # both crates' tests, then fast-profile builds; no publish
scripts/dev-build.sh # build and publish to the person's `watch` terminal via dev-cut.sh
scripts/main-build.sh --once # build and publish the tip of main now
scripts/bp-build.sh # build/test on a remote builder (Boat or h@backplane), when the desktop is busy
backplane-hub --home DIR --port N --no-tailscale --foreground # run a hub (temp home!)dev-build.sh honours BUILD_ROOT (the checkout to build), PROFILE (default fast), HOST_TARGET/GPUI_TARGET. Tests that need agents use stand-ins only.
Every build, test and gate runs on our own machines. GitHub Actions is the fallback only when none of them can do the job; say which job and why (today: linux-arm64 and Android release builds, and publish, which signs with repo secrets).
- The merge gate (
scripts/land.sh, run from your lane, with nobp-lock.shwrapper): the gate runs first, outside any lock, so lanes gate side by side:scripts/land-gate.shon a Boat box, for the crates your PR touches (cargo check --all-targetsand their unit tests, no e2e); a PR touching no crate compiles nothing. Then land.sh takes thelandlock itself, for seconds: it rebases onto main as it is then (no second gate), pushes and merges with--match-head-commit; a conflict there releases the lock and stops with a line (resolve, land again). No Windows, macOS, e2e, screenshot or KiCad embed suite runs at a merge: those are the release-candidate pass (docs/release-playbook.md). Main is watched instead:scripts/main-build.shkeeps building it, and when main breaks, its owner fixes forward at once or reverts. land.sh says what ran and how long it took. - Boat sandboxes (
bp-build-N):cargo-qanddev-build.shoffload to them on their own when the local slots are full (docs/BOAT-BUILD.md). Never start one by hand for a build. - h@backplane: provisional builds and focused tests (
scripts/bp-build.sh LANE '<cmd>'). Never a gating result. - hs-mac-mini: iOS and macOS builds and tests (
scripts/mac-build.sh,scripts/mac-hub-build.sh), only under themac-heavylock. - bp-winbuild (Azure, 32 cores, $3.41/h): Windows builds (KiCad's runtime:
scripts/winbuild-kicad.sh; it andwinbuild-up.shcome with #1176) under thewinbuild-vmlock. bp-win (Azure, 4 cores): Windows UI tests underbp-win-ui. Both are deallocated when idle: start withaz vm start -g BP-WIN-RG -n <vm>, andaz vm deallocate -g BP-WIN-RG -n <vm>when done (a stopped VM still bills). Quick Windows compile checks need no VM:scripts/windows-check.sh. - Releases and nightlies: release.yml's macOS, Windows and linux-x64 jobs run on our self-hosted runners (
bp-mac,bp-win-nightlyorbp-winbuild-release,bp-linux-release) while theRELEASE_*_RUNNERvariables name them. GitHub cannot wake them, so run the release throughscripts/release-dispatch.sh(dispatchorwatch RUN_ID): it starts each machine under its lock and stops it after. A variable set while its runner is offline leaves the job queued for 24 h, so set the variables only for a release window (docs/release-runners.md). - Self-hosted runners never take pull requests. The repo is public, and each runner's guard (
scripts/runner-guard.sh,.ps1) refuses every job except release.yml and nightly.yml from this repo. Pre-merge gates therefore stay as scripts you run here or over ssh, neverruns-ona self-hosted label.
- Stand-in agents only in tests: set
BACKPLANE_AGENTS=<dir>(the stand-ins go first on PATH; a missing CLI is blocked, never the real one). Real model turns only on temp homes, with the person's go. - Testing only: a paid API key (the vault's
openai-test-api-key) runs Codex only throughscripts/codex-apikey.sh: it pins the cheapest model (gpt-5-nano), refuses any other, and allows one short turn per run. A hub on stand-in agents (BACKPLANE_AGENTS) keeps inherited OpenAI key variables from its Codex children. Users' own Codex auth (ChatGPT sign-in,codex login --with-api-key,OPENAI_API_KEY, custom providers and base URLs) is never touched. - Never write to live user data (
~/.backplane*,~/.local/share/backplane). Tests use a temp home, a port 3799+ and--no-tailscale. A hub on a copy of a real log runs withBACKPLANE_COPY=1(docs/COPY-GUARD.md); it starts no turn the person did not send there, whateverrestart.continuesays (gate 5). - The repo is public: never put a real person's name, email, account label or home folder in code, tests, docs or fixtures, even copied from a live log. Use placeholders (
person@example.com, Alex, Sam,/home/user). - Never run the installed
backplane/backplane-hubto probe it; ask/hello. - Never kill processes by name or pattern; only PIDs you captured, or the process group you started (
test/e2e/lib/own-group.sh:own CMD,own_stop). The guard tests fail on anypkill,killallorkill $(pgrep -f …)in scripts/, test/, deploy/ or tools/. - Persisted events stay decodable forever: add event variants, never change the meaning of one. CBOR dictionary entries are append-only.
- Every feature matches everywhere it applies: GPUI client and both phone apps, driven by the hub's data.
- The UI is dumb: decisions (order, settle state, what is visible) come from the hub or a pure function with a test.
- No continuous repaint loops: animate only while a fade or stream is in flight.
- Square corners on the desktop, minimal copy, no decorative headings. The phone apps are rounder (radius tokens in
BackplaneTheme.kt/DataStyle.swift) and use the system font for interface text; code, paths and the small uppercase labels stay mono. - Build and test through
scripts/cargo-q(scripts/cargo-q test --offlineinnative/hostornative/gpui), not barecargo: it waits for one of the machine's few build slots (two here, from cores and free memory), uses the sharedsccache(compiled dependencies are shared by every worktree, so a new lane does not compile tokio, naga, zbus... from cold) and sizes-jfrom its slot's share of free memory, and runs the build in a scope of its own (bpbuild.slice), outside the hub's, so systemd-oomd kills a runaway build and not the hub.scripts/dev-build.shdoes the same. When your branch has landed,git worktree removeit (the janitorscripts/worktree-gc.sh --applydoes it for you: it removes landed, clean, idle worktrees,target/dirs of landed branches or idle 24 h,$BP_TMPentries idle 24 h and sccache past its cap, never what a process holds;main-build.shruns it hourly, every 5 minutes under 100 GB free, and the guard runs it before it says "Disk nearly full";~/.backplane-gpui-dev/janitor.logsays what it freed). - Offload to Boat. When every local build slot is taken,
scripts/cargo-q(test,build,check,clippy,doc,bench) andscripts/dev-build.sh(--gate, cuts) do not wait: they run the same command on a Boat sandbox (bp-build-N, pool ofBP_BOAT_POOL=2, 8 vCPU) and behave like a local run: same output on stdout/stderr, same exit code, built programs copied back to the sametarget/paths. So lanes callscripts/cargo-q, never barecargo, and the offload happens on its own; never start a Boat for a build by hand.BP_NO_BOAT=1forces local. How: the exact worktree (tracked and untracked files, committed or not; no.git, nothing ignored) is rsynced to the box, the same script runs there (sccache andtarget/stay warm on the box between jobs), and programs come back after a sha256 check. Adev-build.shcut made on a box is hashed here and always smoke-started here before it is published (SKIP_SMOKEis ignored for it). Nothing of the person's goes to a box: no home, no tokens, no.git; the box comes from the snapshotbp-build-base(made on a sandbox with no environment,scripts/boat-pool.sh base) and the job gets only build knobs. Idle boxes are stopped afterBP_BOAT_IDLE(300 s;scripts/boat-pool.sh status|reap|stop|delete); the disk is kept, so the next job resumes warm. If Boat cannot be used (offline, no quota) the build waits for a local slot as before. Commands that need this machine (cargo run,--no-run,--target-dir,--manifest-path, absolute paths outside the worktree) stay local. iOS and macOS builds stay on the Mac mini undermac-heavy; they never go to a Boat. Details:docs/BOAT-BUILD.md. /tmpis a 30 GB RAM tmpfs with an inode quota; lanes filled it twice (EDQUOT: Claude Code could not write its temp files). Lane temp space is on disk:. scripts/lib-bptmp.shsetsBP_TMP(default~/.cache/bp-tmp),TMPDIRandCLAUDE_CODE_TMPDIRto it;cargo-q,dev-build.shand the test runs already do. Put temp homes, logs, hub copies and scratch binaries in$BP_TMP(ormktemp -dwithTMPDIRset), never under/tmp. Never setCARGO_TARGET_DIRunder/tmp(cargo-qanddev-build.shrefuse); use the worktree'starget/(with a data drive,cargo-qanddev-build.shmake a new worktree'starget/a link to/data/target/<worktree>/) or, for a cross build, the shared$BP_TARGET/<target triple>; never a one-off$BP_TMP/target-*(Nov 17: three of those were 30 GB). Heavy scratch lives on the data drive:BP_DATAis/datawhen this machine has it (else~/.cache),BP_TMP=$BP_DATA/bp-tmp,BP_TARGET=$BP_DATA/bp-target, sccache in$BP_DATA/sccache, KiCad test runtimes in/data/kicad-test(~/.cache/kicad-test/builds/*link there), release artifacts in/data/release. Remove your scratch when done.$BP_TMPis scratch only: the janitor (scripts/worktree-gc.sh, log~/.backplane-gpui-dev/janitor.log) deletes any top-level entry there that nothing has written to for 24 h and no process holds, holds$BP_TMPunder its cap (400 GB on/data, 60 GB on a home disk) and$BP_TARGETunder 300 GB (40 GB), oldest unused first, and while the disk has under 150 GB free the oldest unused entries go too (never one written in the last 2 h, held by a process or named in a command line, or with a.bp-keepyou put there; a.bp-keepgit tracks does not count). Dead test runs'bp-*/bpt-*dirs go after 24 h.- Keep disk headroom (
df -h /first; 20 GB free); delete your own build leftovers. Builds ofmainrun in the builder's own checkout and target dirs, at low priority; a build from a worktree uses its own target dir, not another's. - Local automation commits as
i2cjak <build@amemb.com>. Accepted authors and committers are i2cjak'sbuild@amemb.comand231940135+i2cjak@users.noreply.github.com, and separate contributor jlcjak's206324213+jlcjak@users.noreply.github.comandkpatsatzakis1@gmail.com. GitHub'snoreply@github.comis accepted as committer only. Everything else is refused. Preserve accepted identities and existing history.scripts/install-hooks.shsets the repo's own automation identity and installs the shared checker and pre-commit, pre-push and reference-transaction hooks for every worktree;scripts/land.shand CI use the same rule. Never change the global~/.gitconfigor override automation's identity withGIT_AUTHOR_*/GIT_COMMITTER_*orgit -c user.email=. A clone made elsewhere runsscripts/install-hooks.shbefore its first commit. - Pushes go through
scripts/land.sh(tomain, fast-forward only). Any other push (a branch for a pull request) only when asked; before it, verify the GitHub account (i2cjak), the remote (BackplaneWorks/Backplane), and the branch. - Process spawning goes through
native/host/src/proc.rs(its kinds decide what a copy run refuses); no other non-testCommand::newundersrc/. - KiCad work commits straight to main; firmware and other software keep worktrees (docs/git.md, "Design files on main"). A hardware project's thread works in the main checkout for design files (KiCad, libraries, 3D models, mech/, mfg/, fab files:
native/host/src/kicad/canonical.rsis_design), which the hub commits to main at each turn's end, and in its worktree for code. One writer per board or schematic holds its named lock (agents/design.rs). A board experiment is an explicit, labelled copy on main, never a silent switch of the canonical one.
- A link you give the person to something served on a machine (a dev server, preview, review page) must open from their other machines on the tailnet:
localhost/127.0.0.1open only on the serving machine. Your own probes stay on loopback. - Name the machine by its MagicDNS name
<machine>.<tailnet>.ts.net(itsSelf.DNSNameintailscale status --json, no trailing dot), with real names filled in. Keep the server on127.0.0.1and share it withtailscale serve --bg --https=<free port> http://127.0.0.1:<port>after asking; turn it off when done. Leave 443 alone, nevertailscale serve reset, neverfunnel, never bind0.0.0.0or drop sign-in/TLS for a link.