@thanhnguyxn/pixelcraft 0.1.0 → 0.2.0

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 (376) hide show
  1. package/.agents/plugins/marketplace.json +1 -1
  2. package/.antigravity-plugin/plugin.json +32 -0
  3. package/.claude-plugin/marketplace.json +1 -1
  4. package/.claude-plugin/plugin.json +15 -4
  5. package/.codex-plugin/plugin.json +45 -0
  6. package/.cursor-plugin/marketplace.json +17 -0
  7. package/.cursor-plugin/plugin.json +27 -0
  8. package/.devin-plugin/plugin.json +21 -0
  9. package/.github/plugin/marketplace.json +34 -0
  10. package/CHANGELOG.md +159 -0
  11. package/GEMINI.md +1 -0
  12. package/README.md +185 -328
  13. package/SECURITY.md +28 -0
  14. package/assets/pixelcraft-logo-128.png +0 -0
  15. package/assets/pixelcraft-logo-256.png +0 -0
  16. package/bin/pixelcraft.mjs +431 -23
  17. package/docs/ARCHITECTURE.md +40 -37
  18. package/docs/DESIGN-RATIONALE.md +51 -3
  19. package/docs/INSTALL.md +221 -0
  20. package/evals/README.md +16 -6
  21. package/evals/fixtures/3d-web-engineering.json +69 -0
  22. package/evals/fixtures/acceptance-checklist-rule03-gate.json +43 -0
  23. package/evals/fixtures/ai-ui-libraries.json +53 -0
  24. package/evals/fixtures/audio-visual-accessibility.json +69 -0
  25. package/evals/fixtures/auth-and-checkout-ui.json +53 -0
  26. package/evals/fixtures/brandkit-identity-governance.json +48 -0
  27. package/evals/fixtures/build-and-architecture.json +53 -0
  28. package/evals/fixtures/canvas-and-node-editors.json +53 -0
  29. package/evals/fixtures/chat-ai-exfiltration-ime-hitl-gate.json +43 -0
  30. package/evals/fixtures/completion-gate-scan-until-clean.json +44 -0
  31. package/evals/fixtures/component-systems.json +53 -0
  32. package/evals/fixtures/component-testing.json +53 -0
  33. package/evals/fixtures/constrained-voice-and-tv.json +43 -0
  34. package/evals/fixtures/creative-code-rendering.json +69 -0
  35. package/evals/fixtures/creative-reference-evidence.json +67 -0
  36. package/evals/fixtures/data-app-python-marimo.json +49 -0
  37. package/evals/fixtures/desktop-cpp-juce-audio.json +49 -0
  38. package/evals/fixtures/desktop-csharp-avalonia.json +49 -0
  39. package/evals/fixtures/desktop-native-workspace.json +48 -0
  40. package/evals/fixtures/desktop-python-anti-tkinter.json +49 -0
  41. package/evals/fixtures/document-prepress-pdfx4-tounicode.json +43 -0
  42. package/evals/fixtures/document-rust-typst-invoice.json +49 -0
  43. package/evals/fixtures/document-typst-and-print-css.json +43 -0
  44. package/evals/fixtures/email-mjml-dark-mode.json +49 -0
  45. package/evals/fixtures/email-outlook-and-plaintext.json +43 -0
  46. package/evals/fixtures/enterprise-data-ui.json +53 -0
  47. package/evals/fixtures/extended-tui-toolkits.json +53 -0
  48. package/evals/fixtures/extensions-mv3-and-vscode.json +43 -0
  49. package/evals/fixtures/file-upload-media-ui.json +53 -0
  50. package/evals/fixtures/forms-validation.json +53 -0
  51. package/evals/fixtures/game-go-ebitengine.json +49 -0
  52. package/evals/fixtures/game-godot-gdscript.json +49 -0
  53. package/evals/fixtures/game-ui-hud-and-engines.json +43 -0
  54. package/evals/fixtures/i18n-engineering.json +53 -0
  55. package/evals/fixtures/local-first-sync.json +53 -0
  56. package/evals/fixtures/lynxjs.json +53 -0
  57. package/evals/fixtures/maizzle-email.json +53 -0
  58. package/evals/fixtures/maps-geospatial.json +53 -0
  59. package/evals/fixtures/media-og-and-video-export.json +43 -0
  60. package/evals/fixtures/media-players.json +53 -0
  61. package/evals/fixtures/mobile-compose-16kb-foldable-store-gate.json +44 -0
  62. package/evals/fixtures/mobile-elixir-liveview-native.json +49 -0
  63. package/evals/fixtures/mobile-flutter-dynamic-type.json +49 -0
  64. package/evals/fixtures/mobile-harmonyos-arkui.json +49 -0
  65. package/evals/fixtures/mobile-jetpack-compose.json +49 -0
  66. package/evals/fixtures/mobile-swiftui-ios.json +49 -0
  67. package/evals/fixtures/motion-engineering.json +69 -0
  68. package/evals/fixtures/pdfjs-and-pptx.json +53 -0
  69. package/evals/fixtures/plan-discovery-interview.json +31 -0
  70. package/evals/fixtures/plan-grill-me-brainstorm-gate.json +49 -0
  71. package/evals/fixtures/reactive-data-apps.json +53 -0
  72. package/evals/fixtures/review-evidence-audit.json +43 -0
  73. package/evals/fixtures/rich-text-and-code-editors.json +53 -0
  74. package/evals/fixtures/scrollytelling-resilience.json +70 -0
  75. package/evals/fixtures/spatial-xr-comfort-and-platforms.json +43 -0
  76. package/evals/fixtures/state-architecture.json +53 -0
  77. package/evals/fixtures/styling-ecosystem.json +53 -0
  78. package/evals/fixtures/token-tooling.json +53 -0
  79. package/evals/fixtures/tui-go-bubbletea.json +49 -0
  80. package/evals/fixtures/tui-rust-ratatui-grapheme-paste-teardown.json +44 -0
  81. package/evals/fixtures/tui-rust-ratatui.json +49 -0
  82. package/evals/fixtures/ux-state-matrix-and-i18n.json +43 -0
  83. package/evals/fixtures/web-3d-engines.json +53 -0
  84. package/evals/fixtures/web-php-laravel-filament.json +49 -0
  85. package/evals/fixtures/web-ruby-viewcomponent-phlex.json +49 -0
  86. package/evals/pixelcraft-accessibility.md +17 -0
  87. package/evals/pixelcraft-craft.md +16 -0
  88. package/evals/pixelcraft-dataviz.md +3 -3
  89. package/evals/pixelcraft-direction.md +17 -0
  90. package/evals/pixelcraft-game-ui.md +3 -3
  91. package/evals/pixelcraft-mobile.md +3 -3
  92. package/evals/pixelcraft-patterns.md +16 -0
  93. package/evals/pixelcraft-plan.md +65 -3
  94. package/evals/pixelcraft-review.md +3 -3
  95. package/evals/pixelcraft-visual-qa.md +11 -5
  96. package/evals/pixelcraft-web.md +21 -3
  97. package/evals/pixelcraft.md +4 -4
  98. package/gemini-extension.json +3 -2
  99. package/install.ps1 +57 -11
  100. package/install.sh +82 -7
  101. package/package.json +32 -4
  102. package/plugin.json +6 -1
  103. package/scripts/build-adapters.mjs +11 -13
  104. package/scripts/run-evals.mjs +397 -0
  105. package/scripts/sync-docs.mjs +381 -0
  106. package/scripts/test-build-adapters.mjs +14 -1
  107. package/scripts/test-cross-platform-qa.mjs +359 -0
  108. package/scripts/test-distribution.mjs +86 -7
  109. package/scripts/test-export-tokens.mjs +259 -3
  110. package/scripts/test-finish-gate.mjs +133 -10
  111. package/scripts/test-installers.mjs +155 -6
  112. package/scripts/test-shoot.mjs +23 -1
  113. package/scripts/test-slop-scan.mjs +390 -3
  114. package/scripts/test-style-inventory.mjs +23 -0
  115. package/scripts/test-sync-docs.mjs +140 -0
  116. package/scripts/test-validate-skills.mjs +82 -4
  117. package/scripts/validate-skills.mjs +149 -3
  118. package/skills/pixelcraft/SKILL.md +67 -47
  119. package/skills/pixelcraft/references/design-brief.md +2 -2
  120. package/skills/pixelcraft/references/floor.md +36 -19
  121. package/skills/pixelcraft/references/report-template.md +25 -11
  122. package/skills/pixelcraft/references/stack-detection.md +138 -67
  123. package/skills/pixelcraft/references/surface-acceptance.md +33 -21
  124. package/skills/pixelcraft/references/workflow-checkpoints.md +49 -7
  125. package/skills/pixelcraft-accessibility/SKILL.md +34 -13
  126. package/skills/pixelcraft-accessibility/references/apg-patterns.md +13 -0
  127. package/skills/pixelcraft-accessibility/references/motion-canvas.md +57 -0
  128. package/skills/pixelcraft-accessibility/references/platforms.md +34 -6
  129. package/skills/pixelcraft-accessibility/references/verification.md +15 -10
  130. package/skills/pixelcraft-accessibility/references/wcag22-checks.md +38 -5
  131. package/skills/pixelcraft-brandkit/SKILL.md +42 -30
  132. package/skills/pixelcraft-brandkit/references/asset-pipeline.md +90 -50
  133. package/skills/pixelcraft-brandkit/references/brand-governance.md +29 -27
  134. package/skills/pixelcraft-brandkit/references/logo-methods.md +33 -34
  135. package/skills/pixelcraft-brandkit/references/prompt-template.md +53 -51
  136. package/skills/pixelcraft-brandkit/references/qa-checklist.md +7 -2
  137. package/skills/pixelcraft-brandkit/references/visual-modes.md +16 -16
  138. package/skills/pixelcraft-chat-ui/SKILL.md +31 -27
  139. package/skills/pixelcraft-chat-ui/references/agentic-workspace.md +66 -0
  140. package/skills/pixelcraft-chat-ui/references/ai-ui-libraries.md +259 -0
  141. package/skills/pixelcraft-chat-ui/references/conversation-design.md +12 -6
  142. package/skills/pixelcraft-chat-ui/references/mobile-business-platforms.md +58 -68
  143. package/skills/pixelcraft-chat-ui/references/slack-discord.md +60 -76
  144. package/skills/pixelcraft-constrained/SKILL.md +21 -20
  145. package/skills/pixelcraft-constrained/references/specialized-hardware.md +69 -45
  146. package/skills/pixelcraft-constrained/references/tv-wearables.md +123 -73
  147. package/skills/pixelcraft-constrained/references/voice-ui.md +86 -45
  148. package/skills/pixelcraft-craft/SKILL.md +29 -15
  149. package/skills/pixelcraft-craft/references/color.md +62 -6
  150. package/skills/pixelcraft-craft/references/layout.md +32 -0
  151. package/skills/pixelcraft-craft/references/motion.md +99 -12
  152. package/skills/pixelcraft-craft/references/typography.md +48 -9
  153. package/skills/pixelcraft-data-apps/SKILL.md +50 -31
  154. package/skills/pixelcraft-data-apps/references/ai-and-internal-data-apps.md +147 -0
  155. package/skills/pixelcraft-data-apps/references/dash.md +87 -31
  156. package/skills/pixelcraft-data-apps/references/evidence.md +41 -26
  157. package/skills/pixelcraft-data-apps/references/gradio.md +65 -27
  158. package/skills/pixelcraft-data-apps/references/julia-genie.md +64 -29
  159. package/skills/pixelcraft-data-apps/references/jupyter-widgets.md +65 -27
  160. package/skills/pixelcraft-data-apps/references/nicegui.md +73 -34
  161. package/skills/pixelcraft-data-apps/references/observable-framework.md +65 -27
  162. package/skills/pixelcraft-data-apps/references/panel.md +69 -23
  163. package/skills/pixelcraft-data-apps/references/r-shiny.md +104 -34
  164. package/skills/pixelcraft-data-apps/references/reactive-data-apps.md +186 -0
  165. package/skills/pixelcraft-data-apps/references/reflex.md +85 -31
  166. package/skills/pixelcraft-data-apps/references/shiny.md +84 -27
  167. package/skills/pixelcraft-data-apps/references/streamlit.md +73 -25
  168. package/skills/pixelcraft-dataviz/SKILL.md +21 -24
  169. package/skills/pixelcraft-dataviz/references/color-accessibility.md +2 -2
  170. package/skills/pixelcraft-dataviz/references/encoding-tables-dashboards.md +35 -25
  171. package/skills/pixelcraft-dataviz/references/libraries.md +165 -46
  172. package/skills/pixelcraft-dataviz/references/maps-geospatial.md +159 -0
  173. package/skills/pixelcraft-dataviz/references/realtime-graphs-maps-scale.md +58 -65
  174. package/skills/pixelcraft-desktop/SKILL.md +61 -39
  175. package/skills/pixelcraft-desktop/references/appkit.md +60 -26
  176. package/skills/pixelcraft-desktop/references/avalonia.md +65 -29
  177. package/skills/pixelcraft-desktop/references/cpp-gui.md +104 -27
  178. package/skills/pixelcraft-desktop/references/electron.md +68 -26
  179. package/skills/pixelcraft-desktop/references/go-gui.md +59 -30
  180. package/skills/pixelcraft-desktop/references/gtk.md +74 -31
  181. package/skills/pixelcraft-desktop/references/javafx-swing.md +54 -25
  182. package/skills/pixelcraft-desktop/references/qt-pyside-qml.md +57 -30
  183. package/skills/pixelcraft-desktop/references/rust-gui.md +59 -41
  184. package/skills/pixelcraft-desktop/references/tauri.md +80 -24
  185. package/skills/pixelcraft-desktop/references/uno-platform.md +42 -23
  186. package/skills/pixelcraft-desktop/references/winui-wpf.md +66 -26
  187. package/skills/pixelcraft-desktop/references/working-context.md +82 -3
  188. package/skills/pixelcraft-direction/SKILL.md +48 -82
  189. package/skills/pixelcraft-direction/references/creative-brainstorming.md +72 -0
  190. package/skills/pixelcraft-direction/references/direction-card.md +11 -1
  191. package/skills/pixelcraft-direction/references/direction-scoring.md +5 -1
  192. package/skills/pixelcraft-direction/references/motion-identity.md +67 -0
  193. package/skills/pixelcraft-direction/references/movements.md +3 -0
  194. package/skills/pixelcraft-direction/references/reference-analysis.md +37 -0
  195. package/skills/pixelcraft-direction/references/slop-fingerprints.md +32 -7
  196. package/skills/pixelcraft-document/SKILL.md +27 -23
  197. package/skills/pixelcraft-document/references/archetypes.md +27 -4
  198. package/skills/pixelcraft-document/references/pdf-tools.md +241 -81
  199. package/skills/pixelcraft-document/references/pdfjs-and-pptx.md +114 -0
  200. package/skills/pixelcraft-document/references/print-css.md +96 -43
  201. package/skills/pixelcraft-document/references/slides.md +123 -27
  202. package/skills/pixelcraft-email/SKILL.md +42 -20
  203. package/skills/pixelcraft-email/references/client-quirks.md +101 -33
  204. package/skills/pixelcraft-email/references/html-tables.md +83 -22
  205. package/skills/pixelcraft-email/references/maizzle.md +54 -0
  206. package/skills/pixelcraft-email/references/mjml.md +13 -11
  207. package/skills/pixelcraft-email/references/react-email.md +76 -34
  208. package/skills/pixelcraft-extensions/SKILL.md +32 -27
  209. package/skills/pixelcraft-extensions/references/browser-extensions.md +91 -17
  210. package/skills/pixelcraft-extensions/references/figma-office.md +97 -14
  211. package/skills/pixelcraft-extensions/references/ide-and-saas-plugins.md +125 -0
  212. package/skills/pixelcraft-extensions/references/raycast.md +90 -11
  213. package/skills/pixelcraft-extensions/references/vscode-webviews.md +91 -17
  214. package/skills/pixelcraft-game-ui/SKILL.md +45 -26
  215. package/skills/pixelcraft-game-ui/references/bevy.md +69 -31
  216. package/skills/pixelcraft-game-ui/references/godot.md +100 -27
  217. package/skills/pixelcraft-game-ui/references/hud-principles.md +50 -21
  218. package/skills/pixelcraft-game-ui/references/love2d.md +53 -27
  219. package/skills/pixelcraft-game-ui/references/monogame.md +45 -29
  220. package/skills/pixelcraft-game-ui/references/unity-ugui.md +109 -0
  221. package/skills/pixelcraft-game-ui/references/unity-ui-toolkit.md +69 -27
  222. package/skills/pixelcraft-game-ui/references/unreal-umg.md +53 -26
  223. package/skills/pixelcraft-game-ui/references/web-and-middleware-game-ui.md +122 -0
  224. package/skills/pixelcraft-handoff/SKILL.md +14 -13
  225. package/skills/pixelcraft-handoff/references/design-translation.md +40 -10
  226. package/skills/pixelcraft-handoff/references/motion-handoff.md +54 -0
  227. package/skills/pixelcraft-media/SKILL.md +20 -23
  228. package/skills/pixelcraft-media/references/banners-video.md +83 -65
  229. package/skills/pixelcraft-media/references/og-generation.md +110 -63
  230. package/skills/pixelcraft-media/references/social-cards.md +57 -58
  231. package/skills/pixelcraft-mobile/SKILL.md +53 -36
  232. package/skills/pixelcraft-mobile/references/dotnet-maui.md +62 -34
  233. package/skills/pixelcraft-mobile/references/flet.md +53 -26
  234. package/skills/pixelcraft-mobile/references/flutter.md +76 -32
  235. package/skills/pixelcraft-mobile/references/harmonyos-and-emerging-mobile.md +121 -0
  236. package/skills/pixelcraft-mobile/references/ionic-capacitor.md +48 -26
  237. package/skills/pixelcraft-mobile/references/jetpack-compose.md +92 -24
  238. package/skills/pixelcraft-mobile/references/kivy.md +54 -31
  239. package/skills/pixelcraft-mobile/references/kotlin-multiplatform.md +53 -27
  240. package/skills/pixelcraft-mobile/references/lynxjs.md +110 -0
  241. package/skills/pixelcraft-mobile/references/nativescript-and-skip.md +91 -0
  242. package/skills/pixelcraft-mobile/references/react-native-expo.md +66 -31
  243. package/skills/pixelcraft-mobile/references/swiftui.md +158 -28
  244. package/skills/pixelcraft-mobile/references/tactile-interactions.md +55 -0
  245. package/skills/pixelcraft-mobile/references/task-state-composition.md +82 -2
  246. package/skills/pixelcraft-mobile/references/uikit.md +57 -23
  247. package/skills/pixelcraft-patterns/SKILL.md +30 -13
  248. package/skills/pixelcraft-patterns/references/accessibility-resilience.md +29 -0
  249. package/skills/pixelcraft-patterns/references/ai-and-offline-patterns.md +54 -0
  250. package/skills/pixelcraft-patterns/references/auth-onboarding.md +32 -13
  251. package/skills/pixelcraft-patterns/references/billing-paywalls.md +40 -0
  252. package/skills/pixelcraft-patterns/references/command-workspace.md +56 -0
  253. package/skills/pixelcraft-patterns/references/commerce.md +35 -16
  254. package/skills/pixelcraft-patterns/references/communication.md +34 -15
  255. package/skills/pixelcraft-patterns/references/creative-tools.md +30 -17
  256. package/skills/pixelcraft-patterns/references/creative-web-composition.md +38 -0
  257. package/skills/pixelcraft-patterns/references/dashboard-admin.md +22 -18
  258. package/skills/pixelcraft-patterns/references/history-diff-undo.md +50 -0
  259. package/skills/pixelcraft-patterns/references/marketing.md +31 -19
  260. package/skills/pixelcraft-patterns/references/multi-tenant-rbac.md +47 -0
  261. package/skills/pixelcraft-patterns/references/narrative-systems.md +42 -0
  262. package/skills/pixelcraft-patterns/references/notifications-activity.md +57 -0
  263. package/skills/pixelcraft-patterns/references/pattern-selection.md +8 -2
  264. package/skills/pixelcraft-patterns/references/scheduling-kanban.md +47 -0
  265. package/skills/pixelcraft-patterns/references/scroll-implementation.md +37 -0
  266. package/skills/pixelcraft-patterns/references/settings.md +40 -12
  267. package/skills/pixelcraft-plan/SKILL.md +54 -18
  268. package/skills/pixelcraft-plan/references/discovery-interview.md +110 -0
  269. package/skills/pixelcraft-plan/references/grill-me-protocol.md +63 -0
  270. package/skills/pixelcraft-plan/references/plan-template.md +44 -9
  271. package/skills/pixelcraft-plan/references/repo-discovery.md +16 -9
  272. package/skills/pixelcraft-plan/references/stack-freshness.md +22 -5
  273. package/skills/pixelcraft-plan/references/stack-selection.md +65 -9
  274. package/skills/pixelcraft-review/SKILL.md +41 -19
  275. package/skills/pixelcraft-review/references/audit-report.md +20 -1
  276. package/skills/pixelcraft-review/references/heuristics.md +63 -18
  277. package/skills/pixelcraft-review/references/personas.md +41 -14
  278. package/skills/pixelcraft-review/references/polish.md +66 -26
  279. package/skills/pixelcraft-review/scripts/check-acceptance.mjs +619 -0
  280. package/skills/pixelcraft-review/scripts/fixtures/focus-longhand-removal.css +34 -0
  281. package/skills/pixelcraft-review/scripts/slop-scan.mjs +679 -32
  282. package/skills/pixelcraft-spatial/SKILL.md +16 -17
  283. package/skills/pixelcraft-spatial/references/comfort-accessibility.md +25 -84
  284. package/skills/pixelcraft-spatial/references/platforms.md +123 -53
  285. package/skills/pixelcraft-tokens/SKILL.md +18 -14
  286. package/skills/pixelcraft-tokens/assets/tokens.example.json +1 -1
  287. package/skills/pixelcraft-tokens/assets/tokens.modes.example.json +1 -1
  288. package/skills/pixelcraft-tokens/references/format.md +39 -9
  289. package/skills/pixelcraft-tokens/references/governance.md +1 -1
  290. package/skills/pixelcraft-tokens/references/theme-presets.md +36 -8
  291. package/skills/pixelcraft-tokens/references/token-tooling.md +119 -0
  292. package/skills/pixelcraft-tokens/scripts/export-tokens.mjs +637 -75
  293. package/skills/pixelcraft-tui/SKILL.md +41 -25
  294. package/skills/pixelcraft-tui/references/bubbletea-lipgloss.md +49 -30
  295. package/skills/pixelcraft-tui/references/extended-tui-toolkits.md +127 -0
  296. package/skills/pixelcraft-tui/references/ink.md +77 -28
  297. package/skills/pixelcraft-tui/references/ratatui.md +70 -30
  298. package/skills/pixelcraft-tui/references/rich.md +53 -33
  299. package/skills/pixelcraft-tui/references/terminal-protocols.md +80 -0
  300. package/skills/pixelcraft-tui/references/textual.md +75 -34
  301. package/skills/pixelcraft-ux/SKILL.md +22 -12
  302. package/skills/pixelcraft-ux/references/feedback-performance.md +39 -19
  303. package/skills/pixelcraft-ux/references/forms.md +57 -3
  304. package/skills/pixelcraft-ux/references/i18n.md +50 -12
  305. package/skills/pixelcraft-ux/references/laws.md +35 -14
  306. package/skills/pixelcraft-ux/references/state-matrix.md +15 -1
  307. package/skills/pixelcraft-ux/references/ux-writing.md +1 -0
  308. package/skills/pixelcraft-visual-qa/SKILL.md +21 -7
  309. package/skills/pixelcraft-visual-qa/references/capture-desktop-game.md +28 -7
  310. package/skills/pixelcraft-visual-qa/references/capture-document.md +70 -0
  311. package/skills/pixelcraft-visual-qa/references/capture-email.md +13 -9
  312. package/skills/pixelcraft-visual-qa/references/capture-mobile.md +20 -5
  313. package/skills/pixelcraft-visual-qa/references/capture-terminal.md +6 -2
  314. package/skills/pixelcraft-visual-qa/references/motion-capture.md +63 -0
  315. package/skills/pixelcraft-visual-qa/references/performance-budgets.md +25 -12
  316. package/skills/pixelcraft-visual-qa/references/realtime-graphics.md +55 -0
  317. package/skills/pixelcraft-visual-qa/scripts/check-contrast.mjs +442 -0
  318. package/skills/pixelcraft-visual-qa/scripts/check-email.mjs +397 -0
  319. package/skills/pixelcraft-visual-qa/scripts/check-pdf.mjs +189 -0
  320. package/skills/pixelcraft-visual-qa/scripts/check-tui.mjs +321 -0
  321. package/skills/pixelcraft-visual-qa/scripts/finish-gate.mjs +50 -11
  322. package/skills/pixelcraft-visual-qa/scripts/shoot.mjs +214 -59
  323. package/skills/pixelcraft-visual-qa/scripts/style-inventory.mjs +121 -49
  324. package/skills/pixelcraft-web/SKILL.md +105 -49
  325. package/skills/pixelcraft-web/references/accessibility-performance.md +42 -0
  326. package/skills/pixelcraft-web/references/adaptive-layout.md +52 -8
  327. package/skills/pixelcraft-web/references/angular.md +63 -16
  328. package/skills/pixelcraft-web/references/assets-pipeline.md +67 -0
  329. package/skills/pixelcraft-web/references/astro.md +64 -13
  330. package/skills/pixelcraft-web/references/audio-reactive.md +61 -0
  331. package/skills/pixelcraft-web/references/auth-and-checkout-ui.md +115 -0
  332. package/skills/pixelcraft-web/references/build-and-architecture.md +215 -0
  333. package/skills/pixelcraft-web/references/canvas-and-node-editors.md +157 -0
  334. package/skills/pixelcraft-web/references/clojurescript.md +52 -17
  335. package/skills/pixelcraft-web/references/component-systems.md +102 -0
  336. package/skills/pixelcraft-web/references/component-testing.md +170 -0
  337. package/skills/pixelcraft-web/references/creative-effects.md +59 -0
  338. package/skills/pixelcraft-web/references/creative-runtime.md +34 -0
  339. package/skills/pixelcraft-web/references/enterprise-data-ui.md +138 -0
  340. package/skills/pixelcraft-web/references/file-upload-media-ui.md +82 -0
  341. package/skills/pixelcraft-web/references/forms-validation.md +123 -0
  342. package/skills/pixelcraft-web/references/fsharp-fable.md +3 -2
  343. package/skills/pixelcraft-web/references/gsap.md +102 -0
  344. package/skills/pixelcraft-web/references/html-css.md +144 -12
  345. package/skills/pixelcraft-web/references/htmx-alpine.md +68 -18
  346. package/skills/pixelcraft-web/references/i18n-engineering.md +106 -0
  347. package/skills/pixelcraft-web/references/interaction-and-search-primitives.md +196 -0
  348. package/skills/pixelcraft-web/references/java-web.md +27 -18
  349. package/skills/pixelcraft-web/references/kotlin-web.md +6 -2
  350. package/skills/pixelcraft-web/references/leptos-yew.md +62 -19
  351. package/skills/pixelcraft-web/references/lit-web-components.md +4 -2
  352. package/skills/pixelcraft-web/references/local-first-sync.md +105 -0
  353. package/skills/pixelcraft-web/references/media-players.md +104 -0
  354. package/skills/pixelcraft-web/references/motion-react.md +96 -0
  355. package/skills/pixelcraft-web/references/motion-recipes.md +82 -0
  356. package/skills/pixelcraft-web/references/preact-fresh-hono.md +111 -0
  357. package/skills/pixelcraft-web/references/pwa.md +6 -1
  358. package/skills/pixelcraft-web/references/qwik.md +51 -11
  359. package/skills/pixelcraft-web/references/r3f-integration.md +69 -0
  360. package/skills/pixelcraft-web/references/react-next.md +112 -13
  361. package/skills/pixelcraft-web/references/rendering-choice.md +63 -0
  362. package/skills/pixelcraft-web/references/rendering-performance.md +80 -0
  363. package/skills/pixelcraft-web/references/rich-text-and-code-editors.md +220 -0
  364. package/skills/pixelcraft-web/references/rive-lottie.md +73 -0
  365. package/skills/pixelcraft-web/references/scene-architecture.md +132 -0
  366. package/skills/pixelcraft-web/references/server-rendered.md +106 -63
  367. package/skills/pixelcraft-web/references/shader-workflow.md +77 -0
  368. package/skills/pixelcraft-web/references/smooth-scroll.md +58 -0
  369. package/skills/pixelcraft-web/references/solid.md +67 -16
  370. package/skills/pixelcraft-web/references/state-architecture.md +107 -0
  371. package/skills/pixelcraft-web/references/styling-ecosystem.md +273 -0
  372. package/skills/pixelcraft-web/references/svelte.md +61 -11
  373. package/skills/pixelcraft-web/references/tailwind.md +40 -14
  374. package/skills/pixelcraft-web/references/video-media.md +69 -0
  375. package/skills/pixelcraft-web/references/vue-nuxt.md +37 -13
  376. package/skills/pixelcraft-web/references/web-3d-engines.md +97 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pixelcraft-spatial
