@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,87 +1,77 @@
1
- # Telegram, Zalo, WhatsApp, and Microsoft Teams
1
+ # Telegram, Zalo, WhatsApp, Teams, LINE, and WeChat
2
2
 
3
- ## Telegram bots and Mini Apps
3
+ Verify exact schema versions and host API availability against current official docs before releasing; mobile and business super-app runtimes update rapidly.
4
4
 
5
- Documented exact constraints:
5
+ ## Telegram Bots and Mini Apps (Bot API 8.x–9.x)
6
6
 
7
- | Constraint | Current documented limit/behavior |
7
+ | Constraint | Documented limit / rule |
8
8
  |---|---|
9
- | text message length | 1–4096 characters after entity parsing |
10
- | media caption length | 0–1024 characters after entity parsing |
11
- | inline keyboard button `callback_data` | 1–64 bytes |
12
- | formatting entity nesting | entities may nest only under Telegram's documented restrictions; blockquotes cannot be nested |
9
+ | Text message length | 1–4,096 characters after entity parsing |
10
+ | Media caption length | 0–1,024 characters after entity parsing |
11
+ | Inline button `callback_data` | **1–64 UTF-8 bytes** (CJK/Vietnamese/emoji take 2–4 bytes each—measure byte length, never JS `.length`) |
12
+ | Callback acknowledgement | **Always call `answerCallbackQuery`** on every inline tap to dismiss the client loading spinner |
13
+ | Entity nesting | Respect Telegram nesting rules; blockquotes cannot nest; prefer explicit entities or escaped HTML |
13
14
 
14
- Telegram supports explicit entities, Markdown-style parsing, or HTML-style parsing. Prefer explicit entities for machine-generated/localized text because they avoid delimiter escaping ambiguity. Escape user input if a parse mode is used.
15
+ - **Keyboards**: Attach inline keyboards to message-scoped actions; make reply keyboards `one_time_keyboard` or explicitly removable so they do not hijack the composer indefinitely.
16
+ - **Mini App (`Telegram.WebApp`) modern capabilities (Bot API 8.0–9.x)**:
17
+ - Use **`MainButton`** (primary action) paired with **`SecondaryButton`** (secondary/cancel action) and **`BackButton`** instead of duplicating fixed bottom bars inside the WebView.
18
+ - Honor safe areas using **`--tg-safe-area-inset-top/bottom/left/right`** and **`--tg-content-safe-area-inset-*`** CSS variables, especially when using **`requestFullscreen()` / `exitFullscreen()`** on mobile.
19
+ - Feature-detect **`addToHomeScreen()`**, **`BiometricManager`** (auth gate with graceful fallback), **`CloudStorage` / `SecureStorage`** (bot-scoped client persistence), and **Telegram Stars** digital goods checkout via `openInvoice(url)` (currency `XTR`).
20
+ - Always verify **`initData`** HMAC signature server-side with the bot token; never trust client-provided `initDataUnsafe` user IDs for authorization. Bind UI colors to `themeParams` rather than hardcoding a single theme.
15
21
 
16
- Keyboard model:
22
+ ## Zalo Mini Apps, ZaUI, and Zalo OA (ZNS)
17
23
 
18
- - **inline keyboards** attach to a message and are appropriate for actions tied to that message;
19
- - **reply keyboards** replace the user's keyboard/input area and are appropriate for repeated constrained input, but they occupy persistent UI and must be removable;
20
- - callback buttons carry opaque data; never trust the client-supplied user/chat/context without server-side validation;
21
- - URL/deep-link buttons must be clearly labeled by destination.
24
+ - Configure pages, header style, status bar, and safe areas in **`app-config.json`**, use **`zmp-ui`** (`zmp-ui/zaui.css` + `<App theme="light" | "dark">`) for ZDS-compliant components, and access host APIs through **`zmp-sdk`** (`authorize`, `getUserInfo`, `openChat`, `getStorage`/`setStorage`, `getSystemInfo`).
25
+ - Design for embedded Vietnamese phone viewports (account for stacked diacritics and line height), intermittent mobile networks, permission-denial recovery, and server-side token exchange.
26
+ - For proactive business notifications outside active user chat sessions, use approved **Zalo OA / ZNS (Zalo Notification Service)** transactional templates with parameterized fields rather than unauthorized free-form pushes.
22
27
 
23
- Mini App rules:
28
+ ## WhatsApp Business Interactive Messages and Flows
24
29
 
25
- - choose keyboard-button versus inline-button launch based on data flow: keyboard-button Mini Apps can use `Telegram.WebApp.sendData` for a service-message response; inline-button Mini Apps receive a `query_id` flow for messages on the user's behalf;
26
- - validate `initData` server-side using the documented bot-token HMAC validation. Never trust client-supplied user identity directly;
27
- - consume `themeParams` rather than forcing a fixed light/dark palette;
28
- - track viewport expansion/stable size and safe-area/content-safe-area insets; do not put controls under Telegram chrome;
29
- - use `MainButton` for the single primary next action and `BackButton` for platform navigation instead of duplicating both in-page;
30
- - test collapse/expand, viewport changes, theme switch, haptic availability, lifecycle suspension, and versioned API feature detection.
30
+ | Constraint | Documented limit |
31
+ |---|---|
32
+ | Interactive body text | up to **1,024 characters** |
33
+ | Reply buttons | up to 3 buttons, **max 20 characters per title** |
34
+ | List message | up to 10 rows total; section & row title **max 24 chars**, description **max 72 chars** |
35
+ | CTA URL button (`cta_url`) | single external link button with explicit display text (max 20 chars) |
36
+ | Carousel templates | pre-approved multi-card media templates with identical button count/types across every card |
37
+ | Service window | Interactive list/reply messages require an open 24-hour user-initiated window; proactive outreach requires approved templates or Flows |
38
+
39
+ - **WhatsApp Flows (JSON multi-screen forms)**: Use Flows for structured appointment booking, lead capture, or checkout instead of forcing 8 back-and-forth text turns. Define typed `screens` (`Form`, `TextInput`, `Dropdown`, `DatePicker`, `Footer` with `data_exchange` or `complete`), implement **RSA-OAEP + AES-GCM payload encryption/decryption** on your data-exchange endpoint, return clear field-level validation errors on the active screen, and test narrow truncation on 20-char button labels.
40
+
41
+ ## Microsoft Teams Adaptive Cards, Dialogs, and Teams AI Library
31
42
 
32
- ## Zalo Mini Apps and ZaUI
43
+ - Teams desktop/web/mobile and Microsoft Copilot Chat target **Adaptive Cards schema 1.5** (supporting **`Carousel`**, **`CodeBlock`**, and **`Chart.*`** elements where host-verified—always test in the actual target client, not just the web designer, because Outlook Actionable Messages and Bot Framework Web Chat diverge).
44
+ - Use **`Action.Execute`** with `refresh` payloads so cards transition cleanly from actionable to completed/expired state across channel viewers, provide concise `speak` text, and respect HostConfig rather than fighting Teams typography or dark/high-contrast themes.
45
+ - **Teams AI Library**: For LLM agents in Teams, use native streaming responses (`streamer.emit(...)`), **`setGeneratedByAI` / AI disclosure badges**, sensitivity labels, inline numbered citations, and feedback-loop buttons.
46
+ - **Teams Dialogs (Task Modules) & Tabs**: Use `@microsoft/teams-js` (`dialog.url.open` / `app.notifySuccess`) for complex multi-step forms or auth popups that exceed Adaptive Card input limits.
33
47
 
