@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-mobile
3
- description: Translates Pixelcraft direction, tokens, UX, and floor requirements into idiomatic mobile UI across SwiftUI, UIKit, Jetpack Compose, Flutter, React Native/Expo, Kotlin Multiplatform, Ionic/Capacitor, .NET MAUI, Flet, and Kivy. Use for native or cross-platform app screens, navigation, safe areas, Dynamic Type/sp scaling, touch targets, gestures, haptics, platform conventions, forms, states, motion, accessibility, and device verification.
3
+ description: Translates Pixelcraft direction, tokens, UX, and floor requirements into idiomatic mobile UI across SwiftUI (incl. TCA), UIKit, Jetpack Compose, Flutter, React Native/Expo, Expo Router, LynxJS, Kotlin Multiplatform, NativeScript, Skip, HarmonyOS ArkUI, Elixir LiveView Native, Taro/uni-app, Ionic/Capacitor, .NET MAUI, Flet, and Kivy. Use for native or cross-platform app screens, iOS 26 Liquid Glass, Material 3 Expressive, safe areas, Dynamic Type/sp scaling, touch targets, bottom sheets, gestures, haptics, Live Activities, forms, states, accessibility, and device verification.
4
4
  license: MIT
5
5
  metadata:
6
6
  version: 0.1.0
@@ -8,7 +8,7 @@ metadata:
8
8
 
9
9
  # Pixelcraft mobile
10
10
 
11
- Use this skill when the surface is a phone/tablet/foldable/watch-adjacent app. Respect the host platform: iOS uses Apple HIG idioms, Android uses Material behavior, and cross-platform runtimes must translate rather than average them.
11
+ Use this skill when the surface is a phone/tablet/foldable/watch-adjacent app. Respect the host platform: iOS uses Apple HIG idioms (including iOS 26 Liquid Glass with contrast/transparency fallbacks), Android uses Material 3 / Material 3 Expressive behavior with edge-to-edge and predictive back, and cross-platform runtimes must translate rather than average them.
12
12
 
13
13
  ## Surface craft
14
14
 
@@ -16,54 +16,71 @@ Give the primary task a short route with native back/dismiss behavior; add delig
16
16
 
17
17
  ## Detection signals
18
18
 
19
- `Package.swift`, Xcode projects/workspaces, SwiftUI/UIKit imports, `build.gradle(.kts)` Compose dependencies, `pubspec.yaml`, React Native/Expo config, KMP shared modules, Ionic/Capacitor config, `.csproj` MAUI references, Flet controls/page setup, Kivy KV/App classes, platform folders (`ios/`, `android/`), and target/device family declarations.
19
+ `Package.swift`, Xcode projects/workspaces, SwiftUI/UIKit/TCA imports, `build.gradle(.kts)` Compose/Material3 dependencies, `pubspec.yaml`, React Native/Expo config (`app.config.*`, Expo Router `app/_layout.tsx`), LynxJS (`@lynx-js/react`, `lynx.config.*`, `rspeedy`), KMP/Compose Multiplatform (`composeResources/`, `commonMain`), NativeScript (`nativescript.config.ts`), Skip (`Skip/skip.yml`), HarmonyOS (`oh-package.json5`, `build-profile.json5`, `.ets` ArkTS), LiveView Native (`.swiftui.heex`/`.jetpack.heex`), Taro/uni-app (`config/index.*`, `pages.json`, `manifest.json`), Ionic/Capacitor config (`capacitor.config.*`), `.csproj` MAUI references, Flet controls/page setup, Kivy/KivyMD KV/App classes, platform folders (`ios/`, `android/`), and target/device family declarations.
20
20
 
21
21
  ## Translate direction to mobile idioms
22
22
 
23
- 1. Map DTCG semantic roles to native theme systems: SwiftUI asset catalogs/environment, UIKit trait-aware colors, Compose `MaterialTheme`, Flutter `ThemeData`/`ColorScheme`, RN theme context, Ionic CSS variables, MAUI resources, Flet theme objects, or Kivy KV/Python constants.
24
- 2. Recompose for touch and reach: primary actions within reach, no desktop hover dependence, dense information only where expert use justifies it.
25
- 3. Use platform navigation rather than web metaphors: navigation stack/tab bar/sheet on iOS; navigation bar/rail/drawer/predictive back on Android; large-title behavior only where idiomatic.
26
- 4. Scale type using Dynamic Type or sp scaling; restructure instead of truncating essential content at accessibility sizes.
27
- 5. Keep targets at least 44×44 pt iOS and 48×48 dp Android unless a documented platform exception applies.
28
- 6. Map motion to native spring/transition idioms and honor Reduce Motion/Remove animations. Haptics confirm meaningful physical/input moments only.
23
+ 1. Map DTCG semantic roles to native theme systems: SwiftUI `ColorResource` Asset Catalogs/`@Entry`, UIKit trait-aware colors, Compose `MaterialExpressiveTheme`/`ColorScheme`, Flutter `ThemeData`/`ThemeExtension`, RN styling engines (`Uniwind`, `unistyles`, `NativeWind`), LynxJS CSS custom properties, HarmonyOS `$r('app.color.*')`, Ionic 8 `light-dark()` variables, NativeScript `.ns-dark` CSS, Skip Asset Catalogs, MAUI `AppThemeBinding`, Flet `ft.Theme`, or KivyMD `theme_cls`.
24
+ 2. Recompose for touch and reach: primary actions in the lower thumb zone, no desktop hover dependence, dense information only where expert use justifies it.
25
+ 3. Use platform navigation rather than web metaphors: `NavigationStack`/`Tab`/`TabSection`/sheets on iOS; Navigation 3 or Compose Navigation + predictive back + Material 3 adaptive panes on Android; Expo Router native stacks/tabs on RN; `GoRouter` `StatefulShellRoute` on Flutter; `Navigation` + `GridRow`/`GridCol` on HarmonyOS.
26
+ 4. Scale type using Dynamic Type (`.font(.custom(..., relativeTo:))`), Android `sp`, or HarmonyOS `fp` scaling; restructure horizontal rows instead of truncating essential content at accessibility sizes.
27
+ 5. Keep targets at least `44×44 pt` iOS and `48×48 dp` Android unless a documented platform exception applies.
28
+ 6. Map motion to native spring/transition idioms (`MotionScheme.expressive()` spatial vs effects springs, Reanimated 4, SwiftUI springs) and honor Reduce Motion/Remove animations/Reduce Transparency. Haptics confirm meaningful physical/input moments only.
29
29
 
30
30
  ## Platform-wide rules
31
31
 
