# GTA6 / The Sims First-Person 3D Room Wardrobe Simulator — Clean-Room Specification & Technical Spine

> **Document Class**: Clean-Room Multi-Vendor Build Specification (`GTA6-SIMS-3D-WARDROBE-SPEC.md`)
> **Architecture Standard**: `prompt-architecture` 7-Category Production Prompt Contract (`FRAME`, `SPEC`, `GUARDRAILS`, `AGENCY`, `ARBITRATION`, `OUTPUT`, `TONE`)
> **Target Fleet**: `worker-agent1..5` (Isolated Clean-Room VMs 141–145)
> **Active Flagship Roster**:
> - `worker-agent1`: Anthropic `claude-fable-5-1` (`effort: max`)
> - `worker-agent2`: OpenAI `gpt-6-astra` (`reasoning_effort: xhigh`)
> - `worker-agent3`: Google `gemini-4-argon-high` (`thinking_level: high`)
> - `worker-agent4`: xAI `grok-4.7` (`effort: xhigh`)
> - `worker-agent5`: Alibaba `qwen3.8-max` (via VM 1100 LiteLLM `100.109.75.94:4000`)

---

## Part I: Prior-Art & Technical Architecture Synthesis

Before handing the clean-room prompt to the five independent builder VMs, this section synthesizes verified open-source prior art, mathematical models, WebGL/Three.js (`r164+`) rendering pipelines, procedural WebAudio graphs, and quadruped skeletal kinematics.

### 1. First-Person / Third-Person Room Entry & Seamless CAD Camera Transitions

| Reference / Library | Architectural Pattern | Application to Wardrobe Simulator |
|---|---|---|
| **Three.js `PointerLockControls` + Capsule/AABB Collider** (`three/addons/controls/PointerLockControls.js`) | Mouse-look pitch/yaw Euler angles (`YXZ` order) attached to eye-height camera (`y = 1.68 m`), with velocity damping (`v -= v * 10.0 * dt`), sinusoidal head-bob during locomotion (`y += Math.sin(walkDist * 3.8) * 0.022`), and 2D XZ Axis-Aligned Bounding Box (AABB) sliding collision against room walls and the wardrobe footprint. | Gives the user an immediate **GTA6 safehouse / apartment walk-in entry experience**: stepping through the apartment doorway into a sunlit Polish apartment room, walking up to the wardrobe, opening doors/drawers in first-person (`E` / Left-Click raycast), and hearing footsteps on herringbone parquet. |
| **Dual-Mode Quaternion Slerp + Target Lerp (`PointerLockControls` ↔ `OrbitControls`)** | Disables both controllers during a `900 ms` cubic-in-out transition (`t = easeInOutCubic(u)`). When switching from First-Person (`PointerLockControls`) to **The Sims 4 Build/Buy / CAD Mode** (`OrbitControls`), `pointerLockControls.unlock()` fires first; the initial `orbitControls.target` is seeded along the camera's forward look ray (`camPos + forward * 2.5`) and smoothly interpolated (`Vector3.lerpVectors`) to the wardrobe centroid `(0, H/2, -roomDepth/2 + D/2)` while `camera.position` lerps to the isometric/elevation CAD vantage point and `camera.quaternion.slerpQuaternions(qStart, qEnd, t)` prevents horizon snapping. | Eliminates the jarring camera jump common in 3D configurators. Pressing `TAB` or `C` glides smoothly from standing inside the apartment to floating in precision CAD orbit/orthographic snap mode, and glides back to eye level when returning to walk-in inspection. |
| **`yomotsu/camera-controls` Pattern & Raycast Plane-Intersection Dragging** | In CAD mode, `THREE.Raycaster` intersects a virtual vertical/horizontal workplane (`THREE.Plane(new THREE.Vector3(0, 0, 1), -wardrobeFrontZ)`) rather than relying on screen-space pixel deltas. Dragged shelves, hanging rods, and drawers snap to the **32 mm Euro-system drilling grid** (`Math.round(y_mm / 32) * 32`) with live SVG/HTML or `CSS2DRenderer` millimeter callouts and red collision highlights when two internal modules overlap. | Delivers authentic **The Sims Build Mode** tactile satisfaction combined with real **System 32 (`32 mm` pitch)** Polish stolarz engineering. |

### 2. Real Lighting, Volumetric Sunbeams (God-Rays), Dust Motes & PBR Carpentry Shaders

