@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,619 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Zero-dependency Studio-Grade ($10k-$20k+) UI/FE Acceptance Checklist & Grading Gate.
4
+ *
5
+ * Enforces:
6
+ * 1. Universal Baseline (A1-A8)
7
+ * 2. Shared 12-Row Surface Acceptance Matrix
8
+ * 3. Platform-Specific Measurable Thresholds, Checklist Gates & Deliverable Artifacts (14 platforms)
9
+ * 4. Evidence-Label Rule #0.3: `static` and `model-judgment` NEVER count as `pass` for
10
+ * visual appearance, measured performance, or interactive/assistive accessibility rows.
11
+ * 5. 3-Tier Final Verdict: FAIL (exit 1), PENDING_RENDERED_ENV (exit 2, or 0 with --allow-not-checked),
12
+ * PASS_STUDIO_10K_20K (exit 0), EXCEEDS_STUDIO (exit 0).
13
+ */
14
+ import fs from 'node:fs';
15
+ import path from 'node:path';
16
+ import { fileURLToPath } from 'node:url';
17
+
18
+ const CANONICAL_LABELS = new Set(['rendered', 'static', 'model-judgment', 'not-checked', 'waived']);
19
+ const LAZY_TEXT_RE = /^(?:n\/?a|none|ok|yes|done|pass|passed|true|todo|tbd|wip|skip|skipped|-|\.+)$/i;
20
+
21
+ const PLATFORM_ALIASES = {
22
+ web: 'web',
23
+ 'responsive-web': 'web',
24
+ mobile: 'mobile',
25
+ ios: 'mobile',
26
+ android: 'mobile',
27
+ desktop: 'desktop',
28
+ tui: 'tui',
29
+ cli: 'tui',
30
+ email: 'email',
31
+ document: 'document',
32
+ pdf: 'document',
33
+ slides: 'document',
34
+ 'data-apps': 'data-apps',
35
+ dataviz: 'data-apps',
36
+ dashboard: 'data-apps',
37
+ 'game-ui': 'game-ui',
38
+ game: 'game-ui',
39
+ extensions: 'extensions',
40
+ plugin: 'extensions',
41
+ 'chat-ui': 'chat-ui',
42
+ bot: 'chat-ui',
43
+ ai: 'chat-ui',
44
+ constrained: 'constrained',
45
+ embedded: 'constrained',
46
+ tv: 'constrained',
47
+ spatial: 'spatial',
48
+ xr: 'spatial',
49
+ media: 'media',
50
+ og: 'media',
51
+ brandkit: 'brandkit',
52
+ brand: 'brandkit',
53
+ };
54
+
55
+ const BASELINE_ITEMS = [
56
+ {
57
+ id: 'A1-strategy-and-scope',
58
+ title: 'Brief records business goal, primary persona, JTBD, 1-2 conversion CTAs, numeric KPIs, locked route/IA map, anti-goals, OS/browser/locale matrix, and real/near-real copy (zero lorem ipsum or invented proof).',
59
+ requiresRendered: false,
60
+ },
61
+ {
62
+ id: 'A2-design-system-tokens',
63
+ title: 'Semantic tokens (color roles, type, spacing, radius, elevation, z-index, motion), token-backed light/dark modes without hardcoded hex, full component variants/states, multi-target code export, and naming/deprecation docs.',
64
+ requiresRendered: false,
65
+ },
66
+ {
67
+ id: 'A3-rendered-state-matrix',
68
+ title: 'All 9 state families designed and rendered: loading skeleton/progress, empty + next action, 1/many items, long/missing data truncation, 4xx/5xx/network/validation error recovery, offline retry preserving input, permission-denied path, idempotent double-submit lock, and cancel/confirm/undo.',
69
+ requiresRendered: true,
70
+ },
71
+ {
72
+ id: 'A4-accessibility-floor',
73
+ title: 'WCAG 2.2 AA / platform equivalent: native controls first, accessible names + persistent visible labels, >=4.5:1 text & >=3:1 UI contrast, non-color meaning, full keyboard/remote/controller path with unobscured focus, single-pointer drag alternative, reduced motion, 200% text scaling without clipping, paste-allowed auth, and real screen-reader test.',
74
+ requiresRendered: true,
75
+ },
76
+ {
77
+ id: 'A5-internationalization-and-ime',
78
+ title: 'No concatenated grammar (plural-capable i18n), ~35% prose & +50-100% short-label pseudo-locale expansion without clipping, locale date/time/number/currency formatting, RTL mirroring when in scope, CJK/Thai/Devanagari/Vietnamese stacked-diacritic NFC font fallback, and active IME Enter-composition safety.',
79
+ requiresRendered: true,
80
+ },
81
+ {
82
+ id: 'A6-performance-and-stability',
83
+ title: 'Direct input acknowledged within <=100ms, >1s tasks show progress, >10s tasks are cancellable, zero layout shift during load, and SOW payload/frame/memory/startup budgets measured on target runtime.',
84
+ requiresRendered: true,
85
+ },
86
+ {
87
+ id: 'A7-truthfulness-and-completeness',
88
+ title: 'Zero // TODO, // FIXME, ellipsis code stubs, empty handlers, dead href="#", or broken mobile menus; zero unlabeled fake metrics/3-row mocks posing as live data; verified commercial licenses for all fonts, icons, and media.',
89
+ requiresRendered: false,
90
+ },
91
+ {
92
+ id: 'A8-handoff-and-operations',
93
+ title: 'Clean source + README running from clone to dev in <=10-15 min, pinned lockfile + clean vulnerability audit, CI (build+lint+test) + staging separated from prod, DS/deploy/CMS docs, error monitoring + key-event analytics, 30-90d warranty/SLA process, and source design/asset/font license handoff.',
94
+ requiresRendered: false,
95
+ },
96
+ ];
97
+
98
+ const SURFACE_MATRIX_ITEMS = [
99
+ { id: 'M1-responsive-adaptive-layout', title: 'Adaptive/responsive layout across agreed device, viewport, orientation, and short-height classes.', requiresRendered: true },
100
+ { id: 'M2-navigation-and-back', title: 'Navigation hierarchy, deep-linking, and back/dismissal behavior match platform expectations.', requiresRendered: true },
101
+ { id: 'M3-input-modalities', title: 'Primary task completable via every supported input modality (pointer, touch, keyboard, controller, D-pad, or voice).', requiresRendered: true },
102
+ { id: 'M4-focus-and-restoration', title: 'Visible, logical focus order, unobscured focus ring, and focus/state restoration across dialogs, routes, and restarts.', requiresRendered: true },
103
+ { id: 'M5-state-matrix-coverage', title: 'Empty, loading, error, offline, long-text, and permission states verified in runtime.', requiresRendered: true },
104
+ { id: 'M6-assistive-accessibility', title: 'Contrast, semantics, reduced-motion/transparency, and real platform screen-reader verification.', requiresRendered: true },
105
+ { id: 'M7-text-scale-and-localization', title: '200% text scaling / Dynamic Type, +35-100% label expansion, NFC diacritics, and IME composition verified.', requiresRendered: true },
106
+ { id: 'M8-measured-performance', title: 'Platform startup, interaction latency, frame rate, memory, and payload budgets measured against SOW.', requiresRendered: true },
107
+ { id: 'M9-safe-area-and-frame', title: 'Notches, gesture bars, overscan, folds, titlebars, or trim/bleed safe geometry respected.', requiresRendered: true },
108
+ { id: 'M10-capture-and-recording-evidence', title: 'Required screenshots, videos, profiler traces, and scanner logs saved and redacted of secrets.', requiresRendered: true },
109
+ { id: 'M11-data-security-and-privacy', title: 'Secure token storage, zero leaked secrets, privacy/consent compliance, and safe mutations.', requiresRendered: false },
110
+ { id: 'M12-platform-idiom-and-craft', title: 'Native platform idioms, 5-second hierarchy, and B1-B6 Invisible Craft (timing, optical alignment, dark elevation, hit-slop, tabular figures).', requiresRendered: true },
111
+ ];
112
+
113
+ const PLATFORM_GATES = {
114
+ web: [
115
+ { id: 'WEB-1-cwv-and-3run-lighthouse', title: '3-run median Lighthouse Mobile (4G throttle: Perf >=90, A11y >=95, BP >=95, SEO >=95) + CWV p75 (LCP <=2.5s, INP <=200ms, CLS <=0.1) measured with real tags active.', requiresRendered: true },
116
+ { id: 'WEB-2-payload-fonts-images-loaf', title: 'Initial compressed JS+CSS within class budget (content <=150-250KB, dashboard <=250-450KB, promo <=350-700KB, widget <=100-200KB), <=2 self-hosted subsetted fonts, AVIF/WebP srcset + preloaded LCP image, and zero input-blocking Long Animation Frames on scroll/drag.', requiresRendered: true },
117
+ { id: 'WEB-3-architecture-and-purpose-libraries', title: 'Justified SSR/SSG/SPA choice, strict static/type/lint checks, token/@layer CSS without !important sprawl, vetted accessible libraries for complex widgets, component previews, and E2E tests on critical flows.', requiresRendered: false },
118
+ { id: 'WEB-4-responsive-breakpoints-and-forms', title: 'Verified at 360, 390, 768, 1024, 1280, 1440, 1920+ plus landscape & short-height (<600-650px), zero horizontal scroll, >=24px (>=44px mobile primary) targets, working mobile nav + Escape, and input-preserving accessible forms with spam/idempotency protection.', requiresRendered: true },
119
+ { id: 'WEB-5-seo-security-and-ops', title: 'Per-route meta/OG/Twitter/canonical, sitemap.xml, robots.txt, JSON-LD, 301 redirects, hreflang, CSP/HSTS/nosniff/Referrer-Policy headers, GDPR/Consent Mode v2 gating, CDN Brotli/cache headers, custom 404/500 pages, PR preview deploys, and rollback plan.', requiresRendered: false },
120
+ { id: 'WEB-6-deliverable-bundle', title: 'Submitted 3-run mobile+desktop Lighthouse reports, heaviest-page Network capture, multi-breakpoint light/dark/reduced-motion/state captures, keyboard + NVDA/VoiceOver notes, and Chrome/Firefox/Edge/Safari macOS/real Safari iOS/Chrome Android matrix.', requiresRendered: true },
121
+ ],
122
+ mobile: [
123
+ { id: 'MOB-1-touch-startup-fps-budgets', title: 'Targets >=44x44pt (iOS) / >=48x48dp (Android) with >=8pt/dp gap around destructive actions, cold start <2s on agreed mid-tier hardware, and locked 60/120Hz frame pacing on long lists and transitions.', requiresRendered: true },
124
+ { id: 'MOB-2-memory-energy-crashfree-size', title: 'Zero memory leak across 20-30 primary-flow repetitions (Instruments/LeakCanary), clean Energy/Battery profile, crash-free sessions >=99.5%, and install size within SOW cap ( plus 16 KB ELF native .so alignment on Android).', requiresRendered: true },
125
+ { id: 'MOB-3-native-idioms-and-ergonomics', title: 'iOS HIG & Android Material 3 idioms (documented shared-vs-native split on cross-platform stacks), bottom sheets with detents + scroll handoff + explicit Close button, thumb-zone primary CTAs, and zero custom horizontal swipes in OS back-gesture edges.', requiresRendered: true },
126
+ { id: 'MOB-4-insets-scaling-and-resilience', title: 'Safe areas/Dynamic Island/gesture bar/IME keyboard/landscape/foldable sw>=600dp/tablet adaptation, max Dynamic Type & 200% sp scaling without clipping, VoiceOver + TalkBack verification, offline sync queue, process-death survival, and pre-auth deep links.', requiresRendered: true },
127
+ { id: 'MOB-5-privacy-security-and-store-ops', title: 'Keychain/Keystore token storage, minimal just-in-time permissions + denial recovery, PrivacyInfo.xcprivacy / Play Data Safety, in-app Account Deletion, Sign in with Apple parity, CI signed TestFlight/Play staged rollout, and force-update gate.', requiresRendered: false },
128
+ { id: 'MOB-6-physical-device-deliverables', title: 'Submitted real-device videos, max-font & dark captures, low-end device profiler traces, crash-free report, and VoiceOver/TalkBack notes across compact/standard/Pro Max iOS + >=3 OEM/RAM-tier Android physical devices.', requiresRendered: true },
129
+ ],
130
+ desktop: [
131
+ { id: 'DESK-1-startup-cpu-ram-update-budgets', title: 'Cold start <2-3s (<500ms native/Tauri target), ~0% idle CPU, 30-minute active RAM within SOW ceiling (Electron justified if chosen), ~100ms UI responsiveness with background workers, and signed delta auto-update + rollback verified across 2 consecutive versions.', requiresRendered: true },
132
+ { id: 'DESK-2-native-chrome-and-windowing', title: 'Platform menu bar & OS shortcuts, zero WebView browser giveaways (arrow cursor, user-select: none on chrome, no white dark-boot flash), min/max resize, multi-monitor + mixed-DPI (100%/150%/200%) bounds clamping, two-way file DnD, and modern toolkit (no unwaived Tkinter).', requiresRendered: true },
133
+ { id: 'DESK-3-keyboard-sr-and-contrast', title: 'Shortcut parity on all primary actions, NVDA/JAWS/Narrator (Win), VoiceOver (macOS), and Orca (Linux) compatibility (AccessKit/native a11y tree), plus Windows forced-colors / High Contrast and macOS Increase Contrast.', requiresRendered: true },
134
+ { id: 'DESK-4-atomic-storage-and-session-restore', title: 'OS-standard AppData/Application Support/XDG directories, tested versioned schema migrations, crash-safe atomic writes / SQLite WAL, and full window/tab/document session restoration on restart.', requiresRendered: true },
135
+ { id: 'DESK-5-signing-sandbox-and-clean-uninstall', title: 'MSI/MSIX, DMG/PKG, deb/rpm/Flatpak/AppImage installers, Windows Authenticode / Azure Artifact Signing + macOS Hardened Runtime & Notarization verified unblocked on a clean VM, strict IPC/CSP sandbox, clean uninstaller, and opt-in diagnostic log bundle.', requiresRendered: true },
136
+ ],
137
+ tui: [
138
+ { id: 'TUI-1-geometry-resize-and-startup', title: 'Clean layout at 80x24 and 120x36 with flicker-free live resize, <200ms startup latency on CLI/compact tools, and instant key response.', requiresRendered: true },
139
+ { id: 'TUI-2-pipe-nocolor-and-plain-modes', title: 'Zero ANSI leakage when piped to non-TTY stdout, full usability under NO_COLOR=1, 16-color, and 256-color palettes, --plain non-animated screen-reader mode, --json output, and documented non-zero exit codes + SIGPIPE safety.', requiresRendered: true },
140
+ { id: 'TUI-3-grapheme-paste-ssh-and-teardown', title: 'Dedicated TUI toolkit (no raw print() frames), UAX #29 grapheme-cluster column widths (CJK, ZWJ emoji, diacritics) + Unicode fallback, DECSET 2004 bracketed paste, OSC 52 SSH/tmux clipboard, keyboard-complete mouse-optional controls, and 6-step crash/Ctrl+C terminal teardown.', requiresRendered: true },
141
+ { id: 'TUI-4-cli-packaging-and-deliverables', title: 'Complete --help examples, --version, bash/zsh/fish/pwsh completions, signed/checksummed package-manager release + uninstall docs, check-tui.mjs pass, and asciinema/VHS captures across target terminals + tmux + SSH.', requiresRendered: true },
142
+ ],
143
+ email: [
144
+ { id: 'EML-1-size-style-and-plaintext-budgets', title: 'Pre-ESP HTML <85-90KB (hard <102KB Gmail clip limit), <style> block <=8-16KB with zero @layer/@property/CSS-nesting syntax, ~600px responsive table/MJML/React-Email/Maizzle layout, and complete plaintext companion.', requiresRendered: false },
145
+ { id: 'EML-2-cross-client-and-ganga-survival', title: 'Dual-engine bulletproof CTAs rendering in both Classic Outlook Word (VML) and New Outlook (Chromium), zero flex/grid reliance, layout & contrast surviving when Gmail IMAP/POP (GANGA) strips <style> completely, and blocked-image readability.', requiresRendered: true },
146
+ { id: 'EML-3-dark-mode-retina-and-a11y', title: 'color-scheme / supported-color-schemes declared, dark-mode forced-inversion logo halo/swap survival, 2x retina HTTPS images with meaningful alt + explicit dimensions, role="presentation" layout tables, >=14-16px body copy, padded preheader, descriptive links, and merge-tag fallbacks (no raw {{name}}).', requiresRendered: true },
147
+ { id: 'EML-4-deliverability-and-client-previews', title: 'Aligned SPF + DKIM + DMARC, RFC 8058 One-Click List-Unsubscribe on marketing mail, BIMI if scoped, check-email.mjs pass, and real light+dark client previews across Gmail web/mobile, Apple Mail, Classic Outlook, and New Outlook.', requiresRendered: true },
148
+ ],
149
+ document: [
150
+ { id: 'DOC-1-dedicated-typesetter-and-pdfua', title: 'Generated via dedicated pagination engine (Typst/LaTeX/WeasyPrint/Paged.js/Playwright PDF/React-PDF/Quarto, never ad-hoc window.print()), valid PDF/UA structure (/StructTreeRoot, /MarkInfo, /Lang, /Title), and subsetted embedded fonts with intact /ToUnicode CMap copy extraction.', requiresRendered: false },
151
+ { id: 'DOC-2-pagination-typography-and-data-integrity', title: 'Zero orphan headings or split figures, repeating table headers across page breaks, running headers/footers/page numbers/TOC/bookmarks, 9-12pt print body with tabular numerals, dynamic multi-page/Vietnamese/multilingual overflow resilience, and totals/clauses cross-checked against source data.', requiresRendered: true },
152
+ { id: 'DOC-3-print-prepress-and-slide-parity', title: 'Color + grayscale print legibility verified (plus 3mm bleed, 5mm safe trim, 300 DPI photos, CMYK ICC, and 100% K body black when commercial print is in scope); editable Master-Slide PPTX matching PDF export with speaker notes when slides are in scope.', requiresRendered: true },
153
+ { id: 'DOC-4-deliverables', title: 'Submitted final PDF, check-pdf.mjs / PAC / veraPDF report, embedded font list, rasterized page captures (first, middle, last, long-table break, edge cases), and print proof.', requiresRendered: true },
154
+ ],
155
+ 'data-apps': [
156
+ { id: 'DATA-1-latency-and-scale-budgets', title: 'Primary chart frame renders in <=1-2s (with progress beyond), filter/hover/brush responds in <=100-200ms, >500-row tables virtualized or server-paginated, dense series perceptually downsampled (LTTB/Min-Max), tested at peak dataset + concurrency.', requiresRendered: true },
157
+ { id: 'DATA-2-honest-encoding-and-colorblind-a11y', title: 'Chart type matches analytical question, zero-baseline bars, no misleading dual axes/3D/over-sliced pies, visible data source + metric definitions + freshness/timezone badge, colorblind-safe non-color encodings, and screen-reader table/summary + keyboard point navigation.', requiresRendered: true },
158
+ { id: 'DATA-3-states-url-and-safe-exports', title: 'Empty, 1-point, outlier, null-vs-0, stale, API-error, and live-disconnect states rendered; filters/sort/date-range serialized in shareable URL; CSV/XLSX formula-injection sanitized + PII masked on export/screenshots.', requiresRendered: true },
159
+ { id: 'DATA-4-architecture-rbac-and-load-proof', title: 'Runtime matched to concurrency/DAG scale (no prototype-only framework stretched past multi-user SLA), RBAC/RLS + audit log + bulk-write Diff/Confirm modal, indexed queries with timeouts, and empty/normal/extreme/error captures + colorblind/load/SR reports.', requiresRendered: true },
160
+ ],
161
+ 'game-ui': [
162
+ { id: 'GAME-1-frame-input-and-zero-gc-budgets', title: 'Meets target frame budget (16.7ms@60Hz / 11.1ms@90Hz / 8.3ms@120Hz) in heaviest gameplay scene, <=100ms input-to-visual feedback, and 0 B/frame steady-state UI GC allocation in engine profiler.', requiresRendered: true },
163
+ { id: 'GAME-2-hud-safezones-and-aspect-ratios', title: 'Built on native engine UI toolkit, non-occluding configurable HUD (scale/opacity), overscan/notch/Steam Deck 1280x800 legibility, 16:9/21:9/4:3 adaptation, and verified readable on both brightest glare and darkest scenes.', requiresRendered: true },
164
+ { id: 'GAME-3-multimodal-input-and-game-a11y', title: 'Full KB/M + controller D-pad focus + touch parity with <=1-frame glyph swap and full remapping; adjustable subtitle size/backdrop, colorblind mode, camera-shake/flash (<=3Hz) reduction, and hold-instead-of-mash assist.', requiresRendered: true },
165
+ { id: 'GAME-4-states-trc-and-deliverables', title: 'Pause, loading, disconnect, save-failed, controller-unplugged auto-pause, call/lock interruptions, CJK/Arabic/expansion i18n, Steam/Console store compliance, plus brightest/darkest/aspect/a11y screenshots, lowest-spec profiler trace, and controller+KB videos.', requiresRendered: true },
166
+ ],
167
+ extensions: [
168
+ { id: 'EXT-1-least-privilege-host-theme-and-perf', title: 'Minimal justified permissions + privacy policy, native host theme/font/density inheritance with live mid-session theme & locale switching, zero idle host slowdown/background polling, and unauthenticated/offline/expired/empty states.', requiresRendered: true },
169
+ { id: 'EXT-2-platform-architecture-and-isolation', title: 'Browser MV3 (ephemeral service worker state, zero remotely hosted code, Shadow DOM CSS + keydown isolation tested on hostile-CSS pages, Safari wrapper if scoped); IDE/SaaS (lazy activation, strict CSP webview + getState/setState persistence, remote workspace support, OAuth PKCE).', requiresRendered: true },
170
+ { id: 'EXT-3-store-package-and-deliverables', title: 'Store-ready listing/screenshots/CHANGELOG/icons, host light+dark videos/captures, idle vs heavy memory/CPU profile, and permission justification manifest.', requiresRendered: true },
171
+ ],
172
+ 'chat-ui': [
173
+ { id: 'CHAT-1-messaging-bot-contracts', title: 'Uses native host components (Block Kit/Components V2/Adaptive Cards/Flows/Zalo/Mini App) within payload limits, acknowledges webhooks within host timeout (<2-3s) + async progress, handles invalid args/edits/deletes/idempotency/rate-limit queues, and discloses retention + deletion.', requiresRendered: true },
174
+ { id: 'CHAT-2-streaming-citations-and-hitl', title: 'Thinking/streaming/interrupted/cancel/retry/error/long states with non-yanking scroll, unlocked composer + IME Enter guard, throttled polite aria-live announcements, grounded non-fabricated citations, Before->After HITL approval cards, and warm human-agent escalation.', requiresRendered: true },
175
+ { id: 'CHAT-3-security-and-deliverables', title: 'Prompt-injection & Markdown external-image exfiltration defense (CSP img-src / proxy), scoped tool permissions, plus normal/streaming/error/cancel/long/unauthorized video captures and concurrency/queue test logs.', requiresRendered: true },
176
+ ],
177
+ constrained: [
178
+ { id: 'CON-1-modality-and-lowest-hardware-budget', title: 'Every primary task completable solely via the target hardware input (remote D-pad, touch, rotary, physical keys, or voice) and verified on the lowest-spec contract hardware (RAM/Flash/CPU/FPS/battery measured on real device/board).', requiresRendered: true },
179
+ { id: 'CON-2-class-specific-ergonomics', title: 'Meets class bar: TV (10ft type, D-pad, overscan, zero hover, QR auth); Watch (<=2-3s glance, #000000 OLED, phone-away standalone); E-Ink (minimal refresh, zero animation); Kiosk/POS (large targets, session timeout PII reset, offline + 72h soak); Automotive (distraction cap + voice); Voice (<300ms barge-in + readback confirm).', requiresRendered: true },
180
+ { id: 'CON-3-powerloss-and-regulatory-boundary', title: 'Safe state/data recovery across sudden power loss or reboot, and explicit documentation of certified vs uncertified regulated-industry (automotive/medical/industrial/ADA) requirements.', requiresRendered: true },
181
+ ],
182
+ spatial: [
183
+ { id: 'XR-1-framerate-and-ergonomic-comfort', title: 'Locked device framerate (72/90/120Hz) under peak object load without drops, comfortable 1.2-2.0m / slightly-below-horizon placement, zero forced camera motion sickness, vignette/snap-turn reduced-motion comfort, and physical headset multi-user comfort notes.', requiresRendered: true },
184
+ { id: 'XR-2-multimodal-input-and-a11y', title: 'Hand/eye/controller input without fatiguing gestures + fallback modality + one-handed mode, platform target size/spacing (>=60pt visionOS) with zero eye-gaze geometry shift, seated/standing/wheelchair support, spatial captions, and visual cues for spatial audio.', requiresRendered: true },
185
+ { id: 'XR-3-privacy-and-interruption-states', title: 'Just-in-time camera/eye/hand/room-mesh privacy disclosures with minimal retention, plus tracking-lost, low-light, bright-sunlit, small-room, call, and headset-removed interruption states captured in-headset.', requiresRendered: true },
186
+ ],
187
+ media: [
188
+ { id: 'MED-1-aspect-safezones-and-thumbnail-readability', title: 'Exact platform dimensions & UI-overlay safe zones (1200x630 OG, 1:1, 9:16 vertical), legible when downscaled to 150-300px thumbnail width and across light/dark social feeds, using shared product tokens and brand rules.', requiresRendered: true },
189
+ { id: 'MED-2-templated-pipeline-and-video-specs', title: 'Data-driven reproducible generation (Satori/Takumi/Sharp or Remotion/Motion Canvas/FFmpeg), legible 0.0s poster + muted-autoplay comprehension + captions, ~-14 LUFS audio normalization, and <=3Hz flash safety.', requiresRendered: true },
190
+ { id: 'MED-3-unfurl-previews-and-licensing', title: 'Live share-debugger previews captured (Facebook, X, LinkedIn, Zalo), alt text supplied, editable source templates handed over, and commercial font/music/image licenses documented.', requiresRendered: true },
191
+ ],
192
+ brandkit: [
193
+ { id: 'BRD-1-vector-marks-and-small-size-proof', title: 'SVG master logos (horizontal, stacked, icon-only, monochrome, inverted) with clearspace/minimum-size rules and dedicated optical legibility verified at 16-32px favicon/avatar scale.', requiresRendered: true },
194
+ { id: 'BRD-2-color-type-and-token-governance', title: 'Role-mapped color system verified for text/surface contrast across HEX/RGB/OKLCH (and CMYK/Pantone when print is in scope), commercially licensed font pair with Vietnamese/multilingual fallbacks, unified illustration/icon rules + do/dont examples, and exported DTCG tokens.', requiresRendered: false },
195
+ { id: 'BRD-3-applications-handoff-and-ip-screening', title: 'Real-world application mockups (cards, letterhead, social, slides, packaging/signage; print proof if physical), complete SVG/PNG/PDF/source/font-license handoff with IP transfer, and preliminary trademark-similarity screening (escalating formal legal counsel).', requiresRendered: true },
196
+ ],
197
+ };
198
+
199
+ function help() {
200
+ return `Usage:
201
+ node check-acceptance.mjs --init <platform> [--out FILE] [--force]
202
+ node check-acceptance.mjs --list-platforms [--json]
203
+ node check-acceptance.mjs <acceptance.json> [--json] [--allow-not-checked]
204
+
205
+ Zero-dependency Studio-Grade ($10k-$20k+) UI/FE Acceptance Checklist & Grading Gate.
206
+ Validates Universal Baseline (A1-A8), Shared 12-Row Surface Acceptance Matrix, and
207
+ Platform-Specific Measurable Thresholds, Inspection Items & Required Deliverables across
208
+ all 14 frontend platforms.
209
+
210
+ Key enforcement rules:
211
+ - Every row must carry a canonical evidence label: rendered, static, model-judgment, not-checked, or waived.
212
+ - Rule #0.3: Visual, performance, and interactive accessibility rows (requiresRendered: true)
213
+ CANNOT pass with "static" or "model-judgment" — they require "rendered" evidence (or explicit user "waived").
214
+ - Exits 1 (FAIL) while any row is pending, failing, or violates Rule #0.3 so the agent loops until clean.
215
+ - Exits 2 (PENDING_RENDERED_ENV) when all checkable items pass but hardware/runtime rows are not-checked
216
+ (pass --allow-not-checked to exit 0 in headless CI while preserving the honest PENDING_RENDERED_ENV grade).
217
+ - Exits 0 on PASS_STUDIO_10K_20K or EXCEEDS_STUDIO.
218
+
219
+ Options:
220
+ --init PLATFORM Generate a blank acceptance checklist JSON for PLATFORM (web, mobile, desktop,
221
+ tui, email, document, data-apps, game-ui, extensions, chat-ui, constrained,
222
+ spatial, media, brandkit)
223
+ --out FILE Output path for --init (default: .pixelcraft/acceptance.json; use - for stdout)
224
+ --force Overwrite existing --out file during --init
225
+ --list-platforms List all 14 supported canonical platform profiles
226
+ --allow-not-checked Exit 0 instead of 2 when grade is PENDING_RENDERED_ENV (0 failures, >0 not-checked)
227
+ --json Emit machine-readable JSON output
228
+ --help Show this help`;
229
+ }
230
+
231
+ function resolvePlatform(raw) {
232
+ const key = String(raw || '').trim().toLowerCase();
233
+ return PLATFORM_ALIASES[key] || null;
234
+ }
235
+
236
+ function isMeaningfulText(val, minLen = 8) {
237
+ if (typeof val !== 'string') return false;
238
+ const trimmed = val.trim();
239
+ return trimmed.length >= minLen && !LAZY_TEXT_RE.test(trimmed);
240
+ }
241
+
242
+ export function buildTemplate(platformInput) {
243
+ const platform = resolvePlatform(platformInput);
244
+ if (!platform) {
245
+ throw new Error(`unknown platform '${platformInput}'; run --list-platforms to see valid platforms`);
246
+ }
247
+ const toMap = (items) => Object.fromEntries(
248
+ items.map((item) => [
249
+ item.id,
250
+ {
251
+ title: item.title,
252
+ requiresRendered: item.requiresRendered,
253
+ result: 'pending',
254
+ label: 'not-checked',
255
+ evidence: '',
256
+ },
257
+ ]),
258
+ );
259
+
260
+ return {
261
+ schemaVersion: 1,
262
+ platform,
263
+ target: 'Describe route, app surface, or deliverable under acceptance',
264
+ sowThresholds: {
265
+ devicesAndEnvironments: 'Specify agreed physical devices, viewports, browsers/OS versions, and network profile',
266
+ numericBudgets: 'Specify agreed startup, frame, payload, Lighthouse/CWV, or print/size budgets',
267
+ },
268
+ baseline: toMap(BASELINE_ITEMS),
269
+ surfaceMatrix: toMap(SURFACE_MATRIX_ITEMS),
270
+ platformGates: toMap(PLATFORM_GATES[platform]),
271
+ exceeds: [],
272
+ };
273
+ }
274
+
275
+ function validateSection(sectionObj, expectedItems, sectionName, allowNotApplicable, issues, counts) {
276
+ if (!sectionObj || typeof sectionObj !== 'object' || Array.isArray(sectionObj)) {
277
+ issues.push({
278
+ id: sectionName,
279
+ rule: 'missing-section',
280
+ message: `Missing or invalid '${sectionName}' object in acceptance manifest.`,
281
+ });
282
+ return;
283
+ }
284
+
285
+ for (const spec of expectedItems) {
286
+ const entry = sectionObj[spec.id];
287
+ if (!entry || typeof entry !== 'object' || Array.isArray(entry)) {
288
+ counts.missing += 1;
289
+ issues.push({
290
+ id: spec.id,
291
+ rule: 'missing-item',
292
+ message: `${sectionName}.${spec.id} is missing from manifest.`,
293
+ });
294
+ continue;
295
+ }
296
+
297
+ const result = String(entry.result || '').trim();
298
+ const label = String(entry.label || '').trim();
299
+
300
+ if (!CANONICAL_LABELS.has(label)) {
301
+ counts.invalid += 1;
302
+ issues.push({
303
+ id: spec.id,
304
+ rule: 'invalid-evidence-label',
305
+ message: `${spec.id} has invalid label '${label}'; expected rendered, static, model-judgment, not-checked, or waived.`,
306
+ });
307
+ continue;
308
+ }
309
+
310
+ if (result === 'pending') {
311
+ counts.pending += 1;
312
+ issues.push({
313
+ id: spec.id,
314
+ rule: 'item-pending',
315
+ message: `${spec.id} is still 'pending' — walk this checklist item, verify it, and record evidence.`,
316
+ });
317
+ continue;
318
+ }
319
+
320
+ if (result === 'fail') {
321
+ counts.failed += 1;
322
+ issues.push({
323
+ id: spec.id,
324
+ rule: 'item-failed',
325
+ message: `${spec.id} is marked 'fail'${entry.evidence ? ` (${entry.evidence})` : ''} — fix the defect and re-verify before stopping.`,
326
+ });
327
+ continue;
328
+ }
329
+
330
+ if (label === 'waived') {
331
+ if (!isMeaningfulText(entry.approvedBy, 3) || !isMeaningfulText(entry.scope, 6) || !isMeaningfulText(entry.consequence, 8)) {
332
+ counts.invalid += 1;
333
+ issues.push({
334
+ id: spec.id,
335
+ rule: 'incomplete-waiver',
336
+ message: `${spec.id} uses label 'waived' without explicit approvedBy, scope (>=6 chars), and consequence (>=8 chars).`,
337
+ });
338
+ continue;
339
+ }
340
+ counts.waived += 1;
341
+ continue;
342
+ }
343
+
344
+ if (result === 'not-applicable') {
345
+ if (!allowNotApplicable) {
346
+ counts.invalid += 1;
347
+ issues.push({
348
+ id: spec.id,
349
+ rule: 'baseline-not-skippable',
350
+ message: `${spec.id} belongs to mandatory Baseline A and cannot be 'not-applicable' (use explicit client 'waived' if overridden by contract).`,
351
+ });
352
+ continue;
353
+ }
354
+ if (!isMeaningfulText(entry.reason, 10)) {
355
+ counts.invalid += 1;
356
+ issues.push({
357
+ id: spec.id,
358
+ rule: 'missing-na-reason',
359
+ message: `${spec.id} is marked 'not-applicable' without a concrete product reason (>=10 chars).`,
360
+ });
361
+ continue;
362
+ }
363
+ counts.notApplicable += 1;
364
+ continue;
365
+ }
366
+
367
+ if (result === 'not-checked' || label === 'not-checked') {
368
+ if (result === 'pass') {
369
+ counts.invalid += 1;
370
+ issues.push({
371
+ id: spec.id,
372
+ rule: 'pass-cannot-be-not-checked',
373
+ message: `${spec.id} cannot claim result 'pass' while label is 'not-checked'; set result to 'not-checked' with a concrete missing-runtime reason.`,
374
+ });
375
+ continue;
376
+ }
377
+ if (!isMeaningfulText(entry.reason, 12)) {
378
+ counts.invalid += 1;
379
+ issues.push({
380
+ id: spec.id,
381
+ rule: 'lazy-not-checked-reason',
382
+ message: `${spec.id} is 'not-checked' without a concrete reason (>=12 chars naming the unavailable device, binary, or external account).`,
383
+ });
384
+ continue;
385
+ }
386
+ counts.notChecked += 1;
387
+ continue;
388
+ }
389
+
390
+ if (result !== 'pass') {
391
+ counts.invalid += 1;
392
+ issues.push({
393
+ id: spec.id,
394
+ rule: 'invalid-result',
395
+ message: `${spec.id} has unsupported result '${result}'; expected pass, fail, not-checked, not-applicable, or pending.`,
396
+ });
397
+ continue;
398
+ }
399
+
400
+ // Rule #0.3: Visual, performance, and interactive accessibility rows require `rendered` evidence!
401
+ if (spec.requiresRendered && label !== 'rendered') {
402
+ counts.rule03Violations += 1;
403
+ issues.push({
404
+ id: spec.id,
405
+ rule: 'static-or-model-judgment-insufficient',
406
+ message: `${spec.id} requires 'rendered' evidence (visual/performance/accessibility Rule #0.3), but got '${label}'. Measure/inspect the running output or mark 'not-checked' with concrete missing-runtime reason.`,
407
+ });
408
+ continue;
409
+ }
410
+
411
+ if (label === 'model-judgment') {
412
+ counts.invalid += 1;
413
+ issues.push({
414
+ id: spec.id,
415
+ rule: 'model-judgment-not-proof',
416
+ message: `${spec.id} uses 'model-judgment', which is a hypothesis and cannot satisfy an acceptance pass without static/rendered verification.`,
417
+ });
418
+ continue;
419
+ }
420
+
421
+ if (!isMeaningfulText(entry.evidence, 8)) {
422
+ counts.invalid += 1;
423
+ issues.push({
424
+ id: spec.id,
425
+ rule: 'missing-evidence',
426
+ message: `${spec.id} claims 'pass' without concrete evidence (>=8 chars: artifact path, executed command, or measured metric).`,
427
+ });
428
+ continue;
429
+ }
430
+
431
+ counts.passed += 1;
432
+ }
433
+ }
434
+
435
+ export function evaluateAcceptance(manifest) {
436
+ const issues = [];
437
+ if (!manifest || typeof manifest !== 'object' || Array.isArray(manifest)) {
438
+ throw new Error('acceptance manifest must be a JSON object');
439
+ }
440
+ if (manifest.schemaVersion !== 1) {
441
+ throw new Error('expected schemaVersion: 1');
442
+ }
443
+ const platform = resolvePlatform(manifest.platform);
444
+ if (!platform) {
445
+ throw new Error(`unsupported platform '${manifest.platform}'; see --list-platforms`);
446
+ }
447
+ if (!isMeaningfulText(manifest.target, 4) || /^Describe route, app surface/i.test(manifest.target)) {
448
+ issues.push({
449
+ id: 'target',
450
+ rule: 'unfilled-target',
451
+ message: 'Set manifest.target to the concrete application, route, or deliverable under acceptance.',
452
+ });
453
+ }
454
+ if (!manifest.sowThresholds || typeof manifest.sowThresholds !== 'object'
455
+ || !isMeaningfulText(manifest.sowThresholds.devicesAndEnvironments, 8)
456
+ || !isMeaningfulText(manifest.sowThresholds.numericBudgets, 8)
457
+ || /^Specify agreed /i.test(manifest.sowThresholds.devicesAndEnvironments)
458
+ || /^Specify agreed /i.test(manifest.sowThresholds.numericBudgets)) {
459
+ issues.push({
460
+ id: 'sowThresholds',
461
+ rule: 'unfilled-sow-thresholds',
462
+ message: 'Lock concrete sowThresholds.devicesAndEnvironments and sowThresholds.numericBudgets before signing off acceptance.',
463
+ });
464
+ }
465
+
466
+ const counts = {
467
+ passed: 0,
468
+ failed: 0,
469
+ pending: 0,
470
+ notChecked: 0,
471
+ waived: 0,
472
+ notApplicable: 0,
473
+ missing: 0,
474
+ invalid: 0,
475
+ rule03Violations: 0,
476
+ exceedsPassed: 0,
477
+ };
478
+
479
+ validateSection(manifest.baseline, BASELINE_ITEMS, 'baseline', false, issues, counts);
480
+ validateSection(manifest.surfaceMatrix, SURFACE_MATRIX_ITEMS, 'surfaceMatrix', true, issues, counts);
481
+ validateSection(manifest.platformGates, PLATFORM_GATES[platform], 'platformGates', true, issues, counts);
482
+
483
+ if (Array.isArray(manifest.exceeds)) {
484
+ for (const [idx, ex] of manifest.exceeds.entries()) {
485
+ if (ex && ex.result === 'pass' && (ex.label === 'rendered' || ex.label === 'static') && isMeaningfulText(ex.evidence, 8)) {
486
+ counts.exceedsPassed += 1;
487
+ } else {
488
+ issues.push({
489
+ id: `exceeds[${idx}]`,
490
+ rule: 'invalid-exceeds-entry',
491
+ message: `exceeds[${idx}] must have result 'pass', label 'rendered' or 'static', and concrete evidence (>=8 chars).`,
492
+ });
493
+ counts.invalid += 1;
494
+ }
495
+ }
496
+ }
497
+
498
+ let grade = 'FAIL';
499
+ if (issues.length === 0) {
500
+ if (counts.notChecked > 0) {
501
+ grade = 'PENDING_RENDERED_ENV';
502
+ } else if (counts.exceedsPassed > 0) {
503
+ grade = 'EXCEEDS_STUDIO';
504
+ } else {
505
+ grade = 'PASS_STUDIO_10K_20K';
506
+ }
507
+ }
508
+
509
+ return {
510
+ platform,
511
+ target: manifest.target,
512
+ grade,
513
+ counts,
514
+ issues,
515
+ };
516
+ }
517
+
518
+ function parseArgs(argv) {
519
+ const opts = {
520
+ help: false,
521
+ json: false,
522
+ listPlatforms: false,
523
+ allowNotChecked: false,
524
+ force: false,
525
+ init: '',
526
+ out: '.pixelcraft/acceptance.json',
527
+ input: '',
528
+ };
529
+ for (let i = 0; i < argv.length; i += 1) {
530
+ const arg = argv[i];
531
+ if (arg === '--help' || arg === '-h') opts.help = true;
532
+ else if (arg === '--json') opts.json = true;
533
+ else if (arg === '--list-platforms') opts.listPlatforms = true;
534
+ else if (arg === '--allow-not-checked') opts.allowNotChecked = true;
535
+ else if (arg === '--force') opts.force = true;
536
+ else if (arg === '--init') {
537
+ if (!argv[i + 1]) throw new Error('--init requires a platform name');
538
+ opts.init = argv[++i];
539
+ } else if (arg.startsWith('--init=')) opts.init = arg.slice('--init='.length);
540
+ else if (arg === '--out') {
541
+ if (!argv[i + 1]) throw new Error('--out requires a file path or -');
542
+ opts.out = argv[++i];
543
+ } else if (arg.startsWith('--out=')) opts.out = arg.slice('--out='.length);
544
+ else if (arg.startsWith('-')) throw new Error(`unknown option: ${arg}`);
545
+ else if (!opts.input) opts.input = arg;
546
+ else throw new Error(`unexpected argument: ${arg}`);
547
+ }
548
+ return opts;
549
+ }
550
+
551
+ function main() {
552
+ const opts = parseArgs(process.argv.slice(2));
553
+ if (opts.help) {
554
+ console.log(help());
555
+ return;
556
+ }
557
+ if (opts.listPlatforms) {
558
+ const platforms = Object.keys(PLATFORM_GATES);
559
+ if (opts.json) console.log(JSON.stringify({ platforms }, null, 2));
560
+ else console.log(`Supported platforms (${platforms.length}): ${platforms.join(', ')}`);
561
+ return;
562
+ }
563
+ if (opts.init) {
564
+ const template = buildTemplate(opts.init);
565
+ const serialized = `${JSON.stringify(template, null, 2)}\n`;
566
+ if (opts.out === '-') {
567
+ process.stdout.write(serialized);
568
+ return;
569
+ }
570
+ const dest = path.resolve(opts.out);
571
+ if (fs.existsSync(dest) && !opts.force) {
572
+ throw new Error(`refusing to overwrite existing file '${opts.out}' without --force`);
573
+ }
574
+ fs.mkdirSync(path.dirname(dest), { recursive: true });
575
+ fs.writeFileSync(dest, serialized, 'utf8');
576
+ console.log(`Initialized Studio Acceptance Checklist (${template.platform}) -> ${opts.out}`);
577
+ return;
578
+ }
579
+
580
+ if (!opts.input) {
581
+ throw new Error('provide an acceptance manifest JSON file or --init <platform>; see --help');
582
+ }
583
+ const filePath = path.resolve(opts.input);
584
+ if (!fs.existsSync(filePath)) {
585
+ throw new Error(`acceptance manifest not found: ${opts.input}`);
586
+ }
587
+ const manifest = JSON.parse(fs.readFileSync(filePath, 'utf8'));
588
+ const report = evaluateAcceptance(manifest);
589
+
590
+ if (opts.json) {
591
+ console.log(JSON.stringify(report, null, 2));
592
+ } else {
593
+ console.log(`check-acceptance [${report.platform}]: ${report.grade} (passed=${report.counts.passed}, waived=${report.counts.waived}, na=${report.counts.notApplicable}, notChecked=${report.counts.notChecked}, issues=${report.issues.length})`);
594
+ for (const issue of report.issues) {
595
+ console.log(` FAIL ${issue.id} [${issue.rule}] — ${issue.message}`);
596
+ }
597
+ if (report.grade === 'FAIL') {
598
+ console.log('action: Do NOT stop. Fix every failed/pending item, re-run scanners, record honest rendered/static evidence, and re-run check-acceptance.mjs until clean.');
599
+ } else if (report.grade === 'PENDING_RENDERED_ENV') {
600
+ console.log('note: All locally checkable items passed, but rendered hardware/environment checks remain not-checked; cannot claim full $10k-$20k acceptance until rendered checks run.');
601
+ }
602
+ }
603
+
604
+ if (report.grade === 'FAIL') {
605
+ process.exitCode = 1;
606
+ } else if (report.grade === 'PENDING_RENDERED_ENV' && !opts.allowNotChecked) {
607
+ process.exitCode = 2;
608
+ }
609
+ }
610
+
611
+ const isEntrypoint = process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url);
612
+ if (isEntrypoint) {
613
+ try {
614
+ main();
615
+ } catch (error) {
616
+ console.error(`check-acceptance: ${error.message}`);
617
+ process.exit(1);
618
+ }
619
+ }
@@ -0,0 +1,14 @@
1
+ [
2
+ {
3
+ "rule": "gradient-text-treatment",
4
+ "file": "brand-critique.css",
5
+ "line": 3,
6
+ "reason": "Approved wordmark uses this treatment; checked legibility in both themes."
7
+ },
8
+ {
9
+ "rule": "rounded-accent-rail",
10
+ "file": "brand-critique.css",
11
+ "line": 17,
12
+ "reason": "Old callout from the previous brand guidelines."
13
+ }
14
+ ]