@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,58 +1,98 @@
1
- # WinUI / WPF
1
+ # WinUI 3 & WPF (Windows desktop)
2
2
 
3
- ## Token mapping
3
+ WinUI 3 (Windows App SDK) and .NET 9/10 WPF share XAML lineage but differ significantly in theming, bindings, titlebars, and deployment—apply the idioms for the stack actually in use.
4
4
 
5
- Use XAML resource dictionaries/theme resources:
5
+ ## Choosing & separating WinUI 3 vs .NET 9/10 WPF
6
6
 
7
- ```xml
8
- <SolidColorBrush x:Key="SemanticActionBrush" Color="#FF0074CA" />
9
- ```
7
+ | Dimension | WinUI 3 / Windows App SDK | .NET 9/10 WPF |
8
+ |---|---|---|
9
+ | **Theming & dark mode** | `ThemeResource` + `ResourceDictionary.ThemeDictionaries` (`Default`, `Light`, `HighContrast`) | Built-in **WPF Fluent Theme**: set `ThemeMode="System"` (`Light`/`Dark`/`None`) on `Application` or `Window` |
10
+ | **Data binding** | Prefer **`{x:Bind}`** (compile-time checked, faster, default `Mode=OneTime`—set `Mode=OneWay` for updates) | `{Binding}` with `INotifyPropertyChanged` / `CommunityToolkit.Mvvm` |
11
+ | **Backdrop & titlebar** | `MicaBackdrop` (`Base`/`BaseAlt`), `DesktopAcrylicBackdrop`, `AppWindowTitleBar` (`ExtendsContentIntoTitleBar`, `SetDragRectangles`) | Fluent window backdrop / `WindowChrome` (avoid legacy Aero/custom non-client hacks that break Snap Layouts) |
12
+ | **Reduced motion** | `new Windows.UI.ViewManagement.UISettings().AnimationsEnabled` | `SystemParameters.ClientAreaAnimation` + `SystemParameters.HighContrast` |
13
+ | **Packaging** | **MSIX packaged** (Windows identity, clean uninstall, Store/App Installer) vs **Unpackaged** (`WindowsPackageType=None`, self-contained WindowsAppSDK for enterprise/legacy installers) | Self-contained / single-file `.exe` / MSI / MSIX |
10
14
 
11
- Map generated color/dimension values once into resources, styles, control templates, and theme dictionaries. Respect system light/dark/high-contrast resources instead of hard-coding visual constants.
15
+ ## Token mapping (WinUI 3 & WPF)
12
16
 
13
- ## Layout and responsive idioms
17
+ Map DTCG semantic tokens into `ThemeDictionaries` (WinUI 3) or merged Fluent resource dictionaries (WPF)—never scatter raw `#FF...` hex colors through pages:
18
+
19
+ ```xml
20
+ <!-- WinUI 3: ThemeDictionaries supporting Dark (Default), Light, and HighContrast -->
21
+ <ResourceDictionary.ThemeDictionaries>
22
+ <ResourceDictionary x:Key="Default">
23
+ <SolidColorBrush x:Key="PcActionBrush" Color="#FF5BB2FF" />
24
+ </ResourceDictionary>
25
+ <ResourceDictionary x:Key="Light">
26
+ <SolidColorBrush x:Key="PcActionBrush" Color="#FF0074CA" />
27
+ </ResourceDictionary>
28
+ <ResourceDictionary x:Key="HighContrast">
29
+ <SolidColorBrush x:Key="PcActionBrush" Color="{ThemeResource SystemColorHighlightColor}" />
30
+ </ResourceDictionary>
31
+ </ResourceDictionary.ThemeDictionaries>
32
+ ```
14
33
 
15
- Use panels/grid/layout rounding/adaptive layout, visual states, window resize/minimum dimensions, DPI scaling, snapping/multimonitor behavior, navigation shell appropriate to Windows. Do not fixed-position dense enterprise UI for one monitor/DPI combination.
34
+ ```xml
35
+ <!-- .NET 9/10 WPF App.xaml: built-in Fluent Theme honoring Windows light/dark & accent -->
36
+ <Application x:Class="InvoiceApp.App"
37
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
38
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
39
+ ThemeMode="System" />
40
+ ```
16
41
 
17
- ## Typography/custom fonts
42
+ ## WinUI 3 backdrop, titlebar, & reduced-motion idioms
18
43
 
19
- Use FontFamily resources and Windows text scaling/DPI behavior. Verify ClearType/rendering, glyph coverage, line height, truncation/ellipsis, and localization expansion. Avoid hard-coded pixel-perfect text boxes for essential copy.
44
+ Configure `MicaBackdrop`, custom titlebar drag rectangles, and Windows reduced-motion awareness cleanly in C#:
20
45
 
21
- ## Motion/reduced motion
46
+ ```csharp
47
+ using Microsoft.UI.Composition.SystemBackdrops;
48
+ using Microsoft.UI.Xaml.Media;
49
+ using Windows.UI.ViewManagement;
22
50
 
23
- Use WinUI/WPF animation/transition APIs purposefully. Respect system animation/accessibility settings where exposed and provide reduced behavior. Avoid animation that delays critical task feedback or cannot be interrupted.
51
+ SystemBackdrop = new MicaBackdrop { Kind = MicaKind.BaseAlt };
52
+ ExtendsContentIntoTitleBar = true;
53
+ SetTitleBar(AppTitleBar); // or AppWindow.TitleBar.SetDragRectangles(...) for precise regions
24
54
 
25
- ## Accessibility specifics
55
+ var uiSettings = new UISettings();
56
+ bool animationsEnabled = uiSettings.AnimationsEnabled; // disable custom transitions when false
57
+ ```
26
58
 
27
- Use UI Automation properties/patterns correctly: AutomationProperties.Name/HelpText/LabeledBy, control patterns, keyboard navigation/focus, accelerator/access keys, narrator verification, high contrast themes. Custom controls/templates must preserve UIA semantics rather than only looking correct.
59
+ Always keep `AppWindowTitleBar.PreferredHeightOption` tall enough for Windows 11 Snap Layouts hover triggers, and preserve caption button legibility across Light, Dark, and High Contrast modes.
28
60
 
29
- ## States idiom
61
+ ## Layout, typography, accessibility, states, & forms
30
62
 