| Visual Subsystem | Technical Implementation (`Three.js r164+` / WebGL2) | Key Parameters & Equations |
|---|---|---|
| **Volumetric Window Sunbeams (God-Rays)** | **Dual-Layer Volumetric Architecture**: <br>1. **Geometric Frustum Cone/Slab (`ShaderMaterial`)**: A custom additive-blended (`THREE.AdditiveBlending`, `depthWrite: false`, `side: THREE.DoubleSide`) sheared frustum mesh extruded from the apartment window frame along the solar vector $\vec{L}(\theta_{\text{elev}}, \phi_{\text{azim}})$. Fragment shader computes soft edge falloff via view-normal fresnel $(\vec{N}\cdot\vec{V})^p$, distance attenuation $e^{-\sigma d}$, and animated 3D simplex/trigonometric noise so sunbeams remain visible **even when the window is behind the first-person camera** (avoiding the classic screen-space `GodRaysEffect` frustum dropout).<br>2. **Post-Processing Bloom / Screen-Space Radial Pass**: Optional `EffectComposer` + `UnrealBloomPass` (or `pmndrs/postprocessing` `GodRaysEffect` / `three-good-godrays` shadow-map raymarching) for window overbright halation. | Solar position from time-of-day slider $t \in [6.0, 22.0]$ hours:<br>$\alpha = \frac{t - 6}{16}\pi$,<br>$\theta_{\text{elev}} = \max(0.05, \sin(\alpha)\cdot 58^\circ)$,<br>$\phi_{\text{azim}} = -65^\circ + \cos(\alpha)\cdot 75^\circ$.<br>Kelvin color temperature LUT interpolates from `0xff9e5e` (06:30 Golden Morning) $\rightarrow$ `0xfff8eb` (13:00 High Noon) $\rightarrow$ `0xff7b38` (18:30 Golden Hour) $\rightarrow$ `0x223659` (21:30 Warsaw Blue/Night streetlamp). |
| **Window Area Fill & Soft Shadows** | `DirectionalLight` with `2048x2048` `PCFSoftShadowMap` (`shadow.bias = -0.0004`, `shadow.normalBias = 0.02`) casting crisp window-mullion bars across the wardrobe doors and parquet floor, paired with `RectAreaLight` + `RectAreaLightUniformsLib.init()` mounted inside the window reveal for physically accurate diffuse sky bounce. | Window blind / sheer curtain toggle modulates `RectAreaLight.intensity` and volumetric shaft opacity. |
| **Drifting Dust Motes (`THREE.Points`)** | `400–800` particles confined to the window sunbeam bounding volume using a custom `ShaderMaterial` or per-frame buffer update. Each mote drifts along a slow curl/Brownian trajectory: $p_i(t) = p_{i,0} + \vec{v}_i t + A\sin(\omega_i t + \phi_i)$, with alpha multiplied by the analytic point-in-frustum test against the sunbeam slab so motes **only glow when passing through direct sunlight**. | Particle size `2.5–6.0 px` with radial Gaussian soft-circle `gl_PointCoord` falloff (`exp(-r^2 * 4.0)`). |
| **PBR Wood Anisotropy, Lacquer Clearcoat & Planar Mirror (`Reflector`)** | Procedural `512x512` `CanvasTexture` generators synthesize continuous organic wood grain fibers, cathedral rings, and corresponding normal/roughness maps.<br>- **Oak / Walnut (`Dąb Halifaks`, `Orzech Warmia`)**: `THREE.MeshPhysicalMaterial` with `roughness: 0.38`, `anisotropy: 0.72`, `anisotropyRotation: 0` (vertical stiles/doors) or $\pi/2$ (horizontal shelves/top), `clearcoat: 0.35`, `clearcoatRoughness: 0.18`.<br>- **Matte Lacquered MDF (`Kaszmir`, `Biel Alpejska`, `Szałwia`, `Antracyt`)**: `roughness: 0.52`, `clearcoat: 0.15`, subtle micro-stipple bump.<br>- **Mirror Door Insert (`Lustro Srebrne / Grafitowe`)**: `three/addons/objects/Reflector.js` (`clipBias: 0.003`, half-res render target) or high-metalness `PMREMGenerator` `RoomEnvironment` reflection pass. | Edge banding (`Okleina ABS 2mm`) rendered via distinct bevel/edge UV or `RoundedBoxGeometry` (`radius: 0.002 m`) so `18 mm` laminated boards read as real joinery rather than razor-sharp CG boxes. |

