Files
editor/wiki/architecture/README.md
T
de13119f86 docs(wiki): vertical-model architecture page; drop stale SlabSystem rows (#528)
Documents the shipped vertical building model (#526): stored truth table,
resolution helpers, clamp rules, pointer-decided placement, the load
migration that lives in migrateNodes indefinitely, and the gotchas. The
systems tables stop listing the deleted SlabSystem and point at the
registry geometry path instead.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 14:44:03 -04:00

2.9 KiB

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
measurements Persistent measurement data, 2D/3D draft ownership, snapping, units, and visibility
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
vertical-model Stored level heights, plane-bound wall/ceiling tops, slab placement + thickness, support hosts, clamp rules, and the load migration
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

  1. 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.
  2. The remaining pages on demand, based on what the diff touches.