31
- Use MVVM async state explicitly: loading/error/empty/offline/permission/dirty/concurrency. Long operations need cancellation/progress and correct dispatcher threading. Handle window close/deactivation/session lock/resume, file locking, installer/update state, and input preservation.
63
+ - Use `Grid`, `StackPanel`, `NavigationView` (WinUI 3), `VisualStateManager` adaptive triggers, `UseLayoutRounding="True"`, per-monitor DPI awareness (`PerMonitorV2` across `100%` ↔ `200%` monitors with off-screen bounds clamping on unplug), and minimum window dimensions. Dim titlebar/caption chrome when `WindowActivationState.Deactivated` fires.
64
+ - Respect Windows **Text Scaling** (`UISettings.TextScaleFactor` / `IsTextScaleFactorEnabled="True"` in WinUI 3) and verify ClearType/DirectWrite legibility and localization expansion.
65
+ - Set **`AutomationProperties.Name`**, `AutomationProperties.LabeledBy`, `AutomationProperties.HeadingLevel`, `AutomationProperties.LiveSetting`, keyboard accelerators (`KeyboardAccelerator`), and access keys (`AccessKey`). Verify with **Accessibility Insights for Windows** (UIA tree) plus **`NVDA`**, **`JAWS`**, and **`Narrator`**—custom `ControlTemplate` overrides frequently strip UIA control patterns if not verified.
66
+ - Model MVVM async state via `CommunityToolkit.Mvvm` (`[RelayCommand(IncludeCancelCommand = true)]`), marshal UI updates onto `DispatcherQueue` (WinUI 3) / `Dispatcher` (WPF), keep idle CPU at `~0%` (`< 400 ms` cold start), guard window `Closing` for unsaved documents, and show inline error text (not red borders alone) in forms.
32
67
 
33
- ## Forms idiom
68
+ ## Atomic `%APPDATA%` storage, `WebView2` hygiene & 2026 Windows signing
34
69
 
35
- Use labeled controls, validation/error templates/text, focus order/access keys, input scopes where appropriate, paste/autofill/IME behavior, and preserve invalid input. Error copy must explain recovery, not just red borders.
70
+ - **OS-standard paths & atomic writes**: store roaming config under `Environment.SpecialFolder.ApplicationData` (`%APPDATA%\<App>`) and databases/caches/logs under `LocalApplicationData` (`%LOCALAPPDATA%\<App>`)—**never** beside `.exe` inside `Program Files`. Write files atomically (write `.tmp` → `FileStream.Flush(flushToDisk: true)` → `File.Move(..., overwrite: true)` / `File.Replace`) and configure SQLite in `WAL` mode.
71
+ - **Embedded `WebView2` giveaway killers**: whenever hosting `CoreWebView2` inside WinUI/WPF, set `DefaultBackgroundColor = Colors.Transparent` (eliminating dark-mode white flash), disable `AreDefaultContextMenusEnabled`, `AreBrowserAcceleratorKeysEnabled` (`Ctrl+R`/`F5`), `IsPinchZoomEnabled`, and `IsSwipeNavigationEnabled` in production, and enforce `cursor: default` + `user-select: none` on UI chrome ([tauri.md](tauri.md)).
72
+ - **2026 Authenticode & SmartScreen reality**: sign `.exe`/`.msi`/`.msix` via **Azure Artifact Signing (Trusted Signing)** or FIPS 140-2 Level 2+ HSM OV/EV keys (`signtool`). **Note that since 2024 Microsoft removed instant EV certificate SmartScreen bypass**—new EV certs still face SmartScreen until publisher reputation accrues across consistent, reproducible signed CI releases and WinGet/MSIX distribution. Ship cryptographically signed delta updates (**Velopack** or MSIX App Installer) with background staging and crash rollback.
36
73
 
37
74
  ## Do/don't pairs
38
75
 
39
76
  | Do | Don't |
40
77
  |---|---|
41
- | resource dictionary semantic brushes/styles | hard-coded colors scattered in XAML |
42
- | UIA names/labeled-by relationships | custom template that removes accessible semantics |
43
- | async command with cancellation/progress | blocking UI thread or fire-and-forget silent failure |
44
- | validate close/dirty state explicitly | losing document work on window close |
45
- | test high contrast/Narrator/keyboard | mouse-only visual QA on developer machine |
78
+ | Use `{x:Bind}` + `ThemeResource` + `ThemeDictionaries` (`HighContrast`) in WinUI 3 | Scatter `StaticResource` raw hex brushes that fail Windows High Contrast |
79
+ | Enable `ThemeMode="System"` in .NET 9/10 WPF for modern Fluent dark/light parity | Ship raw 2006 Aero gray styles or broken custom dark-mode hacks |
80
+ | Store config/DB in `%APPDATA%` / `%LOCALAPPDATA%` via `Flush(true)` + atomic `File.Move` + SQLite `WAL` | Write files next to `.exe` in `Program Files` or overwrite user projects non-atomically |
81
+ | Sign CI releases consistently with Azure Artifact Signing / HSM Authenticode + signed Velopack/MSIX updates | Assume buying an EV certificate instantly bypasses Windows SmartScreen in 2026 |
82
+ | Define clean `AppWindowTitleBar` / `SetDragRectangles` preserving Snap Layouts + mixed-DPI clamping | Strip titlebar chrome without drag regions or restore windows off-screen after monitor unplug |
83
+ | Verify UIA tree with Accessibility Insights, `NVDA`, `JAWS`, and `Narrator` | Assume custom XAML templates preserve keyboard focus and screen-reader roles |
46
84
 
47
85
  ## Known traps
48
86
 
49
- Binding failures hidden in output logs, dispatcher/thread mistakes, XAML style cascade/template breaking semantics, DPI scaling/layout rounding, high-contrast overrides, focus scope/accelerator conflicts, async lifecycle leaks, fixed layouts clipping localized text.
87
+ Forgetting `{x:Bind}` defaults to `Mode=OneTime` (UI stops updating), missing `HighContrast` dictionary entries causing invisible borders/text, `WebView2` flashing white before `DefaultBackgroundColor` applies, unpackaged WinUI 3 missing Windows App Runtime bootstrap, `DispatcherQueue` cross-thread exceptions, fixed-width panels clipping `150%`/`200%` Windows Text Scaling.
50
88
 
51
89
  ## Verification commands
52
90
 
53
91
  ```sh
54
92
  dotnet build
55
93
  dotnet test
94
+ # Verify Authenticode signature on Windows release artifact:
95
+ signtool verify /pa /v bin/Release/net9.0-windows/win-x64/publish/App.exe
56
96
  ```
57
97
 
58
- Use Windows runtime inspection, Narrator/UI Automation tooling, high contrast, DPI scaling, resize/multi-monitor behavior, keyboard-only completion, packaged/unpackaged smoke tests, and localization expansion screenshots as evidence.
98
+ `dotnet build`, `dotnet test`, and `signtool verify` are `static` evidence. Run on real Windows 11 across **Accessibility Insights for Windows**, **`NVDA`**, **`JAWS`**, **`Narrator`**, Windows High Contrast themes, Dark/Light mode, `100%` ↔ `200%` mixed-DPI & Text Scaling, Snap Layouts, and dirty-close recovery for `rendered` evidence; label untested configurations `not-checked`.
@@ -1,5 +1,84 @@
1
- # Keep work and its context connected
1
+ # Working context: linked panes, persistence, and multi-monitor safety
2
2
 
3
- In a tool with source and result panes, show the location or object a secondary pane refers to in both places: a debugger can mark the paused source line while the stack identifies the selected frame; a document inspector can identify the selected object while the canvas marks it. Avoid a detached pane that shows useful details but leaves their subject ambiguous. A subtle mark and a label are often enough; do not use color alone to indicate the active object.
3
+ In desktop editors, debuggers, CAD tools, and inspectors, secondary panes exist to act on a specific subject in the primary canvas or source view. Never let a detached inspector or result pane leave its subject ambiguous.
4
4
 
