@thanhnguyxn/pixelcraft 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/.agents/plugins/marketplace.json +1 -1
  2. package/.antigravity-plugin/plugin.json +32 -0
  3. package/.claude-plugin/marketplace.json +1 -1
  4. package/.claude-plugin/plugin.json +15 -4
  5. package/.codex-plugin/plugin.json +45 -0
  6. package/.cursor-plugin/marketplace.json +17 -0
  7. package/.cursor-plugin/plugin.json +27 -0
  8. package/.devin-plugin/plugin.json +21 -0
  9. package/.github/plugin/marketplace.json +34 -0
  10. package/CHANGELOG.md +159 -0
  11. package/GEMINI.md +1 -0
  12. package/README.md +185 -328
  13. package/SECURITY.md +28 -0
  14. package/assets/pixelcraft-logo-128.png +0 -0
  15. package/assets/pixelcraft-logo-256.png +0 -0
  16. package/bin/pixelcraft.mjs +431 -23
  17. package/docs/ARCHITECTURE.md +40 -37
  18. package/docs/DESIGN-RATIONALE.md +51 -3
  19. package/docs/INSTALL.md +221 -0
  20. package/evals/README.md +16 -6
  21. package/evals/fixtures/3d-web-engineering.json +69 -0
  22. package/evals/fixtures/acceptance-checklist-rule03-gate.json +43 -0
  23. package/evals/fixtures/ai-ui-libraries.json +53 -0
  24. package/evals/fixtures/audio-visual-accessibility.json +69 -0
  25. package/evals/fixtures/auth-and-checkout-ui.json +53 -0
  26. package/evals/fixtures/brandkit-identity-governance.json +48 -0
  27. package/evals/fixtures/build-and-architecture.json +53 -0
  28. package/evals/fixtures/canvas-and-node-editors.json +53 -0
  29. package/evals/fixtures/chat-ai-exfiltration-ime-hitl-gate.json +43 -0
  30. package/evals/fixtures/completion-gate-scan-until-clean.json +44 -0
  31. package/evals/fixtures/component-systems.json +53 -0
  32. package/evals/fixtures/component-testing.json +53 -0
  33. package/evals/fixtures/constrained-voice-and-tv.json +43 -0
  34. package/evals/fixtures/creative-code-rendering.json +69 -0
  35. package/evals/fixtures/creative-reference-evidence.json +67 -0
  36. package/evals/fixtures/data-app-python-marimo.json +49 -0
  37. package/evals/fixtures/desktop-cpp-juce-audio.json +49 -0
  38. package/evals/fixtures/desktop-csharp-avalonia.json +49 -0
  39. package/evals/fixtures/desktop-native-workspace.json +48 -0
  40. package/evals/fixtures/desktop-python-anti-tkinter.json +49 -0
  41. package/evals/fixtures/document-prepress-pdfx4-tounicode.json +43 -0
  42. package/evals/fixtures/document-rust-typst-invoice.json +49 -0
  43. package/evals/fixtures/document-typst-and-print-css.json +43 -0
  44. package/evals/fixtures/email-mjml-dark-mode.json +49 -0
  45. package/evals/fixtures/email-outlook-and-plaintext.json +43 -0
  46. package/evals/fixtures/enterprise-data-ui.json +53 -0
  47. package/evals/fixtures/extended-tui-toolkits.json +53 -0
  48. package/evals/fixtures/extensions-mv3-and-vscode.json +43 -0
  49. package/evals/fixtures/file-upload-media-ui.json +53 -0
  50. package/evals/fixtures/forms-validation.json +53 -0
  51. package/evals/fixtures/game-go-ebitengine.json +49 -0
  52. package/evals/fixtures/game-godot-gdscript.json +49 -0
  53. package/evals/fixtures/game-ui-hud-and-engines.json +43 -0
  54. package/evals/fixtures/i18n-engineering.json +53 -0
  55. package/evals/fixtures/local-first-sync.json +53 -0
  56. package/evals/fixtures/lynxjs.json +53 -0
  57. package/evals/fixtures/maizzle-email.json +53 -0
  58. package/evals/fixtures/maps-geospatial.json +53 -0
  59. package/evals/fixtures/media-og-and-video-export.json +43 -0
  60. package/evals/fixtures/media-players.json +53 -0
  61. package/evals/fixtures/mobile-compose-16kb-foldable-store-gate.json +44 -0
  62. package/evals/fixtures/mobile-elixir-liveview-native.json +49 -0
  63. package/evals/fixtures/mobile-flutter-dynamic-type.json +49 -0
  64. package/evals/fixtures/mobile-harmonyos-arkui.json +49 -0
  65. package/evals/fixtures/mobile-jetpack-compose.json +49 -0
  66. package/evals/fixtures/mobile-swiftui-ios.json +49 -0
  67. package/evals/fixtures/motion-engineering.json +69 -0
  68. package/evals/fixtures/pdfjs-and-pptx.json +53 -0
  69. package/evals/fixtures/plan-discovery-interview.json +31 -0
  70. package/evals/fixtures/plan-grill-me-brainstorm-gate.json +49 -0
  71. package/evals/fixtures/reactive-data-apps.json +53 -0
  72. package/evals/fixtures/review-evidence-audit.json +43 -0
  73. package/evals/fixtures/rich-text-and-code-editors.json +53 -0
  74. package/evals/fixtures/scrollytelling-resilience.json +70 -0
  75. package/evals/fixtures/spatial-xr-comfort-and-platforms.json +43 -0
  76. package/evals/fixtures/state-architecture.json +53 -0
  77. package/evals/fixtures/styling-ecosystem.json +53 -0
  78. package/evals/fixtures/token-tooling.json +53 -0
  79. package/evals/fixtures/tui-go-bubbletea.json +49 -0
  80. package/evals/fixtures/tui-rust-ratatui-grapheme-paste-teardown.json +44 -0
  81. package/evals/fixtures/tui-rust-ratatui.json +49 -0
  82. package/evals/fixtures/ux-state-matrix-and-i18n.json +43 -0
  83. package/evals/fixtures/web-3d-engines.json +53 -0
  84. package/evals/fixtures/web-php-laravel-filament.json +49 -0
  85. package/evals/fixtures/web-ruby-viewcomponent-phlex.json +49 -0
  86. package/evals/pixelcraft-accessibility.md +17 -0
  87. package/evals/pixelcraft-craft.md +16 -0
  88. package/evals/pixelcraft-dataviz.md +3 -3
  89. package/evals/pixelcraft-direction.md +17 -0
  90. package/evals/pixelcraft-game-ui.md +3 -3
  91. package/evals/pixelcraft-mobile.md +3 -3
  92. package/evals/pixelcraft-patterns.md +16 -0
  93. package/evals/pixelcraft-plan.md +65 -3
  94. package/evals/pixelcraft-review.md +3 -3
  95. package/evals/pixelcraft-visual-qa.md +11 -5
  96. package/evals/pixelcraft-web.md +21 -3
  97. package/evals/pixelcraft.md +4 -4
  98. package/gemini-extension.json +3 -2
  99. package/install.ps1 +57 -11
  100. package/install.sh +82 -7
  101. package/package.json +32 -4
  102. package/plugin.json +6 -1
  103. package/scripts/build-adapters.mjs +11 -13
  104. package/scripts/run-evals.mjs +397 -0
  105. package/scripts/sync-docs.mjs +381 -0
  106. package/scripts/test-build-adapters.mjs +14 -1
  107. package/scripts/test-cross-platform-qa.mjs +359 -0
  108. package/scripts/test-distribution.mjs +86 -7
  109. package/scripts/test-export-tokens.mjs +259 -3
  110. package/scripts/test-finish-gate.mjs +133 -10
  111. package/scripts/test-installers.mjs +155 -6
  112. package/scripts/test-shoot.mjs +23 -1
  113. package/scripts/test-slop-scan.mjs +390 -3
  114. package/scripts/test-style-inventory.mjs +23 -0
  115. package/scripts/test-sync-docs.mjs +140 -0
  116. package/scripts/test-validate-skills.mjs +82 -4
  117. package/scripts/validate-skills.mjs +149 -3
  118. package/skills/pixelcraft/SKILL.md +67 -47
  119. package/skills/pixelcraft/references/design-brief.md +2 -2
  120. package/skills/pixelcraft/references/floor.md +36 -19
  121. package/skills/pixelcraft/references/report-template.md +25 -11
  122. package/skills/pixelcraft/references/stack-detection.md +138 -67
  123. package/skills/pixelcraft/references/surface-acceptance.md +33 -21
  124. package/skills/pixelcraft/references/workflow-checkpoints.md +49 -7
  125. package/skills/pixelcraft-accessibility/SKILL.md +34 -13
  126. package/skills/pixelcraft-accessibility/references/apg-patterns.md +13 -0
  127. package/skills/pixelcraft-accessibility/references/motion-canvas.md +57 -0
  128. package/skills/pixelcraft-accessibility/references/platforms.md +34 -6
  129. package/skills/pixelcraft-accessibility/references/verification.md +15 -10
  130. package/skills/pixelcraft-accessibility/references/wcag22-checks.md +38 -5
  131. package/skills/pixelcraft-brandkit/SKILL.md +42 -30
  132. package/skills/pixelcraft-brandkit/references/asset-pipeline.md +90 -50
  133. package/skills/pixelcraft-brandkit/references/brand-governance.md +29 -27
  134. package/skills/pixelcraft-brandkit/references/logo-methods.md +33 -34
  135. package/skills/pixelcraft-brandkit/references/prompt-template.md +53 -51
  136. package/skills/pixelcraft-brandkit/references/qa-checklist.md +7 -2
  137. package/skills/pixelcraft-brandkit/references/visual-modes.md +16 -16
  138. package/skills/pixelcraft-chat-ui/SKILL.md +31 -27
  139. package/skills/pixelcraft-chat-ui/references/agentic-workspace.md +66 -0
  140. package/skills/pixelcraft-chat-ui/references/ai-ui-libraries.md +259 -0
  141. package/skills/pixelcraft-chat-ui/references/conversation-design.md +12 -6
  142. package/skills/pixelcraft-chat-ui/references/mobile-business-platforms.md +58 -68
  143. package/skills/pixelcraft-chat-ui/references/slack-discord.md +60 -76
  144. package/skills/pixelcraft-constrained/SKILL.md +21 -20
  145. package/skills/pixelcraft-constrained/references/specialized-hardware.md +69 -45
  146. package/skills/pixelcraft-constrained/references/tv-wearables.md +123 -73
  147. package/skills/pixelcraft-constrained/references/voice-ui.md +86 -45
  148. package/skills/pixelcraft-craft/SKILL.md +29 -15
  149. package/skills/pixelcraft-craft/references/color.md +62 -6
  150. package/skills/pixelcraft-craft/references/layout.md +32 -0
  151. package/skills/pixelcraft-craft/references/motion.md +99 -12
  152. package/skills/pixelcraft-craft/references/typography.md +48 -9
  153. package/skills/pixelcraft-data-apps/SKILL.md +50 -31
  154. package/skills/pixelcraft-data-apps/references/ai-and-internal-data-apps.md +147 -0
  155. package/skills/pixelcraft-data-apps/references/dash.md +87 -31
  156. package/skills/pixelcraft-data-apps/references/evidence.md +41 -26
  157. package/skills/pixelcraft-data-apps/references/gradio.md +65 -27
  158. package/skills/pixelcraft-data-apps/references/julia-genie.md +64 -29
  159. package/skills/pixelcraft-data-apps/references/jupyter-widgets.md +65 -27
  160. package/skills/pixelcraft-data-apps/references/nicegui.md +73 -34
  161. package/skills/pixelcraft-data-apps/references/observable-framework.md +65 -27
  162. package/skills/pixelcraft-data-apps/references/panel.md +69 -23
  163. package/skills/pixelcraft-data-apps/references/r-shiny.md +104 -34
  164. package/skills/pixelcraft-data-apps/references/reactive-data-apps.md +186 -0
  165. package/skills/pixelcraft-data-apps/references/reflex.md +85 -31
  166. package/skills/pixelcraft-data-apps/references/shiny.md +84 -27
  167. package/skills/pixelcraft-data-apps/references/streamlit.md +73 -25
  168. package/skills/pixelcraft-dataviz/SKILL.md +21 -24
  169. package/skills/pixelcraft-dataviz/references/color-accessibility.md +2 -2
  170. package/skills/pixelcraft-dataviz/references/encoding-tables-dashboards.md +35 -25
  171. package/skills/pixelcraft-dataviz/references/libraries.md +165 -46
  172. package/skills/pixelcraft-dataviz/references/maps-geospatial.md +159 -0
  173. package/skills/pixelcraft-dataviz/references/realtime-graphs-maps-scale.md +58 -65
  174. package/skills/pixelcraft-desktop/SKILL.md +61 -39
  175. package/skills/pixelcraft-desktop/references/appkit.md +60 -26
  176. package/skills/pixelcraft-desktop/references/avalonia.md +65 -29
  177. package/skills/pixelcraft-desktop/references/cpp-gui.md +104 -27
  178. package/skills/pixelcraft-desktop/references/electron.md +68 -26
  179. package/skills/pixelcraft-desktop/references/go-gui.md +59 -30
  180. package/skills/pixelcraft-desktop/references/gtk.md +74 -31
  181. package/skills/pixelcraft-desktop/references/javafx-swing.md +54 -25
  182. package/skills/pixelcraft-desktop/references/qt-pyside-qml.md +57 -30
  183. package/skills/pixelcraft-desktop/references/rust-gui.md +59 -41
  184. package/skills/pixelcraft-desktop/references/tauri.md +80 -24
  185. package/skills/pixelcraft-desktop/references/uno-platform.md +42 -23
  186. package/skills/pixelcraft-desktop/references/winui-wpf.md +66 -26
  187. package/skills/pixelcraft-desktop/references/working-context.md +82 -3
  188. package/skills/pixelcraft-direction/SKILL.md +48 -82
  189. package/skills/pixelcraft-direction/references/creative-brainstorming.md +72 -0
  190. package/skills/pixelcraft-direction/references/direction-card.md +11 -1
  191. package/skills/pixelcraft-direction/references/direction-scoring.md +5 -1
  192. package/skills/pixelcraft-direction/references/motion-identity.md +67 -0
  193. package/skills/pixelcraft-direction/references/movements.md +3 -0
  194. package/skills/pixelcraft-direction/references/reference-analysis.md +37 -0
  195. package/skills/pixelcraft-direction/references/slop-fingerprints.md +32 -7
  196. package/skills/pixelcraft-document/SKILL.md +27 -23
  197. package/skills/pixelcraft-document/references/archetypes.md +27 -4
  198. package/skills/pixelcraft-document/references/pdf-tools.md +241 -81
  199. package/skills/pixelcraft-document/references/pdfjs-and-pptx.md +114 -0
  200. package/skills/pixelcraft-document/references/print-css.md +96 -43
  201. package/skills/pixelcraft-document/references/slides.md +123 -27
  202. package/skills/pixelcraft-email/SKILL.md +42 -20
  203. package/skills/pixelcraft-email/references/client-quirks.md +101 -33
  204. package/skills/pixelcraft-email/references/html-tables.md +83 -22
  205. package/skills/pixelcraft-email/references/maizzle.md +54 -0
  206. package/skills/pixelcraft-email/references/mjml.md +13 -11
  207. package/skills/pixelcraft-email/references/react-email.md +76 -34
  208. package/skills/pixelcraft-extensions/SKILL.md +32 -27
  209. package/skills/pixelcraft-extensions/references/browser-extensions.md +91 -17
  210. package/skills/pixelcraft-extensions/references/figma-office.md +97 -14
  211. package/skills/pixelcraft-extensions/references/ide-and-saas-plugins.md +125 -0
  212. package/skills/pixelcraft-extensions/references/raycast.md +90 -11
  213. package/skills/pixelcraft-extensions/references/vscode-webviews.md +91 -17
  214. package/skills/pixelcraft-game-ui/SKILL.md +45 -26
  215. package/skills/pixelcraft-game-ui/references/bevy.md +69 -31
  216. package/skills/pixelcraft-game-ui/references/godot.md +100 -27
  217. package/skills/pixelcraft-game-ui/references/hud-principles.md +50 -21
  218. package/skills/pixelcraft-game-ui/references/love2d.md +53 -27
  219. package/skills/pixelcraft-game-ui/references/monogame.md +45 -29
  220. package/skills/pixelcraft-game-ui/references/unity-ugui.md +109 -0
  221. package/skills/pixelcraft-game-ui/references/unity-ui-toolkit.md +69 -27
  222. package/skills/pixelcraft-game-ui/references/unreal-umg.md +53 -26
  223. package/skills/pixelcraft-game-ui/references/web-and-middleware-game-ui.md +122 -0
  224. package/skills/pixelcraft-handoff/SKILL.md +14 -13
  225. package/skills/pixelcraft-handoff/references/design-translation.md +40 -10
  226. package/skills/pixelcraft-handoff/references/motion-handoff.md +54 -0
  227. package/skills/pixelcraft-media/SKILL.md +20 -23
  228. package/skills/pixelcraft-media/references/banners-video.md +83 -65
  229. package/skills/pixelcraft-media/references/og-generation.md +110 -63
  230. package/skills/pixelcraft-media/references/social-cards.md +57 -58
  231. package/skills/pixelcraft-mobile/SKILL.md +53 -36
  232. package/skills/pixelcraft-mobile/references/dotnet-maui.md +62 -34
  233. package/skills/pixelcraft-mobile/references/flet.md +53 -26
  234. package/skills/pixelcraft-mobile/references/flutter.md +76 -32
  235. package/skills/pixelcraft-mobile/references/harmonyos-and-emerging-mobile.md +121 -0
  236. package/skills/pixelcraft-mobile/references/ionic-capacitor.md +48 -26
  237. package/skills/pixelcraft-mobile/references/jetpack-compose.md +92 -24
  238. package/skills/pixelcraft-mobile/references/kivy.md +54 -31
  239. package/skills/pixelcraft-mobile/references/kotlin-multiplatform.md +53 -27
  240. package/skills/pixelcraft-mobile/references/lynxjs.md +110 -0
  241. package/skills/pixelcraft-mobile/references/nativescript-and-skip.md +91 -0
  242. package/skills/pixelcraft-mobile/references/react-native-expo.md +66 -31
  243. package/skills/pixelcraft-mobile/references/swiftui.md +158 -28
  244. package/skills/pixelcraft-mobile/references/tactile-interactions.md +55 -0
  245. package/skills/pixelcraft-mobile/references/task-state-composition.md +82 -2
  246. package/skills/pixelcraft-mobile/references/uikit.md +57 -23
  247. package/skills/pixelcraft-patterns/SKILL.md +30 -13
  248. package/skills/pixelcraft-patterns/references/accessibility-resilience.md +29 -0
  249. package/skills/pixelcraft-patterns/references/ai-and-offline-patterns.md +54 -0
  250. package/skills/pixelcraft-patterns/references/auth-onboarding.md +32 -13
  251. package/skills/pixelcraft-patterns/references/billing-paywalls.md +40 -0
  252. package/skills/pixelcraft-patterns/references/command-workspace.md +56 -0
  253. package/skills/pixelcraft-patterns/references/commerce.md +35 -16
  254. package/skills/pixelcraft-patterns/references/communication.md +34 -15
  255. package/skills/pixelcraft-patterns/references/creative-tools.md +30 -17
  256. package/skills/pixelcraft-patterns/references/creative-web-composition.md +38 -0
  257. package/skills/pixelcraft-patterns/references/dashboard-admin.md +22 -18
  258. package/skills/pixelcraft-patterns/references/history-diff-undo.md +50 -0
  259. package/skills/pixelcraft-patterns/references/marketing.md +31 -19
  260. package/skills/pixelcraft-patterns/references/multi-tenant-rbac.md +47 -0
  261. package/skills/pixelcraft-patterns/references/narrative-systems.md +42 -0
  262. package/skills/pixelcraft-patterns/references/notifications-activity.md +57 -0
  263. package/skills/pixelcraft-patterns/references/pattern-selection.md +8 -2
  264. package/skills/pixelcraft-patterns/references/scheduling-kanban.md +47 -0
  265. package/skills/pixelcraft-patterns/references/scroll-implementation.md +37 -0
  266. package/skills/pixelcraft-patterns/references/settings.md +40 -12
  267. package/skills/pixelcraft-plan/SKILL.md +54 -18
  268. package/skills/pixelcraft-plan/references/discovery-interview.md +110 -0
  269. package/skills/pixelcraft-plan/references/grill-me-protocol.md +63 -0
  270. package/skills/pixelcraft-plan/references/plan-template.md +44 -9
  271. package/skills/pixelcraft-plan/references/repo-discovery.md +16 -9
  272. package/skills/pixelcraft-plan/references/stack-freshness.md +22 -5
  273. package/skills/pixelcraft-plan/references/stack-selection.md +65 -9
  274. package/skills/pixelcraft-review/SKILL.md +41 -19
  275. package/skills/pixelcraft-review/references/audit-report.md +20 -1
  276. package/skills/pixelcraft-review/references/heuristics.md +63 -18
  277. package/skills/pixelcraft-review/references/personas.md +41 -14
  278. package/skills/pixelcraft-review/references/polish.md +66 -26
  279. package/skills/pixelcraft-review/scripts/check-acceptance.mjs +619 -0
  280. package/skills/pixelcraft-review/scripts/fixtures/focus-longhand-removal.css +34 -0
  281. package/skills/pixelcraft-review/scripts/slop-scan.mjs +679 -32
  282. package/skills/pixelcraft-spatial/SKILL.md +16 -17
  283. package/skills/pixelcraft-spatial/references/comfort-accessibility.md +25 -84
  284. package/skills/pixelcraft-spatial/references/platforms.md +123 -53
  285. package/skills/pixelcraft-tokens/SKILL.md +18 -14
  286. package/skills/pixelcraft-tokens/assets/tokens.example.json +1 -1
  287. package/skills/pixelcraft-tokens/assets/tokens.modes.example.json +1 -1
  288. package/skills/pixelcraft-tokens/references/format.md +39 -9
  289. package/skills/pixelcraft-tokens/references/governance.md +1 -1
  290. package/skills/pixelcraft-tokens/references/theme-presets.md +36 -8
  291. package/skills/pixelcraft-tokens/references/token-tooling.md +119 -0
  292. package/skills/pixelcraft-tokens/scripts/export-tokens.mjs +637 -75
  293. package/skills/pixelcraft-tui/SKILL.md +41 -25
  294. package/skills/pixelcraft-tui/references/bubbletea-lipgloss.md +49 -30
  295. package/skills/pixelcraft-tui/references/extended-tui-toolkits.md +127 -0
  296. package/skills/pixelcraft-tui/references/ink.md +77 -28
  297. package/skills/pixelcraft-tui/references/ratatui.md +70 -30
  298. package/skills/pixelcraft-tui/references/rich.md +53 -33
  299. package/skills/pixelcraft-tui/references/terminal-protocols.md +80 -0
  300. package/skills/pixelcraft-tui/references/textual.md +75 -34
  301. package/skills/pixelcraft-ux/SKILL.md +22 -12
  302. package/skills/pixelcraft-ux/references/feedback-performance.md +39 -19
  303. package/skills/pixelcraft-ux/references/forms.md +57 -3
  304. package/skills/pixelcraft-ux/references/i18n.md +50 -12
  305. package/skills/pixelcraft-ux/references/laws.md +35 -14
  306. package/skills/pixelcraft-ux/references/state-matrix.md +15 -1
  307. package/skills/pixelcraft-ux/references/ux-writing.md +1 -0
  308. package/skills/pixelcraft-visual-qa/SKILL.md +21 -7
  309. package/skills/pixelcraft-visual-qa/references/capture-desktop-game.md +28 -7
  310. package/skills/pixelcraft-visual-qa/references/capture-document.md +70 -0
  311. package/skills/pixelcraft-visual-qa/references/capture-email.md +13 -9
  312. package/skills/pixelcraft-visual-qa/references/capture-mobile.md +20 -5
  313. package/skills/pixelcraft-visual-qa/references/capture-terminal.md +6 -2
  314. package/skills/pixelcraft-visual-qa/references/motion-capture.md +63 -0
  315. package/skills/pixelcraft-visual-qa/references/performance-budgets.md +25 -12
  316. package/skills/pixelcraft-visual-qa/references/realtime-graphics.md +55 -0
  317. package/skills/pixelcraft-visual-qa/scripts/check-contrast.mjs +442 -0
  318. package/skills/pixelcraft-visual-qa/scripts/check-email.mjs +397 -0
  319. package/skills/pixelcraft-visual-qa/scripts/check-pdf.mjs +189 -0
  320. package/skills/pixelcraft-visual-qa/scripts/check-tui.mjs +321 -0
  321. package/skills/pixelcraft-visual-qa/scripts/finish-gate.mjs +50 -11
  322. package/skills/pixelcraft-visual-qa/scripts/shoot.mjs +214 -59
  323. package/skills/pixelcraft-visual-qa/scripts/style-inventory.mjs +121 -49
  324. package/skills/pixelcraft-web/SKILL.md +105 -49
  325. package/skills/pixelcraft-web/references/accessibility-performance.md +42 -0
  326. package/skills/pixelcraft-web/references/adaptive-layout.md +52 -8
  327. package/skills/pixelcraft-web/references/angular.md +63 -16
  328. package/skills/pixelcraft-web/references/assets-pipeline.md +67 -0
  329. package/skills/pixelcraft-web/references/astro.md +64 -13
  330. package/skills/pixelcraft-web/references/audio-reactive.md +61 -0
  331. package/skills/pixelcraft-web/references/auth-and-checkout-ui.md +115 -0
  332. package/skills/pixelcraft-web/references/build-and-architecture.md +215 -0
  333. package/skills/pixelcraft-web/references/canvas-and-node-editors.md +157 -0
  334. package/skills/pixelcraft-web/references/clojurescript.md +52 -17
  335. package/skills/pixelcraft-web/references/component-systems.md +102 -0
  336. package/skills/pixelcraft-web/references/component-testing.md +170 -0
  337. package/skills/pixelcraft-web/references/creative-effects.md +59 -0
  338. package/skills/pixelcraft-web/references/creative-runtime.md +34 -0
  339. package/skills/pixelcraft-web/references/enterprise-data-ui.md +138 -0
  340. package/skills/pixelcraft-web/references/file-upload-media-ui.md +82 -0
  341. package/skills/pixelcraft-web/references/forms-validation.md +123 -0
  342. package/skills/pixelcraft-web/references/fsharp-fable.md +3 -2
  343. package/skills/pixelcraft-web/references/gsap.md +102 -0
  344. package/skills/pixelcraft-web/references/html-css.md +144 -12
  345. package/skills/pixelcraft-web/references/htmx-alpine.md +68 -18
  346. package/skills/pixelcraft-web/references/i18n-engineering.md +106 -0
  347. package/skills/pixelcraft-web/references/interaction-and-search-primitives.md +196 -0
  348. package/skills/pixelcraft-web/references/java-web.md +27 -18
  349. package/skills/pixelcraft-web/references/kotlin-web.md +6 -2
  350. package/skills/pixelcraft-web/references/leptos-yew.md +62 -19
  351. package/skills/pixelcraft-web/references/lit-web-components.md +4 -2
  352. package/skills/pixelcraft-web/references/local-first-sync.md +105 -0
  353. package/skills/pixelcraft-web/references/media-players.md +104 -0
  354. package/skills/pixelcraft-web/references/motion-react.md +96 -0
  355. package/skills/pixelcraft-web/references/motion-recipes.md +82 -0
  356. package/skills/pixelcraft-web/references/preact-fresh-hono.md +111 -0
  357. package/skills/pixelcraft-web/references/pwa.md +6 -1
  358. package/skills/pixelcraft-web/references/qwik.md +51 -11
  359. package/skills/pixelcraft-web/references/r3f-integration.md +69 -0
  360. package/skills/pixelcraft-web/references/react-next.md +112 -13
  361. package/skills/pixelcraft-web/references/rendering-choice.md +63 -0
  362. package/skills/pixelcraft-web/references/rendering-performance.md +80 -0
  363. package/skills/pixelcraft-web/references/rich-text-and-code-editors.md +220 -0
  364. package/skills/pixelcraft-web/references/rive-lottie.md +73 -0
  365. package/skills/pixelcraft-web/references/scene-architecture.md +132 -0
  366. package/skills/pixelcraft-web/references/server-rendered.md +106 -63
  367. package/skills/pixelcraft-web/references/shader-workflow.md +77 -0
  368. package/skills/pixelcraft-web/references/smooth-scroll.md +58 -0
  369. package/skills/pixelcraft-web/references/solid.md +67 -16
  370. package/skills/pixelcraft-web/references/state-architecture.md +107 -0
  371. package/skills/pixelcraft-web/references/styling-ecosystem.md +273 -0
  372. package/skills/pixelcraft-web/references/svelte.md +61 -11
  373. package/skills/pixelcraft-web/references/tailwind.md +40 -14
  374. package/skills/pixelcraft-web/references/video-media.md +69 -0
  375. package/skills/pixelcraft-web/references/vue-nuxt.md +37 -13
  376. package/skills/pixelcraft-web/references/web-3d-engines.md +97 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
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.
3
+ description: Applies surface-independent product UX patterns without collapsing into generic templates. Use for dashboards/admin, e-commerce PLP/PDP/cart/checkout, SaaS billing/paywalls/usage metering, multi-tenant RBAC/SSO/audit logs, notifications/inbox/activity feeds, calendars/scheduling/Gantt/Kanban, undo/version history/diff viewers, editors/creative tools, chat/collaboration, auth/passkeys/onboarding, marketing/editorial composition, scrollytelling, settings, search/filtering, dense tables/CRUD, command palettes (Cmd+K), embedded AI/copilot UX, and offline-first sync/conflict resolution across any frontend stack.
4
4
  license: MIT
