@vib3code/sdk 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/CHANGELOG.md +118 -0
  2. package/DOCS/BLUEPRINT_EXECUTION_PLAN_2026-01-07.md +34 -0
  3. package/DOCS/CI_TESTING.md +38 -0
  4. package/DOCS/CLI_ONBOARDING.md +75 -0
  5. package/DOCS/CONTROL_REFERENCE.md +64 -0
  6. package/DOCS/DEV_TRACK_ANALYSIS.md +77 -0
  7. package/DOCS/DEV_TRACK_PLAN_2026-01-07.md +42 -0
  8. package/DOCS/DEV_TRACK_SESSION_2026-01-31.md +220 -0
  9. package/DOCS/ENV_SETUP.md +189 -0
  10. package/DOCS/EXPORT_FORMATS.md +417 -0
  11. package/DOCS/GPU_DISPOSAL_GUIDE.md +21 -0
  12. package/DOCS/LICENSING_TIERS.md +275 -0
  13. package/DOCS/MASTER_PLAN_2026-01-31.md +570 -0
  14. package/DOCS/OBS_SETUP_GUIDE.md +98 -0
  15. package/DOCS/PROJECT_SETUP.md +66 -0
  16. package/DOCS/RENDERER_LIFECYCLE.md +40 -0
  17. package/DOCS/REPO_MANIFEST.md +121 -0
  18. package/DOCS/SESSION_014_PLAN.md +195 -0
  19. package/DOCS/SESSION_LOG_2026-01-07.md +56 -0
  20. package/DOCS/STRATEGIC_BLUEPRINT_2026-01-07.md +72 -0
  21. package/DOCS/SYSTEM_AUDIT_2026-01-30.md +738 -0
  22. package/DOCS/SYSTEM_INVENTORY.md +520 -0
  23. package/DOCS/TELEMETRY_EXPORTS.md +34 -0
  24. package/DOCS/WEBGPU_STATUS.md +38 -0
  25. package/DOCS/XR_BENCHMARKS.md +608 -0
  26. package/LICENSE +21 -0
  27. package/README.md +426 -0
  28. package/docs/.nojekyll +0 -0
  29. package/docs/01-dissolution_of_euclidean_hegemony.html +346 -0
  30. package/docs/02-hyperspatial_ego_death.html +346 -0
  31. package/docs/03-post_cartesian_sublime.html +346 -0
  32. package/docs/04-crystalline_void_meditation.html +346 -0
  33. package/docs/05-quantum_decoherence_ballet.html +346 -0
  34. package/docs/06-dissolution_of_euclidean_hegemony.html +346 -0
  35. package/docs/07-hyperspatial_ego_death.html +346 -0
  36. package/docs/08-post_cartesian_sublime.html +346 -0
  37. package/docs/09-crystalline_void_meditation.html +346 -0
  38. package/docs/10-quantum_decoherence_ballet.html +346 -0
  39. package/docs/11-dissolution_of_euclidean_hegemony.html +346 -0
  40. package/docs/12-hyperspatial_ego_death.html +346 -0
  41. package/docs/13-post_cartesian_sublime.html +346 -0
  42. package/docs/index.html +794 -0
  43. package/docs/test-hub.html +441 -0
  44. package/docs/url-state.js +102 -0
  45. package/docs/vib3-exports/01-quantum-quantum-tetrahedron-lattice.html +489 -0
  46. package/docs/vib3-exports/02-quantum-quantum-hypersphere-matrix.html +489 -0
  47. package/docs/vib3-exports/03-quantum-quantum-hypertetra-fractal.html +489 -0
  48. package/docs/vib3-exports/04-faceted-faceted-crystal-structure.html +407 -0
  49. package/docs/vib3-exports/05-faceted-faceted-klein-bottle.html +407 -0
  50. package/docs/vib3-exports/06-faceted-faceted-hypertetra-torus.html +407 -0
  51. package/docs/vib3-exports/07-holographic-holographic-wave-field.html +457 -0
  52. package/docs/vib3-exports/08-holographic-holographic-hypersphere-sphere.html +457 -0
  53. package/docs/vib3-exports/09-holographic-holographic-hypertetra-crystal.html +457 -0
  54. package/docs/vib3-exports/index.html +238 -0
  55. package/docs/webgpu-live.html +702 -0
  56. package/package.json +367 -0
  57. package/src/advanced/AIPresetGenerator.js +777 -0
  58. package/src/advanced/MIDIController.js +703 -0
  59. package/src/advanced/OffscreenWorker.js +1051 -0
  60. package/src/advanced/WebGPUCompute.js +1051 -0
  61. package/src/advanced/WebXRRenderer.js +680 -0
  62. package/src/agent/cli/AgentCLI.js +615 -0
  63. package/src/agent/cli/index.js +14 -0
  64. package/src/agent/index.js +73 -0
  65. package/src/agent/mcp/MCPServer.js +950 -0
  66. package/src/agent/mcp/index.js +9 -0
  67. package/src/agent/mcp/tools.js +548 -0
  68. package/src/agent/telemetry/EventStream.js +669 -0
  69. package/src/agent/telemetry/Instrumentation.js +618 -0
  70. package/src/agent/telemetry/TelemetryExporters.js +427 -0
  71. package/src/agent/telemetry/TelemetryService.js +464 -0
  72. package/src/agent/telemetry/index.js +52 -0
  73. package/src/benchmarks/BenchmarkRunner.js +381 -0
  74. package/src/benchmarks/MetricsCollector.js +299 -0
  75. package/src/benchmarks/index.js +9 -0
  76. package/src/benchmarks/scenes.js +259 -0
  77. package/src/cli/index.js +675 -0
  78. package/src/config/ApiConfig.js +88 -0
  79. package/src/core/CanvasManager.js +217 -0
  80. package/src/core/ErrorReporter.js +117 -0
  81. package/src/core/ParameterMapper.js +333 -0
  82. package/src/core/Parameters.js +396 -0
  83. package/src/core/RendererContracts.js +200 -0
  84. package/src/core/UnifiedResourceManager.js +370 -0
  85. package/src/core/VIB3Engine.js +636 -0
  86. package/src/core/renderers/FacetedRendererAdapter.js +32 -0
  87. package/src/core/renderers/HolographicRendererAdapter.js +29 -0
  88. package/src/core/renderers/QuantumRendererAdapter.js +29 -0
  89. package/src/core/renderers/RendererLifecycleManager.js +63 -0
  90. package/src/creative/ColorPresetsSystem.js +980 -0
  91. package/src/creative/ParameterTimeline.js +1061 -0
  92. package/src/creative/PostProcessingPipeline.js +1113 -0
  93. package/src/creative/TransitionAnimator.js +683 -0
  94. package/src/export/CSSExporter.js +226 -0
  95. package/src/export/CardGeneratorBase.js +279 -0
  96. package/src/export/ExportManager.js +580 -0
  97. package/src/export/FacetedCardGenerator.js +279 -0
  98. package/src/export/HolographicCardGenerator.js +543 -0
  99. package/src/export/LottieExporter.js +552 -0
  100. package/src/export/QuantumCardGenerator.js +315 -0
  101. package/src/export/SVGExporter.js +519 -0
  102. package/src/export/ShaderExporter.js +903 -0
  103. package/src/export/TradingCardGenerator.js +3055 -0
  104. package/src/export/TradingCardManager.js +181 -0
  105. package/src/export/VIB3PackageExporter.js +559 -0
  106. package/src/export/index.js +14 -0
  107. package/src/export/systems/TradingCardSystemFaceted.js +494 -0
  108. package/src/export/systems/TradingCardSystemHolographic.js +452 -0
  109. package/src/export/systems/TradingCardSystemQuantum.js +411 -0
  110. package/src/faceted/FacetedSystem.js +963 -0
  111. package/src/features/CollectionManager.js +433 -0
  112. package/src/gallery/CollectionManager.js +240 -0
  113. package/src/gallery/GallerySystem.js +485 -0
  114. package/src/geometry/GeometryFactory.js +314 -0
  115. package/src/geometry/GeometryLibrary.js +72 -0
  116. package/src/geometry/buffers/BufferBuilder.js +338 -0
  117. package/src/geometry/buffers/index.js +18 -0
  118. package/src/geometry/generators/Crystal.js +420 -0
  119. package/src/geometry/generators/Fractal.js +298 -0
  120. package/src/geometry/generators/KleinBottle.js +197 -0
  121. package/src/geometry/generators/Sphere.js +192 -0
  122. package/src/geometry/generators/Tesseract.js +160 -0
  123. package/src/geometry/generators/Tetrahedron.js +225 -0
  124. package/src/geometry/generators/Torus.js +304 -0
  125. package/src/geometry/generators/Wave.js +341 -0
  126. package/src/geometry/index.js +142 -0
  127. package/src/geometry/warp/HypersphereCore.js +211 -0
  128. package/src/geometry/warp/HypertetraCore.js +386 -0
  129. package/src/geometry/warp/index.js +57 -0
  130. package/src/holograms/HolographicVisualizer.js +1073 -0
  131. package/src/holograms/RealHolographicSystem.js +966 -0
  132. package/src/holograms/variantRegistry.js +69 -0
  133. package/src/integrations/FigmaPlugin.js +854 -0
  134. package/src/integrations/OBSMode.js +754 -0
  135. package/src/integrations/ThreeJsPackage.js +660 -0
  136. package/src/integrations/TouchDesignerExport.js +552 -0
  137. package/src/integrations/frameworks/Vib3React.js +591 -0
  138. package/src/integrations/frameworks/Vib3Svelte.js +654 -0
  139. package/src/integrations/frameworks/Vib3Vue.js +628 -0
  140. package/src/llm/LLMParameterInterface.js +240 -0
  141. package/src/llm/LLMParameterUI.js +577 -0
  142. package/src/math/Mat4x4.js +708 -0
  143. package/src/math/Projection.js +341 -0
  144. package/src/math/Rotor4D.js +637 -0
  145. package/src/math/Vec4.js +476 -0
  146. package/src/math/constants.js +164 -0
  147. package/src/math/index.js +68 -0
  148. package/src/math/projections.js +54 -0
  149. package/src/math/rotations.js +196 -0
  150. package/src/quantum/QuantumEngine.js +906 -0
  151. package/src/quantum/QuantumVisualizer.js +1103 -0
  152. package/src/reactivity/ReactivityConfig.js +499 -0
  153. package/src/reactivity/ReactivityManager.js +586 -0
  154. package/src/reactivity/SpatialInputSystem.js +1783 -0
  155. package/src/reactivity/index.js +93 -0
  156. package/src/render/CommandBuffer.js +465 -0
  157. package/src/render/MultiCanvasBridge.js +340 -0
  158. package/src/render/RenderCommand.js +514 -0
  159. package/src/render/RenderResourceRegistry.js +523 -0
  160. package/src/render/RenderState.js +552 -0
  161. package/src/render/RenderTarget.js +512 -0
  162. package/src/render/ShaderLoader.js +253 -0
  163. package/src/render/ShaderProgram.js +599 -0
  164. package/src/render/UnifiedRenderBridge.js +496 -0
  165. package/src/render/backends/WebGLBackend.js +1108 -0
  166. package/src/render/backends/WebGPUBackend.js +1409 -0
  167. package/src/render/commands/CommandBufferExecutor.js +607 -0
  168. package/src/render/commands/RenderCommandBuffer.js +661 -0
  169. package/src/render/commands/index.js +17 -0
  170. package/src/render/index.js +367 -0
  171. package/src/scene/Disposable.js +498 -0
  172. package/src/scene/MemoryPool.js +618 -0
  173. package/src/scene/Node4D.js +697 -0
  174. package/src/scene/ResourceManager.js +599 -0
  175. package/src/scene/Scene4D.js +540 -0
  176. package/src/scene/index.js +98 -0
  177. package/src/schemas/error.schema.json +84 -0
  178. package/src/schemas/extension.schema.json +88 -0
  179. package/src/schemas/index.js +214 -0
  180. package/src/schemas/parameters.schema.json +142 -0
  181. package/src/schemas/tool-pack.schema.json +44 -0
  182. package/src/schemas/tool-response.schema.json +127 -0
  183. package/src/shaders/common/fullscreen.vert.glsl +5 -0
  184. package/src/shaders/common/fullscreen.vert.wgsl +17 -0
  185. package/src/shaders/common/geometry24.glsl +65 -0
  186. package/src/shaders/common/geometry24.wgsl +54 -0
  187. package/src/shaders/common/rotation4d.glsl +85 -0
  188. package/src/shaders/common/rotation4d.wgsl +86 -0
  189. package/src/shaders/common/uniforms.glsl +44 -0
  190. package/src/shaders/common/uniforms.wgsl +48 -0
  191. package/src/shaders/faceted/faceted.frag.glsl +129 -0
  192. package/src/shaders/faceted/faceted.frag.wgsl +164 -0
  193. package/src/shaders/holographic/holographic.frag.glsl +406 -0
  194. package/src/shaders/holographic/holographic.frag.wgsl +185 -0
  195. package/src/shaders/quantum/quantum.frag.glsl +513 -0
  196. package/src/shaders/quantum/quantum.frag.wgsl +361 -0
  197. package/src/testing/ParallelTestFramework.js +519 -0
  198. package/src/testing/__snapshots__/exportFormats.test.js.snap +24 -0
  199. package/src/testing/exportFormats.test.js +8 -0
  200. package/src/testing/projections.test.js +14 -0
  201. package/src/testing/rotations.test.js +37 -0
  202. package/src/ui/InteractivityMenu.js +516 -0
  203. package/src/ui/StatusManager.js +96 -0
  204. package/src/ui/adaptive/renderers/webgpu/BufferLayout.ts +252 -0
  205. package/src/ui/adaptive/renderers/webgpu/PolytopeInstanceBuffer.ts +144 -0
  206. package/src/ui/adaptive/renderers/webgpu/TripleBufferedUniform.ts +170 -0
  207. package/src/ui/adaptive/renderers/webgpu/WebGPURenderer.ts +735 -0
  208. package/src/ui/adaptive/renderers/webgpu/index.ts +112 -0
  209. package/src/variations/VariationManager.js +431 -0
  210. package/src/viewer/AudioReactivity.js +505 -0
  211. package/src/viewer/CardBending.js +481 -0
  212. package/src/viewer/GalleryUI.js +832 -0
  213. package/src/viewer/ReactivityManager.js +590 -0
  214. package/src/viewer/TradingCardExporter.js +600 -0
  215. package/src/viewer/ViewerPortal.js +374 -0
  216. package/src/viewer/index.js +12 -0
  217. package/src/wasm/WasmLoader.js +296 -0
  218. package/src/wasm/index.js +132 -0
  219. package/tools/agentic/mcpTools.js +88 -0
  220. package/tools/cli/agent-cli.js +92 -0
  221. package/tools/export/formats.js +24 -0
  222. package/tools/math/rotation-baseline.mjs +64 -0
  223. package/tools/shader-sync-verify.js +937 -0
  224. package/tools/telemetry/manifestPipeline.js +141 -0
  225. package/tools/telemetry/telemetryEvents.js +35 -0
  226. package/types/adaptive-sdk.d.ts +185 -0
  227. package/types/advanced/AIPresetGenerator.d.ts +81 -0
  228. package/types/advanced/MIDIController.d.ts +100 -0
  229. package/types/advanced/OffscreenWorker.d.ts +82 -0
  230. package/types/advanced/WebGPUCompute.d.ts +52 -0
  231. package/types/advanced/WebXRRenderer.d.ts +77 -0
  232. package/types/advanced/index.d.ts +46 -0
  233. package/types/core/ErrorReporter.d.ts +50 -0
  234. package/types/core/VIB3Engine.d.ts +204 -0
  235. package/types/creative/ColorPresetsSystem.d.ts +91 -0
  236. package/types/creative/ParameterTimeline.d.ts +74 -0
  237. package/types/creative/PostProcessingPipeline.d.ts +109 -0
  238. package/types/creative/TransitionAnimator.d.ts +71 -0
  239. package/types/creative/index.d.ts +35 -0
  240. package/types/integrations/FigmaPlugin.d.ts +46 -0
  241. package/types/integrations/OBSMode.d.ts +74 -0
  242. package/types/integrations/ThreeJsPackage.d.ts +62 -0
  243. package/types/integrations/TouchDesignerExport.d.ts +36 -0
  244. package/types/integrations/Vib3React.d.ts +74 -0
  245. package/types/integrations/Vib3Svelte.d.ts +63 -0
  246. package/types/integrations/Vib3Vue.d.ts +55 -0
  247. package/types/integrations/index.d.ts +52 -0
  248. package/types/reactivity/SpatialInputSystem.d.ts +173 -0
  249. package/types/reactivity/index.d.ts +394 -0
  250. package/types/render/CommandBuffer.d.ts +169 -0
  251. package/types/render/RenderCommand.d.ts +312 -0
  252. package/types/render/RenderState.d.ts +279 -0
  253. package/types/render/RenderTarget.d.ts +254 -0
  254. package/types/render/ShaderProgram.d.ts +277 -0
  255. package/types/render/UnifiedRenderBridge.d.ts +143 -0
  256. package/types/render/WebGLBackend.d.ts +168 -0
  257. package/types/render/WebGPUBackend.d.ts +186 -0
  258. package/types/render/index.d.ts +141 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,118 @@
