oh-my-opencode 5.1.68 → 5.1.70

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 (1698) hide show
  1. package/.agents/skills/codex-qa/scripts/lib/app-server-client.mjs +86 -69
  2. package/.agents/skills/codex-qa/scripts/lib/app-server-client.test.js +14 -14
  3. package/.agents/skills/codex-qa/scripts/lib/mock-model.mjs +17 -17
  4. package/.agents/skills/opencode-qa/scripts/lib/fake-openai-events.mjs +1 -2
  5. package/.agents/skills/opencode-qa/scripts/lib/fake-openai-server.mjs +33 -15
  6. package/.agents/skills/senpi-qa/scripts/resolve-evidence-dir.test.mjs +6 -10
  7. package/bin/knip.workspace.jsonc +11 -0
  8. package/bin/oh-my-opencode.js +83 -83
  9. package/bin/oh-my-opencode.test.ts +131 -114
  10. package/bin/platform.d.ts +14 -14
  11. package/bin/platform.js +32 -28
  12. package/bin/platform.test.ts +120 -146
  13. package/bin/version-mismatch.js +4 -4
  14. package/bin/version-mismatch.test.ts +52 -40
  15. package/dist/agents/dynamic-agent-prompt-builder.d.ts +1 -1
  16. package/dist/agents/prometheus/index.d.ts +1 -1
  17. package/dist/agents/sisyphus-junior/index.d.ts +1 -1
  18. package/dist/cli/cli-program.d.ts +3 -0
  19. package/dist/cli/config-manager.d.ts +2 -2
  20. package/dist/cli/index.js +4078 -671
  21. package/dist/cli/install-native/index.d.ts +1 -1
  22. package/dist/cli/service-auth/accounts-gate.d.ts +3 -3
  23. package/dist/cli/service-auth/cli-service-auth-state.d.ts +4 -0
  24. package/dist/cli/service-auth/closed-device-login.d.ts +10 -0
  25. package/dist/cli/service-auth/commands.d.ts +9 -2
  26. package/dist/cli/service-auth/device-flow.d.ts +2 -0
  27. package/dist/cli/service-auth/index.d.ts +1 -1
  28. package/dist/cli/service-auth/keychain-helper/fake-keychain.test-support.d.ts +2 -1
  29. package/dist/cli/service-auth/loopback.d.ts +2 -0
  30. package/dist/cli/service-auth/machine-device.d.ts +17 -0
  31. package/dist/cli/service-auth/machine-digest.d.ts +6 -0
  32. package/dist/cli/service-auth/protocol.d.ts +2 -2
  33. package/dist/cli/service-auth/session.d.ts +20 -1
  34. package/dist/cli-node/index.js +4078 -671
  35. package/dist/config/index.d.ts +1 -1
  36. package/dist/config-migration/index.d.ts +4 -4
  37. package/dist/features/background-agent/index.d.ts +1 -1
  38. package/dist/features/btw-side/context-injector.d.ts +1 -1
  39. package/dist/features/btw-side/index.d.ts +1 -1
  40. package/dist/features/context-injector/index.d.ts +1 -1
  41. package/dist/features/hook-message-injector/injector.d.ts +1 -1
  42. package/dist/features/monitor/output-injector.d.ts +1 -0
  43. package/dist/features/team-mode/tools/index.d.ts +1 -1
  44. package/dist/features/tmux-subagent/decision-engine.d.ts +1 -1
  45. package/dist/features/tool-metadata-store/index.d.ts +1 -1
  46. package/dist/hooks/auto-slash-command/hook.d.ts +1 -1
  47. package/dist/hooks/auto-update-checker/index.d.ts +1 -1
  48. package/dist/hooks/edit-error-recovery/index.d.ts +1 -1
  49. package/dist/hooks/index.d.ts +4 -4
  50. package/dist/hooks/keyword-detector/ultrawork/index.d.ts +2 -2
  51. package/dist/hooks/rules-injector/injector.d.ts +2 -2
  52. package/dist/index.js +1317 -1019
  53. package/dist/locales/en.d.ts +1 -1
  54. package/dist/shared/index.d.ts +2 -2
  55. package/dist/shared/migration.d.ts +2 -2
  56. package/dist/shared/model-capabilities-cache.d.ts +1 -1
  57. package/dist/shared/model-error-classifier.d.ts +1 -1
  58. package/dist/shared/model-requirements.d.ts +1 -1
  59. package/dist/shared/model-resolver.d.ts +1 -1
  60. package/dist/shared/opencode-config-dir.d.ts +1 -1
  61. package/dist/shared/prompt-async-gate.d.ts +1 -1
  62. package/dist/skills/ast-grep/references/recipes.md +1 -1
  63. package/dist/skills/ast-grep/tests/smoke.ps1 +1 -1
  64. package/dist/skills/ast-grep/tests/smoke.sh +1 -1
  65. package/dist/skills/browser/runtime/omowright/index.js +16 -16
  66. package/dist/skills/browser/runtime/omowright/manifest.json +5 -5
  67. package/dist/skills/browser/runtime/omowright/page-bundle.js +14 -4
  68. package/dist/skills/browser/scripts/browser-doctor-report.mjs +36 -9
  69. package/dist/skills/browser/scripts/browser-doctor.mjs +24 -7
  70. package/dist/skills/browser/scripts/browser-engine-guard.mjs +2 -1
  71. package/dist/skills/browser/scripts/browser-install.mjs +40 -8
  72. package/dist/skills/debugging/references/scripts/dap.mjs +280 -170
  73. package/dist/skills/debugging/references/scripts/dap.test.ts +83 -55
  74. package/dist/skills/debugging/references/scripts/fixture-adapter.mjs +104 -42
  75. package/dist/skills/frontend/scripts/detect/cli.ts +67 -50
  76. package/dist/skills/frontend/scripts/detect/config.test.ts +23 -19
  77. package/dist/skills/frontend/scripts/detect/config.ts +41 -38
  78. package/dist/skills/frontend/scripts/detect/core/color.test.ts +19 -19
  79. package/dist/skills/frontend/scripts/detect/core/color.ts +109 -94
  80. package/dist/skills/frontend/scripts/detect/core/page.ts +43 -42
  81. package/dist/skills/frontend/scripts/detect/core/shadow.ts +38 -29
  82. package/dist/skills/frontend/scripts/detect/core/source.ts +25 -20
  83. package/dist/skills/frontend/scripts/detect/detect.ts +63 -45
  84. package/dist/skills/frontend/scripts/detect/lint.test.ts +24 -16
  85. package/dist/skills/frontend/scripts/detect/lint.ts +78 -69
  86. package/dist/skills/frontend/scripts/detect/render/probe-placement.test.ts +35 -11
  87. package/dist/skills/frontend/scripts/detect/render/probe-placement.ts +36 -32
  88. package/dist/skills/frontend/scripts/detect/render/renderer.ts +14 -13
  89. package/dist/skills/frontend/scripts/detect/render/webview.ts +53 -50
  90. package/dist/skills/frontend/scripts/detect/report.ts +20 -18
  91. package/dist/skills/frontend/scripts/detect/rule.ts +21 -21
  92. package/dist/skills/frontend/scripts/detect/rules/color/ai-color-palette.test.ts +84 -53
  93. package/dist/skills/frontend/scripts/detect/rules/color/ai-color-palette.ts +144 -63
  94. package/dist/skills/frontend/scripts/detect/rules/color/cream-palette.test.ts +27 -15
  95. package/dist/skills/frontend/scripts/detect/rules/color/cream-palette.ts +41 -27
  96. package/dist/skills/frontend/scripts/detect/rules/color/dark-glow.test.ts +57 -32
  97. package/dist/skills/frontend/scripts/detect/rules/color/dark-glow.ts +59 -34
  98. package/dist/skills/frontend/scripts/detect/rules/color/design-system-color.test.ts +25 -17
  99. package/dist/skills/frontend/scripts/detect/rules/color/design-system-color.ts +37 -28
  100. package/dist/skills/frontend/scripts/detect/rules/color/gradient-text.test.ts +63 -15
  101. package/dist/skills/frontend/scripts/detect/rules/color/gradient-text.ts +68 -45
  102. package/dist/skills/frontend/scripts/detect/rules/color/gray-on-color.test.ts +49 -24
  103. package/dist/skills/frontend/scripts/detect/rules/color/gray-on-color.ts +34 -25
  104. package/dist/skills/frontend/scripts/detect/rules/color/index.ts +9 -2
  105. package/dist/skills/frontend/scripts/detect/rules/color/low-contrast.test.ts +419 -161
  106. package/dist/skills/frontend/scripts/detect/rules/color/low-contrast.ts +106 -43
  107. package/dist/skills/frontend/scripts/detect/rules/color/placeholder-contrast.test.ts +136 -45
  108. package/dist/skills/frontend/scripts/detect/rules/color/radial-halo.test.ts +42 -28
  109. package/dist/skills/frontend/scripts/detect/rules/color/radial-halo.ts +48 -23
  110. package/dist/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.test.ts +45 -18
  111. package/dist/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.ts +49 -26
  112. package/dist/skills/frontend/scripts/detect/rules/color/support/animation-opacity.ts +90 -66
  113. package/dist/skills/frontend/scripts/detect/rules/color/support/color-path.ts +43 -6
  114. package/dist/skills/frontend/scripts/detect/rules/color/support/contrast-pairs.ts +75 -38
  115. package/dist/skills/frontend/scripts/detect/rules/color/support/contrast-role.ts +142 -59
  116. package/dist/skills/frontend/scripts/detect/rules/color/support/glow-forms.ts +93 -44
  117. package/dist/skills/frontend/scripts/detect/rules/color/support/gradient-samples.ts +115 -114
  118. package/dist/skills/frontend/scripts/detect/rules/color/support/gradients.ts +77 -66
  119. package/dist/skills/frontend/scripts/detect/rules/color/support/mockup-roots.ts +178 -48
  120. package/dist/skills/frontend/scripts/detect/rules/color/support/page-ignore.ts +6 -2
  121. package/dist/skills/frontend/scripts/detect/rules/color/support/painted-text.ts +171 -108
  122. package/dist/skills/frontend/scripts/detect/rules/color/support/palette-roles.ts +60 -39
  123. package/dist/skills/frontend/scripts/detect/rules/color/support/placeholder-contrast.ts +36 -16
  124. package/dist/skills/frontend/scripts/detect/rules/color/support/stock-accent.ts +48 -18
  125. package/dist/skills/frontend/scripts/detect/rules/color/support/text-colors.ts +88 -62
  126. package/dist/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.test.ts +17 -9
  127. package/dist/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.ts +25 -15
  128. package/dist/skills/frontend/scripts/detect/rules/copy/broken-image.test.ts +22 -16
  129. package/dist/skills/frontend/scripts/detect/rules/copy/broken-image.ts +20 -12
  130. package/dist/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.test.ts +38 -24
  131. package/dist/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.ts +63 -39
  132. package/dist/skills/frontend/scripts/detect/rules/copy/index.ts +9 -2
  133. package/dist/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.test.ts +14 -9
  134. package/dist/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.ts +53 -25
  135. package/dist/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.test.ts +69 -37
  136. package/dist/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.ts +49 -28
  137. package/dist/skills/frontend/scripts/detect/rules/copy/repeated-container-text.test.ts +52 -26
  138. package/dist/skills/frontend/scripts/detect/rules/copy/repeated-container-text.ts +80 -47
  139. package/dist/skills/frontend/scripts/detect/rules/copy/script-error.test.ts +71 -30
  140. package/dist/skills/frontend/scripts/detect/rules/copy/script-error.ts +42 -34
  141. package/dist/skills/frontend/scripts/detect/rules/copy/skipped-heading.test.ts +64 -34
  142. package/dist/skills/frontend/scripts/detect/rules/copy/skipped-heading.ts +199 -75
  143. package/dist/skills/frontend/scripts/detect/rules/copy/support/numbered-label.ts +122 -71
  144. package/dist/skills/frontend/scripts/detect/rules/copy/support/page-text.ts +32 -24
  145. package/dist/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.test.ts +25 -8
  146. package/dist/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.ts +42 -13
  147. package/dist/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.test.ts +40 -31
  148. package/dist/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.ts +49 -41
  149. package/dist/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.test.ts +30 -25
  150. package/dist/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.ts +10 -10
  151. package/dist/skills/frontend/scripts/detect/rules/decoration/bounce-easing.test.ts +80 -53
  152. package/dist/skills/frontend/scripts/detect/rules/decoration/bounce-easing.ts +87 -68
  153. package/dist/skills/frontend/scripts/detect/rules/decoration/buried-raster.test.ts +122 -79
  154. package/dist/skills/frontend/scripts/detect/rules/decoration/buried-raster.ts +83 -64
  155. package/dist/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.test.ts +20 -20
  156. package/dist/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.ts +29 -29
  157. package/dist/skills/frontend/scripts/detect/rules/decoration/design-system-radius.test.ts +27 -27
  158. package/dist/skills/frontend/scripts/detect/rules/decoration/design-system-radius.ts +33 -26
  159. package/dist/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.test.ts +58 -45
  160. package/dist/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.ts +61 -58
  161. package/dist/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.test.ts +50 -33
  162. package/dist/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.ts +25 -23
  163. package/dist/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.test.ts +74 -60
  164. package/dist/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.ts +16 -14
  165. package/dist/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.test.ts +75 -54
  166. package/dist/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.ts +85 -84
  167. package/dist/skills/frontend/scripts/detect/rules/decoration/index.ts +17 -17
  168. package/dist/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.test.ts +128 -104
  169. package/dist/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.ts +79 -64
  170. package/dist/skills/frontend/scripts/detect/rules/decoration/marquee.test.ts +67 -50
  171. package/dist/skills/frontend/scripts/detect/rules/decoration/marquee.ts +57 -40
  172. package/dist/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.test.ts +67 -54
  173. package/dist/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.ts +34 -34
  174. package/dist/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.test.ts +56 -44
  175. package/dist/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.ts +92 -58
  176. package/dist/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.test.ts +18 -18
  177. package/dist/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.ts +19 -19
  178. package/dist/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.test.ts +57 -44
  179. package/dist/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.ts +59 -53
  180. package/dist/skills/frontend/scripts/detect/rules/decoration/side-tab.test.ts +112 -72
  181. package/dist/skills/frontend/scripts/detect/rules/decoration/side-tab.ts +15 -12
  182. package/dist/skills/frontend/scripts/detect/rules/decoration/support/appearance.ts +89 -85
  183. package/dist/skills/frontend/scripts/detect/rules/decoration/support/assert-cases.ts +17 -15
  184. package/dist/skills/frontend/scripts/detect/rules/decoration/support/borders.ts +178 -136
  185. package/dist/skills/frontend/scripts/detect/rules/decoration/support/clip-geometry.ts +155 -145
  186. package/dist/skills/frontend/scripts/detect/rules/decoration/support/css-candidates.ts +60 -54
  187. package/dist/skills/frontend/scripts/detect/rules/decoration/support/curve-samples.ts +51 -48
  188. package/dist/skills/frontend/scripts/detect/rules/decoration/support/gradient-pattern.ts +43 -34
  189. package/dist/skills/frontend/scripts/detect/rules/decoration/support/keyframes.ts +118 -113
  190. package/dist/skills/frontend/scripts/detect/rules/decoration/support/labels.ts +74 -67
  191. package/dist/skills/frontend/scripts/detect/rules/decoration/support/raster-state.ts +80 -42
  192. package/dist/skills/frontend/scripts/detect/rules/index.ts +6 -6
  193. package/dist/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.test.ts +71 -37
  194. package/dist/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.ts +116 -55
  195. package/dist/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.test.ts +41 -18
  196. package/dist/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.ts +22 -9
  197. package/dist/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.test.ts +57 -29
  198. package/dist/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.ts +113 -52
  199. package/dist/skills/frontend/scripts/detect/rules/layout/cramped-padding.test.ts +120 -31
  200. package/dist/skills/frontend/scripts/detect/rules/layout/cramped-padding.ts +167 -90
  201. package/dist/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.test.ts +43 -24
  202. package/dist/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.ts +82 -41
  203. package/dist/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.test.ts +34 -12
  204. package/dist/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.ts +74 -37
  205. package/dist/skills/frontend/scripts/detect/rules/layout/heading-rhythm.test.ts +85 -39
  206. package/dist/skills/frontend/scripts/detect/rules/layout/heading-rhythm.ts +49 -24
  207. package/dist/skills/frontend/scripts/detect/rules/layout/index.ts +14 -3
  208. package/dist/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.test.ts +24 -7
  209. package/dist/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.ts +47 -28
  210. package/dist/skills/frontend/scripts/detect/rules/layout/nested-cards.test.ts +79 -31
  211. package/dist/skills/frontend/scripts/detect/rules/layout/nested-cards.ts +66 -31
  212. package/dist/skills/frontend/scripts/detect/rules/layout/straggler.test.ts +33 -14
  213. package/dist/skills/frontend/scripts/detect/rules/layout/straggler.ts +46 -22
  214. package/dist/skills/frontend/scripts/detect/rules/layout/support/cards.ts +157 -82
  215. package/dist/skills/frontend/scripts/detect/rules/layout/support/clipping.ts +98 -50
  216. package/dist/skills/frontend/scripts/detect/rules/layout/support/declared-mockups.ts +100 -36
  217. package/dist/skills/frontend/scripts/detect/rules/layout/support/geometry.ts +66 -43
  218. package/dist/skills/frontend/scripts/detect/rules/layout/support/hidden-interface.ts +56 -24
  219. package/dist/skills/frontend/scripts/detect/rules/layout/support/layout-cases.ts +23 -8
  220. package/dist/skills/frontend/scripts/detect/rules/layout/support/line-breaks.ts +28 -16
  221. package/dist/skills/frontend/scripts/detect/rules/layout/support/motion.ts +88 -56
  222. package/dist/skills/frontend/scripts/detect/rules/layout/support/padding.ts +106 -68
  223. package/dist/skills/frontend/scripts/detect/rules/layout/support/rhythm.ts +204 -128
  224. package/dist/skills/frontend/scripts/detect/rules/layout/text-occlusion.test.ts +50 -17
  225. package/dist/skills/frontend/scripts/detect/rules/layout/text-occlusion.ts +125 -70
  226. package/dist/skills/frontend/scripts/detect/rules/layout/text-overflow.test.ts +96 -42
  227. package/dist/skills/frontend/scripts/detect/rules/layout/text-overflow.ts +111 -59
  228. package/dist/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.test.ts +15 -9
  229. package/dist/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.ts +27 -16
  230. package/dist/skills/frontend/scripts/detect/rules/layout/viewport-reflow.test.ts +34 -21
  231. package/dist/skills/frontend/scripts/detect/rules/layout/viewport-reflow.ts +38 -23
  232. package/dist/skills/frontend/scripts/detect/rules/source/ai-color-palette.test.ts +6 -6
  233. package/dist/skills/frontend/scripts/detect/rules/source/ai-color-palette.ts +17 -6
  234. package/dist/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.test.ts +5 -5
  235. package/dist/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.ts +19 -9
  236. package/dist/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.test.ts +7 -7
  237. package/dist/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.ts +31 -13
  238. package/dist/skills/frontend/scripts/detect/rules/source/bounce-easing.test.ts +20 -9
  239. package/dist/skills/frontend/scripts/detect/rules/source/bounce-easing.ts +41 -16
  240. package/dist/skills/frontend/scripts/detect/rules/source/broken-image.test.ts +17 -17
  241. package/dist/skills/frontend/scripts/detect/rules/source/broken-image.ts +19 -9
  242. package/dist/skills/frontend/scripts/detect/rules/source/codex-grid-background.test.ts +7 -4
  243. package/dist/skills/frontend/scripts/detect/rules/source/codex-grid-background.ts +36 -12
  244. package/dist/skills/frontend/scripts/detect/rules/source/dark-glow.test.ts +8 -8
  245. package/dist/skills/frontend/scripts/detect/rules/source/dark-glow.ts +28 -14
  246. package/dist/skills/frontend/scripts/detect/rules/source/em-dash-overuse.test.ts +6 -6
  247. package/dist/skills/frontend/scripts/detect/rules/source/em-dash-overuse.ts +17 -9
  248. package/dist/skills/frontend/scripts/detect/rules/source/gradient-text.test.ts +5 -5
  249. package/dist/skills/frontend/scripts/detect/rules/source/gradient-text.ts +14 -6
  250. package/dist/skills/frontend/scripts/detect/rules/source/gray-on-color.test.ts +13 -13
  251. package/dist/skills/frontend/scripts/detect/rules/source/gray-on-color.ts +18 -7
  252. package/dist/skills/frontend/scripts/detect/rules/source/index.ts +18 -1
  253. package/dist/skills/frontend/scripts/detect/rules/source/marketing-buzzword.test.ts +5 -5
  254. package/dist/skills/frontend/scripts/detect/rules/source/marketing-buzzword.ts +49 -11
  255. package/dist/skills/frontend/scripts/detect/rules/source/marquee.test.ts +11 -5
  256. package/dist/skills/frontend/scripts/detect/rules/source/marquee.ts +16 -6
  257. package/dist/skills/frontend/scripts/detect/rules/source/monotonous-spacing.test.ts +6 -6
  258. package/dist/skills/frontend/scripts/detect/rules/source/monotonous-spacing.ts +35 -17
  259. package/dist/skills/frontend/scripts/detect/rules/source/overused-font.test.ts +18 -11
  260. package/dist/skills/frontend/scripts/detect/rules/source/overused-font.ts +51 -10
  261. package/dist/skills/frontend/scripts/detect/rules/source/radial-halo.test.ts +12 -9
  262. package/dist/skills/frontend/scripts/detect/rules/source/radial-halo.ts +16 -8
  263. package/dist/skills/frontend/scripts/detect/rules/source/side-tab.test.ts +34 -22
  264. package/dist/skills/frontend/scripts/detect/rules/source/side-tab.ts +88 -47
  265. package/dist/skills/frontend/scripts/detect/rules/source/support/accent-scans.ts +103 -62
  266. package/dist/skills/frontend/scripts/detect/rules/source/support/check-source.ts +6 -2
  267. package/dist/skills/frontend/scripts/detect/rules/source/support/corners.ts +148 -80
  268. package/dist/skills/frontend/scripts/detect/rules/source/support/css-effects.ts +86 -66
  269. package/dist/skills/frontend/scripts/detect/rules/source/support/css-scopes.ts +148 -113
  270. package/dist/skills/frontend/scripts/detect/rules/source/support/image-tags.ts +113 -105
  271. package/dist/skills/frontend/scripts/detect/rules/source/support/js-punctuation.ts +47 -30
  272. package/dist/skills/frontend/scripts/detect/rules/source/support/markup-scope.ts +45 -34
  273. package/dist/skills/frontend/scripts/detect/rules/source/support/source-color.ts +64 -29
  274. package/dist/skills/frontend/scripts/detect/rules/source/support/source-shadow.ts +17 -10
  275. package/dist/skills/frontend/scripts/detect/rules/source/support/source-text.ts +128 -86
  276. package/dist/skills/frontend/scripts/detect/rules/typography/all-caps-body.test.ts +24 -15
  277. package/dist/skills/frontend/scripts/detect/rules/typography/all-caps-body.ts +23 -9
  278. package/dist/skills/frontend/scripts/detect/rules/typography/design-system-font-size.test.ts +16 -12
  279. package/dist/skills/frontend/scripts/detect/rules/typography/design-system-font-size.ts +27 -17
  280. package/dist/skills/frontend/scripts/detect/rules/typography/design-system-font.test.ts +17 -13
  281. package/dist/skills/frontend/scripts/detect/rules/typography/design-system-font.ts +27 -17
  282. package/dist/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.test.ts +50 -14
  283. package/dist/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.ts +26 -12
  284. package/dist/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.test.ts +44 -17
  285. package/dist/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.ts +41 -19
  286. package/dist/skills/frontend/scripts/detect/rules/typography/index.ts +14 -3
  287. package/dist/skills/frontend/scripts/detect/rules/typography/italic-serif-display.test.ts +39 -15
  288. package/dist/skills/frontend/scripts/detect/rules/typography/italic-serif-display.ts +67 -16
  289. package/dist/skills/frontend/scripts/detect/rules/typography/justified-text.test.ts +39 -22
  290. package/dist/skills/frontend/scripts/detect/rules/typography/justified-text.ts +47 -25
  291. package/dist/skills/frontend/scripts/detect/rules/typography/line-length.test.ts +65 -29
  292. package/dist/skills/frontend/scripts/detect/rules/typography/line-length.ts +37 -21
  293. package/dist/skills/frontend/scripts/detect/rules/typography/oversized-h1.test.ts +27 -17
  294. package/dist/skills/frontend/scripts/detect/rules/typography/oversized-h1.ts +35 -14
  295. package/dist/skills/frontend/scripts/detect/rules/typography/overused-font.test.ts +25 -18
  296. package/dist/skills/frontend/scripts/detect/rules/typography/overused-font.ts +83 -38
  297. package/dist/skills/frontend/scripts/detect/rules/typography/support/drawn-enlargement.ts +68 -40
  298. package/dist/skills/frontend/scripts/detect/rules/typography/support/fading-text.ts +59 -39
  299. package/dist/skills/frontend/scripts/detect/rules/typography/support/flex-runs.ts +13 -8
  300. package/dist/skills/frontend/scripts/detect/rules/typography/support/font-family.ts +68 -17
  301. package/dist/skills/frontend/scripts/detect/rules/typography/support/painted-text.test.ts +110 -46
  302. package/dist/skills/frontend/scripts/detect/rules/typography/support/painted-text.ts +173 -67
  303. package/dist/skills/frontend/scripts/detect/rules/typography/support/svg-size.ts +56 -49
  304. package/dist/skills/frontend/scripts/detect/rules/typography/support/text-context.ts +155 -78
  305. package/dist/skills/frontend/scripts/detect/rules/typography/support/text-lines.ts +38 -28
  306. package/dist/skills/frontend/scripts/detect/rules/typography/support/type-hierarchy.ts +43 -38
  307. package/dist/skills/frontend/scripts/detect/rules/typography/tight-leading.test.ts +109 -37
  308. package/dist/skills/frontend/scripts/detect/rules/typography/tight-leading.ts +67 -39
  309. package/dist/skills/frontend/scripts/detect/rules/typography/tiny-text.test.ts +80 -45
  310. package/dist/skills/frontend/scripts/detect/rules/typography/tiny-text.ts +34 -15
  311. package/dist/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.test.ts +158 -81
  312. package/dist/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.ts +52 -22
  313. package/dist/skills/frontend/scripts/detect/rules/typography/wide-tracking.test.ts +29 -17
  314. package/dist/skills/frontend/scripts/detect/rules/typography/wide-tracking.ts +37 -19
  315. package/dist/skills/frontend/scripts/detect/snapshot/collect.ts +154 -145
  316. package/dist/skills/frontend/scripts/detect/snapshot/style-props.ts +121 -21
  317. package/dist/skills/frontend/scripts/detect/testing/build-snapshot.ts +140 -65
  318. package/dist/skills/frontend/scripts/detect/types.ts +81 -76
  319. package/dist/skills/frontend/scripts/perfection/accent-stripes/color.ts +205 -85
  320. package/dist/skills/frontend/scripts/perfection/accent-stripes/css-parse.ts +97 -80
  321. package/dist/skills/frontend/scripts/perfection/accent-stripes/declarations.ts +129 -101
  322. package/dist/skills/frontend/scripts/perfection/accent-stripes/findings.ts +23 -23
  323. package/dist/skills/frontend/scripts/perfection/accent-stripes/gradient.ts +43 -42
  324. package/dist/skills/frontend/scripts/perfection/accent-stripes/lint.ts +75 -60
  325. package/dist/skills/frontend/scripts/perfection/accent-stripes/markup.ts +131 -106
  326. package/dist/skills/frontend/scripts/perfection/accent-stripes/selector.ts +28 -25
  327. package/dist/skills/frontend/scripts/perfection/accent-stripes/tailwind.ts +93 -78
  328. package/dist/skills/frontend/scripts/perfection/check-accent-stripes.test.ts +111 -62
  329. package/dist/skills/frontend/scripts/perfection/check-accent-stripes.ts +22 -22
  330. package/dist/skills/frontend/scripts/perfection/check-draft-guard.test.ts +89 -65
  331. package/dist/skills/frontend/scripts/perfection/check-draft-guard.ts +24 -24
  332. package/dist/skills/frontend/scripts/perfection/collect-files.test.ts +36 -33
  333. package/dist/skills/frontend/scripts/perfection/collect-files.ts +49 -36
  334. package/dist/skills/frontend/scripts/perfection/draft-guard/findings.ts +10 -9
  335. package/dist/skills/frontend/scripts/perfection/draft-guard/lint.ts +27 -24
  336. package/dist/skills/frontend/scripts/perfection/draft-guard/rules.ts +46 -42
  337. package/dist/skills/frontend/scripts/perfection/draft-guard/text-nodes.ts +98 -75
  338. package/dist/skills/lsp-setup/scripts/detect-lsp.ts +162 -152
  339. package/dist/skills/lsp-setup/scripts/lsp-server-table.ts +164 -164
  340. package/dist/skills/lsp-setup/scripts/verify-lsp.ts +94 -91
  341. package/dist/skills/programming/SKILL.md +2 -2
  342. package/dist/skills/programming/scripts/go/new-project.ts +68 -68
  343. package/dist/skills/programming/scripts/python/new-project.ts +64 -64
  344. package/dist/skills/programming/scripts/python/new-script.ts +39 -39
  345. package/dist/skills/programming/scripts/rust/check-no-excuse-rules.test.ts +57 -57
  346. package/dist/skills/programming/scripts/rust/new-project.ts +60 -57
  347. package/dist/skills/programming/scripts/scaffolders.test.ts +113 -67
  348. package/dist/skills/programming/scripts/shared/run-tool.ts +7 -7
  349. package/dist/skills/programming/scripts/typescript/check-no-excuse-rules.test.ts +53 -53
  350. package/dist/skills/programming/scripts/typescript/check-no-excuse-rules.ts +96 -36
  351. package/dist/skills/programming/scripts/typescript/check-test-junk-rules.ts +38 -17
  352. package/dist/skills/programming/scripts/typescript/check-test-junk.ts +13 -2
  353. package/dist/skills/programming/scripts/typescript/mutation-proof.test.ts +4 -1
  354. package/dist/skills/programming/scripts/typescript/mutation-proof.ts +16 -4
  355. package/dist/skills/programming/scripts/typescript/new-project.test.ts +78 -92
  356. package/dist/skills/programming/scripts/typescript/new-project.ts +21 -21
  357. package/dist/skills/ultimate-browsing/engine/templates/knip.workspace.jsonc +31 -0
  358. package/dist/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +65 -62
  359. package/dist/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +73 -70
  360. package/dist/skills/ulw-plan/scripts/plan-templates.mjs +30 -30
  361. package/dist/skills/ulw-plan/scripts/scaffold-plan.mjs +131 -123
  362. package/dist/skills/ulw-research/scripts/claim-kinds.mjs +178 -67
  363. package/dist/skills/ulw-research/scripts/claim-kinds.test.ts +239 -168
  364. package/dist/skills/ulw-research/scripts/claim-prefix.test.ts +96 -47
  365. package/dist/skills/ulw-research/scripts/claims-index.mjs +117 -93
  366. package/dist/skills/ulw-research/scripts/claims-index.test.ts +147 -129
  367. package/dist/skills/ulw-research/scripts/cli-support.mjs +73 -73
  368. package/dist/skills/ulw-research/scripts/cli-support.test.ts +85 -74
  369. package/dist/skills/ulw-research/scripts/contracts-validation.test.ts +64 -64
  370. package/dist/skills/ulw-research/scripts/contracts.mjs +604 -174
  371. package/dist/skills/ulw-research/scripts/contracts.test.ts +171 -139
  372. package/dist/skills/ulw-research/scripts/conversion-altered.test.ts +268 -115
  373. package/dist/skills/ulw-research/scripts/conversion-originals.test.ts +355 -230
  374. package/dist/skills/ulw-research/scripts/conversion-probe-classes.test.ts +1319 -283
  375. package/dist/skills/ulw-research/scripts/conversion-probe.mjs +161 -113
  376. package/dist/skills/ulw-research/scripts/conversion-probe.test.ts +211 -173
  377. package/dist/skills/ulw-research/scripts/copy-returns-fidelity-policy.test.ts +201 -125
  378. package/dist/skills/ulw-research/scripts/copy-returns-polish.test.ts +230 -150
  379. package/dist/skills/ulw-research/scripts/copy-returns.test.ts +189 -145
  380. package/dist/skills/ulw-research/scripts/css-hiding.mjs +126 -92
  381. package/dist/skills/ulw-research/scripts/css-lite.mjs +143 -137
  382. package/dist/skills/ulw-research/scripts/css-lite.test.ts +136 -128
  383. package/dist/skills/ulw-research/scripts/delivery-barrier-meaning.test.ts +206 -113
  384. package/dist/skills/ulw-research/scripts/delivery-barrier.test.ts +191 -141
  385. package/dist/skills/ulw-research/scripts/design-spec.mjs +123 -107
  386. package/dist/skills/ulw-research/scripts/design-spec.test.ts +146 -136
  387. package/dist/skills/ulw-research/scripts/entities.mjs +66 -30
  388. package/dist/skills/ulw-research/scripts/entry-guard.mjs +8 -8
  389. package/dist/skills/ulw-research/scripts/fact-commands-fill.mjs +104 -51
  390. package/dist/skills/ulw-research/scripts/fact-commands-meaning.mjs +207 -105
  391. package/dist/skills/ulw-research/scripts/fact-commands-polish.mjs +143 -76
  392. package/dist/skills/ulw-research/scripts/fact-commands-verify.mjs +164 -120
  393. package/dist/skills/ulw-research/scripts/fact-commands.mjs +264 -151
  394. package/dist/skills/ulw-research/scripts/fact-derive-2.test.ts +158 -135
  395. package/dist/skills/ulw-research/scripts/fact-derive.mjs +92 -48
  396. package/dist/skills/ulw-research/scripts/fact-derive.test.ts +224 -167
  397. package/dist/skills/ulw-research/scripts/fact-expr.mjs +90 -78
  398. package/dist/skills/ulw-research/scripts/fact-fill.mjs +215 -127
  399. package/dist/skills/ulw-research/scripts/fact-fill.test.ts +204 -177
  400. package/dist/skills/ulw-research/scripts/fact-ledger-grammar.test.ts +293 -141
  401. package/dist/skills/ulw-research/scripts/fact-ledger-kinds.mjs +305 -131
  402. package/dist/skills/ulw-research/scripts/fact-ledger-kinds.test.ts +173 -108
  403. package/dist/skills/ulw-research/scripts/fact-ledger-legacy.test.ts +195 -134
  404. package/dist/skills/ulw-research/scripts/fact-ledger-schema.mjs +264 -158
  405. package/dist/skills/ulw-research/scripts/fact-ledger-schema.test.ts +29 -29
  406. package/dist/skills/ulw-research/scripts/fact-ledger.mjs +93 -57
  407. package/dist/skills/ulw-research/scripts/fact-ledger.test.ts +243 -221
  408. package/dist/skills/ulw-research/scripts/fact-locate.mjs +204 -147
  409. package/dist/skills/ulw-research/scripts/fact-locate.test.ts +143 -88
  410. package/dist/skills/ulw-research/scripts/fact-pairs.mjs +126 -108
  411. package/dist/skills/ulw-research/scripts/fact-pairs.test.ts +120 -113
  412. package/dist/skills/ulw-research/scripts/fact-recompute.mjs +89 -66
  413. package/dist/skills/ulw-research/scripts/fact-unit-dimensions-2.test.ts +164 -109
  414. package/dist/skills/ulw-research/scripts/fact-unit-dimensions.test.ts +237 -178
  415. package/dist/skills/ulw-research/scripts/fact-unit-rules.test.ts +180 -138
  416. package/dist/skills/ulw-research/scripts/fidelity-binding.mjs +101 -70
  417. package/dist/skills/ulw-research/scripts/fidelity-binding.test.ts +56 -52
  418. package/dist/skills/ulw-research/scripts/fidelity-brief.mjs +95 -89
  419. package/dist/skills/ulw-research/scripts/fidelity-brief.test.ts +167 -160
  420. package/dist/skills/ulw-research/scripts/fidelity-claims.mjs +76 -48
  421. package/dist/skills/ulw-research/scripts/fidelity-csv.mjs +27 -27
  422. package/dist/skills/ulw-research/scripts/fidelity-lexicon.mjs +101 -78
  423. package/dist/skills/ulw-research/scripts/fidelity-lexicon.test.ts +113 -90
  424. package/dist/skills/ulw-research/scripts/fidelity-originals.mjs +124 -77
  425. package/dist/skills/ulw-research/scripts/fidelity-policy.mjs +132 -83
  426. package/dist/skills/ulw-research/scripts/fidelity-records.mjs +179 -117
  427. package/dist/skills/ulw-research/scripts/fidelity-snapshot-readability.mjs +38 -33
  428. package/dist/skills/ulw-research/scripts/fidelity-sources.mjs +92 -54
  429. package/dist/skills/ulw-research/scripts/fidelity-state.mjs +27 -27
  430. package/dist/skills/ulw-research/scripts/fidelity-state.test.ts +32 -32
  431. package/dist/skills/ulw-research/scripts/fidelity-trace.mjs +81 -48
  432. package/dist/skills/ulw-research/scripts/fidelity-trace.test.ts +48 -32
  433. package/dist/skills/ulw-research/scripts/fidelity-value-unit.mjs +207 -104
  434. package/dist/skills/ulw-research/scripts/fidelity-values.mjs +255 -154
  435. package/dist/skills/ulw-research/scripts/fidelity-values.test.ts +283 -229
  436. package/dist/skills/ulw-research/scripts/format-extract-css.mjs +74 -74
  437. package/dist/skills/ulw-research/scripts/format-extract.mjs +161 -134
  438. package/dist/skills/ulw-research/scripts/format-extract.test.ts +207 -204
  439. package/dist/skills/ulw-research/scripts/gates-context.test.ts +47 -42
  440. package/dist/skills/ulw-research/scripts/gates-fidelity.mjs +118 -59
  441. package/dist/skills/ulw-research/scripts/gates-fidelity.test.ts +62 -45
  442. package/dist/skills/ulw-research/scripts/gates-figures.mjs +192 -141
  443. package/dist/skills/ulw-research/scripts/gates-layout.mjs +119 -85
  444. package/dist/skills/ulw-research/scripts/gates-layout.test.ts +250 -187
  445. package/dist/skills/ulw-research/scripts/gates-static-headings.test.ts +13 -10
  446. package/dist/skills/ulw-research/scripts/gates-static.mjs +109 -102
  447. package/dist/skills/ulw-research/scripts/gates-static.test.ts +310 -287
  448. package/dist/skills/ulw-research/scripts/gates-structure.mjs +105 -86
  449. package/dist/skills/ulw-research/scripts/gates-text.mjs +169 -113
  450. package/dist/skills/ulw-research/scripts/glossary-vocabulary.test.ts +35 -35
  451. package/dist/skills/ulw-research/scripts/html-foreign-object.mjs +39 -34
  452. package/dist/skills/ulw-research/scripts/html-lite.mjs +230 -176
  453. package/dist/skills/ulw-research/scripts/html-lite.test.ts +190 -183
  454. package/dist/skills/ulw-research/scripts/html-markup.mjs +150 -128
  455. package/dist/skills/ulw-research/scripts/html-text-map.mjs +125 -96
  456. package/dist/skills/ulw-research/scripts/html-text-map.test.ts +311 -128
  457. package/dist/skills/ulw-research/scripts/layout-probe.mjs +10 -8
  458. package/dist/skills/ulw-research/scripts/layout-probe.test.ts +65 -62
  459. package/dist/skills/ulw-research/scripts/lexicon.mjs +36 -19
  460. package/dist/skills/ulw-research/scripts/lexicon.test.ts +95 -49
  461. package/dist/skills/ulw-research/scripts/markdown-closers.mjs +85 -85
  462. package/dist/skills/ulw-research/scripts/md-lite-boundaries.test.ts +44 -34
  463. package/dist/skills/ulw-research/scripts/md-lite.mjs +133 -125
  464. package/dist/skills/ulw-research/scripts/md-lite.test.ts +289 -233
  465. package/dist/skills/ulw-research/scripts/meaning-check.mjs +154 -123
  466. package/dist/skills/ulw-research/scripts/meaning-check.test.ts +258 -173
  467. package/dist/skills/ulw-research/scripts/number-grammar.mjs +10 -8
  468. package/dist/skills/ulw-research/scripts/number-grammar.test.ts +31 -24
  469. package/dist/skills/ulw-research/scripts/numerals.mjs +181 -137
  470. package/dist/skills/ulw-research/scripts/numerals.test.ts +141 -113
  471. package/dist/skills/ulw-research/scripts/outcome-start.mjs +50 -36
  472. package/dist/skills/ulw-research/scripts/outcome-start.test.ts +89 -75
  473. package/dist/skills/ulw-research/scripts/outcome.mjs +194 -153
  474. package/dist/skills/ulw-research/scripts/outcome.test.ts +270 -264
  475. package/dist/skills/ulw-research/scripts/page-source-locator.test.ts +216 -150
  476. package/dist/skills/ulw-research/scripts/particles-ko.mjs +72 -70
  477. package/dist/skills/ulw-research/scripts/particles-ko.test.ts +66 -66
  478. package/dist/skills/ulw-research/scripts/placeholder.mjs +130 -112
  479. package/dist/skills/ulw-research/scripts/placeholder.test.ts +82 -55
  480. package/dist/skills/ulw-research/scripts/polish-apply.mjs +67 -51
  481. package/dist/skills/ulw-research/scripts/polish-apply.test.ts +397 -321
  482. package/dist/skills/ulw-research/scripts/polish-diff.mjs +10 -5
  483. package/dist/skills/ulw-research/scripts/polish-diff.test.ts +186 -134
  484. package/dist/skills/ulw-research/scripts/polish-markup.test.ts +271 -170
  485. package/dist/skills/ulw-research/scripts/polish-partial.test.ts +60 -34
  486. package/dist/skills/ulw-research/scripts/polish-project.mjs +67 -57
  487. package/dist/skills/ulw-research/scripts/polish-rules.mjs +120 -100
  488. package/dist/skills/ulw-research/scripts/rational.mjs +74 -73
  489. package/dist/skills/ulw-research/scripts/rational.test.ts +35 -35
  490. package/dist/skills/ulw-research/scripts/raw-decode.mjs +74 -74
  491. package/dist/skills/ulw-research/scripts/raw-locator.mjs +32 -24
  492. package/dist/skills/ulw-research/scripts/raw-snapshot.test.ts +166 -113
  493. package/dist/skills/ulw-research/scripts/references-fences.test.ts +14 -12
  494. package/dist/skills/ulw-research/scripts/repair-tracker.mjs +98 -93
  495. package/dist/skills/ulw-research/scripts/repair-tracker.test.ts +220 -214
  496. package/dist/skills/ulw-research/scripts/report-tools-2.test.ts +403 -215
  497. package/dist/skills/ulw-research/scripts/report-tools-3.test.ts +215 -112
  498. package/dist/skills/ulw-research/scripts/report-tools-4.test.ts +258 -116
  499. package/dist/skills/ulw-research/scripts/report-tools-5.test.ts +385 -205
  500. package/dist/skills/ulw-research/scripts/report-tools-commands.mjs +265 -176
  501. package/dist/skills/ulw-research/scripts/report-tools.mjs +65 -62
  502. package/dist/skills/ulw-research/scripts/report-tools.test.ts +295 -170
  503. package/dist/skills/ulw-research/scripts/sentence-split.mjs +63 -43
  504. package/dist/skills/ulw-research/scripts/sentence-split.test.ts +90 -90
  505. package/dist/skills/ulw-research/scripts/snapshot-readability.test.ts +107 -83
  506. package/dist/skills/ulw-research/scripts/source-commands.mjs +199 -125
  507. package/dist/skills/ulw-research/scripts/source-integrity.test.ts +359 -205
  508. package/dist/skills/ulw-research/scripts/source-refresh.mjs +91 -54
  509. package/dist/skills/ulw-research/scripts/source-snapshot.mjs +143 -102
  510. package/dist/skills/ulw-research/scripts/source-snapshot.test.ts +110 -86
  511. package/dist/skills/ulw-research/scripts/source-view.mjs +82 -46
  512. package/dist/skills/ulw-research/scripts/sources-citation.mjs +135 -96
  513. package/dist/skills/ulw-research/scripts/sources-citation.test.ts +180 -156
  514. package/dist/skills/ulw-research/scripts/tests/contracts-support.ts +123 -118
  515. package/dist/skills/ulw-research/scripts/tests/delivery-barrier-session.ts +37 -24
  516. package/dist/skills/ulw-research/scripts/tests/derive-clock.ts +5 -1
  517. package/dist/skills/ulw-research/scripts/tests/fact-derive-support.ts +31 -37
  518. package/dist/skills/ulw-research/scripts/tests/fact-unit-dimensions-support.ts +26 -17
  519. package/dist/skills/ulw-research/scripts/tests/fact-unit-rules-support.ts +474 -186
  520. package/dist/skills/ulw-research/scripts/tests/fidelity-values-support.ts +15 -8
  521. package/dist/skills/ulw-research/scripts/tests/numeral-classes.ts +324 -163
  522. package/dist/skills/ulw-research/scripts/tests/report-tools-support.ts +226 -103
  523. package/dist/skills/ulw-research/scripts/tests/value-mode-support.ts +33 -25
  524. package/dist/skills/ulw-research/scripts/text-normalize.mjs +63 -48
  525. package/dist/skills/ulw-research/scripts/text-normalize.test.ts +57 -57
  526. package/dist/skills/ulw-research/scripts/text-similarity.mjs +15 -15
  527. package/dist/skills/ulw-research/scripts/text-similarity.test.ts +29 -29
  528. package/dist/skills/ulw-research/scripts/unit-algebra.mjs +98 -66
  529. package/dist/skills/ulw-research/scripts/unit-errors.mjs +14 -14
  530. package/dist/skills/ulw-research/scripts/unit-metadata.mjs +30 -14
  531. package/dist/skills/ulw-research/scripts/unit-pairs.mjs +57 -45
  532. package/dist/skills/ulw-research/scripts/unit-precision.mjs +39 -25
  533. package/dist/skills/ulw-research/scripts/unit-rules-shapes.mjs +79 -44
  534. package/dist/skills/ulw-research/scripts/unit-rules.mjs +262 -135
  535. package/dist/skills/ulw-research/scripts/units.mjs +96 -65
  536. package/dist/skills/ulw-research/scripts/units.test.ts +75 -75
  537. package/dist/skills/ulw-research/scripts/value-mode-unit-classes.test.ts +411 -177
  538. package/dist/skills/ulw-research/scripts/value-mode-unit.test.ts +264 -154
  539. package/dist/skills/ulw-research/scripts/value-rules-cli.test.ts +165 -123
  540. package/dist/skills/ulw-research/scripts/value-rules-followups.test.ts +49 -25
  541. package/dist/skills/ulw-research/scripts/value-rules-priority.test.ts +69 -47
  542. package/dist/skills/visual-qa/scripts/ansi.test.ts +32 -32
  543. package/dist/skills/visual-qa/scripts/ansi.ts +3 -6
  544. package/dist/skills/visual-qa/scripts/cli.test.ts +57 -57
  545. package/dist/skills/visual-qa/scripts/cli.ts +52 -52
  546. package/dist/skills/visual-qa/scripts/east-asian-width.test.ts +47 -47
  547. package/dist/skills/visual-qa/scripts/east-asian-width.ts +53 -53
  548. package/dist/skills/visual-qa/scripts/image-diff.test.ts +55 -55
  549. package/dist/skills/visual-qa/scripts/image-diff.ts +86 -86
  550. package/dist/skills/visual-qa/scripts/png-crc.ts +16 -16
  551. package/dist/skills/visual-qa/scripts/png-decode.test.ts +33 -33
  552. package/dist/skills/visual-qa/scripts/png-decode.ts +167 -167
  553. package/dist/skills/visual-qa/scripts/png-synth.ts +36 -40
  554. package/dist/skills/visual-qa/scripts/skill-doc-fields.test.ts +16 -16
  555. package/dist/skills/visual-qa/scripts/tui-grid.test.ts +49 -49
  556. package/dist/skills/visual-qa/scripts/tui-grid.ts +63 -63
  557. package/dist/skills/visual-qa/scripts/types.ts +37 -37
  558. package/dist/skills/visual-qa/scripts/visual-qa.mjs +268 -289
  559. package/dist/tools/background-task/index.d.ts +1 -1
  560. package/dist/tools/glob/constants.d.ts +1 -1
  561. package/dist/tools/hashline-edit/index.d.ts +2 -2
  562. package/dist/tools/index.d.ts +1 -1
  563. package/dist/tools/look-at/look-at-session-runner.d.ts +1 -1
  564. package/dist/tools/task/index.d.ts +1 -1
  565. package/dist/tui.js +267 -171
  566. package/package.json +38 -19
  567. package/packages/lsp-core/src/index.ts +30 -30
  568. package/packages/lsp-core/src/lsp/bun-command-output.ts +69 -69
  569. package/packages/lsp-core/src/lsp/bun-project-checks.test.ts +176 -156
  570. package/packages/lsp-core/src/lsp/bun-project-checks.ts +175 -162
  571. package/packages/lsp-core/src/lsp/cleanup-errors.test.ts +13 -13
  572. package/packages/lsp-core/src/lsp/cleanup-errors.ts +7 -7
  573. package/packages/lsp-core/src/lsp/client-diagnostics-concurrency.integration.test.ts +39 -43
  574. package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +446 -447
  575. package/packages/lsp-core/src/lsp/client-diagnostics-pull-timeout.test.ts +55 -48
  576. package/packages/lsp-core/src/lsp/client-wrapper-outside-cwd.test.ts +59 -59
  577. package/packages/lsp-core/src/lsp/client-wrapper.test.ts +195 -195
  578. package/packages/lsp-core/src/lsp/client-wrapper.ts +229 -229
  579. package/packages/lsp-core/src/lsp/client.ts +374 -374
  580. package/packages/lsp-core/src/lsp/config-loader.ts +200 -200
  581. package/packages/lsp-core/src/lsp/connection.ts +76 -76
  582. package/packages/lsp-core/src/lsp/constants.ts +13 -13
  583. package/packages/lsp-core/src/lsp/controlled-clock-test-support.ts +69 -69
  584. package/packages/lsp-core/src/lsp/directory-diagnostics.test.ts +209 -199
  585. package/packages/lsp-core/src/lsp/directory-diagnostics.ts +171 -168
  586. package/packages/lsp-core/src/lsp/effective-extension.ts +5 -5
  587. package/packages/lsp-core/src/lsp/errors.ts +58 -60
  588. package/packages/lsp-core/src/lsp/fake-bun-test-support.ts +77 -77
  589. package/packages/lsp-core/src/lsp/format-document.test.ts +136 -130
  590. package/packages/lsp-core/src/lsp/format-document.ts +54 -54
  591. package/packages/lsp-core/src/lsp/formatters.ts +108 -108
  592. package/packages/lsp-core/src/lsp/host-js-runtime.test.ts +116 -120
  593. package/packages/lsp-core/src/lsp/host-js-runtime.ts +34 -34
  594. package/packages/lsp-core/src/lsp/infer-extension.ts +50 -50
  595. package/packages/lsp-core/src/lsp/json-rpc-connection-cancellation.test.ts +83 -77
  596. package/packages/lsp-core/src/lsp/json-rpc-connection.ts +341 -340
  597. package/packages/lsp-core/src/lsp/language-mappings.ts +165 -165
  598. package/packages/lsp-core/src/lsp/manager-lifecycle.test.ts +227 -234
  599. package/packages/lsp-core/src/lsp/manager-max-clients.test.ts +133 -133
  600. package/packages/lsp-core/src/lsp/manager.ts +466 -466
  601. package/packages/lsp-core/src/lsp/outside-context-workspace.ts +22 -22
  602. package/packages/lsp-core/src/lsp/process-pipe-errors.test.ts +16 -16
  603. package/packages/lsp-core/src/lsp/process-signal-cleanup.ts +16 -16
  604. package/packages/lsp-core/src/lsp/process.ts +168 -168
  605. package/packages/lsp-core/src/lsp/server-definitions.ts +193 -193
  606. package/packages/lsp-core/src/lsp/server-install-state.ts +33 -33
  607. package/packages/lsp-core/src/lsp/server-installation.test.ts +347 -347
  608. package/packages/lsp-core/src/lsp/server-installation.ts +153 -153
  609. package/packages/lsp-core/src/lsp/server-resolution-local-binary.test.ts +151 -151
  610. package/packages/lsp-core/src/lsp/server-resolution.ts +102 -99
  611. package/packages/lsp-core/src/lsp/startup-failure.ts +1 -1
  612. package/packages/lsp-core/src/lsp/timer-provider.ts +8 -8
  613. package/packages/lsp-core/src/lsp/transport-protocol.ts +24 -24
  614. package/packages/lsp-core/src/lsp/transport-request-timeout.test.ts +56 -52
  615. package/packages/lsp-core/src/lsp/transport.ts +320 -325
  616. package/packages/lsp-core/src/lsp/types.ts +69 -69
  617. package/packages/lsp-core/src/lsp/typescript-server-defaults.test.ts +65 -65
  618. package/packages/lsp-core/src/lsp/utils.test.ts +59 -59
  619. package/packages/lsp-core/src/lsp/utils.ts +28 -28
  620. package/packages/lsp-core/src/lsp/workspace-apply-edit-failure.ts +9 -9
  621. package/packages/lsp-core/src/lsp/workspace-apply-edit-lease.integration.test.ts +203 -204
  622. package/packages/lsp-core/src/lsp/workspace-apply-edit-sync.integration.test.ts +102 -106
  623. package/packages/lsp-core/src/lsp/workspace-apply-edit-test-support.ts +153 -153
  624. package/packages/lsp-core/src/lsp/workspace-apply-edit.integration.test.ts +151 -151
  625. package/packages/lsp-core/src/lsp/workspace-document-state.test.ts +130 -127
  626. package/packages/lsp-core/src/lsp/workspace-document-state.ts +342 -345
  627. package/packages/lsp-core/src/lsp/workspace-edit-adversarial.test.ts +119 -119
  628. package/packages/lsp-core/src/lsp/workspace-edit-commit.test.ts +120 -120
  629. package/packages/lsp-core/src/lsp/workspace-edit-commit.ts +171 -173
  630. package/packages/lsp-core/src/lsp/workspace-edit-contract-evidence.test.ts +49 -48
  631. package/packages/lsp-core/src/lsp/workspace-edit-contract-evidence.ts +18 -20
  632. package/packages/lsp-core/src/lsp/workspace-edit-fingerprint.ts +40 -40
  633. package/packages/lsp-core/src/lsp/workspace-edit-options.test.ts +131 -137
  634. package/packages/lsp-core/src/lsp/workspace-edit-parse-helpers.ts +42 -41
  635. package/packages/lsp-core/src/lsp/workspace-edit-parser.ts +108 -108
  636. package/packages/lsp-core/src/lsp/workspace-edit-path.ts +75 -75
  637. package/packages/lsp-core/src/lsp/workspace-edit-plan-types.ts +46 -47
  638. package/packages/lsp-core/src/lsp/workspace-edit-plan.ts +60 -60
  639. package/packages/lsp-core/src/lsp/workspace-edit-prevalidation.test.ts +161 -161
  640. package/packages/lsp-core/src/lsp/workspace-edit-resource-parser.ts +74 -74
  641. package/packages/lsp-core/src/lsp/workspace-edit-simulation.ts +139 -139
  642. package/packages/lsp-core/src/lsp/workspace-edit-snapshot.ts +45 -42
  643. package/packages/lsp-core/src/lsp/workspace-edit-text.ts +85 -85
  644. package/packages/lsp-core/src/lsp/workspace-edit-types.ts +85 -85
  645. package/packages/lsp-core/src/lsp/workspace-edit.characterization.test.ts +85 -85
  646. package/packages/lsp-core/src/lsp/workspace-edit.ts +38 -38
  647. package/packages/lsp-core/src/lsp/workspace-markers.ts +9 -9
  648. package/packages/lsp-core/src/lsp/workspace-mutation-controller.ts +149 -156
  649. package/packages/lsp-core/src/mcp-protocol-pin.test.ts +42 -34
  650. package/packages/lsp-core/src/mcp.ts +89 -91
  651. package/packages/lsp-core/src/missing-dependency-result.test.ts +118 -118
  652. package/packages/lsp-core/src/missing-dependency-result.ts +66 -66
  653. package/packages/lsp-core/src/post-edit/file-location.ts +29 -29
  654. package/packages/lsp-core/src/post-edit/index.ts +3 -3
  655. package/packages/lsp-core/src/post-edit/not-installed-guidance.ts +18 -18
  656. package/packages/lsp-core/src/post-edit/not-installed.test.ts +198 -200
  657. package/packages/lsp-core/src/post-edit/orchestration.test.ts +161 -153
  658. package/packages/lsp-core/src/post-edit/orchestration.ts +137 -137
  659. package/packages/lsp-core/src/request-context.test.ts +189 -187
  660. package/packages/lsp-core/src/request-context.ts +160 -165
  661. package/packages/lsp-core/src/tool-surface.test.ts +163 -163
  662. package/packages/lsp-core/src/tools/bun-directory-diagnostics.test.ts +109 -87
  663. package/packages/lsp-core/src/tools/bun-directory-diagnostics.ts +68 -60
  664. package/packages/lsp-core/src/tools/definitions.ts +154 -154
  665. package/packages/lsp-core/src/tools/diagnostics.ts +121 -121
  666. package/packages/lsp-core/src/tools/format.test.ts +43 -43
  667. package/packages/lsp-core/src/tools/format.ts +45 -45
  668. package/packages/lsp-core/src/tools/index.ts +11 -11
  669. package/packages/lsp-core/src/tools/install-decision.ts +31 -31
  670. package/packages/lsp-core/src/tools/navigation.ts +77 -78
  671. package/packages/lsp-core/src/tools/parameters.test.ts +42 -42
  672. package/packages/lsp-core/src/tools/parameters.ts +25 -25
  673. package/packages/lsp-core/src/tools/rename.ts +59 -59
  674. package/packages/lsp-core/src/tools/result.ts +2 -2
  675. package/packages/lsp-core/src/tools/runtime.ts +11 -11
  676. package/packages/lsp-core/src/tools/schema.ts +6 -6
  677. package/packages/lsp-core/src/tools/status.ts +25 -25
  678. package/packages/lsp-core/src/tools/symbols.ts +84 -84
  679. package/packages/lsp-core/src/tools/types.ts +82 -82
  680. package/packages/lsp-core/src/tools.ts +1 -1
  681. package/packages/lsp-daemon/dist/cli.js +8 -2
  682. package/packages/lsp-daemon/dist/client.js +8 -2
  683. package/packages/lsp-daemon/dist/index.js +8 -2
  684. package/packages/lsp-tools-mcp/dist/cli.js +8 -2
  685. package/packages/lsp-tools-mcp/dist/mcp.js +8 -2
  686. package/packages/lsp-tools-mcp/dist/tools.js +8 -2
  687. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  688. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +156 -52
  689. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  690. package/packages/omo-codex/plugin/components/bootstrap/knip.workspace.jsonc +40 -0
  691. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  692. package/packages/omo-codex/plugin/components/bootstrap/scripts/build.mjs +21 -21
  693. package/packages/omo-codex/plugin/components/bootstrap/scripts/generate-manifests.mjs +43 -41
  694. package/packages/omo-codex/plugin/components/bootstrap/src/cli.ts +129 -127
  695. package/packages/omo-codex/plugin/components/bootstrap/src/download.ts +163 -158
  696. package/packages/omo-codex/plugin/components/bootstrap/src/environment.ts +226 -209
  697. package/packages/omo-codex/plugin/components/bootstrap/src/hook.ts +73 -77
  698. package/packages/omo-codex/plugin/components/bootstrap/src/provision.ts +99 -99
  699. package/packages/omo-codex/plugin/components/bootstrap/src/setup.ts +240 -237
  700. package/packages/omo-codex/plugin/components/bootstrap/src/worker.ts +227 -212
  701. package/packages/omo-codex/plugin/components/bootstrap/test/download.test.ts +235 -235
  702. package/packages/omo-codex/plugin/components/bootstrap/test/environment.test.ts +352 -346
  703. package/packages/omo-codex/plugin/components/bootstrap/test/provision.test.ts +426 -419
  704. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  705. package/packages/omo-codex/plugin/components/comment-checker/knip.workspace.jsonc +43 -0
  706. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  707. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  708. package/packages/omo-codex/plugin/components/git-bash/knip.workspace.jsonc +23 -0
  709. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  710. package/packages/omo-codex/plugin/components/git-bash/src/cli.ts +25 -25
  711. package/packages/omo-codex/plugin/components/git-bash/src/codex-hook.ts +118 -119
  712. package/packages/omo-codex/plugin/components/git-bash/src/index.ts +9 -9
  713. package/packages/omo-codex/plugin/components/git-bash/test/codex-hook.test.ts +168 -168
  714. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  715. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/knip.workspace.jsonc +38 -0
  716. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  717. package/packages/omo-codex/plugin/components/lcx/skills/lcx-contribute-bug-fix/scripts/create-pr-body.mjs +57 -57
  718. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
  719. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +8 -2
  720. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  721. package/packages/omo-codex/plugin/components/lsp/knip.workspace.jsonc +42 -0
  722. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  723. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  724. package/packages/omo-codex/plugin/components/rules/knip.workspace.jsonc +40 -0
  725. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  726. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  727. package/packages/omo-codex/plugin/components/teammode/knip.workspace.jsonc +31 -0
  728. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  729. package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-guide.mjs +83 -76
  730. package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-state.mjs +357 -322
  731. package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-transport.mjs +22 -22
  732. package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-worktree.mjs +72 -66
  733. package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team.mjs +314 -304
  734. package/packages/omo-codex/plugin/components/teammode/src/cli.ts +5 -5
  735. package/packages/omo-codex/plugin/components/teammode/src/codex-hook.ts +96 -100
  736. package/packages/omo-codex/plugin/components/teammode/test/thread-title-hook.test.ts +151 -151
  737. package/packages/omo-codex/plugin/components/teammode/test/v2-spawn-schema.test.ts +64 -64
  738. package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +11 -10
  739. package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +11 -10
  740. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  741. package/packages/omo-codex/plugin/components/telemetry/knip.workspace.jsonc +38 -0
  742. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  743. package/packages/omo-codex/plugin/components/test-support/package-smoke-fixture.ts +79 -79
  744. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  745. package/packages/omo-codex/plugin/components/ultrawork/knip.workspace.jsonc +33 -0
  746. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  747. package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
  748. package/packages/omo-codex/plugin/components/ulw-execute-continuation/knip.workspace.jsonc +38 -0
  749. package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
  750. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
  751. package/packages/omo-codex/plugin/components/ulw-loop/knip.workspace.jsonc +70 -0
  752. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  753. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  754. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  755. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  756. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  757. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  758. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  759. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  760. package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
  761. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  762. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  763. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  764. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  765. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  766. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  767. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  768. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
  769. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  770. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  771. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  772. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  773. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  774. package/packages/omo-codex/plugin/knip.workspace.jsonc +60 -0
  775. package/packages/omo-codex/plugin/package-lock.json +12 -12
  776. package/packages/omo-codex/plugin/package.json +1 -1
  777. package/packages/omo-codex/plugin/scripts/auto-update-plan.mjs +215 -210
  778. package/packages/omo-codex/plugin/scripts/auto-update-state.d.mts +14 -14
  779. package/packages/omo-codex/plugin/scripts/auto-update-state.mjs +53 -53
  780. package/packages/omo-codex/plugin/scripts/auto-update.mjs +321 -285
  781. package/packages/omo-codex/plugin/scripts/build-bundled-mcp-runtimes.mjs +61 -58
  782. package/packages/omo-codex/plugin/scripts/canonical-ultrawork-directive.mjs +12 -6
  783. package/packages/omo-codex/plugin/scripts/entry-guard.mjs +10 -10
  784. package/packages/omo-codex/plugin/scripts/hook-status-message.mjs +32 -38
  785. package/packages/omo-codex/plugin/scripts/install-flow.mjs +30 -30
  786. package/packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs +75 -73
  787. package/packages/omo-codex/plugin/scripts/migrate-codex-config/catalog.mjs +81 -75
  788. package/packages/omo-codex/plugin/scripts/migrate-codex-config/config-paths.mjs +32 -32
  789. package/packages/omo-codex/plugin/scripts/migrate-codex-config/context7-placeholder-guard.mjs +101 -98
  790. package/packages/omo-codex/plugin/scripts/migrate-codex-config/multi-agent-mode-guard.mjs +48 -48
  791. package/packages/omo-codex/plugin/scripts/migrate-codex-config/multi-agent-v2-guard.mjs +196 -187
  792. package/packages/omo-codex/plugin/scripts/migrate-codex-config/root-settings.mjs +87 -83
  793. package/packages/omo-codex/plugin/scripts/migrate-codex-config/state.mjs +17 -17
  794. package/packages/omo-codex/plugin/scripts/migrate-codex-config/subagent-limit-guard.mjs +26 -19
  795. package/packages/omo-codex/plugin/scripts/migrate-codex-config/toml-section-editor.mjs +372 -371
  796. package/packages/omo-codex/plugin/scripts/migrate-codex-config.mjs +127 -123
  797. package/packages/omo-codex/plugin/scripts/spawn-command.mjs +8 -8
  798. package/packages/omo-codex/plugin/scripts/sync-hook-status-messages.mjs +67 -67
  799. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +207 -198
  800. package/packages/omo-codex/plugin/scripts/sync-version.mjs +65 -65
  801. package/packages/omo-codex/plugin/shared/knip.workspace.jsonc +17 -0
  802. package/packages/omo-codex/plugin/shared/src/config-loader.ts +57 -60
  803. package/packages/omo-codex/plugin/shared/src/config-migration.ts +130 -115
  804. package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +255 -228
  805. package/packages/omo-codex/plugin/skills/ast-grep/references/recipes.md +1 -1
  806. package/packages/omo-codex/plugin/skills/ast-grep/tests/smoke.ps1 +1 -1
  807. package/packages/omo-codex/plugin/skills/ast-grep/tests/smoke.sh +1 -1
  808. package/packages/omo-codex/plugin/skills/browser/runtime/omowright/index.js +16 -16
  809. package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +5 -5
  810. package/packages/omo-codex/plugin/skills/browser/runtime/omowright/page-bundle.js +14 -4
  811. package/packages/omo-codex/plugin/skills/browser/scripts/browser-doctor-report.mjs +36 -9
  812. package/packages/omo-codex/plugin/skills/browser/scripts/browser-doctor.mjs +24 -7
  813. package/packages/omo-codex/plugin/skills/browser/scripts/browser-engine-guard.mjs +2 -1
  814. package/packages/omo-codex/plugin/skills/browser/scripts/browser-install.mjs +40 -8
  815. package/packages/omo-codex/plugin/skills/debugging/references/scripts/dap.mjs +280 -170
  816. package/packages/omo-codex/plugin/skills/debugging/references/scripts/fixture-adapter.mjs +104 -42
  817. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/cli.ts +67 -50
  818. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/config.ts +41 -38
  819. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/core/color.ts +109 -94
  820. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/core/page.ts +43 -42
  821. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/core/shadow.ts +38 -29
  822. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/core/source.ts +25 -20
  823. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/detect.ts +63 -45
  824. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/lint.ts +78 -69
  825. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/render/probe-placement.ts +36 -32
  826. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/render/renderer.ts +14 -13
  827. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/render/webview.ts +53 -50
  828. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/report.ts +20 -18
  829. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rule.ts +21 -21
  830. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/ai-color-palette.ts +144 -63
  831. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/cream-palette.ts +41 -27
  832. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/dark-glow.ts +59 -34
  833. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/design-system-color.ts +37 -28
  834. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/gradient-text.ts +68 -45
  835. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/gray-on-color.ts +34 -25
  836. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/index.ts +9 -2
  837. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/low-contrast.ts +106 -43
  838. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/radial-halo.ts +48 -23
  839. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.ts +49 -26
  840. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/animation-opacity.ts +90 -66
  841. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/color-path.ts +43 -6
  842. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/contrast-pairs.ts +75 -38
  843. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/contrast-role.ts +142 -59
  844. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/glow-forms.ts +93 -44
  845. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/gradient-samples.ts +115 -114
  846. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/gradients.ts +77 -66
  847. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/mockup-roots.ts +178 -48
  848. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/page-ignore.ts +6 -2
  849. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/painted-text.ts +171 -108
  850. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/palette-roles.ts +60 -39
  851. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/placeholder-contrast.ts +36 -16
  852. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/stock-accent.ts +48 -18
  853. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/text-colors.ts +88 -62
  854. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.ts +25 -15
  855. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/broken-image.ts +20 -12
  856. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.ts +63 -39
  857. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/index.ts +9 -2
  858. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.ts +53 -25
  859. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.ts +49 -28
  860. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/repeated-container-text.ts +80 -47
  861. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/script-error.ts +42 -34
  862. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/skipped-heading.ts +199 -75
  863. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/support/numbered-label.ts +122 -71
  864. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/support/page-text.ts +32 -24
  865. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.ts +42 -13
  866. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.ts +49 -41
  867. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.ts +10 -10
  868. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/bounce-easing.ts +87 -68
  869. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/buried-raster.ts +83 -64
  870. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.ts +29 -29
  871. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/design-system-radius.ts +33 -26
  872. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.ts +61 -58
  873. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.ts +25 -23
  874. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.ts +16 -14
  875. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.ts +85 -84
  876. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/index.ts +17 -17
  877. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.ts +79 -64
  878. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/marquee.ts +57 -40
  879. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.ts +34 -34
  880. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.ts +92 -58
  881. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.ts +19 -19
  882. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.ts +59 -53
  883. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/side-tab.ts +15 -12
  884. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/appearance.ts +89 -85
  885. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/assert-cases.ts +17 -15
  886. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/borders.ts +178 -136
  887. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/clip-geometry.ts +155 -145
  888. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/css-candidates.ts +60 -54
  889. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/curve-samples.ts +51 -48
  890. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/gradient-pattern.ts +43 -34
  891. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/keyframes.ts +118 -113
  892. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/labels.ts +74 -67
  893. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/raster-state.ts +80 -42
  894. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/index.ts +6 -6
  895. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.ts +116 -55
  896. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.ts +22 -9
  897. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.ts +113 -52
  898. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/cramped-padding.ts +167 -90
  899. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.ts +82 -41
  900. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.ts +74 -37
  901. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/heading-rhythm.ts +49 -24
  902. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/index.ts +14 -3
  903. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.ts +47 -28
  904. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/nested-cards.ts +66 -31
  905. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/straggler.ts +46 -22
  906. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/cards.ts +157 -82
  907. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/clipping.ts +98 -50
  908. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/declared-mockups.ts +100 -36
  909. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/geometry.ts +66 -43
  910. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/hidden-interface.ts +56 -24
  911. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/layout-cases.ts +23 -8
  912. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/line-breaks.ts +28 -16
  913. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/motion.ts +88 -56
  914. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/padding.ts +106 -68
  915. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/rhythm.ts +204 -128
  916. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/text-occlusion.ts +125 -70
  917. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/text-overflow.ts +111 -59
  918. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.ts +27 -16
  919. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/viewport-reflow.ts +38 -23
  920. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/ai-color-palette.ts +17 -6
  921. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.ts +19 -9
  922. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.ts +31 -13
  923. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/bounce-easing.ts +41 -16
  924. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/broken-image.ts +19 -9
  925. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/codex-grid-background.ts +36 -12
  926. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/dark-glow.ts +28 -14
  927. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/em-dash-overuse.ts +17 -9
  928. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/gradient-text.ts +14 -6
  929. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/gray-on-color.ts +18 -7
  930. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/index.ts +18 -1
  931. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/marketing-buzzword.ts +49 -11
  932. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/marquee.ts +16 -6
  933. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/monotonous-spacing.ts +35 -17
  934. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/overused-font.ts +51 -10
  935. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/radial-halo.ts +16 -8
  936. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/side-tab.ts +88 -47
  937. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/accent-scans.ts +103 -62
  938. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/check-source.ts +6 -2
  939. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/corners.ts +148 -80
  940. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/css-effects.ts +86 -66
  941. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/css-scopes.ts +148 -113
  942. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/image-tags.ts +113 -105
  943. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/js-punctuation.ts +47 -30
  944. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/markup-scope.ts +45 -34
  945. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/source-color.ts +64 -29
  946. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/source-shadow.ts +17 -10
  947. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/source-text.ts +128 -86
  948. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/all-caps-body.ts +23 -9
  949. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/design-system-font-size.ts +27 -17
  950. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/design-system-font.ts +27 -17
  951. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.ts +26 -12
  952. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.ts +41 -19
  953. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/index.ts +14 -3
  954. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/italic-serif-display.ts +67 -16
  955. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/justified-text.ts +47 -25
  956. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/line-length.ts +37 -21
  957. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/oversized-h1.ts +35 -14
  958. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/overused-font.ts +83 -38
  959. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/drawn-enlargement.ts +68 -40
  960. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/fading-text.ts +59 -39
  961. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/flex-runs.ts +13 -8
  962. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/font-family.ts +68 -17
  963. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/painted-text.ts +173 -67
  964. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/svg-size.ts +56 -49
  965. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/text-context.ts +155 -78
  966. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/text-lines.ts +38 -28
  967. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/type-hierarchy.ts +43 -38
  968. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/tight-leading.ts +67 -39
  969. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/tiny-text.ts +34 -15
  970. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.ts +52 -22
  971. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/wide-tracking.ts +37 -19
  972. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/snapshot/collect.ts +154 -145
  973. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/snapshot/style-props.ts +121 -21
  974. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/testing/build-snapshot.ts +140 -65
  975. package/packages/omo-codex/plugin/skills/frontend/scripts/detect/types.ts +81 -76
  976. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/accent-stripes/color.ts +205 -85
  977. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/accent-stripes/css-parse.ts +97 -80
  978. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/accent-stripes/declarations.ts +129 -101
  979. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/accent-stripes/findings.ts +23 -23
  980. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/accent-stripes/gradient.ts +43 -42
  981. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/accent-stripes/lint.ts +75 -60
  982. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/accent-stripes/markup.ts +131 -106
  983. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/accent-stripes/selector.ts +28 -25
  984. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/accent-stripes/tailwind.ts +93 -78
  985. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/check-accent-stripes.ts +22 -22
  986. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/check-draft-guard.ts +24 -24
  987. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/collect-files.ts +49 -36
  988. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/draft-guard/findings.ts +10 -9
  989. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/draft-guard/lint.ts +27 -24
  990. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/draft-guard/rules.ts +46 -42
  991. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/draft-guard/text-nodes.ts +98 -75
  992. package/packages/omo-codex/plugin/skills/lcx-contribute-bug-fix/scripts/create-pr-body.mjs +57 -57
  993. package/packages/omo-codex/plugin/skills/lsp-setup/scripts/detect-lsp.ts +162 -152
  994. package/packages/omo-codex/plugin/skills/lsp-setup/scripts/lsp-server-table.ts +164 -164
  995. package/packages/omo-codex/plugin/skills/lsp-setup/scripts/verify-lsp.ts +94 -91
  996. package/packages/omo-codex/plugin/skills/programming/SKILL.md +2 -2
  997. package/packages/omo-codex/plugin/skills/programming/scripts/go/new-project.ts +68 -68
  998. package/packages/omo-codex/plugin/skills/programming/scripts/python/new-project.ts +64 -64
  999. package/packages/omo-codex/plugin/skills/programming/scripts/python/new-script.ts +39 -39
  1000. package/packages/omo-codex/plugin/skills/programming/scripts/rust/new-project.ts +60 -57
  1001. package/packages/omo-codex/plugin/skills/programming/scripts/shared/run-tool.ts +7 -7
  1002. package/packages/omo-codex/plugin/skills/programming/scripts/typescript/check-no-excuse-rules.ts +96 -36
  1003. package/packages/omo-codex/plugin/skills/programming/scripts/typescript/check-test-junk-rules.ts +38 -17
  1004. package/packages/omo-codex/plugin/skills/programming/scripts/typescript/check-test-junk.ts +13 -2
  1005. package/packages/omo-codex/plugin/skills/programming/scripts/typescript/mutation-proof.ts +16 -4
  1006. package/packages/omo-codex/plugin/skills/programming/scripts/typescript/new-project.ts +21 -21
  1007. package/packages/omo-codex/plugin/skills/teammode/scripts/team-guide.mjs +83 -76
  1008. package/packages/omo-codex/plugin/skills/teammode/scripts/team-state.mjs +357 -322
  1009. package/packages/omo-codex/plugin/skills/teammode/scripts/team-transport.mjs +22 -22
  1010. package/packages/omo-codex/plugin/skills/teammode/scripts/team-worktree.mjs +72 -66
  1011. package/packages/omo-codex/plugin/skills/teammode/scripts/team.mjs +314 -304
  1012. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +65 -62
  1013. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +73 -70
  1014. package/packages/omo-codex/plugin/skills/ulw-research/scripts/claim-kinds.mjs +178 -67
  1015. package/packages/omo-codex/plugin/skills/ulw-research/scripts/claims-index.mjs +117 -93
  1016. package/packages/omo-codex/plugin/skills/ulw-research/scripts/cli-support.mjs +73 -73
  1017. package/packages/omo-codex/plugin/skills/ulw-research/scripts/contracts.mjs +604 -174
  1018. package/packages/omo-codex/plugin/skills/ulw-research/scripts/conversion-probe.mjs +161 -113
  1019. package/packages/omo-codex/plugin/skills/ulw-research/scripts/css-hiding.mjs +126 -92
  1020. package/packages/omo-codex/plugin/skills/ulw-research/scripts/css-lite.mjs +143 -137
  1021. package/packages/omo-codex/plugin/skills/ulw-research/scripts/design-spec.mjs +123 -107
  1022. package/packages/omo-codex/plugin/skills/ulw-research/scripts/entities.mjs +66 -30
  1023. package/packages/omo-codex/plugin/skills/ulw-research/scripts/entry-guard.mjs +8 -8
  1024. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands-fill.mjs +104 -51
  1025. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands-meaning.mjs +207 -105
  1026. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands-polish.mjs +143 -76
  1027. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands-verify.mjs +164 -120
  1028. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands.mjs +264 -151
  1029. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-derive.mjs +92 -48
  1030. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-expr.mjs +90 -78
  1031. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-fill.mjs +215 -127
  1032. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger-kinds.mjs +305 -131
  1033. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger-schema.mjs +264 -158
  1034. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger.mjs +93 -57
  1035. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-locate.mjs +204 -147
  1036. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-pairs.mjs +126 -108
  1037. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-recompute.mjs +89 -66
  1038. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-binding.mjs +101 -70
  1039. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-brief.mjs +95 -89
  1040. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-claims.mjs +76 -48
  1041. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-csv.mjs +27 -27
  1042. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-lexicon.mjs +101 -78
  1043. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-originals.mjs +124 -77
  1044. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-policy.mjs +132 -83
  1045. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-records.mjs +179 -117
  1046. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-snapshot-readability.mjs +38 -33
  1047. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-sources.mjs +92 -54
  1048. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-state.mjs +27 -27
  1049. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-trace.mjs +81 -48
  1050. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-value-unit.mjs +207 -104
  1051. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-values.mjs +255 -154
  1052. package/packages/omo-codex/plugin/skills/ulw-research/scripts/format-extract-css.mjs +74 -74
  1053. package/packages/omo-codex/plugin/skills/ulw-research/scripts/format-extract.mjs +161 -134
  1054. package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-fidelity.mjs +118 -59
  1055. package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-figures.mjs +192 -141
  1056. package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-layout.mjs +119 -85
  1057. package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-static.mjs +109 -102
  1058. package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-structure.mjs +105 -86
  1059. package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-text.mjs +169 -113
  1060. package/packages/omo-codex/plugin/skills/ulw-research/scripts/html-foreign-object.mjs +39 -34
  1061. package/packages/omo-codex/plugin/skills/ulw-research/scripts/html-lite.mjs +230 -176
  1062. package/packages/omo-codex/plugin/skills/ulw-research/scripts/html-markup.mjs +150 -128
  1063. package/packages/omo-codex/plugin/skills/ulw-research/scripts/html-text-map.mjs +125 -96
  1064. package/packages/omo-codex/plugin/skills/ulw-research/scripts/layout-probe.mjs +10 -8
  1065. package/packages/omo-codex/plugin/skills/ulw-research/scripts/lexicon.mjs +36 -19
  1066. package/packages/omo-codex/plugin/skills/ulw-research/scripts/markdown-closers.mjs +85 -85
  1067. package/packages/omo-codex/plugin/skills/ulw-research/scripts/md-lite.mjs +133 -125
  1068. package/packages/omo-codex/plugin/skills/ulw-research/scripts/meaning-check.mjs +154 -123
  1069. package/packages/omo-codex/plugin/skills/ulw-research/scripts/number-grammar.mjs +10 -8
  1070. package/packages/omo-codex/plugin/skills/ulw-research/scripts/numerals.mjs +181 -137
  1071. package/packages/omo-codex/plugin/skills/ulw-research/scripts/outcome-start.mjs +50 -36
  1072. package/packages/omo-codex/plugin/skills/ulw-research/scripts/outcome.mjs +194 -153
  1073. package/packages/omo-codex/plugin/skills/ulw-research/scripts/particles-ko.mjs +72 -70
  1074. package/packages/omo-codex/plugin/skills/ulw-research/scripts/placeholder.mjs +130 -112
  1075. package/packages/omo-codex/plugin/skills/ulw-research/scripts/polish-apply.mjs +67 -51
  1076. package/packages/omo-codex/plugin/skills/ulw-research/scripts/polish-diff.mjs +10 -5
  1077. package/packages/omo-codex/plugin/skills/ulw-research/scripts/polish-project.mjs +67 -57
  1078. package/packages/omo-codex/plugin/skills/ulw-research/scripts/polish-rules.mjs +120 -100
  1079. package/packages/omo-codex/plugin/skills/ulw-research/scripts/rational.mjs +74 -73
  1080. package/packages/omo-codex/plugin/skills/ulw-research/scripts/raw-decode.mjs +74 -74
  1081. package/packages/omo-codex/plugin/skills/ulw-research/scripts/raw-locator.mjs +32 -24
  1082. package/packages/omo-codex/plugin/skills/ulw-research/scripts/repair-tracker.mjs +98 -93
  1083. package/packages/omo-codex/plugin/skills/ulw-research/scripts/report-tools-commands.mjs +265 -176
  1084. package/packages/omo-codex/plugin/skills/ulw-research/scripts/report-tools.mjs +65 -62
  1085. package/packages/omo-codex/plugin/skills/ulw-research/scripts/sentence-split.mjs +63 -43
  1086. package/packages/omo-codex/plugin/skills/ulw-research/scripts/source-commands.mjs +199 -125
  1087. package/packages/omo-codex/plugin/skills/ulw-research/scripts/source-refresh.mjs +91 -54
  1088. package/packages/omo-codex/plugin/skills/ulw-research/scripts/source-snapshot.mjs +143 -102
  1089. package/packages/omo-codex/plugin/skills/ulw-research/scripts/source-view.mjs +82 -46
  1090. package/packages/omo-codex/plugin/skills/ulw-research/scripts/sources-citation.mjs +135 -96
  1091. package/packages/omo-codex/plugin/skills/ulw-research/scripts/text-normalize.mjs +63 -48
  1092. package/packages/omo-codex/plugin/skills/ulw-research/scripts/text-similarity.mjs +15 -15
  1093. package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-algebra.mjs +98 -66
  1094. package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-errors.mjs +14 -14
  1095. package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-metadata.mjs +30 -14
  1096. package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-pairs.mjs +57 -45
  1097. package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-precision.mjs +39 -25
  1098. package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-rules-shapes.mjs +79 -44
  1099. package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-rules.mjs +262 -135
  1100. package/packages/omo-codex/plugin/skills/ulw-research/scripts/units.mjs +96 -65
  1101. package/packages/omo-codex/plugin/skills/visual-qa/scripts/ansi.ts +3 -6
  1102. package/packages/omo-codex/plugin/skills/visual-qa/scripts/cli.ts +52 -52
  1103. package/packages/omo-codex/plugin/skills/visual-qa/scripts/east-asian-width.ts +53 -53
  1104. package/packages/omo-codex/plugin/skills/visual-qa/scripts/image-diff.ts +86 -86
  1105. package/packages/omo-codex/plugin/skills/visual-qa/scripts/png-crc.ts +16 -16
  1106. package/packages/omo-codex/plugin/skills/visual-qa/scripts/png-decode.ts +167 -167
  1107. package/packages/omo-codex/plugin/skills/visual-qa/scripts/png-synth.ts +36 -40
  1108. package/packages/omo-codex/plugin/skills/visual-qa/scripts/tui-grid.ts +63 -63
  1109. package/packages/omo-codex/plugin/skills/visual-qa/scripts/types.ts +37 -37
  1110. package/packages/omo-codex/plugin/skills/visual-qa/scripts/visual-qa.mjs +268 -289
  1111. package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +110 -90
  1112. package/packages/omo-codex/plugin/test/aggregate-build.test.mjs +36 -36
  1113. package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +229 -222
  1114. package/packages/omo-codex/plugin/test/aggregate-manifest.test.mjs +66 -66
  1115. package/packages/omo-codex/plugin/test/aggregate-mcp.test.mjs +57 -58
  1116. package/packages/omo-codex/plugin/test/aggregate-model-catalog.test.mjs +54 -54
  1117. package/packages/omo-codex/plugin/test/aggregate-plugin-fixture.mjs +219 -201
  1118. package/packages/omo-codex/plugin/test/aggregate.test.mjs +69 -61
  1119. package/packages/omo-codex/plugin/test/auto-update-release-notes.test.mjs +97 -99
  1120. package/packages/omo-codex/plugin/test/auto-update-restart-notice.test.mjs +250 -231
  1121. package/packages/omo-codex/plugin/test/auto-update-state-persistence.test.mjs +28 -28
  1122. package/packages/omo-codex/plugin/test/auto-update.test.mjs +685 -617
  1123. package/packages/omo-codex/plugin/test/bootstrap-binlinks.test.mjs +261 -250
  1124. package/packages/omo-codex/plugin/test/bootstrap-default-role.test.mjs +68 -57
  1125. package/packages/omo-codex/plugin/test/bootstrap-hooks.test.mjs +189 -178
  1126. package/packages/omo-codex/plugin/test/bootstrap-orchestration.test.mjs +356 -342
  1127. package/packages/omo-codex/plugin/test/bootstrap-ps-guard.test.mjs +151 -131
  1128. package/packages/omo-codex/plugin/test/bootstrap-setup.test.mjs +249 -240
  1129. package/packages/omo-codex/plugin/test/canonical-ultrawork-directive.test.mjs +43 -43
  1130. package/packages/omo-codex/plugin/test/component-bin-names.test.mjs +51 -51
  1131. package/packages/omo-codex/plugin/test/component-bundled-cli.test.mjs +338 -344
  1132. package/packages/omo-codex/plugin/test/component-hook-contract-cases.mjs +324 -318
  1133. package/packages/omo-codex/plugin/test/display-metadata.test.mjs +64 -64
  1134. package/packages/omo-codex/plugin/test/hook-status-message.test.mjs +195 -190
  1135. package/packages/omo-codex/plugin/test/index.js +8 -8
  1136. package/packages/omo-codex/plugin/test/install-time-build-runtime.test.mjs +35 -32
  1137. package/packages/omo-codex/plugin/test/lcx-bug-skills.test.mjs +14 -14
  1138. package/packages/omo-codex/plugin/test/lcx-contribute-bug-fix-template.test.mjs +79 -72
  1139. package/packages/omo-codex/plugin/test/lsp-prebuild-layouts.test.mjs +125 -125
  1140. package/packages/omo-codex/plugin/test/materialize-shared-upstreams.test.mjs +144 -113
  1141. package/packages/omo-codex/plugin/test/mcp-research-servers.test.mjs +17 -17
  1142. package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +1062 -1076
  1143. package/packages/omo-codex/plugin/test/multi-agent-v2-regression.test.mjs +68 -62
  1144. package/packages/omo-codex/plugin/test/node-install-surface.test.mjs +28 -24
  1145. package/packages/omo-codex/plugin/test/payload-equivalence.test.mjs +103 -103
  1146. package/packages/omo-codex/plugin/test/scaffold-plan.test.mjs +169 -172
  1147. package/packages/omo-codex/plugin/test/subagent-limit-migration.test.mjs +434 -414
  1148. package/packages/omo-codex/plugin/test/sync-hook-status-messages.test.mjs +129 -129
  1149. package/packages/omo-codex/plugin/test/sync-skills-codex-compatibility.test.mjs +174 -162
  1150. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +110 -109
  1151. package/packages/omo-codex/plugin/test/sync-skills.test.mjs +268 -235
  1152. package/packages/omo-codex/plugin/test/sync-version.test.mjs +54 -43
  1153. package/packages/omo-codex/plugin/test/teammode-archive-ambiguity.test.mjs +58 -57
  1154. package/packages/omo-codex/plugin/test/teammode-communication.test.mjs +64 -34
  1155. package/packages/omo-codex/plugin/test/teammode-safety-fixture.mjs +87 -87
  1156. package/packages/omo-codex/plugin/test/teammode-safety.test.mjs +308 -293
  1157. package/packages/omo-codex/plugin/test/teammode-thread-links.test.mjs +76 -76
  1158. package/packages/omo-codex/plugin/test/teammode-thread-title.test.mjs +235 -156
  1159. package/packages/omo-codex/plugin/test/teammode-transport.test.mjs +650 -297
  1160. package/packages/omo-codex/plugin/test/teammode-worktree.test.mjs +279 -197
  1161. package/packages/omo-codex/plugin/test/ultrawork-skill-pointer.test.mjs +42 -45
  1162. package/packages/omo-codex/plugin/test/ulw-plan-review-state-contract.test.mjs +280 -266
  1163. package/packages/omo-codex/plugin/test/ulw-plan-skill-contract.test.mjs +16 -16
  1164. package/packages/omo-codex/plugin/test/ulw-research-skill-contract.test.mjs +21 -21
  1165. package/packages/omo-codex/plugin/test/windows-console-hide.test.mjs +91 -86
  1166. package/packages/omo-codex/scripts/check-model-catalog-parity.mjs +46 -32
  1167. package/packages/omo-codex/scripts/install-agent-links.test.mjs +334 -333
  1168. package/packages/omo-codex/scripts/install-bin-links.test.mjs +447 -395
  1169. package/packages/omo-codex/scripts/install-cache-copy.test.mjs +248 -230
  1170. package/packages/omo-codex/scripts/install-cli-args.test.mjs +166 -166
  1171. package/packages/omo-codex/scripts/install-config-autonomous-features.test.mjs +136 -136
  1172. package/packages/omo-codex/scripts/install-config-autonomous.test.mjs +44 -44
  1173. package/packages/omo-codex/scripts/install-config-git-bash.test.mjs +78 -78
  1174. package/packages/omo-codex/scripts/install-config-preservation.test.mjs +38 -38
  1175. package/packages/omo-codex/scripts/install-config-reasoning.test.mjs +145 -142
  1176. package/packages/omo-codex/scripts/install-config.test.mjs +505 -532
  1177. package/packages/omo-codex/scripts/install-delegated-command.test.mjs +225 -221
  1178. package/packages/omo-codex/scripts/install-dist/install-local.mjs +187 -83
  1179. package/packages/omo-codex/scripts/install-generated-bundle.test.mjs +184 -178
  1180. package/packages/omo-codex/scripts/install-git-bash-mcp-env.test.mjs +68 -68
  1181. package/packages/omo-codex/scripts/install-hook-targets.test.mjs +152 -152
  1182. package/packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs +92 -85
  1183. package/packages/omo-codex/scripts/install-local-bun-global-update.test.mjs +48 -39
  1184. package/packages/omo-codex/scripts/install-local-entrypoint.test.mjs +327 -305
  1185. package/packages/omo-codex/scripts/install-local-git-bash-preflight.test.mjs +153 -137
  1186. package/packages/omo-codex/scripts/install-local.mjs +61 -61
  1187. package/packages/omo-codex/scripts/install-local.test.mjs +185 -185
  1188. package/packages/omo-codex/scripts/install-marketplace-cache.test.mjs +166 -152
  1189. package/packages/omo-codex/scripts/install-mcp-context7-runtime.test.mjs +65 -65
  1190. package/packages/omo-codex/scripts/install-mcp-runtime.test.mjs +185 -181
  1191. package/packages/omo-codex/scripts/install-packaged-local.test.mjs +65 -62
  1192. package/packages/omo-codex/scripts/install-project-local-cleanup.test.mjs +292 -324
  1193. package/packages/omo-codex/scripts/install-test-fixtures.mjs +46 -46
  1194. package/packages/shared-skills/index.mjs +5 -7
  1195. package/packages/shared-skills/skill-source-filter.d.ts +7 -7
  1196. package/packages/shared-skills/skill-source-filter.mjs +42 -26
  1197. package/packages/shared-skills/skills/ast-grep/references/recipes.md +1 -1
  1198. package/packages/shared-skills/skills/ast-grep/tests/smoke.ps1 +1 -1
  1199. package/packages/shared-skills/skills/ast-grep/tests/smoke.sh +1 -1
  1200. package/packages/shared-skills/skills/browser/runtime/omowright/index.js +16 -16
  1201. package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +5 -5
  1202. package/packages/shared-skills/skills/browser/runtime/omowright/page-bundle.js +14 -4
  1203. package/packages/shared-skills/skills/browser/scripts/browser-doctor-report.mjs +36 -9
  1204. package/packages/shared-skills/skills/browser/scripts/browser-doctor.mjs +24 -7
  1205. package/packages/shared-skills/skills/browser/scripts/browser-engine-guard.mjs +2 -1
  1206. package/packages/shared-skills/skills/browser/scripts/browser-install.mjs +40 -8
  1207. package/packages/shared-skills/skills/debugging/references/scripts/dap.mjs +280 -170
  1208. package/packages/shared-skills/skills/debugging/references/scripts/dap.test.ts +83 -55
  1209. package/packages/shared-skills/skills/debugging/references/scripts/fixture-adapter.mjs +104 -42
  1210. package/packages/shared-skills/skills/frontend/scripts/detect/cli.ts +67 -50
  1211. package/packages/shared-skills/skills/frontend/scripts/detect/config.test.ts +23 -19
  1212. package/packages/shared-skills/skills/frontend/scripts/detect/config.ts +41 -38
  1213. package/packages/shared-skills/skills/frontend/scripts/detect/core/color.test.ts +19 -19
  1214. package/packages/shared-skills/skills/frontend/scripts/detect/core/color.ts +109 -94
  1215. package/packages/shared-skills/skills/frontend/scripts/detect/core/page.ts +43 -42
  1216. package/packages/shared-skills/skills/frontend/scripts/detect/core/shadow.ts +38 -29
  1217. package/packages/shared-skills/skills/frontend/scripts/detect/core/source.ts +25 -20
  1218. package/packages/shared-skills/skills/frontend/scripts/detect/detect.ts +63 -45
  1219. package/packages/shared-skills/skills/frontend/scripts/detect/lint.test.ts +24 -16
  1220. package/packages/shared-skills/skills/frontend/scripts/detect/lint.ts +78 -69
  1221. package/packages/shared-skills/skills/frontend/scripts/detect/render/probe-placement.test.ts +35 -11
  1222. package/packages/shared-skills/skills/frontend/scripts/detect/render/probe-placement.ts +36 -32
  1223. package/packages/shared-skills/skills/frontend/scripts/detect/render/renderer.ts +14 -13
  1224. package/packages/shared-skills/skills/frontend/scripts/detect/render/webview.ts +53 -50
  1225. package/packages/shared-skills/skills/frontend/scripts/detect/report.ts +20 -18
  1226. package/packages/shared-skills/skills/frontend/scripts/detect/rule.ts +21 -21
  1227. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/ai-color-palette.test.ts +84 -53
  1228. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/ai-color-palette.ts +144 -63
  1229. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/cream-palette.test.ts +27 -15
  1230. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/cream-palette.ts +41 -27
  1231. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/dark-glow.test.ts +57 -32
  1232. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/dark-glow.ts +59 -34
  1233. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/design-system-color.test.ts +25 -17
  1234. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/design-system-color.ts +37 -28
  1235. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/gradient-text.test.ts +63 -15
  1236. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/gradient-text.ts +68 -45
  1237. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/gray-on-color.test.ts +49 -24
  1238. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/gray-on-color.ts +34 -25
  1239. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/index.ts +9 -2
  1240. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/low-contrast.test.ts +419 -161
  1241. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/low-contrast.ts +106 -43
  1242. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/placeholder-contrast.test.ts +136 -45
  1243. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/radial-halo.test.ts +42 -28
  1244. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/radial-halo.ts +48 -23
  1245. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.test.ts +45 -18
  1246. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.ts +49 -26
  1247. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/animation-opacity.ts +90 -66
  1248. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/color-path.ts +43 -6
  1249. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/contrast-pairs.ts +75 -38
  1250. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/contrast-role.ts +142 -59
  1251. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/glow-forms.ts +93 -44
  1252. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/gradient-samples.ts +115 -114
  1253. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/gradients.ts +77 -66
  1254. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/mockup-roots.ts +178 -48
  1255. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/page-ignore.ts +6 -2
  1256. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/painted-text.ts +171 -108
  1257. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/palette-roles.ts +60 -39
  1258. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/placeholder-contrast.ts +36 -16
  1259. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/stock-accent.ts +48 -18
  1260. package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/text-colors.ts +88 -62
  1261. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.test.ts +17 -9
  1262. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.ts +25 -15
  1263. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/broken-image.test.ts +22 -16
  1264. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/broken-image.ts +20 -12
  1265. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.test.ts +38 -24
  1266. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.ts +63 -39
  1267. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/index.ts +9 -2
  1268. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.test.ts +14 -9
  1269. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.ts +53 -25
  1270. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.test.ts +69 -37
  1271. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.ts +49 -28
  1272. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/repeated-container-text.test.ts +52 -26
  1273. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/repeated-container-text.ts +80 -47
  1274. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/script-error.test.ts +71 -30
  1275. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/script-error.ts +42 -34
  1276. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/skipped-heading.test.ts +64 -34
  1277. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/skipped-heading.ts +199 -75
  1278. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/support/numbered-label.ts +122 -71
  1279. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/support/page-text.ts +32 -24
  1280. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.test.ts +25 -8
  1281. package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.ts +42 -13
  1282. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.test.ts +40 -31
  1283. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.ts +49 -41
  1284. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.test.ts +30 -25
  1285. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.ts +10 -10
  1286. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/bounce-easing.test.ts +80 -53
  1287. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/bounce-easing.ts +87 -68
  1288. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/buried-raster.test.ts +122 -79
  1289. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/buried-raster.ts +83 -64
  1290. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.test.ts +20 -20
  1291. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.ts +29 -29
  1292. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/design-system-radius.test.ts +27 -27
  1293. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/design-system-radius.ts +33 -26
  1294. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.test.ts +58 -45
  1295. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.ts +61 -58
  1296. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.test.ts +50 -33
  1297. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.ts +25 -23
  1298. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.test.ts +74 -60
  1299. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.ts +16 -14
  1300. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.test.ts +75 -54
  1301. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.ts +85 -84
  1302. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/index.ts +17 -17
  1303. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.test.ts +128 -104
  1304. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.ts +79 -64
  1305. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/marquee.test.ts +67 -50
  1306. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/marquee.ts +57 -40
  1307. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.test.ts +67 -54
  1308. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.ts +34 -34
  1309. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.test.ts +56 -44
  1310. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.ts +92 -58
  1311. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.test.ts +18 -18
  1312. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.ts +19 -19
  1313. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.test.ts +57 -44
  1314. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.ts +59 -53
  1315. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/side-tab.test.ts +112 -72
  1316. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/side-tab.ts +15 -12
  1317. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/appearance.ts +89 -85
  1318. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/assert-cases.ts +17 -15
  1319. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/borders.ts +178 -136
  1320. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/clip-geometry.ts +155 -145
  1321. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/css-candidates.ts +60 -54
  1322. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/curve-samples.ts +51 -48
  1323. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/gradient-pattern.ts +43 -34
  1324. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/keyframes.ts +118 -113
  1325. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/labels.ts +74 -67
  1326. package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/raster-state.ts +80 -42
  1327. package/packages/shared-skills/skills/frontend/scripts/detect/rules/index.ts +6 -6
  1328. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.test.ts +71 -37
  1329. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.ts +116 -55
  1330. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.test.ts +41 -18
  1331. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.ts +22 -9
  1332. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.test.ts +57 -29
  1333. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.ts +113 -52
  1334. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/cramped-padding.test.ts +120 -31
  1335. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/cramped-padding.ts +167 -90
  1336. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.test.ts +43 -24
  1337. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.ts +82 -41
  1338. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.test.ts +34 -12
  1339. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.ts +74 -37
  1340. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/heading-rhythm.test.ts +85 -39
  1341. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/heading-rhythm.ts +49 -24
  1342. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/index.ts +14 -3
  1343. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.test.ts +24 -7
  1344. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.ts +47 -28
  1345. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/nested-cards.test.ts +79 -31
  1346. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/nested-cards.ts +66 -31
  1347. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/straggler.test.ts +33 -14
  1348. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/straggler.ts +46 -22
  1349. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/cards.ts +157 -82
  1350. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/clipping.ts +98 -50
  1351. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/declared-mockups.ts +100 -36
  1352. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/geometry.ts +66 -43
  1353. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/hidden-interface.ts +56 -24
  1354. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/layout-cases.ts +23 -8
  1355. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/line-breaks.ts +28 -16
  1356. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/motion.ts +88 -56
  1357. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/padding.ts +106 -68
  1358. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/rhythm.ts +204 -128
  1359. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/text-occlusion.test.ts +50 -17
  1360. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/text-occlusion.ts +125 -70
  1361. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/text-overflow.test.ts +96 -42
  1362. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/text-overflow.ts +111 -59
  1363. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.test.ts +15 -9
  1364. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.ts +27 -16
  1365. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/viewport-reflow.test.ts +34 -21
  1366. package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/viewport-reflow.ts +38 -23
  1367. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/ai-color-palette.test.ts +6 -6
  1368. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/ai-color-palette.ts +17 -6
  1369. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.test.ts +5 -5
  1370. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.ts +19 -9
  1371. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.test.ts +7 -7
  1372. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.ts +31 -13
  1373. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/bounce-easing.test.ts +20 -9
  1374. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/bounce-easing.ts +41 -16
  1375. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/broken-image.test.ts +17 -17
  1376. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/broken-image.ts +19 -9
  1377. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/codex-grid-background.test.ts +7 -4
  1378. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/codex-grid-background.ts +36 -12
  1379. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/dark-glow.test.ts +8 -8
  1380. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/dark-glow.ts +28 -14
  1381. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/em-dash-overuse.test.ts +6 -6
  1382. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/em-dash-overuse.ts +17 -9
  1383. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/gradient-text.test.ts +5 -5
  1384. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/gradient-text.ts +14 -6
  1385. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/gray-on-color.test.ts +13 -13
  1386. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/gray-on-color.ts +18 -7
  1387. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/index.ts +18 -1
  1388. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/marketing-buzzword.test.ts +5 -5
  1389. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/marketing-buzzword.ts +49 -11
  1390. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/marquee.test.ts +11 -5
  1391. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/marquee.ts +16 -6
  1392. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/monotonous-spacing.test.ts +6 -6
  1393. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/monotonous-spacing.ts +35 -17
  1394. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/overused-font.test.ts +18 -11
  1395. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/overused-font.ts +51 -10
  1396. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/radial-halo.test.ts +12 -9
  1397. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/radial-halo.ts +16 -8
  1398. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/side-tab.test.ts +34 -22
  1399. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/side-tab.ts +88 -47
  1400. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/accent-scans.ts +103 -62
  1401. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/check-source.ts +6 -2
  1402. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/corners.ts +148 -80
  1403. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/css-effects.ts +86 -66
  1404. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/css-scopes.ts +148 -113
  1405. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/image-tags.ts +113 -105
  1406. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/js-punctuation.ts +47 -30
  1407. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/markup-scope.ts +45 -34
  1408. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/source-color.ts +64 -29
  1409. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/source-shadow.ts +17 -10
  1410. package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/source-text.ts +128 -86
  1411. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/all-caps-body.test.ts +24 -15
  1412. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/all-caps-body.ts +23 -9
  1413. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/design-system-font-size.test.ts +16 -12
  1414. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/design-system-font-size.ts +27 -17
  1415. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/design-system-font.test.ts +17 -13
  1416. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/design-system-font.ts +27 -17
  1417. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.test.ts +50 -14
  1418. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.ts +26 -12
  1419. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.test.ts +44 -17
  1420. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.ts +41 -19
  1421. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/index.ts +14 -3
  1422. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/italic-serif-display.test.ts +39 -15
  1423. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/italic-serif-display.ts +67 -16
  1424. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/justified-text.test.ts +39 -22
  1425. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/justified-text.ts +47 -25
  1426. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/line-length.test.ts +65 -29
  1427. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/line-length.ts +37 -21
  1428. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/oversized-h1.test.ts +27 -17
  1429. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/oversized-h1.ts +35 -14
  1430. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/overused-font.test.ts +25 -18
  1431. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/overused-font.ts +83 -38
  1432. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/drawn-enlargement.ts +68 -40
  1433. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/fading-text.ts +59 -39
  1434. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/flex-runs.ts +13 -8
  1435. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/font-family.ts +68 -17
  1436. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/painted-text.test.ts +110 -46
  1437. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/painted-text.ts +173 -67
  1438. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/svg-size.ts +56 -49
  1439. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/text-context.ts +155 -78
  1440. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/text-lines.ts +38 -28
  1441. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/type-hierarchy.ts +43 -38
  1442. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/tight-leading.test.ts +109 -37
  1443. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/tight-leading.ts +67 -39
  1444. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/tiny-text.test.ts +80 -45
  1445. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/tiny-text.ts +34 -15
  1446. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.test.ts +158 -81
  1447. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.ts +52 -22
  1448. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/wide-tracking.test.ts +29 -17
  1449. package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/wide-tracking.ts +37 -19
  1450. package/packages/shared-skills/skills/frontend/scripts/detect/snapshot/collect.ts +154 -145
  1451. package/packages/shared-skills/skills/frontend/scripts/detect/snapshot/style-props.ts +121 -21
  1452. package/packages/shared-skills/skills/frontend/scripts/detect/testing/build-snapshot.ts +140 -65
  1453. package/packages/shared-skills/skills/frontend/scripts/detect/types.ts +81 -76
  1454. package/packages/shared-skills/skills/frontend/scripts/perfection/accent-stripes/color.ts +205 -85
  1455. package/packages/shared-skills/skills/frontend/scripts/perfection/accent-stripes/css-parse.ts +97 -80
  1456. package/packages/shared-skills/skills/frontend/scripts/perfection/accent-stripes/declarations.ts +129 -101
  1457. package/packages/shared-skills/skills/frontend/scripts/perfection/accent-stripes/findings.ts +23 -23
  1458. package/packages/shared-skills/skills/frontend/scripts/perfection/accent-stripes/gradient.ts +43 -42
  1459. package/packages/shared-skills/skills/frontend/scripts/perfection/accent-stripes/lint.ts +75 -60
  1460. package/packages/shared-skills/skills/frontend/scripts/perfection/accent-stripes/markup.ts +131 -106
  1461. package/packages/shared-skills/skills/frontend/scripts/perfection/accent-stripes/selector.ts +28 -25
  1462. package/packages/shared-skills/skills/frontend/scripts/perfection/accent-stripes/tailwind.ts +93 -78
  1463. package/packages/shared-skills/skills/frontend/scripts/perfection/check-accent-stripes.test.ts +111 -62
  1464. package/packages/shared-skills/skills/frontend/scripts/perfection/check-accent-stripes.ts +22 -22
  1465. package/packages/shared-skills/skills/frontend/scripts/perfection/check-draft-guard.test.ts +89 -65
  1466. package/packages/shared-skills/skills/frontend/scripts/perfection/check-draft-guard.ts +24 -24
  1467. package/packages/shared-skills/skills/frontend/scripts/perfection/collect-files.test.ts +36 -33
  1468. package/packages/shared-skills/skills/frontend/scripts/perfection/collect-files.ts +49 -36
  1469. package/packages/shared-skills/skills/frontend/scripts/perfection/draft-guard/findings.ts +10 -9
  1470. package/packages/shared-skills/skills/frontend/scripts/perfection/draft-guard/lint.ts +27 -24
  1471. package/packages/shared-skills/skills/frontend/scripts/perfection/draft-guard/rules.ts +46 -42
  1472. package/packages/shared-skills/skills/frontend/scripts/perfection/draft-guard/text-nodes.ts +98 -75
  1473. package/packages/shared-skills/skills/lsp-setup/scripts/detect-lsp.ts +162 -152
  1474. package/packages/shared-skills/skills/lsp-setup/scripts/lsp-server-table.ts +164 -164
  1475. package/packages/shared-skills/skills/lsp-setup/scripts/verify-lsp.ts +94 -91
  1476. package/packages/shared-skills/skills/programming/SKILL.md +2 -2
  1477. package/packages/shared-skills/skills/programming/scripts/go/new-project.ts +68 -68
  1478. package/packages/shared-skills/skills/programming/scripts/python/new-project.ts +64 -64
  1479. package/packages/shared-skills/skills/programming/scripts/python/new-script.ts +39 -39
  1480. package/packages/shared-skills/skills/programming/scripts/rust/check-no-excuse-rules.test.ts +57 -57
  1481. package/packages/shared-skills/skills/programming/scripts/rust/new-project.ts +60 -57
  1482. package/packages/shared-skills/skills/programming/scripts/scaffolders.test.ts +113 -67
  1483. package/packages/shared-skills/skills/programming/scripts/shared/run-tool.ts +7 -7
  1484. package/packages/shared-skills/skills/programming/scripts/typescript/check-no-excuse-rules.test.ts +53 -53
  1485. package/packages/shared-skills/skills/programming/scripts/typescript/check-no-excuse-rules.ts +96 -36
  1486. package/packages/shared-skills/skills/programming/scripts/typescript/check-test-junk-rules.ts +38 -17
  1487. package/packages/shared-skills/skills/programming/scripts/typescript/check-test-junk.ts +13 -2
  1488. package/packages/shared-skills/skills/programming/scripts/typescript/mutation-proof.test.ts +4 -1
  1489. package/packages/shared-skills/skills/programming/scripts/typescript/mutation-proof.ts +16 -4
  1490. package/packages/shared-skills/skills/programming/scripts/typescript/new-project.test.ts +78 -92
  1491. package/packages/shared-skills/skills/programming/scripts/typescript/new-project.ts +21 -21
  1492. package/packages/shared-skills/skills/ultimate-browsing/engine/templates/knip.workspace.jsonc +31 -0
  1493. package/packages/shared-skills/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +65 -62
  1494. package/packages/shared-skills/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +73 -70
  1495. package/packages/shared-skills/skills/ulw-plan/scripts/plan-templates.mjs +30 -30
  1496. package/packages/shared-skills/skills/ulw-plan/scripts/scaffold-plan.mjs +131 -123
  1497. package/packages/shared-skills/skills/ulw-research/scripts/claim-kinds.mjs +178 -67
  1498. package/packages/shared-skills/skills/ulw-research/scripts/claim-kinds.test.ts +239 -168
  1499. package/packages/shared-skills/skills/ulw-research/scripts/claim-prefix.test.ts +96 -47
  1500. package/packages/shared-skills/skills/ulw-research/scripts/claims-index.mjs +117 -93
  1501. package/packages/shared-skills/skills/ulw-research/scripts/claims-index.test.ts +147 -129
  1502. package/packages/shared-skills/skills/ulw-research/scripts/cli-support.mjs +73 -73
  1503. package/packages/shared-skills/skills/ulw-research/scripts/cli-support.test.ts +85 -74
  1504. package/packages/shared-skills/skills/ulw-research/scripts/contracts-validation.test.ts +64 -64
  1505. package/packages/shared-skills/skills/ulw-research/scripts/contracts.mjs +604 -174
  1506. package/packages/shared-skills/skills/ulw-research/scripts/contracts.test.ts +171 -139
  1507. package/packages/shared-skills/skills/ulw-research/scripts/conversion-altered.test.ts +268 -115
  1508. package/packages/shared-skills/skills/ulw-research/scripts/conversion-originals.test.ts +355 -230
  1509. package/packages/shared-skills/skills/ulw-research/scripts/conversion-probe-classes.test.ts +1319 -283
  1510. package/packages/shared-skills/skills/ulw-research/scripts/conversion-probe.mjs +161 -113
  1511. package/packages/shared-skills/skills/ulw-research/scripts/conversion-probe.test.ts +211 -173
  1512. package/packages/shared-skills/skills/ulw-research/scripts/copy-returns-fidelity-policy.test.ts +201 -125
  1513. package/packages/shared-skills/skills/ulw-research/scripts/copy-returns-polish.test.ts +230 -150
  1514. package/packages/shared-skills/skills/ulw-research/scripts/copy-returns.test.ts +189 -145
  1515. package/packages/shared-skills/skills/ulw-research/scripts/css-hiding.mjs +126 -92
  1516. package/packages/shared-skills/skills/ulw-research/scripts/css-lite.mjs +143 -137
  1517. package/packages/shared-skills/skills/ulw-research/scripts/css-lite.test.ts +136 -128
  1518. package/packages/shared-skills/skills/ulw-research/scripts/delivery-barrier-meaning.test.ts +206 -113
  1519. package/packages/shared-skills/skills/ulw-research/scripts/delivery-barrier.test.ts +191 -141
  1520. package/packages/shared-skills/skills/ulw-research/scripts/design-spec.mjs +123 -107
  1521. package/packages/shared-skills/skills/ulw-research/scripts/design-spec.test.ts +146 -136
  1522. package/packages/shared-skills/skills/ulw-research/scripts/entities.mjs +66 -30
  1523. package/packages/shared-skills/skills/ulw-research/scripts/entry-guard.mjs +8 -8
  1524. package/packages/shared-skills/skills/ulw-research/scripts/fact-commands-fill.mjs +104 -51
  1525. package/packages/shared-skills/skills/ulw-research/scripts/fact-commands-meaning.mjs +207 -105
  1526. package/packages/shared-skills/skills/ulw-research/scripts/fact-commands-polish.mjs +143 -76
  1527. package/packages/shared-skills/skills/ulw-research/scripts/fact-commands-verify.mjs +164 -120
  1528. package/packages/shared-skills/skills/ulw-research/scripts/fact-commands.mjs +264 -151
  1529. package/packages/shared-skills/skills/ulw-research/scripts/fact-derive-2.test.ts +158 -135
  1530. package/packages/shared-skills/skills/ulw-research/scripts/fact-derive.mjs +92 -48
  1531. package/packages/shared-skills/skills/ulw-research/scripts/fact-derive.test.ts +224 -167
  1532. package/packages/shared-skills/skills/ulw-research/scripts/fact-expr.mjs +90 -78
  1533. package/packages/shared-skills/skills/ulw-research/scripts/fact-fill.mjs +215 -127
  1534. package/packages/shared-skills/skills/ulw-research/scripts/fact-fill.test.ts +204 -177
  1535. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-grammar.test.ts +293 -141
  1536. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-kinds.mjs +305 -131
  1537. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-kinds.test.ts +173 -108
  1538. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-legacy.test.ts +195 -134
  1539. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-schema.mjs +264 -158
  1540. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-schema.test.ts +29 -29
  1541. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger.mjs +93 -57
  1542. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger.test.ts +243 -221
  1543. package/packages/shared-skills/skills/ulw-research/scripts/fact-locate.mjs +204 -147
  1544. package/packages/shared-skills/skills/ulw-research/scripts/fact-locate.test.ts +143 -88
  1545. package/packages/shared-skills/skills/ulw-research/scripts/fact-pairs.mjs +126 -108
  1546. package/packages/shared-skills/skills/ulw-research/scripts/fact-pairs.test.ts +120 -113
  1547. package/packages/shared-skills/skills/ulw-research/scripts/fact-recompute.mjs +89 -66
  1548. package/packages/shared-skills/skills/ulw-research/scripts/fact-unit-dimensions-2.test.ts +164 -109
  1549. package/packages/shared-skills/skills/ulw-research/scripts/fact-unit-dimensions.test.ts +237 -178
  1550. package/packages/shared-skills/skills/ulw-research/scripts/fact-unit-rules.test.ts +180 -138
  1551. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-binding.mjs +101 -70
  1552. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-binding.test.ts +56 -52
  1553. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-brief.mjs +95 -89
  1554. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-brief.test.ts +167 -160
  1555. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-claims.mjs +76 -48
  1556. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-csv.mjs +27 -27
  1557. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-lexicon.mjs +101 -78
  1558. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-lexicon.test.ts +113 -90
  1559. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-originals.mjs +124 -77
  1560. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-policy.mjs +132 -83
  1561. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-records.mjs +179 -117
  1562. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-snapshot-readability.mjs +38 -33
  1563. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-sources.mjs +92 -54
  1564. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-state.mjs +27 -27
  1565. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-state.test.ts +32 -32
  1566. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-trace.mjs +81 -48
  1567. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-trace.test.ts +48 -32
  1568. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-value-unit.mjs +207 -104
  1569. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-values.mjs +255 -154
  1570. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-values.test.ts +283 -229
  1571. package/packages/shared-skills/skills/ulw-research/scripts/format-extract-css.mjs +74 -74
  1572. package/packages/shared-skills/skills/ulw-research/scripts/format-extract.mjs +161 -134
  1573. package/packages/shared-skills/skills/ulw-research/scripts/format-extract.test.ts +207 -204
  1574. package/packages/shared-skills/skills/ulw-research/scripts/gates-context.test.ts +47 -42
  1575. package/packages/shared-skills/skills/ulw-research/scripts/gates-fidelity.mjs +118 -59
  1576. package/packages/shared-skills/skills/ulw-research/scripts/gates-fidelity.test.ts +62 -45
  1577. package/packages/shared-skills/skills/ulw-research/scripts/gates-figures.mjs +192 -141
  1578. package/packages/shared-skills/skills/ulw-research/scripts/gates-layout.mjs +119 -85
  1579. package/packages/shared-skills/skills/ulw-research/scripts/gates-layout.test.ts +250 -187
  1580. package/packages/shared-skills/skills/ulw-research/scripts/gates-static-headings.test.ts +13 -10
  1581. package/packages/shared-skills/skills/ulw-research/scripts/gates-static.mjs +109 -102
  1582. package/packages/shared-skills/skills/ulw-research/scripts/gates-static.test.ts +310 -287
  1583. package/packages/shared-skills/skills/ulw-research/scripts/gates-structure.mjs +105 -86
  1584. package/packages/shared-skills/skills/ulw-research/scripts/gates-text.mjs +169 -113
  1585. package/packages/shared-skills/skills/ulw-research/scripts/glossary-vocabulary.test.ts +35 -35
  1586. package/packages/shared-skills/skills/ulw-research/scripts/html-foreign-object.mjs +39 -34
  1587. package/packages/shared-skills/skills/ulw-research/scripts/html-lite.mjs +230 -176
  1588. package/packages/shared-skills/skills/ulw-research/scripts/html-lite.test.ts +190 -183
  1589. package/packages/shared-skills/skills/ulw-research/scripts/html-markup.mjs +150 -128
  1590. package/packages/shared-skills/skills/ulw-research/scripts/html-text-map.mjs +125 -96
  1591. package/packages/shared-skills/skills/ulw-research/scripts/html-text-map.test.ts +311 -128
  1592. package/packages/shared-skills/skills/ulw-research/scripts/layout-probe.mjs +10 -8
  1593. package/packages/shared-skills/skills/ulw-research/scripts/layout-probe.test.ts +65 -62
  1594. package/packages/shared-skills/skills/ulw-research/scripts/lexicon.mjs +36 -19
  1595. package/packages/shared-skills/skills/ulw-research/scripts/lexicon.test.ts +95 -49
  1596. package/packages/shared-skills/skills/ulw-research/scripts/markdown-closers.mjs +85 -85
  1597. package/packages/shared-skills/skills/ulw-research/scripts/md-lite-boundaries.test.ts +44 -34
  1598. package/packages/shared-skills/skills/ulw-research/scripts/md-lite.mjs +133 -125
  1599. package/packages/shared-skills/skills/ulw-research/scripts/md-lite.test.ts +289 -233
  1600. package/packages/shared-skills/skills/ulw-research/scripts/meaning-check.mjs +154 -123
  1601. package/packages/shared-skills/skills/ulw-research/scripts/meaning-check.test.ts +258 -173
  1602. package/packages/shared-skills/skills/ulw-research/scripts/number-grammar.mjs +10 -8
  1603. package/packages/shared-skills/skills/ulw-research/scripts/number-grammar.test.ts +31 -24
  1604. package/packages/shared-skills/skills/ulw-research/scripts/numerals.mjs +181 -137
  1605. package/packages/shared-skills/skills/ulw-research/scripts/numerals.test.ts +141 -113
  1606. package/packages/shared-skills/skills/ulw-research/scripts/outcome-start.mjs +50 -36
  1607. package/packages/shared-skills/skills/ulw-research/scripts/outcome-start.test.ts +89 -75
  1608. package/packages/shared-skills/skills/ulw-research/scripts/outcome.mjs +194 -153
  1609. package/packages/shared-skills/skills/ulw-research/scripts/outcome.test.ts +270 -264
  1610. package/packages/shared-skills/skills/ulw-research/scripts/page-source-locator.test.ts +216 -150
  1611. package/packages/shared-skills/skills/ulw-research/scripts/particles-ko.mjs +72 -70
  1612. package/packages/shared-skills/skills/ulw-research/scripts/particles-ko.test.ts +66 -66
  1613. package/packages/shared-skills/skills/ulw-research/scripts/placeholder.mjs +130 -112
  1614. package/packages/shared-skills/skills/ulw-research/scripts/placeholder.test.ts +82 -55
  1615. package/packages/shared-skills/skills/ulw-research/scripts/polish-apply.mjs +67 -51
  1616. package/packages/shared-skills/skills/ulw-research/scripts/polish-apply.test.ts +397 -321
  1617. package/packages/shared-skills/skills/ulw-research/scripts/polish-diff.mjs +10 -5
  1618. package/packages/shared-skills/skills/ulw-research/scripts/polish-diff.test.ts +186 -134
  1619. package/packages/shared-skills/skills/ulw-research/scripts/polish-markup.test.ts +271 -170
  1620. package/packages/shared-skills/skills/ulw-research/scripts/polish-partial.test.ts +60 -34
  1621. package/packages/shared-skills/skills/ulw-research/scripts/polish-project.mjs +67 -57
  1622. package/packages/shared-skills/skills/ulw-research/scripts/polish-rules.mjs +120 -100
  1623. package/packages/shared-skills/skills/ulw-research/scripts/rational.mjs +74 -73
  1624. package/packages/shared-skills/skills/ulw-research/scripts/rational.test.ts +35 -35
  1625. package/packages/shared-skills/skills/ulw-research/scripts/raw-decode.mjs +74 -74
  1626. package/packages/shared-skills/skills/ulw-research/scripts/raw-locator.mjs +32 -24
  1627. package/packages/shared-skills/skills/ulw-research/scripts/raw-snapshot.test.ts +166 -113
  1628. package/packages/shared-skills/skills/ulw-research/scripts/references-fences.test.ts +14 -12
  1629. package/packages/shared-skills/skills/ulw-research/scripts/repair-tracker.mjs +98 -93
  1630. package/packages/shared-skills/skills/ulw-research/scripts/repair-tracker.test.ts +220 -214
  1631. package/packages/shared-skills/skills/ulw-research/scripts/report-tools-2.test.ts +403 -215
  1632. package/packages/shared-skills/skills/ulw-research/scripts/report-tools-3.test.ts +215 -112
  1633. package/packages/shared-skills/skills/ulw-research/scripts/report-tools-4.test.ts +258 -116
  1634. package/packages/shared-skills/skills/ulw-research/scripts/report-tools-5.test.ts +385 -205
  1635. package/packages/shared-skills/skills/ulw-research/scripts/report-tools-commands.mjs +265 -176
  1636. package/packages/shared-skills/skills/ulw-research/scripts/report-tools.mjs +65 -62
  1637. package/packages/shared-skills/skills/ulw-research/scripts/report-tools.test.ts +295 -170
  1638. package/packages/shared-skills/skills/ulw-research/scripts/sentence-split.mjs +63 -43
  1639. package/packages/shared-skills/skills/ulw-research/scripts/sentence-split.test.ts +90 -90
  1640. package/packages/shared-skills/skills/ulw-research/scripts/snapshot-readability.test.ts +107 -83
  1641. package/packages/shared-skills/skills/ulw-research/scripts/source-commands.mjs +199 -125
  1642. package/packages/shared-skills/skills/ulw-research/scripts/source-integrity.test.ts +359 -205
  1643. package/packages/shared-skills/skills/ulw-research/scripts/source-refresh.mjs +91 -54
  1644. package/packages/shared-skills/skills/ulw-research/scripts/source-snapshot.mjs +143 -102
  1645. package/packages/shared-skills/skills/ulw-research/scripts/source-snapshot.test.ts +110 -86
  1646. package/packages/shared-skills/skills/ulw-research/scripts/source-view.mjs +82 -46
  1647. package/packages/shared-skills/skills/ulw-research/scripts/sources-citation.mjs +135 -96
  1648. package/packages/shared-skills/skills/ulw-research/scripts/sources-citation.test.ts +180 -156
  1649. package/packages/shared-skills/skills/ulw-research/scripts/tests/contracts-support.ts +123 -118
  1650. package/packages/shared-skills/skills/ulw-research/scripts/tests/delivery-barrier-session.ts +37 -24
  1651. package/packages/shared-skills/skills/ulw-research/scripts/tests/derive-clock.ts +5 -1
  1652. package/packages/shared-skills/skills/ulw-research/scripts/tests/fact-derive-support.ts +31 -37
  1653. package/packages/shared-skills/skills/ulw-research/scripts/tests/fact-unit-dimensions-support.ts +26 -17
  1654. package/packages/shared-skills/skills/ulw-research/scripts/tests/fact-unit-rules-support.ts +474 -186
  1655. package/packages/shared-skills/skills/ulw-research/scripts/tests/fidelity-values-support.ts +15 -8
  1656. package/packages/shared-skills/skills/ulw-research/scripts/tests/numeral-classes.ts +324 -163
  1657. package/packages/shared-skills/skills/ulw-research/scripts/tests/report-tools-support.ts +226 -103
  1658. package/packages/shared-skills/skills/ulw-research/scripts/tests/value-mode-support.ts +33 -25
  1659. package/packages/shared-skills/skills/ulw-research/scripts/text-normalize.mjs +63 -48
  1660. package/packages/shared-skills/skills/ulw-research/scripts/text-normalize.test.ts +57 -57
  1661. package/packages/shared-skills/skills/ulw-research/scripts/text-similarity.mjs +15 -15
  1662. package/packages/shared-skills/skills/ulw-research/scripts/text-similarity.test.ts +29 -29
  1663. package/packages/shared-skills/skills/ulw-research/scripts/unit-algebra.mjs +98 -66
  1664. package/packages/shared-skills/skills/ulw-research/scripts/unit-errors.mjs +14 -14
  1665. package/packages/shared-skills/skills/ulw-research/scripts/unit-metadata.mjs +30 -14
  1666. package/packages/shared-skills/skills/ulw-research/scripts/unit-pairs.mjs +57 -45
  1667. package/packages/shared-skills/skills/ulw-research/scripts/unit-precision.mjs +39 -25
  1668. package/packages/shared-skills/skills/ulw-research/scripts/unit-rules-shapes.mjs +79 -44
  1669. package/packages/shared-skills/skills/ulw-research/scripts/unit-rules.mjs +262 -135
  1670. package/packages/shared-skills/skills/ulw-research/scripts/units.mjs +96 -65
  1671. package/packages/shared-skills/skills/ulw-research/scripts/units.test.ts +75 -75
  1672. package/packages/shared-skills/skills/ulw-research/scripts/value-mode-unit-classes.test.ts +411 -177
  1673. package/packages/shared-skills/skills/ulw-research/scripts/value-mode-unit.test.ts +264 -154
  1674. package/packages/shared-skills/skills/ulw-research/scripts/value-rules-cli.test.ts +165 -123
  1675. package/packages/shared-skills/skills/ulw-research/scripts/value-rules-followups.test.ts +49 -25
  1676. package/packages/shared-skills/skills/ulw-research/scripts/value-rules-priority.test.ts +69 -47
  1677. package/packages/shared-skills/skills/visual-qa/scripts/ansi.test.ts +32 -32
  1678. package/packages/shared-skills/skills/visual-qa/scripts/ansi.ts +3 -6
  1679. package/packages/shared-skills/skills/visual-qa/scripts/cli.test.ts +57 -57
  1680. package/packages/shared-skills/skills/visual-qa/scripts/cli.ts +52 -52
  1681. package/packages/shared-skills/skills/visual-qa/scripts/east-asian-width.test.ts +47 -47
  1682. package/packages/shared-skills/skills/visual-qa/scripts/east-asian-width.ts +53 -53
  1683. package/packages/shared-skills/skills/visual-qa/scripts/image-diff.test.ts +55 -55
  1684. package/packages/shared-skills/skills/visual-qa/scripts/image-diff.ts +86 -86
  1685. package/packages/shared-skills/skills/visual-qa/scripts/png-crc.ts +16 -16
  1686. package/packages/shared-skills/skills/visual-qa/scripts/png-decode.test.ts +33 -33
  1687. package/packages/shared-skills/skills/visual-qa/scripts/png-decode.ts +167 -167
  1688. package/packages/shared-skills/skills/visual-qa/scripts/png-synth.ts +36 -40
  1689. package/packages/shared-skills/skills/visual-qa/scripts/skill-doc-fields.test.ts +16 -16
  1690. package/packages/shared-skills/skills/visual-qa/scripts/tui-grid.test.ts +49 -49
  1691. package/packages/shared-skills/skills/visual-qa/scripts/tui-grid.ts +63 -63
  1692. package/packages/shared-skills/skills/visual-qa/scripts/types.ts +37 -37
  1693. package/packages/shared-skills/skills/visual-qa/scripts/visual-qa.mjs +268 -289
  1694. package/postinstall.mjs +76 -80
  1695. package/script/qa/strip-ansi.mjs +3 -3
  1696. package/script/qa/web-terminal-redaction.mjs +8 -8
  1697. package/script/qa/web-terminal-visual-qa.mjs +149 -94
  1698. package/script/qa/xterm-live-terminal.mjs +136 -93