3
- description: Designs and verifies spatial, XR, VR, AR, and 3D interfaces across visionOS, WebXR, Three.js/React Three Fiber/A-Frame, Meta Quest Interaction SDK, and Unity XR Interaction Toolkit. Use for windows/volumes/immersive spaces, RealityKit, ornaments, glass materials, hover effects, gaze-and-pinch input, hand/controller interaction, locomotion comfort, depth/layering, XR ergonomics, spatial text legibility, privacy, frame-rate budgets, and XR accessibility.
3
+ description: Designs and verifies embodied spatial, XR, VR, and AR interfaces across visionOS 26, Android XR (Jetpack XR / Compose for XR), Meta Horizon OS / Meta Spatial SDK, WebXR (@react-three/xr, Wonderland Engine, Needle Engine), Unity XR Interaction Toolkit, and Unreal OpenXR. Use for headset, room-scale, windows/volumes/immersive spaces, RealityKit, SceneCore, ornaments/orbiters, gaze-and-pinch/hand/controller input, locomotion comfort, depth/layering, spatial text legibility, frame-rate budgets, privacy, and XR accessibility; ordinary browser 3D scenes use pixelcraft-web.
4
4
  license: MIT
5
5
  metadata:
6
6
  version: 0.1.0
@@ -16,9 +16,11 @@ Attach depth to a meaningful relationship such as an object with nearby annotati
16
16
 