5
5
  metadata:
6
6
  version: 0.1.0
@@ -13,15 +13,26 @@ Patterns are starting hypotheses, not layouts to copy. Choose one from the user'
13
13
  ## References
14
14
 
15
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.
16
+ - Read [references/dashboard-admin.md](references/dashboard-admin.md) when designing operational overview, monitoring, admin, triage queues, and drill-down control surfaces.
17
+ - Read [references/commerce.md](references/commerce.md) when designing retail PLP, PDP, cart, checkout, payment errors, and post-purchase flows.
18
+ - Read [references/billing-paywalls.md](references/billing-paywalls.md) when designing SaaS pricing tables, proration previews, soft/hard paywalls, usage meters, dunning banners, or self-serve cancellation.
19
+ - Read [references/multi-tenant-rbac.md](references/multi-tenant-rbac.md) when designing workspace/tenant switchers, RBAC/ABAC permission editors, SSO/SCIM admin setup, API keys/webhooks, or diffable audit logs.
20
+ - Read [references/notifications-activity.md](references/notifications-activity.md) when designing notification centers, inbox triage (snooze/archive/undo), channel × event preference matrices, or live activity feeds.
21
+ - Read [references/scheduling-kanban.md](references/scheduling-kanban.md) when designing calendars, booking pickers, recurrence/DST handling, Gantt timelines, or Kanban boards with WIP limits and WCAG 2.5.7 non-drag moves.
22
+ - Read [references/history-diff-undo.md](references/history-diff-undo.md) when designing atomic undo/redo stacks, multiplayer per-user undo, named version snapshots, or code/rich-text/JSON diff viewers.
23
+ - Read [references/ai-and-offline-patterns.md](references/ai-and-offline-patterns.md) when designing embedded in-app AI workflows (hybrid search, NL-to-filter, inline diffs, approval gates) or offline-first sync status, outboxes, and conflict resolution.
24
+ - Read [references/creative-tools.md](references/creative-tools.md) when designing editors, canvases, layer trees, mixed-value multi-select inspectors, snapping/guides, and creative workspaces.
25
+ - Read [references/communication.md](references/communication.md) when designing human-to-human in-app chat, threads, unread dividers, pins, and collaboration surfaces.
26
+ - Read [references/auth-onboarding.md](references/auth-onboarding.md) when designing sign-in/up, passkeys, OTP/magic links, enterprise SSO discovery, progressive onboarding checklists, and account lifecycle.
27
+ - Read [references/marketing.md](references/marketing.md) when designing conversion architecture, proof, trust rules, and persuasion surfaces.
28
+ - Read [references/creative-web-composition.md](references/creative-web-composition.md) when designing art-directed editorial rhythm, case studies, interactive showcases, and expressive section composition.
29
+ - Read [references/narrative-systems.md](references/narrative-systems.md) when designing multi-chapter scrollytelling outlines, narrative models, and chapter state contracts.
30
+ - Read [references/scroll-implementation.md](references/scroll-implementation.md) when choosing scroll-coupled vs stepped progression models and bounded pinning rules.
31
+ - Read [references/accessibility-resilience.md](references/accessibility-resilience.md) when ensuring scrollytelling focus stability, reduced-motion linear fallback, and zoom/RTL resilience.
32
+ - Read [references/settings.md](references/settings.md) when designing settings, org/workspace/user inheritance, sticky dirty-save bars, and type-to-confirm danger zones.
33
+ - Read [references/search-filtering.md](references/search-filtering.md) when designing query inputs, faceting, empty-result diagnosis, sorting, and large-result recovery.
34
+ - Read [references/tables-crud.md](references/tables-crud.md) when designing dense operational tables, list/detail, CRUD, bulk actions, selection contracts, and import/export.
35
+ - Read [references/command-workspace.md](references/command-workspace.md) when designing surface-independent command palettes (`Cmd+K`/`Ctrl+K`), keyboard-first navigation, optimistic UI with rollback/undo, master-detail split panes, and density modes.
25
36
 