### 3. Procedural WebAudio API Soundscape & Spatialized Carpentry Foley

All audio is generated **100% procedurally via the native browser `AudioContext`** (zero external `.mp3`/`.wav` network dependencies that could 404 or violate offline self-containment):

1. **Spatialized Mechanical Carpentry Foley (`PannerNode` with `panningModel = 'HRTF'`)**:
   - Attached in 3D world space to the specific wardrobe bay, drawer, or door being interacted with:
     - **Ball-Bearing Drawer Slide (`Prowadnica kulkowa / Blum Tandembox`)**: White noise buffer routed through a resonant `BiquadFilterNode` (`type: 'bandpass'`, `Q: 4.0`), frequency sweeping `380 Hz → 680 Hz → 220 Hz` over `0.65 s` as the drawer glides along its Z-axis (`panner.positionZ.linearRampToValueAtTime`).
     - **Blumotion Pneumatic Soft-Close Damper + Wooden Seal**: Two-stage synthesis: (a) high-passed airy pneumatic damper hiss (`1600 Hz → 850 Hz` bandpass, `0.65 s – 1.55 s`), followed by (b) a damped low-frequency `triangle` oscillator pitch-dropping `92 Hz → 36 Hz` over `120 ms` through a cabinet body resonance filter to reproduce the unmistakable muted thud of an `18 mm` laminated door sealing against a soft bumper.
     - **Steel Tape Measure (`Miarka stolarska`)**: When toggling dimension overlays or snapping bay widths in CAD mode, a crisp high-Q metallic click impulse (`2800 Hz` burst, `18 ms` decay) on each `32 mm` / `50 mm` increment and a rapid spring-retract rattle (`12` micro-impulses spaced `14 ms` apart) when closing the measurement tool.
     - **32mm Shelf Pin Drop (`Podpórka półki fi 5mm`)**: Short metallic ping (`1950 Hz` sine + `4200 Hz` overtone, `45 ms` exponential decay) when snapping a shelf into a new hole row.
2. **Polish Apartment Window Street Ambiance & Rain Toggle**:
   - Positioned at the window world coordinates `(windowX, windowY, windowZ)` via an HRTF `PannerNode`:
     - **Distant Traffic & Warsaw/Kraków Tram Rumble**: Pink noise ($1/f$ spectrum) low-pass filtered at `240 Hz` (muffled when window is closed) or `1400 Hz` (when window is tilted open), modulated by a slow `0.07 Hz` LFO, plus periodic distant tram rail hum (`110 Hz + 165 Hz` fifth harmonic with Doppler pan across the window X-axis every ~25 seconds).
     - **Morning Courtyard Birds**: Sparse FM-synthesized sparrow/blackbird chirps (`carrier: 2600–3800 Hz`, `modulator: 35 Hz`, `60–110 ms` grain envelopes) active during morning/daytime sun elevations.
     - **Rain on Windowpane Toggle**: Pink noise + stochastic micro-droplet impulses (`bandpass 2200 Hz`) whose high-frequency cutoff opens up if the apartment window is cracked open.
3. **Background Lo-Fi Carpentry Studio Radio**:
   - Toggleable warm lo-fi electric piano synthesizer (`Rhodes`-style detuned sine+triangle voices playing a slow 4-bar minor-7th progression: `Dm9 → G13 → Cmaj9 → A7alt` at `72 BPM`), routed through a `BiquadFilterNode` (`lowpass 2400 Hz`), a `tanh` tape-saturation `WaveShaperNode`, subtle LFO pitch wow (`0.45 Hz`), and faint vinyl crackle impulses, spatialized to a small tabletop radio mesh in the room corner.

### 4. Procedural Articulated Quadruped Cat (`THREE.Bone` Hierarchy & Autonomous State Machine)

To bring warm **The Sims** domestic life into the room without distracting from the wardrobe product, an apartment cat is built from a hierarchical `THREE.Bone` rig with smooth rounded geometry (`RoundedBoxGeometry` / `CapsuleGeometry` / `SphereGeometry`):

- **Skeletal Rig (`19` Bones)**:
  - `pelvis` (root at hip height `y ≈ 0.26 m`) $\rightarrow$ `chest` $\rightarrow$ `neck` $\rightarrow$ `head` (with ears, snout, blinking eyes)
  - `tail_0 .. tail_4` (5-segment traveling-wave sinusoidal spine attached to `pelvis`)
  - Four 3-bone limbs (`FL`, `FR`, `BL`, `BR`), each comprising `upperLeg` $\rightarrow$ `lowerLeg` $\rightarrow$ `paw` (with anatomically accurate backward-flexing front elbows vs. forward-flexing rear stifles/hocks).