17
17
  ## References
18
18
 
19
- - Read [references/platforms.md](references/platforms.md) for visionOS, WebXR, Three.js/React Three Fiber/A-Frame, Meta Quest Interaction SDK, and Unity XR Interaction Toolkit.
19
+ - Read [references/platforms.md](references/platforms.md) for visionOS 2/26, Android XR (Jetpack Compose for XR / SceneCore), Meta Horizon OS / Meta Spatial SDK, WebXR (`@react-three/xr` v6, Wonderland Engine, Needle Engine, Babylon.js/PlayCanvas WebXR, WebXR Layers), Unity XR Interaction Toolkit, and Unreal OpenXR.
20
20
  - Read [references/comfort-accessibility.md](references/comfort-accessibility.md) for locomotion comfort, frame-rate discipline, ergonomic distances/fields of view, angular sizing, depth/layering, gaze/pinch privacy, text legibility, and XR accessibility.
21
21
 
22
+ For ordinary browser 3D product scenes and graphics runtimes (`<model-viewer>`, Three.js/R3F, Babylon.js, PlayCanvas, Threlte, TresJS, luma.gl), use the `pixelcraft-web` skill.
23
+
22
24
  ## Required workflow
23
25
 
24
26
  1. **Define reality model.** Shared windowed workspace, bounded volume, mixed-reality passthrough, immersive VR, tabletop/room scale, seated/standing/mobile use, and session duration.
