lazycodex-ai 5.1.43 → 5.1.45
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/dist/cli/index.js +948 -416
- package/dist/cli/service-auth/keystore.d.ts +4 -2
- package/dist/cli-node/index.js +948 -416
- package/docs/reference/web-terminal-visual-qa.md +8 -0
- package/package.json +1 -1
- package/packages/lsp-daemon/dist/cli.js +4 -4
- package/packages/lsp-daemon/dist/client.js +4 -4
- package/packages/lsp-daemon/dist/index.js +4 -4
- package/packages/lsp-daemon/package.json +3 -3
- package/packages/lsp-tools-mcp/dist/cli.js +4 -4
- package/packages/lsp-tools-mcp/dist/mcp.js +4 -4
- package/packages/lsp-tools-mcp/dist/tools.js +4 -4
- package/packages/lsp-tools-mcp/package.json +3 -3
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +62 -21
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/src/hook.ts +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/biome.json +1 -21
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +4 -4
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/biome.json +1 -21
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +4 -4
- package/packages/omo-codex/plugin/components/lsp/biome.json +1 -21
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +4 -4
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +4 -4
- package/packages/omo-codex/plugin/components/lsp/scripts/build-runtime.mjs +0 -1
- package/packages/omo-codex/plugin/components/lsp/test/codex-hook-not-installed.test.ts +1 -1
- package/packages/omo-codex/plugin/components/rules/biome.json +1 -21
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +4 -4
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/biome.json +1 -21
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +90 -1
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +91 -1
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +4 -4
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-gate-reviewer.toml +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/biome.json +1 -21
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +4 -4
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/biome.json +1 -21
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/directive.md +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/package.json +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/biome.json +1 -21
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +7 -7
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +5 -5
- package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +5 -5
- package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/commit-mutations.mjs +2 -0
- 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/package-lock.json +12 -12
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +7 -7
- package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +2 -0
- package/packages/omo-codex/plugin/skills/browser/SKILL.md +21 -22
- package/packages/omo-codex/plugin/skills/browser/references/commands.md +2 -9
- package/packages/omo-codex/plugin/skills/browser/references/install.md +1 -2
- package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +1 -1
- package/packages/omo-codex/plugin/skills/browser/scripts/browser-doctor.mjs +2 -2
- package/packages/omo-codex/plugin/skills/browser/scripts/browser-engine-guard.mjs +63 -487
- package/packages/omo-codex/plugin/skills/browser/scripts/browser-install.mjs +1 -1
- package/packages/omo-codex/plugin/skills/browser/scripts/omowright.mjs +1 -10
- package/packages/omo-codex/plugin/skills/frontend/SKILL.md +79 -118
- package/packages/omo-codex/plugin/skills/frontend/references/design/README.md +75 -224
- package/packages/omo-codex/plugin/skills/frontend/references/design/stylegallery.md +32 -27
- package/packages/omo-codex/plugin/skills/frontend/references/perfection/README.md +2 -2
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/check-accent-stripes.ts +8 -24
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/check-draft-guard.ts +40 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/collect-files.ts +53 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/draft-guard/findings.ts +16 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/draft-guard/lint.ts +38 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/draft-guard/rules.ts +69 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/draft-guard/text-nodes.ts +121 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/attr-lookalikes.tsx +10 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/bound-values.tsx +12 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/const-generics.tsx +3 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/generics.tsx +7 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/measured-stats.html +6 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/plain-copy.html +9 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/state-copy.html +11 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/attribute-edges.html +7 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/components.tsx +16 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/decorative-badge.vue +7 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/emoji-icons.tsx +9 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/jsx-edges.tsx +1 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/promo-copy.html +6 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/promo-copy.tsx +8 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/vanity-stats.html +5 -0
- package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/programming/SKILL.md +10 -7
- package/packages/omo-codex/plugin/skills/programming/references/typescript/README.md +10 -7
- package/packages/omo-codex/plugin/skills/programming/references/typescript/bootstrap.md +9 -23
- package/packages/omo-codex/plugin/skills/programming/references/typescript/oxc-lint.md +130 -0
- package/packages/omo-codex/plugin/skills/programming/references/typescript/tsconfig-strict.md +6 -62
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/check-no-excuse-rules.ts +12 -12
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/new-project.ts +20 -81
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/oxc/.oxfmtrc.json +9 -0
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/oxc/.oxlintrc.json +46 -0
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/LICENSE +21 -0
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/index.js +10 -0
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/no-em-dash-copy.js +28 -0
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/require-suppression-reason.js +62 -0
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/oxc/tsconfig.json +29 -0
- package/packages/omo-codex/plugin/skills/refactor/SKILL.md +14 -14
- package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/review-work/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/ulw-execute/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/ulw-research/AGENTS.md +9 -3
- package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/ulw-research/references/deliverable-phase.md +7 -6
- package/packages/omo-codex/plugin/skills/ulw-research/references/fact-ledger-grammar.md +116 -0
- package/packages/omo-codex/plugin/skills/ulw-research/references/report-gates.md +51 -3
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/claims-index.mjs +125 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/contracts.mjs +68 -3
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger-kinds.mjs +136 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger-schema.mjs +204 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger.mjs +103 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-brief.mjs +145 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-state.mjs +63 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-static.mjs +1 -1
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-structure.mjs +1 -1
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-text.mjs +1 -27
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/lexicon.mjs +47 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/numerals.mjs +226 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/outcome.mjs +2 -3
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/particles-ko.mjs +108 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/rational.mjs +139 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/report-tools-commands.mjs +2 -2
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/sentence-split.mjs +77 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/text-normalize.mjs +82 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/text-similarity.mjs +28 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/units.mjs +105 -0
- package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +71 -64
- package/packages/omo-codex/plugin/test/component-bundled-cli.test.mjs +4 -1
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +6 -6
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +152 -23
- package/packages/shared-skills/skills/browser/SKILL.md +21 -22
- package/packages/shared-skills/skills/browser/references/commands.md +2 -9
- package/packages/shared-skills/skills/browser/references/install.md +1 -2
- package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +1 -1
- package/packages/shared-skills/skills/browser/scripts/browser-doctor.mjs +2 -2
- package/packages/shared-skills/skills/browser/scripts/browser-engine-guard.mjs +63 -487
- package/packages/shared-skills/skills/browser/scripts/browser-install.mjs +1 -1
- package/packages/shared-skills/skills/browser/scripts/omowright.mjs +1 -10
- package/packages/shared-skills/skills/frontend/SKILL.md +79 -118
- package/packages/shared-skills/skills/frontend/references/design/README.md +75 -224
- package/packages/shared-skills/skills/frontend/references/design/stylegallery.md +32 -27
- package/packages/shared-skills/skills/frontend/references/perfection/README.md +2 -2
- package/packages/shared-skills/skills/frontend/scripts/perfection/check-accent-stripes.ts +8 -24
- package/packages/shared-skills/skills/frontend/scripts/perfection/check-draft-guard.test.ts +101 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/check-draft-guard.ts +40 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/collect-files.test.ts +50 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/collect-files.ts +53 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/draft-guard/findings.ts +16 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/draft-guard/lint.ts +38 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/draft-guard/rules.ts +69 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/draft-guard/text-nodes.ts +121 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/attr-lookalikes.tsx +10 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/bound-values.tsx +12 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/const-generics.tsx +3 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/generics.tsx +7 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/measured-stats.html +6 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/plain-copy.html +9 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/state-copy.html +11 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/attribute-edges.html +7 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/components.tsx +16 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/decorative-badge.vue +7 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/emoji-icons.tsx +9 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/jsx-edges.tsx +1 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/promo-copy.html +6 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/promo-copy.tsx +8 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/vanity-stats.html +5 -0
- package/packages/shared-skills/skills/programming/SKILL.md +10 -7
- package/packages/shared-skills/skills/programming/references/typescript/README.md +10 -7
- package/packages/shared-skills/skills/programming/references/typescript/bootstrap.md +9 -23
- package/packages/shared-skills/skills/programming/references/typescript/oxc-lint.md +130 -0
- package/packages/shared-skills/skills/programming/references/typescript/tsconfig-strict.md +6 -62
- package/packages/shared-skills/skills/programming/scripts/typescript/check-no-excuse-rules.ts +12 -12
- package/packages/shared-skills/skills/programming/scripts/typescript/new-project.test.ts +162 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/new-project.ts +20 -81
- package/packages/shared-skills/skills/programming/scripts/typescript/oxc/.oxfmtrc.json +9 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/oxc/.oxlintrc.json +46 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/LICENSE +21 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/index.js +10 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/no-em-dash-copy.js +28 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/require-suppression-reason.js +62 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/oxc/tsconfig.json +29 -0
- package/packages/shared-skills/skills/refactor/SKILL.md +13 -13
- package/packages/shared-skills/skills/ulw-execute/SKILL.md +1 -1
- package/packages/shared-skills/skills/ulw-research/AGENTS.md +9 -3
- package/packages/shared-skills/skills/ulw-research/SKILL.md +2 -2
- package/packages/shared-skills/skills/ulw-research/references/deliverable-phase.md +7 -6
- package/packages/shared-skills/skills/ulw-research/references/fact-ledger-grammar.md +116 -0
- package/packages/shared-skills/skills/ulw-research/references/report-gates.md +51 -3
- package/packages/shared-skills/skills/ulw-research/scripts/claims-index.mjs +125 -0
- package/packages/shared-skills/skills/ulw-research/scripts/claims-index.test.ts +149 -0
- package/packages/shared-skills/skills/ulw-research/scripts/contracts.mjs +68 -3
- package/packages/shared-skills/skills/ulw-research/scripts/contracts.test.ts +97 -12
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-grammar.test.ts +190 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-kinds.mjs +136 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-kinds.test.ts +141 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-schema.mjs +204 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-schema.test.ts +43 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger.mjs +103 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger.test.ts +252 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-brief.mjs +145 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-brief.test.ts +179 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-state.mjs +63 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-state.test.ts +46 -0
- package/packages/shared-skills/skills/ulw-research/scripts/gates-context.test.ts +64 -0
- package/packages/shared-skills/skills/ulw-research/scripts/gates-static.mjs +1 -1
- package/packages/shared-skills/skills/ulw-research/scripts/gates-structure.mjs +1 -1
- package/packages/shared-skills/skills/ulw-research/scripts/gates-text.mjs +1 -27
- package/packages/shared-skills/skills/ulw-research/scripts/lexicon.mjs +47 -0
- package/packages/shared-skills/skills/ulw-research/scripts/lexicon.test.ts +57 -0
- package/packages/shared-skills/skills/ulw-research/scripts/numerals.mjs +226 -0
- package/packages/shared-skills/skills/ulw-research/scripts/numerals.test.ts +120 -0
- package/packages/shared-skills/skills/ulw-research/scripts/outcome.mjs +2 -3
- package/packages/shared-skills/skills/ulw-research/scripts/outcome.test.ts +29 -0
- package/packages/shared-skills/skills/ulw-research/scripts/particles-ko.mjs +108 -0
- package/packages/shared-skills/skills/ulw-research/scripts/particles-ko.test.ts +86 -0
- package/packages/shared-skills/skills/ulw-research/scripts/rational.mjs +139 -0
- package/packages/shared-skills/skills/ulw-research/scripts/rational.test.ts +46 -0
- package/packages/shared-skills/skills/ulw-research/scripts/report-tools-commands.mjs +2 -2
- package/packages/shared-skills/skills/ulw-research/scripts/sentence-split.mjs +77 -0
- package/packages/shared-skills/skills/ulw-research/scripts/sentence-split.test.ts +109 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/claim-graph.md +13 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity-brief-locked.md +17 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity-brief-pending.md +17 -0
- package/packages/shared-skills/skills/ulw-research/scripts/text-normalize.mjs +82 -0
- package/packages/shared-skills/skills/ulw-research/scripts/text-normalize.test.ts +73 -0
- package/packages/shared-skills/skills/ulw-research/scripts/text-similarity.mjs +28 -0
- package/packages/shared-skills/skills/ulw-research/scripts/text-similarity.test.ts +38 -0
- package/packages/shared-skills/skills/ulw-research/scripts/units.mjs +105 -0
- package/packages/shared-skills/skills/ulw-research/scripts/units.test.ts +83 -0
- package/packages/shared-skills/skills/visual-qa/SKILL.md +70 -63
- package/packages/shared-skills/skills/visual-qa/scripts/skill-doc-fields.test.ts +34 -0
- package/script/qa/web-terminal-visual-qa.mjs +6 -2
- package/script/qa/xterm-live-terminal.mjs +26 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: programming
|
|
3
|
-
description: "Applies strict, modern language practice (typed errors, exhaustive match, tests that can fail) for Python, Rust, TypeScript, and Go. Use for work on .py, .rs, .ts, or .go files."
|
|
3
|
+
description: "Applies strict, modern language practice (typed errors, exhaustive match, tests that can fail) for Python, Rust, TypeScript, JavaScript, and Go. Use for work on .py, .rs, .ts, .js, or .go files."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Programming
|
|
@@ -22,7 +22,7 @@ This skill is an index. The hard per-language rules live under `references/`. Lo
|
|
|
22
22
|
|---|---|
|
|
23
23
|
| `.py`, `.pyi`, "Python" | `references/python/README.md` + every file under `references/python/` that the README tells you to load on demand |
|
|
24
24
|
| `.rs`, `Cargo.toml`, "Rust" | `references/rust/README.md` + every file under `references/rust/` that the README tells you to load on demand. **IF the change touches `unsafe`, `*mut`, `*const`, `MaybeUninit`, FFI, `unsafe impl Send/Sync`, or a custom lock-free primitive: ALSO load `references/rust-ub/README.md` plus every file under `references/rust-ub/`.** |
|
|
25
|
-
| `.ts`, `.tsx`, `.mts`, `.cts`, "TypeScript" | `references/typescript/README.md` + every file under `references/typescript/` that the README tells you to load on demand |
|
|
25
|
+
| `.ts`, `.tsx`, `.mts`, `.cts`, `.js`, `.jsx`, `.mjs`, `.cjs`, "TypeScript" / "JavaScript" | `references/typescript/README.md` + every file under `references/typescript/` that the README tells you to load on demand |
|
|
26
26
|
| `.go`, `go.mod`, `go.sum`, `.golangci.yml`, `*.proto` next to a Go module, "Go" / "Golang" | `references/go/README.md` + every file under `references/go/` that the README tells you to load on demand |
|
|
27
27
|
|
|
28
28
|
3. Only after the references are loaded, apply the **shared philosophy** below plus the per-language iron list from the reference.
|
|
@@ -176,12 +176,14 @@ A bare default constructor for any of these (no timeouts, no pool tuning, no sch
|
|
|
176
176
|
|---|---|---|---|---|
|
|
177
177
|
| Package / project manager | **uv** (NEVER pip/poetry/conda) | **cargo** + `cargo-nextest` + `cargo-machete` + `cargo-deny` | **Bun** (runtime + package manager); pnpm if Node is forced | **`go modules`** + `go work` for monorepos |
|
|
178
178
|
| Type checker | **basedpyright** with `typeCheckingMode = "all"` | the Rust compiler with `-D warnings` + clippy `pedantic` + `nursery` + `cargo` groups | `tsc --noEmit` (or `tsgo` when available) with `strict` + `noUncheckedIndexedAccess` + `exactOptionalPropertyTypes` + `verbatimModuleSyntax` | the Go compiler + **`golangci-lint v2`** with the strict bundle + **`nilaway`** (nil-deref static analysis) |
|
|
179
|
-
| Linter + formatter | **ruff** with `select = ["ALL"]` | `clippy` + `rustfmt` | **
|
|
179
|
+
| Linter + formatter | **ruff** with `select = ["ALL"]` | `clippy` + `rustfmt` | **oxlint + oxfmt**, with the local copy and suppression-reason rules | **`gofumpt`** (stricter gofmt) + `goimports -local` + `golangci-lint v2` |
|
|
180
180
|
| Test runner | **pytest** | **cargo-nextest** | `bun test` / `vitest` | stdlib `go test -race -shuffle=on -count=1` + `goleak` |
|
|
181
181
|
| UB / soundness gate | (n/a) | **nightly miri** with strict provenance + Tree Borrows pass | (n/a) | **`nilaway`** + `-race` detector + `goleak` are the equivalent gate |
|
|
182
182
|
| Disposable scripts | **PEP 723** inline metadata + `uv run script.py` | **rust-script** with inline `Cargo.toml` block | `bun run script.ts` | `//go:build ignore` + `go run script.go` |
|
|
183
183
|
| Bootstrap a new project | `scripts/python/new-project.py` | `scripts/rust/new-project.py` | `scripts/typescript/new-project.ts` | `scripts/go/new-project.py` |
|
|
184
|
-
| Pre-commit / CI gate | `ruff check . && basedpyright && pytest` | `cargo clippy --all-targets -- -D warnings && cargo nextest run && cargo test --doc && cargo +nightly miri nextest run` | `bunx
|
|
184
|
+
| Pre-commit / CI gate | `ruff check . && basedpyright && pytest` | `cargo clippy --all-targets -- -D warnings && cargo nextest run && cargo test --doc && cargo +nightly miri nextest run` | `bunx oxlint --type-aware --deny-warnings && bunx oxfmt --check && bunx tsc --noEmit && bun test` | `gofumpt -l . && golangci-lint run ./... && nilaway ./... && go test -race -shuffle=on -count=1 ./...` |
|
|
185
|
+
|
|
186
|
+
For TS/JS, **use oxlint + oxfmt with these two rules by default**: `no-em-dash-copy` and `require-suppression-reason`. Strongly prefer this OXC toolchain for new projects; retain ESLint, Prettier, or Biome only when the repository already uses them. Load [`references/typescript/oxc-lint.md`](references/typescript/oxc-lint.md) for the complete configs, plugin, and type-aware support requirements. Rewrite paired em dashes as asides using parentheses or commas, not colon chains.
|
|
185
187
|
|
|
186
188
|
A `tsconfig.json` with `"strict": true` alone is **not** strict. The reference enumerates the additional flags. Same for `pyproject.toml` and `Cargo.toml` - the references contain the canonical full configuration.
|
|
187
189
|
|
|
@@ -348,13 +350,14 @@ These two skills are not optional cosmetics. They are the recovery path for the
|
|
|
348
350
|
| Canonical library defaults | `references/rust/libraries.md` |
|
|
349
351
|
| **ANY `unsafe` / FFI / `MaybeUninit` / lock-free work** | **`references/rust-ub/` (full directory)** |
|
|
350
352
|
|
|
351
|
-
### TypeScript (`.ts`, `.tsx`, `.mts`, `.cts`)
|
|
353
|
+
### TypeScript / JavaScript (`.ts`, `.tsx`, `.mts`, `.cts`, `.js`, `.jsx`, `.mjs`, `.cjs`)
|
|
352
354
|
|
|
353
355
|
**READ `references/typescript/README.md` FIRST.** Then load on demand:
|
|
354
356
|
|
|
355
357
|
| Need | Load |
|
|
356
358
|
|---|---|
|
|
357
|
-
| Strict tsconfig
|
|
359
|
+
| Strict tsconfig | `references/typescript/tsconfig-strict.md` |
|
|
360
|
+
| Default oxlint + oxfmt configs and copy rules | `references/typescript/oxc-lint.md` |
|
|
358
361
|
| Type patterns (branded types, `as const`, `satisfies`, narrowing, `assertNever`) | `references/typescript/type-patterns.md` |
|
|
359
362
|
| Data modeling (type vs interface vs Zod, readonly, parse-don't-validate) | `references/typescript/data-modeling.md` |
|
|
360
363
|
| Error handling (Result, typed errors, union vs throw, AbortSignal timeouts) | `references/typescript/error-handling.md` |
|
|
@@ -386,6 +389,6 @@ These two skills are not optional cosmetics. They are the recovery path for the
|
|
|
386
389
|
|
|
387
390
|
## Activation
|
|
388
391
|
|
|
389
|
-
This skill activates whenever you are writing or modifying any `.py`, `.pyi`, `.rs`, `.ts`, `.tsx`, `.mts`, `.cts`, `.go` file, or any project manifest (`pyproject.toml`, `Cargo.toml`, `package.json`, `tsconfig.json`,
|
|
392
|
+
This skill activates whenever you are writing or modifying any `.py`, `.pyi`, `.rs`, `.ts`, `.tsx`, `.mts`, `.cts`, `.js`, `.jsx`, `.mjs`, `.cjs`, `.go` file, or any project manifest (`pyproject.toml`, `Cargo.toml`, `package.json`, `tsconfig.json`, `.oxlintrc.json`, `.oxfmtrc.json`, `go.mod`, `go.sum`, `.golangci.yml`, `Taskfile.yml`, `buf.yaml`, `sqlc.yaml`). **Even one-off scripts get the full treatment** - that is the whole point of `uv run` + PEP 723, `rust-script`, `bun run`, and `go run` + `//go:build ignore`: production hygiene with throwaway ergonomics.
|
|
390
393
|
|
|
391
394
|
The references contain the recipes. **Read them before writing code. Re-read them when the model drifts.** The post-write review loop is non-negotiable.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
# TypeScript Programmer
|
|
2
|
+
# TypeScript / JavaScript Programmer
|
|
3
3
|
|
|
4
4
|
Modern TypeScript. Type-strict, stack-first, async-correct.
|
|
5
5
|
|
|
@@ -17,7 +17,7 @@ These are deliberate project choices. Violations are always wrong, not "style pr
|
|
|
17
17
|
|---|---|---|
|
|
18
18
|
| Runtime | Bun (native TS, single binary) | ts-node, tsx |
|
|
19
19
|
| Package manager | `pnpm` | npm, yarn (unless workspace requires it) |
|
|
20
|
-
| Linter + formatter |
|
|
20
|
+
| Linter + formatter | **oxlint + oxfmt**, with both local copy rules | New ESLint, Prettier, or Biome setups; retain them only in repositories already using them |
|
|
21
21
|
| Type checker | `tsc --noEmit` with strict config | skip type checking |
|
|
22
22
|
| Web framework | Hono | Express |
|
|
23
23
|
| Validation | Zod | joi, yup, class-validator |
|
|
@@ -125,7 +125,9 @@ bun run ../../scripts/typescript/new-project.ts my-api
|
|
|
125
125
|
bun run ../../scripts/typescript/new-project.ts my-api --path ./projects
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
-
Creates: `package.json` (Hono + Zod +
|
|
128
|
+
Creates: `package.json` (Hono + Zod + oxlint + oxfmt + oxlint-tsgolint), strict `tsconfig.json`, `.oxlintrc.json`, `.oxfmtrc.json`, `lint/oxlint-plugin/` including its MIT license, `src/index.ts`, and `.gitignore`. Works on macOS, Linux, Windows.
|
|
129
|
+
|
|
130
|
+
**Use oxlint + oxfmt with `no-em-dash-copy` and `require-suppression-reason` by default for TS and JS.** Load [oxc-lint.md](oxc-lint.md) for the complete setup. Use `--type-aware` with its installed companion where supported; keep `tsc --noEmit` as the type gate. Rewrite paired em dashes as parenthetical or comma-delimited asides, not colon chains.
|
|
129
131
|
|
|
130
132
|
For manual setup: `bunx tsc --init`, then load `tsconfig-strict.md` for the full strict config.
|
|
131
133
|
|
|
@@ -145,7 +147,8 @@ Load on demand — not all at once.
|
|
|
145
147
|
|
|
146
148
|
| Need | Load |
|
|
147
149
|
|---|---|
|
|
148
|
-
| Strict tsconfig
|
|
150
|
+
| Strict tsconfig | `tsconfig-strict.md` |
|
|
151
|
+
| Default oxlint + oxfmt configs, rule mappings, and local JS plugin | `oxc-lint.md` |
|
|
149
152
|
| Type patterns (branded, as const, satisfies, narrowing, assertNever) | `type-patterns.md` |
|
|
150
153
|
| Data modeling (type vs interface vs Zod, readonly, parse-don't-validate) | `data-modeling.md` |
|
|
151
154
|
| Error handling (Result, typed errors, union vs throw) | `error-handling.md` |
|
|
@@ -171,11 +174,11 @@ Violations caught by `../../scripts/typescript/check-no-excuse-rules.ts`. Run af
|
|
|
171
174
|
| `empty-catch` | `catch { }` or `catch (e) { }` with empty body | `// no-excuse-ok: catch` |
|
|
172
175
|
| `catch-without-narrowing` | `catch (e)` used without `instanceof` or re-throw | `// no-excuse-ok: catch` |
|
|
173
176
|
|
|
174
|
-
|
|
177
|
+
Oxlint enforces explicit-any, non-null-assertion, default-export, and type-only-import rules; see [the verified mapping](oxc-lint.md). The audit script retains the checks not covered by those rules, including assertion and enum bans and catch narrowing.
|
|
175
178
|
|
|
176
179
|
## In tests
|
|
177
180
|
|
|
178
|
-
Tests are strict too, with these exceptions (configure in
|
|
181
|
+
Tests are strict too, with these exceptions (configure in `.oxlintrc.json` overrides):
|
|
179
182
|
|
|
180
183
|
| In tests you may | Why |
|
|
181
184
|
|---|---|
|
|
@@ -192,4 +195,4 @@ When editing an existing file that doesn't follow these rules: **write new code
|
|
|
192
195
|
|
|
193
196
|
## Activation
|
|
194
197
|
|
|
195
|
-
This
|
|
198
|
+
This reference applies to `.ts`, `.tsx`, `.mts`, `.cts`, `.js`, `.jsx`, `.mjs`, and `.cjs`. JavaScript uses the same lint, formatting, and copy rules; TypeScript-only syntax and compiler gates apply to TS or checked JS projects. Even one-off scripts get the strict treatment.
|
|
@@ -91,31 +91,15 @@ bun install
|
|
|
91
91
|
bun run dev
|
|
92
92
|
```
|
|
93
93
|
|
|
94
|
-
## Lint + format
|
|
94
|
+
## Lint + format: oxlint + oxfmt
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
**Strongly prefer oxlint + oxfmt for new TS/JS projects**, including the local `no-em-dash-copy` and `require-suppression-reason` plugin. Keep ESLint, Prettier, or Biome only when the repository already uses them.
|
|
97
97
|
|
|
98
98
|
```bash
|
|
99
|
-
bun add --dev @
|
|
100
|
-
bun biome init
|
|
99
|
+
bun add --dev oxlint@1.89.0 oxfmt@0.74.0 oxlint-tsgolint@7.0.2005
|
|
101
100
|
```
|
|
102
101
|
|
|
103
|
-
`
|
|
104
|
-
|
|
105
|
-
```json
|
|
106
|
-
{
|
|
107
|
-
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
|
|
108
|
-
"organizeImports": { "enabled": true },
|
|
109
|
-
"linter": { "enabled": true, "rules": { "recommended": true } },
|
|
110
|
-
"formatter": { "enabled": true, "indentStyle": "space", "indentWidth": 2 }
|
|
111
|
-
}
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Use ESLint only when:
|
|
115
|
-
- You have an ESLint plugin Biome doesn't replicate (rare in 2026)
|
|
116
|
-
- You're contributing to an existing ESLint project
|
|
117
|
-
|
|
118
|
-
Never run both — pick one.
|
|
102
|
+
Copy `.oxlintrc.json`, `.oxfmtrc.json`, and the plain-JS plugin with its license from [oxc-lint.md](oxc-lint.md), or run the scaffold. The reference explains product-source scoping and verified strict rules. Use `oxlint --type-aware --deny-warnings` where the companion/runtime/project supports it, plus `oxfmt --check` and `tsc --noEmit`. On unsupported targets use syntax lint and keep the compiler gate; do not claim type-aware checks ran.
|
|
119
103
|
|
|
120
104
|
## Test runner — bun test or vitest
|
|
121
105
|
|
|
@@ -166,8 +150,8 @@ NEVER Jest for a new project. Jest's CommonJS-first design fights every modern N
|
|
|
166
150
|
mkdir my-api && cd my-api
|
|
167
151
|
bun init -y
|
|
168
152
|
bun add hono hono-openapi @scalar/hono-api-reference @hono/swagger-ui zod
|
|
169
|
-
bun add --dev @
|
|
170
|
-
|
|
153
|
+
bun add --dev oxlint@1.89.0 oxfmt@0.74.0 oxlint-tsgolint@7.0.2005 typescript
|
|
154
|
+
# Copy the configs and plugin from oxc-lint.md, including the plugin LICENSE.
|
|
171
155
|
```
|
|
172
156
|
|
|
173
157
|
`package.json` scripts:
|
|
@@ -179,7 +163,9 @@ bun biome init
|
|
|
179
163
|
"start": "bun run src/index.ts",
|
|
180
164
|
"build": "bun build src/index.ts --target bun --outdir dist",
|
|
181
165
|
"typecheck": "tsc --noEmit",
|
|
182
|
-
"lint": "
|
|
166
|
+
"lint": "oxlint --type-aware --deny-warnings",
|
|
167
|
+
"fmt": "oxfmt",
|
|
168
|
+
"fmt:check": "oxfmt --check",
|
|
183
169
|
"test": "bun test"
|
|
184
170
|
}
|
|
185
171
|
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Default TypeScript / JavaScript lint and format setup
|
|
2
|
+
|
|
3
|
+
**Use oxlint + oxfmt with `no-em-dash-copy` and `require-suppression-reason` by default.** Strongly prefer this OXC toolchain for new projects. Retain ESLint, Prettier, or Biome only when the repository already uses them; do not migrate an existing toolchain as incidental cleanup.
|
|
4
|
+
|
|
5
|
+
## Install and run
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
bun add --dev oxlint@1.89.0 oxfmt@0.74.0 oxlint-tsgolint@7.0.2005
|
|
9
|
+
bunx oxlint --type-aware --deny-warnings
|
|
10
|
+
bunx oxfmt --check
|
|
11
|
+
bunx tsc --noEmit
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The scaffold at `../../scripts/typescript/new-project.ts` copies the configs and plugin below. For manual setup, copy `.oxlintrc.json`, `.oxfmtrc.json`, and `lint/oxlint-plugin/` (including `LICENSE`) from `../../scripts/typescript/oxc/` into the project root. Merge the `tsconfig.json` flags into an existing project's config; copy that file only for a new project. The plugin is plain ESM JavaScript; use `"type": "module"` in `package.json`.
|
|
15
|
+
|
|
16
|
+
`--type-aware` requires the installed `oxlint-tsgolint` companion and a supported runtime/platform and TS project. Use it wherever supported. For syntax-only JS or an unsupported target, use `oxlint --deny-warnings`; retain the compiler gate for TS/checked JS and report that type-aware rules did not run. Type-aware lint does not replace `tsc --noEmit`. JS plugins are experimental, so keep these tested versions pinned and re-verify upgrades.
|
|
17
|
+
|
|
18
|
+
## Complete .oxlintrc.json
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
23
|
+
"plugins": ["typescript", "import", "oxc"],
|
|
24
|
+
"jsPlugins": [
|
|
25
|
+
{ "name": "programming", "specifier": "./lint/oxlint-plugin/index.js" }
|
|
26
|
+
],
|
|
27
|
+
"categories": { "correctness": "error", "suspicious": "error" },
|
|
28
|
+
"rules": {
|
|
29
|
+
"typescript/no-explicit-any": "error",
|
|
30
|
+
"typescript/no-non-null-assertion": "error",
|
|
31
|
+
"typescript/consistent-type-imports": "error",
|
|
32
|
+
"typescript/ban-ts-comment": [
|
|
33
|
+
"error",
|
|
34
|
+
{ "ts-expect-error": true, "ts-ignore": true, "ts-nocheck": true, "ts-check": false }
|
|
35
|
+
],
|
|
36
|
+
"typescript/no-empty-object-type": "error",
|
|
37
|
+
"typescript/no-wrapper-object-types": "error",
|
|
38
|
+
"typescript/no-floating-promises": "error",
|
|
39
|
+
"typescript/no-misused-promises": "error",
|
|
40
|
+
"typescript/switch-exhaustiveness-check": "error",
|
|
41
|
+
"import/no-default-export": "error",
|
|
42
|
+
"no-param-reassign": "error",
|
|
43
|
+
"no-unused-vars": "error",
|
|
44
|
+
"no-empty": "error",
|
|
45
|
+
"no-fallthrough": "error",
|
|
46
|
+
"prefer-const": "error",
|
|
47
|
+
"programming/require-suppression-reason": "error"
|
|
48
|
+
},
|
|
49
|
+
"ignorePatterns": ["node_modules/**", "dist/**", "build/**", "coverage/**", "vendor/**"],
|
|
50
|
+
"overrides": [
|
|
51
|
+
{
|
|
52
|
+
"files": ["src/**/*", "apps/*/src/**/*", "packages/*/src/**/*"],
|
|
53
|
+
"rules": { "programming/no-em-dash-copy": "error" }
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"files": [
|
|
57
|
+
"**/*.{test,spec}.*",
|
|
58
|
+
"**/{test,tests,__tests__,fixtures,__fixtures__,_generated,vendor,vendored}/**",
|
|
59
|
+
"**/*.{gen,generated}.*"
|
|
60
|
+
],
|
|
61
|
+
"rules": { "programming/no-em-dash-copy": "off" }
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"files": ["src/index.ts", "lint/oxlint-plugin/*.js"],
|
|
65
|
+
"rules": { "import/no-default-export": "off" }
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The final override is for Hono's required entrypoint export and the plugin API's default exports. Remove the `src/index.ts` exception in projects without that framework requirement. Adjust product globs to the repository's real source roots. Tests, fixtures, generated code, and vendored code are exempt from the copy rule, not from type strictness.
|
|
72
|
+
|
|
73
|
+
## Complete .oxfmtrc.json
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
|
|
78
|
+
"printWidth": 100,
|
|
79
|
+
"tabWidth": 2,
|
|
80
|
+
"useTabs": false,
|
|
81
|
+
"semi": true,
|
|
82
|
+
"singleQuote": false,
|
|
83
|
+
"ignorePatterns": ["node_modules/**", "dist/**", "build/**", "coverage/**", "vendor/**"]
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Use `oxfmt` to write formatting and `oxfmt --check` in CI. Keep lint/type suppression directives on their own lines; put a reason on the directive or a separate comment above, never join the directive to the code it covers.
|
|
88
|
+
|
|
89
|
+
## Local JavaScript plugin
|
|
90
|
+
|
|
91
|
+
The complete, copyable implementation lives in:
|
|
92
|
+
|
|
93
|
+
- [`index.js`](../../scripts/typescript/oxc/lint/oxlint-plugin/index.js): registers both rules.
|
|
94
|
+
- [`no-em-dash-copy.js`](../../scripts/typescript/oxc/lint/oxlint-plugin/no-em-dash-copy.js): visits string `Literal`, cooked `TemplateElement`, and `JSXText`. Escaped em dashes are caught; comments and regex literals are exempt.
|
|
95
|
+
- [`require-suppression-reason.js`](../../scripts/typescript/oxc/lint/oxlint-plugin/require-suppression-reason.js): checks oxlint/eslint disable directives and `@ts-expect-error`, `@ts-ignore`, `@ts-nocheck`. A reason follows the directive (`-- reason` for lint directives), or appears in a comment line above. Enable directives are exempt.
|
|
96
|
+
- [`LICENSE`](../../scripts/typescript/oxc/lint/oxlint-plugin/LICENSE): retain alongside copied code.
|
|
97
|
+
|
|
98
|
+
The copy diagnostic is exactly: "No em dashes in product copy. Use a period, comma, colon, or parentheses instead."
|
|
99
|
+
|
|
100
|
+
Rewrite paired em dashes as asides using parentheses or commas, not colon chains. Choose punctuation from the whole sentence rather than replacing each dash token mechanically. The rule deliberately does not auto-fix prose.
|
|
101
|
+
|
|
102
|
+
A reason is necessary, not permission to suppress an error. The strict TS config still bans type suppression directives even when explained. Fix the type; the reason rule additionally protects repositories where a justified exception is already allowed.
|
|
103
|
+
|
|
104
|
+
## Strictness mapping
|
|
105
|
+
|
|
106
|
+
Built-in names below were checked against oxlint **1.89.0**'s installed `configuration_schema.json` and by running the generated config. Re-check the installed schema or `oxlint --rules` before adding a rule; do not guess ESLint/Biome translations.
|
|
107
|
+
|
|
108
|
+
| Intent | Enforcement |
|
|
109
|
+
|---|---|
|
|
110
|
+
| No explicit `any` | `typescript/no-explicit-any` |
|
|
111
|
+
| No non-null assertions | `typescript/no-non-null-assertion` |
|
|
112
|
+
| Explicit type-only imports | `typescript/consistent-type-imports` + `verbatimModuleSyntax` |
|
|
113
|
+
| No TS suppressions | `typescript/ban-ts-comment` with all suppression directives banned |
|
|
114
|
+
| Named exports | `import/no-default-export`, with narrow framework/plugin exceptions |
|
|
115
|
+
| No parameter assignment | `no-param-reassign` |
|
|
116
|
+
| No unused variables or imports | `no-unused-vars` |
|
|
117
|
+
| No empty catches or switch fallthrough | `no-empty`, `no-fallthrough` |
|
|
118
|
+
| Prefer constant bindings | `prefer-const` |
|
|
119
|
+
| Avoid empty object and wrapper types | `typescript/no-empty-object-type`, `typescript/no-wrapper-object-types` |
|
|
120
|
+
| Await promises and avoid async callbacks in synchronous contracts | `typescript/no-floating-promises`, `typescript/no-misused-promises` (`--type-aware`) |
|
|
121
|
+
| Exhaustive discriminated unions | `typescript/switch-exhaustiveness-check` (`--type-aware`) + `assertNever` |
|
|
122
|
+
| No assertion escapes, enums, or catch-without-narrowing | Existing `check-no-excuse-rules.ts` audit; these are not claimed as built-in oxlint rules |
|
|
123
|
+
|
|
124
|
+
## Provenance and license
|
|
125
|
+
|
|
126
|
+
Source: **pingdotgg/t3code oxlint plugin at d7f3b72**; `no-em-dash-copy` from **t3code#23799**, `require-suppression-reason` from **t3code#16294**. This plain-JS port uses `sisyphuslabs/omo-relay`'s `lint/oxlint-plugin/{index,no-em-dash-copy,require-suppression-reason}.js`, with the local plugin namespace renamed to `programming`.
|
|
127
|
+
|
|
128
|
+
The upstream [license at d7f3b72](https://github.com/pingdotgg/t3code/blob/d7f3b72/LICENSE) is **MIT**, copyright (c) 2026 T3 Tools Inc. The full notice is shipped in the plugin's `LICENSE` and copied by the scaffold.
|
|
129
|
+
|
|
130
|
+
References: [JS plugins](https://oxc.rs/docs/guide/usage/linter/js-plugins.html), [type-aware lint](https://oxc.rs/docs/guide/usage/linter/type-aware.html), [oxlint config](https://oxc.rs/docs/guide/usage/linter/config.html), [oxfmt config](https://oxc.rs/docs/guide/usage/formatter/config.html).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Strict tsconfig +
|
|
1
|
+
# Strict tsconfig + OXC
|
|
2
2
|
|
|
3
3
|
The canonical ultra-strict config. Copy-paste, then add your own paths.
|
|
4
4
|
|
|
@@ -72,73 +72,17 @@ For Bun projects, add to `compilerOptions`:
|
|
|
72
72
|
|
|
73
73
|
---
|
|
74
74
|
|
|
75
|
-
##
|
|
75
|
+
## oxlint + oxfmt
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
{
|
|
79
|
-
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json",
|
|
80
|
-
"organizeImports": {
|
|
81
|
-
"enabled": true
|
|
82
|
-
},
|
|
83
|
-
"linter": {
|
|
84
|
-
"enabled": true,
|
|
85
|
-
"rules": {
|
|
86
|
-
"recommended": true,
|
|
87
|
-
"suspicious": {
|
|
88
|
-
"noExplicitAny": "error",
|
|
89
|
-
"noConfusingVoidType": "error",
|
|
90
|
-
"noFallthroughSwitchClause": "error"
|
|
91
|
-
},
|
|
92
|
-
"style": {
|
|
93
|
-
"noDefaultExport": "error",
|
|
94
|
-
"useImportType": "error",
|
|
95
|
-
"noNonNullAssertion": "error",
|
|
96
|
-
"useEnumInitializers": "off",
|
|
97
|
-
"noParameterAssign": "error"
|
|
98
|
-
},
|
|
99
|
-
"correctness": {
|
|
100
|
-
"noUnusedVariables": "error",
|
|
101
|
-
"noUnusedImports": "error"
|
|
102
|
-
},
|
|
103
|
-
"complexity": {
|
|
104
|
-
"noBannedTypes": "error"
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
"formatter": {
|
|
109
|
-
"enabled": true,
|
|
110
|
-
"indentStyle": "space",
|
|
111
|
-
"indentWidth": 2,
|
|
112
|
-
"lineWidth": 100
|
|
113
|
-
},
|
|
114
|
-
"javascript": {
|
|
115
|
-
"formatter": {
|
|
116
|
-
"quoteStyle": "double",
|
|
117
|
-
"semicolons": "asNeeded"
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
"files": {
|
|
121
|
-
"ignore": ["node_modules", "dist", "build", ".next", ".nuxt", "coverage"]
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### Key Biome rules
|
|
127
|
-
|
|
128
|
-
| Rule | What |
|
|
129
|
-
|---|---|
|
|
130
|
-
| `noExplicitAny` | `any` in annotations is an error |
|
|
131
|
-
| `noNonNullAssertion` | `x!` is an error |
|
|
132
|
-
| `noDefaultExport` | Forces named exports |
|
|
133
|
-
| `useImportType` | Forces `import type` for type-only imports |
|
|
134
|
-
| `noParameterAssign` | No mutation of function parameters |
|
|
77
|
+
Use [oxc-lint.md](oxc-lint.md) for the complete `.oxlintrc.json`, `.oxfmtrc.json`, and local JS plugin. It maps the strictness intent to verified oxlint rules, adds the two t3code copy rules, and documents type-aware support. Retain ESLint, Prettier, or Biome only in repositories already using them.
|
|
135
78
|
|
|
136
79
|
---
|
|
137
80
|
|
|
138
81
|
## CI gate
|
|
139
82
|
|
|
140
83
|
```bash
|
|
141
|
-
bunx
|
|
84
|
+
bunx oxlint --type-aware --deny-warnings
|
|
85
|
+
bunx oxfmt --check
|
|
142
86
|
bunx tsc --noEmit
|
|
143
87
|
bun test
|
|
144
88
|
```
|
|
@@ -148,5 +92,5 @@ bun test
|
|
|
148
92
|
## Sources
|
|
149
93
|
|
|
150
94
|
- TypeScript: [tsconfig reference](https://www.typescriptlang.org/tsconfig)
|
|
151
|
-
-
|
|
95
|
+
- OXC: [oxlint configuration](https://oxc.rs/docs/guide/usage/linter/config.html) and [oxfmt configuration](https://oxc.rs/docs/guide/usage/formatter/config.html)
|
|
152
96
|
- Total TypeScript: [tsconfig cheat sheet](https://www.totaltypescript.com/tsconfig-cheat-sheet)
|
package/packages/shared-skills/skills/programming/scripts/typescript/check-no-excuse-rules.ts
CHANGED
|
@@ -180,24 +180,24 @@ function analyzeFile(filePath: string, sourceFile: tsTypes.SourceFile): Violatio
|
|
|
180
180
|
const typeText = node.type.getText(sourceFile)
|
|
181
181
|
if (typeText === "any") {
|
|
182
182
|
const p = pos(node)
|
|
183
|
-
violations.push({ ruleId: "no-any-assertion", filePath, ...p, message: "`as any
|
|
183
|
+
violations.push({ ruleId: "no-any-assertion", filePath, ...p, message: "`as any`: narrow with type guards or redesign the types" })
|
|
184
184
|
}
|
|
185
185
|
if (typeText === "unknown") {
|
|
186
186
|
const p = pos(node)
|
|
187
|
-
violations.push({ ruleId: "no-unknown-assertion", filePath, ...p, message: "`as unknown
|
|
187
|
+
violations.push({ ruleId: "no-unknown-assertion", filePath, ...p, message: "`as unknown`: redesign the types" })
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
// ── enum ──
|
|
192
192
|
if (ts.isEnumDeclaration(node)) {
|
|
193
193
|
const p = pos(node)
|
|
194
|
-
violations.push({ ruleId: "no-enum", filePath, ...p, message: "`enum
|
|
194
|
+
violations.push({ ruleId: "no-enum", filePath, ...p, message: "`enum`: use `as const` object + literal union type" })
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
// ── x! non-null assertion ──
|
|
198
198
|
if (ts.isNonNullExpression(node)) {
|
|
199
199
|
const p = pos(node)
|
|
200
|
-
violations.push({ ruleId: "no-non-null-assertion", filePath, ...p, message: "`x
|
|
200
|
+
violations.push({ ruleId: "no-non-null-assertion", filePath, ...p, message: "`x!`: use narrowing or optional chaining" })
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
// ── throw "literal" ──
|
|
@@ -205,11 +205,11 @@ function analyzeFile(filePath: string, sourceFile: tsTypes.SourceFile): Violatio
|
|
|
205
205
|
const expr = node.expression
|
|
206
206
|
if (ts.isStringLiteral(expr) || ts.isNumericLiteral(expr) || ts.isNoSubstitutionTemplateLiteral(expr)) {
|
|
207
207
|
const p = pos(node)
|
|
208
|
-
violations.push({ ruleId: "no-throw-literal", filePath, ...p, message: "`throw literal
|
|
208
|
+
violations.push({ ruleId: "no-throw-literal", filePath, ...p, message: "`throw literal`: throw an Error subclass" })
|
|
209
209
|
}
|
|
210
210
|
if (ts.isTemplateExpression(expr)) {
|
|
211
211
|
const p = pos(node)
|
|
212
|
-
violations.push({ ruleId: "no-throw-literal", filePath, ...p, message: "`throw template
|
|
212
|
+
violations.push({ ruleId: "no-throw-literal", filePath, ...p, message: "`throw template`: throw an Error subclass" })
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
|
|
@@ -220,7 +220,7 @@ function analyzeFile(filePath: string, sourceFile: tsTypes.SourceFile): Violatio
|
|
|
220
220
|
const flags = node.declarationList.flags
|
|
221
221
|
if (!(flags & ts.NodeFlags.Const)) {
|
|
222
222
|
const p = pos(node)
|
|
223
|
-
violations.push({ ruleId: "no-mutable-export", filePath, ...p, message: "`export let/var
|
|
223
|
+
violations.push({ ruleId: "no-mutable-export", filePath, ...p, message: "`export let/var`: use `export const`" })
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
}
|
|
@@ -239,7 +239,7 @@ function analyzeFile(filePath: string, sourceFile: tsTypes.SourceFile): Violatio
|
|
|
239
239
|
ts.isPropertySignature(parent)
|
|
240
240
|
)) {
|
|
241
241
|
const p = pos(node)
|
|
242
|
-
violations.push({ ruleId: "no-any-annotation", filePath, ...p, message: "`: any` annotation
|
|
242
|
+
violations.push({ ruleId: "no-any-annotation", filePath, ...p, message: "`: any` annotation: use `unknown` and narrow" })
|
|
243
243
|
} else if (parent && (
|
|
244
244
|
ts.isFunctionDeclaration(parent) ||
|
|
245
245
|
ts.isMethodDeclaration(parent) ||
|
|
@@ -247,7 +247,7 @@ function analyzeFile(filePath: string, sourceFile: tsTypes.SourceFile): Violatio
|
|
|
247
247
|
ts.isFunctionExpression(parent)
|
|
248
248
|
)) {
|
|
249
249
|
const p = pos(node)
|
|
250
|
-
violations.push({ ruleId: "no-explicit-any-return", filePath, ...p, message: "`(): any` return
|
|
250
|
+
violations.push({ ruleId: "no-explicit-any-return", filePath, ...p, message: "`(): any` return: use a specific type" })
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
}
|
|
@@ -263,7 +263,7 @@ function analyzeFile(filePath: string, sourceFile: tsTypes.SourceFile): Violatio
|
|
|
263
263
|
if (stmts.length === 0) {
|
|
264
264
|
// Empty catch — swallows everything silently
|
|
265
265
|
const p = pos(node)
|
|
266
|
-
violations.push({ ruleId: "empty-catch", filePath, ...p, message: "empty `catch` block
|
|
266
|
+
violations.push({ ruleId: "empty-catch", filePath, ...p, message: "empty `catch` block: handle, re-throw, or remove the try/catch" })
|
|
267
267
|
} else if (node.variableDeclaration) {
|
|
268
268
|
// Has a bound variable — check if it's narrowed with instanceof
|
|
269
269
|
const varName = node.variableDeclaration.name.getText(sourceFile)
|
|
@@ -272,7 +272,7 @@ function analyzeFile(filePath: string, sourceFile: tsTypes.SourceFile): Violatio
|
|
|
272
272
|
const hasRethrow = blockText.includes(`throw ${varName}`) || blockText.includes(`throw new`)
|
|
273
273
|
if (!hasInstanceof && !hasRethrow) {
|
|
274
274
|
const p = pos(node)
|
|
275
|
-
violations.push({ ruleId: "catch-without-narrowing", filePath, ...p, message: "`catch` without `instanceof` narrowing or re-throw
|
|
275
|
+
violations.push({ ruleId: "catch-without-narrowing", filePath, ...p, message: "`catch` without `instanceof` narrowing or re-throw: narrow the error type or re-throw" })
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
}
|
|
@@ -298,7 +298,7 @@ function analyzeFile(filePath: string, sourceFile: tsTypes.SourceFile): Violatio
|
|
|
298
298
|
filePath,
|
|
299
299
|
line: line + 1,
|
|
300
300
|
column: character + 1,
|
|
301
|
-
message: `\`@ts-${kind}
|
|
301
|
+
message: `\`@ts-${kind}\`: fix the underlying type`,
|
|
302
302
|
})
|
|
303
303
|
}
|
|
304
304
|
|