@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,46 +1,73 @@
1
- # Unreal UMG
2
-
3
- ## Token mapping
4
-
5
- Use shared styles/brushes/materials/data assets/project style guides where available rather than copying colors/fonts per widget. Map semantic colors/type/spacing into centralized widget styles or design-system wrapper widgets. UMG inheritance/retainer/material behavior must be understood before creating parallel constants.
6
-
7
- ## Layout and responsive idioms
8
-
9
- Use panels (`VerticalBox`, `HorizontalBox`, `GridPanel`, `CanvasPanel`, `SizeBox`, `ScaleBox`, `SafeZone`) intentionally. Separate HUD widget, menu screens, world-space widgets, overlays, scaling/resolution behavior, split screen, aspect ratios, safe zones, and platform-specific UI layers.
1
+ # Unreal UMG, CommonUI, MVVM, and Slate
2
+
3
+ ## Production architecture: CommonUI + UMG ViewModel (MVVM)
4
+
5
+ For any shipping PC/console/cross-platform Unreal game, pair **UMG** with the official **CommonUI** and **UMG ViewModel (`MVVM`)** plugins rather than raw `AddToViewport()` and per-frame Blueprint property bindings:
6
+
7
+ ### CommonUI idioms
8
+
9
+ - **`UCommonActivatableWidget`**: base class for every screen, HUD overlay, and modal dialog. Manages explicit `NativeOnActivated()` / `NativeOnDeactivated()` lifecycle, input config (`GetDesiredInputConfig()`), and back-action handling.
10
+ - **`UCommonActivatableWidgetStack`**: manages layered UI stacks (HUD layer, Menu layer, Modal layer, System Prompt layer) with automatic focus handoff and back-button popping—never scatter `AddToViewport(ZOrder)` calls across Blueprints.
11
+ - **`NativeGetDesiredFocusTarget()`**: override on every `UCommonActivatableWidget` so opening or returning to a screen places controller/keyboard focus on a guaranteed valid widget instead of dropping focus to the viewport.
12
+ - **`UCommonInputSubsystem` & `UCommonActionWidget`**: automatically detects input method switches (`ECommonInputType::Gamepad`, `MouseAndKeyboard`, `Touch`) and swaps button prompt glyphs dynamically from `UCommonInputBaseControllerData` data tables (Xbox, PlayStation, Switch, Steam Deck, KBM) without hard-coded icon branches.
13
+
14
+ ```cpp
15
+ // Header / implementation excerpt for a CommonUI menu screen
16
+ UWidget* USettingsScreen::NativeGetDesiredFocusTarget() const
17
+ {
18
+ if (PrimaryAudioSlider && PrimaryAudioSlider->IsVisible())
19
+ {
20
+ return PrimaryAudioSlider;
21
+ }
22
+ return Super::NativeGetDesiredFocusTarget();
23
+ }
24
+
25
+ TOptional<FUIInputConfig> USettingsScreen::GetDesiredInputConfig() const
26
+ {
27
+ return FUIInputConfig(ECommonInputMode::Menu, EMouseCaptureMode::NoCapture);
28
+ }
29
+ ```
10
30
 
11
- ## Typography/custom fonts
31
+ ### UMG ViewModel (`MVVM`) plugin
12
32
 
13
- Configure font assets/localization/font fallback carefully. Verify glyph coverage/memory, scaling/DPI, line breaking, expansion, and readability at distance. Bitmap/font atlas constraints matter for localized games; do not treat editor English as coverage.
33
+ - Replace Blueprint **tick-bound property functions** (which execute every Slate frame regardless of whether data changed!) with push-based **`UMVVMViewModelBase`** subclasses using `UPROPERTY(FieldNotify)` and `UE_MVVM_SET_PROPERTY_VALUE(Health, NewHealth)`.
34
+ - Keep gameplay actors decoupled from widgets: widgets subscribe to ViewModel field notifications, preventing circular hard references and per-frame UI CPU spikes.
14
35
 
15
- ## Motion/reduced motion
36
+ ### Enhanced Input UI routing
16
37
 
17
- Use UMG animations/sequencer/material motion intentionally. Provide reduced-motion/flash/camera-motion settings as game accessibility options; platform-level hooks may not cover all gameplay motion. Never hide critical HUD state behind cinematic animation timing.
38
+ - Pair **Enhanced Input** (`UInputMappingContext` priority stacking) with CommonUI's `FUIInputConfig` (`ECommonInputMode::Game`, `Menu`, `All`) so opening a pause menu or radial wheel never leaks weapon firing/movement into gameplay or traps `Cancel`/`Back`.
18
39
 
19
- ## Accessibility specifics
40
+ ## Slate (`SCompoundWidget` / `FSlateStyleSet`) vs UMG boundary
20
41
 
21
- Use navigation/focus behavior explicitly, controller/keyboard input routing, visible focus state, text scaling/HUD scaling/subtitles/captions/colorblind-safe coding/remapping. Unreal/platform screen-reader support varies; label uncertainty honestly. CommonUI/input routing plugins can help but introduce their own constraints.
42
+ | Use **UMG + CommonUI + MVVM** | Drop to **C++ Slate (`SCompoundWidget`, `FSlateStyleSet`)** |
43
+ |---|---|
44
+ | Runtime game HUDs, menus, inventories, and artist-authored animations/layouts | Unreal Editor tools, custom debug inspectors, and viewport overlays |
45
+ | CommonUI style assets (`UCommonTextStyle`, `UCommonButtonStyle`, `UCommonBorderStyle`) | Pre-world loading screens (`IGameMoviePlayer`), ultra-hot custom `OnPaint` batching, or custom widgets wrapped by a `UWidget` host |
22
46
 
23
- ## States idiom
47
+ ## Batching and performance (`InvalidationBox`, `RetainerBox`)
24
48
 
25
- Model game state and UI lifecycle together: loading/connecting/error/offline/permission/death/respawn/pause/cutscene/inventory-empty/matchmaking/cancelled/purchase-pending. Input mode (game-only/UI-only/game-and-UI) is UX state; mistakes trap input or leak gameplay actions.
49
+ - **`UInvalidationBox`** (or project-wide Global Invalidation): caches Slate layout/geometry for static or rarely mutated subtrees so unchanging HUD frames skip per-frame pre-pass and paint.
50
+ - **`URetainerBox`**: renders a widget subtree into an offscreen render target for custom UI post-process materials (chromatic aberration, curved visor) or throttled refresh cadence (`Phase` / `PhaseCount`, e.g., updating a minimap every 2–4 frames). Profile VRAM and draw-call overhead—never wrap every panel in a `RetainerBox`.
26
51
 
27
- ## Forms idiom
52
+ ## Layout, typography, accessibility, and states
28
53
 
