@thanhnguyxn/pixelcraft 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/.agents/plugins/marketplace.json +1 -1
  2. package/.antigravity-plugin/plugin.json +32 -0
  3. package/.claude-plugin/marketplace.json +1 -1
  4. package/.claude-plugin/plugin.json +15 -4
  5. package/.codex-plugin/plugin.json +45 -0
  6. package/.cursor-plugin/marketplace.json +17 -0
  7. package/.cursor-plugin/plugin.json +27 -0
  8. package/.devin-plugin/plugin.json +21 -0
  9. package/.github/plugin/marketplace.json +34 -0
  10. package/CHANGELOG.md +159 -0
  11. package/GEMINI.md +1 -0
  12. package/README.md +185 -328
  13. package/SECURITY.md +28 -0
  14. package/assets/pixelcraft-logo-128.png +0 -0
  15. package/assets/pixelcraft-logo-256.png +0 -0
  16. package/bin/pixelcraft.mjs +431 -23
  17. package/docs/ARCHITECTURE.md +40 -37
  18. package/docs/DESIGN-RATIONALE.md +51 -3
  19. package/docs/INSTALL.md +221 -0
  20. package/evals/README.md +16 -6
  21. package/evals/fixtures/3d-web-engineering.json +69 -0
  22. package/evals/fixtures/acceptance-checklist-rule03-gate.json +43 -0
  23. package/evals/fixtures/ai-ui-libraries.json +53 -0
  24. package/evals/fixtures/audio-visual-accessibility.json +69 -0
  25. package/evals/fixtures/auth-and-checkout-ui.json +53 -0
  26. package/evals/fixtures/brandkit-identity-governance.json +48 -0
  27. package/evals/fixtures/build-and-architecture.json +53 -0
  28. package/evals/fixtures/canvas-and-node-editors.json +53 -0
  29. package/evals/fixtures/chat-ai-exfiltration-ime-hitl-gate.json +43 -0
  30. package/evals/fixtures/completion-gate-scan-until-clean.json +44 -0
  31. package/evals/fixtures/component-systems.json +53 -0
  32. package/evals/fixtures/component-testing.json +53 -0
  33. package/evals/fixtures/constrained-voice-and-tv.json +43 -0
  34. package/evals/fixtures/creative-code-rendering.json +69 -0
  35. package/evals/fixtures/creative-reference-evidence.json +67 -0
  36. package/evals/fixtures/data-app-python-marimo.json +49 -0
  37. package/evals/fixtures/desktop-cpp-juce-audio.json +49 -0
  38. package/evals/fixtures/desktop-csharp-avalonia.json +49 -0
  39. package/evals/fixtures/desktop-native-workspace.json +48 -0
  40. package/evals/fixtures/desktop-python-anti-tkinter.json +49 -0
  41. package/evals/fixtures/document-prepress-pdfx4-tounicode.json +43 -0
  42. package/evals/fixtures/document-rust-typst-invoice.json +49 -0
  43. package/evals/fixtures/document-typst-and-print-css.json +43 -0
  44. package/evals/fixtures/email-mjml-dark-mode.json +49 -0
  45. package/evals/fixtures/email-outlook-and-plaintext.json +43 -0
  46. package/evals/fixtures/enterprise-data-ui.json +53 -0
  47. package/evals/fixtures/extended-tui-toolkits.json +53 -0
  48. package/evals/fixtures/extensions-mv3-and-vscode.json +43 -0
  49. package/evals/fixtures/file-upload-media-ui.json +53 -0
  50. package/evals/fixtures/forms-validation.json +53 -0
  51. package/evals/fixtures/game-go-ebitengine.json +49 -0
  52. package/evals/fixtures/game-godot-gdscript.json +49 -0
  53. package/evals/fixtures/game-ui-hud-and-engines.json +43 -0
  54. package/evals/fixtures/i18n-engineering.json +53 -0
  55. package/evals/fixtures/local-first-sync.json +53 -0
  56. package/evals/fixtures/lynxjs.json +53 -0
  57. package/evals/fixtures/maizzle-email.json +53 -0
  58. package/evals/fixtures/maps-geospatial.json +53 -0
  59. package/evals/fixtures/media-og-and-video-export.json +43 -0
  60. package/evals/fixtures/media-players.json +53 -0
  61. package/evals/fixtures/mobile-compose-16kb-foldable-store-gate.json +44 -0
  62. package/evals/fixtures/mobile-elixir-liveview-native.json +49 -0
  63. package/evals/fixtures/mobile-flutter-dynamic-type.json +49 -0
  64. package/evals/fixtures/mobile-harmonyos-arkui.json +49 -0
  65. package/evals/fixtures/mobile-jetpack-compose.json +49 -0
  66. package/evals/fixtures/mobile-swiftui-ios.json +49 -0
  67. package/evals/fixtures/motion-engineering.json +69 -0
  68. package/evals/fixtures/pdfjs-and-pptx.json +53 -0
  69. package/evals/fixtures/plan-discovery-interview.json +31 -0
  70. package/evals/fixtures/plan-grill-me-brainstorm-gate.json +49 -0
  71. package/evals/fixtures/reactive-data-apps.json +53 -0
  72. package/evals/fixtures/review-evidence-audit.json +43 -0
  73. package/evals/fixtures/rich-text-and-code-editors.json +53 -0
  74. package/evals/fixtures/scrollytelling-resilience.json +70 -0
  75. package/evals/fixtures/spatial-xr-comfort-and-platforms.json +43 -0
  76. package/evals/fixtures/state-architecture.json +53 -0
  77. package/evals/fixtures/styling-ecosystem.json +53 -0
  78. package/evals/fixtures/token-tooling.json +53 -0
  79. package/evals/fixtures/tui-go-bubbletea.json +49 -0
  80. package/evals/fixtures/tui-rust-ratatui-grapheme-paste-teardown.json +44 -0
  81. package/evals/fixtures/tui-rust-ratatui.json +49 -0
  82. package/evals/fixtures/ux-state-matrix-and-i18n.json +43 -0
  83. package/evals/fixtures/web-3d-engines.json +53 -0
  84. package/evals/fixtures/web-php-laravel-filament.json +49 -0
  85. package/evals/fixtures/web-ruby-viewcomponent-phlex.json +49 -0
  86. package/evals/pixelcraft-accessibility.md +17 -0
  87. package/evals/pixelcraft-craft.md +16 -0
  88. package/evals/pixelcraft-dataviz.md +3 -3
  89. package/evals/pixelcraft-direction.md +17 -0
  90. package/evals/pixelcraft-game-ui.md +3 -3
  91. package/evals/pixelcraft-mobile.md +3 -3
  92. package/evals/pixelcraft-patterns.md +16 -0
  93. package/evals/pixelcraft-plan.md +65 -3
  94. package/evals/pixelcraft-review.md +3 -3
  95. package/evals/pixelcraft-visual-qa.md +11 -5
  96. package/evals/pixelcraft-web.md +21 -3
  97. package/evals/pixelcraft.md +4 -4
  98. package/gemini-extension.json +3 -2
  99. package/install.ps1 +57 -11
  100. package/install.sh +82 -7
  101. package/package.json +32 -4
  102. package/plugin.json +6 -1
  103. package/scripts/build-adapters.mjs +11 -13
  104. package/scripts/run-evals.mjs +397 -0
  105. package/scripts/sync-docs.mjs +381 -0
  106. package/scripts/test-build-adapters.mjs +14 -1
  107. package/scripts/test-cross-platform-qa.mjs +359 -0
  108. package/scripts/test-distribution.mjs +86 -7
  109. package/scripts/test-export-tokens.mjs +259 -3
  110. package/scripts/test-finish-gate.mjs +133 -10
  111. package/scripts/test-installers.mjs +155 -6
  112. package/scripts/test-shoot.mjs +23 -1
  113. package/scripts/test-slop-scan.mjs +390 -3
  114. package/scripts/test-style-inventory.mjs +23 -0
  115. package/scripts/test-sync-docs.mjs +140 -0
  116. package/scripts/test-validate-skills.mjs +82 -4
  117. package/scripts/validate-skills.mjs +149 -3
  118. package/skills/pixelcraft/SKILL.md +67 -47
  119. package/skills/pixelcraft/references/design-brief.md +2 -2
  120. package/skills/pixelcraft/references/floor.md +36 -19
  121. package/skills/pixelcraft/references/report-template.md +25 -11
  122. package/skills/pixelcraft/references/stack-detection.md +138 -67
  123. package/skills/pixelcraft/references/surface-acceptance.md +33 -21
  124. package/skills/pixelcraft/references/workflow-checkpoints.md +49 -7
  125. package/skills/pixelcraft-accessibility/SKILL.md +34 -13
  126. package/skills/pixelcraft-accessibility/references/apg-patterns.md +13 -0
  127. package/skills/pixelcraft-accessibility/references/motion-canvas.md +57 -0
  128. package/skills/pixelcraft-accessibility/references/platforms.md +34 -6
  129. package/skills/pixelcraft-accessibility/references/verification.md +15 -10
  130. package/skills/pixelcraft-accessibility/references/wcag22-checks.md +38 -5
  131. package/skills/pixelcraft-brandkit/SKILL.md +42 -30
  132. package/skills/pixelcraft-brandkit/references/asset-pipeline.md +90 -50
  133. package/skills/pixelcraft-brandkit/references/brand-governance.md +29 -27
  134. package/skills/pixelcraft-brandkit/references/logo-methods.md +33 -34
  135. package/skills/pixelcraft-brandkit/references/prompt-template.md +53 -51
  136. package/skills/pixelcraft-brandkit/references/qa-checklist.md +7 -2
  137. package/skills/pixelcraft-brandkit/references/visual-modes.md +16 -16
  138. package/skills/pixelcraft-chat-ui/SKILL.md +31 -27
  139. package/skills/pixelcraft-chat-ui/references/agentic-workspace.md +66 -0
  140. package/skills/pixelcraft-chat-ui/references/ai-ui-libraries.md +259 -0
  141. package/skills/pixelcraft-chat-ui/references/conversation-design.md +12 -6
  142. package/skills/pixelcraft-chat-ui/references/mobile-business-platforms.md +58 -68
  143. package/skills/pixelcraft-chat-ui/references/slack-discord.md +60 -76
  144. package/skills/pixelcraft-constrained/SKILL.md +21 -20
  145. package/skills/pixelcraft-constrained/references/specialized-hardware.md +69 -45
  146. package/skills/pixelcraft-constrained/references/tv-wearables.md +123 -73
  147. package/skills/pixelcraft-constrained/references/voice-ui.md +86 -45
  148. package/skills/pixelcraft-craft/SKILL.md +29 -15
  149. package/skills/pixelcraft-craft/references/color.md +62 -6
  150. package/skills/pixelcraft-craft/references/layout.md +32 -0
  151. package/skills/pixelcraft-craft/references/motion.md +99 -12
  152. package/skills/pixelcraft-craft/references/typography.md +48 -9
  153. package/skills/pixelcraft-data-apps/SKILL.md +50 -31
  154. package/skills/pixelcraft-data-apps/references/ai-and-internal-data-apps.md +147 -0
  155. package/skills/pixelcraft-data-apps/references/dash.md +87 -31
  156. package/skills/pixelcraft-data-apps/references/evidence.md +41 -26
  157. package/skills/pixelcraft-data-apps/references/gradio.md +65 -27
  158. package/skills/pixelcraft-data-apps/references/julia-genie.md +64 -29
  159. package/skills/pixelcraft-data-apps/references/jupyter-widgets.md +65 -27
  160. package/skills/pixelcraft-data-apps/references/nicegui.md +73 -34
  161. package/skills/pixelcraft-data-apps/references/observable-framework.md +65 -27
  162. package/skills/pixelcraft-data-apps/references/panel.md +69 -23
  163. package/skills/pixelcraft-data-apps/references/r-shiny.md +104 -34
  164. package/skills/pixelcraft-data-apps/references/reactive-data-apps.md +186 -0
  165. package/skills/pixelcraft-data-apps/references/reflex.md +85 -31
  166. package/skills/pixelcraft-data-apps/references/shiny.md +84 -27
  167. package/skills/pixelcraft-data-apps/references/streamlit.md +73 -25
  168. package/skills/pixelcraft-dataviz/SKILL.md +21 -24
  169. package/skills/pixelcraft-dataviz/references/color-accessibility.md +2 -2
  170. package/skills/pixelcraft-dataviz/references/encoding-tables-dashboards.md +35 -25
  171. package/skills/pixelcraft-dataviz/references/libraries.md +165 -46
  172. package/skills/pixelcraft-dataviz/references/maps-geospatial.md +159 -0
  173. package/skills/pixelcraft-dataviz/references/realtime-graphs-maps-scale.md +58 -65
  174. package/skills/pixelcraft-desktop/SKILL.md +61 -39
  175. package/skills/pixelcraft-desktop/references/appkit.md +60 -26
  176. package/skills/pixelcraft-desktop/references/avalonia.md +65 -29
  177. package/skills/pixelcraft-desktop/references/cpp-gui.md +104 -27
  178. package/skills/pixelcraft-desktop/references/electron.md +68 -26
  179. package/skills/pixelcraft-desktop/references/go-gui.md +59 -30
  180. package/skills/pixelcraft-desktop/references/gtk.md +74 -31
  181. package/skills/pixelcraft-desktop/references/javafx-swing.md +54 -25
  182. package/skills/pixelcraft-desktop/references/qt-pyside-qml.md +57 -30
  183. package/skills/pixelcraft-desktop/references/rust-gui.md +59 -41
  184. package/skills/pixelcraft-desktop/references/tauri.md +80 -24
  185. package/skills/pixelcraft-desktop/references/uno-platform.md +42 -23
  186. package/skills/pixelcraft-desktop/references/winui-wpf.md +66 -26
  187. package/skills/pixelcraft-desktop/references/working-context.md +82 -3
  188. package/skills/pixelcraft-direction/SKILL.md +48 -82
  189. package/skills/pixelcraft-direction/references/creative-brainstorming.md +72 -0
  190. package/skills/pixelcraft-direction/references/direction-card.md +11 -1
  191. package/skills/pixelcraft-direction/references/direction-scoring.md +5 -1
  192. package/skills/pixelcraft-direction/references/motion-identity.md +67 -0
  193. package/skills/pixelcraft-direction/references/movements.md +3 -0
  194. package/skills/pixelcraft-direction/references/reference-analysis.md +37 -0
  195. package/skills/pixelcraft-direction/references/slop-fingerprints.md +32 -7
  196. package/skills/pixelcraft-document/SKILL.md +27 -23
  197. package/skills/pixelcraft-document/references/archetypes.md +27 -4
  198. package/skills/pixelcraft-document/references/pdf-tools.md +241 -81
  199. package/skills/pixelcraft-document/references/pdfjs-and-pptx.md +114 -0
  200. package/skills/pixelcraft-document/references/print-css.md +96 -43
  201. package/skills/pixelcraft-document/references/slides.md +123 -27
  202. package/skills/pixelcraft-email/SKILL.md +42 -20
  203. package/skills/pixelcraft-email/references/client-quirks.md +101 -33
  204. package/skills/pixelcraft-email/references/html-tables.md +83 -22
  205. package/skills/pixelcraft-email/references/maizzle.md +54 -0
  206. package/skills/pixelcraft-email/references/mjml.md +13 -11
  207. package/skills/pixelcraft-email/references/react-email.md +76 -34
  208. package/skills/pixelcraft-extensions/SKILL.md +32 -27
  209. package/skills/pixelcraft-extensions/references/browser-extensions.md +91 -17
  210. package/skills/pixelcraft-extensions/references/figma-office.md +97 -14
  211. package/skills/pixelcraft-extensions/references/ide-and-saas-plugins.md +125 -0
  212. package/skills/pixelcraft-extensions/references/raycast.md +90 -11
  213. package/skills/pixelcraft-extensions/references/vscode-webviews.md +91 -17
  214. package/skills/pixelcraft-game-ui/SKILL.md +45 -26
  215. package/skills/pixelcraft-game-ui/references/bevy.md +69 -31
  216. package/skills/pixelcraft-game-ui/references/godot.md +100 -27
  217. package/skills/pixelcraft-game-ui/references/hud-principles.md +50 -21
  218. package/skills/pixelcraft-game-ui/references/love2d.md +53 -27
  219. package/skills/pixelcraft-game-ui/references/monogame.md +45 -29
  220. package/skills/pixelcraft-game-ui/references/unity-ugui.md +109 -0
  221. package/skills/pixelcraft-game-ui/references/unity-ui-toolkit.md +69 -27
  222. package/skills/pixelcraft-game-ui/references/unreal-umg.md +53 -26
  223. package/skills/pixelcraft-game-ui/references/web-and-middleware-game-ui.md +122 -0
  224. package/skills/pixelcraft-handoff/SKILL.md +14 -13
  225. package/skills/pixelcraft-handoff/references/design-translation.md +40 -10
  226. package/skills/pixelcraft-handoff/references/motion-handoff.md +54 -0
  227. package/skills/pixelcraft-media/SKILL.md +20 -23
  228. package/skills/pixelcraft-media/references/banners-video.md +83 -65
  229. package/skills/pixelcraft-media/references/og-generation.md +110 -63
  230. package/skills/pixelcraft-media/references/social-cards.md +57 -58
  231. package/skills/pixelcraft-mobile/SKILL.md +53 -36
  232. package/skills/pixelcraft-mobile/references/dotnet-maui.md +62 -34
  233. package/skills/pixelcraft-mobile/references/flet.md +53 -26
  234. package/skills/pixelcraft-mobile/references/flutter.md +76 -32
  235. package/skills/pixelcraft-mobile/references/harmonyos-and-emerging-mobile.md +121 -0
  236. package/skills/pixelcraft-mobile/references/ionic-capacitor.md +48 -26
  237. package/skills/pixelcraft-mobile/references/jetpack-compose.md +92 -24
  238. package/skills/pixelcraft-mobile/references/kivy.md +54 -31
  239. package/skills/pixelcraft-mobile/references/kotlin-multiplatform.md +53 -27
  240. package/skills/pixelcraft-mobile/references/lynxjs.md +110 -0
  241. package/skills/pixelcraft-mobile/references/nativescript-and-skip.md +91 -0
  242. package/skills/pixelcraft-mobile/references/react-native-expo.md +66 -31
  243. package/skills/pixelcraft-mobile/references/swiftui.md +158 -28
  244. package/skills/pixelcraft-mobile/references/tactile-interactions.md +55 -0
  245. package/skills/pixelcraft-mobile/references/task-state-composition.md +82 -2
  246. package/skills/pixelcraft-mobile/references/uikit.md +57 -23
  247. package/skills/pixelcraft-patterns/SKILL.md +30 -13
  248. package/skills/pixelcraft-patterns/references/accessibility-resilience.md +29 -0
  249. package/skills/pixelcraft-patterns/references/ai-and-offline-patterns.md +54 -0
  250. package/skills/pixelcraft-patterns/references/auth-onboarding.md +32 -13
  251. package/skills/pixelcraft-patterns/references/billing-paywalls.md +40 -0
  252. package/skills/pixelcraft-patterns/references/command-workspace.md +56 -0
  253. package/skills/pixelcraft-patterns/references/commerce.md +35 -16
  254. package/skills/pixelcraft-patterns/references/communication.md +34 -15
  255. package/skills/pixelcraft-patterns/references/creative-tools.md +30 -17
  256. package/skills/pixelcraft-patterns/references/creative-web-composition.md +38 -0
  257. package/skills/pixelcraft-patterns/references/dashboard-admin.md +22 -18
  258. package/skills/pixelcraft-patterns/references/history-diff-undo.md +50 -0
  259. package/skills/pixelcraft-patterns/references/marketing.md +31 -19
  260. package/skills/pixelcraft-patterns/references/multi-tenant-rbac.md +47 -0
  261. package/skills/pixelcraft-patterns/references/narrative-systems.md +42 -0
  262. package/skills/pixelcraft-patterns/references/notifications-activity.md +57 -0
  263. package/skills/pixelcraft-patterns/references/pattern-selection.md +8 -2
  264. package/skills/pixelcraft-patterns/references/scheduling-kanban.md +47 -0
  265. package/skills/pixelcraft-patterns/references/scroll-implementation.md +37 -0
  266. package/skills/pixelcraft-patterns/references/settings.md +40 -12
  267. package/skills/pixelcraft-plan/SKILL.md +54 -18
  268. package/skills/pixelcraft-plan/references/discovery-interview.md +110 -0
  269. package/skills/pixelcraft-plan/references/grill-me-protocol.md +63 -0
  270. package/skills/pixelcraft-plan/references/plan-template.md +44 -9
  271. package/skills/pixelcraft-plan/references/repo-discovery.md +16 -9
  272. package/skills/pixelcraft-plan/references/stack-freshness.md +22 -5
  273. package/skills/pixelcraft-plan/references/stack-selection.md +65 -9
  274. package/skills/pixelcraft-review/SKILL.md +41 -19
  275. package/skills/pixelcraft-review/references/audit-report.md +20 -1
  276. package/skills/pixelcraft-review/references/heuristics.md +63 -18
  277. package/skills/pixelcraft-review/references/personas.md +41 -14
  278. package/skills/pixelcraft-review/references/polish.md +66 -26
  279. package/skills/pixelcraft-review/scripts/check-acceptance.mjs +619 -0
  280. package/skills/pixelcraft-review/scripts/fixtures/focus-longhand-removal.css +34 -0
  281. package/skills/pixelcraft-review/scripts/slop-scan.mjs +679 -32
  282. package/skills/pixelcraft-spatial/SKILL.md +16 -17
  283. package/skills/pixelcraft-spatial/references/comfort-accessibility.md +25 -84
  284. package/skills/pixelcraft-spatial/references/platforms.md +123 -53
  285. package/skills/pixelcraft-tokens/SKILL.md +18 -14
  286. package/skills/pixelcraft-tokens/assets/tokens.example.json +1 -1
  287. package/skills/pixelcraft-tokens/assets/tokens.modes.example.json +1 -1
  288. package/skills/pixelcraft-tokens/references/format.md +39 -9
  289. package/skills/pixelcraft-tokens/references/governance.md +1 -1
  290. package/skills/pixelcraft-tokens/references/theme-presets.md +36 -8
  291. package/skills/pixelcraft-tokens/references/token-tooling.md +119 -0
  292. package/skills/pixelcraft-tokens/scripts/export-tokens.mjs +637 -75
  293. package/skills/pixelcraft-tui/SKILL.md +41 -25
  294. package/skills/pixelcraft-tui/references/bubbletea-lipgloss.md +49 -30
  295. package/skills/pixelcraft-tui/references/extended-tui-toolkits.md +127 -0
  296. package/skills/pixelcraft-tui/references/ink.md +77 -28
  297. package/skills/pixelcraft-tui/references/ratatui.md +70 -30
  298. package/skills/pixelcraft-tui/references/rich.md +53 -33
  299. package/skills/pixelcraft-tui/references/terminal-protocols.md +80 -0
  300. package/skills/pixelcraft-tui/references/textual.md +75 -34
  301. package/skills/pixelcraft-ux/SKILL.md +22 -12
  302. package/skills/pixelcraft-ux/references/feedback-performance.md +39 -19
  303. package/skills/pixelcraft-ux/references/forms.md +57 -3
  304. package/skills/pixelcraft-ux/references/i18n.md +50 -12
  305. package/skills/pixelcraft-ux/references/laws.md +35 -14
  306. package/skills/pixelcraft-ux/references/state-matrix.md +15 -1
  307. package/skills/pixelcraft-ux/references/ux-writing.md +1 -0
  308. package/skills/pixelcraft-visual-qa/SKILL.md +21 -7
  309. package/skills/pixelcraft-visual-qa/references/capture-desktop-game.md +28 -7
  310. package/skills/pixelcraft-visual-qa/references/capture-document.md +70 -0
  311. package/skills/pixelcraft-visual-qa/references/capture-email.md +13 -9
  312. package/skills/pixelcraft-visual-qa/references/capture-mobile.md +20 -5
  313. package/skills/pixelcraft-visual-qa/references/capture-terminal.md +6 -2
  314. package/skills/pixelcraft-visual-qa/references/motion-capture.md +63 -0
  315. package/skills/pixelcraft-visual-qa/references/performance-budgets.md +25 -12
  316. package/skills/pixelcraft-visual-qa/references/realtime-graphics.md +55 -0
  317. package/skills/pixelcraft-visual-qa/scripts/check-contrast.mjs +442 -0
  318. package/skills/pixelcraft-visual-qa/scripts/check-email.mjs +397 -0
  319. package/skills/pixelcraft-visual-qa/scripts/check-pdf.mjs +189 -0
  320. package/skills/pixelcraft-visual-qa/scripts/check-tui.mjs +321 -0
  321. package/skills/pixelcraft-visual-qa/scripts/finish-gate.mjs +50 -11
  322. package/skills/pixelcraft-visual-qa/scripts/shoot.mjs +214 -59
  323. package/skills/pixelcraft-visual-qa/scripts/style-inventory.mjs +121 -49
  324. package/skills/pixelcraft-web/SKILL.md +105 -49
  325. package/skills/pixelcraft-web/references/accessibility-performance.md +42 -0
  326. package/skills/pixelcraft-web/references/adaptive-layout.md +52 -8
  327. package/skills/pixelcraft-web/references/angular.md +63 -16
  328. package/skills/pixelcraft-web/references/assets-pipeline.md +67 -0
  329. package/skills/pixelcraft-web/references/astro.md +64 -13
  330. package/skills/pixelcraft-web/references/audio-reactive.md +61 -0
  331. package/skills/pixelcraft-web/references/auth-and-checkout-ui.md +115 -0
  332. package/skills/pixelcraft-web/references/build-and-architecture.md +215 -0
  333. package/skills/pixelcraft-web/references/canvas-and-node-editors.md +157 -0
  334. package/skills/pixelcraft-web/references/clojurescript.md +52 -17
  335. package/skills/pixelcraft-web/references/component-systems.md +102 -0
  336. package/skills/pixelcraft-web/references/component-testing.md +170 -0
  337. package/skills/pixelcraft-web/references/creative-effects.md +59 -0
  338. package/skills/pixelcraft-web/references/creative-runtime.md +34 -0
  339. package/skills/pixelcraft-web/references/enterprise-data-ui.md +138 -0
  340. package/skills/pixelcraft-web/references/file-upload-media-ui.md +82 -0
  341. package/skills/pixelcraft-web/references/forms-validation.md +123 -0
  342. package/skills/pixelcraft-web/references/fsharp-fable.md +3 -2
  343. package/skills/pixelcraft-web/references/gsap.md +102 -0
  344. package/skills/pixelcraft-web/references/html-css.md +144 -12
  345. package/skills/pixelcraft-web/references/htmx-alpine.md +68 -18
  346. package/skills/pixelcraft-web/references/i18n-engineering.md +106 -0
  347. package/skills/pixelcraft-web/references/interaction-and-search-primitives.md +196 -0
  348. package/skills/pixelcraft-web/references/java-web.md +27 -18
  349. package/skills/pixelcraft-web/references/kotlin-web.md +6 -2
  350. package/skills/pixelcraft-web/references/leptos-yew.md +62 -19
  351. package/skills/pixelcraft-web/references/lit-web-components.md +4 -2
  352. package/skills/pixelcraft-web/references/local-first-sync.md +105 -0
  353. package/skills/pixelcraft-web/references/media-players.md +104 -0
  354. package/skills/pixelcraft-web/references/motion-react.md +96 -0
  355. package/skills/pixelcraft-web/references/motion-recipes.md +82 -0
  356. package/skills/pixelcraft-web/references/preact-fresh-hono.md +111 -0
  357. package/skills/pixelcraft-web/references/pwa.md +6 -1
  358. package/skills/pixelcraft-web/references/qwik.md +51 -11
  359. package/skills/pixelcraft-web/references/r3f-integration.md +69 -0
  360. package/skills/pixelcraft-web/references/react-next.md +112 -13
  361. package/skills/pixelcraft-web/references/rendering-choice.md +63 -0
  362. package/skills/pixelcraft-web/references/rendering-performance.md +80 -0
  363. package/skills/pixelcraft-web/references/rich-text-and-code-editors.md +220 -0
  364. package/skills/pixelcraft-web/references/rive-lottie.md +73 -0
  365. package/skills/pixelcraft-web/references/scene-architecture.md +132 -0
  366. package/skills/pixelcraft-web/references/server-rendered.md +106 -63
  367. package/skills/pixelcraft-web/references/shader-workflow.md +77 -0
  368. package/skills/pixelcraft-web/references/smooth-scroll.md +58 -0
  369. package/skills/pixelcraft-web/references/solid.md +67 -16
  370. package/skills/pixelcraft-web/references/state-architecture.md +107 -0
  371. package/skills/pixelcraft-web/references/styling-ecosystem.md +273 -0
  372. package/skills/pixelcraft-web/references/svelte.md +61 -11
  373. package/skills/pixelcraft-web/references/tailwind.md +40 -14
  374. package/skills/pixelcraft-web/references/video-media.md +69 -0
  375. package/skills/pixelcraft-web/references/vue-nuxt.md +37 -13
  376. package/skills/pixelcraft-web/references/web-3d-engines.md +97 -0