32
- - Respect safe areas, status/navigation bars, display cutouts, split screen, landscape, foldables, keyboards, and edge gestures.
33
- - Preserve state across process death/backgrounding where the platform expects it; interruption is normal mobile behavior.
34
- - Back/swipe/home interruption must never silently discard work or duplicate side effects.
35
- - Use platform pickers, keyboards, autofill, share sheets, permissions prompts, undo, and text editing behavior before custom replacements.
36
- - Explain permission value before prompting and provide denied-state recovery.
37
- - Test dark/light, increased contrast, reduced motion, bold/expanded text, RTL, offline, slow network, one-hand use, screen reader, keyboard/controller where relevant.
32
+ - **2026 App Store (iOS / Xcode 26 SDK) gates**: ship `PrivacyInfo.xcprivacy` covering first-party code and every embedded third-party SDK (Required Reason APIs + tracking domains); store tokens exclusively in **Keychain** (never `UserDefaults` / `AsyncStorage`); offer **Sign in with Apple** parity whenever 3rd-party social login exists; provide discoverable **in-app Account Deletion** that actually deletes/schedules deletion (never linking to a support email); and use contextual just-in-time permission priming, zero-permission `PhotosPicker`/`PHPickerViewController` (plus `.limited` photo support), and inline Settings deep-link recovery when denied.
33
+ - **2026 Google Play (`targetSdk 36` / Android 16 `.aab`) gates**: enforce mandatory **Edge-to-Edge** (`enableEdgeToEdge()` / `WindowCompat.setDecorFitsSystemWindows(window, false)` / `WindowInsets.ime`); never hard-lock portrait on `sw >= 600dp` tablets/foldables and survive fold/unfold posture transitions without state loss; compile all native `.so` libraries for **`16 KB` memory page size** (NDK r28+ / `-Wl,-z,max-page-size=16384`, verified via `zipalign -c -P 16`); store secrets in **Android Keystore** (Jetpack Tink / `EncryptedSharedPreferences`, never plaintext `SharedPreferences`); and wire **Predictive Back** (`OnBackInvokedCallback` / `PredictiveBackHandler`).
34
+ - **Tactile safety & cross-platform split**: enforce **`>= 8 pt/dp` minimum spacing** between destructive actions and safe controls, an **explicit visible `Close` button on bottom sheets** for users who cannot drag gestures, **zero custom horizontal swipe gestures inside OS back-gesture edge zones**, and an **explicitly documented shared-vs-platform-native UI split** on cross-platform stacks (Flutter, React Native, KMP, `.NET MAUI`).
35
+ - **Physics, memory/energy, install budget & rollout gates**: hit **`< 800 ms–1.2 s`** cold start on mid-tier hardware (hard ceiling `< 2.0 s`) via **Android Baseline Profiles** and deferred SDK init; unlock **`120fps` ProMotion (`< 8.33 ms`/frame)** via `CADisableMinimumFrameDurationOnPhone = true` with UI/Impeller-thread animations, interactive keyboard dismissal, and `panVelocity` spring handover; pass a **20–30× primary-flow repetition memory-leak check** (`LeakCanary` / Xcode `Instruments`), **Energy / Battery Historian / Xcode Energy Impact** check, and agreed **install-size ceiling** (e.g., `<= 50–80 MB` download); and ship a **staged rollout + force-update / min-supported-version gate** for breaking API changes.
36
+ - **4-tier haptics, process-death & 3-tier real-device matrix**: restrict haptics to 4 semantic tiers; survive OS background RAM eviction (`adb shell am kill <pkg>` / Xcode termination) via `SavedStateHandle`/`rememberSaveable`/`@SceneStorage`/`RestorationMixin`; expose visible offline mutation sync queues; maintain **`>= 99.5%` crash-free sessions** (`0` ANRs) with automated dSYM/R8/ProGuard symbolication; and attach profiler, crash-free, VoiceOver, and TalkBack deliverables across a **3-tier real-device matrix** (**`compact 4.7–5.4" + standard + Pro Max/Plus` iOS** and **`low-RAM 3–4 GB + mid-tier + flagship` Android** across **oldest + newest supported OS** at default and **`200%` (`AX3`)** font scale).
37
+
38
+ ## Anti-lazy-default & anti-slop guard
39
+
40
+ - **Reject lazy wrappers on greenfield mobile apps**: do not wrap a web SPA in Ionic/Capacitor/WebView or default to Python Kivy merely out of habit when native **SwiftUI**, **Jetpack Compose**, **Flutter**, **KMP**, or **React Native New Architecture** fits the product's gesture fidelity, offline durability, and platform expectations. Use Capacitor/Kivy/LiveView Native/Taro only when their trade-offs match explicit team or distribution constraints.
41
+ - **Reject transplanted web slop**: never drop centered web marketing heroes, hover-only tooltips, floating 3-card SaaS grids, or custom fake nav bars onto native mobile screens.
42
+ - **Do not hand-roll native primitives**: use native sheets/detents, date pickers, autofill, predictive back, and swipe-back gestures instead of brittle custom overlays.
38
43
 
39
44
  ## Common mobile-specific failures
40
45
 
41
- - fixed-height rows clipping Dynamic Type or sp scaling;
42
- - bottom CTAs hidden by home indicator, keyboard, or system navigation;
43
- - custom nav bars that break swipe/predictive back;
44
- - web-style cards/hero layouts transplanted into native product UI;
45
- - haptics/animation on every interaction;
46
- - permission primer loops with no escape;
47
- - scroll views nesting unpredictably or fighting edge gestures;
48
- - cross-platform UI forced to look identical at the expense of both platforms.
46
+ - fixed-height rows clipping Dynamic Type (`AX3`) or `200%` `sp` scaling, or hard-locked portrait breaking `sw >= 600dp` foldables/tablets on Android 16;
47
+ - bottom CTAs hidden by home indicator, soft keyboard, or Android 15/16 edge-to-edge gesture bar, or bottom sheets missing an explicit `Close` button;
48
+ - `< 8 pt/dp` spacing beside destructive taps, or custom horizontal swipes inside OS back-gesture edge zones;
49
+ - `4 KB`-aligned native `.so` binaries rejected by Google Play, missing `PrivacyInfo.xcprivacy`, tokens in `UserDefaults`/`SharedPreferences`, or fake "email us to delete account" links;
50
+ - animations capped at `60 Hz` on ProMotion iPhones, memory leaks after 20–30× flow repeats, missing min-supported-version gate, or state lost on `adb shell am kill` eviction;
51
+ - Liquid Glass stacked on reading content or unreadable under Reduce Transparency / Increase Contrast;
52
+ - haptics buzzing on every routine tap/scroll rather than the 4 semantic tiers.
49
53
 
50
54
  ## Verification options
51
55
 