29
- Editable text/widgets need labels/instructions, virtual keyboard/platform integration, validation timing, paste/input constraints, focus navigation, preservation after error/menu interruption, and recovery copy. Account linking/authentication must not force redundant manual entry when platform identity exists.
54
+ - Use `SafeZone`, `Overlay`, `VerticalBox`, `HorizontalBox`, `GridPanel`, `SizeBox`, and `ScaleBox` deliberately; never anchor entire HUDs strictly inside `CanvasPanel` with fixed pixel offsets that break on 21:9/32:9 or handheld screens.
55
+ - Configure Composite Font assets with explicit script sub-fonts for CJK, Arabic, Thai, and Cyrillic; test DPI curve scaling, subtitle size/backdrop options, colorblind shaders/palettes, reduced-motion/flash settings, and virtual keyboard / platform auth flows.
56
+ - Model input-mode and interruption transitions (loading, disconnect, controller disconnect, death/respawn, cutscene, pending purchase) as explicit UI states.
30
57
 
31
58
  ## Do/don't pairs
32
59
 
33
60
  | Do | Don't |
34
61
  |---|---|
35
- | centralized semantic style assets/wrappers | copying colors/fonts per widget instance |
36
- | explicit input mode/focus ownership | modal that traps controller input or leaks firing/movement |
37
- | safe-zone/aspect matrix testing | validating only editor PIE 16:9 window |
38
- | HUD scaling/subtitle/colorblind options | fixed tiny monochrome HUD treated as hardcore aesthetic |
39
- | restore focus after popup/menu close | focus lost to hidden/removed widget |
62
+ | Push screens onto `UCommonActivatableWidgetStack` and override `NativeGetDesiredFocusTarget()` | Scatter `AddToViewport()` calls and lose controller focus when closing modals |
63
+ | Use `UMVVMViewModelBase` (`FieldNotify`) push bindings | Bind Blueprint functions directly to widget text/progress properties evaluated every tick |
64
+ | Use `UCommonActionWidget` + `UCommonInputSubsystem` for live device glyph swapping | Hard-code `"Press [E]"` or Xbox-only textures across PC/PlayStation/Switch builds |
65
+ | Centralize tokens in `UCommonTextStyle` / `UCommonButtonStyle` / `FSlateStyleSet` | Copy raw colors and font settings across every individual Widget Blueprint |
66
+ | Wrap static subtrees in `InvalidationBox` and reserve `RetainerBox` for measured shader/throttle needs | Put every HUD widget inside a `RetainerBox`, blowing mobile/console VRAM |
40
67
 
41
68
  ## Known traps
42
69
 
43
- Blueprint visual-script sprawl hiding state ownership, input mode mistakes, focus/navigation inconsistency, hard references/memory cost, localized glyph coverage, editor/runtime scaling mismatch, safe-area/platform differences, retainer/material rendering artifacts, certification constraints discovered late.
70
+ Tick-bound Blueprint property bindings burning frame budget, `AddToViewport` Z-order/focus leaks without CommonUI stacks, input-mode mismatches trapping controller input or leaking gameplay actions, hard asset references loaded synchronously by HUD widgets, missing localized Composite Font sub-fonts, and PIE 16:9 testing hiding SafeZone/ultrawide clipping.
44
71
 
45
72
  ## Verification commands
46
73
 
@@ -50,4 +77,4 @@ Run the project's Unreal Automation / UAT build command against the repo `.uproj
50
77
  RunUAT BuildCookRun -project="<PathToProject>.uproject" -build -unattended