5
- At the minimum supported window size the secondary view may become a tab or temporary disclosure. Select a result, switch or collapse the pane, then return via keyboard: the source location, selection and next available action should still agree. Capture both panes while linked and the collapsed state. A showcase screenshot can demonstrate the arrangement, not the keyboard or restoration behavior.
5
+ ## Linked source, canvas, & inspector context
6
+
7
+ - **Mark the active subject in both places**: a debugger marks the paused source line with an icon + highlight while the call-stack pane names the selected frame and file:line; a document inspector names the selected layer/node in its header while the canvas renders selection handles. Never rely on color alone—pair visual selection with a text label, icon, or breadcrumb.
8
+ - **Explicit empty & multi-selection states**: when nothing is selected, show document/page properties or a clear `"No item selected"` state rather than stale fields from the previous item. When N items are selected, show `"3 layers selected"`, display shared values, and label divergent fields `"Mixed"` rather than silently overwriting differing values on blur.
9
+ - **Bi-directional synchronization**: navigating to an error/search result focuses and scrolls the primary pane without stealing keyboard focus unintentionally; editing a property in the inspector updates the primary view with a single coherent undo step (`Cmd/Ctrl+Z`).
10
+
11
+ ## Pane focus-ring traversal (`F6`)
12
+
13
+ Keyboard-only users must traverse major workspace regions without tabbing through 200 toolbar or tree items:
14
+
15
+ | Shortcut | Action |
16
+ |---|---|
17
+ | `F6` / `Shift+F6` (Windows/Linux) or `Ctrl+F6` / documented landmark key (macOS) | Cycle focus between primary landmark panes (Sidebar → Editor/Canvas → Inspector → Bottom Output/Console) while restoring the last focused item inside each pane. |
18
+ | `Escape` | Return focus from a secondary inspector, search bar, or quick-filter input back to the primary working canvas/editor without clearing the active selection. |
19
+ | `Cmd/Ctrl+B`, `Cmd/Ctrl+Alt+I`, etc. | Toggle sidebar/inspector visibility via discoverable menu commands so collapsed panes remain reachable when hidden. |
20
+
21
+ ## Minimum-width disclosure fallback
22
+
23
+ Define a tested minimum window width (e.g., `720–900 px` logical) and split-pane minimum widths so panes cannot be dragged to an irreversible `0 px` slit:
24
+
25
+ - Below the multi-pane threshold, collapse the secondary inspector into a tab, slide-over drawer, or temporary sheet—preserving the active selection and keeping all inspector commands accessible in menus and the command palette.
26
+ - Provide a visible re-open button and menu toggle whenever a pane is collapsed; persist collapsed/expanded state independently of last known width so reopening restores a usable width.
27
+
28
+ ## Full workspace session restoration & multi-monitor clamping
29
+
30
+ Store workspace and session state in a versioned schema (JSON/SQLite/Preferences) so restarts restore **open windows, tabs, split ratios, active/dirty documents, scroll offsets, and selection** without crashing across schema upgrades:
31
+
32
+ ```json
33
+ {
34
+ "schemaVersion": 2,
35
+ "windows": [{
36
+ "width": 1280, "height": 800, "x": 120, "y": 80, "maximized": false, "displayId": "DELL-U2723QE",
37
+ "openTabs": ["doc-1", "doc-2"], "activeTab": "doc-2",
38
+ "panes": { "sidebarOpen": true, "sidebarWidth": 260, "inspectorOpen": true, "inspectorWidth": 320 }
39
+ }]
40
+ }
41
+ ```
42
+
43
+ **Multi-monitor & mixed-DPI (`100%` ↔ `200%`) clamping rule**: users unplug external monitors, drag windows between `100%` 1080p and `200%` 4K/Retina displays, and rearrange display layouts. Persist logical DIPs alongside display scale/ID, handle live `PerMonitorV2` / backing-scale changes cleanly, and on restore (on X11/Windows/macOS where coordinates apply; on Wayland persist only `width`/`height`/maximized because Wayland disallows global positioning):
44
+
45
+ 1. Enumerate all currently connected displays' **usable work areas** (excluding taskbar/dock/menu bar).
46
+ 2. Verify that at least the window's titlebar drag band and a usable portion (e.g., ≥ `120×80 px`) intersect a connected display's work area.
47
+ 3. If the saved bounds fall off-screen or exceed the current display's work area, clamp `width`/`height` to the primary display's work area and re-center the window—**never restore an unreachable off-screen window**.
48
+
49
+ ## Performance envelope, OS-standard paths, clean uninstall & support logs
50
+
51
+ - **Startup, idle CPU & 30-minute active RAM budgets**: hit **`< 300–500 ms`** cold start on Native/Tauri/Rust/C++/Qt/AppKit/WinUI/GTK apps and **`< 1.0–1.2 s`** on Electron (whose Chromium memory footprint must be explicitly justified in the project brief). Maintain **`~0%` idle CPU** when minimized, occluded, or unfocused, **measure RSS/private RAM after 30 minutes of active editing/navigation** to confirm zero unbounded leaks against the agreed ceiling, and run heavy file/Git/SQLite/indexing work on background worker threads or utility processes.
52
+ - **High-contrast OS modes**: honor **Windows `forced-colors` / High Contrast themes** (`SystemColors` / `@media (forced-colors: active)`) and **macOS `Increase Contrast` + `Reduce Transparency`** so borders, focus rings, selection states, and translucent sidebars stay unmistakable.
53
+ - **OS-standard storage paths**: **never** write user config, caches, databases, or logs next to the application binary (`Program Files`, `/Applications`, `/usr/bin` are read-only or invalidate code signatures). Resolve platform-standard directories (`directories` crate in Rust, `app.getPath()` in Electron, `QStandardPaths` in Qt, `os.UserConfigDir()` in Go):
54
+ - **macOS**: `~/Library/Application Support/<AppId>`, `~/Library/Caches/<AppId>`, `~/Library/Logs/<AppId>`
55
+ - **Windows**: `%APPDATA%\<AppId>` (roaming config), `%LOCALAPPDATA%\<AppId>` (local DB, cache, logs)
56
+ - **Linux**: XDG Base Directory spec (`$XDG_CONFIG_HOME`, `$XDG_DATA_HOME`, `$XDG_STATE_HOME`, `$XDG_CACHE_HOME`)
57
+ - **Atomic file persistence (`write temp → fsync → rename`) & SQLite `WAL`**: never `truncate` + overwrite project files or `settings.json` in place; write to `<target>.tmp.<pid>` in the same directory, flush kernel buffers (`File::sync_all()` / `fsync` / `FlushFileBuffers`), and atomically `rename` onto `<target>`. Configure SQLite with `PRAGMA journal_mode = WAL; PRAGMA synchronous = NORMAL; PRAGMA foreign_keys = ON; PRAGMA busy_timeout = 5000;` and numbered migrations.
58
+ - **Clean uninstaller & opt-in support log export**: ensure uninstallers cleanly remove binaries, background helpers/daemons, `LaunchAgents`, Windows Services, file associations, and registry keys (prompting before deleting user workspaces), and provide a one-click **opt-in diagnostic/support log export** (`Help → Export Diagnostic Logs…`) with auth tokens, secrets, and PII automatically redacted.
59
+
60
+ ## 2026 code signing, clean-VM install proof & live `v(N-1) -> vN` update rollback
61
+
62
+ - **macOS**: sign with **Developer ID Application** + **Hardened Runtime** + minimal audited Entitlements, submit via **`xcrun notarytool submit --wait`**, staple (`xcrun stapler staple`), and capture a **clean-VM install screenshot** verifying Gatekeeper opens the app cleanly without `"unidentified developer"` blocks.
63
+ - **Windows (post-2024 EV SmartScreen reality)**: sign `.exe`/`.msi`/`.msix` via **Azure Artifact Signing (Trusted Signing)** or FIPS 140-2 Level 2+ HSM-backed OV/EV certificates, and capture a **clean-VM install screenshot** documenting exact SmartScreen/publisher behavior (**since 2024, Microsoft removed instant EV certificate SmartScreen bypass**, so reputation builds across consistent signed CI releases under one stable publisher identity).
64
+ - **Linux**: ship `.deb`/`.rpm`, **Flatpak** (with XDG Portals + valid AppStream metainfo XML), or GPG-signed **AppImage**.
65
+ - **Live `v(N-1) -> vN` delta auto-update + rollback verification**: sign update manifests and delta bundles with **`Ed25519` / `minisign`** (`tauri-plugin-updater`, Sparkle 2 `EdDSA`, Velopack, or verified `electron-updater`), stage silently in the background, prompt before restarting dirty windows, and **test a live upgrade AND simulated crash rollback across 2 consecutive packaged versions (`v(N-1) -> vN`)** before release.
66
+
67
+ ## Do/don't pairs
68
+
69
+ | Do | Don't |
70
+ |---|---|
71
+ | Show selected object name/breadcrumb in the inspector header AND mark it on canvas | Leave stale fields in a detached inspector when selection clears |
72
+ | Support `F6`/`Shift+F6` pane hopping, `Esc` back to canvas, and Windows `forced-colors` + macOS `Increase Contrast` | Force keyboard users to `Tab` through 100 tree rows or hide borders in High Contrast mode |
73
+ | Restore full workspace sessions (windows, tabs, active docs) and clamp bounds across mixed-DPI (`100%` ↔ `200%`) work areas | Restore `x: 2800, y: 100` onto an unplugged monitor or drop open tabs on restart |
74
+ | Store data in XDG / `Application Support` / `%APPDATA%` with atomic writes, clean uninstallers, and redacted support log export | Write `config.json` beside the binary or leave orphan daemons/registry keys after uninstall |
75
+ | Capture clean-VM Gatekeeper/SmartScreen install proofs and test live `v(N-1) -> vN` updates + rollback | Assume a Windows EV cert buys instant SmartScreen bypass or ship an untested auto-updater |
76
+ | Hold `~0%` idle CPU and verify steady RAM after **30 minutes of active usage** | Spin background timers in minimized windows or ignore slow memory leaks |
77
+
78
+ ## Verification checks
79
+
80
+ Verify in a real running desktop app (`rendered`; static showcase screenshots never prove keyboard traversal, clamping, signing, or restoration—label untested OSes `not-checked`):
81
+
82
+ 1. Select an item, press `F6` to move to the inspector, edit a field, press `Esc` back to canvas, and undo (`Cmd/Ctrl+Z`): verify selection, focus ring, High Contrast / `Increase Contrast` visibility, and undo agree (`rendered`).
83
+ 2. Open multiple windows/tabs/documents, resize down to minimum width, drag between `100%` and `200%` DPI displays, seed off-screen coordinates (`x: 9999`), relaunch, and verify full session restoration + on-screen clamping (`rendered`).
84
+ 3. Measure `~0%` idle CPU and **RAM after 30 minutes of active usage**, verify atomic save + clean uninstall + redacted log export, walk `NVDA`/`JAWS`/`Narrator`, `VoiceOver`, and `Orca`, and attach **clean-VM Gatekeeper/SmartScreen install screenshots** plus **live `v(N-1) -> vN` update + rollback** evidence (`rendered` / `static`).
@@ -12,12 +12,15 @@ Divergence is a procedure, not a mood. Never ask for “the best design” in on
12
12
 