@@ -32,21 +34,18 @@ Attach depth to a meaningful relationship such as an object with nearby annotati
32
34
 
33
35
  | Concern | Rule |
34
36
  |---|---|
35
- | dimensional purpose | Use 3D/immersion only when spatial inspection, embodiment, presence, scale, or environmental context improves the task. |
36
- | comfort | Never move/rotate the camera involuntarily; offer locomotion/comfort choices and preserve orientation/recovery. |
37
- | frame stability | Dropped frames/reprojection are UX failures in XR; budget assets/shaders/lights/physics accordingly. |
38
- | input feedback | Every interactable needs hover/target/acquire/release feedback through visual/audio/haptic channels appropriate to input mode. |
39
- | privacy | Treat gaze, hand/body tracking, room geometry, camera/passthrough, biometrics, and spatial audio telemetry as sensitive. |
40
- | accessibility | Provide seated/standing/one-handed/controller alternatives, captions/audio equivalents, contrast/scale controls, reduced motion, and non-head-aimed interaction where possible. |
41
- | anti-slop | Reject floating glass panels everywhere, pointless particle/depth effects, miniature desktop UI, unbounded scroll walls, motion-heavy demos, and demo scenes that ignore safety boundaries. |
37
+ | **Meta Quest VRC & frame lock** | Render the first head-tracked interactive frame in **`<= 4 s`** from launch and hold a locked **`72 / 90 / 120 fps`** (**`0` head-pose frame drops**; enable dynamic/eye-tracked foveated rendering `FFR`/`ETFR` before cutting stereo clarity). |
38
+ | **visionOS target & zero-shift gaze** | Size interactive spatial targets **`>= 60×60 pt` (`dpt`)** with **`>= 12–16 pt` edge spacing** (`>= 72–76 pt` center-to-center) and enforce **zero geometry/layout shift on eye-gaze hover**—use subtle OS specular/luminance `.hoverEffect()` only (resizing or nudging bounds under gaze causes saccadic oscillation and eye strain!). |
39
+ | **Spatial ergonomics & postures** | Anchor primary reading/control panels **`1.2–2.0 m`** away and **`5–15°` below eye horizon**, support **relaxed lap-level indirect pinch** ("gorilla-arm" prevention), **full one-handed completion** (zero mandatory two-hand chorded gestures without single-hand alternative), and **Seated, Standing, Wheelchair, AND Lying-down / Reclined recentering & height calibration**. |
40
+ | **No head-locked HUDs & interruption recovery** | **Never lock world-blocking HUD panels rigidly to head rotation** (use world-locked, lazy-follow, or wrist/orbiter anchors); never rotate/move the camera involuntarily; ship **teleport + `30–45°` snap-turn + angular comfort vignette** defaults; and handle **tracking-lost, low-light hand-tracking degradation, small-room/stationary guardian boundary, and headset-removed/donned interruption states** gracefully without disorientation or data loss. |
41
+ | **Passthrough & privacy** | Reserve raw eye-gaze rays strictly to OS system hover (zero covert gaze telemetry), disclose room/hand/camera permissions, and verify **passthrough UI legibility in both sunlit bright rooms AND dim rooms**. |
42
+ | **Spatial captions, audio cues & physical comfort QA** | Pair directional 3D audio with **world/lazy-anchored spatial captions AND directional visual edge/radar cues** so deaf/HoH users never miss off-FOV events; provide controller/hand/voice parity; and run **multi-user body/IPD/vision comfort testing on physical headsets** (`rendered`, never inferred from flat 2D simulator previews per `Rule #0.3`). |
42
43
 
43
44
  ## Pre-submit checklist
44
45
 
45
- - [ ] reality model, session duration, physical posture, and input modes are explicit;
46
- - [ ] object scale/distance/angular size can be recalculated from documented assumptions;
47
- - [ ] primary content stays in a comfortable viewing/interaction envelope;
48
- - [ ] depth/layering/occlusion collisions are tested from multiple positions/heights;
49
- - [ ] locomotion and camera-motion choices include comfort settings;
50
- - [ ] measured frame timing/headroom meets the target device or is `not-checked`;
51
- - [ ] gaze/hand/camera/room data collection is minimized and disclosed;
52
- - [ ] accessibility alternatives were implemented or explicitly labeled `not-checked`.
46
+ - [ ] **Boot & frame budget**: first head-tracked frame **`<= 4 s`** and locked **`72 / 90 / 120 fps`** (`0` head-pose drops, dynamic foveation profiled) verified on physical headset or marked `not-checked`;
47
+ - [ ] **Targets & gaze stability**: visionOS/spatial controls **`>= 60×60 pt` (`dpt`)** with **`>= 12–16 pt` spacing** and **zero layout/geometry shift on eye-gaze hover**;
48
+ - [ ] **Ergonomics, one-handed & wheelchair postures**: primary panels **`1.2–2.0 m`** at **`5–15°` below eye horizon**, **relaxed lap-level indirect pinch**, **one-handed mode**, and **Seated + Standing + Wheelchair + Lying-down/Reclined** recentering verified;
49
+ - [ ] **Comfort, captions & interruptions**: zero head-locked world-blocking HUDs; teleport + **`30–45°` snap-turn** + vignette defaults; **spatial captions & visual cues for spatial audio**; and **tracking-lost / low-light / small-room / headset-removed interruption states** handled cleanly;
50
+ - [ ] **Real-room passthrough, privacy & multi-user headset comfort**: text/glass contrast tested in **sunlit bright + dim rooms**, eye-gaze kept private to OS hover, and **multi-user body/vision comfort tested on physical headsets** (or labeled `not-checked`);
51
+ - [ ] **Checklist-Until-Passing Stop-Gate (`<HARD-GATE>`):** walk every checklist item above + run `slop-scan.mjs --fail-on p2`, `check-contrast.mjs`, XR build/profiler checks, and `check-acceptance.mjs .pixelcraft/acceptance.json` (`pixelcraft-review`) in a `Fix → Re-verify` loop until passing (`0` `fail`/`pending` rows, `rendered` evidence on visual/perf/a11y per `Rule #0.3`).
@@ -1,98 +1,39 @@
1
1
  # XR comfort, ergonomics, and accessibility
2
2
 
3
- ## Locomotion and frame-rate comfort
3
+ ## Locomotion, boot time (`<= 4 s`), and locked frame-rate comfort
4
4
 
5
- Motion sickness usually comes from sensory conflict: visual motion without matching vestibular motion, unexpected camera acceleration/rotation, latency, or unstable frames.
5
+ Motion sickness stems from visual-vestibular conflict, camera acceleration, head-locked clutter, or dropped head-tracked frames:
6
6
 
7
- Rules:
7
+ - **Meta Quest VRC boot & frame lock**: render the **first head-tracked interactive frame in `<= 4 seconds`** from app launch (never hang on a frozen black stereo buffer!) and sustain a locked **`72 / 90 / 120 fps`** with **`0` head-pose frame drops**, enabling **Dynamic / Eye-Tracked Foveated Rendering (`FFR` / `ETFR`)** and stereo layers before sacrificing text resolution.
8
+ - **Zero head-locked world-blocking HUDs**: **never bolt opaque HUD panels rigidly to the HMD camera transform**—head-locked panels induce immediate claustrophobia and prevent users from glancing directly at corner labels! Use lazy-follow/tag-along tethers with angular deadzones, wrist anchors, or world-locked spatial panels.
9
+ - **Comfort locomotion defaults**: never move/rotate/tilt the camera involuntarily; default to **physical movement / teleport + `30–45°` snap-turn + angular tunneling vignette** (offering smooth locomotion/turn strictly as opt-in comfort settings).
8
10
 
