@thanhnguyxn/pixelcraft 0.0.0-stage → 0.1.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 (297) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/.claude-plugin/marketplace.json +20 -0
  3. package/.claude-plugin/plugin.json +11 -0
  4. package/LICENSE +21 -0
  5. package/README.md +407 -2
  6. package/assets/README.md +28 -0
  7. package/assets/pixelcraft-logo-512.png +0 -0
  8. package/bin/pixelcraft.mjs +444 -0
  9. package/docs/ARCHITECTURE.md +102 -0
  10. package/docs/DESIGN-RATIONALE.md +143 -0
  11. package/evals/README.md +27 -0
  12. package/evals/fixtures/README.md +36 -0
  13. package/evals/fixtures/direction-prototype-complexity.json +29 -0
  14. package/evals/fixtures/finish-gate-anti-slop.json +30 -0
  15. package/evals/fixtures/forms-accessibility-negative.json +29 -0
  16. package/evals/fixtures/handoff-fidelity-tolerance.json +29 -0
  17. package/evals/fixtures/plan-brownfield-evidence.json +28 -0
  18. package/evals/fixtures/visual-qa-task-evidence.json +29 -0
  19. package/evals/fixtures/workflow-checkpoints.json +30 -0
  20. package/evals/pixelcraft-accessibility.md +57 -0
  21. package/evals/pixelcraft-brandkit.md +58 -0
  22. package/evals/pixelcraft-chat-ui.md +55 -0
  23. package/evals/pixelcraft-constrained.md +55 -0
  24. package/evals/pixelcraft-craft.md +60 -0
  25. package/evals/pixelcraft-data-apps.md +55 -0
  26. package/evals/pixelcraft-dataviz.md +59 -0
  27. package/evals/pixelcraft-desktop.md +55 -0
  28. package/evals/pixelcraft-direction.md +60 -0
  29. package/evals/pixelcraft-document.md +55 -0
  30. package/evals/pixelcraft-email.md +55 -0
  31. package/evals/pixelcraft-extensions.md +55 -0
  32. package/evals/pixelcraft-game-ui.md +59 -0
  33. package/evals/pixelcraft-handoff.md +57 -0
  34. package/evals/pixelcraft-media.md +55 -0
  35. package/evals/pixelcraft-mobile.md +59 -0
  36. package/evals/pixelcraft-patterns.md +57 -0
  37. package/evals/pixelcraft-plan.md +65 -0
  38. package/evals/pixelcraft-review.md +63 -0
  39. package/evals/pixelcraft-spatial.md +55 -0
  40. package/evals/pixelcraft-tokens.md +57 -0
  41. package/evals/pixelcraft-tui.md +55 -0
  42. package/evals/pixelcraft-ux.md +59 -0
  43. package/evals/pixelcraft-visual-qa.md +80 -0
  44. package/evals/pixelcraft-web.md +71 -0
  45. package/evals/pixelcraft.md +70 -0
  46. package/gemini-extension.json +5 -0
  47. package/install.ps1 +295 -0
  48. package/install.sh +437 -0
  49. package/package.json +63 -4
  50. package/plugin.json +24 -0
  51. package/scripts/build-adapters.mjs +290 -0
  52. package/scripts/build-release-archives.mjs +61 -0
  53. package/scripts/build-skill-zips.mjs +94 -0
  54. package/scripts/test-build-adapters.mjs +48 -0
  55. package/scripts/test-distribution.mjs +124 -0
  56. package/scripts/test-export-tokens.mjs +105 -0
  57. package/scripts/test-finish-gate.mjs +148 -0
  58. package/scripts/test-installers.mjs +67 -0
  59. package/scripts/test-release-archives.mjs +42 -0
  60. package/scripts/test-shoot.mjs +65 -0
  61. package/scripts/test-slop-scan.mjs +29 -0
  62. package/scripts/test-style-inventory.mjs +211 -0
  63. package/scripts/test-validate-skills.mjs +117 -0
  64. package/scripts/validate-skills.mjs +512 -0
  65. package/skills/pixelcraft/SKILL.md +135 -0
  66. package/skills/pixelcraft/references/design-brief.md +75 -0
  67. package/skills/pixelcraft/references/floor.md +73 -0
  68. package/skills/pixelcraft/references/report-template.md +35 -0
  69. package/skills/pixelcraft/references/stack-detection.md +155 -0
  70. package/skills/pixelcraft/references/surface-acceptance.md +40 -0
  71. package/skills/pixelcraft/references/workflow-checkpoints.md +29 -0
  72. package/skills/pixelcraft-accessibility/SKILL.md +33 -0
  73. package/skills/pixelcraft-accessibility/references/apg-patterns.md +51 -0
  74. package/skills/pixelcraft-accessibility/references/platforms.md +58 -0
  75. package/skills/pixelcraft-accessibility/references/verification.md +59 -0
  76. package/skills/pixelcraft-accessibility/references/wcag22-checks.md +66 -0
  77. package/skills/pixelcraft-brandkit/SKILL.md +115 -0
  78. package/skills/pixelcraft-brandkit/references/asset-pipeline.md +125 -0
  79. package/skills/pixelcraft-brandkit/references/brand-governance.md +80 -0
  80. package/skills/pixelcraft-brandkit/references/layouts.md +88 -0
  81. package/skills/pixelcraft-brandkit/references/logo-concepting.md +83 -0
  82. package/skills/pixelcraft-brandkit/references/logo-methods.md +98 -0
  83. package/skills/pixelcraft-brandkit/references/pixel-art-logos.md +82 -0
  84. package/skills/pixelcraft-brandkit/references/prompt-template.md +85 -0
  85. package/skills/pixelcraft-brandkit/references/qa-checklist.md +88 -0
  86. package/skills/pixelcraft-brandkit/references/visual-modes.md +123 -0
  87. package/skills/pixelcraft-chat-ui/SKILL.md +53 -0
  88. package/skills/pixelcraft-chat-ui/references/conversation-design.md +78 -0
  89. package/skills/pixelcraft-chat-ui/references/mobile-business-platforms.md +87 -0
  90. package/skills/pixelcraft-chat-ui/references/slack-discord.md +96 -0
  91. package/skills/pixelcraft-constrained/SKILL.md +51 -0
  92. package/skills/pixelcraft-constrained/references/specialized-hardware.md +66 -0
  93. package/skills/pixelcraft-constrained/references/tv-wearables.md +84 -0
  94. package/skills/pixelcraft-constrained/references/voice-ui.md +63 -0
  95. package/skills/pixelcraft-craft/SKILL.md +44 -0
  96. package/skills/pixelcraft-craft/references/color.md +69 -0
  97. package/skills/pixelcraft-craft/references/imagery-icons.md +37 -0
  98. package/skills/pixelcraft-craft/references/layout-quality.md +65 -0
  99. package/skills/pixelcraft-craft/references/layout.md +41 -0
  100. package/skills/pixelcraft-craft/references/motion.md +76 -0
  101. package/skills/pixelcraft-craft/references/typography.md +71 -0
  102. package/skills/pixelcraft-data-apps/SKILL.md +67 -0
  103. package/skills/pixelcraft-data-apps/references/dash.md +53 -0
  104. package/skills/pixelcraft-data-apps/references/evidence.md +75 -0
  105. package/skills/pixelcraft-data-apps/references/gradio.md +65 -0
  106. package/skills/pixelcraft-data-apps/references/julia-genie.md +54 -0
  107. package/skills/pixelcraft-data-apps/references/jupyter-widgets.md +53 -0
  108. package/skills/pixelcraft-data-apps/references/nicegui.md +63 -0
  109. package/skills/pixelcraft-data-apps/references/observable-framework.md +67 -0
  110. package/skills/pixelcraft-data-apps/references/panel.md +53 -0
  111. package/skills/pixelcraft-data-apps/references/r-shiny.md +54 -0
  112. package/skills/pixelcraft-data-apps/references/reflex.md +62 -0
  113. package/skills/pixelcraft-data-apps/references/shiny.md +53 -0
  114. package/skills/pixelcraft-data-apps/references/streamlit.md +65 -0
  115. package/skills/pixelcraft-dataviz/SKILL.md +63 -0
  116. package/skills/pixelcraft-dataviz/references/chart-choice.md +55 -0
  117. package/skills/pixelcraft-dataviz/references/color-accessibility.md +112 -0
  118. package/skills/pixelcraft-dataviz/references/encoding-tables-dashboards.md +97 -0
  119. package/skills/pixelcraft-dataviz/references/libraries.md +57 -0
  120. package/skills/pixelcraft-dataviz/references/realtime-graphs-maps-scale.md +99 -0
  121. package/skills/pixelcraft-desktop/SKILL.md +71 -0
  122. package/skills/pixelcraft-desktop/references/appkit.md +58 -0
  123. package/skills/pixelcraft-desktop/references/avalonia.md +59 -0
  124. package/skills/pixelcraft-desktop/references/cpp-gui.md +52 -0
  125. package/skills/pixelcraft-desktop/references/electron.md +54 -0
  126. package/skills/pixelcraft-desktop/references/go-gui.md +54 -0
  127. package/skills/pixelcraft-desktop/references/gtk.md +54 -0
  128. package/skills/pixelcraft-desktop/references/javafx-swing.md +52 -0
  129. package/skills/pixelcraft-desktop/references/qt-pyside-qml.md +61 -0
  130. package/skills/pixelcraft-desktop/references/rust-gui.md +65 -0
  131. package/skills/pixelcraft-desktop/references/tauri.md +54 -0
  132. package/skills/pixelcraft-desktop/references/uno-platform.md +52 -0
  133. package/skills/pixelcraft-desktop/references/winui-wpf.md +58 -0
  134. package/skills/pixelcraft-desktop/references/working-context.md +5 -0
  135. package/skills/pixelcraft-direction/SKILL.md +154 -0
  136. package/skills/pixelcraft-direction/references/composition-library.md +84 -0
  137. package/skills/pixelcraft-direction/references/direction-card.md +54 -0
  138. package/skills/pixelcraft-direction/references/direction-scoring.md +72 -0
  139. package/skills/pixelcraft-direction/references/movements.md +68 -0
  140. package/skills/pixelcraft-direction/references/repetition-history.md +75 -0
  141. package/skills/pixelcraft-direction/references/slop-fingerprints.md +58 -0
  142. package/skills/pixelcraft-direction/references/wildcards.md +47 -0
  143. package/skills/pixelcraft-document/SKILL.md +54 -0
  144. package/skills/pixelcraft-document/references/archetypes.md +83 -0
  145. package/skills/pixelcraft-document/references/pdf-tools.md +154 -0
  146. package/skills/pixelcraft-document/references/print-css.md +134 -0
  147. package/skills/pixelcraft-document/references/slides.md +102 -0
  148. package/skills/pixelcraft-email/SKILL.md +58 -0
  149. package/skills/pixelcraft-email/references/client-quirks.md +45 -0
  150. package/skills/pixelcraft-email/references/html-tables.md +53 -0
  151. package/skills/pixelcraft-email/references/mjml.md +52 -0
  152. package/skills/pixelcraft-email/references/react-email.md +53 -0
  153. package/skills/pixelcraft-extensions/SKILL.md +51 -0
  154. package/skills/pixelcraft-extensions/references/browser-extensions.md +31 -0
  155. package/skills/pixelcraft-extensions/references/figma-office.md +23 -0
  156. package/skills/pixelcraft-extensions/references/raycast.md +19 -0
  157. package/skills/pixelcraft-extensions/references/vscode-webviews.md +26 -0
  158. package/skills/pixelcraft-game-ui/SKILL.md +61 -0
  159. package/skills/pixelcraft-game-ui/references/bevy.md +52 -0
  160. package/skills/pixelcraft-game-ui/references/godot.md +57 -0
  161. package/skills/pixelcraft-game-ui/references/hud-principles.md +38 -0
  162. package/skills/pixelcraft-game-ui/references/love2d.md +51 -0
  163. package/skills/pixelcraft-game-ui/references/monogame.md +52 -0
  164. package/skills/pixelcraft-game-ui/references/unity-ui-toolkit.md +65 -0
  165. package/skills/pixelcraft-game-ui/references/unreal-umg.md +53 -0
  166. package/skills/pixelcraft-handoff/SKILL.md +49 -0
  167. package/skills/pixelcraft-handoff/references/design-translation.md +104 -0
  168. package/skills/pixelcraft-handoff/references/fidelity-tolerance.md +78 -0
  169. package/skills/pixelcraft-media/SKILL.md +52 -0
  170. package/skills/pixelcraft-media/references/banners-video.md +112 -0
  171. package/skills/pixelcraft-media/references/og-generation.md +107 -0
  172. package/skills/pixelcraft-media/references/social-cards.md +72 -0
  173. package/skills/pixelcraft-mobile/SKILL.md +69 -0
  174. package/skills/pixelcraft-mobile/references/dotnet-maui.md +63 -0
  175. package/skills/pixelcraft-mobile/references/flet.md +53 -0
  176. package/skills/pixelcraft-mobile/references/flutter.md +69 -0
  177. package/skills/pixelcraft-mobile/references/ionic-capacitor.md +65 -0
  178. package/skills/pixelcraft-mobile/references/jetpack-compose.md +61 -0
  179. package/skills/pixelcraft-mobile/references/kivy.md +59 -0
  180. package/skills/pixelcraft-mobile/references/kotlin-multiplatform.md +60 -0
  181. package/skills/pixelcraft-mobile/references/react-native-expo.md +71 -0
  182. package/skills/pixelcraft-mobile/references/swiftui.md +70 -0
  183. package/skills/pixelcraft-mobile/references/task-state-composition.md +5 -0
  184. package/skills/pixelcraft-mobile/references/uikit.md +58 -0
  185. package/skills/pixelcraft-patterns/SKILL.md +58 -0
  186. package/skills/pixelcraft-patterns/references/auth-onboarding.md +25 -0
  187. package/skills/pixelcraft-patterns/references/commerce.md +28 -0
  188. package/skills/pixelcraft-patterns/references/communication.md +26 -0
  189. package/skills/pixelcraft-patterns/references/creative-tools.md +29 -0
  190. package/skills/pixelcraft-patterns/references/dashboard-admin.md +31 -0
  191. package/skills/pixelcraft-patterns/references/marketing.md +32 -0
  192. package/skills/pixelcraft-patterns/references/pattern-selection.md +74 -0
  193. package/skills/pixelcraft-patterns/references/search-filtering.md +42 -0
  194. package/skills/pixelcraft-patterns/references/settings.md +23 -0
  195. package/skills/pixelcraft-patterns/references/tables-crud.md +43 -0
  196. package/skills/pixelcraft-plan/SKILL.md +67 -0
  197. package/skills/pixelcraft-plan/references/design-input.md +69 -0
  198. package/skills/pixelcraft-plan/references/plan-template.md +99 -0
  199. package/skills/pixelcraft-plan/references/repo-discovery.md +42 -0
  200. package/skills/pixelcraft-plan/references/stack-freshness.md +50 -0
  201. package/skills/pixelcraft-plan/references/stack-selection.md +42 -0
  202. package/skills/pixelcraft-review/SKILL.md +64 -0
  203. package/skills/pixelcraft-review/references/audit-report.md +50 -0
  204. package/skills/pixelcraft-review/references/critique-protocol.md +89 -0
  205. package/skills/pixelcraft-review/references/heuristics.md +18 -0
  206. package/skills/pixelcraft-review/references/personas.md +26 -0
  207. package/skills/pixelcraft-review/references/polish.md +38 -0
  208. package/skills/pixelcraft-review/scripts/fixtures/brand-critique-waivers.json +14 -0
  209. package/skills/pixelcraft-review/scripts/fixtures/brand-critique.css +18 -0
  210. package/skills/pixelcraft-review/scripts/fixtures/clean.html +43 -0
  211. package/skills/pixelcraft-review/scripts/fixtures/focus-after-block.css +4 -0
  212. package/skills/pixelcraft-review/scripts/fixtures/focus-at-rules.css +17 -0
  213. package/skills/pixelcraft-review/scripts/fixtures/focus-comments.css +10 -0
  214. package/skills/pixelcraft-review/scripts/fixtures/focus-html-quote-leak.html +12 -0
  215. package/skills/pixelcraft-review/scripts/fixtures/focus-invalid-replacements.css +27 -0
  216. package/skills/pixelcraft-review/scripts/fixtures/focus-nested-rules.css +19 -0
  217. package/skills/pixelcraft-review/scripts/fixtures/focus-not-visible-skip.css +8 -0
  218. package/skills/pixelcraft-review/scripts/fixtures/focus-outline-shorthands.css +11 -0
  219. package/skills/pixelcraft-review/scripts/fixtures/focus-unknown-and-border.css +15 -0
  220. package/skills/pixelcraft-review/scripts/fixtures/focus-unknown-last-wins.css +19 -0
  221. package/skills/pixelcraft-review/scripts/fixtures/focus-valid-replacements-extended.css +29 -0
  222. package/skills/pixelcraft-review/scripts/fixtures/focus-visible-no-replacement.css +3 -0
  223. package/skills/pixelcraft-review/scripts/fixtures/focus-visible-valid-replacements.css +9 -0
  224. package/skills/pixelcraft-review/scripts/fixtures/slop.html +28 -0
  225. package/skills/pixelcraft-review/scripts/slop-scan.mjs +586 -0
  226. package/skills/pixelcraft-spatial/SKILL.md +52 -0
  227. package/skills/pixelcraft-spatial/references/comfort-accessibility.md +98 -0
  228. package/skills/pixelcraft-spatial/references/platforms.md +77 -0
  229. package/skills/pixelcraft-tokens/SKILL.md +56 -0
  230. package/skills/pixelcraft-tokens/assets/tokens.example.json +71 -0
  231. package/skills/pixelcraft-tokens/assets/tokens.modes.example.json +47 -0
  232. package/skills/pixelcraft-tokens/references/adoption.md +55 -0
  233. package/skills/pixelcraft-tokens/references/format.md +54 -0
  234. package/skills/pixelcraft-tokens/references/governance.md +80 -0
  235. package/skills/pixelcraft-tokens/references/state-tokens.md +62 -0
  236. package/skills/pixelcraft-tokens/references/theme-presets.md +94 -0
  237. package/skills/pixelcraft-tokens/scripts/export-tokens.mjs +285 -0
  238. package/skills/pixelcraft-tui/SKILL.md +60 -0
  239. package/skills/pixelcraft-tui/references/bubbletea-lipgloss.md +60 -0
  240. package/skills/pixelcraft-tui/references/ink.md +60 -0
  241. package/skills/pixelcraft-tui/references/ratatui.md +62 -0
  242. package/skills/pixelcraft-tui/references/rich.md +62 -0
  243. package/skills/pixelcraft-tui/references/textual.md +67 -0
  244. package/skills/pixelcraft-ux/SKILL.md +46 -0
  245. package/skills/pixelcraft-ux/references/cognitive-walkthrough.md +70 -0
  246. package/skills/pixelcraft-ux/references/feedback-performance.md +30 -0
  247. package/skills/pixelcraft-ux/references/flows-ia.md +44 -0
  248. package/skills/pixelcraft-ux/references/forms.md +97 -0
  249. package/skills/pixelcraft-ux/references/i18n.md +183 -0
  250. package/skills/pixelcraft-ux/references/laws.md +18 -0
  251. package/skills/pixelcraft-ux/references/locale-test-matrix.md +60 -0
  252. package/skills/pixelcraft-ux/references/state-matrix.md +39 -0
  253. package/skills/pixelcraft-ux/references/usability-testing.md +84 -0
  254. package/skills/pixelcraft-ux/references/ux-writing.md +43 -0
  255. package/skills/pixelcraft-visual-qa/SKILL.md +82 -0
  256. package/skills/pixelcraft-visual-qa/references/baseline-governance.md +70 -0
  257. package/skills/pixelcraft-visual-qa/references/capture-desktop-game.md +38 -0
  258. package/skills/pixelcraft-visual-qa/references/capture-email.md +34 -0
  259. package/skills/pixelcraft-visual-qa/references/capture-mobile.md +35 -0
  260. package/skills/pixelcraft-visual-qa/references/capture-terminal.md +31 -0
  261. package/skills/pixelcraft-visual-qa/references/critique-rubric.md +71 -0
  262. package/skills/pixelcraft-visual-qa/references/finish-gate.md +35 -0
  263. package/skills/pixelcraft-visual-qa/references/measured-craft.md +30 -0
  264. package/skills/pixelcraft-visual-qa/references/performance-budgets.md +65 -0
  265. package/skills/pixelcraft-visual-qa/references/task-verification.md +81 -0
  266. package/skills/pixelcraft-visual-qa/scripts/finish-gate.mjs +135 -0
  267. package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-aria-modal.html +19 -0
  268. package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-audit.html +34 -0
  269. package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-modal.html +17 -0
  270. package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory-deferred.js +1 -0
  271. package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory-edge.html +52 -0
  272. package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory.html +80 -0
  273. package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory.js +8 -0
  274. package/skills/pixelcraft-visual-qa/scripts/shoot.mjs +513 -0
  275. package/skills/pixelcraft-visual-qa/scripts/style-inventory.mjs +1154 -0
  276. package/skills/pixelcraft-web/SKILL.md +76 -0
  277. package/skills/pixelcraft-web/references/adaptive-layout.md +25 -0
  278. package/skills/pixelcraft-web/references/angular.md +61 -0
  279. package/skills/pixelcraft-web/references/astro.md +62 -0
  280. package/skills/pixelcraft-web/references/clojurescript.md +53 -0
  281. package/skills/pixelcraft-web/references/elm.md +53 -0
  282. package/skills/pixelcraft-web/references/fsharp-fable.md +53 -0
  283. package/skills/pixelcraft-web/references/html-css.md +88 -0
  284. package/skills/pixelcraft-web/references/htmx-alpine.md +53 -0
  285. package/skills/pixelcraft-web/references/java-web.md +52 -0
  286. package/skills/pixelcraft-web/references/kotlin-web.md +53 -0
  287. package/skills/pixelcraft-web/references/leptos-yew.md +54 -0
  288. package/skills/pixelcraft-web/references/lit-web-components.md +61 -0
  289. package/skills/pixelcraft-web/references/pwa.md +225 -0
  290. package/skills/pixelcraft-web/references/qwik.md +54 -0
  291. package/skills/pixelcraft-web/references/react-next.md +69 -0
  292. package/skills/pixelcraft-web/references/scala-laminar.md +53 -0
  293. package/skills/pixelcraft-web/references/server-rendered.md +71 -0
  294. package/skills/pixelcraft-web/references/solid.md +60 -0
  295. package/skills/pixelcraft-web/references/svelte.md +61 -0
  296. package/skills/pixelcraft-web/references/tailwind.md +73 -0
  297. package/skills/pixelcraft-web/references/vue-nuxt.md +62 -0