13
13
  ## References
14
14
 
15
+ - Read [references/creative-brainstorming.md](references/creative-brainstorming.md) before pitching directions on any greenfield, redesign, or undecided surface (3-Tier Ambition Pitch, Ideation Operators, ASCII structural proof, Design Approval `<HARD-GATE>`, and feedback loop to `pixelcraft-plan`).
15
16
  - Read [references/movements.md](references/movements.md) when selecting or translating a design movement/aesthetic.
16
17
  - Read [references/composition-library.md](references/composition-library.md) when choosing the structural composition/grid or when hero-plus-cards feels like the default answer.
17
18
  - Read [references/slop-fingerprints.md](references/slop-fingerprints.md) before proposing directions and again before finalizing one.
18
19
  - Read [references/direction-card.md](references/direction-card.md) whenever writing the committed direction.
19
20
  - Read [references/direction-scoring.md](references/direction-scoring.md) before comparing or selecting directions.
20
21
  - Read [references/repetition-history.md](references/repetition-history.md) before generating candidates and when writing the final repetition check.
22
+ - Read [references/motion-identity.md](references/motion-identity.md) when defining a consistent motion language.
23
+ - Read [references/reference-analysis.md](references/reference-analysis.md) when researching visual examples and transferring patterns with provenance and evidence labels.
21
24
  - Read [references/wildcards.md](references/wildcards.md) when catalog directions feel repetitive, insufficiently subject-derived, or too safe.
22
25
 
23
26
  ## 1. Extract brief and material first
@@ -31,124 +34,87 @@ Before ideation, record:
31
34
  | job | primary job-to-be-done and success signal |
32
35
  | mode | Persuade, Operate, Read, Experience, Play, Communicate, or hybrid |
33
36
  | material | real copy, data, images, products, brand assets, screenshots, terminology |
34
- | constraints | platform, input modality, viewport/window, performance, legal, existing tokens/components |
37
+ | constraints | platform, input modality, viewport/window, performance, legal, existing tokens/components, user anti-goals/hate-list |
35
38
  | absence | what is unknown or missing; mark it instead of inventing proof |
36
39
 
37
40
  Use real material as a constraint. If the subject is absent from the visual concept, the direction is decoration.
38
41
 
39
- ## 2. Verbalized-sampling procedure
42
+ ## 2. Verbalized-sampling & 3-tier creative brainstorming
40
43
 
