oh-my-opencode 5.1.51 → 5.1.54

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 (890) hide show
  1. package/dist/agents/atlas/agent.d.ts +5 -5
  2. package/dist/agents/dynamic-agent-core-sections.d.ts +0 -1
  3. package/dist/agents/dynamic-agent-prompt-builder.d.ts +1 -1
  4. package/dist/agents/gpt-apply-patch-guard.d.ts +0 -1
  5. package/dist/agents/hephaestus/agent.d.ts +3 -7
  6. package/dist/agents/hephaestus/model-support.d.ts +6 -0
  7. package/dist/agents/metis.d.ts +0 -15
  8. package/dist/agents/native-model-prompt.d.ts +9 -0
  9. package/dist/agents/native-prompt-frame.d.ts +20 -0
  10. package/dist/agents/native-tool-snippet.d.ts +6 -0
  11. package/dist/agents/sisyphus/default.d.ts +0 -1
  12. package/dist/agents/sisyphus-agent-factory.d.ts +2 -11
  13. package/dist/agents/sisyphus-junior/agent.d.ts +2 -20
  14. package/dist/agents/sisyphus-junior/index.d.ts +1 -11
  15. package/dist/agents/sisyphus-runtime-prompt-reconciler.d.ts +6 -0
  16. package/dist/agents/types.d.ts +2 -2
  17. package/dist/cli/index.js +1160 -391
  18. package/dist/cli/service-auth/credential-lock.d.ts +11 -0
  19. package/dist/cli/service-auth/credential-owner.d.ts +10 -0
  20. package/dist/cli/service-auth/index.d.ts +3 -1
  21. package/dist/cli/service-auth/keystore.d.ts +8 -1
  22. package/dist/cli/service-auth/owned-refresh.d.ts +21 -0
  23. package/dist/cli/service-auth/protocol-v2.d.ts +27 -0
  24. package/dist/cli/service-auth/protocol.d.ts +26 -2
  25. package/dist/cli/service-auth/recovery-clock.d.ts +7 -0
  26. package/dist/cli/service-auth/refresh-attempt.d.ts +34 -0
  27. package/dist/cli/service-auth/session.d.ts +9 -2
  28. package/dist/cli-node/index.js +1160 -391
  29. package/dist/hooks/native-edition-nudge/hook.d.ts +3 -4
  30. package/dist/index.js +15519 -8807
  31. package/dist/plugin/session-tool-permissions.d.ts +10 -0
  32. package/dist/plugin/system-transform.d.ts +2 -1
  33. package/dist/plugin/tool-definition.d.ts +1 -0
  34. package/dist/shared/bun-ffi-shim.d.ts +29 -0
  35. package/dist/shared/json-file-cache-store.d.ts +11 -0
  36. package/dist/skills/browser/runtime/omowright/index.js +24 -33
  37. package/dist/skills/browser/runtime/omowright/manifest.json +3 -3
  38. package/dist/skills/frontend/ATTRIBUTION.md +104 -1
  39. package/dist/skills/frontend/SKILL.md +7 -3
  40. package/dist/skills/frontend/references/design/design-system-architecture.md +3 -3
  41. package/dist/skills/frontend/references/perfection/craft-floor.md +59 -0
  42. package/dist/skills/frontend/references/perfection/detect.md +52 -0
  43. package/dist/skills/frontend/scripts/detect/cli.ts +70 -0
  44. package/dist/skills/frontend/scripts/detect/config.test.ts +26 -0
  45. package/dist/skills/frontend/scripts/detect/config.ts +53 -0
  46. package/dist/skills/frontend/scripts/detect/core/characters.ts +2 -0
  47. package/dist/skills/frontend/scripts/detect/core/color.test.ts +29 -0
  48. package/dist/skills/frontend/scripts/detect/core/color.ts +150 -0
  49. package/dist/skills/frontend/scripts/detect/core/page.ts +84 -0
  50. package/dist/skills/frontend/scripts/detect/core/shadow.ts +40 -0
  51. package/dist/skills/frontend/scripts/detect/core/source.ts +33 -0
  52. package/dist/skills/frontend/scripts/detect/detect.ts +77 -0
  53. package/dist/skills/frontend/scripts/detect/index.ts +23 -0
  54. package/dist/skills/frontend/scripts/detect/lint.test.ts +27 -0
  55. package/dist/skills/frontend/scripts/detect/lint.ts +98 -0
  56. package/dist/skills/frontend/scripts/detect/render/probe-placement.test.ts +19 -0
  57. package/dist/skills/frontend/scripts/detect/render/probe-placement.ts +50 -0
  58. package/dist/skills/frontend/scripts/detect/render/renderer.ts +37 -0
  59. package/dist/skills/frontend/scripts/detect/render/webview.ts +71 -0
  60. package/dist/skills/frontend/scripts/detect/report.ts +29 -0
  61. package/dist/skills/frontend/scripts/detect/rule.ts +42 -0
  62. package/dist/skills/frontend/scripts/detect/rules/color/ai-color-palette.test.ts +74 -0
  63. package/dist/skills/frontend/scripts/detect/rules/color/ai-color-palette.ts +83 -0
  64. package/dist/skills/frontend/scripts/detect/rules/color/cream-palette.test.ts +24 -0
  65. package/dist/skills/frontend/scripts/detect/rules/color/cream-palette.ts +35 -0
  66. package/dist/skills/frontend/scripts/detect/rules/color/dark-glow.test.ts +47 -0
  67. package/dist/skills/frontend/scripts/detect/rules/color/dark-glow.ts +44 -0
  68. package/dist/skills/frontend/scripts/detect/rules/color/design-system-color.test.ts +26 -0
  69. package/dist/skills/frontend/scripts/detect/rules/color/design-system-color.ts +35 -0
  70. package/dist/skills/frontend/scripts/detect/rules/color/gradient-text.test.ts +24 -0
  71. package/dist/skills/frontend/scripts/detect/rules/color/gradient-text.ts +59 -0
  72. package/dist/skills/frontend/scripts/detect/rules/color/gray-on-color.test.ts +39 -0
  73. package/dist/skills/frontend/scripts/detect/rules/color/gray-on-color.ts +38 -0
  74. package/dist/skills/frontend/scripts/detect/rules/color/index.ts +15 -0
  75. package/dist/skills/frontend/scripts/detect/rules/color/low-contrast.test.ts +209 -0
  76. package/dist/skills/frontend/scripts/detect/rules/color/low-contrast.ts +57 -0
  77. package/dist/skills/frontend/scripts/detect/rules/color/placeholder-contrast.test.ts +62 -0
  78. package/dist/skills/frontend/scripts/detect/rules/color/radial-halo.test.ts +40 -0
  79. package/dist/skills/frontend/scripts/detect/rules/color/radial-halo.ts +31 -0
  80. package/dist/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.test.ts +27 -0
  81. package/dist/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.ts +33 -0
  82. package/dist/skills/frontend/scripts/detect/rules/color/support/animation-opacity.ts +78 -0
  83. package/dist/skills/frontend/scripts/detect/rules/color/support/color-path.ts +15 -0
  84. package/dist/skills/frontend/scripts/detect/rules/color/support/contrast-pairs.ts +54 -0
  85. package/dist/skills/frontend/scripts/detect/rules/color/support/contrast-role.ts +76 -0
  86. package/dist/skills/frontend/scripts/detect/rules/color/support/glow-forms.ts +56 -0
  87. package/dist/skills/frontend/scripts/detect/rules/color/support/gradient-samples.ts +134 -0
  88. package/dist/skills/frontend/scripts/detect/rules/color/support/gradients.ts +91 -0
  89. package/dist/skills/frontend/scripts/detect/rules/color/support/mockup-roots.ts +63 -0
  90. package/dist/skills/frontend/scripts/detect/rules/color/support/page-ignore.ts +7 -0
  91. package/dist/skills/frontend/scripts/detect/rules/color/support/painted-text.ts +141 -0
  92. package/dist/skills/frontend/scripts/detect/rules/color/support/palette-roles.ts +58 -0
  93. package/dist/skills/frontend/scripts/detect/rules/color/support/placeholder-contrast.ts +25 -0
  94. package/dist/skills/frontend/scripts/detect/rules/color/support/stock-accent.ts +31 -0
  95. package/dist/skills/frontend/scripts/detect/rules/color/support/text-colors.ts +80 -0
  96. package/dist/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.test.ts +18 -0
  97. package/dist/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.ts +20 -0
  98. package/dist/skills/frontend/scripts/detect/rules/copy/broken-image.test.ts +25 -0
  99. package/dist/skills/frontend/scripts/detect/rules/copy/broken-image.ts +17 -0
  100. package/dist/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.test.ts +39 -0
  101. package/dist/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.ts +46 -0
  102. package/dist/skills/frontend/scripts/detect/rules/copy/index.ts +15 -0
  103. package/dist/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.test.ts +18 -0
  104. package/dist/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.ts +33 -0
  105. package/dist/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.test.ts +58 -0
  106. package/dist/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.ts +34 -0
  107. package/dist/skills/frontend/scripts/detect/rules/copy/repeated-container-text.test.ts +43 -0
  108. package/dist/skills/frontend/scripts/detect/rules/copy/repeated-container-text.ts +56 -0
  109. package/dist/skills/frontend/scripts/detect/rules/copy/script-error.test.ts +48 -0
  110. package/dist/skills/frontend/scripts/detect/rules/copy/script-error.ts +38 -0
  111. package/dist/skills/frontend/scripts/detect/rules/copy/skipped-heading.test.ts +49 -0
  112. package/dist/skills/frontend/scripts/detect/rules/copy/skipped-heading.ts +81 -0
  113. package/dist/skills/frontend/scripts/detect/rules/copy/support/numbered-label.ts +94 -0
  114. package/dist/skills/frontend/scripts/detect/rules/copy/support/page-text.ts +37 -0
  115. package/dist/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.test.ts +17 -0
  116. package/dist/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.ts +21 -0
  117. package/dist/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.test.ts +43 -0
  118. package/dist/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.ts +48 -0
  119. package/dist/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.test.ts +33 -0
  120. package/dist/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.ts +14 -0
  121. package/dist/skills/frontend/scripts/detect/rules/decoration/bounce-easing.test.ts +72 -0
  122. package/dist/skills/frontend/scripts/detect/rules/decoration/bounce-easing.ts +83 -0
  123. package/dist/skills/frontend/scripts/detect/rules/decoration/buried-raster.test.ts +95 -0
  124. package/dist/skills/frontend/scripts/detect/rules/decoration/buried-raster.ts +72 -0
  125. package/dist/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.test.ts +28 -0
  126. package/dist/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.ts +34 -0
  127. package/dist/skills/frontend/scripts/detect/rules/decoration/design-system-radius.test.ts +37 -0
  128. package/dist/skills/frontend/scripts/detect/rules/decoration/design-system-radius.ts +31 -0
  129. package/dist/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.test.ts +59 -0
  130. package/dist/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.ts +66 -0
  131. package/dist/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.test.ts +45 -0
  132. package/dist/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.ts +31 -0
  133. package/dist/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.test.ts +76 -0
  134. package/dist/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.ts +19 -0
  135. package/dist/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.test.ts +67 -0
  136. package/dist/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.ts +92 -0
  137. package/dist/skills/frontend/scripts/detect/rules/decoration/index.ts +38 -0
  138. package/dist/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.test.ts +126 -0
  139. package/dist/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.ts +69 -0
  140. package/dist/skills/frontend/scripts/detect/rules/decoration/marquee.test.ts +63 -0
  141. package/dist/skills/frontend/scripts/detect/rules/decoration/marquee.ts +51 -0
  142. package/dist/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.test.ts +67 -0
  143. package/dist/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.ts +41 -0
  144. package/dist/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.test.ts +58 -0
  145. package/dist/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.ts +72 -0
  146. package/dist/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.test.ts +26 -0
  147. package/dist/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.ts +25 -0
  148. package/dist/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.test.ts +59 -0
  149. package/dist/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.ts +58 -0
  150. package/dist/skills/frontend/scripts/detect/rules/decoration/side-tab.test.ts +91 -0
  151. package/dist/skills/frontend/scripts/detect/rules/decoration/side-tab.ts +17 -0
  152. package/dist/skills/frontend/scripts/detect/rules/decoration/support/appearance.ts +110 -0
  153. package/dist/skills/frontend/scripts/detect/rules/decoration/support/assert-cases.ts +25 -0
  154. package/dist/skills/frontend/scripts/detect/rules/decoration/support/borders.ts +150 -0
  155. package/dist/skills/frontend/scripts/detect/rules/decoration/support/clip-geometry.ts +151 -0
  156. package/dist/skills/frontend/scripts/detect/rules/decoration/support/css-candidates.ts +66 -0
  157. package/dist/skills/frontend/scripts/detect/rules/decoration/support/curve-samples.ts +55 -0
  158. package/dist/skills/frontend/scripts/detect/rules/decoration/support/gradient-pattern.ts +40 -0
  159. package/dist/skills/frontend/scripts/detect/rules/decoration/support/keyframes.ts +134 -0
  160. package/dist/skills/frontend/scripts/detect/rules/decoration/support/labels.ts +85 -0
  161. package/dist/skills/frontend/scripts/detect/rules/decoration/support/raster-state.ts +51 -0
  162. package/dist/skills/frontend/scripts/detect/rules/index.ts +16 -0
  163. package/dist/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.test.ts +64 -0
  164. package/dist/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.ts +62 -0
  165. package/dist/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.test.ts +40 -0
  166. package/dist/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.ts +15 -0
  167. package/dist/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.test.ts +62 -0
  168. package/dist/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.ts +63 -0
  169. package/dist/skills/frontend/scripts/detect/rules/layout/cramped-padding.test.ts +61 -0
  170. package/dist/skills/frontend/scripts/detect/rules/layout/cramped-padding.ts +97 -0
  171. package/dist/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.test.ts +43 -0
  172. package/dist/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.ts +47 -0
  173. package/dist/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.test.ts +28 -0
  174. package/dist/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.ts +43 -0
  175. package/dist/skills/frontend/scripts/detect/rules/layout/heading-rhythm.test.ts +67 -0
  176. package/dist/skills/frontend/scripts/detect/rules/layout/heading-rhythm.ts +30 -0
  177. package/dist/skills/frontend/scripts/detect/rules/layout/index.ts +21 -0
  178. package/dist/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.test.ts +19 -0
  179. package/dist/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.ts +32 -0
  180. package/dist/skills/frontend/scripts/detect/rules/layout/nested-cards.test.ts +60 -0
  181. package/dist/skills/frontend/scripts/detect/rules/layout/nested-cards.ts +38 -0
  182. package/dist/skills/frontend/scripts/detect/rules/layout/straggler.test.ts +33 -0
  183. package/dist/skills/frontend/scripts/detect/rules/layout/straggler.ts +28 -0
  184. package/dist/skills/frontend/scripts/detect/rules/layout/support/cards.ts +114 -0
  185. package/dist/skills/frontend/scripts/detect/rules/layout/support/clipping.ts +71 -0
  186. package/dist/skills/frontend/scripts/detect/rules/layout/support/declared-mockups.ts +46 -0
  187. package/dist/skills/frontend/scripts/detect/rules/layout/support/geometry.ts +73 -0
  188. package/dist/skills/frontend/scripts/detect/rules/layout/support/hidden-interface.ts +35 -0
  189. package/dist/skills/frontend/scripts/detect/rules/layout/support/layout-cases.ts +23 -0
  190. package/dist/skills/frontend/scripts/detect/rules/layout/support/line-breaks.ts +32 -0
  191. package/dist/skills/frontend/scripts/detect/rules/layout/support/motion.ts +77 -0
  192. package/dist/skills/frontend/scripts/detect/rules/layout/support/padding.ts +93 -0
  193. package/dist/skills/frontend/scripts/detect/rules/layout/support/rhythm.ts +161 -0
  194. package/dist/skills/frontend/scripts/detect/rules/layout/text-occlusion.test.ts +37 -0
  195. package/dist/skills/frontend/scripts/detect/rules/layout/text-occlusion.ts +84 -0
  196. package/dist/skills/frontend/scripts/detect/rules/layout/text-overflow.test.ts +83 -0
  197. package/dist/skills/frontend/scripts/detect/rules/layout/text-overflow.ts +72 -0
  198. package/dist/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.test.ts +22 -0
  199. package/dist/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.ts +22 -0
  200. package/dist/skills/frontend/scripts/detect/rules/layout/viewport-reflow.test.ts +34 -0
  201. package/dist/skills/frontend/scripts/detect/rules/layout/viewport-reflow.ts +33 -0
  202. package/dist/skills/frontend/scripts/detect/rules/source/ai-color-palette.test.ts +13 -0
  203. package/dist/skills/frontend/scripts/detect/rules/source/ai-color-palette.ts +11 -0
  204. package/dist/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.test.ts +12 -0
  205. package/dist/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.ts +14 -0
  206. package/dist/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.test.ts +14 -0
  207. package/dist/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.ts +20 -0
  208. package/dist/skills/frontend/scripts/detect/rules/source/bounce-easing.test.ts +19 -0
  209. package/dist/skills/frontend/scripts/detect/rules/source/bounce-easing.ts +21 -0
  210. package/dist/skills/frontend/scripts/detect/rules/source/broken-image.test.ts +27 -0
  211. package/dist/skills/frontend/scripts/detect/rules/source/broken-image.ts +16 -0
  212. package/dist/skills/frontend/scripts/detect/rules/source/codex-grid-background.test.ts +11 -0
  213. package/dist/skills/frontend/scripts/detect/rules/source/codex-grid-background.ts +18 -0
  214. package/dist/skills/frontend/scripts/detect/rules/source/dark-glow.test.ts +15 -0
  215. package/dist/skills/frontend/scripts/detect/rules/source/dark-glow.ts +21 -0
  216. package/dist/skills/frontend/scripts/detect/rules/source/em-dash-overuse.test.ts +13 -0
  217. package/dist/skills/frontend/scripts/detect/rules/source/em-dash-overuse.ts +15 -0
  218. package/dist/skills/frontend/scripts/detect/rules/source/gradient-text.test.ts +12 -0
  219. package/dist/skills/frontend/scripts/detect/rules/source/gradient-text.ts +11 -0
  220. package/dist/skills/frontend/scripts/detect/rules/source/gray-on-color.test.ts +20 -0
  221. package/dist/skills/frontend/scripts/detect/rules/source/gray-on-color.ts +13 -0
  222. package/dist/skills/frontend/scripts/detect/rules/source/index.ts +19 -0
  223. package/dist/skills/frontend/scripts/detect/rules/source/marketing-buzzword.test.ts +12 -0
  224. package/dist/skills/frontend/scripts/detect/rules/source/marketing-buzzword.ts +17 -0
  225. package/dist/skills/frontend/scripts/detect/rules/source/marquee.test.ts +12 -0
  226. package/dist/skills/frontend/scripts/detect/rules/source/marquee.ts +12 -0
  227. package/dist/skills/frontend/scripts/detect/rules/source/monotonous-spacing.test.ts +13 -0
  228. package/dist/skills/frontend/scripts/detect/rules/source/monotonous-spacing.ts +22 -0
  229. package/dist/skills/frontend/scripts/detect/rules/source/overused-font.test.ts +21 -0
  230. package/dist/skills/frontend/scripts/detect/rules/source/overused-font.ts +16 -0
  231. package/dist/skills/frontend/scripts/detect/rules/source/radial-halo.test.ts +16 -0
  232. package/dist/skills/frontend/scripts/detect/rules/source/radial-halo.ts +14 -0
  233. package/dist/skills/frontend/scripts/detect/rules/source/side-tab.test.ts +29 -0
  234. package/dist/skills/frontend/scripts/detect/rules/source/side-tab.ts +58 -0
  235. package/dist/skills/frontend/scripts/detect/rules/source/support/accent-scans.ts +78 -0
  236. package/dist/skills/frontend/scripts/detect/rules/source/support/check-source.ts +6 -0
  237. package/dist/skills/frontend/scripts/detect/rules/source/support/corners.ts +105 -0
  238. package/dist/skills/frontend/scripts/detect/rules/source/support/css-effects.ts +81 -0
  239. package/dist/skills/frontend/scripts/detect/rules/source/support/css-scopes.ts +131 -0
  240. package/dist/skills/frontend/scripts/detect/rules/source/support/image-tags.ts +113 -0
  241. package/dist/skills/frontend/scripts/detect/rules/source/support/js-punctuation.ts +34 -0
  242. package/dist/skills/frontend/scripts/detect/rules/source/support/markup-scope.ts +44 -0
  243. package/dist/skills/frontend/scripts/detect/rules/source/support/source-color.ts +42 -0
  244. package/dist/skills/frontend/scripts/detect/rules/source/support/source-shadow.ts +15 -0
  245. package/dist/skills/frontend/scripts/detect/rules/source/support/source-text.ts +110 -0
  246. package/dist/skills/frontend/scripts/detect/rules/typography/all-caps-body.test.ts +24 -0
  247. package/dist/skills/frontend/scripts/detect/rules/typography/all-caps-body.ts +15 -0
  248. package/dist/skills/frontend/scripts/detect/rules/typography/design-system-font-size.test.ts +21 -0
  249. package/dist/skills/frontend/scripts/detect/rules/typography/design-system-font-size.ts +23 -0
  250. package/dist/skills/frontend/scripts/detect/rules/typography/design-system-font.test.ts +22 -0
  251. package/dist/skills/frontend/scripts/detect/rules/typography/design-system-font.ts +24 -0
  252. package/dist/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.test.ts +23 -0
  253. package/dist/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.ts +18 -0
  254. package/dist/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.test.ts +33 -0
  255. package/dist/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.ts +26 -0
  256. package/dist/skills/frontend/scripts/detect/rules/typography/index.ts +21 -0
  257. package/dist/skills/frontend/scripts/detect/rules/typography/italic-serif-display.test.ts +24 -0
  258. package/dist/skills/frontend/scripts/detect/rules/typography/italic-serif-display.ts +24 -0
  259. package/dist/skills/frontend/scripts/detect/rules/typography/justified-text.test.ts +31 -0
  260. package/dist/skills/frontend/scripts/detect/rules/typography/justified-text.ts +32 -0
  261. package/dist/skills/frontend/scripts/detect/rules/typography/line-length.test.ts +43 -0
  262. package/dist/skills/frontend/scripts/detect/rules/typography/line-length.ts +28 -0
  263. package/dist/skills/frontend/scripts/detect/rules/typography/oversized-h1.test.ts +26 -0
  264. package/dist/skills/frontend/scripts/detect/rules/typography/oversized-h1.ts +20 -0
  265. package/dist/skills/frontend/scripts/detect/rules/typography/overused-font.test.ts +35 -0
  266. package/dist/skills/frontend/scripts/detect/rules/typography/overused-font.ts +45 -0
  267. package/dist/skills/frontend/scripts/detect/rules/typography/support/drawn-enlargement.ts +48 -0
  268. package/dist/skills/frontend/scripts/detect/rules/typography/support/fading-text.ts +48 -0
  269. package/dist/skills/frontend/scripts/detect/rules/typography/support/flex-runs.ts +16 -0
  270. package/dist/skills/frontend/scripts/detect/rules/typography/support/font-family.ts +28 -0
  271. package/dist/skills/frontend/scripts/detect/rules/typography/support/painted-text.test.ts +63 -0
  272. package/dist/skills/frontend/scripts/detect/rules/typography/support/painted-text.ts +81 -0
  273. package/dist/skills/frontend/scripts/detect/rules/typography/support/svg-size.ts +57 -0
  274. package/dist/skills/frontend/scripts/detect/rules/typography/support/text-context.ts +112 -0
  275. package/dist/skills/frontend/scripts/detect/rules/typography/support/text-lines.ts +43 -0
  276. package/dist/skills/frontend/scripts/detect/rules/typography/support/type-hierarchy.ts +48 -0
  277. package/dist/skills/frontend/scripts/detect/rules/typography/tight-leading.test.ts +54 -0
  278. package/dist/skills/frontend/scripts/detect/rules/typography/tight-leading.ts +47 -0
  279. package/dist/skills/frontend/scripts/detect/rules/typography/tiny-text.test.ts +60 -0
  280. package/dist/skills/frontend/scripts/detect/rules/typography/tiny-text.ts +23 -0
  281. package/dist/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.test.ts +98 -0
  282. package/dist/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.ts +28 -0
  283. package/dist/skills/frontend/scripts/detect/rules/typography/wide-tracking.test.ts +26 -0
  284. package/dist/skills/frontend/scripts/detect/rules/typography/wide-tracking.ts +26 -0
  285. package/dist/skills/frontend/scripts/detect/snapshot/collect.ts +158 -0
  286. package/dist/skills/frontend/scripts/detect/snapshot/style-props.ts +25 -0
  287. package/dist/skills/frontend/scripts/detect/testing/build-snapshot.ts +78 -0
  288. package/dist/skills/frontend/scripts/detect/tsconfig.json +19 -0
  289. package/dist/skills/frontend/scripts/detect/types.ts +124 -0
  290. package/dist/skills/programming/SKILL.md +15 -74
  291. package/dist/skills/programming/references/go/README.md +1 -1
  292. package/dist/skills/programming/references/go/bootstrap.md +2 -2
  293. package/dist/skills/programming/references/python/README.md +4 -4
  294. package/dist/skills/programming/references/python/one-liners.md +5 -5
  295. package/dist/skills/programming/references/testing/README.md +82 -0
  296. package/dist/skills/programming/references/testing/junk-classes.md +56 -0
  297. package/dist/skills/programming/references/typescript/README.md +1 -2
  298. package/dist/skills/programming/scripts/go/new-project.ts +197 -0
  299. package/dist/skills/programming/scripts/python/new-project.ts +231 -0
  300. package/dist/skills/programming/scripts/python/new-script.ts +134 -0
  301. package/dist/skills/programming/scripts/rust/new-project.ts +215 -0
  302. package/dist/skills/programming/scripts/scaffolders.test.ts +96 -0
  303. package/dist/skills/programming/scripts/shared/run-tool.ts +19 -0
  304. package/dist/skills/visual-qa/SKILL.md +12 -1
  305. package/dist/tui.js +128 -39
  306. package/package.json +20 -19
  307. package/packages/lsp-core/src/lsp/config-loader.ts +18 -2
  308. package/packages/lsp-core/src/lsp/host-js-runtime.test.ts +150 -0
  309. package/packages/lsp-core/src/lsp/host-js-runtime.ts +57 -0
  310. package/packages/lsp-core/src/lsp/server-definitions.ts +10 -0
  311. package/packages/lsp-core/src/lsp/server-resolution.ts +9 -1
  312. package/packages/lsp-core/src/lsp/typescript-server-defaults.test.ts +84 -0
  313. package/packages/lsp-daemon/dist/cli.js +81 -15
  314. package/packages/lsp-daemon/dist/client.js +74 -8
  315. package/packages/lsp-daemon/dist/index.js +76 -10
  316. package/packages/lsp-tools-mcp/dist/cli.js +74 -8
  317. package/packages/lsp-tools-mcp/dist/mcp.js +74 -8
  318. package/packages/lsp-tools-mcp/dist/tools.js +74 -8
  319. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  320. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +20 -4
  321. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  322. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  323. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  324. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  325. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  326. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  327. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  328. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  329. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
  330. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +77 -13
  331. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  332. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  333. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  334. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  335. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  336. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  337. package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +34 -2
  338. package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +34 -2
  339. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  340. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  341. package/packages/omo-codex/plugin/components/telemetry/test/codex-hook.test.ts +14 -1
  342. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  343. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  344. package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
  345. package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
  346. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
  347. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  348. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  349. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  350. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  351. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  352. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  353. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  354. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  355. package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
  356. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  357. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  358. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  359. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  360. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  361. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  362. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  363. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
  364. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  365. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  366. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  367. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  368. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  369. package/packages/omo-codex/plugin/package-lock.json +12 -12
  370. package/packages/omo-codex/plugin/package.json +1 -1
  371. package/packages/omo-codex/plugin/scripts/auto-update-plan.mjs +16 -1
  372. package/packages/omo-codex/plugin/skills/browser/runtime/omowright/index.js +24 -33
  373. package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +3 -3
  374. package/packages/omo-codex/plugin/skills/frontend/ATTRIBUTION.md +104 -1
  375. package/packages/omo-codex/plugin/skills/frontend/SKILL.md +7 -3
  376. package/packages/omo-codex/plugin/skills/frontend/references/design/design-system-architecture.md +3 -3
  377. package/packages/omo-codex/plugin/skills/frontend/references/perfection/craft-floor.md +59 -0
  378. package/packages/omo-codex/plugin/skills/frontend/references/perfection/detect.md +52 -0
  379. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/cli.ts +70 -0
  380. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/config.ts +53 -0
  381. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/core/characters.ts +2 -0
  382. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/core/color.ts +150 -0
  383. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/core/page.ts +84 -0
  384. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/core/shadow.ts +40 -0
  385. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/core/source.ts +33 -0
  386. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/detect.ts +77 -0
  387. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/index.ts +23 -0
  388. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/lint.ts +98 -0
  389. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/render/probe-placement.ts +50 -0
  390. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/render/renderer.ts +37 -0
  391. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/render/webview.ts +71 -0
  392. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/report.ts +29 -0
  393. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rule.ts +42 -0
  394. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/ai-color-palette.ts +83 -0
  395. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/cream-palette.ts +35 -0
  396. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/dark-glow.ts +44 -0
  397. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/design-system-color.ts +35 -0
  398. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/gradient-text.ts +59 -0
  399. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/gray-on-color.ts +38 -0
  400. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/index.ts +15 -0
  401. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/low-contrast.ts +57 -0
  402. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/radial-halo.ts +31 -0
  403. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.ts +33 -0
  404. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/animation-opacity.ts +78 -0
  405. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/color-path.ts +15 -0
  406. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/contrast-pairs.ts +54 -0
  407. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/contrast-role.ts +76 -0
  408. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/glow-forms.ts +56 -0
  409. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/gradient-samples.ts +134 -0
  410. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/gradients.ts +91 -0
  411. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/mockup-roots.ts +63 -0
  412. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/page-ignore.ts +7 -0
  413. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/painted-text.ts +141 -0
  414. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/palette-roles.ts +58 -0
  415. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/placeholder-contrast.ts +25 -0
  416. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/stock-accent.ts +31 -0
  417. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/text-colors.ts +80 -0
  418. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.ts +20 -0
  419. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/broken-image.ts +17 -0
  420. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.ts +46 -0
  421. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/index.ts +15 -0
  422. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.ts +33 -0
  423. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.ts +34 -0
  424. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/repeated-container-text.ts +56 -0
  425. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/script-error.ts +38 -0
  426. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/skipped-heading.ts +81 -0
  427. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/support/numbered-label.ts +94 -0
  428. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/support/page-text.ts +37 -0
  429. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.ts +21 -0
  430. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.ts +48 -0
  431. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.ts +14 -0
  432. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/bounce-easing.ts +83 -0
  433. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/buried-raster.ts +72 -0
  434. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.ts +34 -0
  435. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/design-system-radius.ts +31 -0
  436. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.ts +66 -0
  437. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.ts +31 -0
  438. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.ts +19 -0
  439. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.ts +92 -0
  440. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/index.ts +38 -0
  441. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.ts +69 -0
  442. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/marquee.ts +51 -0
  443. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.ts +41 -0
  444. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.ts +72 -0
  445. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.ts +25 -0
  446. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.ts +58 -0
  447. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/side-tab.ts +17 -0
  448. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/appearance.ts +110 -0
  449. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/assert-cases.ts +25 -0
  450. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/borders.ts +150 -0
  451. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/clip-geometry.ts +151 -0
  452. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/css-candidates.ts +66 -0
  453. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/curve-samples.ts +55 -0
  454. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/gradient-pattern.ts +40 -0
  455. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/keyframes.ts +134 -0
  456. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/labels.ts +85 -0
  457. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/raster-state.ts +51 -0
  458. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/index.ts +16 -0
  459. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.ts +62 -0
  460. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.ts +15 -0
  461. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.ts +63 -0
  462. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/cramped-padding.ts +97 -0
  463. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.ts +47 -0
  464. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.ts +43 -0
  465. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/heading-rhythm.ts +30 -0
  466. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/index.ts +21 -0
  467. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.ts +32 -0
  468. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/nested-cards.ts +38 -0
  469. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/straggler.ts +28 -0
  470. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/cards.ts +114 -0
  471. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/clipping.ts +71 -0
  472. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/declared-mockups.ts +46 -0
  473. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/geometry.ts +73 -0
  474. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/hidden-interface.ts +35 -0
  475. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/layout-cases.ts +23 -0
  476. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/line-breaks.ts +32 -0
  477. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/motion.ts +77 -0
  478. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/padding.ts +93 -0
  479. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/rhythm.ts +161 -0
  480. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/text-occlusion.ts +84 -0
  481. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/text-overflow.ts +72 -0
  482. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.ts +22 -0
  483. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/viewport-reflow.ts +33 -0
  484. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/ai-color-palette.ts +11 -0
  485. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.ts +14 -0
  486. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.ts +20 -0
  487. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/bounce-easing.ts +21 -0
  488. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/broken-image.ts +16 -0
  489. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/codex-grid-background.ts +18 -0
  490. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/dark-glow.ts +21 -0
  491. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/em-dash-overuse.ts +15 -0
  492. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/gradient-text.ts +11 -0
  493. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/gray-on-color.ts +13 -0
  494. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/index.ts +19 -0
  495. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/marketing-buzzword.ts +17 -0
  496. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/marquee.ts +12 -0
  497. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/monotonous-spacing.ts +22 -0
  498. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/overused-font.ts +16 -0
  499. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/radial-halo.ts +14 -0
  500. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/side-tab.ts +58 -0
  501. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/accent-scans.ts +78 -0
  502. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/check-source.ts +6 -0
  503. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/corners.ts +105 -0
  504. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/css-effects.ts +81 -0
  505. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/css-scopes.ts +131 -0
  506. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/image-tags.ts +113 -0
  507. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/js-punctuation.ts +34 -0
  508. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/markup-scope.ts +44 -0
  509. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/source-color.ts +42 -0
  510. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/source-shadow.ts +15 -0
  511. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/source-text.ts +110 -0
  512. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/all-caps-body.ts +15 -0
  513. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/design-system-font-size.ts +23 -0
  514. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/design-system-font.ts +24 -0
  515. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.ts +18 -0
  516. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.ts +26 -0
  517. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/index.ts +21 -0
  518. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/italic-serif-display.ts +24 -0
  519. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/justified-text.ts +32 -0
  520. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/line-length.ts +28 -0
  521. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/oversized-h1.ts +20 -0
  522. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/overused-font.ts +45 -0
  523. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/drawn-enlargement.ts +48 -0
  524. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/fading-text.ts +48 -0
  525. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/flex-runs.ts +16 -0
  526. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/font-family.ts +28 -0
  527. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/painted-text.ts +81 -0
  528. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/svg-size.ts +57 -0
  529. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/text-context.ts +112 -0
  530. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/text-lines.ts +43 -0
  531. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/type-hierarchy.ts +48 -0
  532. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/tight-leading.ts +47 -0
  533. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/tiny-text.ts +23 -0
  534. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.ts +28 -0
  535. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/wide-tracking.ts +26 -0
  536. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/snapshot/collect.ts +158 -0
  537. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/snapshot/style-props.ts +25 -0
  538. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/testing/build-snapshot.ts +78 -0
  539. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/tsconfig.json +19 -0
  540. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/types.ts +124 -0
  541. package/packages/omo-codex/plugin/skills/programming/SKILL.md +15 -74
  542. package/packages/omo-codex/plugin/skills/programming/references/go/README.md +1 -1
  543. package/packages/omo-codex/plugin/skills/programming/references/go/bootstrap.md +2 -2
  544. package/packages/omo-codex/plugin/skills/programming/references/python/README.md +4 -4
  545. package/packages/omo-codex/plugin/skills/programming/references/python/one-liners.md +5 -5
  546. package/packages/omo-codex/plugin/skills/programming/references/testing/README.md +82 -0
  547. package/packages/omo-codex/plugin/skills/programming/references/testing/junk-classes.md +56 -0
  548. package/packages/omo-codex/plugin/skills/programming/references/typescript/README.md +1 -2
  549. package/packages/omo-codex/plugin/skills/programming/scripts/go/new-project.ts +197 -0
  550. package/packages/omo-codex/plugin/skills/programming/scripts/python/new-project.ts +231 -0
  551. package/packages/omo-codex/plugin/skills/programming/scripts/python/new-script.ts +134 -0
  552. package/packages/omo-codex/plugin/skills/programming/scripts/rust/new-project.ts +215 -0
  553. package/packages/omo-codex/plugin/skills/programming/scripts/shared/run-tool.ts +19 -0
  554. package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +12 -1
  555. package/packages/omo-codex/plugin/test/auto-update.test.mjs +62 -0
  556. package/packages/omo-codex/plugin/test/payload-equivalence.test.mjs +12 -2
  557. package/packages/omo-codex/scripts/install-dist/install-local.mjs +77 -10
  558. package/packages/shared-skills/skills/browser/runtime/omowright/index.js +24 -33
  559. package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +3 -3
  560. package/packages/shared-skills/skills/frontend/ATTRIBUTION.md +104 -1
  561. package/packages/shared-skills/skills/frontend/SKILL.md +7 -3
  562. package/packages/shared-skills/skills/frontend/references/design/design-system-architecture.md +3 -3
  563. package/packages/shared-skills/skills/frontend/references/perfection/craft-floor.md +59 -0
  564. package/packages/shared-skills/skills/frontend/references/perfection/detect.md +52 -0
  565. package/packages/shared-skills/skills/frontend/scripts/detect/cli.ts +70 -0
  566. package/packages/shared-skills/skills/frontend/scripts/detect/config.test.ts +26 -0
  567. package/packages/shared-skills/skills/frontend/scripts/detect/config.ts +53 -0
  568. package/packages/shared-skills/skills/frontend/scripts/detect/core/characters.ts +2 -0
  569. package/packages/shared-skills/skills/frontend/scripts/detect/core/color.test.ts +29 -0
  570. package/packages/shared-skills/skills/frontend/scripts/detect/core/color.ts +150 -0
  571. package/packages/shared-skills/skills/frontend/scripts/detect/core/page.ts +84 -0
  572. package/packages/shared-skills/skills/frontend/scripts/detect/core/shadow.ts +40 -0
  573. package/packages/shared-skills/skills/frontend/scripts/detect/core/source.ts +33 -0
  574. package/packages/shared-skills/skills/frontend/scripts/detect/detect.ts +77 -0
  575. package/packages/shared-skills/skills/frontend/scripts/detect/index.ts +23 -0
  576. package/packages/shared-skills/skills/frontend/scripts/detect/lint.test.ts +27 -0
  577. package/packages/shared-skills/skills/frontend/scripts/detect/lint.ts +98 -0
  578. package/packages/shared-skills/skills/frontend/scripts/detect/render/probe-placement.test.ts +19 -0
  579. package/packages/shared-skills/skills/frontend/scripts/detect/render/probe-placement.ts +50 -0
  580. package/packages/shared-skills/skills/frontend/scripts/detect/render/renderer.ts +37 -0
  581. package/packages/shared-skills/skills/frontend/scripts/detect/render/webview.ts +71 -0
  582. package/packages/shared-skills/skills/frontend/scripts/detect/report.ts +29 -0
  583. package/packages/shared-skills/skills/frontend/scripts/detect/rule.ts +42 -0
  584. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/ai-color-palette.test.ts +74 -0
  585. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/ai-color-palette.ts +83 -0
  586. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/cream-palette.test.ts +24 -0
  587. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/cream-palette.ts +35 -0
  588. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/dark-glow.test.ts +47 -0
  589. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/dark-glow.ts +44 -0
  590. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/design-system-color.test.ts +26 -0
  591. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/design-system-color.ts +35 -0
  592. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/gradient-text.test.ts +24 -0
  593. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/gradient-text.ts +59 -0
  594. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/gray-on-color.test.ts +39 -0
  595. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/gray-on-color.ts +38 -0
  596. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/index.ts +15 -0
  597. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/low-contrast.test.ts +209 -0
  598. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/low-contrast.ts +57 -0
  599. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/placeholder-contrast.test.ts +62 -0
  600. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/radial-halo.test.ts +40 -0
  601. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/radial-halo.ts +31 -0
  602. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.test.ts +27 -0
  603. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.ts +33 -0
  604. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/animation-opacity.ts +78 -0
  605. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/color-path.ts +15 -0
  606. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/contrast-pairs.ts +54 -0
  607. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/contrast-role.ts +76 -0
  608. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/glow-forms.ts +56 -0
  609. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/gradient-samples.ts +134 -0
  610. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/gradients.ts +91 -0
  611. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/mockup-roots.ts +63 -0
  612. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/page-ignore.ts +7 -0
  613. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/painted-text.ts +141 -0
  614. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/palette-roles.ts +58 -0
  615. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/placeholder-contrast.ts +25 -0
  616. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/stock-accent.ts +31 -0
  617. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/text-colors.ts +80 -0
  618. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.test.ts +18 -0
  619. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.ts +20 -0
  620. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/broken-image.test.ts +25 -0
  621. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/broken-image.ts +17 -0
  622. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.test.ts +39 -0
  623. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.ts +46 -0
  624. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/index.ts +15 -0
  625. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.test.ts +18 -0
  626. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.ts +33 -0
  627. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.test.ts +58 -0
  628. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.ts +34 -0
  629. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/repeated-container-text.test.ts +43 -0
  630. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/repeated-container-text.ts +56 -0
  631. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/script-error.test.ts +48 -0
  632. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/script-error.ts +38 -0
  633. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/skipped-heading.test.ts +49 -0
  634. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/skipped-heading.ts +81 -0
  635. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/support/numbered-label.ts +94 -0
  636. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/support/page-text.ts +37 -0
  637. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.test.ts +17 -0
  638. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.ts +21 -0
  639. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.test.ts +43 -0
  640. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.ts +48 -0
  641. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.test.ts +33 -0
  642. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.ts +14 -0
  643. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/bounce-easing.test.ts +72 -0
  644. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/bounce-easing.ts +83 -0
  645. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/buried-raster.test.ts +95 -0
  646. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/buried-raster.ts +72 -0
  647. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.test.ts +28 -0
  648. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.ts +34 -0
  649. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/design-system-radius.test.ts +37 -0
  650. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/design-system-radius.ts +31 -0
  651. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.test.ts +59 -0
  652. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.ts +66 -0
  653. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.test.ts +45 -0
  654. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.ts +31 -0
  655. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.test.ts +76 -0
  656. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.ts +19 -0
  657. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.test.ts +67 -0
  658. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.ts +92 -0
  659. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/index.ts +38 -0
  660. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.test.ts +126 -0
  661. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.ts +69 -0
  662. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/marquee.test.ts +63 -0
  663. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/marquee.ts +51 -0
  664. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.test.ts +67 -0
  665. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.ts +41 -0
  666. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.test.ts +58 -0
  667. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.ts +72 -0
  668. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.test.ts +26 -0
  669. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.ts +25 -0
  670. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.test.ts +59 -0
  671. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.ts +58 -0
  672. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/side-tab.test.ts +91 -0
  673. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/side-tab.ts +17 -0
  674. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/appearance.ts +110 -0
  675. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/assert-cases.ts +25 -0
  676. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/borders.ts +150 -0
  677. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/clip-geometry.ts +151 -0
  678. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/css-candidates.ts +66 -0
  679. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/curve-samples.ts +55 -0
  680. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/gradient-pattern.ts +40 -0
  681. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/keyframes.ts +134 -0
  682. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/labels.ts +85 -0
  683. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/raster-state.ts +51 -0
  684. package/packages/shared-skills/skills/frontend/scripts/detect/rules/index.ts +16 -0
  685. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.test.ts +64 -0
  686. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.ts +62 -0
  687. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.test.ts +40 -0
  688. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.ts +15 -0
  689. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.test.ts +62 -0
  690. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.ts +63 -0
  691. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/cramped-padding.test.ts +61 -0
  692. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/cramped-padding.ts +97 -0
  693. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.test.ts +43 -0
  694. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.ts +47 -0
  695. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.test.ts +28 -0
  696. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.ts +43 -0
  697. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/heading-rhythm.test.ts +67 -0
  698. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/heading-rhythm.ts +30 -0
  699. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/index.ts +21 -0
  700. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.test.ts +19 -0
  701. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.ts +32 -0
  702. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/nested-cards.test.ts +60 -0
  703. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/nested-cards.ts +38 -0
  704. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/straggler.test.ts +33 -0
  705. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/straggler.ts +28 -0
  706. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/cards.ts +114 -0
  707. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/clipping.ts +71 -0
  708. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/declared-mockups.ts +46 -0
  709. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/geometry.ts +73 -0
  710. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/hidden-interface.ts +35 -0
  711. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/layout-cases.ts +23 -0
  712. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/line-breaks.ts +32 -0
  713. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/motion.ts +77 -0
  714. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/padding.ts +93 -0
  715. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/rhythm.ts +161 -0
  716. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/text-occlusion.test.ts +37 -0
  717. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/text-occlusion.ts +84 -0
  718. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/text-overflow.test.ts +83 -0
  719. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/text-overflow.ts +72 -0
  720. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.test.ts +22 -0
  721. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.ts +22 -0
  722. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/viewport-reflow.test.ts +34 -0
  723. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/viewport-reflow.ts +33 -0
  724. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/ai-color-palette.test.ts +13 -0
  725. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/ai-color-palette.ts +11 -0
  726. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.test.ts +12 -0
  727. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.ts +14 -0
  728. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.test.ts +14 -0
  729. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.ts +20 -0
  730. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/bounce-easing.test.ts +19 -0
  731. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/bounce-easing.ts +21 -0
  732. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/broken-image.test.ts +27 -0
  733. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/broken-image.ts +16 -0
  734. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/codex-grid-background.test.ts +11 -0
  735. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/codex-grid-background.ts +18 -0
  736. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/dark-glow.test.ts +15 -0
  737. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/dark-glow.ts +21 -0
  738. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/em-dash-overuse.test.ts +13 -0
  739. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/em-dash-overuse.ts +15 -0
  740. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/gradient-text.test.ts +12 -0
  741. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/gradient-text.ts +11 -0
  742. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/gray-on-color.test.ts +20 -0
  743. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/gray-on-color.ts +13 -0
  744. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/index.ts +19 -0
  745. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/marketing-buzzword.test.ts +12 -0
  746. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/marketing-buzzword.ts +17 -0
  747. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/marquee.test.ts +12 -0
  748. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/marquee.ts +12 -0
  749. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/monotonous-spacing.test.ts +13 -0
  750. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/monotonous-spacing.ts +22 -0
  751. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/overused-font.test.ts +21 -0
  752. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/overused-font.ts +16 -0
  753. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/radial-halo.test.ts +16 -0
  754. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/radial-halo.ts +14 -0
  755. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/side-tab.test.ts +29 -0
  756. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/side-tab.ts +58 -0
  757. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/accent-scans.ts +78 -0
  758. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/check-source.ts +6 -0
  759. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/corners.ts +105 -0
  760. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/css-effects.ts +81 -0
  761. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/css-scopes.ts +131 -0
  762. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/image-tags.ts +113 -0
  763. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/js-punctuation.ts +34 -0
  764. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/markup-scope.ts +44 -0
  765. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/source-color.ts +42 -0
  766. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/source-shadow.ts +15 -0
  767. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/source-text.ts +110 -0
  768. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/all-caps-body.test.ts +24 -0
  769. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/all-caps-body.ts +15 -0
  770. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/design-system-font-size.test.ts +21 -0
  771. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/design-system-font-size.ts +23 -0
  772. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/design-system-font.test.ts +22 -0
  773. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/design-system-font.ts +24 -0
  774. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.test.ts +23 -0
  775. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.ts +18 -0
  776. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.test.ts +33 -0
  777. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.ts +26 -0
  778. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/index.ts +21 -0
  779. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/italic-serif-display.test.ts +24 -0
  780. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/italic-serif-display.ts +24 -0
  781. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/justified-text.test.ts +31 -0
  782. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/justified-text.ts +32 -0
  783. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/line-length.test.ts +43 -0
  784. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/line-length.ts +28 -0
  785. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/oversized-h1.test.ts +26 -0
  786. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/oversized-h1.ts +20 -0
  787. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/overused-font.test.ts +35 -0
  788. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/overused-font.ts +45 -0
  789. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/drawn-enlargement.ts +48 -0
  790. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/fading-text.ts +48 -0
  791. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/flex-runs.ts +16 -0
  792. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/font-family.ts +28 -0
  793. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/painted-text.test.ts +63 -0
  794. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/painted-text.ts +81 -0
  795. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/svg-size.ts +57 -0
  796. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/text-context.ts +112 -0
  797. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/text-lines.ts +43 -0
  798. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/type-hierarchy.ts +48 -0
  799. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/tight-leading.test.ts +54 -0
  800. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/tight-leading.ts +47 -0
  801. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/tiny-text.test.ts +60 -0
  802. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/tiny-text.ts +23 -0
  803. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.test.ts +98 -0
  804. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.ts +28 -0
  805. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/wide-tracking.test.ts +26 -0
  806. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/wide-tracking.ts +26 -0
  807. package/packages/shared-skills/skills/frontend/scripts/detect/snapshot/collect.ts +158 -0
  808. package/packages/shared-skills/skills/frontend/scripts/detect/snapshot/style-props.ts +25 -0
  809. package/packages/shared-skills/skills/frontend/scripts/detect/testing/build-snapshot.ts +78 -0
  810. package/packages/shared-skills/skills/frontend/scripts/detect/tsconfig.json +19 -0
  811. package/packages/shared-skills/skills/frontend/scripts/detect/types.ts +124 -0
  812. package/packages/shared-skills/skills/programming/SKILL.md +15 -74
  813. package/packages/shared-skills/skills/programming/references/go/README.md +1 -1
  814. package/packages/shared-skills/skills/programming/references/go/bootstrap.md +2 -2
  815. package/packages/shared-skills/skills/programming/references/python/README.md +4 -4
  816. package/packages/shared-skills/skills/programming/references/python/one-liners.md +5 -5
  817. package/packages/shared-skills/skills/programming/references/testing/README.md +82 -0
  818. package/packages/shared-skills/skills/programming/references/testing/junk-classes.md +56 -0
  819. package/packages/shared-skills/skills/programming/references/typescript/README.md +1 -2
  820. package/packages/shared-skills/skills/programming/scripts/go/new-project.ts +197 -0
  821. package/packages/shared-skills/skills/programming/scripts/python/new-project.ts +231 -0
  822. package/packages/shared-skills/skills/programming/scripts/python/new-script.ts +134 -0
  823. package/packages/shared-skills/skills/programming/scripts/rust/new-project.ts +215 -0
  824. package/packages/shared-skills/skills/programming/scripts/scaffolders.test.ts +96 -0
  825. package/packages/shared-skills/skills/programming/scripts/shared/run-tool.ts +19 -0
  826. package/packages/shared-skills/skills/visual-qa/SKILL.md +12 -1
  827. package/dist/agents/gpt-prompt-identity.d.ts +0 -3
  828. package/dist/agents/hephaestus/gpt-5-4.d.ts +0 -24
  829. package/dist/agents/hephaestus/gpt-5-5.d.ts +0 -2
  830. package/dist/agents/hephaestus/gpt-5-6.d.ts +0 -2
  831. package/dist/agents/kimi-tool-loop-guard.d.ts +0 -1
  832. package/dist/agents/sisyphus/claude-fable-5.d.ts +0 -19
  833. package/dist/agents/sisyphus/claude-opus-4-7.d.ts +0 -22
  834. package/dist/agents/sisyphus/claude-opus-4-8.d.ts +0 -19
  835. package/dist/agents/sisyphus/claude-opus-5.d.ts +0 -33
  836. package/dist/agents/sisyphus/gemini.d.ts +0 -20
  837. package/dist/agents/sisyphus/glm-5-2.d.ts +0 -4
  838. package/dist/agents/sisyphus/gpt-5-4.d.ts +0 -26
  839. package/dist/agents/sisyphus/gpt-5-5.d.ts +0 -6
  840. package/dist/agents/sisyphus/gpt-task-system-guide.d.ts +0 -1
  841. package/dist/agents/sisyphus/grok-4.d.ts +0 -21
  842. package/dist/agents/sisyphus/index.d.ts +0 -31
  843. package/dist/agents/sisyphus/kimi-k2-6.d.ts +0 -32
  844. package/dist/agents/sisyphus/kimi-k2-7.d.ts +0 -17
  845. package/dist/agents/sisyphus/kimi-k3-1.d.ts +0 -9
  846. package/dist/agents/sisyphus/kimi-k3.d.ts +0 -19
  847. package/dist/agents/sisyphus-dynamic-prompt-builder.d.ts +0 -2
  848. package/dist/agents/sisyphus-dynamic-prompt-execution.d.ts +0 -2
  849. package/dist/agents/sisyphus-dynamic-prompt-exploration.d.ts +0 -2
  850. package/dist/agents/sisyphus-dynamic-prompt-role.d.ts +0 -2
  851. package/dist/agents/sisyphus-dynamic-prompt-sections.d.ts +0 -18
  852. package/dist/agents/sisyphus-dynamic-prompt-style.d.ts +0 -2
  853. package/dist/agents/sisyphus-dynamic-prompt.d.ts +0 -3
  854. package/dist/agents/sisyphus-gemini-fallback-overrides.d.ts +0 -1
  855. package/dist/agents/sisyphus-junior/gemini.d.ts +0 -10
  856. package/dist/agents/sisyphus-junior/glm-5-2.d.ts +0 -1
  857. package/dist/agents/sisyphus-junior/gpt-5-4.d.ts +0 -11
  858. package/dist/agents/sisyphus-junior/gpt-5-5.d.ts +0 -5
  859. package/dist/agents/sisyphus-junior/gpt.d.ts +0 -9
  860. package/dist/agents/sisyphus-junior/kimi-k2-6.d.ts +0 -13
  861. package/dist/agents/sisyphus-junior/kimi-k2-7.d.ts +0 -11
  862. package/dist/agents/sisyphus-junior/kimi-k3-1.d.ts +0 -6
  863. package/dist/agents/sisyphus-junior/kimi-k3.d.ts +0 -12
  864. package/dist/features/claude-code-agent-loader/opencode-config-agents-reader.d.ts +0 -1
  865. package/dist/features/claude-code-command-loader/loader-cache.d.ts +0 -1
  866. package/dist/features/claude-code-command-loader/loader.d.ts +0 -1
  867. package/dist/features/opencode-skill-loader/config-source-discovery.d.ts +0 -1
  868. package/dist/features/opencode-skill-loader/merger/config-skill-entry-loader.d.ts +0 -1
  869. package/dist/features/opencode-skill-loader/opencode-config-skills-reader.d.ts +0 -1
  870. package/dist/features/team-mode/team-layout-tmux/resolve-caller-tmux-session.d.ts +0 -1
  871. package/dist/features/team-mode/team-registry/team-spec-input-normalizer.d.ts +0 -1
  872. package/dist/shared/git-worktree/collect-git-diff-stats.d.ts +0 -1
  873. package/dist/shared/git-worktree/parse-status-porcelain-line.d.ts +0 -1
  874. package/dist/shared/migration/agent-names.d.ts +0 -1
  875. package/dist/shared/migration/migrations-sidecar.d.ts +0 -1
  876. package/dist/shared/skill-path-resolver.d.ts +0 -1
  877. package/dist/shared/zip-entry-listing/powershell-zip-entry-listing.d.ts +0 -1
  878. package/dist/shared/zip-entry-listing/zipinfo-zip-entry-listing.d.ts +0 -1
  879. package/dist/skills/programming/scripts/go/new-project.py +0 -138
  880. package/dist/skills/programming/scripts/python/new-project.py +0 -172
  881. package/dist/skills/programming/scripts/python/new-script.py +0 -116
  882. package/dist/skills/programming/scripts/rust/new-project.py +0 -178
  883. package/packages/omo-codex/plugin/skills/programming/scripts/go/new-project.py +0 -138
  884. package/packages/omo-codex/plugin/skills/programming/scripts/python/new-project.py +0 -172
  885. package/packages/omo-codex/plugin/skills/programming/scripts/python/new-script.py +0 -116
  886. package/packages/omo-codex/plugin/skills/programming/scripts/rust/new-project.py +0 -178
  887. package/packages/shared-skills/skills/programming/scripts/go/new-project.py +0 -138
  888. package/packages/shared-skills/skills/programming/scripts/python/new-project.py +0 -172
  889. package/packages/shared-skills/skills/programming/scripts/python/new-script.py +0 -116
  890. package/packages/shared-skills/skills/programming/scripts/rust/new-project.py +0 -178