@@ -11,120 +11,469 @@ export const SEVERITIES = Object.freeze(["blocker", "major", "minor"])
11
11
 
12
12
  /** Defect counts per severity, then total. */
13
13
  export function countDefects(defects) {
14
- const counts = Object.fromEntries(SEVERITIES.map((severity) => [severity, 0]))
15
- for (const defect of defects) counts[defect.severity] += 1
16
- return { ...counts, total: defects.length }
14
+ const counts = Object.fromEntries(SEVERITIES.map((severity) => [severity, 0]))
15
+ for (const defect of defects) counts[defect.severity] += 1
16
+ return { ...counts, total: defects.length }
17
17
  }
18
18
 
19
19
  function deepFreeze(value) {
20
- if (value === null || typeof value !== "object") return value
21
- for (const key of Object.keys(value)) deepFreeze(value[key])
22
- return Object.freeze(value)
20
+ if (value === null || typeof value !== "object") return value
21
+ for (const key of Object.keys(value)) deepFreeze(value[key])
22
+ return Object.freeze(value)
23
23
  }
24
24
 
25
25
  /** code -> { severity, integrity, hint }. integrity = blocks delivery even on repair exhaustion. */
26
26
  export const DEFECT_CODES = deepFreeze({
27
- korean_no_keep_all: { severity: "major", integrity: false, hint: 'Add "word-break: keep-all; overflow-wrap: anywhere" to the body or the slide text container.' },
28
- palette_off_token: { severity: "minor", integrity: false, hint: "Replace the literal color with a design-spec token (var(--...)) or add the color to the spec palette." },
29
- emoji_in_prose: { severity: "major", integrity: false, hint: "Remove the emoji; use an inline SVG icon or plain text." },
30
- em_dash_in_prose: { severity: "major", integrity: false, hint: "Rewrite the sentence with a comma, colon, or period instead of an em dash." },
31
- en_dash_in_prose: { severity: "minor", integrity: false, hint: "Use a hyphen for compounds; keep the en dash only between numbers." },
32
- heading_too_long: { severity: "minor", integrity: false, hint: "Shorten the heading to one line (26 Korean characters or 12 English words)." },
33
- heading_generic: { severity: "minor", integrity: false, hint: "Make the heading carry the section's claim instead of a generic label." },
34
- unsourced_number: { severity: "major", integrity: false, hint: "Tag the number MEASURED / ASSUMED / DERIVED or cite its source in the same paragraph; under Sources only citation-field numbers and names (a hash, #12, GPT-4, Q3, 10-Q) are exempt, so quote a reference title that carries a code or a figure, or wrap it in <cite>: an unquoted one is checked, and 10-K / 8-K stay numerals because K is a multiplier. A slashed N/M reads as a month/day, so a fraction or a score (2/3, 7/12) under Sources is not checked (#11386): write it as a percent or tag it." },
35
- chart_without_figure: { severity: "major", integrity: false, hint: "Wrap the image or chart in a figure container with a caption." },
36
- chart_svg_no_text: { severity: "major", integrity: false, hint: "Give the chart a title, axis labels, units, and value labels as SVG text." },
37
- chart_svg_missing_labels: { severity: "minor", integrity: false, hint: "Add the missing title, axis ticks, or unit label to the chart." },
38
- report_without_visual: { severity: "major", integrity: false, hint: "Add at least one captioned visual of the findings: a chart from the data table, a rendered Mermaid diagram, or a figure image (references/report-visualization.md)." },
39
- image_missing_alt: { severity: "minor", integrity: false, hint: "Give the image an alt attribute that states what it shows, not its file name; mark a purely decorative image alt=\"\" with role=\"presentation\"." },
40
- korean_serif_font: { severity: "major", integrity: false, hint: "Use a gothic (sans) Korean family; serif and brush families are banned by the design spec." },
41
- section_without_citation: { severity: "major", integrity: false, hint: "Cite at least one source inside this section or merge it into a cited one." },
42
- missing_closing_section: { severity: "blocker", integrity: true, hint: "Add the closing section that explains how the report was made (method, sources, gates)." },
43
- missing_citation_section: { severity: "blocker", integrity: true, hint: "Add a sources or references section, or [S<n>] definition lines." },
44
- broken_asset_reference: { severity: "blocker", integrity: true, hint: "Re-render or restore the missing asset file before delivery." },
45
- missing_required_section: { severity: "blocker", integrity: true, hint: "Add the section the brief requires (matched by --require-section)." },
46
- missing_promised_deliverable: { severity: "blocker", integrity: true, hint: "Produce the promised deliverable or record it as blocked_capability or skipped with a reason." },
47
- layout_overflow: { severity: "major", integrity: false, hint: "Constrain the element to its container (max-width: 100%, overflow-wrap: anywhere, or a narrower measure)." },
48
- layout_text_clipped: { severity: "major", integrity: false, hint: "Remove the overflow: hidden clip or give the text room to wrap." },
49
- layout_scroll_container: { severity: "minor", integrity: false, hint: "Scrolling content prints clipped; make the content fit or wrap the table in a scroll wrapper only for HTML deliverables." },
50
- layout_image_distorted: { severity: "major", integrity: false, hint: "Preserve the image aspect ratio (object-fit: contain inside a fixed container)." },
51
- layout_sibling_overlap: { severity: "major", integrity: false, hint: "Separate the overlapping elements (margins, grid, or a slide split)." },
52
- unresolved_placeholder: { severity: "blocker", integrity: true, hint: "Register the fact with fact add or remove the sentence; a placeholder is never filled with a guess." },
53
- value_mismatch: { severity: "blocker", integrity: true, hint: "Re-run fact fill; never edit a filled value by hand." },
54
- unit_mismatch: { severity: "blocker", integrity: true, hint: "Re-run fact fill, or derive a converted row with fact derive --op convert." },
55
- quote_not_verbatim: { severity: "blocker", integrity: true, hint: "Re-insert the quote through its {{Q<n>}} placeholder; after a second failure the sentence is replaced by the quote." },
56
- claim_status_invalid: { severity: "blocker", integrity: true, hint: "The claim id is unknown, refuted, unresolved, or not in verified-claims; move the sentence to Gaps or Contradictions, or remove it." },
57
- incompatible_operands: { severity: "blocker", integrity: true, hint: "The operands differ in unit, population, period, or basis for this operation; fix the rows or declare the operation that fits." },
58
- pointer_label_mismatch: { severity: "blocker", integrity: true, hint: "The placeholder's label is not the row's label; check the id, then the label." },
59
- quote_anchor_unresolved: { severity: "blocker", integrity: true, hint: "A from or to anchor is missing or occurs more than once in the quote; pick unique anchor words." },
60
- unit_duplicated: { severity: "blocker", integrity: true, hint: "The unit after the placeholder repeats the row's unit; use :value or remove the unit." },
61
- conversion_altered_number: { severity: "blocker", integrity: true, hint: "The source conversion altered this number (sources/S<n>/conversion.json lists it); snapshot a verified text of the source over it with `source snapshot --id S<n> --text <verified.txt> --replace` (refused while an active row cites S<n>; then retract those rows or use a new id), then re-add the fact." },
62
- polish_diff_fail: { severity: "blocker", integrity: true, hint: "The polish pass changed numbers, tickers, table rows, claim ids, markup, or hidden content; revert to the pre-polish artifact and apply the language fixes only." },
63
- fidelity_interview_incomplete: { severity: "blocker", integrity: true, hint: "A fidelity field is pending or missing in brief.md; answer the open question or record its default, then rerun." },
64
- derived_not_allowed: { severity: "blocker", integrity: true, hint: "The brief allows no derived or assumed numbers; cite a source row directly or change the brief with the requester." },
65
- source_outside_floor: { severity: "blocker", integrity: true, hint: "The row's source is outside the source floor the brief records; use a source the brief allows or remove the fact." },
66
- brief_changed: { severity: "blocker", integrity: true, hint: "The edition's fill map was not written under the current ## Fidelity block (it changed after fill, or the map predates the binding); re-run fact fill, then fact verify." },
67
- snapshot_hash_mismatch: { severity: "blocker", integrity: true, hint: "The source snapshot changed after it was pinned or cannot be read; restore it, or run source refresh to re-anchor its rows." },
68
- snapshot_not_raw: { severity: "blocker", integrity: true, hint: "Measured rows need the original bytes: snapshot the source with --url, --html, or --raw <bytes> --text <extraction>; converted-only sources support warned quotations only." },
69
- chart_value_untraceable: { severity: "blocker", integrity: true, hint: "A chart value, tick, or data file does not match its ledger-backed data source; re-render the chart from the exported data." },
70
- quote_unbound: { severity: "blocker", integrity: true, hint: "A direct quotation has no ledger quote row; register it with fact quote and insert it through its placeholder." },
71
- edition_unverified: { severity: "blocker", integrity: true, hint: "The delivered file has no matching fact verify record; run fact verify on that edition and record it with --verified-by." },
72
- untraceable_number: { severity: "major", integrity: false, hint: "Replace the typed number with a {{F<n>}} placeholder backed by a ledger row, or register it as assumed with a rationale." },
73
- unsupported_verification: { severity: "major", integrity: false, hint: "A sentence marked verified (data-claim-kind=\"verified\") cites a row that is not recorded command output; cite the recorded output row or drop the verified mark." },
74
- claim_kind_mismatch: { severity: "major", integrity: false, hint: "An element marked with a claim kind (data-claim-kind) cites a row that kind does not accept, or the kind is unknown; cite a row of that kind or fix the mark (references/fidelity-claim-kinds.md)." },
75
- conflicting_readings: { severity: "major", integrity: false, hint: "Two ledger rows with different periods or qualifiers are cited as one fact; split the sentence or retire one row." },
76
- hedge_dropped: { severity: "major", integrity: false, hint: "Restore the qualifier the source uses (estimated, about, not yet)." },
77
- direction_flipped: { severity: "major", integrity: false, hint: "The source states the opposite direction; rewrite from the quote." },
78
- causality_added: { severity: "major", integrity: false, hint: "The source states no cause; state the correlation or quote the source." },
79
- qualifier_dropped: { severity: "major", integrity: false, hint: "The source bounds this value (up to, at least, about); restore the qualifier or use :q." },
80
- unbound_sentence: { severity: "major", integrity: false, hint: "Bind the sentence to a fact, a quote, a citation, or a claim-graph node with data-claim." },
81
- meaning_drift_confirmed: { severity: "major", integrity: false, hint: "Two independent readers found the same drift; rewrite from the quote or dispute with a reason." },
82
- meaning_unverified: { severity: "major", integrity: false, hint: "No meaning reader judged this pair, or no strong reader judged a force_strong pair; run the missing reader on pairs.json and rerun fact meaning-check." },
83
- polish_edit_rejected: { severity: "major", integrity: false, hint: "The edit changed a number, a hedge, a qualifier, a link, or a claim id, or contained <, > or &; re-propose the language fix only, narrowed to the words around any entity or tag." },
84
- polish_hedging_decreased: { severity: "major", integrity: false, hint: "The polish pass removed qualifiers; restore them." },
85
- polish_text_churn: { severity: "major", integrity: false, hint: "More than half the text changed during polish; the pass composed instead of proofreading." },
86
- snapshot_mismatch: { severity: "major", integrity: false, hint: "The operands come from different collection windows; use rows from one window or state the windows separately." },
87
- operand_timestamp_missing: { severity: "major", integrity: false, hint: "Record the operand's observed_at timestamp before checking its collection window." },
88
- operand_missing: { severity: "major", integrity: false, hint: "A windowed operation names an operand that is not in the fact ledger; restore the row or re-derive from existing rows." },
89
- join_integrity_fail: { severity: "major", integrity: false, hint: "A table row combines facts from different source observations; keep each row to one observation or split it." },
90
- quote_stale_version: { severity: "major", integrity: false, hint: "The quoted source revision differs from the revision the report targets; re-snapshot the target revision or date the quote." },
91
- quote_fuzzy_match: { severity: "minor", integrity: false, hint: "The source text is OCR-noisy; confirm the snapshot and prefer the raw document." },
92
- relocated: { severity: "minor", integrity: false, hint: "After source refresh the exact quote and context sit at one new byte range; review the old and new offsets (verification never rewrites the row)." },
93
- quote_converted_only: { severity: "minor", integrity: false, hint: "The quote comes from a converted-only source with no raw bytes; re-snapshot the original with --raw and --text, or keep the warned quote." },
94
- name_outside_quote: { severity: "minor", integrity: false, hint: "A name in the sentence is not in the cited quote; add the source or remove the name." },
95
- verification_claim_unmarked: { severity: "minor", integrity: false, hint: "The sentence reads as a check we ran but carries no verified mark; mark it {{V:F<n>:label}} on a recorded command-output row, or reword it." },
96
- scope_widened_warn: { severity: "minor", integrity: false, hint: "The sentence uses a broader scope word than the quote; confirm the scope or narrow it." },
97
- particle_unverified: { severity: "minor", integrity: false, hint: "The particle after this value could not be checked; read it aloud and fix it by hand if wrong." },
98
- unit_unbound: { severity: "minor", integrity: false, hint: "Use the full fact placeholder, or write the unit right after :value (with or without a space; a Korean particle may follow), as its :unit element, or in the matching table column header." },
99
- fallback_without_entity: { severity: "minor", integrity: false, hint: "The replacement quote has no entity for attribution; set one on the row." },
100
- meaning_drift_warn: { severity: "minor", integrity: false, hint: "A separate reader found the sentence changes scope, subject, or certainty; rewrite from the quote." },
101
- polish_edit_unlocated: { severity: "minor", integrity: false, hint: "The edit's before-text was not found exactly once; re-propose against the current text." },
102
- polish_link_changed: { severity: "minor", integrity: false, hint: "A link was altered or removed during polish; restore it." },
103
- polish_name_changed: { severity: "minor", integrity: false, hint: "A proper noun changed during polish; restore it." },
27
+ korean_no_keep_all: {
28
+ severity: "major",
29
+ integrity: false,
30
+ hint: 'Add "word-break: keep-all; overflow-wrap: anywhere" to the body or the slide text container.',
31
+ },
32
+ palette_off_token: {
33
+ severity: "minor",
34
+ integrity: false,
35
+ hint: "Replace the literal color with a design-spec token (var(--...)) or add the color to the spec palette.",
36
+ },
37
+ emoji_in_prose: {
38
+ severity: "major",
39
+ integrity: false,
40
+ hint: "Remove the emoji; use an inline SVG icon or plain text.",
41
+ },
42
+ em_dash_in_prose: {
43
+ severity: "major",
44
+ integrity: false,
45
+ hint: "Rewrite the sentence with a comma, colon, or period instead of an em dash.",
46
+ },
47
+ en_dash_in_prose: {
48
+ severity: "minor",
49
+ integrity: false,
50
+ hint: "Use a hyphen for compounds; keep the en dash only between numbers.",
51
+ },
52
+ heading_too_long: {
53
+ severity: "minor",
54
+ integrity: false,
55
+ hint: "Shorten the heading to one line (26 Korean characters or 12 English words).",
56
+ },
57
+ heading_generic: {
58
+ severity: "minor",
59
+ integrity: false,
60
+ hint: "Make the heading carry the section's claim instead of a generic label.",
61
+ },
62
+ unsourced_number: {
63
+ severity: "major",
64
+ integrity: false,
65
+ hint: "Tag the number MEASURED / ASSUMED / DERIVED or cite its source in the same paragraph; under Sources only citation-field numbers and names (a hash, #12, GPT-4, Q3, 10-Q) are exempt, so quote a reference title that carries a code or a figure, or wrap it in <cite>: an unquoted one is checked, and 10-K / 8-K stay numerals because K is a multiplier. A slashed N/M reads as a month/day, so a fraction or a score (2/3, 7/12) under Sources is not checked (#11386): write it as a percent or tag it.",
66
+ },
67
+ chart_without_figure: {
68
+ severity: "major",
69
+ integrity: false,
70
+ hint: "Wrap the image or chart in a figure container with a caption.",
71
+ },
72
+ chart_svg_no_text: {
73
+ severity: "major",
74
+ integrity: false,
75
+ hint: "Give the chart a title, axis labels, units, and value labels as SVG text.",
76
+ },
77
+ chart_svg_missing_labels: {
78
+ severity: "minor",
79
+ integrity: false,
80
+ hint: "Add the missing title, axis ticks, or unit label to the chart.",
81
+ },
82
+ report_without_visual: {
83
+ severity: "major",
84
+ integrity: false,
85
+ hint: "Add at least one captioned visual of the findings: a chart from the data table, a rendered Mermaid diagram, or a figure image (references/report-visualization.md).",
86
+ },
87
+ image_missing_alt: {
88
+ severity: "minor",
89
+ integrity: false,
90
+ hint: 'Give the image an alt attribute that states what it shows, not its file name; mark a purely decorative image alt="" with role="presentation".',
91
+ },
92
+ korean_serif_font: {
93
+ severity: "major",
94
+ integrity: false,
95
+ hint: "Use a gothic (sans) Korean family; serif and brush families are banned by the design spec.",
96
+ },
97
+ section_without_citation: {
98
+ severity: "major",
99
+ integrity: false,
100
+ hint: "Cite at least one source inside this section or merge it into a cited one.",
101
+ },
102
+ missing_closing_section: {
103
+ severity: "blocker",
104
+ integrity: true,
105
+ hint: "Add the closing section that explains how the report was made (method, sources, gates).",
106
+ },
107
+ missing_citation_section: {
108
+ severity: "blocker",
109
+ integrity: true,
110
+ hint: "Add a sources or references section, or [S<n>] definition lines.",
111
+ },
112
+ broken_asset_reference: {
113
+ severity: "blocker",
114
+ integrity: true,
115
+ hint: "Re-render or restore the missing asset file before delivery.",
116
+ },
117
+ missing_required_section: {
118
+ severity: "blocker",
119
+ integrity: true,
120
+ hint: "Add the section the brief requires (matched by --require-section).",
121
+ },
122
+ missing_promised_deliverable: {
123
+ severity: "blocker",
124
+ integrity: true,
125
+ hint: "Produce the promised deliverable or record it as blocked_capability or skipped with a reason.",
126
+ },
127
+ layout_overflow: {
128
+ severity: "major",
129
+ integrity: false,
130
+ hint: "Constrain the element to its container (max-width: 100%, overflow-wrap: anywhere, or a narrower measure).",
131
+ },
132
+ layout_text_clipped: {
133
+ severity: "major",
134
+ integrity: false,
135
+ hint: "Remove the overflow: hidden clip or give the text room to wrap.",
136
+ },
137
+ layout_scroll_container: {
138
+ severity: "minor",
139
+ integrity: false,
140
+ hint: "Scrolling content prints clipped; make the content fit or wrap the table in a scroll wrapper only for HTML deliverables.",
141
+ },
142
+ layout_image_distorted: {
143
+ severity: "major",
144
+ integrity: false,
145
+ hint: "Preserve the image aspect ratio (object-fit: contain inside a fixed container).",
146
+ },
147
+ layout_sibling_overlap: {
148
+ severity: "major",
149
+ integrity: false,
150
+ hint: "Separate the overlapping elements (margins, grid, or a slide split).",
151
+ },
152
+ unresolved_placeholder: {
153
+ severity: "blocker",
154
+ integrity: true,
155
+ hint: "Register the fact with fact add or remove the sentence; a placeholder is never filled with a guess.",
156
+ },
157
+ value_mismatch: {
158
+ severity: "blocker",
159
+ integrity: true,
160
+ hint: "Re-run fact fill; never edit a filled value by hand.",
161
+ },
162
+ unit_mismatch: {
163
+ severity: "blocker",
164
+ integrity: true,
165
+ hint: "Re-run fact fill, or derive a converted row with fact derive --op convert.",
166
+ },
167
+ quote_not_verbatim: {
168
+ severity: "blocker",
169
+ integrity: true,
170
+ hint: "Re-insert the quote through its {{Q<n>}} placeholder; after a second failure the sentence is replaced by the quote.",
171
+ },
172
+ claim_status_invalid: {
173
+ severity: "blocker",
174
+ integrity: true,
175
+ hint: "The claim id is unknown, refuted, unresolved, or not in verified-claims; move the sentence to Gaps or Contradictions, or remove it.",
176
+ },
177
+ incompatible_operands: {
178
+ severity: "blocker",
179
+ integrity: true,
180
+ hint: "The operands differ in unit, population, period, or basis for this operation; fix the rows or declare the operation that fits.",
181
+ },
182
+ pointer_label_mismatch: {
183
+ severity: "blocker",
184
+ integrity: true,
185
+ hint: "The placeholder's label is not the row's label; check the id, then the label.",
186
+ },
187
+ quote_anchor_unresolved: {
188
+ severity: "blocker",
189
+ integrity: true,
190
+ hint: "A from or to anchor is missing or occurs more than once in the quote; pick unique anchor words.",
191
+ },
192
+ unit_duplicated: {
193
+ severity: "blocker",
194
+ integrity: true,
195
+ hint: "The unit after the placeholder repeats the row's unit; use :value or remove the unit.",
196
+ },
197
+ conversion_altered_number: {
198
+ severity: "blocker",
199
+ integrity: true,
200
+ hint: "The source conversion altered this number (sources/S<n>/conversion.json lists it); snapshot a verified text of the source over it with `source snapshot --id S<n> --text <verified.txt> --replace` (refused while an active row cites S<n>; then retract those rows or use a new id), then re-add the fact.",
201
+ },
202
+ polish_diff_fail: {
203
+ severity: "blocker",
204
+ integrity: true,
205
+ hint: "The polish pass changed numbers, tickers, table rows, claim ids, markup, or hidden content; revert to the pre-polish artifact and apply the language fixes only.",
206
+ },
207
+ fidelity_interview_incomplete: {
208
+ severity: "blocker",
209
+ integrity: true,
210
+ hint: "A fidelity field is pending or missing in brief.md; answer the open question or record its default, then rerun.",
211
+ },
212
+ derived_not_allowed: {
213
+ severity: "blocker",
214
+ integrity: true,
215
+ hint: "The brief allows no derived or assumed numbers; cite a source row directly or change the brief with the requester.",
216
+ },
217
+ source_outside_floor: {
218
+ severity: "blocker",
219
+ integrity: true,
220
+ hint: "The row's source is outside the source floor the brief records; use a source the brief allows or remove the fact.",
221
+ },
222
+ brief_changed: {
223
+ severity: "blocker",
224
+ integrity: true,
225
+ hint: "The edition's fill map was not written under the current ## Fidelity block (it changed after fill, or the map predates the binding); re-run fact fill, then fact verify.",
226
+ },
227
+ snapshot_hash_mismatch: {
228
+ severity: "blocker",
229
+ integrity: true,
230
+ hint: "The source snapshot changed after it was pinned or cannot be read; restore it, or run source refresh to re-anchor its rows.",
231
+ },
232
+ snapshot_not_raw: {
233
+ severity: "blocker",
234
+ integrity: true,
235
+ hint: "Measured rows need the original bytes: snapshot the source with --url, --html, or --raw <bytes> --text <extraction>; converted-only sources support warned quotations only.",
236
+ },
237
+ chart_value_untraceable: {
238
+ severity: "blocker",
239
+ integrity: true,
240
+ hint: "A chart value, tick, or data file does not match its ledger-backed data source; re-render the chart from the exported data.",
241
+ },
242
+ quote_unbound: {
243
+ severity: "blocker",
244
+ integrity: true,
245
+ hint: "A direct quotation has no ledger quote row; register it with fact quote and insert it through its placeholder.",
246
+ },
247
+ edition_unverified: {
248
+ severity: "blocker",
249
+ integrity: true,
250
+ hint: "The delivered file has no matching fact verify record; run fact verify on that edition and record it with --verified-by.",
251
+ },
252
+ untraceable_number: {
253
+ severity: "major",
254
+ integrity: false,
255
+ hint: "Replace the typed number with a {{F<n>}} placeholder backed by a ledger row, or register it as assumed with a rationale.",
256
+ },
257
+ unsupported_verification: {
258
+ severity: "major",
259
+ integrity: false,
260
+ hint: 'A sentence marked verified (data-claim-kind="verified") cites a row that is not recorded command output; cite the recorded output row or drop the verified mark.',
261
+ },
262
+ claim_kind_mismatch: {
263
+ severity: "major",
264
+ integrity: false,
265
+ hint: "An element marked with a claim kind (data-claim-kind) cites a row that kind does not accept, or the kind is unknown; cite a row of that kind or fix the mark (references/fidelity-claim-kinds.md).",
266
+ },
267
+ conflicting_readings: {
268
+ severity: "major",
269
+ integrity: false,
270
+ hint: "Two ledger rows with different periods or qualifiers are cited as one fact; split the sentence or retire one row.",
271
+ },
272
+ hedge_dropped: {
273
+ severity: "major",
274
+ integrity: false,
275
+ hint: "Restore the qualifier the source uses (estimated, about, not yet).",
276
+ },
277
+ direction_flipped: {
278
+ severity: "major",
279
+ integrity: false,
280
+ hint: "The source states the opposite direction; rewrite from the quote.",
281
+ },
282
+ causality_added: {
283
+ severity: "major",
284
+ integrity: false,
285
+ hint: "The source states no cause; state the correlation or quote the source.",
286
+ },
287
+ qualifier_dropped: {
288
+ severity: "major",
289
+ integrity: false,
290
+ hint: "The source bounds this value (up to, at least, about); restore the qualifier or use :q.",
291
+ },
292
+ unbound_sentence: {
293
+ severity: "major",
294
+ integrity: false,
295
+ hint: "Bind the sentence to a fact, a quote, a citation, or a claim-graph node with data-claim.",
296
+ },
297
+ meaning_drift_confirmed: {
298
+ severity: "major",
299
+ integrity: false,
300
+ hint: "Two independent readers found the same drift; rewrite from the quote or dispute with a reason.",
301
+ },
302
+ meaning_unverified: {
303
+ severity: "major",
304
+ integrity: false,
305
+ hint: "No meaning reader judged this pair, or no strong reader judged a force_strong pair; run the missing reader on pairs.json and rerun fact meaning-check.",
306
+ },
307
+ polish_edit_rejected: {
308
+ severity: "major",
309
+ integrity: false,
310
+ hint: "The edit changed a number, a hedge, a qualifier, a link, or a claim id, or contained <, > or &; re-propose the language fix only, narrowed to the words around any entity or tag.",
311
+ },
312
+ polish_hedging_decreased: {
313
+ severity: "major",
314
+ integrity: false,
315
+ hint: "The polish pass removed qualifiers; restore them.",
316
+ },
317
+ polish_text_churn: {
318
+ severity: "major",
319
+ integrity: false,
320
+ hint: "More than half the text changed during polish; the pass composed instead of proofreading.",
321
+ },
322
+ snapshot_mismatch: {
323
+ severity: "major",
324
+ integrity: false,
325
+ hint: "The operands come from different collection windows; use rows from one window or state the windows separately.",
326
+ },
327
+ operand_timestamp_missing: {
328
+ severity: "major",
329
+ integrity: false,
330
+ hint: "Record the operand's observed_at timestamp before checking its collection window.",
331
+ },
332
+ operand_missing: {
333
+ severity: "major",
334
+ integrity: false,
335
+ hint: "A windowed operation names an operand that is not in the fact ledger; restore the row or re-derive from existing rows.",
336
+ },
337
+ join_integrity_fail: {
338
+ severity: "major",
339
+ integrity: false,
340
+ hint: "A table row combines facts from different source observations; keep each row to one observation or split it.",
341
+ },
342
+ quote_stale_version: {
343
+ severity: "major",
344
+ integrity: false,
345
+ hint: "The quoted source revision differs from the revision the report targets; re-snapshot the target revision or date the quote.",
346
+ },
347
+ quote_fuzzy_match: {
348
+ severity: "minor",
349
+ integrity: false,
350
+ hint: "The source text is OCR-noisy; confirm the snapshot and prefer the raw document.",
351
+ },
352
+ relocated: {
353
+ severity: "minor",
354
+ integrity: false,
355
+ hint: "After source refresh the exact quote and context sit at one new byte range; review the old and new offsets (verification never rewrites the row).",
356
+ },
357
+ quote_converted_only: {
358
+ severity: "minor",
359
+ integrity: false,
360
+ hint: "The quote comes from a converted-only source with no raw bytes; re-snapshot the original with --raw and --text, or keep the warned quote.",
361
+ },
362
+ name_outside_quote: {
363
+ severity: "minor",
364
+ integrity: false,
365
+ hint: "A name in the sentence is not in the cited quote; add the source or remove the name.",
366
+ },
367
+ verification_claim_unmarked: {
368
+ severity: "minor",
369
+ integrity: false,
370
+ hint: "The sentence reads as a check we ran but carries no verified mark; mark it {{V:F<n>:label}} on a recorded command-output row, or reword it.",
371
+ },
372
+ scope_widened_warn: {
373
+ severity: "minor",
374
+ integrity: false,
375
+ hint: "The sentence uses a broader scope word than the quote; confirm the scope or narrow it.",
376
+ },
377
+ particle_unverified: {
378
+ severity: "minor",
379
+ integrity: false,
380
+ hint: "The particle after this value could not be checked; read it aloud and fix it by hand if wrong.",
381
+ },
382
+ unit_unbound: {
383
+ severity: "minor",
384
+ integrity: false,
385
+ hint: "Use the full fact placeholder, or write the unit right after :value (with or without a space; a Korean particle may follow), as its :unit element, or in the matching table column header.",
386
+ },
387
+ fallback_without_entity: {
388
+ severity: "minor",
389
+ integrity: false,
390
+ hint: "The replacement quote has no entity for attribution; set one on the row.",
391
+ },
392
+ meaning_drift_warn: {
393
+ severity: "minor",
394
+ integrity: false,
395
+ hint: "A separate reader found the sentence changes scope, subject, or certainty; rewrite from the quote.",
396
+ },
397
+ polish_edit_unlocated: {
398
+ severity: "minor",
399
+ integrity: false,
400
+ hint: "The edit's before-text was not found exactly once; re-propose against the current text.",
401
+ },
402
+ polish_link_changed: {
403
+ severity: "minor",
404
+ integrity: false,
405
+ hint: "A link was altered or removed during polish; restore it.",
406
+ },
407
+ polish_name_changed: {
408
+ severity: "minor",
409
+ integrity: false,
410
+ hint: "A proper noun changed during polish; restore it.",
411
+ },
104
412
  })