9
- - never move/rotate/tilt the camera involuntarily for cutscenes, transitions, impacts, or UI emphasis;
10
- - prefer physical movement or teleport for high-comfort defaults;
11
- - offer snap turn and smooth turn as explicit settings; do not decide one is universally correct;
12
- - use acceleration sparingly; constant velocity is usually easier than rubbery acceleration;
13
- - use tunneling/vignette during artificial locomotion, configurable in angular size/feather/color where supported;
14
- - avoid forced bobbing/head shake/peripheral motion particles;
15
- - maintain orientation landmarks and provide recentering/pause/exit at all times;
16
- - preserve user control during loading/network stalls.
11
+ ## Ergonomic placement (`1.2–2.0 m`, `5–15°` below horizon), targets, and lap pinch
17
12
 
18
- There is no universal “correct FPS” across devices. The hard rule is to meet the target headset/runtime frame rate with worst-case scenes and thermal state. Design scenes with measured headroom rather than average frame rate; frame-time spikes matter. Test density, lighting/shadows, transparency/overdraw, postprocessing, physics, GC churn, asset streaming, and both eyes.
13
+ Use angular and physical ergonomics together (`physical size ≈ 2 × distance × tan(angle / 2)`; `1° ≈ 17.5 mm` at `1 m`, `35 mm` at `2 m`):
19
14
 
20
- ## Ergonomic distances, field of view, and angular sizing
21
-
22
- These are working spatial-design heuristics, not regulatory constants. Validate target headset optics/body size/app scale. Use angular measures because physical pixel size at one distance is meaningless in XR.
23
-
24
- Angular conversion:
25
-
26
- ```text
27
- physical size ≈ 2 × distance × tan(angle / 2)
28
- ```
29
-
30
- At 1 meter, a 0.5° object is about 8.7 mm tall and a 1° object about 17.5 mm tall. At 2 meters those values double.
31
-
32
- Practical starting envelope:
33
-
34
- | Concern | Initial heuristic |
15
+ | Concern | Studio-Grade spatial specification |
35
16
  |---|---|
36
- | frequent direct interaction | roughly 0.5–1.5 m from user, within reachable/comfortable arm/torso posture |
37
- | primary read/watch content | roughly 1–3 m depending scale/session; avoid forcing prolonged neck flexion |
38
- | near boundary | be cautious below ~0.5 m because stereo convergence/focus and physical collision discomfort increase |
39
- | frequent attention zone | around eye height within approximately ±15° vertical/horizontal of neutral forward gaze |
40
- | secondary scan zone | up to roughly ±30°, not dense permanent controls |
41
- | periphery | ambient/wayfinding only; no critical persistent text or tiny targets |
42
- | critical short text | start around 0.5° visual angle or larger and validate in headset |
43
- | ordinary readable body text | often needs ~0.7–1°+ depending duration/contrast/typeface/user |
44
- | minimum target visual size | start around 1–1.5° plus input-error tolerance; increase for gaze/hand/controller imprecision |
45
-
46
- Do not copy phone point sizes into 3D. Compute physical size from intended distance using the formula above. Validate seated/standing heights, wheelchair reach, shorter/taller users, and recentering behavior.
47
-
48
- ## Depth and layering
49
-
50
- Depth should encode spatial meaning:
51
-
52
- - near objects invite direct manipulation;
53
- - mid-distance surfaces support reading/selection;
54
- - distant content supports scale/context/ambience;
55
- - foreground occlusion must never hide critical controls unexpectedly;
56
- - shadows/contact cues/lighting establish grounding better than arbitrary float height;
57
- - parallax is evidence of depth—test while moving, not only from a fixed camera screenshot.
58
-
59
- Avoid z-fighting, intersecting panels, clipping through walls/users, duplicate curved screens at slightly different depths, and eye-level content that blocks passthrough/safety awareness. In mixed reality, respect real surfaces/occlusion rather than treating the room as empty.
60
-
61
- ## Gaze-and-pinch input and privacy
62
-
63
- Gaze direction, dwell time, hand/body pose, room scans, passthrough imagery, voice, and behavioral biometrics are sensitive even when no raw camera frame is stored.
64
-
65
- Rules:
66
-
67
- - prefer system-mediated hover/selection feedback;
68
- - collect the minimum spatial/eye/hand telemetry necessary and define retention;
69
- - do not use covert dwell/attention scoring for manipulation or advertising;
70
- - explain permission purpose in plain language before system prompts;
71
- - provide controller/indirect/touch alternatives where gaze/hand tracking is unavailable or denied;
72
- - never require precise pinch/rapid gestures as the only completion path.
73
-
74
- Input feedback sequence: target/hover → confirmation of acquisition → manipulation/state change → release/commit. Missing intermediate feedback makes spatial controls feel unreliable.
17
+ | **Primary panel anchor** | **`1.2–2.0 m` depth**, angled **`5–15°` below the eye horizon** (natural resting neck/gaze posture; placing primary UI above horizon causes rapid cervical strain) |
18
+ | **visionOS / spatial target floor** | **`>= 60×60 pt` (`dpt`)** interactive hit area with **`>= 12–16 pt` minimum edge spacing** (`>= 72–76 pt` center-to-center) for reliable eye-gaze + pinch targeting |
19
+ | **"Gorilla-arm" prevention** | Support **relaxed lap-level indirect gaze-and-pinch / controller ray** for sustained sessions (`> 2 min`); reserve `0.4–0.6 m` direct mid-air poke strictly for brief optional physical manipulation |
20
+ | **4-posture recentering** | Support **Seated**, **Standing**, **Wheelchair** (reachable arm-arc & clearance without floor-crouch assumptions), **AND Lying-down / Reclined** (`up`-vector pitch tilt) recentering |
21
+ | **Near boundary** | Keep sustained reading surfaces **`>= 0.5 m`** away to avoid vergence-accommodation conflict |
75
22
 
76
- ## Text legibility in XR
23
+ ## Depth, layering, and real-room passthrough lighting QA
77
24
 
78
- - use high contrast, sturdy weight, generous line spacing, and controlled measure;
79
- - avoid thin/light fonts, subpixel-dependent detail, dense tables, and long paragraphs;
80
- - keep text surfaces perpendicular enough to view direction or provide billboard/reorientation behavior deliberately;
81
- - account for chromatic aberration at lens edges, mura/compression, passthrough lighting, and accommodation distance;
82
- - localize expansion/CJK/RTL/Indic scripts and test glyph rasterization at physical scale;
83
- - use semantic UI/text objects rather than baking critical text into textures where possible.
25
+ - Near objects invite direct manipulation; mid-distance (`1.2–2.0 m`) panels support reading/selection; distant geometry provides ambient context.
26
+ - Avoid z-fighting, intersecting panels, and eye-level overlays that block real-world tripping hazards in mixed reality.
27
+ - **Dual-lighting passthrough legibility QA**: translucent glass/additive spatial materials wash out against sunlit windows and glare harshly in dark bedrooms. **Test passthrough UI legibility in BOTH sunlit bright rooms (`> 500–1,000 lux`) AND dim rooms (`< 20 lux`)**, providing adaptive dark scrims/plates behind typography.
84
28
 
85
- ## Accessibility in XR
29
+ ## Zero-shift eye-gaze hover & biometric privacy
86
30
 
87
- Provide meaningful alternatives rather than declaring XR inherently exempt:
31
+ - **Zero geometry or layout shift on eye-gaze hover**: when a user's eyes sweep across controls, **never scale, translate, expand, or reflow button bounds on hover**! Moving target edges under eye-gaze triggers involuntary corrective saccades, hover oscillation loops, and severe eye strain. Use **subtle OS-rendered specular/luminance `.hoverEffect()` highlights only**, deferring size/layout transitions until explicit pinch/click commit.
32
+ - **Strict gaze privacy**: keep raw eye-tracking vectors inside the OS compositor hover boundary—never record covert gaze heatmaps or dwell biometrics without explicit opt-in clinical/research consent, and always provide controller/hand/voice parity when eye tracking is uncalibrated or denied.
88
33
 
89
- - seated mode, height scaling, recentering, one-handed mode, controller-only mode;
90
- - captions/subtitles and visual alerts for spatial audio cues;
91
- - audio/haptic cues for visual state and visual cues for audio/haptic state;
92
- - adjustable text scale/contrast/brightness and color-independent encoding;
93
- - reduced motion/comfort presets and locomotion speed/turn-angle controls;
94
- - remappable input and dwell/activation alternatives;
95
- - screen reader/voice access where platform supports it, semantic object labels otherwise;
96
- - safe exit/pause accessible without precise gesture or visual search.
34
+ ## Interruption recovery, spatial captions & multi-user headset comfort QA
97
35
 
98
- Test with real target users/devices where possible. Simulator compliance checklists do not capture fatigue, nausea, reach, tracking failure, or sensory overload.
36
+ - Use sturdy font weights (Regular/Medium+), generous leading, perpendicular/billboarded text planes, and native **compositor quad/cylinder layers** (`ViewAttachmentComponent`, `WebXR Layers`, `UStereoLayerComponent`) rather than double-sampled eye-buffer textures.
37
+ - **Accessibility & spatial audio cues**: provide **Seated / Standing / Wheelchair / Reclined** posture modes, **full one-handed mode** (zero mandatory two-hand chorded gestures without single-hand alternative), **world/lazy-anchored spatial captions AND directional visual edge/radar cues for spatial audio**, adjustable text/panel scale, and an always-reachable pause/exit action.
38
+ - **Hardware & environment interruption states**: handle **tracking-lost, low-light hand-tracking fallback, small-room / stationary guardian boundary, and headset-removed / re-donned session pause & re-anchoring** cleanly without camera lurch or state loss.
39
+ - **Multi-user physical headset comfort testing**: run comfort and legibility sessions across **multiple users spanning different heights, IPDs, glasses/prescription inserts, and motion-sensitivity profiles on physical headsets** (`rendered`—simulator previews never satisfy `Rule #0.3` for stereo comfort or thermal `72/90/120 fps` lock; mark unavailable hardware `not-checked`).
@@ -1,77 +1,147 @@
1
- # XR platform notes
1
+ # XR platform idioms
2
2
 