51
78
  ```
52
79
 
53
- Use PIE/device/console-like target screenshots, controller-only navigation, resolution/aspect/safe-zone matrix, localization pseudo-text/glyph checks, accessibility option tests, input-mode/menu interruption flows, automation tests, and current platform certification checklists where applicable.
80
+ Profile Slate/UMG with `stat Slate`, Widget Reflector, and Unreal Insights (`rendered`); test controller-only focus flows, device hot-swap glyphs, resolution/aspect/SafeZone matrix, pseudo-localized fonts, and interruption states on target platforms (`rendered`, labeling untested certification items `not-checked`).
@@ -0,0 +1,122 @@
1
+ # Web game engines, AAA/native UI middleware, and indie engines
2
+
3
+ Use this reference when game UI runs in HTML5/web engines, cross-engine native UI middleware, or C/C++/Lua/TypeScript indie engines. Pair with `references/hud-principles.md` for HUD legibility, controller focus, safe areas, HDR/ultrawide clamps, and accessibility floors.
4
+
5
+ ## 1. HTML5 and Web Game Engines
6
+
7
+ | Engine | Primary UI idiom | Critical rules & accessibility notes |
8
+ |---|---|---|
9
+ | **Phaser (3 / 4)** | Parallel `HUDScene` (`scene.launch('HUDScene')`), `DOMElement` (`this.add.dom(...)`), or **RexUI** (`rexUI.add.sizer`, scrollable panels, dialogs) | Enable `dom: { createContainer: true }` in `Phaser.Game` config for accessible HTML forms/menus synced to the game viewport; set `pointer-events: none` on the overlay container and `pointer-events: auto` on interactive controls so canvas input stays intact. Keep `HUDScene` fixed with `setScrollFactor(0)` and handle `scale.on('resize')`. |
10
+ | **PixiJS (v8 + `@pixi/ui`)** | `@pixi/ui` (`FancyButton`, `Slider`, `ScrollBox`, `Input`, `List`) + `@pixi/layout` (Yoga Flexbox) or semantic HTML HUD overlay | Canvas-drawn widgets lack screen-reader semantics unless wired via PixiJS's `accessibility` plugin (`accessible`, `accessibleTitle`, `accessibleType`) or paired with an HTML/ARIA HUD layer. Size canvas cleanly with `autoDensity: true, resolution: window.devicePixelRatio`. |
11
+ | **Excalibur** | Semantic HTML/CSS HUD overlay bound to engine events; `ScreenElement` for in-canvas markers | Excalibur's own docs favor real HTML/CSS overlays for menus, inventories, forms, and localization so keyboard focus, RTL, screen readers, and responsive text work natively instead of fighting `<canvas>`. |
12
+ | **Kaplay** (Kaboom.js successor) | Fixed screen-space objects (`fixed()`, `z(100)`, `anchor(...)`, `area()`) + explicit scenes (`go('pause')`) | Kaplay has no built-in focus manager—implement explicit keyboard/gamepad selection state (`onKeyPress`, `onGamepadButtonPress`) and recompute UI anchors on `onResize(...)`. |
13
+
14
+ ```ts
15
+ // Phaser 3/4: parallel HUDScene + accessible DOM overlay pattern
16
+ export class HudScene extends Phaser.Scene {
17
+ constructor() { super({ key: 'HudScene' }); }
18
+
19
+ create() {
20
+ const score = this.add.text(24, 20, 'SCORE 0', { fontFamily: 'Inter', fontSize: '24px', color: '#f8fafc' })
21
+ .setScrollFactor(0)
22
+ .setDepth(100);
23
+
24
+ // Accessible HTML pause button/form over the WebGL canvas
25
+ const pauseEl = this.add.dom(this.scale.width - 24, 24).createFromHTML(
26
+ '<button type="button" aria-label="Pause game" style="padding:8px 14px;">Pause</button>',
27
+ );
28
+ pauseEl.setOrigin(1, 0);
29
+ pauseEl.addListener('click').on('click', () => this.scene.launch('PauseScene'));
30
+
31
+ this.scale.on('resize', (gameSize: Phaser.Structs.Size) => {
32
+ pauseEl.setPosition(gameSize.width - 24, 24);
33
+ score.setPosition(24, 20);
34
+ });
35
+ }
36
+ }
37
+ ```
38
+
39
+ ## 2. AAA and Native UI Middleware
40
+
41
+ | Middleware | Authoring model | Best for | Key constraints |
42
+ |---|---|---|---|
43
+ | **NoesisGUI** | Hardware-accelerated **XAML / MVVM** (C++ / C#; plugins for Unity, Unreal, custom engines) | AAA/AA cross-platform HUDs & menus with crisp GPU vector rendering, Blend designer workflow, resource dictionaries, and low memory | Keep ViewModels push-driven (`INotifyPropertyChanged`), load localized `ResourceDictionary` files per language, and profile vector tessellation on large animated paths |
44
+ | **RmlUi** | Open-source C++ **HTML/CSS (`RML`/`RCSS`)** with Flexbox & `DataModelConstructor` binding | Custom C++ engines (SDL, bgfx, Vulkan, DX12, OpenGL) wanting web-like layout without a browser process | RCSS is a curated CSS subset—do not assume arbitrary browser CSS; wire custom font-face loading (`Rml::LoadFontFace`) for CJK/Arabic and explicit gamepad focus navigation |
45
+ | **Coherent Gameface** | Commercial AAA **HTML5 / CSS / JS** game UI runtime (PC/console) | Studios building live-service HUDs/stores with web frontend teams at 60–120 fps | Supports a performance-hardened subset of CSS/DOM; avoid layout-thrashing DOM reads/writes per frame, pool lists to eliminate JS GC pauses, and split lightweight HUD views from heavy store/inventory views |
46
+ | **Dear ImGui** | Immediate-mode C++ UI (`ImGui::Begin`, docking, viewports) | In-game debug consoles, engine tools, and high-density simulation/strategy inspector HUDs | Enable `ImGuiConfigFlags_NavEnableKeyboard` + `ImGuiConfigFlags_NavEnableGamepad`, scale fonts and style (`ImGuiStyle::ScaleAllSizes`) for HiDPI/4K, and note lack of native OS screen-reader tree unless integrated with custom accessibility bridges |
47
+
48
+ ```cpp
49
+ // RmlUi C++: bind reactive game state cleanly via DataModelConstructor (zero per-frame string DOM churn)
50
+ if (Rml::DataModelConstructor ctor = context->CreateDataModel("hud")) {
51
+ ctor.Bind("health", &playerState.health);
52
+ ctor.Bind("ammo", &playerState.ammo);
53
+ ctor.BindEventCallback("on_resume", [&](Rml::DataModelHandle, Rml::Event&, const Rml::VariantList&) {
54
+ game.Resume();
55
+ });
56
+ hudModelHandle = ctor.GetModelHandle();
57
+ }
58
+ // When health changes: hudModelHandle.DirtyVariable("health");
59
+ ```
60
+
61
+ ## 3. Native and Indie Engines
62
+
63
+ - **Raylib + `raygui`** (C/C++/multi-language):
64
+ - Pass `FLAG_WINDOW_HIGHDPI | FLAG_WINDOW_RESIZABLE` before `InitWindow`, scale layouts from `GetScreenWidth()`/`GetScreenHeight()`, load theme styles with `GuiLoadStyle(...)`, and load non-ASCII localization codepoints explicitly via `LoadFontEx(path, size, codepoints, count)` (default Raylib fonts load ASCII only!). Wire manual keyboard/gamepad focus indices since `raygui` is pointer-first.
65
+ - **SDL3 + `SDL_ttf` v3** (C/C++):
66
+ - Use `SDL_GetWindowDisplayScale(window)` and `SDL_GetDisplayUsableBounds(...)` for crisp HiDPI and safe-area sizing across macOS/Windows/Linux/mobile.
67
+ - Use **`SDL_ttf` v3** (`TTF_CreateText`, `TTF_CreateRendererTextEngine` / `TTF_CreateGPUTextEngine`) with built-in HarfBuzz shaping for accurate **Arabic/RTL, Indic, and CJK** rendering and text wrapping.
68
+ - Detect exact controller glyphs via **`SDL_GetGamepadType(gamepad)`** (`SDL_GAMEPAD_TYPE_PS5`, `XBOXONE`, `NINTENDO_SWITCH_PRO`, etc.) so button prompts match physical hardware automatically.
69
+ - **Defold** (Lua `.gui` / `.gui_script`):
70
+ - Set each GUI node's **Adjust Mode** deliberately (`FIT` for HUD elements preserving aspect ratio, `ZOOM` for full-bleed backdrops, `STRETCH` rarely), author responsive **Layout Profiles** (Landscape / Portrait) in `.gui`, use slice-9 textures for scalable frames, watch dynamic font-atlas page limits for CJK, and manage `acquire_input_focus` / `release_input_focus` explicitly so modal popups consume input before gameplay scripts.
71
+ - **Cocos Creator** (TypeScript):
72
+ - Anchor responsive HUD modules with **`Widget`** + **`Layout`** containers, attach **`SafeArea`** to the top-level HUD node for mobile/WeChat mini-game cutouts, tune `Label` **`CacheMode`** (`NONE` for rarely updated dynamic strings, `BITMAP` for static labels, `CHAR` for dense CJK text sharing a global glyph atlas to control VRAM), and verify `Button` focus/keyboard handling when targeting web or desktop.
73
+ - **Ebitengine** (Go 2D + **`ebitenui`**):
74
+ - Build menus, HUD panels, and lists with **`ebitenui`** (`widget.Container`, `widget.RowLayout`/`GridLayout`, `widget.Button`, `widget.List`) rather than raw `ebitenutil.DebugPrint` or manual rectangle hit-testing.
75
+ - Scale crisp HiDPI interfaces using `ebiten.Monitor().DeviceScaleFactor()` inside `LayoutF(outsideWidth, outsideHeight)`, render localized scripts with `text/v2` (`GoTextFaceSource` + fallback faces for CJK/RTL), and track keyboard/gamepad focus explicitly because `ebitenui` is pointer-first.
76
+ - **Macroquad** (Rust 2D lightweight UI):
77
+ - Switch back to screen-space HUD coordinates with `set_default_camera()`, read `screen_width()`/`screen_height()` and `screen_dpi_scale()`, and build menus/inspectors with `macroquad::ui` (`root_ui()` skins) or `egui-macroquad` instead of hand-rolled `draw_rectangle`/`draw_text` layout math. Load explicit TTF fonts (`load_ttf_font`) and wire keyboard/gamepad selection indices cleanly.
78
+ - **Flame** (Flutter / Dart 2D overlays):
79
+ - Keep menus, pause dialogs, inventories, HUD bars, and settings in **real Flutter widgets** mounted via **`GameWidget.overlayBuilderMap`** (`game.overlays.add('PauseMenu')` / `remove(...)`)—this gives TalkBack/VoiceOver semantics, Dynamic Type/`sp` scaling, RTL/localization, `SafeArea`, and keyboard/gamepad `FocusTraversalGroup` automatically. Reserve Flame canvas `PositionComponent`s strictly for diegetic world-space markers.
80
+ - **Pygame (`pygame-ce`) & Python Arcade**:
81
+ - **Pygame**: avoid raw `pygame.draw.rect` + `font.render` layout loops for structured menus—use **`pygame_gui`** (`UIManager`, JSON theme tokens, relative `anchors`, `process_events`/`update`/`draw_ui`, `set_window_resolution` on `VIDEORESIZE`) or `pygame-menu`, compute safe-area margins against logical display size, and wire explicit `JOYHATMOTION`/`JOYBUTTONDOWN` focus navigation.
82
+ - **Arcade**: use `arcade.gui.UIManager` with `UIAnchorLayout` / `UIBoxLayout` / `UIGridLayout` on a dedicated GUI `Camera2D` separate from the gameplay camera, and call `manager.enable()` / `manager.disable()` cleanly on `arcade.View` transitions so inactive menus never swallow gameplay input.
83
+
84
+ ```c
85
+ // SDL3: scale HUD by HiDPI display factor and resolve physical gamepad glyph family
86
+ float scale = SDL_GetWindowDisplayScale(window);
87
+ SDL_GamepadType padType = SDL_GetGamepadType(gamepad);
88
+ const char *glyphSet =
89
+ (padType == SDL_GAMEPAD_TYPE_PS5 || padType == SDL_GAMEPAD_TYPE_PS4) ? "playstation" :
90
+ (padType == SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO) ? "nintendo" : "xbox";
91
+ ```
92
+
93
+ ```dart
94
+ // Flame (Flutter/Dart): bridge accessible native Flutter widgets over the game loop
95
+ GameWidget<MyGame>(
96
+ game: game,
97
+ overlayBuilderMap: {
98
+ 'PauseMenu': (context, game) => SafeArea(
99
+ child: Center(
100
+ child: FocusTraversalGroup(
101
+ child: PauseMenuCard(onResume: () => game.overlays.remove('PauseMenu')),
102
+ ),
103
+ ),
104
+ ),
105
+ },
106
+ );
107
+ ```
108
+
109
+ ## Do/don't pairs
110
+
111
+ | Do | Don't |
112
+ |---|---|
113
+ | Pair HTML5 canvas engines (Phaser/PixiJS/Excalibur) with accessible HTML/DOM menus or explicit ARIA/accessibility bindings | Trap complex forms, settings, and screen-reader users inside an opaque `<canvas>` |
114
+ | Render Flame menus/HUDs as native Flutter widgets via `overlayBuilderMap` (`SafeArea` + semantics) | Hand-draw text menus onto Flame's canvas and lose VoiceOver/TalkBack, RTL, and text scaling |
115
+ | Use `ebitenui` (Go), `macroquad::ui`/`egui-macroquad` (Rust), and `pygame_gui`/`arcade.gui` (Python) | Hand-roll brittle `drawRect`/`fillText`/`pygame.draw.rect` layout and hit-test engines |
116
+ | Use data-bound MVVM/data-model updates in NoesisGUI, RmlUi, and Gameface | Rebuild entire XAML/RML/DOM subtrees or allocate JS objects every frame |
117
+ | Enable `NavEnableGamepad` + HiDPI `ScaleAllSizes` in Dear ImGui, and load non-ASCII codepoints in Raylib / HarfBuzz text engines in SDL3 `SDL_ttf` v3 | Assume ASCII-only bitmap fonts or 1× desktop mouse scaling work across locales and 4K/handhelds |
118
+ | Manage `Adjust Mode` + `acquire_input_focus` stacks in Defold and `SafeArea` + `Label` `CacheMode` in Cocos Creator | Let modal popups leak clicks to gameplay or blow mobile texture memory with uncached CJK labels |
119
+
120
+ ## Verification commands
121
+
122
+ Run the project's native build/test command without suppressing errors (`npm run build` for Phaser/PixiJS/Excalibur/Kaplay/Cocos, `cmake --build build && ctest --test-dir build` for C++ RmlUi/SDL3/Raylib/ImGui, `go test ./...` for Ebitengine, `cargo test` for Macroquad, `flutter test` for Flame, `pytest` for Pygame/Arcade, or `bob` for Defold). Verify HiDPI scaling, ultrawide/mobile safe areas, controller-only menu navigation, device glyph detection, localized CJK/RTL glyph rendering, and frame-time impact during active play (`rendered`; label untested assistive-tech adapters `not-checked`).
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pixelcraft-handoff
3
- description: Translates approved designs, Figma selections, screenshots, mockups, and design-system artifacts into faithful implementation without losing existing architecture. Use for design-to-code translation, variable-to-token mapping, existing-component reuse, missing-state resolution, cross-stack implementation, ambiguity handling, and visual-fidelity checking with pixelcraft-visual-qa.
3
+ description: Translates approved designs, Figma MCP context, Code Connect bindings, Dev Mode specs, Penpot files, screenshots, mockups, and motion handoff prototypes into faithful implementation without losing existing architecture. Use for design-to-code translation, variable-to-token mapping, existing-component reuse, missing-state resolution, cross-stack implementation, ambiguity handling, and visual-fidelity checking with pixelcraft-visual-qa.
4
4
  license: MIT
5
5
  metadata:
6
6
  version: 0.1.0
@@ -14,7 +14,8 @@ Design handoff is translation under uncertainty, not screenshot copying. Visual
14
14
 
15
15
  ## References
16
16
 
17
- - Read [references/design-translation.md](references/design-translation.md) for the translation contract, evidence hierarchy, component reuse, token mapping, stack-specific translation, missing states, accessibility preservation, and the visual-qa fidelity loop.
17
+ - Read [references/design-translation.md](references/design-translation.md) for the translation contract, evidence hierarchy, component reuse, token mapping, stack-specific translation, missing states, `< 10m` clean-clone setup, license/account ownership handoff, and the visual-qa fidelity loop.
18
+ - Read [references/motion-handoff.md](references/motion-handoff.md) when a design/prototype includes triggers, timing, easing, stagger, interruption, focus, or reduced-motion behavior.
18
19
  - Read [references/fidelity-tolerance.md](references/fidelity-tolerance.md) before declaring acceptance tolerance, freezing fixtures, or interpreting visual diffs.
19
20
 
20
21
  ## Required workflow
@@ -22,28 +23,28 @@ Design handoff is translation under uncertainty, not screenshot copying. Visual
22
23
  1. **Establish the contract.** Record provenance/version/frame or asset, approval state, target stack, breakpoint/mode/locale/input, exact scope, deterministic fixture requirements, and region-aware acceptance tolerance.
23
24
  2. **Inspect implementation first.** Inventory existing components/tokens/routes/state/data ownership. Reuse is the default; divergence from architecture must be justified.
24
25
  3. **Gather structured evidence.** Prefer semantic variables, component metadata, variants, constraints, comments, and production mappings over screenshot inference; use screenshots as visual evidence rather than sole truth.
25
- 4. **Map before generating.** Match elements to existing components, variables, assets, and platform primitives. Resolve missing hover/focus/disabled/loading/empty/error/overflow/localization states or label them assumptions.
26
- 5. **Translate idiomatically.** Map design variables into semantic project tokens through `pixelcraft-tokens`; implement in the actual target stack rather than copying generated markup or absolute geometry.
27
- 6. **Verify fidelity.** Hand off rendered evidence to `pixelcraft-visual-qa` for screenshot/crop/overlay/diff comparison within a declared tolerance; repair meaningful divergence and report residual uncertainty.
26
+ 4. **Map before generating.** Match elements to existing components, variables, assets, and platform primitives. Resolve missing hover/focus/disabled/loading/empty/error/overflow/localization/`IME` states or label them assumptions.
27
+ 5. **Translate idiomatically.** Map design variables into semantic project tokens through `pixelcraft-tokens`; implement in the actual target stack with stack-native isolated state previews (`#Preview`, `@Preview`, Widgetbook, QML/TUI fixtures, or component stories) rather than copying generated markup or absolute geometry.
28
+ 6. **Verify fidelity & commercial handoff readiness.** Hand off rendered evidence to `pixelcraft-visual-qa` for screenshot/crop/overlay/diff comparison within declared tolerance; verify `< 10m` clean-clone setup, commercial asset license manifest, owner-level account/key boundaries, and post-launch regression baselines.
28
29
 
