@thanhnguyxn/pixelcraft 0.0.0-stage → 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 (455) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/.antigravity-plugin/plugin.json +32 -0
  3. package/.claude-plugin/marketplace.json +20 -0
  4. package/.claude-plugin/plugin.json +22 -0
  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/LICENSE +21 -0
  13. package/README.md +264 -2
  14. package/SECURITY.md +28 -0
  15. package/assets/README.md +28 -0
  16. package/assets/pixelcraft-logo-128.png +0 -0
  17. package/assets/pixelcraft-logo-256.png +0 -0
  18. package/assets/pixelcraft-logo-512.png +0 -0
  19. package/bin/pixelcraft.mjs +852 -0
  20. package/docs/ARCHITECTURE.md +105 -0
  21. package/docs/DESIGN-RATIONALE.md +191 -0
  22. package/docs/INSTALL.md +221 -0
  23. package/evals/README.md +37 -0
  24. package/evals/fixtures/3d-web-engineering.json +69 -0
  25. package/evals/fixtures/README.md +36 -0
  26. package/evals/fixtures/acceptance-checklist-rule03-gate.json +43 -0
  27. package/evals/fixtures/ai-ui-libraries.json +53 -0
  28. package/evals/fixtures/audio-visual-accessibility.json +69 -0
  29. package/evals/fixtures/auth-and-checkout-ui.json +53 -0
  30. package/evals/fixtures/brandkit-identity-governance.json +48 -0
  31. package/evals/fixtures/build-and-architecture.json +53 -0
  32. package/evals/fixtures/canvas-and-node-editors.json +53 -0
  33. package/evals/fixtures/chat-ai-exfiltration-ime-hitl-gate.json +43 -0
  34. package/evals/fixtures/completion-gate-scan-until-clean.json +44 -0
  35. package/evals/fixtures/component-systems.json +53 -0
  36. package/evals/fixtures/component-testing.json +53 -0
  37. package/evals/fixtures/constrained-voice-and-tv.json +43 -0
  38. package/evals/fixtures/creative-code-rendering.json +69 -0
  39. package/evals/fixtures/creative-reference-evidence.json +67 -0
  40. package/evals/fixtures/data-app-python-marimo.json +49 -0
  41. package/evals/fixtures/desktop-cpp-juce-audio.json +49 -0
  42. package/evals/fixtures/desktop-csharp-avalonia.json +49 -0
  43. package/evals/fixtures/desktop-native-workspace.json +48 -0
  44. package/evals/fixtures/desktop-python-anti-tkinter.json +49 -0
  45. package/evals/fixtures/direction-prototype-complexity.json +29 -0
  46. package/evals/fixtures/document-prepress-pdfx4-tounicode.json +43 -0
  47. package/evals/fixtures/document-rust-typst-invoice.json +49 -0
  48. package/evals/fixtures/document-typst-and-print-css.json +43 -0
  49. package/evals/fixtures/email-mjml-dark-mode.json +49 -0
  50. package/evals/fixtures/email-outlook-and-plaintext.json +43 -0
  51. package/evals/fixtures/enterprise-data-ui.json +53 -0
  52. package/evals/fixtures/extended-tui-toolkits.json +53 -0
  53. package/evals/fixtures/extensions-mv3-and-vscode.json +43 -0
  54. package/evals/fixtures/file-upload-media-ui.json +53 -0
  55. package/evals/fixtures/finish-gate-anti-slop.json +30 -0
  56. package/evals/fixtures/forms-accessibility-negative.json +29 -0
  57. package/evals/fixtures/forms-validation.json +53 -0
  58. package/evals/fixtures/game-go-ebitengine.json +49 -0
  59. package/evals/fixtures/game-godot-gdscript.json +49 -0
  60. package/evals/fixtures/game-ui-hud-and-engines.json +43 -0
  61. package/evals/fixtures/handoff-fidelity-tolerance.json +29 -0
  62. package/evals/fixtures/i18n-engineering.json +53 -0
  63. package/evals/fixtures/local-first-sync.json +53 -0
  64. package/evals/fixtures/lynxjs.json +53 -0
  65. package/evals/fixtures/maizzle-email.json +53 -0
  66. package/evals/fixtures/maps-geospatial.json +53 -0
  67. package/evals/fixtures/media-og-and-video-export.json +43 -0
  68. package/evals/fixtures/media-players.json +53 -0
  69. package/evals/fixtures/mobile-compose-16kb-foldable-store-gate.json +44 -0
  70. package/evals/fixtures/mobile-elixir-liveview-native.json +49 -0
  71. package/evals/fixtures/mobile-flutter-dynamic-type.json +49 -0
  72. package/evals/fixtures/mobile-harmonyos-arkui.json +49 -0
  73. package/evals/fixtures/mobile-jetpack-compose.json +49 -0
  74. package/evals/fixtures/mobile-swiftui-ios.json +49 -0
  75. package/evals/fixtures/motion-engineering.json +69 -0
  76. package/evals/fixtures/pdfjs-and-pptx.json +53 -0
  77. package/evals/fixtures/plan-brownfield-evidence.json +28 -0
  78. package/evals/fixtures/plan-discovery-interview.json +31 -0
  79. package/evals/fixtures/plan-grill-me-brainstorm-gate.json +49 -0
  80. package/evals/fixtures/reactive-data-apps.json +53 -0
  81. package/evals/fixtures/review-evidence-audit.json +43 -0
  82. package/evals/fixtures/rich-text-and-code-editors.json +53 -0
  83. package/evals/fixtures/scrollytelling-resilience.json +70 -0
  84. package/evals/fixtures/spatial-xr-comfort-and-platforms.json +43 -0
  85. package/evals/fixtures/state-architecture.json +53 -0
  86. package/evals/fixtures/styling-ecosystem.json +53 -0
  87. package/evals/fixtures/token-tooling.json +53 -0
  88. package/evals/fixtures/tui-go-bubbletea.json +49 -0
  89. package/evals/fixtures/tui-rust-ratatui-grapheme-paste-teardown.json +44 -0
  90. package/evals/fixtures/tui-rust-ratatui.json +49 -0
  91. package/evals/fixtures/ux-state-matrix-and-i18n.json +43 -0
  92. package/evals/fixtures/visual-qa-task-evidence.json +29 -0
  93. package/evals/fixtures/web-3d-engines.json +53 -0
  94. package/evals/fixtures/web-php-laravel-filament.json +49 -0
  95. package/evals/fixtures/web-ruby-viewcomponent-phlex.json +49 -0
  96. package/evals/fixtures/workflow-checkpoints.json +30 -0
  97. package/evals/pixelcraft-accessibility.md +74 -0
  98. package/evals/pixelcraft-brandkit.md +58 -0
  99. package/evals/pixelcraft-chat-ui.md +55 -0
  100. package/evals/pixelcraft-constrained.md +55 -0
  101. package/evals/pixelcraft-craft.md +76 -0
  102. package/evals/pixelcraft-data-apps.md +55 -0
  103. package/evals/pixelcraft-dataviz.md +59 -0
  104. package/evals/pixelcraft-desktop.md +55 -0
  105. package/evals/pixelcraft-direction.md +77 -0
  106. package/evals/pixelcraft-document.md +55 -0
  107. package/evals/pixelcraft-email.md +55 -0
  108. package/evals/pixelcraft-extensions.md +55 -0
  109. package/evals/pixelcraft-game-ui.md +59 -0
  110. package/evals/pixelcraft-handoff.md +57 -0
  111. package/evals/pixelcraft-media.md +55 -0
  112. package/evals/pixelcraft-mobile.md +59 -0
  113. package/evals/pixelcraft-patterns.md +73 -0
  114. package/evals/pixelcraft-plan.md +127 -0
  115. package/evals/pixelcraft-review.md +63 -0
  116. package/evals/pixelcraft-spatial.md +55 -0
  117. package/evals/pixelcraft-tokens.md +57 -0
  118. package/evals/pixelcraft-tui.md +55 -0
  119. package/evals/pixelcraft-ux.md +59 -0
  120. package/evals/pixelcraft-visual-qa.md +86 -0
  121. package/evals/pixelcraft-web.md +89 -0
  122. package/evals/pixelcraft.md +70 -0
  123. package/gemini-extension.json +6 -0
  124. package/install.ps1 +341 -0
  125. package/install.sh +512 -0
  126. package/package.json +91 -4
  127. package/plugin.json +29 -0
  128. package/scripts/build-adapters.mjs +288 -0
  129. package/scripts/build-release-archives.mjs +61 -0
  130. package/scripts/build-skill-zips.mjs +94 -0
  131. package/scripts/run-evals.mjs +397 -0
  132. package/scripts/sync-docs.mjs +381 -0
  133. package/scripts/test-build-adapters.mjs +61 -0
  134. package/scripts/test-cross-platform-qa.mjs +359 -0
  135. package/scripts/test-distribution.mjs +203 -0
  136. package/scripts/test-export-tokens.mjs +361 -0
  137. package/scripts/test-finish-gate.mjs +271 -0
  138. package/scripts/test-installers.mjs +216 -0
  139. package/scripts/test-release-archives.mjs +42 -0
  140. package/scripts/test-shoot.mjs +87 -0
  141. package/scripts/test-slop-scan.mjs +416 -0
  142. package/scripts/test-style-inventory.mjs +234 -0
  143. package/scripts/test-sync-docs.mjs +140 -0
  144. package/scripts/test-validate-skills.mjs +195 -0
  145. package/scripts/validate-skills.mjs +658 -0
  146. package/skills/pixelcraft/SKILL.md +155 -0
  147. package/skills/pixelcraft/references/design-brief.md +75 -0
  148. package/skills/pixelcraft/references/floor.md +90 -0
  149. package/skills/pixelcraft/references/report-template.md +49 -0
  150. package/skills/pixelcraft/references/stack-detection.md +226 -0
  151. package/skills/pixelcraft/references/surface-acceptance.md +52 -0
  152. package/skills/pixelcraft/references/workflow-checkpoints.md +71 -0
  153. package/skills/pixelcraft-accessibility/SKILL.md +54 -0
  154. package/skills/pixelcraft-accessibility/references/apg-patterns.md +64 -0
  155. package/skills/pixelcraft-accessibility/references/motion-canvas.md +57 -0
  156. package/skills/pixelcraft-accessibility/references/platforms.md +86 -0
  157. package/skills/pixelcraft-accessibility/references/verification.md +64 -0
  158. package/skills/pixelcraft-accessibility/references/wcag22-checks.md +99 -0
  159. package/skills/pixelcraft-brandkit/SKILL.md +127 -0
  160. package/skills/pixelcraft-brandkit/references/asset-pipeline.md +165 -0
  161. package/skills/pixelcraft-brandkit/references/brand-governance.md +82 -0
  162. package/skills/pixelcraft-brandkit/references/layouts.md +88 -0
  163. package/skills/pixelcraft-brandkit/references/logo-concepting.md +83 -0
  164. package/skills/pixelcraft-brandkit/references/logo-methods.md +97 -0
  165. package/skills/pixelcraft-brandkit/references/pixel-art-logos.md +82 -0
  166. package/skills/pixelcraft-brandkit/references/prompt-template.md +87 -0
  167. package/skills/pixelcraft-brandkit/references/qa-checklist.md +93 -0
  168. package/skills/pixelcraft-brandkit/references/visual-modes.md +123 -0
  169. package/skills/pixelcraft-chat-ui/SKILL.md +57 -0
  170. package/skills/pixelcraft-chat-ui/references/agentic-workspace.md +66 -0
  171. package/skills/pixelcraft-chat-ui/references/ai-ui-libraries.md +259 -0
  172. package/skills/pixelcraft-chat-ui/references/conversation-design.md +84 -0
  173. package/skills/pixelcraft-chat-ui/references/mobile-business-platforms.md +77 -0
  174. package/skills/pixelcraft-chat-ui/references/slack-discord.md +80 -0
  175. package/skills/pixelcraft-constrained/SKILL.md +52 -0
  176. package/skills/pixelcraft-constrained/references/specialized-hardware.md +90 -0
  177. package/skills/pixelcraft-constrained/references/tv-wearables.md +134 -0
  178. package/skills/pixelcraft-constrained/references/voice-ui.md +104 -0
  179. package/skills/pixelcraft-craft/SKILL.md +58 -0
  180. package/skills/pixelcraft-craft/references/color.md +125 -0
  181. package/skills/pixelcraft-craft/references/imagery-icons.md +37 -0
  182. package/skills/pixelcraft-craft/references/layout-quality.md +65 -0
  183. package/skills/pixelcraft-craft/references/layout.md +73 -0
  184. package/skills/pixelcraft-craft/references/motion.md +163 -0
  185. package/skills/pixelcraft-craft/references/typography.md +110 -0
  186. package/skills/pixelcraft-data-apps/SKILL.md +86 -0
  187. package/skills/pixelcraft-data-apps/references/ai-and-internal-data-apps.md +147 -0
  188. package/skills/pixelcraft-data-apps/references/dash.md +109 -0
  189. package/skills/pixelcraft-data-apps/references/evidence.md +90 -0
  190. package/skills/pixelcraft-data-apps/references/gradio.md +103 -0
  191. package/skills/pixelcraft-data-apps/references/julia-genie.md +89 -0
  192. package/skills/pixelcraft-data-apps/references/jupyter-widgets.md +91 -0
  193. package/skills/pixelcraft-data-apps/references/nicegui.md +102 -0
  194. package/skills/pixelcraft-data-apps/references/observable-framework.md +105 -0
  195. package/skills/pixelcraft-data-apps/references/panel.md +99 -0
  196. package/skills/pixelcraft-data-apps/references/r-shiny.md +124 -0
  197. package/skills/pixelcraft-data-apps/references/reactive-data-apps.md +186 -0
  198. package/skills/pixelcraft-data-apps/references/reflex.md +116 -0
  199. package/skills/pixelcraft-data-apps/references/shiny.md +110 -0
  200. package/skills/pixelcraft-data-apps/references/streamlit.md +113 -0
  201. package/skills/pixelcraft-dataviz/SKILL.md +60 -0
  202. package/skills/pixelcraft-dataviz/references/chart-choice.md +55 -0
  203. package/skills/pixelcraft-dataviz/references/color-accessibility.md +112 -0
  204. package/skills/pixelcraft-dataviz/references/encoding-tables-dashboards.md +107 -0
  205. package/skills/pixelcraft-dataviz/references/libraries.md +176 -0
  206. package/skills/pixelcraft-dataviz/references/maps-geospatial.md +159 -0
  207. package/skills/pixelcraft-dataviz/references/realtime-graphs-maps-scale.md +92 -0
  208. package/skills/pixelcraft-desktop/SKILL.md +93 -0
  209. package/skills/pixelcraft-desktop/references/appkit.md +92 -0
  210. package/skills/pixelcraft-desktop/references/avalonia.md +95 -0
  211. package/skills/pixelcraft-desktop/references/cpp-gui.md +129 -0
  212. package/skills/pixelcraft-desktop/references/electron.md +96 -0
  213. package/skills/pixelcraft-desktop/references/go-gui.md +83 -0
  214. package/skills/pixelcraft-desktop/references/gtk.md +97 -0
  215. package/skills/pixelcraft-desktop/references/javafx-swing.md +81 -0
  216. package/skills/pixelcraft-desktop/references/qt-pyside-qml.md +88 -0
  217. package/skills/pixelcraft-desktop/references/rust-gui.md +83 -0
  218. package/skills/pixelcraft-desktop/references/tauri.md +110 -0
  219. package/skills/pixelcraft-desktop/references/uno-platform.md +71 -0
  220. package/skills/pixelcraft-desktop/references/winui-wpf.md +98 -0
  221. package/skills/pixelcraft-desktop/references/working-context.md +84 -0
  222. package/skills/pixelcraft-direction/SKILL.md +120 -0
  223. package/skills/pixelcraft-direction/references/composition-library.md +84 -0
  224. package/skills/pixelcraft-direction/references/creative-brainstorming.md +72 -0
  225. package/skills/pixelcraft-direction/references/direction-card.md +64 -0
  226. package/skills/pixelcraft-direction/references/direction-scoring.md +76 -0
  227. package/skills/pixelcraft-direction/references/motion-identity.md +67 -0
  228. package/skills/pixelcraft-direction/references/movements.md +71 -0
  229. package/skills/pixelcraft-direction/references/reference-analysis.md +37 -0
  230. package/skills/pixelcraft-direction/references/repetition-history.md +75 -0
  231. package/skills/pixelcraft-direction/references/slop-fingerprints.md +83 -0
  232. package/skills/pixelcraft-direction/references/wildcards.md +47 -0
  233. package/skills/pixelcraft-document/SKILL.md +58 -0
  234. package/skills/pixelcraft-document/references/archetypes.md +106 -0
  235. package/skills/pixelcraft-document/references/pdf-tools.md +314 -0
  236. package/skills/pixelcraft-document/references/pdfjs-and-pptx.md +114 -0
  237. package/skills/pixelcraft-document/references/print-css.md +187 -0
  238. package/skills/pixelcraft-document/references/slides.md +198 -0
  239. package/skills/pixelcraft-email/SKILL.md +80 -0
  240. package/skills/pixelcraft-email/references/client-quirks.md +113 -0
  241. package/skills/pixelcraft-email/references/html-tables.md +114 -0
  242. package/skills/pixelcraft-email/references/maizzle.md +54 -0
  243. package/skills/pixelcraft-email/references/mjml.md +54 -0
  244. package/skills/pixelcraft-email/references/react-email.md +95 -0
  245. package/skills/pixelcraft-extensions/SKILL.md +56 -0
  246. package/skills/pixelcraft-extensions/references/browser-extensions.md +105 -0
  247. package/skills/pixelcraft-extensions/references/figma-office.md +106 -0
  248. package/skills/pixelcraft-extensions/references/ide-and-saas-plugins.md +125 -0
  249. package/skills/pixelcraft-extensions/references/raycast.md +98 -0
  250. package/skills/pixelcraft-extensions/references/vscode-webviews.md +100 -0
  251. package/skills/pixelcraft-game-ui/SKILL.md +80 -0
  252. package/skills/pixelcraft-game-ui/references/bevy.md +90 -0
  253. package/skills/pixelcraft-game-ui/references/godot.md +130 -0
  254. package/skills/pixelcraft-game-ui/references/hud-principles.md +67 -0
  255. package/skills/pixelcraft-game-ui/references/love2d.md +77 -0
  256. package/skills/pixelcraft-game-ui/references/monogame.md +68 -0
  257. package/skills/pixelcraft-game-ui/references/unity-ugui.md +109 -0
  258. package/skills/pixelcraft-game-ui/references/unity-ui-toolkit.md +107 -0
  259. package/skills/pixelcraft-game-ui/references/unreal-umg.md +80 -0
  260. package/skills/pixelcraft-game-ui/references/web-and-middleware-game-ui.md +122 -0
  261. package/skills/pixelcraft-handoff/SKILL.md +50 -0
  262. package/skills/pixelcraft-handoff/references/design-translation.md +134 -0
  263. package/skills/pixelcraft-handoff/references/fidelity-tolerance.md +78 -0
  264. package/skills/pixelcraft-handoff/references/motion-handoff.md +54 -0
  265. package/skills/pixelcraft-media/SKILL.md +49 -0
  266. package/skills/pixelcraft-media/references/banners-video.md +130 -0
  267. package/skills/pixelcraft-media/references/og-generation.md +154 -0
  268. package/skills/pixelcraft-media/references/social-cards.md +71 -0
  269. package/skills/pixelcraft-mobile/SKILL.md +86 -0
  270. package/skills/pixelcraft-mobile/references/dotnet-maui.md +91 -0
  271. package/skills/pixelcraft-mobile/references/flet.md +80 -0
  272. package/skills/pixelcraft-mobile/references/flutter.md +113 -0
  273. package/skills/pixelcraft-mobile/references/harmonyos-and-emerging-mobile.md +121 -0
  274. package/skills/pixelcraft-mobile/references/ionic-capacitor.md +87 -0
  275. package/skills/pixelcraft-mobile/references/jetpack-compose.md +129 -0
  276. package/skills/pixelcraft-mobile/references/kivy.md +82 -0
  277. package/skills/pixelcraft-mobile/references/kotlin-multiplatform.md +86 -0
  278. package/skills/pixelcraft-mobile/references/lynxjs.md +110 -0
  279. package/skills/pixelcraft-mobile/references/nativescript-and-skip.md +91 -0
  280. package/skills/pixelcraft-mobile/references/react-native-expo.md +106 -0
  281. package/skills/pixelcraft-mobile/references/swiftui.md +200 -0
  282. package/skills/pixelcraft-mobile/references/tactile-interactions.md +55 -0
  283. package/skills/pixelcraft-mobile/references/task-state-composition.md +85 -0
  284. package/skills/pixelcraft-mobile/references/uikit.md +92 -0
  285. package/skills/pixelcraft-patterns/SKILL.md +75 -0
  286. package/skills/pixelcraft-patterns/references/accessibility-resilience.md +29 -0
  287. package/skills/pixelcraft-patterns/references/ai-and-offline-patterns.md +54 -0
  288. package/skills/pixelcraft-patterns/references/auth-onboarding.md +44 -0
  289. package/skills/pixelcraft-patterns/references/billing-paywalls.md +40 -0
  290. package/skills/pixelcraft-patterns/references/command-workspace.md +56 -0
  291. package/skills/pixelcraft-patterns/references/commerce.md +47 -0
  292. package/skills/pixelcraft-patterns/references/communication.md +45 -0
  293. package/skills/pixelcraft-patterns/references/creative-tools.md +42 -0
  294. package/skills/pixelcraft-patterns/references/creative-web-composition.md +38 -0
  295. package/skills/pixelcraft-patterns/references/dashboard-admin.md +35 -0
  296. package/skills/pixelcraft-patterns/references/history-diff-undo.md +50 -0
  297. package/skills/pixelcraft-patterns/references/marketing.md +44 -0
  298. package/skills/pixelcraft-patterns/references/multi-tenant-rbac.md +47 -0
  299. package/skills/pixelcraft-patterns/references/narrative-systems.md +42 -0
  300. package/skills/pixelcraft-patterns/references/notifications-activity.md +57 -0
  301. package/skills/pixelcraft-patterns/references/pattern-selection.md +80 -0
  302. package/skills/pixelcraft-patterns/references/scheduling-kanban.md +47 -0
  303. package/skills/pixelcraft-patterns/references/scroll-implementation.md +37 -0
  304. package/skills/pixelcraft-patterns/references/search-filtering.md +42 -0
  305. package/skills/pixelcraft-patterns/references/settings.md +51 -0
  306. package/skills/pixelcraft-patterns/references/tables-crud.md +43 -0
  307. package/skills/pixelcraft-plan/SKILL.md +103 -0
  308. package/skills/pixelcraft-plan/references/design-input.md +69 -0
  309. package/skills/pixelcraft-plan/references/discovery-interview.md +110 -0
  310. package/skills/pixelcraft-plan/references/grill-me-protocol.md +63 -0
  311. package/skills/pixelcraft-plan/references/plan-template.md +134 -0
  312. package/skills/pixelcraft-plan/references/repo-discovery.md +49 -0
  313. package/skills/pixelcraft-plan/references/stack-freshness.md +67 -0
  314. package/skills/pixelcraft-plan/references/stack-selection.md +98 -0
  315. package/skills/pixelcraft-review/SKILL.md +86 -0
  316. package/skills/pixelcraft-review/references/audit-report.md +69 -0
  317. package/skills/pixelcraft-review/references/critique-protocol.md +89 -0
  318. package/skills/pixelcraft-review/references/heuristics.md +63 -0
  319. package/skills/pixelcraft-review/references/personas.md +53 -0
  320. package/skills/pixelcraft-review/references/polish.md +78 -0
  321. package/skills/pixelcraft-review/scripts/check-acceptance.mjs +619 -0
  322. package/skills/pixelcraft-review/scripts/fixtures/brand-critique-waivers.json +14 -0
  323. package/skills/pixelcraft-review/scripts/fixtures/brand-critique.css +18 -0
  324. package/skills/pixelcraft-review/scripts/fixtures/clean.html +43 -0
  325. package/skills/pixelcraft-review/scripts/fixtures/focus-after-block.css +4 -0
  326. package/skills/pixelcraft-review/scripts/fixtures/focus-at-rules.css +17 -0
  327. package/skills/pixelcraft-review/scripts/fixtures/focus-comments.css +10 -0
  328. package/skills/pixelcraft-review/scripts/fixtures/focus-html-quote-leak.html +12 -0
  329. package/skills/pixelcraft-review/scripts/fixtures/focus-invalid-replacements.css +27 -0
  330. package/skills/pixelcraft-review/scripts/fixtures/focus-longhand-removal.css +34 -0
  331. package/skills/pixelcraft-review/scripts/fixtures/focus-nested-rules.css +19 -0
  332. package/skills/pixelcraft-review/scripts/fixtures/focus-not-visible-skip.css +8 -0
  333. package/skills/pixelcraft-review/scripts/fixtures/focus-outline-shorthands.css +11 -0
  334. package/skills/pixelcraft-review/scripts/fixtures/focus-unknown-and-border.css +15 -0
  335. package/skills/pixelcraft-review/scripts/fixtures/focus-unknown-last-wins.css +19 -0
  336. package/skills/pixelcraft-review/scripts/fixtures/focus-valid-replacements-extended.css +29 -0
  337. package/skills/pixelcraft-review/scripts/fixtures/focus-visible-no-replacement.css +3 -0
  338. package/skills/pixelcraft-review/scripts/fixtures/focus-visible-valid-replacements.css +9 -0
  339. package/skills/pixelcraft-review/scripts/fixtures/slop.html +28 -0
  340. package/skills/pixelcraft-review/scripts/slop-scan.mjs +1233 -0
  341. package/skills/pixelcraft-spatial/SKILL.md +51 -0
  342. package/skills/pixelcraft-spatial/references/comfort-accessibility.md +39 -0
  343. package/skills/pixelcraft-spatial/references/platforms.md +147 -0
  344. package/skills/pixelcraft-tokens/SKILL.md +60 -0
  345. package/skills/pixelcraft-tokens/assets/tokens.example.json +71 -0
  346. package/skills/pixelcraft-tokens/assets/tokens.modes.example.json +47 -0
  347. package/skills/pixelcraft-tokens/references/adoption.md +55 -0
  348. package/skills/pixelcraft-tokens/references/format.md +84 -0
  349. package/skills/pixelcraft-tokens/references/governance.md +80 -0
  350. package/skills/pixelcraft-tokens/references/state-tokens.md +62 -0
  351. package/skills/pixelcraft-tokens/references/theme-presets.md +122 -0
  352. package/skills/pixelcraft-tokens/references/token-tooling.md +119 -0
  353. package/skills/pixelcraft-tokens/scripts/export-tokens.mjs +847 -0
  354. package/skills/pixelcraft-tui/SKILL.md +76 -0
  355. package/skills/pixelcraft-tui/references/bubbletea-lipgloss.md +79 -0
  356. package/skills/pixelcraft-tui/references/extended-tui-toolkits.md +127 -0
  357. package/skills/pixelcraft-tui/references/ink.md +109 -0
  358. package/skills/pixelcraft-tui/references/ratatui.md +102 -0
  359. package/skills/pixelcraft-tui/references/rich.md +82 -0
  360. package/skills/pixelcraft-tui/references/terminal-protocols.md +80 -0
  361. package/skills/pixelcraft-tui/references/textual.md +108 -0
  362. package/skills/pixelcraft-ux/SKILL.md +56 -0
  363. package/skills/pixelcraft-ux/references/cognitive-walkthrough.md +70 -0
  364. package/skills/pixelcraft-ux/references/feedback-performance.md +50 -0
  365. package/skills/pixelcraft-ux/references/flows-ia.md +44 -0
  366. package/skills/pixelcraft-ux/references/forms.md +151 -0
  367. package/skills/pixelcraft-ux/references/i18n.md +221 -0
  368. package/skills/pixelcraft-ux/references/laws.md +39 -0
  369. package/skills/pixelcraft-ux/references/locale-test-matrix.md +60 -0
  370. package/skills/pixelcraft-ux/references/state-matrix.md +53 -0
  371. package/skills/pixelcraft-ux/references/usability-testing.md +84 -0
  372. package/skills/pixelcraft-ux/references/ux-writing.md +44 -0
  373. package/skills/pixelcraft-visual-qa/SKILL.md +96 -0
  374. package/skills/pixelcraft-visual-qa/references/baseline-governance.md +70 -0
  375. package/skills/pixelcraft-visual-qa/references/capture-desktop-game.md +59 -0
  376. package/skills/pixelcraft-visual-qa/references/capture-document.md +70 -0
  377. package/skills/pixelcraft-visual-qa/references/capture-email.md +38 -0
  378. package/skills/pixelcraft-visual-qa/references/capture-mobile.md +50 -0
  379. package/skills/pixelcraft-visual-qa/references/capture-terminal.md +35 -0
  380. package/skills/pixelcraft-visual-qa/references/critique-rubric.md +71 -0
  381. package/skills/pixelcraft-visual-qa/references/finish-gate.md +35 -0
  382. package/skills/pixelcraft-visual-qa/references/measured-craft.md +30 -0
  383. package/skills/pixelcraft-visual-qa/references/motion-capture.md +63 -0
  384. package/skills/pixelcraft-visual-qa/references/performance-budgets.md +78 -0
  385. package/skills/pixelcraft-visual-qa/references/realtime-graphics.md +55 -0
  386. package/skills/pixelcraft-visual-qa/references/task-verification.md +81 -0
  387. package/skills/pixelcraft-visual-qa/scripts/check-contrast.mjs +442 -0
  388. package/skills/pixelcraft-visual-qa/scripts/check-email.mjs +397 -0
  389. package/skills/pixelcraft-visual-qa/scripts/check-pdf.mjs +189 -0
  390. package/skills/pixelcraft-visual-qa/scripts/check-tui.mjs +321 -0
  391. package/skills/pixelcraft-visual-qa/scripts/finish-gate.mjs +174 -0
  392. package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-aria-modal.html +19 -0
  393. package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-audit.html +34 -0
  394. package/skills/pixelcraft-visual-qa/scripts/fixtures/shoot-modal.html +17 -0
  395. package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory-deferred.js +1 -0
  396. package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory-edge.html +52 -0
  397. package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory.html +80 -0
  398. package/skills/pixelcraft-visual-qa/scripts/fixtures/style-inventory.js +8 -0
  399. package/skills/pixelcraft-visual-qa/scripts/shoot.mjs +668 -0
  400. package/skills/pixelcraft-visual-qa/scripts/style-inventory.mjs +1226 -0
  401. package/skills/pixelcraft-web/SKILL.md +132 -0
  402. package/skills/pixelcraft-web/references/accessibility-performance.md +42 -0
  403. package/skills/pixelcraft-web/references/adaptive-layout.md +69 -0
  404. package/skills/pixelcraft-web/references/angular.md +108 -0
  405. package/skills/pixelcraft-web/references/assets-pipeline.md +67 -0
  406. package/skills/pixelcraft-web/references/astro.md +113 -0
  407. package/skills/pixelcraft-web/references/audio-reactive.md +61 -0
  408. package/skills/pixelcraft-web/references/auth-and-checkout-ui.md +115 -0
  409. package/skills/pixelcraft-web/references/build-and-architecture.md +215 -0
  410. package/skills/pixelcraft-web/references/canvas-and-node-editors.md +157 -0
  411. package/skills/pixelcraft-web/references/clojurescript.md +88 -0
  412. package/skills/pixelcraft-web/references/component-systems.md +102 -0
  413. package/skills/pixelcraft-web/references/component-testing.md +170 -0
  414. package/skills/pixelcraft-web/references/creative-effects.md +59 -0
  415. package/skills/pixelcraft-web/references/creative-runtime.md +34 -0
  416. package/skills/pixelcraft-web/references/elm.md +53 -0
  417. package/skills/pixelcraft-web/references/enterprise-data-ui.md +138 -0
  418. package/skills/pixelcraft-web/references/file-upload-media-ui.md +82 -0
  419. package/skills/pixelcraft-web/references/forms-validation.md +123 -0
  420. package/skills/pixelcraft-web/references/fsharp-fable.md +54 -0
  421. package/skills/pixelcraft-web/references/gsap.md +102 -0
  422. package/skills/pixelcraft-web/references/html-css.md +220 -0
  423. package/skills/pixelcraft-web/references/htmx-alpine.md +103 -0
  424. package/skills/pixelcraft-web/references/i18n-engineering.md +106 -0
  425. package/skills/pixelcraft-web/references/interaction-and-search-primitives.md +196 -0
  426. package/skills/pixelcraft-web/references/java-web.md +61 -0
  427. package/skills/pixelcraft-web/references/kotlin-web.md +57 -0
  428. package/skills/pixelcraft-web/references/leptos-yew.md +97 -0
  429. package/skills/pixelcraft-web/references/lit-web-components.md +63 -0
  430. package/skills/pixelcraft-web/references/local-first-sync.md +105 -0
  431. package/skills/pixelcraft-web/references/media-players.md +104 -0
  432. package/skills/pixelcraft-web/references/motion-react.md +96 -0
  433. package/skills/pixelcraft-web/references/motion-recipes.md +82 -0
  434. package/skills/pixelcraft-web/references/preact-fresh-hono.md +111 -0
  435. package/skills/pixelcraft-web/references/pwa.md +230 -0
  436. package/skills/pixelcraft-web/references/qwik.md +94 -0
  437. package/skills/pixelcraft-web/references/r3f-integration.md +69 -0
  438. package/skills/pixelcraft-web/references/react-next.md +168 -0
  439. package/skills/pixelcraft-web/references/rendering-choice.md +63 -0
  440. package/skills/pixelcraft-web/references/rendering-performance.md +80 -0
  441. package/skills/pixelcraft-web/references/rich-text-and-code-editors.md +220 -0
  442. package/skills/pixelcraft-web/references/rive-lottie.md +73 -0
  443. package/skills/pixelcraft-web/references/scala-laminar.md +53 -0
  444. package/skills/pixelcraft-web/references/scene-architecture.md +132 -0
  445. package/skills/pixelcraft-web/references/server-rendered.md +114 -0
  446. package/skills/pixelcraft-web/references/shader-workflow.md +77 -0
  447. package/skills/pixelcraft-web/references/smooth-scroll.md +58 -0
  448. package/skills/pixelcraft-web/references/solid.md +111 -0
  449. package/skills/pixelcraft-web/references/state-architecture.md +107 -0
  450. package/skills/pixelcraft-web/references/styling-ecosystem.md +273 -0
  451. package/skills/pixelcraft-web/references/svelte.md +111 -0
  452. package/skills/pixelcraft-web/references/tailwind.md +99 -0
  453. package/skills/pixelcraft-web/references/video-media.md +69 -0
  454. package/skills/pixelcraft-web/references/vue-nuxt.md +86 -0
  455. package/skills/pixelcraft-web/references/web-3d-engines.md +97 -0