3
- ## visionOS
3
+ ## visionOS (visionOS 2 & visionOS 26)
4
4
 
5
5
  Core surface model:
6
6
 
7
7
  | Surface | Use |
8
8
  |---|---|
9
- | window | ordinary 2D UI floating in Shared Space; resize/adaptation are standard expectations |
10
- | volume | bounded 3D content people can view from multiple angles without taking over the whole space |
11
- | immersive space | content controls the scene; use when presence/world interaction is the point, not for ordinary forms |
12
-
13
- Apple guidance warns that supplemental content generally belongs in an adjacent window rather than ornaments. Use ornaments for controls/tooling closely tied to a window, keep them reachable at resize extremes, and avoid duplicate navigation chrome. Use system glass/material behavior for the control layer; do not apply translucent material indiscriminately to content where it harms legibility. Inset meaningful inline 3D objects so they do not collide with edges/controls.
14
-
15
- Input/privacy facts from Apple's guidance:
16
-
17
- - gaze-and-pinch input is private by design: hover feedback lets people know what is targeted without exposing gaze before selection;
18
- - use system/SwiftUI/RealityKit hover effects rather than logging gaze merely to recreate feedback;
19
- - ARKit world/hand/scene data may require a Full Space and explicit permission depending on feature;
20
- - do not infer emotion/identity/attention beyond the user's explicit input;
21
- - support indirect input, direct touch equivalents, keyboard/gamepad/accessibility paths where relevant.
9
+ | `WindowGroup` | 2D / shallow-depth UI in Shared Space; resizing and multitasking adaptation are mandatory |
10
+ | `WindowGroup` (volumetric / `Volume`) | bounded 3D content viewed from multiple angles without taking over the user's room |
11
+ | `ImmersiveSpace` | Full Space world or mixed-reality scene when spatial presence or room-scale interaction is the task |
12
+
13
+ Key visionOS 2 & visionOS 26 capabilities:
14
+
15
+ - **visionOS 2**: react to viewing angle around volumes via `VolumeViewpoint` (`onVolumeViewpointChange`), build shared tabletop experiences with **`TabletopKit`** (table surface, seats, pawns, physics), and handle unified indirect/direct 3D input via `SpatialTapGesture` and `SpatialEventCollection`.
16
+ - **visionOS 26**: author 3D SwiftUI hierarchies directly with **`SpatialLayout`**, **`depthAlignment`**, and **`ViewAttachmentComponent`** (attaching SwiftUI views straight onto RealityKit entities without boilerplate `attachments:` closures); anchor persistent **wall and table spatial widgets** (`WidgetKit` spatial mounting styles); coordinate shared spatial seating and **Spatial Personas / SharePlay** via `SystemCoordinator`; apply **Liquid Glass** spatial material updates thoughtfully (preserve text contrast over bright/cluttered passthrough); and embed stereo 3D on the spatial web via Safari's **`<model>`** element.
17
+ - **Target sizing (`>= 60×60 pt`), zero-shift hover & privacy**: size every visionOS interactive control **`>= 60×60 pt` (`dpt`)** (via `.frame(minWidth: 60, minHeight: 60)` + `.contentShape(...)`) with **`>= 12–16 pt` spacing** between adjacent hit bounds; apply OS `.hoverEffect(.highlight)` **without scaling or shifting layout geometry on gaze hover**; keep gaze-and-pinch private to system hover; and verify **Liquid Glass** legibility over both sunlit and dim passthrough rooms.
18
+
19
+ ```swift
20
+ import SwiftUI
21
+ import RealityKit
22
+
23
+ struct InspectionVolume: View {
24
+ var body: some View {
25
+ RealityView { content in
26
+ let root = Entity()
27
+ // visionOS 26: attach SwiftUI directly as an entity component
28
+ let label = Entity()
29
+ label.components.set(ViewAttachmentComponent(rootView: Text("Turbine Core").padding(12).glassBackgroundEffect()))
30
+ label.position = [0, 0.25, 0]
31
+ root.addChild(label)
32
+ content.add(root)
33
+ }
34
+ .gesture(SpatialTapGesture().targetedToAnyEntity().onEnded { value in
35
+ // Unified relaxed lap-level gaze+pinch or direct touch hit handling
36
+ handleInspect(entity: value.entity)
37
+ })
38
+ }
39
+ }
40
+ ```
22
41
 
23
- RealityKit/SwiftUI rules:
42
+ ## Android XR (Jetpack XR SDK / Jetpack Compose for XR / SceneCore)
43
+
44
+ Android XR distinguishes **Home Space** (multitasking shared space where existing 2D Android/Compose apps spatialize automatically alongside other apps) from **Full Space** (single focused app with unbounded 3D environment, passthrough control, spatial panels, and 3D glTF entities via **SceneCore**).
45
+
46
+ Use **Jetpack Compose for XR** (`androidx.xr.compose.spatial`) and **Material Design for XR** idioms:
47
+
48
+ - `Subspace`: hosts spatial composables inside a 3D coordinate container when in Full Space;
49
+ - `SpatialPanel`: positions interactive Compose UI panels in 3D space (`1.2–2.0 m` default distance, `5–15°` below horizon) with resize/move policies;
50
+ - `Orbiter`: attaches floating contextual navigation rails, toolbars, or controls offset from a panel edge (Android XR equivalent of visionOS ornaments);
51
+ - `SpatialRow` / `SpatialColumn` and `SpatialElevation` (`SpatialElevationLevel`): arrange multi-panel workspaces and depth hierarchy without manual matrix math;
52
+ - **SceneCore (`Session`, `GltfModelEntity`)**: load 3D glTF/GLB assets, spatial audio, and environment skyboxes alongside Compose panels.
53
+
54
+ ```kotlin
55
+ import androidx.compose.runtime.Composable
56
+ import androidx.compose.ui.unit.dp
57
+ import androidx.xr.compose.spatial.ContentEdge
58
+ import androidx.xr.compose.spatial.Orbiter
59
+ import androidx.xr.compose.spatial.Subspace
60
+ import androidx.xr.compose.subspace.SpatialPanel
61
+ import androidx.xr.compose.subspace.SpatialRow
62
+ import androidx.xr.compose.subspace.layout.SubspaceModifier
63
+ import androidx.xr.compose.subspace.layout.height
64
+ import androidx.xr.compose.subspace.layout.width
65
+
66
+ @Composable
67
+ fun SpatialWorkspace() {
68
+ Subspace {
69
+ SpatialRow {
70
+ SpatialPanel(SubspaceModifier.width(900.dp).height(640.dp)) {
71
+ MainDocumentView()
72
+ Orbiter(position = ContentEdge.Start, offset = 24.dp) {
73
+ WorkspaceNavRail()
74
+ }
75
+ }
76
+ }
77
+ }
78
+ }
79
+ ```
24
80
 
25
- - choose `WindowGroup`, `Volume`, or `ImmersiveSpace` deliberately rather than mixing all three by default;
26
- - keep entity hierarchy/scale in meters and account for resize/reposition;
27
- - use attachments/ornaments for UI connected to 3D entities only when alignment and collision behavior are tested;
28
- - test Shared Space behavior with other apps/windows and Full Space permission boundaries separately.
81
+ Verify both Home Space fallback (2D window resizing without `Subspace`) and Full Space transition (`Session.scene.spatialEnvironment`) so apps degrade gracefully when users switch spaces.
29
82
 
30
- ## WebXR, Three.js, React Three Fiber, and A-Frame
83
+ ## Meta Horizon OS and Meta Spatial SDK (`VRC` Certification Gates)
31
84
 
32
- The WebXR Device API is a W3C browser standard surface. Core concepts:
85
+ Meta Quest Store **Virtual Reality Checks (`VRCs`)** enforce hard startup, frame-pacing, and comfort thresholds:
33
86
 
34
- - feature-detect `navigator.xr` and `isSessionSupported(mode)`;
35
- - common modes are `inline`, `immersive-vr`, and `immersive-ar`;
36
- - request sessions with required/optional features explicitly (`local-floor`, `bounded-floor`, `hand-tracking`, `layers`, plane/mesh features where supported);
37
- - input sources expose handedness/target ray/grip semantics depending on device;
38
- - browser/session support is fragmented; provide non-XR fallback and do not use user-agent detection.
87
+ - **VRC performance gates**: render the **first head-tracked interactive frame in `<= 4 s`** from cold launch (stream heavy assets asynchronously behind a responsive head-tracked splash/environment), sustain locked **`72 / 90 / 120 fps`** (`0` head-pose stalls), and enable **Dynamic Foveated Rendering (`OVRManager.foveatedRenderingLevel = HighTop / Dynamic`)**.
88
+ - **Meta Spatial SDK (native Android / Kotlin)**: build lightweight Quest spatial apps directly in Kotlin + Jetpack Compose panels + Spatial SDK ECS without a Unity/Unreal runtime—ideal for productivity, media, and mixed-reality utilities needing fast `<= 4 s` startup and crisp 2D/3D text.
89
+ - **Meta XR Interaction SDK (Unity / Unreal)** + **Horizon OS UI Set**: support seamless controller + relaxed lap-level hand-pinch parity, **Seated / Standing / Lying-down** recentering, and `30–45°` snap-turn + angular tunneling vignette comfort defaults (never lock opaque HUD panels to head rotation).
90
+ - **Mixed Reality & Passthrough**: use **MRUK (Mixed Reality Utility Kit)** and OpenXR scene understanding for room mesh, walls, tables, and persistent spatial anchors; disclose **Passthrough Camera API** usage explicitly and verify UI legibility in both bright sunlit rooms and dim rooms.
39
91
 
40
- Three.js baseline:
92
+ ## WebXR (2025–2026)
41
93
 