@@ -2,52 +2,109 @@
2
2
 
3
3
  ## Token mapping
4
4
 
5
- Use the project's supported theme/bootstrap mechanism plus external CSS assets. Exact theme APIs vary by Shiny for Python version and UI layout choice; verify local dependency docs before relying on a named constructor. Keep semantic CSS variables in assets and map plots separately because plotting libraries have independent themes.
6
-
7
- ## Layout and responsive idioms
8
-
9
- Use Shiny UI layout functions (`page_*`, layout columns/sidebar/nav panels/cards depending version) to express information architecture. Reactive outputs should occupy stable reserved space where possible. Do not depend on fixed browser width or hidden overflow for dense dashboards.
10
-
11
- ## Typography/custom fonts
12
-
13
- Use external CSS/font assets with explicit fallback/loading policy. Configure plotting typography separately. Ensure numeric/date/locale formatting happens through explicit formatting rather than raw string concatenation.
14
-
15
- ## Motion/reduced motion
5
+ Use `ui.Theme` (backed by Bootstrap 5 / Bootswatch Sass compilation) for semantic colors, typography, and spacing, paired with `ui.input_dark_mode()` and scoped CSS files under `www/`. Synchronize Matplotlib/Plotly/Altair figure styles separately because plotting libraries do not automatically inherit Bootstrap CSS variables.
6
+
7
+ ```python
8
+ from shiny import ui
9
+
10
+ app_theme = (
11
+ ui.Theme("flatly")
12
+ .add_defaults(
13
+ primary="#0074ca",
14
+ body_bg="#faf8f1",
15
+ body_color="#161b24",
16
+ )
17
+ .add_rules(".metric-note { font-variant-numeric: tabular-nums; }")
18
+ )
19
+ ```
16
20
 