26
37
  ## Selection protocol
27
38
 
@@ -46,13 +57,19 @@ Patterns are starting hypotheses, not layouts to copy. Choose one from the user'
46
57
  | navigation | Back/escape/deep links/refresh must restore understandable state. |
47
58
  | truthfulness | No fake metrics, activity, reviews, presence, screenshots, or personalization. |
48
59
 
60
+ ## Sub-Stack Library Escalation
61
+
62
+ Patterns define interaction contracts, never permission to hand-roll fragile widgets from scratch. Whenever a selected pattern requires a complex interactive primitive—**command palette (`Cmd+K`), search/faceting, toast queue, drawer/bottom sheet, rich-text or code editor, >500-row virtualized table, drag-and-drop, calendar/date picker, carousel, chart, map, or node graph**—escalate to a vetted, accessible, purpose-built library via the active surface skill (`pixelcraft-web`, `pixelcraft-mobile`, `pixelcraft-desktop`, `pixelcraft-tui`, `pixelcraft-data-apps`) and record it in `.pixelcraft/plan.md`. Never substitute raw `<div>` modals, `contenteditable` hacks, mouse-only DnD, unvirtualized massive tables, or hardcoded inline SVG charts.
63
+
49
64
  ## Pre-submit checklist
50
65
 
51
66
  - [ ] correct primary pattern selected and hybrid boundaries explicit;