29
30
  ## Non-negotiable rules
30
31
 
31
32
  | Concern | Rule |
32
33
  |---|---|
33
34
  | evidence hierarchy | existing production behavior + semantic design metadata outrank generated code guesses; screenshots outrank nothing by themselves. |
34
- | reuse | do not duplicate an existing component because Figma output emitted literal markup. |
35
+ | reuse | do not duplicate an existing component because a design tool emitted literal markup. |
35
36
  | architecture | preserve framework conventions, state ownership, accessibility semantics, routing, data loading, and localization. |
36
37
  | ambiguity | unknown interaction/state/token meaning is a question or explicit assumption—not silent invention. |
37
38
  | fidelity | visual similarity never excuses broken keyboard behavior, contrast, overflow, empty/error/loading states, or content scaling. |
38
- | privacy/security | do not expose proprietary design files, assets, tokens, or MCP endpoints beyond the intended client/session. |
39
+ | privacy/security & ownership | zero hardcoded secrets; client/owner holds root billing & admin for DNS, store accounts, analytics/error DSNs, and signing keys; commercial licenses verified for fonts/icons/media. |
39
40
  | anti-slop | do not flatten design into static absolute positioning, rasterize text, copy placeholder copy, or mimic visual noise without semantic structure. |
40
41
 
