@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,106 @@
1
+ # Figma plugins/widgets and Office add-ins
2
+
3
+ ## Figma plugins
4
+
5
+ Figma plugins split execution between a **main sandbox thread** (accessing the Figma document API, no browser DOM) and an optional **UI iframe** (`null` origin, no cookies or `localStorage`).
6
+
7
+ - **Theme adaptation**: Pass `{ themeColors: true }` to `figma.showUI(...)` and style with Figma's native CSS custom properties (`--figma-color-bg`, `--figma-color-bg-secondary`, `--figma-color-text`, `--figma-color-border`, `--figma-color-bg-brand`, `--figma-color-text-onbrand`) so the plugin adapts automatically to Figma light and dark themes.
8
+ - **Mandatory dynamic page access**: Declare `"documentAccess": "dynamic-page"` in `manifest.json` and use **async** page/node APIs (`await figma.getNodeByIdAsync(id)`, `await figma.loadAllPagesAsync()`, `await figma.currentPage.loadAsync()`) instead of deprecated sync APIs.
9
+ - **Network & storage boundaries**: Declare exact hosts in `manifest.json` `networkAccess.allowedDomains` (use `["none"]` if offline). Store persistent settings in `figma.clientStorage.getAsync/setAsync` rather than browser `localStorage` (which throws in the `null`-origin iframe). Validate every `postMessage` payload shape in both directions.
10
+ - **Dev Mode & Code Connect**: For inspect/code-generation workflows, add `"dev"` to `editorType`, branch on `figma.mode === 'inspect'` or `figma.codegen.on('generate', ...)`, and use `@figma/code-connect` when mapping design-system components directly to repository code.
11
+
12
+ ```ts
13
+ // Figma plugin main controller (code.ts) — dynamic-page async safe
14
+ figma.showUI(__html__, { width: 320, height: 420, themeColors: true });
15
+
16
+ figma.ui.onmessage = async (msg: unknown) => {
17
+ if (!msg || typeof msg !== 'object' || !('type' in msg)) return;
18
+ if (msg.type === 'inspect-selection') {
19
+ const selection = figma.currentPage.selection;
20
+ if (selection.length === 0) {
21
+ figma.ui.postMessage({ type: 'empty', reason: 'Select at least one layer.' });
22
+ return;
23
+ }
24
+ const items = await Promise.all(
25
+ selection.map(async (node) => ({ id: node.id, name: node.name, kind: node.type })),
26
+ );
27
+ figma.ui.postMessage({ type: 'selection', items });
28
+ }
29
+ };
30
+ ```
31
+
32
+ ## Figma widgets (multiplayer canvas objects)
33
+
34
+ Use a **Figma Widget** (`figma.widget`) when the UI belongs **directly on the FigJam or Figma canvas** shared synchronously across all collaborators (voting boards, status cards, sprint checklists, live embeds), rather than a single-user floating plugin modal:
35
+
36
+ - Build UI declaratively with `figma.widget` primitives (`AutoLayout`, `Text`, `Input`, `SVG`, `Frame`), store shared multiplayer state in **`useSyncedState`** and **`useSyncedMap`** (never module globals!), expose toolbar controls with **`usePropertyMenu`**, and wrap async work or temporary helper iframes in **`waitForTask(...)`**.
37
+
38
+ ```tsx
39
+ const { widget } = figma;
40
+ const { AutoLayout, Text, useSyncedState, usePropertyMenu } = widget;
41
+
42
+ function DecisionCard() {
43
+ const [status, setStatus] = useSyncedState<'Open' | 'Approved'>('status', 'Open');
44
+ const [votes, setVotes] = useSyncedState<number>('votes', 0);
45
+
46
+ usePropertyMenu(
47
+ [{ itemType: 'action', propertyName: 'toggle', tooltip: 'Toggle status' }],
48
+ ({ propertyName }) => {
49
+ if (propertyName === 'toggle') setStatus(status === 'Open' ? 'Approved' : 'Open');
50
+ },
51
+ );
52
+
53
+ return (
54
+ <AutoLayout direction="vertical" spacing={8} padding={16} cornerRadius={8} fill="#FFFFFF" stroke="#D4D4D8">
55
+ <Text fontSize={14} fontWeight={600}>Status: {status}</Text>
56
+ <AutoLayout padding={{ vertical: 6, horizontal: 10 }} cornerRadius={6} fill="#0074CA" onClick={() => setVotes(votes + 1)}>
57
+ <Text fill="#FFFFFF" fontSize={12}>Upvote ({votes})</Text>
58
+ </AutoLayout>
59
+ </AutoLayout>
60
+ );
61
+ }
62
+ widget.register(DecisionCard);
63
+ ```
64
+
65
+ ## Microsoft Office add-ins (Word, Excel, PowerPoint, Outlook)
66
+
67
+ - **Unified Manifest for Microsoft 365**: Prefer the **Unified Manifest (`manifest.json`)** for new M365 add-ins targeting Outlook, Teams, M365 Copilot, and supported Office hosts (use legacy XML manifest only where older desktop Office versions require it).
68
+ - **Host lifecycle & Requirement Sets**: Wrap initialization in `Office.onReady()`, always verify API support via `Office.context.requirements.isSetSupported('ExcelApi', '1.14')` before calling newer APIs, and batch reads/writes cleanly around `await context.sync()` (avoid calling `context.sync()` inside loops!).
69
+ - **Fluent UI v9 & host theme**: Use **`@fluentui/react-components`** (`FluentProvider`) adapted to `Office.context.officeTheme` (`bodyBackgroundColor`, `bodyForegroundColor`) inside narrow resizable task panes (320 px default width).
70
+ - **Mandatory OAuth dialog**: Never run third-party OAuth inside the task-pane iframe (blocked by `X-Frame-Options` and third-party cookie restrictions). Always launch **`Office.context.ui.displayDialogAsync(authUrl, { height: 60, width: 35 })`** and receive results via `DialogMessageReceived` (or use **Nested App Authentication (NAA)** for Microsoft Entra ID SSO).
71
+
72
+ ```ts
73
+ // Office Excel add-in: Office.onReady + Requirement Set guard + batched context.sync()
74
+ Office.onReady(async (info) => {
75
+ if (info.host !== Office.HostType.Excel) return;
76
+ if (!Office.context.requirements.isSetSupported('ExcelApi', '1.14')) {
77
+ renderUnsupportedHostNotice('Requires Excel API 1.14 or newer.');
78
+ return;
79
+ }
80
+ await Excel.run(async (context) => {
81
+ const range = context.workbook.getSelectedRange();
82
+ range.load(['address', 'values']);
83
+ await context.sync();
84
+ renderSelectionPreview(range.address, range.values);
85
+ });
86
+ });
87
+ ```
88
+
89
+ ## Do/don't pairs
90
+
91
+ | Do | Don't |
92
+ |---|---|
93
+ | `figma.showUI(__html__, { themeColors: true })` + `--figma-color-*` | Hardcode white plugin backgrounds that blind users in Figma dark mode |
94
+ | `"documentAccess": "dynamic-page"` + async `getNodeByIdAsync` | Call deprecated sync `figma.getNodeById` / `root.findAll` |
95
+ | `figma.clientStorage` in Figma plugins & `useSyncedState` in Widgets | Call `window.localStorage` inside a `null`-origin Figma plugin iframe |
96
+ | `Office.context.ui.displayDialogAsync` (or NAA) for Office OAuth | Redirect the Office task-pane iframe directly to an IdP login page |
97
+ | Check `isSetSupported(...)` and batch operations before `context.sync()` | Call `await context.sync()` inside a 500-row loop |
98
+
99
+ ## Verification commands
100
+
101
+ ```sh
102
+ npm run build
103
+ npx office-addin-manifest validate manifest.json
104
+ ```
105
+
106
+ Build and manifest validation are `static` evidence. Test Figma plugins/widgets inside real Figma Desktop + Browser (light/dark, empty selection, mixed selection, dynamic multi-page docs) and Office add-ins across Windows, macOS, and Office on the Web task panes (`rendered` evidence).
@@ -0,0 +1,125 @@
1
+ # IDE and SaaS platform plugins (JetBrains, Obsidian, Shopify, Atlassian Forge, Notion, Linear)
2
+
3
+ Use this reference when building embedded UI inside **JetBrains IDEs**, **Obsidian**, **Shopify Admin**, **Atlassian Jira/Confluence (Forge)**, **Notion**, or **Linear**. Each host enforces distinct threading, theming, sandboxing, and auth boundaries.
4
+
5
+ ## Host platform matrix
6
+
7
+ | Host | Primary UI layer | Escape hatch | Critical runtime constraint |
8
+ |---|---|---|---|
9
+ | **JetBrains Platform** | **Kotlin UI DSL v2** (Swing) or **Jewel** (Compose Desktop matching IntelliJ New UI) | **JCEF** (`JBCefBrowser` embedded Chromium) | **Never block the EDT** (Event Dispatch Thread); run I/O & PSI reads in coroutines/background actions |
10
+ | **Obsidian** | `ItemView`, `Modal`, `SuggestModal`, `PluginSettingTab`, **CodeMirror 6** extensions | Custom DOM inside view/leaf | **Mobile parity** (iOS/Android)—no Node `fs`/`child_process`; style strictly with Obsidian CSS vars |
11
+ | **Shopify Admin** | **App Bridge v4** + **Polaris Web Components** (`<ui-nav-menu>`, `<ui-save-bar>`, `<s-page>`) | Sandboxed embedded iframe | **Session Tokens (JWT)** via `shopify.idToken()`—never rely on third-party cookies |
12
+ | **Atlassian Forge** | **UI Kit 2 (`@forge/react`)** rendered natively in Jira/Confluence | **Custom UI** (sandboxed iframe + `@forge/bridge`) | Strict `manifest.yml` scopes & outbound egress allowlist; zero unapproved network calls |
13
+ | **Notion / Linear** | Native Link Previews / Attachments / OAuth workflows + external companion apps | Deep-linked web UI | Rate limits, explicit OAuth resource sharing, and idempotent webhook sync |
14
+
15
+ ## JetBrains Platform plugins (IntelliJ, PyCharm, WebStorm, Android Studio)
16
+
17
+ - Prefer **Kotlin UI DSL v2** (`com.intellij.ui.dsl.builder.panel`) for settings (`Configurable`) and dialogs, or **Jewel** (`org.jetbrains.jewel`) when building rich modern Compose-based tool windows that natively match IntelliJ's New UI light/dark/high-contrast themes. Reserve **JCEF (`JBCefBrowser`)** strictly for rich web content that native components cannot express (verify JCEF availability via `JBCefApp.isSupported()`).
18
+ - **EDT vs Coroutine threading**: Running disk I/O, HTTP calls, or heavy PSI/VFS scans on the Event Dispatch Thread freezes the entire IDE and triggers IntelliJ freeze reports. Run compute/network on coroutine dispatchers and switch back to `Dispatchers.EDT` solely to update UI models.
19
+
20
+ ```kotlin
21
+ // Kotlin UI DSL v2 settings panel (never perform blocking I/O on EDT)
22
+ import com.intellij.openapi.options.BoundConfigurable
23
+ import com.intellij.ui.dsl.builder.bindSelected
24
+ import com.intellij.ui.dsl.builder.bindText
25
+ import com.intellij.ui.dsl.builder.panel
26
+
27
+ class OpsPluginConfigurable(private val state: OpsPluginState) : BoundConfigurable("Ops Monitor") {
28
+ override fun createPanel() = panel {
29
+ group("Connection") {
30
+ row("Endpoint URL:") {
31
+ textField()
32
+ .bindText(state::endpointUrl)
33
+ .validationOnApply { if (!it.text.startsWith("https://")) error("Use an HTTPS endpoint.") else null }
34
+ }
35
+ row {
36
+ checkBox("Sync alerts automatically").bindSelected(state::autoSync)
37
+ }
38
+ }
39
+ }
40
+ }
41
+ ```
42
+
43
+ ## Obsidian plugins
44
+
45
+ - Use native Obsidian classes: **`ItemView`** (dockable sidebar/tab panes), **`Modal`** and **`SuggestModal<T>`** (keyboard-driven command pickers matching Quick Switcher), **`PluginSettingTab`** (`new Setting(containerEl)`), and **`registerEditorExtension(...)`** for live **CodeMirror 6** editor decorations/widgets.
46
+ - Always consume Obsidian CSS custom properties (`--background-primary`, `--background-secondary`, `--background-modifier-border`, `--text-normal`, `--text-muted`, `--interactive-accent`, `--text-on-accent`) so community themes and light/dark switching work without visual breakage.
47
+ - **Mobile parity**: Unless strictly desktop-only (`"isDesktopOnly": true` in `manifest.json`), avoid Node `fs`, `path`, `child_process`, or Electron APIs—use `this.app.vault`, `this.app.vault.adapter`, and Obsidian's built-in `requestUrl()` (which bypasses browser CORS safely on desktop and mobile).
48
+
49
+ ```ts
50
+ import { App, SuggestModal } from 'obsidian';
51
+
52
+ export class QuickNotePicker extends SuggestModal<{ path: string; title: string }> {
53
+ constructor(app: App, private readonly items: { path: string; title: string }[], private readonly onPick: (path: string) => void) {
54
+ super(app);
55
+ this.setPlaceholder('Jump to project note…');
56
+ }
57
+ getSuggestions(query: string) {
58
+ const q = query.toLowerCase();
59
+ return this.items.filter((i) => i.title.toLowerCase().includes(q));
60
+ }
61
+ renderSuggestion(item: { path: string; title: string }, el: HTMLElement) {
62
+ el.createEl('div', { text: item.title });
63
+ el.createEl('small', { text: item.path, cls: 'u-muted' });
64
+ }
65
+ onChooseSuggestion(item: { path: string; title: string }) {
66
+ this.onPick(item.path);
67
+ }
68
+ }
69
+ ```
70
+
71
+ ## Shopify Embedded Apps (App Bridge v4 + Polaris)
72
+
73
+ - Load **App Bridge v4** via `<meta name="shopify-api-key" content="..." />` and `<script src="https://cdn.shopify.com/shopifycloud/app-bridge.js"></script>` first in `<head>`.
74
+ - Adopt **Polaris Web Components** (`<s-page>`, `<s-section>`, `<s-button>`) alongside App Bridge native chrome elements (**`<ui-nav-menu>`**, **`<ui-save-bar>`**, **`<ui-title-bar>`**, **`<ui-modal>`**) so navigation, dirty-form save bars, and modals render seamlessly in Shopify Admin chrome across desktop and mobile.
75
+ - Authenticate every backend API call with **Session Tokens** (`const token = await shopify.idToken()` sent in `Authorization: Bearer <token>`)—never depend on third-party cookies inside the Admin iframe.
76
+
77
+ ```html
78
+ <ui-nav-menu>
79
+ <a href="/" rel="home">Overview</a>
80
+ <a href="/rules">Discount Rules</a>
81
+ </ui-nav-menu>
82
+
83
+ <ui-save-bar id="rule-save-bar">
84
+ <button variant="primary" id="save-btn">Save</button>
85
+ <button id="discard-btn">Discard</button>
86
+ </ui-save-bar>
87
+ ```
88
+
89
+ ## Atlassian Forge (Jira & Confluence)
90
+
91
+ - **Choose UI Kit 2 (`@forge/react`) first**: Components render directly in Atlassian's host React tree using the official Atlassian Design System (zero iframe loading flash, automatic dark/light theme parity, strict security).
92
+ - Drop to **Custom UI** (sandboxed static iframe + `@forge/bridge` `invoke()` / `view.theme.enable()`) only when you require custom canvas/SVG visuals or rich third-party editors; explicitly declare every external API domain in `manifest.yml` `permissions.external.fetch.backend` / `client` and keep resolvers idempotent.
93
+
94
+ ## Notion and Linear integrations
95
+
96
+ - **Notion**: Design around Link Previews (unfurl API), OAuth public integrations, and block/database sync. Handle the common empty state where a user installed the integration without sharing any pages/databases to it, respect API rate limits (~3 req/s average with `Retry-After` backoff), and surface sync errors clearly without overwriting user-edited blocks.
97
+ - **Linear**: Use Linear's GraphQL API, OAuth2 (`PKCE S256` for public desktop/IDE clients), Webhooks, and **Issue Attachments** (rich status cards linked to external PRs/incidents/deployments) rather than posting noisy duplicate comments on every webhook event. Handle workspace-scoped permissions and expired webhook/token states cleanly.
98
+ - **Credential storage across IDEs**: never ship an OAuth `client_secret` inside distributed JetBrains `.zip` or Obsidian community plugin bundles, and never write tokens to plaintext XML/JSON config files—store tokens in JetBrains **`PasswordSafe.instance`** or Obsidian `SecretStorage` / OS Keychain.
99
+
100
+ ## Do/don't pairs
101
+
102
+ | Do | Don't |
103
+ |---|---|
104
+ | Run JetBrains I/O & PSI reads in coroutines off the EDT and store tokens in `PasswordSafe` | Block the Swing/EDT thread or write OAuth tokens/client secrets into plaintext IDE XML |
105
+ | Style Obsidian views with `--background-primary` / `--interactive-accent` and `requestUrl()` | Hardcode hex colors or import Node `fs` in a mobile-enabled Obsidian plugin |
106
+ | Use Shopify App Bridge v4 `<ui-save-bar>` + `shopify.idToken()` Bearer JWTs | Rely on third-party session cookies inside the Shopify Admin iframe |
107
+ | Default to Atlassian Forge UI Kit 2 (`@forge/react`) before Custom UI | Spin up heavy Custom UI iframes for simple Jira issue panels |
108
+ | Authenticate IDE/desktop plugins via **OAuth 2.0 + PKCE (`S256`)** and surface Notion/Linear scopes cleanly | Embed `client_secret` in client bundles or spam Linear issue comment feeds on every poll |
109
+
110
+ ## Verification commands
111
+
112
+ ```sh
113
+ # JetBrains Plugin (Gradle)
114
+ ./gradlew verifyPlugin
115
+ ./gradlew runIde
116
+
117
+ # Obsidian Plugin
118
+ npm run build
119
+
120
+ # Atlassian Forge
121
+ forge lint
122
+ forge tunnel
123
+ ```
124
+
125
+ `verifyPlugin`, `forge lint`, and `npm run build` provide `static` evidence. Inspect live host rendering across light/dark/high-contrast themes, narrow tool windows or mobile panes, offline/permission-denied states, and real host sandboxes for `rendered` evidence.
@@ -0,0 +1,98 @@
1
+ # Raycast extensions
2
+
3
+ Raycast compiles React declarations (`@raycast/api`) into **native launcher UI** (AppKit on macOS, native controls on Windows). Treat the API as a strict native design system—compose `List`, `Grid`, `Detail`, `Form`, `ActionPanel`, and `MenuBarExtra` rather than fighting the host with custom layout hacks.
4
+
5
+ ## Core components, `@raycast/utils`, and ActionPanel ergonomics
6
+
7
+ - Prefer **`@raycast/utils`** hooks (`useCachedPromise`, `usePromise`, `useFetch`, `useForm`) so commands paint immediately from cache while revalidating, cancel stale async requests automatically, and format validation errors cleanly.
8
+ - Put the single highest-frequency action first inside `ActionPanel` (it automatically maps to `Enter`; the second action maps to `Cmd+Enter` / `Ctrl+Enter`), and group destructive actions in a bottom `ActionPanel.Section` with `Action.Style.Destructive` and `confirmAlert(...)`.
9
+
10
+ ```tsx
11
+ import { Action, ActionPanel, Icon, List, Toast, confirmAlert, getPreferenceValues, showToast } from '@raycast/api';
12
+ import { useCachedPromise } from '@raycast/utils';
13
+ import { useState } from 'react';
14
+
15
+ interface Preferences {
16
+ apiToken: string; // declared with "type": "password" in package.json
17
+ }
18
+
19
+ export default function SearchIssuesCommand() {
20
+ const { apiToken } = getPreferenceValues<Preferences>();
21
+ const [query, setQuery] = useState('');
22
+
23
+ const { data = [], isLoading, error, revalidate } = useCachedPromise(
24
+ async (q: string) => fetchIssues(apiToken, q),
25
+ [query],
26
+ { keepPreviousData: true, onError: (err) => showToast({ style: Toast.Style.Failure, title: 'Search failed', message: err.message }) },
27
+ );
28
+
29
+ return (
30
+ <List isLoading={isLoading} onSearchTextChange={setQuery} searchBarPlaceholder="Filter issues…" throttle>
31
+ {error && <List.EmptyView icon={Icon.ExclamationMark} title="Could not load issues" description={error.message} />}
32
+ {!error && data.length === 0 && (
33
+ <List.EmptyView icon={Icon.MagnifyingGlass} title="No matching issues" description="Try another search term or clear filters." />
34
+ )}
35
+ {data.map((issue) => (
36
+ <List.Item
37
+ key={issue.id}
38
+ title={issue.title}
39
+ subtitle={issue.key}
40
+ accessories={[{ tag: issue.status }]}
41
+ actions={
42
+ <ActionPanel>
43
+ <Action.OpenInBrowser url={issue.url} />
44
+ <Action.CopyToClipboard title="Copy Issue Key" content={issue.key} />
45
+ <ActionPanel.Section>
46
+ <Action
47
+ title="Archive Issue"
48
+ icon={Icon.Trash}
49
+ style={Action.Style.Destructive}
50
+ onAction={async () => {
51
+ if (await confirmAlert({ title: `Archive ${issue.key}?` })) {
52
+ await archiveIssue(apiToken, issue.id);
53
+ revalidate();
54
+ }
55
+ }}
56
+ />
57
+ </ActionPanel.Section>
58
+ </ActionPanel>
59
+ }
60
+ />
61
+ ))}
62
+ </List>
63
+ );
64
+ }
65
+ ```
66
+
67
+ ## `MenuBarExtra`, no-view commands, storage, and AI Extensions/Tools
68
+
69
+ | Capability | API / manifest idiom | Concrete rule |
70
+ |---|---|---|
71
+ | **Menu bar item** | `<MenuBarExtra icon={...} title={...} isLoading={...}>` + `"interval": "5m"` | Keep refreshes lightweight and avoid launching noisy popups on background polls; show explicit error state inside the menu. |
72
+ | **No-view commands** | `"mode": "no-view"` in `package.json` | Perform instant single-shot tasks (toggle setting, copy formatted link) and close cleanly with `showHUD("Copied URL")` or `showToast(...)` on failure. |
73
+ | **Storage & secrets** | `getPreferenceValues()` (`"type": "password"`), `Cache`, `LocalStorage` | Store secrets only in password preferences or OAuth (`OAuth.PKCEClient`), use synchronous `Cache` for instant UI hydration, and async `LocalStorage` for durable per-device records. |
74
+ | **Raycast AI Extensions & Tools** | `AI.ask(...)`, `environment.canAccess(AI)`, `src/tools/*.ts` | Guard `AI.ask()` with `environment.canAccess(AI)` (Pro feature) and provide a graceful fallback. For **AI Tools** invoked by Raycast AI Chat / Quick AI, export a clear default function + `confirmation` callback for any mutating/external tool so users approve side effects before execution. |
75
+
76
+ ## Cross-platform parity (macOS and Windows)
77
+
78
+ Raycast runs on both **macOS and Windows**. Unless your extension genuinely depends on macOS-only frameworks (`osascript`, AppleScript, `~/Library`, Spotlight), keep paths cross-platform (`os.homedir()`, `path.join`), avoid hardcoding `Cmd` in copy text (Raycast maps shortcut labels automatically), and set `"platforms": ["macOS", "Windows"]` (or `["macOS"]` explicitly when Apple-only) in `package.json`.
79
+
80
+ ## Do/don't pairs
81
+
82
+ | Do | Don't |
83
+ |---|---|
84
+ | `useCachedPromise` + `throttle` on live search lists | Fire unthrottled fetches on every keystroke with blank flicker |
85
+ | Guard `AI.ask` with `environment.canAccess(AI)` and confirm mutating AI Tools | Crash non-Pro users or auto-delete records from an AI tool call |
86
+ | Store tokens in `password` preferences or `OAuth.PKCEClient` | Render API keys in plaintext `Form.TextField` or `Cache` |
87
+ | Declare `"platforms"` honestly and guard macOS-only shell commands | Invoke `osascript` unconditionally in a cross-platform extension |
88
+ | Group destructive actions at bottom of `ActionPanel` with `confirmAlert` | Put Delete as the first `Enter` action on a list row |
89
+
90
+ ## Verification commands
91
+
92
+ ```sh
93
+ npm run lint
94
+ npm run build
95
+ npm run dev
96
+ ```
97
+
98
+ `npm run lint` and `npm run build` provide `static` evidence (manifest schema, TypeScript, Raycast ESLint rules). Launch inside Raycast (`npm run dev`) to verify fast paint, empty/error states, keyboard-only `ActionPanel` flow, dark/light icon contrast, `MenuBarExtra` updates, and Windows/macOS parity (`rendered` evidence).
@@ -0,0 +1,100 @@
1
+ # VS Code extensions and webviews
2
+
3
+ Always choose the **smallest native VS Code UI surface** before creating a Webview. Native surfaces inherit keyboard navigation, screen-reader accessibility, themes, zoom, and low memory usage automatically.
4
+
5
+ ## Surface decision matrix
6
+
7
+ | Surface | API | Best fit |
8
+ |---|---|---|
9
+ | **QuickPick / InputBox** | `vscode.window.showQuickPick` / `showInputBox` | Fast keyboard-driven commands, multi-step prompts, pickers |
10
+ | **TreeView** | `vscode.window.createTreeView` + `TreeDataProvider` | Hierarchical explorers, resource lists, status trees in Activity/Side Bar |
11
+ | **StatusBar / CodeLens / InlayHints** | `createStatusBarItem`, `registerCodeLensProvider` | Ambient status indicators and inline contextual actions above symbols |
12
+ | **Custom Editors** | `CustomTextEditorProvider` / `CustomEditorProvider` | Visual/binary editors backed by real workspace files with native Save, Undo/Redo, and dirty tab state |
13
+ | **Notebook Renderers** | `contributes.notebookRenderers` | Custom rich MIME outputs inside Jupyter/VS Code notebooks |
14
+ | **Chat Participants, LM Tools & MCP** | `vscode.chat.createChatParticipant`, `vscode.lm.registerTool`, `vscode.lm.registerMcpServerDefinitionProvider` | Native AI chat extensions, agent tools, and MCP servers—prefer these over building a custom chat Webview |
15
+ | **WebviewView / WebviewPanel** | `WebviewViewProvider` / `createWebviewPanel` | Rich bespoke visualizers, diagrams, or domain UIs native primitives cannot express |
16
+
17
+ ## Security, CSP/nonce, `asWebviewUri`, and state persistence
18
+
19
+ - **Deprecated toolkit warning**: **`@vscode/webview-ui-toolkit` is archived and deprecated.** Use **`@vscode-elements/elements`** (community-maintained Web Components matching VS Code styling) or semantic HTML styled directly with VS Code's `--vscode-*` CSS custom properties.
20
+ - Never hardcode `vscode-resource:` paths, never disable CSP or load remote CDN scripts, and restrict `localResourceRoots` to the extension's `dist/` (or media) directory.
21
+ - Prefer **`acquireVsCodeApi().getState()` / `setState()`** + **`WebviewPanelSerializer`** over blindly enabling `retainContextWhenHidden: true` (which keeps an entire background Chromium frame resident in memory even when the tab is hidden).
22
+
23
+ ```ts
24
+ // Extension host: strict CSP + nonce + asWebviewUri + serializer
25
+ import * as vscode from 'vscode';
26
+ import crypto from 'node:crypto';
27
+
28
+ export function buildWebviewHtml(webview: vscode.Webview, extensionUri: vscode.Uri): string {
29
+ const nonce = crypto.randomBytes(16).toString('base64');
30
+ const scriptUri = webview.asWebviewUri(vscode.Uri.joinPath(extensionUri, 'dist', 'webview.js'));
31
+ const styleUri = webview.asWebviewUri(vscode.Uri.joinPath(extensionUri, 'dist', 'webview.css'));
32
+
33
+ return `<!DOCTYPE html>
34
+ <html lang="en">
35
+ <head>
36
+ <meta charset="UTF-8" />
37
+ <meta http-equiv="Content-Security-Policy"
38
+ content="default-src 'none'; img-src ${webview.cspSource} https: data:; style-src ${webview.cspSource}; script-src 'nonce-${nonce}';" />
39
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
40
+ <link rel="stylesheet" href="${styleUri}" />
41
+ </head>
42
+ <body>
43
+ <main id="app"></main>
44
+ <script nonce="${nonce}" src="${scriptUri}"></script>
45
+ </body>
46
+ </html>`;
47
+ }
48
+
49
+ // Register serializer so panels survive VS Code reloads cleanly:
50
+ context.subscriptions.push(
51
+ vscode.window.registerWebviewPanelSerializer('pixelcraft.inspector', {
52
+ async deserializeWebviewPanel(panel: vscode.WebviewPanel, state: unknown) {
53
+ panel.webview.options = {
54
+ enableScripts: true,
55
+ localResourceRoots: [vscode.Uri.joinPath(context.extensionUri, 'dist')],
56
+ };
57
+ panel.webview.html = buildWebviewHtml(panel.webview, context.extensionUri);
58
+ panel.webview.postMessage({ type: 'restore', state });
59
+ },
60
+ }),
61
+ );
62
+ ```
63
+
64
+ ```ts
65
+ // Webview script: persist lightweight UI state without retainContextWhenHidden
66
+ const vscodeApi = acquireVsCodeApi<{ selectedId?: string }>();
67
+ const restored = vscodeApi.getState() ?? {};
68
+
69
+ function selectItem(selectedId: string) {
70
+ vscodeApi.setState({ ...vscodeApi.getState(), selectedId });
71
+ vscodeApi.postMessage({ type: 'select', selectedId }); // validate schema on extension host
72
+ }
73
+ ```
74
+
75
+ ## Activation budget (`< 50 ms`), PKCE + `SecretStorage`, Theme tokens, and Workspace Trust
76
+
77
+ - **Ban `"activationEvents": ["*"]` (`< 50 ms` activation budget)**: never wake your extension on every VS Code launch! VS Code `>= 1.74` automatically activates extensions from `contributes.commands`, `contributes.views`, `contributes.customEditors`, and `contributes.languages`. Use narrow `onLanguage:...` or `workspaceContains:...` triggers only when needed, bundle the extension entrypoint into a single file (`esbuild` / `rolldown`), and keep `activate()` synchronous work **`< 50 ms`** (check `Developer: Show Running Extensions`).
78
+ - **OAuth 2.0 + PKCE (`S256`) & OS `SecretStorage` (`context.secrets`)**: prefer built-in `vscode.authentication.getSession(providerId, scopes, { createIfNone: true })` or run **OAuth 2.0 Authorization Code + PKCE (`S256`)** via `vscode.env.openExternal` + `vscode.window.registerUriHandler`—**never bundle a `client_secret` in the `.vsix`** and store refresh/API tokens strictly inside OS-keychain-backed **`await context.secrets.store(key, token)`** (never plaintext `globalState` or `settings.json`!).
79
+ - **Live host themes**: Bind every surface, border, button, focus ring, and error state to VS Code CSS tokens (`--vscode-editor-background`, `--vscode-editor-foreground`, `--vscode-sideBar-background`, `--vscode-focusBorder`, `--vscode-button-background`, `--vscode-button-foreground`, `--vscode-input-background`, `--vscode-errorForeground`, `--vscode-font-family`, `--vscode-font-size`). Verify **High Contrast Dark** and **High Contrast Light** borders and focus rings.
80
+ - **Workspace Trust**: Check `vscode.workspace.isTrusted` and declare `capabilities.untrustedWorkspaces` in `package.json`. In Restricted Mode, disable code execution/terminal/local script features cleanly and explain *why* with a one-click link to manage trust.
81
+ - **`vscode.dev` / Browser Web Extensions**: If targeting `vscode.dev` or GitHub Codespaces web, set `"browser"` entrypoint in `package.json`, bundle for `webworker`, and replace Node `fs`/`child_process` calls with `vscode.workspace.fs` and browser `fetch` (respecting CORS).
82
+
83
+ ## Do/don't pairs
84
+
85
+ | Do | Don't |
86
+ |---|---|
87
+ | Rely on implicit `contributes.*` activation and keep `activate()` `< 50 ms` | Put `"activationEvents": ["*"]` in `package.json` or run heavy startup scans |
88
+ | Authenticate via `vscode.authentication` or **OAuth 2.0 + PKCE (`S256`)** + `context.secrets` | Embed `client_secret` in `.vsix` or store credentials in `globalState` / `settings.json` |
89
+ | Use `TreeView`, `QuickPick`, `CustomEditor`, or `vscode.chat`/`vscode.lm` first | Build a heavy Webview for a simple list, form, or AI chat |
90
+ | Use `@vscode-elements/elements` or semantic HTML + `--vscode-*` vars | Add archived/deprecated `@vscode/webview-ui-toolkit` to new projects |
91
+ | Nonce scripts + `webview.cspSource` + `asWebviewUri` + `WebviewPanelSerializer` | Allow `'unsafe-inline'` scripts or enable `retainContextWhenHidden: true` everywhere |
92
+
93
+ ## Verification commands
94
+
95
+ ```sh
96
+ npm run compile
97
+ npx @vscode/test-cli
98
+ ```
99
+
100
+ Inspect `package.json` for zero `"activationEvents": ["*"]` and zero embedded secrets (`static`), then launch the **Extension Development Host** to verify `< 50 ms` startup in `Developer: Show Running Extensions`, PKCE/`SecretStorage` sign-in, Light/Dark/High-Contrast themes, Restricted Workspace mode, and window reload (`rendered`).
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: pixelcraft-game-ui
3
+ description: Translates Pixelcraft direction, tokens, UX, and floor requirements into game interfaces across Unity UI Toolkit, Unity uGUI/TextMeshPro, Godot Control/UI (GDScript/C#), Unreal UMG/CommonUI/MVVM, Bevy, LÖVE2D, MonoGame, Phaser/PixiJS/Kaplay, Ebitengine, Macroquad, Flame, Pygame/Arcade, NoesisGUI/RmlUi/Gameface/Dear ImGui, and Raylib/SDL3/Defold/Cocos. Use for HUDs, menus, inventory, controller/keyboard navigation, dynamic input glyphs, focus order, safe areas, HDR/ultrawide HUDs, subtitles, accessibility options, localization, legibility at distance, and game UI verification.
4
+ license: MIT
5
+ metadata:
6
+ version: 0.1.0
7
+ ---
8
+
9
+ # Pixelcraft game UI
10
+
11
+ Use this skill when UI lives inside or around a game loop. Game UI must remain legible under motion, stress, distance, controller input, variable aspect ratios, localization expansion, and platform certification expectations.
12
+
13
+ ## Surface craft
14
+
15
+ Separate always-needed survival information from inspect-on-demand stats. Preserve HUD anchors across resolution and safe-area changes; teach an action with its current input glyph, not a hard-coded device prompt. Test in motion against changing scene luminance, after swapping input, and from the target viewing distance. Do not infer readability from a paused screenshot.
16
+
17
+ ## Detection signals
18
+
19
+ Unity `ProjectSettings/`, `.unity`, UXML/USS/UI Builder or uGUI `Canvas`/`TextMeshPro` assets; Godot `project.godot`, `.tscn`, `.gd`/`.cs`, Control/Theme resources; Unreal `.uproject`, UMG/CommonUI/MVVM widget assets and Slate; Rust `bevy`/`macroquad` (`Cargo.toml`); Go `ebiten`/`ebitenui` (`go.mod`); Flutter `flame` (`pubspec.yaml`); Python `pygame`/`pygame_gui`/`arcade`; LÖVE2D (`conf.lua`, `main.lua`); MonoGame (`.csproj`, Gum/Myra/FontStashSharp); Phaser/PixiJS/Excalibur/Kaplay (`package.json`); NoesisGUI (`.xaml`), RmlUi (`.rml`/`.rcss`), Coherent Gameface, Dear ImGui; Raylib/`raygui`, SDL3/`SDL_ttf`, Defold (`.gui`/`.gui_script`), Cocos Creator; input maps, localization pipelines, and safe-area/certification docs.
20
+
21
+ ## Translate direction to game idioms
22
+
23
+ 1. Map semantic tokens to engine theme/style systems: Unity USS variables/ScriptableObjects, Godot Theme resources, Unreal CommonUI styles/brushes/materials, or engine theme modules.
24
+ 2. Separate diegetic world presentation, HUD state, menu/settings, and cinematic narration. Do not let spectacle destroy critical state legibility.
25
+ 3. Design focus/navigation for controller/keyboard before mouse/touch polish; every actionable element needs predictable spatial navigation and visible focus.
26
+ 4. Reserve safe areas, ultrawide HUD clamps, HDR paper-white luminance, and platform system overlays; verify aspect ratio, resolution scaling, split screen, handheld/TV distance, and stream/capture cropping.
27
+ 5. Treat localization, accessibility options, input remapping, subtitles/captions, colorblind differentiation, and difficulty/assists as core UI systems—not post-launch patches.
28
+
29
+ ## Platform-wide rules
30
+
31
+ - **Steam Deck Verified (`1280×800`, `16:10`) & brightest/darkest HUD legibility**: enforce **`>= 9px` absolute floor / `12–14px` body target at `1280×800`** handheld (`>= 24–28px` at `1080p` 10-foot TV distance), full gamepad navigation from boot with **zero external mouse-only launcher**, automatic OS/Steam virtual keyboard invocation (`ShowFloatingGamepadTextInput`), and **HUD legibility verified on both the brightest (glare/snow/sky) AND darkest gameplay scenes** (using subtle dropplates/backings/keylines rather than bare floating glyphs).
32
+ - **Safe areas & non-stretched ultrawide clamping**: keep critical HUD inside a **`90%` title-safe inset** (`5%` margin) and clamp peripheral HUD widgets to a centered **`16:9` anchor box** on `21:9` / `32:9` displays (with an edge-offset slider) **without stretching 2D sprites, radial reticles, or minimaps**.
33
+ - **Console Lotcheck / TRC / XR, interruption states & store compliance**:
34
+ - Immediately **auto-pause single-player gameplay + open a modal prompt** on **controller disconnect** AND handle **OS interruption states** (**incoming mobile call, console Home/Quick Resume overlay, screen lock/suspend, and explicit `save-failed` / storage-full recovery**);
35
+ - Display a persistent **active player profile / gamertag indicator** across account-bound menus;
36
+ - Render an explicit **"Saving — do not turn off…" autosave indicator** before/during non-volatile writes without stalling the render thread;
37
+ - Cap full-screen/UI luminance flashes strictly **`<= 3 Hz`** (photosensitivity floor), and satisfy **store age-rating (`ESRB` / `PEGI` / `IARC`), chat/UGC moderation, and child/player privacy compliance**.
38
+ - **Zero-lag glyphs, input buffering, audio feel & `0 B/frame` GC**:
39
+ - Hot-swap input glyphs (`Xbox <-> DualSense <-> Switch <-> Steam Deck <-> KB/Mouse`) in **`<= 1 frame` (`0` hysteresis lag on deliberate input)** using fixed-metrics inline icon slots so prompts **never layout-jump**;
40
+ - Buffer menu/confirm inputs for **`100–150 ms`** across brief state transitions, modulate repeated UI SFX pitch by **`±3%`** (`0.97–1.03`), route UI audio to **decoupled buses** (`Master / Music / SFX / Voice / UI`), and hold steady-state UI heap allocations to **`0 B/frame`** (pooled floaters, `SetText` / preallocated buffers).
41
+ - **Accessibility & motor/vestibular customization**: ship independent **HUD Scale**, **Subtitle size + background opacity (`0–100%`)**, **Colorblind symbol + palette**, **Full Input Remapping** (with conflict detection + hold-to-toggle), **hold-instead-of-mash (`tap-assist` / hold-to-repeat)** for QTEs/rapid actions, and **camera/screen-shake + FOV motion reduction (`0–100%`)**.
42
+
43
+ ## Anti-lazy / do-not-hand-roll & anti-slop guard
44
+
45
+ - **Never hand-roll raw `drawRect` / `fillText` / `pygame.draw.rect` layout and hit-test engines** when real UI toolkits exist for the engine: Unity UI Toolkit/uGUI, Godot `Control`, Unreal CommonUI/UMG, Bevy `bevy_ui`, Flame `overlayBuilderMap` Flutter widgets, `ebitenui`, `macroquad::ui`, `pygame_gui`, `arcade.gui`, or semantic HTML/DOM overlays in Phaser/Excalibur.
46
+ - **Reject generic sci-fi/neon HUD slop**: do not paste glowing cyan boxes, stretched 16:9 bitmaps on 21:9 monitors, mouse-only launchers, per-frame string-concatenation GC spikes, or hardcoded Xbox/keyboard prompt strings detached from the active input device.
47
+
48
+ ## Common game-UI failures
49
+
50
+ - text shrinking below `9px` on Steam Deck (`1280×800`) or `24px` on `1080p` TV, HUD washing out against snow/sky glare, or text inputs failing to summon the gamepad virtual keyboard;
51
+ - gameplay continuing unpaused on wireless controller disconnect, incoming call, or console Home overlay, or silent `save-failed` disk errors;
52
+ - mandatory button-mashing QTEs without `tap-assist` hold alternatives, or un-togglable camera/screen shake;
53
+ - input-glyph swaps lagging multiple seconds or shifting surrounding text layout;
54
+ - `21:9`/`32:9` ultrawide stretching 2D HUD sprites or pinning health bars at extreme screen edges;
55
+ - per-frame UI string allocations (`$"HP: {hp}"`) triggering GC frame hitches, `> 3 Hz` flashes, or single-bus audio lacking a dedicated `UI` slider.
56
+
57
+ ## Verification options
58
+
59
+ Engine editor preview is `static`, never runtime gameplay verification (**Rule #0.3**). Capture playmode/device screenshots at `1280×800` (`16:10`), `1920×1080` (`16:9`), and `3440×1440` (`21:9`) across **both brightest (glare/snow/sky) and darkest scenes**, run controller-only boot-to-gameplay + interruption walkthroughs (disconnect, call/overlay, lock, `save-failed`), profile steady-state `0 B/frame` UI allocations, and test pseudo-localized (+35–40%) + CJK/RTL builds (`rendered`). Label unverified console TRC/Lotcheck/XR items `not-checked`.
60
+
61
+ ## Pre-submit checklist
62
+
63
+ - [ ] zero `TODO`s, placeholder stubs, mouse-only boot launchers, or dead menu/remapping handlers;
64
+ - [ ] **Steam Deck (`1280×800`, `16:10`)** text `>= 9px` floor (`12–14px` target), **10ft TV (`1080p`)** `>= 24–28px`, gamepad virtual keyboard, `90%` safe zone, non-stretched `16:9` ultrawide HUD clamp, and **HUD legibility captures on both brightest (glare/snow/sky) and darkest scenes** verified;
65
+ - [ ] **TRC/Lotcheck/XR, interruptions & store compliance**: controller-disconnect auto-pause modal, **incoming call / console Home overlay / screen-lock / `save-failed` interruption states**, active player profile indicator, `"Saving — do not turn off…"` notice, `<= 3 Hz` flash cap, and **store age-rating (`ESRB`/`PEGI`/`IARC`) & privacy compliance** wired;
66
+ - [ ] **`<= 1 frame` input-glyph hot-swap** (zero layout jump), `100–150 ms` menu input buffer, `±3%` UI SFX pitch modulation, decoupled `Master/Music/SFX/Voice/UI` buses, and **`0 B/frame` steady-state UI GC** verified;
67
+ - [ ] independent HUD Scale, Subtitle background opacity (`0–100%`), Colorblind symbol+palette, Full Input Remapping, **hold-instead-of-mash (`tap-assist` / hold-to-repeat)**, **camera/screen-shake reduction (`0–100%`)**, and +35–40% / CJK / RTL localization verified;
68
+ - [ ] **Checklist-Until-Passing Stop-Gate (`<HARD-GATE>`):** walk every checklist item above + run `slop-scan.mjs --fail-on p2`, `check-contrast.mjs`, playmode/profiler checks, and `check-acceptance.mjs .pixelcraft/acceptance.json` (`pixelcraft-review`) in a `Fix → Re-verify` loop until passing (`0` `fail`/`pending` rows, `rendered` evidence on visual/perf/a11y per `Rule #0.3`).
69
+
70
+ ## Framework routing
71
+
72
+ - Read [references/hud-principles.md](references/hud-principles.md) for cross-engine HUD taxonomy (diegetic/spatial/meta/non-diegetic), dynamic input-glyph swapping, HDR paper-white calibration, ultrawide HUD clamping, controller navigation, safe areas, XAG accessibility patterns, and verification.
73
+ - Read [references/unity-ui-toolkit.md](references/unity-ui-toolkit.md) for Unity UI Toolkit (UXML/USS, Unity 6 `DataBinding`, Runtime Accessibility, `PanelSettings`, and UI Toolkit vs uGUI selection).
74
+ - Read [references/unity-ugui.md](references/unity-ugui.md) for Unity uGUI (`Canvas` static/dynamic splitting, `CanvasScaler`, `RectTransform`, `TextMeshPro` SDF atlases, `InputSystemUIInputModule`, explicit `Selectable` navigation, and world-space canvases).
75
+ - Read [references/godot.md](references/godot.md) for Godot 4 Control/Theme UI (GDScript & C# bindings), Godot 4.5 AccessKit, MSDF fonts, `DisplayServer.get_display_safe_area()`, `process_mode`, and `mouse_filter`.
76
+ - Read [references/unreal-umg.md](references/unreal-umg.md) for Unreal UMG, CommonUI (`UCommonActivatableWidget`, `CommonActionWidget`), UMG ViewModel (`MVVM`), Enhanced Input UI routing, Slate boundaries, and `InvalidationBox`/`RetainerBox`.
77
+ - Read [references/bevy.md](references/bevy.md) for Bevy 0.15–0.18 Rust UI (Required Components, `children!`, `bevy_picking`, `bevy_ui_widgets`, `bevy_feathers`, `bevy_input_focus`, and AccessKit).
78
+ - Read [references/love2d.md](references/love2d.md) for LÖVE2D/Lua games (`love.window.getSafeArea()`, gamepad glyph detection, SUIT/Slab/FlexLove).
79
+ - Read [references/monogame.md](references/monogame.md) for MonoGame/C# game UI (Gum UI, Myra, FontStashSharp).
80
+ - Read [references/web-and-middleware-game-ui.md](references/web-and-middleware-game-ui.md) for HTML5/web game engines (Phaser, PixiJS `@pixi/ui`, Excalibur, Kaplay), AAA/native middleware (NoesisGUI, RmlUi, Coherent Gameface, Dear ImGui), and native/indie engines (Raylib `raygui`, SDL3/`SDL_ttf` v3, Defold, Cocos Creator, Ebitengine `ebitenui`, Macroquad, Flame Flutter overlays, Pygame `pygame_gui`, and Python Arcade).
@@ -0,0 +1,90 @@
1
+ # Bevy UI (Rust, Bevy 0.15–0.18)
2
+
3
+ ## Token mapping and Required Components (Bevy 0.15+)
4
+
5
+ Bevy 0.15+ replaced legacy `*Bundle` structs (`NodeBundle`, `ButtonBundle`, `TextBundle`) and `Style` with **Required Components**: spawn `Node`, `BackgroundColor`, `BorderColor`, `Button`, `Text`, `TextFont`, and `TextColor` directly, and compose hierarchies with Bevy 0.16+ **`children![...]`** relationships. Store palette, typography, and spacing in a semantic `Resource` rather than scattering raw `Color::srgb(...)` literals across spawn sites:
6
+
7
+ ```rust
8
+ use bevy::a11y::AccessibilityNode;
9
+ use bevy::picking::events::{Click, Pointer};
10
+ use bevy::prelude::*;
11
+ use bevy::ui::Val;
12
+ use accesskit::{Node as AccessibleNode, Role};
13
+
14
+ #[derive(Resource)]
15
+ struct UiTokens {
16
+ action_bg: Color,
17
+ action_text: Color,
18
+ border: Color,
19
+ font: Handle<Font>,
20
+ }
21
+
22
+ fn spawn_pause_menu(mut commands: Commands, tokens: Res<UiTokens>) {
23
+ commands.spawn((
24
+ Node {
25
+ width: Val::Percent(100.0),
26
+ height: Val::Percent(100.0),
27
+ justify_content: JustifyContent::Center,
28
+ align_items: AlignItems::Center,
29
+ ..default()
30
+ },
31
+ children![(
32
+ Button,
33
+ Node {
34
+ padding: UiRect::axes(Val::Px(24.0), Val::Px(14.0)),
35
+ border: UiRect::all(Val::Px(2.0)),
36
+ ..default()
37
+ },
38
+ BackgroundColor(tokens.action_bg),
39
+ BorderColor(tokens.border),
40
+ AccessibilityNode(AccessibleNode::new(Role::Button)),
41
+ children![(
42
+ Text::new("Resume"),
43
+ TextFont { font: tokens.font.clone(), font_size: 22.0, ..default() },
44
+ TextColor(tokens.action_text),
45
+ )],
46
+ )],
47
+ ))
48
+ .observe(|_trigger: Trigger<Pointer<Click>>| {
49
+ // Bevy 0.15–0.16: Trigger<Pointer<Click>> (Bevy 0.17+: On<Pointer<Click>>)
50
+ });
51
+ }
52
+ ```
53
+
54
+ ## Native `bevy_picking`, `bevy_ui_widgets`, `bevy_feathers`, and focus (0.15–0.18)
55
+
56
+ - **Native `bevy_picking` (0.15+)**: attach ECS observers (`.observe(...)` handling `Pointer<Click>`, `Pointer<Over>`, `Pointer<Out>`, `Pointer<Drag>`) directly on UI entities instead of polling `Query<&Interaction>` manually for complex pointer states. Note exact observer parameter syntax across versions (`Trigger<Pointer<Click>>` in 0.15–0.16 vs `On<Pointer<Click>>` in 0.17+).
57
+ - **`bevy_ui_widgets` (0.17–0.18)**: use Bevy's official headless widgets (buttons, sliders, checkboxes, radio groups) for pointer/keyboard activation, disabled states, and AccessKit synchronization without locking visual appearance.
58
+ - **`bevy_feathers` (0.17–0.18)**: use the opinionated themed widget suite atop `bevy_ui_widgets` for rapid settings/debug/editor tooling when custom game skinning is not needed.
59
+ - **`bevy_input_focus` & `AutoDirectionalNavigation`**: track active focus through `InputFocus` / `InputFocusVisible` resources and wire D-pad/arrow traversal via `AutoDirectionalNavigation` (or explicit `DirectionalNavigationMap` edges) so controller navigation never depends on ad-hoc index counters.
60
+ - **BSN (Bevy Scene Notation)**: treat declarative BSN syntax as experimental until stabilized in your pinned Bevy minor release; do not mix unstable BSN examples with production Required Component code.
61
+
62
+ ## Layout, typography, motion, and AccessKit accessibility
63
+
64
+ - Use Taffy-backed `Node` Flexbox/Grid properties (`Display::Flex`, `Display::Grid`, `Val::Percent`/`Val::Px`/`Val::Vw`), handle `WindowResized` / `UiScale` changes, and keep HUD vs menu camera layers distinct.
65
+ - Load TTF/OTF fonts explicitly via `AssetServer`, verify CJK/RTL/Cyrillic glyph coverage (cosmic-text handles shaping in Bevy 0.15+, but fallback fonts must still be available), and test distance legibility.
66
+ - **AccessKit semantics**: construct `AccessibilityNode(accesskit::Node::new(Role::Button))` from the `accesskit` crate, populate accessible labels/checked/value states on interactive widgets, and test actual OS screen-reader output (`rendered`, or label unsupported targets `not-checked`).
67
+ - Model pause, loading, disconnect, death/respawn, and modal focus restoration cleanly with `States` / `SubStates` and explicit `DespawnOnExit`; expose reduced-motion/flash settings in game options.
68
+
69
+ ## Do/don't pairs
70
+
71
+ | Do | Don't |
72
+ |---|---|
73
+ | Spawn Required Components (`Node`, `BackgroundColor`, `BorderColor`, `Text`, `TextFont`, `TextColor`) + `children![...]` | Copy legacy pre-0.15 `NodeBundle` / `ButtonBundle` / `Style` snippets |
74
+ | Use `AccessibilityNode(accesskit::Node::new(Role::Button))` and `bevy_ui_widgets` where available | Draw plain rects/text without AccessKit `Node` semantics or focus wiring |
75
+ | Wire `bevy_picking` observers and `bevy_input_focus` / `AutoDirectionalNavigation` | Build mouse-only menus or drop focus silently when despawning modal entities |
76
+ | Keep theme tokens in a `Resource` and verify `UiScale` + reduced-motion toggles | Hard-code `Color::srgb(...)` per entity or assume OS reduced motion is auto-applied |
77
+
78
+ ## Known traps
79
+
80
+ Fast minor-version API shifts across 0.15 → 0.18 (`Trigger<E>` vs `On<E>`, `BorderColor::all(...)` helpers, `DespawnOnExit`), despawning the focused entity without restoring `InputFocus`, forgetting `Pickable::IGNORE` on non-interactive HUD overlays that steal clicks, and incomplete font fallback in localized builds.
81
+
82
+ ## Verification commands
83
+
84
+ ```sh
85
+ cargo test
86
+ cargo clippy -- -D warnings
87
+ cargo run
88
+ ```
89
+
90
+ Verify resolution/aspect/`UiScale` matrix, controller-only `AutoDirectionalNavigation` traversal, AccessKit inspection on supported platforms, pause/interruption transitions, and localization glyph rendering (`rendered`).