52
- - [ ] first-use, returning-use, empty, error, loading, permission, and long-content states designed;
67
+ - [ ] complex primitives (command palettes, search/faceting, toasts, drawers, editors, large tables, DnD, calendars, charts) routed to vetted platform libraries—zero DIY hacks;
68
+ - [ ] first-use, returning-use, empty, error, loading, permission, conflict, and long-content states designed;
53
69
  - [ ] destructive/irreversible actions use consequence-appropriate friction;
54
70
  - [ ] keyboard/controller/touch path and focus restoration match the platform;
55
- - [ ] copy names concrete user/domain objects rather than generic “items” or “data”;
71
+ - [ ] copy names concrete user/domain objects rather than generic "items" or "data";
72
+ - [ ] anti-slop check: zero default template cloning (centered hero + 3 tinted-icon cards), fake KPI/activity/review proof, or AI marketing clichés;
56
73
  - [ ] adaptation and localization stress cases use real or realistic content;
57
74
  - [ ] visual distinctiveness supports rather than overrides task completion;
58
- - [ ] evidence labels distinguish rendered behavior from static inference.
75
+ - [ ] evidence labels distinguish `rendered` behavior from `static` inspection or `model-judgment`.
@@ -0,0 +1,29 @@
1
+ # Scrollytelling accessibility and resilience
2
+
3
+ Interactive narratives and pinned visuals are progressive enhancements. Every reader—keyboard-only, screen-reader, reduced-motion, magnified, RTL, low-power, or fallback mode—must receive the complete argument and evidence without fighting the layout. For browser ARIA/CSS/reduced-motion implementation specifics, coordinate with `pixelcraft-web`.
4
+
5
+ ## Accessibility & resilience contract
6
+
7
+ | Concern | Mandatory rule | Failure mode prevented |
8
+ |---|---|---|
9
+ | **Logical reading order** | Keep one coherent reading sequence across chapters even while a visual artifact remains pinned or sticky. | Screen readers and keyboard users jumping unpredictably between prose and detached visual regions |
10
+ | **Focus stability** | Keep focus indicators clearly visible and **never move focus programmatically** merely because a scroll threshold was crossed. | Disorienting keyboard/assistive-tech users mid-scroll |
11
+ | **Bypass & orientation** | Provide a table of contents with direct chapter links and a skip-narrative path past long pinned sequences. | Trapping users inside multi-screen visual corridors |
12
+ | **Reduced motion** | Under user reduced-motion preferences, render chapters in normal linear flow with discrete final/static visual states and zero parallax or scroll-scrubbing motion. | Motion sickness, vestibular triggers, and frozen blank opacity-0 sections |
13
+ | **Zoom & text expansion** | Support 200% text scaling, long localized strings, and RTL mirroring without clipping captions or colliding with pinned visuals. | Overlapping text or cropped headlines inside fixed-height scroll frames |
14
+ | **Media & audio safety** | Never autoplay audio; provide captions and transcripts for spoken narration, plus text/table alternatives (with units and sources) for every animated chart or diagram. | Inaccessible insight trapped inside visual transitions or muted video |
15
+ | **Input & history integrity** | Preserve platform scroll keys, scrollbar, touch momentum, and back/forward navigation at every point in the narrative. | Broken browser/app Back button or frozen keyboard scrolling |
16
+ | **Runtime failure fallback** | Ensure core headings, prose, and key static visuals remain readable if interactive scripting, animations, or 3D/GPU renderers fail to initialize. | Empty blank stages hiding the actual content |
17
+
18
+ ## Do/don't pairs
19
+
20
+ | Do | Don't |
21
+ |---|---|
22
+ | Render content visible by default and enhance transitions progressively | Hide chapters at `opacity: 0` waiting for an animation engine to reveal them |
23
+ | Pair every animated chart state with a static text takeaway and data table | Communicate key numbers solely through scrub-triggered tooltips |
24
+ | Release sticky/pinned containers cleanly under reduced-motion or 200% zoom | Clip expanded prose behind `overflow: hidden` pinned frames |
25
+ | Let chapter links move focus cleanly only when explicitly activated by the user | Steal focus automatically on scroll intersection |
26
+
27
+ ## Verification
28
+
29
+ Test with keyboard-only navigation (Tab, Space, PageDown, Home/End), reduced-motion enabled, 200% text scaling, short landscape viewports, narrow mobile widths, RTL layout, disabled/failed enhanced scripting, and screen-reader traversal through table of contents -> chapters -> data alternatives.
@@ -0,0 +1,54 @@
1
+ # In-app AI patterns and offline-first sync UX
2
+
3
+ Modern operational products increasingly blend **embedded AI assistance** (outside standalone chat) with **local-first / offline resilience**. Both fail when automation or background syncing hides system state from the user.
4
+
5
+ ## Part 1: In-app AI and copilot product patterns
6
+
7
+ > **Cross-skill boundary:** Use this reference for **embedded AI capabilities inside product workflows** (search, inline authoring, NL-to-filter, autonomous suggestions, approval gates). For full conversational/agentic chat workspaces, streaming token lifecycles, tool-call traces, artifact split views, and hosted messaging bots, coordinate with `pixelcraft-chat-ui`.
8
+
9
+ ### Embedded AI pattern matrix
10
+
11
+ | Pattern | Best fit | Mandatory trust & UX rules |
12
+ |---|---|---|
13
+ | **Semantic / hybrid search** | Docs, knowledge bases, large catalogs where users describe intent | Combine lexical + semantic results transparently; show *why* a result matched (highlighted snippet or source citation), preserve classic exact-match/filter fallback, and never fabricate answers when zero sources match. |
14
+ | **NL-to-filter / query builder** | Analytics, issue trackers, CRMs with complex query languages | Translate natural language into **visible, editable structured filter chips** (`status:open`, `created:>30d`) rather than running an opaque hidden query; let users inspect, tweak, or clear any chip. |
15
+ | **Inline AI command / authoring** | Document editors, email composers, code/SQL fields | Trigger deliberately (selection toolbar, slash command, or shortcut); stream proposed edits into a **preview/diff state** with explicit `Accept`, `Insert below`, `Refine`, and `Discard` (`Escape`) controls—never silently overwrite user prose. |
16
+ | **Background triage / suggestions** | Auto-categorization, duplicate detection, reply drafts, anomaly summaries | Clearly mark AI-generated labels/summaries with provenance and confidence or source links; keep suggestions reversible and dismissible; allow workspace admins to toggle AI features off cleanly. |
17
+ | **Agentic approval gates (Human-in-the-Loop)** | Any AI action that mutates external state (send email, refund, delete, deploy, run SQL write) | Pause before execution with an explicit action summary (exact parameters, target records, blast radius), require clear `Approve` / `Edit parameters` / `Deny`, and record both prompt and approver in the audit trail. |
18
+
19
+ ### AI truthfulness & failure handling
20
+
21
+ - Distinguish **loading/thinking**, **streaming**, **grounded with sources**, **uncertain/insufficient evidence**, **rate-limited/quota exceeded**, and **model error** states clearly—always preserving the user's original prompt or selection for retry.
22
+ - Never replace deterministic UI controls (date pickers, exact filters, CRUD buttons) with a forced prompt box.
23
+
24
+ ## Part 2: Offline-first, sync status, and conflict resolution UX
25
+
26
+ Products used on flights, field sites, unstable Wi-Fi, or local-first desktop/mobile workspaces must stay calm, predictable, and lossless across connectivity transitions.
27
+
28
+ ### Calm sync indicators and offline outbox
29
+
30
+ - **Calm status indicator**: Stay quiet when healthy ("Saved" unobtrusive or icon-only on hover); surface visible state only on meaningful transitions: `Saving…`, `Offline — edits saved locally (3 pending)`, `Syncing 3 changes…`, or `Sync paused — action required`.
31
+ - **Transparent offline outbox**: Let users inspect queued mutations (pending messages, form submissions, uploads), see which items failed validation on reconnect, and retry or discard individual entries without blocking unrelated work.
32
+ - **Honest capability gating**: Keep cached read views and local-safe edits usable offline; clearly disable or label strictly online-only actions (live payment capture, real-time seat billing, external search) with a plain explanation ("Requires connection") rather than letting clicks spin into generic network errors.
33
+
34
+ ### Conflict resolution and stale-app update prompts
35
+
36
+ | Sync scenario | Required UX behavior |
37
+ |---|---|
38
+ | **Non-overlapping edits** | Merge automatically (CRDT / field-level merge) and preserve both users' changes without interrupting flow. |
39
+ | **Irreconcilable field/file conflict** | Never silently overwrite remote or local data. Present a clear conflict banner or diff view showing **Your local version** vs **Latest server version** (with author and timestamp) and offer `Keep mine`, `Use server`, `Save both (duplicate copy)`, or field-level merge (see [history-diff-undo.md](history-diff-undo.md)). |
40
+ | **Auth expired while offline** | Keep the offline outbox intact locally; prompt re-authentication on reconnect and flush queued changes only after session recovery succeeds. |
41
+ | **Stale client / version update** | Show a non-destructive `"Update available — reload to apply"` banner instead of force-reloading mid-edit; block writes gracefully only if a breaking schema mismatch requires upgrading first, preserving local unsent drafts. |
42
+
43
+ ## Do/don't pairs
44
+
45
+ | Do | Don't |
46
+ |---|---|
47
+ | Render NL-to-filter output as visible, editable filter chips | Run invisible AI-generated filters users cannot inspect or correct |
48
+ | Preview inline AI rewrites as a diff with `Accept` / `Discard` | Silently replace selected user text without undo or preview |
49
+ | Require explicit human approval before AI writes or external sends | Auto-execute destructive or billing-impacting tool calls silently |
50
+ | Queue offline edits visibly and resolve conflicts without data loss | Silently overwrite remote changes with last-write-wins or discard drafts on reconnect |
51
+
52
+ ## Verification
53
+
54
+ Test NL-to-filter chip inspection and failure fallback, inline AI cancel/undo/error retention, approval gate deny/edit/approve flows, airplane-mode edit -> outbox -> reconnect flush, expired-token reconnect without losing queued edits, two-device offline conflict UI, and stale-app update prompts while a draft is dirty.
@@ -1,25 +1,44 @@
1
1
  # Auth, onboarding, and account