41
- Generate 3–5 directions. Assign each a rough probability that a conventional model would choose it; do not treat probability as quality. At least one direction must have low conventional probability but high brief fit.
44
+ Generate 3–5 directions using [references/creative-brainstorming.md](references/creative-brainstorming.md) (3-Tier Ambition Pitch + Ideation Operators: Domain-Object Transfer, Constraint Inversion, Anti-Reference Extraction, Real-Material Anchor). Assign each a rough probability that a conventional model would choose it; do not treat probability as quality. At least one direction must have low conventional probability but high brief fit.
42
45
 
43
46
  Every pair of directions must differ on at least three axes:
44
47
 
45
- 1. composition/grid;
48
+ 1. composition/grid & IA structure;
46
49
  2. typography/voice;
47
50
  3. color posture;
48
51
  4. material/texture/depth;
49
52
  5. motion behavior;
50
53
  6. imagery/iconography;
51
- 7. density/information structure.
54
+ 7. density/information structure & technical craft ambition.
52
55
 
53
- Do not create false diversity by changing only hue or font. Reject near-duplicates and regenerate.
54
-
55
- A useful distribution is:
56
-
57
- - one high-probability baseline, improved and grounded;
58
- - one historically grounded movement translation;
59
- - one subject-derived/wildcard direction;
60
- - optionally one restrained operational direction and one high-expression direction when mode permits.
56
+ Do not create false diversity by changing only hue or font. Reject near-duplicates and regenerate. Every pitched direction MUST include a compact **ASCII structural skeleton** and a **real-copy headline/primary action draft**.
61
57
 
62
58
  ## 3. Score before choosing
63
59
 
64
- Score each direction 0–4 per criterion. Require evidence, not adjectives.
60
+ Score each direction 0–4 across all 12 criteria defined in `references/direction-scoring.md`. Require concrete evidence notes for **high scores (3–4)** as well as low/uncertain scores (0–2)—never rubber-stamp a favorite template with unsubstantiated 4s.
65
61
 
66
62
  | Criterion | Question |
67
63
  |---|---|
68
64
  | subject fit | does it arise from the actual domain/material? |
69
- | audience/mode fit | does expression match user success and frequency of use? |
70
- | platform transferability | can it survive the target stack and input modality? |
71
- | accessibility/floor risk | can contrast, text scaling, focus, motion safety, and localization be preserved? |
72
- | implementation cost | can it be built honestly within project constraints? |
65
+ | task/mode fit | does expression match user success and frequency of use? |
66
+ | prototypicality | does it preserve learned platform/domain recognition where helpful? |
67
+ | hierarchy clarity | is the next decision obvious without reading every pixel? |
68
+ | visual complexity | does element count, grouping, and density match the mode? |
69
+ | accessibility risk | can contrast, text scaling, focus, motion safety, and cognitive load be preserved? |
70
+ | localization risk | does the layout/type system survive expansion, RTL, and script shaping? |
71
+ | platform transfer | can it be idiomatic in the target stack and input modality? |
72
+ | implementation cost | can it be built honestly within project constraints and timeline? |
73
73
  | distinctiveness | is it meaningfully apart from slop fingerprints and prior project history? |
74
- | coherence | can one system sustain all required states/screens? |
74
+ | content truth | is every claim, metric, copy block, and visual backed by real provenance? |
75
+ | coherence | can one system sustain all required states, modes, and screens? |
75
76
 
76
- Use the full scorecard in `references/direction-scoring.md`. Include prototypicality, hierarchy clarity, visual complexity, localization risk, implementation cost, and content truth alongside subject fit and distinctiveness. Choose the highest evidence-weighted result unless the user brief changes weights; hard floor/legal/truth failures are disqualifying regardless of total. Log why every losing direction lost; “less pretty” is not a reason.
77
+ Apply mode weights from `references/direction-scoring.md`. Hard floor/legal/truth failures are disqualifying regardless of total. Log why every losing direction lost using criterion names; “less pretty” is not a reason.
77
78
 
78
- ## 4. Commit to one direction
79
+ ## 4. Design Approval `<HARD-GATE>` & commit to one direction
79
80
 
80
- Write the direction card before implementation. It must specify:
81
+ On **greenfield products, new multi-screen features, or undecided redesigns**, present the top 2–3 contrasting directions—each with its ambition tier, ASCII structural skeleton, real-copy lead draft, signature element, and stack/library impact, leading with your `(Recommended)` choice—and **wait for explicit user approval before entering Build**. Only bypass this `<HARD-GATE>` when the user explicitly tells you to decide and build directly, or when an already-approved design fixes the direction.
81
82
 
82
- - concept in one sentence tied to subject;
83
- - composition/grid and density posture;
84
- - type roles, voice, script/fallback implications;
85
- - color posture and semantic roles, not just hex values;
86
- - material/texture/depth rules;
87
- - motion purpose, duration/easing posture, reduced-motion equivalent;
88
- - imagery/iconography rules and provenance;
89
- - signature element;
90
- - explicit taboos;
91
- - UX/i18n risks and validation plan.
83
+ If the approved direction requires upgrading the renderer, runtime, or library (e.g., Rive, WebGPU, Typst, Tauri, or native desktop/mobile), reopen and update `.pixelcraft/plan.md` via `pixelcraft-plan` before coding.
92
84
 
93
- Spend boldness in one primary place. Everything around the signature element stays disciplined enough for the mode.
85
+ Write the committed direction card (`references/direction-card.md`) including: concept, ASCII structural skeleton, real-copy lead draft, composition/grid, type roles & script fallback, color posture/semantic roles, material/depth rules, motion + reduced-motion equivalent, imagery/icon provenance, one subject-derived signature element, explicit taboos, and floor validation plan. Spend boldness in one primary place; keep everything around the signature disciplined for the mode.
94
86
 
95
87
  ## 5. Signature element
96
88
 
97
- Define exactly one memorable element unless the brief is explicitly maximalist. It must be:
98
-
99
- - derived from subject or material;
100
- - repeatable without becoming decoration spam;
101
- - implementable in the target rendering surface;
102
- - legible at required sizes and accessible without relying on motion or color alone;
103
- - removable or quiet in dense Operate contexts.
104
-
105
- Examples of valid signatures: a measurement scale integrated into navigation for a precision tool; seed-packet botanical plates for a seed archive; terminal scanline cadence for a retro operations console. Invalid signatures: random gradient blob, generic 3D shape, oversized italic word, glass card, animated grid background.
89
+ Define exactly one memorable element unless the brief is explicitly maximalist. It must be derived from subject or material, repeatable without decoration spam, implementable in the target surface, legible/accessible without relying on motion or color alone, and quiet/removable in dense Operate contexts. Valid: measurement-scale nav for a precision instrument; botanical plate index for a seed archive. Invalid: random gradient blob, generic 3D shape, oversized italic word, glass card, animated grid background.
106
90
 
107
91
  ## 6. Repetition history
108
92
 
