@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,65 @@
1
+ # Layout quality inspection
2
+
3
+ Use this reference after choosing a composition and again on rendered output. It converts layout critique from vague taste into observable checks. Do not use scores as proof of beauty; use them to find defects and explain trade-offs.
4
+
5
+ ## Mode-dependent complexity budget
6
+
7
+ | Mode | Default complexity posture | Warning signs |
8
+ |---|---|---|
9
+ | Operate | low-to-medium density, high grouping discipline, familiar scanning structure | competing accents, ungrouped dense controls, decorative fragments near primary work |
10
+ | Read | low clutter, long-line control, strong vertical rhythm | dense side noise, interrupted measure, excessive cards/rules |
11
+ | Persuade | medium complexity with one controlled focal spectacle | several hero effects at once, feature clutter, decorative copy |
12
+ | Experience/Play | higher sensory complexity allowed when orientation and floor survive | unreadable HUD/navigation, uncontrolled motion/contour noise |
13
+ | Communicate | lowest renderer-dependent complexity | background interference, fragile alignment, ink/data waste |
14
+ | Constrained/game/spatial | complexity budgeted by distance, input speed, and safety | tiny targets, focal rivalry, occlusion, glance failure |
15
+
16
+ Complexity is not a moral quality. Dense expert tooling can be correct; sparse marketing can still be empty. Judge whether grouping and focal control make the complexity legible.
17
+
18
+ ## Static inspection checklist
19
+
20
+ | Dimension | Pass condition | Defect examples |
21
+ |---|---|---|
22
+ | focal path | first/second/third visual priority can be named without hesitation | everything bold/large/accented; primary action visually weaker than decoration |
23
+ | alignment | repeated edges/centerlines/baselines are intentional; deviations have purpose | near-alignment drift, accidental 1–3px mismatches, orphan controls |
24
+ | grouping | related items share proximity/containment; unrelated groups have clear separation | equal spacing everywhere, wrong grouping by proximity, boxed noise |
25
+ | density | density varies deliberately by importance/mode | uniform compaction or uniform whitespace with no information hierarchy |
26
+ | balance | visual weight feels stable without requiring symmetry | heavy media cluster unsupported by structure, accidental empty quadrant |
27
+ | contour clutter | edges, borders, shadows, icons, and chart marks do not compete | every atom carded, nested outlines, decorative grid behind dense data |
28
+ | measure/rhythm | spacing scale and text rhythm survive real content | magic numbers per component, broken baseline/measure after localization |
29
+ | focal area | primary content/action lies in expected scan/input region for modality | key control stranded below fold/safe area/overscan without reason |
30
+ | responsive integrity | narrowing reorders/restructures rather than merely shrinking | side-by-side squeeze, clipped labels, hidden priority actions |
31
+ | orientation | user can tell location, progress, and escape route | immersive layout with no context, missing back/navigation state |
32
+
33
+ ## Rendered inspection procedure
34
+
35
+ 1. Inspect the smallest supported viewport first; then typical and wide sizes.
36
+ 2. Squint/blur mentally or zoom out: identify the first focal object and whether it matches intent.
37
+ 3. Trace the visual path using actual content order, not placeholder-perfect content.
38
+ 4. Count visible accents/borders/containers in the primary region. If the count cannot be justified, remove visual noise before adding emphasis.
39
+ 5. Measure or inspect repeated edges: card/container alignment, text baselines, icon centers, split boundaries, sticky regions.
40
+ 6. Resize through breakpoints rather than jumping only between canned screenshots.
41
+ 7. Test text expansion/contraction, RTL mirroring, long data, empty data, and missing media.
42
+ 8. Record defects by region and severity; do not report “spacing feels off” without an observable example.
43
+
44
+ ## Layout repair order
45
+
46
+ 1. restore task access, clipping, overflow, keyboard/focus visibility, and orientation;
47
+ 2. correct grouping/hierarchy before changing decoration;
48
+ 3. remove duplicate containment/borders/accents;
49
+ 4. repair rhythm and alignment using semantic spacing/layout constraints;
50
+ 5. adjust optical balance only after structural defects are fixed;
51
+ 6. re-render the affected breakpoint/state, not the entire matrix by default.
52
+
53
+ ## Hard warnings
54
+
55
+ - Do not equate whitespace with quality; unused space can be as defective as clutter.
56
+ - Do not equate density with expertise; expert users need grouping and predictability, not noise.
57
+ - Do not break learned operational patterns merely to look distinctive.
58
+ - Do not optimize one static breakpoint while destroying resize/reflow behavior.
59
+ - Do not use overlay text on busy imagery unless contrast and reading priority remain measurable in the real asset.
60
+
61
+ ## Measurable geometry inventory
62
+
63
+ When rendered evidence is available, measure rather than guess: estimated uncovered viewport ratio, content centroid/asymmetry, repeated overlap count, maximum content width, visible grid count, and resize behavior. In the live corpus the estimated whitespace median was approximately **0.57** with a middle half around **0.42–0.68**; obvious content-center deviation appeared in roughly **18%** of pages, while some positive overlap appeared in roughly **76%** because heroes, cards, media, and sticky controls overlap intentionally. Median maximum content width was approximately **784 px**, with an upper quartile around **1073 px** at a 1440 px viewport.
64
+
65
+ These measurements are not targets. High whitespace can mean emptiness; low whitespace can mean density done well; overlap can be intentional layering or a defect. Calibrate interpretation by mode: dense Operate surfaces, editorial Read surfaces, and expressive Persuade scenes should not share one whitespace expectation. Use numbers to locate regions for inspection and compare before/after states. Full-bleed media is an explicit exception, while body text and operational controls need deliberate measure constraints.
@@ -0,0 +1,41 @@
1
+ # Layout and composition
2
+
3
+ ## Composition before components
4
+
5
+ - Choose the primary scan path: Z/F pattern, editorial column, instrument cluster, object-led spatial composition, timeline, index, or task-first workspace.
6
+ - Use asymmetry deliberately: unequal columns, anchored negative space, diagonal/orthogonal tension, or alignment interruption. Do not center everything by default.
7
+ - Establish one dominant element per viewport/screen region. Supporting elements need quieter scale, contrast, and motion.
8
+ - Equal left/right content edges are often more important than identical internal column widths.
9
+ - Cards are one containment tool, not a page structure. Consider tables, lists, editorial columns, comparison matrices, timelines, canvases, toolbars, inspectors, and spatial regions.
10
+
11
+ ## Grids and rhythm
12
+
13
+ - Define a small spacing base (commonly 4 or 8 in screen UI) and semantic multipliers; dense expert tools may use a smaller rhythm but need stronger alignment discipline.
14
+ - Use consistent optical alignment, not merely numeric alignment. Correct for icon mass, uppercase height, hanging punctuation, and image crop.
15
+ - Dense Operate UI: prioritize scanlines, aligned values, persistent controls, predictable row heights, and visible state.
16
+ - Persuade/Read: vary pacing deliberately across sections; repetition without rhythm creates monotony.
17
+ - Do not let grid lines become decoration. Grids should control placement, measurement, or orientation.
18
+
19
+ ## Density by mode
20
+
21
+ | Mode | Density posture | Key risk |
22
+ |---|---|---|
23
+ | Persuade | lower density, strong pacing | empty generic hero without substance |
24
+ | Operate | medium/high density, stable scanlines | decorative spacing hides data/actions |
25
+ | Read | measure-controlled medium density | long lines, weak paragraph rhythm |
26
+ | Experience | variable density by scene | disorientation without navigation feedback |
27
+ | Play | scene-dependent, HUD clarity | effects obscure critical state |
28
+ | Communicate | conservative density | client rendering destroys layout |
29
+
30
+ ## Adaptation
31
+
32
+ - Restructure at breakpoints/size classes; do not simply scale desktop down.
33
+ - Decide what becomes navigation, disclosure, secondary pane, or sequence at narrow widths.
34
+ - Compare the same task across size and input classes: a wide comparison table may become aligned summaries with detail on touch, and a persistent sidebar may become reachable disclosure or navigation. Keep comparable facts and destinations reachable; prefer the same semantic structure when it already works.
35
+ - Preserve primary action visibility without covering content with sticky chrome.
36
+ - Test landscape/portrait, split window, dynamic text, RTL mirroring, safe area, virtual keyboard, controller focus order, and minimum terminal size as applicable.
37
+ - Horizontal scrolling can be correct for data tables/timelines, but never accidental page overflow.
38
+
39
+ ## Hierarchy checks
40
+
41
+ Squint test: primary/secondary/tertiary grouping should remain visible when detail blurs. Remove one visual property at a time; if hierarchy disappears only when color is removed, color-only dependence is likely. Compare real content lengths rather than lorem ipsum symmetry.
@@ -0,0 +1,76 @@
1
+ # Motion and interaction
2
+
3
+ Evidence base: usability research, platform motion/accessibility guidance, rendering-performance constraints, and the accessibility floor.
4
+
5
+ ## Purpose before spectacle
6
+
7
+ Motion earns its cost only when it acknowledges input, shows causality, preserves orientation, communicates progress/state, or creates the direction's single signature moment. Apple gives the same constraint: purposeful, brief, precise, optional motion—not motion for its own sake. Showcase spectacle is not permission to sacrifice usability; celebrated interfaces are still wrong when motion blocks comprehension, control, or access.
8
+
9
+ ## Budgets
10
+
11
+ | Layer | Budget posture |
12
+ |---|---|
13
+ | input acknowledgment | immediate; roughly 50–120ms; never delayed behind a scene animation |
14
+ | local state change | roughly 100–250ms; most UI animation belongs in a 100–500ms envelope |
15
+ | sheet/panel/route transition | roughly 200–400ms; shortest non-jarring duration |
16
+ | scroll-linked progress | visually respond within one normal wheel/touch increment; never require pixel-perfect scrolling |
17
+ | concurrent choreographed elements | normally 1 primary + at most 2 supporting motions; cascade only when order encodes meaning |
18
+ | ambient/looping motion | default none in Operate/Read; if used, subtle, pausable, and outside the reading focus |
19
+ | rendering | target compositor work; animate transform/opacity, avoid layout/paint-triggering properties and `transition: all` |
20
+ | assets | motion cannot justify layout shift, delayed LCP media, blocked input, or main-thread long tasks |
21
+
22
+ Tokenize semantic durations/easings (`feedback.instant`, `state.standard`, `scene.enter`) rather than scattering raw milliseconds.
23
+
24
+ ## Technique library
25
+
26
+ | Technique | Use when | Web implementation | Native/mobile equivalent | Reduced/fallback path | Cliché risk |
27
+ |---|---|---|---|---|---|
28
+ | scroll-driven reveal/progress | progress itself is spatial/temporal: drawing a route, filling a meter, comparing before/after | CSS scroll-driven animations or small observer-driven transform/opacity; no input hijacking | scroll-linked offset/phase in SwiftUI/Compose/Flutter | static final state or chapter thumbnails; progress readable without motion | every section fading/sliding upward becomes meaningless decoration |
29
+ | pinned/sticky narrative | one artifact needs persistent context while chapters annotate it | sticky media pane + normal document flow; sparse keyed state changes | split pane or top preview + pageable chapters | linear static layout with all annotations visible | scrolljacked full-screen scenes that trap the user |
30
+ | View Transitions/shared element | object identity continues across route/state | same-document `startViewTransition` or cross-document opt-in; name only meaningful shared elements | native shared-element/container transform transitions | instant navigation; preserve focus and announce route change | morphing everything because the API exists |
31
+ | cursor/hover response | pointer precision adds inspection, magnetic affordance, or localized reveal | transform/opacity near cursor; keyboard focus receives equivalent state | touch/long-press/context menu or focus ring equivalents | static emphasis; no hover-only disclosure | custom cursor replacing the system cursor without value |
32
+ | text reveal | short editorial headlines where sequencing creates voice | per-line or per-phrase mask/translate once; keep text selectable and semantically whole | attributed text/line-level fade or no-op | all words visible instantly | letter-by-letter spectacle on long/localized copy |
33
+ | page transition | spatial continuity or scene change is real | View Transition or brief opacity/transform; keep browser navigation expectations | platform navigation transition/spring | instant transition | ceremonial transitions that delay every task |
34
+ | micro-interaction | state needs confirmation or physical cause | pressed scale/color/token state within 100ms; no layout shift | haptics/platform touch feedback plus visual state | static state/icon/color change | bouncy jelly controls on serious operations |
35
+ | WebGL/shader accent | material/light/data inherently spatial or generative | one bounded canvas/scene; pause offscreen; static poster; GPU/memory budget | Metal/Vulkan/OpenGL/native scene only at signature surface | high-quality static image/canvas fallback | default orb/fluid/aurora background |
36
+ | kinetic type/marquee | ticker/log/scoreboard semantics or deliberate print/poster voice | transform-only loop, pause on hover/focus, duplicate content accessibly | ticker view with reduced speed/control | static wrapped text | meaningless infinite marquee as faux award-site signal |
37
+
38
+ ## Scrolljacking boundary
39
+
40
+ Default answer: **do not scrolljack**. Scroll manipulation commonly disorients users; when stakeholders insist, use it only for functional value, keep required scroll input small, make change visible quickly, preserve normal scrollbar/progress, provide direct section links, avoid precision-dependent reveals, and user-test the rate. Never hijack input, invert direction, suppress keyboard/scrollbar behavior, or make content vanish on a slight overscroll.
41
+
42
+ ## Reduced-motion matrix
43
+
44
+ 1. preserve causality with an instant state change;
45
+ 2. replace spatial movement with opacity/fade or static crossfade;
46
+ 3. show a static intermediate/endpoint sequence;
47
+ 4. provide text/icon/haptic/audio equivalent where appropriate;
48
+ 5. respect `prefers-reduced-motion` on web and platform Reduce Motion settings natively; Apple specifically calls out limiting automatic/repetitive zoom, scale, peripheral motion, z-depth, and blur transitions.
49
+
50
+ Deleting feedback is not a reduced-motion path. Motion-triggering vestibular risk includes large-scale panning/zooming, spinning, parallax, autoforwarding carousels, and scrolljacking.
51
+
52
+ ## Implementation checklist
53
+
54
+ - input stays interactive during nonessential animation;
55
+ - focus never remains inside removed content;
56
+ - no flashing/rapid oscillation or photosensitive pattern;
57
+ - animations pause offscreen/backgrounded and do not run in dense operational screens;
58
+ - DOM/visual order remain coherent for keyboard, controller, and assistive tech;
59
+ - frame budget verified on a mid-tier device, not only a developer workstation;
60
+ - reduced-motion, forced-colors, high-contrast, RTL, 200% text, and narrow viewport paths inspected;
61
+ - one sentence recorded for why each signature motion exists and what replaces it when motion is unavailable.
62
+
63
+ ## Detectable motion inventory
64
+
65
+ Before preserving a motion system, inventory what the rendered page actually exposes: animation and transition counts, canvas/WebGL presence, smooth-scroll libraries, scroll-driven CSS, view transitions, custom cursor styles, and detectable `prefers-reduced-motion` rules. In the live corpus, a detectable reduced-motion stylesheet appeared on only about **58%** of pages, while likely scroll manipulation appeared on about **21%** and custom cursor styles on about **30%**. Use those figures as prevalence evidence for verification failure, never as permission.
66
+
67
+ Detection is heuristic. Script/global inspection can false-positive library names, cross-origin CSS may be unreadable, and a media query does not prove correct behavior. Absence of a detectable media query is a lead, not a violation; presence is not proof either. Verify reduced motion by rendering the actual setting.
68
+
69
+ Required gate:
70
+
71
+ 1. audit Lenis/Locomotive or equivalent smooth-scroll libraries, hidden overflow, wheel/touch input remapping, pinned scroll regions, and missing or broken direct section links;
72
+ 2. scroll manipulation requires a user-facing functional reason and explicit waiver;
73
+ 3. custom cursors require keyboard/touch parity plus an ordinary system-cursor fallback;
74
+ 4. canvas/WebGL content requires semantic text, static fallback, pause/mute control where applicable, and a measured performance budget;
75
+ 5. every signature motion names its reduced-motion replacement before implementation;
76
+ 6. keep initial-viewport idle looping animations at zero on operational/product surfaces—concentrate motion budget on short, compositor-only interactive transitions (`transform`/`opacity`) and prefer browser-native CSS Scroll-Driven Animations, `@starting-style`, and View Transitions API with progressive fallbacks over heavy JS animation runtimes.
@@ -0,0 +1,71 @@
1
+ # Typography, pairing, and expressive type
2
+
3
+ Evidence base: typographic craft traditions, platform font behavior, pairing practice, readability constraints, and localization requirements.
4
+
5
+ ## Voice before font
6
+
7
+ Choose a typographic voice from the direction: editorial, instrumental, humanist, technical, archival, playful, ceremonial, native/platform. “Clean” is not a voice. Do not default to Inter/Geist-like neutrality unless density, platform fit, script coverage, or existing brand continuity justify it.
8
+
9
+ | Voice | Pairing behavior | Best fit |
10
+ |---|---|---|
11
+ | editorial | high-contrast or text serif display + quiet body face + small metadata sans | publishing, culture, luxury, analysis |
12
+ | instrumental | legible grotesque + tabular monospace/data numerals | operations, measurement, finance, monitoring |
13
+ | humanist | open-aperture sans/serif, moderate contrast | health, education, trust-heavy consumer |
14
+ | technical | engineered sans/mono, precise numerals, compact metadata | developer, scientific, industrial |
15
+ | archival | durable text serif + caption/indexing system | museums, documents, history |
16
+ | playful | expressive display constrained to headings + highly readable body | games, children, casual commerce |
17
+ | native | system typeface/scale | high-frequency platform-conforming apps |
18
+
19
+ ## Pairing method
20
+
21
+ 1. Choose the **anchor** first: usually the body/UI face because it carries most reading.
22
+ 2. Add contrast only where it has a job: display voice, data voice, metadata voice, or code/log voice.
23
+ 3. Balance contrast with compatibility: comparable x-height/proportions often sit together better; contrast should come from structure, not clashing details.
24
+ 4. Assign explicit roles before naming fonts: display/title/heading/body/body-small/caption/control/data/code.
25
+ 5. Prefer one family with optical sizes/width/weight axes when hierarchy is more important than personality; use superfamilies when serif/sans/mono coordination is built in.
26
+ 6. Consult real specimens to understand scale/spacing/context, then design your own system; do not copy a pairing because it is fashionable.
27
+ 7. Limit active families/weights for performance and coherence. Two well-deployed faces beat five shallow ones.
28
+
29
+ ## Expressive techniques
30
+
31
+ | Technique | Use when | Rules | Caveat/slop risk |
32
+ |---|---|---|---|
33
+ | oversized display | short decisive copy can structure the page | set line breaks manually/responsively; reserve space; keep controls visibly subordinate | giant cropped word as generic award-site costume |
34
+ | width/weight contrast | same family needs strong hierarchy without extra fonts | compare condensed black display to regular-width text; test rendering across platforms | variable-font axis animation becomes the point rather than the message |
35
+ | serif display + sans interface | editorial authority plus operational clarity | display carries voice; UI controls stay boring/readable | cream/serif/orange neo-slop when detached from subject |
36
+ | mono data voice | measurement, provenance, logs, indexing | use mono for aligned numeric/categorical evidence, not as decoration | fake terminal aesthetic with no data |
37
+ | small-caps/metadata system | archival/editorial structure | use true small caps or carefully styled uppercase; consistent metadata grammar | meaningless uppercase eyebrow labels |
38
+ | kinetic/revealed type | short campaign statements | line/phrase-level reveal, once, selectable text | letter-by-letter animation that harms localization and reading |
39
+ | vertical/rotated type | culturally meaningful vertical writing or navigational furniture | vertical CJK requires real line-breaking/font review; Latin rotation only for labels/metadata | rotated text that becomes unreadable chrome |
40
+ | expressive numerals | scoreboards, indexes, finance, measurement | choose lining/tabular behavior intentionally; align decimal/degree/unit | oversized numerals implying fake metrics |
41
+
42
+ ## Scale, measure, and detail
43
+
44
+ - Dense UI scale ratio roughly 1.125–1.2; editorial/persuasion roughly 1.25–1.4. Do not create twelve indistinguishable steps.
45
+ - Long-form Latin target around 65–75 characters per line; adjust rather than copying blindly for CJK/Arabic/Indic and dense UI.
46
+ - Latin body line-height roughly 1.45–1.65; tighten display while protecting ascenders/diacritics; dense UI may tighten only when scanlines remain clear.
47
+ - Use optical size when available: display optical sizes tighter/sharper, text optical sizes sturdier.
48
+ - Use tabular figures for changing/aligned data; proportional figures for prose unless alignment matters.
49
+ - Avoid tracked-out lowercase; uppercase/labels can receive modest tracking. Extreme negative tracking breaks script rendering.
50
+ - Preserve hanging punctuation, baseline rhythm, paragraph spacing, and orphan/widow behavior where platform allows.
51
+
52
+ ## International script floor
53
+
54
+ Declare fallback behavior per script, not just `sans-serif`: Latin extended/combining marks, Cyrillic, Greek, Arabic, Hebrew, Indic shaping, Thai/Lao/Khmer line breaking, CJK/Hangul, emoji/ZWJ, and numeric systems required by the audience. Do not fake bold/italic, do not put translated copy in Latin-only display fonts that silently fall back, and do not let expressive crop/tracking/masking damage shaping.
55
+
56
+ ## Platform transfer
57
+
58
+ Web: preload only critical files, reserve metrics/space, use `font-display` intentionally. iOS/macOS: Dynamic Type-compatible scaling. Android: respect sp scaling/type roles. Flutter/RN/Compose/SwiftUI: map semantic roles once rather than copying CSS pixels. TUI: weight/color/underline/inverse only; no assumed ligatures. Email: robust fallback stacks; custom fonts cannot carry meaning. Game UI: validate SDF/bitmap atlases, memory, localization glyphs, and viewing distance.
59
+
60
+ ## Rendered typography inventory
61
+
62
+ Measure what the browser actually rendered rather than counting only the authored scale. Record active families, weight/style faces, distinct rendered sizes, dominant line-heights, display letter-spacing, and maximum-to-minimum rendered size ratio. An earlier gallery corpus had medians of **2 active families**, **4 rendered sizes**, and a **4.6×** ratio. A later first-viewport sample with many canvas and media scenes had medians of **1 family** and **2 sizes** in the detectable DOM. Keep these cohorts separate: a first-screen DOM sample cannot count type painted into a graphic, and neither corpus sets a quota.
63
+
64
+ Audit rules:
65
+
66
+ - inventory every loaded/rendered family-weight-style face and delete faces without a hierarchy role;
67
+ - separate modular-step ratio from the observed display/body extreme ratio;
68
+ - remeasure the display and body roles at narrow and short heights; reduce display size or recompose when it consumes the task or produces poor wrapping, rather than chasing a fixed compression percentage. Test long localized copy and text zoom;
69
+ - verify display letter-spacing only at rendered sizes where it occurs; subtle negative tracking (`-0.02em` to `-0.04em`) belongs on large Latin display headlines, never on body copy or scripts with combining diacritics/shaping;
70
+ - preload at most 1–2 truly critical font files, choose `font-display` deliberately, subset required scripts, and never preload every weight or starve LCP media;
71
+ - canvas-rendered display type still needs semantic text and a fallback type specification.
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: pixelcraft-data-apps
3
+ description: Translates Pixelcraft direction, tokens, UX, and floor requirements into data applications, AI/ML demos, dashboards, notebooks, BI reports, and internal tools in any language. Use for Streamlit, Gradio, Reflex, NiceGUI, Dash, Panel, Shiny for Python or R, Julia Genie/Stipple, Jupyter widgets, Observable Framework, Evidence, data-app state/rerun behavior, theming limits, custom components, SQL/data freshness, reproducibility, and honest verification.
4
+ license: MIT
5
+ metadata:
6
+ version: 0.1.0
7
+ ---
8
+
9
+ # Pixelcraft data apps
10
+
11
+ Use this skill when the workload is a data app, AI/ML demo, dashboard, notebook surface, BI/reporting product, or internal operational tool—regardless of implementation language. The scope is the workload, not Python. Flet and Kivy are cross-platform application frameworks and route through `pixelcraft-mobile`; Qt/PySide belongs to `pixelcraft-desktop`; Textual/Rich belongs to `pixelcraft-tui`; Django/Jinja belongs to `pixelcraft-web`.
12
+
13
+ ## Surface craft
14
+
15
+ Keep active filters, data freshness and the selected result visibly linked. Put stable summaries near the controls that change them; defer heavier details without replacing the working context. Test a slow query, an empty result, a changed filter and a stale result. Do not copy a dashboard layout without its data provenance or rerun behavior.
16
+
17
+ ## Detection signals
18
+
19
+ Python imports/entry points (`st.*`, `gr.*`, `rx.*`, NiceGUI `ui.*`, Dash callbacks, Panel objects, Shiny UI/server), `.streamlit/config.toml`, notebooks/ipywidgets, R `DESCRIPTION`/`app.R` with Shiny/bslib, Julia `Project.toml` with Genie/Stipple, Observable `observablehq.config.*`/data loaders, Evidence `evidence.config.yaml`/`theme.yaml`/`pages`/`sources`, SQL/warehouse configuration, model/demo artifacts, cache/data-loader definitions.
20
+
21
+ ## Translate direction with honest constraints
22
+
23
+ 1. Preserve the direction concept even when exact visual control is limited: hierarchy, real content, color posture, composition, copy, states, and data design still apply.
24
+ 2. Map tokens through the framework's supported theme layer first; use custom CSS/components only as scoped escape hatches.
25
+ 3. Understand rerun/session/callback/build semantics before designing interaction. Do not lose form state because a widget key, query lifecycle, or callback owner was careless.
26
+ 4. Prioritize data legibility, task flow, feedback, empty/error states, reproducibility, and trust over cosmetic pixel matching.
27
+ 5. Escape hatch order: native theme/config → semantic component props/layout containers → documented custom CSS/classes → custom component/extension. Avoid brittle selectors where docs warn internals change.
28
+
29
+ ## Platform-wide rules
30
+
31
+ - Do not fake a generic SaaS dashboard when the framework's strength is rapid data/ML workflow clarity.
32
+ - Every expensive computation or query exposes progress, freshness/cache state, cancellation/timeout expectations, and failure recovery.
33
+ - Inputs have labels/help/format validation and preserve values across reruns/callbacks/navigation where possible.
34
+ - Tables/charts need text summaries, empty states, real units, appropriate color scales, uncertainty/freshness cues, and non-color encoding.
35
+ - Session state is explicit: inspect keys, initialization, stale cache, concurrency, multi-user leakage, query invalidation, and static snapshot age.
36
+ - Secrets, uploaded files, generated files, credentials, warehouse results, and user data must not leak across sessions/users or into client bundles/static output.
37
+
38
+ ## Common data-app failures
39
+
40
+ - uncontrolled reruns or rebuilds wiping input and triggering expensive work;
41
+ - hidden state keys or SQL parameters colliding across pages/users;
42
+ - stale data presented without timestamp/cache provenance;
43
+ - custom CSS selectors depending on unstable autogenerated classes;
44
+ - charts with no loading/error/empty-data treatment or text summary;
45
+ - sidebar/filter panel overloaded as navigation and control surface simultaneously;
46
+ - progress bars that fake progress or block interaction;
47
+ - wide desktop layout unusable in narrow embedded contexts;
48
+ - theming confined to primary color while hierarchy/state/copy remain default.
49
+
50
+ ## Verification options
51
+
52
+ DOM-backed frameworks can often be inspected in browser when the app runs, but visual verification requires actually launching them. Unit tests may validate callbacks, SQL, loaders, or state without proving rendering. Notebook widgets depend on kernel/frontend context. Static data apps need build inspection plus browser rendering. Label absence honestly; do not imply rendering happened because Python/R/Julia/JS code compiled or SQL succeeded.
53
+
54
+ ## Framework routing
55
+
56
+ - Read [references/streamlit.md](references/streamlit.md) for Streamlit.
57
+ - Read [references/gradio.md](references/gradio.md) for Gradio.
58
+ - Read [references/reflex.md](references/reflex.md) for Reflex.
59
+ - Read [references/nicegui.md](references/nicegui.md) for NiceGUI.
60
+ - Read [references/dash.md](references/dash.md) for Plotly Dash.
61
+ - Read [references/panel.md](references/panel.md) for Panel/HoloViz.
62
+ - Read [references/shiny.md](references/shiny.md) for Shiny for Python.
63
+ - Read [references/jupyter-widgets.md](references/jupyter-widgets.md) for ipywidgets/Jupyter surfaces.
64
+ - Read [references/r-shiny.md](references/r-shiny.md) for R Shiny data apps.
65
+ - Read [references/julia-genie.md](references/julia-genie.md) for Julia Genie/Stipple data apps.
66
+ - Read [references/observable-framework.md](references/observable-framework.md) for Observable Framework dashboards/data documents.
67
+ - Read [references/evidence.md](references/evidence.md) for Evidence SQL/Markdown BI reports and data products.
@@ -0,0 +1,53 @@
1
+ # Plotly Dash
2
+
3
+ ## Token mapping
4
+
5
+ Put generated CSS variables in the `assets/` folder or external stylesheet; Dash automatically serves project assets when configured correctly. Use consistent component class names/design-system wrappers rather than inline style dictionaries everywhere.
6
+
7
+ ## Layout and responsive idioms
8
+
9
+ Dash layout is React component composition authored in Python. Use HTML containers, grid/flex CSS, responsive breakpoints/logical spacing, and component hierarchy deliberately. Do not make a page of nested Divs with inline styles and call it a design system.
10
+
11
+ ## Typography/custom fonts
12
+
13
+ Load fonts through assets/external stylesheets with fallback/subset policy. Verify figure fonts separately; Plotly chart typography does not automatically inherit every page font/role.
14
+
15
+ ## Motion/reduced motion
16
+
17
+ Use CSS motion sparingly and honor reduced motion. Callback latency/loading states are the primary motion/feedback concern. Do not spin indefinitely because a callback failed silently.
18
+
19
+ ## Accessibility specifics
20
+
21
+ Use semantic html components, labels associated with inputs where supported, meaningful button/link distinctions, alt text/text summaries for charts, keyboard/focus verification. Plotly charts need nonvisual summaries/tables for critical data. Dash abstraction does not guarantee DOM correctness.
22
+
23
+ ## States idiom
24
+
25
+ Callbacks need explicit `Input`/`Output`/`State` ownership, validation, exception handling, duplicate/collision behavior, cancellation/background strategy where appropriate, and loading/empty/error/offline state rendering. Use `prevent_initial_call` deliberately; hidden chained callbacks create unpredictable UX.
26
+
27
+ ## Forms idiom
28
+
29
+ Use correct core component types, labels/help text, validation after meaningful completion, persistence through callback failure, debouncing only when appropriate, and paste/autofill behavior inherited from DOM. Do not trigger expensive callbacks per keystroke unintentionally.
30
+
31
+ ## Do/don't pairs
32
+
33
+ | Do | Don't |
34
+ |---|---|
35
+ | semantic stylesheet + stable class names | inline `style={...}` repeated across every component |
36
+ | explicit callback error output/state | swallowing exceptions so loading never resolves |
37
+ | chart plus textual takeaway/table alternative | color-only Plotly chart as sole critical evidence |
38
+ | debounce/submit explicit expensive queries | backend query on every keystroke by accident |
39
+ | callback ownership graph understood/documented | circular/hidden chained callbacks nobody can reason about |
40
+
41
+ ## Known traps
42
+
43
+ Duplicate callback outputs, hidden chaining, stale cache/session leakage, large serialization payloads, Plotly color/font defaults clashing with page design, callback exception opacity, asset loading order, multi-user state leakage.
44
+
45
+ ## Verification commands
46
+
47
+ ```sh
48
+ python app.py
49
+ python -m pytest
50
+ python -m compileall .
51
+ ```
52
+
53
+ Use browser inspection and callback/network tracing for interaction evidence. Plotly export/static screenshots are not full UI verification.
@@ -0,0 +1,75 @@
1
+ # Evidence
2
+
3
+ ## Token mapping
4
+
5
+ Evidence projects keep project settings in `evidence.config.yaml` and theme configuration in `theme.yaml` at the project root. Use the theme system for colors, palettes, and scales before local overrides; keep light/dark palettes paired and semantic rather than recoloring individual charts:
6
+
7
+ ```yaml
8
+ theme:
9
+ colors:
10
+ primary:
11
+ light: "#2563eb"
12
+ dark: "#3b82f6"
13
+ ```
14
+
15
+ Verify exact theme keys against the installed Evidence version because the project has evolved across releases.
16
+
17
+ ## Layout and responsive idioms
18
+
19
+ Pages are Markdown files, normally under the configured `pages` directory. `evidence.config.yaml` can set defaults such as page width, cards, table of contents, and auto-refresh. Compose operational dashboards around reading order and decision density rather than filling width with equal cards. Test narrow screens, print/export/share links, long dimension names, and navigation depth.
20
+
21
+ ## Typography/custom fonts
22
+
23
+ Use project theme/layout settings for typography where supported. Keep numeric alignment, units, date granularity, and label truncation deliberate. Markdown prose is part of the product: explain what the query means, freshness, caveats, and action expected.
24
+
25
+ ## Motion/reduced motion
26
+
27
+ Evidence renders browser UI. Any custom motion must respect `prefers-reduced-motion`; do not use animated chart transitions as the only signal that data refreshed. Auto-refresh needs visible freshness/state feedback.
28
+
29
+ ## Accessibility specifics
30
+
31
+ Use semantic Markdown headings and text alternatives for charts/tables. Validate keyboard reach and visible focus for filters/buttons, non-color encoding in charts, contrast of both light/dark theme palettes, and table summaries for screen-reader users. Component accessibility varies by version; inspect the rendered page rather than assuming BI components are accessible by default.
32
+
33
+ ## States idiom
34
+
35
+ SQL fenced blocks define named queries; components consume them through `data` attributes. Handle empty results, warehouse/connectivity failure, invalid credentials, stale snapshots, partial query failure, auto-refresh pending/error, and no-permission states honestly:
36
+
37
+ ````markdown
38
+ ```sql daily_orders
39
+ select * from demo.daily_orders limit 10
40
+ ```
41
+
42
+ {% table data="daily_orders" /%}
43
+ ````
44
+
45
+ Syntax/version details change; verify against the project template before editing broadly.
46
+
47
+ ## Forms idiom
48
+
49
+ Use labeled filters/input components supported by the installed version. Show active filters in text, preserve useful filter state across navigation/share links where supported, validate date/numeric ranges, and never expose raw SQL injection paths through interpolated user input.
50
+
51
+ ## Do/don't pairs
52
+
53
+ | Do | Don't |
54
+ |---|---|
55
+ | version-controlled `evidence.config.yaml`/`theme.yaml` | undocumented local-only theme or page settings |
56
+ | named SQL blocks consumed by components | duplicated ad hoc SQL with inconsistent filters |
57
+ | empty/error copy near the affected component | a blank chart region with no explanation |
58
+ | light/dark palette contrast checks | one palette copied into both modes |
59
+ | visible last-refreshed/source context | implying warehouse freshness without evidence |
60
+
61
+ ## Known traps
62
+
63
+ Warehouse credential leakage, expensive unbounded queries, implicit timezone/date-grain mistakes, SQL dialect differences by connector, static deployment freshness, theme key/version drift, filter state confusion, component accessibility gaps, Markdown prose diverging from actual query logic.
64
+
65
+ ## Verification commands
66
+
67
+ ```sh
68
+ cat evidence.config.yaml
69
+ cat theme.yaml
70
+ cat package.json
71
+ npm run build
72
+ npm run dev
73
+ ```
74
+
75
+ Exact scripts depend on the generated project. Browser inspection of the rendered report is rendered evidence; successful SQL/build output is static/data evidence only.
@@ -0,0 +1,65 @@
1
+ # Gradio
2
+
3
+ Evidence: current docs confirm `gr.Blocks(theme=gr.themes.Soft())`, prebuilt themes, `.set()` for theme CSS variables, `css=` on Blocks, and stable `elem_id`/`elem_classes` escape hatches.
4
+
5
+ ## Token mapping
6
+
7
+ Prefer themes before CSS:
8
+
9
+ ```python
10
+ theme = gr.themes.Default(primary_hue="blue").set(
11
+ loader_color="#0074ca",
12
+ )
13
+ with gr.Blocks(theme=theme, css=".gradio-container { }") as demo:
14
+ ...
15
+ ```
16
+
17
+ Map semantic tokens through documented theme variables first. Use `elem_classes` for stable hooks; autogenerated DOM selectors are brittle across versions.
18
+
19
+ ## Layout and responsive idioms
20
+
21
+ Use Blocks rows/columns/tabs/groups/accordion according to task flow. ML demos often need input → control → output scan clarity, not dashboard chrome. Control density depends on expert frequency. Mobile embedding and narrow iframe behavior must be checked.
22
+
23
+ ## Typography/custom fonts
24
+
25
+ Theme typography control is limited but theme objects/CSS variables can affect major surfaces. Use custom fonts only when licensing/loading/fallback are explicit; ML demo clarity usually matters more than decorative type.
26
+
27
+ ## Motion/reduced motion
28
+
29
+ Gradio loading/progress semantics matter more than decorative motion. Use generator progress updates truthfully where supported. Custom CSS/JS animation must honor reduced motion and not interfere with streamed output.
30
+
31
+ ## Accessibility specifics
32
+
33
+ Use component labels/info/placeholders appropriately, meaningful input/output ordering, text alternatives for media, visible focus in custom CSS, and keyboard inspection. Gradio component accessibility varies by component/version; custom components must not regress semantics.
34
+
35
+ ## States idiom
36
+
37
+ Model queued/running/streaming/cancelled/error/empty states. Event handlers need concurrency/queue/cancellation semantics considered. Render missing model/file/input validation errors and preserve user input. Do not leave output blank when no result exists.
38
+
39
+ ## Forms idiom
40
+
41
+ Input components are often live controls rather than a single submit form. Make computation triggers explicit when cost is high. Validate format/range/file type before expensive work and preserve failed inputs.
42
+
43
+ ## Do/don't pairs
44
+
45
+ | Do | Don't |
46
+ |---|---|
47
+ | stable `elem_classes=["result-panel"]` hook | scraping generated class names in custom CSS |
48
+ | explicit Run/Generate button for costly work | inference on every slider movement without control |
49
+ | truthful queue/progress state | fake progress that never reflects backend work |
50
+ | input/output grouping by task flow | copying generic SaaS dashboard cards around everything |
51
+ | clear empty/error output text | leaving blank media/output after failure |
52
+
53
+ ## Known traps
54
+
55
+ DOM instability across versions, queue concurrency, generator cancellation, large media memory/upload limits, hidden session leakage, theme variable sprawl, iframe embedding, mobile clipping, custom JS security/file access restrictions.
56
+
57
+ ## Verification commands
58
+
59
+ ```sh
60
+ python app.py
61
+ python -m pytest
62
+ python -m compileall .
63
+ ```
64
+
65
+ Run browser/mobile-width inspection for rendered evidence. Backend unit tests validate handlers only, not Gradio rendering.
@@ -0,0 +1,54 @@
1
+ # Julia Genie (adjacent data-app ecosystem)
2
+
3
+ Genie/Stipple is Julia web/data-app infrastructure, not Python. Route it here because the product shape is closest to internal data applications; verify current framework APIs because the ecosystem evolves quickly.
4
+
5
+ ## Token mapping
6
+
7
+ Stipple/Genie commonly expose Vue/Quasar-style browser UI behavior. Map tokens through theme/configuration and generated CSS variables rather than mutating autogenerated internals. Keep Julia-computed constants synchronized via token export or explicit semantic mapping.
8
+
9
+ ## Layout and responsive idioms
10
+
11
+ Use server-defined pages/layout/components plus responsive browser layout. Distinguish static content, reactive dashboard regions, and API-backed interactions. Do not treat every dashboard as a blank reactive canvas.
12
+
13
+ ## Typography/custom fonts
14
+
15
+ Load fonts in page assets/templates with fallback/subsets. Verify numeric/tabular legibility, plot/UI font consistency, scaling/localization, initial server render behavior.
16
+
17
+ ## Motion/reduced motion
18
+
19
+ Use CSS/component-level motion sparingly and respect `prefers-reduced-motion`. Reactive loading indicators must represent actual server/computation state rather than decorative spinners.
20
+
21
+ ## Accessibility specifics
22
+
23
+ Use semantic generated HTML/components, labels, keyboard/focus behavior, text summaries for plots/tables, non-color encoding, error announcements. Julia backend correctness does not prove browser accessibility; inspect emitted DOM.
24
+
25
+ ## States idiom
26
+
27
+ Model loading/empty/error/permission/offline/stale/reactive-disconnect states explicitly. Long Julia computations need task ownership, cancellation/timeout expectations, progress feedback, cache invalidation, and multi-user isolation.
28
+
29
+ ## Forms idiom
30
+
31
+ Use real labeled inputs/browser validation plus server validation. Preserve inputs across reactive updates/failed submit; use correct keyboard/paste/IME behavior and field-level recovery copy. Uploaded data needs type/size/security constraints.
32
+
33
+ ## Do/don't pairs
34
+
35
+ | Do | Don't |
36
+ |---|---|
37
+ | semantic theme/CSS variables | brittle overrides of generated component internals |
38
+ | explicit empty-vs-error branches | blank chart when query fails |
39
+ | labeled reactive inputs | controls that reset on unrelated invalidation |
40
+ | server task progress/error state | fake spinner disconnected from computation |
41
+
42
+ ## Known traps
43
+
44
+ Version/API drift, reactive round-trip latency, hidden state shared across users, long-running task blocking, plot/theme mismatch, browser accessibility neglect, deployment resource limits.
45
+
46
+ ## Verification commands
47
+
48
+ ```sh
49
+ julia --project -e 'using Pkg; Pkg.test()'
50
+ julia --project app.jl
51
+ npx playwright test
52
+ ```
53
+
54
+ Inspect browser DOM/rendering, concurrent sessions, network loss/reconnect, empty/error/large data, keyboard/focus behavior, text scaling/localization, production resource limits.