17
- Reactive invalidation/progress feedback is more important than decorative animation. Use progress indicators honestly for long operations. Custom CSS/JS animation must honor reduced motion.
21
+ ## Express vs Core architecture
22
+
23
+ Choose the API surface that matches app complexity rather than mixing them randomly:
24
+
25
+ | Mode | Entry idiom | Best fit | Trade-off |
26
+ |---|---|---|---|
27
+ | **Shiny Express** | `from shiny.express import input, render, ui` | Rapid single-file prototypes, notebook-like top-to-bottom apps | Implicit UI ordering makes large modular apps harder to test and share |
28
+ | **Shiny Core** | `App(app_ui, server)` + `@module.ui` / `@module.server` | Production multi-page dashboards, reusable modules, strict separation of layout and reactive server graph | Slightly more boilerplate for tiny demos |
29
+
30
+ ```python
31
+ # Shiny Core with non-blocking ExtendedTask and streaming ui.Chat
32
+ import asyncio
33
+ from shiny import App, reactive, render, ui
34
+
35
+ app_ui = ui.page_sidebar(
36
+ ui.sidebar(
37
+ ui.input_select("region", "Region", ["EMEA", "AMER", "APAC"]),
38
+ ui.input_task_button("run_forecast", "Run forecast"),
39
+ ui.input_dark_mode(),
40
+ ),
41
+ ui.layout_columns(
42
+ ui.card(ui.card_header("Forecast"), ui.output_data_frame("forecast_tbl")),
43
+ ui.card(ui.card_header("Analyst assistant"), ui.chat_ui("assistant")),
44
+ ),
45
+ title="Revenue Forecast",
46
+ theme=app_theme,
47
+ )
48
+
49
+ def server(input, output, session):
50
+ @ui.bind_task_button(button_id="run_forecast")
51
+ @reactive.extended_task
52
+ async def compute_forecast(region: str):
53
+ await asyncio.sleep(0.1) # replace with async I/O or ThreadPoolExecutor work
54
+ return run_model_for_region(region)
55
+
56
+ @reactive.effect
57
+ @reactive.event(input.run_forecast)
58
+ def _start_forecast():
59
+ compute_forecast(input.region())
60
+
61
+ @render.data_frame
62
+ def forecast_tbl():
63
+ return render.DataGrid(compute_forecast.result())
64
+
65
+ chat = ui.Chat(id="assistant")
66
+
67
+ @chat.on_user_submit
68
+ async def _handle_chat(user_input: str):
69
+ await chat.append_message_stream(stream_llm_chunks(user_input))
70
+
71
+ app = App(app_ui, server)
72
+ ```
18
73
 