2
2
 
3
- Auth is a trust boundary. Optimize for successful completion and recovery, not branding theater.
3
+ Auth is a trust boundary. Optimize for reliable completion, secure recovery, and zero lockouts rather than branding theater. Platform-specific WebAuthn/browser credential APIs belong in `pixelcraft-web` (and native autofill/passkey APIs in `pixelcraft-mobile` / `pixelcraft-desktop`); this reference defines the surface-independent UX contract.
4
4
 
5
- ## Sign-in/up
5
+ ## Sign-in, passkeys, OTP, and enterprise SSO
6
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.
7
+ - **Identifier-first & SSO domain discovery**: Ask for email/username first when enterprise SSO exists; automatically route managed domains to the organization's IdP ("Continue with Okta SSO") while preserving a documented break-glass recovery path for org owners if the IdP is down.
8
+ - **Passkeys / WebAuthn UX**: Offer passkeys as a low-friction primary or autofill-assisted option alongside a clear fallback (magic link, TOTP, password, or cross-device QR) when a user switches devices or cancels the OS prompt. In security settings, label registered passkeys by device/provider and last-used date, and forbid deleting the last auth method without a backup.
9
+ - **OTP & magic links**: Accept paste of the full code into the first input (and support platform one-time-code autofill), show a live resend cooldown timer rather than a silent dead button, explain when a magic link opens in a different browser/device, and provide one-click resend on expired or already-consumed links.
10
+ - **Passwords & error safety**: Use persistent labels, standard autofill hints, full paste support, show-password toggle, and upfront strength rules. Respect anti-enumeration policy on login/reset responses ("If an account exists for this email…") and distinguish temporary rate-limit cooldowns from invalid credentials.
11
11
 