34
- Current documented basics:
48
+ ## LINE LIFF and Flex Messages
35
49
 
36
- - ZaUI components are derived from Zalo's official ZDS design system;
37
- - the React component package is installed as `zmp-ui` (`npm install zmp-ui`);
38
- - import the package stylesheet such as `zmp-ui/zaui.css` or component-level stylesheets according to the installed version;
39
- - the `App` container supplies shared context/theme, with documented `"light"` and `"dark"` theme values.
50
+ - **Flex Messages**: Compose rich cards via JSON `bubble` (single card with `header`, `hero`, `body`, `footer` boxes) or `carousel` (up to 12 horizontally scrollable bubbles). Every Flex Message **must include a concise `altText`** (max 400 chars) shown in chat lists, push notifications, and unsupported clients.
51
+ - **Quick Replies**: Attach up to 13 transient action chips (`message`, `postback`, `datetimepicker`, `camera`, `location`) at the bottom of a message for single-tap next replies; they disappear once tapped.
52
+ - **LIFF SDK v2**: Initialize with `await liff.init({ liffId })`, verify `liff.getIDToken()` server-side against LINE's verify endpoint (never trust decoded JWTs unverified), respect configured sheet height (`compact`, `tall`, `full`), check `liff.isInClient()` before calling `liff.sendMessages()` or `liff.closeWindow()`, and provide a clean browser fallback when opened outside LINE.
40
53
 
41
- Design rules:
54
+ ## WeChat Mini Program (`WXML` / `WXSS` / `wx.*`)
42
55
 
43
- - follow platform navigation/header/page primitives before inventing custom chrome;
44
- - design for phone-width embedded use, intermittent connectivity, Vietnamese text length/tone marks, and host-controlled safe areas;
45
- - use official components for inputs/pickers/sheets where possible because they carry platform behavior;
46
- - verify current package/runtime versions and host API availability rather than relying on community tutorials;
47
- - handle login/permission denial and expired session explicitly.
56
+ - Build layouts in **`WXML`** and **`WXSS`** using responsive **`rpx`** units (750 rpx = screen width), calculate custom navigation bar clearance from **`wx.getMenuButtonBoundingClientRect()`** and `wx.getWindowInfo()` safe-area insets so controls never collide with WeChat's floating capsule button.
57
+ - Authenticate via `wx.login()` -> send ephemeral `code` to your server -> exchange via `code2Session` (never expose `AppSecret` in Mini Program code); handle `wx.requestPayment` failures/cancellations idempotently.
58
+ - Respect hard **2 MB main-package size budgets** via `subpackages` lazy loading, and use **Official Account / Subscription Message templates** strictly with explicit user opt-in (`wx.requestSubscribeMessage`) and truthful transactional content.
48
59
 
49
- Some Zalo documentation is primarily Vietnamese. Keep implementation artifacts in English when required by the project, but preserve exact API/component names unchanged.
60
+ ## Cross-platform bot webhook & interaction reliability (`Slack`, `Discord`, `Telegram`, `Zalo`, `WhatsApp`, `Teams`, `LINE`, `WeChat`)
50
61
 
51
- ## WhatsApp interactive messages
62
+ - **Fast webhook `ack` (`< 2–3 s`) + async progress state**: acknowledge every incoming webhook, slash command, button tap, or callback query within **`< 2–3 s`** (`HTTP 200`, `deferReply`, `answerCallbackQuery`, or `Action.Execute` interim card), push heavy LLM/API work to an async queue, and update the placeholder message in place with progress/results so host timeouts never show `"This interaction failed"`.
63
+ - **Idempotent event deduplication**: messaging hosts retry webhooks on transient `5xx` or slow edges (`X-Slack-Retry-Num`, Telegram `update_id`, WhatsApp `messages[].id`, LINE `webhookEventId`, WeChat `MsgId`). Deduplicate on a short-TTL idempotency key before executing mutations or sending replies so users never get double-charged or duplicate bot messages.
64
+ - **Edited & deleted message handling**: subscribe to `message_changed`/`edited_message` and `message_deleted`/recall events—abort in-flight generations for deleted prompts, avoid crashing when editing/replying to a user-deleted message (`400 message to edit not found`), and clearly mark or refresh bot answers when the source prompt was edited.
65
+ - **Invalid command & missing-parameter guidance**: when a slash/text command has malformed syntax or missing required arguments, reply ephemerally with concise usage examples, valid option chips/buttons, or pre-filled modal/Flow launchers—never dump raw parser tracebacks or stay silent.
52
66
 
53
- Documented constraints include:
67
+ ## Do/don't pairs
54
68
 
55
- | Constraint | Current documented behavior |
69
+ | Do | Don't |
56
70
  |---|---|
57
- | list message | menu of up to 10 options |
58
- | reply button message | up to 3 options/buttons |
59
- | section title | maximum 24 characters when multiple sections are used |
60
- | row title | maximum 24 characters |
61
- | row description | maximum 72 characters |
62
- | interactive delivery window | list/reply buttons generally cannot be proactive notifications; use within the documented 24-hour user-message window unless using an approved template/Flow path |
63
-
64
- Rules:
65
-
66
- - use reply buttons for 1–3 immediate mutually exclusive decisions;
67
- - use lists for bounded larger choices, not deep browsing;
68
- - write labels that fit the host truncation limits and remain distinguishable when truncated;
69
- - do not encode state in user-visible text; validate webhook payloads server-side;
70
- - account for unsupported platforms/clients and template fallback;
71
- - do not use marketing pressure or ambiguous confirmation in a high-trust messaging surface;
72
- - preserve message ordering/idempotency because users can reopen earlier interactions.
73
-
74
- ## Microsoft Teams Adaptive Cards
75
-
76
- Current Microsoft agent-design documentation lists Teams desktop/web/mobile and Microsoft Copilot Chat at Adaptive Cards schema **1.5**, Dynamics 365 live chat at 1.5, Bot Framework Web Chat at 1.6 with `Action.Execute` unsupported, and Outlook Actionable Messages on a separate 1.0–1.2 track. Verify before release because host support changes.
77
-
78
- Rules:
79
-
80
- - set the card `version` deliberately and test in the real target host, not only the designer;
81
- - HostConfig controls spacing/fonts/colors/actions/interactivity; Teams/host styling is not yours to override arbitrarily;
82
- - prefer `Action.Execute` where supported for a unified invoke model, but verify host support and provide appropriate fallback behavior;
83
- - use inputs only when the interaction truly requires structured data; validate server-side because client input is not trustworthy;
84
- - use `refresh`/card update semantics deliberately so cards reflect completed/expired state;
85
- - keep cards narrow-friendly; Teams mobile reflow can reorder/stack visual assumptions;
86
- - provide meaningful `speak`/text equivalents for important visual content where the schema supports them;
87
- - never assume full CSS, arbitrary HTML, or web-like layout control exists inside Adaptive Cards.
71
+ | Return webhook `ack` in `< 2–3 s` + async progress state and deduplicate `update_id` / `webhookEventId` / `MsgId` idempotently | Run a `12 s` synchronous LLM call inside the webhook handler or execute duplicate mutations on host retries |
72
+ | Handle edited/deleted user messages gracefully and show actionable usage examples + quick-reply pickers on invalid/incomplete commands | Crash on `message not found` when a user deletes a prompt or fail silently on missing command parameters |
73
+ | Measure UTF-8 bytes for Telegram's 64-byte `callback_data` and always call `answerCallbackQuery` | Check `.length` on multibyte strings or leave Telegram buttons spinning |
74
+ | Validate `initData` HMAC (Telegram), `getIDToken()` (LINE), and `wx.login` code (WeChat) server-side | Trust client-passed user IDs from Mini App JS globals |
75
+ | Use WhatsApp Flows (with RSA/AES data-exchange encryption) for multi-field collection | Force 10 sequential free-text chat turns for a booking form |
76
+ | Provide mandatory `altText` (LINE Flex), `speak` (Teams), and safe-area insets (Telegram/WeChat/Zalo) | Assume rich cards render identically in push notifications or fullscreen notches |
77
+ | Keep Teams Adaptive Cards narrow-friendly and verified on mobile + high contrast | Rely solely on the desktop Adaptive Card designer preview |
@@ -1,96 +1,80 @@
1
1
  # Slack Block Kit and Discord