- **Lateral-Sequence Walk Gait**:
  - Phase offsets: $\phi_{\text{BL}} = 0$, $\phi_{\text{FL}} = \frac{\pi}{2}$, $\phi_{\text{BR}} = \pi$, $\phi_{\text{FR}} = \frac{3\pi}{2}$.
  - Swing phase ($\cos(\omega t + \phi) > 0$) lifts the paw and advances the shoulder/hip; stance phase ($\cos(\omega t + \phi) \le 0$) sweeps backward on the floor plane, synchronized with a double-frequency pelvis vertical bounce ($|\sin(\omega t)| \cdot 0.014\text{ m}$) and spine yaw bending into trajectory turns ($\kappa = \Delta\theta / \Delta s$).
- **4-State Autonomous & Interactive Behavior FSM**:
  1. `STROLLING`: Walks a smooth Catmull-Rom / lemniscate path around the room rug and in front of the wardrobe, dynamically steering around the player's first-person position.
  2. `INSPECTING_WARDROBE`: Walks up to the open wardrobe plinth/lower bay, looks up at the shelves (`head.rotation.x = -0.45`), and twitches its tail.
  3. `JUMPING_TO_SHELF`: Executes a physically parameterized parabolic arc $y(u) = (1-u)y_0 + u y_1 + 4 h_{\text{apex}} u(1-u)$ onto a lower open wardrobe shelf (`y ≈ 0.45–0.65 m`) if a bay door is open, tucking forelegs during ascent and extending them on landing, then sitting proudly inside the wardrobe bay (visually demonstrating real shelf depth `550–600 mm` and clearance!).
  4. `SLEEPING_ON_RUG`: Curls into a torus-like posture on the woven apartment rug (`chest.rotation.y = 0.65`, `tail` wrapped around paws) with a `0.35 Hz` chest-breathing scale oscillation and an optional quiet `26 Hz + 52 Hz` amplitude-modulated WebAudio purr when the camera is within `1.8 m`.

---

## Part II: Clean-Room Prompt Specification (`prompt-architecture` 7-Category Contract)

The prompt below is architected strictly according to `/home/operator/.gemini/config/skills/prompt-architecture/SKILL.md`. It is designed to be seeded as `BRIEF-CLEAN.md` into each isolated worker VM (`worker-agent1..5`) alongside `SPINE.json`—with **zero shared HTML/JS/CSS templates, zero sibling visibility, and zero layout/aesthetic pre-decisions** so each frontier model expresses its full architectural and visual taste.