105
413
 
106
414
  /** Codes only the fidelity verifier raises (fact ledger, fill, verify, meaning, polish). */
107
415
  export const FIDELITY_CODES = Object.freeze([
108
- "unit_unbound",
109
- "unresolved_placeholder", "value_mismatch", "unit_mismatch", "quote_not_verbatim", "claim_status_invalid",
110
- "incompatible_operands", "pointer_label_mismatch", "quote_anchor_unresolved", "unit_duplicated", "polish_diff_fail",
111
- "fidelity_interview_incomplete", "derived_not_allowed", "source_outside_floor", "brief_changed", "snapshot_hash_mismatch",
112
- "conversion_altered_number",
113
- "chart_value_untraceable", "quote_unbound", "edition_unverified", "untraceable_number", "unsupported_verification", "claim_kind_mismatch",
114
- "conflicting_readings", "hedge_dropped", "direction_flipped", "causality_added", "qualifier_dropped", "unbound_sentence",
115
- "meaning_drift_confirmed", "meaning_unverified", "polish_edit_rejected", "polish_hedging_decreased", "polish_text_churn", "snapshot_mismatch",
116
- "operand_timestamp_missing", "operand_missing", "join_integrity_fail", "quote_stale_version", "quote_fuzzy_match", "name_outside_quote", "verification_claim_unmarked", "scope_widened_warn",
117
- "particle_unverified", "fallback_without_entity", "meaning_drift_warn", "polish_edit_unlocated", "polish_link_changed",
118
- "polish_name_changed", "snapshot_not_raw", "relocated", "quote_converted_only",
416
+ "unit_unbound",
417
+ "unresolved_placeholder",
418
+ "value_mismatch",
419
+ "unit_mismatch",
420
+ "quote_not_verbatim",
421
+ "claim_status_invalid",
422
+ "incompatible_operands",
423
+ "pointer_label_mismatch",
424
+ "quote_anchor_unresolved",
425
+ "unit_duplicated",
426
+ "polish_diff_fail",
427
+ "fidelity_interview_incomplete",
428
+ "derived_not_allowed",
429
+ "source_outside_floor",
430
+ "brief_changed",
431
+ "snapshot_hash_mismatch",
432
+ "conversion_altered_number",
433
+ "chart_value_untraceable",
434
+ "quote_unbound",
435
+ "edition_unverified",
436
+ "untraceable_number",
437
+ "unsupported_verification",
438
+ "claim_kind_mismatch",
439
+ "conflicting_readings",
440
+ "hedge_dropped",
441
+ "direction_flipped",
442
+ "causality_added",
443
+ "qualifier_dropped",
444
+ "unbound_sentence",
445
+ "meaning_drift_confirmed",
446
+ "meaning_unverified",
447
+ "polish_edit_rejected",
448
+ "polish_hedging_decreased",
449
+ "polish_text_churn",
450
+ "snapshot_mismatch",
451
+ "operand_timestamp_missing",
452
+ "operand_missing",
453
+ "join_integrity_fail",
454
+ "quote_stale_version",
455
+ "quote_fuzzy_match",
456
+ "name_outside_quote",
457
+ "verification_claim_unmarked",
458
+ "scope_widened_warn",
459
+ "particle_unverified",
460
+ "fallback_without_entity",
461
+ "meaning_drift_warn",
462
+ "polish_edit_unlocated",
463
+ "polish_link_changed",
464
+ "polish_name_changed",
465
+ "snapshot_not_raw",
466
+ "relocated",
467
+ "quote_converted_only",
119
468
  ])
