@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-desktop
3
- description: Translates Pixelcraft direction, tokens, UX, and floor requirements into desktop applications across Tauri, Electron, Qt/PySide/QML, WinUI/WPF, AppKit, GTK, Avalonia, Rust GUI, Java desktop, C++ GUI, Go GUI, and Uno Platform. Use for window/menu design, keyboard shortcuts, resizing, high-DPI behavior, multi-window state, native/custom chrome, platform accessibility, forms, states, motion, and desktop verification.
3
+ description: Translates Pixelcraft direction, tokens, UX, and floor requirements into desktop applications across Tauri, Electron, Electrobun, Qt 6/PySide6/PyQt6/QML, WinUI 3/WPF, AppKit, SwiftUI macOS, GTK4/libadwaita, Avalonia, Rust GUI (GPUI, Dioxus, Iced, libcosmic, Vizia, Slint, egui, AccessKit), JavaFX/Swing, C++/C/Zig GUI (JUCE, GTKmm, FLTK, wxWidgets, Dear ImGui, Nuklear, Ultralight), Go GUI (Wails v3, Fyne, Gio), and Uno Platform. Use for window/menu design, keyboard shortcuts, resizing, multi-monitor restore, high-DPI, native/custom chrome, platform accessibility, and desktop verification.
4
4
  license: MIT
5
5
  metadata:
6
6
  version: 0.1.0
@@ -16,56 +16,78 @@ Organize persistent navigation, working content and one contextual inspector aro
16
16
 
17
17
  ## Detection signals
18
18
 
19
- `src-tauri/tauri.conf.json`, Electron main/preload packages/config, Qt `.pro`/CMake/PySide/QML imports, `.csproj` WinUI/WPF/Avalonia references, Xcode/AppKit targets, GTK build definitions, Rust `egui`/`slint`/`dioxus`/`iced` dependencies, installers/bundles, menu/shortcut registration, multi-window process architecture.
19
+ `src-tauri/tauri.conf.json`, Electron main/preload configs, `electrobun.config.*`, Qt 6 `.pro`/CMake/PySide6/PyQt6/`.ui`/QML/Kirigami imports, `.csproj` WinUI 3/WPF/Avalonia/Uno (`Uno.Sdk`) references, Xcode AppKit or SwiftUI macOS scenes (`WindowGroup`/`DocumentGroup`/`MenuBarExtra`), GTK4/libadwaita/GTKmm/Blueprint (`.blp`) definitions, Rust `gpui`/`egui`/`slint`/`dioxus`/`iced`/`libcosmic`/`vizia`/`floem`/`relm4`/`xilem` dependencies, Go `wails3`/`wails`/`fyne`/`gio` modules, JavaFX/Swing/FlatLaf, C++/C/Zig `JUCE`/`FLTK`/`wxWidgets`/`imgui`/`nuklear`/`ultralight`/`dvui`/`clay`, installers/bundles, menu/shortcut registration, multi-window architecture.
20
20
 
21
21
  ## Translate direction to desktop idioms
22
22
 