12
- ## Onboarding
12
+ ## Progressive onboarding and workspace setup
13
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.
14
+ - Teach the next concrete value-delivering action instead of locking users into an unskippable carousel tour.
15
+ - Ask only for fields needed immediately (workspace name, role/goal if it materially tailors setup); defer optional team invites and billing details.
16
+ - Provide a **progressive onboarding checklist** tied to real completed state (dismissible at any time, resumable across sessions, with honest progress counts).
17
+ - Mark any seeded sample/demo workspace content visibly and include a one-action "Clear sample data" control.
18
18
 
19
19
  ## Account lifecycle
20
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.
21
+ Cover profile edits, email change verification, active sessions/devices with remote sign-out, MFA enrollment and downloadable recovery codes (confirming user saved them), workspace switching, pending invitations with expiry, account export, and deletion with consequence-specific friction and grace periods.
22
+
23
+ ## State matrix
24
+
25
+ | State | Required behavior |
26
+ |---|---|
27
+ | Passkey prompt dismissed/unsupported | Return cleanly to fallback sign-in options without alarming error copy |
28
+ | Expired/replayed magic link or OTP | Explain expiry plainly and offer one-click new code/link with preserved email |
29
+ | Enterprise SSO misconfigured/unavailable | Identify IdP failure vs wrong password; surface admin contact or break-glass path |
30
+ | Rate-limited / locked out | Display truthful retry window and alternative recovery options |
31
+ | Interrupted onboarding | Resume at the last incomplete step on next sign-in without losing saved workspace config |
32
+
33
+ ## Do/don't pairs
34
+
35
+ | Do | Don't |
36
+ |---|---|
37
+ | Allow pasting full 6-digit OTPs into any digit slot | Force users to type one digit per box and block paste |
38
+ | Email-first SSO discovery with visible IdP redirect state | Hide SSO behind a tiny link while showing invalid password errors |
39
+ | Dismissible onboarding checklist linked to real product tasks | Unskippable 7-step tooltip tour blocking the workspace |
40
+ | Label passkeys by device + creation/last-used date | Show opaque credential IDs users cannot safely revoke |
22
41
 
23
42
  ## Verification
24
43
 
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.
44
+ Test password managers, passkey cancel/fallback, OTP paste and resend timers, SSO domain routing, expired/replayed links, rate-limit messaging, interrupted onboarding resume, IME/RTL, long email addresses, duplicate submit prevention, assistive technology announcements, and legal/locale consent handling.
@@ -0,0 +1,40 @@
1
+ # SaaS billing, usage metering, and feature paywalls
2
+
3
+ Billing and entitlement UI sits directly on user trust and revenue compliance. Every charge, quota, upgrade, and cancellation path must be transparent, predictable, and free of dark patterns. For retail storefronts and one-time carts, see [commerce.md](commerce.md).
4
+
5
+ ## Pricing tables and plan comparisons
6
+
7
+ - Distinguish **seat-based**, **usage/metered** (tokens, compute minutes, API calls, storage GB), and **hybrid** pricing explicitly—show the unit, billing cadence (monthly vs annual total, not just discounted per-month), currency, and tax/VAT note up front.
8
+ - When toggling Monthly / Annual, update both the unit rate and the billed-today total without hiding the lump-sum commitment.
9
+ - Highlight differences that affect real user decisions (quotas, SSO/RBAC, retention, support SLA) rather than padding 40 identical checkmark rows.
10
+ - Mark the user's **current plan** clearly and show concrete upgrade/downgrade consequences (what unlocks, what becomes read-only or capped).
11
+
12
+ ## Proration, upgrades, and downgrades
13
+
14
+ - Always display a **proration preview** before committing a mid-cycle plan or seat change: unused credit from current period, prorated charge due today, next recurring invoice date, and recurring amount.
15
+ - When adding seats or billable collaborators, show the incremental cost *before* sending the invitation ("Adding 2 editors adds \$32/mo, \$18.40 prorated today").
16
+ - On downgrade, list exact features or quotas exceeding the target tier (e.g., "You currently have 7 active workspaces; Starter allows 3—choose which to archive") instead of failing silently or deleting data.
17
+
18
+ ## Paywalls, trials, usage meters, and dunning
19
+
20
+ | Surface / state | Required UX behavior |
21
+ |---|---|
22
+ | **Soft paywall (in-context gate)** | Let users inspect the workflow or preview results, state which plan unlocks it, explain the specific value, and provide a dismissible path back without trapping navigation. |
23
+ | **Hard paywall (quota/entitlement block)** | Name the exact limit reached, show current consumption vs cap, preserve user work/drafts in place, and link non-admins to a one-click "Request upgrade from billing admin" flow. |
24
+ | **Trial & grace periods** | Show remaining days truthfully without alarming fake countdowns; clearly state whether a card is charged automatically or the workspace gracefully downgrades to read-only/free at expiry. |
25
+ | **Usage meters & overage alerts** | Display current usage, included allowance, reset date, projected trajectory (only if grounded in real run-rate), and configurable spend caps or threshold alerts (80% / 100%). |
26
+ | **Dunning / failed payment** | Show a calm, persistent workspace banner to billing admins (and non-intrusive notice to members only when service impact is imminent), explain exact retry schedule and grace deadline, and link directly to payment-method update without locking users out of exporting their data. |
27
+ | **Cancellation flow** | Make cancellation discoverable in Billing settings with clear effective end date (access kept through paid period), optional pause/downgrade offer at most once, optional non-blocking exit reason, and immediate email/on-screen confirmation. Never hide cancel behind support tickets when signup was self-serve. |
28
+
29
+ ## Do/don't pairs
30
+
31
+ | Do | Don't |
32
+ |---|---|
33
+ | Show prorated charge due today and next invoice total before confirming | Charge a saved card silently when a user toggles a paid add-on or invites a seat |
34
+ | Let non-billing members request an upgrade from their workspace admin | Show a dead-end "Upgrade now" checkout button that errors on permissions |
35
+ | Preserve drafts and data read-only during trial expiry or dunning grace | Delete user data immediately on the first failed renewal attempt |
36
+ | Provide self-serve cancellation with clear end-of-period access date | Bury cancellation in 5 guilt-trip confirmation dialogs or phone-only traps |
37
+
38
+ ## Verification
39
+
40
+ Test monthly/annual toggle math, mid-cycle seat addition proration, downgrade over-quota checks, non-admin paywall paths, usage meter 0%/80%/100%/overage states, failed-payment banner dismissal and recovery, cancellation confirmation and undo-before-period-end, localized currency formatting, and keyboard/screen-reader accessibility of comparison tables.
@@ -0,0 +1,56 @@
1
+ # Command-first and high-velocity workspace patterns
2
+
3
+ Use this reference for expert operational workspaces across **web, desktop, mobile, and terminal (TUI)** surfaces where repeat users prioritize speed, keyboard muscle memory, low perceived latency, and dense scanability over marketing whitespace.
4
+
5
+ ## Command palette (`Cmd+K` / `Ctrl+K`)
6
+
7
+ Treat the command palette as a global action router, not merely a passive search input:
8
+
9
+ | Requirement | Surface-independent rule |
10
+ |---|---|
11
+ | **Invocation** | Bind the platform's primary command shortcut (`Cmd+K` on macOS, `Ctrl+K` on Windows/Linux/TUI, or prominent search/command button on touch/mobile) plus a visible clickable trigger showing the active shortcut hint. |
12
+ | **Scope & parameterized actions** | Support both navigation (`Go to…`) and direct parameterized actions (`Assign to…`, `Change status…`, `Export…`), displaying recent items before the user types. |
13
+ | **Selection & focus restoration** | Expose a modal/overlay list with keyboard selection (`Up`/`Down`), execution (`Enter`), and dismissal (`Escape`) that **restores focus to the exact prior element or pane**. |
14
+ | **Async freshness & empty recovery** | Cancel or ignore stale async query responses so slower earlier results never overwrite newer input; offer actionable fallback when zero commands match (clear filter or jump to full search). |
15
+
16
+ ## Keyboard-first navigation and input-suppression contract
17
+
18
+ Single-key shortcuts (`j`/`k` navigate, `c` create, `/` search, `?` help) dramatically accelerate triage, but they become destructive if fired while editing text. Enforce this surface-independent **input-suppression contract** before dispatching any unmodified single-key hotkey:
19
+
20
+ 1. **Active text input guard**: Suppress when focus is inside any text entry control, editable document region, or combo/select search input.
21
+ 2. **IME composition guard**: Suppress during active CJK/dead-key IME composition so intermediate keystrokes never trigger commands.
22
+ 3. **Modal scope guard**: Suppress background workspace hotkeys whenever a blocking dialog, confirmation sheet, or command palette is open.
23
+ 4. **Modifier clarity**: Keep chords consistent (`Cmd/Ctrl+Enter` to submit inline composers, `Escape` to cancel edits cleanly without losing drafts silently, `?` for a context-grouped shortcut cheat sheet).
24
+ 5. **Composite region navigation**: Use single-tab-stop composite navigation inside dense lists, toolbars, and tab bars (arrow keys move internally; `Tab` moves between major panes).
25
+
26
+ ### Platform mapping
27
+
28
+ | Surface | Palette invocation & focus | Single-key suppression & pane navigation |
29
+ |---|---|---|
30
+ | **Web (`pixelcraft-web`)** | `Meta+K` / `Control+K`; dialog + `combobox`/`listbox` + `aria-activedescendant`; restore focus on `Escape` | Check `event.isComposing` and whether target is inside `input`, `textarea`, `select`, or `[contenteditable]`; roving `tabindex` (`0` / `-1`) |
31
+ | **Desktop (`pixelcraft-desktop`)** | Native menu/command bar (`Cmd+K` macOS, `Ctrl+K`/`Ctrl+Shift+P` Win/Linux); restore first-responder/focus ring | Respect OS text-field responder and IME marked-text state; native `NSSplitView`/WinUI/Qt splitters with keyboard resize |
32
+ | **Mobile (`pixelcraft-mobile`)** | Persistent quick-action/search bar + hardware keyboard `Cmd+K` on iPadOS/Android tablets | Offer thumb-reachable action sheets and swipe shortcuts alongside external keyboard shortcuts |
33
+ | **Terminal (`pixelcraft-tui`)** | `Ctrl+P` / `Ctrl+K` / `:` command mode overlay; restore active pane focus | Separate normal navigation mode from insert/input focus; never shadow terminal escape sequences unintentionally |
34
+
35
+ ## Optimistic UI, rollback, and undo
36
+
37
+ - Apply low-risk, reversible mutations (status toggle, star, archive, reorder, inline rename) immediately using a client mutation ID / idempotency key.
38
+ - Surface a subtle non-blocking pending cue only when the request exceeds ~300 ms; never block the workspace with a modal spinner for a single-row mutation.
39
+ - On server failure, roll back the optimistic state deterministically, preserve user input, and surface an inline or toast error with one-action `Retry`.
40
+ - Pair reversible destructive-feeling actions (archive, move to trash) with an immediate timed `Undo` notification rather than a blocking confirmation dialog; reserve confirmation modals for irreversible mutations.
41
+ - Match loading-placeholder geometry to loaded row/card heights so layout never shifts when data resolves.
42
+
43
+ ## Master-detail split panes and intentional density
44
+
45
+ - Drive density modes (`compact`, `comfortable`, `spacious`) from semantic spacing and row-height tokens rather than one-off component overrides.
46
+ - Persist active filters, sort order, selected tab, and open detail identifier in shareable route/navigation state so reload, Back/Forward, and deep links restore exact context.
47
+ - Keep resizable pane splitters operable via both pointer and keyboard (with clamped min/max widths) and collapse gracefully into stacked navigation on narrow viewports.
48
+
49
+ ## Do/don't pairs
50
+
51
+ | Do | Don't |
52
+ |---|---|
53
+ | Restore focus to the exact triggering row or button when closing the palette | Drop focus to the window root on `Escape` |
54
+ | Suppress single-key hotkeys during text editing and IME composition | Hijack `j`, `k`, or `/` while a user types in a search box or CJK IME |
55
+ | Persist filter, sort, and detail selection in navigation/URL state | Reset workspace filters to defaults on Back or reload |
56
+ | Roll back failed optimistic writes with preserved input and `Retry` | Leave stale optimistic UI pretending a failed mutation succeeded |
@@ -1,28 +1,47 @@
1
1
  # Commerce: PLP, PDP, cart, checkout