42
- ```js
43
- renderer.xr.enabled = true;
44
- renderer.setAnimationLoop(render);
45
- ```
94
+ Feature-detect `navigator.xr` and `await navigator.xr.isSessionSupported('immersive-vr' | 'immersive-ar')` with explicit session features (`local-floor`, `bounded-floor`, `hand-tracking`, `layers`) and always ship a non-XR desktop/mobile fallback.
46
95
 
47
- Use `setAnimationLoop`, not a normal animation-frame loop, for XR presentation. Manage reference-space scale, camera rig movement rather than camera-only hacks, controller events, resize/session end, color space, tone mapping, and frame budget. Do not import desktop postprocessing chains without measuring stereo cost.
96
+ ### `@react-three/xr` v6 + `@pmndrs/uikit`
48
97
 
49
- React Three Fiber/XR packages wrap Three.js rather than removing XR constraints. Keep immutable scene state outside per-frame render paths, dispose GPU resources, memoize geometry/materials, and profile both eyes. Use the current `@react-three/xr` API/version rather than copying older examples.
98
+ Use the v6 store API (`createXRStore()`, `<XR store={store}>`, `<XROrigin>`) rather than deprecated v5 `<VRButton>`/`<Controllers>`/`<Hands>` wrappers. Pair with **`@pmndrs/uikit`** for crisp MSDF/SDF Flexbox spatial UI inside Three.js/R3F instead of blurry HTML-to-canvas textures:
50
99
 
51
- A-Frame is entity-component HTML-like composition over Three.js. It is appropriate for declarative prototypes/scenes, but component lifecycle, asset loading, occlusion, input abstraction, and version compatibility still require real-device verification.
100
+ ```tsx
101
+ import { Canvas } from '@react-three/fiber';
102
+ import { createXRStore, XR, XROrigin } from '@react-three/xr';
103
+ import { Root, Container, Text } from '@react-three/uikit';
52
104
 
53
- ## Meta Quest / Interaction SDK
105
+ const store = createXRStore();
54
106
 
55
- Use native interaction primitives instead of custom rays/colliders where possible:
107
+ export function SpatialApp() {
108
+ return (
109
+ <>
110
+ <button onClick={() => store.enterVR()}>Enter VR</button>
111
+ <Canvas>
112
+ <XR store={store}>
113
+ <XROrigin position={[0, 0, 1.5]} />
114
+ <group position={[0, 1.4, 0]}>
115
+ <Root sizeX={1.2} sizeY={0.7} flexDirection="column" padding={24} backgroundColor="#111827">
116
+ <Container>
117
+ <Text fontSize={32} color="#f8fafc">Spatial Control Panel</Text>
118
+ </Container>
119
+ </Root>
120
+ </group>
121
+ </XR>
122
+ </Canvas>
123
+ </>
124
+ );
125
+ }
126
+ ```
56
127
 
57
- - ray/distance interaction for sparse distant targets;
58
- - poke/direct touch for near panels;
59
- - grab/hand interaction for physical manipulation;
60
- - controller and hand-tracking parity or explicit alternatives;
61
- - visual/audio/haptic feedback for hover/select/grab/release;
62
- - hand tracking loss/false-positive recovery.
128
+ ### Dedicated WebXR engines, layers, and WebGPU caveats
63
129
 
64
- Meta's locomotion tunneling implementation defines the vignette angularly rather than assuming a fixed device FOV. That principle matters generally: express comfort occlusion in visual-angle terms, not screen UV alone.
130
+ - **Wonderland Engine**: WebAssembly + WebGL2 engine engineered specifically for standalone headset WebXR frame-rate budgets, tiny download payloads, and instanced rendering.
131
+ - **Needle Engine**: exports Unity/Blender scenes to WebXR/Three.js + USDZ Quick Look (visionOS/iOS) from one authoring pipeline.
132
+ - **Babylon.js & PlayCanvas WebXR**: use `scene.createDefaultXRExperienceAsync(...)` (Babylon) or `app.xr.start(camera, pc.XRTYPE_VR, pc.XRSPACE_LOCALFLOOR)` (PlayCanvas). **WebGPU + WebXR (`XRGPUBinding`) remains experimental/flag-gated across headset browsers—always provide a WebGL2 fallback path.**
133
+ - **WebXR Layers (`XRProjectionLayer`, `XRQuadLayer`, `XRCylinderLayer`)**: submit spatial UI panels and video directly to the XR compositor via quad/cylinder layers so text renders at native headset resolution without double-sampling through the eye buffer.
134
+ - **Three.js / A-Frame baseline**: always drive XR frames with `renderer.setAnimationLoop(render)` (never `requestAnimationFrame`), move an XR rig rather than fighting tracked camera transforms, and measure stereo frame time on standalone headsets rather than desktop GPUs.
65
135
 
66
- ## Unity XR Interaction Toolkit
136
+ ## Unity XR Interaction Toolkit (XRI)
67
137
 
68
- Useful architecture:
138
+ - Move the player via `XROrigin` + locomotion mediator/providers (teleport, snap turn, smooth turn, angular tunneling vignette).
139
+ - Use `XRBaseInteractor` / `XRBaseInteractable` (Near-Far Interactor, Poke Interactor, Ray Interactor) with Input System Action Maps across OpenXR controller and hand profiles.
140
+ - Profile on target standalone hardware (Quest / Android XR / visionOS via PolySpatial) using Unity Profiler + OVR Metrics Tool / RenderDoc—desktop editor frame rates hide mobile tile-GPU overdraw, thermal throttling, and GC spikes.
69
141
 
70
- - XR Origin/XR rig as the movable player reference;
71
- - interactors/interactables rather than ad hoc raycast input;
72
- - locomotion mediator/providers for move/turn/teleport;
73
- - snap turn and continuous turn as distinct user options;
74
- - tunneling vignette as a configurable comfort mode;
75
- - input action abstraction across controller profiles.
142
+ ## Unreal Engine OpenXR
76
143
 
77
- Measure frame timing in Unity Profiler/device capture, not editor playback. Quest/Android XR builds have different thermal/GC/rendering constraints than desktop editor runs.
144
+ - Target the official **OpenXR** plugin (`OpenXR`, `OpenXRHandTracking`, `XRBase`) with **Enhanced Input** action mappings so motion controllers and hand-tracking profiles stay portable across Quest, PCVR, and Android XR.
145
+ - Interact with 3D `UWidgetComponent` menus using **`UWidgetInteractionComponent`** attached to controller/hand aim poses (set explicit interaction distance, debug visualization off in shipping builds, and ensure hover/focus states respond cleanly).
146
+ - Render critical HUD text, subtitles, and menus with **Stereo Layers (`UStereoLayerComponent`, Quad/Cylinder/Equirect)** so the XR compositor samples them directly at native sharpness instead of blurring text through temporal anti-aliasing / eye-buffer distortion.
147
+ - Budget draw calls, instanced stereo rendering, forward shading vs mobile deferred, and Vulkan mobile MSAA explicitly in Unreal Insights on device (`rendered`).
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pixelcraft-tokens
3
- description: Creates and exports cross-platform design tokens in the W3C Design Tokens Community Group 2025.10 format. Use when defining color, type, spacing, radius, motion, elevation, theme, dark-mode, semantic, component, or multi-platform design-token systems; converting a direction card into reusable tokens; or exporting tokens for CSS, Tailwind, SwiftUI, Compose, Flutter, Python, Qt, or Textual.
3
+ description: Creates, resolves, and exports cross-platform design tokens in the W3C Design Tokens Community Group (DTCG) 2025.10 format and DTCG Resolver specification. Use when defining OKLCH color ramps, type, spacing, radius, motion, elevation, theme, dark-mode, semantic, component, or multi-platform token systems; wiring Style Dictionary, Terrazzo, Tokens Studio, Figma Variables, or Code Connect pipelines; or exporting tokens across 19 formats including CSS, Tailwind, SCSS, TypeScript, Swift, Kotlin, Android XML, Dart, Python, Qt, Textual, XAML, Rust, Go Lip Gloss, Godot, Unity USS, Slint, GTK4, and Typst.
4
4
  license: MIT
5
5
  metadata:
6
6
  version: 0.1.0
@@ -12,13 +12,14 @@ Tokens are design decisions in portable form. They encode hierarchy and semantic
12
12
 
13
13
  ## Reference and tools
14
14
 
15
- - Read [references/format.md](references/format.md) when authoring DTCG structure, references, modes, themes, or token tiers.
16
- - Read [references/theme-presets.md](references/theme-presets.md) when designing light/dark/high-contrast modes, dark elevation/accent behavior, forced-colors behavior, or exporter-supported DTCG mode overrides.
15
+ - Read [references/format.md](references/format.md) when authoring DTCG 2025.10 structure, `$extends`/`$root`/`$deprecated`, references, or DTCG Resolver (`*.resolver.json`) modes and themes.
16
+ - Read [references/theme-presets.md](references/theme-presets.md) when designing light/dark/high-contrast modes, `light-dark()`, `prefers-reduced-transparency`, forced-colors behavior, anti-FOUC theme initialization, or DTCG mode overrides.
17
17
  - Read [references/state-tokens.md](references/state-tokens.md) whenever defining interactive control states or validating state coverage across modes.
18
- - Read [references/governance.md](references/governance.md) before renaming, removing, versioning, deprecating, or meaningfully redefining tokens.
18
+ - Read [references/governance.md](references/governance.md) before renaming, removing, versioning, deprecating (`$deprecated`), or meaningfully redefining tokens.
19
19
  - Read [references/adoption.md](references/adoption.md) when migrating consumers, inventorying hardcoded values, or improving documentation/usage of an existing system.
20
+ - Read [references/token-tooling.md](references/token-tooling.md) when setting up Terrazzo, Style Dictionary v4, Tokens Studio transforms, Figma Variables, Figma MCP Server, or Figma Code Connect mappings.
20
21
  - Use [assets/tokens.example.json](assets/tokens.example.json) as the canonical small example and [assets/tokens.modes.example.json](assets/tokens.modes.example.json) for mode overrides.