```markdown
# CLEAN-ROOM BUILD BRIEF: 3D Walk-In Room & Bespoke Wardrobe Simulator ("Meble Na Wymiar — Immersive Studio")

## 1. [FRAME] Role, Environment & Architectural Mandate
You are a principal creative technologist, 3D graphics engineer, and Polish bespoke furniture ("meble na wymiar") systems architect running inside an isolated clean-room build environment.
Your task is to design and implement a complete, self-contained, single-file interactive 3D web application (`index.html`) that merges:
1. **GTA6 / First-Person Architectural Walk-In Immersion**: Stepping physically into a sunlit Polish apartment room, walking around with smooth collision and spatial audio, opening cabinet doors and drawers by hand, and observing realistic sunlight shafts and dust motes.
2. **The Sims 4 Build/Buy + Precision CAD Carpentry Configurator**: Seamlessly gliding the camera from First-Person Walk Mode into Orbital/Elevation CAD Mode to configure a custom Polish walk-in/reach-in wardrobe (`szafa na wymiar`) with live System-32 (`32 mm` grid) bay/shelf/drawer snapping, real `18 mm` board-thickness joinery math, live millimeter dimensioning, and instant Polish BOM + PLN quote generation.

You are building in a strict clean room. Rely exclusively on the domain facts in this specification and your own best engineering and aesthetic judgment.

---

## 2. [SPEC] Verifiable Functional & Domain Requirements

### A. Polish Bespoke Carpentry Spine ("Meble Na Wymiar" Engineering Truth)
Every wardrobe geometry update and BOM calculation MUST obey real Polish carpentry standards:
1. **Envelope & Dimensions**:
   - Configurable Total Width $W \in [1200, 4200]\text{ mm}$, Total Height $H \in [2000, 2750]\text{ mm}$, Total Depth $D \in [450, 700]\text{ mm}$, Plinth/Toe-Kick Height $H_{\text{plinth}} \in [60, 120]\text{ mm}$, and Filler Scribing Strips (`blendy maskujące`) $B_L, B_R, B_{\text{top}} \in [0, 100]\text{ mm}$.
   - Room dimensions adapt or frame the wardrobe niche (e.g., apartment room $4.8\text{ m} \times 4.2\text{ m}$, ceiling height $2.75\text{ m}$, with a recessed alcove or main wall for the wardrobe, herringbone/plank oak parquet floor, window on the perpendicular wall, baseboard trim, and a woven rug).
2. **Board Thickness & System-32 Joinery Math**:
   - Laminated chipboard / MDF thickness: $t = 18\text{ mm}$ (`płyta meblowa laminowana 18 mm`, Egger / Kronospan / Swiss Krono standard); back panel HDF thickness: $t_{\text{HDF}} = 4\text{ mm}$ (`płyta HDF 4 mm wpuszczana / przybijana`).
   - For $N_{\text{bays}} \in \{2, 3, 4, 5\}$ vertical bays (`sekcje`), there are $2$ outer gables (`boki zewnętrzne`) and $(N_{\text{bays}} - 1)$ internal vertical partitions (`przegrody wewnętrzne`), consuming $(N_{\text{bays}} + 1) \times 18\text{ mm}$ of horizontal width.
   - Internal clear width of bay $i$ (for equal distribution):
     $$W_{\text{bay}} = \frac{W_{\text{carcass}} - (N_{\text{bays}} + 1)\times 18}{N_{\text{bays}}}\text{ mm}$$
     where $W_{\text{carcass}} = W - B_L - B_R$.
   - Internal clear height: $H_{\text{internal}} = H - B_{\text{top}} - H_{\text{plinth}} - 2 \times 18\text{ mm}$.
   - Shelves (`półki`) and hanging rods (`drążki ubraniowe`) snap vertically to the **32 mm Euro-system drilling grid** ($\Delta y = 32\text{ mm}$).
   - **Span Deflection Guardrail**: Any shelf or hanging rod in a bay where $W_{\text{bay}} > 900\text{ mm}$ under heavy load MUST trigger a live structural warning (`Ugięcie półki >1.8 mm — zalecana przegroda lub podwójna płyta 36 mm`) and highlight in the 3D CAD overlay.
3. **Interactive Interior Modules & Fronts (Per-Bay Configuration)**:
   - Each bay is independently interactive in 3D (click/drag in CAD mode to add, remove, or reposition along the `32 mm` grid):
     - **Shelves (`Półki nastawne 18 mm`)**
     - **Hanging Rods (`Drążki chromowane / czarne matowe` — high coat zone vs. double short-hang zone)** with 3D procedural hangers/garment silhouettes toggleable
     - **Drawers (`Szuflady Blum Tandembox / Movento cichy domyk`)** with configurable heights (`140 mm`, `180 mm`, `220 mm`) that physically slide out on click/hover
     - **Pull-out Trousers Rack / Wire Basket (`Wieszak na spodnie / Kosz Cargo`)**
   - **Front System (`System frontów`)**:
     - Switchable between **Hinged Doors (`Drzwi uchylne na zawiasach Blum Clip Top Blumotion 110°`)**, **Sliding Doors (`System przesuwny Sevroll / Laguna w ramkach aluminiowych`)**, or **Open Walk-In (`Garderoba otwarta`)**.
     - Individual doors and drawers MUST open and close smoothly when clicked in both First-Person and CAD modes, or via a master door/drawer state control.
4. **Authentic Polish Decors & Hardware Pricing Spine (Live BOM & Cut-List)**:
   - Minimum 6 realistic PBR surface decors:
     - `Dąb Halifaks Naturalny (Egger H1180)` — warm structured oak with anisotropic grain (`185 PLN/m²`)
     - `Orzech Warmia (Kronospan K009)` — deep roasted walnut with satin clearcoat (`195 PLN/m²`)
     - `Kaszmir Mat (Kronospan 5981 BS)` — warm greige architectural matte (`170 PLN/m²`)
     - `Biel Alpejska Mat (Egger W1100)` — crisp alpine white matte (`150 PLN/m²`)
     - `Szałwia / Zieleń Butelkowa Mat (Egger U636)` — muted sage/forest green (`180 PLN/m²`)
     - `Lustro Srebrne / Grafitowe 4 mm` — real-time planar `Reflector` or high-specularity mirror front insert (`+260 PLN/m²`)
   - Live BOM & Quote engine calculates:
     - Exact board area $\text{m}^2$ + `15%` kerf/offcut waste factor (`odpad produkcyjny`) and standard sheet count (`formatka 2800 × 2070 mm = 5.796 m²/arkusz`).
     - Edge banding (`Okleina PCV/ABS 2 mm` at `4.50 PLN/mb`) across all exposed front/shelf/gable edges.
     - Hardware count (`Zawiasy Blum Clip Top Blumotion` at `28 PLN/szt` — 3 per door $<2000\text{ mm}$, 4 per door $\ge 2000\text{ mm}$, 5 per door $\ge 2400\text{ mm}$; `Prowadnice Blum Movento/Tandembox` at `165 PLN/kpl`; `Drążek + rozetki` at `45 PLN/szt`).
     - Carpentry labor + CNC nesting + installation (`Robocizna, rozkrój CNC i montaż`) and itemized `Netto` + `VAT (8% montaż mieszkaniowy / 23% sam mebel)` + `Brutto PLN`.

### B. Dual-Camera Experience (First-Person Walk-In ↔ Orbital/Snap CAD)
1. **First-Person Walk-In Mode (`GTA6` Apartment Entry)**:
   - Supports WASD / Arrow movement + mouse look (`PointerLockControls` with a fallback drag-look mode so automated headless browsers and trackpad users without pointer-lock permission can still look and walk effortlessly).
   - Eye-level camera (`y = 1.68 m`) with subtle walking head-bob, smooth acceleration/deceleration, and AABB collision against room walls and the wardrobe carcass so the user cannot walk through solid geometry.
   - Center crosshair / contextual interaction prompt when looking at a wardrobe door, drawer, shelf, window, radio, or the apartment cat (`[Click / E] Open Door`, `[Click / E] Slide Drawer`, `[Click / E] Toggle Window`, `[Click / E] Pet Cat`).
2. **Precision CAD / Sims Build Mode (`OrbitControls` + Direct 3D Manipulation)**:
   - Seamless animated transition (`~0.8–1.2 s` position lerp + quaternion slerp) between First-Person Walk Mode and CAD Mode (triggered via UI button or `TAB`/`C` key).
   - In CAD Mode, users can orbit, pan, zoom, toggle an orthographic Front Elevation blueprint view (`Widok Elewacji / Rzut Techniczny`), drag shelves/drawers vertically with `32 mm` grid snapping, click bays to cycle interior presets, and inspect live millimeter dimension lines (`Wymiary w mm`) rendered directly in 3D space.

### C. Real Lighting, Volumetric Sunbeams, Dust Motes & PBR Shaders
1. **Apartment Window & Time-of-Day Solar Engine**:
   - The room features a detailed architectural window (frame, mullions, glass panes, exterior balcony/courtyard depth backdrop) on a side wall.
   - A continuous **Time-of-Day / Sun Angle Slider** (`06:00` Dawn $\rightarrow$ `09:30` Morning Sunbeams $\rightarrow$ `17:30` Golden Hour $\rightarrow$ `22:00` Night + Warm Wardrobe LED Strip Lighting).
2. **Volumetric Sunbeams (God-Rays) & Floating Dust Motes**:
   - Sunlight streaming through the window panes projects visible **3D volumetric sunbeam shafts** across the room and onto the wardrobe face, paired with crisp `PCFSoftShadowMap` window-frame shadows (`2048×2048`).
   - `300–800` drifting **3D dust motes (`THREE.Points`)** float lazily on air currents and illuminate brightly where they intersect the volumetric sunbeam shafts.
   - Interior **Warm LED Wardrobe Lighting (`Taśma LED COB 3000K w profilu wpuszczanym`)** automatically illuminates inside the wardrobe bays when doors open or when the room transitions to evening/night.
3. **Physical Materials (`MeshPhysicalMaterial` + Planar `Reflector`)**:
   - Procedural high-resolution wood grain / normal / roughness textures with `anisotropy` and `clearcoat` lacquer response, plus a working mirror reflection on any door configured with a mirror panel (`Lustro`).

### D. Living Environment Details (Procedural WebAudio API + Articulated Apartment Cat)
1. **100% Procedural WebAudio API Sound Engine (With Mute / Volume Mixer)**:
   - Synthesized entirely in code via `AudioContext` (zero external audio URLs):
     - **Mechanical Carpentry Sounds (Spatialized via `PannerNode`)**:
       - *Blum Soft-Close Door Thud*: Pneumatic damper airy deceleration hiss followed by a warm `90 Hz → 38 Hz` damped wooden seal thud when a door closes.
       - *Drawer Slide Glide*: Bandpass-filtered ball-bearing rail sweep when opening/closing drawers.
       - *Tape Measure Snap & System-32 Click*: Crisp metallic click when dragging/snapping dimensions or shelves on the `32 mm` grid, and a spring-retract snap when toggling dimension mode.
     - **Polish City Street Window Ambiance + Rain Toggle**:
       - Muffled exterior courtyard birds, distant Warsaw/Kraków tram/traffic hum, and an interactive **Rain Toggle (`Deszcz za oknem`)** with procedural raindrop pattering on the glass. Opening/tilting the apartment window dynamically raises the low-pass filter cutoff (`250 Hz → 1800 Hz`) so outside sounds become clearer!
     - **Lo-Fi Studio Radio**:
       - Toggleable warm procedural lo-fi chord/vinyl generator emanating from a physical radio prop in the room.
2. **Animated Apartment Cat (`THREE.Bone` / Articulated Quadruped)**:
   - An articulated 3D apartment cat (head, ears, torso/spine, 5-segment sinusoidal tail, 4 multi-jointed legs with a natural lateral-sequence walk gait) lives in the room.
   - Runs an autonomous state machine (and responds when clicked):
     - **Strolling** around the room rug and wardrobe front.
     - **Jumping onto a lower wardrobe shelf** via a smooth parabolic jump arc when a lower wardrobe bay is accessible/open, sitting inside the bay for a few seconds before hopping back down.
     - **Curling up on the rug** with a gentle breathing animation (and subtle purr audio when nearby).

---

## 3. [GUARDRAILS] Hard Constraints & Anti-Patterns (Never Violate)
1. **Single Self-Contained Deliverable**: Output a single runnable `/tmp/cleanroom-build/index.html` (or your current working directory's `index.html`). All HTML, CSS, and JavaScript MUST reside in that single file.
2. **Permitted External Imports**: You may ONLY load standard open-source 3D/tween libraries via reliable CDN (`unpkg.com` or `cdn.jsdelivr.net` ES module `<script type="importmap">` for `three` `0.164.0+` and `three/addons/`). Do NOT fetch external `.glb`, `.gltf`, `.obj`, `.jpg`, `.png`, `.mp3`, or `.wav` asset files—all geometry, textures (`CanvasTexture`), and audio (`AudioContext`) MUST be generated procedurally so the app runs with zero broken network assets.
3. **Zero Truncation / Zero Placeholders**: Never emit `// TODO`, `/* rest of code */`, or stubbed functions. Every control in the UI must be wired to live 3D scene state and live BOM math.
4. **Headless & Non-PointerLock Resilience**: Because automated Playwright verification and trackpad users may not grant browser `requestPointerLock()`, First-Person Walk Mode MUST support **both** `PointerLockControls` (when clicked on canvas) **and** click-drag mouse look + WASD/UI movement buttons so every feature is 100% testable without pointer lock.
5. **Product Centrality**: The living environment (sunbeams, audio, apartment cat) exists to elevate the spatial realism and scale of the **Polish bespoke wardrobe (`szafa na wymiar`)**. The wardrobe must remain the hero centerpiece of the room and the primary interactive subject.