41
42
  ## Pre-submit checklist
42
43
 
43
44
  - [ ] exact frame/component/version and target breakpoint/mode are recorded;
44
- - [ ] existing component/token reuse decisions are documented;
45
- - [ ] semantic variables/modes map to project tokens or deliberate overrides;
46
- - [ ] missing hover/focus/disabled/loading/error/empty/overflow states are resolved or labeled assumptions;
47
- - [ ] implementation uses real data/state behavior rather than static screenshot structure;
48
- - [ ] rendered output was compared at target sizes using the `pixelcraft-visual-qa` skill where available, with normalized fixture/scale and declared region tolerances;
49
- - [ ] intentional deviations and residual uncertainty are reported.
45
+ - [ ] existing component/token reuse decisions and semantic variable/mode mappings are documented;
46
+ - [ ] missing hover/focus/disabled/loading/error/empty/overflow/`IME` states are resolved (with stack-native isolated previews where supported) or labeled assumptions;
47
+ - [ ] reproducible `< 10m` clean-clone setup (lockfile, `.env.example`/config stub, strict active-language checks) verified;
48
+ - [ ] commercial license manifest (fonts, icon packs, stock/3D/audio rights) and owner-level account/key transfer boundaries (DNS, Store accounts, DSNs, signing certs) documented;
49
+ - [ ] rendered output compared at target sizes via `pixelcraft-visual-qa` with frozen post-launch regression baseline and declared region tolerances;
50
+ - [ ] intentional deviations and residual uncertainty are reported with honest evidence labels.
@@ -21,6 +21,19 @@ Record before coding:
21
21
 
22
22
  Do not treat an entire page capture as a precise component contract when only one region was approved.
23
23
 
24
+ ## 1b. Structured design-source intake (Figma MCP, Code Connect, Penpot)
25
+
26
+ Prefer machine-readable design metadata over eyeballing screenshots whenever tools are available:
27
+
28
+ | Source / tool | Operational workflow | What it establishes |
29
+ |---|---|---|
30
+ | **Figma MCP Server** | 1) Call `get_code_connect_map` to locate existing production component bindings; 2) call `get_variable_defs` to fetch bound semantic variables and mode values; 3) call `get_design_context` for Auto Layout hierarchy, constraints, and variants; 4) call `get_screenshot` as the visual verification reference. | Authoritative layout structure, variable tokens, and mapped codebase components (`artifact-observed`) |
31
+ | **Figma Code Connect** | Consume component imports/props directly from `*.figma.tsx`/`.ts`/`.swift`/`.kt` bindings; never re-implement a Code-Connected primitive as raw markup. | Verified component API reuse (`static`) |
32
+ | **Figma Variables REST API** | Pull collection/mode JSON via `GET /v1/files/:file_key/variables/local` into DTCG / Resolver files (`pixelcraft-tokens`) rather than hand-transcribing hex codes. | Canonical mode/token parity across light, dark, brand, and density |
33
+ | **Penpot & Tokens Studio** | Export W3C DTCG JSON / CSS tokens directly from Penpot Design Tokens or Tokens Studio Git sync; inspect flex/grid layout properties rather than absolute x/y coordinates. | Open-format tokens and semantic layout intent |
34
+
35
+ Treat any auto-generated HTML/CSS snippet emitted by Figma MCP or Dev Mode as a **structural reference**, never final production code—refactor into the repository's real components, semantic tokens, routing, and accessibility primitives.
36
+
24
37
  ## 2. Inventory implementation before generation
25
38
 
26
39
  Reuse is the default. Build a mapping table before writing UI:
@@ -52,16 +65,21 @@ Capture collections/modes such as light/dark/brand/density/locale as explicit th
52
65
 
53
66
  Preserve the target platform's architecture and idioms:
54
67
 
55
- | Stack | Translation posture |
68
+ | Stack / Surface | Translation posture |
56
69
  |---|---|
