@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,70 @@
1
+ # Screenshot baseline governance
2
+
3
+ Use this reference when keeping visual baselines, screenshots, snapshots, or capture artifacts across iterations. Baselines are evidence with provenance and expiry, not immutable truth.
4
+
5
+ ## Baseline metadata
6
+
7
+ Every baseline set needs adjacent metadata or a manifest containing:
8
+
9
+ - product/build commit or version;
10
+ - runtime/platform/browser/device/emulator and OS version where relevant;
11
+ - viewport/orientation/density/theme/mode/locale/direction;
12
+ - fixture/data seed/time freeze/network state;
13
+ - capture tool/version and scale factor;
14
+ - capture date and owning surface/test;
15
+ - known nondeterministic regions or exemptions;
16
+ - evidence scope: full page, crop, interaction frame, static snapshot, or device capture.
17
+
18
+ A PNG filename alone is not enough provenance for a durable baseline.
19
+
20
+ ## Approval and update rules
21
+
22
+ 1. A baseline may be updated only after the visible difference is classified as intentional product change, approved design change, platform/runtime rendering drift, fixture correction, or defect fix.
23
+ 2. Never update baselines merely to make CI pass.
24
+ 3. Review meaningful diffs as images/crops, not only aggregate mismatch percentage.
25
+ 4. Keep the old baseline until the replacement has been validated in the same normalized context.
26
+ 5. Record who/what approved the update and the reason in the project’s normal review path.
27
+ 6. Dynamic regions must be frozen, masked narrowly, or excluded with explicit scope—not broadly ignored.
28
+ 7. Failed interaction/task evidence must not be overwritten by a later successful run before the failure artifact is preserved.
29
+
30
+ ## Determinism controls
31
+
32
+ Prefer deterministic inputs:
33
+
34
+ - fixed fixture data and ordering;
35
+ - frozen clock/relative time formatting;
36
+ - deterministic random seed or disabled animation;
37
+ - real or bundled fonts/assets;
38
+ - controlled network responses;
39
+ - stable feature flags/permissions;
40
+ - normalized viewport/scale/scroll;
41
+ - reduced-motion/static capture where motion rasterization is noisy.
42
+
43
+ When determinism is impossible, isolate the unstable region and label the baseline partial. Do not loosen global tolerance until meaningful regressions pass.
44
+
45
+ ## Artifact lifecycle
46
+
47
+ Keep artifacts according to value:
48
+
49
+ | Artifact | Retention posture |
50
+ |---|---|
51
+ | release/acceptance baseline | durable, versioned with release/build |
52
+ | regression capture for active defect | retained until defect closure plus normal review retention |
53
+ | exploratory capture | temporary; do not commit private/noisy artifacts by default |
54
+ | user/private data capture | redact or delete; never commit secrets/personal data |
55
+ | failure trace | preserve enough frames/log/context to diagnose before retrying |
56
+
57
+ Do not fill the repository with unreviewed screenshots. Use the project's artifact storage/CI retention policy when available.
58
+
59
+ ## Baseline failure triage
60
+
61
+ When a diff fails, classify before changing code or baseline:
62
+
63
+ 1. intentional product/design change → obtain/confirm approval, update baseline with reason;
64
+ 2. implementation regression → fix implementation and recapture;
65
+ 3. environment/tooling drift → verify on reference runtime; update metadata/tolerance narrowly if justified;
66
+ 4. nondeterministic fixture → freeze/fix fixture before trusting result;
67
+ 5. platform rendering difference → record platform-specific baseline rather than forcing pixel identity;
68
+ 6. missing provenance → treat baseline as untrusted and regenerate or retire it.
69
+
70
+ Report the classification. “Updated snapshots” is not a sufficient explanation.
@@ -0,0 +1,59 @@
1
+ # Desktop and game capture
2
+
3
+ ## Desktop windows
4
+
5
+ Capture real application windows at minimum size, default size, resize/maximized state, and high-DPI scaling. Verify native versus custom chrome, menu/shortcut behavior, focus rings, text scaling, dark/high-contrast mode, multi-window identity, dialog ownership, and restoration after minimize/resize.
6
+
7
+ Platform capture commands:
8
+
9
+ ```bash
10
+ # macOS interactive/window capture
11
+ screencapture -i -w capture.png
12
+
13
+ # Linux Wayland (wlroots/Sway/Hyprland, KDE Plasma, GNOME)
14
+ grim capture.png # wlroots compositors
15
+ spectacle -b -n -o capture.png # KDE Plasma headless background capture
16
+ gnome-screenshot -w -f capture.png # GNOME active window
17
+
18
+ # Linux X11 (ImageMagick)
19
+ import -window root capture.png
20
+ ```
21
+
22
+ ```powershell
23
+ # Windows PowerShell screen capture (System.Drawing)
24
+ Add-Type -AssemblyName System.Windows.Forms,System.Drawing
25
+ $b = [System.Windows.Forms.Screen]::PrimaryScreen.Bounds
26
+ $bmp = New-Object System.Drawing.Bitmap $b.Width, $b.Height
27
+ $g = [System.Drawing.Graphics]::FromImage($bmp); $g.CopyFromScreen($b.Location, [System.Drawing.Point]::Empty, $b.Size)
28
+ $bmp.Save("capture.png")
29
+ ```
30
+
31
+ Automated desktop drivers:
32
+
33
+ - **Electron:** launch and inspect the actual desktop window with Playwright `const app = await _electron.launch({ args: ['main.js'] }); const win = await app.firstWindow(); await win.screenshot({ path: 'app.png' });`.
34
+ - **Tauri:** drive the compiled native WebView binary with **`tauri-driver`** over WebDriver (paired with WebdriverIO or Selenium) so native IPC, window chrome, and OS webview rendering are verified end-to-end.
35
+ - Prefer platform-native capture/test tooling where available. A standalone browser preview of an Electron/Tauri frontend is not proof of desktop window chrome or native IPC behavior.
36
+
37
+ ## Game UI
38
+
39
+ Capture HUDs at target resolutions/aspect ratios, including ultrawide and minimum supported size. Validate safe-area insets, text legibility at viewing distance, controller focus path, menu pause/resume state, localization expansion, colorblind-critical cues, and damage/alert readability over real gameplay backgrounds—not isolated gray screens.
40
+
41
+ Use engine capture/profilers and playmode screenshot hooks:
42
+
43
+ - **Unity:** Game view resolution/aspect matrix, Device Simulator, `ScreenCapture.CaptureScreenshot`, frame debugger/profiler;
44
+ - **Godot:** viewport resolution/stretch modes, `get_viewport().get_texture().get_image().save_png("user://qa.png")`;
45
+ - **Unreal:** PIE viewport presets, `HighResShot` / `AutomationDriver`, safe-zone visualization, UMG focus/navigation instrumentation;
46
+ - **Bevy (Rust):** spawn `Screenshot::primary_window()` with `save_to_disk("qa.png")` observer during playmode/test scenes;
47
+ - **MonoGame (C#):** render HUD scene to `RenderTarget2D` and export via `renderTarget.SaveAsPng(stream, width, height)`;
48
+ - **LÖVE2D (Lua):** call `love.graphics.captureScreenshot("qa.png")` on deterministic test frames.
49
+
50
+ Performance claims require scene-representative frame data. Menu-only capture says nothing about combat/effects scenes.
51
+
52
+ ## Evidence checklist
53
+
54
+ - [ ] actual OS/window scale/density named;
55
+ - [ ] resize/reflow behavior captured rather than inferred;
56
+ - [ ] keyboard/controller focus order tested separately;
57
+ - [ ] fullscreen/windowed/multi-monitor behavior in scope;
58
+ - [ ] high-contrast/reduced-motion path inspected;
59
+ - [ ] game safe areas and legibility over noisy real content verified.
@@ -0,0 +1,70 @@
1
+ # Document, print, and slide capture
2
+
3
+ HTML or Typst source inspection is `static`; final document QA requires inspecting the compiled PDF or exported slide deck (`rendered`) after pagination, font subsetting, and rasterization.
4
+
5
+ ## Rasterize pages for visual inspection
6
+
7
+ Render every representative page (cover, dense text, wide table, multi-page break, chart/diagram, final page) to PNG at `150 DPI` for layout review and `300 DPI` for fine print typography and hairlines:
8
+
9
+ ```bash
10
+ # Poppler: rasterize all pages to PNG
11
+ pdftoppm -png -r 150 output.pdf qa-pages/page
12
+ pdftoppm -png -r 300 -f 1 -l 2 output.pdf qa-pages/print-check
13
+
14
+ # MuPDF alternative (fast, cross-platform)
15
+ mutool draw -r 150 -o qa-pages/page-%d.png output.pdf
16
+
17
+ # Inspect embedded raster images and resolution
18
+ pdfimages -list output.pdf
19
+ ```
20
+
21
+ Check every rasterized page for orphaned headings, broken table headers across page splits, clipped margins/bleed, ink bleed onto dark areas, and unexpected font fallback.
22
+
23
+ ## Reading order, fonts, and PDF/UA / PDF/A validation
24
+
25
+ ```bash
26
+ # Verify selectable text and logical reading order (catch garbled multi-column extraction)
27
+ pdftotext output.pdf - | head -n 80
28
+
29
+ # Verify page geometry, title, and PDF tagging metadata
30
+ pdfinfo output.pdf
31
+ pdfinfo -struct output.pdf | head -n 60
32
+
33
+ # Verify every typeface is embedded (never unembedded system substitution)
34
+ pdffonts output.pdf
35
+
36
+ # Validate PDF/A archival or PDF/UA accessibility compliance when veraPDF is installed
37
+ verapdf --flavour 2b output.pdf
38
+ verapdf --flavour ua1 output.pdf
39
+ ```
40
+
41
+ - `pdftotext` returning empty text or scrambled column order is a `P0`/`P1` defect (rasterized text or broken reading order).
42
+ - `pdffonts` showing `emb: no` for non-standard fonts means target viewers may substitute metrics and break pagination.
43
+
44
+ ## Slide decks (Slidev / Marp / PptxGenJS)
45
+
46
+ Export slides to PNG/PDF in the actual presentation aspect ratio (`16:9` default, or `4:3` when specified):
47
+
48
+ ```bash
49
+ # Slidev slide PNG/PDF export
50
+ npx slidev export --format png --output qa-slides/
51
+ npx slidev export --format pdf --output deck.pdf
52
+
53
+ # Marp CLI export
54
+ npx @marp-team/marp-cli slides.md --images png -o qa-slides/slide.png
55
+ npx @marp-team/marp-cli slides.md --pdf -o deck.pdf
56
+ ```
57
+
58
+ Inspect exported slides at thumbnail scale and full-room viewing distance:
59
+
60
+ - **Projector contrast:** low-contrast muted gray text (`< 4.5:1`) and thin 1px hairlines wash out on lit conference projectors; test high-contrast legibility.
61
+ - **Density & overflow:** verify zero clipped bullets, overlapping footers/page numbers, or unreadable tiny code/chart labels (`≥ 18–24 pt` equivalent body text on slides).
62
+ - **Color & monochrome print:** test grayscale/print preview for documents expected to be printed on office laser printers.
63
+
64
+ ## Evidence checklist
65
+
66
+ - [ ] compiled PDF/slide artifact rasterized at `150–300 DPI` and visually inspected (`rendered`);
67
+ - [ ] `pdftotext` reading order and selectable text verified (`rendered`);
68
+ - [ ] `pdffonts` confirms all custom fonts embedded (`static`/`rendered`);
69
+ - [ ] `pdfinfo` / `verapdf` PDF/UA or PDF/A check run where in scope, or labeled `not-checked`;
70
+ - [ ] page breaks, running headers/footers, bleed/safe margins, and grayscale/projector contrast checked.
@@ -0,0 +1,38 @@
1
+ # Email render testing
2
+
3
+ Email clients mutate HTML. A browser screenshot of the source file is useful static/development evidence but is not proof of Outlook, Gmail, Apple Mail, or mobile-client rendering.
4
+
5
+ ## Practical matrix
6
+
7
+ Prioritize actual audience analytics. Otherwise inspect at minimum:
8
+
9
+ - **Classic Outlook for Windows (Word HTML engine)** when enterprise Win32 clients remain in scope (`mso-*` conditionals, VML buttons, strict table widths);
10
+ - **New Outlook for Windows / Outlook on the Web (WebView2 / modern Chromium)** — renders modern CSS differently from Classic Outlook; verify both rather than assuming one proves the other;
11
+ - **Gmail web & mobile** — strips unsupported `<style>` rules and **clips any email whose HTML payload exceeds `102 KB`** (`[Message clipped] View entire message`), hiding footers and unsubscribe links;
12
+ - **Apple Mail / iOS Mail** dark-mode treatment (`prefers-color-scheme: dark` + `color-scheme` meta tags);
13
+ - plain-text multipart output;
14
+ - images blocked and images loaded;
15
+ - narrow mobile width (`375–390 px`) and desktop reading pane.
16
+
17
+ ### Local SMTP inspection and cross-client render matrices
18
+
19
+ - **Local SMTP capture (`Mailpit` or `Mailhog`):** send real MIME messages locally during development to inspect rendered HTML preview, plain-text parity, headers, link targets, spam/HTML checks, and **exact HTML byte size (`< 102 KB`)** before touching external inboxes.
20
+ - **Commercial render matrices (Litmus, Email on Acid):** use for broad live client screenshots across OS/client combinations. Manual test accounts are weaker but honest evidence. Always label provider, client, version, and date because email rendering changes without notice.
21
+
22
+ ## What to inspect
23
+
24
+ - subject/preheader parity and no hidden-content dependence;
25
+ - alt text meaningful when images are blocked;
26
+ - background images absent or gracefully degraded;
27
+ - dark-mode inversion does not destroy logos, icons, or contrast;
28
+ - CTA bulletproof enough in both Classic Outlook (Word) and New Outlook (WebView2) / Gmail / Apple Mail;
29
+ - table layout does not collapse or horizontally scroll essential content;
30
+ - plaintext version preserves links and meaning;
31
+ - **Gmail `102 KB` clipping gate:** measure compiled HTML byte size (e.g., `wc -c email.html`) and keep safely under `102 KB` (target `< 90 KB` to leave headroom for ESP tracking/rewriting).
32
+
33
+ ## Rules
34
+
35
+ - Never claim cross-client compatibility from one browser render or Mailpit preview alone (label browser/Mailpit preview honestly and mark untested clients `not-checked`).
36
+ - Never depend on external CSS, scripting, video, or forms in email clients.
37
+ - Redact recipient data before storing screenshots.
38
+ - Compare content with the plaintext version for semantic parity.
@@ -0,0 +1,50 @@
1
+ # Mobile capture
2
+
3
+ ## iOS Simulator
4
+
5
+ ```bash
6
+ xcrun simctl list devices available
7
+ xcrun simctl boot "<Current iPhone Simulator>"
8
+ xcrun simctl ui booted appearance dark
9
+ xcrun simctl ui booted content_size accessibility-extra-extra-large
10
+ xcrun simctl io booted screenshot capture-dark-axxl.png
11
+ # Restore defaults afterward
12
+ xcrun simctl ui booted appearance light
13
+ xcrun simctl ui booted content_size large
14
+ ```
15
+
16
+ Capture the smallest and largest supported device classes when layout behavior differs. Exercise Dynamic Type sizes, dark mode, landscape/split multitasking where supported, safe-area edges, keyboard presentation, and VoiceOver focus order. Simulator evidence is `rendered` but not physical-device performance/touch evidence.
17
+
18
+ ## Android emulator/device
19
+
20
+ ```bash
21
+ adb devices
22
+ adb shell cmd uimode night yes
23
+ adb shell settings put system font_scale 1.3
24
+ adb exec-out screencap -p > capture-dark-large.png
25
+ # Restore defaults afterward
26
+ adb shell cmd uimode night no
27
+ adb shell settings put system font_scale 1.0
28
+ ```
29
+
30
+ Use emulator device definitions matching target API/density. Capture gesture-navigation edge conflicts, display cutouts, keyboard, dark/high-contrast text, font scaling, orientation/foldable resize, and TalkBack focus order. Restore changed settings. Physical-device evidence is stronger for touch, performance, haptics, and camera/sensor behavior.
31
+
32
+ ## Automated mobile UI & golden tests
33
+
34
+ - **Maestro (`maestro test flow.yaml`):** cross-platform declarative flows for iOS and Android driving real user tasks, assertions, and `takeScreenshot` captures.
35
+ - **Detox:** gray-box E2E test runner for React Native synchronizing with animations/network and capturing device screenshots on key steps.
36
+ - **Flutter golden tests:** `expectLater(find.byType(Screen), matchesGoldenFile('goldens/screen.png'))` via `flutter test` (`--update-goldens` only on intentional, reviewed UI changes); note golden tests run in Flutter's headless widget rasterizer, so pair with real simulator/device verification for fonts, platform views, and safe areas.
37
+
38
+ ## Responsive web emulation
39
+
40
+ Browser emulation is useful for viewport geometry, DPR, touch hit layouts, and media queries. It is not proof of mobile browser chrome behavior, thermal/CPU performance, haptics, safe-area hardware, or platform accessibility. Label it browser emulation.
41
+
42
+ ## Checklist
43
+
44
+ - [ ] smallest supported width/device and large/device rotation;
45
+ - [ ] system text scaling at default and a larger setting;
46
+ - [ ] dark mode and high-contrast text where supported;
47
+ - [ ] keyboard open and closed for form screens;
48
+ - [ ] safe-area/cutout/navigation-edge conflict;
49
+ - [ ] empty/loading/error/offline state on at least one key screen;
50
+ - [ ] accessibility focus path separately verified; screenshots alone do not prove it.
@@ -0,0 +1,35 @@
1
+ # Terminal capture
2
+
3
+ ## tmux
4
+
5
+ ```bash
6
+ tmux new-session -d -s qa -x 100 -y 30 'your-command'
7
+ tmux capture-pane -t qa -p -e > capture-ansi.txt
8
+ tmux capture-pane -t qa -p -J > capture-plain.txt
9
+ tmux kill-session -t qa
10
+ ```
11
+
12
+ `-e` preserves escape sequences; `-J` joins wrapped lines. Resize the pane and recapture to verify grid adaptation. Test keyboard input with `tmux send-keys`; do not infer keyboard behavior from a static capture alone.
13
+
14
+ ## Recording and framework snapshots
15
+
16
+ - `asciinema rec session.cast` records timing/input for review and sharing.
17
+ - VHS uses a `.tape` script to produce deterministic terminal GIF/video when installed.
18
+ - Framework snapshot & golden runners provide deterministic layout/interaction evidence (still pair with a live PTY test for real terminal color/resize behavior):
19
+ - **Python (Textual):** `pytest-textual-snapshot` (SVG render snapshots across sizes/themes);
20
+ - **Rust (Ratatui):** `TestBackend` + `insta` buffer snapshots;
21
+ - **Go (Bubble Tea):** `teatest` (`github.com/charmbracelet/x/exp/teatest`) driving `Send()` / `Type()` input and asserting `RequireEqualOutput` golden captures;
22
+ - **Node/TypeScript (Ink):** `ink-testing-library` (`render()`, `lastFrame()`, `stdin.write()`) verifying rendered frames and keyboard navigation states.
23
+
24
+ ## Terminal constraints to capture
25
+
26
+ | Constraint | Evidence needed |
27
+ |---|---|
28
+ | width/height | narrow, short, resize during execution |
29
+ | color | truecolor, 256-color, 16-color, `NO_COLOR` where supported |
30
+ | unicode | ASCII fallback for box/emoji characters |
31
+ | input | focus/selection/help/dismiss/keyboard-only flow |
32
+ | scrollback | content does not destroy shell history unexpectedly |
33
+ | interactivity | graceful behavior when stdout is not a TTY |
34
+
35
+ Report terminal emulator, shell, dimensions, locale, color environment, and whether output was live, replayed, or snapshot-generated.
@@ -0,0 +1,71 @@
1
+ # Visual critique rubric
2
+
3
+ Use this rubric after capture, never as a substitute for capture. Rank findings by user impact rather than visual preference.
4
+
5
+ ## Evidence hierarchy
6
+
7
+ 1. physical device/platform chrome (`rendered`);
8
+ 2. simulator/emulator/browser runtime (`rendered`, labeled as emulation);
9
+ 3. deterministic snapshot backend (`rendered` for layout/text raster only, not interaction truth);
10
+ 4. static geometry/style/code inference (`static`);
11
+ 5. model interpretation of a screenshot (`model-judgment`).
12
+
13
+ Never upgrade a label because the screenshot looks convincing.
14
+
15
+ ## Inspection order
16
+
17
+ | Layer | Questions |
18
+ |---|---|
19
+ | task | Can the primary action be found and completed? Is state feedback unambiguous? |
20
+ | platform | Does chrome, navigation, target size, focus, safe area, scaling, and input behavior fit the host? |
21
+ | hierarchy | Do eye path, grouping, spacing, and emphasis match importance? Is anything competing with the primary task? |
22
+ | legibility | Are type size, line length, contrast, truncation, wrapping, script shaping, and icon recognition adequate in context? |
23
+ | geometry | Check edges first: clipping, overlap, unintended scroll, off-screen controls, cramped resize, unstable aspect ratios. |
24
+ | state | Loading/empty/error/offline/permission/long-content/disabled/selected/focus states visible and truthful? |
25
+ | theme/motion | Do dark/high-contrast modes preserve semantic contrast? Does reduced motion preserve meaning? |
26
+ | distinctiveness | Does the result express the chosen direction and subject, or could any product reuse it unchanged? |
27
+ | performance | Is interaction responsive, layout stable, and media cost proportionate? |
28
+
29
+ ## Severity guide
30
+
31
+ - **P0:** primary task impossible, unreadable, inaccessible, deceptive, or destructive.
32
+ - **P1:** major state/navigation/platform failure or essential content clipped/invisible.
33
+ - **P2:** comprehension, efficiency, trust, contrast, localization, or layout defect with a workaround.
34
+ - **P3:** optical refinement that does not change task success.
35
+
36
+ ## Critique format
37
+
38
+ ```text
39
+ [P1][rendered][high] 390px light capture: checkout button is clipped at the right edge.
40
+ Evidence: captures/390x844-light-motion.png, right-bottom quadrant.
41
+ Fix: move the action into the normal flow before the safe-area inset; do not hide overflow.
42
+ Residual: physical touch target not checked.
43
+ ```
44
+
45
+ ## Anti-patterns
46
+
47
+ - “Looks clean/premium/modern” without evidence or criteria.
48
+ - Fixing alignment by magic numbers instead of correcting layout constraints.
49
+ - Cropping captures to avoid edge defects.
50
+ - Treating a full-page screenshot as proof of keyboard, screen-reader, motion, or runtime behavior.
51
+ - Redesigning the product during a QA pass; report direction-level concerns separately.
52
+
53
+ ## Critic calibration and iteration control
54
+
55
+ Model-based screenshot critique is useful but unreliable. Treat each finding as a hypothesis until tied to observable evidence:
56
+
57
+ 1. **Require localization.** Name capture, region/element/state, expected behavior, actual pixels/behavior, and why it matters.
58
+ 2. **Assign confidence.** `high` means directly visible/deterministic; `medium` means strong inference but context-dependent; `low` means speculative and must not drive layout churn.
59
+ 3. **Separate defect from preference.** A defect violates task/floor/platform/direction evidence. Preference requires explicit authority before redesign.
60
+ 4. **Suppress duplicates.** Group symptoms with the same layout/token/root cause rather than generating many independent-looking findings.
61
+ 5. **Track false positives.** If inspection disproves a critic finding, record the false positive and tighten subsequent prompts/criteria instead of repeating it.
62
+ 6. **Do not degrade across iterations.** Each repair round must address a specific deterministic defect and recapture only affected evidence. Stop when new findings are low-confidence, contradictory, or increasingly cosmetic.
63
+ 7. **Preserve positives.** Do not fix one defect by destroying hierarchy, contrast, spacing rhythm, accessibility, or performance elsewhere; inspect regression risk after repair.
64
+
65
+ Stopping is valid when the remaining findings are speculative, require user/business evidence, or cost more than their user impact. Mark them `not-checked` or deferred with consequence.
66
+
67
+ ## DOM evidence paired with pixels
68
+
69
+ When browser automation is available, pair screenshot inspection with a DOM/style inventory: rendered font families and sizes, foreground/background color counts by area, maximum content width, estimated uncovered viewport area, cursor overrides, motion-library signals, detected reduced-motion and focus-visible CSS, transfer/request counts, landmarks, heading-order jumps, missing alt attributes, and sampled text contrast.
70
+
71
+ These measurements are leads with context. Cross-origin stylesheets can hide CSS evidence; canvas/WebGL text is invisible to DOM typography; overlap/whitespace estimates cannot understand meaning. Inspect the capture before acting. Do not claim an accessibility pass from this extraction.
@@ -0,0 +1,35 @@
1
+ # Finish gate for UI flows
2
+
3
+ Use this gate before reporting a new or materially changed UI flow as complete. For a small visual change outside such a flow, verify the affected surface and report the narrower scope. Do not turn a scoped review into a pass for the application.
4
+
5
+ 1. **Define scope before verification.** Record route/window, target revision or build, fixture, primary task, expected success and relevant states. Use a disposable/sandboxed fixture for external or destructive effects as described in [task verification](task-verification.md).
6
+ 2. **Collect evidence.** For responsive web, inspect pixels at 390, 768 and 1440 CSS px; add 320 for reflow-sensitive work (e.g. navigation, forms, dense text or a supported 320 px viewport). Add landscape and short-height cases and each distinct applicable class from the plan. Record width × height, input modality and what changed (navigation, density, controls); exercise the task and at least one relevant resize/rotation transition without losing focus, selection or draft input. Execute the task with a real keyboard and inspect focus visibility and order. For other surfaces use representative sizes and actual input/focus conventions. Capture error, empty, loading, theme and reduced-motion cases when applicable. Use the actual app or a labeled emulation.
7
+ 3. **Assert an outcome.** A checked end state must prove a task-specific change (e.g. saved row survives reload or invalid input remains while the error is announced), not just page load, a clean console or a screenshot. Use an executed assertion with test output/trace, or an observed live interaction recorded with its result and artifact. A mock response or demo controls prove only the labeled fixture scope; a stub never proves the production action. `shoot.mjs` is layout evidence, not an outcome test.
8
+ 4. **Record defects and repair.** Put confirmed deterministic findings under `checks` with stable IDs (e.g. `checkout-submit-clipped`). Inspect the rendered lead before claiming failure. Normally use one round; for reproducible, measurable defects use up to three total rounds, preserving before/after artifacts and rerun results. Never shrink coverage, hide content/overflow, weaken assertions, change the fixture, or update a baseline just to go green. A taste observation belongs in critique, not the gate. Do not restart the round count for the same scoped flow.
9
+ 5. **Report.** Run `node scripts/finish-gate.mjs path/to/evidence.json`. Report `PASS`, `FAIL`, `OPEN` (confirmed failure remains after round three), or `NOT CHECKED` with remaining failures, unchecked scope, non-applicability reasons and supporting artifacts. Missing required evidence remains visible even when a confirmed failure sets the status. A waiver cannot satisfy a required check; if the user chooses to ship anyway, report the same unresolved status and their decision.
10
+
11
+ ## Evidence manifest
12
+
13
+ Store the manifest beside redacted evidence files. The command validates scope and record completeness, not the truth or contents of artifacts; a reviewer must inspect them. Use one manifest per primary flow; keep the required coverage fixed across rounds.
14
+
15
+ `schemaVersion` is `1`. Set `surface` to `responsive-web` or `other`. Supply nonempty `target`, `revision`, `task`, and `fixture` (include runtime, locale, and data/emulation context as appropriate). Set `applicability` with `error`, `empty`, `loading`, `theme`, `reduced-motion`, and (web only) `reflow-320`. Each is `true` or `{"applies":false,"reason":"specific product reason"}`. Tool unavailability is not a reason to mark a state inapplicable.
16
+
17
+ In `checks`, include `outcome`, `input`, and `width-390`, `width-768`, `width-1440` (web) or `layout` (other), plus every applicable ID above. Use objects like:
18
+
19
+ ```json
20
+ {
21
+ "result": "pass",
22
+ "label": "rendered",
23
+ "method": "Playwright, invite with test mailbox, reload list",
24
+ "expected": "Pending invite persists after reload",
25
+ "observed": "test@example.test shown once with Pending state after reload",
26
+ "artifact": "invite-trace.zip",
27
+ "assertion": "expect(inviteRow).toHaveCount(1) after reload"
28
+ }
29
+ ```
30
+
31
+ - `outcome` also requires `assertion`; `input` requires `focus` (what visibly focused; order/restoration) and web `modality: "keyboard"`. Width checks require numeric `width` matching `reflow-320`, `width-<px>`, or a width-scoped defect ID such as `width-390-submit`. For a state or theme, record the states/modes actually exercised in `method` and expected/observed results.
32
+ - For responsive web, declare `layoutMatrix` with at least `layout-landscape` and `layout-short-height`. Add a `layout-<class>` entry for each distinct planned case not covered by a base width check. Use `{"width":844,"height":390}` (CSS px) or `{"applies":false,"reason":"specific product reason"}`. Each applicable entry requires a matching `checks` ID with the same numeric `width` and `height`, the input/transition exercised in `method`, and observed task/control evidence. Short-height checks use a viewport below 600 CSS px tall and a separate artifact from `width-1440`; this is a verification threshold, not a layout breakpoint. A blocked device or tool is `not-checked`, not a product exclusion. Update older responsive evidence manifests with these rows before reporting `PASS`.
33
+ - Use `result: "fail"` for confirmed failures. For a blocked or unrun check use `result: "not-checked"` and a `reason`; never label static evidence rendered.
34
+ - `artifact` is a nonempty local file path relative to the manifest directory (screenshot, trace or result log as appropriate). Do not paste secrets or rely on externally mutable debug output.
35
+ - `rounds` starts as `[]`. Append one object per actual repair-and-retest cycle with `failure`, `reproduction`, `change`, `rerun`, and distinct `before`/`after` evidence paths. Every `failure` names a current check ID whose rendered result is required even after the defect passes. Keep the prior failure evidence.
@@ -0,0 +1,30 @@
1
+ # Measured craft by surface
2
+
3
+ State the craft claim and expected result before capturing. Compare the same fixture, revision pair, input sequence, theme, locale, device/client/renderer version, and geometry. Record changes in cache, throttling, data, capture timing or OS if you cannot hold them fixed. Store comparable artifacts and inspect the path that matters; do not reward a prettier screenshot when task success regresses.
4
+
5
+ | Surface | Evidence to capture instead of a generic browser score |
6
+ |---|---|
7
+ | Responsive web | Identical 390/768/1440 captures and browser inventory for changed flows; add 320 when reflow-sensitive. Compare type, palette, estimated geometry, motion signals, initial/deferred requests and vitals; execute the actual interaction and inspect reduced-motion separately. |
8
+ | Mobile / constrained | Device or clearly labeled emulator at supported scaling and insets; capture interrupted/resumed task, first usable state and reduced/disabled animation. Include physical distance or input limits when relevant. |
9
+ | Desktop / extensions | Host window at minimum size and target scale, native theme and keyboard state; capture action and restoration, plus startup or input latency if that is the claim. |
10
+ | Game / spatial | Target controller and viewing distance; capture a sequence against changing scene backgrounds or object depths, focus/motion options and frame timing under load. No device means mark device claims unchecked. |
11
+ | TUI | Terminal recording or snapshots with exact rows/columns, locale and terminal capability; measure resize recovery, focus, prompt feedback and non-color fallback. |
12
+ | Email / document / media | Actual sent/exported artifact in supported client, PDF reader, print, projector or thumbnail renderer. Inspect images off, page breaks, plain text/reading order, final crop or compressed playback as applicable. |
13
+ | Chat / data / dataviz | Capture action acknowledgement, failure/empty/expired response, filtering or stale-data transition; inspect comparable scales, text alternatives and client-specific fallbacks. |
14
+
15
+ ## Browser before/after
16
+
17
+ Use the existing inventory for a changed view where it can answer a question. Use the same target, fixture and settings for both revisions:
18
+
19
+ ```sh
20
+ node scripts/style-inventory.mjs http://localhost:3000 --breakpoints 390x844,768x1024,1440x900 --out before-inventory.json
21
+ # Apply the scoped change and run the same fixture again:
22
+ node scripts/style-inventory.mjs http://localhost:3000 --breakpoints 390x844,768x1024,1440x900 --out after-inventory.json
23
+ node scripts/shoot.mjs http://localhost:3000 --breakpoints 390x844,768x1024,1440x900 --out visual-qa
24
+ ```
25
+
26
+ The inventory uses optional Playwright/Chromium and CDP. Computed font families are not per-glyph proof; the palette omits many image effects; geometric whitespace is an estimate; script names and media-query rules are not proof of active or reduced animation. Payload is specific to cache and load timing. Use a Chrome DevTools Performance or Network trace when you need to attribute a web regression; use platform-native profiling for non-browser claims. Do not turn gallery medians into targets. Label a missing renderer, fixture or untested motion path `not-checked`.
27
+
28
+ For a canvas-, video-, or image-led first screen, label the art layer separately before using DOM color, whitespace, font counts, or content width to critique it. A full-bleed plane can drive geometric whitespace to zero while the image itself has negative space; an intro or consent overlay can dominate the sampled text. Inspect paired captures with region names and capture times, and compare equivalent scene states rather than folding dissimilar captures into one range.
29
+
30
+ When claiming a lighter static or compact alternative, start fresh default and reduced-motion contexts at the same viewport, select the setting before navigation, and replay the same entry task. Check requests and initialization for the specific scene, not just total bytes or CSS rules. Repeat at the supported landscape or short-height viewport if the shell recomposes. Distinguish an unneeded scene that never initializes from a needed scene that loads later on explicit request.
@@ -0,0 +1,63 @@
1
+ # Motion capture and verification
2
+
3
+ A screenshot is one frame, not proof that motion works. For a motion task, capture visual milestones, active animations, and the transition between states under both default and reduced-motion modes.
4
+
5
+ ## Capture plan
6
+
7
+ - Record target route, build/revision, viewport, DPR, browser, input modality, state, and reduced-motion setting.
8
+ - Capture named timeline milestones: initial, mid-transition, settled/completed state, interrupted/closed state, and reduced-motion fallback.
9
+ - Record a screen video or interaction trace when timing, scrub, hover, drag, or route transitions matter.
10
+ - Test fast/reverse scroll, scrollbar drag, anchor navigation, resizing, font/image load, tab hide/show, route unmount, and reduced motion.
11
+ - Repeat with keyboard and touch; do not report pointer-only evidence as full interaction coverage.
12
+ - Check zero hidden copy, lost focus, layout shift, input blocking, or orphaned looping animations after navigation.
13
+
14
+ ## Concrete Playwright / Chromium capture commands
15
+
16
+ ```js
17
+ // Record video + Playwright trace + inspect Web Animations + verify reduced motion
18
+ const context = await browser.newContext({
19
+ viewport: { width: 1280, height: 720 },
20
+ recordVideo: { dir: 'visual-qa/videos', size: { width: 1280, height: 720 } },
21
+ });
22
+ await context.tracing.start({ screenshots: true, snapshots: true, sources: false });
23
+ const page = await context.newPage();
24
+ await page.goto(url, { waitUntil: 'networkidle' });
25
+
26
+ // Inspect active animations (catch stuck loops or non-compositor transitions)
27
+ const running = await page.evaluate(() =>
28
+ document.getAnimations().map((a) => ({
29
+ name: a.animationName || a.transitionProperty || a.id,
30
+ playState: a.playState,
31
+ duration: a.effect?.getTiming().duration,
32
+ }))
33
+ );
34
+
35
+ // Verify reduced-motion path explicitly
36
+ await page.emulateMedia({ reducedMotion: 'reduce' });
37
+ await page.screenshot({ path: 'visual-qa/reduced-motion.png' });
38
+
39
+ await context.tracing.stop({ path: 'visual-qa/motion-trace.zip' });
40
+ await context.close(); // flushes recorded video file
41
+ ```
42
+
43
+ For Chromium DevTools main-thread/compositor frame traces, wrap the interaction with `browser.startTracing(page, { path: 'visual-qa/perf-trace.json', screenshots: true })` and `await browser.stopTracing()`.
44
+
45
+ ### Extract transition frames with FFmpeg
46
+
47
+ Convert recorded video into numbered PNG frames to inspect easing continuity, mid-flight clipping, and focus-ring stability:
48
+
49
+ ```bash
50
+ mkdir -p visual-qa/frames
51
+ ffmpeg -i visual-qa/videos/transition.webm -vf "fps=12" visual-qa/frames/frame-%03d.png
52
+ ```
53
+
54
+ ## Determinism
55
+
56
+ - Freeze random seeds and virtual clocks when possible.
57
+ - Use stable content/fixtures and wait for `document.fonts.ready` and media decode before capturing.
58
+ - Keep capture scale and viewport identical for before/after comparisons.
59
+ - Store screenshots, videos, and traces alongside an evidence manifest, redact sensitive content, and name the exact tested state.
60
+
61
+ ## Evidence label
62
+
63
+ Mark actual screen recording, extracted frames, or browser trace output `rendered`; source inspection `static`; visual taste comments `model-judgment`; inaccessible devices `not-checked`.
@@ -0,0 +1,78 @@
1
+ # Performance budgets
2
+
3
+ Budgets are user-experience constraints, not score chasing. Set them during planning and measure in the real runtime whenever possible.
4
+
5
+ ## Core Web Vitals & 3-run median Lighthouse
6
+
7
+ | Metric | Good threshold | What it represents |
8
+ |---|---:|---|
9
+ | LCP | ≤ 2.5 s at p75 | largest contentful paint / perceived loading |
10
+ | INP | ≤ 200 ms at p75 | interaction responsiveness |
11
+ | CLS | ≤ 0.1 at p75 | visual stability |
12
+ | **Lighthouse (3-run median)** | **Perf ≥ 90, A11y ≥ 95, BP ≥ 95, SEO ≥ 95** | **3-run median under 4G throttling on both mobile and desktop for every primary template** (with real tags active) |
13
+
14
+ Use field data when available. Lighthouse/WebPageTest/local tracing are lab `rendered` evidence (never `static`—**Rule #0.3**). Always capture a **Network waterfall on the heaviest page** alongside the 3-run Lighthouse medians and cross-browser/device verification (`Chrome`, `Firefox`, `Edge`, `Safari macOS`, real `Safari iOS`, `Chrome Android`).
15
+
16
+ ## Interaction and frame budgets
17
+
18
+ | Surface | Budget |
19
+ |---|---|
20
+ | pointer/keyboard acknowledgment | visible feedback within `<= 100 ms`; `> 1 s` progress indicator; `> 10 s` cancellable action |
21
+ | ordinary 60 Hz frame | 16.7 ms total frame budget; leave main-thread headroom |
22
+ | high-refresh/game frame | 11.1 ms at 90 Hz, 8.3 ms at 120 Hz; engine/platform dependent |
23
+ | scrolling/dragging (`LoAF` + flash safety) | zero blocking **Long Animation Frames (`LoAF`)** on scroll/drag; virtualization for large lists; `<= 3 Hz` luminance flash cap (`WCAG 2.3.1`) |
24
+ | startup | meaningful skeleton/first useful surface before decorative assets |
25
+
26
+ ## Initial web asset budgets by surface class
27
+
28
+ Adjust by surface class and lock the target in `.pixelcraft/plan.md` + `.pixelcraft/acceptance.json`:
29
+
30
+ | Surface class | Initial compressed JS+CSS | Notes |
31
+ |---|---:|---|
32
+ | Content / editorial | ≤ 150–250 KB | prioritize fonts/images and stable measure |
33
+ | Dashboard / app | ≤ 250–450 KB | route-level splitting; avoid chart/map cost on unrelated routes |
34
+ | Promotional / rich experience | ≤ 350–700 KB | media-heavy work needs explicit loading/adaptive quality |
35
+ | Embedded widget | ≤ 100–200 KB | host page pays additional cost |
36
+
37
+ Fonts: subset and limit families/weights; use `font-display` appropriate to content. Images: responsive sizes, modern formats when supported, explicit dimensions to prevent CLS. Video/3D: adaptive quality, poster/loading state, reduced-motion/data path.
38
+
39
+ ## Measurement commands and signals
40
+
41
+ - Browser: Performance panel, **3-run median Lighthouse** (4G throttled mobile + desktop per primary template), **Network waterfall capture on the heaviest page**, `performance.measure`, **INP** 3-phase breakdown (input delay + processing + presentation delay), **Long Animation Frames (`long-animation-frame` / LoAF)** on scroll/drag for script-level jank attribution, coverage, and bundle analyzer.
42
+ - Responsiveness engineering: break up long main-thread work with `scheduler.yield()` (fallback `setTimeout(..., 0)`) so user input paints within `≤ 200 ms`; on multi-page sites, evaluate the **Speculation Rules API** (`prefetch`/`prerender` with `eagerness: "moderate"`) for near-instant navigation while respecting data-saver and auth/logout exclusions.
43
+
44
+ ```js
45
+ // Yield to the main thread during heavy client work so INP stays <= 200ms
46
+ async function yieldToMain() {
47
+ if ('scheduler' in globalThis && typeof scheduler.yield === 'function') {
48
+ await scheduler.yield();
49
+ } else {
50
+ await new Promise((r) => setTimeout(r, 0));
51
+ }
52
+ }
53
+ ```
54
+ - Native/mobile: platform profiler, frame-time instrumentation, startup tracing, memory/energy impact.
55
+ - Game: engine profiler, CPU/GPU frame breakdown, texture/font atlas cost, worst-scene capture—not menu-only measurement.
56
+ - Terminal: startup latency, resize redraw cost, input echo latency; snapshot tests do not measure runtime performance.
57
+
58
+ ## Budget failure response
59
+
60
+ 1. identify the user-visible symptom and measurement context;
61
+ 2. attribute cost before deleting features;
62
+ 3. fix the largest causal cost (blocking work, payload, layout instability, memory pressure);
63
+ 4. remeasure the same surface;
64
+ 5. report before/after numbers or `not-checked` honestly.
65
+
66
+ ## Rendered payload inventory
67
+
68
+ For web surfaces, record total compressed transfer, JavaScript transfer, CSS/media/font cost where available, request count, LCP, CLS, and whether the measurement was cold, warm, cached, throttled, or emulation. Separate requests/bytes initiated before document load from deferred or idle work so a heavy initial payload cannot hide inside a lazy-loading total. In the live corpus of high-end marketing, portfolio, product, editorial, and gallery pages, the desktop median was approximately **3.1 MB compressed transfer and 103 requests**; the upper quartile reached **6.1 MB and 137 requests**, and the worst decile approached **9.9 MB and 217 requests**. Treat those numbers as calibration for how costly polished work can become, not as acceptable budgets.
69
+
70
+ Keep the mode budgets above as defaults. If a Persuade/Experience direction requires more payload, record the user-facing reason, the expected network/device cost, what is deferred or adaptive, and the explicit waiver owner. Never use visual ambition itself as the waiver.
71
+
72
+ Watch for two recurring live-production regressions:
73
+ - **Zero-CLS, slow-LCP hydration trap**: product sites frequently achieve near-zero CLS (`≤ 0.002`) while still shipping 600 KB–1.5 MB of compressed JS that pushes LCP past 3–6 seconds. Keep critical hero text/media server-rendered and unblocked by client bundles or excessive font preloads.
74
+ - **Deferred third-party/media stalling `load`**: heavy video, WebGL scenes, or third-party scripts can hold the document `load` event open well past interactive readiness; isolate them below the fold, lazy-load after first paint, and verify both `DOMContentLoaded` and LCP.
75
+
76
+ ## Style inventory evidence
77
+
78
+ Use `scripts/style-inventory.mjs` when a browser runtime is available. Its JSON output separates typography, palette, layout geometry, cursor/motion signals, initial/deferred payload and resource-type breakdowns, and basic semantic checks so critique starts from measurements rather than taste adjectives.