1
+ # Changelog
2
+
3
+ All notable changes to VIB3+ CORE (`@vib3code/sdk`) will be documented in this file.
4
+
5
+ ## [2.0.0] — 2026-01-30
6
+
7
+ ### Added
8
+
9
+ #### SpatialInputSystem (`src/reactivity/SpatialInputSystem.js` — 1,783 lines)
10
+ - Universal spatial input system decoupling "card tilting" from physical device orientation
11
+ - 8 input source types: deviceTilt, mousePosition, gyroscope, gamepad, perspective, programmatic, audio, MIDI
12
+ - 6 built-in profiles: cardTilt, wearablePerspective, gameAsset, vjAudioSpatial, uiElement, immersiveXR
13
+ - Full serialization (exportConfig/importConfig)
14
+ - Integrated into VIB3Engine with 7 new methods
15
+
16
+ #### Creative Tooling (3,837 lines)
17
+ - `ColorPresetsSystem.js` — 22 themed color presets (Ocean, Lava, Neon, Monochrome, etc.) with group parameter application
18
+ - `TransitionAnimator.js` — 14 easing functions with smooth state interpolation and sequencing
19
+ - `PostProcessingPipeline.js` — 14 composable effects (bloom, chromatic aberration, vignette, film grain, etc.) with 7 preset chains
20
+ - `ParameterTimeline.js` — Keyframe-based parameter animation with BPM sync for music-driven sequences
21
+
22
+ #### Platform Integrations (4,693 lines)
23
+ - `Vib3React.js` — `<Vib3Canvas>` React component + `useVib3()` hook
24
+ - `Vib3Vue.js` — Vue 3 component + composable
25
+ - `Vib3Svelte.js` — Svelte component + store
26
+ - `FigmaPlugin.js` — Figma plugin manifest, code, and UI generator
27
+ - `ThreeJsPackage.js` — Three.js ShaderMaterial wrapper with 4D rotation uniforms
28
+ - `TouchDesignerExport.js` — GLSL TOP export for TouchDesigner
29
+ - `OBSMode.js` — Transparent background + OBS browser source mode
30
+
31
+ #### Advanced Features (4,262 lines)
32
+ - `WebXRRenderer.js` — WebXR VR/AR rendering with 6DOF spatial extraction
33
+ - `WebGPUCompute.js` — WGSL particle simulation + audio FFT compute shaders
34
+ - `MIDIController.js` — Web MIDI API with learn mode and CC mapping
35
+ - `AIPresetGenerator.js` — Text-to-preset via LLM + mutation/crossbreeding
36
+ - `OffscreenWorker.js` — OffscreenCanvas worker rendering + SharedArrayBuffer
37
+
38
+ #### Tooling
39
+ - `shader-sync-verify.js` — 937-line tool verifying inline shaders match external shader files across all 3 systems
40
+
41
+ ### Fixed
42
+ - Quantum system color control restored — `u_hue` and `u_saturation` now drive actual HSL color output (was using hardcoded palettes)
43
+ - Faceted system saturation wired — full `hsl2rgb()` pipeline added to GLSL + WGSL shaders
44
+ - Faceted system audio reactivity wired — `u_bass`, `u_mid`, `u_high` uniforms now drive density/morph/hue
45
+ - `clickIntensity` uniform bug fixed — was mapping to `u_mouseIntensity`, now correctly maps to `u_clickIntensity`
46
+
47
+ ---
48
+
49
+ ## [1.0.0] — 2025-12-15
50
+
51
+ ### Added
52
+
53
+ #### Core Engine
54
+ - `VIB3Engine.js` — Main orchestrator for 3 visualization systems
55
+ - `CanvasManager.js` — Canvas lifecycle management with multi-layer support
56
+ - `Parameters.js` — Parameter definitions with validation and ranges
57
+ - `ParameterMapper.js` — Parameter-to-uniform mapping across systems
58
+ - `RendererContracts.js` — Interface contracts for renderer adapters
59
+
60
+ #### Visualization Systems
61
+ - **Quantum** (`QuantumEngine.js`, `QuantumVisualizer.js`) — Complex lattice visualizations with quantum-inspired patterns, 24 geometry variants, 5-layer rendering
62
+ - **Faceted** (`FacetedSystem.js`) — Clean 2D geometric patterns with 4D rotation projection, 24 geometry variants
63
+ - **Holographic** (`RealHolographicSystem.js`, `HolographicVisualizer.js`) — 5-layer glassmorphic audio-reactive effects
64
+
65
+ #### C++ WASM Core (3,072 lines)
66
+ - `Rotor4D` — Clifford algebra Cl(4,0) 4D rotation via sandwich product
67
+ - `Mat4x4` — Column-major 4x4 matrix operations
68
+ - `Vec4` — 4-component vector operations
69
+ - 3 projection modes: perspective, stereographic, orthographic
70
+ - Emscripten bindings via `embind.cpp`
71
+ - JavaScript math fallback (`src/math/`) for environments without WASM
72
+
73
+ #### Render Infrastructure (8,400 lines)
74
+ - Dual GPU backends: WebGL 2.0 (primary) + WebGPU (secondary)
75
+ - `UnifiedRenderBridge` — Cross-backend abstraction with automatic fallback
76
+ - `ShaderProgram`, `RenderState`, `CommandBuffer`, `RenderTarget`, `RenderResourceRegistry`
77
+ - Multi-canvas coordination via `MultiCanvasBridge`
78
+ - External shader files (GLSL + WGSL) for all 3 systems
79
+
80
+ #### 24-Geometry System
81
+ - 8 base geometries: Tetrahedron, Hypercube, Sphere, Torus, Klein Bottle, Fractal, Wave, Crystal
82
+ - 3 core type warps: Base (0-7), Hypersphere (8-15), Hypertetrahedron (16-23)
83
+ - Encoding: `index = core_type * 8 + base_geometry`
84
+
85
+ #### 6D Rotation System
86
+ - 6 rotation planes: XY, XZ, YZ (3D) + XW, YW, ZW (4D)
87
+ - 3 implementations: WASM Rotor (Clifford algebra), GLSL matrices, WGSL matrices
88
+
89
+ #### Reactivity
90
+ - `ReactivityManager` — Audio, tilt, and interaction reactivity
91
+ - `ReactivityConfig` — Serializable configuration with validation
92
+ - Audio reactivity (bass/mid/high bands with configurable targets)
93
+ - Device tilt with dramatic mode
94
+ - Mouse, click, scroll, and touch interaction
95
+
96
+ #### Export System (15,136 lines)
97
+ - VIB3Package (JSON state), SVG, CSS animations, Lottie, Shader source
98
+ - Trading card generator with system-specific renderers (Quantum, Faceted, Holographic)
99
+
100
+ #### MCP Agentic Control
101
+ - `MCPServer.js` — Full MCP protocol server with 14 tools
102
+ - `AgentCLI.js` — Command-line interface
103
+ - Telemetry service with OpenTelemetry-compatible events, spans, and exporters
104
+
105
+ #### Scene & Resource Management
106
+ - `Scene4D` / `Node4D` — 4D scene graph
107
+ - `ResourceManager`, `MemoryPool`, `Disposable` — Lifecycle management
108
+
109
+ #### Testing & CI/CD
110
+ - 34 test files (10,000+ lines) — unit, E2E, visual regression
111
+ - Playwright E2E with 69 browser tests
112
+ - 6 CI/CD workflows: Pages deploy, benchmarks, exports, GPU visual tests, Flutter builds
113
+
114
+ #### Cross-Platform
115
+ - Browser (Vite-served)
116
+ - CLI (`vib3` binary)
117
+ - Flutter plugin (iOS + Android + Web)
118
+ - GitHub Pages (26 HTML pages)
@@ -0,0 +1,34 @@
1
+ # Blueprint execution plan (2026-01-07)
2
+
3
+ This execution plan operationalizes the strategic blueprint and defines what each session should deliver. Each session should update `DOCS/SESSION_LOG_2026-01-07.md` with timestamped progress and keep the checklist current.
4
+
5
+ ## Session cadence
6
+ - **Start of session**: review this plan and the strategic blueprint.
7
+ - **During session**: implement the next unchecked items, keep scope tight.
8
+ - **End of session**: update the session log with timestamped outcomes and any blockers.
9
+
10
+ ## Execution checklist
11
+ ### Phase 1 — Mathematical foundation
12
+ - [x] Add rotor/matrix utilities for the six rotation planes.
13
+ - [x] Implement stereographic + perspective projection helpers.
14
+ - [x] Add rotation drift/stability tests.
15
+
16
+ ### Phase 2 — Rendering core consolidation
17
+ - [x] Define renderer contracts and resource manager interfaces.
18
+ - [ ] Unify visualization systems behind a shared scene graph.
19
+ - [x] Document GPU disposal patterns and lifecycle hooks.
20
+
21
+ ### Phase 3 — Agentic integration
22
+ - [x] Define MCP tools for create/apply/render workflows.
23
+ - [x] Emit structured telemetry spans and error schemas.
24
+ - [x] Implement CLI JSON output and non-interactive modes.
25
+
26
+ ### Phase 4 — Cross-platform execution
27
+ - [x] Define WASM build target and shared math core strategy.
28
+ - [x] Add Flutter bindings with a batched render command buffer.
29
+ - [x] Prototype WebGPU backend behind feature flags.
30
+
31
+ ### Phase 5 — Production hardening
32
+ - [x] Draft licensing tiers and activation workflow.
33
+ - [x] Add export formats with golden snapshot tests.
34
+ - [x] Document XR integration benchmarks and performance targets.
@@ -0,0 +1,38 @@
1
+ # CI and testing guide
2
+
3
+ This guide outlines the baseline CI/test expectations for the project and a recommended set of
4
+ commands to keep builds predictable.
5
+
6
+ ## Goals
7
+ - Provide a consistent, repeatable test/lint workflow.
8
+ - Keep CI output deterministic for quick troubleshooting.
9
+ - Encourage periodic bundle size checks and telemetry export validation.
10
+
11
+ ## Baseline commands
12
+ Run these locally before pushing changes:
13
+ ```bash
14
+ pnpm install
15
+ pnpm lint
16
+ pnpm test
17
+ pnpm build:web
18
+ pnpm check:bundle
19
+ ```
20
+
21
+ ## Suggested CI stages
22
+ 1. **Install & cache**
23
+ - Restore pnpm store cache.
24
+ - `pnpm install --frozen-lockfile`
25
+ 2. **Lint**
26
+ - `pnpm lint`
27
+ 3. **Unit tests**
28
+ - `pnpm test`
29
+ 4. **Build & bundle checks**
30
+ - `pnpm build:web`
31
+ - `pnpm check:bundle`
32
+ 5. **Optional telemetry smoke**
33
+ - `pnpm cli:telemetry -- <pack.json> --json --non-interactive --preview-count=4`
34
+
35
+ ## Environment tips
36
+ - Ensure Node.js 18.19+ and pnpm 9.4.0 (see `DOCS/CLI_ONBOARDING.md`).
37
+ - Use the environment bootstrap script in `DOCS/ENV_SETUP.md` for system tooling.
38
+ - For Firebase Test Lab, enable the API and wire service account credentials in CI.
@@ -0,0 +1,75 @@
1
+ # Agentic CLI onboarding
2
+
3
+ This guide aligns the current CLI surface (package scripts and telemetry helpers) with an agentic workflow. It is intentionally explicit so automation agents and humans can share the same runbook.
4
+
5
+ ## Prerequisites (tools to install)
6
+ - **Node.js 18.19+** (project engine requirement)
7
+ - **pnpm 9.4.0** (`corepack enable` then `corepack prepare pnpm@9.4.0 --activate`)
8
+ - Optional: **Storybook** support is baked into `pnpm storybook` once dependencies are installed.
9
+ - Optional: environment bootstrap script for Firebase, gcloud, Flutter, Android SDK, and GH CLI is in [`DOCS/ENV_SETUP.md`](DOCS/ENV_SETUP.md).
10
+ - Optional: CI/test workflow and command checklist lives in [`DOCS/CI_TESTING.md`](DOCS/CI_TESTING.md).
11
+ - Optional: renderer lifecycle overview for system orchestration is in [`DOCS/RENDERER_LIFECYCLE.md`](DOCS/RENDERER_LIFECYCLE.md).
12
+ - Optional: GCP + Firebase provisioning steps live in [`DOCS/PROJECT_SETUP.md`](DOCS/PROJECT_SETUP.md).
13
+ - Optional: repository directory manifest is in [`DOCS/REPO_MANIFEST.md`](DOCS/REPO_MANIFEST.md).
14
+ - Optional: development track analysis is in [`DOCS/DEV_TRACK_ANALYSIS.md`](DOCS/DEV_TRACK_ANALYSIS.md).
15
+ - Optional: WebGPU status/testing notes are in [`DOCS/WEBGPU_STATUS.md`](DOCS/WEBGPU_STATUS.md).
16
+
17
+ ## Baseline setup
18
+ ```bash
19
+ pnpm install
20
+ ```
21
+
22
+ ## Daily dev commands
23
+ | Goal | Command | Notes |
24
+ | --- | --- | --- |
25
+ | Start the web playground | `pnpm dev:web` | Opens Vite dev server. |
26
+ | Build production bundle | `pnpm build:web` | Outputs `dist/`. |
27
+ | Lint core engine sources | `pnpm lint` | ESLint runs on `src/**/*.{js,ts}`. |
28
+ | Run tests | `pnpm test` | Runs Vitest in CLI mode. |
29
+ | Analyze bundle size | `pnpm analyze:bundle` | Vite build in analyze mode. |
30
+ | CI bundle check | `pnpm check:bundle` | Builds and runs size guard. |
31
+ | Telemetry export (CLI) | `pnpm cli:telemetry -- <pack.json> --json --non-interactive --preview-count=4` | Agent-friendly JSON output. |
32
+ | Storybook | `pnpm storybook` | Runs UI component workshop. |
33
+
34
+ ## Telemetry export workflow (agentic)
35
+ 1. **Prepare a pack** with `pack.scenes` (or `pack.states`) so preview generation has material.
36
+ 2. **Call the telemetry director** (`js/core/telemetry-director.js`) to generate previews and manifest data:
37
+ - `TelemetryDirector.generatePreviewSprites(pack, count)`
38
+ - `TelemetryDirector.exportPack(pack, options)`
39
+ 3. **Use the manifest pipeline** (`tools/telemetry/manifestPipeline.js`) to normalize metadata, compute hashes, and emit CLI-friendly summaries.
40
+ 4. **Persist the results** in your export path along with hash summaries for CI and caching.
41
+
42
+ ## Recommended agent checklist
43
+ - Confirm Node/pnpm versions match the project constraints.
44
+ - Install dependencies with `pnpm install`.
45
+ - Run `pnpm lint` before export steps.
46
+ - Use telemetry hash summaries for diff checks and CI caching.
47
+ - Capture preview image artifacts if export tasks include visual outputs.
48
+ - Review [`DOCS/CONTROL_REFERENCE.md`](DOCS/CONTROL_REFERENCE.md) and do a quick knowledge check:
49
+ - Name the geometry types available in the engine.
50
+ - List the control parameter names for each geometry type.
51
+
52
+ If the answers are incomplete, continue with the workflow but flag the miss and point to the fix:
53
+ - **If geometry types are wrong/missing:** review [`DOCS/CONTROL_REFERENCE.md`](DOCS/CONTROL_REFERENCE.md) to confirm the active system list.
54
+ - **If control names are wrong/missing:** review [`DOCS/CONTROL_REFERENCE.md`](DOCS/CONTROL_REFERENCE.md) for the exact control IDs and parameter names.
55
+
56
+ ### Knowledge check response template (copy/paste)
57
+ ```
58
+ Geometry types:
59
+ - <type 1>
60
+ - <type 2>
61
+ - <type 3>
62
+ - <type 4>
63
+
64
+ Controls by geometry:
65
+ - <type 1>: <control ids...>
66
+ - <type 2>: <control ids...>
67
+ - <type 3>: <control ids...>
68
+ - <type 4>: <control ids...>
69
+ ```
70
+
71
+ If any section is incomplete, proceed with the task but annotate the gap and point to [`DOCS/CONTROL_REFERENCE.md`](DOCS/CONTROL_REFERENCE.md) as the source of truth.
72
+
73
+ ## Troubleshooting
74
+ - If `pnpm` is missing, run `corepack enable` then re-run the install step.
75
+ - If telemetry previews fail in a browser context, ensure `TelemetryDirector` has a renderer that implements `captureFrame(scene)`.
@@ -0,0 +1,64 @@
1
+ # Control & API Reference
2
+
3
+ This document walks through every control surface in `index.html` and the JavaScript entry points they call so you can quickly map UI inputs to runtime behavior.
4
+
5
+ ## UI layout overview
6
+ - **Top navigation**: System selector buttons (`switchSystem('faceted' | 'quantum' | 'holographic' | 'polychora')`), global Save button (`saveToGallery()`), gallery/audio/device-tilt/LLM/Interactivity toggles, and quick-access toolbar.
7
+ - **Canvas containers**: Four stackable `<div class="holographic-layers">` containers: `vib34dLayers`, `quantumLayers`, `holographicLayers`, and `polychoraLayers`.
8
+ - **Bottom bezel tabs**: Tab strip for Controls, Color, Geometry, Reactivity, and Export. Each tab exposes its own randomizer button plus quick-access buttons when the bezel is collapsed.
9
+
10
+ ## Slider controls
11
+ Each `<input type="range">` updates its paired readout and calls `updateParameter(param, value)` from `js/controls/ui-handlers.js`.
12
+
13
+ | Category | Control id | Range (step) | Display | Notes |
14
+ | --- | --- | --- | --- | --- |
15
+ | 3D rotations | `rot4dXY` | -6.28 to 6.28 (0.01) | `rot4dXY-display` | XY plane rotation. |
16
+ | | `rot4dXZ` | -6.28 to 6.28 (0.01) | `rot4dXZ-display` | XZ plane rotation. |
17
+ | | `rot4dYZ` | -6.28 to 6.28 (0.01) | `rot4dYZ-display` | YZ plane rotation. |
18
+ | 4D rotations | `rot4dXW` | -6.28 to 6.28 (0.01) | `rot4dXW-display` | XW plane rotation. |
19
+ | | `rot4dYW` | -6.28 to 6.28 (0.01) | `rot4dYW-display` | YW plane rotation. |
20
+ | | `rot4dZW` | -6.28 to 6.28 (0.01) | `rot4dZW-display` | ZW plane rotation. |
21
+ | Visual | `gridDensity` | 5 to 100 (1) | `gridDensity-display` | Grid resolution. |
22
+ | | `morphFactor` | 0 to 2 (0.01) | `morphFactor-display` | Morph blend factor. |
23
+ | | `chaos` | 0 to 1 (0.01) | `chaos-display` | Noise/chaos. |
24
+ | | `speed` | 0.1 to 3 (0.01) | `speed-display` | Animation speed. |
25
+ | Color | `hue` | 0 to 360 (1) | `hue-display` | Hue in degrees. |
26
+ | | `saturation` | 0 to 1 (0.01) | `saturation-display` | Color saturation. |
27
+ | | `intensity` | 0 to 1 (0.01) | `intensity-display` | Color brightness. |
28
+
29
+ ### Slider handling pipeline
30
+ 1. The slider's `oninput` calls `updateParameter(param, value)`.
31
+ 2. `updateParameter` records the value in `window.userParameterState`, updates the readout element, and routes the parameter to the active engine (`faceted`, `quantum`, `holographic`, or `polychora`).
32
+ 3. Each engine uses its own setter: `parameterManager.setParameter` (faceted), `updateParameter` (quantum/holographic), or `updateParameters` (polychora). When an engine is not ready, the handler retries once before logging a warning.
33
+
34
+ ## Toggle controls
35
+ - **System reactivity matrix**: Checkboxes for each system/interaction type (`facetedMouse`, `facetedClick`, `facetedScroll`, `quantumMouse`, `quantumClick`, `quantumScroll`, `holographicMouse`, `holographicClick`, `holographicScroll`) call `toggleSystemReactivity(system, interaction, checked)`.
36
+ - **Audio-reactive channels**: Low/Medium/High checkboxes for Color/Geometry/Movement call `toggleAudioReactivity(level, channel, checked)` with `mediumColor` enabled by default.
37
+ - **Device tilt**: `toggleDeviceTilt()` toggles gyroscope-driven rotation and updates the tilt button state.
38
+ - **Audio master toggle**: `toggleAudio()` toggles the audio engine used by the reactivity matrix.
39
+ - **Interactivity menu**: `toggleInteractivity()` exposes the interaction panel and uses `interactivityEnabled` tracking from the UI handlers module.
40
+
41
+ ## Geometry & system selection
42
+ - **System selector buttons** call `switchSystem(systemName)` and visually mark the active system via `data-system` attributes.
43
+ - **Geometry tab** uses `selectGeometry(index)` to switch among the 24 faceted/quantum options or the six polychora presets. `window.geometries` defines the labels for each system.
44
+
45
+ ## Quick actions and gallery hooks
46
+ - **Randomizers**: `randomizeAll()` (parameters only) and `randomizeEverything()` (parameters + geometry + hue) are wired to the Randomize buttons across tabs and quick-access bar.
47
+ - **Reset**: `resetAll()` restores all slider defaults and updates readouts.
48
+ - **Gallery**: `saveToGallery()`, `openGallery()`, and `quickSave()/quickGallery()` integrate with `js/gallery` modules for persistence.
49
+
50
+ ## State management
51
+ - `initializeStateManager()` runs during boot to restore state from URL parameters or `localStorage`, then sets up auto-save and keyboard shortcuts.
52
+ - `captureCurrentState()` collects active system/geometry, parameters, UI state (active tab, bezel collapse, performance overlay), performance mode, and reactivity settings.
53
+ - `restoreState(state)` replays captured values into the UI and engines after validating the payload.
54
+ - Auto-save uses a 2s debounce (`autoSaveDelay`) and keeps a history stack (50 entries) for undo/redo behaviors.
55
+
56
+ ## Data dictionaries
57
+ - **`window.geometries`**: Lists 24 faceted and quantum geometry labels (base, hypersphere core, hypertetrahedron core), a single holographic mode, and six polychora polychora solids.
58
+ - **`window.userParameterState`**: Captures the most recent slider values for persistence and gallery snapshots.
59
+
60
+ ## Related modules
61
+ - `js/controls/ui-handlers.js` – Slider/toggle handlers, randomize/reset helpers, and interactivity toggles.
62
+ - `js/core/state-manager.js` – State capture/restore, URL/localStorage integration, and undo/redo history.
63
+ - `js/interactions/device-tilt.js` – Gyroscope-driven rotation controls and button state updates.
64
+ - `js/audio/audio-engine.js` – Audio reactivity toggles consumed by `toggleAudio` and `toggleAudioReactivity`.
@@ -0,0 +1,77 @@
1
+ # Dev track analysis and next steps
2
+
3
+ This document summarizes the current development track status, highlights gaps, and proposes the
4
+ next execution steps. It should be updated after each multi-system delivery.
5
+
6
+ **Last Updated:** 2026-01-30 (v2.0.0)
7
+
8
+ ## Current status snapshot
9
+ - **Math foundation:** rotation utilities, projection clamping, and stability tests are in place.
10
+ - **Renderer lifecycle:** unified contract and lifecycle manager are defined with adapters for the
11
+ core systems; resource tracking is centralized in the WebGL backend.
12
+ - **Agentic tooling:** MCP/CLI response envelopes are standardized with schema validation.
13
+ - **Docs/ops:** environment setup, CI testing, repo manifest, and project provisioning guides are
14
+ documented.
15
+ - **WebGPU scaffold:** experimental backend initializes device/context and supports clear-pass render frames.
16
+ - **WebGPU status/testing:** documented current WebGPU state and validation requirements.
17
+ - **v2.0.0 Core Fixes (Phase A):** Quantum color restored, Faceted saturation + audio wired, clickIntensity bug fixed, shader sync tool added.
18
+ - **v2.0.0 SpatialInputSystem:** Universal spatial input with 8 source types, 6 profiles, integrated into VIB3Engine. Decouples "card tilting" from device orientation.
19
+ - **v2.0.0 Creative Tooling (Phase B):** Color presets (22), transitions (14 easings), post-processing (14 effects), parameter timeline (BPM sync).
20
+ - **v2.0.0 Platform Integrations (Phase C):** React, Vue, Svelte component wrappers; Figma plugin; Three.js ShaderMaterial; TouchDesigner GLSL export; OBS mode.
21
+ - **v2.0.0 Advanced Features (Phase D):** WebXR renderer, WebGPU compute shaders, MIDI controller, AI preset generator, OffscreenCanvas worker.
22
+
23
+ ## Completed phases
24
+ | Phase | Status | Deliverables |
25
+ |-------|--------|-------------|
26
+ | Phase 1: Foundation | ✅ Complete | Math, geometry, parameters |
27
+ | Phase 2: Rendering | ✅ Mostly Complete | Contracts, adapters, backends |
28
+ | Phase 3: Agentic | ✅ Complete | MCP, CLI, Telemetry |
29
+ | Phase 4: WebGPU | 🔄 In Progress | Scaffold exists |
30
+ | Phase 5: Hardening | ✅ Complete | 694 tests, XSS prevention |
31
+ | Phase A: Parity & Polish | ✅ Complete | Color/audio/saturation fixes |
32
+ | Phase B: Creative Tooling | ✅ Complete | 4 modules, 3,837 lines |
33
+ | Phase C: Platform Integrations | ✅ Complete | 7 modules, 4,693 lines |
34
+ | Phase D: Advanced | ✅ Complete | 5 modules, 4,262 lines |
35
+ | SpatialInputSystem | ✅ Complete | 1,783 lines, 8 sources, 6 profiles |
36
+
37
+ ## Key gaps to close
38
+ 1. **v2.0.0 module test coverage:**
39
+ - Creative, integrations, and advanced modules need unit/integration tests.
40
+ - SpatialInputSystem profiles need validation tests.
41
+ 2. **WebGPU prototype (Phase 4):**
42
+ - Confirm feature-flag gating and parity with WebGL backend entry points.
43
+ - Establish a minimal shader/material pipeline that mirrors the WebGL contract.
44
+ 3. **Platform integration validation:**
45
+ - Test React/Vue/Svelte components with actual framework projects.
46
+ - Validate Figma plugin with Figma Developer Console.
47
+ - Test TouchDesigner GLSL export in actual TD environment.
48
+ 4. **Cross-platform command buffers:**
49
+ - Document and validate the render command buffer format for Flutter/WASM integration.
50
+ - Ensure command buffer batching and lifecycle hooks align with `RendererContract`.
51
+ 5. **Telemetry export hardening:**
52
+ - Add validation for telemetry manifests and scene packs in CI.
53
+ - Produce golden snapshot tests for core geometries.
54
+
55
+ ## Recommended next steps
56
+ 1. **Test coverage for v2.0.0 modules:**
57
+ - Write Vitest unit tests for SpatialInputSystem (profile loading, input feeding, sensitivity).
58
+ - Write tests for creative tooling (preset application, transition interpolation, timeline playback).
59
+ - Add E2E tests for OBS mode and framework components.
60
+ 2. **NPM publish preparation:**
61
+ - Verify all package.json exports resolve correctly.
62
+ - Test tree-shaking with the creative/integrations/advanced imports.
63
+ - Run `npm pack --dry-run` to verify published file list.
64
+ 3. **WebGPU spike (Phase 4):**
65
+ - Build a feature-flagged WebGPU backend scaffold in `src/render/backends/`.
66
+ - Add a minimal triangle pipeline with uniform updates and buffer management.
67
+ 4. **Renderer diagnostics:**
68
+ - Expand `RenderResourceRegistry` stats to include peak usage and per-frame deltas.
69
+ 5. **Project automation:**
70
+ - Provide a scripted `make setup` (or `pnpm setup`) that runs env + project setup steps.
71
+
72
+ ## Risks and mitigation
73
+ - **GPU resource churn:** ensure registry-based disposal is called during renderer swaps.
74
+ - **Numerical drift:** keep normalization utilities and baseline tests running in CI.
75
+ - **Cross-platform divergence:** ensure WebGL and WebGPU share material definitions.
76
+ - **v2.0.0 module breadth:** 18 new files need test coverage before production use.
77
+ - **Framework integration drift:** framework APIs evolve; pin versions in test fixtures.
@@ -0,0 +1,42 @@
1
+ # Dev track plan (2026-01-07)
2
+
3
+ This plan captures the staged work needed to deliver a production-ready agentic telemetry pipeline and export workflow. It is written as a living track plan so future sessions can append progress and maintain consistent architecture decisions.
4
+
5
+ ## North-star goals
6
+ 1. Agent-friendly CLI onboarding and help output.
7
+ 2. Deterministic telemetry manifest exports with previews and asset hashing.
8
+ 3. Clear documentation for automation, QA, and CI workflows.
9
+
10
+ ## Architecture anchors
11
+ - **Telemetry pipeline**: `tools/telemetry/manifestPipeline.js` is the single source of truth for manifest normalization and hashing.
12
+ - **Preview generation**: `js/core/telemetry-director.js` generates previews (renderer-backed or placeholders) and passes them into manifests.
13
+ - **Docs hub**: `DOCS/` is the canonical location for workflow documentation (onboarding, telemetry, control references).
14
+
15
+ ## Planned track (phased)
16
+ ### Phase 1 — Onboarding + documentation hardening
17
+ - Publish an agentic CLI onboarding guide with tool requirements, commands, and telemetry workflow steps.
18
+ - Update README references so new onboarding docs are discoverable.
19
+ - Extend telemetry docs with explicit CLI integration guidance and export flow notes.
20
+ - Add a lightweight knowledge-check template that validates geometry/control comprehension without blocking execution.
21
+
22
+ ### Phase 2 — Agentic workflow hooks
23
+ - Add CLI wrappers for telemetry export flows (pack selection, preview generation, manifest hashing).
24
+ - Emit summaries designed for CI cache validation and diffing.
25
+ - Provide optional validation hooks for manifest/preview consistency.
26
+
27
+ ### Phase 3 — Quality and verification
28
+ - Add lint/test targets for telemetry outputs if applicable.
29
+ - Document CI steps for telemetry export validation.
30
+ - Add golden snapshot routines for preview images when the pipeline stabilizes.
31
+
32
+ ## Risks and mitigations
33
+ - **Risk**: Hash drift due to unstable object serialization.
34
+ **Mitigation**: Keep stable hashing in `manifestPipeline.js` and avoid non-deterministic fields.
35
+ - **Risk**: Preview generation inconsistency across runtimes.
36
+ **Mitigation**: Maintain browser-safe fallback encoding and ensure renderer contracts are documented.
37
+
38
+ ## Deliverables checklist
39
+ - [ ] CLI onboarding doc is complete and linked in README.
40
+ - [ ] Telemetry docs include export integration steps.
41
+ - [ ] Agentic CLI support documented or implemented.
42
+ - [ ] CI guidance includes telemetry hashes and preview artifacts.