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
@@ -87,17 +87,17 @@ Replace `<SCRIPT_NAME>` with the actual filename. Add argument descriptions if t
87
87
 
88
88
  ## Template generator
89
89
 
90
- Use `scripts/new-script.py` to scaffold a new PEP 723 script with all boilerplate pre-filled:
90
+ Use `../../scripts/python/new-script.ts` (Bun) to scaffold a new PEP 723 script with all boilerplate pre-filled:
91
91
 
92
92
  ```bash
93
93
  # Generate to temp directory (default)
94
- uv run scripts/new-script.py my_tool
94
+ bun run ../../scripts/python/new-script.ts my_tool
95
95
 
96
96
  # Generate to specific path
97
- uv run scripts/new-script.py my_tool --output ./scripts/my_tool.py
97
+ bun run ../../scripts/python/new-script.ts my_tool --output ./scripts/my_tool.py
98
98
 
99
- # With extra dependencies
100
- uv run scripts/new-script.py my_tool --deps "polars" "duckdb" "rich"
99
+ # With extra dependencies (repeat --deps for each)
100
+ bun run ../../scripts/python/new-script.ts my_tool --deps polars --deps duckdb --deps rich
101
101
  ```
102
102
 
103
103
  ## Common dependency sets
@@ -0,0 +1,82 @@
1
+ # Testing
2
+
3
+ Read this before creating or editing any test file (`*.test.*`, `*.spec.*`, `*_test.go`, `test_*.py`, `tests/`, `__tests__/`) and before deciding whether a change needs a test at all. The per-language recipes live beside their language (`../go/testing.md`, `../rust/proptest-insta.md`, the "In tests" sections of the other READMEs); this file is the language-independent contract they all assume. [`junk-classes.md`](junk-classes.md) is the companion table: every class there is a test this file tells you not to write.
4
+
5
+ ## Before writing: the authoring gate
6
+
7
+ Answer all four; a missing answer means do not add the test yet.
8
+
9
+ 1. **What observable behavior, invariant, or independent contract does it protect?** Name it in the test name.
10
+ 2. **What credible regression makes it fail?** If no plausible edit to the production owner turns it red, it is a [change certificate or cannot-fail](junk-classes.md), not a test.
11
+ 3. **Why does existing coverage not already catch that failure?** Each contract has one primary owner test at the strongest boundary. Extend a table row or a shared fixture instead of adding a near-duplicate, a copy in another package, or a replay through a wrapper.
12
+ 4. **Does it need a production seam no production caller needs** (an export, flag, getter, reset hook, wrapper, injection point)? If yes, test at the real boundary instead; a seam that exists for one test is a [seam keeper](junk-classes.md).
13
+
14
+ The run proves the change; a test proves that the next change cannot silently undo it. So add a test only where the repository keeps tests for this behavior AND a regression would otherwise pass unnoticed by the run and the existing tests. A bug fix starts from a reproduction that fails on the pre-fix code for the intended reason (an existing owner test that already fails may serve as that proof). Prose has no behavioral seam ([Prompt tests](#prompt-tests-assert-behavior-never-text) below).
15
+
16
+ A test that fails on the unchanged base is a product bug to fix at its owner; a test your own change turns red is fixed at the code or at the test. Neither is deleted or edited green to unblock a run.
17
+
18
+ ## Shape
19
+
20
+ ### The pyramid, cheapest rung first
21
+
22
+ | Rung | Count | Purpose | Budget |
23
+ |---|---|---|---|
24
+ | Unit | many | pure-function correctness for every meaningful input class (happy, edge, boundary, error path) | < 10 ms each; whole unit suite < 30 s |
25
+ | Integration | some | the real adapter against the real downstream (DB, queue, HTTP) via `testcontainers`, `httptest`, or the equivalent; never a unit test pretending to be one | < 1 s each; suite < 5 min |
26
+ | E2E scenario | few | one narrative per user-visible outcome, driven through the real surface (HTTP route, CLI invocation, TUI keystroke), asserting the observable outcome, not internal state; include at least one error-path scenario | seconds, on CI |
27
+
28
+ A user-visible outcome never driven through its real surface is unverified; a green unit suite does not stand in for that run.
29
+
30
+ ### Given / When / Then
31
+
32
+ Every test is three blocks: the preconditions and fixtures, the single action under test, the observable outcome AND only that outcome. One `When` per test; several `When`s are several tests. Names state behavior and condition (`it("<does X> when <Y>")`, `Test_<Subject>_<Outcome>_when_<Condition>`, `#[test] fn behavior_when_condition`) so a failure reads without the body. Twelve assertions in one test hide eleven failures behind the first: split by `Then`.
33
+
34
+ ### Less mock, the better
35
+
36
+ 1. **Real object** when constructable in under a millisecond (domain types, pure functions, value objects).
37
+ 2. **In-memory fake**: a real implementation of the interface backed by a map or slice (stores, caches, queues), with its own test proving it behaves like the real one.
38
+ 3. **Testcontainer or sandbox**: real Postgres, Redis, S3-compatible store.
39
+ 4. **Wire-level fake**: `httptest.Server`, `respx`, `msw`; fake at the wire, not at the SDK.
40
+ 5. **Mock**, only when 1-4 are infeasible (clock, randomness, an external SaaS with no sandbox), at the narrowest seam, never a whole service.
41
+
42
+ If the test fails when the owner's *implementation* changes but its *behavior* did not, it is over-mocked: delete the mock and assert on observable outputs. A mock that returns whatever the assertion then checks is a [mock echo](junk-classes.md). A boundary list (allowlist, flag filter) is tested with the real list imported from production, not a copy.
43
+
44
+ ### Accurate, efficient, deterministic, isolated
45
+
46
+ - **Accurate**: the test fails for the bug it names and only that bug. Assert the contract, not a dump; no coupling to format, ordering, whitespace, or unrelated fields. Snapshots pin structure (CLI help, a JSON shape), never behavior or prose.
47
+ - **Efficient**: when a suite crosses its budget, profile and split it; fast tests run on every save, slow ones on push.
48
+ - **Deterministic**: no `sleep`, no wall-clock dependence, no order dependence (`-shuffle=on`, pytest-randomly, a random vitest seed). Inject a clock. For async behavior subscribe to the exact event or state change BEFORE triggering the action, then await it with a bounded timeout that fails with a message; the timeout is a circuit breaker, never the synchronization. A test that passes 9 of 10 runs is broken.
49
+ - **Isolated**: every test starts from a known fixture and tears down (`t.TempDir()`, `t.Setenv()`, transactional rollback). Two tests that pass alone and fail together are a fixture leak; fix the leak, never the order, and never `.only` / `.skip` / a separate process to hide it. Suite-global resources (sandbox roots, listen ports, container names) are namespaced per run (`mktemp`, port `0`, unique names) so two checkouts running the suite concurrently cannot interfere; the signature of that leak is "a different test fails each run".
50
+
51
+ ### Prompt tests: assert behavior, never text
52
+
53
+ A prompt, skill, rule, or markdown file is prose; its wording changes every sprint. `toContain("<sentence>")`, `not.toContain("old wording")`, a snapshot of prose, a word count, a phrase-occurrence count: each stays green while the behavior it claims to guard breaks, then blocks every legitimate rewording. Assert only what a machine consumes: a builder's routing decision (`expect(getPromptSource(model)).toBe("gpt-5-6")`), a structural token the runtime dispatches on (a tool name, a tag, a parsed frontmatter field), the conditional the code enforces (skill loaded -> tool present; `verbose=false` -> directive absent), equality between two shipped copies of one artifact, or the minimal routing-bearing fragment of a parsed `description` that a router dispatches on (such a pin lets a later rewrite change every sentence around it while proving the routing contract survived). If nothing consumes the text, write no test. Nearby prose pins are existing violations, not a convention.
54
+
55
+ When delegating test-writing, hand the child the behavior the test must distinguish ("fails if override precedence breaks"), never a ready-made assertion string, prompt fragment, or marker to copy: a prescribed mechanism that is wrong gets implemented faithfully and ships behind a green suite.
56
+
57
+ ## After writing: test your test
58
+
59
+ A test earns its place by failing. Before the PR, for each new or reshaped test:
60
+
61
+ 1. **Break the owner** (flip the condition, drop the branch, return a constant, skip the write) and run the test. Confirm the mutated bytes are actually in the file before reading the result; a no-op edit "passes" identically to the original.
62
+ 2. **Red for the intended reason?** Read the failure message: a loose pattern can match the base's generic error by coincidence (a false red), and a fake that simulates the failure by a different mechanism than the guard reads fails with the fix present.
63
+ 3. **Still green?** Then one of: the test is vacuous (fix the assertion); the mutant is equivalent (a `try/catch`, fallback, or normalization maps it back to the same outcome: retarget the mutation at the observable claim); a second rule already produces the same outcome (make the input exercise only the rule under test and assert the recorded reason); or the mutated code is dead (delete the code, not the test's teeth).
64
+ 4. **Restore byte for byte.** Never commit a mutation.
65
+
66
+ Assertion shapes that survive this step:
67
+
68
+ | Vacuous shape | Why it passes with the bug present | Discriminating shape |
69
+ |---|---|---|
70
+ | expected value derived from the output under test | compares a projection of the output to itself | derive the expected value from the test's input |
71
+ | override fixture equal to its fallback | precedence is never exercised | every value the code must select or override differs from the fallback |
72
+ | `>= n` / `> 0` over independently produced items | removing one item still satisfies the bound | pin the exact set |
73
+ | a count after deduplication where duplicates are byte-identical to a mandatory item | dropping all duplicates gives the same count | distinct payloads, assert retention and placement |
74
+ | the argv, flags, URL, or request handed to a child | an input transcript, not the child's outcome | drive the real component and assert the state it resolved, with a control case |
75
+ | a counter or filter keyed on a value the code path never produces | both sides count zero | count the operation itself |
76
+ | a copy of the production component, props, or allowlist | the copy passes while the shipped one is broken | mount or import the real one |
77
+ | a timing assertion for an off-thread or performance claim | passes on the base at fixture size | prove performance on the field harness; keep the unit test to behavior |
78
+ | a gated or fallback path tested without forcing it | the base's own error path produces the same side effect | force the path (flag, crash limit) and assert the reason the new path records |
79
+
80
+ ## Delegation and review
81
+
82
+ The gate reviewer applies [`junk-classes.md`](junk-classes.md) to every test in the diff and blocks a prose pin as HIGH; a test that would be deleted there is a test not to write. Deleting such a test is a fix, not a coverage loss, and needs the proof rule in that file.
@@ -0,0 +1,56 @@
1
+ # Junk classes, retention bar, marks
2
+
3
+ One table for three jobs: writing a test (`programming`), cleaning a branch (`remove-ai-slops`), and auditing a suite. A test that matches a class below is junk unless the retention bar keeps it. The gate reviewer applies the same table; a test that would be deleted in review is a test not to write.
4
+
5
+ ## Marks (one per test declaration; one per row when table rows differ)
6
+
7
+ | Mark | Meaning | What the ledger line names |
8
+ |---|---|---|
9
+ | `R` retain | guards a contract | the contract and the regression it catches |
10
+ | `F` fix | real contract, weak assertion (a negative that passes when only one of several items is missing; `toBeTruthy` on a value that is always an object; a lower bound over independently removable items) | the repaired assertion |
11
+ | `C` consolidate | the assertion moves into a keeper (a table row in a sibling, a stronger boundary suite); the declaration disappears | the keeper |
12
+ | `D` delete | no contract, or another test owns it | the owner test that still fails on the regression, or why no contract exists; plus a proof receipt |
13
+
14
+ ## Junk classes (candidates for `D` or `C`)
15
+
16
+ | Class | What it looks like | Proof that it is junk |
17
+ |---|---|---|
18
+ | Cannot fail | no assertion; `expect(x).toBe(x)`; expected value computed by the code under test; `assert result is not None` and nothing else; an override fixture equal to its fallback; assertion inside a callback that never runs | a mutation of the owner the test survives |
19
+ | Change certificate | pins the diff, not a behavior: a constant, a string, a rename, a call, the shape of the edit the PR made | revert the change: the test fails for the diff, not for a regression; the run is the proof |
20
+ | Mock echo | the mock returns the value the test then asserts; the behavior lives in the mock | mutate the owner: test stays green |
21
+ | Implementation mirror | asserts call order, call count, private helper args, bracket-notation access to private members, internal state shape that a behavior-preserving refactor would break | a keeper at the real boundary catches the behavioral mutation |
22
+ | Prose pin | asserts wording, headings, section order, snapshots, phrase counts, or length of `SKILL.md`, prompts, `AGENTS.md`, docs, rule text | no runtime behavior to mutate; cite the repo's prose-test rule |
23
+ | Copied inventory | a hard-coded list of exports, files, tools, keys that mirrors the source and fails only when someone edits both | a generator or freshness check or a real consumer already owns it |
24
+ | Source grep | reads a source file and greps for a string or import | an identifier-only refactor turns it red for no reason; a behavior mutation it misses |
25
+ | Duplicate contract | the same input/output asserted at two or more layers with no distinct transport or lifecycle risk; an adapter package's copy of a Core package's test | the mutation is caught by both: keep the stronger boundary |
26
+ | Layer replay | a shared helper re-tested through every wrapper that calls it | one helper owner test plus one wiring test per real wrapper |
27
+ | Seam keeper | exists to keep a test-only export, flag, getter, or reset hook alive | `knip` or grep shows no production caller; delete test and seam together |
28
+ | Fabricated postcondition | the fixture supplies the receipt, ordering, or stored state the owner should produce; asserts a store nothing writes | mutate the writer: test stays green |
29
+ | Capability restatement | asserts a flag or capability is `true` instead of the delivery it promises | a delivery test owns it, or none exists (then `F`, not `D`) |
30
+ | Input transcript | asserts the argv, flags, URL, or request the code handed to a child, not the state the child resolved | mutate the child's handling of that input: test stays green; the witness drives the real component and asserts resolved state |
31
+ | Misnamed | the name promises a behavior its inputs never exercise | read the assertions; mark by what it actually checks |
32
+ | Near-duplicate cases | N tests differing only in input literals | `C` into one table (`it.each` / `test.each`, or a loop over a typed array where the package's test typings lack `.each`); typecheck after; every old assertion stays a row |
33
+
34
+ ## Retention bar (these stay `R` even when they match a class above)
35
+
36
+ Keep a test that independently guards a public API, SDK, RPC or app-server protocol, config schema or default, migration, storage format, security boundary, platform behavior, prompt-byte or shipped-copy equality between real artifacts, generated or cross-language contract, package or install payload, release, or architecture invariant (meta-audits, tracked-artifact audits). Say which one in the test. Also keep:
37
+
38
+ - **Node-compat suites**: anything that runs shipped code under real Node is a platform contract even when a Bun run covers the same assertions.
39
+ - **Issue regressions**: a test naming an issue number stays until another test is shown to fail on that exact regression.
40
+ - **Machine-consumed text**: parsed fields, sentinel tokens, tool names, schema keys, a routing-bearing fragment of a parsed frontmatter `description`.
41
+ - **Baseline-red tests**: a test that fails on the unchanged base is a product bug to fix at its owner, never a deletion.
42
+
43
+ Outside that list, a source-inspection test survives only as the cheapest independent guard of a user-facing key, byte, or path that an identifier-only refactor leaves green. Static or slow is never a reason to delete.
44
+
45
+ ## Proof rule for `D` and `C`
46
+
47
+ Break the production owner (flip a condition, drop a branch, return a constant, skip a write) and run the candidate and its named keeper on the unmodified test tree:
48
+
49
+ | Candidate | Keeper | Verdict |
50
+ |---|---|---|
51
+ | green | red | candidate cannot catch this: `D` proven |
52
+ | red | red | candidate redundant for this behavior: `D` or `C` proven |
53
+ | red | green | candidate is the ONLY proof: `R`, or `C` it into the keeper and re-run |
54
+ | green | green | the mutation missed the behavior: confirm the edit landed, then pick another mutation |
55
+
56
+ Restore the owner byte for byte; never commit a mutation. A prose pin needs no mutation: the receipt is the assertion line plus the repo rule. Coverage diffs prove lines still execute, not that anything still asserts on them; pair a coverage diff with at least one mutation per theme.
@@ -184,10 +184,9 @@ Tests are strict too, with these exceptions (configure in `.oxlintrc.json` overr
184
184
  |---|---|
185
185
  | Use `expect()` assertions | That's how testing works |
186
186
  | Use magic numbers | Test data |
187
- | Access private members via bracket notation | Testing internals |
188
187
  | Skip readonly on test fixtures | Mutable setup/teardown |
189
188
 
190
- Tests still follow the iron list — branded types, typed errors, exhaustive switch.
189
+ Tests still follow the iron list — branded types, typed errors, exhaustive switch — and the authoring gate in [`../testing/README.md`](../testing/README.md). Private members are reached through the public boundary, never by bracket notation: a test on internals is an implementation mirror that a behavior-preserving refactor breaks.
191
190
 
192
191
  ## Existing codebases
193
192
 
@@ -0,0 +1,197 @@
1
+ #!/usr/bin/env bun
2
+ /**
3
+ * Scaffold a new Go project with the canonical strict layout: go.mod (go 1.23),
4
+ * .golangci.yml (v2 strict bundle), Taskfile.yml, cmd/server/main.go,
5
+ * internal/{cmd,config,api,domain,obs} skeletons, and .github/workflows/ci.yml.
6
+ *
7
+ * ─── How to run ───
8
+ * 1. Install Bun: curl -fsSL https://bun.sh/install | bash
9
+ * 2. Run:
10
+ * bun run new-project.ts myservice
11
+ * bun run new-project.ts myservice --module github.com/your-org/myservice
12
+ * ──────────────────
13
+ *
14
+ * Templates live in ./templates/. `.tmpl` files take Python string.Template
15
+ * placeholders ($name, ${name}, $$ for a literal $); every other file is copied verbatim.
16
+ * Exit codes: 0 created, 1 scaffold failure, 2 usage error.
17
+ */
18
+
19
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
20
+ import { dirname, join } from "node:path";
21
+ import { parseArgs } from "node:util";
22
+ import { assertNever, runTool } from "../shared/run-tool.ts";
23
+
24
+ const USAGE = `Usage: bun run new-project.ts <name> [--path <dir>] [--module <path>] [--purpose <text>]
25
+
26
+ Arguments:
27
+ name Project directory and default module name
28
+
29
+ Options:
30
+ --path Parent dir (default: current dir)
31
+ --module Go module path (default: <name>)
32
+ --purpose Short purpose for AGENTS.md (default: HTTP)
33
+ -h, --help Show this help`;
34
+
35
+ const TEMPLATES_DIR = join(import.meta.dir, "templates");
36
+
37
+ const LAYOUT = [
38
+ "cmd/server",
39
+ "internal/cmd",
40
+ "internal/config",
41
+ "internal/api",
42
+ "internal/domain",
43
+ "internal/obs",
44
+ ".github/workflows",
45
+ ] as const;
46
+
47
+ const FILES = [
48
+ { template: ".golangci.yml", output: ".golangci.yml", substitute: false },
49
+ { template: "Taskfile.yml", output: "Taskfile.yml", substitute: false },
50
+ { template: ".editorconfig", output: ".editorconfig", substitute: false },
51
+ { template: "gitignore", output: ".gitignore", substitute: false },
52
+ { template: "ci.yml", output: ".github/workflows/ci.yml", substitute: false },
53
+ { template: "run.go", output: "internal/cmd/run.go", substitute: false },
54
+ { template: "config.go", output: "internal/config/config.go", substitute: false },
55
+ { template: "main.go.tmpl", output: "cmd/server/main.go", substitute: true },
56
+ { template: "AGENTS.md.tmpl", output: "AGENTS.md", substitute: true },
57
+ { template: "README.md.tmpl", output: "README.md", substitute: true },
58
+ ] as const;
59
+
60
+ // Python string.Template grammar: $$ escape, $identifier, ${identifier}, or a bare $ (invalid).
61
+ const PLACEHOLDER = /\$(?:(\$)|([_a-z][_a-z0-9]*)|\{([_a-z][_a-z0-9]*)\}|())/gi;
62
+
63
+ type ProjectOptions = {
64
+ readonly name: string;
65
+ readonly path: string;
66
+ readonly module: string;
67
+ readonly purpose: string;
68
+ };
69
+
70
+ type Cli =
71
+ | { readonly kind: "run"; readonly options: ProjectOptions }
72
+ | { readonly kind: "help" }
73
+ | { readonly kind: "usage"; readonly problem: string };
74
+
75
+ class ScaffoldError extends Error {
76
+ constructor(
77
+ readonly kind: "exists" | "template",
78
+ message: string,
79
+ ) {
80
+ super(message);
81
+ this.name = "ScaffoldError";
82
+ }
83
+ }
84
+
85
+ function parseCli(): Cli {
86
+ try {
87
+ const { values, positionals } = parseArgs({
88
+ args: Bun.argv.slice(2),
89
+ options: {
90
+ path: { type: "string", default: "." },
91
+ module: { type: "string", default: "" },
92
+ purpose: { type: "string", default: "HTTP" },
93
+ help: { type: "boolean", short: "h", default: false },
94
+ },
95
+ allowPositionals: true,
96
+ strict: true,
97
+ });
98
+ if (values.help) return { kind: "help" };
99
+ const [name, ...extra] = positionals;
100
+ if (name === undefined || extra.length > 0) return { kind: "usage", problem: "expected exactly one project name" };
101
+ const options = { name, path: values.path, module: values.module || name, purpose: values.purpose };
102
+ return { kind: "run", options };
103
+ } catch (error) {
104
+ if (error instanceof TypeError) return { kind: "usage", problem: error.message };
105
+ throw error;
106
+ }
107
+ }
108
+
109
+ function substitute(template: string, file: string, values: ReadonlyMap<string, string>): string {
110
+ return template.replace(
111
+ PLACEHOLDER,
112
+ (match: string, escaped: string | undefined, named: string | undefined, braced: string | undefined) => {
113
+ if (escaped !== undefined) return "$";
114
+ const key = named ?? braced;
115
+ if (key === undefined) throw new ScaffoldError("template", `${file}: invalid placeholder near "${match}"`);
116
+ const value = values.get(key);
117
+ if (value === undefined) throw new ScaffoldError("template", `${file}: unknown placeholder $${key}`);
118
+ return value;
119
+ },
120
+ );
121
+ }
122
+
123
+ function initGoModule(projectDir: string, module: string): void {
124
+ const init = runTool("go", ["mod", "init", module], projectDir);
125
+ switch (init.kind) {
126
+ case "ok":
127
+ console.error(` ran go mod init ${module}`);
128
+ return;
129
+ case "unavailable":
130
+ case "failed": {
131
+ const detail = init.kind === "unavailable" ? init.reason : `exit ${init.status}: ${init.stderr.trim()}`;
132
+ console.error(` warn go mod init failed (${detail}); writing fallback go.mod`);
133
+ writeFileSync(join(projectDir, "go.mod"), `module ${module}\n\ngo 1.23\n`);
134
+ return;
135
+ }
136
+ default:
137
+ return assertNever(init);
138
+ }
139
+ }
140
+
141
+ function writeFiles(projectDir: string, { name, module, purpose }: ProjectOptions): void {
142
+ const values = new Map([
143
+ ["name", name],
144
+ ["module", module],
145
+ ["short_purpose", purpose],
146
+ ]);
147
+ for (const { template, output, substitute: render } of FILES) {
148
+ // The generated project is LF (its .editorconfig says end_of_line = lf); a CRLF checkout of the templates must not leak in.
149
+ const raw = readFileSync(join(TEMPLATES_DIR, template), "utf8").replace(/\r\n/g, "\n");
150
+ const outPath = join(projectDir, output);
151
+ mkdirSync(dirname(outPath), { recursive: true });
152
+ writeFileSync(outPath, render ? substitute(raw, template, values) : raw);
153
+ console.error(` wrote ${output}`);
154
+ }
155
+ }
156
+
157
+ function scaffold(options: ProjectOptions): void {
158
+ const projectDir = join(options.path, options.name);
159
+ if (existsSync(projectDir)) throw new ScaffoldError("exists", `✗ ${projectDir} already exists`);
160
+
161
+ mkdirSync(projectDir, { recursive: true });
162
+ for (const dir of LAYOUT) mkdirSync(join(projectDir, dir), { recursive: true });
163
+ initGoModule(projectDir, options.module);
164
+ writeFiles(projectDir, options);
165
+
166
+ console.error(`\nDone! cd ${projectDir}`);
167
+ console.error(" go get github.com/caarlos0/env/v11");
168
+ console.error(" task # fmt + lint + test");
169
+ }
170
+
171
+ function main(): number {
172
+ const cli = parseCli();
173
+ switch (cli.kind) {
174
+ case "help":
175
+ console.log(USAGE);
176
+ return 0;
177
+ case "usage":
178
+ console.error(`Error: ${cli.problem}\n\n${USAGE}`);
179
+ return 2;
180
+ case "run":
181
+ break;
182
+ default:
183
+ return assertNever(cli);
184
+ }
185
+ try {
186
+ scaffold(cli.options);
187
+ return 0;
188
+ } catch (error) {
189
+ if (error instanceof ScaffoldError) {
190
+ console.error(error.message);
191
+ return 1;
192
+ }
193
+ throw error;
194
+ }
195
+ }
196
+
197
+ process.exit(main());
@@ -0,0 +1,231 @@
1
+ #!/usr/bin/env bun
2
+ /**
3
+ * Scaffold a new Python project with ultra-strict config from pyproject-strict.md.
4
+ *
5
+ * ─── How to run ───
6
+ * 1. Install Bun: curl -fsSL https://bun.sh/install | bash
7
+ * 2. Install uv: curl -LsSf https://astral.sh/uv/install.sh | sh
8
+ * 3. Run:
9
+ * bun run new-project.ts myproject
10
+ * bun run new-project.ts myproject --path ./workspace
11
+ * bun run new-project.ts myproject --lib # library (publishable)
12
+ * ──────────────────
13
+ *
14
+ * Creates via `uv init`, then injects basedpyright + ruff ALL + pytest config.
15
+ * Exit codes: 0 created, 1 scaffold or uv failure, 2 usage error.
16
+ */
17
+
18
+ import { appendFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
19
+ import { join } from "node:path";
20
+ import { parseArgs } from "node:util";
21
+ import { assertNever, runTool } from "../shared/run-tool.ts";
22
+
23
+ const USAGE = `Usage: bun run new-project.ts <name> [--path <dir>] [--lib]
24
+
25
+ Arguments:
26
+ name Project name
27
+
28
+ Options:
29
+ -p, --path Parent directory (default: current dir)
30
+ --lib Create as publishable library (uv init --lib)
31
+ -h, --help Show this help`;
32
+
33
+ const TOOL_CONFIG = `
34
+ [dependency-groups]
35
+ dev = [
36
+ "basedpyright>=1.21",
37
+ "ruff>=0.8",
38
+ "pytest>=8",
39
+ "pytest-cov>=5",
40
+ ]
41
+
42
+ [tool.basedpyright]
43
+ typeCheckingMode = "all"
44
+ pythonVersion = "3.13"
45
+ reportMissingTypeStubs = false
46
+ reportUnknownMemberType = false
47
+ reportUnknownArgumentType = false
48
+ reportUnknownVariableType = false
49
+ reportUnknownLambdaType = false
50
+ reportUnknownParameterType = false
51
+ reportMissingParameterType = false
52
+ reportUnnecessaryIsInstance = false
53
+ reportUnusedCallResult = false
54
+ reportImplicitOverride = false
55
+
56
+ [tool.ruff]
57
+ target-version = "py313"
58
+ line-length = 120
59
+
60
+ [tool.ruff.lint]
61
+ select = ["ALL"]
62
+ ignore = [
63
+ "COM812", # trailing comma (conflicts with formatter)
64
+ "ISC001", # single-line string concat (conflicts with formatter)
65
+ "D1", # undocumented-public-* (too noisy early on)
66
+ "ANN101", # deprecated: self annotation
67
+ "ANN102", # deprecated: cls annotation
68
+ "S101", # assert used (pytest needs it)
69
+ "PLR2004", # magic-value-comparison (test data)
70
+ "FBT", # boolean-trap (too strict for CLIs)
71
+ "TD", # flake8-todos (noisy)
72
+ "FIX", # fixme (noisy)
73
+ ]
74
+
75
+ [tool.ruff.lint.per-file-ignores]
76
+ "tests/**/*.py" = ["S101", "PLR2004", "SLF001", "D", "ARG", "ANN"]
77
+
78
+ [tool.ruff.lint.pydocstyle]
79
+ convention = "google"
80
+
81
+ [tool.pytest.ini_options]
82
+ testpaths = ["tests"]
83
+ addopts = "-ra --strict-markers --strict-config"
84
+ `;
85
+
86
+ const GITIGNORE = `__pycache__/
87
+ *.py[cod]
88
+ *.so
89
+ .venv/
90
+ dist/
91
+ *.egg-info/
92
+ .coverage
93
+ htmlcov/
94
+ .basedpyright/
95
+ .ruff_cache/
96
+ `;
97
+
98
+ type ProjectOptions = { readonly name: string; readonly path: string; readonly lib: boolean };
99
+
100
+ type Cli =
101
+ | { readonly kind: "run"; readonly options: ProjectOptions }
102
+ | { readonly kind: "help" }
103
+ | { readonly kind: "usage"; readonly problem: string };
104
+
105
+ class ScaffoldError extends Error {
106
+ constructor(
107
+ readonly kind: "exists" | "uv-unavailable" | "uv-init-failed",
108
+ message: string,
109
+ ) {
110
+ super(message);
111
+ this.name = "ScaffoldError";
112
+ }
113
+ }
114
+
115
+ function parseCli(): Cli {
116
+ try {
117
+ const { values, positionals } = parseArgs({
118
+ args: Bun.argv.slice(2),
119
+ options: {
120
+ path: { type: "string", short: "p", default: "." },
121
+ lib: { type: "boolean", default: false },
122
+ help: { type: "boolean", short: "h", default: false },
123
+ },
124
+ allowPositionals: true,
125
+ strict: true,
126
+ });
127
+ if (values.help) return { kind: "help" };
128
+ const [name, ...extra] = positionals;
129
+ if (name === undefined || extra.length > 0) return { kind: "usage", problem: "expected exactly one project name" };
130
+ return { kind: "run", options: { name, path: values.path, lib: values.lib } };
131
+ } catch (error) {
132
+ if (error instanceof TypeError) return { kind: "usage", problem: error.message };
133
+ throw error;
134
+ }
135
+ }
136
+
137
+ function withoutDependencyGroups(pyproject: string): string {
138
+ const kept: string[] = [];
139
+ let skipping = false;
140
+ for (const line of pyproject.split(/(?<=\n)/)) {
141
+ const trimmed = line.trim();
142
+ if (trimmed.startsWith("[dependency-groups]")) {
143
+ skipping = true;
144
+ continue;
145
+ }
146
+ if (skipping && trimmed.startsWith("[")) skipping = false;
147
+ if (!skipping) kept.push(line);
148
+ }
149
+ return `${kept.join("").replace(/\n+$/, "")}\n`;
150
+ }
151
+
152
+ function initProject(projectDir: string, lib: boolean): void {
153
+ const init = runTool("uv", ["init", lib ? "--lib" : "--app", projectDir]);
154
+ switch (init.kind) {
155
+ case "ok":
156
+ return;
157
+ case "unavailable":
158
+ throw new ScaffoldError(
159
+ "uv-unavailable",
160
+ `uv could not be started (${init.reason}); install it: curl -LsSf https://astral.sh/uv/install.sh | sh`,
161
+ );
162
+ case "failed":
163
+ throw new ScaffoldError("uv-init-failed", `uv init failed: ${init.stderr}`);
164
+ default:
165
+ return assertNever(init);
166
+ }
167
+ }
168
+
169
+ function addDevTools(projectDir: string): void {
170
+ const added = runTool("uv", ["add", "--dev", "basedpyright", "ruff", "pytest", "pytest-cov"], projectDir);
171
+ switch (added.kind) {
172
+ case "ok":
173
+ return;
174
+ case "unavailable":
175
+ console.error(`warn: uv add --dev could not start (${added.reason}); run it once uv is reachable`);
176
+ return;
177
+ case "failed":
178
+ console.error(`warn: uv add --dev failed; pyproject.toml still lists the dev tools:\n${added.stderr}`);
179
+ return;
180
+ default:
181
+ return assertNever(added);
182
+ }
183
+ }
184
+
185
+ function scaffold({ name, path, lib }: ProjectOptions): void {
186
+ const projectDir = join(path, name);
187
+ if (existsSync(projectDir)) throw new ScaffoldError("exists", `${projectDir} already exists`);
188
+ initProject(projectDir, lib);
189
+
190
+ const pyprojectPath = join(projectDir, "pyproject.toml");
191
+ writeFileSync(pyprojectPath, withoutDependencyGroups(readFileSync(pyprojectPath, "utf8")) + TOOL_CONFIG);
192
+ addDevTools(projectDir);
193
+
194
+ mkdirSync(join(projectDir, "tests"), { recursive: true });
195
+ appendFileSync(join(projectDir, "tests", "__init__.py"), "");
196
+ writeFileSync(join(projectDir, ".gitignore"), GITIGNORE);
197
+
198
+ const srcDir = join(projectDir, "src", name.replaceAll("-", "_"));
199
+ if (lib && existsSync(srcDir)) appendFileSync(join(srcDir, "py.typed"), "");
200
+
201
+ console.log(`✓ Created: ${projectDir}`);
202
+ console.log(` cd ${name} && uv sync && uv run basedpyright . && uv run ruff check .`);
203
+ }
204
+
205
+ function main(): number {
206
+ const cli = parseCli();
207
+ switch (cli.kind) {
208
+ case "help":
209
+ console.log(USAGE);
210
+ return 0;
211
+ case "usage":
212
+ console.error(`Error: ${cli.problem}\n\n${USAGE}`);
213
+ return 2;
214
+ case "run":
215
+ break;
216
+ default:
217
+ return assertNever(cli);
218
+ }
219
+ try {
220
+ scaffold(cli.options);
221
+ return 0;
222
+ } catch (error) {
223
+ if (error instanceof ScaffoldError) {
224
+ console.error(`Error: ${error.message}`);
225
+ return 1;
226
+ }
227
+ throw error;
228
+ }
229
+ }
230
+
231
+ process.exit(main());