2
2
 
3
- Commerce UX is trust plus momentum. Do not sacrifice clarity for visual novelty.
3
+ Commerce UX is trust plus momentum. Never sacrifice price, availability, or policy clarity for visual novelty. This reference covers **retail and transactional e-commerce**; for SaaS subscriptions, usage metering, seat upgrades, and feature paywalls, read [billing-paywalls.md](billing-paywalls.md).
4
4
 
5
- ## Product listing pages
5
+ ## Product listing pages (PLP)
6
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.
7
+ - Show honest availability, unit/total price, variant swatches with text/accessible names, shipping/returns cues, and decision-relevant specs on each tile/row.
8
+ - Keep filter, sort, and pagination state visible, shareable (deep-linkable where supported), reversible, and preserved when returning from a PDP.
9
+ - When filtered results are empty, diagnose why and offer concrete one-action recovery (remove a restrictive filter, broaden price range, include out-of-stock)—never display only "No results."
10
+ - Preserve scroll position across pagination or load-more transitions and announce newly loaded counts or fetch failures clearly.
11
11
 
12
- ## Product detail pages
12
+ ## Product detail pages (PDP)
13
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.
14
+ - Lead with product identity, current variant price and stock status, truthful media, and the primary purchase action.
15
+ - Prevent impossible variant combinations cleanly (disable or clearly mark unavailable size/color pairings without resetting unrelated choices) and preserve user selections when inventory errors occur.
16
+ - Sizing guides, specs, ratings, and reviews require clear provenance and moderation context; never fabricate ratings, counts, or testimonials.
17
+ - Pair delivery estimates with location and cutoff-time qualifiers rather than vague promises.
18
18
 
19
19
  ## Cart and checkout
20
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.
21
+ - Keep the cart editable without friction: quantity changes, variant switches, save-for-later, removal with immediate undo, and transparent updates for price changes, shipping fees, taxes, and promo codes.
22
+ - Checkout minimizes distraction without trapping users in a dead end; preserve all entered fields across validation failures, session refreshes, and guest-vs-account switches.
23
+ - Payment errors must distinguish 3DS/bank authentication failure, card decline, network timeout, and field validation without leaking sensitive card details or clearing valid inputs.
24
+ - Order confirmation must show order ID, current status, itemized total, delivery/access timeline, receipt path, and support/cancellation options.
25
+
26
+ ## State matrix
27
+
28
+ | State | Required behavior |
29
+ |---|---|
30
+ | Out-of-stock variant | Keep variant inspectable with explicit status, restock alert or nearest alternative; never silently switch variants |
31
+ | Inventory race at checkout | Highlight exact affected line item, available quantity, and revised total before allowing retry |
32
+ | Promo code invalid/expired | State specific reason (expired, minimum spend unmet, ineligible category) while keeping cart intact |
33
+ | Tax/shipping recalculated | Announce updated total clearly before final payment commitment |
34
+ | Payment pending / timeout | Prevent duplicate charge with idempotency, disable double-submit, and confirm order status before asking to retry |
35
+
36
+ ## Do/don't pairs
37
+
38
+ | Do | Don't |
39
+ |---|---|
40
+ | Disclose shipping, fees, and taxes before final checkout review | Surprise buyers with hidden fees on the final pay step |
41
+ | Support guest checkout with optional post-purchase account creation | Force account registration before entering shipping details |
42
+ | Show real stock counts only when backed by live inventory | Display fabricated "Only 2 left!" or resetting countdown timers |
43
+ | Preserve cart and form input across failed promo or payment attempts | Clear the entire checkout form on a single field validation error |
25
44
 
26
45
  ## Verification
27
46
 
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.
47
+ Test out-of-stock variants, multi-currency and locale formatting, expired cart/promo codes, inventory race, payment decline vs timeout, paste/autofill/password-manager behavior, keyboard/touch flow, reduced motion, failed product imagery, fee transparency, and light/dark contrast.
@@ -1,26 +1,45 @@
1
1
  # Chat, comments, and collaboration