19
- ## Accessibility specifics
74
+ ## Layout, responsiveness, and Shinylive (WASM)
20
75
 
21
- Use semantic headings/labels/input bindings, visible focus, accessible error/status text, chart summaries/tables, and keyboard verification. Shiny generates web UI, but abstraction does not guarantee accessible custom layout or plot meaning.
76
+ - Build responsive layouts with `ui.page_sidebar`, `ui.page_navbar`, `ui.layout_columns(col_widths=...)`, `ui.card(full_screen=True)`, and `ui.value_box`. Reserve stable heights for reactive outputs so charts do not jump on recalculation.
77
+ - For zero-server static distribution (docs, demos, public reports), export to **Shinylive (Pyodide/WebAssembly)** with `shinylive export app site`. Verify every dependency has a pure-Python or Pyodide wheel, keep all secrets out of client code, and show an honest loading state while the WASM runtime initializes.
22
78
 
23
- ## States idiom
79
+ ## Typography, motion, and accessibility
24
80
 
25
- Understand reactive graph invalidation. Separate inputs, reactive calculations, outputs, side effects, and session/user state. Render loading/recalculating/empty/error/stale/offline states explicitly. Long jobs need progress/error/cancellation expectations and input preservation.
81
+ Load custom fonts via `ui.Theme` / `ui.head_content` with explicit fallbacks and `tabular-nums` for KPIs. Prefer reactive busy indicators (`ui.input_task_button`, `ui.Progress`) over decorative motion, and honor `prefers-reduced-motion` in custom CSS. Ensure inputs have real labels, plots include text/table alternatives, and focus does not vanish when dynamic UI rerenders.
26
82
 
