Bench design session 11NOV2026 attach ring anchors wall order
Design only, no code written. Where this disagrees with the Bench plan 09NOV2026, this wins. For implementation state of the touch page, the 10 Nov handover still applies, except for the gizmo spec (section 5 below replaces it).
Status tags: Decided (owner said so), Proposed (my suggestion, not confirmed), Verify (needs a code check), Open.
1. Core model (Decided)
- The history stores final resting poses. Undo and redo are the user's steps through it.
- Nothing about relations is stored. Edges, attached or detached, free or taken connectors, padlocks, anchor occupancy and wall depth are all derived from poses (
connectionsForplusTOL). Undo therefore re-derives everything correctly. - Connector kinds, subtypes and polarities prune the problem before any ranking. A tile with no studs cannot go on a plate, a pin needs a hole, and a hinge needs a mate.
- The wall is only a picker. Replay never touches it.
2. Puzzle framing (Decided)
- The set is the level. Tiles show a padlock when no free compatible connector exists, relative to the current selection. A key glyph shows what unlocks it (non-colour cue).
- With nothing selected, any part may start an assembly (BrickAgent's
Assembly), so nothing is locked. - Every connector has a free or taken state: studs, tubes, pin holes, pins, axles, plate undersides. Taken means it appears in an edge from
connectionsFor. A second pin locks when no free hole is left, so no separate blocking rule is needed. - Free build is the same core with locks off. Counts show "-", tiles do not drop when picked, and colour becomes editable on the placed part.
- Padlock, key glyph and any "fits best" badge are tile decorations. They never change wall layout.
3. State machine (Decided)
| State | Empty canvas tap | Cancel does |
|---|---|---|
| Idle | nothing | nothing |
| Selected | deselect | deselect |
| In hand | nothing | drop the hold |
- Anchor icons are the only targets. Empty canvas is never a click target.
- A placement is a pair (target, pick) that commits when both halves are set, in either order. Whichever half comes first narrows the other.
- A tile tap with a selection attaches to the selection. A new assembly always comes from a floor anchor.
- Cancel is a dedicated button in the strip below the scene, always visible, and really inert when there is nothing to cancel. It is also Esc, a CLI/API command, and always one of the voice tools. It backs out one level, so it is always safe to call.
- Every mode (touch, mouse, key, button, CLI, API, voice) raises the same events into this machine. Only the input differs.
- No animation on pick. Tile count drops and the part appears.
4. Floor anchors and canvas (Decided)
- Anchors sit 8 studs apart at edge centres of each 8x8 cell. The first anchor is front-centre and fixed. Growth extends back and sideways around it, so each size nests the previous one.
- An anchor is free when no part footprint is within 2 studs (set to 2 after we discussed 4). Taken is derived from poses.
- Spare-anchor rule: there is always one free anchor. When none remains, the canvas steps up through 8, 16, 32 and 64. Size is derived, so undo can shrink it back. A hysteresis for shrinking is proposed, not decided.
- A strip control sets a minimum canvas size (a cycle button on touch, a dropdown on keyboard and mouse pages, plus a
setCanvascommand). It can never go below what the parts need. - Only a few free anchors show while a part is in hand, not every lattice cell.
- Wall: fixed size per the current layout code (shape from
shown.length, at least 6 columns). Its position floats 8 studs behind the backmost placed part, with a minimum depth so it never covers the 8x8 anchors. Rounding its depth up to the anchor lattice is proposed, so a back-row anchor always stays free. Wall depth and canvas width are independent, and the existing code defines the geometry. Camera framing is not a problem until the owner says so. - Today's code: FLOOR = 640 (32 studs), WALL_Z = -340, CELL = 100, PITCH = 130. The 8/16/32/64 steps and the floating wall are new.
- Backlog: the 8-start canvas growth (from the previous session) is now part of this design.
5. The ring (Decided)
One ring in every mode: 6 straight arrows and 3 curved arrows. Dots only change what the arrows act on. This replaces the handover's 12-handle gizmo (inner/outer handles). The handover's screen-relative rule stays: pitch and roll snap to the nearest world axis (screenAxes).
| Mode | Straight arrows | Curved arrows |
|---|---|---|
| Move/rotate standard | 20 LDU lateral, 24 LDU vertical | 90° yaw, pitch, roll |
| Move/rotate fine | 10 LDU lateral, 8 LDU vertical | 15° yaw, pitch, roll |
| Attach | Up/down: step the held part's source connector type (only types with a free partner). Left/right/forward/back: step the cursor across free connectors of that type, in grid layout. | Yaw, flip, and hinge or ball angle |
- Slide is MOVE. After attaching an axle or pin, use move along the axis. Within BrickAgent's overlap rule (the smaller of 4 LDU or the shorter connector) it stays attached. Past it, it detaches by derivation.
- Fine mode keeps half-stud nudges. Parts off-grid or off-tolerance simply read as detached. The stud lattice is a default for the floor only and never constrains parts. A beam hole can take a stud off-lattice.
- Assembly scope (spare dot): the same ring acts on the selected part's whole connected component. Pivot is the selected part's reference point (as in Stud.io), which is just a rigid transform of every pose. One history entry. No lattice snap, since only joints inside the assembly must mate, and rigid motion preserves them.
- Colour (spare dot, free build): left/right steps through the 12 families in filter-button order, up/down steps shades. It is a pose-free edit.
- Lift (dot, Proposed): unseats the part and puts it in hand, keeping its orientation and source connector. The owner said this needs more thought.
- Two spare dots remain. Candidates: scope, colour, swap (same connector key), view (orbit and zoom for non-touch pages), and ideas from games (rewind, poke, slice, explode, repeat, hint, measure, mirror). Not chosen yet.
- Delete, cancel, undo, redo and the other strip buttons stay in the strip, as in the handover.
6. Wall order (Decided)
Sort by bucket, then connector, then colour, then part number. Colour follows the filter-button family order.
- Connector key: the part's connector signature (kind, subtype, polarity) with the fewest compatible signatures. It is counted catalog-wide by default, with set-relative as an option, computed live. Equal counts break by kind, subtype, polarity. Direction (rare first or common first) is a setting.
- Precompute the catalog counts offline in the database, like
bucket(Proposed). - The list is recomputed only when the filter or sort settings change, never on selection.
- The filter sets the column count, as in the current
layoutcode.
7. Settings (Decided: nothing hardcoded)
Every value is a default in one settings registry. Each entry carries its default, allowed values, and whether it affects layout, so one definition feeds the settings page, the CLI help and the API schema. Settings are global to the browser, not per model.
Registry contents:
- Sort keys, their order, and the connector direction
- Mate-count scope and the tiebreak chain
- Anchor spacing (8), anchor clearance (2), and minimum canvas
- Standard and fine steps
TOL(8 LDU)- Wall gap (8 studs) and minimum wall columns (6)
- Padlock on or off, and hint tier
- Default starting filter
8. Voice (Decided where stated)
- Tool lists swap by mode, about 10 each, with enum arguments.
- Cancel is always one of the 10.
- I proposed merging "no action" into cancel, since cancel with nothing to cancel is a no-op. This was not confirmed.
- The voice page shows the interpreted command and uses preview and commit.
9. Verify before building
- Whether BrickAgent's components treat hinge and ball joints as rigid. This decides whether a hinged arm rides along in scope mode.
- What
graph.tsreturns for an axle or pin through two beams. "Taken" may need to be per hole, not per connector. - Whether
jointCandidatescan prune by connector type before enumerating geometry. It currently stops at LIMIT = 400, which truncates before ranking. - How many parts actually need slide, and how many catalog connector signatures exist (to confirm precomputing the mate counts is cheap).
- How the first anchor, wall minimum depth and clearance 2 behave together on 8x8 (untested; try it on the phone).
- Move steps in screen-relative mode for an axle lying diagonally to the view.
- The bucket script is still not in the repo (handover backlog).
10. Open
- The dot's behaviour on cycling and lift feels unresolved. It will show up once built.
- Which of the two spare dots to take.
- Hysteresis for canvas shrinking.
- Defaults left from earlier addenda that this session did not touch: where saved models live, my-models, the first part's location (now answered: the front-centre anchor), and the Addendum F questions.
11. Dropped or corrected this session
- Storing
to/by/yawrelations in the log (wrong: poses only). - Fixed 26 by 9 wall, A to Z grid (the code lays out from the tile count).
- The wall as a fixed strip, and per-model wall settings (replay does not involve the wall).
- Scale animation on pick, and the earlier suggestion of a "wall view" preset (not needed until the camera is flagged).
Managing the growing pile of docs
Right now you have a master plan with addenda A to K, a handover, and now this. The addenda already show the pattern: each session appends, older text contradicts newer text, and the next Claude has to work out which wins. I'd change four things.
- Supersede, don't append. At the end of each session, fold decisions into the master document's sections and delete the old text. Addenda A to K should be merged into the main sections once, so the plan reads as one current statement.
- A decisions log. One file, one line per decision: date, decision, status tag, and which earlier line it supersedes. Newest wins. Today's reversals (wall strip, 12 handles to 6+3, clearance 4 to 2) would be three lines that explain why the plan changed.
- One document per area, plus an index. Split by topic, not by date, for example
docs/bench/:index.md(read this first, with a link to each file and its status),core-model.md,attach-and-ring.md,wall-and-anchors.md,settings-registry.md,touch-page.md(the handover content),decisions.md, andopen-questions.md. A session then edits the one or two files for its topic instead of adding a new document. - Short handovers that point, not repeat. A handover holds only what is untested, what changed in the code, the next three steps, and the working rules. Move the working rules (ask, don't assume, patch scripts, plan vs build) into a stable
working-agreement.mdso they are not copied each time.
Two extra habits help. Keep the docs in the repo, so a session can read them with a terminal command and the owner's "DATA not assumption" rule applies to the docs too. And start each session with a one-line prompt such as "read docs/bench/index.md, then decisions.md; today's topic is X". That keeps old addenda from being treated as current.
If you like, next session could start by doing the merge: I fold addenda A to K and this write-up into that structure, and you review the diff before anything else is added.