2
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`.
3
+ Communication UI depends on sequence, authorship, timing, and trust. Visual flair must never obscure who said what, which thread it belongs to, or whether it was delivered.
4
4
 
5
- ## Core rules
5
+ > **Cross-skill boundary:** This reference covers human-to-human in-app messaging, comments, and collaborative threads. Both **hosted messaging bots/mini apps** (Slack, Discord, Telegram, WhatsApp, Teams, LINE, WeChat, Zalo) **and in-app AI/agentic chat workspaces** (streaming traces, tool cards, citations, approval gates) route to `pixelcraft-chat-ui` alongside `pixelcraft-patterns`. Cross-app notification centers and activity feeds are detailed in [notifications-activity.md](notifications-activity.md).
6
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.
7
+ ## Message hierarchy and threading models
12
8
 
13
- ## Collaboration states
9
+ Choose one explicit threading model per surface and keep reply ancestry legible:
14
10
 
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.
11
+ | Threading model | Best for | Required cues |
12
+ |---|---|---|
13
+ | Quote / inline reply | Fast chat rooms, mobile messaging | Compact quoted snippet that jumps to original message; handle deleted parent gracefully |
14
+ | Side-panel / sub-thread | Team channels, document comments | Reply count + participant avatars + last-reply timestamp on parent; explicit "Also send to channel" toggle when needed |
15
+ | Topic-scoped thread list | Support tickets, issue discussions, async forums | Subject title, resolution/status badge, participant list, clear open vs resolved filter |
16
16
 
17
- ## Composer
17
+ - Distinguish author, role/badge, relative + exact hover/focus timestamp (with timezone awareness), body, attachments, reactions, edited/deleted markers, and system events.
18
+ - Delivery states must stay truthful: composing, queued offline, sending, sent, delivered/read only when actually verified by the backend.
19
+ - Expire presence and typing indicators automatically on timeout or disconnect; never fabricate online dots.
18
20
 
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.
21
+ ## Unread dividers, search, pins, and triage
22
+
23
+ - **Unread divider**: Anchor a visible "New messages" divider at the last-read watermark without jumping scroll position unexpectedly while the user is reading history. Offer a floating "Jump to unread / latest" pill and a keyboard-accessible "Mark as read" action.
24
+ - **Message search & pins**: Search results must show surrounding snippet context, author, channel, and date, and jumping to a match must temporarily highlight the target message and provide a "Back to latest" return cue. Keep pinned messages inspectable in a dedicated drawer/banner without cluttering the stream.
25
+ - **Notification triage**: Expose per-channel/thread mute, mentions-only, and follow/unfollow controls right in the conversation header so busy threads do not force users to mute the entire app.
26
+
27
+ ## Composer and collaboration states
28
+
29
+ - Preserve unsent drafts per conversation/thread across navigation and reloads; warn before discarding attachments or long drafts.
30
+ - Match Enter vs Shift+Enter / Cmd+Enter behavior to platform convention and document it subtly near the send control.
31
+ - Show attachment filename, MIME/type, size, upload progress, cancel/retry, and safe preview/download handling; keep typed text intact if an upload fails validation.
32
+ - Handle empty rooms, rapid message bursts, scrollback pagination without scroll-jump, offline send queues, duplicate-click idempotency, permission revocation mid-thread, and moderated/deleted messages cleanly.
33
+
34
+ ## Do/don't pairs
35
+
36
+ | Do | Don't |
37
+ |---|---|
38
+ | Anchor an unread divider and show a non-jumping "N new messages" pill | Yank the viewport to the bottom while a user reads older messages |
39
+ | Persist drafts per channel and thread across switches | Wipe a typed reply when switching rooms to copy a link |
40
+ | Keep deleted parent messages as a clear tombstone in active threads | Break thread ancestry or orphan replies silently |
41
+ | Expose per-thread mute / mentions-only controls inline | Force all-or-nothing app-wide notification muting |
23
42
 
24
43
  ## Verification
25
44
 
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.
45
+ Test live-region politeness (do not read every burst message aloud automatically), keyboard jump between unread/messages/composer, mixed RTL/LTR text, emoji/ZWJ sequences, unbroken URLs, timezone/DST timestamps, failed image previews, offline queue flush and retry, permission loss, and reduced motion.
@@ -1,29 +1,42 @@
1
1
  # Editors, creative tools, and canvas
2
2
 
3
- Creative surfaces are instruments. Chrome must recede until needed while remaining discoverable and reversible.
3
+ Creative surfaces are precision instruments. Chrome must recede while work is in progress yet stay discoverable, spatially stable, and reversible. For transaction-stack undo/redo, named snapshots, and diff comparisons, pair with [history-diff-undo.md](history-diff-undo.md).
4
4
 
5
- ## Core structure
5
+ ## Core workspace anatomy
6
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.
7
+ - Preserve spatial stability across the primary canvas/document, tool rail, layer/outline tree, property inspector, timeline (if temporal), and status bar.
8
+ - Make active tool and mode unmistakable via cursor shape, selection bounds, transform handles, inspector readout, and status bar hints.
9
+ - Direct manipulation is primary, but every critical operation (select, nudge, group, align, duplicate, reorder, delete, zoom) must have a keyboard, menu, and command-palette path.
11
10
 
12
- ## Interaction rules
11
+ ## Layers, multi-select inspectors, snapping, and version history
13
12
 
14
- | Concern | Rule |
13
+ | Subsystem | Required UX behavior |
15
14
  |---|---|
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 |
15
+ | **Layer tree & grouping** | Show hierarchy depth, type icon, visibility (eye), and lock toggles; support search/filter, collapse-all, keyboard tree navigation, and keyboard reorder alternatives alongside drag-and-drop. Locking prevents accidental canvas clicks while keeping the layer selectable in the tree to unlock. |
16
+ | **Mixed-value multi-select inspector** | When selected objects differ on a property (e.g., width, font size, fill), display a clear `"Mixed"` placeholder rather than the first item's value or `0`. Committing a new value applies to all selected items; leaving `"Mixed"` untouched preserves each object's distinct value. Support relative math inputs (`+8`, `*2`) where numeric precision matters. |
17
+ | **Snapping, guides, and grids** | Render distance/alignment smart guides only during active move/resize, respect user grid/unit settings (`px`, `mm`, `pt`), and provide a hold-modifier key to temporarily bypass snapping without flipping global settings. |
18
+ | **Zoom, pan, and viewport** | Zoom around the pointer or active selection center, expose exact zoom percentage with quick presets (`Fit`, `100%`, `Zoom to selection`), and keep thin strokes/handles crisp across zoom levels. |
19
+ | **Autosave & version history** | Persist continuous autosave locally/remotely with a calm sync status indicator, allow named manual checkpoints ("Before typography pass"), and preview historical snapshots read-only before restoring or duplicating. |
22
20
 
23
- ## States
21
+ ## State matrix
24
22
 
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.
23
+ | State | Required behavior |
24
+ |---|---|
25
+ | Empty / untitled document | Ready-to-work canvas with clear primary creation action and unobtrusive template/import entry |
26
+ | Missing font or broken media asset | Render explicit fallback bounding box and non-destructive relink/substitute action; never silently flatten |
27
+ | Read-only / view-only permission | Switch cleanly to inspect/comment/export mode without dead disabled edit chrome cluttering the viewport |
28
+ | Large document performance | Virtualize layer trees, cull off-screen canvas geometry, and keep frame pacing steady during pan/zoom |
29
+ | Offline / conflict | Queue local edits safely, expose conflict status clearly, and let users duplicate or merge rather than overwriting |
30
+
31
+ ## Do/don't pairs
32
+
33
+ | Do | Don't |
34
+ |---|---|
35
+ | Show `"Mixed"` in inspectors when multi-selected values differ | Overwrite differing widths/colors with the first selected item's value |
36
+ | Provide keyboard nudge, reorder, and layer actions alongside drag | Lock essential editing behind pointer-only drag handles |
37
+ | Allow holding a modifier key to temporarily override snapping | Force users into Preferences to disable snap for one nudge |
38
+ | Keep locked layers selectable in the layer panel to unlock | Make locked objects completely unreachable |
26
39
 
27
40
  ## Verification
28
41
 
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.
42
+ Test numeric precision and unit rounding, IME text composition on canvas, mixed-value multi-select commits, pointer-capture interruption (Escape mid-drag), keyboard-only grouping/reordering/deletion, layer tree virtualization at 1,000+ nodes, high-DPI rendering, color-picker contrast, reduced motion, and accessible outline/tree alternatives.
@@ -0,0 +1,38 @@
1
+ # Art-directed editorial composition patterns
2
+
3
+ Use this reference for **expressive layout rhythm, visual pacing, and art-directed editorial composition** (portfolios, case studies, product launches, brand stories, interactive showcases). For conversion hierarchy, proof ethics, and funnel mechanics, read [marketing.md](marketing.md); for platform-specific CSS grid, animation, and WebGL implementation mechanics, coordinate with `pixelcraft-web`.
4
+
5
+ ## Editorial composition catalog
6
+
7
+ Treat each entry as a content-and-interaction recipe—never a fixed wireframe to copy verbatim:
8
+
9
+ | Pattern | Editorial rhythm | Key failure & resilience checks |
10
+ |---|---|---|
11
+ | **Editorial opener** | Subject-led framing (asymmetric split, full-bleed artifact, typographic poster, or live specimen) + concrete claim + single next cue | Avoid default centered hero / two CTAs / three-card row; verify text contrast over media and narrow-viewport crop |
12
+ | **Case-study index** | Curated grid or indexed list with real domain metadata (year, discipline, outcome) and persistent filters | Preserve labels, keyboard reach, filter state on Back, and empty/loading states |
13
+ | **Project detail** | Context & constraint -> role -> process artifact -> verified outcome | Never invent metrics; ensure full long-form reading works cleanly under reduced motion |
14
+ | **Product story** | Material/problem -> mechanism -> live/static specimen -> decision action | Keep specs, pricing, and interactive controls accessible without depending on animation |
15
+ | **Interactive artifact viewer** | Primary visual/3D/specimen paired with semantic specs and explicit viewpoint presets | Renderer failure or slow GPU must fall back to high-res stills without blocking comparison |
16
+ | **Capabilities / index directory** | Structured typographic table or grouped index with concrete examples | Replace decorative infinite marquee tickers with scanable, pauseable or static content |
17
+ | **Narrative chapter** | Numbered/titled chapter prose paired with an optional persistent artifact | Require direct chapter links, normal scroll pacing, and static reduced-motion layout |
18
+ | **Structured mega-menu / index overlay** | Grouped destinations with clear spatial hierarchy and keyboard model | Enforce Escape dismissal, focus restoration, viewport height fit, and touch parity |
19
+ | **Editorial footer** | Colophon, sitemap, contact/legal, and a meaningful next-story cue | Do not trap users behind decorative curtain animations delaying footer links |
20
+
21
+ ## Adapting references without cloning
22
+
23
+ 1. Analyze reference sites at the **structural level** (pacing, typographic scale contrast, whitespace ratio, media-to-copy balance, transition timing)—never copy brand palettes, iconography, copy tone, or assets.
24
+ 2. Pair expressive sections with calm functional sections so eye fatigue stays low and interactive controls remain immediately recognizable.
25
+ 3. Define how each asymmetric or multi-column editorial band collapses into a clean single-column reading order on narrow screens before implementation.
26
+
27
+ ## Do/don't pairs
28
+
29
+ | Do | Don't |
30
+ |---|---|
31
+ | Derive section pacing from real media aspect ratios and copy length | Stretch thin copy across giant empty scroll corridors |
32
+ | Pair interactive 3D/canvas specimens with static fallback imagery | Render a blank black box when GPU acceleration is unavailable |
33
+ | Keep reading order and visual order aligned across breakpoints | Reorder columns purely visually in ways that scramble keyboard/screen-reader flow |
34
+ | Give expressive typography generous fallback metrics and zoom headroom | Lock display headlines to rigid viewport-height boxes that clip at 200% zoom |
35
+
36
+ ## Acceptance
37
+
38
+ Every editorial pattern must document its primary reading task, collapsed mobile/narrow order, localization/text-expansion tolerance, reduced-motion fallback, and media-failure behavior.