27
- ## Forms idiom
83
+ ## States and forms idiom
28
84
 
29
- Use correct input controls/types/bounds/labels/help, validation timing after meaningful input, explicit submit/apply for expensive workflows, and recovery copy. Do not trigger costly reactive chains on every keystroke unless debounced/intentional.
85
+ Separate reactive calculations (`@reactive.calc`), side effects (`@reactive.effect`), and non-blocking jobs (`@reactive.extended_task`). Use `req(...)` or explicit empty/error UI panels so invalid filters never silently blank an output without explanation. Isolate per-user state inside `server(...)` (or `reactive.value` per session); never mutate module-level globals across concurrent users.
30
86
 
31
87
  ## Do/don't pairs
32
88
 
33
89
  | Do | Don't |
34
90
  |---|---|
35
- | explicit reactive dependency graph | hidden chain reactions nobody can debug |
36
- | `req()`/validation paths with user-visible explanation | output silently disappearing when inputs are invalid |
37
- | stable placeholder layout while recalculating | whole dashboard collapsing/flashing on each input |
38
- | user/session-scoped state | mutable module-global state leaking across users |
39
- | plot plus text/table alternative | color-only chart treated as complete analysis |
91
+ | `ui.Theme(...)` + `ui.input_dark_mode()` | Scattering inline CSS overrides across every component |
92
+ | `@reactive.extended_task` + `ui.input_task_button` for slow work | Blocking the shared asyncio loop with synchronous CPU/DB calls |
93
+ | Shiny Core + `@module.ui`/`@module.server` for multi-view apps | Growing a 1,500-line single-file Express script with name collisions |
94
+ | `ui.Chat` + `append_message_stream` for streaming responses | Re-rendering an entire markdown blob on every token |
95
+ | Explicit empty/error message when a query returns zero rows | Silent blank output caused by bare `req()` without user copy |
40
96
 
41
97
  ## Known traps
42
98
 
43
- Reactive graph over-invalidation, stale session state, hidden server errors, version-dependent theme APIs, plot/page theme mismatch, input focus loss during redraw, expensive recomputation, concurrency/multi-user leakage.
99
+ Blocking the event loop without `ExtendedTask`/executor offloading, mutating module globals across sessions, plot themes ignoring dark mode, Shinylive builds failing on C-extension packages or leaking credentials, and focus loss during dynamic `render.ui` redraws.
44
100
 
45
101
  ## Verification commands
46
102
 
47
103
  ```sh
48
- shiny run app.py
49
- python -m pytest
50
104
  python -m compileall .
105
+ python -m pytest
106
+ shiny run app.py
107
+ shinylive export app site
51
108
  ```
52
109
 
53
- Use browser inspection across widths/input sequences and inspect reactive errors/logs; compile success is not UI evidence.
110
+ Run `pytest` with Playwright (`shiny.playwright` / `shiny.pytest`) and inspect narrow/desktop layouts, dark mode, and empty/error states in a browser for `rendered` evidence; compilation alone is `static`.
@@ -1,65 +1,113 @@
1
1
  # Streamlit
2
2
 
3
- Evidence: current docs confirm `[theme]` keys including `primaryColor`, `backgroundColor`, `secondaryBackgroundColor`, `textColor`, `linkColor`, chart color arrays, `fontFaces`, `baseFontSize`, and light/dark/sidebar sections.
4
-
5
3
  ## Token mapping
6
4
 
7
- Use `.streamlit/config.toml` first:
5
+ Configure `.streamlit/config.toml` first using `[theme]`, `[theme.sidebar]`, and light/dark sections (`primaryColor`, `backgroundColor`, `secondaryBackgroundColor`, `textColor`, `linkColor`, `font`, `fontFaces`, `baseFontSize`, chart palettes):
8
6
 
9
7
  ```toml
10
8
  [theme]
11
9
  base = "light"
12
10
  primaryColor = "#0074ca"
13
11
  backgroundColor = "#faf8f1"
12
+ secondaryBackgroundColor = "#f1eee4"
14
13
  textColor = "#161b24"
14
+ linkColor = "#005a9e"
15
+ ```
16
+
17
+ Map semantic tokens deliberately; primary color alone is not a design system. Reach for scoped custom CSS only when `.streamlit/config.toml` cannot express a structural requirement, and never rely on autogenerated emotion/st-emotion class hashes.
18
+
19
+ ## Layout, navigation, and responsive idioms
20
+
21
+ Use `st.navigation` with `st.Page` for multipage apps so shared chrome, auth gates, and global filters live in one entrypoint instead of fragile `pages/` filename sorting:
22
+
23
+ ```python
24
+ import streamlit as st
25
+
26
+ nav = st.navigation({
27
+ "Analytics": [
28
+ st.Page("views/overview.py", title="Overview", default=True),
29
+ st.Page("views/cohorts.py", title="Cohorts"),
30
+ ],
31
+ "Operations": [st.Page("views/audit.py", title="Audit Log")],
32
+ })
33
+ nav.run()
34
+ ```
35
+
36
+ Size dataframes, charts, buttons, and containers with `width="stretch"` or `width="content"` (or an explicit pixel integer) rather than the deprecated `use_container_width` argument:
37
+
38
+ ```python
39
+ st.dataframe(df, width="stretch", hide_index=True)
40
+ st.plotly_chart(fig, width="stretch")
41
+ st.button("Export CSV", width="content")
15
42
  ```
16
43
 