57
- | React/Next/Solid/Qwik | compose existing components/hooks; preserve state ownership, server/client boundaries, routing, accessibility semantics, and CSS architecture |
58
- | Vue/Nuxt | map props/slots/composables and template structure; preserve reactivity ownership rather than copying DOM literalism |
59
- | Svelte/Angular/Lit/server-rendered web | use framework-native component contracts, control flow, form behavior, hydration boundaries, and CSS scoping |
60
- | Flutter | translate layout intent into widget composition/constraints, ThemeData/tokens, MediaQuery/size classes, semantic widgets, and immutable state flow |
61
- | SwiftUI/UIKit | use view composition/modifiers or existing view controllers, Dynamic Type, safe areas, trait/size classes, environment/theme propagation |
62
- | Jetpack Compose/Multiplatform | use composables/slots/Modifier chains, Material or project theme tokens, density/insets, state hoisting, semantics |
63
- | React Native/Expo | preserve native navigation/gesture expectations, StyleSheet/theme tokens, safe areas, platform splitting only when justified |
64
- | TUI/email/document/game/constrained | translate visual meaning into the medium's constraints; never pretend DOM/CSS capabilities exist |
70
+ | React / Next.js / TanStack Start / React Router v7 / Solid / Qwik | compose existing components/hooks/loaders; preserve state ownership, server/client boundaries, routing, accessibility semantics, and CSS architecture |
71
+ | Vue / Nuxt | map props/slots/composables and template structure; preserve reactivity ownership rather than copying DOM literalism |
72
+ | Svelte / Angular / Astro / htmx / Lit / server-rendered web | use framework-native component contracts, islands/partial hydration, server-driven HTML forms/swaps, Shadow DOM encapsulation, and CSS scoping |
73
+ | Flutter | translate layout intent into widget composition/constraints, `ThemeData`/tokens, `MediaQuery`/size classes, semantic widgets, and immutable state flow |
74
+ | SwiftUI / UIKit | use view composition/modifiers or existing view controllers, Dynamic Type, safe areas, trait/size classes, environment/theme propagation |
75
+ | Jetpack Compose / Multiplatform | use composables/slots/Modifier chains, Material or project theme tokens, density/insets, state hoisting, semantics |
76
+ | React Native / Expo / LynxJS | preserve native navigation/gesture expectations, StyleSheet/CSS tokens, safe areas, native accessibility attributes, and platform splitting only when justified |
77
+ | Desktop (Tauri, Electron, Qt, WinUI/WPF, Avalonia, Rust GPUI/Slint) | map layout into native windowing, menus, keyboard shortcuts, system theme/DPI scaling, and platform accessibility APIs (UI Automation / NSAccessibility / AccessKit) |
78
+ | Data apps (marimo, Streamlit, Gradio, Reflex, NiceGUI, Dash, Shiny, Observable) | map visual hierarchy onto framework-native layout containers, reactive state cells, and accessible chart/table outputs without fighting framework rerun lifecycles |
79
+ | Extensions (browser MV3, VS Code webviews, Raycast, Figma/Office) | isolate content-script styles inside Shadow DOM, bind host theme variables (`--vscode-*`), respect CSP, and fit compact popup/sidebar budgets |
80
+ | Spatial / XR (visionOS, Android XR, Horizon OS, WebXR, Unity XRI) | translate 2D frames into comfortable viewing depth, angular target sizes, gaze/hand/controller affordances, and passthrough-safe contrast surfaces |
81
+ | Media (Satori, Takumi, Remotion, Motion Canvas, FFmpeg) | respect explicit renderer subset limits (Flexbox-only Satori, deterministic frame math, bundled fonts, platform safe zones) |
82
+ | TUI / email / document / game / constrained | translate visual meaning into the medium's constraints; never pretend DOM/CSS capabilities exist |
65
83
 
66
84
  Responsive behavior must be inferred from constraints and breakpoint evidence, not guessed from one desktop capture. If missing, implement the smallest defensible adaptation and label it an assumption.
67
85
 
@@ -99,6 +117,18 @@ Declare tolerance before comparing. Use the `pixelcraft-visual-qa` skill for the
99
117
 
100
118
  Antialiasing, font shaping, platform rendering, and dynamic content make exact byte equality inappropriate. Use the region-aware tolerance schema, hard-failure rules, normalization requirements, and deterministic fixture contract in `references/fidelity-tolerance.md`. Record tolerances before inspecting the diff.
101
119
 