2
2
 
3
- Exact limits change. Use these as implementation constraints only after checking current official platform documentation.
3
+ Exact limits and component capabilities evolve. Verify against current official platform docs before shipping schema changes.
4
4
 
5
5
  ## Slack Block Kit
6
6
 
7
- Documented core limits:
8
-
9
- | Constraint | Current documented limit |
10
- |---|---:|
11
- | blocks in one message | 50 |
12
- | blocks in a modal or Home tab | 100 |
13
- | `plain_text`/`mrkdwn` text object | 1–3000 characters |
14
- | section `fields` | up to 10 text objects |
15
- | text in each section field | up to 2000 characters |
16
- | `block_id` | up to 255 characters and should be unique per message iteration |
17
-
18
- ### Surface model
19
-
20
- - **Messages** are persistent or ephemeral channel/DM payloads composed from `blocks`.
21
- - **Modals** are focused task surfaces opened through interactions and represented as views. Use them for bounded multi-field input; do not recreate an entire app in a modal.
22
- - **Home tabs** are persistent per-user app surfaces. Treat them as application UI with loading/empty/error states rather than as a giant message.
23
- - **Workflows/canvas/lists** have different capabilities; do not assume every block/element is legal on every surface. Check the block reference's surface compatibility.
24
-
25
- ### mrkdwn
26
-
27
- Slack `mrkdwn` is not standard Markdown and not HTML. Key consequences:
28
-
29
- - use Slack syntax for links/mentions/date formatting rather than pasting HTML or CommonMark assumptions;
30
- - escape `&`, `<`, and `>` when interpolating untrusted plain text;
31
- - `plain_text` and `mrkdwn` differ in emoji/verbatim/linkification behavior;
32
- - never concatenate user input directly into control markup without escaping;
33
- - test multiline text because Slack line wrapping/list indentation is platform-controlled.
34
-
35
- ### Slack UX rules
36
-
37
- - use section/context/actions/divider/input blocks for semantic structure rather than ASCII tables;
38
- - put the primary action in a native button/select; links are secondary;
39
- - label buttons by outcome (`Approve request`, not `OK`);
40
- - use stable `action_id`/`block_id` values for interaction routing, but do not put secrets in them;
41
- - acknowledge interaction quickly and update/respond asynchronously where needed;
42
- - design already-handled/expired interaction states because messages can outlive the action validity or backend state.
7
+ ### Core payload limits and timeouts
8
+
9
+ | Constraint | Documented limit / rule |
10
+ |---|---|
11
+ | Blocks in one message | 50 |
12
+ | Blocks in a Modal or Home tab | 100 |
13
+ | `plain_text` / `mrkdwn` text object | 1–3,000 characters |
14
+ | `header` block `plain_text` | up to 150 characters |
15
+ | `button` label text | **up to 75 characters** |
16
+ | Section `fields` | up to 10 objects (2,000 chars each) |
17
+ | `block_id` / `action_id` | up to 255 characters; unique per message/view |
18
+ | **Interaction `ack()` timeout** | **Must return HTTP 200 within 3 seconds** (post slow work asynchronously via `response_url` or Web API) |
19
+
20
+ ### Modern blocks (`rich_text`, native `table`, `header`) and AI Assistant surfaces
21
+
22
+ - Prefer **`rich_text`** blocks for structured nested lists, quotes, inline code, and styled text—avoiding `mrkdwn` escaping edge cases.
23
+ - Use Slack's native **`table` block** for compact tabular summaries instead of broken monospace ASCII tables.
24
+ - Use `header` (`plain_text`, <= 150 chars) for scannable card titles paired with concise `context` metadata.
25
+ - **Slack AI Assistants & Agents surfaces**: When building an app enabled as a Slack AI Assistant (split-pane DM/thread experience), use:
26
+ - `assistant.threads.setTitle` (auto-name the thread from the user's question),
27
+ - `assistant.threads.setStatus` (honest progress copy like `"Searching billing records…"`),
28
+ - `assistant.threads.setSuggestedPrompts` (up to 4 concrete starter prompts),
29
+ - native streaming via **`chat.startStream`**, **`chat.appendStream`**, and **`chat.stopStream`** instead of spamming `chat.update` rate limits, and
30
+ - **`feedback_buttons`** context/action elements for thumbs-up/down evaluation hooks.
31
+
32
+ ### Surface model and `mrkdwn` safety
33
+
34
+ - **Messages**: Persistent or ephemeral channel/DM payloads. Always include a concise top-level `text` field for push notifications, screen readers, and degraded clients.
35
+ - **Modals**: Focused bounded multi-field views (`views.open` requires a fresh `trigger_id` valid for 3 seconds). Never rebuild a full SaaS app inside chained modals.
36
+ - **Home tabs**: Persistent per-user workspace (`views.publish`); design explicit loading, empty, and error states.
37
+ - **`mrkdwn` escaping**: Slack `mrkdwn` is neither CommonMark nor HTML—escape `&`, `<`, and `>` on all untrusted user text before interpolating into `mrkdwn`, and never put secrets in `action_id`, `block_id`, or button `value`.
43
38
 
44
39
  ## Discord
45
40
 
46
- ### Embeds and legacy messages
47
-
48
- Documented embed limits include:
41
+ ### Legacy embeds vs Components V2
49
42
 
50
- | Embed field | Limit |
51
- |---|---:|
52
- | title | 256 characters |
53
- | description | 4096 characters |
54
- | fields per embed | 25 |
55
- | field name | 256 characters |
56
- | field value | 1024 characters |
57
- | footer text | 2048 characters |
58
- | author name | 256 characters |
59
- | combined title/description/field/footer/author text | 6000 characters |
60
- | embeds per message | 10 |
43
+ Documented legacy embed limits: title 256, description 4,096, 25 fields (name 256 / value 1,024), footer 2,048, author 256, combined text 6,000, max 10 embeds per message. Never split one logical response across 10 embeds.
61
44
 
62
- Use embeds for structured display, not interactive control. Do not split one logical answer across ten embeds merely because the API allows it; attention cost matters more than payload capacity.
45
+ **Components V2** is opt-in per message via flag `IS_COMPONENTS_V2 = 1 << 15` (`32768`). Setting this flag is irreversible for that message and replaces `content`/`embeds`/`poll`/`stickers` with up to **40 total components**:
63
46
 
64
- ### Components V2
47
+ - **Layout & display components**: `Container` (accent color, spoiler flag), `Section` (text + accessory), `Text Display`, `Media Gallery`, `Separator`, **`Thumbnail`** (type 11, Section accessory), and **`File`** (type 13, exposing uploaded `attachment://` files inline).
48
+ - **Interactive components**: `Action Row` holds up to 5 buttons **or** 1 select menu (`String`, `User`, `Role`, `Channel`, `Mentionable`); every interactive component needs a unique per-message `custom_id`.
49
+ - Use Components V2 when structured containers, inline files, and section thumbnails materially improve clarity; keep standard messages/embeds for simple bot responses needing legacy compatibility.
65
50
 
66
- Components V2 is opt-in per message with the `IS_COMPONENTS_V2` flag `1 << 15` (`32768`). Current official docs state that setting it is irreversible for that message and changes the payload model:
51
+ ### Expanded Modals (2025–2026) and interaction timeouts
67
52
 
68
- - `content` and `embeds` no longer work;
69
- - attachments must be exposed through components;
70
- - `poll` and `stickers` are disabled;
71
- - messages allow up to 40 total components.
53
+ - **Expanded Modal components**: Discord modals are no longer limited to bare `TextInput` fields—modern modals support **`Label`** wrappers with descriptions, **Select Menus** (String/User/Role/Channel/Mentionable), **File Upload**, and **Radio / Checkbox** inputs alongside short/paragraph text inputs. Verify exact field limits and component type numbers against current Discord API docs before shipping.
54
+ - **Mandatory timing rules**:
55
+ - **3-second initial acknowledgement**: Respond to every slash command, button, select, or modal submit within **3 seconds** (or immediately defer with `DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE` / `DEFERRED_UPDATE_MESSAGE`).
56
+ - **15-minute interaction token expiry**: Webhook follow-ups and edits using the interaction token expire after **15 minutes**—design explicit expiration/disabled states or transition to channel/bot-token updates for longer workflows.
57
+ - Always enforce invoker ownership server-side and send private validation/permission errors as ephemeral replies (`EPHEMERAL = 1 << 6`).
72
58
 
73
- Core layout rules:
59
+ ### Discord Embedded App SDK (Activities)
74
60
 
75
- - an Action Row can contain up to 5 contextually grouped buttons **or** one select component;
76
- - Text Display, Media Gallery, Section, Separator, and Container compose static structure;
77
- - interactive components need unique per-message `custom_id` values;
78
- - Text Input is modal-only. Modal examples document `max_length` up to 4000 for paragraph input, but validate exact field-level constraints in the current reference before depending on them.
61
+ When a rich interactive experience (multiplayer canvas, collaborative board, game, complex configurator) exceeds message components, launch an **Activity** inside Discord's iframe sandbox using **`@discord/embedded-app-sdk`**:
79
62
 
80
- Components V2 is not automatically “better.” Use it when layout control/content structure justifies losing content/embed compatibility. Legacy components remain appropriate for simple bot actions.
63
+ - Initialize `new DiscordSDK(clientId)`, await `discordSdk.ready()`, exchange the OAuth2 `code` on your backend server (never expose `client_secret` in the iframe), and call `discordSdk.commands.authenticate({ access_token })`.
64
+ - Route third-party external assets/APIs through Discord's URL proxy (`patchUrlMappings`) so CSP does not silently block fonts, images, or APIs.
65
+ - Design for variable embedded sizes (narrow PiP / voice tile, desktop panel, mobile portrait) and respect Discord channel participant presence honestly.
81
66
 
82
- ### Discord UX rules
67
+ ## Do/don't pairs
83
68
 
84
- - use ephemeral interaction responses for private validation/errors when the surface supports them;
85
- - defer/update deliberately for slow work; communicate progress without fake certainty;
86
- - use buttons for a small number of mutually visible actions and selects for larger bounded choices;
87
- - use modals only for structured input that cannot be represented as a select/button;
88
- - handle component ownership: decide whether any user or only the invoker can act, enforce server-side, and explain unauthorized interaction ephemerally;
89
- - expire or disable stale actions by editing the message where appropriate.
69
+ | Do | Don't |
70
+ |---|---|
71
+ | Ack Slack & Discord interactions within `< 2–3 s`, defer slow work with async progress status, and deduplicate `X-Slack-Retry-Num` / `event_id` / `interaction.id` idempotently | Wait on an LLM/DB call before HTTP 200 or execute duplicate mutations on webhook retries |
72
+ | Handle `message_changed` / `message_deleted` (`MESSAGE_UPDATE` / `MESSAGE_DELETE`) and return ephemeral usage guidance + pickers on invalid/missing command parameters | Crash when editing a deleted message or fail silently on incomplete slash/text commands |
73
+ | Stream Slack AI Assistant replies with `chat.startStream`/`appendStream`/`stopStream` | Hammer `chat.update` on every token until rate-limited |
74
+ | Use Slack native `table` and `rich_text` blocks + top-level fallback `text` | Render monospace ASCII tables that shatter on mobile |
75
+ | Use Discord Components V2 `Section` + `Thumbnail` / `File` intentionally | Enable `IS_COMPONENTS_V2` and still pass ignored `content` / `embeds` |
76
+ | Expire or disable Discord buttons after the 15-min token / task window | Leave dead buttons returning `"This interaction failed"` |
90
77
 
91
- ## Shared verification
78
+ ## Verification
92
79
 
93
- - validate generated JSON schemas client-side before send where possible;
94
- - count Unicode characters/bytes according to the platform definition, not JavaScript string assumptions alone;
95
- - inspect desktop/mobile compactness, dark/light themes, long usernames/localized strings, screen-reader output where accessible, and permission-denied interactions;
96
- - keep a plain-text summary or fallback path for clients/automation that cannot render the rich surface.
80
+ Validate Block Kit / Discord JSON payloads before send, count UTF-8 characters accurately (especially localized labels approaching Slack's 75-char button limit), test `< 2–3 s` `ack` deferral, idempotent retry deduplication, edited/deleted message events, invalid-command guidance, and 15-minute expiry paths, and inspect desktop, mobile, light/dark themes, and fallback notifications (`rendered` where tested in real clients; `static` for JSON schema tests).
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pixelcraft-constrained
3
- description: "Designs and verifies interfaces for constrained or nonstandard surfaces: TV/console/10-foot UI, D-pad/gamepad spatial navigation, watchOS/Wear OS wearables, e-ink displays, kiosks/self-service hardware, embedded LVGL/low-resolution screens, automotive CarPlay/Android Auto templates, and basic voice UI. Use when input, viewing distance, refresh technology, memory/frame-rate budgets, safety regulation, reach, glanceability, or lack of pointer/touch fundamentally constrains the interface."
3
+ description: "Designs and verifies interfaces for constrained or nonstandard surfaces: TV/console/10-foot UI (Roku/BrightScript, Fire TV/Vega OS, tvOS, Compose for TV, webOS/Tizen), D-pad spatial focus, watchOS/Compose for Wear OS, e-ink displays, POS/ISA-101 HMI/kiosks, embedded MCU UI (LVGL, Slint MCU, TouchGFX, Qt for MCUs, embedded-graphics), automotive CarPlay/Android Auto/AAOS, and Realtime Voice AI/WebRTC voice agents/Siri App Intents/Alexa+. Use when viewing distance, input hardware, refresh physics, memory budgets, or safety fundamentally constrains the interface."
4
4
  license: MIT
5
5
  metadata:
6
6
  version: 0.1.0
@@ -14,38 +14,39 @@ Constraint is the primary design material. Do not shrink a desktop/mobile interf
14
14
 
15
15
  Prioritize the one task the physical situation allows: visible spatial focus from the sofa, an at-a-glance answer on the wrist, or a static acknowledgment on low-refresh displays. Verify at the actual viewing distance, input device and refresh class. If effects compete with guidance, remove the effects; do not infer hardware readiness from web emulation.
16
16
 
17
+ ## Detection signals
18
+
19
+ Roku `manifest`/`.brs`/SceneGraph XML, Fire TV / Vega OS (`KeplerScript`, React Native for Vega), `react-native-tvos` / LightningJS, Android TV (`androidx.tv:tv-material`, `FEATURE_LEANBACK`, Leanback), tvOS SwiftUI/UIKit (`@FocusState`, `.focusSection`), LG webOS (`appinfo.json`, `@enact/sandstone`), Samsung Tizen (`config.xml`, `tizen.tvinputdevice`), Wear OS (`androidx.wear.compose`, `TileService`, Watch Face Format XML), watchOS (`WatchKit`, SwiftUI Watch, `WidgetKit` Smart Stack), E-Ink EPD vendor SDKs (Boox/Kindle/reMarkable), POS/kiosk lockdown (`LockTask`, Assigned Access, Single App Mode), ISA-101 HMI specs, embedded UI (`lv_conf.h` LVGL v9, Slint `#![no_std]` MCU, `embedded-graphics`, `.touchgfx` TouchGFX, `Qt Quick Ultralite` Qt for MCUs), automotive (`CPTemplateApplicationSceneDelegate`, CarPlay Ultra, `CarAppService`, `CarUxRestrictionsManager`), Realtime Voice AI (`@openai/realtime`, Gemini Live, LiveKit Agents, Pipecat, ElevenLabs), Apple `AppIntents`, Alexa APL/Alexa+, Google `AppFunctions`, and SSML templates.
20
+
17
21
  ## References
18
22
 
19
- - Read [references/tv-wearables.md](references/tv-wearables.md) for TV/console, D-pad focus engines, overscan/title-safe layout, tvOS, Android TV/Leanback/Compose for TV, webOS/Tizen, watchOS, and Wear OS.
20
- - Read [references/specialized-hardware.md](references/specialized-hardware.md) for e-ink, kiosk/self-service, embedded/LVGL/low-res displays, and automotive CarPlay/Android Auto constraints.
21
- - Read [references/voice-ui.md](references/voice-ui.md) for voice prompts, confirmations, error recovery, turn-taking, multimodal fallback, and SSML basics.
23
+ - Read [references/tv-wearables.md](references/tv-wearables.md) when building 10-foot TV/console UIs (Roku BrightScript, Fire TV/Vega OS, React Native TV/LightningJS, Compose for TV, tvOS 26, webOS Enact, Tizen), D-pad focus engines, Compose for Wear OS 5/6 Material 3 Expressive, or watchOS 10–26.
24
+ - Read [references/specialized-hardware.md](references/specialized-hardware.md) when designing for E-Ink (Boox/Kaleido 3/Gallery 3), POS & ISA-101 industrial HMIs, kiosk lockdown, embedded MCUs (LVGL v9, Slint MCU, `embedded-graphics`, TouchGFX, Qt for MCUs), or automotive CarPlay/CarPlay Ultra/Android Auto/AAOS.
25
+ - Read [references/voice-ui.md](references/voice-ui.md) when building classic SSML/IVR voice flows, 2025–2026 Realtime Voice AI / WebRTC voice agents (OpenAI Realtime, Gemini Live, LiveKit, Pipecat, ElevenLabs), Apple Siri App Intents, Alexa APL/Alexa+, or Google Gemini App Functions.
22
26
 
23
27
  ## Required workflow
24
28
 
25
29
  1. **Measure the constraint.** Record viewing distance, screen size/resolution/color depth/refresh behavior, input sensors/buttons, orientation, environment noise/lighting, user posture, network/compute/memory budget, and safety/regulatory context.
26
- 2. **Choose the interaction model.** Spatial focus, direct touch, rotary/crown, physical buttons, voice, remote/controler, template host, passive glance, or multimodal hybrid. Do not emulate pointer semantics where none exist.
30
+ 2. **Choose the interaction model.** Spatial focus, direct touch, rotary/crown, physical buttons, voice, remote/controller, template host, passive glance, or multimodal hybrid. Do not emulate pointer semantics where none exist.
27
31
  3. **Reduce scope per glance/turn.** Define the minimum usable task unit, default action, persistent escape/back path, and recoverable error state.
28
32
  4. **Design focus/state explicitly.** Every interactive surface needs initial focus, directional movement, focus visibility, trapping prevention, idle/timeout behavior, disabled/loading/error states, and restoration after interruption.
29
33
  5. **Verify on hardware or faithful emulation.** Simulator rendering is not evidence for legibility, focus, motion comfort, refresh artifacts, or physical reach. Label unavailable hardware checks `not-checked`.
30
34
 
31
35
  ## Non-negotiable rules
32
36
 
33
- | Concern | Rule |
37
+ | Domain | Mandatory hardware & human-factors contract |
34
38
  |---|---|
35
- | glanceability | Critical state/action must be understandable within the context's intended glance time; dense reading does not belong on TV/wearable/automotive surfaces. |
36
- | focus truth | No invisible focus, unreachable controls, circular traps, diagonal ambiguity, or focus loss after content refresh. |
37
- | input honesty | Do not require hover, precise touch, keyboard chords, drag, multitouch, or pointer input unless physically available. |
38
- | physical safety | Automotive/kiosk/public interfaces must prioritize distraction, reach, privacy, timeout, and accessibility requirements over visual novelty. |
39
- | hardware honesty | Respect refresh, memory, color, contrast, burn-in, frame-rate, and input latency budgets. |
40
- | accessibility | Provide scaling/contrast/reduced-motion/voice or alternate-input paths appropriate to the platform. |
41
- | anti-slop | Do not port dense dashboards, tiny text, hover-only menus, decorative motion, carousels without position control, or desktop dialogs onto constrained surfaces. |
39
+ | **10-Foot TV** | Deterministic 4-way D-pad spatial graph with **column-index memory across vertical rows**, visible focus halo (`scale 1.04–1.08` + high-contrast ring), **`5%` action / `10%` title overscan safe zones**, and **QR Code / `RFC 8628` Device Authorization Flow** (never force 32-char remote password entry). |
40
+ | **Wearables** | True **`#000000` OLED** canvas (**`< 15–20%` On-Pixel Ratio** in Always-On Display), **`<= 2–3 s` single-glance micro-task**, **`1` primary CTA per screen**, rotary Crown/Bezel haptic detents, and **graceful Watch standalone operation when the companion phone is away/disconnected** (local cache/queue + truthful offline badge rather than a dead `"Connect phone"` wall). |
41
+ | **Kiosk & POS (`ADA` / `EN 301 549`)** | Wheelchair reach **`38–122 cm` (`15–48"`)** or persistent **"Lower Screen / Reachability Mode"** toggle, **`>= 60×60 px` (`12–15 mm`)** touch targets, tactile audio-jack keypad nav with **auto volume/locale reset between sessions**, **`30–60 s` idle timeout with `"Still there?"` countdown (`WCAG 2.2.1`) before purging PII/cart state**, receipt-printer paper-low/offline queue, **power-loss / sudden-reboot safe transactional state recovery**, and **`72 h+` zero-leak soak stability**. |
42
+ | **Automotive IVI (`NHTSA` / `ISO 15005`)** | **`< 2.0 s` single glance / `< 12.0 s` cumulative glance** budget, **`>= 15×15 mm`** touch targets, **lock complex typing/video while `speed > 0`** (handoff to voice/wheel controls), and **instant zero-flash Day <-> Night theme switch** on tunnel ambient-light transitions. |
43
+ | **Embedded MCU, E-Ink & Regulated Safety** | Compile-time static `Flash`/`SRAM` budget (**`0` runtime heap fragmentation**) verified on the **lowest-spec target hardware SKU**, **`VSYNC` / Tearing-Effect (`TE`) double-buffered DMA transfer**, `15–30 ms` physical button debounce, **power-loss / brownout-safe dual-bank / journaled state recovery**, scheduled E-Ink waveforms, and an **explicit regulated-industry certification boundary (`IEC 62304` medical / `ISO 26262` automotive / `ISA-101` / `DO-178C` certified vs uncertified prototype scope)**. |
44
+ | **Voice UI (`VUI`)** | **`< 300 ms` local barge-in audio cutoff** + assistant transcript truncation on user speech, **`<= 3` options / `< 10–12 s` spoken turns**, explicit read-back confirmation before irreversible actions, progressive reprompts, and multimodal transcript fallback. |
42
45
 
43
46
  ## Pre-submit checklist
44
47
 
45
- - [ ] physical/input/environment constraints are written down;
46
- - [ ] initial focus/back/escape/idle-timeout behavior is explicit;
47
- - [ ] type/target sizing is justified for distance, resolution, and input accuracy;
48
- - [ ] all controls are reachable without forbidden input modalities;
49
- - [ ] safety/regulatory constraints are cited or marked out of scope/`not-checked`;
50
- - [ ] real hardware/emulator behavior was tested or explicitly labeled `not-checked`;
51
- - [ ] empty/loading/error/offline/interruption states preserve orientation and input.
48
+ - [ ] physical distance, input modality, refresh physics, **lowest-target-hardware `Flash`/`SRAM`/CPU contract**, and **explicit regulated-industry certification boundary (certified vs uncertified)** documented;
49
+ - [ ] **TV / Wearables**: 4-way D-pad column memory + `scale 1.04–1.08` focus halo + `5%/10%` safe zone + `RFC 8628` QR login (TV); `#000000` OLED `< 15–20%` AOD OPR + `1` CTA + rotary detents + **Watch standalone operation when phone is away** (Wear);
50
+ - [ ] **Kiosk / POS / IVI**: `38–122 cm` reachability toggle + `>= 60×60 px` targets + `"Still there?"` PII wipe + `72 h+` soak (Kiosk); `< 2 s / < 12 s` glance + `>= 15×15 mm` targets + `speed > 0` lockout + zero-flash tunnel Day/Night switch (IVI);
51
+ - [ ] **MCU / E-Ink / Power-Loss / Voice**: `0` runtime heap churn + `VSYNC`/`TE` DMA + `15–30 ms` button debounce + **power-loss / sudden-reboot safe state recovery** + E-Ink waveform schedule; `< 300 ms` VUI barge-in cutoff + `<= 3` options / `< 10–12 s` turns + read-back confirmation;
52
+ - [ ] **Checklist-Until-Passing Stop-Gate (`<HARD-GATE>`):** walk every checklist item above + run `slop-scan.mjs --fail-on p2`, `check-contrast.mjs`, hardware/emulator tests on lowest-target specs, 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,66 +1,90 @@
1
- # E-ink, kiosk, embedded, and automotive surfaces
1
+ # E-ink, POS, industrial HMI, kiosks, embedded MCUs, and automotive surfaces
2
2
 
3
- ## E-ink / electronic paper
3
+ ## E-ink / electronic paper & color EPD specifics
4
4
 
5
- E-ink is a stateful low-power display, not a slow LCD. Design around refresh physics:
5
+ E-ink is a stateful, reflective, bistable display—never treat it as a slow LCD:
6
6
 
7
- - full refreshes flash/invert and clear ghosting; partial refreshes are faster but accumulate artifacts;
8
- - animation/video/scrolling are usually inappropriate or severely constrained;
9
- - use high-contrast shapes/text and avoid relying on subtle grayscale;
10
- - minimize repaints by batching state changes and refreshing only dirty regions where supported;
11
- - represent progress/state persistently because the screen remains visible while powered down or asleep;
12
- - test ghosting, temperature effects, grayscale banding, touch latency, and actual partial/full refresh behavior on target hardware.
7
+ - **Refresh & waveform modes**: full refreshes invert/flash to clear ghosting; fast partial modes (**Boox EPD** `Speed` / `A2` / `X` vs crisp `Normal` / `Regal`) reduce latency at the cost of lower grayscale fidelity and accumulated ghosting. Switch to fast mode only during brief pan/zoom or typing, then trigger a clean `Regal`/full refresh on stop—and expose a manual full-refresh action.
8
+ - **Color e-ink physics**:
9
+ - **Kaleido 3 (e.g., Kindle Colorsoft, Boox Color)**: passive color filter array over a 300 PPI B&W panel yields **~150 PPI color** with a noticeably darker white point and muted pastel gamut. Keep small body text pure crisp black-on-white; reserve color for high-contrast highlights, tags, and coarse charts.
10
+ - **Gallery 3 (e.g., reMarkable Paper Pro)**: multi-pigment capsules deliver richer color at higher native resolution, but full color transitions require noticeably slower multi-stage flashes. Batch updates tightly and avoid continuous hover/scroll repaints.
11
+ - **Dithering & anti-patterns**: apply intentional ordered or Floyd-Steinberg dithering for photography/illustrations; avoid subtle gray gradients, animated spinners, smooth momentum scrolling (prefer crisp pagination), and live per-second counters. Remember the last rendered frame persists when the device sleeps—display honest timestamped status (`Updated 14:20`, not `Live`).
13
12
 
14
- Good patterns: page-like reading, static dashboards, large status/QR surfaces, explicit refresh action, and pagination instead of smooth scroll. Bad patterns: flashing loading spinners, hover effects, drag scrolling, low-contrast gray text, constant percent/fps counters, and decorative shadows requiring many gray levels.
13
+ ## POS, industrial HMI (ISA-101), & kiosk lockdown
15
14
 
16
- ## Kiosk and self-service hardware
15
+ ### Point-of-Sale (POS)
16
+ - **Dual cashier + customer displays**: show itemized totals, discounts, tax, and clear tap/insert prompts on the customer-facing display while keeping staff-only overrides, PIN fields, and back-office actions strictly on the cashier screen.
17
+ - **EMV / NFC tap idempotency**: attach an idempotency key to every card-present authorization and lock the payment state machine while awaiting terminal response so a network timeout or double-tap **never** double-charges a customer.
18
+ - **Fixed muscle-memory grids**: keep high-frequency item/tender buttons in deterministic, fixed screen positions—never dynamically reorder cashier grids by "trending" or recent popularity.
19
+ - **Offline store-and-forward**: visibly badge queued offline orders (`Offline queue: 3 pending`), enforce configured offline floor limits, and reconcile cleanly upon reconnect.
17
20
 
18
- Kiosks are public physical systems. Model the entire session, not just screens:
21
+ ### Industrial HMI (**ISA-101 High-Performance HMI**)
22
+ - **Muted normal state**: render normal operating equipment, pipes, and backgrounds in low-saturation neutral grays—**never** bright animated 3D gradients or saturated green pumps everywhere (which obscure real faults).
23
+ - **Reserved alarm colors + redundant encoding**: reserve high-chroma red, amber/yellow, and cyan strictly for active abnormal/alarm priorities, always paired with a unique geometric shape, priority number (`P1`/`P2`), and concise text so color-blind operators recognize severity instantly under harsh plant lighting.
24
+ - **Physical E-stop supersedes software**: software "Stop" controls assist normal sequencing only; never label or rely on a touchscreen button as a safety-rated emergency stop (E-stop).
25
+ - **Stale / bad-quality telemetry**: when a PLC/OPC-UA/Modbus tag loses communication or exceeds freshness TTL, immediately replace normal numeric values with a distinct bad-quality state (dashed frame, `?` / `STALE`, last-good timestamp)—never leave frozen stale readings styled as live normal state.
19
26
 
20
- - **attract loop:** explain value/action without sound dependence; never trap a user in passive loop content;
21
- - **session start/end:** clear confirmation, cancellation, receipt/print path, privacy reset, and timeout behavior;
22
- - **timeouts:** warn before ending, preserve accessibility needs, and never erase payment/identity state without explicit safe reset;
23
- - **reach zones:** place frequent/primary controls in comfortable central/lower reach; avoid requiring simultaneous far-apart actions;
24
- - **privacy:** mask sensitive input, prevent shoulder-surfable summaries, clear autofill/session data, and avoid public audio by default;
25
- - **failure:** paper jam/payment/network/scanner failure needs plain-language recovery and staff/support path;
26
- - **environment:** glare, noise, wet/gloved hands, cleaning damage, camera/keyboard occlusion, and unstable mounting matter.
27
+ ### Public kiosks (`ADA §308 / §707` & `EN 301 549`) & terminal reliability
28
+ - **Wheelchair reach (`38–122 cm` / `15–48"`) & Reachability Mode**: place all interactive controls within **`38–122 cm` (`15–48"`)** above the finished floor, **OR** render a persistent, high-contrast **"Lower Screen / Reachability Mode"** button anchored inside the bottom reach zone that shifts upper interactive controls down into reach.
29
+ - **Touch target floor & tactile audio-jack navigation**: size touch buttons **`>= 60×60 px` (`12–15 mm` physical)** with generous spacing against Parallax/gloved taps; support **tactile keypad / `3.5 mm` audio-jack spoken navigation** (`ADA §707` / `EN 301 549`) and **automatically reset audio volume, speech rate, and UI language to default** at the end of every customer session.
30
+ - **Idle timeout (`30–60 s`) + `"Still there?"` countdown (`WCAG 2.2.1`) & PII wipe**: after `30–60 s` of inactivity, display an accessible **`"Still there?"` countdown modal** (`>= 20 s` to extend session); if unanswered or when a user taps `Finish`/`Cancel`, **atomically purge all PII, auth tokens, form inputs, cached receipts, and cart state** before returning to the non-audio-dependent attract loop.
31
+ - **Hardware telemetry & `72 h+` soak gate**: monitor receipt-printer **paper-low / cover-open / cutter-jam** states (degrading gracefully to SMS/QR digital receipt or queued offline print rather than freezing checkout), lock OS chrome (`LockTask` / `Single App Mode` / `Assigned Access`), and pass a **`72 h+` continuous automated session-loop soak test** with zero heap/DOM/WebGL memory leaks.
27
32
 
28
- The 2010 ADA Standards section 308 reach-range guidance is commonly summarized for unobstructed forward reach as **48 inches maximum** and **15 inches minimum** above the finish floor, with separate side-reach/obstruction rules. Confirm jurisdiction, mounting geometry, obstruction depth, operable-part exemptions, and current legal interpretation with compliance counsel—do not treat screen layout alone as ADA certification.
33
+ ## Embedded MCUs: LVGL v9, Slint MCU, `embedded-graphics`, TouchGFX, & Qt for MCUs
29
34
 
30
- ## Embedded, LVGL, and low-resolution displays
35
+ Measure real framebuffer bytes, **compile-time static `Flash` / `SRAM` budgets**, DMA2D/GPU acceleration, worst-case input latency, and thermal limits before selecting a toolkit:
31
36
 
32
- Memory and frame budgets are configuration/platform-specific; measure the actual framebuffer, display driver, heap, DMA/cache behavior, font bitmaps, image decoders, theme, and widget tree instead of copying generic numbers.
37
+ | Framework | Language | Rendering & footprint | Best fit |
38
+ |---|---|---|---|
39
+ | **LVGL v9** | C (C++/Rust/MicroPython bindings) | Retained `lv_obj_t` tree, partial draw buffers (`1/10` screen RAM), ~32–64 KB RAM floor | Broadest MCU/RTOS ecosystem (ESP32, STM32, Zephyr, NuttX) |
40
+ | **Slint MCU** | Rust (`#![no_std]`) / C++ + `.slint` DSL | Static-allocation declarative UI compiled ahead-of-time, line-by-line renderer | Safety/Rust teams sharing clean declarative UI across desktop + MCU |
41
+ | **`embedded-graphics`** | Rust (`#![no_std]`) | Zero-allocation immediate draw primitives (`DrawTarget`, bitmaps, mono fonts) | Ultra-tiny monochrome OLEDs, e-paper tags, bare-metal sensors (<16 KB RAM) |
42
+ | **TouchGFX** | C++ (STM32) | Hardware-accelerated STM32 Chrom-ART (DMA2D) / NeoChrom GPU | High-FPS 60fps appliance/medical displays on STM32 MCUs |
43
+ | **Qt for MCUs** | QML subset → C++ (`Qt Quick Ultralite`) | Static compiled QML engine with hardware acceleration | Teams standardizing on Qt/QML across Linux MPU and RTOS MCU product lines |
33
44
 
34
- Rules:
45
+ **LVGL v9 concrete idiom** (double-buffered DMA, reusable static `lv_style_t`, and `lv_group_t` for rotary encoder / physical keypad navigation):
35
46
 
36
- - establish hard budgets: RAM/flash/framebuffer bytes, target fps, worst-case input latency, boot time, power/thermal limit;
37
- - use dirty-region/partial refresh where supported;
38
- - preload/reuse objects/styles rather than allocating per frame;
39
- - compress/pre-scale images and subset fonts to required glyphs;
40
- - use coarse visual hierarchy: position, size, contrast, inverse video, icons—not subtle shadows/gradients;
41
- - design for monochrome/low color depth with redundant shape/text encoding;
42
- - avoid alpha blending/rotation/anti-aliasing assumptions until profiled;
43
- - display state honestly when sensors are stale/disconnected/failing.
47
+ ```c
48
+ static lv_style_t style_focus;
49
+ lv_style_init(&style_focus);
50
+ lv_style_set_outline_width(&style_focus, 3);
51
+ lv_style_set_outline_color(&style_focus, lv_color_hex(0x0074CA));
44
52
 
45
- For tiny OLED/monochrome displays, think in glyphs and bitmap rows. Text width, clipping, inverse pixels, blinking cadence, and burn-in mitigation are design decisions. Do not render scaled-down desktop layouts.
53
+ lv_display_t *disp = lv_display_create(320, 240);
54
+ /* Synchronize double-buffered DMA flush to panel VSYNC / Tearing-Effect (TE) pin */
55
+ lv_display_set_buffers(disp, draw_buf1, draw_buf2, sizeof(draw_buf1), LV_DISPLAY_RENDER_MODE_PARTIAL);
46
56
 
47
- ## Automotive: CarPlay and Android Auto
57
+ lv_group_t *group = lv_group_create();
58
+ lv_obj_t *btn = lv_button_create(lv_screen_active());
59
+ lv_obj_add_style(btn, &style_focus, LV_STATE_FOCUSED);
60
+ lv_group_add_obj(group, btn); // binds rotary encoder / debounced physical keypad focus
61
+ ```
48
62
 
49
- Automotive interfaces are template constrained because driver distraction is a safety issue.
63
+ MCU & E-Ink engineering gates:
64
+ - **`0` runtime heap fragmentation**: allocate widgets, glyph bitmaps, and framebuffers statically at boot/compile time (`LV_STDLIB_BUILTIN` fixed pool or `#![no_std]` static structs)—never `malloc`/`free` dynamically per frame.
65
+ - **Tear-free `VSYNC` / `TE` double-buffered DMA**: synchronize SPI/RGB/MIPI-DSI DMA buffer swaps to the panel's hardware **Tearing-Effect (`TE`)** or **`VSYNC`** interrupt so horizontal motion never shears diagonally.
66
+ - **Physical button & rotary debounce (`15–30 ms`)**: apply hardware RC or deterministic **`15–30 ms` software state-machine debounce** on tactile switches and quadrature encoders so contact bounce never double-submits confirmations; on `1-bit`/`4-bit` E-Ink, use pure black-on-white crisp bitmap/hinted typography without gradient soup.
50
67
 
51
- Verified Android constraint: the host limits the number of templates in a task to a maximum of **five**, and the last template must be one of the documented terminal types such as `NavigationTemplate`, `PaneTemplate`, `MessageTemplate`, `MediaPlaybackTemplate`, `SignInTemplate`, or `LongMessageTemplate`. Exhausting the quota can show an error and close the app. Refreshes/back/reset operations have special rules—read the current official page before designing flows.
68
+ ## Automotive IVI: CarPlay, Android Auto, AAOS (`NHTSA` / `ISO 15005`)
52
69
 
53
- Rules:
70
+ Driver distraction is a physical safety hazard—enforce **NHTSA Visual-Manual Guidelines** and **ISO 15005** glance budgets strictly:
54
71
 
55
- - use CarPlay/Android Auto template APIs for supported app categories; do not build arbitrary custom driver UI outside them;
56
- - reduce decisions while driving; postpone complex setup to parked/phone context where required;
57
- - prefer voice/system controls and large glanceable rows over custom gestures/text entry;
58
- - never require reading long passages, precision touch, scrolling dense lists, or visual attention away from the road;
59
- - preserve state across head-unit disconnect/reconnect and audio interruption;
60
- - use driver-distraction/quality review criteria as release gates, not optional polish;
61
- - distinguish Android Auto phone projection from Android Automotive OS vehicle integration;
62
- - test daylight/night contrast, glare, audio mixing, voice recognition failure, parked versus driving state, and OEM screen/input differences.
72
+ - **Glance & target floor**: every driving-accessible task must complete within **`< 2.0 s` per single glance** and **`< 12.0 s` cumulative glance time**, using physical touch targets **`>= 15×15 mm`** with high-contrast labels (`>= 4.5:1`–`7:1` under direct sunlight).
73
+ - **`speed > 0` motion interlocks**: the instant vehicle speed leaves `0` / `Park`, **lock complex QWERTY typing, long-list scrolling, settings setup, and video playback** (`CarUxRestrictionsManager`), handing off seamlessly to **voice (`PTT`) and steering-wheel switches** without losing context.
74
+ - **Instant zero-flash Day <-> Night tunnel switch**: pre-load both Day and Night token palettes in GPU/RAM so entering or exiting a dark highway tunnel switches themes in **`1` frame with zero white-screen flash** (never reload stylesheets or flash `#FFFFFF` into a night-adapted driver's eyes!).
75
+
76
+ ### Apple CarPlay & CarPlay Ultra
77
+ - Build apps exclusively on Apple's category-entitled **CarPlay templates** (**`CPListTemplate`**, **`CPMapTemplate`**, **`CPTabBarTemplate`**, **`CPInformationTemplate`**, **`CPNowPlayingTemplate`**, **`CPGridTemplate`**) plus iOS 26 glanceable CarPlay widgets/Live Activities.
78
+ - **CarPlay Ultra** (instrument cluster + center console): respect strict cluster glance budgets, instant Day/Night luminance parity, and OEM telltale priority.
79
+
80
+ ### Android Auto & Android Automotive OS (AAOS)
81
+ - **Car App Library (`androidx.car.app`) 5-template task quota**: cap flows at **5 templates**, ending on a documented terminal template (`NavigationTemplate`, `PaneTemplate`, `MessageTemplate`, `MediaPlaybackTemplate`, `SignInTemplate`, `LongMessageTemplate`).
82
+ - **AAOS Distraction Optimization (`CarUxRestrictionsManager`)**: declare `<meta-data android:name="distractionOptimized" android:value="true" />` and obey `UX_RESTRICTIONS_NO_KEYBOARD`, `UX_RESTRICTIONS_LIMIT_STRING_LENGTH`, `UX_RESTRICTIONS_LIMIT_CONTENT`, and `UX_RESTRICTIONS_NO_SETUP` live; keep passenger-zone screens strictly isolated from the driver display.
63
83
 
64
84
  ## Shared hardware verification
65
85
 
66
- Do not certify from screenshots. Measure real input latency, refresh artifacts, legibility in environment lighting, physical reach, thermal/power behavior, timeout recovery, reset privacy, and failure handling. Label missing hardware/compliance verification `not-checked`.
86
+ Never certify hardware surfaces from desktop browser screenshots. Verify on target devices (`rendered`; label missing hardware or regulatory sign-off `not-checked`):
87
+ - E-Ink partial vs full waveform schedule, `1-bit`/`4-bit` pure B&W crispness, and sleep-screen timestamp honesty;
88
+ - POS/Kiosk `38–122 cm` reachability mode, `>= 60×60 px` (`12–15 mm`) targets, audio-jack volume reset, `30–60 s` `"Still there?"` PII purge, printer paper-low/offline queue, and `72 h+` soak memory stability;
89
+ - MCU static `Flash`/`SRAM` map (`0` runtime heap churn), `VSYNC`/`TE` DMA tear check, and `15–30 ms` button debounce;
90
+ - Automotive `< 2.0 s` single / `< 12.0 s` cumulative glance timing, `>= 15×15 mm` targets, `speed > 0` `CarUxRestrictions` lockouts, and zero-flash tunnel Day <-> Night transitions.