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.
- package/.agents/skills/codex-qa/scripts/lib/app-server-client.mjs +86 -69
- package/.agents/skills/codex-qa/scripts/lib/app-server-client.test.js +14 -14
- package/.agents/skills/codex-qa/scripts/lib/mock-model.mjs +17 -17
- package/.agents/skills/opencode-qa/scripts/lib/fake-openai-events.mjs +1 -2
- package/.agents/skills/opencode-qa/scripts/lib/fake-openai-server.mjs +33 -15
- package/.agents/skills/senpi-qa/scripts/resolve-evidence-dir.test.mjs +6 -10
- package/bin/knip.workspace.jsonc +11 -0
- package/bin/oh-my-opencode.js +83 -83
- package/bin/oh-my-opencode.test.ts +131 -114
- package/bin/platform.d.ts +14 -14
- package/bin/platform.js +32 -28
- package/bin/platform.test.ts +120 -146
- package/bin/version-mismatch.js +4 -4
- package/bin/version-mismatch.test.ts +52 -40
- package/dist/agents/dynamic-agent-prompt-builder.d.ts +1 -1
- package/dist/agents/prometheus/index.d.ts +1 -1
- package/dist/agents/sisyphus-junior/index.d.ts +1 -1
- package/dist/cli/cli-program.d.ts +3 -0
- package/dist/cli/config-manager.d.ts +2 -2
- package/dist/cli/index.js +4078 -671
- package/dist/cli/install-native/index.d.ts +1 -1
- package/dist/cli/service-auth/accounts-gate.d.ts +3 -3
- package/dist/cli/service-auth/cli-service-auth-state.d.ts +4 -0
- package/dist/cli/service-auth/closed-device-login.d.ts +10 -0
- package/dist/cli/service-auth/commands.d.ts +9 -2
- package/dist/cli/service-auth/device-flow.d.ts +2 -0
- package/dist/cli/service-auth/index.d.ts +1 -1
- package/dist/cli/service-auth/keychain-helper/fake-keychain.test-support.d.ts +2 -1
- package/dist/cli/service-auth/loopback.d.ts +2 -0
- package/dist/cli/service-auth/machine-device.d.ts +17 -0
- package/dist/cli/service-auth/machine-digest.d.ts +6 -0
- package/dist/cli/service-auth/protocol.d.ts +2 -2
- package/dist/cli/service-auth/session.d.ts +20 -1
- package/dist/cli-node/index.js +4078 -671
- package/dist/config/index.d.ts +1 -1
- package/dist/config-migration/index.d.ts +4 -4
- package/dist/features/background-agent/index.d.ts +1 -1
- package/dist/features/btw-side/context-injector.d.ts +1 -1
- package/dist/features/btw-side/index.d.ts +1 -1
- package/dist/features/context-injector/index.d.ts +1 -1
- package/dist/features/hook-message-injector/injector.d.ts +1 -1
- package/dist/features/monitor/output-injector.d.ts +1 -0
- package/dist/features/team-mode/tools/index.d.ts +1 -1
- package/dist/features/tmux-subagent/decision-engine.d.ts +1 -1
- package/dist/features/tool-metadata-store/index.d.ts +1 -1
- package/dist/hooks/auto-slash-command/hook.d.ts +1 -1
- package/dist/hooks/auto-update-checker/index.d.ts +1 -1
- package/dist/hooks/edit-error-recovery/index.d.ts +1 -1
- package/dist/hooks/index.d.ts +4 -4
- package/dist/hooks/keyword-detector/ultrawork/index.d.ts +2 -2
- package/dist/hooks/rules-injector/injector.d.ts +2 -2
- package/dist/index.js +1317 -1019
- package/dist/locales/en.d.ts +1 -1
- package/dist/shared/index.d.ts +2 -2
- package/dist/shared/migration.d.ts +2 -2
- package/dist/shared/model-capabilities-cache.d.ts +1 -1
- package/dist/shared/model-error-classifier.d.ts +1 -1
- package/dist/shared/model-requirements.d.ts +1 -1
- package/dist/shared/model-resolver.d.ts +1 -1
- package/dist/shared/opencode-config-dir.d.ts +1 -1
- package/dist/shared/prompt-async-gate.d.ts +1 -1
- package/dist/skills/ast-grep/references/recipes.md +1 -1
- package/dist/skills/ast-grep/tests/smoke.ps1 +1 -1
- package/dist/skills/ast-grep/tests/smoke.sh +1 -1
- package/dist/skills/browser/runtime/omowright/index.js +16 -16
- package/dist/skills/browser/runtime/omowright/manifest.json +5 -5
- package/dist/skills/browser/runtime/omowright/page-bundle.js +14 -4
- package/dist/skills/browser/scripts/browser-doctor-report.mjs +36 -9
- package/dist/skills/browser/scripts/browser-doctor.mjs +24 -7
- package/dist/skills/browser/scripts/browser-engine-guard.mjs +2 -1
- package/dist/skills/browser/scripts/browser-install.mjs +40 -8
- package/dist/skills/debugging/references/scripts/dap.mjs +280 -170
- package/dist/skills/debugging/references/scripts/dap.test.ts +83 -55
- package/dist/skills/debugging/references/scripts/fixture-adapter.mjs +104 -42
- package/dist/skills/frontend/scripts/detect/cli.ts +67 -50
- package/dist/skills/frontend/scripts/detect/config.test.ts +23 -19
- package/dist/skills/frontend/scripts/detect/config.ts +41 -38
- package/dist/skills/frontend/scripts/detect/core/color.test.ts +19 -19
- package/dist/skills/frontend/scripts/detect/core/color.ts +109 -94
- package/dist/skills/frontend/scripts/detect/core/page.ts +43 -42
- package/dist/skills/frontend/scripts/detect/core/shadow.ts +38 -29
- package/dist/skills/frontend/scripts/detect/core/source.ts +25 -20
- package/dist/skills/frontend/scripts/detect/detect.ts +63 -45
- package/dist/skills/frontend/scripts/detect/lint.test.ts +24 -16
- package/dist/skills/frontend/scripts/detect/lint.ts +78 -69
- package/dist/skills/frontend/scripts/detect/render/probe-placement.test.ts +35 -11
- package/dist/skills/frontend/scripts/detect/render/probe-placement.ts +36 -32
- package/dist/skills/frontend/scripts/detect/render/renderer.ts +14 -13
- package/dist/skills/frontend/scripts/detect/render/webview.ts +53 -50
- package/dist/skills/frontend/scripts/detect/report.ts +20 -18
- package/dist/skills/frontend/scripts/detect/rule.ts +21 -21
- package/dist/skills/frontend/scripts/detect/rules/color/ai-color-palette.test.ts +84 -53
- package/dist/skills/frontend/scripts/detect/rules/color/ai-color-palette.ts +144 -63
- package/dist/skills/frontend/scripts/detect/rules/color/cream-palette.test.ts +27 -15
- package/dist/skills/frontend/scripts/detect/rules/color/cream-palette.ts +41 -27
- package/dist/skills/frontend/scripts/detect/rules/color/dark-glow.test.ts +57 -32
- package/dist/skills/frontend/scripts/detect/rules/color/dark-glow.ts +59 -34
- package/dist/skills/frontend/scripts/detect/rules/color/design-system-color.test.ts +25 -17
- package/dist/skills/frontend/scripts/detect/rules/color/design-system-color.ts +37 -28
- package/dist/skills/frontend/scripts/detect/rules/color/gradient-text.test.ts +63 -15
- package/dist/skills/frontend/scripts/detect/rules/color/gradient-text.ts +68 -45
- package/dist/skills/frontend/scripts/detect/rules/color/gray-on-color.test.ts +49 -24
- package/dist/skills/frontend/scripts/detect/rules/color/gray-on-color.ts +34 -25
- package/dist/skills/frontend/scripts/detect/rules/color/index.ts +9 -2
- package/dist/skills/frontend/scripts/detect/rules/color/low-contrast.test.ts +419 -161
- package/dist/skills/frontend/scripts/detect/rules/color/low-contrast.ts +106 -43
- package/dist/skills/frontend/scripts/detect/rules/color/placeholder-contrast.test.ts +136 -45
- package/dist/skills/frontend/scripts/detect/rules/color/radial-halo.test.ts +42 -28
- package/dist/skills/frontend/scripts/detect/rules/color/radial-halo.ts +48 -23
- package/dist/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.test.ts +45 -18
- package/dist/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.ts +49 -26
- package/dist/skills/frontend/scripts/detect/rules/color/support/animation-opacity.ts +90 -66
- package/dist/skills/frontend/scripts/detect/rules/color/support/color-path.ts +43 -6
- package/dist/skills/frontend/scripts/detect/rules/color/support/contrast-pairs.ts +75 -38
- package/dist/skills/frontend/scripts/detect/rules/color/support/contrast-role.ts +142 -59
- package/dist/skills/frontend/scripts/detect/rules/color/support/glow-forms.ts +93 -44
- package/dist/skills/frontend/scripts/detect/rules/color/support/gradient-samples.ts +115 -114
- package/dist/skills/frontend/scripts/detect/rules/color/support/gradients.ts +77 -66
- package/dist/skills/frontend/scripts/detect/rules/color/support/mockup-roots.ts +178 -48
- package/dist/skills/frontend/scripts/detect/rules/color/support/page-ignore.ts +6 -2
- package/dist/skills/frontend/scripts/detect/rules/color/support/painted-text.ts +171 -108
- package/dist/skills/frontend/scripts/detect/rules/color/support/palette-roles.ts +60 -39
- package/dist/skills/frontend/scripts/detect/rules/color/support/placeholder-contrast.ts +36 -16
- package/dist/skills/frontend/scripts/detect/rules/color/support/stock-accent.ts +48 -18
- package/dist/skills/frontend/scripts/detect/rules/color/support/text-colors.ts +88 -62
- package/dist/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.test.ts +17 -9
- package/dist/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.ts +25 -15
- package/dist/skills/frontend/scripts/detect/rules/copy/broken-image.test.ts +22 -16
- package/dist/skills/frontend/scripts/detect/rules/copy/broken-image.ts +20 -12
- package/dist/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.test.ts +38 -24
- package/dist/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.ts +63 -39
- package/dist/skills/frontend/scripts/detect/rules/copy/index.ts +9 -2
- package/dist/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.test.ts +14 -9
- package/dist/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.ts +53 -25
- package/dist/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.test.ts +69 -37
- package/dist/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.ts +49 -28
- package/dist/skills/frontend/scripts/detect/rules/copy/repeated-container-text.test.ts +52 -26
- package/dist/skills/frontend/scripts/detect/rules/copy/repeated-container-text.ts +80 -47
- package/dist/skills/frontend/scripts/detect/rules/copy/script-error.test.ts +71 -30
- package/dist/skills/frontend/scripts/detect/rules/copy/script-error.ts +42 -34
- package/dist/skills/frontend/scripts/detect/rules/copy/skipped-heading.test.ts +64 -34
- package/dist/skills/frontend/scripts/detect/rules/copy/skipped-heading.ts +199 -75
- package/dist/skills/frontend/scripts/detect/rules/copy/support/numbered-label.ts +122 -71
- package/dist/skills/frontend/scripts/detect/rules/copy/support/page-text.ts +32 -24
- package/dist/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.test.ts +25 -8
- package/dist/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.ts +42 -13
- package/dist/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.test.ts +40 -31
- package/dist/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.ts +49 -41
- package/dist/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.test.ts +30 -25
- package/dist/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.ts +10 -10
- package/dist/skills/frontend/scripts/detect/rules/decoration/bounce-easing.test.ts +80 -53
- package/dist/skills/frontend/scripts/detect/rules/decoration/bounce-easing.ts +87 -68
- package/dist/skills/frontend/scripts/detect/rules/decoration/buried-raster.test.ts +122 -79
- package/dist/skills/frontend/scripts/detect/rules/decoration/buried-raster.ts +83 -64
- package/dist/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.test.ts +20 -20
- package/dist/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.ts +29 -29
- package/dist/skills/frontend/scripts/detect/rules/decoration/design-system-radius.test.ts +27 -27
- package/dist/skills/frontend/scripts/detect/rules/decoration/design-system-radius.ts +33 -26
- package/dist/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.test.ts +58 -45
- package/dist/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.ts +61 -58
- package/dist/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.test.ts +50 -33
- package/dist/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.ts +25 -23
- package/dist/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.test.ts +74 -60
- package/dist/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.ts +16 -14
- package/dist/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.test.ts +75 -54
- package/dist/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.ts +85 -84
- package/dist/skills/frontend/scripts/detect/rules/decoration/index.ts +17 -17
- package/dist/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.test.ts +128 -104
- package/dist/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.ts +79 -64
- package/dist/skills/frontend/scripts/detect/rules/decoration/marquee.test.ts +67 -50
- package/dist/skills/frontend/scripts/detect/rules/decoration/marquee.ts +57 -40
- package/dist/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.test.ts +67 -54
- package/dist/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.ts +34 -34
- package/dist/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.test.ts +56 -44
- package/dist/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.ts +92 -58
- package/dist/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.test.ts +18 -18
- package/dist/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.ts +19 -19
- package/dist/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.test.ts +57 -44
- package/dist/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.ts +59 -53
- package/dist/skills/frontend/scripts/detect/rules/decoration/side-tab.test.ts +112 -72
- package/dist/skills/frontend/scripts/detect/rules/decoration/side-tab.ts +15 -12
- package/dist/skills/frontend/scripts/detect/rules/decoration/support/appearance.ts +89 -85
- package/dist/skills/frontend/scripts/detect/rules/decoration/support/assert-cases.ts +17 -15
- package/dist/skills/frontend/scripts/detect/rules/decoration/support/borders.ts +178 -136
- package/dist/skills/frontend/scripts/detect/rules/decoration/support/clip-geometry.ts +155 -145
- package/dist/skills/frontend/scripts/detect/rules/decoration/support/css-candidates.ts +60 -54
- package/dist/skills/frontend/scripts/detect/rules/decoration/support/curve-samples.ts +51 -48
- package/dist/skills/frontend/scripts/detect/rules/decoration/support/gradient-pattern.ts +43 -34
- package/dist/skills/frontend/scripts/detect/rules/decoration/support/keyframes.ts +118 -113
- package/dist/skills/frontend/scripts/detect/rules/decoration/support/labels.ts +74 -67
- package/dist/skills/frontend/scripts/detect/rules/decoration/support/raster-state.ts +80 -42
- package/dist/skills/frontend/scripts/detect/rules/index.ts +6 -6
- package/dist/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.test.ts +71 -37
- package/dist/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.ts +116 -55
- package/dist/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.test.ts +41 -18
- package/dist/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.ts +22 -9
- package/dist/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.test.ts +57 -29
- package/dist/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.ts +113 -52
- package/dist/skills/frontend/scripts/detect/rules/layout/cramped-padding.test.ts +120 -31
- package/dist/skills/frontend/scripts/detect/rules/layout/cramped-padding.ts +167 -90
- package/dist/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.test.ts +43 -24
- package/dist/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.ts +82 -41
- package/dist/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.test.ts +34 -12
- package/dist/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.ts +74 -37
- package/dist/skills/frontend/scripts/detect/rules/layout/heading-rhythm.test.ts +85 -39
- package/dist/skills/frontend/scripts/detect/rules/layout/heading-rhythm.ts +49 -24
- package/dist/skills/frontend/scripts/detect/rules/layout/index.ts +14 -3
- package/dist/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.test.ts +24 -7
- package/dist/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.ts +47 -28
- package/dist/skills/frontend/scripts/detect/rules/layout/nested-cards.test.ts +79 -31
- package/dist/skills/frontend/scripts/detect/rules/layout/nested-cards.ts +66 -31
- package/dist/skills/frontend/scripts/detect/rules/layout/straggler.test.ts +33 -14
- package/dist/skills/frontend/scripts/detect/rules/layout/straggler.ts +46 -22
- package/dist/skills/frontend/scripts/detect/rules/layout/support/cards.ts +157 -82
- package/dist/skills/frontend/scripts/detect/rules/layout/support/clipping.ts +98 -50
- package/dist/skills/frontend/scripts/detect/rules/layout/support/declared-mockups.ts +100 -36
- package/dist/skills/frontend/scripts/detect/rules/layout/support/geometry.ts +66 -43
- package/dist/skills/frontend/scripts/detect/rules/layout/support/hidden-interface.ts +56 -24
- package/dist/skills/frontend/scripts/detect/rules/layout/support/layout-cases.ts +23 -8
- package/dist/skills/frontend/scripts/detect/rules/layout/support/line-breaks.ts +28 -16
- package/dist/skills/frontend/scripts/detect/rules/layout/support/motion.ts +88 -56
- package/dist/skills/frontend/scripts/detect/rules/layout/support/padding.ts +106 -68
- package/dist/skills/frontend/scripts/detect/rules/layout/support/rhythm.ts +204 -128
- package/dist/skills/frontend/scripts/detect/rules/layout/text-occlusion.test.ts +50 -17
- package/dist/skills/frontend/scripts/detect/rules/layout/text-occlusion.ts +125 -70
- package/dist/skills/frontend/scripts/detect/rules/layout/text-overflow.test.ts +96 -42
- package/dist/skills/frontend/scripts/detect/rules/layout/text-overflow.ts +111 -59
- package/dist/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.test.ts +15 -9
- package/dist/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.ts +27 -16
- package/dist/skills/frontend/scripts/detect/rules/layout/viewport-reflow.test.ts +34 -21
- package/dist/skills/frontend/scripts/detect/rules/layout/viewport-reflow.ts +38 -23
- package/dist/skills/frontend/scripts/detect/rules/source/ai-color-palette.test.ts +6 -6
- package/dist/skills/frontend/scripts/detect/rules/source/ai-color-palette.ts +17 -6
- package/dist/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.test.ts +5 -5
- package/dist/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.ts +19 -9
- package/dist/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.test.ts +7 -7
- package/dist/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.ts +31 -13
- package/dist/skills/frontend/scripts/detect/rules/source/bounce-easing.test.ts +20 -9
- package/dist/skills/frontend/scripts/detect/rules/source/bounce-easing.ts +41 -16
- package/dist/skills/frontend/scripts/detect/rules/source/broken-image.test.ts +17 -17
- package/dist/skills/frontend/scripts/detect/rules/source/broken-image.ts +19 -9
- package/dist/skills/frontend/scripts/detect/rules/source/codex-grid-background.test.ts +7 -4
- package/dist/skills/frontend/scripts/detect/rules/source/codex-grid-background.ts +36 -12
- package/dist/skills/frontend/scripts/detect/rules/source/dark-glow.test.ts +8 -8
- package/dist/skills/frontend/scripts/detect/rules/source/dark-glow.ts +28 -14
- package/dist/skills/frontend/scripts/detect/rules/source/em-dash-overuse.test.ts +6 -6
- package/dist/skills/frontend/scripts/detect/rules/source/em-dash-overuse.ts +17 -9
- package/dist/skills/frontend/scripts/detect/rules/source/gradient-text.test.ts +5 -5
- package/dist/skills/frontend/scripts/detect/rules/source/gradient-text.ts +14 -6
- package/dist/skills/frontend/scripts/detect/rules/source/gray-on-color.test.ts +13 -13
- package/dist/skills/frontend/scripts/detect/rules/source/gray-on-color.ts +18 -7
- package/dist/skills/frontend/scripts/detect/rules/source/index.ts +18 -1
- package/dist/skills/frontend/scripts/detect/rules/source/marketing-buzzword.test.ts +5 -5
- package/dist/skills/frontend/scripts/detect/rules/source/marketing-buzzword.ts +49 -11
- package/dist/skills/frontend/scripts/detect/rules/source/marquee.test.ts +11 -5
- package/dist/skills/frontend/scripts/detect/rules/source/marquee.ts +16 -6
- package/dist/skills/frontend/scripts/detect/rules/source/monotonous-spacing.test.ts +6 -6
- package/dist/skills/frontend/scripts/detect/rules/source/monotonous-spacing.ts +35 -17
- package/dist/skills/frontend/scripts/detect/rules/source/overused-font.test.ts +18 -11
- package/dist/skills/frontend/scripts/detect/rules/source/overused-font.ts +51 -10
- package/dist/skills/frontend/scripts/detect/rules/source/radial-halo.test.ts +12 -9
- package/dist/skills/frontend/scripts/detect/rules/source/radial-halo.ts +16 -8
- package/dist/skills/frontend/scripts/detect/rules/source/side-tab.test.ts +34 -22
- package/dist/skills/frontend/scripts/detect/rules/source/side-tab.ts +88 -47
- package/dist/skills/frontend/scripts/detect/rules/source/support/accent-scans.ts +103 -62
- package/dist/skills/frontend/scripts/detect/rules/source/support/check-source.ts +6 -2
- package/dist/skills/frontend/scripts/detect/rules/source/support/corners.ts +148 -80
- package/dist/skills/frontend/scripts/detect/rules/source/support/css-effects.ts +86 -66
- package/dist/skills/frontend/scripts/detect/rules/source/support/css-scopes.ts +148 -113
- package/dist/skills/frontend/scripts/detect/rules/source/support/image-tags.ts +113 -105
- package/dist/skills/frontend/scripts/detect/rules/source/support/js-punctuation.ts +47 -30
- package/dist/skills/frontend/scripts/detect/rules/source/support/markup-scope.ts +45 -34
- package/dist/skills/frontend/scripts/detect/rules/source/support/source-color.ts +64 -29
- package/dist/skills/frontend/scripts/detect/rules/source/support/source-shadow.ts +17 -10
- package/dist/skills/frontend/scripts/detect/rules/source/support/source-text.ts +128 -86
- package/dist/skills/frontend/scripts/detect/rules/typography/all-caps-body.test.ts +24 -15
- package/dist/skills/frontend/scripts/detect/rules/typography/all-caps-body.ts +23 -9
- package/dist/skills/frontend/scripts/detect/rules/typography/design-system-font-size.test.ts +16 -12
- package/dist/skills/frontend/scripts/detect/rules/typography/design-system-font-size.ts +27 -17
- package/dist/skills/frontend/scripts/detect/rules/typography/design-system-font.test.ts +17 -13
- package/dist/skills/frontend/scripts/detect/rules/typography/design-system-font.ts +27 -17
- package/dist/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.test.ts +50 -14
- package/dist/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.ts +26 -12
- package/dist/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.test.ts +44 -17
- package/dist/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.ts +41 -19
- package/dist/skills/frontend/scripts/detect/rules/typography/index.ts +14 -3
- package/dist/skills/frontend/scripts/detect/rules/typography/italic-serif-display.test.ts +39 -15
- package/dist/skills/frontend/scripts/detect/rules/typography/italic-serif-display.ts +67 -16
- package/dist/skills/frontend/scripts/detect/rules/typography/justified-text.test.ts +39 -22
- package/dist/skills/frontend/scripts/detect/rules/typography/justified-text.ts +47 -25
- package/dist/skills/frontend/scripts/detect/rules/typography/line-length.test.ts +65 -29
- package/dist/skills/frontend/scripts/detect/rules/typography/line-length.ts +37 -21
- package/dist/skills/frontend/scripts/detect/rules/typography/oversized-h1.test.ts +27 -17
- package/dist/skills/frontend/scripts/detect/rules/typography/oversized-h1.ts +35 -14
- package/dist/skills/frontend/scripts/detect/rules/typography/overused-font.test.ts +25 -18
- package/dist/skills/frontend/scripts/detect/rules/typography/overused-font.ts +83 -38
- package/dist/skills/frontend/scripts/detect/rules/typography/support/drawn-enlargement.ts +68 -40
- package/dist/skills/frontend/scripts/detect/rules/typography/support/fading-text.ts +59 -39
- package/dist/skills/frontend/scripts/detect/rules/typography/support/flex-runs.ts +13 -8
- package/dist/skills/frontend/scripts/detect/rules/typography/support/font-family.ts +68 -17
- package/dist/skills/frontend/scripts/detect/rules/typography/support/painted-text.test.ts +110 -46
- package/dist/skills/frontend/scripts/detect/rules/typography/support/painted-text.ts +173 -67
- package/dist/skills/frontend/scripts/detect/rules/typography/support/svg-size.ts +56 -49
- package/dist/skills/frontend/scripts/detect/rules/typography/support/text-context.ts +155 -78
- package/dist/skills/frontend/scripts/detect/rules/typography/support/text-lines.ts +38 -28
- package/dist/skills/frontend/scripts/detect/rules/typography/support/type-hierarchy.ts +43 -38
- package/dist/skills/frontend/scripts/detect/rules/typography/tight-leading.test.ts +109 -37
- package/dist/skills/frontend/scripts/detect/rules/typography/tight-leading.ts +67 -39
- package/dist/skills/frontend/scripts/detect/rules/typography/tiny-text.test.ts +80 -45
- package/dist/skills/frontend/scripts/detect/rules/typography/tiny-text.ts +34 -15
- package/dist/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.test.ts +158 -81
- package/dist/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.ts +52 -22
- package/dist/skills/frontend/scripts/detect/rules/typography/wide-tracking.test.ts +29 -17
- package/dist/skills/frontend/scripts/detect/rules/typography/wide-tracking.ts +37 -19
- package/dist/skills/frontend/scripts/detect/snapshot/collect.ts +154 -145
- package/dist/skills/frontend/scripts/detect/snapshot/style-props.ts +121 -21
- package/dist/skills/frontend/scripts/detect/testing/build-snapshot.ts +140 -65
- package/dist/skills/frontend/scripts/detect/types.ts +81 -76
- package/dist/skills/frontend/scripts/perfection/accent-stripes/color.ts +205 -85
- package/dist/skills/frontend/scripts/perfection/accent-stripes/css-parse.ts +97 -80
- package/dist/skills/frontend/scripts/perfection/accent-stripes/declarations.ts +129 -101
- package/dist/skills/frontend/scripts/perfection/accent-stripes/findings.ts +23 -23
- package/dist/skills/frontend/scripts/perfection/accent-stripes/gradient.ts +43 -42
- package/dist/skills/frontend/scripts/perfection/accent-stripes/lint.ts +75 -60
- package/dist/skills/frontend/scripts/perfection/accent-stripes/markup.ts +131 -106
- package/dist/skills/frontend/scripts/perfection/accent-stripes/selector.ts +28 -25
- package/dist/skills/frontend/scripts/perfection/accent-stripes/tailwind.ts +93 -78
- package/dist/skills/frontend/scripts/perfection/check-accent-stripes.test.ts +111 -62
- package/dist/skills/frontend/scripts/perfection/check-accent-stripes.ts +22 -22
- package/dist/skills/frontend/scripts/perfection/check-draft-guard.test.ts +89 -65
- package/dist/skills/frontend/scripts/perfection/check-draft-guard.ts +24 -24
- package/dist/skills/frontend/scripts/perfection/collect-files.test.ts +36 -33
- package/dist/skills/frontend/scripts/perfection/collect-files.ts +49 -36
- package/dist/skills/frontend/scripts/perfection/draft-guard/findings.ts +10 -9
- package/dist/skills/frontend/scripts/perfection/draft-guard/lint.ts +27 -24
- package/dist/skills/frontend/scripts/perfection/draft-guard/rules.ts +46 -42
- package/dist/skills/frontend/scripts/perfection/draft-guard/text-nodes.ts +98 -75
- package/dist/skills/lsp-setup/scripts/detect-lsp.ts +162 -152
- package/dist/skills/lsp-setup/scripts/lsp-server-table.ts +164 -164
- package/dist/skills/lsp-setup/scripts/verify-lsp.ts +94 -91
- package/dist/skills/programming/SKILL.md +2 -2
- package/dist/skills/programming/scripts/go/new-project.ts +68 -68
- package/dist/skills/programming/scripts/python/new-project.ts +64 -64
- package/dist/skills/programming/scripts/python/new-script.ts +39 -39
- package/dist/skills/programming/scripts/rust/check-no-excuse-rules.test.ts +57 -57
- package/dist/skills/programming/scripts/rust/new-project.ts +60 -57
- package/dist/skills/programming/scripts/scaffolders.test.ts +113 -67
- package/dist/skills/programming/scripts/shared/run-tool.ts +7 -7
- package/dist/skills/programming/scripts/typescript/check-no-excuse-rules.test.ts +53 -53
- package/dist/skills/programming/scripts/typescript/check-no-excuse-rules.ts +96 -36
- package/dist/skills/programming/scripts/typescript/check-test-junk-rules.ts +38 -17
- package/dist/skills/programming/scripts/typescript/check-test-junk.ts +13 -2
- package/dist/skills/programming/scripts/typescript/mutation-proof.test.ts +4 -1
- package/dist/skills/programming/scripts/typescript/mutation-proof.ts +16 -4
- package/dist/skills/programming/scripts/typescript/new-project.test.ts +78 -92
- package/dist/skills/programming/scripts/typescript/new-project.ts +21 -21
- package/dist/skills/ultimate-browsing/engine/templates/knip.workspace.jsonc +31 -0
- package/dist/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +65 -62
- package/dist/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +73 -70
- package/dist/skills/ulw-plan/scripts/plan-templates.mjs +30 -30
- package/dist/skills/ulw-plan/scripts/scaffold-plan.mjs +131 -123
- package/dist/skills/ulw-research/scripts/claim-kinds.mjs +178 -67
- package/dist/skills/ulw-research/scripts/claim-kinds.test.ts +239 -168
- package/dist/skills/ulw-research/scripts/claim-prefix.test.ts +96 -47
- package/dist/skills/ulw-research/scripts/claims-index.mjs +117 -93
- package/dist/skills/ulw-research/scripts/claims-index.test.ts +147 -129
- package/dist/skills/ulw-research/scripts/cli-support.mjs +73 -73
- package/dist/skills/ulw-research/scripts/cli-support.test.ts +85 -74
- package/dist/skills/ulw-research/scripts/contracts-validation.test.ts +64 -64
- package/dist/skills/ulw-research/scripts/contracts.mjs +604 -174
- package/dist/skills/ulw-research/scripts/contracts.test.ts +171 -139
- package/dist/skills/ulw-research/scripts/conversion-altered.test.ts +268 -115
- package/dist/skills/ulw-research/scripts/conversion-originals.test.ts +355 -230
- package/dist/skills/ulw-research/scripts/conversion-probe-classes.test.ts +1319 -283
- package/dist/skills/ulw-research/scripts/conversion-probe.mjs +161 -113
- package/dist/skills/ulw-research/scripts/conversion-probe.test.ts +211 -173
- package/dist/skills/ulw-research/scripts/copy-returns-fidelity-policy.test.ts +201 -125
- package/dist/skills/ulw-research/scripts/copy-returns-polish.test.ts +230 -150
- package/dist/skills/ulw-research/scripts/copy-returns.test.ts +189 -145
- package/dist/skills/ulw-research/scripts/css-hiding.mjs +126 -92
- package/dist/skills/ulw-research/scripts/css-lite.mjs +143 -137
- package/dist/skills/ulw-research/scripts/css-lite.test.ts +136 -128
- package/dist/skills/ulw-research/scripts/delivery-barrier-meaning.test.ts +206 -113
- package/dist/skills/ulw-research/scripts/delivery-barrier.test.ts +191 -141
- package/dist/skills/ulw-research/scripts/design-spec.mjs +123 -107
- package/dist/skills/ulw-research/scripts/design-spec.test.ts +146 -136
- package/dist/skills/ulw-research/scripts/entities.mjs +66 -30
- package/dist/skills/ulw-research/scripts/entry-guard.mjs +8 -8
- package/dist/skills/ulw-research/scripts/fact-commands-fill.mjs +104 -51
- package/dist/skills/ulw-research/scripts/fact-commands-meaning.mjs +207 -105
- package/dist/skills/ulw-research/scripts/fact-commands-polish.mjs +143 -76
- package/dist/skills/ulw-research/scripts/fact-commands-verify.mjs +164 -120
- package/dist/skills/ulw-research/scripts/fact-commands.mjs +264 -151
- package/dist/skills/ulw-research/scripts/fact-derive-2.test.ts +158 -135
- package/dist/skills/ulw-research/scripts/fact-derive.mjs +92 -48
- package/dist/skills/ulw-research/scripts/fact-derive.test.ts +224 -167
- package/dist/skills/ulw-research/scripts/fact-expr.mjs +90 -78
- package/dist/skills/ulw-research/scripts/fact-fill.mjs +215 -127
- package/dist/skills/ulw-research/scripts/fact-fill.test.ts +204 -177
- package/dist/skills/ulw-research/scripts/fact-ledger-grammar.test.ts +293 -141
- package/dist/skills/ulw-research/scripts/fact-ledger-kinds.mjs +305 -131
- package/dist/skills/ulw-research/scripts/fact-ledger-kinds.test.ts +173 -108
- package/dist/skills/ulw-research/scripts/fact-ledger-legacy.test.ts +195 -134
- package/dist/skills/ulw-research/scripts/fact-ledger-schema.mjs +264 -158
- package/dist/skills/ulw-research/scripts/fact-ledger-schema.test.ts +29 -29
- package/dist/skills/ulw-research/scripts/fact-ledger.mjs +93 -57
- package/dist/skills/ulw-research/scripts/fact-ledger.test.ts +243 -221
- package/dist/skills/ulw-research/scripts/fact-locate.mjs +204 -147
- package/dist/skills/ulw-research/scripts/fact-locate.test.ts +143 -88
- package/dist/skills/ulw-research/scripts/fact-pairs.mjs +126 -108
- package/dist/skills/ulw-research/scripts/fact-pairs.test.ts +120 -113
- package/dist/skills/ulw-research/scripts/fact-recompute.mjs +89 -66
- package/dist/skills/ulw-research/scripts/fact-unit-dimensions-2.test.ts +164 -109
- package/dist/skills/ulw-research/scripts/fact-unit-dimensions.test.ts +237 -178
- package/dist/skills/ulw-research/scripts/fact-unit-rules.test.ts +180 -138
- package/dist/skills/ulw-research/scripts/fidelity-binding.mjs +101 -70
- package/dist/skills/ulw-research/scripts/fidelity-binding.test.ts +56 -52
- package/dist/skills/ulw-research/scripts/fidelity-brief.mjs +95 -89
- package/dist/skills/ulw-research/scripts/fidelity-brief.test.ts +167 -160
- package/dist/skills/ulw-research/scripts/fidelity-claims.mjs +76 -48
- package/dist/skills/ulw-research/scripts/fidelity-csv.mjs +27 -27
- package/dist/skills/ulw-research/scripts/fidelity-lexicon.mjs +101 -78
- package/dist/skills/ulw-research/scripts/fidelity-lexicon.test.ts +113 -90
- package/dist/skills/ulw-research/scripts/fidelity-originals.mjs +124 -77
- package/dist/skills/ulw-research/scripts/fidelity-policy.mjs +132 -83
- package/dist/skills/ulw-research/scripts/fidelity-records.mjs +179 -117
- package/dist/skills/ulw-research/scripts/fidelity-snapshot-readability.mjs +38 -33
- package/dist/skills/ulw-research/scripts/fidelity-sources.mjs +92 -54
- package/dist/skills/ulw-research/scripts/fidelity-state.mjs +27 -27
- package/dist/skills/ulw-research/scripts/fidelity-state.test.ts +32 -32
- package/dist/skills/ulw-research/scripts/fidelity-trace.mjs +81 -48
- package/dist/skills/ulw-research/scripts/fidelity-trace.test.ts +48 -32
- package/dist/skills/ulw-research/scripts/fidelity-value-unit.mjs +207 -104
- package/dist/skills/ulw-research/scripts/fidelity-values.mjs +255 -154
- package/dist/skills/ulw-research/scripts/fidelity-values.test.ts +283 -229
- package/dist/skills/ulw-research/scripts/format-extract-css.mjs +74 -74
- package/dist/skills/ulw-research/scripts/format-extract.mjs +161 -134
- package/dist/skills/ulw-research/scripts/format-extract.test.ts +207 -204
- package/dist/skills/ulw-research/scripts/gates-context.test.ts +47 -42
- package/dist/skills/ulw-research/scripts/gates-fidelity.mjs +118 -59
- package/dist/skills/ulw-research/scripts/gates-fidelity.test.ts +62 -45
- package/dist/skills/ulw-research/scripts/gates-figures.mjs +192 -141
- package/dist/skills/ulw-research/scripts/gates-layout.mjs +119 -85
- package/dist/skills/ulw-research/scripts/gates-layout.test.ts +250 -187
- package/dist/skills/ulw-research/scripts/gates-static-headings.test.ts +13 -10
- package/dist/skills/ulw-research/scripts/gates-static.mjs +109 -102
- package/dist/skills/ulw-research/scripts/gates-static.test.ts +310 -287
- package/dist/skills/ulw-research/scripts/gates-structure.mjs +105 -86
- package/dist/skills/ulw-research/scripts/gates-text.mjs +169 -113
- package/dist/skills/ulw-research/scripts/glossary-vocabulary.test.ts +35 -35
- package/dist/skills/ulw-research/scripts/html-foreign-object.mjs +39 -34
- package/dist/skills/ulw-research/scripts/html-lite.mjs +230 -176
- package/dist/skills/ulw-research/scripts/html-lite.test.ts +190 -183
- package/dist/skills/ulw-research/scripts/html-markup.mjs +150 -128
- package/dist/skills/ulw-research/scripts/html-text-map.mjs +125 -96
- package/dist/skills/ulw-research/scripts/html-text-map.test.ts +311 -128
- package/dist/skills/ulw-research/scripts/layout-probe.mjs +10 -8
- package/dist/skills/ulw-research/scripts/layout-probe.test.ts +65 -62
- package/dist/skills/ulw-research/scripts/lexicon.mjs +36 -19
- package/dist/skills/ulw-research/scripts/lexicon.test.ts +95 -49
- package/dist/skills/ulw-research/scripts/markdown-closers.mjs +85 -85
- package/dist/skills/ulw-research/scripts/md-lite-boundaries.test.ts +44 -34
- package/dist/skills/ulw-research/scripts/md-lite.mjs +133 -125
- package/dist/skills/ulw-research/scripts/md-lite.test.ts +289 -233
- package/dist/skills/ulw-research/scripts/meaning-check.mjs +154 -123
- package/dist/skills/ulw-research/scripts/meaning-check.test.ts +258 -173
- package/dist/skills/ulw-research/scripts/number-grammar.mjs +10 -8
- package/dist/skills/ulw-research/scripts/number-grammar.test.ts +31 -24
- package/dist/skills/ulw-research/scripts/numerals.mjs +181 -137
- package/dist/skills/ulw-research/scripts/numerals.test.ts +141 -113
- package/dist/skills/ulw-research/scripts/outcome-start.mjs +50 -36
- package/dist/skills/ulw-research/scripts/outcome-start.test.ts +89 -75
- package/dist/skills/ulw-research/scripts/outcome.mjs +194 -153
- package/dist/skills/ulw-research/scripts/outcome.test.ts +270 -264
- package/dist/skills/ulw-research/scripts/page-source-locator.test.ts +216 -150
- package/dist/skills/ulw-research/scripts/particles-ko.mjs +72 -70
- package/dist/skills/ulw-research/scripts/particles-ko.test.ts +66 -66
- package/dist/skills/ulw-research/scripts/placeholder.mjs +130 -112
- package/dist/skills/ulw-research/scripts/placeholder.test.ts +82 -55
- package/dist/skills/ulw-research/scripts/polish-apply.mjs +67 -51
- package/dist/skills/ulw-research/scripts/polish-apply.test.ts +397 -321
- package/dist/skills/ulw-research/scripts/polish-diff.mjs +10 -5
- package/dist/skills/ulw-research/scripts/polish-diff.test.ts +186 -134
- package/dist/skills/ulw-research/scripts/polish-markup.test.ts +271 -170
- package/dist/skills/ulw-research/scripts/polish-partial.test.ts +60 -34
- package/dist/skills/ulw-research/scripts/polish-project.mjs +67 -57
- package/dist/skills/ulw-research/scripts/polish-rules.mjs +120 -100
- package/dist/skills/ulw-research/scripts/rational.mjs +74 -73
- package/dist/skills/ulw-research/scripts/rational.test.ts +35 -35
- package/dist/skills/ulw-research/scripts/raw-decode.mjs +74 -74
- package/dist/skills/ulw-research/scripts/raw-locator.mjs +32 -24
- package/dist/skills/ulw-research/scripts/raw-snapshot.test.ts +166 -113
- package/dist/skills/ulw-research/scripts/references-fences.test.ts +14 -12
- package/dist/skills/ulw-research/scripts/repair-tracker.mjs +98 -93
- package/dist/skills/ulw-research/scripts/repair-tracker.test.ts +220 -214
- package/dist/skills/ulw-research/scripts/report-tools-2.test.ts +403 -215
- package/dist/skills/ulw-research/scripts/report-tools-3.test.ts +215 -112
- package/dist/skills/ulw-research/scripts/report-tools-4.test.ts +258 -116
- package/dist/skills/ulw-research/scripts/report-tools-5.test.ts +385 -205
- package/dist/skills/ulw-research/scripts/report-tools-commands.mjs +265 -176
- package/dist/skills/ulw-research/scripts/report-tools.mjs +65 -62
- package/dist/skills/ulw-research/scripts/report-tools.test.ts +295 -170
- package/dist/skills/ulw-research/scripts/sentence-split.mjs +63 -43
- package/dist/skills/ulw-research/scripts/sentence-split.test.ts +90 -90
- package/dist/skills/ulw-research/scripts/snapshot-readability.test.ts +107 -83
- package/dist/skills/ulw-research/scripts/source-commands.mjs +199 -125
- package/dist/skills/ulw-research/scripts/source-integrity.test.ts +359 -205
- package/dist/skills/ulw-research/scripts/source-refresh.mjs +91 -54
- package/dist/skills/ulw-research/scripts/source-snapshot.mjs +143 -102
- package/dist/skills/ulw-research/scripts/source-snapshot.test.ts +110 -86
- package/dist/skills/ulw-research/scripts/source-view.mjs +82 -46
- package/dist/skills/ulw-research/scripts/sources-citation.mjs +135 -96
- package/dist/skills/ulw-research/scripts/sources-citation.test.ts +180 -156
- package/dist/skills/ulw-research/scripts/tests/contracts-support.ts +123 -118
- package/dist/skills/ulw-research/scripts/tests/delivery-barrier-session.ts +37 -24
- package/dist/skills/ulw-research/scripts/tests/derive-clock.ts +5 -1
- package/dist/skills/ulw-research/scripts/tests/fact-derive-support.ts +31 -37
- package/dist/skills/ulw-research/scripts/tests/fact-unit-dimensions-support.ts +26 -17
- package/dist/skills/ulw-research/scripts/tests/fact-unit-rules-support.ts +474 -186
- package/dist/skills/ulw-research/scripts/tests/fidelity-values-support.ts +15 -8
- package/dist/skills/ulw-research/scripts/tests/numeral-classes.ts +324 -163
- package/dist/skills/ulw-research/scripts/tests/report-tools-support.ts +226 -103
- package/dist/skills/ulw-research/scripts/tests/value-mode-support.ts +33 -25
- package/dist/skills/ulw-research/scripts/text-normalize.mjs +63 -48
- package/dist/skills/ulw-research/scripts/text-normalize.test.ts +57 -57
- package/dist/skills/ulw-research/scripts/text-similarity.mjs +15 -15
- package/dist/skills/ulw-research/scripts/text-similarity.test.ts +29 -29
- package/dist/skills/ulw-research/scripts/unit-algebra.mjs +98 -66
- package/dist/skills/ulw-research/scripts/unit-errors.mjs +14 -14
- package/dist/skills/ulw-research/scripts/unit-metadata.mjs +30 -14
- package/dist/skills/ulw-research/scripts/unit-pairs.mjs +57 -45
- package/dist/skills/ulw-research/scripts/unit-precision.mjs +39 -25
- package/dist/skills/ulw-research/scripts/unit-rules-shapes.mjs +79 -44
- package/dist/skills/ulw-research/scripts/unit-rules.mjs +262 -135
- package/dist/skills/ulw-research/scripts/units.mjs +96 -65
- package/dist/skills/ulw-research/scripts/units.test.ts +75 -75
- package/dist/skills/ulw-research/scripts/value-mode-unit-classes.test.ts +411 -177
- package/dist/skills/ulw-research/scripts/value-mode-unit.test.ts +264 -154
- package/dist/skills/ulw-research/scripts/value-rules-cli.test.ts +165 -123
- package/dist/skills/ulw-research/scripts/value-rules-followups.test.ts +49 -25
- package/dist/skills/ulw-research/scripts/value-rules-priority.test.ts +69 -47
- package/dist/skills/visual-qa/scripts/ansi.test.ts +32 -32
- package/dist/skills/visual-qa/scripts/ansi.ts +3 -6
- package/dist/skills/visual-qa/scripts/cli.test.ts +57 -57
- package/dist/skills/visual-qa/scripts/cli.ts +52 -52
- package/dist/skills/visual-qa/scripts/east-asian-width.test.ts +47 -47
- package/dist/skills/visual-qa/scripts/east-asian-width.ts +53 -53
- package/dist/skills/visual-qa/scripts/image-diff.test.ts +55 -55
- package/dist/skills/visual-qa/scripts/image-diff.ts +86 -86
- package/dist/skills/visual-qa/scripts/png-crc.ts +16 -16
- package/dist/skills/visual-qa/scripts/png-decode.test.ts +33 -33
- package/dist/skills/visual-qa/scripts/png-decode.ts +167 -167
- package/dist/skills/visual-qa/scripts/png-synth.ts +36 -40
- package/dist/skills/visual-qa/scripts/skill-doc-fields.test.ts +16 -16
- package/dist/skills/visual-qa/scripts/tui-grid.test.ts +49 -49
- package/dist/skills/visual-qa/scripts/tui-grid.ts +63 -63
- package/dist/skills/visual-qa/scripts/types.ts +37 -37
- package/dist/skills/visual-qa/scripts/visual-qa.mjs +268 -289
- package/dist/tools/background-task/index.d.ts +1 -1
- package/dist/tools/glob/constants.d.ts +1 -1
- package/dist/tools/hashline-edit/index.d.ts +2 -2
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/look-at/look-at-session-runner.d.ts +1 -1
- package/dist/tools/task/index.d.ts +1 -1
- package/dist/tui.js +267 -171
- package/package.json +38 -19
- package/packages/lsp-core/src/index.ts +30 -30
- package/packages/lsp-core/src/lsp/bun-command-output.ts +69 -69
- package/packages/lsp-core/src/lsp/bun-project-checks.test.ts +176 -156
- package/packages/lsp-core/src/lsp/bun-project-checks.ts +175 -162
- package/packages/lsp-core/src/lsp/cleanup-errors.test.ts +13 -13
- package/packages/lsp-core/src/lsp/cleanup-errors.ts +7 -7
- package/packages/lsp-core/src/lsp/client-diagnostics-concurrency.integration.test.ts +39 -43
- package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +446 -447
- package/packages/lsp-core/src/lsp/client-diagnostics-pull-timeout.test.ts +55 -48
- package/packages/lsp-core/src/lsp/client-wrapper-outside-cwd.test.ts +59 -59
- package/packages/lsp-core/src/lsp/client-wrapper.test.ts +195 -195
- package/packages/lsp-core/src/lsp/client-wrapper.ts +229 -229
- package/packages/lsp-core/src/lsp/client.ts +374 -374
- package/packages/lsp-core/src/lsp/config-loader.ts +200 -200
- package/packages/lsp-core/src/lsp/connection.ts +76 -76
- package/packages/lsp-core/src/lsp/constants.ts +13 -13
- package/packages/lsp-core/src/lsp/controlled-clock-test-support.ts +69 -69
- package/packages/lsp-core/src/lsp/directory-diagnostics.test.ts +209 -199
- package/packages/lsp-core/src/lsp/directory-diagnostics.ts +171 -168
- package/packages/lsp-core/src/lsp/effective-extension.ts +5 -5
- package/packages/lsp-core/src/lsp/errors.ts +58 -60
- package/packages/lsp-core/src/lsp/fake-bun-test-support.ts +77 -77
- package/packages/lsp-core/src/lsp/format-document.test.ts +136 -130
- package/packages/lsp-core/src/lsp/format-document.ts +54 -54
- package/packages/lsp-core/src/lsp/formatters.ts +108 -108
- package/packages/lsp-core/src/lsp/host-js-runtime.test.ts +116 -120
- package/packages/lsp-core/src/lsp/host-js-runtime.ts +34 -34
- package/packages/lsp-core/src/lsp/infer-extension.ts +50 -50
- package/packages/lsp-core/src/lsp/json-rpc-connection-cancellation.test.ts +83 -77
- package/packages/lsp-core/src/lsp/json-rpc-connection.ts +341 -340
- package/packages/lsp-core/src/lsp/language-mappings.ts +165 -165
- package/packages/lsp-core/src/lsp/manager-lifecycle.test.ts +227 -234
- package/packages/lsp-core/src/lsp/manager-max-clients.test.ts +133 -133
- package/packages/lsp-core/src/lsp/manager.ts +466 -466
- package/packages/lsp-core/src/lsp/outside-context-workspace.ts +22 -22
- package/packages/lsp-core/src/lsp/process-pipe-errors.test.ts +16 -16
- package/packages/lsp-core/src/lsp/process-signal-cleanup.ts +16 -16
- package/packages/lsp-core/src/lsp/process.ts +168 -168
- package/packages/lsp-core/src/lsp/server-definitions.ts +193 -193
- package/packages/lsp-core/src/lsp/server-install-state.ts +33 -33
- package/packages/lsp-core/src/lsp/server-installation.test.ts +347 -347
- package/packages/lsp-core/src/lsp/server-installation.ts +153 -153
- package/packages/lsp-core/src/lsp/server-resolution-local-binary.test.ts +151 -151
- package/packages/lsp-core/src/lsp/server-resolution.ts +102 -99
- package/packages/lsp-core/src/lsp/startup-failure.ts +1 -1
- package/packages/lsp-core/src/lsp/timer-provider.ts +8 -8
- package/packages/lsp-core/src/lsp/transport-protocol.ts +24 -24
- package/packages/lsp-core/src/lsp/transport-request-timeout.test.ts +56 -52
- package/packages/lsp-core/src/lsp/transport.ts +320 -325
- package/packages/lsp-core/src/lsp/types.ts +69 -69
- package/packages/lsp-core/src/lsp/typescript-server-defaults.test.ts +65 -65
- package/packages/lsp-core/src/lsp/utils.test.ts +59 -59
- package/packages/lsp-core/src/lsp/utils.ts +28 -28
- package/packages/lsp-core/src/lsp/workspace-apply-edit-failure.ts +9 -9
- package/packages/lsp-core/src/lsp/workspace-apply-edit-lease.integration.test.ts +203 -204
- package/packages/lsp-core/src/lsp/workspace-apply-edit-sync.integration.test.ts +102 -106
- package/packages/lsp-core/src/lsp/workspace-apply-edit-test-support.ts +153 -153
- package/packages/lsp-core/src/lsp/workspace-apply-edit.integration.test.ts +151 -151
- package/packages/lsp-core/src/lsp/workspace-document-state.test.ts +130 -127
- package/packages/lsp-core/src/lsp/workspace-document-state.ts +342 -345
- package/packages/lsp-core/src/lsp/workspace-edit-adversarial.test.ts +119 -119
- package/packages/lsp-core/src/lsp/workspace-edit-commit.test.ts +120 -120
- package/packages/lsp-core/src/lsp/workspace-edit-commit.ts +171 -173
- package/packages/lsp-core/src/lsp/workspace-edit-contract-evidence.test.ts +49 -48
- package/packages/lsp-core/src/lsp/workspace-edit-contract-evidence.ts +18 -20
- package/packages/lsp-core/src/lsp/workspace-edit-fingerprint.ts +40 -40
- package/packages/lsp-core/src/lsp/workspace-edit-options.test.ts +131 -137
- package/packages/lsp-core/src/lsp/workspace-edit-parse-helpers.ts +42 -41
- package/packages/lsp-core/src/lsp/workspace-edit-parser.ts +108 -108
- package/packages/lsp-core/src/lsp/workspace-edit-path.ts +75 -75
- package/packages/lsp-core/src/lsp/workspace-edit-plan-types.ts +46 -47
- package/packages/lsp-core/src/lsp/workspace-edit-plan.ts +60 -60
- package/packages/lsp-core/src/lsp/workspace-edit-prevalidation.test.ts +161 -161
- package/packages/lsp-core/src/lsp/workspace-edit-resource-parser.ts +74 -74
- package/packages/lsp-core/src/lsp/workspace-edit-simulation.ts +139 -139
- package/packages/lsp-core/src/lsp/workspace-edit-snapshot.ts +45 -42
- package/packages/lsp-core/src/lsp/workspace-edit-text.ts +85 -85
- package/packages/lsp-core/src/lsp/workspace-edit-types.ts +85 -85
- package/packages/lsp-core/src/lsp/workspace-edit.characterization.test.ts +85 -85
- package/packages/lsp-core/src/lsp/workspace-edit.ts +38 -38
- package/packages/lsp-core/src/lsp/workspace-markers.ts +9 -9
- package/packages/lsp-core/src/lsp/workspace-mutation-controller.ts +149 -156
- package/packages/lsp-core/src/mcp-protocol-pin.test.ts +42 -34
- package/packages/lsp-core/src/mcp.ts +89 -91
- package/packages/lsp-core/src/missing-dependency-result.test.ts +118 -118
- package/packages/lsp-core/src/missing-dependency-result.ts +66 -66
- package/packages/lsp-core/src/post-edit/file-location.ts +29 -29
- package/packages/lsp-core/src/post-edit/index.ts +3 -3
- package/packages/lsp-core/src/post-edit/not-installed-guidance.ts +18 -18
- package/packages/lsp-core/src/post-edit/not-installed.test.ts +198 -200
- package/packages/lsp-core/src/post-edit/orchestration.test.ts +161 -153
- package/packages/lsp-core/src/post-edit/orchestration.ts +137 -137
- package/packages/lsp-core/src/request-context.test.ts +189 -187
- package/packages/lsp-core/src/request-context.ts +160 -165
- package/packages/lsp-core/src/tool-surface.test.ts +163 -163
- package/packages/lsp-core/src/tools/bun-directory-diagnostics.test.ts +109 -87
- package/packages/lsp-core/src/tools/bun-directory-diagnostics.ts +68 -60
- package/packages/lsp-core/src/tools/definitions.ts +154 -154
- package/packages/lsp-core/src/tools/diagnostics.ts +121 -121
- package/packages/lsp-core/src/tools/format.test.ts +43 -43
- package/packages/lsp-core/src/tools/format.ts +45 -45
- package/packages/lsp-core/src/tools/index.ts +11 -11
- package/packages/lsp-core/src/tools/install-decision.ts +31 -31
- package/packages/lsp-core/src/tools/navigation.ts +77 -78
- package/packages/lsp-core/src/tools/parameters.test.ts +42 -42
- package/packages/lsp-core/src/tools/parameters.ts +25 -25
- package/packages/lsp-core/src/tools/rename.ts +59 -59
- package/packages/lsp-core/src/tools/result.ts +2 -2
- package/packages/lsp-core/src/tools/runtime.ts +11 -11
- package/packages/lsp-core/src/tools/schema.ts +6 -6
- package/packages/lsp-core/src/tools/status.ts +25 -25
- package/packages/lsp-core/src/tools/symbols.ts +84 -84
- package/packages/lsp-core/src/tools/types.ts +82 -82
- package/packages/lsp-core/src/tools.ts +1 -1
- package/packages/lsp-daemon/dist/cli.js +8 -2
- package/packages/lsp-daemon/dist/client.js +8 -2
- package/packages/lsp-daemon/dist/index.js +8 -2
- package/packages/lsp-tools-mcp/dist/cli.js +8 -2
- package/packages/lsp-tools-mcp/dist/mcp.js +8 -2
- package/packages/lsp-tools-mcp/dist/tools.js +8 -2
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +156 -52
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/knip.workspace.jsonc +40 -0
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/scripts/build.mjs +21 -21
- package/packages/omo-codex/plugin/components/bootstrap/scripts/generate-manifests.mjs +43 -41
- package/packages/omo-codex/plugin/components/bootstrap/src/cli.ts +129 -127
- package/packages/omo-codex/plugin/components/bootstrap/src/download.ts +163 -158
- package/packages/omo-codex/plugin/components/bootstrap/src/environment.ts +226 -209
- package/packages/omo-codex/plugin/components/bootstrap/src/hook.ts +73 -77
- package/packages/omo-codex/plugin/components/bootstrap/src/provision.ts +99 -99
- package/packages/omo-codex/plugin/components/bootstrap/src/setup.ts +240 -237
- package/packages/omo-codex/plugin/components/bootstrap/src/worker.ts +227 -212
- package/packages/omo-codex/plugin/components/bootstrap/test/download.test.ts +235 -235
- package/packages/omo-codex/plugin/components/bootstrap/test/environment.test.ts +352 -346
- package/packages/omo-codex/plugin/components/bootstrap/test/provision.test.ts +426 -419
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/knip.workspace.jsonc +43 -0
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/knip.workspace.jsonc +23 -0
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/src/cli.ts +25 -25
- package/packages/omo-codex/plugin/components/git-bash/src/codex-hook.ts +118 -119
- package/packages/omo-codex/plugin/components/git-bash/src/index.ts +9 -9
- package/packages/omo-codex/plugin/components/git-bash/test/codex-hook.test.ts +168 -168
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/knip.workspace.jsonc +38 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lcx/skills/lcx-contribute-bug-fix/scripts/create-pr-body.mjs +57 -57
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +8 -2
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/knip.workspace.jsonc +42 -0
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/knip.workspace.jsonc +40 -0
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/knip.workspace.jsonc +31 -0
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-guide.mjs +83 -76
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-state.mjs +357 -322
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-transport.mjs +22 -22
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-worktree.mjs +72 -66
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team.mjs +314 -304
- package/packages/omo-codex/plugin/components/teammode/src/cli.ts +5 -5
- package/packages/omo-codex/plugin/components/teammode/src/codex-hook.ts +96 -100
- package/packages/omo-codex/plugin/components/teammode/test/thread-title-hook.test.ts +151 -151
- package/packages/omo-codex/plugin/components/teammode/test/v2-spawn-schema.test.ts +64 -64
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +11 -10
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +11 -10
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/knip.workspace.jsonc +38 -0
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/test-support/package-smoke-fixture.ts +79 -79
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/knip.workspace.jsonc +33 -0
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/knip.workspace.jsonc +38 -0
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
- package/packages/omo-codex/plugin/components/ulw-loop/knip.workspace.jsonc +70 -0
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/knip.workspace.jsonc +60 -0
- package/packages/omo-codex/plugin/package-lock.json +12 -12
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/auto-update-plan.mjs +215 -210
- package/packages/omo-codex/plugin/scripts/auto-update-state.d.mts +14 -14
- package/packages/omo-codex/plugin/scripts/auto-update-state.mjs +53 -53
- package/packages/omo-codex/plugin/scripts/auto-update.mjs +321 -285
- package/packages/omo-codex/plugin/scripts/build-bundled-mcp-runtimes.mjs +61 -58
- package/packages/omo-codex/plugin/scripts/canonical-ultrawork-directive.mjs +12 -6
- package/packages/omo-codex/plugin/scripts/entry-guard.mjs +10 -10
- package/packages/omo-codex/plugin/scripts/hook-status-message.mjs +32 -38
- package/packages/omo-codex/plugin/scripts/install-flow.mjs +30 -30
- package/packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs +75 -73
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/catalog.mjs +81 -75
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/config-paths.mjs +32 -32
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/context7-placeholder-guard.mjs +101 -98
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/multi-agent-mode-guard.mjs +48 -48
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/multi-agent-v2-guard.mjs +196 -187
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/root-settings.mjs +87 -83
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/state.mjs +17 -17
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/subagent-limit-guard.mjs +26 -19
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/toml-section-editor.mjs +372 -371
- package/packages/omo-codex/plugin/scripts/migrate-codex-config.mjs +127 -123
- package/packages/omo-codex/plugin/scripts/spawn-command.mjs +8 -8
- package/packages/omo-codex/plugin/scripts/sync-hook-status-messages.mjs +67 -67
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +207 -198
- package/packages/omo-codex/plugin/scripts/sync-version.mjs +65 -65
- package/packages/omo-codex/plugin/shared/knip.workspace.jsonc +17 -0
- package/packages/omo-codex/plugin/shared/src/config-loader.ts +57 -60
- package/packages/omo-codex/plugin/shared/src/config-migration.ts +130 -115
- package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +255 -228
- package/packages/omo-codex/plugin/skills/ast-grep/references/recipes.md +1 -1
- package/packages/omo-codex/plugin/skills/ast-grep/tests/smoke.ps1 +1 -1
- package/packages/omo-codex/plugin/skills/ast-grep/tests/smoke.sh +1 -1
- package/packages/omo-codex/plugin/skills/browser/runtime/omowright/index.js +16 -16
- package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +5 -5
- package/packages/omo-codex/plugin/skills/browser/runtime/omowright/page-bundle.js +14 -4
- package/packages/omo-codex/plugin/skills/browser/scripts/browser-doctor-report.mjs +36 -9
- package/packages/omo-codex/plugin/skills/browser/scripts/browser-doctor.mjs +24 -7
- package/packages/omo-codex/plugin/skills/browser/scripts/browser-engine-guard.mjs +2 -1
- package/packages/omo-codex/plugin/skills/browser/scripts/browser-install.mjs +40 -8
- package/packages/omo-codex/plugin/skills/debugging/references/scripts/dap.mjs +280 -170
- package/packages/omo-codex/plugin/skills/debugging/references/scripts/fixture-adapter.mjs +104 -42
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/cli.ts +67 -50
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/config.ts +41 -38
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/core/color.ts +109 -94
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/core/page.ts +43 -42
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/core/shadow.ts +38 -29
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/core/source.ts +25 -20
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/detect.ts +63 -45
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/lint.ts +78 -69
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/render/probe-placement.ts +36 -32
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/render/renderer.ts +14 -13
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/render/webview.ts +53 -50
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/report.ts +20 -18
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rule.ts +21 -21
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/ai-color-palette.ts +144 -63
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/cream-palette.ts +41 -27
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/dark-glow.ts +59 -34
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/design-system-color.ts +37 -28
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/gradient-text.ts +68 -45
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/gray-on-color.ts +34 -25
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/index.ts +9 -2
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/low-contrast.ts +106 -43
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/radial-halo.ts +48 -23
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.ts +49 -26
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/animation-opacity.ts +90 -66
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/color-path.ts +43 -6
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/contrast-pairs.ts +75 -38
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/contrast-role.ts +142 -59
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/glow-forms.ts +93 -44
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/gradient-samples.ts +115 -114
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/gradients.ts +77 -66
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/mockup-roots.ts +178 -48
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/page-ignore.ts +6 -2
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/painted-text.ts +171 -108
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/palette-roles.ts +60 -39
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/placeholder-contrast.ts +36 -16
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/stock-accent.ts +48 -18
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/text-colors.ts +88 -62
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.ts +25 -15
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/broken-image.ts +20 -12
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.ts +63 -39
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/index.ts +9 -2
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.ts +53 -25
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.ts +49 -28
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/repeated-container-text.ts +80 -47
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/script-error.ts +42 -34
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/skipped-heading.ts +199 -75
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/support/numbered-label.ts +122 -71
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/support/page-text.ts +32 -24
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.ts +42 -13
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.ts +49 -41
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.ts +10 -10
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/bounce-easing.ts +87 -68
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/buried-raster.ts +83 -64
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.ts +29 -29
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/design-system-radius.ts +33 -26
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.ts +61 -58
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.ts +25 -23
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.ts +16 -14
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.ts +85 -84
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/index.ts +17 -17
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.ts +79 -64
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/marquee.ts +57 -40
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.ts +34 -34
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.ts +92 -58
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.ts +19 -19
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.ts +59 -53
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/side-tab.ts +15 -12
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/appearance.ts +89 -85
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/assert-cases.ts +17 -15
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/borders.ts +178 -136
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/clip-geometry.ts +155 -145
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/css-candidates.ts +60 -54
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/curve-samples.ts +51 -48
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/gradient-pattern.ts +43 -34
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/keyframes.ts +118 -113
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/labels.ts +74 -67
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/raster-state.ts +80 -42
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/index.ts +6 -6
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.ts +116 -55
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.ts +22 -9
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.ts +113 -52
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/cramped-padding.ts +167 -90
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.ts +82 -41
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.ts +74 -37
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/heading-rhythm.ts +49 -24
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/index.ts +14 -3
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.ts +47 -28
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/nested-cards.ts +66 -31
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/straggler.ts +46 -22
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/cards.ts +157 -82
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/clipping.ts +98 -50
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/declared-mockups.ts +100 -36
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/geometry.ts +66 -43
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/hidden-interface.ts +56 -24
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/layout-cases.ts +23 -8
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/line-breaks.ts +28 -16
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/motion.ts +88 -56
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/padding.ts +106 -68
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/rhythm.ts +204 -128
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/text-occlusion.ts +125 -70
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/text-overflow.ts +111 -59
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.ts +27 -16
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/viewport-reflow.ts +38 -23
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/ai-color-palette.ts +17 -6
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.ts +19 -9
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.ts +31 -13
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/bounce-easing.ts +41 -16
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/broken-image.ts +19 -9
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/codex-grid-background.ts +36 -12
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/dark-glow.ts +28 -14
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/em-dash-overuse.ts +17 -9
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/gradient-text.ts +14 -6
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/gray-on-color.ts +18 -7
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/index.ts +18 -1
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/marketing-buzzword.ts +49 -11
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/marquee.ts +16 -6
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/monotonous-spacing.ts +35 -17
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/overused-font.ts +51 -10
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/radial-halo.ts +16 -8
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/side-tab.ts +88 -47
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/accent-scans.ts +103 -62
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/check-source.ts +6 -2
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/corners.ts +148 -80
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/css-effects.ts +86 -66
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/css-scopes.ts +148 -113
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/image-tags.ts +113 -105
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/js-punctuation.ts +47 -30
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/markup-scope.ts +45 -34
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/source-color.ts +64 -29
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/source-shadow.ts +17 -10
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/source-text.ts +128 -86
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/all-caps-body.ts +23 -9
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/design-system-font-size.ts +27 -17
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/design-system-font.ts +27 -17
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.ts +26 -12
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.ts +41 -19
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/index.ts +14 -3
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/italic-serif-display.ts +67 -16
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/justified-text.ts +47 -25
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/line-length.ts +37 -21
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/oversized-h1.ts +35 -14
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/overused-font.ts +83 -38
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/drawn-enlargement.ts +68 -40
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/fading-text.ts +59 -39
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/flex-runs.ts +13 -8
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/font-family.ts +68 -17
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/painted-text.ts +173 -67
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/svg-size.ts +56 -49
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/text-context.ts +155 -78
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/text-lines.ts +38 -28
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/type-hierarchy.ts +43 -38
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/tight-leading.ts +67 -39
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/tiny-text.ts +34 -15
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.ts +52 -22
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/wide-tracking.ts +37 -19
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/snapshot/collect.ts +154 -145
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/snapshot/style-props.ts +121 -21
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/testing/build-snapshot.ts +140 -65
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/types.ts +81 -76
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/accent-stripes/color.ts +205 -85
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/accent-stripes/css-parse.ts +97 -80
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/accent-stripes/declarations.ts +129 -101
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/accent-stripes/findings.ts +23 -23
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/accent-stripes/gradient.ts +43 -42
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/accent-stripes/lint.ts +75 -60
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/accent-stripes/markup.ts +131 -106
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/accent-stripes/selector.ts +28 -25
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/accent-stripes/tailwind.ts +93 -78
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/check-accent-stripes.ts +22 -22
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/check-draft-guard.ts +24 -24
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/collect-files.ts +49 -36
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/draft-guard/findings.ts +10 -9
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/draft-guard/lint.ts +27 -24
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/draft-guard/rules.ts +46 -42
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/draft-guard/text-nodes.ts +98 -75
- package/packages/omo-codex/plugin/skills/lcx-contribute-bug-fix/scripts/create-pr-body.mjs +57 -57
- package/packages/omo-codex/plugin/skills/lsp-setup/scripts/detect-lsp.ts +162 -152
- package/packages/omo-codex/plugin/skills/lsp-setup/scripts/lsp-server-table.ts +164 -164
- package/packages/omo-codex/plugin/skills/lsp-setup/scripts/verify-lsp.ts +94 -91
- package/packages/omo-codex/plugin/skills/programming/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/programming/scripts/go/new-project.ts +68 -68
- package/packages/omo-codex/plugin/skills/programming/scripts/python/new-project.ts +64 -64
- package/packages/omo-codex/plugin/skills/programming/scripts/python/new-script.ts +39 -39
- package/packages/omo-codex/plugin/skills/programming/scripts/rust/new-project.ts +60 -57
- package/packages/omo-codex/plugin/skills/programming/scripts/shared/run-tool.ts +7 -7
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/check-no-excuse-rules.ts +96 -36
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/check-test-junk-rules.ts +38 -17
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/check-test-junk.ts +13 -2
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/mutation-proof.ts +16 -4
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/new-project.ts +21 -21
- package/packages/omo-codex/plugin/skills/teammode/scripts/team-guide.mjs +83 -76
- package/packages/omo-codex/plugin/skills/teammode/scripts/team-state.mjs +357 -322
- package/packages/omo-codex/plugin/skills/teammode/scripts/team-transport.mjs +22 -22
- package/packages/omo-codex/plugin/skills/teammode/scripts/team-worktree.mjs +72 -66
- package/packages/omo-codex/plugin/skills/teammode/scripts/team.mjs +314 -304
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +65 -62
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +73 -70
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/claim-kinds.mjs +178 -67
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/claims-index.mjs +117 -93
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/cli-support.mjs +73 -73
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/contracts.mjs +604 -174
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/conversion-probe.mjs +161 -113
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/css-hiding.mjs +126 -92
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/css-lite.mjs +143 -137
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/design-spec.mjs +123 -107
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/entities.mjs +66 -30
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/entry-guard.mjs +8 -8
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands-fill.mjs +104 -51
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands-meaning.mjs +207 -105
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands-polish.mjs +143 -76
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands-verify.mjs +164 -120
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands.mjs +264 -151
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-derive.mjs +92 -48
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-expr.mjs +90 -78
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-fill.mjs +215 -127
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger-kinds.mjs +305 -131
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger-schema.mjs +264 -158
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger.mjs +93 -57
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-locate.mjs +204 -147
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-pairs.mjs +126 -108
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-recompute.mjs +89 -66
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-binding.mjs +101 -70
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-brief.mjs +95 -89
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-claims.mjs +76 -48
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-csv.mjs +27 -27
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-lexicon.mjs +101 -78
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-originals.mjs +124 -77
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-policy.mjs +132 -83
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-records.mjs +179 -117
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-snapshot-readability.mjs +38 -33
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-sources.mjs +92 -54
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-state.mjs +27 -27
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-trace.mjs +81 -48
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-value-unit.mjs +207 -104
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-values.mjs +255 -154
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/format-extract-css.mjs +74 -74
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/format-extract.mjs +161 -134
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-fidelity.mjs +118 -59
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-figures.mjs +192 -141
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-layout.mjs +119 -85
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-static.mjs +109 -102
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-structure.mjs +105 -86
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-text.mjs +169 -113
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/html-foreign-object.mjs +39 -34
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/html-lite.mjs +230 -176
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/html-markup.mjs +150 -128
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/html-text-map.mjs +125 -96
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/layout-probe.mjs +10 -8
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/lexicon.mjs +36 -19
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/markdown-closers.mjs +85 -85
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/md-lite.mjs +133 -125
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/meaning-check.mjs +154 -123
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/number-grammar.mjs +10 -8
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/numerals.mjs +181 -137
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/outcome-start.mjs +50 -36
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/outcome.mjs +194 -153
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/particles-ko.mjs +72 -70
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/placeholder.mjs +130 -112
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/polish-apply.mjs +67 -51
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/polish-diff.mjs +10 -5
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/polish-project.mjs +67 -57
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/polish-rules.mjs +120 -100
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/rational.mjs +74 -73
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/raw-decode.mjs +74 -74
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/raw-locator.mjs +32 -24
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/repair-tracker.mjs +98 -93
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/report-tools-commands.mjs +265 -176
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/report-tools.mjs +65 -62
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/sentence-split.mjs +63 -43
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/source-commands.mjs +199 -125
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/source-refresh.mjs +91 -54
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/source-snapshot.mjs +143 -102
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/source-view.mjs +82 -46
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/sources-citation.mjs +135 -96
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/text-normalize.mjs +63 -48
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/text-similarity.mjs +15 -15
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-algebra.mjs +98 -66
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-errors.mjs +14 -14
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-metadata.mjs +30 -14
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-pairs.mjs +57 -45
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-precision.mjs +39 -25
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-rules-shapes.mjs +79 -44
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-rules.mjs +262 -135
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/units.mjs +96 -65
- package/packages/omo-codex/plugin/skills/visual-qa/scripts/ansi.ts +3 -6
- package/packages/omo-codex/plugin/skills/visual-qa/scripts/cli.ts +52 -52
- package/packages/omo-codex/plugin/skills/visual-qa/scripts/east-asian-width.ts +53 -53
- package/packages/omo-codex/plugin/skills/visual-qa/scripts/image-diff.ts +86 -86
- package/packages/omo-codex/plugin/skills/visual-qa/scripts/png-crc.ts +16 -16
- package/packages/omo-codex/plugin/skills/visual-qa/scripts/png-decode.ts +167 -167
- package/packages/omo-codex/plugin/skills/visual-qa/scripts/png-synth.ts +36 -40
- package/packages/omo-codex/plugin/skills/visual-qa/scripts/tui-grid.ts +63 -63
- package/packages/omo-codex/plugin/skills/visual-qa/scripts/types.ts +37 -37
- package/packages/omo-codex/plugin/skills/visual-qa/scripts/visual-qa.mjs +268 -289
- package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +110 -90
- package/packages/omo-codex/plugin/test/aggregate-build.test.mjs +36 -36
- package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +229 -222
- package/packages/omo-codex/plugin/test/aggregate-manifest.test.mjs +66 -66
- package/packages/omo-codex/plugin/test/aggregate-mcp.test.mjs +57 -58
- package/packages/omo-codex/plugin/test/aggregate-model-catalog.test.mjs +54 -54
- package/packages/omo-codex/plugin/test/aggregate-plugin-fixture.mjs +219 -201
- package/packages/omo-codex/plugin/test/aggregate.test.mjs +69 -61
- package/packages/omo-codex/plugin/test/auto-update-release-notes.test.mjs +97 -99
- package/packages/omo-codex/plugin/test/auto-update-restart-notice.test.mjs +250 -231
- package/packages/omo-codex/plugin/test/auto-update-state-persistence.test.mjs +28 -28
- package/packages/omo-codex/plugin/test/auto-update.test.mjs +685 -617
- package/packages/omo-codex/plugin/test/bootstrap-binlinks.test.mjs +261 -250
- package/packages/omo-codex/plugin/test/bootstrap-default-role.test.mjs +68 -57
- package/packages/omo-codex/plugin/test/bootstrap-hooks.test.mjs +189 -178
- package/packages/omo-codex/plugin/test/bootstrap-orchestration.test.mjs +356 -342
- package/packages/omo-codex/plugin/test/bootstrap-ps-guard.test.mjs +151 -131
- package/packages/omo-codex/plugin/test/bootstrap-setup.test.mjs +249 -240
- package/packages/omo-codex/plugin/test/canonical-ultrawork-directive.test.mjs +43 -43
- package/packages/omo-codex/plugin/test/component-bin-names.test.mjs +51 -51
- package/packages/omo-codex/plugin/test/component-bundled-cli.test.mjs +338 -344
- package/packages/omo-codex/plugin/test/component-hook-contract-cases.mjs +324 -318
- package/packages/omo-codex/plugin/test/display-metadata.test.mjs +64 -64
- package/packages/omo-codex/plugin/test/hook-status-message.test.mjs +195 -190
- package/packages/omo-codex/plugin/test/index.js +8 -8
- package/packages/omo-codex/plugin/test/install-time-build-runtime.test.mjs +35 -32
- package/packages/omo-codex/plugin/test/lcx-bug-skills.test.mjs +14 -14
- package/packages/omo-codex/plugin/test/lcx-contribute-bug-fix-template.test.mjs +79 -72
- package/packages/omo-codex/plugin/test/lsp-prebuild-layouts.test.mjs +125 -125
- package/packages/omo-codex/plugin/test/materialize-shared-upstreams.test.mjs +144 -113
- package/packages/omo-codex/plugin/test/mcp-research-servers.test.mjs +17 -17
- package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +1062 -1076
- package/packages/omo-codex/plugin/test/multi-agent-v2-regression.test.mjs +68 -62
- package/packages/omo-codex/plugin/test/node-install-surface.test.mjs +28 -24
- package/packages/omo-codex/plugin/test/payload-equivalence.test.mjs +103 -103
- package/packages/omo-codex/plugin/test/scaffold-plan.test.mjs +169 -172
- package/packages/omo-codex/plugin/test/subagent-limit-migration.test.mjs +434 -414
- package/packages/omo-codex/plugin/test/sync-hook-status-messages.test.mjs +129 -129
- package/packages/omo-codex/plugin/test/sync-skills-codex-compatibility.test.mjs +174 -162
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +110 -109
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +268 -235
- package/packages/omo-codex/plugin/test/sync-version.test.mjs +54 -43
- package/packages/omo-codex/plugin/test/teammode-archive-ambiguity.test.mjs +58 -57
- package/packages/omo-codex/plugin/test/teammode-communication.test.mjs +64 -34
- package/packages/omo-codex/plugin/test/teammode-safety-fixture.mjs +87 -87
- package/packages/omo-codex/plugin/test/teammode-safety.test.mjs +308 -293
- package/packages/omo-codex/plugin/test/teammode-thread-links.test.mjs +76 -76
- package/packages/omo-codex/plugin/test/teammode-thread-title.test.mjs +235 -156
- package/packages/omo-codex/plugin/test/teammode-transport.test.mjs +650 -297
- package/packages/omo-codex/plugin/test/teammode-worktree.test.mjs +279 -197
- package/packages/omo-codex/plugin/test/ultrawork-skill-pointer.test.mjs +42 -45
- package/packages/omo-codex/plugin/test/ulw-plan-review-state-contract.test.mjs +280 -266
- package/packages/omo-codex/plugin/test/ulw-plan-skill-contract.test.mjs +16 -16
- package/packages/omo-codex/plugin/test/ulw-research-skill-contract.test.mjs +21 -21
- package/packages/omo-codex/plugin/test/windows-console-hide.test.mjs +91 -86
- package/packages/omo-codex/scripts/check-model-catalog-parity.mjs +46 -32
- package/packages/omo-codex/scripts/install-agent-links.test.mjs +334 -333
- package/packages/omo-codex/scripts/install-bin-links.test.mjs +447 -395
- package/packages/omo-codex/scripts/install-cache-copy.test.mjs +248 -230
- package/packages/omo-codex/scripts/install-cli-args.test.mjs +166 -166
- package/packages/omo-codex/scripts/install-config-autonomous-features.test.mjs +136 -136
- package/packages/omo-codex/scripts/install-config-autonomous.test.mjs +44 -44
- package/packages/omo-codex/scripts/install-config-git-bash.test.mjs +78 -78
- package/packages/omo-codex/scripts/install-config-preservation.test.mjs +38 -38
- package/packages/omo-codex/scripts/install-config-reasoning.test.mjs +145 -142
- package/packages/omo-codex/scripts/install-config.test.mjs +505 -532
- package/packages/omo-codex/scripts/install-delegated-command.test.mjs +225 -221
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +187 -83
- package/packages/omo-codex/scripts/install-generated-bundle.test.mjs +184 -178
- package/packages/omo-codex/scripts/install-git-bash-mcp-env.test.mjs +68 -68
- package/packages/omo-codex/scripts/install-hook-targets.test.mjs +152 -152
- package/packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs +92 -85
- package/packages/omo-codex/scripts/install-local-bun-global-update.test.mjs +48 -39
- package/packages/omo-codex/scripts/install-local-entrypoint.test.mjs +327 -305
- package/packages/omo-codex/scripts/install-local-git-bash-preflight.test.mjs +153 -137
- package/packages/omo-codex/scripts/install-local.mjs +61 -61
- package/packages/omo-codex/scripts/install-local.test.mjs +185 -185
- package/packages/omo-codex/scripts/install-marketplace-cache.test.mjs +166 -152
- package/packages/omo-codex/scripts/install-mcp-context7-runtime.test.mjs +65 -65
- package/packages/omo-codex/scripts/install-mcp-runtime.test.mjs +185 -181
- package/packages/omo-codex/scripts/install-packaged-local.test.mjs +65 -62
- package/packages/omo-codex/scripts/install-project-local-cleanup.test.mjs +292 -324
- package/packages/omo-codex/scripts/install-test-fixtures.mjs +46 -46
- package/packages/shared-skills/index.mjs +5 -7
- package/packages/shared-skills/skill-source-filter.d.ts +7 -7
- package/packages/shared-skills/skill-source-filter.mjs +42 -26
- package/packages/shared-skills/skills/ast-grep/references/recipes.md +1 -1
- package/packages/shared-skills/skills/ast-grep/tests/smoke.ps1 +1 -1
- package/packages/shared-skills/skills/ast-grep/tests/smoke.sh +1 -1
- package/packages/shared-skills/skills/browser/runtime/omowright/index.js +16 -16
- package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +5 -5
- package/packages/shared-skills/skills/browser/runtime/omowright/page-bundle.js +14 -4
- package/packages/shared-skills/skills/browser/scripts/browser-doctor-report.mjs +36 -9
- package/packages/shared-skills/skills/browser/scripts/browser-doctor.mjs +24 -7
- package/packages/shared-skills/skills/browser/scripts/browser-engine-guard.mjs +2 -1
- package/packages/shared-skills/skills/browser/scripts/browser-install.mjs +40 -8
- package/packages/shared-skills/skills/debugging/references/scripts/dap.mjs +280 -170
- package/packages/shared-skills/skills/debugging/references/scripts/dap.test.ts +83 -55
- package/packages/shared-skills/skills/debugging/references/scripts/fixture-adapter.mjs +104 -42
- package/packages/shared-skills/skills/frontend/scripts/detect/cli.ts +67 -50
- package/packages/shared-skills/skills/frontend/scripts/detect/config.test.ts +23 -19
- package/packages/shared-skills/skills/frontend/scripts/detect/config.ts +41 -38
- package/packages/shared-skills/skills/frontend/scripts/detect/core/color.test.ts +19 -19
- package/packages/shared-skills/skills/frontend/scripts/detect/core/color.ts +109 -94
- package/packages/shared-skills/skills/frontend/scripts/detect/core/page.ts +43 -42
- package/packages/shared-skills/skills/frontend/scripts/detect/core/shadow.ts +38 -29
- package/packages/shared-skills/skills/frontend/scripts/detect/core/source.ts +25 -20
- package/packages/shared-skills/skills/frontend/scripts/detect/detect.ts +63 -45
- package/packages/shared-skills/skills/frontend/scripts/detect/lint.test.ts +24 -16
- package/packages/shared-skills/skills/frontend/scripts/detect/lint.ts +78 -69
- package/packages/shared-skills/skills/frontend/scripts/detect/render/probe-placement.test.ts +35 -11
- package/packages/shared-skills/skills/frontend/scripts/detect/render/probe-placement.ts +36 -32
- package/packages/shared-skills/skills/frontend/scripts/detect/render/renderer.ts +14 -13
- package/packages/shared-skills/skills/frontend/scripts/detect/render/webview.ts +53 -50
- package/packages/shared-skills/skills/frontend/scripts/detect/report.ts +20 -18
- package/packages/shared-skills/skills/frontend/scripts/detect/rule.ts +21 -21
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/ai-color-palette.test.ts +84 -53
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/ai-color-palette.ts +144 -63
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/cream-palette.test.ts +27 -15
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/cream-palette.ts +41 -27
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/dark-glow.test.ts +57 -32
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/dark-glow.ts +59 -34
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/design-system-color.test.ts +25 -17
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/design-system-color.ts +37 -28
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/gradient-text.test.ts +63 -15
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/gradient-text.ts +68 -45
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/gray-on-color.test.ts +49 -24
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/gray-on-color.ts +34 -25
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/index.ts +9 -2
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/low-contrast.test.ts +419 -161
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/low-contrast.ts +106 -43
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/placeholder-contrast.test.ts +136 -45
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/radial-halo.test.ts +42 -28
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/radial-halo.ts +48 -23
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.test.ts +45 -18
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.ts +49 -26
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/animation-opacity.ts +90 -66
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/color-path.ts +43 -6
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/contrast-pairs.ts +75 -38
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/contrast-role.ts +142 -59
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/glow-forms.ts +93 -44
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/gradient-samples.ts +115 -114
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/gradients.ts +77 -66
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/mockup-roots.ts +178 -48
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/page-ignore.ts +6 -2
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/painted-text.ts +171 -108
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/palette-roles.ts +60 -39
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/placeholder-contrast.ts +36 -16
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/stock-accent.ts +48 -18
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/text-colors.ts +88 -62
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.test.ts +17 -9
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.ts +25 -15
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/broken-image.test.ts +22 -16
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/broken-image.ts +20 -12
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.test.ts +38 -24
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.ts +63 -39
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/index.ts +9 -2
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.test.ts +14 -9
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.ts +53 -25
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.test.ts +69 -37
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.ts +49 -28
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/repeated-container-text.test.ts +52 -26
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/repeated-container-text.ts +80 -47
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/script-error.test.ts +71 -30
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/script-error.ts +42 -34
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/skipped-heading.test.ts +64 -34
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/skipped-heading.ts +199 -75
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/support/numbered-label.ts +122 -71
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/support/page-text.ts +32 -24
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.test.ts +25 -8
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.ts +42 -13
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.test.ts +40 -31
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.ts +49 -41
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.test.ts +30 -25
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.ts +10 -10
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/bounce-easing.test.ts +80 -53
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/bounce-easing.ts +87 -68
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/buried-raster.test.ts +122 -79
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/buried-raster.ts +83 -64
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.test.ts +20 -20
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.ts +29 -29
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/design-system-radius.test.ts +27 -27
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/design-system-radius.ts +33 -26
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.test.ts +58 -45
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.ts +61 -58
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.test.ts +50 -33
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.ts +25 -23
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.test.ts +74 -60
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.ts +16 -14
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.test.ts +75 -54
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.ts +85 -84
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/index.ts +17 -17
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.test.ts +128 -104
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.ts +79 -64
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/marquee.test.ts +67 -50
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/marquee.ts +57 -40
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.test.ts +67 -54
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.ts +34 -34
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.test.ts +56 -44
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.ts +92 -58
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.test.ts +18 -18
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.ts +19 -19
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.test.ts +57 -44
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.ts +59 -53
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/side-tab.test.ts +112 -72
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/side-tab.ts +15 -12
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/appearance.ts +89 -85
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/assert-cases.ts +17 -15
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/borders.ts +178 -136
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/clip-geometry.ts +155 -145
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/css-candidates.ts +60 -54
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/curve-samples.ts +51 -48
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/gradient-pattern.ts +43 -34
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/keyframes.ts +118 -113
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/labels.ts +74 -67
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/raster-state.ts +80 -42
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/index.ts +6 -6
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.test.ts +71 -37
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.ts +116 -55
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.test.ts +41 -18
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.ts +22 -9
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.test.ts +57 -29
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.ts +113 -52
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/cramped-padding.test.ts +120 -31
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/cramped-padding.ts +167 -90
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.test.ts +43 -24
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.ts +82 -41
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.test.ts +34 -12
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.ts +74 -37
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/heading-rhythm.test.ts +85 -39
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/heading-rhythm.ts +49 -24
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/index.ts +14 -3
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.test.ts +24 -7
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.ts +47 -28
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/nested-cards.test.ts +79 -31
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/nested-cards.ts +66 -31
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/straggler.test.ts +33 -14
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/straggler.ts +46 -22
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/cards.ts +157 -82
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/clipping.ts +98 -50
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/declared-mockups.ts +100 -36
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/geometry.ts +66 -43
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/hidden-interface.ts +56 -24
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/layout-cases.ts +23 -8
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/line-breaks.ts +28 -16
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/motion.ts +88 -56
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/padding.ts +106 -68
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/rhythm.ts +204 -128
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/text-occlusion.test.ts +50 -17
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/text-occlusion.ts +125 -70
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/text-overflow.test.ts +96 -42
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/text-overflow.ts +111 -59
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.test.ts +15 -9
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.ts +27 -16
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/viewport-reflow.test.ts +34 -21
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/viewport-reflow.ts +38 -23
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/ai-color-palette.test.ts +6 -6
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/ai-color-palette.ts +17 -6
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.test.ts +5 -5
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.ts +19 -9
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.test.ts +7 -7
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.ts +31 -13
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/bounce-easing.test.ts +20 -9
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/bounce-easing.ts +41 -16
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/broken-image.test.ts +17 -17
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/broken-image.ts +19 -9
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/codex-grid-background.test.ts +7 -4
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/codex-grid-background.ts +36 -12
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/dark-glow.test.ts +8 -8
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/dark-glow.ts +28 -14
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/em-dash-overuse.test.ts +6 -6
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/em-dash-overuse.ts +17 -9
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/gradient-text.test.ts +5 -5
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/gradient-text.ts +14 -6
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/gray-on-color.test.ts +13 -13
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/gray-on-color.ts +18 -7
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/index.ts +18 -1
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/marketing-buzzword.test.ts +5 -5
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/marketing-buzzword.ts +49 -11
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/marquee.test.ts +11 -5
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/marquee.ts +16 -6
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/monotonous-spacing.test.ts +6 -6
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/monotonous-spacing.ts +35 -17
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/overused-font.test.ts +18 -11
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/overused-font.ts +51 -10
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/radial-halo.test.ts +12 -9
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/radial-halo.ts +16 -8
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/side-tab.test.ts +34 -22
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/side-tab.ts +88 -47
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/accent-scans.ts +103 -62
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/check-source.ts +6 -2
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/corners.ts +148 -80
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/css-effects.ts +86 -66
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/css-scopes.ts +148 -113
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/image-tags.ts +113 -105
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/js-punctuation.ts +47 -30
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/markup-scope.ts +45 -34
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/source-color.ts +64 -29
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/source-shadow.ts +17 -10
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/source-text.ts +128 -86
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/all-caps-body.test.ts +24 -15
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/all-caps-body.ts +23 -9
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/design-system-font-size.test.ts +16 -12
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/design-system-font-size.ts +27 -17
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/design-system-font.test.ts +17 -13
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/design-system-font.ts +27 -17
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.test.ts +50 -14
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.ts +26 -12
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.test.ts +44 -17
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.ts +41 -19
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/index.ts +14 -3
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/italic-serif-display.test.ts +39 -15
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/italic-serif-display.ts +67 -16
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/justified-text.test.ts +39 -22
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/justified-text.ts +47 -25
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/line-length.test.ts +65 -29
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/line-length.ts +37 -21
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/oversized-h1.test.ts +27 -17
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/oversized-h1.ts +35 -14
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/overused-font.test.ts +25 -18
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/overused-font.ts +83 -38
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/drawn-enlargement.ts +68 -40
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/fading-text.ts +59 -39
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/flex-runs.ts +13 -8
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/font-family.ts +68 -17
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/painted-text.test.ts +110 -46
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/painted-text.ts +173 -67
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/svg-size.ts +56 -49
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/text-context.ts +155 -78
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/text-lines.ts +38 -28
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/type-hierarchy.ts +43 -38
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/tight-leading.test.ts +109 -37
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/tight-leading.ts +67 -39
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/tiny-text.test.ts +80 -45
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/tiny-text.ts +34 -15
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.test.ts +158 -81
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.ts +52 -22
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/wide-tracking.test.ts +29 -17
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/wide-tracking.ts +37 -19
- package/packages/shared-skills/skills/frontend/scripts/detect/snapshot/collect.ts +154 -145
- package/packages/shared-skills/skills/frontend/scripts/detect/snapshot/style-props.ts +121 -21
- package/packages/shared-skills/skills/frontend/scripts/detect/testing/build-snapshot.ts +140 -65
- package/packages/shared-skills/skills/frontend/scripts/detect/types.ts +81 -76
- package/packages/shared-skills/skills/frontend/scripts/perfection/accent-stripes/color.ts +205 -85
- package/packages/shared-skills/skills/frontend/scripts/perfection/accent-stripes/css-parse.ts +97 -80
- package/packages/shared-skills/skills/frontend/scripts/perfection/accent-stripes/declarations.ts +129 -101
- package/packages/shared-skills/skills/frontend/scripts/perfection/accent-stripes/findings.ts +23 -23
- package/packages/shared-skills/skills/frontend/scripts/perfection/accent-stripes/gradient.ts +43 -42
- package/packages/shared-skills/skills/frontend/scripts/perfection/accent-stripes/lint.ts +75 -60
- package/packages/shared-skills/skills/frontend/scripts/perfection/accent-stripes/markup.ts +131 -106
- package/packages/shared-skills/skills/frontend/scripts/perfection/accent-stripes/selector.ts +28 -25
- package/packages/shared-skills/skills/frontend/scripts/perfection/accent-stripes/tailwind.ts +93 -78
- package/packages/shared-skills/skills/frontend/scripts/perfection/check-accent-stripes.test.ts +111 -62
- package/packages/shared-skills/skills/frontend/scripts/perfection/check-accent-stripes.ts +22 -22
- package/packages/shared-skills/skills/frontend/scripts/perfection/check-draft-guard.test.ts +89 -65
- package/packages/shared-skills/skills/frontend/scripts/perfection/check-draft-guard.ts +24 -24
- package/packages/shared-skills/skills/frontend/scripts/perfection/collect-files.test.ts +36 -33
- package/packages/shared-skills/skills/frontend/scripts/perfection/collect-files.ts +49 -36
- package/packages/shared-skills/skills/frontend/scripts/perfection/draft-guard/findings.ts +10 -9
- package/packages/shared-skills/skills/frontend/scripts/perfection/draft-guard/lint.ts +27 -24
- package/packages/shared-skills/skills/frontend/scripts/perfection/draft-guard/rules.ts +46 -42
- package/packages/shared-skills/skills/frontend/scripts/perfection/draft-guard/text-nodes.ts +98 -75
- package/packages/shared-skills/skills/lsp-setup/scripts/detect-lsp.ts +162 -152
- package/packages/shared-skills/skills/lsp-setup/scripts/lsp-server-table.ts +164 -164
- package/packages/shared-skills/skills/lsp-setup/scripts/verify-lsp.ts +94 -91
- package/packages/shared-skills/skills/programming/SKILL.md +2 -2
- package/packages/shared-skills/skills/programming/scripts/go/new-project.ts +68 -68
- package/packages/shared-skills/skills/programming/scripts/python/new-project.ts +64 -64
- package/packages/shared-skills/skills/programming/scripts/python/new-script.ts +39 -39
- package/packages/shared-skills/skills/programming/scripts/rust/check-no-excuse-rules.test.ts +57 -57
- package/packages/shared-skills/skills/programming/scripts/rust/new-project.ts +60 -57
- package/packages/shared-skills/skills/programming/scripts/scaffolders.test.ts +113 -67
- package/packages/shared-skills/skills/programming/scripts/shared/run-tool.ts +7 -7
- package/packages/shared-skills/skills/programming/scripts/typescript/check-no-excuse-rules.test.ts +53 -53
- package/packages/shared-skills/skills/programming/scripts/typescript/check-no-excuse-rules.ts +96 -36
- package/packages/shared-skills/skills/programming/scripts/typescript/check-test-junk-rules.ts +38 -17
- package/packages/shared-skills/skills/programming/scripts/typescript/check-test-junk.ts +13 -2
- package/packages/shared-skills/skills/programming/scripts/typescript/mutation-proof.test.ts +4 -1
- package/packages/shared-skills/skills/programming/scripts/typescript/mutation-proof.ts +16 -4
- package/packages/shared-skills/skills/programming/scripts/typescript/new-project.test.ts +78 -92
- package/packages/shared-skills/skills/programming/scripts/typescript/new-project.ts +21 -21
- package/packages/shared-skills/skills/ultimate-browsing/engine/templates/knip.workspace.jsonc +31 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +65 -62
- package/packages/shared-skills/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +73 -70
- package/packages/shared-skills/skills/ulw-plan/scripts/plan-templates.mjs +30 -30
- package/packages/shared-skills/skills/ulw-plan/scripts/scaffold-plan.mjs +131 -123
- package/packages/shared-skills/skills/ulw-research/scripts/claim-kinds.mjs +178 -67
- package/packages/shared-skills/skills/ulw-research/scripts/claim-kinds.test.ts +239 -168
- package/packages/shared-skills/skills/ulw-research/scripts/claim-prefix.test.ts +96 -47
- package/packages/shared-skills/skills/ulw-research/scripts/claims-index.mjs +117 -93
- package/packages/shared-skills/skills/ulw-research/scripts/claims-index.test.ts +147 -129
- package/packages/shared-skills/skills/ulw-research/scripts/cli-support.mjs +73 -73
- package/packages/shared-skills/skills/ulw-research/scripts/cli-support.test.ts +85 -74
- package/packages/shared-skills/skills/ulw-research/scripts/contracts-validation.test.ts +64 -64
- package/packages/shared-skills/skills/ulw-research/scripts/contracts.mjs +604 -174
- package/packages/shared-skills/skills/ulw-research/scripts/contracts.test.ts +171 -139
- package/packages/shared-skills/skills/ulw-research/scripts/conversion-altered.test.ts +268 -115
- package/packages/shared-skills/skills/ulw-research/scripts/conversion-originals.test.ts +355 -230
- package/packages/shared-skills/skills/ulw-research/scripts/conversion-probe-classes.test.ts +1319 -283
- package/packages/shared-skills/skills/ulw-research/scripts/conversion-probe.mjs +161 -113
- package/packages/shared-skills/skills/ulw-research/scripts/conversion-probe.test.ts +211 -173
- package/packages/shared-skills/skills/ulw-research/scripts/copy-returns-fidelity-policy.test.ts +201 -125
- package/packages/shared-skills/skills/ulw-research/scripts/copy-returns-polish.test.ts +230 -150
- package/packages/shared-skills/skills/ulw-research/scripts/copy-returns.test.ts +189 -145
- package/packages/shared-skills/skills/ulw-research/scripts/css-hiding.mjs +126 -92
- package/packages/shared-skills/skills/ulw-research/scripts/css-lite.mjs +143 -137
- package/packages/shared-skills/skills/ulw-research/scripts/css-lite.test.ts +136 -128
- package/packages/shared-skills/skills/ulw-research/scripts/delivery-barrier-meaning.test.ts +206 -113
- package/packages/shared-skills/skills/ulw-research/scripts/delivery-barrier.test.ts +191 -141
- package/packages/shared-skills/skills/ulw-research/scripts/design-spec.mjs +123 -107
- package/packages/shared-skills/skills/ulw-research/scripts/design-spec.test.ts +146 -136
- package/packages/shared-skills/skills/ulw-research/scripts/entities.mjs +66 -30
- package/packages/shared-skills/skills/ulw-research/scripts/entry-guard.mjs +8 -8
- package/packages/shared-skills/skills/ulw-research/scripts/fact-commands-fill.mjs +104 -51
- package/packages/shared-skills/skills/ulw-research/scripts/fact-commands-meaning.mjs +207 -105
- package/packages/shared-skills/skills/ulw-research/scripts/fact-commands-polish.mjs +143 -76
- package/packages/shared-skills/skills/ulw-research/scripts/fact-commands-verify.mjs +164 -120
- package/packages/shared-skills/skills/ulw-research/scripts/fact-commands.mjs +264 -151
- package/packages/shared-skills/skills/ulw-research/scripts/fact-derive-2.test.ts +158 -135
- package/packages/shared-skills/skills/ulw-research/scripts/fact-derive.mjs +92 -48
- package/packages/shared-skills/skills/ulw-research/scripts/fact-derive.test.ts +224 -167
- package/packages/shared-skills/skills/ulw-research/scripts/fact-expr.mjs +90 -78
- package/packages/shared-skills/skills/ulw-research/scripts/fact-fill.mjs +215 -127
- package/packages/shared-skills/skills/ulw-research/scripts/fact-fill.test.ts +204 -177
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-grammar.test.ts +293 -141
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-kinds.mjs +305 -131
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-kinds.test.ts +173 -108
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-legacy.test.ts +195 -134
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-schema.mjs +264 -158
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-schema.test.ts +29 -29
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger.mjs +93 -57
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger.test.ts +243 -221
- package/packages/shared-skills/skills/ulw-research/scripts/fact-locate.mjs +204 -147
- package/packages/shared-skills/skills/ulw-research/scripts/fact-locate.test.ts +143 -88
- package/packages/shared-skills/skills/ulw-research/scripts/fact-pairs.mjs +126 -108
- package/packages/shared-skills/skills/ulw-research/scripts/fact-pairs.test.ts +120 -113
- package/packages/shared-skills/skills/ulw-research/scripts/fact-recompute.mjs +89 -66
- package/packages/shared-skills/skills/ulw-research/scripts/fact-unit-dimensions-2.test.ts +164 -109
- package/packages/shared-skills/skills/ulw-research/scripts/fact-unit-dimensions.test.ts +237 -178
- package/packages/shared-skills/skills/ulw-research/scripts/fact-unit-rules.test.ts +180 -138
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-binding.mjs +101 -70
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-binding.test.ts +56 -52
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-brief.mjs +95 -89
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-brief.test.ts +167 -160
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-claims.mjs +76 -48
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-csv.mjs +27 -27
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-lexicon.mjs +101 -78
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-lexicon.test.ts +113 -90
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-originals.mjs +124 -77
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-policy.mjs +132 -83
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-records.mjs +179 -117
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-snapshot-readability.mjs +38 -33
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-sources.mjs +92 -54
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-state.mjs +27 -27
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-state.test.ts +32 -32
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-trace.mjs +81 -48
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-trace.test.ts +48 -32
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-value-unit.mjs +207 -104
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-values.mjs +255 -154
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-values.test.ts +283 -229
- package/packages/shared-skills/skills/ulw-research/scripts/format-extract-css.mjs +74 -74
- package/packages/shared-skills/skills/ulw-research/scripts/format-extract.mjs +161 -134
- package/packages/shared-skills/skills/ulw-research/scripts/format-extract.test.ts +207 -204
- package/packages/shared-skills/skills/ulw-research/scripts/gates-context.test.ts +47 -42
- package/packages/shared-skills/skills/ulw-research/scripts/gates-fidelity.mjs +118 -59
- package/packages/shared-skills/skills/ulw-research/scripts/gates-fidelity.test.ts +62 -45
- package/packages/shared-skills/skills/ulw-research/scripts/gates-figures.mjs +192 -141
- package/packages/shared-skills/skills/ulw-research/scripts/gates-layout.mjs +119 -85
- package/packages/shared-skills/skills/ulw-research/scripts/gates-layout.test.ts +250 -187
- package/packages/shared-skills/skills/ulw-research/scripts/gates-static-headings.test.ts +13 -10
- package/packages/shared-skills/skills/ulw-research/scripts/gates-static.mjs +109 -102
- package/packages/shared-skills/skills/ulw-research/scripts/gates-static.test.ts +310 -287
- package/packages/shared-skills/skills/ulw-research/scripts/gates-structure.mjs +105 -86
- package/packages/shared-skills/skills/ulw-research/scripts/gates-text.mjs +169 -113
- package/packages/shared-skills/skills/ulw-research/scripts/glossary-vocabulary.test.ts +35 -35
- package/packages/shared-skills/skills/ulw-research/scripts/html-foreign-object.mjs +39 -34
- package/packages/shared-skills/skills/ulw-research/scripts/html-lite.mjs +230 -176
- package/packages/shared-skills/skills/ulw-research/scripts/html-lite.test.ts +190 -183
- package/packages/shared-skills/skills/ulw-research/scripts/html-markup.mjs +150 -128
- package/packages/shared-skills/skills/ulw-research/scripts/html-text-map.mjs +125 -96
- package/packages/shared-skills/skills/ulw-research/scripts/html-text-map.test.ts +311 -128
- package/packages/shared-skills/skills/ulw-research/scripts/layout-probe.mjs +10 -8
- package/packages/shared-skills/skills/ulw-research/scripts/layout-probe.test.ts +65 -62
- package/packages/shared-skills/skills/ulw-research/scripts/lexicon.mjs +36 -19
- package/packages/shared-skills/skills/ulw-research/scripts/lexicon.test.ts +95 -49
- package/packages/shared-skills/skills/ulw-research/scripts/markdown-closers.mjs +85 -85
- package/packages/shared-skills/skills/ulw-research/scripts/md-lite-boundaries.test.ts +44 -34
- package/packages/shared-skills/skills/ulw-research/scripts/md-lite.mjs +133 -125
- package/packages/shared-skills/skills/ulw-research/scripts/md-lite.test.ts +289 -233
- package/packages/shared-skills/skills/ulw-research/scripts/meaning-check.mjs +154 -123
- package/packages/shared-skills/skills/ulw-research/scripts/meaning-check.test.ts +258 -173
- package/packages/shared-skills/skills/ulw-research/scripts/number-grammar.mjs +10 -8
- package/packages/shared-skills/skills/ulw-research/scripts/number-grammar.test.ts +31 -24
- package/packages/shared-skills/skills/ulw-research/scripts/numerals.mjs +181 -137
- package/packages/shared-skills/skills/ulw-research/scripts/numerals.test.ts +141 -113
- package/packages/shared-skills/skills/ulw-research/scripts/outcome-start.mjs +50 -36
- package/packages/shared-skills/skills/ulw-research/scripts/outcome-start.test.ts +89 -75
- package/packages/shared-skills/skills/ulw-research/scripts/outcome.mjs +194 -153
- package/packages/shared-skills/skills/ulw-research/scripts/outcome.test.ts +270 -264
- package/packages/shared-skills/skills/ulw-research/scripts/page-source-locator.test.ts +216 -150
- package/packages/shared-skills/skills/ulw-research/scripts/particles-ko.mjs +72 -70
- package/packages/shared-skills/skills/ulw-research/scripts/particles-ko.test.ts +66 -66
- package/packages/shared-skills/skills/ulw-research/scripts/placeholder.mjs +130 -112
- package/packages/shared-skills/skills/ulw-research/scripts/placeholder.test.ts +82 -55
- package/packages/shared-skills/skills/ulw-research/scripts/polish-apply.mjs +67 -51
- package/packages/shared-skills/skills/ulw-research/scripts/polish-apply.test.ts +397 -321
- package/packages/shared-skills/skills/ulw-research/scripts/polish-diff.mjs +10 -5
- package/packages/shared-skills/skills/ulw-research/scripts/polish-diff.test.ts +186 -134
- package/packages/shared-skills/skills/ulw-research/scripts/polish-markup.test.ts +271 -170
- package/packages/shared-skills/skills/ulw-research/scripts/polish-partial.test.ts +60 -34
- package/packages/shared-skills/skills/ulw-research/scripts/polish-project.mjs +67 -57
- package/packages/shared-skills/skills/ulw-research/scripts/polish-rules.mjs +120 -100
- package/packages/shared-skills/skills/ulw-research/scripts/rational.mjs +74 -73
- package/packages/shared-skills/skills/ulw-research/scripts/rational.test.ts +35 -35
- package/packages/shared-skills/skills/ulw-research/scripts/raw-decode.mjs +74 -74
- package/packages/shared-skills/skills/ulw-research/scripts/raw-locator.mjs +32 -24
- package/packages/shared-skills/skills/ulw-research/scripts/raw-snapshot.test.ts +166 -113
- package/packages/shared-skills/skills/ulw-research/scripts/references-fences.test.ts +14 -12
- package/packages/shared-skills/skills/ulw-research/scripts/repair-tracker.mjs +98 -93
- package/packages/shared-skills/skills/ulw-research/scripts/repair-tracker.test.ts +220 -214
- package/packages/shared-skills/skills/ulw-research/scripts/report-tools-2.test.ts +403 -215
- package/packages/shared-skills/skills/ulw-research/scripts/report-tools-3.test.ts +215 -112
- package/packages/shared-skills/skills/ulw-research/scripts/report-tools-4.test.ts +258 -116
- package/packages/shared-skills/skills/ulw-research/scripts/report-tools-5.test.ts +385 -205
- package/packages/shared-skills/skills/ulw-research/scripts/report-tools-commands.mjs +265 -176
- package/packages/shared-skills/skills/ulw-research/scripts/report-tools.mjs +65 -62
- package/packages/shared-skills/skills/ulw-research/scripts/report-tools.test.ts +295 -170
- package/packages/shared-skills/skills/ulw-research/scripts/sentence-split.mjs +63 -43
- package/packages/shared-skills/skills/ulw-research/scripts/sentence-split.test.ts +90 -90
- package/packages/shared-skills/skills/ulw-research/scripts/snapshot-readability.test.ts +107 -83
- package/packages/shared-skills/skills/ulw-research/scripts/source-commands.mjs +199 -125
- package/packages/shared-skills/skills/ulw-research/scripts/source-integrity.test.ts +359 -205
- package/packages/shared-skills/skills/ulw-research/scripts/source-refresh.mjs +91 -54
- package/packages/shared-skills/skills/ulw-research/scripts/source-snapshot.mjs +143 -102
- package/packages/shared-skills/skills/ulw-research/scripts/source-snapshot.test.ts +110 -86
- package/packages/shared-skills/skills/ulw-research/scripts/source-view.mjs +82 -46
- package/packages/shared-skills/skills/ulw-research/scripts/sources-citation.mjs +135 -96
- package/packages/shared-skills/skills/ulw-research/scripts/sources-citation.test.ts +180 -156
- package/packages/shared-skills/skills/ulw-research/scripts/tests/contracts-support.ts +123 -118
- package/packages/shared-skills/skills/ulw-research/scripts/tests/delivery-barrier-session.ts +37 -24
- package/packages/shared-skills/skills/ulw-research/scripts/tests/derive-clock.ts +5 -1
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fact-derive-support.ts +31 -37
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fact-unit-dimensions-support.ts +26 -17
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fact-unit-rules-support.ts +474 -186
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fidelity-values-support.ts +15 -8
- package/packages/shared-skills/skills/ulw-research/scripts/tests/numeral-classes.ts +324 -163
- package/packages/shared-skills/skills/ulw-research/scripts/tests/report-tools-support.ts +226 -103
- package/packages/shared-skills/skills/ulw-research/scripts/tests/value-mode-support.ts +33 -25
- package/packages/shared-skills/skills/ulw-research/scripts/text-normalize.mjs +63 -48
- package/packages/shared-skills/skills/ulw-research/scripts/text-normalize.test.ts +57 -57
- package/packages/shared-skills/skills/ulw-research/scripts/text-similarity.mjs +15 -15
- package/packages/shared-skills/skills/ulw-research/scripts/text-similarity.test.ts +29 -29
- package/packages/shared-skills/skills/ulw-research/scripts/unit-algebra.mjs +98 -66
- package/packages/shared-skills/skills/ulw-research/scripts/unit-errors.mjs +14 -14
- package/packages/shared-skills/skills/ulw-research/scripts/unit-metadata.mjs +30 -14
- package/packages/shared-skills/skills/ulw-research/scripts/unit-pairs.mjs +57 -45
- package/packages/shared-skills/skills/ulw-research/scripts/unit-precision.mjs +39 -25
- package/packages/shared-skills/skills/ulw-research/scripts/unit-rules-shapes.mjs +79 -44
- package/packages/shared-skills/skills/ulw-research/scripts/unit-rules.mjs +262 -135
- package/packages/shared-skills/skills/ulw-research/scripts/units.mjs +96 -65
- package/packages/shared-skills/skills/ulw-research/scripts/units.test.ts +75 -75
- package/packages/shared-skills/skills/ulw-research/scripts/value-mode-unit-classes.test.ts +411 -177
- package/packages/shared-skills/skills/ulw-research/scripts/value-mode-unit.test.ts +264 -154
- package/packages/shared-skills/skills/ulw-research/scripts/value-rules-cli.test.ts +165 -123
- package/packages/shared-skills/skills/ulw-research/scripts/value-rules-followups.test.ts +49 -25
- package/packages/shared-skills/skills/ulw-research/scripts/value-rules-priority.test.ts +69 -47
- package/packages/shared-skills/skills/visual-qa/scripts/ansi.test.ts +32 -32
- package/packages/shared-skills/skills/visual-qa/scripts/ansi.ts +3 -6
- package/packages/shared-skills/skills/visual-qa/scripts/cli.test.ts +57 -57
- package/packages/shared-skills/skills/visual-qa/scripts/cli.ts +52 -52
- package/packages/shared-skills/skills/visual-qa/scripts/east-asian-width.test.ts +47 -47
- package/packages/shared-skills/skills/visual-qa/scripts/east-asian-width.ts +53 -53
- package/packages/shared-skills/skills/visual-qa/scripts/image-diff.test.ts +55 -55
- package/packages/shared-skills/skills/visual-qa/scripts/image-diff.ts +86 -86
- package/packages/shared-skills/skills/visual-qa/scripts/png-crc.ts +16 -16
- package/packages/shared-skills/skills/visual-qa/scripts/png-decode.test.ts +33 -33
- package/packages/shared-skills/skills/visual-qa/scripts/png-decode.ts +167 -167
- package/packages/shared-skills/skills/visual-qa/scripts/png-synth.ts +36 -40
- package/packages/shared-skills/skills/visual-qa/scripts/skill-doc-fields.test.ts +16 -16
- package/packages/shared-skills/skills/visual-qa/scripts/tui-grid.test.ts +49 -49
- package/packages/shared-skills/skills/visual-qa/scripts/tui-grid.ts +63 -63
- package/packages/shared-skills/skills/visual-qa/scripts/types.ts +37 -37
- package/packages/shared-skills/skills/visual-qa/scripts/visual-qa.mjs +268 -289
- package/postinstall.mjs +76 -80
- package/script/qa/strip-ansi.mjs +3 -3
- package/script/qa/web-terminal-redaction.mjs +8 -8
- package/script/qa/web-terminal-visual-qa.mjs +149 -94
- package/script/qa/xterm-live-terminal.mjs +136 -93
|
@@ -28,8 +28,13 @@ const isFactElement = (name, attrs) => FACT_TAGS.has(name) && (attrs["data-fact"
|
|
|
28
28
|
|
|
29
29
|
/** Each fact span of the markup as {id, start, end, html}, in order; an unclosed one runs to the end. */
|
|
30
30
|
export function factSpans(markup) {
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
const src = String(markup)
|
|
32
|
+
return elementSpans(src, isFactElement).map(({ start, end, tag }) => ({
|
|
33
|
+
id: tag.attrs["data-fact"],
|
|
34
|
+
start,
|
|
35
|
+
end,
|
|
36
|
+
html: src.slice(start, end),
|
|
37
|
+
}))
|
|
33
38
|
}
|
|
34
39
|
|
|
35
40
|
/**
|
|
@@ -38,57 +43,62 @@ export function factSpans(markup) {
|
|
|
38
43
|
* with the markup rules; no second tag-stripping regex.
|
|
39
44
|
*/
|
|
40
45
|
export function textOf(html) {
|
|
41
|
-
|
|
46
|
+
return decodeEntities(markupParts(html).text.join(" ")).replace(/\s+/g, " ")
|
|
42
47
|
}
|
|
43
48
|
|
|
44
49
|
/** The protected projection of (already visible) markup; see the header. */
|
|
45
50
|
export function project(markup) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
51
|
+
const facts = []
|
|
52
|
+
let visible = ""
|
|
53
|
+
let masked = ""
|
|
54
|
+
let at = 0
|
|
55
|
+
for (const span of factSpans(markup)) {
|
|
56
|
+
const outside = textOf(markup.slice(at, span.start))
|
|
57
|
+
facts.push({ id: span.id, html: span.html.replace(/\s+/g, " ") })
|
|
58
|
+
visible += `${outside}${textOf(span.html)}`
|
|
59
|
+
masked += `${outside} ${SLOT} `
|
|
60
|
+
at = span.end
|
|
61
|
+
}
|
|
62
|
+
const rest = textOf(markup.slice(at))
|
|
63
|
+
const links = tagAttributes(markup).flatMap(({ attrs }) =>
|
|
64
|
+
POLISH_LINK_ATTRIBUTES.filter((name) => Object.hasOwn(attrs, name)).map((name) => `${name}=${attrs[name]}`),
|
|
65
|
+
)
|
|
66
|
+
return {
|
|
67
|
+
facts,
|
|
68
|
+
visible: (visible + rest).replace(/\s+/g, " ").trim(),
|
|
69
|
+
masked: (masked + rest).replace(/\s+/g, " ").trim(),
|
|
70
|
+
links,
|
|
71
|
+
}
|
|
62
72
|
}
|
|
63
73
|
|
|
64
74
|
const unitKey = (raw) => (raw === null ? "" : (normalizeUnit(raw) ?? raw.toLowerCase()))
|
|
65
75
|
|
|
66
76
|
/** Ordered numeral keys: a parsed quantity as "value unit" (once), any other digit run as written. */
|
|
67
77
|
export function numeralKeys(text) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
const quantities = []
|
|
79
|
+
for (let found = parseNumeral(text); found !== null; found = parseNumeral(text, found.span[1])) quantities.push(found)
|
|
80
|
+
const keys = []
|
|
81
|
+
let k = 0
|
|
82
|
+
for (const match of text.matchAll(POLISH_DIGITS)) {
|
|
83
|
+
while (k < quantities.length && quantities[k].span[1] <= match.index) k++
|
|
84
|
+
const quantity = quantities[k]
|
|
85
|
+
if (!quantity || quantity.span[0] > match.index) keys.push(match[0])
|
|
86
|
+
else if (!quantity.counted) {
|
|
87
|
+
quantity.counted = true
|
|
88
|
+
keys.push(`${quantity.value}${quantity.range ? `~${quantity.valueEnd}` : ""} ${unitKey(quantity.unitRaw)}`.trim())
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return keys
|
|
82
92
|
}
|
|
83
93
|
|
|
84
94
|
/** term -> occurrence count of each listed term in the text (guard mode of the lexical engine). */
|
|
85
95
|
export function termCounts(text, terms = guardedTerms()) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
96
|
+
const counts = new Map()
|
|
97
|
+
for (const term of terms) {
|
|
98
|
+
const n = [...text.matchAll(lexicalPattern(term, "guard"))].length
|
|
99
|
+
if (n > 0) counts.set(term, n)
|
|
100
|
+
}
|
|
101
|
+
return counts
|
|
92
102
|
}
|
|
93
103
|
|
|
94
104
|
const add = (into, term, n) => into.set(term, (into.get(term) ?? 0) + n)
|
|
@@ -100,26 +110,26 @@ const add = (into, term, n) => into.set(term, (into.get(term) ?? 0) + n)
|
|
|
100
110
|
* qualifier forms name. A ledger term the sentence never held is never required.
|
|
101
111
|
*/
|
|
102
112
|
export function requiredTerms(projection, rows) {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
113
|
+
const required = new Map()
|
|
114
|
+
let cursor = 0
|
|
115
|
+
for (const { text } of splitSentences(projection.masked)) {
|
|
116
|
+
const slots = text.split(SLOT).length - 1
|
|
117
|
+
const facts = projection.facts.slice(cursor, cursor + slots)
|
|
118
|
+
cursor += slots
|
|
119
|
+
const present = termCounts(text)
|
|
120
|
+
const sourced = new Set()
|
|
121
|
+
for (const { id } of facts) {
|
|
122
|
+
const row = rows.get(id)
|
|
123
|
+
for (const term of termCounts(row?.quote ?? "", HEDGES).keys()) sourced.add(term)
|
|
124
|
+
for (const form of QUALIFIER_FORMS[row?.qualifier] ?? []) sourced.add(form)
|
|
125
|
+
}
|
|
126
|
+
for (const [term, n] of present) if (slots === 0 || sourced.has(term)) add(required, term, n)
|
|
127
|
+
}
|
|
128
|
+
return required
|
|
119
129
|
}
|
|
120
130
|
|
|
121
131
|
/** Required terms the text no longer holds as many times, as "term" names. */
|
|
122
132
|
export function missingTerms(required, text) {
|
|
123
|
-
|
|
124
|
-
|
|
133
|
+
const have = termCounts(text, [...required.keys()])
|
|
134
|
+
return [...required].filter(([term, n]) => (have.get(term) ?? 0) < n).map(([term]) => term)
|
|
125
135
|
}
|
|
@@ -28,7 +28,13 @@ import { splitSentences } from "./sentence-split.mjs"
|
|
|
28
28
|
import { normalizeText } from "./text-normalize.mjs"
|
|
29
29
|
|
|
30
30
|
/** The codes polishDefects can emit, in report order. */
|
|
31
|
-
export const POLISH_CODES = Object.freeze([
|
|
31
|
+
export const POLISH_CODES = Object.freeze([
|
|
32
|
+
"polish_diff_fail",
|
|
33
|
+
"polish_hedging_decreased",
|
|
34
|
+
"polish_text_churn",
|
|
35
|
+
"polish_link_changed",
|
|
36
|
+
"polish_name_changed",
|
|
37
|
+
])
|
|
32
38
|
export const TICKER = /(?<![\p{L}\p{N}])(?:[A-Z]{1,5}(?:\.[A-Z]{1,2})?|\d{6})(?![\p{L}\p{N}])/gu
|
|
33
39
|
/** The capitalized-token heuristic for proper nouns in ledger quotes. */
|
|
34
40
|
export const POLISH_NAME = /\p{Lu}[\p{L}\p{N}&'-]+/gu
|
|
@@ -42,86 +48,94 @@ const same = (a, b) => a.length === b.length && a.every((item, k) => item === b[
|
|
|
42
48
|
|
|
43
49
|
/** null when unchanged; a reorder counts only when ordered. */
|
|
44
50
|
function listChange(label, before, after, ordered) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
if (same(before, after)) return null
|
|
52
|
+
const remaining = sorted(before)
|
|
53
|
+
const added = []
|
|
54
|
+
for (const item of after) {
|
|
55
|
+
const at = remaining.indexOf(item)
|
|
56
|
+
if (at === -1) added.push(item)
|
|
57
|
+
else remaining.splice(at, 1)
|
|
58
|
+
}
|
|
59
|
+
if (remaining.length > 0 || added.length > 0)
|
|
60
|
+
return `${label} changed: removed [${remaining.join(", ")}], added [${added.join(", ")}]`
|
|
61
|
+
return ordered ? `${label} reordered: [${before.join(", ")}] became [${after.join(", ")}]` : null
|
|
55
62
|
}
|
|
56
63
|
|
|
57
|
-
const tableRows = (html) =>
|
|
64
|
+
const tableRows = (html) =>
|
|
65
|
+
html
|
|
66
|
+
.split(/<table\b/i)
|
|
67
|
+
.slice(1)
|
|
68
|
+
.map((part) => (part.split(/<\/table\s*>/i)[0].match(/<tr\b/gi) ?? []).length)
|
|
58
69
|
|
|
59
70
|
function levenshtein(a, b) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
if (a === b) return 0
|
|
72
|
+
if (a.length * b.length > DISTANCE_CELLS) return Math.max(a.length, b.length)
|
|
73
|
+
let previous = Array.from({ length: b.length + 1 }, (_, k) => k)
|
|
74
|
+
for (let i = 1; i <= a.length; i++) {
|
|
75
|
+
const current = [i]
|
|
76
|
+
for (let j = 1; j <= b.length; j++) {
|
|
77
|
+
current[j] = Math.min(previous[j] + 1, current[j - 1] + 1, previous[j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1))
|
|
78
|
+
}
|
|
79
|
+
previous = current
|
|
80
|
+
}
|
|
81
|
+
return previous[b.length]
|
|
71
82
|
}
|
|
72
83
|
|
|
73
84
|
/** Changed share of normalized prose: edit distance over unmatched sentence runs / longer length. */
|
|
74
85
|
export function churnRatio(beforeText, afterText) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
86
|
+
const [a, b] = [normalizeText(beforeText), normalizeText(afterText)]
|
|
87
|
+
const longest = Math.max(a.length, b.length)
|
|
88
|
+
if (longest === 0) return 0
|
|
89
|
+
const [sa, sb] = [splitSentences(a).map((s) => s.text), splitSentences(b).map((s) => s.text)]
|
|
90
|
+
const lcs = Array.from({ length: sa.length + 1 }, () => new Array(sb.length + 1).fill(0))
|
|
91
|
+
for (let i = sa.length - 1; i >= 0; i--) {
|
|
92
|
+
for (let j = sb.length - 1; j >= 0; j--)
|
|
93
|
+
lcs[i][j] = sa[i] === sb[j] ? lcs[i + 1][j + 1] + 1 : Math.max(lcs[i + 1][j], lcs[i][j + 1])
|
|
94
|
+
}
|
|
95
|
+
let distance = 0
|
|
96
|
+
let gap = [[], []]
|
|
97
|
+
const flush = () => {
|
|
98
|
+
distance += levenshtein(gap[0].join(" "), gap[1].join(" "))
|
|
99
|
+
gap = [[], []]
|
|
100
|
+
}
|
|
101
|
+
let [i, j] = [0, 0]
|
|
102
|
+
while (i < sa.length || j < sb.length) {
|
|
103
|
+
if (i < sa.length && j < sb.length && sa[i] === sb[j]) {
|
|
104
|
+
flush()
|
|
105
|
+
i++
|
|
106
|
+
j++
|
|
107
|
+
} else if (j >= sb.length || (i < sa.length && lcs[i + 1][j] >= lcs[i][j + 1])) gap[0].push(sa[i++])
|
|
108
|
+
else gap[1].push(sb[j++])
|
|
109
|
+
}
|
|
110
|
+
flush()
|
|
111
|
+
return distance / longest
|
|
100
112
|
}
|
|
101
113
|
|
|
102
114
|
function linkChange(from, to, before, after, ordered) {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
115
|
+
const change = listChange("href and data-claim values", from.links, to.links, ordered)
|
|
116
|
+
if (change) return change
|
|
117
|
+
const ids = (html) =>
|
|
118
|
+
new Set(tagAttributes(html).flatMap(({ attrs }) => (Object.hasOwn(attrs, "id") ? [attrs.id] : [])))
|
|
119
|
+
const [idsBefore, idsAfter] = [ids(before), ids(after)]
|
|
120
|
+
const targets = to.links.filter((link) => link.startsWith("href=#")).map((link) => link.slice(5))
|
|
121
|
+
const broken = targets.filter((href) => idsBefore.has(href.slice(1)) && !idsAfter.has(href.slice(1)))
|
|
122
|
+
return broken.length > 0 ? `internal link targets stopped resolving: [${[...new Set(broken)].join(", ")}]` : null
|
|
110
123
|
}
|
|
111
124
|
|
|
112
125
|
/** Capitalized tokens of the ledger quotes, minus each sentence's first word. */
|
|
113
126
|
function ledgerNames(rows) {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
127
|
+
const names = new Set()
|
|
128
|
+
for (const row of rows) {
|
|
129
|
+
for (const { text } of splitSentences(row.quote ?? "")) {
|
|
130
|
+
const first = text.match(/^\P{L}*\p{L}+/u)?.[0].length ?? 0
|
|
131
|
+
for (const match of text.matchAll(POLISH_NAME)) if (match.index >= first) names.add(match[0])
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return names
|
|
122
135
|
}
|
|
123
136
|
|
|
124
|
-
const hasWord = (text, word) =>
|
|
137
|
+
const hasWord = (text, word) =>
|
|
138
|
+
new RegExp(`(?<![\\p{L}\\p{N}])${word.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}(?![\\p{L}\\p{N}])`, "u").test(text)
|
|
125
139
|
|
|
126
140
|
/**
|
|
127
141
|
* @param {string} beforeHtml
|
|
@@ -131,40 +145,46 @@ const hasWord = (text, word) => new RegExp(`(?<![\\p{L}\\p{N}])${word.replace(/[
|
|
|
131
145
|
* @returns {{ code: string, message: string }[]} in POLISH_CODES order
|
|
132
146
|
*/
|
|
133
147
|
export function polishDefects(beforeHtml, afterHtml, ledger, { ordered = false } = {}) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
148
|
+
const ambiguous = [...new Set([...ambiguousMarkup(beforeHtml), ...ambiguousMarkup(afterHtml)])]
|
|
149
|
+
if (ambiguous.length > 0) return [{ code: "polish_diff_fail", message: `ambiguous markup: ${ambiguous.join(", ")}` }]
|
|
150
|
+
const [beforeParts, afterParts] = [markupParts(beforeHtml), markupParts(afterHtml)]
|
|
151
|
+
const [before, after] = [beforeParts.source, afterParts.source]
|
|
152
|
+
const [from, to] = [project(before), project(after)]
|
|
153
|
+
const rows = ledger?.rows ?? []
|
|
154
|
+
const defects = []
|
|
155
|
+
const note = (code, message) => message && defects.push({ code, message })
|
|
156
|
+
const factKey = (fact) => `${fact.id} ${fact.html}`
|
|
157
|
+
const tickers = (text) => text.match(TICKER) ?? []
|
|
158
|
+
const markupEqual = same(beforeParts.markup, afterParts.markup)
|
|
159
|
+
note("polish_diff_fail", markupEqual ? null : "markup changed")
|
|
160
|
+
note("polish_diff_fail", skeletonChange(beforeHtml, afterHtml))
|
|
161
|
+
note("polish_diff_fail", listChange("fact spans", from.facts.map(factKey), to.facts.map(factKey), ordered))
|
|
162
|
+
note(
|
|
163
|
+
"polish_diff_fail",
|
|
164
|
+
listChange("numerals outside fact spans", numeralKeys(from.masked), numeralKeys(to.masked), ordered),
|
|
165
|
+
)
|
|
166
|
+
note("polish_diff_fail", listChange("tickers", tickers(from.masked), tickers(to.masked), ordered))
|
|
167
|
+
const [rowsBefore, rowsAfter] = [tableRows(before), tableRows(after)]
|
|
168
|
+
if (!same(rowsBefore, rowsAfter))
|
|
169
|
+
note("polish_diff_fail", `table row counts changed: [${rowsBefore}] became [${rowsAfter}]`)
|
|
170
|
+
const required = requiredTerms(from, new Map(rows.map((row) => [row.fact_id, row])))
|
|
171
|
+
if (markupEqual) {
|
|
172
|
+
for (const [index, raw] of beforeParts.text.entries()) {
|
|
173
|
+
const [a, b] = [raw, afterParts.text[index]].map(textOf)
|
|
174
|
+
note("polish_diff_fail", listChange("text-node numerals", numeralKeys(a), numeralKeys(b), ordered))
|
|
175
|
+
note("polish_diff_fail", listChange("text-node tickers", tickers(a), tickers(b), ordered))
|
|
176
|
+
const lost = missingTerms(termCounts(a, [...required.keys()]), b)
|
|
177
|
+
if (lost.length) note("polish_hedging_decreased", `text-node hedges removed: ${lost.join(", ")}`)
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
const missing = missingTerms(required, to.visible)
|
|
181
|
+
if (missing.length > 0)
|
|
182
|
+
note("polish_hedging_decreased", `hedges or qualifiers removed: ${missing.map((term) => `"${term}"`).join(", ")}`)
|
|
183
|
+
const ratio = churnRatio(from.visible, to.visible)
|
|
184
|
+
if (ratio > POLISH_CHURN_LIMIT)
|
|
185
|
+
note("polish_text_churn", `${(ratio * 100).toFixed(1)} percent of the normalized prose changed`)
|
|
186
|
+
note("polish_link_changed", linkChange(from, to, before, after, ordered))
|
|
187
|
+
const lost = [...ledgerNames(rows)].filter((name) => hasWord(from.visible, name) && !hasWord(to.visible, name))
|
|
188
|
+
if (lost.length > 0) note("polish_name_changed", `ledger-quote names missing after polish: ${lost.join(", ")}`)
|
|
189
|
+
return defects.sort((a, b) => POLISH_CODES.indexOf(a.code) - POLISH_CODES.indexOf(b.code))
|
|
170
190
|
}
|
|
@@ -9,99 +9,100 @@ const DECIMAL = /^([+-]?)(\d+)(?:\.(\d+))?$/
|
|
|
9
9
|
const abs = (n) => (n < 0n ? -n : n)
|
|
10
10
|
|
|
11
11
|
function gcd(a, b) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
let x = abs(a)
|
|
13
|
+
let y = abs(b)
|
|
14
|
+
while (y !== 0n) [x, y] = [y, x % y]
|
|
15
|
+
return x
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
function make(num, den) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
if (den === 0n) throw new RangeError("rational: zero denominator")
|
|
20
|
+
const sign = den < 0n ? -1n : 1n
|
|
21
|
+
const g = gcd(num, den) || 1n
|
|
22
|
+
return Object.freeze({ num: (sign * num) / g, den: (sign * den) / g })
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
/** Accepts a rational, a bigint, a safe integer, or a decimal string. */
|
|
26
26
|
function coerce(value) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
if (typeof value === "bigint") return make(value, 1n)
|
|
28
|
+
if (typeof value === "number") {
|
|
29
|
+
if (!Number.isSafeInteger(value))
|
|
30
|
+
throw new TypeError(`rational: ${value} is not a safe integer; pass a decimal string`)
|
|
31
|
+
return make(BigInt(value), 1n)
|
|
32
|
+
}
|
|
33
|
+
if (typeof value === "string") return fromDecimal(value)
|
|
34
|
+
if (value && typeof value.num === "bigint" && typeof value.den === "bigint") return make(value.num, value.den)
|
|
35
|
+
throw new TypeError("rational: expected a rational, bigint, integer, or decimal string")
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
/** "12.50" -> 25/2. Accepts an optional sign, digits, and an optional fraction; nothing else. */
|
|
38
39
|
export function fromDecimal(str) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
const match = DECIMAL.exec(String(str).trim())
|
|
41
|
+
if (!match) throw new SyntaxError(`rational: "${str}" is not a plain decimal`)
|
|
42
|
+
const [, sign, whole, frac = ""] = match
|
|
43
|
+
const num = BigInt(whole + frac) * (sign === "-" ? -1n : 1n)
|
|
44
|
+
return make(num, 10n ** BigInt(frac.length))
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
export function add(a, b) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
const x = coerce(a)
|
|
49
|
+
const y = coerce(b)
|
|
50
|
+
return make(x.num * y.den + y.num * x.den, x.den * y.den)
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
export function sub(a, b) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
const x = coerce(a)
|
|
55
|
+
const y = coerce(b)
|
|
56
|
+
return make(x.num * y.den - y.num * x.den, x.den * y.den)
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
export function mul(a, b) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
const x = coerce(a)
|
|
61
|
+
const y = coerce(b)
|
|
62
|
+
return make(x.num * y.num, x.den * y.den)
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
export function div(a, b) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
const x = coerce(a)
|
|
67
|
+
const y = coerce(b)
|
|
68
|
+
if (y.num === 0n) throw new RangeError("rational: division by zero")
|
|
69
|
+
return make(x.num * y.den, x.den * y.num)
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
export function eq(a, b) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
const x = coerce(a)
|
|
74
|
+
const y = coerce(b)
|
|
75
|
+
return x.num === y.num && x.den === y.den
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
/** Digits of a non-negative integer scaled by 10^-scale, as a decimal string. */
|
|
78
79
|
function placeDecimal(digits, scale) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
if (scale <= 0) return digits + "0".repeat(-scale)
|
|
81
|
+
const padded = digits.padStart(scale + 1, "0")
|
|
82
|
+
return `${padded.slice(0, padded.length - scale)}.${padded.slice(padded.length - scale)}`
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
/** Exact decimal; throws RangeError when the expansion does not terminate. */
|
|
85
86
|
function exactDecimal(r) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
87
|
+
let den = r.den
|
|
88
|
+
let twos = 0
|
|
89
|
+
let fives = 0
|
|
90
|
+
while (den % 2n === 0n) [den, twos] = [den / 2n, twos + 1]
|
|
91
|
+
while (den % 5n === 0n) [den, fives] = [den / 5n, fives + 1]
|
|
92
|
+
if (den !== 1n) throw new RangeError(`rational: ${r.num}/${r.den} has no finite decimal; pass sigFigs`)
|
|
93
|
+
const scale = Math.max(twos, fives)
|
|
94
|
+
const digits = (abs(r.num) * 10n ** BigInt(scale)) / r.den
|
|
95
|
+
return (r.num < 0n ? "-" : "") + placeDecimal(digits.toString(), scale)
|
|
95
96
|
}
|
|
96
97
|
|
|
97
98
|
/** Number of decimal digits in the integer part of |num/den| (0 when below 1). */
|
|
98
99
|
function integerDigits(num, den) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
const whole = num / den
|
|
101
|
+
if (whole > 0n) return whole.toString().length
|
|
102
|
+
let exp = 0
|
|
103
|
+
let scaled = num
|
|
104
|
+
while (scaled < den) [scaled, exp] = [scaled * 10n, exp - 1]
|
|
105
|
+
return exp + 1
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
/**
|
|
@@ -110,19 +111,19 @@ function integerDigits(num, den) {
|
|
|
110
111
|
* with an exponent, so 319999 at 2 figures renders "320000".
|
|
111
112
|
*/
|
|
112
113
|
export function toDecimal(value, sigFigs) {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
114
|
+
const r = coerce(value)
|
|
115
|
+
if (sigFigs === undefined) return exactDecimal(r)
|
|
116
|
+
if (!Number.isInteger(sigFigs) || sigFigs < 1) throw new RangeError("rational: sigFigs must be a positive integer")
|
|
117
|
+
if (r.num === 0n) return sigFigs > 1 ? `0.${"0".repeat(sigFigs - 1)}` : "0"
|
|
118
|
+
const num = abs(r.num)
|
|
119
|
+
const scale = sigFigs - integerDigits(num, r.den)
|
|
120
|
+
const numer = scale >= 0 ? num * 10n ** BigInt(scale) : num
|
|
121
|
+
const denom = scale >= 0 ? r.den : r.den * 10n ** BigInt(-scale)
|
|
122
|
+
let digits = numer / denom
|
|
123
|
+
let places = scale
|
|
124
|
+
if ((numer % denom) * 2n >= denom) digits += 1n
|
|
125
|
+
if (digits.toString().length > sigFigs) [digits, places] = [digits / 10n, places - 1]
|
|
126
|
+
return (r.num < 0n ? "-" : "") + placeDecimal(digits.toString(), places)
|
|
126
127
|
}
|
|
127
128
|
|
|
128
129
|
/**
|
|
@@ -131,9 +132,9 @@ export function toDecimal(value, sigFigs) {
|
|
|
131
132
|
* after leading zeros counts ("320" -> 3, "100" -> 3, "20" -> 2).
|
|
132
133
|
*/
|
|
133
134
|
export function sigFigsOf(decimalStr) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
const match = DECIMAL.exec(String(decimalStr).trim())
|
|
136
|
+
if (!match) throw new SyntaxError(`rational: "${decimalStr}" is not a plain decimal`)
|
|
137
|
+
const [, , whole, frac] = match
|
|
138
|
+
const digits = (whole + (frac ?? "")).replace(/^0+/, "")
|
|
139
|
+
return Math.max(digits.length, 1)
|
|
139
140
|
}
|