120
+ ## 8. Commercial release, license manifest & ownership transfer
121
+
122
+ Studio-grade handoff means another engineer or client owner can build, verify, legally distribute, and operate the product without depending on the author's local machine or personal accounts:
123
+
124
+ | Handoff gate | Mandatory deliverable | Verification / failure boundary |
125
+ |---|---|---|
126
+ | **Reproducible `< 10m` clean-clone setup** | Committed lockfile/toolchain pins, `.env.example` (or native config template), and documented single-path bootstrap + verification commands | Clean checkout boots and passes strict active-language static checks (`rustc`/`clippy`, Swift strict concurrency, Kotlin/Dart analyzer, `mypy`/`pyright`, C# nullable, or `tsc --strict`) in `< 10 minutes` |
127
+ | **Stack-native component / screen catalog** | Isolated state previews where the target stack supports them (SwiftUI `#Preview`, Compose `@Preview`, Flutter Widgetbook, Qt/QML preview fixtures, TUI state snapshots, or Storybook/Ladle) | Exercises default, `loading`, `empty`, `error`, dark-mode, and `+50–100%` localized short-label states without live production backends |
128
+ | **Commercial license manifest** | Inventory of all shipped fonts (web/desktop/app embedding rights), icon packs, photography/illustrations, 3D models, shaders, audio clips, and copyleft/commercial packages | Every asset lists license type, redistribution scope, and seat/traffic bounds (`static`); trial/personal-only assets flagged `P0` blocker until replaced or procured |
129
+ | **Owner-level account & key transfer** | Root admin & billing ownership rests with the client/product owner for DNS/domains, Apple Developer / Google Play / Chrome Web Store / Steamworks accounts, OAuth apps, analytics/error `DSN`s, CMS, and signing certificates | Zero personal/agency root accounts left in production critical paths; zero hardcoded secrets or private keys in client source, bundles, or git history |
130
+ | **Post-launch warranty & regression baseline** | Frozen visual/behavioral QA baselines, documented waiver register, and clear defect-triage boundary distinguishing baseline regressions from new feature scope | Baselines reproducible via `pixelcraft-visual-qa` and native test suites |
131
+
102
132
  ## Acceptance report
103
133
 
104
- Report: source/version/frame/mode/breakpoint; classification of specification versus inspiration; reused versus new components; token substitutions/exceptions; missing-state assumptions; rendered comparison evidence and tolerance; intentional deviations; and remaining `not-checked` surfaces.
134
+ Report: source/version/frame/mode/breakpoint; classification of specification versus inspiration; reused versus new components; token substitutions/exceptions; missing-state assumptions; rendered comparison evidence and tolerance; `< 10m` setup & isolated preview coverage; commercial license manifest & owner-account transfer status; post-launch regression baseline; intentional deviations; and remaining `not-checked` surfaces.
@@ -0,0 +1,54 @@
1
+ # Motion handoff specification
2
+
3
+ When a Figma prototype, Rive state machine, Lottie file, or video reference includes motion, record the interaction contract separately from static appearance before implementing.
4
+
5
+ ## Required fields
6
+
7
+ | Field | Meaning |
8
+ |---|---|
9
+ | trigger | user action, scroll threshold, route change, media event, or automatic event |
10
+ | initial/final state | semantic state and animated properties (`transform`, `opacity`, clip/top-layer) before/after |
11
+ | timing / physics | duration + curve, or spring parameters (`stiffness`/`damping`/`mass` or `duration`/`bounce`), delay, stagger, interruption |
12
+ | ownership | component/route and runtime that owns the animation |
13
+ | input | pointer, keyboard, touch, controller, or automatic |
14
+ | lifecycle | mount, unmount, resize, route transition, background/visibility |
15
+ | reduced motion | immediate/static/opacity-crossfade alternative |
16
+ | focus/semantics | focus placement, `inert` background handling, reading order, live announcement |
17
+ | evidence | prototype link/recording, rendered video/trace, or static inference |
18
+
19
+ ## Concrete motion spec example
20
+
21
+ ```yaml
22
+ interaction: InspectorDrawer.openClose
23
+ trigger: Click/Enter on "Inspect record" button or Esc/backdrop click to dismiss
24
+ states:
25
+ closed: { opacity: 0, transform: "translateX(24px)", visibility: hidden }
26
+ open: { opacity: 1, transform: "translateX(0)", visibility: visible }
27
+ physics:
28
+ spatial: { token: motion.spring.snappy, stiffness: 420, damping: 32, mass: 1 }
29
+ effects: { token: motion.duration.fast, duration: 150ms, easing: ease-out }
30
+ interruption: Retarget immediately mid-flight from current velocity/position; never queue
31
+ input_parity: Pointer click, keyboard Enter/Space to open, Esc to dismiss, swipe-right on touch
32
+ focus_semantics: Focus moves to drawer heading on open; background marked inert; focus returns to trigger on close
33
+ reduced_motion: Opacity-only crossfade (100ms, zero translation); same focus contract
34
+ evidence: Figma prototype node 42:188 (artifact-observed); target verification via Playwright video + reduced-motion trace
35
+ ```
36
+
37
+ ## Source-to-runtime translation map
38
+
39
+ Translate design-tool primitives into idiomatic target runtimes rather than exporting bloated keyframe dumps:
40
+
41
+ | Design source | CSS (`linear()` / View Transitions) | Motion (React) / GSAP | SwiftUI | Jetpack Compose |
42
+ |---|---|---|---|---|
43
+ | **Figma Smart Animate** (shared layer across frames) | `@view-transition` / `document.startViewTransition()` + `view-transition-name` | Motion `layoutId` shared layout / GSAP `Flip.from()` | `.matchedGeometryEffect(id:in:)` | `SharedTransitionLayout` + `sharedElement()` |
44
+ | **Figma Spring** (`stiffness`, `damping`, `mass`) | Pre-sampled CSS `linear(...)` easing token + compositor-only `transform` | Motion `{ type: "spring", stiffness, damping, mass }` / GSAP custom ease | `.spring(duration:bounce:)` or `Spring(mass:stiffness:damping:)` | `spring(stiffness = ..., dampingRatio = ...)` |
45
+ | **Figma Smart Animate** (overlay enter/exit) | `<dialog>`/`[popover]` + `@starting-style` + `transition-behavior: allow-discrete` | Motion `<AnimatePresence>` / GSAP timeline with `clearProps` | `.transition(.opacity.combined(with: .move(...)))` | `AnimatedVisibility(enter = ..., exit = ...)` |
46
+ | **Rive state machine** (interactive vector inputs) | `@rive-app/canvas` / `@rive-app/webgl2` bound to semantic UI state + static SVG fallback | Control Rive state inputs (`SMIInput`) from app state; pause offscreen | `RiveViewModel` bound to `@State` + Reduce Motion freeze | `RiveAnimationView` bound to Compose state + static fallback |
47
+ | **Lottie** (authored vector playback) | Prefer CSS/SVG for simple icons; use `lottie-web` light/dotLottie only for rich authored spots with static final frame under reduced motion | Play/seek segments by state; never auto-loop > 5s without pause control | `LottieView` (`dotLottie`) respecting `accessibilityReduceMotion` | `LottieAnimation` (`lottie-compose`) honoring `ANIMATOR_DURATION_SCALE` |
48
+
49
+ ## Translation rules
50
+
51
+ - Reuse the project's animation runtime and motion tokens (`pixelcraft-tokens`) rather than adding a second animation library for one screen.
52
+ - Do not copy a prototype's exact millisecond durations blindly—test with real content lengths, mid-tier hardware, and fast repeat clicks.
53
+ - Resolve missing keyboard, touch, interruption, and reduced-motion states explicitly; mark assumptions if the prototype omitted them.
54
+ - Verify the implemented transition with `pixelcraft-visual-qa` (`motion-capture.md`) alongside static visual fidelity.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pixelcraft-media
3
- description: Designs and verifies social cards, Open Graph/Twitter images, repository banners, SVG posters, video frames, and motion graphics for external platforms. Use for OG/social preview generation, 1200×630 cards, GitHub 1280×640 social previews, 16:9/9:16/1:1 media, platform safe zones, thumbnail legibility, Satori/@vercel/og/ImageResponse constraints, SVG banners, Remotion or Motion Canvas video, caching/export behavior, and media-specific accessibility/truthfulness review.
3
+ description: Designs and verifies social cards, Open Graph/Twitter images, YouTube thumbnails, repository banners, SVG posters, video frames, and motion graphics for external platforms. Use for OG/social preview generation, 1200×630 cards, GitHub 1280×640 previews, Bluesky/Discord/WhatsApp/Slack/Telegram embeds, 16:9/9:16/1:1 media, platform safe zones, thumbnail legibility, Satori/@vercel/og/ImageResponse, Takumi, Resvg, Sharp, SVG banners, Remotion, Motion Canvas, Revideo, FFmpeg, dotLottie/Rive export, caching, and truthfulness review.
4
4
  license: MIT
5
5
  metadata:
6
6
  version: 0.1.0
@@ -16,37 +16,34 @@ Design the focal subject and minimum readable message for the smallest real crop
16
16
 
17
17
  ## References
18
18
 
19
- - Read [references/social-cards.md](references/social-cards.md) for OG/platform dimensions, safe areas, crop behavior, thumbnail legibility, metadata, caching, and validation.
20
- - Read [references/og-generation.md](references/og-generation.md) for Satori, `@vercel/og`, and Next.js `ImageResponse` constraints, font loading, supported CSS, bundle limits, and implementation patterns.
21
- - Read [references/banners-video.md](references/banners-video.md) for SVG banners/posters, Remotion, Motion Canvas, aspect-ratio variants, captions, motion, and export verification.
19
+ - Read [references/social-cards.md](references/social-cards.md) for OG/platform dimensions (**Zalo**, Slack, iMessage, X, LinkedIn, WhatsApp, Discord, Telegram, Bluesky, YouTube, GitHub), the `1200×630` (`1000×500` safe zone) unfurl matrix, `1080×1920` (`9:16`) Reels/TikTok/Shorts pixel exclusion zones, JPEG/PNG unfurler fallbacks, and caching.
20
+ - Read [references/og-generation.md](references/og-generation.md) for Satori, `@vercel/og`, Next.js `ImageResponse`, Takumi, `@resvg/resvg-js`, Sharp, `@napi-rs/canvas`/`skia-canvas`, and Playwright HTML-to-screenshot OG pipelines.
21
+ - Read [references/banners-video.md](references/banners-video.md) for SVG banners/posters, Remotion v4+, Motion Canvas, Revideo, `0.0s` legible poster frames, FFmpeg (`-14 LUFS` loudness, `yuv420p`, `+faststart`), `dotLottie`/Rive vector exports, and `SRT`/`VTT` + burned-in captions.
22
+
23
+ For browser audio/video players and Web Audio DSP (`hls.js`, Shaka, Vidstack, Media Chrome, Video.js, Tone.js), use the `pixelcraft-web` skill.
22
24
 
23
25
  ## Required workflow
24
26
 
25
- 1. **Define placement.** Identify exact platforms/clients, card type, feed context, static or animated media, localization, accessibility/caption requirements, cache/update cadence, and whether clicks are expected.
26
- 2. **Choose frame and safe area.** Start from the platform table; preserve critical content inside conservative central regions. Never assume one crop fits every client.
27
- 3. **Reduce the message.** Use the minimum truthful content: product/name, one concrete promise or artifact, recognizable visual evidence. Remove anything unreadable at thumbnail scale.
28
- 4. **Implement with renderer constraints.** Static SVG/PNG generation, browser capture, Satori/ImageResponse, Remotion, or Motion Canvas each impose different layout/font/security limits.
29
- 5. **Verify in context.** Inspect at actual pixel size, scaled thumbnail, dark/light embed context, compression, crop variants, screen reader/alt metadata where applicable, and platform preview/debugger when available.
27
+ 1. **Define placement.** Identify exact platforms/unfurlers, card type, feed context, static or animated media, localization, caption requirements, cache/update cadence, and click intent.
28
+ 2. **Lock frame and pixel safe zones.** Keep `1200×630` (`1.91:1`) headlines/logos inside the **center `1000×500` safe box**, and keep `1080×1920` (`9:16`) vertical video copy clear of **`top >= 150–220 px`, `bottom >= 320–420 px`, and `right >= 120–160 px`** host UI rails.
29
+ 3. **Reduce the message.** Use the minimum truthful content (`<= 6–8` words): product/name, one concrete claim or artifact, and recognizable visual evidence legible when downscaled to **`150–300 px` thumbnail width** in both light and dark social feeds.
30
+ 4. **Ship unfurler-safe formats & `0.0s` video posters.** Serve absolute `https://` **PNG or JPEG** (`< 300 KB` for WhatsApp/Zalo, `< 1 MB` general, fast crawl TTFB) because SVG (`og:image`) is rejected universally and WebP still fails in legacy enterprise/chat unfurlers; render a legible **`0.0s` poster frame** and normalize social/web audio to **`-14 LUFS` (`-1.5 dBTP`)**.
31
+ 5. **Verify in context & attach deliverables.** Inspect at `100%`, **`150–300 px` downscaled thumbnail crops** on both light and dark feed backgrounds, **live share-debugger preview captures (`Facebook`, `X`, `LinkedIn`, `Zalo`)**, `ffprobe` metadata (`static`), and an explicit **font/photo/music/footage asset license table**.
30
32
 
31
33
  ## Non-negotiable rules
32
34
 
33
35
  | Concern | Rule |
34
36
  |---|---|
35
- | truthfulness | No invented user counts, screenshots, awards, logos, testimonials, benchmarks, or product capabilities. |
36
- | legibility | Text must survive thumbnail scale and platform compression; if a detail cannot be read, remove or enlarge it. |
37
- | safe area | Essential text/logos never touch edges or platform overlay/crop zones. |
38
- | renderer truth | Do not use unsupported CSS/font/asset behavior because browser JSX looks similar. Validate the actual renderer/version. |
39
- | accessibility | Provide meaningful alt text/link context where platforms support it; video needs captions/subtitles and must not autoplay sound by default. |
40
- | cache awareness | Social platforms cache aggressively. Use validation/cache-busting/deployment sequencing consciously. |
37
+ | truthfulness & asset licensing | No invented user counts, screenshots, awards, logos, testimonials, or benchmarks; deliver a complete **asset license table** (fonts, stock/custom photography, icons, music, SFX, AI provenance) clearing commercial social/paid-ad distribution. |
38
+ | unfurler & `150–300 px` thumbnail legibility | Use `1200×630` (`1.91:1`, center **`1000×500` safe zone**), absolute `https://`, `< 300 KB` (WhatsApp/Zalo) / `< 1 MB` **PNG/JPEG `og:image`**, and verify headline/mark legibility at **`150–300 px` downscaled thumbnail width** in **both light and dark social feeds** + **live share-debugger previews (`Facebook`, `X`, `LinkedIn`, `Zalo`)**. |
39
+ | `9:16` vertical exclusion zones | On `1080×1920` Reels/TikTok/Shorts, keep all titles, faces, and open captions clear of **`top >= 150–220 px`**, **`bottom >= 320–420 px`** (caption/CTA drawer), and **`right >= 120–160 px`** (like/comment/share rail). |
40
+ | `0.0s` poster, captions & `-14 LUFS` | Frame `0` (`0.0s`) must render a legible poster immediately (never `opacity={0}` black frames); pair muted autoplay video with **burned-in safe-zone captions or synced `SRT`/`VTT`**, and normalize web/social audio to **`loudnorm=I=-14:TP=-1.5:LRA=11`** (`-16 LUFS` for podcasts only). |
41
41
  | anti-slop | Avoid purple-blue gradients, floating browser chrome mockups, generic rocket/sparkle art, unreadable code screenshots, and badge clutter unrelated to the subject. |
42
42
 
43
43
  ## Pre-submit checklist
44
44
 
45
- - [ ] target platforms/card types/frame ratios/safe zones are explicit;
46
- - [ ] core message is readable at actual thumbnail size;
47
- - [ ] text contrast is checked against real background/compression;
48
- - [ ] fonts are licensed/embedded/loaded in the format required by the renderer;
49
- - [ ] generated image/video dimensions, file type, and file size match the target;
50
- - [ ] absolute metadata URLs and cache behavior are correct;
51
- - [ ] alt/caption/accessibility path exists where the platform supports it;
52
- - [ ] final evidence states which platform previews were actually inspected versus `not-checked`.
45
+ - [ ] `1200×630` (`1000×500` center safe zone) or `1080×1920` (`top >= 150–220 px`, `bottom >= 320–420 px`, `right >= 120–160 px` clear) geometry verified;
46
+ - [ ] `og:image` uses absolute `https://`, **PNG/JPEG** unfurler-safe format, and `< 300 KB` (WhatsApp/Zalo) / `< 1 MB` byte budget with versioned cache-busting URL;
47
+ - [ ] **`150–300 px` downscaled thumbnail legibility** verified in **both light and dark social feeds**, plus **live share-debugger preview captures (`Facebook`, `X`, `LinkedIn`, `Zalo`)** (or labeled `not-checked` when offline/unhosted) and **asset license table** delivered;
48
+ - [ ] video exports render a legible **`0.0s` poster frame**, `yuv420p` + `+faststart`, **`-14 LUFS` (`-1.5 dBTP`)** audio, and **burned-in / `SRT` / `VTT` captions**;
49
+ - [ ] **Checklist-Until-Passing Stop-Gate (`<HARD-GATE>`):** walk every checklist item above + run `slop-scan.mjs --fail-on p2`, `check-contrast.mjs`, rendered `150–300 px` / `0.0s` frame inspections, 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/media legibility per `Rule #0.3`).