@thanhnguyxn/pixelcraft 0.0.0-stage → 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 (455) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/.antigravity-plugin/plugin.json +32 -0
  3. package/.claude-plugin/marketplace.json +20 -0
  4. package/.claude-plugin/plugin.json +22 -0
  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/LICENSE +21 -0
  13. package/README.md +264 -2
  14. package/SECURITY.md +28 -0
  15. package/assets/README.md +28 -0
  16. package/assets/pixelcraft-logo-128.png +0 -0
  17. package/assets/pixelcraft-logo-256.png +0 -0
  18. package/assets/pixelcraft-logo-512.png +0 -0
  19. package/bin/pixelcraft.mjs +852 -0
  20. package/docs/ARCHITECTURE.md +105 -0
  21. package/docs/DESIGN-RATIONALE.md +191 -0
  22. package/docs/INSTALL.md +221 -0
  23. package/evals/README.md +37 -0
  24. package/evals/fixtures/3d-web-engineering.json +69 -0
  25. package/evals/fixtures/README.md +36 -0
  26. package/evals/fixtures/acceptance-checklist-rule03-gate.json +43 -0
  27. package/evals/fixtures/ai-ui-libraries.json +53 -0
  28. package/evals/fixtures/audio-visual-accessibility.json +69 -0
  29. package/evals/fixtures/auth-and-checkout-ui.json +53 -0
  30. package/evals/fixtures/brandkit-identity-governance.json +48 -0
  31. package/evals/fixtures/build-and-architecture.json +53 -0
  32. package/evals/fixtures/canvas-and-node-editors.json +53 -0
  33. package/evals/fixtures/chat-ai-exfiltration-ime-hitl-gate.json +43 -0
  34. package/evals/fixtures/completion-gate-scan-until-clean.json +44 -0
  35. package/evals/fixtures/component-systems.json +53 -0
  36. package/evals/fixtures/component-testing.json +53 -0
  37. package/evals/fixtures/constrained-voice-and-tv.json +43 -0
  38. package/evals/fixtures/creative-code-rendering.json +69 -0
  39. package/evals/fixtures/creative-reference-evidence.json +67 -0
  40. package/evals/fixtures/data-app-python-marimo.json +49 -0
  41. package/evals/fixtures/desktop-cpp-juce-audio.json +49 -0
  42. package/evals/fixtures/desktop-csharp-avalonia.json +49 -0
  43. package/evals/fixtures/desktop-native-workspace.json +48 -0
  44. package/evals/fixtures/desktop-python-anti-tkinter.json +49 -0
  45. package/evals/fixtures/direction-prototype-complexity.json +29 -0
  46. package/evals/fixtures/document-prepress-pdfx4-tounicode.json +43 -0
  47. package/evals/fixtures/document-rust-typst-invoice.json +49 -0
  48. package/evals/fixtures/document-typst-and-print-css.json +43 -0
  49. package/evals/fixtures/email-mjml-dark-mode.json +49 -0
  50. package/evals/fixtures/email-outlook-and-plaintext.json +43 -0
  51. package/evals/fixtures/enterprise-data-ui.json +53 -0
  52. package/evals/fixtures/extended-tui-toolkits.json +53 -0
  53. package/evals/fixtures/extensions-mv3-and-vscode.json +43 -0
  54. package/evals/fixtures/file-upload-media-ui.json +53 -0
  55. package/evals/fixtures/finish-gate-anti-slop.json +30 -0
  56. package/evals/fixtures/forms-accessibility-negative.json +29 -0
  57. package/evals/fixtures/forms-validation.json +53 -0
  58. package/evals/fixtures/game-go-ebitengine.json +49 -0
  59. package/evals/fixtures/game-godot-gdscript.json +49 -0
  60. package/evals/fixtures/game-ui-hud-and-engines.json +43 -0
  61. package/evals/fixtures/handoff-fidelity-tolerance.json +29 -0
  62. package/evals/fixtures/i18n-engineering.json +53 -0
  63. package/evals/fixtures/local-first-sync.json +53 -0
  64. package/evals/fixtures/lynxjs.json +53 -0
  65. package/evals/fixtures/maizzle-email.json +53 -0
  66. package/evals/fixtures/maps-geospatial.json +53 -0
  67. package/evals/fixtures/media-og-and-video-export.json +43 -0
  68. package/evals/fixtures/media-players.json +53 -0
  69. package/evals/fixtures/mobile-compose-16kb-foldable-store-gate.json +44 -0
  70. package/evals/fixtures/mobile-elixir-liveview-native.json +49 -0
  71. package/evals/fixtures/mobile-flutter-dynamic-type.json +49 -0
  72. package/evals/fixtures/mobile-harmonyos-arkui.json +49 -0
  73. package/evals/fixtures/mobile-jetpack-compose.json +49 -0
  74. package/evals/fixtures/mobile-swiftui-ios.json +49 -0
  75. package/evals/fixtures/motion-engineering.json +69 -0
  76. package/evals/fixtures/pdfjs-and-pptx.json +53 -0
  77. package/evals/fixtures/plan-brownfield-evidence.json +28 -0
  78. package/evals/fixtures/plan-discovery-interview.json +31 -0
  79. package/evals/fixtures/plan-grill-me-brainstorm-gate.json +49 -0
  80. package/evals/fixtures/reactive-data-apps.json +53 -0
  81. package/evals/fixtures/review-evidence-audit.json +43 -0
  82. package/evals/fixtures/rich-text-and-code-editors.json +53 -0
  83. package/evals/fixtures/scrollytelling-resilience.json +70 -0
  84. package/evals/fixtures/spatial-xr-comfort-and-platforms.json +43 -0
  85. package/evals/fixtures/state-architecture.json +53 -0
  86. package/evals/fixtures/styling-ecosystem.json +53 -0
  87. package/evals/fixtures/token-tooling.json +53 -0
  88. package/evals/fixtures/tui-go-bubbletea.json +49 -0
  89. package/evals/fixtures/tui-rust-ratatui-grapheme-paste-teardown.json +44 -0
  90. package/evals/fixtures/tui-rust-ratatui.json +49 -0
  91. package/evals/fixtures/ux-state-matrix-and-i18n.json +43 -0
  92. package/evals/fixtures/visual-qa-task-evidence.json +29 -0
  93. package/evals/fixtures/web-3d-engines.json +53 -0
  94. package/evals/fixtures/web-php-laravel-filament.json +49 -0
  95. package/evals/fixtures/web-ruby-viewcomponent-phlex.json +49 -0
  96. package/evals/fixtures/workflow-checkpoints.json +30 -0
  97. package/evals/pixelcraft-accessibility.md +74 -0
  98. package/evals/pixelcraft-brandkit.md +58 -0
  99. package/evals/pixelcraft-chat-ui.md +55 -0
  100. package/evals/pixelcraft-constrained.md +55 -0
  101. package/evals/pixelcraft-craft.md +76 -0
  102. package/evals/pixelcraft-data-apps.md +55 -0
  103. package/evals/pixelcraft-dataviz.md +59 -0
  104. package/evals/pixelcraft-desktop.md +55 -0
  105. package/evals/pixelcraft-direction.md +77 -0
  106. package/evals/pixelcraft-document.md +55 -0
  107. package/evals/pixelcraft-email.md +55 -0
  108. package/evals/pixelcraft-extensions.md +55 -0
  109. package/evals/pixelcraft-game-ui.md +59 -0
  110. package/evals/pixelcraft-handoff.md +57 -0
  111. package/evals/pixelcraft-media.md +55 -0
  112. package/evals/pixelcraft-mobile.md +59 -0
  113. package/evals/pixelcraft-patterns.md +73 -0
  114. package/evals/pixelcraft-plan.md +127 -0
  115. package/evals/pixelcraft-review.md +63 -0
  116. package/evals/pixelcraft-spatial.md +55 -0
  117. package/evals/pixelcraft-tokens.md +57 -0
  118. package/evals/pixelcraft-tui.md +55 -0
  119. package/evals/pixelcraft-ux.md +59 -0
  120. package/evals/pixelcraft-visual-qa.md +86 -0
  121. package/evals/pixelcraft-web.md +89 -0
  122. package/evals/pixelcraft.md +70 -0
  123. package/gemini-extension.json +6 -0
  124. package/install.ps1 +341 -0
  125. package/install.sh +512 -0
  126. package/package.json +91 -4
  127. package/plugin.json +29 -0
  128. package/scripts/build-adapters.mjs +288 -0
  129. package/scripts/build-release-archives.mjs +61 -0
  130. package/scripts/build-skill-zips.mjs +94 -0
  131. package/scripts/run-evals.mjs +397 -0
  132. package/scripts/sync-docs.mjs +381 -0
  133. package/scripts/test-build-adapters.mjs +61 -0
  134. package/scripts/test-cross-platform-qa.mjs +359 -0
  135. package/scripts/test-distribution.mjs +203 -0
  136. package/scripts/test-export-tokens.mjs +361 -0
  137. package/scripts/test-finish-gate.mjs +271 -0
  138. package/scripts/test-installers.mjs +216 -0
  139. package/scripts/test-release-archives.mjs +42 -0
  140. package/scripts/test-shoot.mjs +87 -0
  141. package/scripts/test-slop-scan.mjs +416 -0
  142. package/scripts/test-style-inventory.mjs +234 -0
  143. package/scripts/test-sync-docs.mjs +140 -0
  144. package/scripts/test-validate-skills.mjs +195 -0
  145. package/scripts/validate-skills.mjs +658 -0
  146. package/skills/pixelcraft/SKILL.md +155 -0
  147. package/skills/pixelcraft/references/design-brief.md +75 -0
  148. package/skills/pixelcraft/references/floor.md +90 -0
  149. package/skills/pixelcraft/references/report-template.md +49 -0
  150. package/skills/pixelcraft/references/stack-detection.md +226 -0
  151. package/skills/pixelcraft/references/surface-acceptance.md +52 -0
  152. package/skills/pixelcraft/references/workflow-checkpoints.md +71 -0
  153. package/skills/pixelcraft-accessibility/SKILL.md +54 -0
  154. package/skills/pixelcraft-accessibility/references/apg-patterns.md +64 -0
  155. package/skills/pixelcraft-accessibility/references/motion-canvas.md +57 -0
  156. package/skills/pixelcraft-accessibility/references/platforms.md +86 -0
  157. package/skills/pixelcraft-accessibility/references/verification.md +64 -0
  158. package/skills/pixelcraft-accessibility/references/wcag22-checks.md +99 -0
  159. package/skills/pixelcraft-brandkit/SKILL.md +127 -0
  160. package/skills/pixelcraft-brandkit/references/asset-pipeline.md +165 -0
  161. package/skills/pixelcraft-brandkit/references/brand-governance.md +82 -0
  162. package/skills/pixelcraft-brandkit/references/layouts.md +88 -0
  163. package/skills/pixelcraft-brandkit/references/logo-concepting.md +83 -0
  164. package/skills/pixelcraft-brandkit/references/logo-methods.md +97 -0
  165. package/skills/pixelcraft-brandkit/references/pixel-art-logos.md +82 -0
  166. package/skills/pixelcraft-brandkit/references/prompt-template.md +87 -0
  167. package/skills/pixelcraft-brandkit/references/qa-checklist.md +93 -0
  168. package/skills/pixelcraft-brandkit/references/visual-modes.md +123 -0
  169. package/skills/pixelcraft-chat-ui/SKILL.md +57 -0
  170. package/skills/pixelcraft-chat-ui/references/agentic-workspace.md +66 -0
  171. package/skills/pixelcraft-chat-ui/references/ai-ui-libraries.md +259 -0
  172. package/skills/pixelcraft-chat-ui/references/conversation-design.md +84 -0
  173. package/skills/pixelcraft-chat-ui/references/mobile-business-platforms.md +77 -0
  174. package/skills/pixelcraft-chat-ui/references/slack-discord.md +80 -0
  175. package/skills/pixelcraft-constrained/SKILL.md +52 -0
  176. package/skills/pixelcraft-constrained/references/specialized-hardware.md +90 -0
  177. package/skills/pixelcraft-constrained/references/tv-wearables.md +134 -0
  178. package/skills/pixelcraft-constrained/references/voice-ui.md +104 -0
  179. package/skills/pixelcraft-craft/SKILL.md +58 -0
  180. package/skills/pixelcraft-craft/references/color.md +125 -0
  181. package/skills/pixelcraft-craft/references/imagery-icons.md +37 -0
  182. package/skills/pixelcraft-craft/references/layout-quality.md +65 -0
  183. package/skills/pixelcraft-craft/references/layout.md +73 -0
  184. package/skills/pixelcraft-craft/references/motion.md +163 -0
  185. package/skills/pixelcraft-craft/references/typography.md +110 -0
  186. package/skills/pixelcraft-data-apps/SKILL.md +86 -0
  187. package/skills/pixelcraft-data-apps/references/ai-and-internal-data-apps.md +147 -0
  188. package/skills/pixelcraft-data-apps/references/dash.md +109 -0
  189. package/skills/pixelcraft-data-apps/references/evidence.md +90 -0
  190. package/skills/pixelcraft-data-apps/references/gradio.md +103 -0
  191. package/skills/pixelcraft-data-apps/references/julia-genie.md +89 -0
  192. package/skills/pixelcraft-data-apps/references/jupyter-widgets.md +91 -0
  193. package/skills/pixelcraft-data-apps/references/nicegui.md +102 -0
  194. package/skills/pixelcraft-data-apps/references/observable-framework.md +105 -0
  195. package/skills/pixelcraft-data-apps/references/panel.md +99 -0
  196. package/skills/pixelcraft-data-apps/references/r-shiny.md +124 -0
  197. package/skills/pixelcraft-data-apps/references/reactive-data-apps.md +186 -0
  198. package/skills/pixelcraft-data-apps/references/reflex.md +116 -0
  199. package/skills/pixelcraft-data-apps/references/shiny.md +110 -0
  200. package/skills/pixelcraft-data-apps/references/streamlit.md +113 -0
  201. package/skills/pixelcraft-dataviz/SKILL.md +60 -0
  202. package/skills/pixelcraft-dataviz/references/chart-choice.md +55 -0
  203. package/skills/pixelcraft-dataviz/references/color-accessibility.md +112 -0
  204. package/skills/pixelcraft-dataviz/references/encoding-tables-dashboards.md +107 -0
  205. package/skills/pixelcraft-dataviz/references/libraries.md +176 -0
  206. package/skills/pixelcraft-dataviz/references/maps-geospatial.md +159 -0
  207. package/skills/pixelcraft-dataviz/references/realtime-graphs-maps-scale.md +92 -0
  208. package/skills/pixelcraft-desktop/SKILL.md +93 -0
  209. package/skills/pixelcraft-desktop/references/appkit.md +92 -0
  210. package/skills/pixelcraft-desktop/references/avalonia.md +95 -0
  211. package/skills/pixelcraft-desktop/references/cpp-gui.md +129 -0
  212. package/skills/pixelcraft-desktop/references/electron.md +96 -0
  213. package/skills/pixelcraft-desktop/references/go-gui.md +83 -0
  214. package/skills/pixelcraft-desktop/references/gtk.md +97 -0
  215. package/skills/pixelcraft-desktop/references/javafx-swing.md +81 -0
  216. package/skills/pixelcraft-desktop/references/qt-pyside-qml.md +88 -0
  217. package/skills/pixelcraft-desktop/references/rust-gui.md +83 -0
  218. package/skills/pixelcraft-desktop/references/tauri.md +110 -0
  219. package/skills/pixelcraft-desktop/references/uno-platform.md +71 -0
  220. package/skills/pixelcraft-desktop/references/winui-wpf.md +98 -0
  221. package/skills/pixelcraft-desktop/references/working-context.md +84 -0
  222. package/skills/pixelcraft-direction/SKILL.md +120 -0
  223. package/skills/pixelcraft-direction/references/composition-library.md +84 -0
  224. package/skills/pixelcraft-direction/references/creative-brainstorming.md +72 -0
  225. package/skills/pixelcraft-direction/references/direction-card.md +64 -0
  226. package/skills/pixelcraft-direction/references/direction-scoring.md +76 -0
  227. package/skills/pixelcraft-direction/references/motion-identity.md +67 -0
  228. package/skills/pixelcraft-direction/references/movements.md +71 -0
  229. package/skills/pixelcraft-direction/references/reference-analysis.md +37 -0
  230. package/skills/pixelcraft-direction/references/repetition-history.md +75 -0
  231. package/skills/pixelcraft-direction/references/slop-fingerprints.md +83 -0
  232. package/skills/pixelcraft-direction/references/wildcards.md +47 -0
  233. package/skills/pixelcraft-document/SKILL.md +58 -0
  234. package/skills/pixelcraft-document/references/archetypes.md +106 -0
  235. package/skills/pixelcraft-document/references/pdf-tools.md +314 -0
  236. package/skills/pixelcraft-document/references/pdfjs-and-pptx.md +114 -0
  237. package/skills/pixelcraft-document/references/print-css.md +187 -0
  238. package/skills/pixelcraft-document/references/slides.md +198 -0
  239. package/skills/pixelcraft-email/SKILL.md +80 -0
  240. package/skills/pixelcraft-email/references/client-quirks.md +113 -0
  241. package/skills/pixelcraft-email/references/html-tables.md +114 -0
  242. package/skills/pixelcraft-email/references/maizzle.md +54 -0
  243. package/skills/pixelcraft-email/references/mjml.md +54 -0
  244. package/skills/pixelcraft-email/references/react-email.md +95 -0
  245. package/skills/pixelcraft-extensions/SKILL.md +56 -0
  246. package/skills/pixelcraft-extensions/references/browser-extensions.md +105 -0
  247. package/skills/pixelcraft-extensions/references/figma-office.md +106 -0
  248. package/skills/pixelcraft-extensions/references/ide-and-saas-plugins.md +125 -0
  249. package/skills/pixelcraft-extensions/references/raycast.md +98 -0
  250. package/skills/pixelcraft-extensions/references/vscode-webviews.md +100 -0
  251. package/skills/pixelcraft-game-ui/SKILL.md +80 -0
  252. package/skills/pixelcraft-game-ui/references/bevy.md +90 -0
  253. package/skills/pixelcraft-game-ui/references/godot.md +130 -0
  254. package/skills/pixelcraft-game-ui/references/hud-principles.md +67 -0
  255. package/skills/pixelcraft-game-ui/references/love2d.md +77 -0
  256. package/skills/pixelcraft-game-ui/references/monogame.md +68 -0
  257. package/skills/pixelcraft-game-ui/references/unity-ugui.md +109 -0
  258. package/skills/pixelcraft-game-ui/references/unity-ui-toolkit.md +107 -0
  259. package/skills/pixelcraft-game-ui/references/unreal-umg.md +80 -0
  260. package/skills/pixelcraft-game-ui/references/web-and-middleware-game-ui.md +122 -0
  261. package/skills/pixelcraft-handoff/SKILL.md +50 -0
  262. package/skills/pixelcraft-handoff/references/design-translation.md +134 -0
  263. package/skills/pixelcraft-handoff/references/fidelity-tolerance.md +78 -0
  264. package/skills/pixelcraft-handoff/references/motion-handoff.md +54 -0
  265. package/skills/pixelcraft-media/SKILL.md +49 -0
  266. package/skills/pixelcraft-media/references/banners-video.md +130 -0
  267. package/skills/pixelcraft-media/references/og-generation.md +154 -0
  268. package/skills/pixelcraft-media/references/social-cards.md +71 -0
  269. package/skills/pixelcraft-mobile/SKILL.md +86 -0
  270. package/skills/pixelcraft-mobile/references/dotnet-maui.md +91 -0
  271. package/skills/pixelcraft-mobile/references/flet.md +80 -0
  272. package/skills/pixelcraft-mobile/references/flutter.md +113 -0
  273. package/skills/pixelcraft-mobile/references/harmonyos-and-emerging-mobile.md +121 -0
  274. package/skills/pixelcraft-mobile/references/ionic-capacitor.md +87 -0
  275. package/skills/pixelcraft-mobile/references/jetpack-compose.md +129 -0
  276. package/skills/pixelcraft-mobile/references/kivy.md +82 -0
  277. package/skills/pixelcraft-mobile/references/kotlin-multiplatform.md +86 -0
  278. package/skills/pixelcraft-mobile/references/lynxjs.md +110 -0
  279. package/skills/pixelcraft-mobile/references/nativescript-and-skip.md +91 -0
  280. package/skills/pixelcraft-mobile/references/react-native-expo.md +106 -0
  281. package/skills/pixelcraft-mobile/references/swiftui.md +200 -0
  282. package/skills/pixelcraft-mobile/references/tactile-interactions.md +55 -0
  283. package/skills/pixelcraft-mobile/references/task-state-composition.md +85 -0
  284. package/skills/pixelcraft-mobile/references/uikit.md +92 -0
  285. package/skills/pixelcraft-patterns/SKILL.md +75 -0
  286. package/skills/pixelcraft-patterns/references/accessibility-resilience.md +29 -0
  287. package/skills/pixelcraft-patterns/references/ai-and-offline-patterns.md +54 -0
  288. package/skills/pixelcraft-patterns/references/auth-onboarding.md +44 -0
  289. package/skills/pixelcraft-patterns/references/billing-paywalls.md +40 -0
  290. package/skills/pixelcraft-patterns/references/command-workspace.md +56 -0
  291. package/skills/pixelcraft-patterns/references/commerce.md +47 -0
  292. package/skills/pixelcraft-patterns/references/communication.md +45 -0
  293. package/skills/pixelcraft-patterns/references/creative-tools.md +42 -0
  294. package/skills/pixelcraft-patterns/references/creative-web-composition.md +38 -0
  295. package/skills/pixelcraft-patterns/references/dashboard-admin.md +35 -0
  296. package/skills/pixelcraft-patterns/references/history-diff-undo.md +50 -0
  297. package/skills/pixelcraft-patterns/references/marketing.md +44 -0
  298. package/skills/pixelcraft-patterns/references/multi-tenant-rbac.md +47 -0
  299. package/skills/pixelcraft-patterns/references/narrative-systems.md +42 -0
  300. package/skills/pixelcraft-patterns/references/notifications-activity.md +57 -0
  301. package/skills/pixelcraft-patterns/references/pattern-selection.md +80 -0
  302. package/skills/pixelcraft-patterns/references/scheduling-kanban.md +47 -0
  303. package/skills/pixelcraft-patterns/references/scroll-implementation.md +37 -0
  304. package/skills/pixelcraft-patterns/references/search-filtering.md +42 -0
  305. package/skills/pixelcraft-patterns/references/settings.md +51 -0
  306. package/skills/pixelcraft-patterns/references/tables-crud.md +43 -0
  307. package/skills/pixelcraft-plan/SKILL.md +103 -0
  308. package/skills/pixelcraft-plan/references/design-input.md +69 -0
  309. package/skills/pixelcraft-plan/references/discovery-interview.md +110 -0
  310. package/skills/pixelcraft-plan/references/grill-me-protocol.md +63 -0
  311. package/skills/pixelcraft-plan/references/plan-template.md +134 -0
  312. package/skills/pixelcraft-plan/references/repo-discovery.md +49 -0
  313. package/skills/pixelcraft-plan/references/stack-freshness.md +67 -0
  314. package/skills/pixelcraft-plan/references/stack-selection.md +98 -0
  315. package/skills/pixelcraft-review/SKILL.md +86 -0
  316. package/skills/pixelcraft-review/references/audit-report.md +69 -0
  317. package/skills/pixelcraft-review/references/critique-protocol.md +89 -0
  318. package/skills/pixelcraft-review/references/heuristics.md +63 -0
  319. package/skills/pixelcraft-review/references/personas.md +53 -0
  320. package/skills/pixelcraft-review/references/polish.md +78 -0
  321. package/skills/pixelcraft-review/scripts/check-acceptance.mjs +619 -0
  322. package/skills/pixelcraft-review/scripts/fixtures/brand-critique-waivers.json +14 -0
  323. package/skills/pixelcraft-review/scripts/fixtures/brand-critique.css +18 -0
  324. package/skills/pixelcraft-review/scripts/fixtures/clean.html +43 -0
  325. package/skills/pixelcraft-review/scripts/fixtures/focus-after-block.css +4 -0
  326. package/skills/pixelcraft-review/scripts/fixtures/focus-at-rules.css +17 -0
  327. package/skills/pixelcraft-review/scripts/fixtures/focus-comments.css +10 -0
  328. package/skills/pixelcraft-review/scripts/fixtures/focus-html-quote-leak.html +12 -0
  329. package/skills/pixelcraft-review/scripts/fixtures/focus-invalid-replacements.css +27 -0
  330. package/skills/pixelcraft-review/scripts/fixtures/focus-longhand-removal.css +34 -0
  331. package/skills/pixelcraft-review/scripts/fixtures/focus-nested-rules.css +19 -0
  332. package/skills/pixelcraft-review/scripts/fixtures/focus-not-visible-skip.css +8 -0
  333. package/skills/pixelcraft-review/scripts/fixtures/focus-outline-shorthands.css +11 -0
  334. package/skills/pixelcraft-review/scripts/fixtures/focus-unknown-and-border.css +15 -0
  335. package/skills/pixelcraft-review/scripts/fixtures/focus-unknown-last-wins.css +19 -0
  336. package/skills/pixelcraft-review/scripts/fixtures/focus-valid-replacements-extended.css +29 -0
  337. package/skills/pixelcraft-review/scripts/fixtures/focus-visible-no-replacement.css +3 -0
  338. package/skills/pixelcraft-review/scripts/fixtures/focus-visible-valid-replacements.css +9 -0
  339. package/skills/pixelcraft-review/scripts/fixtures/slop.html +28 -0
  340. package/skills/pixelcraft-review/scripts/slop-scan.mjs +1233 -0
  341. package/skills/pixelcraft-spatial/SKILL.md +51 -0
  342. package/skills/pixelcraft-spatial/references/comfort-accessibility.md +39 -0
  343. package/skills/pixelcraft-spatial/references/platforms.md +147 -0
  344. package/skills/pixelcraft-tokens/SKILL.md +60 -0
  345. package/skills/pixelcraft-tokens/assets/tokens.example.json +71 -0
  346. package/skills/pixelcraft-tokens/assets/tokens.modes.example.json +47 -0
  347. package/skills/pixelcraft-tokens/references/adoption.md +55 -0
  348. package/skills/pixelcraft-tokens/references/format.md +84 -0
  349. package/skills/pixelcraft-tokens/references/governance.md +80 -0
  350. package/skills/pixelcraft-tokens/references/state-tokens.md +62 -0
  351. package/skills/pixelcraft-tokens/references/theme-presets.md +122 -0
  352. package/skills/pixelcraft-tokens/references/token-tooling.md +119 -0
  353. package/skills/pixelcraft-tokens/scripts/export-tokens.mjs +847 -0
  354. package/skills/pixelcraft-tui/SKILL.md +76 -0
  355. package/skills/pixelcraft-tui/references/bubbletea-lipgloss.md +79 -0
  356. package/skills/pixelcraft-tui/references/extended-tui-toolkits.md +127 -0
  357. package/skills/pixelcraft-tui/references/ink.md +109 -0
  358. package/skills/pixelcraft-tui/references/ratatui.md +102 -0
  359. package/skills/pixelcraft-tui/references/rich.md +82 -0
  360. package/skills/pixelcraft-tui/references/terminal-protocols.md +80 -0
  361. package/skills/pixelcraft-tui/references/textual.md +108 -0
  362. package/skills/pixelcraft-ux/SKILL.md +56 -0
  363. package/skills/pixelcraft-ux/references/cognitive-walkthrough.md +70 -0
  364. package/skills/pixelcraft-ux/references/feedback-performance.md +50 -0
  365. package/skills/pixelcraft-ux/references/flows-ia.md +44 -0
  366. package/skills/pixelcraft-ux/references/forms.md +151 -0
  367. package/skills/pixelcraft-ux/references/i18n.md +221 -0
  368. package/skills/pixelcraft-ux/references/laws.md +39 -0
  369. package/skills/pixelcraft-ux/references/locale-test-matrix.md +60 -0
  370. package/skills/pixelcraft-ux/references/state-matrix.md +53 -0
  371. package/skills/pixelcraft-ux/references/usability-testing.md +84 -0
  372. package/skills/pixelcraft-ux/references/ux-writing.md +44 -0
  373. package/skills/pixelcraft-visual-qa/SKILL.md +96 -0
  374. package/skills/pixelcraft-visual-qa/references/baseline-governance.md +70 -0
  375. package/skills/pixelcraft-visual-qa/references/capture-desktop-game.md +59 -0
  376. package/skills/pixelcraft-visual-qa/references/capture-document.md +70 -0
  377. package/skills/pixelcraft-visual-qa/references/capture-email.md +38 -0
  378. package/skills/pixelcraft-visual-qa/references/capture-mobile.md +50 -0
  379. package/skills/pixelcraft-visual-qa/references/capture-terminal.md +35 -0
  380. package/skills/pixelcraft-visual-qa/references/critique-rubric.md +71 -0
  381. package/skills/pixelcraft-visual-qa/references/finish-gate.md +35 -0
  382. package/skills/pixelcraft-visual-qa/references/measured-craft.md +30 -0
  383. package/skills/pixelcraft-visual-qa/references/motion-capture.md +63 -0
  384. package/skills/pixelcraft-visual-qa/references/performance-budgets.md +78 -0
  385. package/skills/pixelcraft-visual-qa/references/realtime-graphics.md +55 -0
  386. package/skills/pixelcraft-visual-qa/references/task-verification.md +81 -0
  387. package/skills/pixelcraft-visual-qa/scripts/check-contrast.mjs +442 -0
  388. package/skills/pixelcraft-visual-qa/scripts/check-email.mjs +397 -0
  389. package/skills/pixelcraft-visual-qa/scripts/check-pdf.mjs +189 -0
  390. package/skills/pixelcraft-visual-qa/scripts/check-tui.mjs +321 -0
  391. package/skills/pixelcraft-visual-qa/scripts/finish-gate.mjs +174 -0
  392. package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-aria-modal.html +19 -0
  393. package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-audit.html +34 -0
  394. package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-modal.html +17 -0
  395. package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory-deferred.js +1 -0
  396. package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory-edge.html +52 -0
  397. package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory.html +80 -0
  398. package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory.js +8 -0
  399. package/skills/pixelcraft-visual-qa/scripts/shoot.mjs +668 -0
  400. package/skills/pixelcraft-visual-qa/scripts/style-inventory.mjs +1226 -0
  401. package/skills/pixelcraft-web/SKILL.md +132 -0
  402. package/skills/pixelcraft-web/references/accessibility-performance.md +42 -0
  403. package/skills/pixelcraft-web/references/adaptive-layout.md +69 -0
  404. package/skills/pixelcraft-web/references/angular.md +108 -0
  405. package/skills/pixelcraft-web/references/assets-pipeline.md +67 -0
  406. package/skills/pixelcraft-web/references/astro.md +113 -0
  407. package/skills/pixelcraft-web/references/audio-reactive.md +61 -0
  408. package/skills/pixelcraft-web/references/auth-and-checkout-ui.md +115 -0
  409. package/skills/pixelcraft-web/references/build-and-architecture.md +215 -0
  410. package/skills/pixelcraft-web/references/canvas-and-node-editors.md +157 -0
  411. package/skills/pixelcraft-web/references/clojurescript.md +88 -0
  412. package/skills/pixelcraft-web/references/component-systems.md +102 -0
  413. package/skills/pixelcraft-web/references/component-testing.md +170 -0
  414. package/skills/pixelcraft-web/references/creative-effects.md +59 -0
  415. package/skills/pixelcraft-web/references/creative-runtime.md +34 -0
  416. package/skills/pixelcraft-web/references/elm.md +53 -0
  417. package/skills/pixelcraft-web/references/enterprise-data-ui.md +138 -0
  418. package/skills/pixelcraft-web/references/file-upload-media-ui.md +82 -0
  419. package/skills/pixelcraft-web/references/forms-validation.md +123 -0
  420. package/skills/pixelcraft-web/references/fsharp-fable.md +54 -0
  421. package/skills/pixelcraft-web/references/gsap.md +102 -0
  422. package/skills/pixelcraft-web/references/html-css.md +220 -0
  423. package/skills/pixelcraft-web/references/htmx-alpine.md +103 -0
  424. package/skills/pixelcraft-web/references/i18n-engineering.md +106 -0
  425. package/skills/pixelcraft-web/references/interaction-and-search-primitives.md +196 -0
  426. package/skills/pixelcraft-web/references/java-web.md +61 -0
  427. package/skills/pixelcraft-web/references/kotlin-web.md +57 -0
  428. package/skills/pixelcraft-web/references/leptos-yew.md +97 -0
  429. package/skills/pixelcraft-web/references/lit-web-components.md +63 -0
  430. package/skills/pixelcraft-web/references/local-first-sync.md +105 -0
  431. package/skills/pixelcraft-web/references/media-players.md +104 -0
  432. package/skills/pixelcraft-web/references/motion-react.md +96 -0
  433. package/skills/pixelcraft-web/references/motion-recipes.md +82 -0
  434. package/skills/pixelcraft-web/references/preact-fresh-hono.md +111 -0
  435. package/skills/pixelcraft-web/references/pwa.md +230 -0
  436. package/skills/pixelcraft-web/references/qwik.md +94 -0
  437. package/skills/pixelcraft-web/references/r3f-integration.md +69 -0
  438. package/skills/pixelcraft-web/references/react-next.md +168 -0
  439. package/skills/pixelcraft-web/references/rendering-choice.md +63 -0
  440. package/skills/pixelcraft-web/references/rendering-performance.md +80 -0
  441. package/skills/pixelcraft-web/references/rich-text-and-code-editors.md +220 -0
  442. package/skills/pixelcraft-web/references/rive-lottie.md +73 -0
  443. package/skills/pixelcraft-web/references/scala-laminar.md +53 -0
  444. package/skills/pixelcraft-web/references/scene-architecture.md +132 -0
  445. package/skills/pixelcraft-web/references/server-rendered.md +114 -0
  446. package/skills/pixelcraft-web/references/shader-workflow.md +77 -0
  447. package/skills/pixelcraft-web/references/smooth-scroll.md +58 -0
  448. package/skills/pixelcraft-web/references/solid.md +111 -0
  449. package/skills/pixelcraft-web/references/state-architecture.md +107 -0
  450. package/skills/pixelcraft-web/references/styling-ecosystem.md +273 -0
  451. package/skills/pixelcraft-web/references/svelte.md +111 -0
  452. package/skills/pixelcraft-web/references/tailwind.md +99 -0
  453. package/skills/pixelcraft-web/references/video-media.md +69 -0
  454. package/skills/pixelcraft-web/references/vue-nuxt.md +86 -0
  455. package/skills/pixelcraft-web/references/web-3d-engines.md +97 -0