109
- Use `.pixelcraft/history.json` in the user's project when writable. Never commit it for the user unless asked. The canonical schema, normalization rules, recall procedure, and privacy limits live in `references/repetition-history.md`. Format:
110
-
111
- ```json
112
- {
113
- "version": 1,
114
- "entries": [
115
- {
116
- "date": "2026-01-01",
117
- "surface": "marketing-home",
118
- "direction": "blueprint-instrument",
119
- "axes": {
120
- "composition": "technical-grid",
121
- "type": "mono-serif-contrast",
122
- "color": "paper-cobalt-signal-red",
123
- "material": "flat-print",
124
- "motion": "measurement-snap",
125
- "imagery": "annotated-diagram",
126
- "density": "high"
127
- },
128
- "signature": "measurement-scale-navigation",
129
- "fingerprint": "sha1-or-short-stable-hash-of-axes"
130
- }
131
- ]
132
- }
133
- ```
134
-
135
- Before proposing directions, inspect prior entries. Penalize repeats of the same movement, composition family, color posture, type pairing, signature shape, or copy formula across nearby surfaces. Coherent product screens may share tokens but must not repeat decorative gimmicks.
93
+ Use `.pixelcraft/history.json` in the user's project when writable. Never commit it for the user unless asked. The canonical schema, normalization rules, recall procedure, and privacy limits live in `references/repetition-history.md`. Before proposing directions, inspect prior entries and penalize repeats of the same movement, composition family, color posture, type pairing, signature shape, or copy formula across unrelated surfaces.
136
94
 
137
95
  ## 7. Slop scan
138
96
 
139
- Reject or explicitly redesign any direction whose identity depends on a fingerprint in `references/slop-fingerprints.md`, especially:
140
-
141
- - cream background + serif display + one orange/terracotta accent;
142
- - Inter/Geist-style neutral sans everywhere without a reason;
143
- - purple-to-blue gradients;
144
- - centered hero, eyebrow, two CTAs, three feature cards;
145
- - emoji as structural icons;
146
- - universal `rounded-2xl` plus soft shadow;
147
- - default glassmorphism;
148
- - generic benefit copy such as “supercharge your workflow”.
97
+ Reject or explicitly redesign any direction whose identity depends on a fingerprint in `references/slop-fingerprints.md`—including cream+serif+terracotta neo-slop, Inter/Geist-only defaults, indigo-purple-pink mesh gradients, border-beam cards, centered eyebrow+H1+2-CTA hero + 3 tinted-`40×40`-icon cards, pulsing `animate-ping` status pills, fake sparklines/`+24.5%` KPI deltas, emoji-as-icons, default shadcn zinc skins, generic AI marketing clichés (`next-gen`, `effortless`, `empower`, `streamline`, `reimagine`, `unleash`, `supercharge`), or implementation laziness stubs. A fingerprint may be used only when the user/project already owns it or the brief makes it semantically necessary; record the waiver.
149
98
 
150
- A fingerprint may be used only when the user/project already owns it or the brief makes it semantically necessary; record the waiver.
99
+ ## Iron Laws & Rationalization Table
151
100
 
152
- ## Output contract
101
+ - **IRON LAW 1:** Never pitch 3 color/font swaps of the same wireframe; every option must differ on IA/structure, visual posture, and craft ambition—proven by an ASCII skeleton and real-copy lead draft.
102
+ - **IRON LAW 2:** Never enter Build on undecided greenfield or redesign scope without passing the **Design Approval `<HARD-GATE>`** (unless explicitly instructed to decide and build directly).
103
+ - **IRON LAW 3:** Never assign a 3 or 4 score without citing concrete structural/material evidence.
153
104
 