17
- Map semantic tokens deliberately; primary color alone is not a design system. Use supported sidebar/light/dark tables and stable custom CSS only for gaps the config cannot express.
44
+ Avoid deeply nested `st.columns` that crush on narrow viewports. Keep `st.sidebar` focused on controls or navigation, never overloaded with both.
18
45
 
19
- ## Layout and responsive idioms
46
+ ## Caching, connections, fragments, and chat
20
47
 
21
- Use `st.columns`, containers, sidebar, tabs/expander/dialog/form intentionally. Streamlit layout is document-flow centric, not arbitrary CSS positioning. Avoid wide fixed grids and nested columns that collapse badly. Use `use_container_width` only where content benefits.
48
+ Separate serializable data caching from singleton resource caching, isolate high-frequency subtrees with `@st.fragment`, and stream conversational responses with `st.chat_message` + `st.write_stream`:
22
49
 
23
- ## Typography/custom fonts
50
+ ```python
51
+ import streamlit as st
24
52
 
25
- `fontFaces`/base font settings are supported within documented constraints; complex type control is limited. Do not load heavyweight custom CSS/fonts just to imitate a web product if hierarchy/copy/layout can carry the direction.
53
+ conn = st.connection("warehouse", type="sql")
26
54
 
27
- ## Motion/reduced motion
55
+ @st.cache_data(ttl=300, show_spinner="Loading daily metrics...")
56
+ def load_metrics(region: str):
57
+ return conn.query(
58
+ "SELECT day, revenue FROM daily_metrics WHERE region = :region",
59
+ params={"region": region},
60
+ )
28
61
 
29
- Streamlit provides little direct animation control. Use progress/spinner/status semantics honestly and avoid custom animated CSS that ignores reduced-motion. Long computation belongs in explicit status/progress patterns.
62
+ @st.cache_resource
63
+ def load_model():
64
+ return init_heavy_embedding_model()
30
65
 
31
- ## Accessibility specifics
66
+ @st.fragment
67
+ def live_filter_panel():
68
+ region = st.selectbox("Region", ["EMEA", "AMER", "APAC"], key="region")
69
+ df = load_metrics(region)
70
+ if df.empty:
71
+ st.info("No rows for this region.")
72
+ return
73
+ st.dataframe(df, width="stretch")
74
+
75
+ with st.chat_message("assistant"):
76
+ st.write_stream(stream_answer_chunks(prompt))
77
+ ```
32
78
 
33
- Use labels/help text, semantic ordering, meaningful chart titles/alt/summary, keyboard-focusable native widgets, and concise status announcements where supported. Custom HTML/components must preserve DOM semantics. Streamlit accessibility constraints are framework-dependent—verify rather than assuming full control.
79
+ - Use `@st.fragment` (and optional `run_every="30s"` for polling) so interacting with one chart or table does not rerun the whole script. Call `st.rerun(scope="app")` only when a fragment must update outer state.
80
+ - Use `st.components.v2` (`st.components.v2.component`) for new bidirectional custom web components that need direct DOM/CSS integration and typed state hooks instead of legacy iframe-only v1 wrappers.
34
81
 
35
- ## States idiom
82
+ ## Typography, motion, and accessibility
36
83
 
37
- Every input change can rerun script execution. Initialize `st.session_state` explicitly, use stable keys, cache expensive data with correct scope/invalidation, and isolate mutation. Use `st.form` to batch inputs when intermediate reruns are wrong. Render empty data, exceptions, permission/upload failure, missing secrets, stale cache, and long-running progress explicitly.
84
+ Use `fontFaces` / `baseFontSize` in `.streamlit/config.toml` for typography. Use `st.status`, `st.progress`, and `st.toast` truthfully for long-running work; custom CSS animation must honor `prefers-reduced-motion`. Always provide widget labels (use `label_visibility="collapsed"` rather than empty `""` so screen readers keep accessible names), pair charts with text takeaways or expandable data tables, and verify keyboard navigation and contrast in rendered output.
38
85
 
39
- ## Forms idiom
86
+ ## Forms and states idiom
40
87
 
41
- `st.form` batches widget state until submit. Use labels/help/placeholders correctly (labels are not optional), input validation after submit, preserve invalid values through session state/defaults, and never silently discard uploads.
88
+ Every interaction triggers a rerun of either the fragment or the script. Initialize `st.session_state` explicitly, use stable `key`s, and wrap multi-field mutations in `st.form` so intermediate edits do not trigger expensive queries. Distinguish empty datasets (`df.empty`), missing credentials/secrets, validation errors, and stale cached results visibly.
42
89
 
43
90
  ## Do/don't pairs
44
91
 
45
92
  | Do | Don't |
46
93
  |---|---|
47
- | `with st.form("batch"): ... st.form_submit_button("Review batch")` | rerunning expensive inference on every keystroke |
48
- | explicit `st.session_state.setdefault("draft", "")` | relying on widget key side effects you never inspected |
49
- | cache data with clear invalidation | per-user mutable data hidden in global cache |
50
- | theme config plus restrained scoped CSS | selectors targeting unstable autogenerated DOM classes |
51
- | `st.empty()/st.status` used for meaningful lifecycle | fake progress or spinner-only long tasks |
94
+ | `st.dataframe(df, width="stretch")` / `width="content"` | Deprecated `use_container_width=True` |
95
+ | `@st.fragment` around interactive filters or polling widgets | Rerunning expensive top-level setup on every filter change |
96
+ | `st.cache_data(ttl=...)` for DataFrames; `st.cache_resource` for models/connections | Storing per-user mutable state in global `st.cache_resource` |
97
+ | `st.navigation([st.Page(...)])` for shared multipage framing | Duplicating auth and sidebar boilerplate across `pages/*.py` |
98
+ | `st.connection(...)` with parameterized SQL queries | Interpolating widget values directly into SQL strings |
99
+ | `st.status(..., expanded=True)` reflecting real execution steps | Fake progress bars or silent spinners after an exception |
52
100
 
53
101
  ## Known traps
54
102
 
55
- Script reruns, duplicate widget IDs/keys, stale cache, secrets leakage, session concurrency, unstable DOM selectors, sidebar overload, wide-mode false assumptions, uploaded file lifecycle, heavy objects reconstructed per rerun.
103
+ Full-script reruns wiping unkeyed inputs, duplicate widget keys, mutating objects returned from `st.cache_resource` across sessions, leaking secrets into client state, brittle `.st-emotion-cache-*` CSS selectors, sidebar overload, and uploaded `UploadedFile` buffers not rewound (`seek(0)`) on reread.
56
104
 
57
105
  ## Verification commands
58
106
 
59
107
  ```sh
60
- streamlit run app.py
61
- python -m pytest
62
108
  python -m compileall .
109
+ python -m pytest
110
+ streamlit run app.py
63
111
  ```
64
112
 
65
- Browser inspection can validate DOM/visual behavior only when the app is actually run. Playwright/browser tests are rendered evidence; Python unit tests are state/static evidence.
113
+ Write headless state and interaction tests with `streamlit.testing.v1.AppTest` (`AppTest.from_file("app.py").run()`) as `static`/logic evidence, and run Playwright or manual browser checks across narrow/desktop widths for `rendered` evidence.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pixelcraft-dataviz
3
- description: Designs and verifies truthful, legible, accessible data visualization across any frontend stack. Use for charts, plots, dashboards, metrics, analytics, scientific visualization, tables as visualization, real-time/streaming data, node/link diagrams, maps/geospatial UI, SVG/canvas/WebGL/3D rendering choices, chart accessibility, and library-specific implementation in D3, Observable Plot, Vega-Lite, ECharts, Recharts/visx, Plotly, matplotlib/Altair, ggplot2, Makie, Swift Charts, or Compose/Vico.
3
+ description: Designs and verifies truthful, legible, accessible data visualization across any stack. Use for charts, plots, dashboards, analytics, scientific visualization, tables as visualization, streaming data, node graphs, maps/geospatial UI, rendering scale, and chart accessibility across D3, Observable Plot, Vega/Vega-Lite, ECharts, Chart.js, Highcharts, Recharts, Nivo, Tremor, visx, uPlot, Lightweight Charts, AntV, Plotly, MapLibre, Mapbox, Leaflet, deck.gl, Cesium, PMTiles, Turf, Cytoscape, Sigma.js, Cosmograph, Bokeh, Seaborn, matplotlib, Altair, Datashader, Perspective, Mosaic, ggplot2, Makie, Swift Charts, or Vico.
4
4
  license: MIT