@@ -0,0 +1,80 @@
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
+ ```
30
+
31
+ ### UMG ViewModel (`MVVM`) plugin
32
+
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.
35
+
36
+ ### Enhanced Input UI routing
37
+
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`.
39
+
40
+ ## Slate (`SCompoundWidget` / `FSlateStyleSet`) vs UMG boundary
41
+
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 |
46
+
47
+ ## Batching and performance (`InvalidationBox`, `RetainerBox`)
48
+
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`.
51
+
52
+ ## Layout, typography, accessibility, and states
53
+
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.
57
+
58
+ ## Do/don't pairs
59
+
60
+ | Do | Don't |
61
+ |---|---|
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 |
67
+
68
+ ## Known traps
69
+
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.
71
+
72
+ ## Verification commands
73
+
74
+ Run the project's Unreal Automation / UAT build command against the repo `.uproject` without suppressing failures:
75
+
76
+ ```sh
77
+ RunUAT BuildCookRun -project="<PathToProject>.uproject" -build -unattended
78
+ ```
79
+
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`).
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: pixelcraft-handoff
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
+ license: MIT
5
+ metadata:
6
+ version: 0.1.0
7
+ ---
8
+
9
+ # Pixelcraft handoff
10
+
11
+ Design handoff is translation under uncertainty, not screenshot copying. Visual source material is evidence about intent; it is not automatically correct production architecture. Preserve existing components, tokens, state behavior, accessibility, localization, data contracts, and framework idioms before visual novelty.
12
+
13
+ **Approved-design rule:** when the user asks to implement an approved design, do not run divergence or change visual direction. Handoff preserves design intent. Divergence applies only to undecided parts such as missing states, missing breakpoints, unspecified behavior, token gaps, accessibility gaps, or regions explicitly labeled inspiration.
14
+
15
+ ## References
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, `< 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.
19
+ - Read [references/fidelity-tolerance.md](references/fidelity-tolerance.md) before declaring acceptance tolerance, freezing fixtures, or interpreting visual diffs.
20
+
21
+ ## Required workflow
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.
24
+ 2. **Inspect implementation first.** Inventory existing components/tokens/routes/state/data ownership. Reuse is the default; divergence from architecture must be justified.
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.
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.
29
+
30
+ ## Non-negotiable rules
31
+
32
+ | Concern | Rule |
33
+ |---|---|
34
+ | evidence hierarchy | existing production behavior + semantic design metadata outrank generated code guesses; screenshots outrank nothing by themselves. |
35
+ | reuse | do not duplicate an existing component because a design tool emitted literal markup. |
36
+ | architecture | preserve framework conventions, state ownership, accessibility semantics, routing, data loading, and localization. |
37
+ | ambiguity | unknown interaction/state/token meaning is a question or explicit assumption—not silent invention. |
38
+ | fidelity | visual similarity never excuses broken keyboard behavior, contrast, overflow, empty/error/loading states, or content scaling. |
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. |
40
+ | anti-slop | do not flatten design into static absolute positioning, rasterize text, copy placeholder copy, or mimic visual noise without semantic structure. |
41
+
42
+ ## Pre-submit checklist
43
+
44
+ - [ ] exact frame/component/version and target breakpoint/mode are recorded;
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.
@@ -0,0 +1,134 @@
1
+ # Design translation
2
+
3
+ Use this reference when implementing an approved or supplied design: Figma frame/component, exported mockup, screenshot, prototype, existing UI rebuild, or design-system artifact. The task is faithful translation into the project's real architecture—not visual direction generation.
4
+
5
+ ## Authority rule
6
+
7
+ When the user asks to implement an approved design, do **not** run divergence or redesign the visual direction. Preserve layout intent, hierarchy, spacing rhythm, color/type decisions, imagery, and interaction meaning. Divergence applies only to parts the design leaves undecided: missing states, missing breakpoints, unspecified behavior, implementation tokens, accessibility gaps, or places where the source is explicitly marked inspiration rather than specification.
8
+
9
+ Approved visual intent is preserved, but the accessibility floor, platform/legal requirements, existing component/token constraints, data ownership, security/privacy requirements, and architecture are never overridden silently. Resolve tension through existing components and platform idioms first. If faithful implementation genuinely requires an exception, record the conflict and obtain an explicit user override. Report intentional deviations; never silently “improve” the design.
10
+
11
+ ## 1. Establish the translation contract
12
+
13
+ Record before coding:
14
+
15
+ - exact source provenance: file/link/version/frame/component/node or screenshot asset, date, owner, and approval state;
16
+ - target platform/framework/runtime and existing route/component ownership;
17
+ - breakpoint, orientation, density, theme/mode, locale/text direction, input modality;
18
+ - whether each source region is specification, inspiration, or out of scope;
19
+ - required states/data fixtures and acceptance tolerance;
20
+ - whether visual-qa rendering is available in the environment.
21
+
22
+ Do not treat an entire page capture as a precise component contract when only one region was approved.
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
+
37
+ ## 2. Inventory implementation before generation
38
+
39
+ Reuse is the default. Build a mapping table before writing UI:
40
+
41
+ | Design element | Existing equivalent | Translation decision |
42
+ |---|---|---|
43
+ | exact semantic component | production component exists | reuse; map props/variants/slots |
44
+ | near match | existing component missing state/variant | extend the existing API without breaking consumers |
45
+ | repeated structure | no component but recurrence is real | propose a primitive consistent with project taxonomy |
46
+ | one-off visual artifact | no reusable meaning | implement locally and contain the exception |
47
+ | raster/text/effect | platform support uncertain | choose semantic text/SVG/canvas/image deliberately |
48
+
49
+ Use layer metadata, Auto Layout/constraints, design variables, component variants, and screenshots as evidence. Generated code from a design tool is a hint, not architecture. Never flatten a screen into absolute positioning, rasterize text, duplicate an existing component, or copy placeholder content.
50
+
51
+ ## 3. Map design variables to project tokens
52
+
53
+ Translate variables/styles through the `pixelcraft-tokens` skill rather than copying leaf values:
54
+
55
+ 1. exact semantic token exists → use it;
56
+ 2. primitive exists but semantic intent differs → choose or add the correct semantic role;
57
+ 3. alias/mode exists → preserve alias and mode behavior instead of flattening values;
58
+ 4. duplicate/near duplicate caused by design drift → flag and reconcile;
59
+ 5. optical exception is repeatable → document/encode intentionally;
60
+ 6. genuinely new scale step → extend the scale with provenance.
61
+
62
+ Capture collections/modes such as light/dark/brand/density/locale as explicit theme axes. Validate contrast and component states in every required mode. Do not create hundreds of one-off tokens for noise.
63
+
64
+ ## 4. Translate to the actual stack
65
+
66
+ Preserve the target platform's architecture and idioms:
67
+
68
+ | Stack / Surface | Translation posture |
69
+ |---|---|
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 |
83
+
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.
85
+
86
+ ## 5. Resolve missing states before delivery
87
+
88
+ The design is incomplete until these are resolved or explicitly assigned as assumptions:
89
+
90
+ - hover/focus/active/disabled/selected/pressed/visited;
91
+ - loading/skeleton/optimistic/error/empty/offline/permission;
92
+ - zero/one/many/long/overflowing data and missing media/fonts;
93
+ - validation, destructive confirmation, undo/cancel/escape;
94
+ - narrow/wide/resize/orientation/split-screen behavior;
95
+ - keyboard/screen reader/touch/controller/pointer input;
96
+ - localization expansion, bidi text, numerals, plural/date/currency boundaries;
97
+ - dark/light/high-contrast/reduced-motion/forced-colors modes.
98
+
99
+ Preserve architecture: state ownership, data loading, caching, mutation, routing, focus management, error recovery, and security/privacy constraints take precedence over screenshot literalism.
100
+
101
+ ## 6. Accessibility and content fidelity
102
+
103
+ Visual fidelity never excuses broken semantics. Preserve accessible names, roles, labels, keyboard order, focus visibility, contrast, target size, text scaling/reflow, reduced motion, screen-reader announcements, input types/autocomplete, and platform-specific accessibility idioms. Copy must come from approved content or existing product truth; design placeholder text is not production copy unless the owner explicitly says so.
104
+
105
+ ## 7. Fidelity loop with `pixelcraft-visual-qa`
106
+
107
+ Declare tolerance before comparing. Use the `pixelcraft-visual-qa` skill for the render → screenshot → crop/overlay/diff → repair loop:
108
+
109
+ 1. capture/reference the approved design at the same breakpoint, scale, mode, locale, and data state;
110
+ 2. render implementation with real fonts/assets/state;
111
+ 3. align viewport/device scale and capture region exactly;
112
+ 4. compare full frame plus meaningful crops;
113
+ 5. inspect overlay/difference heatmap and structural evidence—never rely on one global pixel score;
114
+ 6. classify divergence as layout geometry, typography/rasterization, color/theme, asset rendering, dynamic content, state mismatch, accessibility regression, or intentional deviation;
115
+ 7. repair semantic/accessibility defects before pixel geometry;
116
+ 8. rerun only changed comparisons.
117
+
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.
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
+
132
+ ## Acceptance report
133
+
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,78 @@
1
+ # Fidelity tolerance schema
2
+
3
+ Use this reference before comparing an implementation with an approved design. Declare tolerances before looking at the diff; otherwise every difference becomes either noise or a taste argument.
4
+
5
+ ## Compare only normalized inputs
6
+
7
+ Before measurement:
8
+
9
+ - same source version/frame/component and approval state;
10
+ - same breakpoint/orientation/density/theme/mode/locale/direction;
11
+ - same viewport dimensions and device scale factor;
12
+ - same data fixture and time-dependent state;
13
+ - same fonts/assets or explicitly documented substitutions;
14
+ - same scroll position and capture crop;
15
+ - animations frozen at a deterministic state or replaced by reduced/static equivalents.
16
+
17
+ If these cannot be matched, label the comparison partial rather than inflating tolerance until nothing can fail.
18
+
19
+ ## Region classes
20
+
21
+ Assign each visual region a class before diffing:
22
+
23
+ | Class | Examples | Comparison posture |
24
+ |---|---|---|
25
+ | critical geometry | navigation shell, form controls, primary content boundaries, touch targets, focus rings | strict offset/size/clipping checks |
26
+ | text and typography | headings, body copy, labels, numerals | font/shaping/measurement comparison; exact pixels not required across rasterizers |
27
+ | color/theme | semantic surfaces, accents, state colors, focus/selection | compare sampled role values and contrast behavior, not isolated pixels |
28
+ | asset/media | icons, illustrations, product imagery | compare placement/crop/aspect/provenance; dynamic compression noise may be tolerated |
29
+ | dynamic content | timestamps, avatars, random ordering, ads, live data, localization expansions | freeze fixture or mark exempt with reason |
30
+ | decorative noise | grain, shadows, shader texture, motion blur | compare presence/intent; broad tolerance unless it harms legibility |
31
+ | platform chrome | scrollbars, status bars, native picker chrome, window controls | normalize/exclude unless product controls it |
32
+
33
+ ## Tolerance record
34
+
35
+ ```markdown
36
+ | Region | Class | Max x/y offset | Max size delta | Color/alpha tolerance | Clipping/overlap | Contrast/state rule | Exemptions |
37
+ |---|---|---:|---:|---:|---|---|---|
38
+ | header nav | critical geometry | 1px | 1px | semantic exact or documented rounding | none allowed | focus visible; no overlap | none |
39
+ | hero illustration | asset/media | 2px | 2% | perceptual/asset compression | crop must match intent | no text contrast loss | compression noise |
40
+ ```
41
+
42
+ Use measurements appropriate to the surface: CSS px, dp/pt/sp, terminal cells, print units, texture coordinates, or physical-window pixels. State the unit. Do not copy web pixel tolerances into native/print/game contexts.
43
+
44
+ ## Hard failures independent of tolerance
45
+
46
+ Tolerance never excuses:
47
+
48
+ - clipped/truncated essential text or control labels;
49
+ - invisible/obscured focus or missing keyboard/controller path;
50
+ - contrast/state failure, color-only meaning, or wrong semantic exposure;
51
+ - control overlap, accidental horizontal scrolling, unsafe-area/system-chrome collision;
52
+ - missing required state, mode, locale, breakpoint, or input modality;
53
+ - wrong content/provenance, invented assets, or placeholder copy presented as final;
54
+ - broken layout constraints hidden by scaling/cropping the capture;
55
+ - intentional deviation that was never recorded/approved.
56
+
57
+ ## Diff interpretation procedure
58
+
59
+ 1. normalize scale/viewport/fixture;
60
+ 2. compare full-frame geometry first, then high-value crops;
61
+ 3. inspect alignment edges and clipping boundaries before aggregate color difference;
62
+ 4. classify every meaningful difference by cause: layout geometry, typography/rasterization, color/theme, asset rendering, dynamic content, state mismatch, accessibility regression, platform idiomatic adaptation, or intentional deviation;
63
+ 5. repair semantic/accessibility/state defects before pixel geometry;
64
+ 6. rerun only affected comparisons and preserve artifacts/version metadata.
65
+
66
+ A low pixel difference is not fidelity if behavior or meaning changed. A high pixel difference is not automatically failure if fonts rasterize differently or a deliberate platform adaptation was approved.
67
+
68
+ ## Deterministic fixture requirements
69
+
70
+ For repeatable handoff verification, maintain fixture descriptions in the project where feasible:
71
+
72
+ ```markdown
73
+ | Fixture | Data/time/locale/theme/viewport/network/input | Expected end state |
74
+ |---|---|---|
75
+ | checkout-error | expired card fixture; frozen timestamp; en-LTR; light; 390×844; offline then online; keyboard/touch | preserved inputs, field error, summary focus, retry enabled |
76
+ ```
77
+
78
+ Freeze clocks, random seeds, ordering, feature flags, permissions, network responses, and user state where the stack permits. Use synthetic/redacted data. A fixture that cannot be reproduced by another agent is documentation, not a deterministic verification fixture.
@@ -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.
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: pixelcraft-media
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
+ license: MIT
5
+ metadata:
6
+ version: 0.1.0
7
+ ---
8
+
9
+ # Pixelcraft media
10
+
11
+ Media assets are constrained interfaces viewed outside your product. Platform cropping, compression, overlay UI, dark/light contexts, feed scale, caching, and screen density are part of the design. A beautiful full-size export that is illegible as a thumbnail is failed media.
12
+
13
+ ## Surface craft
14
+
15
+ Design the focal subject and minimum readable message for the smallest real crop, then place secondary text inside a measured safe zone. Inspect platform recompression, dark/light surroundings and the static first frame/poster. Never promise thumbnail legibility from the full-size canvas.
16
+
17
+ ## References
18
+
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.
24
+
25
+ ## Required workflow
26
+
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**.
32
+
33
+ ## Non-negotiable rules
34
+
35
+ | Concern | Rule |
36
+ |---|---|
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
+ | 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
+
43
+ ## Pre-submit checklist
44
+
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`).