52
- Rendered verification is possible only through simulator/emulator/device tooling or existing snapshot/screenshot tests. Xcode Previews, Accessibility Inspector, Android Layout Inspector/Accessibility Scanner, Flutter widget tests/golden tests, RN/Expo device testing, and platform screenshot tests provide different evidence. Compilation or preview generation alone is not visual verification; label unavailable device inspection `not-checked`.
56
+ Rendered verification requires simulator/emulator/device tooling or runtime UI tests (**Rule #0.3**: compilation or preview generation alone is `static`, never `rendered`). Attach profiler traces (`Instruments` / `LeakCanary` / Energy Impact), install-size reports, crash-free/ANR config, and VoiceOver/TalkBack captures across the 3-tier iOS + Android matrix; label unavailable physical devices `not-checked`.
57
+
58
+ ## Pre-submit checklist
59
+
60
+ - [ ] zero `TODO`s, placeholder stubs, invented copy, or dead tap/gesture handlers;
61
+ - [ ] App Store & Google Play gates met: Xcode 26 SDK, `PrivacyInfo.xcprivacy`, Keychain/Keystore-only tokens, Sign in with Apple parity, real in-app Account Deletion, `targetSdk 36` `.aab`, Edge-to-Edge + `WindowInsets.ime`, `sw >= 600dp` foldable posture, `16 KB` `.so` alignment (`zipalign -c -P 16`), Predictive Back;
62
+ - [ ] `>= 8 pt/dp` destructive spacing, explicit visible `Close` button on bottom sheets, zero custom swipes in OS back-gesture edge zones, and documented shared-vs-platform-native UI split (on Flutter/RN/KMP/MAUI) verified;
63
+ - [ ] `< 800 ms–1.2 s` cold start (Baseline Profiles), `120fps` ProMotion, interactive keyboard drag, `panVelocity` spring handover, 4-tier haptics, **20–30× primary-flow memory-leak check** (`LeakCanary`/`Instruments`), **Energy/Battery Historian/Energy Impact** check, agreed **install-size ceiling** (`<= 50–80 MB`), and **staged rollout + force-update/min-version gate** verified;
64
+ - [ ] OS process-death (`adb shell am kill` / background eviction) restoration, visible offline sync queue, dSYM/R8 symbolication (`>= 99.5%` crash-free, `0` ANRs), and `44 pt` / `48 dp` targets at Dynamic Type `AX3` / `200%` `sp` verified;
65
+ - [ ] Dark Mode, Increase Contrast, Reduce Transparency, Reduce Motion, and VoiceOver + TalkBack deliverables across the **3-tier real-device matrix** (`compact 4.7–5.4" + standard + Pro Max/Plus` iOS; `low-RAM 3–4 GB + mid-tier + flagship` Android across oldest + newest OS) checked or labeled `not-checked`;
66
+ - [ ] **Checklist-Until-Passing Stop-Gate (`<HARD-GATE>`):** walk every checklist item above + run `slop-scan.mjs --fail-on p2`, `check-contrast.mjs`, native/simulator tests, and `check-acceptance.mjs .pixelcraft/acceptance.json` (`pixelcraft-review`) in a `Fix → Re-verify` loop until passing (`0` `fail`/`pending` rows, `rendered` evidence on visual/perf/a11y per `Rule #0.3`).
53
67
 
54
68
  ## Framework routing
55
69
 
56
- - Read [references/task-state-composition.md](references/task-state-composition.md) for a branded timer, recording flow, or other activity with a distinct before/during/after state.
57
-
58
- - Read [references/swiftui.md](references/swiftui.md) for SwiftUI/iOS/watchOS/visionOS-style declarative Apple UI.
59
- - Read [references/uikit.md](references/uikit.md) for UIKit/AppKit-adjacent imperative iOS UI.
60
- - Read [references/jetpack-compose.md](references/jetpack-compose.md) for Android Compose.
61
- - Read [references/flutter.md](references/flutter.md) for Flutter/Dart across mobile and embedded surfaces.
62
- - Read [references/react-native-expo.md](references/react-native-expo.md) for React Native/Expo.
63
- - Read [references/kotlin-multiplatform.md](references/kotlin-multiplatform.md) for Compose Multiplatform/KMP shared UI.
64
- - Read [references/ionic-capacitor.md](references/ionic-capacitor.md) for Ionic/Capacitor hybrid apps.
65
- - Read [references/dotnet-maui.md](references/dotnet-maui.md) for .NET MAUI.
66
- - Read [references/flet.md](references/flet.md) for Flet cross-platform app surfaces.
67
- - Read [references/kivy.md](references/kivy.md) for Kivy cross-platform app surfaces.
70
+ - Read [references/task-state-composition.md](references/task-state-composition.md) when designing timers, capture/recording flows, delivery/ride trackers, iOS Live Activities, or Android Live Updates with distinct setup/active/complete stages.
71
+ - Read [references/tactile-interactions.md](references/tactile-interactions.md) when implementing bottom sheet detents, scroll handover, thumb-zone ergonomics, semantic haptics, swipe-to-act with undo, offline queues, or Dynamic Type/`sp` reflow.
72
+ - Read [references/swiftui.md](references/swiftui.md) when building SwiftUI iOS/iPadOS/watchOS-adjacent apps, iOS 26 Liquid Glass chrome, iOS 18–26 declarative Apple APIs, or The Composable Architecture (TCA).
73
+ - Read [references/uikit.md](references/uikit.md) when maintaining or building imperative UIKit apps, `UIGlassEffect`, `UIHostingConfiguration`, or Swift 6 `@MainActor` view controllers.
74
+ - Read [references/jetpack-compose.md](references/jetpack-compose.md) when building Android Compose UI, Material 3 Expressive, Android 15/16 edge-to-edge, Predictive Back, Navigation 3, or `TextFieldState`.
75
+ - Read [references/flutter.md](references/flutter.md) when building Flutter/Dart mobile or embedded UI with Impeller, Cupertino adaptive controls, GoRouter, or Riverpod 3.
76
+ - Read [references/react-native-expo.md](references/react-native-expo.md) when building React Native New Architecture or Expo SDK 52–54+ apps with Expo Router, Uniwind/Unistyles/NativeWind, Reanimated 4, Skia, or FlashList v2.
77
+ - Read [references/lynxjs.md](references/lynxjs.md) when building Lynx / LynxJS (`@lynx-js/react`, `@lynx-js/rspeedy`) dual-threaded native mobile UI.
78
+ - Read [references/kotlin-multiplatform.md](references/kotlin-multiplatform.md) when sharing business logic via KMP/SKIE or sharing UI via Compose Multiplatform (iOS Stable 1.8+, Android, Desktop, Wasm).
79
+ - Read [references/nativescript-and-skip.md](references/nativescript-and-skip.md) when building native cross-platform mobile apps with NativeScript (JS/TS direct native APIs) or Skip (`skip.tools` Swift/SwiftUI to Android Compose).
80
+ - Read [references/harmonyos-and-emerging-mobile.md](references/harmonyos-and-emerging-mobile.md) when building HarmonyOS ArkUI/ArkTS apps, Elixir LiveView Native (SwiftUI/Compose over Phoenix), or cross-mini-app Taro / uni-app interfaces.
81
+ - Read [references/ionic-capacitor.md](references/ionic-capacitor.md) when building Ionic 7/8 or Capacitor 6–8 hybrid apps (including Capacitor without Ionic).
82
+ - Read [references/dotnet-maui.md](references/dotnet-maui.md) when building .NET MAUI (`net9.0`/`net10.0`), Blazor Hybrid, or `HybridWebView` mobile/desktop apps.
83
+ - Read [references/flet.md](references/flet.md) when building Python Flet (`0.25–1.0`) cross-platform mobile/desktop UI.
84
+ - Read [references/kivy.md](references/kivy.md) when building Python Kivy or KivyMD cross-platform apps packaged with Buildozer or `kivy-ios`.
68
85
 
69
86
  For watchOS/Wear OS wearables and tvOS/10-foot living-room surfaces, use `pixelcraft-constrained` as the primary surface skill alongside framework idioms here; for visionOS/XR spatial surfaces, use `pixelcraft-spatial`.
@@ -2,62 +2,90 @@
2
2
 
3
3
  ## Token mapping
4
4
 
5
- Map generated values into XAML resource dictionaries, semantic styles, and platform resources:
5
+ Define semantic colors, spacing, and styles once in XAML `ResourceDictionary` files and pair them with **`{AppThemeBinding Light=..., Dark=...}`** (or dynamic theme dictionaries) so light, dark, and high-contrast themes resolve cleanly without inline hex literals:
6
6
 
7
7
  ```xml
8
- <Color x:Key="SemanticAction">#0074ca</Color>
9
- <Style TargetType="Button" x:Key="PrimaryAction">
10
- <Setter Property="BackgroundColor" Value="{StaticResource SemanticAction}" />
11
- </Style>
8
+ <ResourceDictionary xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
9
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
10
+ <Color x:Key="ActionLight">#0074CA</Color>
11
+ <Color x:Key="ActionDark">#5BB2FF</Color>
12
+ <Color x:Key="SurfaceLight">#FFFFFF</Color>
13
+ <Color x:Key="SurfaceDark">#121417</Color>
14
+
15
+ <Style TargetType="Button" x:Key="PrimaryActionButton">
16
+ <Setter Property="BackgroundColor"
17
+ Value="{AppThemeBinding Light={StaticResource ActionLight}, Dark={StaticResource ActionDark}}" />
18
+ <Setter Property="MinimumHeightRequest" Value="48" />
19
+ </Style>
20
+ </ResourceDictionary>
12
21
  ```
13
22
 
14
- Use dynamic resources/theme dictionaries for dark/light/high-contrast behavior. Do not copy raw colors through pages.
15
-
16
- ## Layout and responsive idioms
17
-
18
- Use MAUI layouts (`Grid`, `VerticalStackLayout`, `CollectionView`, shells/flyout/tab/navigation) with platform idioms. Shell navigation is not automatically correct information architecture. Respect safe areas, orientation, desktop/mobile multi-target differences, keyboard/system navigation, and platform back semantics.
19
-
20
- ## Typography/custom fonts
21
-
22
- Register fonts during app startup/resource setup and map semantic font styles. Support platform font scaling where expected. Avoid fixed-height labels that clip localized/expanded text; measure actual device scaling.
23
-
24
- ## Motion/reduced motion
25
-
26
- Use MAUI animation APIs intentionally. Platform reduced-motion settings require platform-specific verification/abstraction; do not assume one universal cross-platform hook. Keep animations cancellable and nonblocking.
27
-
28
- ## Accessibility specifics
23
+ Enable compiled bindings (`x:DataType="vm:InvoiceViewModel"`) on every page and `DataTemplate` so binding typos fail at compile time rather than silently failing at runtime.
24
+
25
+ ## Layout, handlers, hybrid surfaces, & desktop chrome
26
+
27
+ - Use `Grid`, `VerticalStackLayout`, `HorizontalStackLayout`, `FlexLayout`, and `Shell` intentionally; Shell's default flyout/tabs are not automatically the right IA for every app. Respect iOS safe areas (`ios:Page.UseSafeArea="True"`), Android edge-to-edge insets, and platform back behavior.
28
+ - **`CollectionViewHandler2`** (.NET 9/10 iOS & Mac Catalyst): use the modernized `UICollectionView`-backed handler (`ConfigureMauiHandlers` on .NET 9 or default on .NET 10) to avoid legacy scroll-sizing, header/footer, and cell-recycling glitches in `CollectionView`.
29
+ - **Desktop `TitleBar` (.NET 9+)**: on Windows and Mac Catalyst, use the native `Window.TitleBar` control (`TitleBar` with `LeadingContent`, `Content`, `TrailingContent`, and `PassthroughElements`) instead of hacking frameless windows or hiding system window buttons.
30
+ - **Hybrid web targets**:
31
+ - Use **`BlazorWebView`** (Blazor Hybrid) to share Razor components across mobile, desktop, and web with native C# access.
32
+ - Use **`HybridWebView`** (.NET 9+) to host existing JS/HTML/CSS SPAs (React/Vue/Svelte) inside MAUI with structured bidirectional JS↔C# `InvokeJavaScriptAsync` / `SendRawMessage` interop.
33
+
34
+ ## State management (`CommunityToolkit.Mvvm` & `CommunityToolkit.Maui`)
35
+
36
+ Adopt **`CommunityToolkit.Mvvm`** (`[ObservableProperty]`, `[RelayCommand(IncludeCancelCommand = true)]`, `ObservableObject`) for zero-reflection source-generated MVVM with explicit cancellation, and **`CommunityToolkit.Maui`** for production behaviors, popups, status-bar styling, converters, and animations:
37
+
38
+ ```csharp
39
+ public partial class InvoiceViewModel(IInvoiceService service) : ObservableObject
40
+ {
41
+ [ObservableProperty] private bool isBusy;
42
+ [ObservableProperty] private string? errorMessage;
43
+
44
+ [RelayCommand(IncludeCancelCommand = true)]
45
+ private async Task SaveAsync(CancellationToken ct)
46
+ {
47
+ ErrorMessage = null;
48
+ IsBusy = true;
49
+ try { await service.SaveAsync(ct); }
50
+ catch (OperationCanceledException) { }
51
+ catch (Exception ex) { ErrorMessage = ex.Message; }
52
+ finally { IsBusy = false; }
53
+ }
54
+ }
55
+ ```
29
56
 
30
- Use SemanticProperties (`SemanticProperties.Description`, HeadingLevel where applicable), automation properties/platform accessibility metadata, focus/keyboard behavior, visible focus/target size. Test TalkBack/VoiceOver/Narrator depending target; shared XAML does not guarantee equivalent accessibility trees.
57
+ Never fire unawaited `async void` mutations from button clicks.
31
58
 
32
- ## States idiom
59
+ ## Typography, motion, accessibility, & forms idioms
33
60
 
34
- Use MVVM state explicitly rather than boolean soup: loading/refreshing/empty/error/offline/permission/optimistic. Handle lifecycle/resume/process recreation and navigation parameters. Collection virtualization/reuse can leak visual state if bindings/converters are wrong.
61
+ Register custom fonts via `ConfigureFonts(...)` in `MauiProgram.cs` and keep `FontAutoScalingEnabled="True"` on essential text; avoid fixed `HeightRequest` on labels that clip at `200%` font scale.
35
62
 
36
- ## Forms idiom
63
+ MAUI animations (`FadeTo`, `TranslateTo`) do not automatically query every OS reduced-motion flag—abstract reduced motion per platform (`UIAccessibility.IsReduceMotionEnabled` on iOS, `ANIMATOR_DURATION_SCALE` on Android, `UISettings.AnimationsEnabled` on Windows) and cancel in-flight animations on `OnDisappearing`.
37
64
 
38
- Use correct keyboard, entry/editor behaviors, return type, validation timing, input preservation, focus order, paste/autofill/platform capabilities, and clear error recovery. Do not implement validation only through red borders without text.
65
+ Set `SemanticProperties.Description`, `SemanticProperties.Hint` (sparingly), and `SemanticProperties.HeadingLevel` on interactive and structural controls, and test TalkBack, VoiceOver, and Narrator separately—shared XAML does not guarantee equivalent native accessibility trees. In forms, configure `Keyboard`, `ReturnType`, focus order, validation after completion with text recovery copy (not red borders alone), and preserve input across navigation.
39
66
 
40
67
  ## Do/don't pairs
41
68
 
42
69
  | Do | Don't |
43
70
  |---|---|
44
- | real `Button` with command/accessibility metadata | tap gesture on a label as primary control |
45
- | resource dictionary semantic colors | inline hex duplicated across pages |
46
- | explicit VM async state and cancellation | hidden fire-and-forget async void mutation |
47
- | Shell/platform back behavior verification | modal/navigation stack hacks that trap users |
48
- | platform-specific accessibility testing | assuming shared XAML semantics are enough |
71
+ | `{AppThemeBinding Light=..., Dark=...}` + `x:DataType` compiled bindings | Inline hex literals and untyped runtime-only bindings |
72
+ | `[RelayCommand(IncludeCancelCommand = true)]` via `CommunityToolkit.Mvvm` | Fire-and-forget `async void` event handlers with silent failures |
73
+ | `CollectionViewHandler2` on iOS/Mac Catalyst for complex lists | Ship legacy iOS `CollectionView` layout glitches without profiling |
74
+ | Native `Window.TitleBar` on Windows/Mac Catalyst (.NET 9+) | Custom borderless titlebar hacks missing drag or window buttons |
75
+ | `SemanticProperties.Description` & `HeadingLevel` verified per OS | Tap gesture recognizer on a `Label` masquerading as a button |
49
76
 
50
77
  ## Known traps
51
78
 
52
- Handler/platform differences, XAML binding errors visible only at runtime, async void lifecycle bugs, collection virtualization state leakage, navigation stack confusion, font scaling clipping, inconsistent safe-area behavior, accessibility metadata varying across targets.
79
+ EOL target frameworks (`net8.0-*`—upgrade to `net9.0-*` or `net10.0-*`), silent XAML binding errors without `x:DataType`, `async void` crash/lifecycle leaks, legacy iOS `CollectionView` measurement glitches, fixed-height clipping under font scaling, platform-divergent safe-area insets on Android 15/16, unverified accessibility trees across iOS/Android/Windows.
53
80
 
54
81
  ## Verification commands
55
82
 
56
83
  ```sh
57
84
  dotnet build
58
85
  dotnet test
59
- dotnet build -t:Run -f net8.0-android 2>/dev/null || true
60
- dotnet build -t:Run -f net8.0-ios 2>/dev/null || true
86
+ # Run target platform builds when matching workloads & simulators/emulators are installed:
87
+ dotnet build -t:Run -f net9.0-android # or net10.0-android
88
+ dotnet build -t:Run -f net9.0-ios # or net10.0-ios
61
89
  ```
62
90
 
63
- Use device/emulator/simulator inspection, Narrator/TalkBack/VoiceOver, font scaling, dark/high contrast, orientation/resizing, offline state, and platform back/gesture testing as evidence.
91
+ `dotnet build` and `dotnet test` provide `static` evidence. Inspect real Android/iOS/Windows/Mac Catalyst runs with TalkBack/VoiceOver/Narrator, Dark Mode, High Contrast, font scaling, orientation/resize, and offline recovery for `rendered` evidence; label unavailable targets `not-checked`.
@@ -2,52 +2,79 @@
2
2
 
3
3
  ## Token mapping
4
4
 
5
- Configure page/theme objects rather than styling every control ad hoc. Current Flet commonly uses `page.theme = ft.Theme(...)` and color-scheme-related properties; verify exact constructor against the installed version. Keep generated Python constants in a semantic module and map them once into theme/control styles.
6
-
7
- ## Layout and responsive idioms
8
-
9
- Use controls/containers/rows/columns/views/routes/expansion behavior according to app/window model. Flet can target desktop/web/mobile-like surfaces; do not assume browser DOM or mobile platform conventions automatically apply. Handle resize/orientation/window dimensions explicitly.
10
-
11
- ## Typography/custom fonts
12
-
13
- Register/configure fonts and text styles deliberately. Verify fallback/glyph coverage and scaling. Fixed-size containers must not clip localized or scaled copy without intentional overflow behavior.
5
+ Store semantic colors, spacing, and typography roles in a Python module and wire them into `page.theme` and `page.dark_theme` (`ft.Theme` + `ft.ColorScheme`) once rather than passing hex literals to every control. Flet 0.25–1.0 evolved rapidly (introducing declarative `@ft.component` + hooks in 1.0 alongside imperative `page.add` / `page.update` in 0.25–0.28); inspect the installed `flet` version before choosing constructor names.
6
+
7
+ ```python
8
+ import flet as ft
9
+
10
+ class PcTokens:
11
+ ACTION = "#0074CA"
12
+ CONTROL_INLINE = 12
13
+
14
+ # Declarative idiom (Flet 1.0+):
15
+ @ft.component
16
+ def InvoiceActions(on_save):
17
+ saving, set_saving = ft.use_state(False)
18
+ return ft.SafeArea(
19
+ ft.Column(
20
+ spacing=PcTokens.CONTROL_INLINE,
21
+ controls=[
22
+ ft.FilledButton(
23
+ "Save invoice" if not saving else "Saving...",
24
+ disabled=saving,
25
+ on_click=lambda _: (set_saving(True), on_save()),
26
+ ),
27
+ ],
28
+ )
29
+ )
30
+
31
+ def main(page: ft.Page):
32
+ page.adaptive = True # renders Cupertino controls on iOS/macOS, Material on Android/Windows/Linux
33
+ page.theme = ft.Theme(color_scheme_seed=PcTokens.ACTION)
34
+ page.theme_mode = ft.ThemeMode.SYSTEM
35
+ page.render(lambda: InvoiceActions(on_save=lambda: None))
36
+ ```
14
37
 
15
- ## Motion/reduced motion
38
+ ## Layout, adaptive controls, & SafeArea
16
39
 
17
- Use animation/transition properties purposefully and keep durations semantic. Platform reduced-motion behavior depends on target/host; expose an app-level reduced-motion setting if system integration is uncertain. Never rely on motion alone for state.
40
+ - Always wrap top-level mobile screens in **`ft.SafeArea(...)`** so notches, Dynamic Island, status bars, and gesture navigation bars do not clip content or bottom actions.
41
+ - Enable **`page.adaptive = True`** (or opt into `ft.CupertinoButton`, `ft.CupertinoNavigationBar`, `ft.CupertinoAlertDialog`, `ft.CupertinoSlidingSegmentedButton` explicitly on Apple targets) so iOS/macOS users do not receive foreign Material chrome.
42
+ - Handle window/viewport resizing (`page.on_resized`) explicitly because Flet renders via Flutter across iOS, Android, macOS, Windows, Linux, and Web—do not freeze one desktop wireframe across every target.
18
43
 
19
- ## Accessibility specifics
44
+ ## Typography, motion, & reduced motion
20
45
 
21
- Use semantic properties/labels/tooltips only as appropriate and inspect actual target behavior. Keyboard focus/traversal and screen-reader support vary by surface/version; custom-painted/control-heavy UI needs explicit verification. Do not fake buttons with gesture-only containers.
46
+ Register custom font files via `page.fonts = {"Brand": "/fonts/Brand.ttf"}` and verify glyph coverage and fallback fonts on the actual target OS. Avoid fixed pixel `height` on text containers so localized or scaled copy does not clip.
22
47
 
23
- ## States idiom
48
+ Keep `animate`, `animate_opacity`, and `animate_position` durations brief and interruptible. Because system reduced-motion forwarding varies across Flutter/Flet hosts, expose an app-level reduced-motion toggle when animations carry motion and never use animation as the sole state cue.
24
49
 
25
- Understand page/update lifecycle and control tree ownership. Model loading/error/empty/offline/permission/background-task states explicitly. Async tasks need cancellation/error propagation and duplicate-submit protection. Preserve control values through route/navigation/session behavior.
50
+ ## Accessibility, states, & forms idioms
26
51
 
27
- ## Forms idiom
52
+ Use real interactive controls (`FilledButton`, `IconButton`, `Switch`, `Checkbox`, `TextField`) with `tooltip`, `label`, and `semantics_label` (`ft.Semantics`) rather than wrapping styled `ft.Text` in `ft.GestureDetector` or clickable `ft.Container`. Verify keyboard Tab order and VoiceOver/TalkBack/Narrator output on the shipped platform.
28
53
 
29
- Use labeled text fields/dropdowns/checkboxes, validation timing after completion/submit, focus traversal, correct keyboard/input behavior where exposed, paste/autofill capability verification, and input preservation across route changes.
54
+ Model async state (`loading`, `empty`, `error`, `offline`) explicitly via reactive state or page controls with cancellation and duplicate-submit guards—never launch untracked `asyncio.create_task` loops that mutate detached controls. In forms, pair `ft.TextField` with persistent `label`, `keyboard_type`, `error_text` validated after completion/submit, and draft preservation across `page.views` / route changes.
30
55
 
31
56
  ## Do/don't pairs
32
57
 
33
58
  | Do | Don't |
34
59
  |---|---|
35
- | one semantic theme module | raw color/style constants repeated through controls |
36
- | real button/control semantics | clickable/gesture container as fake primary action |
37
- | explicit async task error/cancel state | fire-and-forget background work with silent failure |
38
- | resize-aware adaptive layout | fixed desktop wireframe scaled to every target |
39
- | preserve form draft through navigation | reconstructing blank controls on every route change |
60
+ | Centralize tokens in `page.theme` / `page.dark_theme` + `ft.SafeArea` | Scatter raw hex strings and forget safe-area padding on iOS/Android |
61
+ | Enable `page.adaptive = True` or `ft.Cupertino*` on Apple surfaces | Ship identical Material-only dialogs and controls to iOS users |
62
+ | Use real `ft.FilledButton` / `ft.IconButton` + `ft.Semantics` | Build primary actions from `ft.Container(on_click=...)` with no semantics |
63
+ | Track async tasks cleanly and guard against double-submit | Fire unawaited background coroutines that fail silently or race |
64
+ | Preserve form values in state across route transitions | Re-instantiate blank `ft.TextField` controls on every route push |
40
65
 
41
66
  ## Known traps
42
67
 
43
- Version API churn, update batching/lifecycle confusion, control duplication, unclear async ownership, platform capability differences, font/glyph coverage, accessibility uncertainty, desktop/web behavior divergence.
68
+ API differences between Flet 0.25–0.28 imperative apps and Flet 1.0 declarative `@ft.component` apps, forgetting `ft.SafeArea` on Android 15/16 edge-to-edge or notched iPhones, packaging failures in `flet build` when native Python C-extensions are not compiled for mobile ABIs, missing `page.update()` in imperative mode, unverified screen-reader trees on target OS.
44
69
 
45
70
  ## Verification commands
46
71
 
47
72
  ```sh
48
- flet run app.py 2>/dev/null || python app.py
49
- python -m pytest
50
73
  python -m compileall .
74
+ python -m pytest
75
+ # Interactive run and mobile/desktop packaging (requires Flutter SDK for flet build):
76
+ flet run app.py
77
+ flet build apk # or: flet build ipa / flet build macos / flet build linux
51
78
  ```
52
79
 
53
- Inspect the actual target surface (browser/desktop/device). Python tests are state evidence only unless they drive the rendered target.
80
+ `compileall` and `pytest` provide `static` / logic evidence only. Inspect actual `flet run` and packaged `flet build` outputs on target devices/OSes for safe areas, adaptive Cupertino/Material parity, dark mode, text scaling, and screen-reader behavior (`rendered`; label untested platforms `not-checked`).
@@ -1,69 +1,113 @@
1
1
  # Flutter
2
2
 
3
- Evidence: current Flutter docs confirm `MediaQuery.disableAnimationsOf(context)` corresponds to Android Remove animations; iOS reduce motion is exposed separately through accessibility features/reduceMotion in newer APIs.
4
-
5
3
  ## Token mapping
6
4
 
7
- Map generated Dart constants into `ColorScheme`, `ThemeData`, text theme, extensions, and component themes:
5
+ Map DTCG tokens into `ColorScheme`, `ThemeData`, `TextTheme`, component themes, and typed `ThemeExtension` subclasses for semantic roles outside Material defaults (spacing, semantic status surfaces, radii):
8
6
 
9
7
  ```dart
10
- final theme = ThemeData(
11
- colorScheme: ColorScheme.fromSeed(seedColor: PixelcraftTokens.colorBrand),
8
+ @immutable
9
+ class PcSpacing extends ThemeExtension<PcSpacing> {
10
+ const PcSpacing({required this.controlInline, required this.sectionGap});
11
+ final double controlInline;
12
+ final double sectionGap;
13
+
14
+ @override
15
+ PcSpacing copyWith({double? controlInline, double? sectionGap}) => PcSpacing(
16
+ controlInline: controlInline ?? this.controlInline,
17
+ sectionGap: sectionGap ?? this.sectionGap,
18
+ );
19
+
20
+ @override
21
+ PcSpacing lerp(PcSpacing? other, double t) => other == null
22
+ ? this
23
+ : PcSpacing(
24
+ controlInline: lerpDouble(controlInline, other.controlInline, t)!,
25
+ sectionGap: lerpDouble(sectionGap, other.sectionGap, t)!,
26
+ );
27
+ }
28
+
29
+ final lightTheme = ThemeData(
30
+ colorScheme: ColorScheme.fromSeed(seedColor: PcTokens.brandSeed),
31
+ extensions: const [PcSpacing(controlInline: 12, sectionGap: 20)],
12
32
  );
13
33
  ```
14
34
 
15
- Prefer explicit semantic `ThemeExtension` when roles exceed Material defaults. Do not copy raw hex/dimensions into widgets.
35
+ Never scatter raw `Color(0xff…)` or hard-coded padding numbers across widgets.
16
36
 
17
- ## Layout and responsive idioms
37
+ ## Rendering engine (Impeller) & platform adaptation
18
38
 
19
- Use constraints, `LayoutBuilder`, flexible/expanded, safe area, media query size/orientation/text scaler, slivers only when needed, and adaptive navigation scaffolds. Flutter renders consistently across platforms, but platform conventions still differ—do not force identical navigation/back idioms everywhere.
39
+ - **Impeller** is Flutter's default renderer on iOS and Android (API 29+ via Vulkan with OpenGLES fallback on older/unsupported GPUs), eliminating Skia shader-compilation jank. Still profile custom fragment shaders, backdrop blurs, and heavy `saveLayer` clipping on mid-tier Android hardware rather than assuming desktop/simulator frame pacing.
40
+ - Respect host platform conventions rather than forcing identical chrome on iOS and Android: use adaptive widgets (`Switch.adaptive`, `Slider.adaptive`, `CircularProgressIndicator.adaptive`, `AlertDialog.adaptive`), iOS-idiomatic **`CupertinoSheetRoute` / `showCupertinoSheet`** for stacked modal sheets on Apple devices, and Material navigation/predictive back on Android.
20
41
 
21
- ## Typography/custom fonts
42
+ ## Navigation (`GoRouter`) & state (`Riverpod 3`)
22
43
 
23
- Declare fonts/assets/pubspec correctly and map text theme roles. Respect `TextScaler`/system scaling; do not fixed-height clip essential text. Include glyph coverage for localization or configure fallback fonts deliberately.
44
+ - Use **`GoRouter`** with **`StatefulShellRoute.indexedStack`** for persistent multi-tab state, typed deep-link routes, redirect guards, and Android predictive back integration:
24
45
 
25
- ## Motion/reduced motion
46
+ ```dart
47
+ StatefulShellRoute.indexedStack(
48
+ builder: (context, state, navShell) => AppShell(navigationShell: navShell),
49
+ branches: [
50
+ StatefulShellBranch(routes: [GoRoute(path: '/invoices', builder: (_, __) => const InvoicesScreen())]),
51
+ StatefulShellBranch(routes: [GoRoute(path: '/settings', builder: (_, __) => const SettingsScreen())]),
52
+ ],
53
+ );
54
+ ```
26
55
 
27
- Use implicit/explicit animations purposefully. Check `MediaQuery.disableAnimationsOf(context)` for explicit/custom animations and respect reduce-motion platform signals where exposed in current Flutter version. Keep animation controllers disposed/cancelled and never block interaction unnecessarily.
56
+ - Model async state explicitly (`AsyncValue` / sealed state) with **`Riverpod 3`** (`@riverpod` codegen, built-in retry/offline persistence primitives, automatic `Ref` disposal) or your project's established `Bloc`/`ValueNotifier` architecture. Never rely on uncoordinated boolean flags (`isLoading && !hasError`).
28
57
 
29
- ## Accessibility specifics
58
+ ## Typography, accessibility, & reduced motion
30
59
 
31
- Use `Semantics`, labels/hints/values, live region flags where appropriate, focus/traversal order, correct button/text-field semantics, and exclude decorative nodes. Test TalkBack/VoiceOver because material-looking widgets can still produce incorrect semantic trees. Target baseline follows platform: 48dp Android/44pt iOS expectations where applicable.
60
+ Declare font families in `pubspec.yaml` with localization fallbacks. Read platform scaling, contrast, and motion preferences explicitly through `MediaQuery` and `AccessibilityFeatures`:
32
61
 
33
- ## States idiom
62
+ ```dart
63
+ final textScaler = MediaQuery.textScalerOf(context);
64
+ final highContrast = MediaQuery.highContrastOf(context);
65
+ final reduceMotion =
66
+ MediaQuery.disableAnimationsOf(context) ||
67
+ View.of(context).platformDispatcher.accessibilityFeatures.reduceMotion;
68
+ final largeText = textScaler.scale(16) >= 24;
69
+ ```
34
70
 
35
- Use explicit state management ownership (`ValueNotifier`, Riverpod/Bloc/etc. per project) and immutable async state: loading/refreshing/data-empty/data-partial/error/offline/optimistic. Preserve scroll/input state through keys/restoration. Golden tests can validate states, but only if fixtures represent real data lengths/errors.
71
+ - Reflow horizontal label/value rows into `Column` layouts when `largeText` is true rather than clipping in fixed-height `SizedBox` containers.
72
+ - Dispose every `AnimationController` and skip non-essential spatial transitions when `reduceMotion` is true.
73
+ - Wrap custom visuals with `Semantics(label:, button:, liveRegion:)` and exclude decorative icons with `ExcludeSemantics`. Maintain ≥ `48×48 dp` (Android) / `44×44 pt` (iOS) targets (`kMinInteractiveDimension`). Verify semantic trees in TalkBack and VoiceOver.
36
74
 
37
- ## Forms idiom
75
+ ## Forms, restoration & 2026 store gates
38
76
 
39
- Use `Form`/`TextFormField`, correct keyboard type/text input action/autofill hints/input formatters, focus nodes, validation timing, and input preservation. Do not validate aggressively on every keystroke or clear controllers during rebuild/navigation.
77
+ Use `Form` + `TextFormField` with explicit `keyboardType`, `textInputAction`, `autofillHints` (`AutofillHints.email`, etc.), `FocusNode` traversal, `ScrollViewKeyboardDismissBehavior.onDrag` for interactive keyboard dismissal, and `AutovalidateMode.onUnfocus` (or on-submit) so errors do not scold mid-keystroke.
78
+
79
+ - **OS process-death restoration**: set `restorationScopeId: 'app'` on `MaterialApp.router` / `CupertinoApp.router` and persist active tab/route and unsent form inputs with `RestorationMixin` (`RestorableTextEditingController`, `RestorableInt`) or Riverpod persisted storage so `adb shell am kill` and iOS RAM eviction never wipe active tasks.
80
+ - **`120fps` ProMotion & `< 1.2 s` cold start**: enable `<key>CADisableMinimumFrameDurationOnPhone</key><true/>` in `ios/Runner/Info.plist` so Impeller drives `120 Hz` ProMotion (`< 8.33 ms`/frame), seed release gestures into `SpringSimulation(..., velocity)`, and defer heavy plugin init past `runApp()`.
81
+ - **2026 App Store & Google Play compliance**:
82
+ - **iOS**: build with **Xcode 26 SDK**, ship `PrivacyInfo.xcprivacy` (auditing every CocoaPod/SPM plugin's privacy manifest), store tokens solely in Keychain via `flutter_secure_storage` (never `shared_preferences`), offer **Sign in with Apple** parity whenever social login exists, wire real **in-app Account Deletion**, and use zero-permission system photo pickers (`image_picker` PHPicker / Android Photo Picker).
83
+ - **Android**: target **`targetSdk = 36`** (`.aab`), call `SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge)` while consuming `MediaQuery.paddingOf(context)` / `viewInsetsOf(context)`, keep `sw >= 600dp` tablets/foldables unlocked across orientations/postures, enable Predictive Back (`android:enableOnBackInvokedCallback="true"` + `PopScope`), store secrets in Android Keystore (`flutter_secure_storage`), and compile all FFI/plugin native `.so` binaries with **NDK r28+** (`16 KB` ELF page alignment verified via `zipalign -c -P 16`).
84
+
85
+ ## Flutter web (WasmGC / Skwasm) note
86
+
87
+ Flutter 3.29 removed the legacy HTML renderer; Flutter Web now compiles to **WasmGC (`Skwasm`)** (`flutter build web --wasm`) or CanvasKit (`JS`). Canvas-rendered web apps require explicit `SemanticsBinding.instance.ensureSemantics()` / accessibility verification and still trade off native browser text selection, bundle startup size, and SEO. For browser-dominant or content/SEO products, apply `pixelcraft-web` verification and compare a DOM-rendered alternative in `pixelcraft-plan` before committing.
40
88
 
41
89
  ## Do/don't pairs
42
90
 
43
91
  | Do | Don't |
44
92
  |---|---|
45
- | `FilledButton(onPressed: save, child: Text('Save invoice'))` | `GestureDetector` around styled text as primary control |
46
- | check `MediaQuery.disableAnimationsOf(context)` for custom motion | assuming the compiler removes motion automatically |
47
- | semantic `ThemeExtension` roles | raw `Color(0xff...)` scattered through widgets |
48
- | stable keys/scroll controllers for stateful lists | rebuild-dependent scroll/focus loss |
49
- | `TextFormField(autofillHints: [AutofillHints.email])` | custom keyboard/paste-blocking behavior |
50
-
51
- ## Flutter web note
52
-
53
- Flutter can target web, but choose rendering mode deliberately. Canvas-heavy Flutter web does not automatically provide normal browser semantics, text selection, SEO, deep-link behavior, or accessibility parity. For browser-dominant products, apply `pixelcraft-web` verification and compare a DOM/server-rendered alternative in `pixelcraft-plan` before committing.
93
+ | `FilledButton(onPressed: save, child: const Text('Save invoice'))` | `GestureDetector` wrapping styled `Text` as a primary control |
94
+ | Check both `MediaQuery.disableAnimationsOf(context)` and `accessibilityFeatures.reduceMotion` | Assume Flutter disables custom `AnimationController` loops automatically |
95
+ | Set `CADisableMinimumFrameDurationOnPhone = true`, `targetSdk = 36`, NDK r28+ (`16 KB` `.so`), and `flutter_secure_storage` | Cap ProMotion at `60fps`, ship `4 KB`-aligned `.so` plugins, or store auth tokens in `shared_preferences` |
96
+ | Wire `restorationScopeId` + `RestorationMixin`, `PrivacyInfo.xcprivacy`, and real in-app Account Deletion | Lose form drafts on `adb shell am kill` or punt account deletion to a support email |
97
+ | `StatefulShellRoute.indexedStack` + `Switch.adaptive` / `CupertinoSheetRoute` | Rebuild tab roots on every tap or force identical Android dialogs onto iOS |
54
98
 
55
99
  ## Known traps
56
100
 
57
- Build context after async gaps, controller lifecycle leaks, fixed pixel design across densities/text scaling, platform back/navigation mismatch, nested scrollables, semantic tree mismatch, golden-test brittleness, font licensing/glyph coverage, treating identical cross-platform rendering as identical platform UX.
101
+ Using `BuildContext` across `async` gaps without `context.mounted` checks, `AnimationController`/`TextEditingController` disposal leaks, fixed-height `Container` clipping `TextScaler` at `200%`, outdated FFI plugins bundling `4 KB`-aligned Android `.so` binaries, storing tokens in `shared_preferences`, missing `Semantics` labels on custom `CustomPainter` views, brittle golden tests using fake single-word fixtures.
58
102
 
59
103
  ## Verification commands
60
104
 
61
105
  ```sh
62
106
  flutter analyze
63
107
  flutter test
64
- flutter test --update-goldens # only intentionally
65
- flutter run -d <device>
66
- flutter build apk 2>/dev/null || true
108
+ flutter build appbundle --release
109
+ # Verify 16 KB native library alignment on Android release artifact:
110
+ zipalign -c -P 16 -v 4 build/app/outputs/flutter-apk/app-release.apk
67
111
  ```
68
112
 
69
- Use widget/golden tests, device/emulator screenshots, accessibility scanner/TalkBack/VoiceOver, text scaling, dark mode, orientation, offline/slow network, and platform back/gesture inspection as evidence.
113
+ `flutter analyze`, unit/widget tests, and `zipalign -c -P 16` are `static` evidence. Inspect real iOS (`>= 2`) and Android (`>= 3` across Pixel + OEM skins) devices across TalkBack/VoiceOver, `TextScaler` `200%`, Dark Mode, High Contrast, Reduce Motion, `adb shell am kill` restoration, and predictive/swipe back for `rendered` evidence; label untested targets `not-checked`.