5
5
  metadata:
6
6
  version: 0.1.0
@@ -12,14 +12,15 @@ Data visualization is evidence communication, not dashboard decoration. Start wi
12
12
 
13
13
  ## Surface craft
14
14
 
15
- Start with the judgment the reader must make and expose its comparison baseline, units, uncertainty and missing values. Use annotations and ordered or small-multiple views when they remove comparison work. Verify the meaning survives monochrome, resizing and keyboard access; provide a data or text alternative for canvas or hover-only details.
15
+ Start with the judgment the reader must make and expose its comparison baseline, units, uncertainty, and missing values. Use annotations and ordered or small-multiple views when they remove comparison work. Verify the meaning survives monochrome, resizing, and keyboard access; provide a data or text alternative for canvas or hover-only details.
16
16
 
17
17
  ## References
18
18
 
19
19
  - Read [references/chart-choice.md](references/chart-choice.md) when choosing among comparison, distribution, composition, relationship, time, flow, hierarchy, and geographic representations.
20
- - Read [references/encoding-tables-dashboards.md](references/encoding-tables-dashboards.md) for encoding hierarchy, axes, units, direct labeling, annotations, tables as visualization, and dashboard layout/density.
21
- - Read [references/color-accessibility.md](references/color-accessibility.md) for colorblind-safe palettes, redundant encodings, contrast, text alternatives, keyboard interaction, sonification boundaries, and reduced motion.
22
- - Read [references/realtime-graphs-maps-scale.md](references/realtime-graphs-maps-scale.md) for streaming updates, node graphs, maps, SVG/canvas/WebGL/3D scale decisions, and performance verification.
20
+ - Read [references/encoding-tables-dashboards.md](references/encoding-tables-dashboards.md) when designing encoding hierarchy, axes, units, direct labeling, annotations, tables as visualization, and analytical dashboard layout/density.
21
+ - Read [references/color-accessibility.md](references/color-accessibility.md) when selecting colorblind-safe palettes, redundant encodings, contrast, text alternatives, keyboard navigation, sonification boundaries, and reduced motion.
22
+ - Read [references/realtime-graphs-maps-scale.md](references/realtime-graphs-maps-scale.md) when implementing streaming updates, node graphs (`@xyflow/react`, Cytoscape, Sigma.js, Cosmograph, AntV G6), and SVG/Canvas/WebGL/WASM scale tiers (Perspective, Mosaic/DuckDB-Wasm, Datashader).
23
+ - Read [references/maps-geospatial.md](references/maps-geospatial.md) when selecting or implementing mapping and geospatial engines (MapLibre GL JS, Mapbox GL JS, Leaflet, OpenLayers, CesiumJS, deck.gl, kepler.gl), Protomaps/PMTiles, Turf.js spatial ops, choropleth pitfalls, or accessible map alternatives.
23
24
  - Read [references/libraries.md](references/libraries.md) when implementing in a specific charting library or language ecosystem.
24
25
 
25
26
  ## Required workflow
@@ -36,28 +37,24 @@ Start with the judgment the reader must make and expose its comparison baseline,
36
37
 
37
38
  | Concern | Rule |
38
39
  |---|---|
39
- | truthfulness | Never fabricate data, smooth away meaningful variation, truncate axes to exaggerate, or hide missing/uncertain values. |
40
- | baseline | Bar/area magnitude charts include zero unless there is an explicit indexed/change baseline; line charts may use nonzero scales only when labeled. |
41
- | color | Color never carries meaning alone; use direct labels, shape, line style, pattern, position, or text as a redundant channel. |
42
- | interaction | Hover/tooltips are enhancement. Keyboard, touch, screen-reader, and print/static export must retain the substance. |
43
- | density | Match density to decision frequency. Do not turn every metric into an equal card or every dataset into a chart. |
44
- | motion | Animated transitions must explain object constancy or state change; provide reduced-motion/static behavior. |
45
- | performance | Choose rendering technology after measuring element count, update rate, and interaction—not because WebGL sounds advanced. |
46
- | accessibility | Every chart has a text equivalent: summary plus underlying data table/list or structured access appropriate to its complexity. |
40
+ | truthfulness & downsampling | Never fabricate data, truncate magnitude bars, or downsample `10k–1M+` time-series with naive `every-Nth` slicing that erases incident spikes—use **`LTTB` (Largest-Triangle-Three-Buckets)** or **`Min-Max` pixel envelopes**, re-querying raw detail on zoom. |
41
+ | latency & query resilience | Render the **primary chart shell in `< 1–2 s`**, keep **filter, hover, cross-filter, and brush responses within `100–200 ms`**, and handle **concurrent multi-user load + explicit query timeouts/cancellation** cleanly without frozen spinners. |
42
+ | numeric semantics & `0` vs `null` | Enforce `font-variant-numeric: tabular-nums`, **True Minus `U+2212` (`−`)** on negative values, right-aligned numeric columns, explicit unit headers (`$ USD`, `ms`, `%`), and **strict visual separation between measured `0` and missing `null / — / N/A`** (break lines or render muted `—`; never coerce `null` to `0`). |
43
+ | provenance, definitions & SLA freshness | Display **visible data source attribution**, **metric definitions** (formula, scope, exclusions), explicit timezone (`UTC` vs local IANA zone), and a **Data Freshness / SLA Staleness badge** (`Updated 12s ago` escalating to warning/stale state when ingestion lags SLA). |
44
+ | baseline & monochrome | Bar/area magnitude charts include zero unless an explicit indexed/delta baseline is labeled; color never carries meaning alone—pair Okabe–Ito / Viridis palettes with direct labels, dash style, shape, or pattern so charts survive grayscale/CVD. |
45
+ | PII redaction & export safety | Hover/tooltips are progressive enhancement. **Mask/redact PII on chart tooltips, QA screenshots, and downloadable CSV/XLSX exports**, and neutralize **OWASP CSV/XLSX formula injection** (`=`, `+`, `-`, `@`, `\t`, `\r` prefixes). |
46
+ | accessibility | Every chart ships a **screen-reader accessible data-table / text summary fallback** plus **composite keyboard data-point navigation** (`<= 1` `Tab` stop + arrow keys across series/points). |
47
47
 
48
48
  ## Anti-slop warnings
49
49
 
50
- Avoid the default analytics collage: four KPI cards with invented deltas, a gradient area chart, a donut with unreadable slices, a purple-blue palette, unexplained “live” badges, generic axis ticks, and a legend that forces constant eye travel. Avoid chartjunk copied from demos: heavy gridlines, shadows, glassmorphism, 3D perspective, meaningless animated counters, and decorative map pin clouds. Distinctiveness belongs in editorial judgment, annotation quality, composition, and domain-specific emphasis—not in distorting evidence.
50
+ Avoid the default analytics collage: four KPI cards with invented deltas, unattributed metrics without definitions or source provenance, a gradient area chart, a donut with unreadable slices, a purple-blue palette, unexplained "live" badges without SLA timestamps, naive `every-Nth` downsampled lines hiding outages, `null` plotted as `0`, and legends forcing constant eye travel. Distinctiveness belongs in editorial judgment, annotation quality, composition, and domain-specific emphasis—not in distorting evidence.
51
51
 
52
52
  ## Pre-submit checklist
53
53
 
