Capture the durable patterns from the placement-interaction overhaul so reviews and new devs don't regress them: - tools.md: new "Data-driven live drag" section — kinds whose geometry is recomputed from fields (wall/opening/endpoint) preview via useLiveNodeOverrides (merged by getEffectiveWall/getEffectiveNode), store written once on commit; per-tick useScene.updateNodes is the documented anti-pattern (churns the nodes ref → app-wide re-render flood). Plus "Floorplan registry: per-node subscriptions" — each entry subscribes to its own live slice, memo'd with stable props, sibling-epoch invalidation; widening to the whole Map / dropping memo is a regression. Plus a note that the HUD snapping chip renders for any snap-context tool, not only those with def.toolHints. - review SKILL.md: matching blockers in §C (data-driven drag / no per-tick store write) and §D (per-node list subscriptions). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Architecture
Canonical rules for code that touches packages/core, packages/viewer, packages/editor, packages/mcp, or apps/editor. Read on demand from AGENTS.md and from .agents/skills/review-architecture/SKILL.md.
Pages
| Page | Covers |
|---|---|
| layers | Three.js layer constants, ownership, and rendering separation |
| systems | Core and viewer systems architecture |
| renderers | Node renderer pattern in packages/viewer |
| node-definitions | Three-checkbox composition model for registry-driven kinds (geometry / renderer / system) |
| materials-and-themes | Surface colour: surface roles, colour presets, the textures axis, and scene themes (appearance / ground / clay tints) |
| item-authoring | Content-author contract for catalog item GLBs: slot_ material naming, authored defaults + pascal_material extras, the cutout reserved mesh, UV world scale, and the validated Blender/export recipe |
| plugin-authoring | Public contract for external plugins — Plugin shape, setPluginDiscovery, lifecycle, what's in and out of v1 |
| tools | Editor tools structure, 2D↔3D behavioral parity, manipulation constraints, and Shift bypass defaults |
| interaction-scope | The authoritative interaction state machine ("the spine"): InteractionScope union, the begin/update/end/endIf contract, the raycast hot-set, and the overlay scope matrix |
| viewer-isolation | Keeping @pascal-app/viewer editor-agnostic |
| selection-managers | Two-layer selection (viewer + editor), events, outliner |
| scene-registry | Global node ID → Object3D map and useRegistry |
| spatial-queries | Placement validation (canPlaceOnFloor/Wall/Ceiling) for tools |
| node-schemas | Zod schema pattern for node types, createNode, updateNode |
| events | Typed event bus — emitting and listening to node and grid events |
| creating-rules | How to add or update a page in this folder |
Reading order for an architecture review
- layers, systems, renderers, tools, viewer-isolation — required every review.
- When the diff touches placement / move / handle / reshape / box-select / paint or any overlay or picking behaviour, also read interaction-scope.
- The remaining pages on demand, based on what the diff touches.