---

## 4. [AGENCY] Creative & Architectural Freedom (Your Call)
You have **100% creative ownership** over:
- **Visual & UI Aesthetic Direction**: Do NOT copy generic 3-column dark-mode dashboard boilerplates. Invent your own unmistakable UI architecture—whether that is a sleek diegetic GTA6/Sims HUD with floating glassmorphic radial/dock palettes, a Scandinavian/Warsaw architectural studio workbench, an editorial split-canvas with collapsible CAD drawers, or a tactile hardware-inspired control deck.
- **Typography, Palette & Micro-Interactions**: Choose your own font pairings (via Google Fonts), color tokens, HUD animations, camera easing curves, and 3D dimension-line styling.
- **Shader & Procedural Craft**: Design your own custom GLSL shaders or Three.js node materials for the volumetric sunbeams, dust motes, wood grain fibers, and apartment window backdrop.

---

## 5. [ARBITRATION] Priority Order Under Conflict
When trade-offs arise during implementation, resolve them in this strict order:
1. **Runtime Stability & Zero Console Errors** (60 FPS WebGL render loop, defensive WebAudio initialization on first user gesture + programmatic trigger support, clean resize handling)
2. **3D Carpentry & Spatial Fidelity** (accurate `18 mm` board geometry, `32 mm` shelf snapping, working doors/drawers, volumetric sunbeams + shadows, smooth First-Person ↔ CAD camera transitions)
3. **Living Room Immersion** (procedural WebAudio Foley + window ambiance + articulated cat walking/jumping onto shelf/curling on rug)
4. **HUD / BOM Polish** (live Polish cut-list, sheet count, VAT 8%/23% toggle, and exportable specification summary)