154
- Return the distribution table, scores, selected direction card, repetition check, explicit taboos, and open material gaps. Do not implement until the direction is committed or the user asks for rapid exploration.
105
+ | Agent rationalization | Reality & required action |
106
+ |---|---|
107
+ | "I'll pick one strong direction myself and start coding to save time." | Unapproved guesses waste implementation work and collapse to model defaults. Pitch 2–3 contrasting directions with ASCII skeletons and get sign-off first. |
108
+ | "I described the layout in prose; an ASCII skeleton is overkill." | Prose lets implementation quietly revert to hero+3-cards. Draw the ASCII skeleton and real-copy lead before committing. |
109
+ | "All three directions use the same layout, just light/dark/accent swaps." | Color swaps are not divergence. Apply Domain-Object Transfer, Constraint Inversion, and Anti-Reference Extraction to change structure. |
110
+ | "This direction fits best, so I'll give it straight 4s." | Unsubstantiated 4s mask bias and floor risks. Cite concrete evidence for every 3–4 score and every 0–2 risk. |
111
+
112
+ ## Pre-submit checklist
113
+
114
+ - [ ] Real brief material, user anti-goals/hate-list, and missing provenance inventoried before ideation.
115
+ - [ ] 3–5 genuinely divergent directions generated across the 3-Tier Ambition Pitch using at least two Ideation Operators (not hue/font swaps).
116
+ - [ ] Every pitched direction includes a compact **ASCII structural skeleton** and **real-copy headline/primary action draft**.
117
+ - [ ] All 12 criteria scored with concrete evidence notes for **high scores (3–4)** as well as low/uncertain scores (0–2); losing directions logged by criterion name.
118
+ - [ ] `.pixelcraft/history.json` checked and `references/slop-fingerprints.md` cleared (or user brand waiver recorded).
119
+ - [ ] **Design Approval `<HARD-GATE>`** satisfied (or explicit user bypass recorded) and `.pixelcraft/plan.md` updated if the winning concept upgrades the stack/renderer.
120
+ - [ ] Committed direction card complete with one subject-derived signature element and explicit taboos.
@@ -0,0 +1,72 @@
1
+ # Creative brainstorming & divergence protocol
2
+
3
+ Use this protocol inside `pixelcraft-direction` whenever visual direction or workspace structure is undecided (greenfield products, new flagship surfaces, major redesigns, or brainstorming sessions). Its goal is to force genuine structural and craft divergence before a single line of UI code is written.
4
+
5
+ ## 1. The 3-Tier Ambition Pitch
6
+
7
+ Pitch **3 contrasting directions** spanning three ambition tiers—never three color/font reskins of the same layout. Every tier must differ across **IA / interaction structure**, **visual posture**, AND **technical craft ambition**:
8
+
9
+ | Tier | Intent | Structural & craft posture | Best fit when |
10
+ |---|---|---|---|
11
+ | **1. Pragmatic High-Craft** | Zero-friction operational clarity with sharp subject-specific polish | Familiar platform-idiomatic IA; disciplined typography, spacing rhythm, and one restrained signature detail; lightweight CSS/native primitives | High-frequency Operate tools, tight timelines, brownfield extensions where predictability outranks spectacle |
12
+ | **2. Editorial / Domain-Object Signature** | Memorable identity rooted directly in the real artifact or workflow of the domain | Asymmetric or object-led composition derived from domain material (ledger, instrument panel, folio, specimen index, workbench); distinctive typographic hierarchy + purposeful spatial motion | Flagship consumer apps, developer tools, Persuade/Read surfaces, category-defining redesigns |
13
+ | **3. Bold Experimental** | High-conviction, unmistakable interaction model pushing the surface's craft ceiling | Non-template spatial/canvas/timeline/split-instrument architecture; bespoke interactive signature (e.g., authored state-machine motion, interactive specimen manipulation, shader/WebGPU/3D or live publication layout) while keeping the accessibility floor intact | Launches, creative studios, Experience/Play surfaces, or users explicitly asking to stand far apart from competitors |
14
+
15
+ Every direction must remain **honestly buildable** and **floor-compliant** (accessibility, localization, states, responsiveness). "Experimental" never excuses broken keyboard navigation, illegible contrast, or fake data.
16
+
17
+ ## 2. Ideation Operators (use at least two before sketching)
18
+
19
+ Do not brainstorm from generic mood words ("minimal", "sleek", "modern"). Apply concrete operators to the real brief and material:
20
+
21
+ 1. **Domain-Object Transfer:** inspect the physical or mental artifact practitioners already trust in this domain (flight strip, oscilloscope, field notebook, mixing console, archival ledger, architectural section cut, botanical plate, dispatch board) and translate its *information structure and controls*—not kitschy skeuomorphism—into the interface.
22
+ 2. **Constraint Inversion:** identify the #1 annoying convention in this category (e.g., hiding prices behind modals, forcing a 5-step wizard before showing output, burying primary actions in top-right menus) and invert it into the core interaction model.
23
+ 3. **Anti-Reference Extraction:** name **3 specific tropes** that competitors and default AI outputs fall back on for this prompt (e.g., centered eyebrow+H1+2-CTA hero, 3 tinted-icon feature cards, fake `+24.5%` KPI sparkline banner) and write an explicit structural inversion for each.
24
+ 4. **Real-Material Anchor:** start from the ugliest or most authentic piece of real data in the brief (a dense table row, a real product photo, a real CLI error output, a real headline/price) and build the first screen around making *that* material unmistakable.
25
+
26
+ ## 3. Structural Proof Before Code
27
+
28
+ Vague prose collapses back into hero-plus-3-cards the moment coding starts. Every pitched direction MUST include two concrete proofs **before** selection:
29
+
30
+ 1. **Compact ASCII layout skeleton** (desktop + narrow/mobile adaptation note) showing exact region geometry, focal anchor, navigation shape, and where the signature element lives.
31
+ 2. **Real-copy headline / primary action draft** written in concrete domain language (no lorem ipsum, no `"Supercharge your workflow"`, no `"Get Started"` + `"Learn More"` defaults).
32
+
33
+ Example structural proof fragment:
34
+
35
+ ```text
36
+ +------------------------------------------------------------------+
37
+ | [Mark] Field Ledger Routes | Calibration | Exports [Cmd+K] |
38
+ +----------------------+-------------------------------------------+
39
+ | LIVE INSTRUMENT RAIL | SPECIMEN 042 — Alpine Soil Core (2,180m) |
40
+ | - Core depth: 1.42m | [ Interactive depth-profile cross-cut ] |
41
+ | - Moisture: 18.4% | |
42
+ | - Last sync: 09:14 | [ Log core sample ] [ Export CSV ] |
43
+ +----------------------+-------------------------------------------+
44
+ Mobile (<640px): Top live summary strip + full-width cross-cut + sticky bottom [Log core sample].
45
+ ```
46
+
47
+ ## 4. Design Approval `<HARD-GATE>`
48
+
49
+ ```text
50
+ <HARD-GATE>
51
+ On greenfield products, new multi-screen features, or undecided redesigns:
52
+ DO NOT write implementation code until the user approves a direction.
53
+ </HARD-GATE>
54
+ ```
55
+
56
+ Present the top **2–3 contrasting directions** clearly:
57
+
58
+ 1. Show each direction's ambition tier, anti-references inverted, ASCII structural skeleton, real-copy lead draft, signature element, and stack/library impact.
59
+ 2. Mark one pick clearly as **(Recommended)** with evidence-backed trade-offs (never "because it looks cleaner").
60
+ 3. Ask the user to approve one direction, request a deliberate hybrid (written explicitly into the direction card), or redirect.
61
+
62
+ **Only bypass this `<HARD-GATE>` when:**
63
+ - the user explicitly instructs you to decide and build directly without pausing, OR
64
+ - the task is in **Direct Execution** (narrow fix, copy tweak, behavior-preserving refactor, or already-approved design).
65
+
66
+ ## 5. Feedback Loop to `pixelcraft-plan`
67
+
68
+ Creative brainstorming is allowed to challenge an overly timid initial stack. If the approved direction genuinely needs a richer renderer, runtime, or purpose-built library (for example: Rive state-machine motion, Three.js/WebGPU interactive specimen, Typst/WeasyPrint publication PDF, Tauri v2 / SwiftUI / PySide6 native shell, or a dedicated charting/editor engine):
69
+
70
+ 1. Reopen `.pixelcraft/plan.md` **before** entering Phase 4 (Build).
71
+ 2. Update the stack decision and **Sub-Stack Capability → Purpose-Built Library Gate** with version/license/a11y/fallback verification.
72
+ 3. Preserve the prior plan entry and record why the approved creative direction triggered the upgrade.
@@ -7,7 +7,17 @@ Use this compact artifact as the bridge between divergence and implementation.
7
7
 
8
8
  **Concept:** <one sentence tying subject/material to visual behavior>
9
9
  **Mode/surface:** <mode, platform, input modality, density>
10
- **Probability class:** <high/medium/low conventional-model probability>
10
+ **Ambition tier & probability class:** <Pragmatic High-Craft / Editorial Domain-Object / Bold Experimental; high/medium/low conventional-model probability>
11
+
12
+ ## Structural skeleton (ASCII)
13
+ ```text
14
+ <compact region wireframe showing focal anchor, navigation shape, signature element placement, and narrow/mobile adaptation note — required so implementation cannot collapse to default hero+3-cards>
15
+ ```
16
+
17
+ ## Real-copy lead draft
18
+ - Primary headline / screen title: <concrete domain-language draft — zero AI clichés or lorem ipsum>
19
+ - Supporting lead / summary: <1 concrete factual line grounded in brief material>
20
+ - Primary action(s): <exact consequence-naming verb labels, e.g. "Log core sample", "Compare 2025 filings">
11
21
 
12
22
  ## Composition
13
23
  - Grid/structure: <columns, asymmetry, alignment, measure, spatial logic>
@@ -55,7 +55,11 @@ Adjust weights only because the brief says so. Record the reason.
55
55
  | A | | | | | | | | | | | | | |