120
469
  const FIDELITY_SET = new Set(FIDELITY_CODES)
121
470
 
122
471
  const LAYOUT_PREFIX = "layout_"
123
472
  /** Codes checkStatic can raise (G1-G17). */
124
473
  export const STATIC_CODES = Object.freeze(
125
- Object.keys(DEFECT_CODES).filter(
126
- (code) => !code.startsWith(LAYOUT_PREFIX) && code !== "missing_promised_deliverable" && !FIDELITY_SET.has(code),
127
- ),
474
+ Object.keys(DEFECT_CODES).filter(
475
+ (code) => !code.startsWith(LAYOUT_PREFIX) && code !== "missing_promised_deliverable" && !FIDELITY_SET.has(code),
476
+ ),
128
477
  )
129
478
  /** Codes checkLayout can raise (L1-L5). */
130
479
  export const LAYOUT_CODES = Object.freeze(Object.keys(DEFECT_CODES).filter((code) => code.startsWith(LAYOUT_PREFIX)))
@@ -132,7 +481,11 @@ export const LAYOUT_CODES = Object.freeze(Object.keys(DEFECT_CODES).filter((code
132
481
  export const MANIFEST_CODES = Object.freeze(["missing_promised_deliverable"])
133
482
 
134
483
  export const INTEGRITY_CODES = Object.freeze(
135
- new Set(Object.entries(DEFECT_CODES).filter(([, entry]) => entry.integrity).map(([code]) => code)),
484
+ new Set(
485
+ Object.entries(DEFECT_CODES)
486
+ .filter(([, entry]) => entry.integrity)
487
+ .map(([code]) => code),
488
+ ),
136
489
  )
137
490
 
138
491
  export const LANES = Object.freeze(["template-strict", "template-vibe", "no-format", "edit-existing"])
@@ -144,108 +497,185 @@ export const GATE_STATUSES = Object.freeze(["pass", "fail", "not_run"])
144
497
  export const LINEAGE_MODES = Object.freeze(["inline", "section"])
145
498
  export const ANSWERED_BY = Object.freeze(["user", "default", "request", "pending"])
146
499
  export const REPAIR_DEFAULTS = Object.freeze({ maxAttempts: 3, plateauLimit: 2, wallClockMs: 15 * 60 * 1000 })
147
- export const DESIGN_SPEC_SECTIONS = Object.freeze(["Extracted from", "Tokens", "Typography", "Layout", "Structure", "Figures", "Citations", "Open questions"])
500
+ export const DESIGN_SPEC_SECTIONS = Object.freeze([
501
+ "Extracted from",
502
+ "Tokens",
503
+ "Typography",
504
+ "Layout",
505
+ "Structure",
506
+ "Figures",
507
+ "Citations",
508
+ "Open questions",
509
+ ])
148
510
 
149
511
  const ISO_DATE = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/
150
512
 
151
513
  function isObject(value) {
152
- return value !== null && typeof value === "object" && !Array.isArray(value)
514
+ return value !== null && typeof value === "object" && !Array.isArray(value)
153
515
  }
154
516
 
155
517
  function check(errors, condition, message) {
156
- if (!condition) errors.push(message)
518
+ if (!condition) errors.push(message)
157
519
  }
158
520
 
159
521
  function validateDeliverable(row, index, errors) {
160
- const at = `deliverables[${index}]`
161
- if (!isObject(row)) return errors.push(`${at} must be an object`)
162
- check(errors, DELIVERABLE_FORMATS.includes(row.format), `${at}.format must be one of ${DELIVERABLE_FORMATS.join(", ")}`)
163
- check(errors, DELIVERABLE_STATUSES.includes(row.status), `${at}.status must be one of ${DELIVERABLE_STATUSES.join(", ")}`)
164
- check(errors, typeof row.promised === "boolean", `${at}.promised must be a boolean`)
165
- check(errors, typeof row.updatedAt === "string" && ISO_DATE.test(row.updatedAt), `${at}.updatedAt must be an ISO timestamp`)
166
- for (const key of ["path", "reason"]) {
167
- if (row[key] !== undefined) check(errors, typeof row[key] === "string", `${at}.${key} must be a string`)
168
- }
169
- for (const key of ["bytes", "pages"]) {
170
- if (row[key] !== undefined) check(errors, Number.isInteger(row[key]) && row[key] >= 0, `${at}.${key} must be a non-negative integer`)
171
- }
522
+ const at = `deliverables[${index}]`
523
+ if (!isObject(row)) return errors.push(`${at} must be an object`)
524
+ check(
525
+ errors,
526
+ DELIVERABLE_FORMATS.includes(row.format),
527
+ `${at}.format must be one of ${DELIVERABLE_FORMATS.join(", ")}`,
528
+ )
529
+ check(
530
+ errors,
531
+ DELIVERABLE_STATUSES.includes(row.status),
532
+ `${at}.status must be one of ${DELIVERABLE_STATUSES.join(", ")}`,
533
+ )
534
+ check(errors, typeof row.promised === "boolean", `${at}.promised must be a boolean`)
535
+ check(
536
+ errors,
537
+ typeof row.updatedAt === "string" && ISO_DATE.test(row.updatedAt),
538
+ `${at}.updatedAt must be an ISO timestamp`,
539
+ )
540
+ for (const key of ["path", "reason"]) {
541
+ if (row[key] !== undefined) check(errors, typeof row[key] === "string", `${at}.${key} must be a string`)
542
+ }
543
+ for (const key of ["bytes", "pages"]) {
544
+ if (row[key] !== undefined)
545
+ check(errors, Number.isInteger(row[key]) && row[key] >= 0, `${at}.${key} must be a non-negative integer`)
546
+ }
172
547
  }
173
548
 
174
549
  function validateDefect(defect, at, errors) {
175
- if (!isObject(defect)) return errors.push(`${at} must be an object`)
176
- check(errors, Object.hasOwn(DEFECT_CODES, defect.code), `${at}.code is not a known defect code`)
177
- check(errors, typeof defect.message === "string", `${at}.message must be a string`)
550
+ if (!isObject(defect)) return errors.push(`${at} must be an object`)
551
+ check(errors, Object.hasOwn(DEFECT_CODES, defect.code), `${at}.code is not a known defect code`)
552
+ check(errors, typeof defect.message === "string", `${at}.message must be a string`)
178
553
  }
179
554
 
180
555
  /** @returns {{ ok: boolean, errors: string[] }} */
181
556
  export function validateOutcomeManifest(manifest) {
182
- const errors = []
183
- if (!isObject(manifest)) return { ok: false, errors: ["manifest must be an object (schemaVersion missing)"] }
184
- check(errors, manifest.schemaVersion === SCHEMA_VERSION, `schemaVersion must be ${SCHEMA_VERSION}`)
185
- check(errors, typeof manifest.sessionDir === "string" && manifest.sessionDir.length > 0, "sessionDir must be a non-empty string")
186
- check(errors, typeof manifest.startedAt === "string" && ISO_DATE.test(manifest.startedAt), "startedAt must be an ISO timestamp")
187
- check(errors, manifest.finishedAt === null || (typeof manifest.finishedAt === "string" && ISO_DATE.test(manifest.finishedAt)), "finishedAt must be null or an ISO timestamp")
188
- check(errors, manifest.elapsedMinutes === null || (Number.isFinite(manifest.elapsedMinutes) && manifest.elapsedMinutes >= 0), "elapsedMinutes must be null or a non-negative number")
189
- check(errors, manifest.lane === null || LANES.includes(manifest.lane), `lane must be null or one of ${LANES.join(", ")}`)
190
- check(errors, manifest.interview === null || isObject(manifest.interview), "interview must be null or an object")
191
- if (Array.isArray(manifest.deliverables)) manifest.deliverables.forEach((row, index) => validateDeliverable(row, index, errors))
192
- else errors.push("deliverables must be an array")
193
- if (Array.isArray(manifest.renders)) {
194
- manifest.renders.forEach((render, index) => {
195
- check(errors, isObject(render) && typeof render.path === "string" && Number.isInteger(render.page) && render.page >= 1, `renders[${index}] must be { path: string, page: integer >= 1 }`)
196
- })
197
- } else errors.push("renders must be an array")
198
- if (isObject(manifest.gates)) {
199
- for (const gate of GATE_NAMES) check(errors, GATE_STATUSES.includes(manifest.gates[gate]), `gates.${gate} must be one of ${GATE_STATUSES.join(", ")}`)
200
- } else errors.push("gates must be an object")
201
- if (manifest.gateHistory !== undefined) {
202
- if (!Array.isArray(manifest.gateHistory)) errors.push("gateHistory must be an array")
203
- else for (const entry of manifest.gateHistory) {
204
- check(errors, isObject(entry) && GATE_NAMES.includes(entry.gate) && GATE_STATUSES.includes(entry.status)
205
- && typeof entry.at === "string" && ISO_DATE.test(entry.at)
206
- && (entry.reason === undefined || typeof entry.reason === "string"), "gateHistory entries must have a known gate, status, timestamp, and optional reason")
207
- }
208
- }
209
- if (Array.isArray(manifest.residualDefects)) manifest.residualDefects.forEach((defect, index) => validateDefect(defect, `residualDefects[${index}]`, errors))
210
- else errors.push("residualDefects must be an array")
211
- check(errors, manifest.repair === null || isObject(manifest.repair), "repair must be null or an object")
212
- check(errors, manifest.sources === null || isObject(manifest.sources), "sources must be null or an object")
213
- return { ok: errors.length === 0, errors }
557
+ const errors = []
558
+ if (!isObject(manifest)) return { ok: false, errors: ["manifest must be an object (schemaVersion missing)"] }
559
+ check(errors, manifest.schemaVersion === SCHEMA_VERSION, `schemaVersion must be ${SCHEMA_VERSION}`)
560
+ check(
561
+ errors,
562
+ typeof manifest.sessionDir === "string" && manifest.sessionDir.length > 0,
563
+ "sessionDir must be a non-empty string",
564
+ )
565
+ check(
566
+ errors,
567
+ typeof manifest.startedAt === "string" && ISO_DATE.test(manifest.startedAt),
568
+ "startedAt must be an ISO timestamp",
569
+ )
570
+ check(
571
+ errors,
572
+ manifest.finishedAt === null || (typeof manifest.finishedAt === "string" && ISO_DATE.test(manifest.finishedAt)),
573
+ "finishedAt must be null or an ISO timestamp",
574
+ )
575
+ check(
576
+ errors,
577
+ manifest.elapsedMinutes === null || (Number.isFinite(manifest.elapsedMinutes) && manifest.elapsedMinutes >= 0),
578
+ "elapsedMinutes must be null or a non-negative number",
579
+ )
580
+ check(
581
+ errors,
582
+ manifest.lane === null || LANES.includes(manifest.lane),
583
+ `lane must be null or one of ${LANES.join(", ")}`,
584
+ )
585
+ check(errors, manifest.interview === null || isObject(manifest.interview), "interview must be null or an object")
586
+ if (Array.isArray(manifest.deliverables))
587
+ manifest.deliverables.forEach((row, index) => validateDeliverable(row, index, errors))
588
+ else errors.push("deliverables must be an array")
589
+ if (Array.isArray(manifest.renders)) {
590
+ manifest.renders.forEach((render, index) => {
591
+ check(
592
+ errors,
593
+ isObject(render) && typeof render.path === "string" && Number.isInteger(render.page) && render.page >= 1,
594
+ `renders[${index}] must be { path: string, page: integer >= 1 }`,
595
+ )
596
+ })
597
+ } else errors.push("renders must be an array")
598
+ if (isObject(manifest.gates)) {
599
+ for (const gate of GATE_NAMES)
600
+ check(
601
+ errors,
602
+ GATE_STATUSES.includes(manifest.gates[gate]),
603
+ `gates.${gate} must be one of ${GATE_STATUSES.join(", ")}`,
604
+ )
605
+ } else errors.push("gates must be an object")
606
+ if (manifest.gateHistory !== undefined) {
607
+ if (!Array.isArray(manifest.gateHistory)) errors.push("gateHistory must be an array")
608
+ else
609
+ for (const entry of manifest.gateHistory) {
610
+ check(
611
+ errors,
612
+ isObject(entry) &&
613
+ GATE_NAMES.includes(entry.gate) &&
614
+ GATE_STATUSES.includes(entry.status) &&
615
+ typeof entry.at === "string" &&
616
+ ISO_DATE.test(entry.at) &&
617
+ (entry.reason === undefined || typeof entry.reason === "string"),
618
+ "gateHistory entries must have a known gate, status, timestamp, and optional reason",
619
+ )
620
+ }
621
+ }
622
+ if (Array.isArray(manifest.residualDefects))
623
+ manifest.residualDefects.forEach((defect, index) => validateDefect(defect, `residualDefects[${index}]`, errors))
624
+ else errors.push("residualDefects must be an array")
625
+ check(errors, manifest.repair === null || isObject(manifest.repair), "repair must be null or an object")
626
+ check(errors, manifest.sources === null || isObject(manifest.sources), "sources must be null or an object")
627
+ return { ok: errors.length === 0, errors }
214
628
  }
215
629
 
216
630
  /** A copy of a manifest written before a gate existed: every absent gate key becomes not_run. */
217
631
  export function normalizeManifest(manifest) {
218
- if (!isObject(manifest) || !isObject(manifest.gates)) return manifest
219
- const gates = { ...manifest.gates }
220
- for (const gate of GATE_NAMES) if (!Object.hasOwn(gates, gate)) gates[gate] = "not_run"
221
- return { ...manifest, gates }
632
+ if (!isObject(manifest) || !isObject(manifest.gates)) return manifest
633
+ const gates = { ...manifest.gates }
634
+ for (const gate of GATE_NAMES) if (!Object.hasOwn(gates, gate)) gates[gate] = "not_run"
635
+ return { ...manifest, gates }
222
636
  }
223
637
 
224
638
  function isMeasure(value) {
225
- return Array.isArray(value) && value.length === 3 && value.every((n) => Number.isInteger(n) && n >= 0)
639
+ return Array.isArray(value) && value.length === 3 && value.every((n) => Number.isInteger(n) && n >= 0)
226
640
  }
227
641
 
228
642
  /** @returns {{ ok: boolean, errors: string[] }} */
229
643
  export function validateRepairState(state) {
230
- const errors = []
231
- if (!isObject(state)) return { ok: false, errors: ["repair state must be an object (schemaVersion missing)"] }
232
- check(errors, state.schemaVersion === SCHEMA_VERSION, `schemaVersion must be ${SCHEMA_VERSION}`)
233
- check(errors, typeof state.startedAt === "string" && ISO_DATE.test(state.startedAt), "startedAt must be an ISO timestamp")
234
- if (isObject(state.budget)) {
235
- for (const key of ["maxAttempts", "plateauLimit", "wallClockMs"]) {
236
- check(errors, Number.isInteger(state.budget[key]) && state.budget[key] > 0, `budget.${key} must be a positive integer`)
237
- }
238
- } else errors.push("budget must be an object")
239
- if (Array.isArray(state.attempts)) {
240
- state.attempts.forEach((attempt, index) => {
241
- const at = `attempts[${index}]`
242
- if (!isObject(attempt)) return errors.push(`${at} must be an object`)
243
- check(errors, typeof attempt.at === "string" && ISO_DATE.test(attempt.at), `${at}.at must be an ISO timestamp`)
244
- check(errors, isMeasure(attempt.measure), `${at}.measure must be [blocker, major, minor] counts`)
245
- check(errors, typeof attempt.signature === "string", `${at}.signature must be a string`)
246
- })
247
- } else errors.push("attempts must be an array")
248
- check(errors, Number.isInteger(state.consecutiveNonProgress) && state.consecutiveNonProgress >= 0, "consecutiveNonProgress must be a non-negative integer")
249
- check(errors, Array.isArray(state.seenSignatures) && state.seenSignatures.every((s) => typeof s === "string"), "seenSignatures must be an array of strings")
250
- return { ok: errors.length === 0, errors }
644
+ const errors = []
645
+ if (!isObject(state)) return { ok: false, errors: ["repair state must be an object (schemaVersion missing)"] }
646
+ check(errors, state.schemaVersion === SCHEMA_VERSION, `schemaVersion must be ${SCHEMA_VERSION}`)
647
+ check(
648
+ errors,
649
+ typeof state.startedAt === "string" && ISO_DATE.test(state.startedAt),
650
+ "startedAt must be an ISO timestamp",
651
+ )
652
+ if (isObject(state.budget)) {
653
+ for (const key of ["maxAttempts", "plateauLimit", "wallClockMs"]) {
654
+ check(
655
+ errors,
656
+ Number.isInteger(state.budget[key]) && state.budget[key] > 0,
657
+ `budget.${key} must be a positive integer`,
658
+ )
659
+ }
660
+ } else errors.push("budget must be an object")
661
+ if (Array.isArray(state.attempts)) {
662
+ state.attempts.forEach((attempt, index) => {
663
+ const at = `attempts[${index}]`
664
+ if (!isObject(attempt)) return errors.push(`${at} must be an object`)
665
+ check(errors, typeof attempt.at === "string" && ISO_DATE.test(attempt.at), `${at}.at must be an ISO timestamp`)
666
+ check(errors, isMeasure(attempt.measure), `${at}.measure must be [blocker, major, minor] counts`)
667
+ check(errors, typeof attempt.signature === "string", `${at}.signature must be a string`)
668
+ })
669
+ } else errors.push("attempts must be an array")
670
+ check(
671
+ errors,
672
+ Number.isInteger(state.consecutiveNonProgress) && state.consecutiveNonProgress >= 0,
673
+ "consecutiveNonProgress must be a non-negative integer",
674
+ )
675
+ check(
676
+ errors,
677
+ Array.isArray(state.seenSignatures) && state.seenSignatures.every((s) => typeof s === "string"),
678
+ "seenSignatures must be an array of strings",
679
+ )
680
+ return { ok: errors.length === 0, errors }
251
681
  }