23
- 1. Map tokens to native or webview theme resources while respecting system light/dark/high-contrast modes.
24
- 2. Decide whether chrome is native, custom, or hybrid before layout. Never hide essential window controls or break drag/resize/minimize behavior.
25
- 3. Design for keyboard/mouse precision and acceleration: shortcuts, focus traversal, context menus, multiple selection, undo, drag/drop, scroll behavior, toolbar density.
26
- 4. Handle window state: resize, minimum size, split panes, maximized/fullscreen, multiple windows/monitors, DPI changes, persistence/restoration.
27
- 5. Respect platform conventions: macOS menu bar vs Windows/Linux window menus, close/quit semantics, document modified state, notifications, taskbar/dock integration.
28
- 6. Use web idioms inside Tauri/Electron only after honoring desktop shell behavior.
23
+ 1. Map tokens to native or webview theme resources while respecting system light/dark/high-contrast modes and platform accent/vibrancy/glass fallbacks.
24
+ 2. Decide whether chrome is native, custom, or hybrid before layout. Never hide essential window controls or break drag/resize/minimize/Snap Layouts behavior.
25
+ 3. Design for keyboard/mouse precision and acceleration: shortcuts, `F6`/pane focus traversal, context menus, multiple selection, undo, drag/drop, scroll behavior, toolbar density.
26
+ 4. Handle window state: resize, minimum size, split panes, maximized/fullscreen, multiple windows/monitors, invalid-bounds clamping on restore, DPI changes (and Wayland's no-global-positioning model).
27
+ 5. Respect platform conventions: macOS menu bar vs Windows/Linux window menus, close/quit semantics, document modified state, notifications, taskbar/dock/tray integration.
28
+ 6. Use web idioms inside Tauri/Electron/Electrobun/Wails only after honoring desktop shell behavior and security boundaries.
29
29
 
30
30
  ## Platform-wide rules
31
31
 
32
- - Do not trap the user in fixed-size windows unless the interaction truly is modal/essential.
33
- - Every primary task works without a mouse; shortcuts must be discoverable, non-conflicting, localizable, and documented.
34
- - Dirty document state must survive close/crash/logout semantics or warn proportionately.
35
- - Multi-window state must not leak selection/editing focus or duplicate destructive operations.
36
- - High-DPI scaling must keep icons/type sharp; do not hard-code pixel screenshots as the only UI.
37
- - Honor reduced motion, contrast, screen readers, platform accessibility APIs, keyboard navigation, and system theme.
32
+ - **Startup, idle CPU & 30-minute active RAM envelope**: hit **`< 300–500 ms`** cold start on Native/Tauri/Rust/C++/Qt/AppKit/WinUI/GTK apps or **`< 1.0–1.2 s`** on Electron (explicitly justifying Chromium's footprint in the brief); hold **`~0%` idle CPU** when minimized or unfocused; **measure RSS/private RAM after 30 minutes of active usage** against the agreed memory ceiling (verifying zero unbounded leaks); and offload heavy I/O to worker threads/processes.
33
+ - **Full workspace session restoration & mixed-DPI clamping**: never trap users in fixed-size windows unless truly modal; restore the **full workspace session across restarts** (open windows, tabs, split ratios, scroll/cursor context, and active/unsaved documents), preserve bounds across mixed-DPI (`100%` ↔ `200%`) monitors, and **clamp off-screen coordinates** onto a connected display's work area when external monitors disconnect (respecting Wayland's size-only model).
34
+ - **OS-standard paths, atomic persistence, clean uninstall & support logs**: store config, caches, DBs, and logs in XDG / `~/Library/Application Support` / `%APPDATA%` (never beside the executable); write files atomically (**write temp → `fsync` → atomic rename**) and run SQLite in **`WAL` mode** with versioned migrations; ship a **clean uninstaller** (leaving zero leftover daemons, LaunchAgents, Services, or registry bloat—with explicit user choice on keeping vs removing user data) and an **opt-in support/diagnostic log export** bundle (PII/token redacted).
35
+ - **Keyboard acceleration, high-contrast modes & multi-window hygiene**: every primary workflow completes without a mouse (`Tab`, `F6` pane cycle, platform `Cmd` vs `Ctrl` accelerators, `Escape`); honor **Windows `forced-colors` / High Contrast themes and macOS `Increase Contrast` + `Reduce Transparency`**; guard dirty documents on close/quit; soften unfocused window chrome so active focus across multiple windows is unmistakable.
36
+ - **2026 code signing, clean-VM install proof & live `v(N-1) -> vN` auto-update rollback**: macOS Developer ID + Hardened Runtime + `xcrun notarytool` + `stapler` + **clean-VM install screenshot** confirming zero Gatekeeper warning; Windows Authenticode via **Azure Artifact Signing (Trusted Signing)** or HSM OV/EV + **clean-VM SmartScreen/install capture** (noting EV certs no longer grant instant SmartScreen bypass since 2024); Linux `.deb`/`.rpm`/Flatpak/GPG AppImage; **`Ed25519`/`minisign`-signed delta auto-updates + rollback verified live across 2 consecutive versions (`v(N-1) -> vN`)**; screen-reader verification across **`NVDA`/`JAWS`/`Narrator`**, **`VoiceOver`**, and **`Orca`** (AT-SPI/AccessKit).
37
+
38
+ ## The 8 WebView Giveaway Killers (mandatory for Tauri / Electron / Wails / WebView2)
39
+
40
+ 1. **`cursor: default`** on buttons, tabs, sidebar rows, menus, and chrome—reserve `cursor: pointer` strictly for external web links.
41
+ 2. **`user-select: none`** on all toolbars, sidebars, tabs, menus, and buttons (selectable strictly inside editor/content/log panes).
42
+ 3. **Block browser tells in production**: suppress raw browser `contextmenu` ("Inspect Element"), `Cmd/Ctrl+R` page reload, `Cmd/Ctrl +`/`-` accidental pinch-zoom, and rubber-band `overscroll-behavior` on outer chrome.
43
+ 4. **Zero white flash on dark cold start**: create hidden native window (`show: false` / `visible: false`) with dark/theme-matched native `backgroundColor` before first paint, revealing on ready.
44
+ 5. **Custom `40–52 px` titlebar geometry**: dedicated drag region (`data-tauri-drag-region` / `-webkit-app-region: drag`) excluding interactive buttons, double-click to maximize/zoom per OS setting, and **`72–80 px` left inset** for macOS traffic lights (collapsed on fullscreen).
45
+ 6. **Native OS materials + inactive-window dimming**: pair `NSVisualEffectView` / `Mica` / `Acrylic` / libadwaita backdrops (plus High Contrast / Reduce Transparency fallbacks) with `:window-inactive` / focus-state dimming on unfocused sidebars/titlebars.
46
+ 7. **Two-way native OS file drag-and-drop & dialogs**: support dropping files from Finder/Explorer with visual drop targets, dragging files out to Desktop/apps, and native OS file open/save dialogs.
47
+ 8. **Native OS menu bar & single-instance deep links**: register real `File/Edit/View/Window/Help` menus with `Cmd`/`Ctrl` shortcuts and single-instance deep-link activation.
48
+
49
+ ## Anti-lazy-default & anti-slop guard
50
+
51
+ - **Never default to plain `Tkinter` on greenfield Python desktop apps**: choose **PySide6 / Qt Quick**, **Flet**, **NiceGUI**, **Tauri** (Python sidecar), or **Textual** instead; apply strict DPI/threading/theme hygiene when inheriting brownfield `CustomTkinter` or `Dear PyGui`.
52
+ - **Reject unjustified ~200 MB Electron web-SPA wrappers**: when targeting a single OS, prefer native **SwiftUI/AppKit** (macOS), **WinUI 3** (Windows), or **GTK4 + libadwaita** (Linux); when cross-platform efficiency matters, evaluate **Tauri v2**, **Qt 6**, **Avalonia**, **Slint**, or **GPUI** before bundling Chromium.
53
+ - **Reject web-page chrome masquerading as a desktop app**: never paste an unadapted browser SPA into a desktop window without all 8 WebView Giveaway Killers, native menus, keyboard shortcuts, dirty-document close confirmation, and multi-monitor restore.
38
54
 
39
55
  ## Common desktop failures
40
56
 
41
- - browser SPA pasted into Electron/Tauri shell with no menus/shortcuts/native behavior;
42
- - custom titlebar missing drag regions, double-click maximize, right-click system menu, or accessible controls;
43
- - panes that collapse irreversibly or lose resize state;
44
- - fixed 1024px layout clipped on small screens/high scaling;
45
- - shortcut conflicts with platform/input method/window manager;
46
- - hidden focus because custom controls never implement keyboard behavior;
47
- - modal dialogs chains blocking unrelated windows;
48
- - ignoring multi-instance/file association/deep-link startup state.
57
+ - WebView shell leaking `cursor: pointer`, selectable button text, white dark-mode launch flash, `Ctrl+R` reload, or browser "Inspect Element" menus;
58
+ - custom titlebar colliding with macOS traffic lights (`< 72 px` inset or stuck inset in fullscreen), swallowing button clicks, or breaking Windows Snap Layouts;
59
+ - restoring a window at off-screen coordinates after an external monitor is unplugged, losing open tabs/documents on restart, or blurring across `100%` ↔ `200%` mixed-DPI displays;
60
+ - writing `config.json`/SQLite next to the binary, leaving orphan background helpers/registry keys on uninstall, or truncating project files non-atomically without `fsync` + `rename`;
61
+ - assuming Windows EV certs still grant instant SmartScreen bypass or shipping untested auto-updaters.
49
62
 
50
63
  ## Verification options
51
64
 
52
- Rendered verification requires running the actual app/windowing stack or platform-specific UI tests. Webview DOM inspection only covers inner content, not menus/titlebar/window integration. Qt test tools, XCUITest, Windows UI Automation, accessibility inspectors, screenshot/golden tests, and manual resize/multi-monitor checks provide distinct evidence. Label untested OS/window-manager combinations `not-checked`.
65
+ Rendered verification requires running the actual app/windowing stack or platform-specific UI tests (**Rule #0.3**: inner WebView DOM checks or compilation alone never count as `rendered` desktop verification). Attach 30-minute RAM/CPU profiler readings, clean-VM install screenshots, `v(N-1) -> vN` update/rollback logs, and `NVDA`/`JAWS`/`Narrator`/`VoiceOver`/`Orca` + High Contrast captures; label untested OSes `not-checked`.
66
+
67
+ ## Pre-submit checklist
68
+
69
+ - [ ] zero `TODO`s, placeholder stubs, invented copy, or dead menu/toolbar/shortcut handlers;
70
+ - [ ] all 8 WebView Giveaway Killers enforced (if Tauri/Electron/Wails/WebView2), `< 300–500 ms` (`< 1.2 s` Electron) cold start, `~0%` idle CPU when minimized/unfocused, and **RAM measured after 30 minutes of active usage** within budget;
71
+ - [ ] **full workspace session restoration** (open windows, tabs, splits, active documents), `100%` ↔ `200%` mixed-DPI scaling, and unplugged-monitor on-screen clamping verified;
72
+ - [ ] OS-standard storage paths (XDG / `Application Support` / `%APPDATA%`), atomic `temp → fsync → rename` writes, SQLite `WAL` migrations, dirty-close protection, **clean uninstaller** (zero leftover files/daemons/registry), and **opt-in redacted support log export** wired;
73
+ - [ ] every primary workflow completes by keyboard (`Tab`, `F6` pane focus, `Cmd`/`Ctrl` menu shortcuts, `Escape`), and **Windows `forced-colors` / High Contrast + macOS `Increase Contrast`** render cleanly;
74
+ - [ ] 2026 signing/notarization + **clean-VM Gatekeeper/SmartScreen install screenshot**, **live `v(N-1) -> vN` auto-update + rollback**, and `NVDA`/`JAWS`/`Narrator`/`VoiceOver`/`Orca` checked or honestly labeled `not-checked`;
75
+ - [ ] **Checklist-Until-Passing Stop-Gate (`<HARD-GATE>`):** walk every checklist item above + run `slop-scan.mjs --fail-on p2`, `check-contrast.mjs`, desktop UI/build tests, 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`).
53
76
 
54
77
  ## Framework routing
55
78
 
56
- - Read [references/working-context.md](references/working-context.md) for editors, debuggers, inspectors, and workspaces whose secondary panes act on a specific object.
57
-
58
- - Read [references/tauri.md](references/tauri.md) for Tauri.
59
- - Read [references/electron.md](references/electron.md) for Electron.
60
- - Read [references/qt-pyside-qml.md](references/qt-pyside-qml.md) for Qt Widgets, PySide/PyQt, and QML.
61
- - Read [references/winui-wpf.md](references/winui-wpf.md) for WinUI/WPF/Windows desktop.
62
- - Read [references/appkit.md](references/appkit.md) for AppKit/macOS.
63
- - Read [references/gtk.md](references/gtk.md) for GTK/libadwaita Linux UI.
64
- - Read [references/avalonia.md](references/avalonia.md) for Avalonia.
65
- - Read [references/rust-gui.md](references/rust-gui.md) for egui, Slint, Dioxus, and iced.
66
- - Read [references/javafx-swing.md](references/javafx-swing.md) for JavaFX/Swing desktop.
67
- - Read [references/cpp-gui.md](references/cpp-gui.md) for Qt C++/QML, Dear ImGui, and wxWidgets.
68
- - Read [references/go-gui.md](references/go-gui.md) for Fyne, Wails, and Gio.
69
- - Read [references/uno-platform.md](references/uno-platform.md) for Uno Platform/XAML cross-platform desktop.
70
-
71
- For Flet or Kivy desktop targets, use the canonical framework reference in `pixelcraft-mobile` together with the desktop window/menu/high-DPI rules in this skill; do not duplicate those framework files here.
79
+ - Read [references/working-context.md](references/working-context.md) when designing editors, debuggers, inspectors, linked source/canvas panes, `F6` focus traversal, workspace persistence, or multi-monitor bounds clamping.
80
+ - Read [references/tauri.md](references/tauri.md) when building Tauri v2 desktop apps, Rust IPC/`Channel`/`Response`, capability ACLs, v2 plugins, or macOS Overlay chrome.
81
+ - Read [references/electron.md](references/electron.md) when building Electron (`WebContentsView`, `safeStorage`, `@electron/fuses`, `titleBarOverlay`, Mica) or evaluating **Electrobun** (Bun + Zig + OS WebView).
82
+ - Read [references/qt-pyside-qml.md](references/qt-pyside-qml.md) when building Qt 6 Widgets, PySide6, PyQt6 / Qt Designer (`.ui`), Qt Quick/QML (`FluentWinUI3`/`macOS`, `qmltc`), Kirigami, or maintaining brownfield CustomTkinter/Dear PyGui apps.
83
+ - Read [references/winui-wpf.md](references/winui-wpf.md) when building WinUI 3 (Windows App SDK, `x:Bind`, `MicaBackdrop`) or .NET 9/10 WPF (`ThemeMode="System"` Fluent Theme) Windows apps.
84
+ - Read [references/appkit.md](references/appkit.md) when building **AppKit** (`NSDocument`, `NSStatusItem`, `NSGlassEffectView`) or **SwiftUI for macOS** (`WindowGroup`, `DocumentGroup`, `MenuBarExtra`, `Settings`, macOS 26 Tahoe Liquid Glass).
85
+ - Read [references/gtk.md](references/gtk.md) when building GTK4 / libadwaita 1.4–1.8 Linux UI, Blueprint (`.blp`), XDG Desktop Portals/Flatpak, and Wayland windows.
86
+ - Read [references/avalonia.md](references/avalonia.md) when building Avalonia 11+ apps with `ControlTheme`, `ThemeVariant`, `x:CompileBindings`, `TopLevel` services, and `Avalonia.Headless`.
87
+ - Read [references/rust-gui.md](references/rust-gui.md) when building Rust desktop UIs across **GPUI**, **Dioxus** (Subsecond/Blitz), **Iced**, **`libcosmic`**, **Vizia**, **Slint**, **egui**, **Floem**, **Makepad**, **Xilem**, **Freya**, **Relm4**, and **AccessKit**.
88
+ - Read [references/javafx-swing.md](references/javafx-swing.md) when building JavaFX 22+ (`Platform.Preferences`, AtlantaFX, `jpackage`) or Swing (**FlatLaf**) desktop apps.
89
+ - Read [references/cpp-gui.md](references/cpp-gui.md) when building C++/C/Zig desktop UIs across Qt C++, **JUCE** (VST3/AU/CLAP audio plugins), **GTKmm**, wxWidgets, **FLTK 1.4**, Dear ImGui, **Nuklear**, **Ultralight**, **DVUI**, **Clay**, and **raygui**.
90
+ - Read [references/go-gui.md](references/go-gui.md) when building Go desktop apps with **Wails v3**/v2, **Fyne**, or **Gio**.
91
+ - Read [references/uno-platform.md](references/uno-platform.md) when building Uno Platform 5/6 (`Uno.Sdk` Single Project, Skia Desktop, MVUX, Uno Toolkit) desktop apps.
92
+
93
+ For **Compose Multiplatform Desktop**, **Flutter Desktop**, **Flet**, or **Kivy** desktop targets, use the canonical framework reference in `pixelcraft-mobile` together with the desktop window/menu/high-DPI/multi-monitor rules in this skill; do not duplicate those framework files here.
@@ -1,58 +1,92 @@
1
- # AppKit / macOS desktop
1
+ # AppKit & SwiftUI for macOS
2
2
 
3
- ## Token mapping
3
+ macOS desktop craft depends on menu-bar architecture, multi-window/document lifecycle, keyboard acceleration, and platform chrome—whether authored in **AppKit**, **SwiftUI for macOS**, or a hybrid (`NSHostingView` / `NSViewRepresentable`).
4
4
 
5
- Use asset catalog colors with semantic names for light/dark/high-contrast variants and typed constants in Swift:
5
+ ## Token mapping
6
6
 
7
- ```swift
8
- enum PCSemantic { static let action = NSColor(named: "Semantic/Action") }
9
- ```
7
+ Store light, dark, and increased-contrast colors in Asset Catalogs and access them via Xcode-generated `ColorResource` symbols (`NSColor(resource: .semanticAction)` / `Color(.semanticAction)`). Respect system vibrancy (`NSVisualEffectView` / `.background(.ultraThinMaterial)`), system accent colors (`NSColor.controlAccentColor`), and **macOS 26 Tahoe Liquid Glass** (`NSGlassEffectView` in AppKit; `.glassEffect(_:in:)` + `GlassEffectContainer` in SwiftUI) for floating toolbars, sidebars, and controls—never apply translucent glass to primary reading/editing canvases.
10
8
 
11
- Do not copy raw RGB through views/windows/menus. Respect system accent/vibrancy/contrast behavior where appropriate.
9
+ ## SwiftUI for macOS scene & command idioms
12
10
 
13
- ## Layout and responsive idioms
11
+ Use native macOS scene primitives instead of hand-rolling single-window shells:
14
12
 
15
- Use Auto Layout, stack views, safe/content layout guides, split views, toolbar/sidebar idioms, window resizing/minimum size/restoration, spaces/fullscreen behavior, and high-DPI vector assets. macOS desktop UI depends on menu bar/window/document conventions; do not transplant mobile navigation.
13
+ - **`WindowGroup`** (multi-window data views) and **`DocumentGroup`** (file-based apps with open/save/recent-documents/titlebar proxy icon).
14
+ - **`Settings`** scene (`Cmd+,` automatically wired into the app menu).
15
+ - **`MenuBarExtra`** (`.menu` style for quick status menus; `.window` style for compact interactive popovers).
16
+ - **`.commands` + `CommandMenu` + `@FocusedValue` / `@FocusedBinding`** so menu-bar commands route cleanly to whichever document window currently owns focus:
16
17
 
17
- ## Typography/custom fonts
18
+ ```swift
19
+ @main
20
+ struct InvoiceStudioApp: App {
21
+ var body: some Scene {
22
+ DocumentGroup(newDocument: InvoiceDocument()) { file in
23
+ InvoiceEditorView(document: file.$document)
24
+ }
25
+ .commands {
26
+ CommandGroup(after: .newItem) {
27
+ ExportCommands()
28
+ }
29
+ }
30
+ Settings { SettingsView() }
31
+ MenuBarExtra("Sync Status", systemImage: "arrow.triangle.2.circlepath") {
32
+ SyncPopoverView()
33
+ }
34
+ .menuBarExtraStyle(.window)
35
+ }
36
+ }
37
+ ```
18
38
 
19
- Use system text styles and Dynamic Type-like scaling expectations appropriate to macOS. Register custom fonts in bundle/target correctly and verify baseline alignment in controls. Respect increased contrast/bold text/smart inversion behaviors where applicable.
39
+ On macOS 26 Tahoe, combine `.glassEffect(.regular, in: .capsule)` / `NSGlassEffectView` with explicit Reduce Transparency and Increase Contrast fallbacks so floating controls stay legible over dense documents.
20
40
 
21
- ## Motion/reduced motion
41
+ ## AppKit idioms (`NSDocument`, `NSStatusItem`, `NSWorkspace`)
22
42
 
23
- Use AppKit/Core Animation purposefully and check system reduce-motion settings through platform accessibility APIs. Window resize/fullscreen/keyboard input must remain interruptible; do not animate every state change.
43
+ - Use **`NSDocument` / `NSDocumentController`** for automatic autosave-in-place, Versions browser, dirty close dot (`isDocumentEdited`), and safe Quit/Logout prompting.
44
+ - Use **`NSStatusItem`** (`NSStatusBar.system.statusItem(withLength:)`) with vector SF Symbols (`isTemplate = true`) for menu-bar utility agents; always provide a discoverable Quit item and keyboard shortcut.
45
+ - Read macOS accessibility display preferences directly from **`NSWorkspace.shared`** (and observe `NSWorkspace.accessibilityDisplayOptionsDidChangeNotification`) to adapt motion, glass/vibrancy, and contrast:
24
46
 
25
- ## Accessibility specifics
47
+ ```swift
48
+ let ws = NSWorkspace.shared
49
+ let reduceMotion = ws.accessibilityDisplayShouldReduceMotion
50
+ let reduceTransparency = ws.accessibilityDisplayShouldReduceTransparency
51
+ let increaseContrast = ws.accessibilityDisplayShouldIncreaseContrast
52
+ ```
26
53
 
27
- Use NSAccessibility labels/roles/descriptions, keyboard shortcuts/menu equivalents, Full Keyboard Access, VoiceOver ordering/custom actions, focus ring behavior, toolbar/sidebar semantics, modified document state, Escape/cancel behavior. Custom controls must implement accessibility protocol behavior rather than drawing only.
54
+ In SwiftUI for macOS, read `@Environment(\.accessibilityReduceMotion)`, `@Environment(\.accessibilityReduceTransparency)`, and `@Environment(\.colorSchemeContrast)`.
28
55
 
29
- ## States idiom
56
+ ## Layout, typography, & accessibility specifics
30
57
 
31
- Model document/app/window state: dirty document, autosave/versioning, loading/error/offline/permission, update/restart, background agent/menu-bar lifecycle, file access/security-scoped bookmarks where relevant, crash restoration, multiwindow state. Preserve work on close/logout/restart.
58
+ - Use `NSSplitViewController` / `NavigationSplitView`, unified `NSToolbar` / `.toolbar`, minimum window sizes (`window.minSize` / `.frame(minWidth:minHeight:)`), `NSWindow.frameAutosaveName`, and Spaces/Fullscreen support. Never transplant an iOS bottom tab bar into a macOS window.
59
+ - Use macOS semantic text styles (`.body`, `.headline`, `.callout`) and verify Retina vector/SF Symbol sharpness.
60
+ - Implement `NSAccessibility` roles, labels, and custom actions on custom AppKit views; never suppress the system keyboard focus ring (`focusRingType = .none`) without a high-contrast replacement. Verify **Full Keyboard Access** (`System Settings → Keyboard → Keyboard navigation`) and **VoiceOver** across toolbars, sidebars, sheets, and modals.
32
61
 
33
- ## Forms idiom
62
+ ## Storage, notarization, & `Ed25519` auto-updates
34
63
 
35
- Use real controls, labels/title/accessibility relationships, key equivalents, focus ring/initial first responder, input validation timing, paste/autofill/IME behavior, undo integration, and keyboard focus occlusion awareness. Dialogs/sheets should not trap unrelated document windows unnecessarily.
64
+ - **OS-standard paths & atomic writes**: store app support files in `FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask)` (`~/Library/Application Support/<BundleId>`), caches in `~/Library/Caches`, and logs in `~/Library/Logs`—never inside `.app` bundles. Persist project/config files atomically (`try data.write(to: url, options: .atomic)` or temp file + `fsync` + `replaceItemAt`) and configure local SQLite in `WAL` mode with versioned migrations ([working-context.md](working-context.md)).
65
+ - **Two-way Finder drag-and-drop & inactive window dimming**: support dragging files in from and out to Finder/Desktop (`NSDraggingDestination` / `NSDraggingSource`, SwiftUI `.draggable` / `.dropDestination`), dim sidebar/toolbar prominence when `appearsActive == false` (`@Environment(\.controlActiveState)`), and maintain `< 300 ms` cold start + `~0%` idle CPU when occluded (`NSWindow.occlusionState`).
66
+ - **Sandbox, Universal binaries & notarization**: under **App Sandbox**, request minimal entitlements (`com.apple.security.files.user-selected.read-write`) and persist user-granted folder access with **security-scoped bookmarks**. For direct distribution outside the Mac App Store, build Universal (`arm64 + x86_64`) or explicit-arch bundles, enable **Hardened Runtime**, sign with **Developer ID Application**, notarize (`xcrun notarytool submit --wait`), staple (`xcrun stapler staple`), and ship **Sparkle 2** (`Ed25519` / `EdDSA`-signed) background delta updates that roll back cleanly on launch failure.
36
67
 
37
68
  ## Do/don't pairs
38
69
 
39
70
  | Do | Don't |
40
71
  |---|---|
41
- | real `NSButton`/menu command with keyboard equivalent | custom clickable image pretending to be a control |
42
- | toolbar/sidebar/menu conventions appropriate to app type | mobile tab bar pasted into macOS window |
43
- | document dirty/autosave/close flow | silently discarding edits on red close button |
44
- | VoiceOver/Full Keyboard Access verification | assuming pointer testing covers accessibility |
45
- | vector/PDF/high-resolution assets | blurry bitmap-only icons at Retina scale |
72
+ | `DocumentGroup` / `NSDocument` with dirty dot, atomic `.atomic` saves, and Save prompt on close | Overwrite files non-atomically in place or discard edits on close |
73
+ | Wire active-window menu items via `.commands` + `@FocusedValue` or Responder Chain | Hard-code menu actions to a singleton window reference |
74
+ | Check `accessibilityDisplayShouldReduceTransparency` & `IncreaseContrast` around `NSGlassEffectView`/`.glassEffect` | Ship unreadable translucent glass toolbars over high-contrast documents |
75
+ | Sign Developer ID + Hardened Runtime + `notarytool` + `stapler` + Sparkle 2 `Ed25519` updates | Ship unnotarized `.dmg`s blocked by Gatekeeper or unsigned auto-updaters |
76
+ | Persist folder access via security-scoped bookmarks and store app data in `~/Library/Application Support` | Assume raw POSIX paths survive relaunch under App Sandbox |
46
77
 
47
78
  ## Known traps
48
79
 
49
- Window restoration/state duplication, key equivalent conflicts, menu validation ownership, sheet/modal scope confusion, AppKit/SwiftUI interop lifecycle, custom focus ring removal, sandbox file permission failure, high-DPI asset mismatch, vibrancy/contrast legibility.
80
+ Menu items staying enabled when no document window is key (missing `NSMenuItemValidation` / `@FocusedValue`), AppKit/SwiftUI `NSHostingView` sizing loops inside `NSTableView` cells, custom `NSWindow` titlebar removing drag/double-click zoom, keyboard shortcuts colliding with macOS system/IME bindings, unnotarized binaries failing Gatekeeper, unguarded `NSGlassEffectView` failing Reduce Transparency.
50
81
 
51
82
  ## Verification commands
52
83
 
53
84
  ```sh
54
85
  xcodebuild -scheme App -destination 'platform=macOS' build
55
86
  xcodebuild test -scheme App -destination 'platform=macOS'
87
+ # For Developer ID release validation:
88
+ codesign --verify --deep --strict build/App.app
89
+ spctl --assess --type execute --verbose build/App.app
56
90
  ```
57
91
 
58
- Use real macOS runs, VoiceOver/Accessibility Inspector/Full Keyboard Access, resize/fullscreen/multiple-display tests, dark/high contrast/increased contrast modes, keyboard shortcuts, document close/crash flows, and menu validation inspection.
92
+ `xcodebuild` and unit tests are `static` evidence. Run on real macOS across VoiceOver, Accessibility Inspector, Full Keyboard Access, Dark Mode, Increase Contrast, Reduce Transparency, Reduce Motion, multi-monitor/Retina resize, and document dirty-close flows for `rendered` evidence; label unavailable hardware/macOS versions `not-checked`.
@@ -1,59 +1,95 @@
1
- # Avalonia
1
+ # Avalonia (11+)
2
2
 
3
- ## Token mapping
3
+ ## Token mapping: `ThemeVariant` & `ControlTheme`
4
4
 
5
- Use resource dictionaries/styles/theme variants:
5
+ Map DTCG semantic tokens into `ResourceDictionary.ThemeDictionaries` keyed by **`ThemeVariant`** (`Default`, `Light`, `Dark`, and custom high-contrast variants) and reference them via `{DynamicResource ...}` so live theme switching updates without restarting windows.
6
+
7
+ In Avalonia 11+, style templated controls with **`ControlTheme`** (explicitly scoped, predictable overrides) rather than cascading global `<Style Selector="...">` hacks, and enforce **`x:CompileBindings="True"`** + `x:DataType` across views so binding typos fail at compile time:
6
8
 
7
9
  ```xml
8
- <SolidColorBrush x:Key="SemanticActionBrush" Color="#FF0074CA" />
10
+ <ResourceDictionary xmlns="https://github.com/avaloniaui"
11
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
12
+ <ResourceDictionary.ThemeDictionaries>
13
+ <ResourceDictionary x:Key="Light">
14
+ <SolidColorBrush x:Key="PcActionBrush" Color="#0074CA" />
15
+ </ResourceDictionary>
16
+ <ResourceDictionary x:Key="Dark">
17
+ <SolidColorBrush x:Key="PcActionBrush" Color="#5BB2FF" />
18
+ </ResourceDictionary>
19
+ </ResourceDictionary.ThemeDictionaries>
20
+
21
+ <ControlTheme x:Key="PrimaryButtonTheme" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
22
+ <Setter Property="Background" Value="{DynamicResource PcActionBrush}" />
23
+ <Setter Property="MinHeight" Value="36" />
24
+ </ControlTheme>
25
+ </ResourceDictionary>
9
26
  ```
10
27
 
11
- Map generated values once into semantic resources and use `DynamicResource` where theme switching matters. Do not scatter raw color/dimension constants in views/viewmodels.
12
-
13
- ## Layout and responsive idioms
14
-
15
- Use panels/grid/dock/layout-aware controls, minimum window dimensions, resizing, DPI scaling, platform window chrome choices, keyboard focus manager behavior, and cross-platform OS differences deliberately. Desktop, mobile-like, and embedded targets should not share one rigid layout.
16
-
17
- ## Typography/custom fonts
28
+ ## Layout, `TopLevel` services, & custom window chrome
29
+
30
+ - Use `Grid`, `DockPanel`, `StackPanel`, `SplitView`, `ItemsRepeater` / `ListBox` virtualization, minimum window dimensions (`MinWidth`, `MinHeight`), and cross-platform DPI awareness.
31
+ - **Platform services via `TopLevel`**: never instantiate deprecated `OpenFileDialog` / `SaveFileDialog`. Resolve **`TopLevel.GetTopLevel(this)`** to access **`StorageProvider`** (native file/folder pickers + bookmarks), **`Clipboard`**, **`Launcher`**, and **`InsetsManager`**:
32
+
33
+ ```csharp
34
+ var topLevel = TopLevel.GetTopLevel(this);
35
+ if (topLevel?.StorageProvider is { CanOpen: true } storage)
36
+ {
37
+ var files = await storage.OpenFilePickerAsync(new FilePickerOpenOptions
38
+ {
39
+ Title = "Import invoices",
40
+ AllowMultiple = false,
41
+ });
42
+ }
43
+ ```
18
44
 
19
- Register font assets/families correctly and use semantic text styles. Validate fallback/glyph coverage, scaling/DPI behavior, localization expansion, and truncation/rendering differences across platforms.
45
+ - **Custom titlebars**: when extending content into chrome with **`ExtendClientAreaToDecorationsHint="True"`**, configure `ExtendClientAreaChromeHints` intentionally and bind header padding to **`WindowDecorationMargin`** / `OffScreenMargin` so macOS traffic lights and Windows caption buttons never overlap interactive controls, and preserve drag + double-click maximize behavior.
20
46
 
21
- ## Motion/reduced motion
47
+ ## Typography, motion, accessibility, states, & forms
22
48
 
23
- Use transitions/animations purposefully and expose reduced-motion behavior based on platform capability or explicit app setting. Keep animation interruptible and never block input or obscure state transitions.
49
+ Register bundled fonts via `FontManagerOptions` / `avares://` font URIs with explicit fallbacks and verify glyph coverage and DPI rasterization on Windows, macOS, and Linux separately.
24
50
 
25
- ## Accessibility specifics
51
+ Keep Avalonia `Transitions` and keyframe animations concise and interruptible; expose an explicit reduced-motion setting where host OS preference propagation is uncertain.
26
52
 
27
- Use automation properties/accessibility metadata, focus/keyboard navigation, visible focus, real controls, high-contrast/system theme awareness, and platform screen-reader verification. Cross-platform rendering does not guarantee equal accessibility tree quality across Windows/macOS/Linux.
53
+ Set `AutomationProperties.Name`, `AutomationProperties.LabeledBy`, `AutomationProperties.HelpText`, keyboard `HotKey` / `KeyBindings`, and visible `:focus-visible` styles on real interactive controls. Verify Windows UIA (Narrator), macOS VoiceOver, and Linux AT-SPI separately—shared Skia rendering does not guarantee identical screen-reader behavior across OSes.
28
54
 
29
- ## States idiom
55
+ Drive state via `CommunityToolkit.Mvvm` or `ReactiveUI` with explicit async cancellation and dirty-close interception (`Window.Closing`). In forms, use `DataValidationErrors` + inline recovery text, preserve input across validation errors, and test IME/paste on all target OSes.
30
56
 
31
- Use MVVM async state explicitly: loading/error/empty/offline/permission/dirty/concurrency. Handle window lifecycle/close, crash/update/restart, file lock/permission, multi-window state, cancellation/progress, and input preservation. Avoid async void hidden failure.
57
+ ## Headless UI verification (`Avalonia.Headless`)
32
58
 
33
- ## Forms idiom
59
+ Use **`Avalonia.Headless`** (`Avalonia.Headless.XUnit` or `Avalonia.Headless.NUnit`) to run fast deterministic UI tests driving real layout passes, `KeyPressQwerty`, `MouseDown`, focus traversal, and `CaptureRenderedFrame()` without needing an OS display server:
34
60
 
35
- Use labeled inputs, validation/error presentation, focus order, paste/IME behavior, keyboard shortcuts/access keys where platform-appropriate, validation timing, and preservation after failed submit. Do not signal errors only through red borders.
61
+ ```csharp
62
+ [AvaloniaFact]
63
+ public void Escape_Returns_Focus_From_Inspector()
64
+ {
65
+ var window = new MainWindow { DataContext = new MainViewModel() };
66
+ window.Show();
67
+ window.KeyPressQwerty(PhysicalKey.F6, RawInputModifiers.None);
68
+ window.KeyPressQwerty(PhysicalKey.Escape, RawInputModifiers.None);
69
+ Assert.True(window.CanvasControl.IsFocused);
70
+ }
71
+ ```
36
72
 
37
73
  ## Do/don't pairs
38
74
 
39
75
  | Do | Don't |
40
76
  |---|---|
41
- | semantic resources + `DynamicResource` for themed values | inline repeated colors/brushes across views |
42
- | explicit async command state/cancellation | fire-and-forget async void operations |
43
- | platform/runtime keyboard and focus verification | assuming cross-platform rendering means identical interaction |
44
- | real controls/automation metadata | custom-drawn fake controls without accessibility exposure |
45
- | resize/high-DPI/multiplatform testing | validating only on developer OS/monitor |
77
+ | Enable `x:CompileBindings="True"` + `x:DataType` and `ControlTheme` + `ThemeVariant` | Rely on untyped runtime bindings and fragile global style selectors |
78
+ | Use `TopLevel.GetTopLevel(this)?.StorageProvider` & `Clipboard` | Call deprecated `OpenFileDialog` or OS-specific Win32/NSOpenPanel hacks |
79
+ | Bind `ExtendClientAreaToDecorationsHint` chrome to `WindowDecorationMargin` | Overlap macOS traffic lights or break Windows maximize/drag regions |
80
+ | Write `Avalonia.Headless` keyboard/focus/layout tests alongside OS runs | Rely solely on `dotnet build` or visual glances on one OS |
81
+ | Guard `Window.Closing` for unsaved documents and cancel async commands | Use `async void` handlers or discard edits silently on close |
46
82
 
47
83
  ## Known traps
48
84
 
49
- Binding errors hidden in logs, style selector cascade surprises, platform rendering/accessibility differences, async lifecycle leaks, window chrome inconsistency, DPI/font fallback variation, resource lookup failure, focus management after dialogs/popups.
85
+ Silent runtime binding failures when `x:CompileBindings` is omitted, `{StaticResource}` failing to update when `RequestedThemeVariant` switches at runtime, `TopLevel.GetTopLevel(this)` returning `null` before `OnAttachedToVisualTree`, broken window drag/caption buttons under `ExtendClientAreaToDecorationsHint`, OS-divergent screen-reader maturity across Windows/macOS/Linux, missing font fallbacks on minimal Linux distros.
50
86
 
51
87
  ## Verification commands
52
88
 
53
89
  ```sh
54
90
  dotnet build
55
- dotnet test
56
- dotnet run --project <AppProject> 2>/dev/null || true
91
+ dotnet test # includes Avalonia.Headless UI tests when configured
92
+ dotnet run --project <AppProject>
57
93
  ```
58
94
 
59
- Use actual Windows/macOS/Linux runs where claimed, screen reader/keyboard tests, resize/DPI/window-state matrices, high contrast/dark mode, and close/crash/update flows as evidence.
95
+ `dotnet build` is `static` evidence; `Avalonia.Headless` tests verify layout/focus/input deterministically (`static`/headless). Run native desktop binaries on each shipped OS (Windows/macOS/Linux) for screen-reader, HiDPI, dark/high-contrast, custom-chrome, and multi-monitor restore checks (`rendered`; label untested OSes `not-checked`).
@@ -1,52 +1,129 @@
1
- # C++ GUI: Qt/QML, Dear ImGui, wxWidgets
2
-
3
- ## Token mapping
4
-
5
- Qt Widgets/QML: use QObject/QML singleton theme objects, QSS preprocessor variables, palettes, and semantic constants. wxWidgets: centralize system-aware colors/fonts/metrics. Dear ImGui: use a deliberate style struct; remember immediate-mode style is not an accessibility or validation system.
6
-
7
- ## Layout and responsive idioms
8
-
9
- Qt layouts/widgets/QML anchors/layouts handle resizing; wxWidgets sizers are mandatory; ImGui layout is frame-local and explicit. Handle high-DPI, window state, minimum size, multi-window ownership, monitor changes. Choose native versus custom chrome deliberately.
10
-
11
- ## Typography/custom fonts
1
+ # C++, C, & Zig desktop GUIs: Qt C++, JUCE, GTKmm, wxWidgets, FLTK 1.4, Dear ImGui, Nuklear, Ultralight, & Zig toolkits
2
+
3
+ **Boundary note**: use this reference for **C++ / C / Zig native toolchains** (CMake + Qt C++, JUCE, GTKmm, wxWidgets, FLTK 1.4, Dear ImGui, Nuklear, Ultralight, DVUI, Clay, raygui). For **Qt 6 / PySide6 / QML** styling rules, `styleHints.colorScheme`, Qt Quick Controls 2 (`FluentWinUI3`/`macOS`), `qmltc`, Kirigami, and the QSS native-style warning, read `references/qt-pyside-qml.md` alongside this file.
4
+
5
+ ## Toolkit decision matrix
6
+
7
+ | Toolkit | Language | UI model | Strengths | Accessibility / IME reality |
8
+ |---|---|---|---|---|
9
+ | **Qt 6 (C++ / QML)** | C++ | Retained native/QML (`cmake`, `qmltc`) | Full enterprise desktop maturity, native styles, i18n, HiDPI | Mature `QAccessible` / UIA / NSAccessibility / AT-SPI + full IME |
10
+ | **JUCE** | C++ | Retained vector/GPU component tree for VST3/AU/CLAP/standalone audio | Realtime audio plugin & DAW industry standard, `APVTS`, `LookAndFeel`, scalable vector paths | Built-in `juce::AccessibilityHandler` (VoiceOver/Narrator/UIA)—must populate titles, descriptions, and focus order |
11
+ | **GTKmm (`gtkmm-4.0`)** | C++20 | Idiomatic RAII C++ bindings over GTK4 / `libadwaita` | Native Linux/Wayland craft, `Gtk::Builder`/Blueprint, zero raw GObject boilerplate | Full native AT-SPI screen-reader & IME parity (follow `references/gtk.md`) |
12
+ | **wxWidgets** | C++ | Native OS control wrapper (`wxSizer`) | True native Windows/macOS/GTK controls, small footprint | Strong via OS native controls; custom `wxPanel` drawing needs manual bridges |
13
+ | **FLTK 1.4** | C++ | Lightweight retained (`Fl_Flex`, `Fl_Grid`) | Tiny static binary, native **Wayland** backend, per-monitor **HiDPI** scaling | Basic keyboard nav; limited screen-reader exposure—verify before accessibility claims |
14
+ | **Dear ImGui** | C++ | Immediate-mode GPU (`ImGui::Begin`) | Unmatched speed for game/engine/DSP debuggers and in-app tools | No built-in screen-reader tree; low-level IME—not for screen-reader-mandated apps |
15
+ | **Nuklear** | ANSI C (single-header) | Immediate-mode renderer-agnostic (`nk_begin`) | Tiny zero-dep C footprint for embedded tools and custom GPU engines | No built-in screen-reader tree or complex IME; dev/embedded scope only |
16
+ | **Ultralight** | C++ + HTML/CSS/JS | Lightweight commercial WebKit-derived renderer | Smaller footprint than Chromium/Electron for custom C++ apps & game UI | Commercial license; verify IME/screen-reader support per target OS before productivity use |
17
+ | **DVUI** | Zig | Immediate-mode native (`dvui` over SDL/Raylib/Web) | Zero-bloat Zig ergonomics, retained scroll/text state, HiDPI, single binary | Basic keyboard focus; limited native screen-reader bridge (verify/label `not-checked`) |
18
+ | **Clay** | C (single-header) | Zero-allocation Flexbox layout engine (renderer-agnostic) | Microsecond deterministic layout for C/C++/Zig/WASM custom renderers | Layout only—you own widget semantics, text shaping, focus, and accessibility |
19
+ | **raygui** | C | Immediate-mode UI over Raylib | Rapid prototyping of Raylib level editors, audio tools, dev overlays | Dev-tool focus; no native OS accessibility or complex IME |
20
+
21
+ ## JUCE (VST3 / AU / CLAP audio plugins & DAW UI)
22
+
23
+ Audio UIs have a hard real-time constraint: glitches on the audio thread ruin recordings.
24
+
25
+ - **Strict audio-thread vs message-thread separation**: NEVER allocate heap memory, acquire a `std::mutex`, lock the `MessageManager`, or call `repaint()` inside `processBlock()`. Bind controls via **`juce::AudioProcessorValueTreeState` (`APVTS`)** attachments (`SliderAttachment`, `ButtonAttachment`, `ComboBoxAttachment`), exchange meter levels via `std::atomic<float>` polled on a `juce::Timer` (30–60 Hz), and stream waveforms/spectra across lock-free `juce::AbstractFifo` ring buffers.
26
+ - **Custom `LookAndFeel` & cleanup**: centralize semantic palette tokens in a `juce::LookAndFeel_V4` subclass (`setColour(...)`), draw knobs/meters with resolution-independent `juce::Path` vectors for crisp HiDPI scaling, and **always call `setLookAndFeel(nullptr)` in the editor destructor** before destroying the LookAndFeel member (dangling `LookAndFeel*` asserts/crashes on close).
27
+ - **Resizing & host DAW scaling**: enable `setResizable(true, true)` + `setResizeLimits(minW, minH, maxW, maxH)` and compute child bounds in `resized()` using `juce::FlexBox` / `juce::Grid` / `Rectangle::removeFromTop(...)` rather than fixed coordinates.
28
+ - **Keyboard & accessibility**: set `setTitle(...)`, `setDescription(...)`, `setWantsKeyboardFocus(true)`, and expose custom controls through `juce::AccessibilityHandler` (value + units, e.g., `-6.0 dB`) so VoiceOver/Narrator users can operate plugin parameters in DAWs.
29
+
30
+ ```cpp
31
+ // JUCE AudioProcessorEditor: lock-free APVTS attachment, LookAndFeel lifecycle, & a11y metadata
32
+ class GainEditor final : public juce::AudioProcessorEditor {
33
+ public:
34
+ GainEditor(GainProcessor& proc, juce::AudioProcessorValueTreeState& apvts)
35
+ : AudioProcessorEditor(&proc), apvts_(apvts) {
36
+ setLookAndFeel(&laf_);
37
+ gainSlider_.setSliderStyle(juce::Slider::RotaryHorizontalVerticalDrag);
38
+ gainSlider_.setTextBoxStyle(juce::Slider::TextBoxBelow, false, 72, 22);
39
+ gainSlider_.setTitle("Output Gain");
40
+ gainSlider_.setDescription("Adjusts output level in decibels");
41
+ gainSlider_.setWantsKeyboardFocus(true);
42
+ addAndMakeVisible(gainSlider_);
43
+ gainAttachment_ = std::make_unique<juce::AudioProcessorValueTreeState::SliderAttachment>(
44
+ apvts_, "gainDb", gainSlider_);
45
+
46
+ setResizable(true, true);
47
+ setResizeLimits(320, 220, 960, 660);
48
+ setSize(420, 280);
49
+ }
50
+
51
+ ~GainEditor() override {
52
+ setLookAndFeel(nullptr); // Mandatory before laf_ is destroyed
53
+ }
54
+
55
+ void resized() override {
56
+ gainSlider_.setBounds(getLocalBounds().reduced(24));
57
+ }
58
+
59
+ private:
60
+ StudioLookAndFeel laf_;
61
+ juce::AudioProcessorValueTreeState& apvts_;
62
+ juce::Slider gainSlider_;
63
+ std::unique_ptr<juce::AudioProcessorValueTreeState::SliderAttachment> gainAttachment_;
64
+ };
65
+ ```
12
66
 
13
- Load font assets and verify glyph fallback/IME/localization. Qt has mature font/input infrastructure; wx relies on native controls; ImGui font atlas must include required glyphs and scaling or text becomes missing/tofu.
67
+ ## Token mapping & idiomatic snippets
14
68
 
15
- ## Motion/reduced motion
69
+ Centralize semantic theme values once—never scatter raw RGB integers through paint or frame callbacks:
16
70
 
17
- Use Qt animations/timers or wx events purposefully with lifecycle/power awareness. OS reduced-motion integration is inconsistent across custom toolchains; expose an application-level reduced-motion option. ImGui continuous rendering can waste power—use dirty/frame events where possible.
71
+ - **Qt C++**: bind semantic tokens via `QPalette` / QML `pragma Singleton` (avoid massive global QSS that strips native styles; see `references/qt-pyside-qml.md`).
72
+ - **GTKmm (`gtkmm-4.0`)**: load semantic CSS variables via `Gtk::CssProvider`, pair with `libadwaita` adaptive widgets (`Adw::NavigationSplitView`, `Adw::Dialog`), and rely on RAII `Gtk::make_managed<T>()` + `sigc::trackable` so disconnected signals never dangle.
73
+ - **wxWidgets**: query `wxSystemSettings::GetColour(...)` and `GetAppearance().IsDark()` so native dark/high-contrast themes stay intact.
74
+ - **FLTK 1.4**: compose responsive layouts with **`Fl_Flex`** and **`Fl_Grid`** (introduced in 1.4 alongside native Wayland and per-monitor scaling) rather than fixed pixel coordinates.
75
+ - **Nuklear & Ultralight**: in **Nuklear**, drive colors from a central `nk_style` table and bake Unicode font ranges into `nk_font_atlas`; in **Ultralight**, keep HTML/CSS tokens in local bundled assets (`FileSystem`), validate C++↔JS bridge calls, pass OS display scale cleanly, and check licensing before commercial use.
76
+ - **DVUI (Zig)**: read semantic colors from `dvui.themeGet()` and build responsive rows cleanly without manual pixel math:
18
77
 
19
- ## Accessibility specifics
78
+ ```zig
79
+ // Zig + DVUI responsive row using active theme tokens:
80
+ var hbox = try dvui.box(@src(), .horizontal, .{ .expand = .horizontal });
81
+ defer hbox.deinit();
20
82
 
21
- Qt Widgets/QML have mature accessibility hooks when using real controls/properties; custom painting must expose semantics. wxWidgets benefits from native controls but custom canvases need work. Dear ImGui has no meaningful built-in screen-reader/focus semantics—do not choose it for accessibility-critical productivity UI without an explicit adaptation layer.
83
+ if (try dvui.button(@src(), "Save invoice", .{}, .{
84
+ .color_fill = dvui.themeGet().color_accent,
85
+ })) {
86
+ try saveInvoice();
87
+ }
88
+ ```
22
89
 
23
- ## States idiom
90
+ ## Layout, typography, & power-aware motion
24
91
 
25
- Model loading/error/empty/offline/permission/dirty/concurrent states outside paint/frame loops. Long work needs thread/task ownership, cancellation, progress, and safe UI-thread handoff. Preserve document state across close/crash/update.
92
+ - Use **Qt layouts**, **JUCE `FlexBox`/`Grid`**, **GTKmm boxes/grids**, **wxWidgets sizers** (`wxBoxSizer`/`wxFlexGridSizer`), **FLTK 1.4 `Fl_Flex`/`Fl_Grid`**, or **Clay** Flexbox declarations—never hard-code pixel rectangles assuming 96 DPI.
93
+ - Verify font loading and glyph coverage explicitly: Qt, GTKmm, JUCE, and wxWidgets inherit OS text shaping/fallbacks, whereas **Dear ImGui**, **Nuklear**, **raygui**, and custom **Clay** renderers require explicit font-atlas glyph ranges (Latin, Cyrillic, CJK, symbols) or missing characters render as `?`/tofu.
94
+ - Avoid draining laptop batteries in immediate-mode loops (**Dear ImGui**, **Nuklear**, **DVUI**, **raygui**): wait on OS input/window events (`SDL_WaitEventTimeout` / `glfwWaitEventsTimeout`) when idle instead of spinning an uncapped 120 FPS render loop. Expose an app-level reduced-motion toggle where OS preference hooks are absent.
26
95
 
27
- ## Forms idiom
96
+ ## Accessibility, states, & forms idioms
28
97
 
29
- Prefer real Qt/wx controls for validation, clipboard, IME, focus traversal, shortcuts, screen readers. ImGui text input is low-level; validate composition/paste/caret/selection/accessibility before using it for consequential forms.
98
+ - Choose **Qt 6**, **GTKmm**, **wxWidgets**, or **JUCE** (for audio) when full screen-reader support (VoiceOver/Narrator/Orca), complex CJK/RTL IME composition, and High Contrast compliance are mandatory.
99
+ - For immediate-mode/lightweight C/C++/Zig toolkits (**Dear ImGui**, **Nuklear**, **FLTK**, **DVUI**, **Clay**, **raygui**), be honest about accessibility boundaries: either integrate **AccessKit** (C ABI `accesskit-c`) and verify live screen-reader output, or scope the UI strictly to dev/engineering/embedded tooling and record screen-reader verification accurately (`not-checked` / `waived` per project floor).
100
+ - Keep durable document state, dirty-close checks, and cancellable background worker threads outside frame/paint loops, marshaling completion back to the UI thread safely (`QMetaObject::invokeMethod`, `wxQueueEvent`, `Fl::awake`, `juce::MessageManager::callAsync`, or lock-free queues).
30
101
 
31
102
  ## Do/don't pairs
32
103
 
33
104
  | Do | Don't |
34
105
  |---|---|
35
- | Qt layouts/QML layouts | fixed pixel widget placement |
36
- | wx sizers/native controls | owner-drawing everything unnecessarily |
37
- | explicit worker cancellation/progress | blocking UI thread/frame loop |
38
- | central theme/style object | raw color literals in paint/frame code |
106
+ | Bind JUCE UI controls via `APVTS` attachments / atomics + `Timer`, and call `setLookAndFeel(nullptr)` in `~Editor()` | Touch `juce::Component`, allocate memory, or lock mutexes inside `processBlock()`, or leak `LookAndFeel*` |
107
+ | Use Qt layouts, JUCE `FlexBox`/`Grid`, GTKmm containers, `wxSizer`, FLTK 1.4 `Fl_Flex`/`Fl_Grid`, or Clay Flexbox | Hard-code fixed pixel coordinates for one 1080p monitor |
108
+ | Wait on OS events when idle in Dear ImGui / Nuklear / DVUI / raygui | Spin an uncapped `while (true)` GPU loop burning battery while idle |
109
+ | Choose Qt 6, GTKmm, wxWidgets, or JUCE `AccessibilityHandler` (or bridge `accesskit-c`) for accessible apps | Ship a raw Dear ImGui, Nuklear, or raygui form and claim screen-reader compliance |
110
+ | Marshal background worker completion safely (`Fl::awake`, `wxQueueEvent`, `invokeMethod`, `callAsync`) | Mutate UI widgets directly from worker or realtime audio threads |
111
+ | Load explicit Unicode/CJK/RTL glyph ranges or HarfBuzz shaping in GPU font atlases | Rely on default ASCII-only bitmap font atlases for localized apps |
39
112
 
40
113
  ## Known traps
41
114
 
42
- Object lifetime/signals across threads, GPU/context loss, high-DPI bitmap scaling, font atlas glyph omissions, custom chrome breaking platform behavior, accessibility overclaims, power use from continuous rendering, packaging/compiler ABI complexity.
115
+ Audio-thread allocations or mutex locks in JUCE `processBlock()`, dangling `LookAndFeel*` on JUCE editor teardown, dangling `QObject`/widget pointers across threads, uncapped immediate-mode GPU frame loops, missing glyph ranges in ImGui/Nuklear/raygui font atlases, FLTK 1.3 vs 1.4 confusion, Ultralight commercial-licensing oversight, ABI/CRT linkage mismatches on packaging, and claiming accessibility for immediate-mode canvas tools without testing VoiceOver/Narrator/Orca.
43
116
 
44
117
  ## Verification commands
45
118
 
46
119
  ```sh
120
+ # C++ (CMake — Qt, JUCE, GTKmm, wxWidgets, FLTK, ImGui):
47
121
  cmake --build build
48
- ctest --test-dir build
122
+ ctest --test-dir build --output-on-failure
49
123
  ./build/<app>
124
+ # Zig (DVUI / Clay):
125
+ zig build test
126
+ zig build run
50
127
  ```
51
128
 
52
- Run actual OS/windows, inspect keyboard/focus/screen reader behavior where supported, resize/DPI/multi-monitor, shutdown/crash/dirty state, power/frame pacing, package/signing smoke tests.
129
+ Build and test suites provide `static` / logic evidence. Run native binaries (and for JUCE plugins, host DAW validation such as `pluginval` across AU/VST3/CLAP) on each shipped OS across Wayland/X11/Windows/macOS fractional HiDPI scaling, resize/minimum bounds, idle CPU/GPU power draw, keyboard traversal, screen readers (where supported), and dirty-close recovery for `rendered` evidence; label untested OSes and unsupported assistive-tech surfaces `not-checked`.