@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,60 @@
1
+ # Kotlin Multiplatform / Compose Multiplatform
2
+
3
+ ## Token mapping
4
+
5
+ Share token objects in common code as semantic `expect`/plain Kotlin structures where possible, while platform-specific implementations resolve resources/capabilities:
6
+
7
+ ```kotlin
8
+ object PcTokens { val action = Color(0xff0074ca) }
9
+ ```
10
+
11
+ Keep platform channels for assets, fonts, haptics, accessibility settings, and system color behavior. Do not hide platform divergence behind fake universal behavior.
12
+
13
+ ## Layout and responsive idioms
14
+
15
+ Compose Multiplatform layout follows Compose idioms, but target platform conventions still differ. Put shared visual composition in common UI; put navigation/back/window/insets/accessibility behavior in platform-aware layers. Desktop windows, Android devices, iOS surfaces, and web targets need different adaptation logic.
16
+
17
+ ## Typography/custom fonts
18
+
19
+ Package/load fonts per target and expose semantic typography in shared theme. Verify glyph coverage and scaling per platform; sp/Dynamic Type behavior is not automatically equivalent across targets.
20
+
21
+ ## Motion/reduced motion
22
+
23
+ Shared Compose animation can be reused, but reduced-motion detection is platform-specific. On Android use animator/transition scale proxies; on Apple platforms use native reduce-motion environment/API. Expose a small platform abstraction rather than pretending one universal hook exists.
24
+
25
+ ## Accessibility specifics
26
+
27
+ Shared semantics modifiers help, but actual accessibility tree behavior differs by target. Verify TalkBack, VoiceOver, desktop keyboard/screen-reader APIs, focus traversal, target sizing, and platform-specific state descriptions. Shared UI does not mean shared verification coverage.
28
+
29
+ ## States idiom
30
+
31
+ Shared view models can own async/task state, but lifecycle/process death/connectivity/navigation semantics remain platform-specific. Make source-of-truth and cancellation behavior explicit. Do not leak mutable state across platforms/users.
32
+
33
+ ## Forms idiom
34
+
35
+ Keyboard options/focus behavior can be shared in part, but IME composition, autofill, secure input, paste, validation timing, and virtual keyboard behavior require platform verification. Preserve input through platform lifecycle events.
36
+
37
+ ## Do/don't pairs
38
+
39
+ | Do | Don't |
40
+ |---|---|
41
+ | isolate platform capability behind `expect` interface | pretending Android/iOS/desktop reduced-motion APIs are identical |
42
+ | share semantic theme roles in common code | scattering target-specific hex constants through shared composables |
43
+ | adapt navigation/back per host platform | forcing mobile navigation model onto desktop windows |
44
+ | test semantics on each target | assuming one passing Compose test proves every platform tree |
45
+ | explicit lifecycle/cancellation ownership | shared singleton mutable state without user/session scope |
46
+
47
+ ## Known traps
48
+
49
+ Resource packaging mismatch, target-specific font/glyph behavior, memory-model/concurrency surprises, lifecycle mismatch, accessibility API gaps, hidden platform branching, desktop/mobile input assumptions, dependency version alignment across Compose/Kotlin targets.
50
+
51
+ ## Verification commands
52
+
53
+ ```sh
54
+ ./gradlew build
55
+ ./gradlew test
56
+ ./gradlew connectedDebugAndroidTest 2>/dev/null || true
57
+ ./gradlew lint 2>/dev/null || true
58
+ ```
59
+
60
+ Run target-specific simulator/device/desktop checks. Cross-platform compilation is static evidence, not rendered evidence.
@@ -0,0 +1,71 @@
1
+ # React Native / Expo
2
+
3
+ Evidence: `AccessibilityInfo.isReduceMotionEnabled()` and `reduceMotionChanged` are documented RN APIs.
4
+
5
+ ## Token mapping
6
+
7
+ Generate JS/TS constants or consume the Python-dict/JSON form through build generation, then create typed semantic theme context/navigation themes:
8
+
9
+ ```ts
10
+ export const theme = { colors: { action: '#0074ca' }, spacing: { controlInline: 12 } };
11
+ ```
12
+
13
+ Do not copy hex constants into component style props. Map navigation/tab/header colors separately because React Navigation themes are not identical to component themes.
14
+
15
+ ## Layout and responsive idioms
16
+
17
+ Yoga/flex layout is the default. Use safe-area context/insets, keyboard avoiding behavior deliberately, orientation/window dimensions, platform-specific files/props sparingly, and scroll/flat-list semantics. Respect iOS vs Android navigation/back/gesture differences even when visuals share code.
18
+
19
+ ## Typography/custom fonts
20
+
21
+ Load fonts through Expo font/asset pipeline or native linkage; configure fallback/weight behavior. Use scalable text and respect platform font scaling unless a bounded exception is intentional. Never use fixed-height clipping for essential localized copy.
22
+
23
+ ## Motion/reduced motion
24
+
25
+ Use Reanimated/native driver or platform primitives intentionally. Query and subscribe:
26
+
27
+ ```ts
28
+ AccessibilityInfo.isReduceMotionEnabled();
29
+ AccessibilityInfo.addEventListener('reduceMotionChanged', handler);
30
+ ```
31
+
32
+ Provide reduced/static behavior. JS-thread blocking can turn even correct animation specs into jank.
33
+
34
+ ## Accessibility specifics
35
+
36
+ Use `accessibilityRole`, `accessibilityLabel`, `accessibilityHint` sparingly, `accessibilityState`, live region props where supported, focus/traversal behavior, and native control equivalents. Do not use `TouchableOpacity` around text as a substitute for a properly labeled control. Minimum target expectations follow host platform (44pt/48dp).
37
+
38
+ ## States idiom
39
+
40
+ Represent query/mutation lifecycle explicitly: loading/refreshing/empty/error/offline/optimistic/permission. Preserve input/navigation state across backgrounding/reload where expected. FlatList keys, pagination, refresh, scroll position, and memory pressure are UX state, not implementation trivia.
41
+
42
+ ## Forms idiom
43
+
44
+ Use correct keyboard type, return key, auto-capitalization/correction, text content type/autocomplete, secure entry/password manager behavior, paste support, focus sequencing, validation timing, and keyboard occlusion handling. Preserve values through failed submit/navigation.
45
+
46
+ ## Do/don't pairs
47
+
48
+ | Do | Don't |
49
+ |---|---|
50
+ | `<Pressable accessibilityRole="button" accessibilityLabel="Save invoice">` | tap-only `<Text>` pretending to be a button |
51
+ | `useSafeAreaInsets()` for bottom action placement | hard-coded bottom padding copied from one emulator |
52
+ | stable `keyExtractor={item => item.id}` | array-index keys for mutable rows |
53
+ | reduced-motion listener controlling animation state | unconditional looping animation |
54
+ | correct `autoComplete="email" keyboardType="email-address"` | blocking paste/custom keyboard behavior |
55
+
56
+ ## Known traps
57
+
58
+ Bridge/JS-thread jank, Hermes/runtime differences, Expo/native module mismatch, safe-area double padding, keyboard avoiding inconsistency, controlled text input cursor loss, navigation header/custom header duplication, platform shadow/elevation mismatch, font scaling clipped, optimistic state rollback absent.
59
+
60
+ ## Verification commands
61
+
62
+ ```sh
63
+ npm run lint
64
+ npm run test -- --watch=false
65
+ npx expo start
66
+ CI=1 npx expo install --check
67
+ ```
68
+
69
+ For Expo projects, use the locally installed Expo CLI and compare the installed Expo SDK/React Native pairing with the matching SDK docs. Run the dependency check in CI mode to report mismatches without prompting to install replacements. If the local CLI is unavailable, mark the command `not-checked` rather than letting `npx` fetch a different version. Run `expo install --fix` only when dependency changes are authorized.
70
+
71
+ Use the project's native build command for the affected device. Use device/emulator inspection, React Navigation state, React Native DevTools where supported, VoiceOver/TalkBack, font scaling, dark mode, offline/throttled network, and platform back/gesture tests.
@@ -0,0 +1,70 @@
1
+ # SwiftUI
2
+
3
+ Evidence: Apple environment keys verified in current docs: `@Environment(\.accessibilityReduceMotion)` and `@Environment(\.dynamicTypeSize)`.
4
+
5
+ ## Token mapping
6
+
7
+ Map generated Swift colors/values into asset catalogs or a typed semantic theme enum. Prefer asset catalog colors for light/dark/high-contrast variants; use generated constants only where compile-time generation is intentional:
8
+
9
+ ```swift
10
+ enum PC {
11
+ static let action = Color("Semantic/Action")
12
+ static let controlInline: CGFloat = 12
13
+ }
14
+ ```
15
+
16
+ Do not scatter raw RGB/hex initializers through views. Use `ColorAsset` names that express semantic roles.
17
+
18
+ ## Layout and responsive idioms
19
+
20
+ Use stacks, grids, safe-area behavior, size classes, dynamic type adaptation, and container resizing rather than fixed device frames. `ViewThatFits`, `Layout`, geometry-aware composition, and scroll behavior are selected by content need—not used reflexively. Respect navigation stack/split view/tab bar idioms and iPad/macOS resizing where targeted.
21
+
22
+ ## Typography/custom fonts
23
+
24
+ Prefer system text styles (`.body`, `.headline`, `.title`) because they scale automatically. Register custom fonts correctly in the app target/Info.plist and use scalable relative sizing rather than fixed point-only assumptions. Read `dynamicTypeSize` when layout must switch at accessibility sizes.
25
+
26
+ ## Motion/reduced motion
27
+
28
+ Use SwiftUI animation/spring/transition intentionally and read:
29
+
30
+ ```swift
31
+ @Environment(\.accessibilityReduceMotion) private var reduceMotion
32
+ ```
33
+
34
+ Choose non-motion or opacity/static alternatives when true. Do not add `.animation` globally to state that should update instantly; implicit animation scope matters.
35
+
36
+ ## Accessibility specifics
37
+
38
+ Use SwiftUI accessibility modifiers: `accessibilityLabel`, `accessibilityValue`, `accessibilityHint` sparingly, `accessibilityTraits`, `accessibilityElement(children:)`, custom actions, adjustable values, sort priority. Verify VoiceOver order rather than assuming visual order. Minimum touch target baseline is 44×44 pt; padding must produce real hit area.
39
+
40
+ ## States idiom
41
+
42
+ Model view state explicitly: loading/loaded/empty/error/permission/offline/optimistic. Keep state ownership clear through `@State`, `@Binding`, `@Observable`, environment ownership. Preserve state across backgrounding/process restoration where required. Pull-to-refresh/progress indicators must reflect actual lifecycle.
43
+
44
+ ## Forms idiom
45
+
46
+ Use `Form`, `LabeledContent`, keyboard type/text content type/submit labels/autocorrection settings, validation after meaningful completion, and input preservation. Secure fields/password autofill/passkeys should integrate with system behavior rather than custom blocking.
47
+
48
+ ## Do/don't pairs
49
+
50
+ | Do | Don't |
51
+ |---|---|
52
+ | `Button("Save invoice") { save() }` | `Text("Save invoice").onTapGesture { save() }` as fake button |
53
+ | `@Environment(\.dynamicTypeSize) private var typeSize` and adaptive layout | fixed-height row clipping accessibility text sizes |
54
+ | `if reduceMotion { instantUpdate() } else { withAnimation(...) }` | large animated movement regardless of Reduce Motion |
55
+ | `.accessibilityLabel("Delete \(invoice.name)")` | relying on a trash-can glyph as the only meaning |
56
+ | `.safeAreaInset(edge: .bottom)` for persistent action | placing CTA underneath home indicator/keyboard |
57
+
58
+ ## Known traps
59
+
60
+ GeometryReader layout loops, implicit animation explosions, hidden Keyboard avoidance differences, navigation stack state duplication, sheet/full-screen cover focus and dismissal, custom large-title mismatch, preview data mistaken for runtime state, dynamic type truncation, safe-area double padding, task cancellation/lifecycle confusion.
61
+
62
+ ## Verification commands
63
+
64
+ ```sh
65
+ xcodebuild -scheme App -destination 'platform=iOS Simulator,name=iPhone 15' build
66
+ xcodebuild test -scheme App -destination 'platform=iOS Simulator,name=iPhone 15'
67
+ xcrun simctl boot <device> 2>/dev/null || true
68
+ ```
69
+
70
+ Use Xcode Previews, snapshot tests, simulator screenshots, Accessibility Inspector, VoiceOver, Dynamic Type sizes, dark mode, orientation/split-view runs for rendered evidence.
@@ -0,0 +1,5 @@
1
+ # Task-state composition on mobile
2
+
3
+ When the activity itself carries the visual identity, keep one task-bearing object recognizable across setup, active work and completion: a recording preview, a session clock, or the object being earned or built. Change the controls around that object to fit the stage rather than presenting the same ornamental card at each step. Keep remaining time, recording state or progress readable without relying on the illustration or motion.
4
+
5
+ Distinguish the next meaningful action from optional extras at completion; do not put the reward, upsell or celebration between a user and their result. For a tool with a live preview, fit the active capture controls and the current state in reach before showing the full editing toolset. Verify the state, stop or resume control, and draft outcome from one-handed use and after an interruption. Store screenshots may suggest this composition; they do not verify focus, interruption, motion or actual task behavior.
@@ -0,0 +1,58 @@
1
+ # UIKit
2
+
3
+ ## Token mapping
4
+
5
+ Use asset catalog colors keyed by semantic role plus dynamic provider colors when needed:
6
+
7
+ ```swift
8
+ let action = UIColor(named: "Semantic/Action")
9
+ ```
10
+
11
+ Asset catalogs carry light/dark/high-contrast variants. Keep spacing/type constants in a typed semantic namespace; do not copy raw RGB values through view controllers/cells.
12
+
13
+ ## Layout and responsive idioms
14
+
15
+ Use Auto Layout constraints, stack views, safe-area layout guides, trait collections, readable content guides, scroll view content layout guides, and collection/compositional layout intentionally. Avoid fixed frames except tightly controlled custom drawing/layout. Support multitasking/split-screen/orientation where target expects it.
16
+
17
+ ## Typography/custom fonts
18
+
19
+ Use `UIFontMetrics` to scale custom/system fonts for Dynamic Type. Register custom fonts correctly and set `adjustsFontForContentSizeCategory` where appropriate. Layout must respond to trait collection/content size changes rather than truncating essential copy.
20
+
21
+ ## Motion/reduced motion
22
+
23
+ Use UIView/CA animation intentionally. Check `UIAccessibility.isReduceMotionEnabled` and observe relevant notifications when behavior must adapt. Keep animations interruptible and provide non-motion state feedback. Do not rely on animation completion handlers for correctness without cancellation handling.
24
+
25
+ ## Accessibility specifics
26
+
27
+ Configure `accessibilityLabel`, `accessibilityValue`, `accessibilityHint` sparingly, traits, custom actions, adjustable behavior, accessibility elements ordering (`accessibilityElements`), notifications (`UIAccessibility.post(notification:argument:)`), and focus behavior. Verify hit regions at 44×44 pt or document platform exception.
28
+
29
+ ## States idiom
30
+
31
+ Use explicit view-state models rather than hiding/showing ad hoc controls. Diffable data sources need correct identity/reuse semantics. Preserve state across backgrounding/restoration and avoid duplicate operations when views reappear. Loading/empty/error/offline/permission states deserve designed content, not blank table/collection views.
32
+
33
+ ## Forms idiom
34
+
35
+ Use correct keyboard type, text content type, return key behavior, autocapitalization/autocorrection, password autofill/passkeys, scroll adjustment for keyboard, validation after completion, and input preservation. First responder management is interaction design, not incidental plumbing.
36
+
37
+ ## Do/don't pairs
38
+
39
+ | Do | Don't |
40
+ |---|---|
41
+ | `UIButton(configuration:)` or real control with target/action | tapping a plain `UILabel` as a fake control |
42
+ | constraints to safe-area layout guide | hard-coded bottom padding copied from one device screenshot |
43
+ | `UIFontMetrics.default.scaledFont(for:)` | fixed point font that ignores Dynamic Type |
44
+ | prepare/reuse cells resetting state explicitly | stale images/selection/progress leaking through reuse |
45
+ | VoiceOver order/name verification | assuming visual constraint order equals accessibility order |
46
+
47
+ ## Known traps
48
+
49
+ Constraint ambiguity/performance, cell reuse state leakage, retain cycles in handlers, keyboard obstruction, safe-area mismatch, opaque view controller hierarchy state, trait collection changes ignored, modal presentation/navigation back inconsistency, restoration identifier misuse.
50
+
51
+ ## Verification commands
52
+
53
+ ```sh
54
+ xcodebuild -scheme App -destination 'platform=iOS Simulator,name=iPhone 15' build
55
+ xcodebuild test -scheme App -destination 'platform=iOS Simulator,name=iPhone 15'
56
+ ```
57
+
58
+ Use simulator/device screenshots, View Debugger, Accessibility Inspector, VoiceOver, Dynamic Type, dark/high-contrast modes, rotation/split-screen, and network-link conditioning for evidence.
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: pixelcraft-patterns
3
+ description: Applies surface-independent product UX patterns without collapsing into generic templates. Use for dashboards/admin, e-commerce PLP/PDP/cart/checkout, editors/creative tools/canvas, chat/collaboration, auth/onboarding/account, marketing landing pages, settings/preferences, search/filtering, tables/lists/CRUD, workflow structure, navigation models, state coverage, and pattern-specific verification across any frontend stack.
4
+ license: MIT
5
+ metadata:
6
+ version: 0.1.0
7
+ ---
8
+
9
+ # Pixelcraft patterns
10
+
11
+ Patterns are starting hypotheses, not layouts to copy. Choose one from the user's task and constraints, adapt it to the direction card and platform idioms, and preserve the mandatory floor. Marketing/persuasion rules differ from operational product rules; never mix them unconsciously.
12
+
13
+ ## References
14
+
15
+ - Read [references/pattern-selection.md](references/pattern-selection.md) before choosing workflow, navigation, search/filter, dense-table, or hybrid pattern structure.
16
+ - Read [references/dashboard-admin.md](references/dashboard-admin.md) for operational overview, monitoring, admin, metrics, and control surfaces.
17
+ - Read [references/commerce.md](references/commerce.md) for PLP, PDP, cart, checkout, merchandising, payment, and post-purchase flows.
18
+ - Read [references/creative-tools.md](references/creative-tools.md) for editors, canvas, inspector, timeline, tool switching, autosave, and creative work surfaces.
19
+ - Read [references/communication.md](references/communication.md) for chat, comments, collaboration, presence, notifications, and shared work.
20
+ - Read [references/auth-onboarding.md](references/auth-onboarding.md) for sign-in/up, recovery, permissions, onboarding, account lifecycle, and trust.
21
+ - Read [references/marketing.md](references/marketing.md) for landing pages and campaigns where distinctiveness/persuasion rules differ from app UI.
22
+ - Read [references/settings.md](references/settings.md) for settings, preferences, configuration, destructive actions, and system integration.
23
+ - Read [references/search-filtering.md](references/search-filtering.md) for query input, faceting, empty results, sorting, large result sets, and recovery.
24
+ - Read [references/tables-crud.md](references/tables-crud.md) for dense data tables, list/detail, creation/edit/delete, bulk actions, import/export, and validation.
25
+
26
+ ## Selection protocol
27
+
28
+ 1. Identify the user's primary job and frequency. High-frequency operation favors density, predictability, keyboard flow, and recovery; low-frequency persuasion favors narrative, orientation, and memory.
29
+ 2. Choose a primary pattern per screen using the decision matrices in `references/pattern-selection.md`; record user/task evidence and the rejected alternative. Hybrid screens need explicit regions, not blended metaphors.
30
+ 3. Inventory real content/data states before layout: zero/one/many/long/error/offline/permission/slow/conflict.
31
+ 4. Map the pattern into platform idioms using the appropriate surface skill by name. Do not copy DOM assumptions into mobile, TUI, email, game, document, or spatial surfaces.
32
+ 5. Apply the direction card after the workflow is sound. Distinctiveness must not obscure the primary task.
33
+ 6. Verify with the state matrix, keyboard/input path, `pixelcraft-review`, and `pixelcraft-visual-qa` where rendering is possible.
34
+
35
+ ## Universal pattern rules
36
+
37
+ | Concern | Rule |
38
+ |---|---|
39
+ | orientation | Users must know where they are, what changed, and what happens next. |
40
+ | progressive disclosure | Show the next decision, not every control; preserve access to advanced state. |
41
+ | undo/recovery | Prefer reversible actions; when impossible, explain consequences before commitment. |
42
+ | empty state | Teach the next useful action; never use decorative emptiness or dead-end copy. |
43
+ | loading | Preserve layout stability and communicate whether user input/data is safe. |
44
+ | errors | Put recovery near the failure, preserve user input, and distinguish system fault from user action. |
45
+ | density | Density is chosen by frequency and expertise, not by copying admin templates. |
46
+ | navigation | Back/escape/deep links/refresh must restore understandable state. |
47
+ | truthfulness | No fake metrics, activity, reviews, presence, screenshots, or personalization. |
48
+
49
+ ## Pre-submit checklist
50
+
51
+ - [ ] correct primary pattern selected and hybrid boundaries explicit;
52
+ - [ ] first-use, returning-use, empty, error, loading, permission, and long-content states designed;
53
+ - [ ] destructive/irreversible actions use consequence-appropriate friction;
54
+ - [ ] keyboard/controller/touch path and focus restoration match the platform;
55
+ - [ ] copy names concrete user/domain objects rather than generic “items” or “data”;
56
+ - [ ] adaptation and localization stress cases use real or realistic content;
57
+ - [ ] visual distinctiveness supports rather than overrides task completion;
58
+ - [ ] evidence labels distinguish rendered behavior from static inference.
@@ -0,0 +1,25 @@
1
+ # Auth, onboarding, and account
2
+
3
+ Auth is a trust boundary. Optimize for successful completion and recovery, not branding theater.
4
+
5
+ ## Sign-in/up
6
+
7
+ - Use persistent labels, autocomplete tokens, password-manager-friendly inputs, paste support, visible validation timing, and explicit Caps Lock/show-password affordances where appropriate.
8
+ - Do not block paste, invent password rules late, or reveal whether an account exists when security policy forbids enumeration.
9
+ - MFA/passkeys/social login need fallback, recovery, timeout, and device/context clarity.
10
+ - Rate limiting and lockout copy must distinguish temporary protection from account failure.
11
+
12
+ ## Onboarding
13
+
14
+ - Teach the next valuable action rather than giving a feature tour.
15
+ - Ask only for information used now; explain permission requests at the moment of need.
16
+ - Support skip/back/resume, progress truthfully, and completion without dead-end celebration screens.
17
+ - Seed/demo content must be clearly labeled and removable.
18
+
19
+ ## Account lifecycle
20
+
21
+ Cover profile/security/sessions/devices/email change, deletion/export, workspace switching, invitations/expiry, permission changes, billing state, and recovery codes. Destructive actions need consequence-specific confirmation and audit/undo windows where possible.
22
+
23
+ ## Verification
24
+
25
+ Test autofill, paste, password managers, IME, RTL, long emails/local parts, expired links, replayed links, interrupted onboarding, offline submission, duplicate click, assistive technology announcements, reduced motion, and legal/locale consent requirements.
@@ -0,0 +1,28 @@
1
+ # Commerce: PLP, PDP, cart, checkout
2
+
3
+ Commerce UX is trust plus momentum. Do not sacrifice clarity for visual novelty.
4
+
5
+ ## Product listing pages
6
+
7
+ - Show honest availability, price, variant state, shipping/returns signals, and comparison-relevant attributes.
8
+ - Filter/sort state must be visible, shareable where possible, reversible, and preserved on back navigation.
9
+ - Empty filtered results suggest concrete removals or broadening; never say only “no results.”
10
+ - Pagination/infinite scroll must preserve scroll position and announce loaded/error state.
11
+
12
+ ## Product detail pages
13
+
14
+ - Lead with identity, price/variant availability, media truthfulness, and primary purchase action.
15
+ - Variant selection must prevent impossible combinations clearly and preserve selection when inventory errors occur.
16
+ - sizing/specs/reviews/ugc require source and moderation context; no invented ratings or testimonials.
17
+ - Delivery estimates need location/date qualifiers.
18
+
19
+ ## Cart and checkout
20
+
21
+ - Cart is editable without punishment: quantity, variant, save-for-later, removal/undo, price changes, fees, taxes, discounts.
22
+ - checkout minimizes distraction but must not trap users in a dead end; preserve entered data across validation and session interruption.
23
+ - payment errors distinguish authentication, decline, network, and merchant validation without exposing sensitive details.
24
+ - confirmation includes order state, next action, support/recovery, receipt/access details.
25
+
26
+ ## Verification
27
+
28
+ Test out-of-stock variants, price/currency/locale formatting, expired cart, inventory race, validation failure, paste/autofill/password manager behavior, keyboard/touch flow, reduced motion, image failure, transparent fees, and dark mode.
@@ -0,0 +1,26 @@
1
+ # Chat, comments, and collaboration
2
+
3
+ Communication UI depends on sequence, authorship, timing, and trust. Visual flair must never obscure who said what or whether it was sent. This reference covers **in-app** chat/collaboration surfaces; for hosted messaging-platform payloads (Slack Block Kit, Discord, Telegram, WhatsApp, Teams), use `pixelcraft-chat-ui`.
4
+
5
+ ## Core rules
6
+
7
+ - Message hierarchy distinguishes author, time, body, attachments, reactions, edits/deletes, replies, and system events.
8
+ - Sending states are truthful: composing, queued/offline, sending, sent/delivered/read only when actually known.
9
+ - Presence/typing indicators must expire and degrade gracefully; never fabricate activity.
10
+ - Mentions/notifications need muting, escalation, and unread-state semantics that survive refresh.
11
+ - Attachments need filename/type/size/progress/error/removal and safe preview behavior.
12
+
13
+ ## Collaboration states
14
+
15
+ Handle empty conversation, long threads, rapid incoming messages, scrollback loading, network interruption, duplicate submit, permission loss, moderation, edit/delete race, conflicting simultaneous editors, and accessibility announcements without overwhelming users.
16
+
17
+ ## Composer
18
+
19
+ - Preserve drafts per conversation/context and warn before destructive discard.
20
+ - Enter/send behavior must match platform convention and multiline editing needs.
21
+ - Emoji/reactions are additive semantics, not replacements for accessible names/text.
22
+ - Paste/upload validation preserves typed content and reports rejected files concretely.
23
+
24
+ ## Verification
25
+
26
+ Test screen-reader announce behavior for incoming content carefully, keyboard jump to unread/composer, RTL/LTR mixed text, emoji/ZWJ sequences, long unbroken strings, timestamp locale/timezone, image failure, dark mode, reduced motion, and offline queue recovery.
@@ -0,0 +1,29 @@
1
+ # Editors, creative tools, and canvas
2
+
3
+ Creative surfaces are instruments. Chrome must recede until needed while remaining discoverable and reversible.
4
+
5
+ ## Core structure
6
+
7
+ - Preserve spatial stability of canvas/document, toolbars, inspector, layers/assets, timeline, and status.
8
+ - Tool state must be visible through cursor, selection, handles, inspector values, and mode-specific feedback.
9
+ - Use direct manipulation where appropriate, but every critical action needs a keyboard/menu/command-palette path.
10
+ - Autosave/history/conflict behavior must be explicit; never silently overwrite user work.
11
+
12
+ ## Interaction rules
13
+
14
+ | Concern | Rule |
15
+ |---|---|
16
+ | selection | clear affine/hover/selection states; support multi-select semantics deliberately |
17
+ | zoom/pan | preserve focus center/content position; expose reset and current scale |
18
+ | drag | show constraints, snapping, preview, cancellation, and escape behavior |
19
+ | shortcuts | display in context; avoid browser/platform conflicts; support customization where expected |
20
+ | inspector | commit/validate numeric input predictably; preserve units and precision |
21
+ | canvas fallback | provide DOM/native alternative information and keyboard operations where possible |
22
+
23
+ ## States
24
+
25
+ Untitled/new document, unsaved/autosaving/error, corrupt/missing asset, empty canvas, huge document performance, offline collaboration conflict, read-only/permission mode, undo/redo boundary, export progress/failure.
26
+
27
+ ## Verification
28
+
29
+ Test precision input, IME composition, text scaling, zoomed-out legibility, color picker contrast, pointer capture interruption, keyboard-only duplication/deletion, long document virtualization/frame budget, reduced motion, and screen-reader access to object structure where the platform supports it.
@@ -0,0 +1,31 @@
1
+ # Dashboard and admin
2
+
3
+ Dashboards are operational instruments, not metric collages. Start from decisions: what should the user notice, decide, or do next?
4
+
5
+ ## Structure
6
+
7
+ - Lead with status/outliers/actions, not vanity charts.
8
+ - Group by decision or operational object; label time range, freshness, source, and permissions.
9
+ - Make every metric answer a question. If no action or understanding follows, remove or demote it.
10
+ - Preserve drill-down context: filters, time range, selection, scroll, and back navigation.
11
+ - Use overview → inspect → act progression rather than modal cascades.
12
+
13
+ ## States
14
+
15
+ | State | Required behavior |
16
+ |---|---|
17
+ | no data yet | explain setup/next action without fake sparklines |
18
+ | partial/permission-limited | show scope honestly; do not imply empty means zero events |
19
+ | stale/offline | timestamp and preserve last known data as stale |
20
+ | overload | prioritize alerts and aggregation; avoid endless equal-weight cards |
21
+ | error | identify affected source and retry path without discarding user filters |
22
+
23
+ ## Do / don't
24
+
25
+ - **Do** use dense, scanable tables/lists for high-frequency operators; **don't** force everything into identical cards.
26
+ - **Do** make thresholds and comparison baselines explicit; **don't** color numbers red/green without meaning or colorblind-safe redundancy.
27
+ - **Do** keep destructive/admin actions permission-aware and auditable; **don't** hide them behind ambiguous icon buttons.
28
+
29
+ ## Verification
30
+
31
+ Test slow queries, zero rows, one row, thousands of rows, stale cache, failed source, denied permission, long names, numeric formatting/locale, keyboard focus, and narrow-width restructure. Measure chart rendering cost with real cardinality.
@@ -0,0 +1,32 @@
1
+ # Marketing landing pages
2
+
3
+ Marketing pages are persuasion surfaces, not operational dashboards. They can carry stronger narrative and visual expression, but the floor still applies.
4
+
5
+ ## Differences from app UI
6
+
7
+ | Marketing | App UI |
8
+ |---|---|
9
+ | orientation + memory + action | repeated efficient task completion |
10
+ | narrative sequence matters | stable dense structure matters |
11
+ | expressive composition can lead | chrome and density often lead |
12
+ | one primary conversion path | multiple parallel workflows |
13
+
14
+ Do not import dashboard cards, fake metrics, generic SaaS gradients, or app-like chrome into a persuasive page unless the direction calls for it.
15
+
16
+ ## Structure
17
+
18
+ 1. concrete audience/problem/context promise;
19
+ 2. evidence or demonstration using truthful material;
20
+ 3. differentiation and mechanism;
21
+ 4. objection handling/detail;
22
+ 5. clear action with expectation of what happens next.
23
+
24
+ Hero composition should come from the subject/material and direction card. The centered headline/two-button template is a fingerprint, not a default. Use real product media only when truthful and inspect its loading/fallback cost.
25
+
26
+ ## Trust rules
27
+
28
+ No fake logos, testimonials, metrics, countdowns, scarcity, screenshots, awards, or personalization. Label conceptual/mock media. Pricing and comparison claims need dates/qualifiers. Forms state use of data and validation recovery.
29
+
30
+ ## Verification
31
+
32
+ Test narrow/mobile reading order, long localized headlines, RTL, font fallback, image failure, reduced motion, keyboard focus through skip/nav/CTA/form, contrast over imagery, Core Web Vitals/CLS, social metadata, and offline/error states for interactive demos.
@@ -0,0 +1,74 @@
1
+ # Pattern decision matrices
2
+
3
+ Use this reference before applying any named product pattern. Patterns encode recurring behavior, but the correct choice depends on task frequency, object count, risk, collaboration, input modality, and recovery cost. Do not pick a pattern because it is visually familiar.
4
+
5
+ ## Workflow structure matrix
6
+
7
+ | User/task shape | Prefer | Avoid or constrain | Required behavior |
8
+ |---|---|---|---|
9
+ | short infrequent linear task | single page or one-step flow | unnecessary wizard | visible submit/review behavior; preserve input |
10
+ | infrequent high-consequence branching task | guided stepper/wizard | hidden branching logic | progress truthfully shown; back/edit/resume; validation before irreversible commitment |
11
+ | expert repeated data entry | dense editable table/form or command workflow | forced stepper per item | keyboard flow, defaults, duplicate/copy, batch validation, undo |
12
+ | exploratory decision | comparison matrix/list-detail/filterable collection | forced linear narrative | stable comparison attributes, save/share state, reversible exploration |
13
+ | ongoing monitoring | dashboard/instrument panel | marketing-style narrative cards | freshness/source/state; alarm hierarchy; drill-down without losing overview |
14
+ | collaborative artifact | persistent canvas/document plus presence/history | isolated modal-per-action editing | ownership/conflict/restore/version behavior |
15
+ | import/migration | staged preview → validate → commit → recover | direct blind commit | mapping memory, partial failure semantics, rollback/report |
16
+ | setup/configuration | sensible defaults plus progressive advanced controls | expose every option at once | impact/copy validation, reset/undo, dependency explanation |
17
+
18
+ ## Navigation matrix
19
+
20
+ | Content/device shape | Prefer | Caveat |
21
+ |---|---|---|
22
+ | few top-level tasks, frequent switching | persistent tab/segment/rail according to platform | do not hide primary task behind generic menu |
23
+ | deep hierarchical object space | tree/sidebar plus breadcrumb/location | keyboard/tree semantics and state restoration required |
24
+ | large flat searchable corpus | list/index/search-first navigation | result state, sort/filter persistence, empty recovery |
25
+ | focused creation/editing | full-screen/split workspace with explicit exit | escape/back/dirty-state protection |
26
+ | companion/reference material | inspector/panel/popover chosen by frequency and screen size | focus order, occlusion, resize behavior |
27
+ | mobile compact flow | bottom/top native navigation or stacked push idioms | do not copy desktop sidebar/menubar literally |
28
+
29
+ ## Search/filter decision rules
30
+
31
+ Choose the lightest control that matches user knowledge:
32
+
33
+ | User knowledge/data shape | Pattern |
34
+ |---|---|
35
+ | knows exact object/name | direct search with keyboard submission/paste/clear |
36
+ | knows attributes, not exact name | faceted/filterable list with visible applied filters |
37
+ | compares few items | sortable table/list or comparison view |
38
+ | explores broad domain | grouped navigation plus search, not a blank search box alone |
39
+ | frequent expert retrieval | saved filters/views/history/command syntax only after basic UI works |
40
+
41
+ Mandatory recovery behavior: distinguish no matches, permission-hidden data, invalid query, network failure, stale response, and indexing delay. Empty state must offer concrete recovery in order of likelihood: remove/loosen filter, correct spelling, broaden scope, clear query, inspect permissions/indexing status, or create/import the missing object. Never write only “No results found.”
42
+
43
+ ## Dense table/list decision rules
44
+
45
+ Use a dense table when users scan aligned attributes, compare rows, or perform repeated expert work. Use list/cards when object identity/media/content matters more than column comparison.
46
+
47
+ Required dense-table semantics:
48
+
49
+ - stable ordering and visible sort/filter state;
50
+ - row selection model documented: single/multiple/range/all-visible/all-query;
51
+ - selection survives or intentionally resets across sort/filter/page/virtualization—do not silently lose it;
52
+ - bulk actions show affected count/scope and handle partial permission/failure;
53
+ - keyboard/controller navigation does not require traversing every cell when row-level actions exist;
54
+ - virtualized rows preserve total-count/position orientation and focus restoration;
55
+ - resize/reflow chooses priority columns rather than uniform compression;
56
+ - empty/loading/error/permission/offline states remain inside table context;
57
+ - row deletion/focus removal restores focus predictably.
58
+
59
+ Do not virtualize away accessibility or selection semantics. Do not use pagination merely because rendering was not designed; choose pagination/infinite/loading behavior based on object count, comparison needs, shareability, and platform norms.
60
+
61
+ ## Hybrid boundary rule
62
+
63
+ A screen may combine patterns only when each region has a dominant job and boundary: overview vs detail, browse vs edit, monitoring vs investigation, conversation vs artifact. Name the primary pattern per region and verify focus/order/back behavior across boundaries. Do not blend dashboard cards, wizard steps, canvas tools, and marketing persuasion into one undifferentiated surface.
64
+
65
+ ## Pattern selection record
66
+
67
+ Before implementation, record:
68
+
69
+ ```markdown
70
+ | Screen/region | Primary pattern | User/task evidence | Rejected alternative | Recovery risk | Verification required |
71
+ |---|---|---|---|---|---|
72
+ ```
73
+
74
+ A missing record means the pattern is probably inherited from a template rather than chosen.
@@ -0,0 +1,42 @@
1
+ # Search and filtering
2
+
3
+ Search quality is measured by recovery as much as result relevance.
4
+
5
+ ## Query input
6
+
7
+ - Use a persistent label or accessible name; placeholder is hint only.
8
+ - Support paste, clear, keyboard submission, autocomplete/IME composition, and cancellation of stale requests.
9
+ - Debounce without hiding that work is pending; preserve typed query through errors/navigation.
10
+ - Advanced syntax/filter UI must not expose implementation jargon unless users know it.
11
+
12
+ ## Results
13
+
14
+ - Show count/scope/time freshness where meaningful; never claim zero means absence when permissions hide data.
15
+ - Sorting/filter state must be visible, reversible, shareable where possible, and preserved on back/refresh.
16
+ - Empty results diagnose likely cause and offer concrete recovery: remove filter, broaden query, correct spelling, change scope.
17
+ - Large results need pagination/virtualization/stable ordering and selection semantics that users understand.
18
+
19
+ ## Faceting/filtering
20
+
21
+ Show applied filters as removable objects. Avoid cascading dependent dropdowns when direct filters or grouped controls communicate better. Do not hide counts in ways that dead-end users. Explain incompatible combinations.
22
+
23
+ ## Empty-result diagnosis
24
+
25
+ Classify the cause before writing copy:
26
+
27
+ | Cause | UI response |
28
+ |---|---|
29
+ | filters too restrictive | show removable active filters and a one-action clear/loosen path |
30
+ | spelling/ambiguous query | suggest correction or broader matching without pretending certainty |
31
+ | scope too narrow | offer visible scope change such as folder/project/team/date range |
32
+ | permission-hidden data | state that restricted objects may not appear; provide request/sign-in path where appropriate |
33
+ | indexing/sync delay | show freshness/pending state and retry; do not claim absence |
34
+ | malformed/unsupported query | identify the syntax problem and preserve the typed query |
35
+ | system/network failure | distinguish failure from legitimate zero results; provide retry and preserve state |
36
+ | collection genuinely empty | teach/create/import the first useful object when that is the correct next action |
37
+
38
+ Order recovery actions by likelihood and cost. Never use “No results found” as the complete state, never show fake suggested results, and never silently broaden the query/scope in a way that violates user intent.
39
+
40
+ ## Verification
41
+
42
+ Test no query, no results, one result, thousands, slow network, aborted stale response, malformed query, Unicode/IME/case/diacritic behavior, locale sort expectations, keyboard focus into results, screen-reader status announcements, narrow layout, saved/deep-linked state, permission-hidden objects, indexing lag, filter combinations that mutually exclude, and recovery after clearing only one filter versus all filters.