54
- - [ ] analytical question, unit, population, filter, timezone, freshness, and decision are explicit;
55
- - [ ] chart type matches the question rather than library convenience;
56
- - [ ] axis baseline/scale/transformation and missing-data treatment are defensible;
57
- - [ ] direct labels or annotation carry the primary reading path;
58
- - [ ] palette is colorblind-safe and meaning is redundantly encoded;
59
- - [ ] empty/one/many/extreme/null/long-label/locale states are designed;
60
- - [ ] text alternative and keyboard/screen-reader path exist;
61
- - [ ] update/rendering performance was measured or explicitly labeled `not-checked`;
62
- - [ ] static export/print/responsive behavior preserves legibility;
63
- - [ ] final claims separate rendered evidence from static inspection/model judgment.
54
+ - [ ] analytical question, unit (`$ USD`, `ms`, `%`), **visible data source attribution**, **metric definitions**, explicit timezone (`UTC` vs local), and **Data Freshness / SLA Staleness badge** are visible;
55
+ - [ ] **primary chart shell `< 1–2 s`**, **filter/hover/brush response `100–200 ms`**, **concurrent multi-user load + query timeout recovery**, and **`LTTB` / `Min-Max`** dense downsampling verified;
56
+ - [ ] numeric columns/labels enforce `tabular-nums`, right alignment, **True Minus `U+2212` (`−`)**, and strict **`0` vs `null / — / N/A`** distinction;
57
+ - [ ] direct labels or annotations carry the primary reading path; palette is CVD/grayscale-safe with redundant non-color encoding;
58
+ - [ ] **PII masking/redaction** enforced on screenshots and exports, and CSV/XLSX exports escape leading `=`, `+`, `-`, `@`, `\t`, `\r` against formula injection;
59
+ - [ ] **screen-reader accessible data-table / text summary fallback + keyboard data-point navigation** verified;
60
+ - [ ] **Checklist-Until-Passing Stop-Gate (`<HARD-GATE>`):** walk every checklist item above + run `slop-scan.mjs --fail-on p2`, `check-contrast.mjs`, and `check-acceptance.mjs .pixelcraft/acceptance.json` (`pixelcraft-review`) in a `Fix → Re-verify` loop until passing (`0` `fail`/`pending` rows, `rendered` evidence at real cardinality per `Rule #0.3`).
@@ -81,7 +81,7 @@ Interactive visualization must define:
81
81
  - legend/filter/keyboard equivalent;
82
82
  - focus restoration after zoom/filter/data refresh.
83
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.
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. **Highcharts' `accessibility` module** is a useful benchmark pattern for this interaction model: it provides composite roving keyboard navigation across series and points, auto-generated screen-reader descriptions, an optional synchronized data table, and high-contrast pattern fills.
85
85
 
86
86
  ## Screen readers and live data
87
87
 
@@ -92,7 +92,7 @@ Do not construct hundreds of Tab stops. Prefer one composite widget with roving
92
92
 
93
93
  ## Sonification boundary
94
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.
95
+ Sonification can help users perceive trend, rhythm, and outliers, but support varies widely and it is never a WCAG substitute for textual/tabular access. **Highcharts' `sonification` module** illustrates the right boundary: opt-in audio playback, explicit play/pause and speed controls, configurable pitch/instrument mapping, and spoken context cues, always paired with primary visual, keyboard, and tabular equivalents. Never autoplay sound.
96
96
 
97
97
  ## Motion and cognitive load
98
98
 
@@ -52,46 +52,56 @@ Annotation should answer “what should I notice?” Use sparse domain-specific
52
52
 
53
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
54
 
55
- ## Formatting and units
55
+ ## Honest numeric semantics, timezone, and SLA freshness
56
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.
57
+ - **Explicit unit headers & axis labels**: put exact units and currency codes in column headers or axis titles (`Revenue ($ USD)`, `P99 Latency (ms)`, `Error Rate (%)`), never hidden exclusively inside hover tooltips.
58
+ - **`tabular-nums` + True Minus `U+2212` (`−`)**: apply `font-variant-numeric: tabular-nums lining-nums` on every numeric column, KPI, tick, and live counter, and render negative numbers with **True Minus `U+2212` (`−`)** rather than ASCII hyphen-minus `U+002D` (`-`) so `−` matches `+` glyph width and optical crossbar height:
63
59
 
64
- ## Tables as visualization
60
+ ```ts
61
+ export function formatMetric(value: number | null | undefined, unit = ''): string {
62
+ if (value === null || value === undefined || Number.isNaN(value)) return '—'; // never coerce null to 0
63
+ const formatted = new Intl.NumberFormat('en-US', { maximumFractionDigits: 2 }).format(Math.abs(value));
64
+ const sign = value < 0 ? '\u2212' : '';
65
+ return `${sign}${formatted}${unit ? `\u00A0${unit}` : ''}`;
66
+ }
67
+ ```
65
68
 
66
- Tables are often the correct visual representation. Design them as scanning instruments:
69
+ - **Strict separation between `0` (measured zero) and `null / — / N/A` (missing/uncollected)**:
70
+ - **In tables/KPIs**: render measured zero as `0` / `0.00` in standard foreground ink; render missing/uncollected values as muted `—` or `N/A` (`aria-label="No data collected"`) with an explanatory tooltip (`Sensor offline 02:10–02:25 UTC`).
71
+ - **In line/area charts**: break the path across `null` intervals (`defined(d => d.value !== null)` in D3/Plot, `connectNulls: false` in ECharts/Recharts) or bridge only with an explicit dashed "missing interval" style—never drop `null` to the `0` baseline!
72
+ - **Explicit display timezone (`UTC` vs local) & Data Freshness / SLA Staleness badge**:
73
+ - Label the active timezone visibly (`2026-11-25 14:00 UTC` or `Local · America/New_York`) and provide a `UTC <-> Local` switch on operational incidents/logs.
74
+ - Pair every live or warehouse-backed region with a **Data Freshness / SLA Staleness badge** (`Updated 12s ago · SLA 60s` -> transitions to high-contrast warning `Stale · 14m behind SLA` when `now - max(event_ts) > sla_ms`).
75
+
76
+ ## Tables as visualization & safe exports
77
+
78
+ Tables are often the sharpest visual representation. Design them as high-precision scanning instruments:
67
79
 
68
80
  | Rule | Application |
69
81
  |---|---|
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 |
82
+ | alignment | right-align numeric/timestamp columns (`text-align: right; font-variant-numeric: tabular-nums`); left-align text/IDs |
83
+ | units | put shared units in column headers (`Latency (ms)`, `Cost ($ USD)`); repeat inline only when rows mix currencies/units |
84
+ | `0` vs `null` | `0.0` = observed zero; muted `—` / `N/A` = null/unreported (sort `null` consistently last regardless of `ASC`/`DESC`) |
85
+ | comparison | use inline bars/sparklines only when scale + zero/baseline are consistent and labeled across rows |
86
+ | state | pair text + icon/shape + color for status; never rely on red/green fill alone |
87
+ | overflow | never truncate the distinguishing suffix of IDs/hashes (`…9f4a` or middle-ellipsis + one-click copy) |
88
+ | CSV/XLSX export safety | neutralize **OWASP Formula Injection**: prefix string cells starting with `=`, `+`, `-`, `@`, `\t`, or `\r` with `'` before CSV/XLSX export (while exporting true numeric negatives as native numbers in XLSX) so opening exports in Excel/Sheets cannot trigger `DDE` or formula execution |
78
89
 
79
- Sparklines show shape, not exact magnitude. Pair them with current/range values and state whether axes are shared across rows.
90
+ > **Cross-skill boundary:** `pixelcraft-dataviz` governs analytical tables, numeric alignment, visual encodings, inline sparklines, and dashboard information density. Operational table CRUD (row selection, bulk actions, inline editing, keyset pagination, saved URL filters) coordinates with `pixelcraft-data-apps` and `pixelcraft-patterns`.
80
91
 
81
92
  ## Dashboard layout and density
82
93
 
83
94
  Start from decisions, not chart inventory.
84
95
 
85
- 1. Put system health/outliers/actions first; contextual trends second; exploratory detail later.
96
+ 1. Put system health/outliers/actions and **Data Freshness / SLA status** first; contextual trends second; exploratory detail later.
86
97
  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.
98
+ 3. State time range, explicit timezone (`UTC` vs local), freshness SLA, source scope, and URL-serialized filters once per coherent region.
99
+ 4. Preserve drill-down context: selection, filter, sort, time range, timezone, scroll, and deep-link URL state.
89
100
  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.
101
+ 6. High-frequency operations favor dense `tabular-nums` tables and exception queues; infrequent executive overview favors fewer, larger comparisons.
92
102
 
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.
103
+ Required dashboard states: no data yet, partial ingestion, **SLA 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
104
 
95
105
  ## Anti-slop dashboard pattern
96
106
 
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.
107
+ 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, True Minus `−` formatting, and SLA freshness provenance.