Brickheart

Library and pipeline design session 22NOV2026

: Written by a human with AI assistance.

Status: design only, no code written; Library v1 scope, the home page, the OMR conversion rules and the TypeScript pipeline are Decided, nothing is built yet (Open).

What changed in the code

  • Nothing. This was a design session. Read this session: rows.ts, types.ts, config.ts, bench.ts, scene.ts, the DAT and BIN packers, the collision .bin snippet, dump_omr_mpd.py, and parts of load_data.py.
  • Decided: the Library has sections of records of one shape. v1 has one section, "Examples", made of the OMR models in subjects 1 to 3 (about 628). They stand in for a user's own models and set the pattern that autosave follows later. "My models" is a second section added once autosave exists.
  • Decided: playback is progressive part placement with an exact coordinate and matrix. Build order is the row order of the file, one part line per step, and STEP lines are ignored. This withdraws the earlier idea of using OMR STEPs as ground truth for build order.
  • Decided: the home page starts with two tiles, Browse and Library. Continue and Settings wait for the registry and autosave.
  • Decided: Browse is the full filterable list with no images and leads to a build. The Library has images and is the user's build history, and leads to the bench.
  • Decided: Library play controls are plain DOM and replace the Actions buttons for now.
  • Decided: the OMR conversion swaps part numbers through the shared maps and skips any part that is not in the subject pack (minifigures and the like). The skipped count is stored on the model and shown in #msg-bar.
  • Decided: alternative builds (about 500 Studio .io files) are backlog.
  • Decided: the pipeline moves to TypeScript, in its own top-level folder, outside app/, dev/, site/ and shared/. BrickNet data stays an external drop-in folder from its own Python install. Output need not match the Python output byte for byte. It has to work from a clean app deploy.
  • Read from the code, not changed: the scene setup in init3d needs only a stage element, so the Library can reuse it. The bench setup in start() is tied to one set and needs lifting into a shared function.
  • Replaced and moved to dev/superseded: the earlier Library page.

Untested

  • Verify: cameras.ts was not read, so framing a finished model is untested.
  • Verify: the flip between file coordinates and scene records. The Attach picker negates y and z. Not read.
  • Verify: that load_data.py is the live version of the three. Inferred from the roadmap and the file names.
  • Verify: whether the final database keeps the part and colour maps. They look like in-memory dicts in load_data.py, so the OMR converter would skip more lines than it should until they are written as tables.
  • Verify: which of the two collision scripts is live, and whether the app reads parts or unchecked_part_nums from the collision index.json. collide-store was not read.
  • Verify: the exact command that installs the BrickNet data, and whether its aliases live in the same folder.
  • Verify: whether the OMR file already includes alternative builds, and whether the "500 template sets" in the Bricks for the Blind post are the same 500 files.
  • Open: map_colours_modern.py uses colorspacious. Which colour space it converts to was not read.
  • Open: green-confirm-sphere.md and default-attach-on-selection.md may now be done. Still not read.
  • Open: the blog folder design and the folder dev/superseded were assumed.

Next three steps

  1. Settings registry core with the four placement entries, and the ROWS_SQL tiebreaker. Autosave follows.
  2. The pipeline in TypeScript, starting with the DAT and BIN packers, then the OMR converter.
  3. Library v1: lift the shared scene setup out of start(), then the Examples list with thumbnails and play controls.
  • Living design page: not named (Open). See the dev roadmap, now, next and later.
  • Working rules: CLAUDE.md in the repo root.
  • Earlier post today: "Settings registry design session 22NOV2026".