21
- - Run `node scripts/export-tokens.mjs --help` for exporter usage. The exporter supports `css`, `tailwind`, `swift`, `kotlin`, `dart`, `python`, `qt`, and `textual`.
22
+ - Run `node scripts/export-tokens.mjs --help` for exporter usage. The exporter supports all 19 formats: `css`, `tailwind`, `scss`, `ts`, `swift`, `kotlin`, `android-xml`, `dart`, `python`, `qt`, `textual`, `xaml`, `rust`, `go-lipgloss`, `godot`, `unity-uss`, `slint`, `gtk4`, and `typst`.
22
23
 
23
24
  ## Token tiers
24
25
 
@@ -38,19 +39,22 @@ Consumers should use the highest meaningful tier. Component code should almost n
38
39
  - Include density-aware spacing only when the product actually supports density modes; otherwise prefer one coherent rhythm.
39
40
  - Tokenize motion intent (`duration.feedback-fast`, `easing.standard`) rather than implementation property names.
40
41
  - Keep platform units out of semantic meaning. Exporters translate dimension units; `px` in DTCG input does not mean every platform should use pixels conceptually.
42
+ - **Ban Tailwind arbitrary-value sprawl:** never scatter magic literals like `bg-[#1f2937]`, `text-[#64748b]`, `p-[13px]`, or `rounded-[14px]` across components—promote recurring values into semantic tokens exposed via CSS custom properties / Tailwind `@theme`.
43
+ - **Ban untouched `shadcn/ui` default `:root` zinc tokens:** treat starter-kit CSS variables as a schema scaffold, not a finished palette; author surface, ink, border, accent, radius, and type tokens from the committed direction card unless the existing brownfield app explicitly locks the zinc theme.
41
44
 
42
45
  ## Validation checklist
43
46
 
44
47
  Before implementation or export:
45
48
 
46
- - every reference resolves and has no cycle;
47
- - contrast pairs are defined by role, not guessed later;
48
- - focus/selection/disabled states exist and realistic combinations such as invalid+focus or selected+disabled are considered;
49
- - state behavior is validated across supported modes rather than only in the base theme;
50
- - ownership, deprecation, rollback, and consumer-impact notes exist for breaking or behavioral changes;
51
- - dark/high-contrast behavior is explicit or marked absent;
52
- - type roles cover display/body/UI/data/caption and required script fallbacks;
53
- - localization expansion and directionality do not depend on fixed widths;
54
- - every generated platform artifact is treated as output, not edited by hand.
49
+ - [ ] every reference resolves and has no cycle;
50
+ - [ ] contrast pairs are defined by role (`≥ 4.5:1` text / `≥ 3:1` UI), not guessed later;
51
+ - [ ] focus/selection/disabled states exist and realistic combinations such as invalid+focus or selected+disabled are covered;
52
+ - [ ] state behavior is validated across supported modes rather than only in the base theme;
53
+ - [ ] ownership, deprecation, rollback, and consumer-impact notes exist for breaking or behavioral changes;
54
+ - [ ] dark/high-contrast behavior is explicit or marked absent;
55
+ - [ ] type roles cover display/body/UI/data/caption and required script fallbacks;
56
+ - [ ] localization expansion and directionality do not depend on fixed widths;
57
+ - [ ] anti-slop token check: zero Tailwind arbitrary-value sprawl (`bg-[#...]`, `p-[13px]`), zero untouched `shadcn/ui` default zinc `:root` tokens on greenfield/redesign work, and zero raw hex leaks in components;
58
+ - [ ] every generated platform artifact is treated as output, not edited by hand.
55
59
 
56
60
  The bundled exporter is intentionally small and zero-dependency. It validates the subset it emits; use a dedicated DTCG compiler for advanced spec features or production edge cases.
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://www.designtokens.org/TR/2025.10/format/",
2
+ "$description": "Example tokens in W3C DTCG 2025.10 format",
3
3
  "color": {
4
4
  "$type": "color",
5
5
  "brand": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://www.designtokens.org/TR/2025.10/format/",
2
+ "$description": "Example mode tokens in W3C DTCG 2025.10 format",
3
3
  "color": {
4
4
  "$type": "color",
5
5
  "brand": {
@@ -20,19 +20,49 @@ Token files are JSON. Groups are nested objects; token leaves contain `$value`.
20
20
  }
21
21
  ```
22
22
 
23
- Common types include `color`, `dimension`, `fontFamily`, `fontWeight`, `duration`, `number`, `strokeStyle`, `border`, `transition`, `shadow`, `gradient`, and `typography`. Use exact spec definitions before adding complex composite types.
23
+ Common types include `color`, `dimension`, `fontFamily`, `fontWeight`, `duration`, `cubicBezier`, `number`, `strokeStyle`, `border`, `transition`, `shadow`, `gradient`, and `typography`. Use exact spec definitions before adding complex composite types.
24
24
 
25
- ## References
25
+ ## References, `$extends`, `$root`, and `$deprecated`
26
26
 
27
- Use curly references such as `{color.brand}` to preserve relationships. Pixelcraft's bundled exporter resolves this common form. Some secondary guides describe additional reference syntax in 2025.10; verify the primary specification before implementing advanced `$ref`/JSON Pointer behavior.
27
+ - **Curly alias references:** use `{color.brand}` for token-to-token aliases (supported by Pixelcraft's zero-dependency exporter and all DTCG compilers). JSON Pointer `$ref` inside composite values or resolver documents requires a full DTCG 2025.10 compiler such as Terrazzo or Style Dictionary v4.
28
+ - **`$root`:** define a group's default token value (`"accent": { "$root": { "$value": ... }, "hover": { "$value": ... } }`) so a group can hold both a base value and nested child tokens without inventing ad-hoc `.default` names.
29
+ - **`$extends`:** inherit and override an entire group (for example, a compact or brand variant group inheriting from a base group) without duplicating unchanged child tokens.
30
+ - **`$deprecated`:** mark obsolete tokens or groups using `"$deprecated": true` or a replacement string (`"$deprecated": "Use color.action.primary instead; scheduled for removal in v3."`) so compilers emit build warnings automatically.
28
31
 
29
- ## Modes and themes
32
+ ## Modes and themes (DTCG 2025.10 Resolver)
30
33
 
31
- The format does not force one universal theme architecture. Use one explicit approach:
34
+ The **W3C DTCG 2025.10 Resolver Specification** (`*.resolver.json`) is the standard multi-theme / multi-brand composition format. A resolver document declares `sets` (base and shared token files), `modifiers` with named `contexts` (such as `theme: light | dark | high-contrast` or `density: default | compact`), and an explicit `resolutionOrder`:
32
35
 
33
- 1. separate files per mode (`tokens.base.json`, `tokens.dark.json`) with identical semantic paths;
34
- 2. `$extensions` metadata declaring mode-specific values for a compiler you control;
35
- 3. parallel groups such as `theme.light` and `theme.dark` when tooling is simple.
36
+ ```json
37
+ {
38
+ "version": "2025.10",
39
+ "sets": {
40
+ "primitives": { "sources": [{ "$ref": "./primitives.tokens.json" }] },
41
+ "semantic": { "sources": [{ "$ref": "./semantic.tokens.json" }] }
42
+ },
43
+ "modifiers": {
44
+ "theme": {
45
+ "default": "light",
46
+ "contexts": {
47
+ "light": [{ "$ref": "./themes/light.tokens.json" }],
48
+ "dark": [{ "$ref": "./themes/dark.tokens.json" }],
49
+ "high-contrast": [{ "$ref": "./themes/high-contrast.tokens.json" }]
50
+ }
51
+ }
52
+ },
53
+ "resolutionOrder": [
54
+ { "$ref": "#/sets/primitives" },
55
+ { "$ref": "#/sets/semantic" },
56
+ { "$ref": "#/modifiers/theme" }
57
+ ]
58
+ }
59
+ ```
60
+
61
+ Choose the lightest theme architecture that matches your compiler:
62
+
63
+ 1. **DTCG Resolver (`*.resolver.json`)** — preferred for production multi-theme/multi-brand systems using Terrazzo or Resolver-aware Style Dictionary pipelines;
64
+ 2. **Token-level `$extensions.pixelcraft.modes`** — compact single-file subset supported directly by Pixelcraft's zero-dependency `scripts/export-tokens.mjs` exporter;
65
+ 3. **Separate files per mode (`tokens.base.json`, `tokens.dark.json`)** — simple fallback when a legacy pipeline expects flat file merges with identical semantic paths.
36
66
 
37
67
  Rules:
38
68
 
@@ -51,4 +81,4 @@ Rules:
51
81
 
52
82
  ## Validation
53
83
 
54
- Minimum checks: JSON parses; groups/tokens do not conflict; `$type` known/inherited; `$value` shape valid; references resolve; no cycles; units explicit for dimensions; alpha in range; required semantic roles exist. The bundled exporter performs a practical subset and intentionally fails unknown malformed tokens rather than guessing.
84
+ Minimum checks: JSON parses; groups/tokens do not conflict; `$type` known/inherited; `$value` shape valid; references and `$extends` resolve; no cycles; units explicit for dimensions; alpha in range; `$deprecated` replacements point to live tokens; required semantic roles exist. The bundled exporter validates its supported subset and fails malformed tokens rather than guessing.
@@ -45,7 +45,7 @@ Semantic-version the token package when it is versioned as a package. Treat gene
45
45
 
46
46
  ## Deprecation procedure
47
47
 
48
- 1. Mark the old token deprecated in `$description` or `$extensions` without changing its value.
48
+ 1. Mark the old token or group with the standard DTCG `"$deprecated"` field (`true` or a migration string such as `"$deprecated": "Use color.action.primary; removal planned in v3.0"`) without changing its resolved value.
49
49
  2. Add the replacement and migration example.
50
50
  3. Inventory consumers before removal; search generated artifacts and platform code, not only web CSS.
51
51
  4. Announce the removal window in the project’s normal change channel.