@@ -0,0 +1,86 @@
1
+ # Kotlin Multiplatform / Compose Multiplatform
2
+
3
+ ## Architecture decision: shared logic + native UI vs shared UI
4
+
5
+ Decide the sharing boundary explicitly before writing screens:
6
+
7
+ | Dimension | KMP shared logic + native SwiftUI / Compose UI | Compose Multiplatform shared UI (iOS Stable 1.8+, Android, Desktop, Web) |
8
+ |---|---|---|
9
+ | **Platform fidelity** | Full access to iOS 26 Liquid Glass, SwiftUI `TabSection`, UIKit, and Android Material 3 Expressive natively. | High shared velocity via Skiko/Metal on iOS and native Compose on Android; iOS-specific chrome/materials require intentional platform adaptation or `UIKitView` interop. |
10
+ | **Swift interop** | Use **SKIE** (Touchlab) or **Kotlin Swift Export** so Kotlin `sealed class`, `Flow`, `suspend`, and default arguments feel idiomatic in Swift. | Minimal Swift surface needed (thin iOS host `ComposeUIViewController` + platform `expect`/`actual` bridges). |
11
+ | **Best fit** | Flagship consumer apps prioritizing native platform craft and separate iOS/Android UI teams. | Product/B2B/cross-platform apps prioritizing one UI codebase across Android, iOS, and Desktop with one Kotlin team. |
12
+
13
+ ## Token mapping & Compose Resources (`Res.*`)
14
+
15
+ Share semantic colors, spacing, typography scales, and typed assets in `commonMain`. Use **Compose Multiplatform Resources** (`composeResources/` generating `Res.string.*`, `Res.drawable.*`, `Res.font.*`) for localized strings, vector drawables, and bundled fonts:
16
+
17
+ ```kotlin
18
+ // commonMain
19
+ object PcTokens {
20
+ val action = Color(0xFF0074CA)
21
+ val controlInline = 12.dp
22
+ }
23
+
24
+ @Composable
25
+ fun InvoiceHeader() {
26
+ Text(
27
+ text = stringResource(Res.string.invoices_title),
28
+ fontFamily = FontFamily(Font(Res.font.brand_semibold)),
29
+ color = MaterialTheme.colorScheme.onSurface,
30
+ )
31
+ }
32
+ ```
33
+
34
+ Keep platform capabilities (haptics, biometrics, system reduced-motion, file pickers, dynamic platform colors) behind narrow `expect`/`actual` interfaces—never fake a single universal implementation where platforms diverge.
35
+
36
+ ## Layout, Navigation, ViewModel, & Compose Hot Reload
37
+
38
+ - **Compose Multiplatform for iOS (Stable 1.8+)** supports native iOS predictive swipe-back gestures, platform scroll physics, `UIKitView` / `UIKitViewController` embedding, and safe-area insets (`WindowInsets.safeDrawing`). Still adapt navigation patterns per host (tab bar/back stack on mobile, split pane/menu bar on Desktop).
39
+ - Share navigation and lifecycle cleanly using JetBrains' multiplatform libraries: **`org.jetbrains.androidx.navigation:navigation-compose`**, **`lifecycle-viewmodel-compose`**, and **`SavedStateHandle`** in `commonMain`.
40
+ - Use **Compose Hot Reload** (JetBrains JVM desktop plugin/runtime) during UI iteration to inspect layout and state changes live without restarting the app—remember JVM desktop hot reload does not replace iOS Simulator or Android device verification.
41
+
42
+ ## Kotlin/Wasm (`wasmJs`) & Desktop targets
43
+
44
+ - **Desktop (JVM)**: pair shared composables with desktop rules in `pixelcraft-desktop` (window minimum size, native menu bar, keyboard shortcuts, `F6` focus traversal, multi-monitor restore).
45
+ - **Web (`wasmJs` / WasmGC)**: Compose Multiplatform for Web renders onto HTML Canvas via Skiko/WasmGC (requires WasmGC-capable browsers). Like Flutter Web, canvas UI trades off native DOM semantics, SEO, and text-selection ergonomics; verify browser accessibility and compare a DOM surface in `pixelcraft-web` / `pixelcraft-plan` for public web products.
46
+
47
+ ## Typography, motion, & reduced motion
48
+
49
+ Load custom fonts via `Res.font.*` and test glyph fallback and text scaling on **every** target (`sp` on Android, Dynamic Type on iOS, OS display scaling on Desktop).
50
+
51
+ Expose reduced-motion detection via an `expect` composable/provider (`Settings.Global.ANIMATOR_DURATION_SCALE == 0f` on Android; `UIAccessibilityIsReduceMotionEnabled()` on iOS; app toggle/OS query on Desktop) and switch transitions to instant/opacity updates when enabled.
52
+
53
+ ## Accessibility, states, & forms idioms
54
+
55
+ Compose `Modifier.semantics` bridges to TalkBack (Android), VoiceOver (iOS accessibility tree), and desktop accessibility APIs, but traversal order, announcements, and custom actions still differ across targets—shared UI does **not** mean shared accessibility verification.
56
+
57
+ Own async work in multiplatform `ViewModel` (`viewModelScope` with structured coroutine cancellation and explicit `Dispatchers` injection). Use `TextFieldState` / Compose forms with per-platform testing for IME composition, autofill, password managers, paste, and hardware keyboards.
58
+
59
+ ## Do/don't pairs
60
+
61
+ | Do | Don't |
62
+ |---|---|
63
+ | Isolate reduced motion, haptics, and native pickers behind `expect`/`actual` | Pretend Android, iOS, and Desktop expose identical OS accessibility hooks |
64
+ | Use `Res.string.*` / `Res.font.*` from `composeResources/` | Duplicate raw strings and font bundles manually across Android and Xcode targets |
65
+ | Use SKIE or Kotlin Swift Export when exposing KMP logic to SwiftUI | Force SwiftUI views to consume awkward ObjC-erased `Flow` / sealed-class wrappers |
66
+ | Adapt chrome/navigation per platform (`pixelcraft-desktop` for JVM Desktop) | Ship a phone bottom tab bar unchanged inside a 1440px macOS window |
67
+ | Verify VoiceOver, TalkBack, and IME on each shipped OS | Assume one passing Android Compose test proves iOS and Desktop parity |
68
+
69
+ ## Known traps
70
+
71
+ Coroutine cancellation/dispatcher mismatches when bridging Kotlin `suspend`/`Flow` into Swift concurrency, Compose/Kotlin/Skiko version matrix misalignment, `UIKitView` touch/z-order interop clipping, platform-specific IME & paste bugs, font fallback differences across Android/iOS/Desktop/Wasm, unverified iOS VoiceOver traversal order, oversized Wasm bundle startup on slow mobile networks.
72
+
73
+ ## Verification commands
74
+
75
+ ```sh
76
+ ./gradlew build
77
+ ./gradlew test
78
+ # Target-specific checks (run when matching SDK/toolchain is installed):
79
+ ./gradlew :composeApp:lintDebug
80
+ ./gradlew :composeApp:connectedDebugAndroidTest
81
+ ./gradlew :composeApp:desktopTest
82
+ # For iOS targets on macOS:
83
+ xcodebuild -project iosApp/iosApp.xcodeproj -scheme iosApp -destination 'platform=iOS Simulator,name=<SimulatorName>' build
84
+ ```
85
+
86
+ Gradle builds and unit tests are `static` evidence. Capture simulator/device/desktop runs across VoiceOver, TalkBack, font scaling, dark mode, safe areas, and back gestures for `rendered` evidence; mark unavailable OS targets `not-checked`.
@@ -0,0 +1,110 @@
1
+ # Lynx / LynxJS (`@lynx-js/react`)
2
+
3
+ Use **Lynx** when shipping React + CSS interfaces built with **`@lynx-js/rspeedy`** (Rspack-based bundler) that compile to **native iOS, Android, HarmonyOS, and Web views** over a dual-threaded engine (no WebView wrapper).
4
+
5
+ ## Dual-thread mental model
6
+
7
+ - **Background thread (default)**: React reconciliation, state updates, `useEffect`, standard `useRef`, network calls, and ordinary event handlers (`bindtap`, `bindscroll`) run off the UI thread so business logic does not drop frames.
8
+ - **Main Thread Scripting (MTS)**: high-frequency gestures, scroll-linked motion, and drag physics run synchronously on the main thread via the `"main thread";` directive, `useMainThreadRef`, `runOnMainThread`, and `main-thread:bind*` handlers (`main-thread:bindtouchmove`, `main-thread:bindscroll`). Commit gesture outcomes back to React state with **`runOnBackground`**.
9
+
10
+ ```tsx
11
+ import { runOnBackground, useMainThreadRef } from '@lynx-js/react';
12
+ import type { MainThread } from '@lynx-js/types';
13
+
14
+ export function TactileCard({ onCommit }: { onCommit: (dx: number) => void }) {
15
+ const cardRef = useMainThreadRef<MainThread.Element>(null);
16
+
17
+ function onTouchEnd(e: MainThread.TouchEvent) {
18
+ 'main thread';
19
+ const dx = e.detail.x;
20
+ runOnBackground(onCommit)(dx);
21
+ }
22
+
23
+ return (
24
+ <view
25
+ className="card"
26
+ accessibility-element={true}
27
+ accessibility-label="Open order 4821"
28
+ main-thread:ref={cardRef}
29
+ main-thread:bindtouchend={onTouchEnd}
30
+ >
31
+ <text className="card-title">Order #4821</text>
32
+ </view>
33
+ );
34
+ }
35
+ ```
36
+
37
+ ## Token mapping
38
+
39
+ Lynx parses real CSS—export DTCG semantic tokens into CSS custom properties and switch light/dark/high-contrast themes via a root theme class or host-injected theme attribute:
40
+
41
+ ```css
42
+ :root {
43
+ --pc-action: #0074ca;
44
+ --pc-surface: #ffffff;
45
+ --pc-space-inline: 12px;
46
+ }
47
+ .theme-dark {
48
+ --pc-action: #5bb2ff;
49
+ --pc-surface: #121417;
50
+ }
51
+ .card {
52
+ background-color: var(--pc-surface);
53
+ padding: var(--pc-space-inline);
54
+ }
55
+ ```
56
+
57
+ Do not duplicate raw hex literals across component stylesheets or inline `style={{ ... }}` objects.
58
+
59
+ ## Layout and responsive idioms
60
+
61
+ - Author strictly with Lynx native primitives (`<view>`, `<text>`, `<image>`, `<scroll-view>`, `<list>`, `<list-item>`)—browser tags (`<div>`, `<button>`, `<a>`) and DOM globals (`window`, `document`) do **not** exist in native Lynx runtimes.
62
+ - Use CSS Flexbox, Grid, and Linear layout. Consume host-provided safe-area insets (injected via `lynx.__globalProps` / native bridge or CSS env where supported by host) so headers and bottom actions clear notches, home indicators, and Android 15/16 gesture bars.
63
+ - Always virtualize long feeds/grids with `<list>` + `<list-item item-key={id} estimated-main-axis-size-px={...}>` for native view recycling instead of mapping hundreds of `<view>` nodes inside `<scroll-view>`.
64
+
65
+ ## Typography & custom fonts
66
+
67
+ Register custom font files via `@font-face` / host resource loader (packaged in the bundle or native app assets so they work offline) and define fallback families. Respect host OS font scaling (`sp` / Dynamic Type forwarded by the Lynx host configuration) and avoid fixed `height` on `<view>` rows containing wrapped `<text>`.
68
+
69
+ ## Motion & reduced motion
70
+
71
+ Drive discrete state transitions with CSS `transition` / `@keyframes`, and continuous gesture-driven physics on the main thread via MTS (`setStyleProperty` on `MainThread.Element`). Pass the host OS reduced-motion setting into initial props or a native module query so both CSS transitions and MTS spring/drag animations degrade to instant/opacity changes when reduced motion is active.
72
+
73
+ ## Accessibility specifics
74
+
75
+ Lynx `<view>` elements are non-semantic by default. Expose explicit native accessibility metadata on every interactive or composite element:
76
+
77
+ - `accessibility-element={true}` to make a control focusable by VoiceOver / TalkBack,
78
+ - `accessibility-label="..."` for clear screen-reader names (never rely on an icon `<image>` alone),
79
+ - `accessibility-traits` (`"button"`, `"header"`, `"link"`, `"none"`, etc.) and `accessibility-elements` ordering where composite cards group children.
80
+
81
+ Verify minimum hit targets (`44×44 pt` iOS / `48×48 dp` Android) and real VoiceOver/TalkBack traversal inside the host native app.
82
+
83
+ ## States & forms idioms
84
+
85
+ Keep authoritative async state (`loading`, `empty`, `error`, `offline`, `optimistic`) on the background React thread; use MTS only for immediate tactile response and reconcile back through `runOnBackground` with rollback on failure.
86
+
87
+ **Native input caveats**: Lynx core intentionally ships a lean primitive set—rich `<input>`, multiline text areas, date pickers, and IME composition often rely on host-registered custom native elements (`<x-input>` or `@lynx-js` element extensions). Verify focus handling, keyboard avoidance, IME/CJK composition, paste, autofill, and accessible error announcements on **both** iOS and Android host shells before shipping complex forms.
88
+
89
+ ## Do/don't pairs
90
+
91
+ | Do | Don't |
92
+ |---|---|
93
+ | Run drag/scroll animations in `"main thread";` and commit via `runOnBackground` | Round-trip every `touchmove` pixel through background React state |
94
+ | Use `<list>` + `<list-item item-key=...>` for long feeds | Render hundreds of unrecycled `<view>` nodes inside `<scroll-view>` |
95
+ | Add `accessibility-element={true}` + `accessibility-label` + `accessibility-traits` | Treat a bare `<view bindtap={...}>` as an accessible button |
96
+ | Verify host-provided native input elements for IME, paste, and keyboard avoidance | Assume browser `<input>` / DOM validation APIs exist natively |
97
+ | Pass reduced-motion and safe-area insets from the host shell | Hard-code notch padding or ignore OS accessibility settings |
98
+
99
+ ## Known traps
100
+
101
+ Calling background-only JS APIs or React hooks inside `"main thread";` functions, assuming browser `window`/`document` globals exist, forgetting `accessibility-element={true}` on interactive `<view>`s, missing custom native `<input>` registrations in the host iOS/Android shell, unrecycled `<scroll-view>` memory spikes, safe-area or font-scale clipping from fixed pixel row heights.
102
+
103
+ ## Verification commands
104
+
105
+ ```sh
106
+ npx rspeedy build
107
+ npm run test -- --watch=false
108
+ ```
109
+
110
+ `npx rspeedy build` verifies dual-thread bundle compilation (`static`). Inspect the compiled bundle inside **Lynx Explorer** or the real iOS/Android host app build for gesture frame pacing, VoiceOver/TalkBack tree, safe-area insets, dark mode, reduced motion, and native input IME behavior (`rendered`; label untested native hosts `not-checked`).
@@ -0,0 +1,91 @@
1
+ # NativeScript and Skip (`skip.tools`)
2
+
3
+ Use this reference when targeting native iOS and Android UI via either **NativeScript** (direct JS/TS runtime marshaling to native platform APIs without a WebView) or **Skip** (Swift + SwiftUI apps targeting both iOS natively and Android via Jetpack Compose).
4
+
5
+ ## Architecture decision table
6
+
7
+ | Approach | Language & UI authoring | Android runtime & UI | iOS runtime & UI | Best fit | Primary trade-off |
8
+ |---|---|---|---|---|---|
9
+ | **NativeScript** | TS/JS + Core XML, Angular, Vue, Solid, or Svelte | V8 runtime calling Android Java/Kotlin Views directly | V8/JavaScriptCore calling UIKit/ObjC/Swift APIs directly | Web/TS teams needing direct zero-bridge-boilerplate access to native iOS/Android SDKs without React Native's layer | Smaller widget ecosystem than RN/Flutter; platform layout differences require explicit testing |
10
+ | **Skip Lite** | Swift + SwiftUI | Transpiles Swift → Kotlin and SwiftUI → Material 3 Jetpack Compose (`skip-ui`) | 100% unmodified native Swift/SwiftUI | Apple-first SwiftUI teams shipping a true native Android Material 3 app with zero Android runtime overhead | Transpiled Swift subset (no arbitrary C/Swift-only binary deps without Kotlin equivalents) |
11
+ | **Skip Fuse** | Swift + SwiftUI | Compiles Swift natively via Swift SDK for Android (JNI) + bridges SwiftUI to Jetpack Compose | 100% unmodified native Swift/SwiftUI | Swift teams needing full Swift stdlib, SwiftPM/C packages, and Swift concurrency on Android alongside native Compose UI | Larger APK size from bundled Swift runtime; native JNI boundary to debug |
12
+
13
+ ## NativeScript idioms
14
+
15
+ - **Token mapping**: define CSS custom properties in `app.css` (using `.ns-dark` / `.ns-light` root classes automatically applied by `@nativescript/core` for system theme changes) rather than repeating inline colors in templates.
16
+ - **Direct native interop**: NativeScript exposes native classes directly (`UIImpactFeedbackGenerator`, `android.view.HapticFeedbackConstants`) without writing glue modules—guard platform calls with `isIOS` / `isAndroid` (`@nativescript/core`).
17
+ - **Lists & layout**: use `GridLayout` / `FlexboxLayout` / `StackLayout` with `iosOverflowSafeArea` configured intentionally, and use `ListView` (or `@nativescript-community/ui-collectionview`) for native view recycling—never nest dozens of items inside a `ScrollView`.
18
+
19
+ ```ts
20
+ import { isAndroid, isIOS, Utils } from '@nativescript/core';
21
+
22
+ export function triggerConfirmHaptic(): void {
23
+ if (isIOS) {
24
+ const gen = UINotificationFeedbackGenerator.alloc().init();
25
+ gen.notificationOccurred(UINotificationFeedbackType.Success);
26
+ } else if (isAndroid) {
27
+ const view = Utils.android.getCurrentActivity()?.getWindow()?.getDecorView();
28
+ view?.performHapticFeedback(android.view.HapticFeedbackConstants.CONFIRM);
29
+ }
30
+ }
31
+ ```
32
+
33
+ - **Accessibility**: set `accessible="true"`, `accessibilityLabel`, `accessibilityRole`, and `accessibilityLiveRegion` on interactive elements; verify VoiceOver and TalkBack because custom gesture-attached `<Label>` or `<StackLayout>` nodes do not announce as buttons automatically.
34
+
35
+ ## Skip (`skip.tools`) idioms
36
+
37
+ - **Write idiomatic SwiftUI first**: Skip preserves standard SwiftUI on iOS untouched while mapping `NavigationStack`, `TabView`, `List`, `Form`, `Sheet`, Asset Catalog colors, and `Localizable.xcstrings` onto native Jetpack Compose Material 3 equivalents on Android (`skip-ui`).
38
+ - **Platform escape hatches**: isolate genuine Android-only or iOS-only differences with `#if os(Android)` / `#if SKIP` and embed custom Jetpack Compose UI directly inside SwiftUI via `ComposeView` when Android platform idioms (e.g., Material 3 Expressive components or Android 16 Live Updates) diverge from Apple HIG:
39
+
40
+ ```swift
41
+ import SwiftUI
42
+
43
+ struct InvoiceScreen: View {
44
+ @Environment(\.accessibilityReduceMotion) private var reduceMotion
45
+
46
+ var body: some View {
47
+ NavigationStack {
48
+ List {
49
+ Text("Invoice #1042")
50
+ }
51
+ .navigationTitle("Invoices")
52
+ #if os(Android)
53
+ .toolbarBackground(.visible, for: .navigationBar)
54
+ #endif
55
+ }
56
+ }
57
+ }
58
+ ```
59
+
60
+ - **Token mapping & typography**: store semantic colors in Xcode Asset Catalogs and use SwiftUI text styles (`.body`, `.headline`) so iOS scales with Dynamic Type and Skip maps them to Compose Material typography (`sp` scaling) automatically.
61
+
62
+ ## Do/don't pairs
63
+
64
+ | Do | Don't |
65
+ |---|---|
66
+ | Guard NativeScript native API calls with `isIOS` / `isAndroid` | Call UIKit or `android.*` APIs unconditionally across platforms |
67
+ | Use `.ns-dark` CSS custom properties in NativeScript and Asset Catalog tokens in Skip | Hard-code hex literals across templates or views |
68
+ | Use `ListView` / `CollectionView` (NativeScript) or SwiftUI `List` / `LazyVStack` (Skip) | Render large feeds inside unrecycled `ScrollView` containers |
69
+ | Inspect Android Material 3 layout, back gesture, and TalkBack separately in Skip | Assume passing Xcode Previews proves Android Compose parity |
70
+ | Choose Skip Fuse when Android needs full SwiftPM/C libraries; Skip Lite for minimal APK | Fight Skip Lite transpiler limits with unsupported C-interop libraries |
71
+
72
+ ## Known traps
73
+
74
+ - **NativeScript**: leaking native ObjC/Java references across closures, missing `accessible="true"` on tappable layouts, ignoring Android 15/16 edge-to-edge safe areas, mixing Vite/Webpack plugin configs inconsistently.
75
+ - **Skip**: using iOS-only modifiers (`glassEffect`, UIKit representables) without `#if !os(Android)` fallbacks, assuming every SwiftUI layout modifier behaves identically in Compose without testing on an Android emulator, oversized Skip Fuse APKs without ABI splitting.
76
+
77
+ ## Verification commands
78
+
79
+ ```sh
80
+ # NativeScript:
81
+ ns doctor
82
+ ns build ios
83
+ ns build android
84
+ # Skip (requires Xcode + Android SDK + skip CLI):
85
+ skip doctor
86
+ swift test
87
+ skip test
88
+ skip android build
89
+ ```
90
+
91
+ Compilation and unit tests (`swift test`, `ns build`) are `static` evidence. Run real iOS Simulator and Android Emulator/device builds (`ns run ios`/`android`, `skip android run`) to verify TalkBack, VoiceOver, safe areas, dark mode, text scaling, and platform back gestures for `rendered` evidence; label unavailable targets `not-checked`.
@@ -0,0 +1,106 @@
1
+ # React Native / Expo
2
+
3
+ ## Architecture baseline (New Architecture & Expo SDK 52–54+)
4
+
5
+ React Native's **New Architecture**—**Fabric** (synchronous C++ renderer), **TurboModules** (lazy native modules over **JSI**), **Bridgeless** mode, and **Hermes / Static Hermes**—is the default in Expo SDK 52–54+ and mandatory in React Native 0.82+ (legacy JSON Bridge removed). Performance regressions now come from JS-thread blocking, layout thrash, or excessive shadow-tree churn rather than bridge serialization.
6
+
7
+ - Prefer **Expo CNG** (`app.config.ts` + `npx expo prebuild` + config plugins) and **Expo Router** (file-based typed routes, native stacks/tabs, universal deep linking, `+not-found.tsx`).
8
+ - Use **Expo DOM (`"use dom"`)** selectively to embed an isolated web component (e.g., rich-text editor or chart library) inside a native screen without turning the whole app into a WebView.
9
+ - For high-frequency native interop beyond standard Expo Modules, **Nitro Modules** provide zero-overhead JSI bindings with compile-time TypeScript→Swift/Kotlin specs.
10
+
11
+ ## Token mapping
12
+
13
+ Generate TypeScript/JSON design tokens during your build step (e.g., from DTCG JSON) and wire them once into your styling engine plus Expo Router / React Navigation `ThemeProvider`:
14
+
15
+ ```ts
16
+ export const lightTokens = {
17
+ color: { action: '#0074ca', surface: '#ffffff', danger: '#c62828' },
18
+ space: { controlInline: 12, sectionGap: 20 },
19
+ } as const;
20
+ ```
21
+
22
+ Do not scatter raw hex literals across JSX props. Synchronize React Navigation / Expo Router header and tab-bar theme colors separately because native navigation chrome reads its own theme object.
23
+
24
+ ## Styling engines & UI kits
25
+
26
+ Separate **styling engines** from **component kits** before choosing, and never combine two competing styling systems in one app:
27
+
28
+ | Tool | Layer | Trade-offs & best fit |
29
+ |---|---|---|
30
+ | **Uniwind** | Tailwind CSS v4 compiled natively for RN | Modern Tailwind v4 token/CSS-variable workflow with native binding performance; pair with accessible primitives. |
31
+ | **react-native-unistyles v3** | C++/JSI shadow-tree styling engine | Theme/breakpoint/adaptive-style updates directly in Fabric/C++ without React re-renders; strong for design-system teams. |
32
+ | **NativeWind v4 / v5** | Tailwind utility engine for RN | Familiar Tailwind mental model across web and mobile; verify exact Expo SDK & New Architecture compatibility. |
33
+ | **Tamagui** | Static compiler + tokens + UI kit | Strong RN+Web monorepo extraction performance; higher Metro/Babel/bundler config complexity. |
34
+ | **gluestack-ui** | Universal headless primitives + styled kit | Accessible RN+Web component baselines without heavy compiler coupling; profile dense lists. |
35
+ | **React Native Paper** | Material Design 3 component kit | Fast MD3 baseline for Android-first or internal tools; resists bespoke or Cupertino iOS aesthetics. |
36
+
37
+ ## Layout, lists, media, & keyboard idioms
38
+
39
+ - Layout runs on Yoga (Flexbox). Always consume `react-native-safe-area-context` (`useSafeAreaInsets` / `SafeAreaView`) and honor iOS vs Android back/navigation idioms even when screens share code.
40
+ - **Virtualized lists**: prefer **FlashList v2** (built for the New Architecture without manual item size estimates) or **LegendList** (drop-in high-performance virtualization) over `FlatList` for large or dynamic-height feeds; always supply stable item IDs.
41
+ - **Keyboard handling**: use **`react-native-keyboard-controller`** (`KeyboardAvoidingView`, `KeyboardAwareScrollView`, `useReanimatedKeyboardAnimation`) for frame-synced 60/120fps keyboard tracking across both iOS and Android edge-to-edge.
42
+ - **Images**: use **`expo-image`** for native disk/memory caching, BlurHash/ThumbHash placeholders, content-fit transitions, and WebP/AVIF support.
43
+
44
+ ## Typography & custom fonts
45
+
46
+ Load custom fonts via `expo-font` config plugin (embedded natively at build time rather than waiting for async runtime load flash). Respect platform font scaling (`allowFontScaling` defaults to `true`); reflow horizontal rows at large font scales instead of setting fixed heights or `maxFontSizeMultiplier={1}`.
47
+
48
+ ## Motion, gestures, Skia, & reduced motion
49
+
50
+ - Use **Reanimated 4** (supporting both declarative CSS Transitions/Animations syntax and UI-thread worklets) paired with **`react-native-gesture-handler`** for native-threaded drag, sheet, and swipe physics.
51
+ - Use **React Native Skia** (`@shopify/react-native-skia`) for custom GPU 2D charts, shaders, or canvas drawing—never for standard buttons or forms that need native accessibility trees.
52
+ - Query and subscribe to system reduced motion, replacing spatial motion with instant or opacity transitions when enabled:
53
+
54
+ ```ts
55
+ import { useEffect, useState } from 'react';
56
+ import { AccessibilityInfo } from 'react-native';
57
+
58
+ export function useReducedMotion(): boolean {
59
+ const [reduced, setReduced] = useState(false);
60
+ useEffect(() => {
61
+ AccessibilityInfo.isReduceMotionEnabled().then(setReduced);
62
+ const sub = AccessibilityInfo.addEventListener('reduceMotionChanged', setReduced);
63
+ return () => sub.remove();
64
+ }, []);
65
+ return reduced;
66
+ }
67
+ ```
68
+
69
+ ## Accessibility, states, & forms idioms
70
+
71
+ Use `Pressable`, `accessibilityRole`, `accessibilityLabel`, `accessibilityState`, `accessibilityHint` (sparingly), and `accessibilityLiveRegion`. Keep hit areas ≥ `44 pt` (iOS) / `48 dp` (Android) using `hitSlop` when visual icons are compact.
72
+
73
+ Model async state explicitly (`loading`, `refreshing`, `empty`, `error`, `offline`, `optimistic`) with idempotent mutations, visible offline sync queues, and persisted router/draft recovery across OS background process death (`adb shell am kill` / iOS eviction via `react-native-mmkv` or SQLite—never assuming JS memory survives backgrounding). Set **`keyboardDismissMode="interactive"`** alongside `react-native-keyboard-controller`, pass gesture `velocity` into Reanimated 4 `withSpring`, and configure `keyboardType`, `autoComplete`, `textContentType`, `returnKeyType`, unobstructed paste/password-manager support, and post-blur validation.
74
+
75
+ ## 2026 App Store & Google Play submission gates
76
+
77
+ - **Secrets in Keychain / Android Keystore**: store auth/refresh tokens solely in **`expo-secure-store`** (or `react-native-keychain`)—**never** in plaintext `AsyncStorage` or unencrypted MMKV.
78
+ - **iOS (Xcode 26 SDK)**: declare `ios.privacyManifests` in `app.config.ts` (`PrivacyInfo.xcprivacy` covering app + native modules), enable `CADisableMinimumFrameDurationOnPhone: true` in `ios.infoPlist` for `120fps` ProMotion (`< 8.33 ms`/frame), include **`expo-apple-authentication`** whenever any social login exists, wire real **in-app Account Deletion**, and use zero-permission `expo-image-picker` (`PHPicker`) with `Linking.openSettings()` recovery when camera/mic/location is denied.
79
+ - **Android (`targetSdkVersion 36`, `.aab`)**: enable `edgeToEdgeEnabled: true` (`react-native-edge-to-edge`) + Predictive Back, unlock `sw >= 600dp` tablet/foldable orientations (`expo-screen-orientation` / adaptive layouts rather than hard-locking portrait), ship Android **Baseline Profiles** to keep cold start `< 1.2 s`, and ensure RN + every native JSI/C++ module compiles with **NDK r28+ for `16 KB` memory page alignment** (verify release builds with `zipalign -c -P 16`). Upload Hermes/ProGuard/R8 & dSYM symbols in CI (`>= 99.5%` crash-free, `0` ANRs).
80
+
81
+ ## Do/don't pairs
82
+
83
+ | Do | Don't |
84
+ |---|---|
85
+ | `<Pressable accessibilityRole="button" accessibilityLabel="Save invoice">` | Tap-only `<Text>` or unlabeled `<TouchableOpacity>` icon |
86
+ | `FlashList` v2 or `LegendList` with stable keys for large feeds | Mapping hundreds of items inside `<ScrollView>` |
87
+ | `react-native-keyboard-controller` + `keyboardDismissMode="interactive"` + `useSafeAreaInsets()` | Hard-coded `KeyboardAvoidingView` magic `keyboardVerticalOffset` |
88
+ | Reanimated 4 UI-thread springs seeded with gesture `velocity` + `CADisableMinimumFrameDurationOnPhone` | JS-coupled scroll listeners, `setInterval` animations, or `60 Hz`-capped ProMotion |
89
+ | Store tokens in `expo-secure-store`, configure `privacyManifests`, `targetSdk 36`, and `16 KB` `.so` alignment | Save JWTs in `AsyncStorage`, ship `4 KB`-aligned native `.so` modules, or link Account Deletion to email |
90
+ | `expo-image` + build-time `expo-font` config plugin | Uncached `<Image>` flickering or runtime font flash on every launch |
91
+
92
+ ## Known traps
93
+
94
+ JS-thread blocking / excessive Fabric shadow-tree updates, native modules bundling `4 KB`-aligned `.so` binaries rejected on Android 15/16 (`16 KB` page requirement), storing tokens in `AsyncStorage`, state wiped on `adb shell am kill`, double safe-area padding with Expo Router headers, Android 16 edge-to-edge keyboard overlap, controlled `TextInput` cursor jumps, font scaling clipped by fixed row heights.
95
+
96
+ ## Verification commands
97
+
98
+ ```sh
99
+ npm run lint
100
+ npm run test -- --watch=false
101
+ CI=1 npx expo install --check
102
+ # Verify 16 KB ELF alignment on Android release APK:
103
+ zipalign -c -P 16 -v 4 android/app/build/outputs/apk/release/app-release.apk
104
+ ```
105
+
106
+ Use the project's locally installed Expo CLI (`static` dependency verification via `CI=1 npx expo install --check` and `zipalign -c -P 16`). Run native release/dev builds (`npx expo run:ios` / `npx expo run:android`) across `>= 2` physical iOS devices and `>= 3` physical Android devices (Pixel + OEM skins) checking VoiceOver/TalkBack, `200%` font scaling, Dark Mode, `adb shell am kill` process-death restoration, offline sync, and Android predictive back / iOS swipe-back for `rendered` evidence; label untested devices `not-checked`.
@@ -0,0 +1,200 @@
1
+ # SwiftUI
2
+
3
+ ## Token mapping
4
+
5
+ Map DTCG semantic roles into Asset Catalog color sets (carrying light, dark, and high-contrast variants) and reference them via Xcode-generated **`ColorResource`** symbols rather than raw RGB/hex literals:
6
+
7
+ ```swift
8
+ enum PC {
9
+ static let action = Color(.semanticAction) // ColorResource from Assets.xcassets
10
+ static let surface = Color(.semanticSurface)
11
+ static let controlInline: CGFloat = 12
12
+ }
13
+
14
+ // Custom environment tokens with @Entry (iOS 18+ / Xcode 16+)
15
+ extension EnvironmentValues {
16
+ @Entry var pcSpacingScale: CGFloat = 1.0
17
+ }
18
+ ```
19
+
20
+ Use `ColorResource` names that express semantic roles (`semanticAction`, `semanticDanger`), not palette names (`blue500`). Reserve compile-time constant structs for spacing, radii, and motion durations that Asset Catalogs do not store.
21
+
22
+ ## iOS 26 Liquid Glass & modern materials
23
+
24
+ On iOS 26+, reserve **Liquid Glass** for floating navigation, toolbars, and controls above scrolling content—never apply glass to primary reading surfaces or stack glass-on-glass:
25
+
26
+ ```swift
27
+ GlassEffectContainer(spacing: 12) {
28
+ HStack(spacing: 12) {
29
+ Button("Filter", systemImage: "line.3.horizontal.decrease") { showFilter = true }
30
+ .buttonStyle(.glass)
31
+ Button("Create", systemImage: "plus") { createInvoice() }
32
+ .buttonStyle(.glassProminent)
33
+ }
34
+ }
35
+ .padding()
36
+ .glassEffect(.regular, in: ConcentricRectangle(corners: .concentric(minimum: 16)))
37
+ ```
38
+
39
+ - Group neighboring glass controls inside `GlassEffectContainer` so they share backdrop sampling and morph smoothly during state transitions.
40
+ - Use `.buttonStyle(.glass)` / `.buttonStyle(.glassProminent)`, `ConcentricRectangle` for concentric corner nesting inside sheets/bezels, `.tabBarMinimizeBehavior(.onScrollDown)` for content-first scrolling tabs, and `.scrollEdgeEffectStyle(.soft, for: .top)` (or `.hard`) to preserve legibility where content passes beneath floating chrome.
41
+ - **Mandatory accessibility fallback**: read `@Environment(\.accessibilityReduceTransparency)` and `@Environment(\.colorSchemeContrast)` (`.increased`). When either is active, replace translucent `.glassEffect(...)` surfaces with opaque semantic surfaces and clear borders so text contrast stays ≥ 4.5:1.
42
+
43
+ ## Layout, navigation, and iOS 18–26 idioms
44
+
45
+ - Use `NavigationStack`, `NavigationSplitView`, `ViewThatFits`, `Layout`, safe-area insets (`.safeAreaInset(edge: .bottom)`), and horizontal/vertical size classes rather than fixed device frames.
46
+ - Use the **`Tab` / `TabSection`** API (iOS 18+, replacing deprecated `.tabItem`) for adaptive iPhone tab bars and iPad floating tab bars / sidebars:
47
+
48
+ ```swift
49
+ TabView(selection: $selectedTab) {
50
+ Tab("Invoices", systemImage: "doc.text", value: AppTab.invoices) {
51
+ InvoiceListView()
52
+ }
53
+ TabSection("Archive") {
54
+ Tab("Paid", systemImage: "checkmark.circle", value: AppTab.paid) { PaidListView() }
55
+ }
56
+ }
57
+ .tabBarMinimizeBehavior(.onScrollDown)
58
+ ```
59
+
60
+ - Use `.navigationTransition(.zoom(sourceID: invoice.id, in: ns))` paired with `.matchedTransitionSource(id: invoice.id, in: ns)` for continuity transitions when opening detail cards/media (bypassing zoom motion when Reduce Motion is enabled).
61
+ - Use native **`ContentUnavailableView`** (and `ContentUnavailableView.search`) for empty, error, and no-results states.
62
+ - On iOS 26+, prefer native SwiftUI **`WebView`** / `WebPage` (WebKit) over custom `UIViewRepresentable` `WKWebView` wrappers when embedding web content.
63
+ - Extend glanceable and ongoing experiences to the Lock Screen / Home Screen via **`WidgetKit`** interactive widgets (`AppIntent`) and **`ActivityKit`** Live Activities (see `references/task-state-composition.md`).
64
+
65
+ ## Typography & Dynamic Type
66
+
67
+ Prefer system text styles (`.body`, `.headline`, `.title2`) because they scale automatically with Dynamic Type. For custom bundled fonts registered in `Info.plist`, always bind scaling to a semantic text style:
68
+
69
+ ```swift
70
+ Text(invoice.totalFormatted)
71
+ .font(.custom("BrandSans-SemiBold", size: 17, relativeTo: .body))
72
+ ```
73
+
74
+ Read `@Environment(\.dynamicTypeSize) private var typeSize` and switch horizontal label/value rows to `VStack` (or `ViewThatFits`) when `typeSize.isAccessibilitySize` so numbers and actions never clip.
75
+
76
+ ## Motion, haptics, & reduced motion
77
+
78
+ Read `@Environment(\.accessibilityReduceMotion) private var reduceMotion` and switch spatial transitions/zooms to instant or cross-dissolve updates when true. Avoid unbounded implicit `.animation(_:)` modifiers; scope animations to explicit value changes or `withAnimation`.
79
+
80
+ Trigger semantic haptics declaratively with **`.sensoryFeedback`** (iOS 17+) rather than manual UIKit generators:
81
+
82
+ ```swift
83
+ Button("Approve") { approve() }
84
+ .sensoryFeedback(.success, trigger: approvalCount)
85
+ ```
86
+
87
+ ## Accessibility specifics
88
+
89
+ Use `.accessibilityLabel`, `.accessibilityValue`, `.accessibilityHint` (sparingly), `.accessibilityAddTraits`, `.accessibilityElement(children: .combine)`, `.accessibilityAction(named:)`, `.accessibilityAdjustableAction`, and `.accessibilitySortPriority`. Maintain ≥ `44×44 pt` hit targets with `.contentShape(Rectangle())` so visual padding actually receives touches. Verify VoiceOver focus order on device/simulator rather than assuming visual order.
90
+
91
+ ## States & forms idioms
92
+
93
+ Model view state as an explicit enum (`loading`, `loaded`, `empty`, `error`, `offline`) owned via `@Observable`, `@State`, `@Binding`, or `@Environment`. Preserve navigation path (`Codable` `NavigationPath`) and drafts across OS background termination (`@SceneStorage` / SwiftData / disk) and handle `.task` cancellation cleanly.
94
+
95
+ In forms and scrollable editors, attach **`.scrollDismissesKeyboard(.interactively)`** so users can drag the keyboard down smoothly with their thumb, and use `Form`, `LabeledContent`, `.keyboardType`, `.textContentType`, `.submitLabel`, `.autocorrectionDisabled`, and `.focused($field)` sequencing. Integrate system password autofill, Passkeys, and `SignInWithAppleButton` (`AuthenticationServices`) instead of blocking paste or custom-masking credentials.
96
+
97
+ ## The Composable Architecture (TCA)
98
+
99
+ Adopt **TCA** (`ComposableArchitecture` 1.x+) when an Apple-platform app needs strict unidirectional state, cancellable async effect choreography, deep-linkable navigation trees, and deterministic unit test coverage—skip TCA for simple 1–2 screen utilities where SwiftUI `@Observable` suffices:
100
+
101
+ - Annotate features with `@Reducer` and `@ObservableState struct State: Equatable`, and bind directly in views using **`@Bindable var store: StoreOf<Feature>`** (`$store.query`, `store.send(.saveTapped)`).
102
+ - Drive modals and push stacks from state via **`@Presents var destination: Destination.State?`** (`@Reducer enum Destination`) or `StackState` / `NavigationStack(path:)` so deep links and state restoration stay deterministic.
103
+ - Verify async race conditions, debouncing, error paths, and navigation dismissals deterministically with **`TestStore`** and injected `@Dependency(\.continuousClock)` / client dependencies before visual QA.
104
+
105
+ ```swift
106
+ import ComposableArchitecture
107
+ import SwiftUI
108
+
109
+ @Reducer
110
+ struct InvoiceFeature {
111
+ @ObservableState
112
+ struct State: Equatable {
113
+ var filter = ""
114
+ var isSaving = false
115
+ @Presents var destination: Destination.State?
116
+ }
117
+
118
+ enum Action: BindableAction {
119
+ case binding(BindingAction<State>)
120
+ case saveTapped
121
+ case saveCompleted(Result<Void, Error>)
122
+ case destination(PresentationAction<Destination.Action>)
123
+ }
124
+
125
+ @Reducer
126
+ enum Destination {
127
+ case editor(InvoiceEditorFeature)
128
+ }
129
+
130
+ @Dependency(\.invoiceClient) var invoiceClient
131
+
132
+ var body: some ReducerOf<Self> {
133
+ BindingReducer()
134
+ Reduce { state, action in
135
+ switch action {
136
+ case .saveTapped:
137
+ state.isSaving = true
138
+ return .run { [filter = state.filter] send in
139
+ await send(.saveCompleted(Result { try await invoiceClient.save(filter) }))
140
+ }
141
+ case .saveCompleted:
142
+ state.isSaving = false
143
+ return .none
144
+ case .binding, .destination:
145
+ return .none
146
+ }
147
+ }
148
+ .ifLet(\.$destination, action: \.destination)
149
+ }
150
+ }
151
+
152
+ struct InvoiceView: View {
153
+ @Bindable var store: StoreOf<InvoiceFeature>
154
+
155
+ var body: some View {
156
+ Form {
157
+ TextField("Filter", text: $store.filter)
158
+ Button("Save") { store.send(.saveTapped) }
159
+ .disabled(store.isSaving)
160
+ }
161
+ .sheet(item: $store.scope(state: \.destination?.editor, action: \.destination.editor)) { editorStore in
162
+ InvoiceEditorView(store: editorStore)
163
+ }
164
+ }
165
+ }
166
+ ```
167
+
168
+ ## 2026 App Store submission, privacy & runtime gates
169
+
170
+ - **Xcode 26 SDK & `PrivacyInfo.xcprivacy`**: build against the current Xcode 26 iOS/iPadOS SDK and ship an accurate `PrivacyInfo.xcprivacy` declaring every first-party Required Reason API (`UserDefaults`, `FileTimestamp`, `SystemBootTime`, `DiskSpace`), collected data categories, and tracking domains—plus verify every third-party SPM/XCFramework dependency bundles its own signed privacy manifest.
171
+ - **Keychain-only credentials**: store OAuth/JWT access & refresh tokens, API secrets, and biometric keys exclusively in **Keychain** (`SecItemAdd` with `kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly`)—**never** in `UserDefaults`, `@AppStorage`, or unencrypted files.
172
+ - **Sign in with Apple & in-app Account Deletion**: include **`SignInWithAppleButton`** with equal visual prominence whenever any third-party social sign-in (Google, Meta, GitHub, LINE, Zalo) is offered; if users can create an account in-app, provide a discoverable **Delete Account** flow in Settings that confirms consequences and actually deletes/schedules deletion in-app (linking out to a support email or contact form triggers App Review rejection).
173
+ - **Zero-permission pickers & Settings recovery**: use SwiftUI **`PhotosPicker`** (`PhotosUI`) so single/multiple photo selection needs zero photo-library permission prompt; for camera/microphone/location/notifications, trigger the system prompt just-in-time on user intent, support `.limited` photo access gracefully, and render a calm inline `"Open Settings"` button (`UIApplication.openSettingsURLString`) when authorization is `.denied`.
174
+ - **`120fps` ProMotion & dSYM symbolication**: set **`CADisableMinimumFrameDurationOnPhone = true`** in `Info.plist` for `120 Hz` ProMotion animations (`< 8.33 ms`/frame), target `< 800 ms` cold start, and upload archive **dSYMs** automatically in CI to maintain `>= 99.5%` crash-free sessions.
175
+
176
+ ## Do/don't pairs
177
+
178
+ | Do | Don't |
179
+ |---|---|
180
+ | `Color(.semanticAction)` via Asset Catalog `ColorResource` | Scattered `Color(red: 0, green: 0.45, blue: 0.79)` literals |
181
+ | `Tab("Home", systemImage: "house") { ... }` + `TabSection` | Deprecated `.tabItem { Label(...) }` on iOS 18+ targets |
182
+ | `.font(.custom("Brand", size: 17, relativeTo: .body))` | `.font(.custom("Brand", fixedSize: 17))` ignoring Dynamic Type |
183
+ | Check `accessibilityReduceTransparency` & `colorSchemeContrast` around `.glassEffect` | Stack `.glassEffect` on reading cards or ignore Increase Contrast |
184
+ | Store tokens in Keychain, ship `PrivacyInfo.xcprivacy`, and wire real in-app Account Deletion + `SignInWithAppleButton` | Save JWTs in `@AppStorage`/`UserDefaults` or link "Delete Account" to a `mailto:` address |
185
+ | Use `PhotosPicker`, `.scrollDismissesKeyboard(.interactively)`, and `CADisableMinimumFrameDurationOnPhone = true` | Request full photo library access just for an avatar upload or cap animations at `60 Hz` on ProMotion iPhones |
186
+ | `ContentUnavailableView("No Invoices", systemImage: "doc")` + `.safeAreaInset(edge: .bottom)` | Blank white `List` on empty data or hard-coded bottom padding colliding with home indicator |
187
+
188
+ ## Known traps
189
+
190
+ `GeometryReader` layout loops, implicit animation explosions, stacking glass-on-glass reducing legibility, `NavigationStack` path state duplication, `.task` re-firing on view identity changes, sheet/full-screen cover focus loss on dismiss, custom font fixed-size clipping, safe-area double padding, storing tokens in `UserDefaults`, missing SDK `PrivacyInfo.xcprivacy` manifests, preview fixtures mistaken for runtime persistence.
191
+
192
+ ## Verification commands
193
+
194
+ ```sh
195
+ xcrun simctl list devices available
196
+ xcodebuild -scheme App -destination 'platform=iOS Simulator,name=<SimulatorName>' build
197
+ xcodebuild test -scheme App -destination 'platform=iOS Simulator,name=<SimulatorName>'
198
+ ```
199
+
200
+ Use Xcode Previews, snapshot tests, and real simulator/physical-device runs (`>= 2` iOS devices including ProMotion) across Dynamic Type (`AX3` / `200%`), Dark Mode, Increase Contrast, Reduce Transparency, Reduce Motion, background termination restoration, and VoiceOver/Accessibility Inspector for `rendered` evidence. Compilation alone is `static` evidence; label untested physical devices or iOS versions `not-checked`.