56
56
  ```
57
57
 
58
- Add a short evidence note under the table for any score of 0–1 or uncertain 2. Do not write only adjectives such as “clean,” “premium,” or “bold.”
58
+ Add concise, concrete evidence notes under the table for **both**:
59
+ - **High scores (3–4)** — cite the exact structural mechanism, real material, ASCII region, or constraint fit that earns the 3 or 4. Unsubstantiated 4s are invalid; never rubber-stamp a favorite template with empty high scores.
60
+ - **Low or uncertain scores (0–2)** — name the exact risk, missing material, or floor tension and what mitigation (if any) resolves it.
61
+
62
+ Do not write taste adjectives such as “clean,” “premium,” “modern,” or “bold” as score justification.
59
63
 
60
64
  ## Selection rules
61
65
 
@@ -0,0 +1,67 @@
1
+ # Motion identity
2
+
3
+ Motion identity is the consistent character of movement across a brand or product, not a library or a bag of effects. Define identity here during direction; implement compositor budgets, CSS/native APIs, and scroll mechanics through `pixelcraft-craft` and the platform skill.
4
+
5
+ ## Motion-identity archetypes
6
+
7
+ Pick one primary archetype tied to subject matter and surface mode—never mix contradictory physics across sibling controls:
8
+
9
+ | Archetype | Physical reference | Tempo & curve character | Stagger & spatial grammar | Best surface fit |
10
+ |---|---|---|---|---|
11
+ | **Mechanical / detented** | toggle switch, vernier caliper, camera shutter | crisp, near-instant onset, zero overshoot; settles into exact stops | orthogonal/grid-aligned snaps, minimal or zero stagger | Operate, developer tools, finance, hardware instruments, TUI |
12
+ | **Editorial / cut** | print turn, slide projector, film cut | direct cuts or short deliberate fades; still typography, quiet layout | sequential reveal only for chapter/index hierarchy | Read, publishing, archives, documentation, legal |
13
+ | **Fluid / organic** | water surface, ink spread, draped cloth | longer deceleration tails, gentle continuous continuity, low friction | directional wave or shared-element continuity along reading path | Persuade, culture, hospitality, creative portfolios, media |
14
+ | **Tactile / spring** | physical card deck, damped rubber detent, direct-manipulation sheet | velocity-preserving spring physics, interruptible mid-flight, slight controlled bounce on spatial moves only | finger/pointer-coupled gestures; effects (color/opacity) never bounce | Consumer mobile, spatial/XR, playful tools, Material 3 Expressive / Apple native |
15
+
16
+ ## Define the direction's motion language
17
+
18
+ Record these six choices in the direction card before implementation:
19
+
20
+ 1. **Archetype & tempo:** immediate, measured, energetic, ceremonial, or intentionally static.
21
+ 2. **Spatial vs. effect separation:** spatial geometry moves (`transform`, sheet expansion) may use curves or springs; non-spatial effects (opacity, color, border) stay critically damped with zero overshoot.
22
+ 3. **Token roles:** map the archetype to a compact semantic token vocabulary rather than raw numbers.
23
+ 4. **Spatial grammar:** planar slides, depth elevation, shared-element handoff, or direct cuts.
24
+ 5. **Signature moment:** one memorable transition with a clear subject/product cause (e.g., an instrument needle settling on filtered totals).
25
+ 6. **Reduced-motion identity:** how the same character reads when spatial movement is replaced (e.g., instant detent highlight for Mechanical, crisp 80–120ms opacity dissolve for Fluid).
26
+
27
+ ## Archetype-to-token mappings
28
+
29
+ Use these starting token profiles to keep motion coherent across CSS, SwiftUI, Compose, Flutter, and Motion runtimes:
30
+
31
+ | Token role | Mechanical / detented | Editorial / cut | Fluid / organic | Tactile / spring |
32
+ |---|---|---|---|---|
33
+ | `motion.feedback` (press/toggle) | `60–90ms`, `cubic-bezier(0.2, 0, 0, 1)` | `0–80ms`, instant cut or linear fade | `100–140ms`, `cubic-bezier(0.22, 1, 0.36, 1)` | spring `stiffness: 600, damping: 38` (critically damped) |
34
+ | `motion.state` (panel/tab/disclosure) | `120–160ms`, `cubic-bezier(0.2, 0, 0, 1)` | `120–180ms`, `cubic-bezier(0.25, 0.1, 0.25, 1)` | `200–280ms`, `cubic-bezier(0.16, 1, 0.3, 1)` | spring `stiffness: 420, damping: 30` (fast spatial) |
35
+ | `motion.scene` (sheet/route/signature) | `180–220ms`, stepped or sharp ease-out | `180–240ms`, clean opacity crossfade | `300–420ms`, `cubic-bezier(0.16, 1, 0.3, 1)` | spring `stiffness: 280, damping: 24` (subtle settle) |
36
+ | `motion.effects` (opacity/color) | `80–120ms`, ease-out (no overshoot) | `100–140ms`, ease-out | `150–200ms`, ease-out | `120–180ms`, ease-out (never spring-bounced) |
37
+ | Reduced-motion equivalent | instant state swap (`0ms`) + border/ink detent | instant cut or `80ms` opacity fade | `120ms` opacity crossfade, zero translation | `100ms` opacity crossfade, zero bounce/scale |
38
+
39
+ ## Do / Don't
40
+
41
+ | Do | Don't |
42
+ |---|---|
43
+ | Match motion character to domain physics (a trading blotter snaps mechanically; a museum catalog dissolves quietly). | Apply the same 400ms bouncy spring to a dense form, a marketing hero, and an error banner. |
44
+ | Keep operational feedback faster and tighter than Persuade/Experience choreography. | Make repeat users wait through ceremonial entrances on frequent tasks. |
45
+ | Spend the signature moment in one deliberate place (such as view transition or mode switch). | Animate every card, heading, and icon on scroll entrance. |
46
+ | Record motion grammar from references (timing, axis, interruption, trigger). | Copy a library tag (“uses GSAP”) and call it a motion identity. |
47
+ | Keep every transition interruptible when user input changes mid-motion. | Lock clicks or queue uninterruptible animations while a user moves quickly. |
48
+
49
+ ## Cross-surface identity translation
50
+
51
+ Translate the motion archetype into the target surface's native capabilities instead of forcing web physics onto every renderer:
52
+
53
+ | Surface | How to preserve the archetype |
54
+ |---|---|
55
+ | Web / Desktop webview | Semantic CSS custom properties + compositor-only curves/springs; see `pixelcraft-craft` for CSS/runtime implementation |
56
+ | iOS / macOS (SwiftUI/AppKit) | Map archetype directly to `.snappy`, `.smooth`, `.bouncy`, or custom `.spring(duration:bounce:)` presets |
57
+ | Android / Compose / Flutter | Map to Material 3 Expressive `spatial` vs `effects` spring specs or Flutter `SpringDescription` / `Curves` |
58
+ | TUI / Email / Print | Translate identity into pacing, focus highlight, state cadence, and crisp hierarchy (zero decorative keyframe loops) |
59
+
60
+ ## Reference motion extraction
61
+
62
+ When studying an external reference during direction exploration, extract grammar rather than effect labels:
63
+
64
+ - **Trigger:** pointer, keyboard focus, click/tap, gesture velocity, scroll offset, or system state change;
65
+ - **Axis & continuity:** what stays anchored while what moves, and whether shared elements bridge views;
66
+ - **Interruption behavior:** what happens when the user reverses input mid-transition;
67
+ - **Absence check:** verify what the reference keeps still so the signature movement reads clearly.