@@ -0,0 +1,39 @@
1
+ import { expect, test } from "bun:test"
2
+ import { buildSnapshot } from "../../testing/build-snapshot"
3
+ import { grayOnColor } from "./gray-on-color"
4
+
5
+ test("#given gray inks on navy, teal and amber #then only chromatic non-pale surfaces report", () => {
6
+ const snapshot = buildSnapshot([
7
+ ...Object.entries({ navy: "#1e3a8a", teal: "#115e59", darkNavy: "#001c47", nearBlack: "#04002d", cream: "#feeed4", tint: "#fef3c7", neutral: "#f3f4f6" }).map(([id, bg]) => ({ id, text: "Some gray copy", style: { color: "#d1d5db", "background-color": bg } })),
8
+ { id: "amber", text: "Gray six hundred", style: { color: "#4b5563", "background-color": "#fcd34d" } },
9
+ ])
10
+ expect(grayOnColor.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#navy", "#teal", "#darkNavy", "#amber"])
11
+ })
12
+
13
+ test("#given neutral extremes and utility variants #then gray classes only report resting chromatic fills", () => {
14
+ const snapshot = buildSnapshot([
15
+ { id: "gray", text: "Gray utility", attributes: { class: "text-gray-400 bg-blue-600" } },
16
+ { id: "hover", text: "Hover not resting", attributes: { class: "text-gray-500 bg-white hover:bg-emerald-400" } },
17
+ { id: "black", text: "Near black", style: { color: "#393939", "background-color": "#ffc224" } },
18
+ { id: "white", text: "Near white", style: { color: "#e5e7eb", "background-color": "#115e59" } },
19
+ { id: "near-black-class", text: "Dark utility", attributes: { class: "text-gray-800 bg-yellow-400" } },
20
+ ])
21
+ expect(grayOnColor.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#gray"])
22
+ })
23
+
24
+ test("#given utility wrappers without direct text and bare inherited spans #then only the full color path reports", () => {
25
+ const snapshot = buildSnapshot([
26
+ { id: "wrapper", attributes: { class: "text-gray-400 bg-blue-600" }, children: [{ text: "Wrapper copy" }] },
27
+ { style: { "background-color": "#1e3a8a" }, children: [
28
+ { id: "bare", tag: "span", text: "Bare gray text", style: { color: "#999999" } },
29
+ { id: "paragraph", tag: "p", text: "Gray paragraph", style: { color: "#999999" } },
30
+ ] },
31
+ ])
32
+ expect(grayOnColor.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#wrapper", "#paragraph"])
33
+ })
34
+
35
+ test("#given both a gray utility and measured gray ink #then preserves both upstream forms on the same element", () => {
36
+ const snapshot = buildSnapshot([{ id: "dual", attributes: { class: "text-gray-400 bg-blue-600" }, text: "Measured utility",
37
+ style: { color: "#999999", "background-color": "#1e40af" } }])
38
+ expect(grayOnColor.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#dual", "#dual"])
39
+ })
@@ -0,0 +1,38 @@
1
+ import { luminance, parseColor, toHsl, type Rgba } from "../../core/color"
2
+ import { shortSnippet, styleOf } from "../../core/page"
3
+ import type { PageRule } from "../../rule"
4
+ import { oklch, spread } from "./support/gradients"
5
+ import { clipsText, textBackgrounds, textInk } from "./support/text-colors"
6
+ import { bareText } from "./support/color-path"
7
+ import { textPainted } from "./support/painted-text"
8
+
9
+ function colored(bg: Rgba): boolean {
10
+ const lum = luminance(bg)
11
+ const scale = lum >= 0.01 ? 1 : Math.sqrt(0.01 / Math.max(lum, 0.0001))
12
+ const perceptual = oklch(bg)
13
+ return spread(bg) > 40 * scale && (perceptual.l < 0.9 || perceptual.c >= 0.09)
14
+ }
15
+
16
+ export const grayOnColor: PageRule = {
17
+ meta: {
18
+ id: "gray-on-color", name: "Gray text on colored background", category: "quality", severity: "warning", engine: "page",
19
+ description: "Mid-gray ink loses clarity on a chromatic surface.",
20
+ fixHint: "Use a dark shade of the surface hue or a contrasting near-white ink.",
21
+ },
22
+ check: ({ snapshot }) => snapshot.elements.flatMap((el) => {
23
+ if (!textPainted(snapshot, el) || bareText(el) || clipsText(el)) return []
24
+ const color = parseColor(styleOf(el, "color"))
25
+ if (!color) return []
26
+ const hsl = toHsl(color)
27
+ const gray = hsl.s < 0.2 && hsl.l > 0.3 && hsl.l < 0.85
28
+ const tokens = (el.attributes["class"] ?? "").split(/\s+/)
29
+ const grayClass = tokens.some((t) => /^text-(gray|slate|zinc|neutral|stone)-[1-6]00(?:\/\d+)?$/.test(t))
30
+ const bgClass = tokens.some((t) => /^bg-(red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-([2-9]00|950)(?:\/\d+)?$/.test(t))
31
+ const classHit = grayClass && bgClass && hsl.l < 0.85 && spread(color) <= 50
32
+ const backgrounds = textBackgrounds(snapshot, el)
33
+ const computedHit = textInk(snapshot, el) !== null && gray && backgrounds.length > 0 && backgrounds.every(colored)
34
+ if (!classHit && !computedHit) return []
35
+ const hit = { element: el, message: "Gray ink on a colored surface", snippet: shortSnippet(el) }
36
+ return classHit && computedHit ? [hit, hit] : [hit]
37
+ }),
38
+ }
@@ -0,0 +1,15 @@
1
+ import type { PageRule } from "../../rule"
2
+ import { aiColorPalette } from "./ai-color-palette"
3
+ import { creamPalette } from "./cream-palette"
4
+ import { darkGlow } from "./dark-glow"
5
+ import { designSystemColor } from "./design-system-color"
6
+ import { gradientText } from "./gradient-text"
7
+ import { grayOnColor } from "./gray-on-color"
8
+ import { lowContrast } from "./low-contrast"
9
+ import { radialHalo } from "./radial-halo"
10
+ import { radialSpotlightGlow } from "./radial-spotlight-glow"
11
+
12
+ export const COLOR_RULES: readonly PageRule[] = [
13
+ lowContrast, grayOnColor, aiColorPalette, creamPalette, gradientText,
14
+ darkGlow, radialHalo, radialSpotlightGlow, designSystemColor,
15
+ ]
@@ -0,0 +1,209 @@
1
+ import { expect, test } from "bun:test"
2
+ import { lintSnapshot } from "../../lint"
3
+ import { buildSnapshot } from "../../testing/build-snapshot"
4
+ import { lowContrast } from "./low-contrast"
5
+
6
+ const ink = (color: string): Readonly<Record<string, string>> => ({ color, "-webkit-text-fill-color": color })
7
+
8
+ test("#given small, large and bold text around AA thresholds #then only failures report", () => {
9
+ const snapshot = buildSnapshot([
10
+ { id: "small-fail", text: "Faint body", style: ink("#777777") },
11
+ { id: "small-pass", text: "Readable body", style: ink("#767676") },
12
+ { id: "large-fail", text: "Faint heading", style: { ...ink("#9b9b9b"), "font-size": "24px" } },
13
+ { id: "large-pass", text: "Readable heading", style: { ...ink("#949494"), "font-size": "24px" } },
14
+ { id: "bold-fail", text: "Faint bold", style: { ...ink("#9c9c9c"), "font-size": "19px", "font-weight": "700" } },
15
+ { id: "bold-pass", text: "Readable bold", style: { ...ink("#949494"), "font-size": "19px", "font-weight": "700" } },
16
+ ])
17
+ expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#small-fail", "#large-fail", "#bold-fail"])
18
+ expect(lintSnapshot(snapshot, { rules: [lowContrast] }).every((h) => h.severity === "error")).toBe(true)
19
+ })
20
+
21
+ test("#given repeated pairs and an ignored first copy #then one readable claimant counts unwaived copies", () => {
22
+ const snapshot = buildSnapshot([
23
+ { id: "waived", text: "Waived copy", style: ink("#bbbbbb"), attributes: { "data-detect-ignore": "low-contrast" } },
24
+ { id: "glyph", text: "𝕏", style: ink("#bbbbbb") },
25
+ { id: "word", text: "Share this idea", style: ink("#bbbbbb") },
26
+ { id: "repeat", text: "Share another idea", style: ink("#bbbbbb") },
27
+ { id: "pass", text: "Readable ink", style: ink("#333333") },
28
+ ])
29
+ const hits = lowContrast.check({ snapshot, config: {} })
30
+ expect(hits.map((h) => h.element?.selector)).toEqual(["#word"])
31
+ expect(hits[0]?.message.endsWith("(and 2 more)")).toBe(true)
32
+ })
33
+
34
+ test("#given named heavy cuts and ordinary family names #then only bold cuts get the large text bar", () => {
35
+ const snapshot = buildSnapshot(["ProximaNovaBold", "EMprint Semibold", "Gotham-Black", "Blackletter Text", 'Georgia, "Arial Black"'].map((family, i) => ({
36
+ id: `face-${i}`, text: "Family weight", style: { ...ink("#ffffff"), "background-color": "#ff5757", "font-size": "19px", "font-family": family },
37
+ })))
38
+ expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#face-3"])
39
+ })
40
+
41
+ test("#given scrims, pseudo faces and parked underlines #then contrast uses the painted surface", () => {
42
+ const snapshot = buildSnapshot([
43
+ { style: { position: "relative" }, rect: { width: 500, height: 200 }, children: [
44
+ { style: { position: "absolute", "background-color": "rgba(0,0,0,0.8)" }, rect: { width: 500, height: 200 } },
45
+ { style: { position: "absolute", "background-color": "rgba(235,230,224,0.3)" }, rect: { width: 500, height: 200 }, children: [
46
+ { id: "scrim-pass", text: "White title on scrim", style: ink("#f7f5f3") },
47
+ ] },
48
+ ] },
49
+ { id: "pseudo-fail", text: "Dark label", rect: { y: 300 }, style: ink("#333333"), before: { "background-color": "#1a1a1a" } },
50
+ { id: "parked-pass", text: "Readable dark label", rect: { y: 400 }, style: ink("#333333"), before: { "background-color": "#1a1a1a", transform: "matrix(1, 0, 0, 1, -300, 0)" } },
51
+ { id: "drawn-fail", text: "Ink on itself", rect: { y: 500 }, style: { ...ink("#5d666d"), "background-image": "linear-gradient(#5d666c, #5d666c)", "background-size": "100% 100%" } },
52
+ { id: "underline-pass", text: "Ink with parked underline", rect: { y: 600 }, style: { ...ink("#5d666c"), "background-image": "linear-gradient(#5d666c, #5d666c)", "background-size": "0px 1px" } },
53
+ { style: { position: "relative", "background-color": "#ffffff" }, rect: { y: 700, width: 420, height: 100 },
54
+ before: { "background-color": "#312e81", "z-index": "-1" }, children: [
55
+ { id: "ring-fail", text: "Faint copy inside a border ring", rect: { y: 724 }, style: ink("#b8bcc4") },
56
+ ] },
57
+ ])
58
+ expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#pseudo-fail", "#drawn-fail", "#ring-fail"])
59
+ })
60
+
61
+ test("#given stacked opaque panels and a mask fade #then hidden text cannot claim a pair", () => {
62
+ const snapshot = buildSnapshot([
63
+ { rect: { width: 600, height: 200 }, children: [
64
+ { style: { "z-index": "2", "background-color": "#ffffff" }, rect: { width: 600, height: 200 }, children: [{ id: "active", text: "Faint active copy", style: ink("#a0a0a0") }] },
65
+ { style: { "z-index": "0", "background-color": "#ffffff" }, rect: { width: 600, height: 200 }, children: [{ id: "covered", text: "Faint covered copy", style: ink("#a1a1a1") }] },
66
+ ] },
67
+ { rect: { y: 300, width: 400, height: 160 }, style: { "mask-image": "linear-gradient(#000000 100px, transparent 140px)" }, children: [
68
+ { id: "clear", rect: { y: 320 }, text: "Clear zone", style: ink("#a2a2a2") },
69
+ { id: "masked", rect: { y: 440 }, text: "Masked zone", style: ink("#a3a3a3") },
70
+ ] },
71
+ ])
72
+ expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#active", "#clear"])
73
+ })
74
+
75
+ test("#given a delayed entrance and a fading loop #then final entrance text reports but loop frames do not", () => {
76
+ const snapshot = buildSnapshot([
77
+ { style: { opacity: "0", "animation-name": "enter", "animation-iteration-count": "1" }, children: [
78
+ { id: "enter", tag: "a", text: "Get started", style: ink("#bbbbbb") },
79
+ ] },
80
+ { style: { opacity: "0.2", "animation-name": "cycle", "animation-iteration-count": "infinite" }, children: [
81
+ { id: "cycle", text: "A loop frame", style: ink("#bbbbbb") },
82
+ ] },
83
+ { id: "readable", text: "Readable copy", style: ink("#111111") },
84
+ { style: { position: "fixed" }, rect: { x: 1400 }, children: [{ id: "drawer", text: "Parked drawer copy", rect: { x: 1400 }, style: ink("#cccccc") }] },
85
+ { id: "font-zero", text: "Invisible text", style: { ...ink("#cccccc"), "font-size": "0px" } },
86
+ { tag: "video", children: [{ id: "fallback", text: "Unpainted fallback", style: ink("#cccccc") }] },
87
+ ], { cssText: ["@keyframes enter { from { opacity: 0; } to { opacity: 1; } } @keyframes cycle { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: 0; } }"] })
88
+ expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#enter"])
89
+ })
90
+
91
+ test("#given alpha ink, inherited surfaces, gradients and disabled controls #then painted failures report", () => {
92
+ const snapshot = buildSnapshot([
93
+ { style: { "background-color": "#000000" }, children: [
94
+ { id: "alpha-fail", text: "Faint alpha", style: ink("rgba(255,255,255,0.1)") },
95
+ { id: "alpha-pass", text: "Readable alpha", style: ink("rgba(255,255,255,0.9)") },
96
+ ] },
97
+ { tag: "button", attributes: { disabled: "" }, children: [{ id: "disabled", text: "Disabled", style: ink("#cccccc") }] },
98
+ { id: "gradient-fail", text: "Faint gradient", style: { "background-image": "linear-gradient(#dddddd, #eeeeee)", ...ink("#bbbbbb") } },
99
+ { id: "transparent", text: "Hidden fill", style: ink("transparent") },
100
+ { id: "photo", text: "Unknown background", style: { ...ink("#cccccc"), "background-image": "url(photo.jpg)" } },
101
+ ])
102
+ expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#alpha-fail", "#gradient-fail"])
103
+ })
104
+
105
+ test("#given pale clipped text and waived plain text #then only unwaived failures report", () => {
106
+ const snapshot = buildSnapshot([
107
+ { id: "clip-fail", text: "Pale glyphs", style: { "background-clip": "text", "background-image": "linear-gradient(#dddddd, #eeeeee)", ...ink("transparent") } },
108
+ { id: "clip-pass", text: "Dark glyphs", style: { "background-clip": "text", "background-image": "linear-gradient(#111111, #333333)", ...ink("transparent") } },
109
+ { id: "waived", text: "Waived faint text", style: ink("#cccccc"), attributes: { "data-detect-ignore": "low-contrast" } },
110
+ ])
111
+ expect(lintSnapshot(snapshot, { rules: [lowContrast] }).map((h) => h.location.kind === "element" ? h.location.selector : "")).toEqual(["#clip-fail"])
112
+ })
113
+
114
+ test("#given gradient bands and an underline tile #then contrast reads only the paint beneath the text", () => {
115
+ const band = "linear-gradient(#fde68a 0%, #fde68a 30%, #1e3a8a 50%, #1e3a8a 100%)"
116
+ const snapshot = buildSnapshot([
117
+ { id: "light-band", text: "Label", rect: { width: 240, height: 64 }, lineRects: [{ x: 16, y: 2, width: 120, height: 20 }],
118
+ style: { ...ink("#fffdf7"), "background-image": band } },
119
+ { id: "dark-band", text: "Label", rect: { y: 100, width: 240, height: 64 }, lineRects: [{ x: 16, y: 140, width: 120, height: 20 }],
120
+ style: { ...ink("#fffdf8"), "background-image": band } },
121
+ { id: "underline", text: "A readable link", rect: { y: 200, width: 160, height: 31 }, lineRects: [{ x: 0, y: 200, width: 120, height: 20 }],
122
+ style: { ...ink("#1e293b"), "background-image": "linear-gradient(#1e293b, #1e293b)", "background-repeat": "no-repeat", "background-size": "100% 2px", "background-position": "0% 100%" } },
123
+ ])
124
+ expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#light-band"])
125
+ })
126
+
127
+ test("#given safe text repeated across vendors and wordless prices #then only eligible word claimants replace glyphs", () => {
128
+ const snapshot = buildSnapshot([
129
+ { id: "glyph", tag: "a", text: "𝕏", style: ink("#bbbbbb") },
130
+ { attributes: { id: "taboola-feed" }, children: [{ id: "vendor-word", tag: "a", text: "Sponsored words", style: ink("#bbbbbb") }] },
131
+ { id: "price", tag: "span", text: "R$ 89,90", style: ink("#aaaaaa") },
132
+ { id: "name", text: "Linen shirt", style: ink("#aaaaaa") },
133
+ { id: "tiny", tag: "span", text: "A tiny mark", style: { ...ink("#cccccc"), "font-size": "8px" } },
134
+ { attributes: { class: "slick-dots" }, children: [
135
+ { id: "dot", tag: "button", text: "1", style: { ...ink("#333333"), "background-color": "#888888" } },
136
+ ] },
137
+ { id: "site-button", tag: "button", text: "Get started", style: { ...ink("#333333"), "background-color": "#888888" } },
138
+ ])
139
+ expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#glyph", "#name", "#dot", "#site-button"])
140
+ })
141
+
142
+ test("#given decorative and reading text on identical pairs #then both roles report with project error severity", () => {
143
+ const snapshot = buildSnapshot([
144
+ { id: "stamp", tag: "p", text: "v2.4.1 · 2024-03-01", style: ink("#bbbbbb") },
145
+ { id: "heading", tag: "h3", text: "v2.4.1", style: ink("#bbbbbb") },
146
+ { id: "initial", tag: "span", text: "A", rect: { y: 100, width: 32, height: 32 }, style: { ...ink("#ffffff"), "background-color": "#93c5fd" } },
147
+ { id: "letter-link", tag: "a", text: "A", rect: { y: 150, width: 32, height: 32 }, style: { ...ink("#ffffff"), "background-color": "#93c5fd" } },
148
+ ])
149
+ const findings = lintSnapshot(snapshot, { rules: [lowContrast] })
150
+ expect(findings.map((h) => h.location.kind === "element" ? h.location.selector : "")).toEqual(["#stamp", "#heading", "#initial", "#letter-link"])
151
+ expect(findings.every((h) => h.severity === "error")).toBe(true)
152
+ })
153
+
154
+ test("#given clipped copies and scroll-sized frames #then whole claimants and reachable lower copy report", () => {
155
+ const snapshot = buildSnapshot([
156
+ { rect: { width: 200, height: 50 }, style: { "overflow-x": "hidden" }, children: [
157
+ { id: "cut", rect: { x: -80, width: 160, height: 24 }, text: "Repeated label", style: ink("#aaaaaa") },
158
+ { id: "whole", rect: { width: 160, height: 24 }, text: "Repeated label", style: ink("#aaaaaa") },
159
+ { id: "sliver", rect: { x: -150, width: 160, height: 24 }, text: "A sliver of another label", style: ink("#bbbbbb") },
160
+ ] },
161
+ { rect: { y: 100, width: 500, height: 800 }, style: { "overflow-y": "hidden" }, scroll: { scrollHeight: 1500, clientHeight: 800 }, children: [
162
+ { rect: { y: 100, height: 1500 }, children: [
163
+ { id: "below-fold", rect: { y: 1400 }, text: "Reachable faint copy", style: ink("#cccccc") },
164
+ ] },
165
+ ] },
166
+ { tag: "details", rect: { y: 1700 }, children: [{ id: "closed", rect: { y: 1700 }, text: "Closed panel", style: ink("#dddddd") }] },
167
+ { attributes: { hidden: "until-found" }, rect: { y: 1800 }, children: [{ id: "findable", rect: { y: 1800 }, text: "Findable panel", style: ink("#eeeeee") }] },
168
+ { rect: { y: 1900, width: 1280, height: 60 }, style: { "overflow-x": "hidden" }, children: [
169
+ { id: "shell-layout", rect: { x: 1220, y: 1900, width: 280 }, text: "A clipped desktop column", style: ink("#ababab") },
170
+ ] },
171
+ ])
172
+ expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#whole", "#below-fold", "#shell-layout"])
173
+ const base = buildSnapshot([
174
+ { rect: { width: 1280, height: 800 }, style: { position: "fixed", "overflow-y": "hidden" }, scroll: { clientHeight: 800, scrollHeight: 1800 }, children: [
175
+ { id: "frame-foot", rect: { y: 1500 }, text: "Faint frame footer", style: ink("#cccccc") },
176
+ ] },
177
+ ])
178
+ const framed = { ...base, document: { ...base.document, scrollHeight: 800 },
179
+ elements: base.elements.map((el) => el.tag === "body" ? { ...el, style: { ...el.style, "overflow-y": "hidden" } } : el) }
180
+ expect(lowContrast.check({ snapshot: framed, config: {} }).map((h) => h.element?.selector)).toEqual(["#frame-foot"])
181
+ })
182
+
183
+ test("#given a declared mockup and labelled screenshot #then hidden drawings claim no pair and screenshot pairs stay separate", () => {
184
+ const snapshot = buildSnapshot([
185
+ { attributes: { inert: "", class: "demo-frame" }, rect: { width: 420, height: 190 }, children: [
186
+ { id: "hidden-one", text: "Draft", style: ink("#cccccc") },
187
+ { text: "Saved", style: ink("#cccccc") },
188
+ { text: "Ready", style: ink("#cccccc") },
189
+ ] },
190
+ { id: "outside", text: "Your subscription renews on the first day of every month", style: ink("#cccccc") },
191
+ { attributes: { "aria-label": "A screenshot of the billing screen", class: "shot-frame" }, rect: { y: 300, width: 420, height: 190 }, children: [
192
+ { id: "shot", rect: { y: 320 }, text: "Billing", style: ink("#bbbbbb") },
193
+ ] },
194
+ { id: "after-shot", rect: { y: 600 }, text: "Your plan renews next month", style: ink("#bbbbbb") },
195
+ ])
196
+ expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#outside", "#shot", "#after-shot"])
197
+ })
198
+
199
+ test("#given captured opacity motion and a paused vanishing loop #then only steady or held-end ink is scored", () => {
200
+ const snapshot = buildSnapshot([
201
+ { id: "transition", text: "A reveal in progress", motion: ["opacity"], style: { ...ink("#bbbbbb"), opacity: "0.3" } },
202
+ { id: "finite", text: "The held entrance label", motion: ["opacity"], style: { ...ink("#bbbbbb"), opacity: "0.3",
203
+ "animation-name": "enter", "animation-duration": "1s", "animation-iteration-count": "1", "animation-fill-mode": "forwards", "animation-play-state": "running" } },
204
+ { id: "paused", text: "A parked loop label", style: { ...ink("#bbbbbb"), opacity: "0.4",
205
+ "animation-name": "cycle", "animation-iteration-count": "infinite", "animation-play-state": "paused" } },
206
+ { id: "steady", text: "Deliberately faded copy", style: { ...ink("#cccccc"), opacity: "0.4" } },
207
+ ], { cssText: ["@keyframes enter { from { opacity: 0; } to { opacity: 1; } } @keyframes cycle { 0% { opacity: 0; } 100% { opacity: 1; } }"] })
208
+ expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#finite", "#steady"])
209
+ })
@@ -0,0 +1,57 @@
1
+ import { blend, contrastRatio } from "../../core/color"
2
+ import { ancestors, fontSizePx, shortSnippet, styleOf } from "../../core/page"
3
+ import type { PageRule } from "../../rule"
4
+ import { distinctPairs, type ContrastHit } from "./support/contrast-pairs"
5
+ import { gradientStops } from "./support/gradients"
6
+ import { textPainted } from "./support/painted-text"
7
+ import { bareText } from "./support/color-path"
8
+ import { contrastRole } from "./support/contrast-role"
9
+ import { mockupRoots } from "./support/mockup-roots"
10
+ import { placeholderContrast } from "./support/placeholder-contrast"
11
+ import { clipsText, solidGround, textBackgrounds, textInk } from "./support/text-colors"
12
+
13
+ export const lowContrast: PageRule = {
14
+ meta: {
15
+ id: "low-contrast", name: "Low contrast text", category: "quality", severity: "error", engine: "page",
16
+ description: "Text falls below the WCAG AA contrast ratio for its size.",
17
+ fixHint: "Increase text and surface contrast to 4.5:1, or 3:1 for large text.",
18
+ },
19
+ check: ({ snapshot }) => {
20
+ const mockups = mockupRoots(snapshot)
21
+ const text = distinctPairs(snapshot, snapshot.elements.flatMap((el): readonly ContrastHit[] => {
22
+ if ([el, ...ancestors(snapshot, el)].some((node) => mockups.get(node.index) === "declared")) return []
23
+ if (!textPainted(snapshot, el)) return []
24
+ if ([el, ...ancestors(snapshot, el)].some((node) => node.attributes["disabled"] !== undefined || node.attributes["aria-disabled"] === "true")) return []
25
+ const size = fontSizePx(el)
26
+ if (bareText(el) && size < 9) return []
27
+ const familyWords = (styleOf(el, "font-family").split(",")[0] ?? "").replace(/([a-z])([A-Z])/g, "$1 $2").toLowerCase().split(/[^a-z0-9]+/)
28
+ const namedBold = familyWords.some((w) => ["bold", "semibold", "demibold", "extrabold", "ultrabold", "heavy", "black"].includes(w))
29
+ const weight = namedBold ? Math.max(700, Number.parseFloat(styleOf(el, "font-weight")) || 400) : Number.parseFloat(styleOf(el, "font-weight"))
30
+ const threshold = size >= 24 || (size >= 18.66 && weight >= 700) ? 3 : 4.5
31
+ if (clipsText(el) && el.ownText.trim() !== "") {
32
+ const stops = gradientStops(styleOf(el, "background-image"))
33
+ if (stops.length === 0 || stops.some((s) => s.color.a < 0.999)) return []
34
+ const ground = solidGround(snapshot, el)
35
+ const best = Math.max(...stops.map((s) => contrastRatio(s.color, ground)))
36
+ return best < threshold ? [{ element: el, pair: JSON.stringify([stops, ground, threshold]), message: `Gradient text contrast ${best.toFixed(2)}:1; needs ${threshold}:1`, snippet: shortSnippet(el) }] : []
37
+ }
38
+ const ink = textInk(snapshot, el)
39
+ if (!ink) return []
40
+ const backgrounds = textBackgrounds(snapshot, el)
41
+ if (backgrounds.length === 0) return []
42
+ const ratios = backgrounds.map((bg) => contrastRatio(blend(ink, bg), bg))
43
+ const ratio = Math.min(...ratios)
44
+ if (ratio === 1 && ![el, ...ancestors(snapshot, el)].some((node) =>
45
+ ["a", "button", "input", "select", "textarea"].includes(node.tag) || ["button", "link"].includes(node.attributes["role"] ?? ""))) return []
46
+ const control = [el, ...ancestors(snapshot, el)].find((node) => node.tag === "button" || node.attributes["role"] === "button")
47
+ if (ratio === 1 && control && control.children.length > 1 && control.text.trim() === el.text.trim()) return []
48
+ const shape = size >= 96 && ink.a < 0.25 ? el.text : [el, ...ancestors(snapshot, el)].some((node) => mockups.get(node.index) === "labelled") ? "decorative" : contrastRole(snapshot, el)
49
+ const gradient = bareText(el) ? ancestors(snapshot, el).find((node) => !clipsText(node) && styleOf(node, "background-image").includes("gradient")) : undefined
50
+ const ground = backgrounds[ratios.indexOf(ratio)]
51
+ const pair = gradient ? JSON.stringify([ink, gradient.index, shape]) : JSON.stringify([ink, ground, threshold, shape])
52
+ return ratio < threshold ? [{ element: el, pair, message: `Text contrast ${ratio.toFixed(2)}:1; needs ${threshold}:1`, snippet: shortSnippet(el) }] : []
53
+ }))
54
+ return [...text, ...snapshot.elements.flatMap((el) =>
55
+ [el, ...ancestors(snapshot, el)].some((node) => mockups.get(node.index) === "declared") ? [] : placeholderContrast(snapshot, el))]
56
+ },
57
+ }
@@ -0,0 +1,62 @@
1
+ import { expect, test } from "bun:test"
2
+ import { lintSnapshot } from "../../lint"
3
+ import { buildSnapshot } from "../../testing/build-snapshot"
4
+ import { lowContrast } from "./low-contrast"
5
+ import { textBackgrounds } from "./support/text-colors"
6
+
7
+ test("#given shown placeholders beside readable host ink #then each field reports its own placeholder without pair dedupe", () => {
8
+ const snapshot = buildSnapshot([
9
+ { id: "first", tag: "input", attributes: { placeholder: "Name" }, style: { color: "#111111", "background-color": "#ffffff" }, placeholder: { color: "#bbbbbb" } },
10
+ { id: "second", tag: "textarea", attributes: { placeholder: "Notes" }, style: { color: "#111111", "background-color": "#ffffff" }, placeholder: { color: "#bbbbbb" } },
11
+ { id: "alpha", tag: "input", attributes: { placeholder: "Email" }, style: { color: "#111111", "background-color": "#f5f5f5" }, placeholder: { color: "rgba(255,255,255,0.4)" } },
12
+ { tag: "label", text: "Team", children: [
13
+ { id: "labelled", tag: "input", attributes: { placeholder: "Team name" }, style: { "background-color": "#ffffff" }, placeholder: { color: "#bbbbbb" } },
14
+ ] },
15
+ ])
16
+ const hits = lintSnapshot(snapshot, { rules: [lowContrast] })
17
+ expect(hits.map((hit) => hit.location.kind === "element" ? hit.location.selector : "")).toEqual(["#first", "#second", "#alpha", "#labelled"])
18
+ expect(hits.every((hit) => hit.severity === "error")).toBe(true)
19
+ })
20
+
21
+ test("#given absent hidden transparent disabled and readable placeholders #then none reports", () => {
22
+ const snapshot = buildSnapshot([
23
+ { tag: "input", attributes: { placeholder: "Filled", value: "Existing value" } },
24
+ { tag: "input", attributes: { placeholder: "Transparent" }, placeholder: { color: "rgba(255,255,255,0.02)" } },
25
+ { tag: "input", attributes: { placeholder: "" }, placeholder: { color: "#bbbbbb" } },
26
+ { tag: "input", attributes: { placeholder: "Disabled", disabled: "" }, placeholder: { color: "#bbbbbb" } },
27
+ { tag: "input", attributes: { placeholder: "Readable" }, placeholder: { color: "#111111" } },
28
+ { tag: "input", attributes: { type: "range", placeholder: "Not text" }, placeholder: { color: "#bbbbbb" } },
29
+ { style: { display: "none" }, children: [{ tag: "textarea", attributes: { placeholder: "Hidden" }, placeholder: { color: "#bbbbbb" } }] },
30
+ { tag: "input", attributes: { placeholder: "Waived", "data-detect-ignore": "low-contrast" }, placeholder: { color: "#bbbbbb" } },
31
+ ])
32
+ expect(lintSnapshot(snapshot, { rules: [lowContrast] })).toEqual([])
33
+ })
34
+
35
+ test("#given large bold placeholders and translucent field layers #then thresholds use the host size and composited surface", () => {
36
+ const snapshot = buildSnapshot([
37
+ { id: "small", tag: "input", attributes: { placeholder: "Small" }, style: { "font-size": "16px" }, placeholder: { color: "#888888" } },
38
+ { id: "large", tag: "input", attributes: { placeholder: "Large" }, style: { "font-size": "24px" }, placeholder: { color: "#888888" } },
39
+ { id: "bold", tag: "input", attributes: { placeholder: "Bold" }, style: { "font-size": "18.66px", "font-family": "Brand-SemiBold" }, placeholder: { color: "#888888" } },
40
+ { style: { "background-color": "#0f0f11" }, children: [
41
+ { style: { "background-color": "rgba(255,255,255,0.15)" }, children: [
42
+ { id: "frosted", tag: "input", attributes: { placeholder: "Frosted" }, style: { "background-color": "rgba(255,255,255,0.2)" }, placeholder: { color: "#bbbbbb" } },
43
+ ] },
44
+ ] },
45
+ ])
46
+ expect(lowContrast.check({ snapshot, config: {} }).map((hit) => hit.element?.selector)).toEqual(["#small", "#frosted"])
47
+ })
48
+
49
+ test("#given supported modern colors and an unreadable nearer surface #then valid surfaces score and unknown paint stops the walk", () => {
50
+ const snapshot = buildSnapshot([
51
+ { id: "p3", text: "Dim copy", rect: { y: 0 }, style: { color: "color(display-p3 0.35 0.35 0.36)", "background-color": "color(display-p3 0.07 0.07 0.08)" } },
52
+ { id: "lch", text: "Warm dim copy", rect: { y: 200 }, style: { color: "lch(35 3 80)", "background-color": "lch(8 3 80)" } },
53
+ { rect: { y: 400, width: 600, height: 200 }, style: { "background-color": "#ffffff" }, children: [
54
+ { rect: { y: 420, width: 500, height: 100 }, style: { "background-color": "color(rec2020 0.05 0.05 0.05)" }, children: [
55
+ { id: "unknown", rect: { y: 440 }, text: "Do not borrow the farther white", style: { color: "#eeeeee" } },
56
+ ] },
57
+ ] },
58
+ ])
59
+ expect(lowContrast.check({ snapshot, config: {} }).map((hit) => hit.element?.selector)).toEqual(["#p3", "#lch"])
60
+ const unknown = snapshot.elements.find((el) => el.attributes["id"] === "unknown")
61
+ expect(unknown === undefined ? null : textBackgrounds(snapshot, unknown)).toEqual([])
62
+ })
@@ -0,0 +1,40 @@
1
+ import { expect, test } from "bun:test"
2
+ import { buildSnapshot } from "../../testing/build-snapshot"
3
+ import { radialHalo } from "./radial-halo"
4
+
5
+ test("#given dark radial washes and alternate gradients #then only saturated wide halos report", () => {
6
+ const snapshot = buildSnapshot([{ style: { "background-color": "#080808" }, children: [
7
+ ...Object.entries({
8
+ halo: "radial-gradient(circle, rgba(80,111,255,0.85), transparent 70%)",
9
+ second: "radial-gradient(circle, rgba(255,90,120,0.85), transparent 70%)",
10
+ soft: "radial-gradient(circle, rgba(80,111,255,0.3), transparent)",
11
+ neutral: "radial-gradient(circle, rgba(255,255,255,0.85), transparent)",
12
+ opaque: "radial-gradient(circle, #1e3a8a, #0f172a)",
13
+ linear: "linear-gradient(#506fff, transparent)",
14
+ small: "radial-gradient(circle, #506fff 0px, transparent 20px)",
15
+ repeat: "repeating-radial-gradient(circle, #506fff, transparent)",
16
+ vignette: "radial-gradient(circle, #020408, transparent)",
17
+ }).map(([id, image]) => ({ id, style: { "background-image": image } })),
18
+ ] }])
19
+ expect(radialHalo.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#halo"])
20
+ })
21
+
22
+ test("#given pseudo halos on dark and light grounds #then only dark visible hosts report", () => {
23
+ const before = { "background-image": "radial-gradient(circle, #506fff, transparent)" }
24
+ const snapshot = buildSnapshot([
25
+ { id: "dark", style: { "background-color": "#080808" }, before },
26
+ { id: "light", style: { "background-color": "#ffffff" }, before },
27
+ { id: "hidden", style: { "display": "none", "background-color": "#080808" }, before },
28
+ ])
29
+ expect(radialHalo.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#dark"])
30
+ })
31
+
32
+ test("#given a light page with a local translucent panel #then the panel does not turn on the dark-page source form", () => {
33
+ const base = buildSnapshot([
34
+ { style: { "background-color": "rgba(18,20,26,0.86)" }, children: [
35
+ { style: { "background-image": "radial-gradient(circle, #a855f7, transparent 70%)" } },
36
+ ] },
37
+ ], { cssText: ["body { background: #fff; } .glass { background: rgba(18,20,26,0.86); }"] })
38
+ const snapshot = { ...base, elements: base.elements.map((el) => el.tag === "body" ? { ...el, style: { ...el.style, "background-color": "#ffffff" } } : el) }
39
+ expect(radialHalo.check({ snapshot, config: {} })).toEqual([])
40
+ })
@@ -0,0 +1,31 @@
1
+ import { luminance, parseColor } from "../../core/color"
2
+ import { isRendered, shortSnippet, styleOf } from "../../core/page"
3
+ import type { PageRule } from "../../rule"
4
+ import { backdrop, gradientStops, splitLayers, spread } from "./support/gradients"
5
+ import { darkBackground } from "../source/support/css-effects"
6
+
7
+ export const radialHalo: PageRule = {
8
+ meta: {
9
+ id: "radial-halo", name: "Radial-gradient background halo", category: "slop", severity: "warning", engine: "page",
10
+ description: "A saturated radial fade decorates a dark surface with a halo.",
11
+ fixHint: "Ground the section with a solid or subtly shifted background.",
12
+ },
13
+ check: ({ snapshot }) => snapshot.elements.flatMap((el) => {
14
+ if (!isRendered(snapshot, el)) return []
15
+ const body = snapshot.elements.find((node) => node.tag === "body")
16
+ const root = body ? parseColor(styleOf(body, "background-color")) : null
17
+ if (root && root.a > 0.5 && luminance(root) >= 0.1 && !snapshot.cssText.some(darkBackground)) return []
18
+ const surface = backdrop(snapshot, el, "none")
19
+ if (!surface || luminance(surface) >= 0.1) return []
20
+ const styles = [el.style, el.before?.style, el.after?.style].filter((s) => s !== undefined)
21
+ const halo = styles.some((style) => splitLayers(style["background-image"] ?? "").some((layer) => {
22
+ if (!layer.startsWith("radial-gradient(")) return false
23
+ const stops = gradientStops(layer)
24
+ const first = stops[0]
25
+ const last = stops.at(-1)
26
+ if (!first || !last || stops.some((s) => /(?:^|\s)(-?\d*\.?\d+)px/.test(s.raw) && Math.abs(Number.parseFloat(s.raw.slice(s.raw.lastIndexOf(" ") + 1))) <= 24)) return false
27
+ return first.color.a >= 0.7 && spread(first.color) >= 24 && last.color.a <= 0.05 && luminance(first.color) > luminance(surface)
28
+ }))
29
+ return halo ? [{ element: el, message: "Chromatic radial halo on a dark surface", snippet: shortSnippet(el) }] : []
30
+ }).slice(0, 1),
31
+ }
@@ -0,0 +1,27 @@
1
+ import { expect, test } from "bun:test"
2
+ import { buildSnapshot } from "../../testing/build-snapshot"
3
+ import { radialSpotlightGlow } from "./radial-spotlight-glow"
4
+
5
+ test("#given colored translucent spotlights and faint or opaque cousins #then only prominent low alpha glows report", () => {
6
+ const snapshot = buildSnapshot([{ style: { "background-color": "#0b0d13" }, children: Object.entries({
7
+ blue: "radial-gradient(circle, rgba(80,111,255,0.26), transparent 44%)",
8
+ rose: "radial-gradient(circle, rgba(255,90,120,0.12), rgba(255,90,120,0.28), transparent)",
9
+ hex: "radial-gradient(circle, #506fff66, transparent)",
10
+ faint: "radial-gradient(circle, rgba(26,189,226,0.1), transparent)",
11
+ opaque: "radial-gradient(circle, rgba(80,111,255,0.85), transparent)",
12
+ neutral: "radial-gradient(circle, rgba(255,255,255,0.35), transparent)",
13
+ linear: "linear-gradient(rgba(80,111,255,0.28), transparent)",
14
+ }).map(([id, image], i) => ({ id, text: "Section headline", rect: { width: 900, height: 600, y: i * 700 }, style: { "background-image": image } })) }])
15
+ expect(radialSpotlightGlow.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#blue", "#rose", "#hex"])
16
+ })
17
+
18
+ test("#given pale layers, small badges, bare panels and photo heroes #then only a bright photo overlay reports", () => {
19
+ const image = "radial-gradient(circle, rgba(139,92,246,0.42), transparent)"
20
+ const snapshot = buildSnapshot([
21
+ { id: "photo", text: "Hero headline", rect: { width: 900, height: 600 }, style: { "background-image": `${image}, url(photo.jpg)` } },
22
+ { id: "small", text: "Badge", rect: { width: 40, height: 40, y: 700 }, style: { "background-image": image } },
23
+ { id: "bare", rect: { width: 900, height: 600, y: 800 }, style: { "background-image": image } },
24
+ { id: "pale", text: "Pale headline", rect: { width: 900, height: 600, y: 1500 }, style: { "background-image": "radial-gradient(circle, rgba(63,227,223,0.2), transparent), linear-gradient(#ecf4f8, #ffffff)" } },
25
+ ])
26
+ expect(radialSpotlightGlow.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#photo"])
27
+ })
@@ -0,0 +1,33 @@
1
+ import { blend, contrastRatio } from "../../core/color"
2
+ import { isRendered, shortSnippet, styleOf, textElements } from "../../core/page"
3
+ import type { PageRule } from "../../rule"
4
+ import { backdrop, effectiveOpacity, gradientStops, splitLayers, spread } from "./support/gradients"
5
+
6
+ export const radialSpotlightGlow: PageRule = {
7
+ meta: {
8
+ id: "radial-spotlight-glow", name: "Decorative radial spotlight glow", category: "slop", severity: "warning", engine: "page",
9
+ description: "A translucent radial accent floats behind a section's copy.",
10
+ fixHint: "Remove the floating wash or use a deliberate material surface.",
11
+ },
12
+ check: ({ snapshot }) => snapshot.elements.flatMap((el) => {
13
+ if (!isRendered(snapshot, el) || el.rect.width < 240 || el.rect.height < 160) return []
14
+ const layers = splitLayers(styleOf(el, "background-image"))
15
+ const index = layers.findIndex((layer) => layer.startsWith("radial-gradient("))
16
+ if (index < 0) return []
17
+ const stops = gradientStops(layers[index] ?? "")
18
+ const last = stops.at(-1)
19
+ const colors = stops.filter((s) => s.color.a > 0.05)
20
+ if (!last || last.color.a > 0.05 || colors.length === 0 || colors.length > 2 || colors.some((s) => s.color.a >= 0.45)) return []
21
+ const surface = backdrop(snapshot, el, layers.slice(index + 1).join(", "))
22
+ const prominent = colors.some((s) => {
23
+ const a = s.color.a * effectiveOpacity(snapshot, el)
24
+ return spread(s.color) > 24 && a >= 0.14 && (surface === null || contrastRatio(blend({ ...s.color, a }, surface), surface) >= 1.3)
25
+ })
26
+ if (!prominent) return []
27
+ const behindText = textElements(snapshot).some((text) => {
28
+ const r = text.rect
29
+ return r.x < el.rect.x + el.rect.width && r.x + r.width > el.rect.x && r.y < el.rect.y + el.rect.height && r.y + r.height > el.rect.y
30
+ })
31
+ return behindText ? [{ element: el, message: "A radial spotlight glows behind text", snippet: shortSnippet(el) }] : []
32
+ }),
33
+ }