@@ -0,0 +1,112 @@
1
+ # Color and accessibility for data visualization
2
+
3
+ ## Palette selection
4
+
5
+ Color supports decoding; it cannot be the only channel. Choose categorical, sequential, or diverging behavior intentionally—do not interpolate a categorical palette merely because it looks attractive.
6
+
7
+ ### Categorical palettes
8
+
9
+ Use a palette tested against common color-vision deficiency. Okabe–Ito is a strong default for up to eight categories:
10
+
11
+ | Name | Hex |
12
+ |---|---|
13
+ | black | `#000000` |
14
+ | orange | `#E69F00` |
15
+ | sky blue | `#56B4E9` |
16
+ | bluish green | `#009E73` |
17
+ | yellow | `#F0E442` |
18
+ | blue | `#0072B2` |
19
+ | vermillion | `#D55E00` |
20
+ | reddish purple | `#CC79A7` |
21
+
22
+ Tableau 10 is another common tested set: `#4E79A7`, `#F28E2B`, `#E15759`, `#76B7B2`, `#59A14F`, `#EDC948`, `#B07AA1`, `#FF9DA7`, `#9C755F`, `#BAB0AC`.
23
+
24
+ Do not solve more than ~8–10 categories by inventing more hues. Use grouping, small multiples, direct highlighting, shapes, labels, filtering, or aggregation. Avoid red/green-only semantics even in these palettes; pair with shape/text.
25
+
26
+ ### Sequential palettes
27
+
28
+ Use monotonic luminance for ordered magnitude. Viridis-family palettes are widely tested and print reasonably; example anchor colors include `#440154`, `#3B528B`, `#21918C`, `#5EC962`, and `#FDE725`. For a single-hue operational dashboard, use a controlled light-to-dark scale rather than rainbow interpolation. Do not use rainbow/jet: uneven luminance creates artificial bands and is difficult for color-vision deficiency.
29
+
30
+ ### Diverging palettes
31
+
32
+ Use only when there is a meaningful midpoint (zero, target, neutral, parity). Anchor examples:
33
+
34
+ - blue–orange/red: `#2166AC` → `#F7F7F7` → `#B2182B`;
35
+ - purple–green: `#762A83` → `#F7F7F7` → `#1B7837`.
36
+
37
+ Make the endpoint meaning explicit and keep the center neutral. Positive/negative meaning also needs sign, position, icon, or line direction.
38
+
39
+ ## Contrast and theme
40
+
41
+ - WCAG non-text contrast requires at least 3:1 for meaningful graphical objects and focus indicators.
42
+ - Normal text requires at least 4.5:1; large text at least 3:1 under WCAG 2.2 AA.
43
+ - Gridlines should be subordinate but still visible; never sacrifice data/background separation for aesthetic faintness.
44
+ - Test light, dark, forced-colors/high-contrast, grayscale/print, and projector conditions. Dark mode is not inverted saturation; re-balance luminance.
45
+ - Use patterns/hatching in monochrome print or SVG export where supported.
46
+
47
+ ## Redundant encoding
48
+
49
+ Every categorical color used for meaning needs a redundant channel where practical:
50
+
51
+ - direct text label;
52
+ - line dash/width;
53
+ - point shape;
54
+ - icon/marker;
55
+ - pattern/texture;
56
+ - position/facet;
57
+ - annotation.
58
+
59
+ Redundant encoding is not clutter when sparse and systematic. Do not use random shape variety; map shapes consistently across the product.
60
+
61
+ ## Text alternatives
62
+
63
+ Every chart needs a textual route to the information. Choose depth based on complexity:
64
+
65
+ 1. concise chart summary: question, main pattern, magnitude/rank, uncertainty/freshness;
66
+ 2. accessible data table/list with the underlying rows or aggregated equivalent;
67
+ 3. structured point/series navigation for interactive charts;
68
+ 4. downloadable CSV/JSON where users need independent analysis.
69
+
70
+ A bare `role="img"` or `aria-label="chart"` is not access. Describe the message (“Revenue rose 18% after March, driven by…”) and provide the data. Do not expose thousands of rows directly to a screen reader without pagination/filtering/aggregation.
71
+
72
+ ## Keyboard and focus interaction
73
+
74
+ Interactive visualization must define:
75
+
76
+ - entry into the chart region versus ordinary Tab flow;
77
+ - arrow-key movement across points/bars/cells where point navigation matters;
78
+ - Home/End/PageUp/PageDown semantics for large series;
79
+ - visible focus indicator and synchronized tooltip/crosshair;
80
+ - Escape behavior for popovers/modes;
81
+ - legend/filter/keyboard equivalent;
82
+ - focus restoration after zoom/filter/data refresh.
83
+
84
+ Do not construct hundreds of Tab stops. Prefer one composite widget with roving focus/internal arrow keys when point-by-point exploration is required.
85
+
86
+ ## Screen readers and live data
87
+
88
+ - Do not announce every streaming tick. Summarize meaningful state changes at a controlled cadence and provide a pause control.
89
+ - Use polite live regions only for consequential alerts; assertive announcements are for urgent failures.
90
+ - Keep chart summaries synchronized with filtered/visible data.
91
+ - Ensure auto-generated SVG `<title>`/ARIA labels do not contradict custom descriptions.
92
+
93
+ ## Sonification boundary
94
+
95
+ Sonification can help users perceive trend/rhythm/outliers, but support varies widely and it is not a WCAG substitute for textual/tabular access. If offered, make it opt-in, provide play/pause and speed control, document pitch/timing mapping, never autoplay sound, and keep visual/text equivalents primary.
96
+
97
+ ## Motion and cognitive load
98
+
99
+ - Animate only meaningful object constancy, filtering, zoom context, or incoming data.
100
+ - Respect reduced-motion settings; replace interpolation with instant/static updates.
101
+ - Avoid looping pulses except for genuinely time-critical live state; provide pause/stop.
102
+ - Keep transition durations short enough not to block scanning; long animation is not a loading state replacement.
103
+
104
+ ## Verification checklist
105
+
106
+ - [ ] palette tested with color-vision-deficiency simulation or a tested palette/redundant encoding;
107
+ - [ ] text/non-text contrast measured in the actual theme;
108
+ - [ ] chart summary and data table reflect current filters;
109
+ - [ ] keyboard-only user can reach equivalent insight;
110
+ - [ ] screen-reader output reviewed or explicitly labeled `not-checked`;
111
+ - [ ] forced-colors/print/grayscale behavior inspected;
112
+ - [ ] sonification, if present, is optional and never the only access path.
@@ -0,0 +1,97 @@
1
+ # Encoding, labeling, tables, and dashboards
2
+
3
+ ## Encoding hierarchy
4
+
5
+ Approximate perceptual effectiveness for quantitative reading, strongest first:
6
+
7
+ 1. position on a common scale;
8
+ 2. position on aligned but noncommon scales;
9
+ 3. length/height;
10
+ 4. angle/slope;
11
+ 5. area;
12
+ 6. volume/3D depth;
13
+ 7. color saturation/luminance;
14
+ 8. hue alone.
15
+
16
+ Choose the strongest available channel for the most important variable. Do not encode the primary magnitude with hue while using x/y position for a less important dimension. Never use 3D perspective in ordinary statistical charts: depth distorts length and area.
17
+
18
+ Reserve channels deliberately:
19
+
20
+ | Channel | Good use | Misuse |
21
+ |---|---|---|
22
+ | x/y position | primary quantitative or ordered variable | jitter/random placement without explanation |
23
+ | length | magnitudes with shared baseline | truncated bars |
24
+ | hue | limited categories/series identity | continuous quantity or dozens of categories |
25
+ | luminance/saturation | ordered intensity/density | unrelated categories |
26
+ | shape/line style | redundant category encoding | decorative variety |
27
+ | size/area | true third quantitative variable | emphasis without scale legend |
28
+ | motion | object constancy during meaningful transitions | looping decoration |
29
+
30
+ ## Axes, scales, and baselines
31
+
32
+ - Bar/column/area charts require a zero baseline because length/area encodes magnitude. If a nonzero baseline is semantically required, transform the value explicitly (for example “change since baseline”) and label it.
33
+ - Line charts need not start at zero when the question is local variation, but the axis range must not exaggerate noise. State units and relevant baseline/reference lines.
34
+ - Use logarithmic scales only when ratios/orders of magnitude are the question. Label the log scale and never silently mix log/linear panels.
35
+ - Use consistent scale domains in small multiples when comparing magnitude. Independent scales are for shape comparison only and must say so.
36
+ - Show uncertainty intervals with the same visual priority as estimates when decisions depend on them.
37
+ - Do not drop outliers silently. Clamp only with visible broken-axis/overflow notation or provide a scale toggle.
38
+
39
+ ## Direct labels before legends
40
+
41
+ Prefer in order:
42
+
43
+ 1. direct series/end-point labels;
44
+ 2. labels in a consistent side rail aligned by position;
45
+ 3. annotated representative values;
46
+ 4. interactive tooltip as supplemental detail;
47
+ 5. separate legend.
48
+
49
+ Legends force eye travel and color-memory lookup. When one is unavoidable, make it keyboard/touch operable, use the same ordering as visual end positions where practical, and pair color with line style/shape/text. Do not let legend toggling be the only way to understand series identity.
50
+
51
+ Annotation should answer “what should I notice?” Use sparse domain-specific callouts: threshold crossed, abnormal event, missing feed, target/benchmark, confidence boundary. Remove annotations that merely restate axis values.
52
+
53
+ When two percentage series answer related but different questions, repeat their denominators in local labels rather than writing only “share” or distinguishing them by hue. If a comparison becomes a stack on phones, keep the order, date range, denominator and common domain close to each value. Verify that a reader can explain which group each percentage describes without hover or looking back to the desktop legend.
54
+
55
+ ## Formatting and units
56
+
57
+ - Put the unit in the axis title or first tick label (`ms`, `%`, `€`, `requests/s`), not only in a hidden tooltip.
58
+ - Use locale-aware decimal/grouping/currency/date formatting in user-facing UI; preserve machine precision only when users need it.
59
+ - Round for decision-making resolution, not cosmetic symmetry. Keep enough precision to distinguish consequential differences.
60
+ - Use consistent time zone/calendar labeling; mark incomplete trailing periods.
61
+ - Explain nulls/gaps. Zero is not missing.
62
+ - Use tabular numerals for changing or column-aligned numeric values.
63
+
64
+ ## Tables as visualization
65
+
66
+ Tables are often the correct visual representation. Design them as scanning instruments:
67
+
68
+ | Rule | Application |
69
+ |---|---|
70
+ | alignment | right-align numeric columns; left-align names; align decimal precision or use tabular numerals |
71
+ | units | put shared units in headers (`Latency (ms)`); repeat only when mixed |
72
+ | hierarchy | primary identifier first; hide low-frequency metadata behind details/overflow |
73
+ | comparison | use inline bars/sparklines only when scale is labeled and consistent across rows |
74
+ | state | use text plus icon/color for status; never color alone |
75
+ | sorting | expose active sort direction/column; preserve stable ordering |
76
+ | density | choose row density by frequency/expertise; preserve touch target minimums on interactive rows |
77
+ | overflow | truncation needs expansion/copy path; never truncate the only distinguishing part of IDs |
78
+
79
+ Sparklines show shape, not exact magnitude. Pair them with current/range values and state whether axes are shared across rows.
80
+
81
+ ## Dashboard layout and density
82
+
83
+ Start from decisions, not chart inventory.
84
+
85
+ 1. Put system health/outliers/actions first; contextual trends second; exploratory detail later.
86
+ 2. Group by operational object or decision, not by chart type.
87
+ 3. State time range, freshness, source scope, filters, permissions, and update mode once per coherent region.
88
+ 4. Preserve drill-down context: selection, filter, sort, time range, scroll, and back/refresh/deep-link state.
89
+ 5. Use unequal emphasis. Every metric in the same card size teaches users that nothing matters.
90
+ 6. High-frequency operations favor dense tables and exception queues; infrequent executive overview favors fewer, larger comparisons.
91
+ 7. Leave enough whitespace to separate regions. Density means information priority, not cramped padding.
92
+
93
+ Required dashboard states: no data yet, partial ingestion, stale/offline, source error, permission-limited, empty after filter, extreme cardinality, long entity names, and degraded real-time connection. Never fabricate sparklines or placeholder deltas.
94
+
95
+ ## Anti-slop dashboard pattern
96
+
97
+ Reject the generic grid of four KPI cards, purple gradient area chart, donut, leaderboard table, and “AI insights” box unless each element answers a real question. Replace decorative KPI deltas with explicit comparison periods and confidence/freshness. A dashboard can be visually distinctive through editorial hierarchy, domain-specific visual language, calibrated typography, and precise annotation while remaining operationally boring in interaction.
@@ -0,0 +1,57 @@
1
+ # Library and ecosystem notes
2
+
3
+ Library defaults are starting points, not design decisions. Verify current documentation for the exact version in the repository; APIs and accessibility support evolve.
4
+
5
+ | Library/ecosystem | Best use | Rendering/model | Practical notes |
6
+ |---|---|---|---|
7
+ | D3.js | custom, unconventional, tightly controlled browser visualization | modular functions/scales/shapes; usually SVG/Canvas/WebGL manually | Powerful but unopinionated. Own scales, axes, transitions, accessibility, and cleanup. Use semantic HTML around it; D3 does not make a chart accessible. |
8
+ | Observable Plot | concise exploratory/production statistical graphics | declarative marks over D3 scales, SVG | Use meaningful mark channels/facets. Plot supports `ariaLabel`/`ariaDescription` top-level/mark options and generates some mark labels; still provide summary/table and inspect output. |
9
+ | Vega-Lite | declarative, portable chart specifications | JSON grammar compiled to Vega; SVG/canvas | Good for reproducible specs/cross-language generation. Use explicit encodings, titles/descriptions, scale domains, and signals carefully. Validate generated spec and test keyboard/focus outside the canvas. |
10
+ | Apache ECharts | feature-complete interactive dashboards | mostly Canvas by default; SVG renderer available | Configure axes/series rather than accepting demo themes. `aria` support can generate descriptions/decals when enabled, but validate the actual output. Canvas interaction still needs external keyboard/text access. |
11
+ | Recharts | conventional React charts | React components rendering SVG | Composable and familiar, but labels/responsive behavior need care. `ResponsiveContainer` requires a sized parent. Accessibility/tooltip/keyboard behavior is largely your responsibility. |
12
+ | visx | custom React visualization primitives | low-level SVG primitives/scales/shapes | Not a batteries-included chart library. Best when D3-like control is wanted inside React. Own semantics, accessibility, transitions, and measurement. |
13
+ | Plotly.js | scientific/engineering charts, 3D, WebGL-heavy use | mixed renderers; `scattergl`/`heatmapgl` use WebGL | Powerful built-ins can become heavy. Check bundle cost, modebar accessibility, locale, export behavior, and WebGL fallback. Keyboard/screen-reader support is not a substitute for external data access. |
14
+ | matplotlib | publication/static scientific graphics in Python | raster/vector backends | Excellent print/export control. Use explicit figure size/DPI, constrained layout, units, and vector formats. Interactivity depends on embedding/backend; do not pretend a static PNG is accessible without alt text/data. |
15
+ | Altair | declarative Python statistical visualization | emits Vega-Lite JSON | Keep data size reasonable for inline specs or use explicit data transformers/URLs according to environment. Validate generated Vega-Lite and browser accessibility rather than assuming notebook rendering is enough. |
16
+ | ggplot2 (R) | layered grammar of graphics/statistical plots | static grid/vector graphics by default | Choose geoms/scales deliberately; use theme for typography. Labels/annotations often outperform legends. HTML widgets/plotly conversion needs separate interaction/accessibility verification. |
17
+ | Makie (Julia) | high-performance scientific visualization | backend-dependent: CairoMakie for vector/static, GLMakie for interactive GPU, others | Choose backend for output. CairoMakie is appropriate for publication/PDF/SVG-style export; GLMakie for interactive speed. Use explicit axis labels/colorbars/scale limits. |
18
+ | Swift Charts | declarative Apple-platform charts | SwiftUI views/marks | Swift Charts generates VoiceOver elements by default for common marks; customize with `.accessibilityLabel` and `.accessibilityValue` where needed. Test Dynamic Type, watch size classes, dark mode, and chart scrolling. |
19
+ | Vico (Compose) | Jetpack Compose cartesian charts | Compose-native chart components | Configure cartesian layer/model rather than relying on demo styling. Accessibility support has been limited/evolving—use `contentDescription`/Compose semantics and provide an external textual data representation; verify TalkBack. |
20
+
21
+ ## Cross-ecosystem implementation rules
22
+
23
+ ### Data contract
24
+
25
+ - Keep data transformation visible and testable: parsing, unit conversion, timezone normalization, null policy, aggregation, sampling, and rounding.
26
+ - Do not hide mutation inside chart components. Separate “data preparation”, “visual encoding”, and “interaction state”.
27
+ - Use typed schemas where the language supports them. A missing field must not silently become zero.
28
+ - Preserve raw precision internally; round only at presentation.
29
+
30
+ ### Themes and tokens
31
+
32
+ Map semantic tokens explicitly: surface, text, muted grid, categorical series, positive/negative, warning, selection, focus, missing data. Do not hardcode demo blues/purples into every chart. Dark-mode charts need rebalanced luminance and grid contrast rather than simple inversion.
33
+
34
+ ### Resize/reflow
35
+
36
+ Measure container size, text length, orientation, density, and input modality. Rotate/collapse labels only when readable; otherwise use horizontal bars, fewer ticks, wrapping, small multiples, or interactive detail. Never solve narrow screens by shrinking font below readability.
37
+
38
+ ### Export/print/static fallback
39
+
40
+ Define PNG/SVG/PDF/CSV export expectations. Canvas/WebGL output can become blank when print/export serialization is ignored; test it. Static exports need title, axis, direct labels/legend, source/freshness, and colorblind-safe encoding because hover is unavailable.
41
+
42
+ ### Notebook/data-app embedding
43
+
44
+ Notebook rendering is not product accessibility. Streamlit/Gradio/Dash/Panel/Jupyter surfaces may isolate or serialize chart objects differently; verify keyboard focus, theme propagation, cache/update behavior, and whether figure data is duplicated into the page payload.
45
+
46
+ ### Native mobile embedding
47
+
48
+ Respect platform text scaling, dynamic type, hit targets, haptics/feedback rules, dark mode, localization, and reduced motion. Do not embed a web chart merely because it exists when native accessibility/performance matters; conversely, document the bridge/accessibility cost when a webview is intentional.
49
+
50
+ ## Selection guidance
51
+
52
+ - Choose **D3/visx** for bespoke interactive visualization when the team can own complexity.
53
+ - Choose **Plot/Vega-Lite/Altair/ggplot2** for grammar-driven statistical clarity and reproducibility.
54
+ - Choose **ECharts/Recharts/Plotly** for product-facing standard charts where built-in interaction is worth the library cost.
55
+ - Choose **matplotlib/CairoMakie/vector output** for publication/static correctness.
56
+ - Choose **Swift Charts/Vico** when native platform behavior matters more than cross-platform sharing.
57
+ - Choose custom **canvas/WebGL** only after measurement demonstrates SVG/DOM cannot meet the interaction budget.
@@ -0,0 +1,99 @@
1
+ # Real-time data, node graphs, maps, and rendering scale
2
+
3
+ ## Real-time and streaming data
4
+
5
+ Define the temporal semantics before implementation:
6
+
7
+ | Question | Required design |
8
+ |---|---|
9
+ | What is “now”? | show event time versus ingestion/clock time; state timezone and latency |
10
+ | Is data append-only or revised? | make corrections/backfills visible rather than silently rewriting history |
11
+ | What cadence matters? | update at decision cadence, not raw socket cadence |
12
+ | What happens on burst/backlog? | aggregate, sample honestly, drop nonessential frames, or pause; never freeze silently |
13
+ | What happens disconnected? | mark last-known data stale with timestamp; preserve user context; reconnect/resume deliberately |
14
+ | Can users inspect history? | provide pause, time window, scrub/playback, or snapshot semantics |
15
+
16
+ Implementation rules:
17
+
18
+ - Batch expensive rendering with `requestAnimationFrame` in browsers or the platform equivalent; do not re-render the whole chart for every event.
19
+ - Bound memory with explicit windows/ring buffers/aggregation and document the retention policy.
20
+ - Use backpressure or throttle WebSocket/SSE consumers. Pause nonessential rendering when the page/app is hidden, while continuing or pausing ingestion according to product semantics.
21
+ - Avoid layout shift when values update; reserve stable width using tabular numerals and measured placeholders.
22
+ - Do not announce every update to assistive technology; use user-controlled inspection and sparse summaries.
23
+ - Keep interactions truthful: a “live” badge means actively updating; paused/stale/reconnecting are separate visible states.
24
+
25
+ Anti-slop pattern: pulsing green “LIVE” dots, random walking demo data, counters that always increase, and sparklines generated only to fill empty space. These are fabricated evidence.
26
+
27
+ ## Node graphs and network diagrams
28
+
29
+ First decide whether the user needs topology inspection, path tracing, editing, or monitoring. A force-directed hairball is rarely the right default.
30
+
31
+ ### React Flow (xyflow)
32
+
33
+ React Flow is appropriate for interactive node-based editors and explorable workflows. Practical rules:
34
+
35
+ - Model controlled state explicitly (`nodes`, `edges`, change handlers) when selection/persistence/undo matters; uncontrolled convenience is for simple demos.
36
+ - Use `fitView` deliberately for initial framing; do not reset the viewport on every data update.
37
+ - React Flow does not automatically solve graph layout. Use dagre, ELK, or a domain-specific deterministic layout before placing nodes; preserve user-adjusted positions separately.
38
+ - Configure editing affordances (`nodesDraggable`, `nodesConnectable`, selection, deletion) according to permission/state rather than leaving demo defaults.
39
+ - Provide minimap/controls only when the graph size justifies them; they are not substitutes for orientation labels.
40
+ - Enable/maintain keyboard access (`nodesFocusable`, `edgesFocusable`, keyboard navigation support) and test focus visibility. Canvas-like custom node content still needs semantic labels/actions.
41
+ - Virtualize/limit rendering for very large graphs; use aggregation/clusters and server-side layout where necessary.
42
+
43
+ ### Cytoscape.js
44
+
45
+ Cytoscape.js is appropriate for graph analysis and canvas-rendered network visualization. It provides graph primitives, layout algorithms such as grid/circle/breadthfirst/cose, and extension layouts for more advanced constraint solving. Because rendering is canvas-based, keyboard access and screen-reader access are not automatic: provide an external semantic graph/list, keyboard commands, focus/filter controls, and textual neighborhood summaries.
46
+
47
+ ### Graph UX rules
48
+
49
+ - Label edge direction and meaning; do not use arrows decoratively.
50
+ - Use clustering/aggregation when density prevents reading; expose counts and expansion.
51
+ - Make selection state and neighborhood emphasis explicit.
52
+ - Preserve zoom/pan/layout positions across refresh.
53
+ - Supply search/filter and path tracing for large graphs.
54
+ - Design empty/disconnected/cyclic/self-loop/permission-hidden-node states.
55
+
56
+ ## Maps and geospatial UI
57
+
58
+ Choose map technology only when spatial location is essential. Tables, ranked lists, or cartograms often communicate regional comparison better.
59
+
60
+ ### MapLibre GL JS
61
+
62
+ MapLibre GL JS renders vector tiles using WebGL and style JSON. Verify tile/style/glyph/sprite URLs, attribution, licensing, offline behavior, and network failure. Vector text requires glyph resources; missing glyphs are a common cause of invisible labels. Treat the base map as data with a provider/license, not a decorative background.
63
+
64
+ ### deck.gl
65
+
66
+ deck.gl provides GPU-accelerated layers (for example `GeoJsonLayer`, `ScatterplotLayer`, `HexagonLayer`, `ArcLayer`) and can sit above MapLibre/Mapbox-compatible base maps. Update layers by supplying appropriately versioned immutable data; measure GPU memory and attribute update cost. Do not use a WebGL map for a handful of static markers if ordinary DOM/SVG is easier to make accessible.
67
+
68
+ ### Choropleth pitfalls
69
+
70
+ - Normalize counts by population/customer/area only when that denominator is meaningful; otherwise map counts intentionally and label them as counts.
71
+ - Classification choice changes the story: quantile, equal interval, natural breaks, manual thresholds. Publish the breaks and rationale.
72
+ - Large regions visually dominate small dense regions; consider cartograms/tile grids when area is misleading.
73
+ - Missing/no-data regions need a distinct neutral treatment, never zero color.
74
+ - Border/territory representation can be politically sensitive; choose boundary datasets consciously and follow user/legal context.
75
+ - Color alone cannot carry regional values; provide hover/focus/table ranking and direct labels for key regions.
76
+
77
+ ## SVG versus canvas versus WebGL versus 3D
78
+
79
+ There is no universal element-count cutoff. Measure target hardware and interaction. Use this decision order:
80
+
81
+ 1. **SVG/DOM first** for dozens to low thousands of elements when selection, accessibility, CSS, print, and text quality matter.
82
+ 2. **Canvas 2D** when many repeating marks are redrawn as raster and semantic structure can live outside the canvas.
83
+ 3. **WebGL/GPU** when sustained interactivity with tens/hundreds of thousands of points, images, particles, or GPU aggregation is required.
84
+ 4. **3D only when spatial depth itself carries information** (molecular, terrain, volumetric, physical scene). Never use 3D merely to make a 2D chart look advanced.
85
+
86
+ When using canvas/WebGL, accessibility does not disappear: retain an offscreen/semantic data representation, keyboard interaction model, focus proxy where applicable, text summary, and data table/export.
87
+
88
+ ## Performance verification
89
+
90
+ Measure with realistic cardinality and device/network constraints:
91
+
92
+ - initial parse/layout/render time;
93
+ - frame time during pan/zoom/hover/filter;
94
+ - update latency and dropped frames during streaming bursts;
95
+ - memory growth across refresh/reconnect;
96
+ - bundle/worker/wasm/tile payload;
97
+ - battery/thermal behavior on mobile where relevant.
98
+
99
+ Record whether evidence is `rendered` measurement or `not-checked`. Do not call a visualization “fast” because a tiny demo dataset rendered once.
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: pixelcraft-desktop
3
+ description: Translates Pixelcraft direction, tokens, UX, and floor requirements into desktop applications across Tauri, Electron, Qt/PySide/QML, WinUI/WPF, AppKit, GTK, Avalonia, Rust GUI, Java desktop, C++ GUI, Go GUI, and Uno Platform. Use for window/menu design, keyboard shortcuts, resizing, high-DPI behavior, multi-window state, native/custom chrome, platform accessibility, forms, states, motion, and desktop verification.
4
+ license: MIT
5
+ metadata:
6
+ version: 0.1.0
7
+ ---
8
+
9
+ # Pixelcraft desktop
10
+
11
+ Use this skill when the surface is a desktop window rather than a browser page or phone screen. Desktop quality depends on window behavior, input acceleration, persistence, menus, shortcuts, density, and platform chrome as much as visual styling.
12
+
13
+ ## Surface craft
14
+
15
+ Organize persistent navigation, working content and one contextual inspector around the object being edited; hide secondary chrome without hiding state or actions from menus and shortcuts. Resize to the supported minimum, detach or collapse the inspector, then reopen the last workspace and verify selection, keyboard focus and document state.
16
+
17
+ ## Detection signals
18
+
19
+ `src-tauri/tauri.conf.json`, Electron main/preload packages/config, Qt `.pro`/CMake/PySide/QML imports, `.csproj` WinUI/WPF/Avalonia references, Xcode/AppKit targets, GTK build definitions, Rust `egui`/`slint`/`dioxus`/`iced` dependencies, installers/bundles, menu/shortcut registration, multi-window process architecture.
20
+
21
+ ## Translate direction to desktop idioms
22
+
23
+ 1. Map tokens to native or webview theme resources while respecting system light/dark/high-contrast modes.
24
+ 2. Decide whether chrome is native, custom, or hybrid before layout. Never hide essential window controls or break drag/resize/minimize behavior.
25
+ 3. Design for keyboard/mouse precision and acceleration: shortcuts, focus traversal, context menus, multiple selection, undo, drag/drop, scroll behavior, toolbar density.
26
+ 4. Handle window state: resize, minimum size, split panes, maximized/fullscreen, multiple windows/monitors, DPI changes, persistence/restoration.
27
+ 5. Respect platform conventions: macOS menu bar vs Windows/Linux window menus, close/quit semantics, document modified state, notifications, taskbar/dock integration.
28
+ 6. Use web idioms inside Tauri/Electron only after honoring desktop shell behavior.
29
+
30
+ ## Platform-wide rules
31
+
32
+ - Do not trap the user in fixed-size windows unless the interaction truly is modal/essential.
33
+ - Every primary task works without a mouse; shortcuts must be discoverable, non-conflicting, localizable, and documented.
34
+ - Dirty document state must survive close/crash/logout semantics or warn proportionately.
35
+ - Multi-window state must not leak selection/editing focus or duplicate destructive operations.
36
+ - High-DPI scaling must keep icons/type sharp; do not hard-code pixel screenshots as the only UI.
37
+ - Honor reduced motion, contrast, screen readers, platform accessibility APIs, keyboard navigation, and system theme.
38
+
39
+ ## Common desktop failures
40
+
41
+ - browser SPA pasted into Electron/Tauri shell with no menus/shortcuts/native behavior;
42
+ - custom titlebar missing drag regions, double-click maximize, right-click system menu, or accessible controls;
43
+ - panes that collapse irreversibly or lose resize state;
44
+ - fixed 1024px layout clipped on small screens/high scaling;
45
+ - shortcut conflicts with platform/input method/window manager;
46
+ - hidden focus because custom controls never implement keyboard behavior;
47
+ - modal dialogs chains blocking unrelated windows;
48
+ - ignoring multi-instance/file association/deep-link startup state.
49
+
50
+ ## Verification options
51
+
52
+ Rendered verification requires running the actual app/windowing stack or platform-specific UI tests. Webview DOM inspection only covers inner content, not menus/titlebar/window integration. Qt test tools, XCUITest, Windows UI Automation, accessibility inspectors, screenshot/golden tests, and manual resize/multi-monitor checks provide distinct evidence. Label untested OS/window-manager combinations `not-checked`.
53
+
54
+ ## Framework routing
55
+
56
+ - Read [references/working-context.md](references/working-context.md) for editors, debuggers, inspectors, and workspaces whose secondary panes act on a specific object.
57
+
58
+ - Read [references/tauri.md](references/tauri.md) for Tauri.
59
+ - Read [references/electron.md](references/electron.md) for Electron.
60
+ - Read [references/qt-pyside-qml.md](references/qt-pyside-qml.md) for Qt Widgets, PySide/PyQt, and QML.
61
+ - Read [references/winui-wpf.md](references/winui-wpf.md) for WinUI/WPF/Windows desktop.
62
+ - Read [references/appkit.md](references/appkit.md) for AppKit/macOS.
63
+ - Read [references/gtk.md](references/gtk.md) for GTK/libadwaita Linux UI.
64
+ - Read [references/avalonia.md](references/avalonia.md) for Avalonia.
65
+ - Read [references/rust-gui.md](references/rust-gui.md) for egui, Slint, Dioxus, and iced.
66
+ - Read [references/javafx-swing.md](references/javafx-swing.md) for JavaFX/Swing desktop.
67
+ - Read [references/cpp-gui.md](references/cpp-gui.md) for Qt C++/QML, Dear ImGui, and wxWidgets.
68
+ - Read [references/go-gui.md](references/go-gui.md) for Fyne, Wails, and Gio.
69
+ - Read [references/uno-platform.md](references/uno-platform.md) for Uno Platform/XAML cross-platform desktop.
70
+
71
+ For Flet or Kivy desktop targets, use the canonical framework reference in `pixelcraft-mobile` together with the desktop window/menu/high-DPI rules in this skill; do not duplicate those framework files here.
@@ -0,0 +1,58 @@
1
+ # AppKit / macOS desktop
2
+
3
+ ## Token mapping
4
+
5
+ Use asset catalog colors with semantic names for light/dark/high-contrast variants and typed constants in Swift:
6
+
7
+ ```swift
8
+ enum PCSemantic { static let action = NSColor(named: "Semantic/Action") }
9
+ ```
10
+
11
+ Do not copy raw RGB through views/windows/menus. Respect system accent/vibrancy/contrast behavior where appropriate.
12
+
13
+ ## Layout and responsive idioms
14
+
15
+ Use Auto Layout, stack views, safe/content layout guides, split views, toolbar/sidebar idioms, window resizing/minimum size/restoration, spaces/fullscreen behavior, and high-DPI vector assets. macOS desktop UI depends on menu bar/window/document conventions; do not transplant mobile navigation.
16
+
17
+ ## Typography/custom fonts
18
+
19
+ Use system text styles and Dynamic Type-like scaling expectations appropriate to macOS. Register custom fonts in bundle/target correctly and verify baseline alignment in controls. Respect increased contrast/bold text/smart inversion behaviors where applicable.
20
+
21
+ ## Motion/reduced motion
22
+
23
+ Use AppKit/Core Animation purposefully and check system reduce-motion settings through platform accessibility APIs. Window resize/fullscreen/keyboard input must remain interruptible; do not animate every state change.
24
+
25
+ ## Accessibility specifics
26
+
27
+ Use NSAccessibility labels/roles/descriptions, keyboard shortcuts/menu equivalents, Full Keyboard Access, VoiceOver ordering/custom actions, focus ring behavior, toolbar/sidebar semantics, modified document state, Escape/cancel behavior. Custom controls must implement accessibility protocol behavior rather than drawing only.
28
+
29
+ ## States idiom
30
+
31
+ Model document/app/window state: dirty document, autosave/versioning, loading/error/offline/permission, update/restart, background agent/menu-bar lifecycle, file access/security-scoped bookmarks where relevant, crash restoration, multiwindow state. Preserve work on close/logout/restart.
32
+
33
+ ## Forms idiom
34
+
35
+ Use real controls, labels/title/accessibility relationships, key equivalents, focus ring/initial first responder, input validation timing, paste/autofill/IME behavior, undo integration, and keyboard focus occlusion awareness. Dialogs/sheets should not trap unrelated document windows unnecessarily.
36
+
37
+ ## Do/don't pairs
38
+
39
+ | Do | Don't |
40
+ |---|---|
41
+ | real `NSButton`/menu command with keyboard equivalent | custom clickable image pretending to be a control |
42
+ | toolbar/sidebar/menu conventions appropriate to app type | mobile tab bar pasted into macOS window |
43
+ | document dirty/autosave/close flow | silently discarding edits on red close button |
44
+ | VoiceOver/Full Keyboard Access verification | assuming pointer testing covers accessibility |
45
+ | vector/PDF/high-resolution assets | blurry bitmap-only icons at Retina scale |
46
+
47
+ ## Known traps
48
+
49
+ Window restoration/state duplication, key equivalent conflicts, menu validation ownership, sheet/modal scope confusion, AppKit/SwiftUI interop lifecycle, custom focus ring removal, sandbox file permission failure, high-DPI asset mismatch, vibrancy/contrast legibility.
50
+
51
+ ## Verification commands
52
+
53
+ ```sh
54
+ xcodebuild -scheme App -destination 'platform=macOS' build
55
+ xcodebuild test -scheme App -destination 'platform=macOS'
56
+ ```
57
+
58
+ Use real macOS runs, VoiceOver/Accessibility Inspector/Full Keyboard Access, resize/fullscreen/multiple-display tests, dark/high contrast/increased contrast modes, keyboard shortcuts, document close/crash flows, and menu validation inspection.
@@ -0,0 +1,59 @@
1
+ # Avalonia
2
+
3
+ ## Token mapping
4
+
5
+ Use resource dictionaries/styles/theme variants:
6
+
7
+ ```xml
8
+ <SolidColorBrush x:Key="SemanticActionBrush" Color="#FF0074CA" />
9
+ ```
10
+
11
+ Map generated values once into semantic resources and use `DynamicResource` where theme switching matters. Do not scatter raw color/dimension constants in views/viewmodels.
12
+
13
+ ## Layout and responsive idioms
14
+
15
+ Use panels/grid/dock/layout-aware controls, minimum window dimensions, resizing, DPI scaling, platform window chrome choices, keyboard focus manager behavior, and cross-platform OS differences deliberately. Desktop, mobile-like, and embedded targets should not share one rigid layout.
16
+
17
+ ## Typography/custom fonts
18
+
19
+ Register font assets/families correctly and use semantic text styles. Validate fallback/glyph coverage, scaling/DPI behavior, localization expansion, and truncation/rendering differences across platforms.
20
+
21
+ ## Motion/reduced motion
22
+
23
+ Use transitions/animations purposefully and expose reduced-motion behavior based on platform capability or explicit app setting. Keep animation interruptible and never block input or obscure state transitions.
24
+
25
+ ## Accessibility specifics
26
+
27
+ Use automation properties/accessibility metadata, focus/keyboard navigation, visible focus, real controls, high-contrast/system theme awareness, and platform screen-reader verification. Cross-platform rendering does not guarantee equal accessibility tree quality across Windows/macOS/Linux.
28
+
29
+ ## States idiom
30
+
31
+ Use MVVM async state explicitly: loading/error/empty/offline/permission/dirty/concurrency. Handle window lifecycle/close, crash/update/restart, file lock/permission, multi-window state, cancellation/progress, and input preservation. Avoid async void hidden failure.
32
+
33
+ ## Forms idiom
34
+
35
+ Use labeled inputs, validation/error presentation, focus order, paste/IME behavior, keyboard shortcuts/access keys where platform-appropriate, validation timing, and preservation after failed submit. Do not signal errors only through red borders.
36
+
37
+ ## Do/don't pairs
38
+
39
+ | Do | Don't |
40
+ |---|---|
41
+ | semantic resources + `DynamicResource` for themed values | inline repeated colors/brushes across views |
42
+ | explicit async command state/cancellation | fire-and-forget async void operations |
43
+ | platform/runtime keyboard and focus verification | assuming cross-platform rendering means identical interaction |
44
+ | real controls/automation metadata | custom-drawn fake controls without accessibility exposure |
45
+ | resize/high-DPI/multiplatform testing | validating only on developer OS/monitor |
46
+
47
+ ## Known traps
48
+
49
+ Binding errors hidden in logs, style selector cascade surprises, platform rendering/accessibility differences, async lifecycle leaks, window chrome inconsistency, DPI/font fallback variation, resource lookup failure, focus management after dialogs/popups.
50
+
51
+ ## Verification commands
52
+
53
+ ```sh
54
+ dotnet build
55
+ dotnet test
56
+ dotnet run --project <AppProject> 2>/dev/null || true
57
+ ```
58
+
59
+ Use actual Windows/macOS/Linux runs where claimed, screen reader/keyboard tests, resize/DPI/window-state matrices, high contrast/dark mode, and close/crash/update flows as evidence.
@@ -0,0 +1,52 @@
1
+ # C++ GUI: Qt/QML, Dear ImGui, wxWidgets
2
+
3
+ ## Token mapping
4
+
5
+ Qt Widgets/QML: use QObject/QML singleton theme objects, QSS preprocessor variables, palettes, and semantic constants. wxWidgets: centralize system-aware colors/fonts/metrics. Dear ImGui: use a deliberate style struct; remember immediate-mode style is not an accessibility or validation system.
6
+
7
+ ## Layout and responsive idioms
8
+
9
+ Qt layouts/widgets/QML anchors/layouts handle resizing; wxWidgets sizers are mandatory; ImGui layout is frame-local and explicit. Handle high-DPI, window state, minimum size, multi-window ownership, monitor changes. Choose native versus custom chrome deliberately.
10
+
11
+ ## Typography/custom fonts
12
+
13
+ Load font assets and verify glyph fallback/IME/localization. Qt has mature font/input infrastructure; wx relies on native controls; ImGui font atlas must include required glyphs and scaling or text becomes missing/tofu.
14
+
15
+ ## Motion/reduced motion
16
+
17
+ Use Qt animations/timers or wx events purposefully with lifecycle/power awareness. OS reduced-motion integration is inconsistent across custom toolchains; expose an application-level reduced-motion option. ImGui continuous rendering can waste power—use dirty/frame events where possible.
18
+
19
+ ## Accessibility specifics
20
+
21
+ Qt Widgets/QML have mature accessibility hooks when using real controls/properties; custom painting must expose semantics. wxWidgets benefits from native controls but custom canvases need work. Dear ImGui has no meaningful built-in screen-reader/focus semantics—do not choose it for accessibility-critical productivity UI without an explicit adaptation layer.
22
+
23
+ ## States idiom
24
+
25
+ Model loading/error/empty/offline/permission/dirty/concurrent states outside paint/frame loops. Long work needs thread/task ownership, cancellation, progress, and safe UI-thread handoff. Preserve document state across close/crash/update.
26
+
27
+ ## Forms idiom
28
+
29
+ Prefer real Qt/wx controls for validation, clipboard, IME, focus traversal, shortcuts, screen readers. ImGui text input is low-level; validate composition/paste/caret/selection/accessibility before using it for consequential forms.
30
+
31
+ ## Do/don't pairs
32
+
33
+ | Do | Don't |
34
+ |---|---|
35
+ | Qt layouts/QML layouts | fixed pixel widget placement |
36
+ | wx sizers/native controls | owner-drawing everything unnecessarily |
37
+ | explicit worker cancellation/progress | blocking UI thread/frame loop |
38
+ | central theme/style object | raw color literals in paint/frame code |
39
+
40
+ ## Known traps
41
+
42
+ Object lifetime/signals across threads, GPU/context loss, high-DPI bitmap scaling, font atlas glyph omissions, custom chrome breaking platform behavior, accessibility overclaims, power use from continuous rendering, packaging/compiler ABI complexity.
43
+
44
+ ## Verification commands
45
+
46
+ ```sh
47
+ cmake --build build
48
+ ctest --test-dir build
49
+ ./build/<app>
50
+ ```
51
+
52
+ Run actual OS/windows, inspect keyboard/focus/screen reader behavior where supported, resize/DPI/multi-monitor, shutdown/crash/dirty state, power/frame pacing, package/signing smoke tests.