---

## 6. [OUTPUT] Deliverable & Verification Contract
Write the complete, production-ready application to `index.html` in your current working directory.
Before finishing, verify that:
- `index.html` is a complete HTML5 document starting with `<!DOCTYPE html>` and ending with `</html>`.
- All 4 pillars (1: First-Person Walk-In ↔ CAD Camera Transition; 2: Volumetric Sunbeams + Time-of-Day + Dust Motes + PBR Wood/Mirror; 3: Procedural WebAudio Radio/Street/Rain/Blum Carpentry Foley; 4: Articulated Cat Walking/Jumping to Shelf/Sleeping on Rug + Full Polish Wardrobe Configurator & BOM) are fully implemented and interactive.

---

## 7. [TONE] Engineering & Design Stance
Build with uncompromising technical depth: write real 3D kinematics, real acoustic synthesis envelopes, real volumetric shaders, and authentic Polish stolarz carpentry math.
```

---

## Part III: Anti-Convergence & Clean-Room Verification Rubric (`eval_gate` + Pairwise Divergence)

To verify that all 5 builders (`claude-fable-5-1`, `gpt-6-astra`, `gemini-4-argon-high`, `grok-4.7`, `qwen3.8-max`) satisfy the functional contract **without converging on a shared scaffold**, the automated post-build gate runs two orthogonal checks:

### 1. Deterministic Functional & Visual Gate (`Playwright` + `WebGL` Telemetry)
1. **Boot & WebGL Context Health**: Page loads with `0` uncaught `pageerror` exceptions; `canvas` element covers full viewport (`width >= 1280, height >= 720`); WebGL2 context reports active draw calls.
2. **Camera Mode Transition**: Triggering First-Person Walk Mode (`PointerLock` / WASD look) ↔ Orbital CAD Mode interpolates `camera.position` and `camera.quaternion` smoothly without NaN or gimbal lock.
3. **Solar & Volumetric Response**: Sweeping the Time-of-Day control from `07:00` to `21:00` updates the primary `DirectionalLight` azimuth/elevation, volumetric sunbeam shader uniforms, and interior LED strip intensity.
4. **Wardrobe Joinery & BOM Reactivity**: Changing width $W$, bay count $N_{\text{bays}}$, or front decor updates the 3D carcass mesh count, recalculates $W_{\text{bay}}$ using the $18\text{ mm}$ board thickness formula, and updates the PLN quote + `2800×2070 mm` sheet count.
5. **Procedural WebAudio & Cat FSM**: Inspecting the `AudioContext` graph confirms procedural oscillator/noise/filter/panner synthesis (with zero external `.mp3`/`.wav` network requests), and the articulated cat rig (`THREE.Bone` / `Group` hierarchy) animates across `STROLLING`, `JUMPING_TO_SHELF`, and `SLEEPING_ON_RUG` states.

### 2. Clean-Room Pairwise Divergence Gate (Anti-Contamination)
- Compute pairwise normalized token Jaccard similarity $J(A, B) = \frac{|T_A \cap T_B|}{|T_A \cup T_B|}$ and CSS selector / DOM hierarchy overlap across all $\binom{5}{2} = 10$ pairs of `index.html` outputs.
- **Hard Pass Threshold**: Every pair must satisfy $J(A, B) < 0.35$, and each output must carry a verified `PROVENANCE.json` receipt proving execution on its dedicated `worker-agent1..5` VM (`hostname != srv1533069`).
