Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
refactor(ok): port the 23 custom lint rules from GritQL to oxlint (#4222)
Andrew Mikofalvye5c824234053
diff --git a/biome-plugins/README.md b/biome-plugins/README.mddeleted file mode 100644index a4cfceee9..000000000--- a/biome-plugins/README.md+++ /dev/null@@ -1,571 +0,0 @@-# Biome GritQL plugins--Custom lint rules for this workspace, registered in [`biome.jsonc`](../biome.jsonc) at the top-level `plugins` array (workspace-wide) OR a scoped `overrides[].plugins` entry (file-specific — used when the rule's invariant only applies to a known subset of files). Each `.grit` file is a single GritQL pattern (or `or { ... }` of patterns) emitting diagnostics via `register_diagnostic()`.--Plugins surface as lint errors during `biome check` (i.e. `pnpm lint` and `pnpm check`) and as inline editor squiggles via the Biome LSP.--## Convention--**All custom Biome lint enforcement uses GritQL plugins** — [PRECEDENTS.md #42](../PRECEDENTS.md#custom-lint-enforcement-precedent-42). Use a `.grit` file under this directory + a fixture-file test. The fixture-file test is non-negotiable: it preserves the mutation-self-test property by asserting an exact diagnostic count on a fixture pairing positive cases with negative cases.--**Diagnostic messages name the fix and link the docs.** Every `register_diagnostic` message has two load-bearing pieces: (a) a noun-phrase or action verb-phrase that names what to do to fix the violation (the fix-noun — readers see this and know the next move without leaving the editor); (b) a trailing `See <docs-URL>` pointing at the rule's section in this README so the message stays self-documenting. Process metadata (decision markers like `D19:`, spec-section refs) does NOT belong in the diagnostic — it rots the same way it rots in source comments. The fixture test asserts both pieces are present (substring match for the fix-noun + URL regex) so the convention survives drift.--## Rules--### `microcopy-ellipsis.grit`--Flags U+2026 (`…`) in two JSX surfaces:-- **JSX text children** — `<span>Loading…</span>`-- **JSX attribute string values** for `placeholder | label | title | aria-label | description | tooltip`--The codebase reserves `…` for two cases only:-1. **macOS native menu items** (rendered via `Menu.buildFromTemplate` in `packages/desktop/src/main/menu.ts`). Native-OS convention for "opens a new surface" (Apple/Windows/GTK HIG).-2. **Truncation indicators** — where `…` literally means "I cut text here" (graph labels, breadcrumb collapse, search snippets, sha256 prefixes, token-prefix elisions).--The rule does NOT catch:-- Object-literal menu templates (`{ label: 'Settings…' }`) — naturally skipped because they're not JSX, which is correct (Electron menus belong to case #1).-- `…` in plain `.ts` files — naturally skipped because they're not JSX (graph-label-utils, suggest-links, etc. — these are all case #2 truncation utilities).-- `…` in CLI strings (`process.stderr.write('Cloning…')`) — uncaught gap; review discipline covers the small CLI surface.-- `…` in JSX expression-child string literals (`<span>{'Loading…'}</span>`) — uncaught gap; zero occurrences in the codebase today (developers write `<span>Loading…</span>` directly). If a realistic case emerges, add a `jsx_expression` pattern matching `string` literal children rather than retrofit ad-hoc.--Test: [`packages/app/tests/integration/microcopy-ellipsis.test.ts`](../packages/app/tests/integration/microcopy-ellipsis.test.ts).--### `no-loosely-typed-webcontents-ipc.grit`--IPC discipline enforcement. Forbids direct electron IPC primitives (`webContents.send`, `ipcMain.handle/on`, `ipcRenderer.invoke/on/once`) outside the typed-wrapper files. Consumers must route through `createInvoker` / `createHandler` / `sendToRenderer` from `packages/desktop/src/shared/ipc-*.ts`. See [PRECEDENTS.md #14](../PRECEDENTS.md) for the IPC discipline rationale.--Test: [`packages/desktop/tests/integration/no-loosely-typed-webcontents-ipc.test.ts`](../packages/desktop/tests/integration/no-loosely-typed-webcontents-ipc.test.ts).--### `no-raw-html-interactive-element.grit`--UI primitives discipline. Forbids raw JSX `<button>`, `<input>`, `<textarea>`, `<select>` inside production `.tsx` under `packages/{app,desktop,plugin}/src/**`. Consumers must use the shadcn primitives (`Button`, `Input`, `Textarea`, `Select`) from `@/components/ui/*`; if the primitive isn't installed yet, add it via `pnpm dlx shadcn@latest add <name>` first. The rule catches the PR #937 failure mode: contributors (including Codex / Claude Code / human reviewers) introducing raw `<button>` JSX while a shadcn `<Button>` from `@/components/ui/button` was already imported in the same file.--**Scoped via `overrides[].plugins`** to `packages/{app,desktop,plugin}/src/**/*.tsx`. Exemptions encoded as negative `!`-globs in the same `includes[]`:--- `!packages/app/src/editor/**` — ProseMirror NodeViews + editor chrome legitimately render raw HTML for measurement / PM-managed DOM. The exemption matches the existing `a11y/useSemanticElements` suppressions scattered through the editor subtree.-- `!packages/app/src/components/ui/**` — these files ARE the shadcn primitive wrappers; they MUST render raw HTML by definition.-- `!**/*.test.tsx` + `!**/*.dom.test.tsx` + `!**/*.test-helper.tsx` — test fixtures and shared test doubles aren't user-facing UI.--**Pre-rule backlog (ratchet pattern).** Files that pre-date the rule and use raw `<button>` / `<input>` / `<textarea>` carry a file-level `// biome-ignore-all lint/plugin/no-raw-html-interactive-element: pre-rule backlog — ...` comment at the top of the file. The comment list across the codebase IS the visible migration backlog — review treats each `biome-ignore-all` header as a backlog marker, not a free pass. Drain by migrating the file to shadcn primitives, then deleting the suppression header (the rule starts firing again immediately, so a partial migration that misses a raw `<button>` fails the gate). Reference migration: `packages/app/src/components/NavigatorApp.tsx` (three raw `<button>` → shadcn `<Button variant="ghost|outline|link">`).--The rule does NOT catch:-- PascalCase composite components whose name starts with `Button` / `Input` (e.g. `<ButtonGroup>`, `<InputGroup>`) — pattern scopes to lowercase JSX tag names only.-- Raw HTML in `.ts` files (e.g. dangerouslySetInnerHTML strings, template literals).-- Raw `<a>` used as an action — anchor-as-button is governed by Biome's built-in `a11y/useSemanticElements` + the codebase's existing button-vs-anchor conventions.-- Other interactive primitives (`<dialog>`, `<details>`, `<summary>`) where the team hasn't yet committed to a shadcn-only contract.--Plugin: [`biome-plugins/no-raw-html-interactive-element.grit`](no-raw-html-interactive-element.grit). Fixture: [`biome-plugins/__fixtures__/no-raw-html-interactive-element.fixture.tsx`](__fixtures__/no-raw-html-interactive-element.fixture.tsx). Test: [`packages/app/tests/lint-plugins/no-raw-html-interactive-element.test.ts`](../packages/app/tests/lint-plugins/no-raw-html-interactive-element.test.ts). See [PRECEDENTS.md #42](../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the GritQL-plugin convention.--### `no-themeless-pierre-diff.grit`--`@pierre/diffs` render contract. Every `<MultiFileDiff>` construction site under `packages/app/src/**/*.tsx` (both the self-closing and the child-bearing JSX form) must pass an explicit `theme` and must set `diffStyle: 'unified'`. `new UnresolvedFile(...)` is covered by the `theme` half only — the constructor surfaces take no `diffStyle`.--The `theme` check reads the `options` object, not the whole prop list, so a `theme` token elsewhere on the element (`data-theme="dark"`, a title string, a variable named `theme` passed to an unrelated prop) cannot suppress the diagnostic. The fixture pins that with a decoy case.--Both halves are load-bearing. Pierre ships its own palette, so a themeless renderer paints in Pierre's colours instead of the app's and stops tracking the user's light/dark selection. And `diffStyle: 'split'` renders the two sides as separate DOM subtrees, so the change-stepper's DOM-order adjacency grouping counts roughly 2x the real groups — the displayed denominator desyncs from the anchors the stepper can actually reach.--This rule replaces a `readFileSync` + regex meta-test that asserted the same invariant over source text. That test violated the AGENTS.md rule against asserting raw source text for props ("Source guards need proof runtime coverage is impossible" — it wasn't), and it carried a tautological self-test that ran a regex over its own string literals. The per-component half of its intent now lives in runtime assertions in `ActivityPanelDiffView.dom.test.tsx` (`pre[data-diff-type="single"]` for unified; the injected `:host` token block for theme). Lint is the right layer for the codebase-wide "no call site omits it" half — [PRECEDENTS.md #42](../PRECEDENTS.md#custom-lint-enforcement-precedent-42).--The rule does NOT catch:-- a `@pierre/diffs` constructor other than `UnresolvedFile` — `new File(...)`, or any aliased import such as `File as PierreFile` in [`ConflictFilePreview.tsx`](../packages/app/src/components/ConflictFilePreview.tsx). GritQL matches the identifier as written, so a rename defeats it-- a renamed `MultiFileDiff` import, for the same reason-- a theme reaching the renderer through a spread or a variable (`options={{ ...baseOptions }}`, `options={opts}`) — the check reads the object literal, and there is no occurrence today--Runtime complement: `packages/app/src/components/ActivityPanelDiffView.dom.test.tsx` asserts the rendered result on the one surface this migration adds — `pre[data-diff-type="single"]` for unified, and the injected `:host` token block for theme.--Plugin: [`biome-plugins/no-themeless-pierre-diff.grit`](no-themeless-pierre-diff.grit). Fixture: [`biome-plugins/__fixtures__/no-themeless-pierre-diff.fixture.tsx`](__fixtures__/no-themeless-pierre-diff.fixture.tsx). Test: [`packages/app/tests/lint-plugins/no-themeless-pierre-diff.test.ts`](../packages/app/tests/lint-plugins/no-themeless-pierre-diff.test.ts).--### `no-resolved-value-theme-source.grit`--1-way theme contract. Forbids resolving the user-intent theme value at the `bridge.setThemeSource(...)` call site. The contract is 1-way: pass the unresolved CRDT value (`'system' | 'light' | 'dark'`) verbatim. `'system'` delegates appearance tracking to macOS via `nativeTheme`; resolving at the call site (via `matchMedia` or a `prefersDark ? 'dark' : 'light'` ternary) loses tracking. See [PRECEDENTS.md #40(a)](../PRECEDENTS.md) for the renderer-state↔main-state contract.--Detection patterns (call expressions only — type-declarations are naturally excluded):-- `setThemeSource($arg)` where `$arg` contains `matchMedia` (any form)-- `setThemeSource($arg)` where `$arg` contains both `'light'` and `'dark'` string literals (likely a ternary, either order)-- Matches both bare-call and member-call shapes (`obj.setThemeSource(...)`)--Test: [`packages/desktop/tests/integration/no-resolved-value-theme-source.test.ts`](../packages/desktop/tests/integration/no-resolved-value-theme-source.test.ts).--### `no-split-suggestion-dispatch.grit`--One-transaction suggestion insertion ([PRECEDENTS.md #58](../PRECEDENTS.md#one-transaction-menu-insertions-precedent-58)). Inside a `@tiptap/suggestion` `Suggestion({ ... })` config, a trigger-range delete dispatched on its own (separate from the content insert) opens a re-entrant-dispatch window: anything fired synchronously during the delete's own `updateState` (a plugin `appendTransaction`, a view/NodeView update, the y-prosemirror binding reacting to the delete) can remap the selection onto an adjacent `selectable: true` node, and the follow-up insert then silently REPLACES that node. The fix is one chain (`.deleteRange(range).insertContent(...).run()`) or an `applySlashCommandItem`-style boundary (`packages/app/src/editor/slash-command/apply-item.ts`) for items needing post-commit work.--Detection patterns (scoped to `Suggestion($config)` call sites, so delete-only surfaces outside suggestion configs — e.g. a mention chip's remove button — never fire):-- a chain whose `.run()` receiver is the `deleteRange(...)` call itself (`....deleteRange(range).run()` — a compliant atomic chain always continues past the delete before `.run()`)-- `$editor.commands.deleteRange($range)` — the `commands.*` form dispatches immediately, always a standalone delete transaction--**Registered at root `plugins[]`** (workspace-wide, like `microcopy-ellipsis`): the pattern self-scopes to `Suggestion(...)` calls, and a future suggestion surface in any package must be covered without a biome.jsonc edit.--The rule does NOT catch:-- a split whose delete chain carries a non-content step after `deleteRange` and before `.run()` (e.g. `.deleteRange(r).focus().run()`) — the `.run()` receiver is then not the `deleteRange` call-- a second dispatch made inside a delegated item body (`item.command(editor)` running its own `editor.chain().run()`) — lint can't see through delegation-- raw `view.dispatch(tr.delete(...))` inside a Suggestion config — no occurrence today--Runtime complement: `packages/app/src/editor/extensions/suggestion-atomicity.dom.test.tsx` + `slash-command-atomicity.dom.test.tsx` drive every registered suggestion surface through a real Enter and assert exactly one doc-changing transaction — they catch the delegated-dispatch shapes the lint can't.--Plugin: [`biome-plugins/no-split-suggestion-dispatch.grit`](no-split-suggestion-dispatch.grit). Fixture: [`biome-plugins/__fixtures__/no-split-suggestion-dispatch.fixture.tsx`](__fixtures__/no-split-suggestion-dispatch.fixture.tsx). Test: [`packages/app/tests/lint-plugins/no-split-suggestion-dispatch.test.ts`](../packages/app/tests/lint-plugins/no-split-suggestion-dispatch.test.ts).--### `no-unportaled-editor-content.grit`--H6 cross-doc DOM bleed contract. `@tiptap/react`'s `PureEditorContent.componentDidMount` runs `element.append(...editor.view.dom.parentNode.childNodes)` — a sibling-vacuum primitive. When `view.dom` shares a parent with another editor's `view.dom` (e.g., V2 cache parked nodes, cross-Activity reconciliation transitions), the vacuum drags foreign content into the active wrapper. The structural fix is to render every `<EditorContent>` via `React.createPortal` into a per-Activity exclusively-owned DOM target, so `view.dom`'s parent only ever contains THIS editor's nodes.--The rule flags every JSX usage of `<EditorContent>` — both self-closing and child-bearing forms — and asks the author to suppress at the canonical portaled site (where the createPortal call lives) with `// biome-ignore lint/plugin/no-unportaled-editor-content: <reason>`. Adding a non-portaled `<EditorContent>` anywhere else in the codebase becomes a lint error, gated at editor-save / `pnpm lint` time.--Canonical sanctioned shape (TiptapEditor.tsx):--```tsx-createPortal(- <EditorContent editor={editor} className="..." />,- portalTarget,-);-```--Plugin: [`biome-plugins/no-unportaled-editor-content.grit`](no-unportaled-editor-content.grit). Fixture: [`biome-plugins/__fixtures__/no-unportaled-editor-content.fixture.tsx`](__fixtures__/no-unportaled-editor-content.fixture.tsx). Test: [`packages/app/tests/integration/no-unportaled-editor-content.test.ts`](../packages/app/tests/integration/no-unportaled-editor-content.test.ts). See [PRECEDENTS.md #44](../PRECEDENTS.md) for the H6 cross-doc DOM bleed contract and [PRECEDENTS.md #42](../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the GritQL-plugin convention.--### `no-uninstall-forbidden-import.grit`--"Connects to nothing" first-hop feedback. The self-uninstall window's survey and completion screens render after `ok uninstall --yes` has stopped the local Hocuspocus server and removed `~/.ok`, so the uninstall entry must never reach the editor, the CRDT stack, the provider pool, or the server bootstrap — and must eager-load (no dynamic `import()`) so those screens paint from memory once teardown is under way.--Scoped via `overrides[].plugins` to `packages/app/src/uninstall/**` (test files exempt — a dom test legitimately does `await import('./main')` to prove the entry paints). Two diagnostics:-- A static import (`import … from`, `import type … from`, `import * as … from`, or side-effect `import`) whose source is an editor / CRDT / provider-pool / Hocuspocus-server specifier (`@/editor/*`, `@inkeep/open-knowledge-server`, `@hocuspocus/*`, `yjs`, `y-protocols`, `y-prosemirror`, `y-codemirror.next`, `y-indexeddb`, `@tiptap/y-tiptap`, `@tiptap/extension-collaboration*`). `@inkeep/open-knowledge-core` (shared types + constants) is deliberately allowed.-- Any dynamic `import()`.--This rule is **shallow, first-hop feedback only**. The authoritative gate is the transitive-module-graph test at [`packages/desktop/tests/unit/uninstall-module-graph.test.ts`](../packages/desktop/tests/unit/uninstall-module-graph.test.ts), which builds the entry alone and checks its whole loaded-module set — so it also catches a forbidden module reached indirectly through a shared `@/lib` / `@/components/ui` module, and re-export (`export … from`) edges GritQL cannot express.--Plugin: [`biome-plugins/no-uninstall-forbidden-import.grit`](no-uninstall-forbidden-import.grit). Fixture: [`biome-plugins/__fixtures__/no-uninstall-forbidden-import.fixture.tsx`](__fixtures__/no-uninstall-forbidden-import.fixture.tsx). Test: [`packages/desktop/tests/integration/no-uninstall-forbidden-import.test.ts`](../packages/desktop/tests/integration/no-uninstall-forbidden-import.test.ts). See [PRECEDENTS.md #42](../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the GritQL-plugin convention.--### `path-conditional-map-driven-origin.grit`--Observer A origin discipline. Inside `packages/server/src/server-observers.ts`, every `Y.Doc.transact()` call MUST pass the sanctioned origin `OBSERVER_SYNC_ORIGIN` as its second argument (`doc.transact(fn, OBSERVER_SYNC_ORIGIN)`). Bare `doc.transact(fn)` - or a wrong origin - routes the write to `openknowledge-service` and breaks per-session UndoManager attribution (the `trackedOrigins` Set-identity match skips the transaction).--**Scoped via `overrides[].plugins`** to `packages/server/src/server-observers.ts`. Other server files routing through `session.dc.document.transact(fn, session.origin)` are out of scope - that contract is enforced by `paired-write-enforcement.test.ts`.--The rule checks the **argument position** (the second argument node), not whether the call subtree contains the identifier somewhere. It matches every `transact(...)` call, then excludes the two sanctioned shapes (`transact($_, OBSERVER_SYNC_ORIGIN)` and the 3-arg `transact($_, OBSERVER_SYNC_ORIGIN, $...)`). A callback body that mentions `OBSERVER_SYNC_ORIGIN` for an unrelated reason therefore neither clears a bare/wrong call nor trips a correct one - the prior `contains`-based shape was falsely cleared by such a mention.--The rule does NOT catch:-- Transact calls outside `server-observers.ts` (scoped to the one observer-dispatch file)-- An origin passed in a position other than the second argument (the contract is second-argument placement; no real call site does otherwise)--Plugin: [`biome-plugins/path-conditional-map-driven-origin.grit`](path-conditional-map-driven-origin.grit). Fixture: [`biome-plugins/__fixtures__/path-conditional-map-driven-origin.fixture.tsx`](__fixtures__/path-conditional-map-driven-origin.fixture.tsx). Test: [`packages/server/src/path-conditional-map-driven-origin.test.ts`](../packages/server/src/path-conditional-map-driven-origin.test.ts).--### `cst-pm-handler-todo-stub.grit`--Codemod handler TODO-stub grep. Flags handler files under `packages/md-conformance/src/substrates/*/handlers/` that still contain the codemod's stub body (`throw new Error("TODO: implement <substrate>:<dir>/<key>")`), so a codemod stub that survives to lint time is caught.--This is a TODO-stub grep, NOT an exhaustiveness check. Whether a substrate covers every PM node type (the node-set traversal over `packages/core/schema-snapshot.json`) is a separate concern owned by a suite-self-consistency gate. The compile-time backstop for missing methods is the TypeScript handlers-table type check against `ICstEngine`.--**Scoped via `overrides[].plugins`** to the per-substrate handlers/ subtrees (see the biome.jsonc override includes). The codemod implementation, harness tests, and oracles are out of scope (they legitimately produce strings containing "TODO: implement" in their own contexts).--The rule does NOT catch:-- Missing handler FILES (file-presence is out of GritQL's scope; TypeScript + codemod coverage handle this)-- Whether the handler set is complete per the PM schema (a separate node-set traversal, deferred to the suite-self-consistency gate)-- Error subclasses (only matches `new Error(...)`)-- Non-anchored "TODO" mentions (regex requires the message to start with `TODO: implement`)--Plugin: [`biome-plugins/cst-pm-handler-todo-stub.grit`](cst-pm-handler-todo-stub.grit). Fixture: [`biome-plugins/__fixtures__/cst-pm-handler-todo-stub.fixture.tsx`](__fixtures__/cst-pm-handler-todo-stub.fixture.tsx). Test: [`packages/md-conformance/src/lint-plugins/cst-pm-handler-todo-stub.test.ts`](../packages/md-conformance/src/lint-plugins/cst-pm-handler-todo-stub.test.ts).--### `class-proof-registration-discipline.grit`--Class-proof DSL contract enforcement. Two patterns (GritQL `or` — short-circuit, Pattern A wins when both apply):--- **Pattern A (missing args):** flags `defineClassProof(name, opts)` when `opts` doesn't contain both `predicate:` and `proof:` property assignments.-- **Pattern B (outside canonical dir):** flags any `defineClassProof(...)` call. The override scope excludes `packages/md-conformance/src/class-proofs/proofs/**`, so this fires only on registrations outside the sanctioned location.--Inside the canonical proofs/ dir, neither pattern fires — TypeScript's `ClassProofOptions<M>` signature backstops the missing-args check, and any `defineClassProof` call there is in the sanctioned location.--**Scoped via `overrides[].plugins`** to all `.ts`/`.tsx` files EXCEPT the canonical `class-proofs/proofs/**` dir and `*.test.ts`/`*.test.tsx` (test files that exercise the DSL are exempt — `dsl.test.ts` legitimately calls `defineClassProof` outside the canonical dir).--The rule does NOT catch:-- Missing-args violations inside the canonical proofs/ dir (TypeScript catches those)-- Functions with similar names (`myDefineClassProofVariant`) — pattern matches the exact function name-- Type references to `defineClassProof` — pattern scopes to call expressions--Plugin: [`biome-plugins/class-proof-registration-discipline.grit`](class-proof-registration-discipline.grit). Fixture: [`biome-plugins/__fixtures__/class-proof-registration-discipline.fixture.tsx`](__fixtures__/class-proof-registration-discipline.fixture.tsx). Test: [`packages/md-conformance/src/lint-plugins/class-proof-registration-discipline.test.ts`](../packages/md-conformance/src/lint-plugins/class-proof-registration-discipline.test.ts).--### `playwright-prefer-to-have-count.grit`--Flags `expect(await locator.count())` — the one-shot count snapshot that never retries. Under CI CPU contention the DOM settles a few frames after the read, so the assertion flakes while the auto-retrying web-first form `await expect(locator).toHaveCount(n)` passes deterministically (the no-retry read was one of the hidden-flake shapes in the 2026-06 e2e CI audit). The pattern matches the probe sub-expression regardless of the matcher that follows (`.toBe`, `.toEqual`, `.toBeGreaterThanOrEqual`, ...). Upstream precedent: eslint-plugin-playwright `prefer-to-have-count`.--**Scoped via `overrides[].plugins`** to `packages/app/tests/{stress,visual,a11y}/**/*.e2e.ts` (the same three dirs `tests/integration/e2e-stop-rules.test.ts` source-scans) + the fixture. Not workspace-wide: outside Playwright specs, `.count()` is usually not a `Locator` and the web-first rewrite does not apply.--The rule does NOT catch:-- `expect.soft(await locator.count())` — different callee node shape; zero occurrences today.-- A count read assigned to a variable and asserted later (`const n = await loc.count(); expect(n).toBe(2)`) — two statements; GritQL cannot correlate them. Add an e2e-stop-rules source-scan rule if the split form ever recurs.-- Biome 2.4 plugin diagnostics are diagnostic-only — the `toHaveCount` rewrite is named in the message but not auto-applied.--Plugin: [`biome-plugins/playwright-prefer-to-have-count.grit`](playwright-prefer-to-have-count.grit). Fixture: [`biome-plugins/__fixtures__/playwright-prefer-to-have-count.fixture.tsx`](__fixtures__/playwright-prefer-to-have-count.fixture.tsx). Test: [`packages/app/tests/lint-plugins/playwright-prefer-to-have-count.test.ts`](../packages/app/tests/lint-plugins/playwright-prefer-to-have-count.test.ts). See [PRECEDENTS.md #42](../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the GritQL-plugin convention.--### `no-roundtrip-identity-oracle.grit`--Forbids the byte-fidelity round-trip oracle in public-mirrored tests. Asserting that re-serializing a freshly-parsed document yields back the *same* input — `serialize(parse(x))` (or the MarkdownManager method form `m.serialize(m.parse(x))`) compared equal to that same `x` via `.toBe` / `.toEqual` / `.toStrictEqual` or `===` — is the engine's byte-identity correctness oracle, exercised by its own fidelity suite. A public test should pin a specific expected output instead; this rule keeps a new public test from reintroducing the general oracle.--**Identity, not contract.** The rule fires only when the parse input and the expected value are the *same expression* — GritQL metavariable reuse (`$x` … `$x`) enforces textual equality. That is what separates the oracle from the assertions that must stay public and green:--- A **contract test** pins a *fixed expected literal* (`expect(serialize(parse('# H'))).toBe('# H\n')`) — the expected differs from the input, so it does not fire.-- The **Bridge-invariant comparator** `normalizeBridge(a) === normalizeBridge(b)` (precedent #38, the documented public contract) contains no `serialize(parse(...))` and is never flagged.-- The **normalizing-construct detector** `serialize(parse(x)) !== x` uses `!==`, a different operator, and is never flagged.--**Scoped via `overrides[].plugins`** to the public-mirrored test surface (`packages/**/*.test.ts`, `*.test.tsx`, `*.e2e.ts`). The internal suites that legitimately own the oracle are excluded as negative globs (see the biome.jsonc override includes); on this surface it is forbidden.--The rule does NOT catch:-- Round-trip identity through a helper (`mdRoundTrip(x)`, `normalize(...)`) or an intermediate variable (`const out = serialize(parse(x)); expect(out).toBe(x)`) — the pattern matches the inline call shape, not helper bodies or cross-statement data flow. Those forms live in the path-excluded fidelity suite, covered by exclusion.-- Equality through matchers other than `toBe` / `toEqual` / `toStrictEqual`, or operators other than `===` (e.g. a custom `assertByteIdentical` helper).-- Any oracle whose two sides are not the same inline expression (e.g. a round-trip compared to a different variable).--Plugin: [`biome-plugins/no-roundtrip-identity-oracle.grit`](no-roundtrip-identity-oracle.grit). Fixture: [`biome-plugins/__fixtures__/no-roundtrip-identity-oracle.fixture.tsx`](__fixtures__/no-roundtrip-identity-oracle.fixture.tsx). Test: [`packages/app/tests/lint-plugins/no-roundtrip-identity-oracle.test.ts`](../packages/app/tests/lint-plugins/no-roundtrip-identity-oracle.test.ts). See [PRECEDENTS.md #42](../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the GritQL-plugin convention and [PRECEDENTS.md #38](../PRECEDENTS.md) for the Bridge-invariant contract.--### `no-inline-tolerance-class.grit`--Forbids a public-mirrored test from writing a bridge normalization-class value inline as a string literal. `BRIDGE_TOLERANCE_CLASSES` (`packages/core/src/bridge/normalize.ts`) is the bridge normalizer's catalog of byte-difference equivalence classes it tolerates. A public test should assert observable `normalizeBridge` equivalence between inputs rather than hard-coding one of those class labels inline — the label is an internal classification detail, and pinning it inline both couples the test to that detail and re-declares the catalog outside the modules that own it. `check-mirror-test-policy` Check B already blocks a public test from *importing* the catalog symbol; this rule closes the complementary gap where a test re-encodes a class value inline (`expect(applied).toBe('jsx-container-boundary-blank')`, an array of class names), past the import check.--**Identity, not substring.** The `or {}` matches a string-literal node whose value *is* exactly a catalog member, so the names that appear legitimately on the public surface as prose are not flagged:--- A class name inside a longer **test-title sentence** (`test('… (block-separator-collapse class)', …)`) — a different node value, so it does not fire.-- A class name embedded in a **docName** with a prefix (`'fr34-doc-start-thematic'`) — likewise a substring, not the whole value.-- A class name in a **comment** — GritQL matches the string-literal node, not trivia.--The match is quote-style independent (a single-quoted pattern matches the double-quoted form Biome emits). The four **universal text-encoding** classes — `bom`, `crlf`, `trailing-whitespace`, `trailing-newline` — are deliberately NOT matched: they are normalizations every text tool performs, not distinctive classes, and the public floor telemetry runtime (`tolerance-telemetry.ts`) surfaces them, so public tests legitimately assert that runtime emits `class: 'crlf'` for a CRLF input. The 12 markdown-fidelity classes plus those 4 universal classes partition the catalog exactly, and the fixture test's drift canary pins that partition — a class added to `BRIDGE_TOLERANCE_CLASSES` reddens until it is classified into one bucket.--**Scoped via `overrides[].plugins`** to the public-mirrored test surface (`packages/**/*.test.ts`, `*.test.tsx`, `*.e2e.ts`), with the catalog-owning internal suites excluded as negative globs (see the biome.jsonc override includes), so the catalog stays usable there but the inline form is forbidden on this surface.--The rule does NOT catch:-- A class name built by concatenation or template interpolation (`'doc-start-' + 'thematic'`) — neither operand is the whole value.-- A class name in a template literal — the pattern matches string-literal nodes, not template content.--Plugin: [`biome-plugins/no-inline-tolerance-class.grit`](no-inline-tolerance-class.grit). Fixture: [`biome-plugins/__fixtures__/no-inline-tolerance-class.fixture.tsx`](__fixtures__/no-inline-tolerance-class.fixture.tsx). Test: [`packages/app/tests/lint-plugins/no-inline-tolerance-class.test.ts`](../packages/app/tests/lint-plugins/no-inline-tolerance-class.test.ts). See [PRECEDENTS.md #42](../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the GritQL-plugin convention.--### `require-windowshide-on-spawn.grit`--Windows console-flash prevention. Every hand-rolled `node:child_process` process-spawn (`spawn` / `spawnSync` / `execSync` / `execFile` / `execFileSync`, plus the repo aliases `nodeSpawn` and `execFileAsync`) must hide the Windows console it would otherwise pop — either by wrapping its options in `withHiddenWindowsConsole(...)` (from `@inkeep/open-knowledge-server`, the preferred form shared with the server package) or by an inline `windowsHide: true`.--**Why.** On Windows, `windowsHide` defaults to `false`. When a console-LESS parent — the OK server auto-started by an MCP host with `stdio: 'ignore'`, or spawned detached — spawns a console-subsystem binary like `git.exe`, Windows creates a new console window that flashes on screen and vanishes, once per spawn. During an editing / agent-write session the per-edit `git` reads produce a steady stream of these. Hiding the console fixes it. The flag is a **no-op on both macOS and Linux** (neither allocates a console for child processes), so it is applied uniformly regardless of the command's target platform.--`simple-git` already sets `windowsHide: true` internally, so git routed through it (shadow repo, share, conflicts) is out of scope by nature — this rule governs only the hand-rolled call sites that bypass it.--**Scoped via `overrides[].plugins`** to `packages/{server,cli,desktop}/src/**/*.ts` (the packages that spawn processes at runtime on Windows), with `!**/*.test.ts` + `!**/*.test-helper.ts` excluded.--**Opting out (macOS/Linux-only spawns).** For a spawn that only ever runs on macOS and/or Linux — `codesign`, `sw_vers`, an `open(1)` launch — hiding a console is meaningless. Either add the flag anyway (a harmless no-op that keeps the rule uniform) or suppress that one call with a reason:--```ts-// biome-ignore lint/plugin/require-windowshide-on-spawn: macOS-only (never spawned on Windows)-const r = spawnSync('codesign', [...], { ... });-```--Reference opt-out in the tree: [`packages/cli/src/commands/diagnose-health-checks/macos-codesig.ts`](../packages/cli/src/commands/diagnose-health-checks/macos-codesig.ts). Same-named wrapper false positives (a local `const spawn = deps.spawnDetached ?? …`, or an injected `spawn` param) use the same suppression with a "not node:child_process" reason.--The rule does NOT catch: bare `exec(...)` (the identifier is too commonly shadowed); member calls (`deps.spawn(...)` — a different AST, so the real impl behind the injection is the enforced site); a `windowsHide` / `withHiddenWindowsConsole` written inside a spawn's callback body (would spuriously satisfy the check — no realistic occurrence).--Plugin: [`biome-plugins/require-windowshide-on-spawn.grit`](require-windowshide-on-spawn.grit). Fixture: [`biome-plugins/__fixtures__/require-windowshide-on-spawn.fixture.tsx`](__fixtures__/require-windowshide-on-spawn.fixture.tsx). Test: [`packages/server/src/lint-plugins/require-windowshide-on-spawn.test.ts`](../packages/server/src/lint-plugins/require-windowshide-on-spawn.test.ts). See [PRECEDENTS.md #42](../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the GritQL-plugin convention.--### `require-utf8-multipart-parser.grit`--Multipart filename charset correctness. `busboy(...)` may only be constructed inside [`packages/server/src/multipart.ts`](../packages/server/src/multipart.ts); every other multipart body is parsed through its `createMultipartParser(req, limits)` factory, which hardcodes `defParamCharset: 'utf8'`.--**Why.** busboy defaults `defParamCharset` to `latin1` — an inheritance from `Content-Disposition`'s original MIME/email definition, not from the `multipart/form-data` rules. RFC 7578 governs this surface instead. It issues no receiver mandate — section 5.1.3 is explicit that a parser cannot assume any particular charset was used — so the default is ours to choose, and UTF-8 is the only defensible choice: section 4.2 records that "the encoding used for the file names is typically UTF-8", and the sender-side form-charset ladder in section 5.1.2 terminates at UTF-8. Browsers and Node/undici both put the name on the wire as raw UTF-8 bytes in the plain `filename=` parameter, so at the default every multi-byte sequence is read back as one mojibake code point per byte: `café.png` arrives as `café.png`, `会議メモ.pdf` loses essentially all of its information. The damage lands at the transport-decode boundary, before any sanitizer or storage layer sees it, and it is not invertible there — the mojibake is indistinguishable from a filename the user legitimately owns.--The omission is invisible in review: `busboy({ headers, limits })` reads as complete unless you happen to know the default. It shipped at two construction sites for exactly that reason, the second copied from the first along with its `limits` shape, which is why this is a mechanical gate rather than a review convention.--**Presence match, not absence match.** The sibling `require-windowshide-on-spawn` rule is shaped as "the call must contain `windowsHide`", because there the option's only correct value is `true`. That shape is too weak here: "the call must contain `defParamCharset:`" is satisfied by `defParamCharset: 'latin1'`, which passes lint and reintroduces the bug. The factory takes no charset parameter, so routing through it removes the value hole entirely and reduces this rule to a plain presence check on the constructor. Both the wrong-value and the right-value-wrong-place cases are pinned as must-fire fixtures.--**Registered via `overrides[].plugins`** repo-wide (`**/*.ts`, `**/*.tsx`, `**/*.mts`) rather than per-package: server owns the only busboy dependency today, and that is exactly the state a new dependency elsewhere would change, silently. Excluded are `!packages/server/src/multipart.ts` (the one sanctioned construction site), `!**/*.test.ts`, `!**/*.test.tsx`, and `!**/*.test-helper.ts`. The test exclusion is deliberate rather than copied: [`packages/server/src/http/local-api-dispatch.test.ts`](../packages/server/src/http/local-api-dispatch.test.ts) drives its own parser inside a synthetic `/api/upload-lite` handler that counts bytes and never decodes a non-ASCII name.--**Opting out.** There is no legitimate second construction site. A caller that needs different parser options (`preservePath`, `highWaterMark`, …) should widen the factory — that keeps the charset decision in one place, and forces the path-traversal reasoning `preservePath` demands rather than letting it be set in passing. If you genuinely must construct in place, suppress the one call with a reason:--```ts-// biome-ignore lint/plugin/require-utf8-multipart-parser: <reason>-const bb = busboy({ headers, defParamCharset: 'utf8' });-```--The rule does NOT catch: member calls (`parsers.busboy(...)` — a different AST); a call through a renamed binding (`import bb from 'busboy'; bb(...)`). Both are defeatable on purpose rather than by accident. A `ReturnType<typeof busboy>` type annotation is not a call expression and correctly does not fire; it is pinned as a negative fixture so a future pattern change cannot silently start flagging type positions. The behavioural backstop for all of these is [`packages/app/tests/integration/api-error-envelope/upload-filename-charset.test.ts`](../packages/app/tests/integration/api-error-envelope/upload-filename-charset.test.ts), which asserts the decode end to end over real HTTP through both endpoints.--Plugin: [`biome-plugins/require-utf8-multipart-parser.grit`](require-utf8-multipart-parser.grit). Fixture: [`biome-plugins/__fixtures__/require-utf8-multipart-parser.fixture.tsx`](__fixtures__/require-utf8-multipart-parser.fixture.tsx). Test: [`packages/server/src/lint-plugins/require-utf8-multipart-parser.test.ts`](../packages/server/src/lint-plugins/require-utf8-multipart-parser.test.ts). See [PRECEDENTS.md #42](../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the GritQL-plugin convention.--### `no-blind-agent-host-fanout.grit`--Scope discipline for user-global Agent Skill installs. Bans the `skills` CLI npm specs (`skills@~1.5.0` and its caret / exact / `latest` variants) and the bare `'--agent'` argv token anywhere under `packages/{server,cli}/src/**`.--**Why.** `installUserSkill` used to shell out to `npx -y skills@~1.5.0 add <dir> --agent '*' -g -y --copy`. `--agent '*'` makes that CLI skip its own host detection and target every host in its registry (~75 and growing), so a single `ok init` wrote 110 directories across 54 tool-config homes in a real `$HOME` — 51 of them for tools the reporter had never installed ([issue #820](https://github.com/inkeep/open-knowledge/issues/820)). OK's user-global skills are behavioural instructions autonomous software reads and acts on, so writing one into a tool's config dir is a scope-of-consent decision, not cosmetic clutter.--Nothing about the dependency was load-bearing: OK passed a local path (no source resolution), forced `--copy` (no symlinks), and the CLI writes no lockfile or state at global scope. It contributed a directory table that OK already maintains in core for project scope — while costing a floating-range `npx -y` fetch-and-execute at init time and third-party telemetry OK never opted out of. The install now writes directly, gated on `detectUserSkillHosts`, whose host set derives from `HOSTS_WITH_USER_SKILL_DIR` in [`packages/core/src/constants/editors.ts`](../packages/core/src/constants/editors.ts).--The rule bans the *ingredients* rather than the assembled command line, because the argv was built as an array of literals that no single AST node spans.--**Scoped via `overrides[].plugins`** to `packages/{server,cli}/src/**/*.ts`. Tests are deliberately **in** scope (unlike the sibling spawn rule): a test that reintroduces the invocation reintroduces the fan-out, and the suite asserts the writer's behavior through the filesystem, never through argv.--The rule does NOT catch a spec assembled by concatenation or interpolation (`` `skills@${range}` ``), or the flag reaching a subprocess through a variable — GritQL matches the string-literal node. Both are defeatable-on-purpose rather than accidental; the behavioural backstop is [`packages/server/src/skill-install.test.ts`](../packages/server/src/skill-install.test.ts), whose "never creates a dotdir for a host that is not installed" case asserts the real filesystem outcome.--Adding a host that needs a different install mechanism? Add it to `HOSTS_WITH_USER_SKILL_DIR` and let the detection gate cover it — don't suppress this rule.--Plugin: [`biome-plugins/no-blind-agent-host-fanout.grit`](no-blind-agent-host-fanout.grit). Fixture: [`biome-plugins/__fixtures__/no-blind-agent-host-fanout.fixture.tsx`](__fixtures__/no-blind-agent-host-fanout.fixture.tsx). Test: [`packages/app/tests/lint-plugins/no-blind-agent-host-fanout.test.ts`](../packages/app/tests/lint-plugins/no-blind-agent-host-fanout.test.ts). See [PRECEDENTS.md #42](../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the GritQL-plugin convention.--### `no-unwrapped-user-facing-string.grit`--Localization discipline. Makes a hardcoded user-facing string a **build-visible defect** rather than a convention someone has to remember — the gap that let the app accumulate residual English while the `en` catalog grew past 2,800 entries. Four surfaces:--- **Toast arguments** — `toast.error('…')`, `toast.success('…')`, any `toast.<method>` whose first argument is a string literal.-- **JSX text children** — `<span>No documents match your search</span>`.-- **UI-facing attributes** — `aria-label`, `placeholder`, `title`, `alt` with a string-literal value.-- **UI-facing object properties** — `{ label: 'Delete table' }`, `{ description: 'Link to a page or external URL' }`. Same six names as the attribute branch plus `label` and `description`.--The wrapped forms — `<Trans>…</Trans>`, `` t`…` `` from `useLingui()` / `@lingui/core/macro` — are not literals in the positions above and never fire.--**Why object position needed its own branch.** `{ title: '…' }` renders the same words `title="…"` renders, but the attribute branch cannot see it, and that shape was where the residual English actually was: a sweep found 50 of them (menu items, picker entries, hover-preview panels, user-shown error envelopes) against zero the other three branches could reach. The name scope is what keeps it usable — the same measurement that produced the JSX prose test applies here, since an unscoped literal rule fires on every `className`, `data-testid`, and identifier in the tree. With the six names and the prose test, the branch found **1 hit in `packages/app/src`** after the migration landed, and that one is a deliberate non-copy label carrying a `biome-ignore`.--**Implementation note.** Biome's GritQL exposes no object-member node kind (its JS node vocabulary is `call_expression`, `member_expression`, `jsx_attribute`, … — there is no `pair`), so the branch is written as the code snippet `` `$name: $value` ``. That binds to JS object-literal pairs only: a TypeScript member such as `label: 'left' | 'right'` inside a `type` or `interface` is a different node and is structurally out of reach, which is what keeps string-literal union types from firing.--**Where a `msg` descriptor is the fix instead of `t`.** When the object is module scope — a `const` array of menu items, a severity table, a language list — a `t` call in it resolves once at import and then keeps whatever language was active then, however correctly it is wrapped. `I18nProvider` re-renders context *consumers*, not the whole tree, so nothing corrects it later. Hold a `msg` descriptor in the object and resolve it with `t(descriptor)` at render, in a component that calls `useLingui()`; that hook call is also what subscribes the component to the locale change. `BlockTypeSelector.tsx` and `editor/utils/severity.ts` are the reference shapes.--**The prose test, and why the branches differ.** The two JSX branches require **two letter-words separated by whitespace**; the toast branch takes any literal. That asymmetry is measured, not stylistic: a toast argument is unambiguously user-facing, whereas raw JSX text in this codebase is overwhelmingly *not* prose. Firing on every JSX literal produced 53 hits across the product tree of which **zero** were genuine copy — keyboard-shortcut tokens (`Ctrl+Shift+N`), code identifiers (`open-knowledge`), sample paths (`notes / release-plan.md`), and brand marks (`OpenKnowledge`). With the prose test the same sweep produced **4 hits, all real** (two `aria-label`s and one banner sentence in `ConflictsSection.tsx`, one toast in `FileTree.tsx`), which is the signal-to-noise ratio that makes a lint rule worth obeying. Note the two-word test also excludes tokens joined by punctuation, since `notes / release-plan.md` has no letter–space–letter run.--`<Brand> icon` is exempt in-pattern: it is the accessible name of a third-party mark, and translating it renames the product.--**Scoped via `overrides[].plugins`** to `packages/{app,desktop,plugin}/src/**`, `.ts` as well as `.tsx` — the toast branch's dominant shape is a plain `lib/` helper, not a component. Exemptions as negative `!`-globs: `!packages/app/src/editor/**` (ProseMirror/CodeMirror-managed views, whose placeholder and title strings are editor affordances), `!packages/app/src/components/ui/**` (shadcn primitive wrappers — attribute strings there are prop plumbing), `!packages/desktop/src/main/**` (the Electron main process — see below), and `!**/*.test.ts` / `!**/*.test.tsx` / `!**/*.dom.test.tsx`.--`packages/desktop/src/main/**` is excluded because `lingui extract` reads `packages/app/src` only, so a `t` macro written there reaches no catalog; main's one translated surface, the native menus, goes through `main-i18n.ts`, which looks its labels up by hash against the renderer's compiled catalogs. The object-property branch fires on 20 of main's `dialog.showMessageBox` templates and OTel metric descriptions, and asking for a fix that does not exist is how a rule earns a blanket suppression. Main's four sibling dirs (`preload` / `renderer` / `shared` / `utility`) stay in scope.--The rule does NOT catch:--- **Single-word JSX copy** — `<Button>Save</Button>`. The known cost of the prose test; nothing statically separates `Save` from `Discord`. The backstop is the Simplified-Chinese coverage sweep, where residual English is unmissable against Han script.-- **Object properties outside the six scoped names** — `{ message: 'Server returned…' }`, `{ error: '…' }`, `{ detail: '…' }`. Measured rather than assumed: those three names are dominated by log lines and developer diagnostics (`{ detail: 'copilot is terminal-only; launch via requestTerminalLaunch' }`), so scoping them in would make the rule's first act a demand to translate something no reader ever sees. The user-shown members of that set were wrapped by hand.-- **Module-const strings** — `const TOAST = '…'`. Not a property; a separate shape, and one where a `t` at module scope would be a freeze rather than a fix.-- **A ternary or call in property position** — `{ error: e instanceof Error ? e.message : 'Unknown error' }`. GritQL regexes match the whole node's text, so the value has to *be* a literal; a value that merely *contains* one would also match `{ label: cn('a b') }`.-- **A JSX expression-child string literal** — `<span>{'Loading'}</span>`, or an attribute written `aria-label={'…'}`. The value node opens with `{`, which is what distinguishes a literal from a wrapped macro.-- **Template literals** anywhere, including a toast `description`.-- **The CLI command surface** — `packages/cli/src/**`, deliberately never localized.--Plugin: [`biome-plugins/no-unwrapped-user-facing-string.grit`](no-unwrapped-user-facing-string.grit). Fixture: [`biome-plugins/__fixtures__/no-unwrapped-user-facing-string.fixture.tsx`](__fixtures__/no-unwrapped-user-facing-string.fixture.tsx). Test: [`packages/app/tests/lint-plugins/no-unwrapped-user-facing-string.test.ts`](../packages/app/tests/lint-plugins/no-unwrapped-user-facing-string.test.ts). See [PRECEDENTS.md #42](../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the GritQL-plugin convention.--### `no-physical-direction-utility.grit`--Reading-direction discipline. Chrome layout takes its side from the reading direction, never from a hardcoded left or right, so that adding a right-to-left locale is a catalog change rather than a chrome-wide retrofit. The rule flags physical **margin**, **padding**, and **inset** Tailwind utilities — `ml-`/`mr-`, `pl-`/`pr-`, `left-`/`right-` — and asks for `ms-`/`me-`, `ps-`/`pe-`, `start-`/`end-` instead. In a left-to-right locale the two compile to the same used value, so draining the backlog is a visual no-op today and correct later.--**It matches class strings, not stylesheets.** That is where this codebase's physical properties live: the sweep that produced this rule found 148 of them in `className` values against 31 CSS declarations, and 24 of those 31 style the editor or the rendered document rather than the chrome. One `jsx_attribute` branch covers both spellings, because the bound node is the whole initializer clause — a plain `className="ml-2 flex"` and a multi-line `className={cn('…', cond && 'pr-1.5')}` are the same node to the pattern. The name is matched as `*lassName`, so component APIs that forward a second class string (`containerClassName`, `overflowClassName`) are in scope under their own names.--**Two shapes look physical and are not, and both are measured rather than assumed:**--- **`inset-x-*` is already logical.** Tailwind v4 compiles `inset-x-0` to `inset-inline: 0`. It is absent from the pattern for that reason, not as a carve-out.-- **`left-1/2` is the centering anchor.** It exists to be cancelled by the `-translate-x-1/2` beside it, and at 50% the offset is symmetric, so it centers correctly in both directions; `start-1/2` would flip the anchor while the translate kept pulling the same way. The pattern requires a delimiter after a numeric value, which leaves every fractional inset alone — all 10 `left-1/2` sites in the tree carry that translate.--**Scoped via `overrides[].plugins`** to `packages/{app,desktop,plugin}/src/**/*.tsx`. `.tsx` only: the single branch matches a JSX attribute, so a `.ts` glob would be dead scope rather than extra coverage. Exemptions as negative `!`-globs: `!packages/app/src/editor/**` (ProseMirror and CodeMirror own their DOM and take per-string direction from the text rather than from the chrome), `!packages/app/src/components/ui/**` (shadcn primitives are regenerated by `shadcn add`, so an edit there is overwritten on the next pull), and `!**/*.test.tsx` / `!**/*.dom.test.tsx`.--**Pre-rule backlog (ratchet pattern).** The 81 files that pre-date the rule carry a file-level `// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — …` header, same contract as `no-raw-html-interactive-element`: the comment list across the codebase IS the visible backlog, and review treats each header as a backlog marker rather than a free pass. Drain a file by swapping `ml`/`mr` → `ms`/`me`, `pl`/`pr` → `ps`/`pe`, `left`/`right` → `start`/`end`, then deleting the header — the rule starts firing again immediately, so a partial pass that misses one utility fails the gate. 81 of the 292 chrome files in scope carry a header (148 utilities in total), so the rule is live on the other 211 today.--The rule does NOT catch:--- **Class strings outside a class prop** — `{ containerClassName: 'bottom-3 left-3' }` as an object-literal property, or a module-level `const ROW = 'ml-2 flex'`. Five sites in the tree: four object-literal properties in `GraphLegend.tsx`, one const in `editor-tabs-chrome.ts`. A hand fix, not a rule — the name predicate keys on a JSX attribute, and widening it to every string-valued property is the false-positive surface the negative cases below the fixture's group 6 exist to bound.-- **Fractional insets** — `left-1/3` alongside the `left-1/2` the exclusion is aimed at. One site, and separating them costs more regex than it buys.-- **CSS declarations** — `margin-left:` in `globals.css` (25 sites) or inside a `unsafeCSS` template literal (6, all in the file-tree and skill-cluster shadow styles). A `language css` plugin would reach the stylesheet — verified working in Biome 2.4.15 — but not the template literals, and 24 of the 25 stylesheet sites style the editor or the rendered document, surfaces this rule exempts anyway. One chrome site remains: `.tabs-strip-add`.-- **Physical `border-*`, `rounded-*`, and `text-left`/`text-right`** — real direction hazards, outside this rule's margin/padding/inset scope.--Plugin: [`biome-plugins/no-physical-direction-utility.grit`](no-physical-direction-utility.grit). Fixture: [`biome-plugins/__fixtures__/no-physical-direction-utility.fixture.tsx`](__fixtures__/no-physical-direction-utility.fixture.tsx). Test: [`packages/app/tests/lint-plugins/no-physical-direction-utility.test.ts`](../packages/app/tests/lint-plugins/no-physical-direction-utility.test.ts). See [PRECEDENTS.md #42](../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the GritQL-plugin convention.--### `no-raw-route-hash-construction.grit`--Sole route-hash builder. [`packages/app/src/lib/doc-hash.ts`](../packages/app/src/lib/doc-hash.ts) owns the `#/` route prefix. Every other file in the app asks it for a hash — `hashFromDocName`, `hashFromFolderPath`, `hashFromAssetPath` or `encodeShareTargetForHash` — rather than joining a name onto the prefix itself.--**Why.** A doc or folder name reaches the router through `window.location.hash`, and the WHATWG fragment percent-encode set does not include `#`, `?` or `%`. A hash built by hand therefore hands those characters to `docNameFromHash` as routing syntax: it reads the text before the first one, so a leading `#` yields null and the app opens a New Tab instead of the document, while a `#` mid-name resolves silently to a truncation. The rule is structural rather than a set of fixes because the prefix is trivially easy to spell, so hand-built copies accumulate faster than they are found, and each one fails silently: the link is still built, it just points somewhere else.--**Scoped via `overrides[].plugins`** to `packages/app/src/**/*.{ts,tsx}`, with `!packages/app/src/lib/doc-hash.ts` (the sanctioned builder) and `!**/*.test.{ts,tsx}` (tests write expected hashes as literals) excluded. `packages/server` builds preview URLs through its own `encodeDocName` and is out of scope.--Reading a hash is untouched: `hash.startsWith('#/')`, `hash === '#/'` and the bare `'#/'` content-root sentinel are comparisons, not constructions, and the fixture pins that they stay legal.--The rule matches a node's own source text, so a comment, JSX text or a regex literal spelling the shape cannot trigger it — the fixture pins all three. The rule does NOT catch: the prefix behind a named constant (`const P = '#/'; P + name`), which needs dataflow and has no occurrence today; `name + '#/'`, the prefix on the right of a concatenation, which does not build a route hash; a helper that takes the prefix as a parameter; and the read side, where [`editor/internal-link-helpers.ts`](../packages/app/src/editor/internal-link-helpers.ts) still carries a hand-rolled parser — a different rule.--Plugin: [`biome-plugins/no-raw-route-hash-construction.grit`](no-raw-route-hash-construction.grit). Fixture: [`biome-plugins/__fixtures__/no-raw-route-hash-construction.fixture.tsx`](__fixtures__/no-raw-route-hash-construction.fixture.tsx). Test: [`packages/app/src/lint-plugins/no-raw-route-hash-construction.test.ts`](../packages/app/src/lint-plugins/no-raw-route-hash-construction.test.ts). See [PRECEDENTS.md #42](../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the GritQL-plugin convention.--### `no-demoted-dialog-confirm.grit`--Dialog-footer emphasis hierarchy. A confirmation dialog's footer holds two actions, and the confirm has to outrank the dismiss. `secondary` is the one Button variant that draws no border and whose fill is imperceptible: `bg-secondary` sits within roughly 1.1:1 of the dialog surface in both light and dark, so the button reads as flat text rather than an action. Every other variant either fills with a contrasting color or draws a border, so `secondary` is the only one that can lose that contest with the `outline` Cancel standing beside it. A footer authored that way inverts the hierarchy: the escape action reads as the primary one, and the actual primary CTA reads as de-emphasized text. The rule flags a `DialogFooter` or `AlertDialogFooter` containing `variant="secondary"` and asks for `default` (or `destructive`, when the action is irreversible removal).--**The typographic treatment comes from the footer, not the variant.** `DialogFooter` and `AlertDialogFooter` carry `[&_button]:` and `[&_[data-slot=button]]:` pairs of `font-mono uppercase`, so every footer action is drawn in the footer's typeface whatever variant it takes. Nothing needs hand-adding at a call site, and a `className="font-mono uppercase"` on a footer button is redundant rather than load-bearing. `default`, `destructive` and `outline-mono` also bake the pair into their variant strings — that is what dresses them outside a footer, so do not delete it on the strength of this paragraph.--**Why two selectors rather than one.** Neither predicate covers every footer shape on its own, so the rule is their union:--| Footer action | `button` element | `[data-slot=button]` |-| --- | --- | --- |-| plain `<Button>` | yes | yes |-| `<Button asChild>` rendering an `<a>` | no | yes |-| `AlertDialogCancel` / `AlertDialogAction` | yes | no |-| `DialogClose asChild` wrapping a `Button` | yes | no |--Radix's `Slot` lets the child's `data-slot` win, so the three wrapper primitives stamp their own slot name and fall out of a slot-only selector; `<Button asChild>` rendering an anchor is not a `<button>` element and falls out of a tag-only one. Keying on both covers all five. Keep the descendant combinator: `ShareBranchSwitchDialog` wraps three footer buttons in a `<div>`, which a child-scoped variant would miss.--Two consequences worth knowing before you fight them:--- **The footer outranks the button.** The compiled rule is `.…\:font-mono button { … }` at specificity `(0,1,1)`; a class on the button itself is `(0,1,0)` and loses, and `tailwind-merge` cannot arbitrate because the two declarations sit on different elements. Opting one footer button out of the treatment therefore needs the important modifier — `font-sans!` / `normal-case!` — not a plain utility.-- **A footer action that is neither a `<button>` nor a `Button` styles itself.** The bare `<a>` in `InstallInClaudeDesktopDialog`'s footer is the one live instance, and it carries its own `font-mono tracking-wide uppercase`. That is deliberate: the footer dresses the design system's buttons, and a hand-rolled action carries its own treatment. Promoting such a link to `<Button asChild>` brings it under the rule.--Historically the two sites this rule was written against had reached for `variant="secondary"` plus a hand-added `className="font-mono uppercase"`, which recovered the footer's typography while leaving the confirm without a perceptible fill. That is what makes the inversion easy to author by accident: the footer still looks like a footer. The canonical shape omits the prop entirely and lets `defaultVariants` supply `default`, matching every other confirm dialog in the tree.--**Matched as one whole JSX element, not as `<Tag $...>$body</Tag>`.** A footer holds two or more children, and a single `$body` capture binds only an arity-one child list. GritQL regex matches the entire node text, so the leading tag name anchors the match to footers themselves rather than to any ancestor that happens to contain one.--**Scoped via `overrides[].plugins`** to `packages/{app,desktop,plugin}/src/**/*.tsx`. `.tsx` only: the single branch matches a JSX element, so a `.ts` glob would be dead scope rather than extra coverage. Exemptions as negative `!`-globs: `!packages/app/src/components/ui/**` (the dialog and button primitives themselves, regenerated by `shadcn add`), and `!**/*.test.tsx` / `!**/*.dom.test.tsx` (a test that renders the demoted shape on purpose is pinning the regression, not shipping it).--The rule does NOT catch:--- **Indirect composition.** A confirm passed into the footer as a prop, or rendered by a shared sub-component, sits outside the footer element's text. The ceiling is deliberate: it keeps the rule to one structural predicate rather than a type-aware analysis.-- **The other direction.** A footer whose dismiss is over-emphasized (a `default` Cancel next to a `default` confirm) is a hierarchy problem this rule has no predicate for, since both buttons carry a fill.-- **Non-footer emphasis inversions.** A `CardFooter` or toolbar pairing a muted primary action with a prominent secondary one. `secondary` outside a dialog footer is a legitimate choice, which is why the scope is the footer element.--Suppress a footer that genuinely wants a muted tertiary control alongside a properly-weighted confirm with an inline `// biome-ignore lint/plugin/no-demoted-dialog-confirm: <reason>`.--Plugin: [`biome-plugins/no-demoted-dialog-confirm.grit`](no-demoted-dialog-confirm.grit). Fixture: [`biome-plugins/__fixtures__/no-demoted-dialog-confirm.fixture.tsx`](__fixtures__/no-demoted-dialog-confirm.fixture.tsx). Test: [`packages/app/tests/lint-plugins/no-demoted-dialog-confirm.test.ts`](../packages/app/tests/lint-plugins/no-demoted-dialog-confirm.test.ts). See [PRECEDENTS.md #42](../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the GritQL-plugin convention.--## Suppression--Inline `// biome-ignore` comments silence individual diagnostics. The most specific form names the rule and the reason:--```tsx-// biome-ignore lint/plugin/<rule-name>: <reason>-<span>…</span>-```--Empirically verified (matches Biome 2.4 suppression-comment syntax):-- `// biome-ignore lint: reason` (most generic — silences any lint diagnostic)-- `// biome-ignore lint/plugin: reason` (group level)-- `// biome-ignore lint/plugin/<rule-name>: reason` (specific — recommended)-- `// biome-ignore plugin: reason` does NOT work (missing `lint/` prefix)--Current production suppressions:-- `microcopy-ellipsis`: 2 sites (`AuthModal.tsx`, `Breadcrumb.tsx`)-- `no-loosely-typed-webcontents-ipc`: 15 sites (`preload/index.ts` ×12, `shared/ipc-send.ts` ×1, `tests/smoke/theme-sync.e2e.ts` ×2)-- `no-raw-html-interactive-element`: 19 file-level `biome-ignore-all` headers in `packages/app/src/{components,presence}/**` (pre-rule backlog awaiting shadcn migration; see the rule's section above for the ratchet contract)-- `no-resolved-value-theme-source`: 0 sites-- `no-roundtrip-identity-oracle`: 0 sites-- `no-inline-tolerance-class`: 0 sites-- `no-uninstall-forbidden-import`: 0 sites-- `no-demoted-dialog-confirm`: 0 sites-- `no-unwrapped-user-facing-string`: 1 site — `components/settings/lint-plugin-meta.ts` (`Frontmatter schemas`, the plugin's name beside `markdownlint`; `frontmatter` is a `GLOSSARY.md` never-translate term). Everything else the rule has ever found — the four hits on landing, the 50 the object-property branch was written for — was wrapped rather than suppressed.-- `no-physical-direction-utility`: 81 file-level `biome-ignore-all` headers across `packages/app/src/**` (pre-rule backlog awaiting the logical-property pass; see the rule's section above for the ratchet contract)--**Where an inline `// biome-ignore` can and cannot sit.** A suppression comment needs a line of its own directly above the reported span, which is a property of the *formatting* rather than of the rule. On a JSX attribute that means the attribute must already be on its own line — biome has no slot for a comment between two attributes sharing a line, and reports `Suppression comment has no effect` if you try. A `{/* biome-ignore */}` child covers the element that follows it, not a text node that starts after that element, so JSX-text diagnostics generally need the attribute-style form or a file-level `biome-ignore-all`.--## Adding a new plugin--### 1. Author the `.grit` file--Drop `<rule-name>.grit` in this directory. Each file is one GritQL pattern (or `or { ... }` of patterns):--```gritql-// <rule-name> — <one-line purpose>.-//-// <multi-line rationale>-//-// Suppress legitimate cases with:-// // biome-ignore lint/plugin/<rule-name>: <reason>--language js--`some-pattern($args)` as $node where {- register_diagnostic(- span = $node,- message = "<problem>. <fix-noun naming the action>. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#<rule-name>grit"- )-}-```--**Message shape (load-bearing).** The diagnostic message has three parts in order: (1) the problem statement, (2) the fix-noun (the noun-phrase or action verb-phrase the reader applies to make the message go away), (3) `See <docs-URL>` pointing at this README's rule section. Anchor naming follows GitHub's auto-slug for code-fence-stripped headers — `### \`microcopy-ellipsis.grit\`` becomes `#microcopy-ellipsisgrit` (the dot is dropped, the backticks are stripped). Process metadata (decision tokens like `D19:`, spec citations) does NOT belong here — it rots like any other banned comment.--**Regex matching note:** GritQL regex matches the ENTIRE node text. For substring matches, use `r"(?s).*<term>.*"` — the `.*` wildcards bracket the term, and `(?s)` enables single-line mode so `.` matches newlines (needed for multi-line argument expressions).--### 2. Register in `biome.jsonc`--Pick the scope:--- **Workspace-wide** (default — used by `microcopy-ellipsis`, `no-loosely-typed-webcontents-ipc`, `no-resolved-value-theme-source`): add the path to the top-level `plugins` array. The rule fires on every linted file.-- **Scoped to specific files** (used by `no-raw-html-interactive-element`): add an entry to the `overrides` array with `includes: [...]` listing the in-scope files (and the fixture path so the fixture test still triggers the rule) and `plugins: ['./biome-plugins/<rule-name>.grit']`. Use this when the rule's invariant only holds for a known subset of files — e.g., a rule that should only fire under a specific source subtree. Document the scope-discipline rationale in the rule's docstring and assert it in the fixture-file test.--Either shape participates in the same `biome check` pass; the override form just adds Biome's path matcher in front of the GritQL pattern.--### 3. Author the fixture file--Place at `biome-plugins/__fixtures__/<rule-name>.fixture.tsx`. **Pair positive cases with negative cases** — the negative cases give the `toBe(N)` assertion real teeth. Typical fixture structure:-- 1+ positive case per pattern branch the rule has-- 2-4 negative cases that resemble positive ones but should NOT fire (adjacent methods on the same objects, type declarations, unrelated functions with the same name)--The main `pnpm lint` does NOT reach the `biome-plugins/` directory (lint paths are `packages docs *.json *.jsonc *.ts`), so the deliberately-bad fixture content is invisible to the main lint.--### 4. Author the fixture-file test--Place at `packages/<host>/tests/<scope>/<rule-name>.test.ts` where `<host>` matches the package whose code the rule mainly targets. For `<scope>`: use `lint-plugins/` when `<host>` is `app` (`packages/app/tests/integration/` is in `md-audit`'s `DEFAULT_TEST_GLOBS` and requires audit JSDoc tags scoped to markdown editor surfaces that don't apply to lint-plugin tests), and use `integration/` for all other hosts (`desktop`, `plugin`). Template:--```ts-import { describe, expect, test } from 'vitest';-import { spawnSync } from 'node:child_process';-import { join } from 'node:path';--// __dirname → packages/<host>/tests/<scope>/. Repo root is 4 levels up.-const REPO_ROOT = join(__dirname, '..', '..', '..', '..');-const FIXTURE_REL = 'biome-plugins/__fixtures__/<rule-name>.fixture.tsx';--describe('<rule-name> GritQL plugin', () => {- test('fires on exactly N positive cases (and on no negative case)', () => {- const result = spawnSync('pnpm', ['exec', 'biome', 'check', FIXTURE_REL], {- cwd: REPO_ROOT,- encoding: 'utf-8',- });- expect(result.status).not.toBe(0);- const output = `${result.stdout}\n${result.stderr}`;- const fires = (output.match(/<unique diagnostic-message marker>/g) ?? []).length;- expect(fires).toBe(N); // exact equality — see "Why toBe(N)?" below- // Diagnostic message names the fix (action verb-phrase substring).- expect(output).toContain('<fix-noun>');- // Diagnostic message appends a docs URL — generic URL regex + anchor- // substring. The anchor check keeps the regex from being vacuously- // satisfied by an unrelated URL biome might surface elsewhere.- expect(output).toMatch(/https?:\/\/[^\s]+/);- expect(output).toContain('biome-plugins/README.md#<rule-name>grit');- });-- test('plugin is registered in biome.jsonc', () => {- const config = require(join(REPO_ROOT, 'biome.jsonc'));- const plugins = config.plugins ?? [];- expect(plugins).toContain('./biome-plugins/<rule-name>.grit');- });-});-```--**Why `toBe(N)` and not `toBeGreaterThanOrEqual(N)`:** exact equality catches drift in BOTH directions. A weakened pattern that no longer fires on a positive case drops the count below N → test fails (the standard mutation-self-test property). A widened pattern that fires on a negative case raises the count above N → test also fails. The latter is the asymmetric-coverage win — pairing positive cases with negative cases gives the `toBe(N)` floor real meaning.--The "plugin is registered" test catches the failure mode where a `.grit` file is added but the `biome.jsonc#plugins` entry is missing.--**For override-scoped plugins** (step 2 second variant): swap the registration assertion for one that asserts the plugin is in `config.overrides[].plugins`, the matching override's `includes` covers every in-scope file (including the fixture), and the plugin is NOT at root `plugins[]` (so an accidental move from override to root, which would over-fire, fails). `no-roundtrip-identity-oracle.test.ts` is the reference shape.--### 5. Verify--```bash-cd public/open-knowledge--# 1. Plugin loads + lint stays clean (after suppression comments at legitimate sites):-pnpm lint--# 2. Fixture test fires the diagnostic on positive cases:-pnpm exec vitest run packages/<host>/tests/integration/<rule-name>.test.ts--# 3. Mutation check (manual, one-time during dev):-# Temporarily break the .grit pattern; re-run the test; confirm it FAILS;-# restore the .grit pattern; re-run; confirm it passes.--# 4. False-positive widening check (manual, one-time):-# Add a positive case to the fixture WITHOUT bumping N in the test.-# Re-run; confirm it FAILS. This verifies toBe(N) is load-bearing.-```--### 6. Document the rule in this README--Add a section under `## Rules` with: what it flags, what it doesn't catch, links to the plugin + test + relevant precedents.--## Out of scope--- **Autofix.** Biome 2.4's GritQL plugins are diagnostic-only. Plugin diagnostics cannot apply code fixes. If autofix is required, a different enforcement mechanism is needed (build-time codemod, separate `--fix` script).-- **GritQL-internal path filters.** GritQL itself doesn't support file-path allowlists. The natural scope of the GritQL pattern (e.g., JSX-only) is the primary in-pattern mechanism for excluding files; inline `// biome-ignore` comments handle the residual. When a rule needs explicit per-file scoping, register the plugin under Biome's `overrides[].plugins` instead (see `no-raw-html-interactive-element` and step 2 of "Adding a new plugin") — that runs the path matcher at the Biome layer before invoking the GritQL pattern.-- **CLI string content.** `process.stderr.write('...')` / `console.log` template-literal content is not reliably matchable via GritQL call-expression patterns (false-positive rate too high). Review discipline covers these surfaces.--## References--- [Biome Linter Plugins](https://biomejs.dev/linter/plugins/)-- [Biome GritQL Plugin Recipes](https://biomejs.dev/recipes/gritql-plugins/)-- [GritQL Patterns reference](https://docs.grit.io/language/patterns)-- [PRECEDENTS.md #42](../PRECEDENTS.md#custom-lint-enforcement-precedent-42) — the architectural decision codifying this convention.-- [PRECEDENTS.md #14](../PRECEDENTS.md) — IPC discipline (enforced by `no-loosely-typed-webcontents-ipc.grit`).-- [PRECEDENTS.md #40(a)](../PRECEDENTS.md) — renderer-state↔main-state propagation (enforced by `no-resolved-value-theme-source.grit`).diff --git a/biome-plugins/__fixtures__/no-blind-agent-host-fanout.fixture.tsx b/biome-plugins/__fixtures__/no-blind-agent-host-fanout.fixture.tsxdeleted file mode 100644index 15bd107f9..000000000--- a/biome-plugins/__fixtures__/no-blind-agent-host-fanout.fixture.tsx+++ /dev/null@@ -1,55 +0,0 @@-/**- * Fixture for `no-blind-agent-host-fanout.grit`.- *- * Pairs 5 positive cases (the `skills` CLI npm specs OK used to shell out to,- * plus the bare `--agent` argv token whose `'*'` value caused issue #820 —- * plugin MUST fire) with negative cases (an unrelated `'skills'` word, a- * similarly-spelled flag, a comment mention, a template literal, and a- * concatenation — plugin must NOT fire). The fixture-file test asserts the- * diagnostic count with exact equality (`toBe(5)`) so both a weakened pattern- * (drops below 5) and a widened pattern that catches a negative (rises above 5)- * fail the gate.- *- * The template-literal and concatenation negatives are the honest precision- * boundary: GritQL matches the string-literal node, so a spec assembled at- * runtime slips through. That is a defeatable-on-purpose escape, not an- * accidental reintroduction — the behavioural backstop is the filesystem- * assertion in `packages/server/src/skill-install.test.ts` ("never creates a- * dotdir for a host that is not installed").- *- * Deliberately NOT linted by the main `pnpm lint` pass (biome-plugins/ is- * outside the lint paths); only the scoped override in biome.jsonc reaches it,- * via the fixture-file test.- */--declare const range: string;-declare function spawn(cmd: string, args: readonly string[]): void;--function positives() {- // P1-P4: every npm spec shape for the `skills` CLI OK used to fetch-and-exec.- spawn('npx', ['-y', 'skills@~1.5.0', 'add', '.']);- spawn('npx', ['-y', 'skills@^1.5.0', 'add', '.']);- spawn('npx', ['-y', '[email protected]', 'add', '.']);- spawn('npx', ['-y', 'skills@latest', 'add', '.']);- // P5: the flag itself — the incident was its `'*'` value, but the flag only- // exists to address that CLI, so the token is the reintroduction signal.- spawn('npx', ['add', '.', '--agent', '*']);-}--function negatives() {- // N1: the bare word, unrelated to the npm spec.- spawn('ok', ['skills', 'list']);- // N2-N3: similarly-spelled flags that are not the banned token.- spawn('ok', ['--agents', 'claude']);- spawn('ok', ['--agent-id', 'abc']);- // N4: a comment mentioning `npx skills@~1.5.0 add --agent '*'` — GritQL- // matches string-literal nodes, never trivia, so prose describing the old- // invocation (as the real module's docstring does) must stay silent.- spawn('ok', ['repair-skills']);- // N5: interpolation — no single node holds the whole value.- spawn('npx', [`skills@${range}`, 'add', '.']);- // N6: concatenation — likewise.- spawn('npx', [`skills@${''}${range}`, 'add', '.']);-}--export { positives, negatives };diff --git a/biome-plugins/class-proof-registration-discipline.grit b/biome-plugins/class-proof-registration-discipline.gritdeleted file mode 100644index ae1e1a103..000000000--- a/biome-plugins/class-proof-registration-discipline.grit+++ /dev/null@@ -1,52 +0,0 @@-// class-proof-registration-discipline — class-proof DSL contract enforcement.-//-// `defineClassProof()` (the class-proof DSL entry point) registers a class predicate + per-class proof obligation against ts-morph-// reflective enumeration. Two discipline rules:-//-// (a) Registrations live ONLY in the canonical `class-proofs/proofs/`-// dir (see the biome.jsonc override excludes). Authoring-// proofs elsewhere splinters the run-all manifest and breaks-// `runAllClassProofs(engine)`'s single-import contract.-// (b) Every call must pass both `predicate` and `proof` options. TypeScript-// enforces this at compile time via `ClassProofOptions<M>`; this rule-// is the lint-time backstop for the (rare) case where a registration-// is written outside the canonical dir AND escapes type-checking (e.g.-// a `.test.ts` file demoed before the test runs).-//-// Scoped via `overrides[].plugins` to ALL .ts/.tsx files EXCEPT the canonical-// proofs/ directory. Inside the-// canonical dir, neither pattern fires — TypeScript's-// `ClassProofOptions<M>` signature backstops the missing-args check. Outside-// the canonical dir, ANY `defineClassProof` call fires (= "wrong location"),-// and a missing-args call additionally fires a second diagnostic with a-// dedicated message so the author sees both reasons.-//-// Suppress legitimate uses (e.g. a test file that constructs a class-proof-// inline as part of a DSL-machinery test) with:-// // biome-ignore lint/plugin/class-proof-registration-discipline: <reason>--language js--or {- // Pattern A: missing predicate or proof option. `$opts` is the options- // bag; `contains` traverses into the object literal to find each key.- `defineClassProof($_, $opts)` as $call where {- or {- not $opts <: contains `predicate: $_`,- not $opts <: contains `proof: $_`- },- register_diagnostic(- span = $call,- message = "Class-proof registration missing `predicate` or `proof` option — both are required by `ClassProofOptions<M>`. Provide all three of `{ enumerate, predicate, proof }` to `defineClassProof()`. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#class-proof-registration-disciplinegrit"- )- },- // Pattern B: any `defineClassProof` call at all. The override scope- // excludes the canonical proofs/ dir, so this fires only on registrations- // outside the sanctioned location.- `defineClassProof($_, $_)` as $call where {- register_diagnostic(- span = $call,- message = "Class-proof registered outside the canonical dir. Move the `defineClassProof(...)` call to `packages/md-conformance/src/class-proofs/proofs/<name>.ts` and export it from `run-all.ts` so it participates in the orchestrator manifest. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#class-proof-registration-disciplinegrit"- )- }-}diff --git a/biome-plugins/cst-pm-handler-todo-stub.grit b/biome-plugins/cst-pm-handler-todo-stub.gritdeleted file mode 100644index 65431cdd3..000000000--- a/biome-plugins/cst-pm-handler-todo-stub.grit+++ /dev/null@@ -1,34 +0,0 @@-// cst-pm-handler-todo-stub - codemod handler TODO-stub grep.-//-// The substrate-adapter codemod seeds a per-substrate handler scaffold by-// emitting one stub file per PM node type, each whose body is-// `throw new Error("TODO: implement <substrate>:<dir>/<key>")`. This rule is a-// TODO-stub grep: it flags any `throw new Error` whose message starts with-// `TODO: implement ` inside a handler-directory file, so a codemod stub that-// survives to lint time is caught.-//-// It is NOT an exhaustiveness check. Whether a substrate covers every PM node-// type (the node-set traversal over `packages/core/schema-snapshot.json`) is a-// separate concern: the TypeScript handlers-table type check against-// `ICstEngine` is the compile-time backstop for missing methods, and the-// per-substrate node-set traversal belongs to a suite-self-consistency gate.-//-// Scoped via `overrides[].plugins` to the per-substrate handlers/ subtrees-// (see the biome.jsonc override includes) and the fixture.-// Out of scope: the codemod implementation itself, harness tests, oracles - all-// of which legitimately throw error tags that include the literal string-// `TODO: implement` (e.g. an oracle producing a synthetic failure reason).-//-// Suppress legitimate uses (a handler that legitimately throws "TODO" pending-// upstream work) with:-// // biome-ignore lint/plugin/cst-pm-handler-todo-stub: <reason>--language js--`throw new Error($msg)` as $stmt where {- $msg <: r"^['\"`]TODO: implement.*",- register_diagnostic(- span = $stmt,- message = "Codemod-emitted handler stub still throws TODO marker - fill in the substrate-specific body so the handler is implemented per the ICstEngine contract. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#cst-pm-handler-todo-stubgrit"- )-}diff --git a/biome-plugins/microcopy-ellipsis.grit b/biome-plugins/microcopy-ellipsis.gritdeleted file mode 100644index 8d7222494..000000000--- a/biome-plugins/microcopy-ellipsis.grit+++ /dev/null@@ -1,38 +0,0 @@-// microcopy-ellipsis — flag U+2026 (…) in customer-facing strings.-//-// The codebase reserves `…` for two cases:-// 1. macOS native menu items (`packages/desktop/src/main/menu.ts`)-// 2. Truncation indicators (literal "I cut text here")-//-// Suppress legitimate uses with:-// // biome-ignore lint/plugin/microcopy-ellipsis: <reason>-//-// See PRECEDENTS.md #42 (GritQL plugin convention) for full context.--language js--or {- // Pattern 1 — JSX text children containing U+2026- // Catches: <span>Loading…</span>- // Single-line flag (?s) so multiline JSX text matches across newlines.- jsx_text() as $text where {- $text <: r"(?s).*….*",- register_diagnostic(- span = $text,- message = "Microcopy: drop the trailing `…`. Reserve U+2026 for macOS native menus (menu.ts) or truncation indicators. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#microcopy-ellipsisgrit"- )- },-- // Pattern 2 — JSX attribute string value containing U+2026- // Catches: placeholder="Search…", aria-label="Open…", etc.- // Scoped to UI-facing attribute names via node-type query so plain- // JS assignment (const label = '…') does NOT match.- jsx_attribute($name, $value) where {- $name <: or { `placeholder`, `label`, `title`, `aria-label`, `description`, `tooltip` },- $value <: contains r"(?s).*….*",- register_diagnostic(- span = $value,- message = "Microcopy: drop the trailing `…` from this UI-facing attribute. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#microcopy-ellipsisgrit"- )- }-}diff --git a/biome-plugins/no-blind-agent-host-fanout.grit b/biome-plugins/no-blind-agent-host-fanout.gritdeleted file mode 100644index 63de372bc..000000000--- a/biome-plugins/no-blind-agent-host-fanout.grit+++ /dev/null@@ -1,59 +0,0 @@-// no-blind-agent-host-fanout — user-global skill installs must be detection-gated.-//-// OK's user-global Agent Skills are behavioural instructions autonomous software-// reads and acts on. Writing them into a tool's config dir is a scope-of-consent-// decision, so it is allowed ONLY for hosts detected on disk.-//-// The regression this prevents (issue #820): `installUserSkill` shelled out to-//-// npx -y skills@~1.5.0 add <dir> --agent '*' -g -y --copy-//-// `--agent '*'` makes that CLI skip its own host detection and target every host-// in its registry (~75 and growing). One `ok init` created 110 directories across-// 54 tool-config homes in a real `$HOME`; 51 of those tools were never installed.-// The invocation shipped in v0.3.0 and survived 15 months because the spec's own-// open question about `--agent '*'`'s behavior (Q10) was never closed, while the-// code's doc comment and the terminal summary both asserted the OPPOSITE — that-// OK had detected the user's hosts.-//-// The rule bans the ingredients rather than the assembled command line, because-// the argv is built as an array of literals that no single node spans:-// - any `skills@…` npm spec — OK writes user-global skills itself now-// (`installUserSkill` in `packages/server/src/skill-install.ts`), gated on-// `detectUserSkillHosts`. There is no supported reason to re-introduce the-// subprocess; it also cost a floating-range fetch-and-execute at init time-// and third-party telemetry OK never opted out of.-// - a bare `'--agent'` argv token — the flag only exists to address that CLI,-// and `'*'` is the value that caused the incident.-//-// Scoped via `overrides[].plugins` to `packages/{server,cli}/src/**` — where the-// user-global install lives. Tests are NOT excluded: a test that reintroduces the-// invocation is exactly as load-bearing as production code here, and the suite-// asserts the writer's behavior through the filesystem, never through argv.-//-// Does NOT catch (documented honestly): a spec string assembled by concatenation-// or interpolation (`'skills@' + range`), or the flag reaching a subprocess via a-// variable. Both are defeatable-on-purpose, not accidental reintroductions; the-// filesystem assertions in `skill-install.test.ts` ("never creates a dotdir for a-// host that is not installed") are the behavioural backstop.-//-// If a future host genuinely needs a different install mechanism, add it to-// `HOSTS_WITH_USER_SKILL_DIR` in `packages/core/src/constants/editors.ts` and let-// the detection gate cover it — do not suppress this rule.-//-// See PRECEDENTS.md #42 (custom Biome enforcement is GritQL plugins).--language js--or {- `'skills@~1.5.0'` as $lit,- `'skills@^1.5.0'` as $lit,- `'[email protected]'` as $lit,- `'skills@latest'` as $lit,- `'--agent'` as $lit-} where {- register_diagnostic(- span = $lit,- message = "User-global skill installs must be gated on detected hosts, not fanned out via the `skills` CLI's `--agent '*'`. OK writes these dirs itself — use `installUserSkill` / `detectUserSkillHosts` from @inkeep/open-knowledge-server, whose host set comes from core's `HOSTS_WITH_USER_SKILL_DIR`. `--agent '*'` bypasses host detection and creates config dirs for tools the user never installed (issue #820: 51 such dirs from one `ok init`). See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-blind-agent-host-fanoutgrit"- )-}diff --git a/biome-plugins/no-demoted-dialog-confirm.grit b/biome-plugins/no-demoted-dialog-confirm.gritdeleted file mode 100644index 42e0d7dc3..000000000--- a/biome-plugins/no-demoted-dialog-confirm.grit+++ /dev/null@@ -1,69 +0,0 @@-// no-demoted-dialog-confirm — a dialog footer's confirm must outrank its dismiss.-//-// `secondary` is the variant behind the real footers this rule was written-// for: `bg-secondary` sits within roughly 1.1:1 of the dialog surface in both-// themes, and the base class draws `border-transparent`, so the button reads-// as flat text and LOSES the emphasis contest with the `outline` Cancel-// standing beside it. A footer authored that way inverts the visual-// hierarchy: the escape action reads as the primary one and the actual-// primary CTA reads as de-emphasized text.-//-// `ghost`, `link` and `link-muted` are flat at rest too, so the failure shape-// is not unique to `secondary`. They are not plausible footer-confirm choices-// and no such footer exists in the codebase, so the pattern below stays-// narrow rather than widening to catch a shape nobody writes. If one lands,-// widen the pattern rather than assuming it is already covered.-//-// The confirm belongs on `default` (or `destructive` when the action is-// irreversible removal). `DialogFooter` and `AlertDialogFooter` impose-// `font-mono uppercase` on every button they contain, so the row's-// typographic treatment is the footer's job and there is nothing to-// hand-add on either button — a `className="font-mono uppercase"` on a-// footer button is redundant, not load-bearing. `default`, `destructive`-// and `outline-mono` bake the pair into their variant strings too, which is-// what dresses them outside a footer. The footer's rule outranks-// the button's own class (`(0,1,1)` vs `(0,1,0)`, and the two declarations-// sit on different elements so `tailwind-merge` cannot arbitrate), so-// opting one button out takes `font-sans!` / `normal-case!` rather than a-// plain utility. The footer keys on both the `button` element and-// `[data-slot=button]`, because neither alone covers every shape: the-// AlertDialog wrappers stamp their own data-slot, and `<Button asChild>`-// rendering an anchor is not a button element. A footer action that is-// neither — the bare `<a>` in InstallInClaudeDesktopDialog — styles itself,-// by design. Canonical shape, matching-// every other confirm dialog in the codebase, is to omit the prop entirely-// and let `defaultVariants` supply `default`:-//-// <DialogFooter>-// <Button variant="outline" onClick={close}>Cancel</Button>-// <Button onClick={submit}>Publish</Button>-// </DialogFooter>-//-// The rule reads the footer element's whole text, so a confirm composed-// indirectly (passed in as a prop, rendered by a shared sub-component) is-// outside its reach. That ceiling is deliberate — it keeps the rule to one-// structural predicate rather than a type-aware analysis.-//-// Suppress a footer that genuinely wants a muted control (a tertiary action-// sitting alongside a properly-weighted confirm) with:-// // biome-ignore lint/plugin/no-demoted-dialog-confirm: <reason>-//-// See PRECEDENTS.md #42 (custom Biome enforcement is GritQL plugins).--language js--// Matched as one whole element rather than as `<Tag $...>$body</Tag>`,-// because a footer holds two or more children and a single `$body` capture-// binds only an arity-one child list. GritQL regex matches the ENTIRE node-// text, so the leading tag name anchors the match to footers themselves and-// not to any ancestor that happens to contain one. `(?s)` lets `.` cross-// newlines; capturing groups silently never match in Biome's dialect, hence-// `(?:…)`.-jsx_element() as $footer where {- $footer <: r"(?s)<(?:Alert)?DialogFooter[\s>].*",- $footer <: r"(?s).*variant=\"secondary\".*",- register_diagnostic(- span = $footer,- message = "Demoted confirm in a dialog footer. `secondary` draws no border and its `bg-secondary` fill sits within about 1.1:1 of the dialog surface, so it reads as flat text and loses the emphasis contest with the `outline` dismiss beside it. Drop the variant prop and let the confirm take `default` (or `destructive` for irreversible removal); the footer already supplies the row's font-mono uppercase treatment, so there is nothing to hand-add. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-demoted-dialog-confirmgrit"- )-}diff --git a/biome-plugins/no-hand-rolled-spinner.grit b/biome-plugins/no-hand-rolled-spinner.gritdeleted file mode 100644index 6b773cbc7..000000000--- a/biome-plugins/no-hand-rolled-spinner.grit+++ /dev/null@@ -1,36 +0,0 @@-// no-hand-rolled-spinner — loading spinners come from the Spinner primitive, so-// reduced-motion support and the accessible name are inherited rather than-// remembered per call site.-//-// `animate-spin` applied by hand spins through `prefers-reduced-motion` (a-// vestibular trigger) and carries no role or label unless the author adds them.-// `Spinner` bakes in `motion-reduce:animate-none`, `role="status"`, and a-// localized `aria-label`; pass `icon` when the glyph shape carries meaning-// (RefreshCw for syncing, Undo2 for reverting) and `aria-hidden="true"` when a-// wrapper or enclosing control already names the loading state.-//-// Suppress a legitimately non-Spinner spin (a decorative flourish, a non-loading-// rotation) with:-// // biome-ignore lint/plugin/no-hand-rolled-spinner: <reason>-// placed on the line above the class attribute (the attribute must be on its own-// line — Biome has no slot for a comment between attributes on one line).-//-// See PRECEDENTS.md #42 (custom Biome enforcement is GritQL plugins).--language js--// Matches `className` and every `*ClassName` prop in one predicate. `$value` is-// the whole initializer clause, so `className={cn('size-4 animate-spin', x)}`-// and a plain string both land in the same branch.-//-// GritQL regex matches the ENTIRE node text, so `.*` brackets a substring and-// `(?s)` lets `.` cross newlines. Capturing groups silently never match in-// Biome's dialect, hence `(?:…)` throughout.-jsx_attribute($name, $value) where {- $name <: r"(?s).*lassName",- $value <: r"(?s).*\banimate-spin\b.*",- register_diagnostic(- span = $value,- message = "Hand-rolled loading spinner. Use `<Spinner />` from `@/components/ui/spinner` so reduced motion and the accessible name come for free — pass `icon` to keep a meaningful glyph, `aria-hidden` when a wrapper already announces the state. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-hand-rolled-spinnergrit"- )-}diff --git a/biome-plugins/no-inline-tolerance-class.grit b/biome-plugins/no-inline-tolerance-class.gritdeleted file mode 100644index 97d35fe5a..000000000--- a/biome-plugins/no-inline-tolerance-class.grit+++ /dev/null@@ -1,60 +0,0 @@-// no-inline-tolerance-class — forbid an inline bridge normalization-class value in a public test.-//-// `BRIDGE_TOLERANCE_CLASSES` (packages/core/src/bridge/normalize.ts) is the-// bridge normalizer's catalog of byte-difference equivalence classes it tolerates.-// A public test should assert OBSERVABLE behavior — that two inputs reduce to the-// same `normalizeBridge` output — rather than hard-coding one of those class-// labels as an inline string literal: the label is an internal classification-// detail, and pinning it inline both couples the test to that detail and-// re-declares the catalog outside the modules that own it. `check-mirror-test-policy`-// Check B blocks a public test from IMPORTING the catalog symbol; this rule closes-// the complementary gap where a test re-encodes a class value as an inline string-// literal, past the import check.-//-// NOT matched, by design: the four universal text-encoding classes — `bom`,-// `crlf`, `trailing-whitespace`, `trailing-newline`. Those are normalizations-// every text tool performs, and the public floor telemetry runtime-// (packages/core/src/bridge/tolerance-telemetry.ts) surfaces them; public tests-// legitimately assert that runtime emits `class: 'crlf'` for a CRLF input.-// Matching them would redden those floor tests. The fixture test's drift canary-// pins this partition: every catalog member is either a matched arm here or one-// of those four universal classes, so a class added to the catalog reddens until-// it is classified.-//-// IDENTITY, not substring: the `or {}` matches a string-literal node whose value-// IS exactly a catalog member. A class name that appears only as a substring of a-// larger string — a test-title sentence (`'... (doc-start-thematic class)'`), a-// docName (`'fr34-doc-start-thematic'`), or a label — has a different node value-// and does not fire. The match is quote-style independent (a single-quoted-// pattern matches the double-quoted form Biome emits).-//-// Does NOT catch (documented honestly):-// - A class name built by concatenation (`'doc-start-' + 'thematic'`) or-// interpolation — neither operand is the whole value.-// - A class name in a template literal or a comment — GritQL matches the-// string-literal node, not template content or trivia.-//-// Suppress a legitimate inline use (none expected on the public surface) with:-// // biome-ignore lint/plugin/no-inline-tolerance-class: <reason>--language js--or {- `'commonmark-escape'` as $lit,- `'emphasis-around-code'` as $lit,- `'leading-newline'` as $lit,- `'doc-start-thematic'` as $lit,- `'block-separator-collapse'` as $lit,- `'table-align-row-spacing'` as $lit,- `'row-no-trailing-pipe'` as $lit,- `'list-indent-canonical'` as $lit,- `'ordered-list-marker-number'` as $lit,- `'paragraph-continuation-indent'` as $lit,- `'jsx-container-boundary-blank'` as $lit,- `'blank-line-collapse'` as $lit-} where {- register_diagnostic(- span = $lit,- message = "Inline bridge normalization-class value in a public test. Assert observable `normalizeBridge` equivalence between inputs instead of hard-coding a BRIDGE_TOLERANCE_CLASSES label as a string literal. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-inline-tolerance-classgrit"- )-}diff --git a/biome-plugins/no-loosely-typed-webcontents-ipc.grit b/biome-plugins/no-loosely-typed-webcontents-ipc.gritdeleted file mode 100644index bb0c2f1d9..000000000--- a/biome-plugins/no-loosely-typed-webcontents-ipc.grit+++ /dev/null@@ -1,27 +0,0 @@-// no-loosely-typed-webcontents-ipc — IPC discipline enforcement.-//-// Forbids direct electron IPC primitives outside the typed-wrapper files.-// Consumers must route through `createInvoker` / `createHandler` /-// `sendToRenderer` from `packages/desktop/src/shared/ipc-*.ts`.-//-// Suppress legitimate uses (the wrapper implementations themselves):-// // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: <reason>-//-// See PRECEDENTS.md #14 (IPC discipline) + #42 (GritQL plugins are the-// canonical custom-enforcement mechanism).--language js--or {- `webContents.send($...)` as $call,- `ipcMain.handle($...)` as $call,- `ipcMain.on($...)` as $call,- `ipcRenderer.invoke($...)` as $call,- `ipcRenderer.on($...)` as $call,- `ipcRenderer.once($...)` as $call-} where {- register_diagnostic(- span = $call,- message = "Direct electron IPC primitive — route through createInvoker / createHandler / sendToRenderer from packages/desktop/src/shared/ipc-*.ts. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-loosely-typed-webcontents-ipcgrit"- )-}diff --git a/biome-plugins/no-physical-direction-utility.grit b/biome-plugins/no-physical-direction-utility.gritdeleted file mode 100644index 4120c0a93..000000000--- a/biome-plugins/no-physical-direction-utility.grit+++ /dev/null@@ -1,38 +0,0 @@-// no-physical-direction-utility — chrome layout derives its side from the-// reading direction, never from a hardcoded left or right.-//-// Suppress a legitimately physical site with:-// // biome-ignore lint/plugin/no-physical-direction-utility: <reason>-// placed on the line above the class attribute (the attribute must be on its-// own line — Biome has no slot for a comment between attributes on one line).-//-// See PRECEDENTS.md #42 (custom Biome enforcement is GritQL plugins).--language js--// Matches `className` and every `*ClassName` prop (`containerClassName`,-// `overflowClassName`, …) in one predicate. `$value` is the whole initializer-// clause, so a multi-line `className={cn('a', cond && 'ml-2')}` is covered by-// the same branch as a plain string — the tokens are all inside that node.-//-// GritQL regex matches the ENTIRE node text, so `.*` brackets a substring and-// `(?s)` lets `.` cross newlines. Two dialect notes, both measured against-// Biome 2.4.15: capturing groups `(…)` silently never match, so alternation-// must use `(?:…)`; and a literal `'` inside a character class also never-// matches, so the quote delimiters below are written as `\x27` / `\x22`.-//-// The value shapes are Tailwind's own: a keyword, an arbitrary `[…]` value, or-// a number that ENDS the token. Requiring a closing delimiter after the number-// is what leaves `left-1/2` alone — paired with `-translate-x-1/2` that is the-// centering anchor, and at 50% the offset is symmetric, so it already lays out-// the same in both directions while the logical form would fight the translate.-// `inset-x-*` is absent from the list for a stronger reason: Tailwind v4-// compiles it to `inset-inline`, so it is already logical.-jsx_attribute($name, $value) where {- $name <: r"(?s).*lassName",- $value <: r"(?s).*\b(?:ml|mr|pl|pr|left|right)-(?:auto|px|full|\[|[0-9]+(?:\.[0-9]+)?[\s\x22\x27\x60]).*",- register_diagnostic(- span = $value,- message = "Physical direction utility in a class string. Use the logical equivalent so the chrome follows the reading direction — `ms-`/`me-` for margin, `ps-`/`pe-` for padding, `start-`/`end-` for inset. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit"- )-}diff --git a/biome-plugins/no-raw-html-interactive-element.grit b/biome-plugins/no-raw-html-interactive-element.gritdeleted file mode 100644index 7e2281203..000000000--- a/biome-plugins/no-raw-html-interactive-element.grit+++ /dev/null@@ -1,50 +0,0 @@-// no-raw-html-interactive-element — UI primitives discipline enforcement.-//-// Forbids raw JSX `<button>`, `<input>`, `<textarea>`, `<select>` inside-// `packages/{app,desktop,plugin}/src/**/*.tsx`. Consumers must use the-// shadcn primitives (`Button`, `Input`, `Textarea`, `Select`) from-// `@/components/ui/*`. If the component isn't installed yet, add it via-// `bunx --bun shadcn@latest add <name>` first — never roll your own.-//-// The editor subtree (`packages/app/src/editor/**`) is exempt at the-// Biome `overrides[].includes[]` layer because ProseMirror NodeViews and-// PM-managed views legitimately render raw HTML for measurement / chrome-// reasons (see `biome.jsonc` for the scope; the `useSemanticElements` and-// related a11y suppressions in editor/* are part of the same exemption).-//-// Why a GritQL plugin and not Biome's built-in `a11y/useButtonType` or-// `useSemanticElements`: those address a11y semantics, not the-// shadcn-first design contract. The team's specific failure mode (see-// PR #937) was Codex / Claude-Code / human contributors writing raw-// `<button>` JSX while a shadcn `<Button>` from `@/components/ui/button`-// already existed in the file — an a11y-clean violation of the-// shadcn-first contract. This rule is the structural enforcement that-// catches it at editor-save / `bun run lint` time.-//-// Suppress narrow legitimate uses (e.g. a checkbox display in a slash-// menu where shadcn `Checkbox` would over-style) with:-// // biome-ignore lint/plugin/no-raw-html-interactive-element: <reason>-//-// For larger backlogs (files that pre-date the rule and need migration),-// use the file-level form at the top of the file:-// // biome-ignore-all lint/plugin/no-raw-html-interactive-element: <reason>-//-// See PRECEDENTS.md #42 (custom Biome enforcement is GritQL plugins).--language js--or {- `<button $...>$...</button>` as $node,- `<button $.../>` as $node,- `<input $.../>` as $node,- `<input $...></input>` as $node,- `<textarea $...>$...</textarea>` as $node,- `<textarea $.../>` as $node,- `<select $...>$...</select>` as $node,- `<select $.../>` as $node-} where {- register_diagnostic(- span = $node,- message = "Raw HTML interactive primitive — use shadcn Button/Input/Textarea/Select from @/components/ui/* (install missing via `bunx --bun shadcn@latest add <name>`). See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-raw-html-interactive-elementgrit"- )-}diff --git a/biome-plugins/no-raw-route-hash-construction.grit b/biome-plugins/no-raw-route-hash-construction.gritdeleted file mode 100644index 6080f74f0..000000000--- a/biome-plugins/no-raw-route-hash-construction.grit+++ /dev/null@@ -1,55 +0,0 @@-// no-raw-route-hash-construction — `lib/doc-hash.ts` is the sole route-hash builder.-//-// A doc or folder name reaches the router through `window.location.hash`, and-// the browser does not escape `#`, `?` or `%` in a fragment. A hash built by-// joining a name onto the `#/` prefix therefore hands those characters to the-// parser as routing syntax: `docNameFromHash` reads the text before the first-// one, so a leading `#` yields null and the app opens a New Tab instead of the-// document, and a `#` mid-name silently resolves to a truncation.-//-// The reason this is a rule and not a set of fixes is that the prefix is-// trivially easy to spell, so hand-built copies accumulate faster than they-// are found — and the failure is silent, because the link is still built, it-// just points somewhere else. So the rule is structural: ask `hashFromDocName`,-// `hashFromFolderPath`, `hashFromAssetPath` or `encodeShareTargetForHash` for a-// hash, and get one that is escaped.-//-// Reading a hash is untouched. `hash.startsWith('#/')`, `hash === '#/'` and the-// bare `'#/'` content-root sentinel are comparisons, not constructions, and the-// fixture pins that they stay legal.-//-// The two shapes, matched against a node's own source text so comments, JSX-// text and regex literals are excluded by construction rather than by hand:-//-// 1. A template literal containing `#/${…}` — the prefix joined to an-// interpolation, wherever in the template it appears.-// 2. A string literal `'#/'` immediately concatenated with `+`.-//-// Does NOT catch (documented honestly):-// - The prefix behind a named constant (`const P = '#/'; P + name`). That-// needs dataflow, which is outside a syntactic rule. No occurrence today.-// - `name + '#/'` — the prefix on the RIGHT of the concatenation, which does-// not produce a route hash.-// - A hash assembled by a helper that itself takes the prefix as a parameter.-// - The read side: `getCurrentDocNameFromHash` in `editor/internal-link-helpers.ts`-// is a second hand-rolled PARSER. Different rule, not this one.-//-// Scope: `packages/app/src/**` only, minus `lib/doc-hash.ts`, which is the-// sanctioned builder. `packages/server` builds preview URLs through its own-// `encodeDocName` and is out of scope.-//-// Suppress a legitimate exception with:-// // biome-ignore lint/plugin/no-raw-route-hash-construction: <reason>--language js--$e where {- or {- $e <: r"`[^`]*#/\$\{[^`]*`",- $e <: r"['\"`]#/['\"`]\s*\+.*"- },- register_diagnostic(- span = $e,- message = "Raw route-hash construction: this joins a name onto the `#/` prefix by hand, so a name containing `#`, `?` or `%` reaches the router unescaped and resolves to the wrong target (or to none, which opens a New Tab). Call `hashFromDocName`, `hashFromFolderPath`, `hashFromAssetPath` or `encodeShareTargetForHash` from `@/lib/doc-hash` instead — they percent-encode per segment so `/` stays a route separator. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-raw-route-hash-constructiongrit"- )-}diff --git a/biome-plugins/no-resolved-value-theme-source.grit b/biome-plugins/no-resolved-value-theme-source.gritdeleted file mode 100644index 54f298cc5..000000000--- a/biome-plugins/no-resolved-value-theme-source.grit+++ /dev/null@@ -1,58 +0,0 @@-// no-resolved-value-theme-source — 1-way theme contract.-//-// Forbids resolving the user-intent theme value at the `setThemeSource(...)`-// call site. The contract is 1-way: pass the unresolved CRDT value-// ('system' | 'light' | 'dark') verbatim. 'system' delegates appearance-// tracking to macOS via nativeTheme; resolving at the call site-// (matchMedia, prefersDark ternary, etc.) loses tracking.-//-// Suppress legitimate uses with:-// // biome-ignore lint/plugin/no-resolved-value-theme-source: <reason>-//-// See PRECEDENTS.md #40(a) (renderer-state↔main-state propagation) + #42.--language js--// GritQL regex matches the ENTIRE node text — use `.*` for substring matches.-// `(?s)` enables single-line mode so `.` matches newlines in multi-line args.--or {- // Bare-call form — rare in this codebase, but covered for parity with- // the prior Bun-test scanner.- `setThemeSource($arg)` as $call where {- $arg <: r"(?s).*matchMedia.*",- register_diagnostic(- span = $call,- message = "1-way theme contract: matchMedia inside setThemeSource argument — pass the unresolved CRDT value ('system' | 'light' | 'dark') directly. Resolving 'system' to a concrete 'light'/'dark' loses OS auto-tracking. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-resolved-value-theme-sourcegrit"- )- },- `setThemeSource($arg)` as $call where {- or {- $arg <: r"(?s).*['\"]light['\"].*['\"]dark['\"].*",- $arg <: r"(?s).*['\"]dark['\"].*['\"]light['\"].*"- },- register_diagnostic(- span = $call,- message = "1-way theme contract: setThemeSource argument resolves to 'light'/'dark' literals (likely a ternary) — pass the unresolved CRDT value directly. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-resolved-value-theme-sourcegrit"- )- },- // Member-call form — `bridge.setThemeSource(...)`, `okDesktop.setThemeSource(...)`,- // `window.okDesktop?.setThemeSource(...)`. This is the dominant shape.- `$_.setThemeSource($arg)` as $call where {- $arg <: r"(?s).*matchMedia.*",- register_diagnostic(- span = $call,- message = "1-way theme contract: matchMedia inside setThemeSource argument — pass the unresolved CRDT value ('system' | 'light' | 'dark') directly. Resolving 'system' to a concrete 'light'/'dark' loses OS auto-tracking. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-resolved-value-theme-sourcegrit"- )- },- `$_.setThemeSource($arg)` as $call where {- or {- $arg <: r"(?s).*['\"]light['\"].*['\"]dark['\"].*",- $arg <: r"(?s).*['\"]dark['\"].*['\"]light['\"].*"- },- register_diagnostic(- span = $call,- message = "1-way theme contract: setThemeSource argument resolves to 'light'/'dark' literals (likely a ternary) — pass the unresolved CRDT value directly. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-resolved-value-theme-sourcegrit"- )- }-}diff --git a/biome-plugins/no-roundtrip-identity-oracle.grit b/biome-plugins/no-roundtrip-identity-oracle.gritdeleted file mode 100644index 11a75d2b0..000000000--- a/biome-plugins/no-roundtrip-identity-oracle.grit+++ /dev/null@@ -1,77 +0,0 @@-// no-roundtrip-identity-oracle — forbid the byte-fidelity round-trip oracle in public tests.-//-// Asserting that re-serializing a freshly-parsed document yields back the-// SAME input bytes — `serialize(parse(x))` (or the MarkdownManager method-// equivalent `m.serialize(m.parse(x))`) compared equal to that same `x` — is-// the engine's byte-identity correctness oracle. This general round-trip-identity-// check is exercised by the engine's own fidelity suite; a public test should pin-// a specific expected output instead. This rule flags the inline assertion shape-// so a new public test can't reintroduce the general oracle.-//-// IDENTITY, not contract: the rule only fires when the parse input and the-// expected value are the SAME expression (metavariable reuse `$x` ... `$x`-// enforces textual equality). A contract test that pins a FIXED expected-// literal (`expect(serialize(parse('# H'))).toBe('# H\n')`) has a different-// expected than its input, so it does not fire. The Bridge-invariant-// comparator `normalizeBridge(a) === normalizeBridge(b)` (precedent #38, the-// documented public contract) contains no `serialize(parse(...))` and never-// fires. The normalizing-construct detector `serialize(parse(x)) !== x` uses-// `!==`, a different operator, and never fires.-//-// Does NOT catch (documented honestly):-// - Round-trip identity through a helper (`mdRoundTrip(x)`, `normalize(...)`)-// or via an intermediate variable (`const out = serialize(parse(x)); ...`)-// — GritQL matches the inline call shape, not helper bodies or cross--// statement data flow. Those forms live in the engine's fidelity suite and-// are covered there.-// - Matchers other than `toBe` / `toEqual` / `toStrictEqual` and operators-// other than `===` (e.g. a custom `assertByteIdentical` helper).-//-// Suppress a legitimate inline use (none expected on the public surface) with:-// // biome-ignore lint/plugin/no-roundtrip-identity-oracle: <reason>--language js--or {- // expect(serialize(parse($x))).toBe($x) — and the toEqual / toStrictEqual- // matchers, and the MarkdownManager method form. `$x` is bound by the- // matcher argument, so the nested `<:` requires the parse input to be the- // same expression — the identity constraint that separates the oracle from- // a fixed-literal contract assertion.- `expect($actual).$matcher($x)` as $assertion where {- $matcher <: or { `toBe`, `toEqual`, `toStrictEqual` },- $actual <: or {- `serialize(parse($x))`,- `$m.serialize($m.parse($x))`- },- register_diagnostic(- span = $assertion,- message = "Byte-fidelity round-trip oracle in a public test: `serialize(parse(x))` asserted equal to the same input `x`. This general round-trip-identity check belongs to the engine's fidelity suite (packages/app/tests/fidelity or packages/core/src/markdown); a public test should assert a fixed expected literal for a specific contract instead. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-roundtrip-identity-oraclegrit"- )- },- // serialize(parse($x)) === $x in either operand order (covers `assert(...)`,- // `if (...)`, and `expect(... === ...).toBe(true)`). `!==` has a different- // operator token and does not match.- `$lhs === $rhs` as $cmp where {- or {- and {- $lhs <: or {- `serialize(parse($x))`,- `$m.serialize($m.parse($x))`- },- $rhs <: $x- },- and {- $rhs <: or {- `serialize(parse($x))`,- `$m.serialize($m.parse($x))`- },- $lhs <: $x- }- },- register_diagnostic(- span = $cmp,- message = "Byte-fidelity round-trip oracle in a public test: `serialize(parse(x))` asserted equal to the same input `x`. This general round-trip-identity check belongs to the engine's fidelity suite (packages/app/tests/fidelity or packages/core/src/markdown); a public test should assert a fixed expected literal for a specific contract instead. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-roundtrip-identity-oraclegrit"- )- }-}diff --git a/biome-plugins/no-split-suggestion-dispatch.grit b/biome-plugins/no-split-suggestion-dispatch.gritdeleted file mode 100644index aef4c7c87..000000000--- a/biome-plugins/no-split-suggestion-dispatch.grit+++ /dev/null@@ -1,64 +0,0 @@-// no-split-suggestion-dispatch — one-transaction suggestion insertion (precedent #58).-//-// A `@tiptap/suggestion` surface that deletes its trigger range and then-// inserts content MUST land both in ONE dispatched transaction. Dispatching-// the trigger-delete on its own opens a window: `view.dispatch` runs-// `updateState` synchronously, and anything it fires re-entrantly during the-// delete's own dispatch (a plugin `appendTransaction`, a plugin-view or-// NodeView update, an `editor.on('transaction')` listener, or the-// y-prosemirror binding reacting to the just-applied delete) can dispatch a-// transaction that remaps the selection onto an adjacent `selectable: true`-// node — the follow-up insert then REPLACES that node. Silent data loss, no-// error, load-dependent (reads as e2e flake).-//-// The rule fires INSIDE a `Suggestion({ ... })` config on the two-// bare-trigger-delete dispatch shapes:-//-// 1. `....deleteRange(range).run()` — a chain whose FINAL step before-// `.run()` is the delete. A compliant atomic chain always continues past-// the delete (`.deleteRange(range).insertContent(...).run()`, or the-// slash boundary's `.deleteRange(range).command(...).run()`), so the-// receiver of its `.run()` is never the `deleteRange` call itself.-// 2. `editor.commands.deleteRange(range)` — the `commands.*` form always-// dispatches immediately, so inside a suggestion `command` it is a-// standalone trigger-delete transaction by construction.-//-// Fix: compose delete + insert into one chain, or route through a boundary-// like `applySlashCommandItem` (`packages/app/src/editor/slash-command/-// apply-item.ts`) when items need post-commit work (`afterCommit`).-//-// Does NOT catch (documented honestly):-// - A split where the delete chain carries an unrelated non-content step-// before `.run()` (e.g. `.deleteRange(r).focus().run()`) — the receiver-// of `.run()` is then not the `deleteRange` call. Focus-first ordering-// (`.focus().deleteRange(r).run()`) IS caught (shape 1).-// - A second dispatch made by the ITEM the command delegates to (an-// `item.command(editor)` that runs its own `editor.chain().run()`).-// Lint can't see through the delegation; the runtime pins in-// `suggestion-atomicity.dom.test.tsx` + `slash-command-atomicity.dom.test.tsx`-// assert the exactly-one-doc-changing-transaction invariant end to end.-// - A raw `view.dispatch(tr.delete(...))` inside a Suggestion config —-// no occurrence today; add a shape if one appears.-//-// Suppress a legitimate exception (a Suggestion surface that deletes its-// trigger WITHOUT ever inserting — none exists today) with:-// // biome-ignore lint/plugin/no-split-suggestion-dispatch: <reason>--language js--or {- `Suggestion($config)` where {- $config <: contains `$chain.deleteRange($range).run()` as $bare,- register_diagnostic(- span = $bare,- message = "Split suggestion dispatch: this chain dispatches the trigger-range delete on its own. Compose the delete and the insert into ONE chain (`.deleteRange(range).insertContent(...).run()`) or route through an applySlashCommandItem-style boundary so the item contributes steps to the same transaction (precedent #58). A separately dispatched delete lets a re-entrant transaction remap the selection and the follow-up insert silently replace an adjacent node. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-split-suggestion-dispatchgrit"- )- },- `Suggestion($config)` where {- $config <: contains `$editor.commands.deleteRange($range)` as $cmd,- register_diagnostic(- span = $cmd,- message = "Split suggestion dispatch: `commands.deleteRange` dispatches the trigger-range delete immediately as its own transaction. Compose the delete and the insert into ONE chain (`.deleteRange(range).insertContent(...).run()`) or route through an applySlashCommandItem-style boundary so the item contributes steps to the same transaction (precedent #58). See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-split-suggestion-dispatchgrit"- )- }-}diff --git a/biome-plugins/no-themeless-pierre-diff.grit b/biome-plugins/no-themeless-pierre-diff.gritdeleted file mode 100644index a8a19d310..000000000--- a/biome-plugins/no-themeless-pierre-diff.grit+++ /dev/null@@ -1,88 +0,0 @@-// no-themeless-pierre-diff — @pierre/diffs render-contract enforcement.-//-// Every `@pierre/diffs` construction site must pass an explicit `theme`-// and must render unified. Both are load-bearing:-//-// theme — Pierre ships its own palette. Without a theme the pane-// renders in Pierre's colours, not the app's, and stops-// tracking the user's light/dark selection.-// diffStyle — 'split' renders the two sides as separate DOM subtrees,-// so the change-stepper's DOM-order adjacency grouping-// counts roughly 2x the real groups and desyncs the-// displayed denominator from the anchors it can reach.-//-// The theme half is scoped to the `options` object (and, for constructor-// sites, to the argument list), so a `theme` token elsewhere in the props-// — `data-theme="dark"`, a title string — cannot suppress it.-//-// This replaces a `readFileSync` + regex meta-test that asserted the same-// invariant over source text. That test violated the AGENTS.md rule-// against asserting raw source text for props, and its per-component-// intent is now covered at runtime in-// `ActivityPanelDiffView.dom.test.tsx` (`pre[data-diff-type="single"]`-// and the injected `:host` token block). Lint is the right layer for the-// codebase-wide "no call site omits it" half — precedent #42.-//-// Coverage gaps are recorded in biome-plugins/README.md.-//-// Suppress a deliberate exception with:-// // biome-ignore lint/plugin/no-themeless-pierre-diff: <reason>--language js--or {- `<MultiFileDiff $props />` as $el where {- or {- $props <: not contains `options={$_ignored}`,- and {- $props <: contains `options={$opts}`,- $opts <: not r"(?s).*\btheme\s*:.*"- }- },- register_diagnostic(- span = $el,- message = "@pierre/diffs render contract: this renderer passes no theme — add `theme: okPierreTheme()` to its options so the pane uses app tokens and tracks light/dark. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-themeless-pierre-diffgrit"- )- },- `<MultiFileDiff $props>$_children</MultiFileDiff>` as $el where {- or {- $props <: not contains `options={$_ignored}`,- and {- $props <: contains `options={$opts}`,- $opts <: not r"(?s).*\btheme\s*:.*"- }- },- register_diagnostic(- span = $el,- message = "@pierre/diffs render contract: this renderer passes no theme — add `theme: okPierreTheme()` to its options so the pane uses app tokens and tracks light/dark. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-themeless-pierre-diffgrit"- )- },- `new UnresolvedFile($args)` as $el where {- $args <: not r"(?s).*\btheme\s*:.*",- register_diagnostic(- span = $el,- message = "@pierre/diffs render contract: this renderer passes no theme — add `theme: okPierreTheme()` to its options so the pane uses app tokens and tracks light/dark. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-themeless-pierre-diffgrit"- )- },- `new PierreFile($args)` as $el where {- $args <: not r"(?s).*\btheme\s*:.*",- register_diagnostic(- span = $el,- message = "@pierre/diffs render contract: this renderer passes no theme — add `theme: okPierreTheme()` to its options so the pane uses app tokens and tracks light/dark. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-themeless-pierre-diffgrit"- )- },- `<MultiFileDiff $props />` as $el where {- $props <: not r"(?s).*diffStyle:\s*['\"]unified['\"].*",- register_diagnostic(- span = $el,- message = "@pierre/diffs render contract: this renderer does not set diffStyle: 'unified' — add it to its options; 'split' desyncs the change stepper. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-themeless-pierre-diffgrit"- )- },- `<MultiFileDiff $props>$_children</MultiFileDiff>` as $el where {- $props <: not r"(?s).*diffStyle:\s*['\"]unified['\"].*",- register_diagnostic(- span = $el,- message = "@pierre/diffs render contract: this renderer does not set diffStyle: 'unified' — add it to its options; 'split' desyncs the change stepper. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-themeless-pierre-diffgrit"- )- }-}diff --git a/biome-plugins/no-uninstall-forbidden-import.grit b/biome-plugins/no-uninstall-forbidden-import.gritdeleted file mode 100644index d3189a3d8..000000000--- a/biome-plugins/no-uninstall-forbidden-import.grit+++ /dev/null@@ -1,65 +0,0 @@-// no-uninstall-forbidden-import — "connects to nothing" first-hop feedback.-//-// The self-uninstall window's survey and completion screens render AFTER-// `ok uninstall --yes` has stopped the local Hocuspocus server and removed-// `~/.ok`, so the uninstall entry must never reach the editor, the CRDT stack,-// the provider pool, or the server bootstrap. It also must eager-load (no-// dynamic `import()`) so those screens paint from memory once teardown is-// under way.-//-// This rule is SHALLOW, first-hop feedback only — it sees a forbidden specifier-// written directly in an in-scope file. The authoritative gate is the-// transitive-module-graph test-// (`packages/desktop/tests/unit/uninstall-module-graph.test.ts`), which also-// catches a forbidden module reached indirectly through a shared `@/lib` /-// `@/components/ui` module, and re-export (`export … from`) edges this rule-// cannot express in GritQL.-//-// `@inkeep/open-knowledge-core` (shared types + feedback constants, no server-// deps) is deliberately allowed; only the editor / CRDT / provider-pool /-// Hocuspocus-server surface is forbidden.-//-// Scoped via `overrides[].plugins` to `packages/app/src/uninstall/**`. Suppress-// a legitimate exception (none expected) with:-// // biome-ignore lint/plugin/no-uninstall-forbidden-import: <reason>-//-// See PRECEDENTS.md #42 (GritQL plugins are the canonical custom-enforcement-// mechanism).--language js--// The regex matches the source string literal. Biome's node-text regex needs the-// `.*['\"]…['\"].*` wrapper (bare `['\"]…['\"]` does not match), same shape as-// `no-resolved-value-theme-source.grit`. `[^'\"]*` for in-string segments so a-// match can't cross the closing quote; `(/[^'\"]*)?` keeps exact-package names-// from prefix-matching (`yjs` yes, `yjs-not-real` no). One top-level `or` — each-// branch registers its own diagnostic (a `.grit` file is a single pattern).-or {- `import $clause from $src` as $node where {- $src <: r"(?s).*['\"](?:@/editor/[^'\"]*|@inkeep/open-knowledge-server[^'\"]*|@hocuspocus/[^'\"]*|@tiptap/y-tiptap[^'\"]*|@tiptap/extension-collaboration[^'\"]*|yjs(?:/[^'\"]*)?|y-protocols(?:/[^'\"]*)?|y-prosemirror(?:/[^'\"]*)?|y-codemirror\.next(?:/[^'\"]*)?|y-indexeddb(?:/[^'\"]*)?)['\"].*",- register_diagnostic(- span = $node,- message = "Forbidden module in the uninstall entry — the uninstall window must connect to nothing (survey/completion run after the server is stopped and ~/.ok is removed). Drop this editor / CRDT / provider-pool / Hocuspocus-server import; keep only shared types + constants from @inkeep/open-knowledge-core. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-uninstall-forbidden-importgrit"- )- },- `import * as $ns from $src` as $node where {- $src <: r"(?s).*['\"](?:@/editor/[^'\"]*|@inkeep/open-knowledge-server[^'\"]*|@hocuspocus/[^'\"]*|@tiptap/y-tiptap[^'\"]*|@tiptap/extension-collaboration[^'\"]*|yjs(?:/[^'\"]*)?|y-protocols(?:/[^'\"]*)?|y-prosemirror(?:/[^'\"]*)?|y-codemirror\.next(?:/[^'\"]*)?|y-indexeddb(?:/[^'\"]*)?)['\"].*",- register_diagnostic(- span = $node,- message = "Forbidden module in the uninstall entry — the uninstall window must connect to nothing (survey/completion run after the server is stopped and ~/.ok is removed). Drop this editor / CRDT / provider-pool / Hocuspocus-server import; keep only shared types + constants from @inkeep/open-knowledge-core. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-uninstall-forbidden-importgrit"- )- },- `import $src` as $node where {- $src <: r"(?s).*['\"](?:@/editor/[^'\"]*|@inkeep/open-knowledge-server[^'\"]*|@hocuspocus/[^'\"]*|@tiptap/y-tiptap[^'\"]*|@tiptap/extension-collaboration[^'\"]*|yjs(?:/[^'\"]*)?|y-protocols(?:/[^'\"]*)?|y-prosemirror(?:/[^'\"]*)?|y-codemirror\.next(?:/[^'\"]*)?|y-indexeddb(?:/[^'\"]*)?)['\"].*",- register_diagnostic(- span = $node,- message = "Forbidden module in the uninstall entry — the uninstall window must connect to nothing (survey/completion run after the server is stopped and ~/.ok is removed). Drop this editor / CRDT / provider-pool / Hocuspocus-server import; keep only shared types + constants from @inkeep/open-knowledge-core. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-uninstall-forbidden-importgrit"- )- },- `import($arg)` as $node where {- register_diagnostic(- span = $node,- message = "Dynamic import under src/uninstall — the uninstall screens must eager-load so the completion/failure screens paint from memory after teardown starts removing files. Use a static import. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-uninstall-forbidden-importgrit"- )- }-}diff --git a/biome-plugins/no-unportaled-editor-content.grit b/biome-plugins/no-unportaled-editor-content.gritdeleted file mode 100644index e407600ff..000000000--- a/biome-plugins/no-unportaled-editor-content.grit+++ /dev/null@@ -1,35 +0,0 @@-// no-unportaled-editor-content — H6 cross-doc DOM bleed contract.-//-// `@tiptap/react`'s `PureEditorContent.componentDidMount` runs-// element.append(...editor.view.dom.parentNode.childNodes)-// — a sibling-vacuum primitive. When `view.dom` shares a parent with-// another editor's `view.dom` (e.g., V2 cache parked nodes, cross-Activity-// reconciliation transitions), the vacuum drags foreign content into the-// active wrapper. The structural fix is to portal every `<EditorContent>`-// into a per-Activity exclusively-owned DOM target, so `view.dom`'s parent-// only ever contains THIS editor's nodes.-//-// Canonical sanctioned shape (TiptapEditor.tsx):-// createPortal(-// <EditorContent editor={editor} className="..." />,-// portalTarget,-// )-//-// Suppress at the canonical portaled site with:-// // biome-ignore lint/plugin/no-unportaled-editor-content: <reason>-//-// See PRECEDENTS.md #44 (Editor DOM-tree exclusivity + delete-then-recreate-// coordination) and #42 (GritQL plugins are the canonical custom-enforcement-// mechanism).--language js--or {- `<EditorContent $...>$_</EditorContent>` as $jsx,- `<EditorContent $.../>` as $jsx-} where {- register_diagnostic(- span = $jsx,- message = "Portal-only: render <EditorContent /> via React.createPortal(<EditorContent .../>, portalTarget). H6 cross-doc DOM bleed contract — TipTap's PureEditorContent.componentDidMount vacuums sibling DOM nodes into its refDiv; portalling isolates view.dom in a per-Activity DOM target. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-unportaled-editor-contentgrit"- )-}diff --git a/biome-plugins/no-unwrapped-user-facing-string.grit b/biome-plugins/no-unwrapped-user-facing-string.gritdeleted file mode 100644index ab23ac34e..000000000--- a/biome-plugins/no-unwrapped-user-facing-string.grit+++ /dev/null@@ -1,80 +0,0 @@-// no-unwrapped-user-facing-string — every user-facing string reaches the catalogs.-//-// Suppress a legitimate case with:-// // biome-ignore lint/plugin/no-unwrapped-user-facing-string: <reason>-//-// See PRECEDENTS.md #42 (custom Biome enforcement is GritQL plugins).--language js--// GritQL regex matches the ENTIRE node text — `.*` brackets a substring, and-// `(?s)` lets `.` cross newlines (JSX text and call arguments are multi-line).--or {- // A bare string literal reaching a toast is user-facing copy whatever its- // shape, so this branch takes any literal — no prose heuristic. A wrapped- // argument (`t` macro) or a variable is not a quoted literal and is skipped.- `toast.$method($arg, $...)` as $call where {- $arg <: r"(?s)['\"].*['\"]",- register_diagnostic(- span = $call,- message = "Unwrapped user-facing string in a toast argument. Wrap it with the Lingui `t` macro — in a plain module call the macro inside the function, never at module top level, so it resolves against the active locale. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-unwrapped-user-facing-stringgrit"- )- },-- // JSX text. Raw text in this codebase is overwhelmingly non-prose — shortcut- // tokens, code identifiers, paths, brand marks — while prose is already- // wrapped, so the candidate test is two letter-words separated by- // whitespace. That admits `Save`-style single-word labels as a known gap;- // widening to every literal would bury the signal under those token shapes.- jsx_text() as $text where {- $text <: r"(?s).*[A-Za-z]\s+[A-Za-z].*",- // `<Brand> icon` names a third-party mark; translating it renames the product.- not $text <: r"(?s)\s*[A-Za-z0-9()\-. ]* icon\s*",- not $text <: within `<Trans $...>$...</Trans>`,- register_diagnostic(- span = $text,- message = "Unwrapped user-facing string in JSX text. Wrap it with the Lingui `<Trans>` element so it reaches the catalogs. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-unwrapped-user-facing-stringgrit"- )- },-- // Attributes that carry copy the reader hears or reads. Scoped by name so- // plain JS assignment (`const label = '…'`) stays out, same as- // microcopy-ellipsis. `$value` is the whole initializer clause including the- // `=`, so anchoring on `=` then a quote is what distinguishes a literal from- // an expression container — `aria-label={t\`…\`}` opens with `{` and is skipped.- jsx_attribute($name, $value) where {- $name <: or { `aria-label`, `placeholder`, `title`, `alt` },- $value <: r"(?s)=\s*['\"].*['\"]",- $value <: r"(?s).*[A-Za-z]\s+[A-Za-z].*",- not $value <: r"(?s)=\s*['\"][A-Za-z0-9()\-. ]* icon['\"]",- register_diagnostic(- span = $value,- message = "Unwrapped user-facing string in a UI-facing attribute. Wrap it with the Lingui `t` macro from `useLingui()` so it reaches the catalogs. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-unwrapped-user-facing-stringgrit"- )- },-- // The same copy, one syntax over: `{ title: '…' }` renders the words- // `title="…"` renders, so it is the same defect and gets the same- // diagnostic. Scoped by name for the same reason the attribute branch is- // — an unscoped literal rule fires on every `className`, `data-testid`,- // and identifier in the tree. The set is the attribute branch's four plus- // `label` / `description`, which is where object-position copy actually- // lives in this codebase (menu items, picker entries, preview panels).- //- // Biome's GritQL exposes no object-member node kind, so the `$name:- // $value` snippet is the pattern. It binds only to JS object-literal- // pairs — a TypeScript member (`label: 'left' | 'right'` in a `type`) is- // not one and does not fire, which is what keeps string-literal union- // types out.- `$name: $value` where {- $name <: or { `'aria-label'`, `placeholder`, `title`, `alt`, `label`, `description` },- $value <: r"(?s)['\"].*['\"]",- $value <: r"(?s).*[A-Za-z]\s+[A-Za-z].*",- not $value <: r"(?s)['\"][A-Za-z0-9()\-. ]* icon['\"]",- register_diagnostic(- span = $value,- message = "Unwrapped user-facing string in a UI-facing object property. Wrap it with the Lingui `t` macro — or, when the object is module scope, hold a `msg` descriptor here and resolve it at render, so a language switch is not frozen out. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-unwrapped-user-facing-stringgrit"- )- }-}diff --git a/biome-plugins/path-conditional-map-driven-origin.grit b/biome-plugins/path-conditional-map-driven-origin.gritdeleted file mode 100644index a07062448..000000000--- a/biome-plugins/path-conditional-map-driven-origin.grit+++ /dev/null@@ -1,37 +0,0 @@-// path-conditional-map-driven-origin — Observer A origin discipline.-//-// Inside the server-side observer module, every `Y.Doc.transact()` call MUST-// pass the sanctioned origin `OBSERVER_SYNC_ORIGIN` as its SECOND argument:-//-// doc.transact(() => { ... }, OBSERVER_SYNC_ORIGIN);-//-// Bare `doc.transact(fn)` — no origin at all — silently classifies the write as-// `openknowledge-service` (precedent #25) and breaks per-session UndoManager-// attribution (the `trackedOrigins` Set-identity match skips the txn). A wrong-// origin in the second position is the same failure with a different cause.-//-// The rule checks the ARGUMENT POSITION (the second argument), not whether the-// call subtree contains the identifier somewhere. A callback body that mentions-// OBSERVER_SYNC_ORIGIN for an unrelated reason therefore neither clears a-// bare/wrong call nor is required to — only the second-argument node decides.-//-// Scoped via `overrides[].plugins` to `packages/server/src/server-observers.ts`-// (and the plugin fixture). The file's transact-call surface is the entire-// observer dispatch spine — every call site there is observer-cross-CRDT and-// must honor the discipline. Other server files routing through-// `session.dc.document.transact(fn, session.origin)` are out of scope (that-// contract is enforced by `paired-write-enforcement.test.ts`).-//-// Suppress legitimate exceptions (none expected today) with:-// // biome-ignore lint/plugin/path-conditional-map-driven-origin: <reason>--language js--`$_.transact($...)` as $call where {- not $call <: `$_.transact($_, OBSERVER_SYNC_ORIGIN)`,- not $call <: `$_.transact($_, OBSERVER_SYNC_ORIGIN, $...)`,- register_diagnostic(- span = $call,- message = "Observer-side transact call missing sanctioned origin. Pass `OBSERVER_SYNC_ORIGIN` as the second argument: `doc.transact(fn, OBSERVER_SYNC_ORIGIN)`. Bare `doc.transact(fn)` (or a wrong origin) routes the write to `openknowledge-service` and breaks per-session UndoManager attribution. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#path-conditional-map-driven-origingrit"- )-}diff --git a/biome-plugins/playwright-prefer-to-have-count.grit b/biome-plugins/playwright-prefer-to-have-count.gritdeleted file mode 100644index a85306af2..000000000--- a/biome-plugins/playwright-prefer-to-have-count.grit+++ /dev/null@@ -1,35 +0,0 @@-// playwright-prefer-to-have-count — flag `expect(await locator.count())`.-//-// A one-shot `expect(await locator.count()).toBe(N)` snapshots the count at-// a single instant and never retries — under CI CPU contention the DOM can-// settle a few frames later, which is the canonical hidden-flake shape the-// 2026-06 e2e audit measured across the suite. Playwright's web-first-// `await expect(locator).toHaveCount(N)` auto-retries against the live DOM-// for the expect timeout and is the official replacement-// (https://playwright.dev/docs/test-assertions). Upstream precedent:-// eslint-plugin-playwright's `prefer-to-have-count` rule bans the same-// shape.-//-// The pattern matches the probe sub-expression regardless of which matcher-// follows (`.toBe`, `.toEqual`, `.toBeGreaterThan`, ...) — every matcher on-// a one-shot count read shares the no-retry defect.-//-// Does NOT catch (document-honestly per the README convention):-// - `expect.soft(await locator.count())` — different callee node shape.-// - A count read assigned to a variable and asserted later-// (`const n = await loc.count(); expect(n).toBe(2)`) — two statements;-// GritQL can't correlate them. The e2e-stop-rules source-scan tier is-// the place for that shape if it ever recurs.-//-// Suppress a genuinely non-retryable count read (e.g. counting against a-// deliberately frozen page state) with:-// // biome-ignore lint/plugin/playwright-prefer-to-have-count: <reason>--language js--`expect(await $x.count())` as $probe where {- register_diagnostic(- span = $probe,- message = "One-shot count read never retries — use the web-first `await expect(locator).toHaveCount(n)` so the assertion polls the live DOM. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#playwright-prefer-to-have-countgrit"- )-}diff --git a/biome-plugins/require-utf8-multipart-parser.grit b/biome-plugins/require-utf8-multipart-parser.gritdeleted file mode 100644index aa3344f51..000000000--- a/biome-plugins/require-utf8-multipart-parser.grit+++ /dev/null@@ -1,69 +0,0 @@-// require-utf8-multipart-parser — multipart filename charset correctness.-//-// `busboy(...)` may only be constructed inside-// `packages/server/src/multipart.ts`. Everything else parses multipart bodies-// through its factory:-//-// const bb = createMultipartParser(req, { files: 1, fields: 10 }); // only form-//-// Why: busboy's `defParamCharset` defaults to `latin1`, an inheritance from-// `Content-Disposition`'s original MIME/email definition. RFC 7578 governs-// `multipart/form-data` instead. It issues no receiver mandate, so the default-// is ours to pick, and UTF-8 is the only defensible pick: section 4.2 records-// that file names are "typically UTF-8", and it is what browsers and-// Node/undici actually send. Left at its default, busboy reads every-// multi-byte sequence back as one mojibake code point per byte, at the-// transport-decode boundary — before any sanitizer or storage layer can see it,-// and irreversibly, because the damage is indistinguishable from a filename the-// user legitimately owns.-//-// The omission is invisible in review: `busboy({ headers, limits })` reads as-// complete unless you happen to know the default. It shipped twice for exactly-// that reason — the second construction site was copied from the first, limits-// and all — which is why this is a mechanical gate rather than a convention.-//-// This is a PRESENCE match, not an absence match, and that is deliberate. A-// rule shaped as "a `busboy(...)` call must contain `defParamCharset:`" would be-// satisfied by `defParamCharset: 'latin1'` — it enforces that a charset is-// declared, not that the right one is. The factory takes no charset parameter,-// so routing through it removes the value hole entirely and reduces this rule to-// a plain presence check.-//-// OPTING OUT — there is no legitimate second construction site. A caller that-// needs different parser options (`preservePath`, `highWaterMark`, …) should-// widen the factory, which keeps the charset decision in one place and forces-// the path-traversal reasoning `preservePath` demands. If you genuinely must-// construct in place, suppress the one call with a reason:-//-// // biome-ignore lint/plugin/require-utf8-multipart-parser: <reason>-// const bb = busboy({ headers, defParamCharset: 'utf8' });-//-// Registered via `overrides[].plugins` repo-wide rather than per-package:-// server owns the only busboy dependency today, and that is exactly the state a-// new dependency elsewhere would change, silently. The factory module itself and-// tests are excluded. The test exclusion covers the synthetic `/api/upload-lite`-// handler in `http/local-api-dispatch.test.ts`, which drives its own parser to-// count bytes and never decodes a non-ASCII name; that was a deliberate call,-// not an oversight.-//-// The rule keys on the CALL-EXPRESSION CALLEE IDENTIFIER. Known gaps, stated-// honestly: a member call (`parsers.busboy(...)`) is a different AST and is not-// matched; neither is a call through a renamed binding (`import bb from-// 'busboy'; bb(...)`). Both are defeatable on purpose rather than by accident,-// and the behavioural backstop is-// `packages/app/tests/integration/api-error-envelope/upload-filename-charset.test.ts`,-// which asserts the decode end to end through both endpoints. A `ReturnType<typeof-// busboy>` type annotation is NOT a call expression and does not fire — pinned-// as a negative fixture case so a future pattern change cannot silently start-// flagging type positions.-//-// See PRECEDENTS.md #42 (custom Biome enforcement is GritQL plugins).--language js--`busboy($...)` as $call where {- register_diagnostic(- span = $call,- message = "busboy constructed directly - route multipart parsing through `createMultipartParser(...)` from `packages/server/src/multipart.ts`, which hardcodes `defParamCharset: 'utf8'`. busboy defaults that option to `latin1`, so every non-ASCII filename is mojibaked at the transport-decode boundary before any sanitizer sees it, irreversibly; RFC 7578 section 4.2 records that multipart/form-data file names are typically UTF-8, which is what every standard client sends. Need different parser options? widen the factory rather than construct here. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#require-utf8-multipart-parsergrit"- )-}diff --git a/biome-plugins/require-windowshide-on-spawn.grit b/biome-plugins/require-windowshide-on-spawn.gritdeleted file mode 100644index a02c64612..000000000--- a/biome-plugins/require-windowshide-on-spawn.grit+++ /dev/null@@ -1,76 +0,0 @@-// require-windowshide-on-spawn — Windows console-flash prevention.-//-// Every `node:child_process` process-spawn (`spawn`, `spawnSync`, `exec`,-// `execSync`, `execFile`, `execFileSync`, plus the repo's `nodeSpawn` /-// `execFileAsync` aliases) MUST hide the Windows console window it would-// otherwise pop. Two accepted forms:-//-// spawnSync('git', args, withHiddenWindowsConsole({ cwd, ... })) // preferred-// spawnSync('git', args, { cwd, ..., windowsHide: true }) // inline-//-// Why: on Windows, `windowsHide` defaults to `false`. When a console-LESS-// parent (the OK server auto-started by an MCP host with `stdio:'ignore'`, or-// spawned detached) spawns a console-subsystem binary like `git.exe`, Windows-// creates a new console window that flashes on screen and vanishes — once per-// spawn. During an editing / agent-write session the per-write `git config`-// attribution reads fire a burst of these, so the flashing is continuous and-// user-visible. Hiding it fixes that. It is a harmless no-op on macOS AND-// Linux (neither has the Windows console-allocation behavior), so it belongs-// on EVERY spawn regardless of the command's target platform — uniform-// application is what makes the rule enforceable. `withHiddenWindowsConsole`-// lives in `packages/server/src/child-process-windows-hide.ts` and is-// re-exported from `@inkeep/open-knowledge-server`.-//-// `simple-git` already sets `windowsHide: true` internally, so git routed-// through it (shadow repo, share, conflicts) is unaffected — this rule is only-// about the hand-rolled `child_process` call sites that bypass it.-//-// OPTING OUT — for a spawn that only ever runs on macOS and/or Linux (never-// Windows), e.g. `codesign`, `sw_vers`, an `open(1)` launch, hiding a console-// is meaningless. Add `windowsHide` anyway (harmless no-op, keeps the rule-// uniform) OR suppress this one call with a reason:-//-// // biome-ignore lint/plugin/require-windowshide-on-spawn: macOS-only (never spawned on Windows)-// const r = spawnSync('codesign', [...], { ... });-//-// Scoped via `overrides[].plugins` to `packages/{server,cli,desktop}/src/**` —-// the packages that spawn processes at runtime on Windows.-//-// The rule keys on the CALL-EXPRESSION CALLEE IDENTIFIER, so it can't tell a-// real `node:child_process` import from a same-named wrapper. A few call sites-// bind a local `const spawn = deps.spawnDetached ?? spawnDetachedReal` (already-// windows-safe) or take an injected `spawn` param — those are false positives;-// suppress with the biome-ignore line above and a "not node:child_process"-// reason.-//-// Known gaps (documented honestly): bare `exec(...)` is NOT matched (the-// identifier is too commonly shadowed); member calls (`deps.spawn(...)`) are-// not matched (different AST — the real impl behind the injection is the-// enforced site); injected spawn-wrapper aliases (`const spawnFn = opts.spawn ??-// realSpawn; spawnFn(...)`) are NOT matched by callee name, so those call sites-// are hidden by hand (`windowsHide: true` at the site) rather than enforced here-// — adding `spawnFn` to the matcher would flag the by-reference options-var-// wrappers (e.g. skill-install's `detached`) as false positives; a `windowsHide`-// / `withHiddenWindowsConsole` written inside a spawn's callback body would-// spuriously satisfy the check (no realistic case).-//-// See PRECEDENTS.md #42 (custom Biome enforcement is GritQL plugins).--language js--or {- `spawn($...)` as $call,- `spawnSync($...)` as $call,- `execSync($...)` as $call,- `execFile($...)` as $call,- `execFileSync($...)` as $call,- `nodeSpawn($...)` as $call,- `execFileAsync($...)` as $call-} where {- not $call <: contains `windowsHide: $_`,- not $call <: contains `withHiddenWindowsConsole($...)`,- register_diagnostic(- span = $call,- message = "child_process spawn without a hidden Windows console — wrap the options in `withHiddenWindowsConsole(...)` (from @inkeep/open-knowledge-server) or add `windowsHide: true`. On Windows a console-less parent (MCP-spawned/detached OK server) flashes a terminal window on every spawn; the flag is a no-op on macOS/Linux, so add it unconditionally. macOS/Linux-only spawn, or a same-named wrapper (not node:child_process)? suppress with `// biome-ignore lint/plugin/require-windowshide-on-spawn: <reason>`. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#require-windowshide-on-spawngrit"- )-}diff --git a/biome.jsonc b/biome.jsoncindex d2f5efacc..fe2cf385e 100644--- a/biome.jsonc+++ b/biome.jsonc@@ -1,13 +1,5 @@{"$schema": "https://biomejs.dev/schemas/2.5.11/schema.json",- "plugins": [- "./biome-plugins/microcopy-ellipsis.grit",- "./biome-plugins/no-hand-rolled-spinner.grit",- "./biome-plugins/no-loosely-typed-webcontents-ipc.grit",- "./biome-plugins/no-resolved-value-theme-source.grit",- "./biome-plugins/no-split-suggestion-dispatch.grit",- "./biome-plugins/no-unportaled-editor-content.grit"- ],"assist": { "actions": { "source": { "organizeImports": "on" } } },"formatter": {"enabled": true,@@ -56,304 +48,6 @@}},"overrides": [- {- // Sole route-hash builder. `lib/doc-hash.ts` owns the `#/` prefix; every- // other file in the app asks it for a hash. Building one by hand emits- // the doc name unescaped, and the browser leaves `#`, `?` and `%` alone- // in a fragment, so the parser reads them as routing syntax and the- // navigation lands somewhere else. Excluded: `lib/doc-hash.ts` itself- // (the sanctioned site) and tests, which build expected hashes as- // literals. `packages/server` has its own `encodeDocName` for preview- // URLs and is out of scope.- "includes": [- "packages/app/src/**/*.ts",- "packages/app/src/**/*.tsx",- "!packages/app/src/lib/doc-hash.ts",- "!**/*.test.ts",- "!**/*.test.tsx",- "biome-plugins/__fixtures__/no-raw-route-hash-construction.fixture.tsx"- ],- "plugins": ["./biome-plugins/no-raw-route-hash-construction.grit"]- },- {- // Observer A origin discipline. Scoped to the one file that owns the- // observer-cross-CRDT transact spine. Inside this file every- // `doc.transact(fn, origin)` must pass `OBSERVER_SYNC_ORIGIN` as the- // second argument; bare `doc.transact(fn)` (or a wrong origin) routes the- // write to `openknowledge-service` and breaks per-session UndoManager- // attribution. Other server files routing through- // `session.dc.document.transact(fn, session.origin)` are out of scope -- // that contract is enforced by `paired-write-enforcement.test.ts`.- "includes": [- "packages/server/src/server-observers.ts",- "biome-plugins/__fixtures__/path-conditional-map-driven-origin.fixture.tsx"- ],- "plugins": ["./biome-plugins/path-conditional-map-driven-origin.grit"]- },- {- // Handler TODO-stub grep: scaffolded handlers are seeded with- // `throw new Error("TODO: implement …")`, and this rule flags any stub- // that survives to lint time so an unfinished handler can't pass- // review. It is NOT an exhaustiveness check — type checks are the- // compile-time backstop for missing methods. Scoped narrowly to the- // handlers/ subtrees so harness tests and oracles (which legitimately- // produce "TODO: implement" strings in their own contexts) are out of- // scope.- "includes": [- "packages/md-conformance/src/substrates/*/handlers/**/*.ts",- "biome-plugins/__fixtures__/cst-pm-handler-todo-stub.fixture.tsx"- ],- "plugins": ["./biome-plugins/cst-pm-handler-todo-stub.grit"]- },- {- // Class-proof DSL registration discipline: registrations MUST live in- // the canonical proofs/ dir (one manifest as the single source of- // truth) and EVERY registration MUST pass `predicate` + `proof`- // options. The override scope EXCLUDES the canonical dir — inside it,- // the TypeScript signature is the missing-args backstop; outside it,- // any `defineClassProof(...)` call fires (= wrong location), and- // missing args fire an additional diagnostic.- "includes": [- "**/*.ts",- "**/*.tsx",- "!**/node_modules/**",- "!**/dist/**",- "!**/*.test.ts",- "!**/*.test.tsx",- "!packages/md-conformance/src/class-proofs/proofs/**",- "biome-plugins/__fixtures__/class-proof-registration-discipline.fixture.tsx"- ],- "plugins": ["./biome-plugins/class-proof-registration-discipline.grit"]- },- {- // Windows console-flash prevention: every hand-rolled `child_process`- // spawn in the runtime-spawning packages must hide the Windows console- // (via `withHiddenWindowsConsole(...)` or `windowsHide: true`), else a- // console-less parent (MCP-spawned/detached OK server) flashes a terminal- // window per spawn on Windows. Scoped to the server, CLI, and desktop- // packages that spawn processes on Windows.- // Tests excluded. `simple-git` sets the flag internally, so git routed- // through it is out of scope by nature.- "includes": [- "packages/server/src/**/*.ts",- "packages/cli/src/**/*.ts",- "packages/desktop/src/**/*.ts",- "!**/*.test.ts",- "!**/*.test-helper.ts",- "biome-plugins/__fixtures__/require-windowshide-on-spawn.fixture.tsx"- ],- "plugins": ["./biome-plugins/require-windowshide-on-spawn.grit"]- },- {- // Multipart filename charset: busboy may only be constructed inside- // `multipart.ts`, whose factory hardcodes `defParamCharset: 'utf8'`.- // busboy defaults that option to `latin1`, which mojibakes every- // non-ASCII filename at the transport-decode boundary, irreversibly and- // invisibly in review. Repo-wide rather than server-scoped: server owns- // the only busboy dependency today, and that is exactly the state a new- // dependency in another package would change, silently. The factory- // itself is excluded so it can make the one sanctioned call. Tests are- // excluded deliberately, not by copy: `http/local-api-dispatch.test.ts`- // drives its own parser in a synthetic `/api/upload-lite` handler that- // counts bytes and never decodes a non-ASCII name. `**/*.mts` matches- // nothing today (the sibling class-proof override omits it) and is here- // as forward coverage: this gate exists because the defect spread by- // copy-paste, so an extension it cannot see is a hole by construction.- "includes": [- "**/*.ts",- "**/*.tsx",- "**/*.mts",- "!**/node_modules/**",- "!**/dist/**",- "!**/*.test.ts",- "!**/*.test.tsx",- "!**/*.test-helper.ts",- "!packages/server/src/multipart.ts",- "biome-plugins/__fixtures__/require-utf8-multipart-parser.fixture.tsx"- ],- "plugins": ["./biome-plugins/require-utf8-multipart-parser.grit"]- },- {- // Scope discipline for user-global Agent Skill installs (issue #820).- // OK writes these dirs itself, gated on `detectUserSkillHosts`; shelling- // out to the `skills` CLI with `--agent '*'` bypasses host detection and- // creates config dirs for tools the user never installed. Scoped to- // server + cli (where the user-global install lives). Tests are NOT- // excluded — a test reintroducing the invocation is as load-bearing as- // production code, and the suite asserts through the filesystem, never- // through argv.- "includes": [- "packages/server/src/**/*.ts",- "packages/cli/src/**/*.ts",- "biome-plugins/__fixtures__/no-blind-agent-host-fanout.fixture.tsx"- ],- "plugins": ["./biome-plugins/no-blind-agent-host-fanout.grit"]- },- {- // One-shot `expect(await locator.count())` reads never retry and are- // the canonical hidden-flake assertion shape (2026-06 e2e audit).- // Scoped to the browser e2e suites (all three dirs the e2e-stop-rules- // source-scan also covers) + the plugin's own fixture. Not workspace-- // wide: outside Playwright specs, `.count()` is usually not a Locator- // and the web-first rewrite does not apply.- "includes": [- "packages/app/tests/stress/**/*.e2e.ts",- "packages/app/tests/visual/**/*.e2e.ts",- "packages/app/tests/a11y/**/*.e2e.ts",- "biome-plugins/__fixtures__/playwright-prefer-to-have-count.fixture.tsx"- ],- "plugins": ["./biome-plugins/playwright-prefer-to-have-count.grit"]- },- {- // "Connects to nothing" first-hop feedback. The self-uninstall window's- // survey/completion screens render after `ok uninstall --yes` stops the- // local Hocuspocus server and removes ~/.ok, so the uninstall entry must- // never import the editor / CRDT / provider-pool / Hocuspocus-server- // surface, and must eager-load (no dynamic import). This is SHALLOW- // first-hop feedback; the authoritative gate is the transitive-graph test- // at packages/desktop/tests/unit/uninstall-module-graph.test.ts, which- // also catches indirect and re-export pull-ins GritQL can't express.- // @inkeep/open-knowledge-core (shared types + constants) is allowed.- // Test files are excluded: the invariant is about the SHIPPED entry graph,- // and a dom test legitimately does `await import('./main')` to prove the- // entry paints (a dynamic import the eager-load rule would otherwise flag).- "includes": [- "packages/app/src/uninstall/**/*.ts",- "packages/app/src/uninstall/**/*.tsx",- "!packages/app/src/uninstall/**/*.test.ts",- "!packages/app/src/uninstall/**/*.test.tsx",- "!packages/app/src/uninstall/**/*.dom.test.tsx",- "biome-plugins/__fixtures__/no-uninstall-forbidden-import.fixture.tsx"- ],- "plugins": ["./biome-plugins/no-uninstall-forbidden-import.grit"]- },- {- // UI primitives discipline (see PR #937 retrospective). Scoped to- // packages/{app,desktop,plugin}/src/**/*.tsx — production UI surfaces.- // Exemptions:- // - packages/app/src/editor/** — ProseMirror NodeViews + chrome legitimately- // render raw HTML for measurement / PM-managed DOM (matches the existing- // a11y/useSemanticElements suppressions in editor/*).- // - packages/app/src/components/ui/** — these ARE the shadcn primitive- // wrappers; they must render raw HTML by definition.- // - *.test.tsx / *.dom.test.tsx / *.test-helper.tsx — test fixtures and- // shared test doubles aren't user-facing UI.- // Pre-rule backlog (files outside the exemptions that pre-date the rule)- // is annotated via `// biome-ignore-all lint/plugin/no-raw-html-interactive-element:`- // at the top of each offender file — the comment list is the visible- // migration backlog. New files cannot opt out: PR review treats the- // suppression header as a backlog marker, not a free pass.- "includes": [- "packages/app/src/**/*.tsx",- "packages/desktop/src/**/*.tsx",- "packages/plugin/src/**/*.tsx",- "!packages/app/src/editor/**",- "!packages/app/src/components/ui/**",- "!**/*.test.tsx",- "!**/*.dom.test.tsx",- "!**/*.test-helper.tsx",- "biome-plugins/__fixtures__/no-raw-html-interactive-element.fixture.tsx"- ],- "plugins": ["./biome-plugins/no-raw-html-interactive-element.grit"]- },- {- // @pierre/diffs render contract. Every construction site passes an- // explicit theme and renders unified. Scoped to production .tsx under- // packages/app/src; the fixture is opted in so its deliberate- // violations are what the plugin test counts.- "includes": [- "packages/app/src/**/*.tsx",- "!**/*.test.tsx",- "!**/*.dom.test.tsx",- "!**/*.test-helper.tsx",- "biome-plugins/__fixtures__/no-themeless-pierre-diff.fixture.tsx"- ],- "plugins": ["./biome-plugins/no-themeless-pierre-diff.grit"]- },- {- // Localization discipline — a shipped hardcoded string is a build-visible- // defect, not a convention someone has to remember. Scoped to- // packages/{app,desktop,plugin}/src, `.ts` included: the toast branch's- // dominant shape is a plain `lib/` helper, not a component.- // Exemptions:- // - packages/app/src/editor/** — ProseMirror/CodeMirror-managed views, whose- // placeholder and title strings are editor affordances rather than chrome- // copy (matches the no-raw-html-interactive-element exemption).- // - packages/app/src/components/ui/** — shadcn primitive wrappers; their- // attribute strings are prop plumbing, not copy.- // - packages/desktop/src/main/** — the Electron main process. `lingui- // extract` reads packages/app/src only, so a `t` macro here reaches no- // catalog; main's one translated surface (the native menus) goes- // through `main-i18n.ts`, which looks labels up by hash against the- // renderer's compiled catalogs. Firing on its dialog templates would- // ask for a fix that does not exist. The other four sibling dirs- // (preload / renderer / shared / utility) stay in scope.- // - *.test.ts / *.test.tsx / *.dom.test.tsx — test fixtures aren't user-facing.- "includes": [- "packages/app/src/**/*.ts",- "packages/app/src/**/*.tsx",- "packages/desktop/src/**/*.ts",- "packages/desktop/src/**/*.tsx",- "packages/plugin/src/**/*.ts",- "packages/plugin/src/**/*.tsx",- "!packages/app/src/editor/**",- "!packages/app/src/components/ui/**",- "!packages/desktop/src/main/**",- "!**/*.test.ts",- "!**/*.test.tsx",- "!**/*.dom.test.tsx",- "biome-plugins/__fixtures__/no-unwrapped-user-facing-string.fixture.tsx"- ],- "plugins": ["./biome-plugins/no-unwrapped-user-facing-string.grit"]- },- {- // Reading-direction discipline. The rule's only branch matches a JSX- // attribute, so the scope is `.tsx` alone — a `.ts` glob would be dead- // scope, not extra coverage.- // Exemptions:- // - packages/app/src/editor/** — ProseMirror/CodeMirror own their DOM and- // take per-string direction from the text rather than from the chrome- // (matches the no-raw-html-interactive-element exemption).- // - packages/app/src/components/ui/** — shadcn primitives are regenerated- // by `shadcn add`, so an edit here is overwritten on the next pull.- // - *.test.tsx / *.dom.test.tsx — fixtures aren't rendered chrome.- "includes": [- "packages/app/src/**/*.tsx",- "packages/desktop/src/**/*.tsx",- "packages/plugin/src/**/*.tsx",- "!packages/app/src/editor/**",- "!packages/app/src/components/ui/**",- "!**/*.test.tsx",- "!**/*.dom.test.tsx",- "biome-plugins/__fixtures__/no-physical-direction-utility.fixture.tsx"- ],- "plugins": ["./biome-plugins/no-physical-direction-utility.grit"]- },- {- // Dialog-footer emphasis hierarchy. `secondary` is the one Button variant- // whose fill is low enough in contrast to lose the emphasis contest with- // the `outline` dismiss standing beside it — a footer authored that way- // reads with its hierarchy inverted. The rule's only branch matches a JSX- // element, so the scope is `.tsx` alone; a `.ts` glob would be dead- // scope, not extra coverage.- // Exemptions:- // - packages/app/src/components/ui/** — the dialog and button primitives- // themselves, regenerated by `shadcn add` (matches the- // no-physical-direction-utility exemption).- // - *.test.tsx / *.dom.test.tsx — fixtures aren't rendered chrome, and- // a test that renders the demoted shape on purpose is pinning the- // regression, not shipping it.- "includes": [- "packages/app/src/**/*.tsx",- "packages/desktop/src/**/*.tsx",- "packages/plugin/src/**/*.tsx",- "!packages/app/src/components/ui/**",- "!**/*.test.tsx",- "!**/*.dom.test.tsx",- "biome-plugins/__fixtures__/no-demoted-dialog-confirm.fixture.tsx"- ],- "plugins": ["./biome-plugins/no-demoted-dialog-confirm.grit"]- },{// Internal developer tooling for the static-string audit. Uses ts-morph's// untyped node accessors, embeds `${...}` placeholder literals, and a few@@ -398,52 +92,6 @@}}},- {- // Byte-fidelity round-trip oracle ban. `serialize(parse(x))` (or the- // MarkdownManager method form) asserted equal to the same `x` is the- // engine's byte-identity correctness oracle; it is owned by internal- // suites excluded from this override's scope, so a test on this- // surface can't reintroduce it. The fixture is in scope so its planted- // oracle drives the fixture-file test; the Bridge-invariant comparator- // `normalizeBridge(a) === normalizeBridge(b)` (precedent #38) is the- // public contract and is left untouched by the rule, not by this- // scope.- "includes": [- "packages/**/*.test.ts",- "packages/**/*.test.tsx",- "packages/**/*.e2e.ts",- "!packages/md-conformance/**",- "!packages/app/tests/fidelity/**",- "!packages/core/src/markdown/**/*.test.ts",- "!packages/core/src/bridge/**/*.test.ts",- "!**/*.private.*",- "biome-plugins/__fixtures__/no-roundtrip-identity-oracle.fixture.tsx"- ],- "plugins": ["./biome-plugins/no-roundtrip-identity-oracle.grit"]- },- {- // Inline bridge normalization-class value ban. BRIDGE_TOLERANCE_CLASSES- // (packages/core/src/bridge/normalize.ts) is the bridge normalizer's- // class catalog; importing it into a test on this surface is blocked by- // check-mirror-test-policy Check B, and this rule blocks the- // complementary inline re-encoding. The catalog is owned by internal- // suites excluded from this override's scope (as they are from the- // plugin pass), so the inline form can't come back through a new test.- // The fixture is in scope so its planted literals drive the- // fixture-file test.- "includes": [- "packages/**/*.test.ts",- "packages/**/*.test.tsx",- "packages/**/*.e2e.ts",- "!packages/md-conformance/**",- "!packages/app/tests/fidelity/**",- "!packages/core/src/markdown/**/*.test.ts",- "!packages/core/src/bridge/**/*.test.ts",- "!**/*.private.*",- "biome-plugins/__fixtures__/no-inline-tolerance-class.fixture.tsx"- ],- "plugins": ["./biome-plugins/no-inline-tolerance-class.grit"]- },{// Biome 2.5 started parsing and linting standalone `.svg` files, which// brings the JSX/HTML a11y rule set to bear on static assets. An assetdiff --git a/docs/src/components/mcp-install.tsx b/docs/src/components/mcp-install.tsxindex 75791af12..e0bf530e1 100644--- a/docs/src/components/mcp-install.tsx+++ b/docs/src/components/mcp-install.tsx@@ -25,7 +25,7 @@ export function McpInstall({ editor, children }: { editor: string; children?: Re<strong>Desktop app</strong> (macOS, Windows, Linux). The first time you open a project, aconsent dialog detects {editor} and configures it for you. To re-trigger the dialog,choose{' '}- {/* biome-ignore lint/plugin/microcopy-ellipsis: quoting the literal menu label (menu.ts) */}+ {/* oxlint-disable-next-line ok/microcopy-ellipsis -- quoting the literal menu label (menu.ts) */}<strong>File → Set up OpenKnowledge integrations…</strong>.</li><li>diff --git a/knip.config.ts b/knip.config.tsindex 4ab03e27d..177c46d2e 100644--- a/knip.config.ts+++ b/knip.config.ts@@ -58,7 +58,7 @@ export default {'packages/app/src/editor/http-client.ts': ['types'],'.{agents,codex}/skills/**': ['files'],'lint-plugins/no-comments/__fixtures__/**': ['files'],- 'biome-plugins/__fixtures__/**': ['files'],+ 'lint-plugins/ok-rules/__fixtures__/**': ['files'],'scripts/compute-next-beta.mjs': ['files'],'scripts/build-slack-release-payload.mjs': ['files'],'scripts/assert-smoke-not-vacuous.mjs': ['files'],diff --git a/lint-plugins/ok-rules/README.md b/lint-plugins/ok-rules/README.mdnew file mode 100644index 000000000..e65832b9e--- /dev/null+++ b/lint-plugins/ok-rules/README.md@@ -0,0 +1,643 @@+# The `ok` oxlint rules++Custom lint rules for this workspace. Each rule is a module under `rules/`, composed into the single `ok` plugin by [`index.mjs`](index.mjs) and switched on in [`oxlint.config.ts`](../../oxlint.config.ts) as `ok/<rule-name>`. A rule that only applies to a subset of files carries its globs in [`scope.mjs`](scope.mjs) rather than in config — see [Scope it, if it is not workspace-wide](#3-scope-it-if-it-is-not-workspace-wide) below.++Rules surface as lint errors during `pnpm run lint:oxlint` (i.e. `pnpm lint` and `pnpm check`) and as inline editor squiggles via the oxc LSP.++One plugin holding every rule is deliberate: oxlint walks the AST once and dispatches every registered visitor, so rules amortize. Measured on this tree, 12 synthetic probe rules added 0.17s and all 23 real rules cost nothing detectable against a no-rule baseline. The GritQL plugins these replaced cost about 3.3s each because every plugin re-traversed.++## Convention++**All custom lint enforcement uses oxlint JS-plugin rules** — [PRECEDENTS.md #42](../../PRECEDENTS.md#custom-lint-enforcement-precedent-42). Add a module under `rules/` + a fixture-file test. The fixture-file test is non-negotiable: it preserves the mutation-self-test property by asserting an exact diagnostic count on a fixture pairing positive cases with negative cases.++**Rule modules carry no prose comments.** These are `.mjs` files, so the [no-comments policy](../no-comments/README.md) applies to them — unlike the `.grit` files they replaced, which sat outside it and carried long rationale headers. That rationale lives here instead, in the rule's section below. When you write a rule, budget for writing its README section in the same change; there is nowhere else for the reasoning to go.++**Diagnostic messages name the fix and link the docs.** Every message has two load-bearing pieces: (a) a noun-phrase or action verb-phrase that names what to do to fix the violation (the fix-noun — readers see this and know the next move without leaving the editor); (b) a trailing `See <docs-URL>` pointing at the rule's section in this README so the message stays self-documenting. Process metadata (decision markers like `D19:`, spec-section refs) does NOT belong in the diagnostic — it rots the same way it rots in source comments. The fixture test asserts both pieces are present (substring match for the fix-noun + URL regex) so the convention survives drift.++## Rules++A scoped rule's section carries an `Included:` line transcribed by hand from its scope entry in `scope.mjs`. Nothing generates or drift-checks the two, so `scope.mjs` is what the linter reads and the line is a copy that can fall behind it. Most scoped sections restate those globs again in their surrounding prose, which is a second copy on top of the first. `require-utf8-multipart-parser` is the one written the other way round on purpose: its prose argues the rationale and leaves the globs to that line alone. That is the intended shape for new sections; converting the remaining ones is deferred rather than forgotten.++### `microcopy-ellipsis`++Flags U+2026 (`…`) in two JSX surfaces:+- **JSX text children** — `<span>Loading…</span>`+- **JSX attribute string values** for `placeholder | label | title | aria-label | description | tooltip`++The codebase reserves `…` for two cases only:+1. **macOS native menu items** (rendered via `Menu.buildFromTemplate` in `packages/desktop/src/main/menu.ts`). Native-OS convention for "opens a new surface" (Apple/Windows/GTK HIG).+2. **Truncation indicators** — where `…` literally means "I cut text here" (graph labels, breadcrumb collapse, search snippets, sha256 prefixes, token-prefix elisions).++The rule does NOT catch:+- Object-literal menu templates (`{ label: 'Settings…' }`) — naturally skipped because they're not JSX, which is correct (Electron menus belong to case #1).+- `…` in plain `.ts` files — naturally skipped because they're not JSX (graph-label-utils, suggest-links, etc. — these are all case #2 truncation utilities).+- `…` in CLI strings (`process.stderr.write('Cloning…')`) — uncaught gap; review discipline covers the small CLI surface.+- `…` in JSX expression-child string literals (`<span>{'Loading…'}</span>`) — uncaught gap; zero occurrences in the codebase today (developers write `<span>Loading…</span>` directly). If a realistic case emerges, add a `jsx_expression` pattern matching `string` literal children rather than retrofit ad-hoc.++Rule: [`lint-plugins/ok-rules/rules/microcopy-ellipsis.mjs`](rules/microcopy-ellipsis.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/microcopy-ellipsis.fixture.tsx`](__fixtures__/microcopy-ellipsis.fixture.tsx). Test: [`packages/app/tests/integration/microcopy-ellipsis.test.ts`](../../packages/app/tests/integration/microcopy-ellipsis.test.ts).++### `no-loosely-typed-webcontents-ipc`++IPC discipline enforcement. Forbids direct electron IPC primitives (`webContents.send`, `ipcMain.handle/on`, `ipcRenderer.invoke/on/once`) outside the typed-wrapper files. Consumers must route through `createInvoker` / `createHandler` / `sendToRenderer` from `packages/desktop/src/shared/ipc-*.ts`. See [PRECEDENTS.md #14](../../PRECEDENTS.md) for the IPC discipline rationale.++Rule: [`lint-plugins/ok-rules/rules/no-loosely-typed-webcontents-ipc.mjs`](rules/no-loosely-typed-webcontents-ipc.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/no-loosely-typed-webcontents-ipc.fixture.tsx`](__fixtures__/no-loosely-typed-webcontents-ipc.fixture.tsx). Test: [`packages/desktop/tests/integration/no-loosely-typed-webcontents-ipc.test.ts`](../../packages/desktop/tests/integration/no-loosely-typed-webcontents-ipc.test.ts).++### `no-raw-html-interactive-element`++UI primitives discipline. Forbids raw JSX `<button>`, `<input>`, `<textarea>`, `<select>` inside production `.tsx` under `packages/{app,desktop,plugin}/src/**`. Consumers must use the shadcn primitives (`Button`, `Input`, `Textarea`, `Select`) from `@/components/ui/*`; if the primitive isn't installed yet, add it via `pnpm dlx shadcn@latest add <name>` first. The rule catches the PR #937 failure mode: contributors (including Codex / Claude Code / human reviewers) introducing raw `<button>` JSX while a shadcn `<Button>` from `@/components/ui/button` was already imported in the same file.++**Scoped** (see the rule's `RULE_SCOPES` entry in [`scope.mjs`](scope.mjs)) to `packages/{app,desktop,plugin}/src/**/*.tsx`. Exemptions are the leading-`!` globs in that same entry:++- `!packages/app/src/editor/**` — ProseMirror NodeViews + editor chrome legitimately render raw HTML for measurement / PM-managed DOM. The exemption matches the existing `a11y/useSemanticElements` suppressions scattered through the editor subtree.+- `!packages/app/src/components/ui/**` — these files ARE the shadcn primitive wrappers; they MUST render raw HTML by definition.+- `!**/*.test.tsx` + `!**/*.dom.test.tsx` + `!**/*.test-helper.tsx` — test fixtures and shared test doubles aren't user-facing UI.++**Pre-rule backlog (ratchet pattern).** Files that pre-date the rule and use raw `<button>` / `<input>` / `<textarea>` carry a file-level `// oxlint-disable ok/no-raw-html-interactive-element -- pre-rule backlog — ...` comment at the top of the file. The comment list across the codebase IS the visible migration backlog — review treats each `oxlint-disable` file header as a backlog marker, not a free pass. Drain by migrating the file to shadcn primitives, then deleting the suppression header (the rule starts firing again immediately, so a partial migration that misses a raw `<button>` fails the gate). Reference migration: `packages/app/src/components/NavigatorApp.tsx` (three raw `<button>` → shadcn `<Button variant="ghost|outline|link">`).++The rule does NOT catch:+- PascalCase composite components whose name starts with `Button` / `Input` (e.g. `<ButtonGroup>`, `<InputGroup>`) — pattern scopes to lowercase JSX tag names only.+- Raw HTML in `.ts` files (e.g. dangerouslySetInnerHTML strings, template literals).+- Raw `<a>` used as an action — anchor-as-button is governed by Biome's built-in `a11y/useSemanticElements` + the codebase's existing button-vs-anchor conventions.+- Other interactive primitives (`<dialog>`, `<details>`, `<summary>`) where the team hasn't yet committed to a shadcn-only contract.++**Scope** (`RULE_SCOPES['no-raw-html-interactive-element']` in [`scope.mjs`](scope.mjs)). UI primitives discipline (see PR #937 retrospective). Scoped to packages/{app,desktop,plugin}/src/**/*.tsx — production UI surfaces. Exemptions: - packages/app/src/editor/** — ProseMirror NodeViews + chrome legitimately render raw HTML for measurement / PM-managed DOM (matches the existing a11y/useSemanticElements suppressions in editor/*). - packages/app/src/components/ui/** — these ARE the shadcn primitive wrappers; they must render raw HTML by definition. - *.test.tsx / *.dom.test.tsx / *.test-helper.tsx — test fixtures and shared test doubles aren't user-facing UI. Pre-rule backlog (files outside the exemptions that pre-date the rule) is annotated via `// oxlint-disable ok/no-raw-html-interactive-element --` at the top of each offender file — the comment list is the visible migration backlog. New files cannot opt out: PR review treats the suppression header as a backlog marker, not a free pass.++Included: `packages/app/src/**/*.tsx`, `packages/desktop/src/**/*.tsx`, `packages/plugin/src/**/*.tsx`, `lint-plugins/ok-rules/__fixtures__/no-raw-html-interactive-element.fixture.tsx`. Excluded: `packages/app/src/editor/**`, `packages/app/src/components/ui/**`, `**/*.test.tsx`, `**/*.dom.test.tsx`, `**/*.test-helper.tsx`.++Rule: [`lint-plugins/ok-rules/rules/no-raw-html-interactive-element.mjs`](rules/no-raw-html-interactive-element.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/no-raw-html-interactive-element.fixture.tsx`](__fixtures__/no-raw-html-interactive-element.fixture.tsx). Test: [`packages/app/tests/lint-plugins/no-raw-html-interactive-element.test.ts`](../../packages/app/tests/lint-plugins/no-raw-html-interactive-element.test.ts). See [PRECEDENTS.md #42](../../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the custom-rule convention.++### `no-themeless-pierre-diff`++`@pierre/diffs` render contract. Every `<MultiFileDiff>` construction site under `packages/app/src/**/*.tsx` (both the self-closing and the child-bearing JSX form) must pass an explicit `theme` and must set `diffStyle: 'unified'`. `new UnresolvedFile(...)` is covered by the `theme` half only — the constructor surfaces take no `diffStyle`.++The `theme` check reads the `options` object, not the whole prop list, so a `theme` token elsewhere on the element (`data-theme="dark"`, a title string, a variable named `theme` passed to an unrelated prop) cannot suppress the diagnostic. The fixture pins that with a decoy case.++Both halves are load-bearing. Pierre ships its own palette, so a themeless renderer paints in Pierre's colours instead of the app's and stops tracking the user's light/dark selection. And `diffStyle: 'split'` renders the two sides as separate DOM subtrees, so the change-stepper's DOM-order adjacency grouping counts roughly 2x the real groups — the displayed denominator desyncs from the anchors the stepper can actually reach.++This rule replaces a `readFileSync` + regex meta-test that asserted the same invariant over source text. That test violated the AGENTS.md rule against asserting raw source text for props ("Source guards need proof runtime coverage is impossible" — it wasn't), and it carried a tautological self-test that ran a regex over its own string literals. The per-component half of its intent now lives in runtime assertions in `ActivityPanelDiffView.dom.test.tsx` (`pre[data-diff-type="single"]` for unified; the injected `:host` token block for theme). Lint is the right layer for the codebase-wide "no call site omits it" half — [PRECEDENTS.md #42](../../PRECEDENTS.md#custom-lint-enforcement-precedent-42).++The rule does NOT catch:+- a `@pierre/diffs` constructor other than `UnresolvedFile` — `new File(...)`, or any aliased import such as `File as PierreFile` in [`ConflictFilePreview.tsx`](../../packages/app/src/components/ConflictFilePreview.tsx). the rule matches the identifier as written, so a rename defeats it+- a renamed `MultiFileDiff` import, for the same reason+- a theme reaching the renderer through a spread or a variable (`options={{ ...baseOptions }}`, `options={opts}`) — the check reads the object literal, and there is no occurrence today++Runtime complement: `packages/app/src/components/ActivityPanelDiffView.dom.test.tsx` asserts the rendered result on the one surface this migration adds — `pre[data-diff-type="single"]` for unified, and the injected `:host` token block for theme.++**Scope** (`RULE_SCOPES['no-themeless-pierre-diff']` in [`scope.mjs`](scope.mjs)). @pierre/diffs render contract. Every construction site passes an explicit theme and renders unified. Scoped to production .tsx under packages/app/src; the fixture is opted in so its deliberate violations are what the rule's fixture test counts.++Included: `packages/app/src/**/*.tsx`, `lint-plugins/ok-rules/__fixtures__/no-themeless-pierre-diff.fixture.tsx`. Excluded: `**/*.test.tsx`, `**/*.dom.test.tsx`, `**/*.test-helper.tsx`.++Rule: [`lint-plugins/ok-rules/rules/no-themeless-pierre-diff.mjs`](rules/no-themeless-pierre-diff.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/no-themeless-pierre-diff.fixture.tsx`](__fixtures__/no-themeless-pierre-diff.fixture.tsx). Test: [`packages/app/tests/lint-plugins/no-themeless-pierre-diff.test.ts`](../../packages/app/tests/lint-plugins/no-themeless-pierre-diff.test.ts).++### `no-resolved-value-theme-source`++1-way theme contract. Forbids resolving the user-intent theme value at the `bridge.setThemeSource(...)` call site. The contract is 1-way: pass the unresolved CRDT value (`'system' | 'light' | 'dark'`) verbatim. `'system'` delegates appearance tracking to macOS via `nativeTheme`; resolving at the call site (via `matchMedia` or a `prefersDark ? 'dark' : 'light'` ternary) loses tracking. See [PRECEDENTS.md #40(a)](../../PRECEDENTS.md) for the renderer-state↔main-state contract.++Detection patterns (call expressions only — type-declarations are naturally excluded):+- `setThemeSource($arg)` where `$arg` contains `matchMedia` (any form)+- `setThemeSource($arg)` where `$arg` contains both `'light'` and `'dark'` string literals (likely a ternary, either order)+- Matches both bare-call and member-call shapes (`obj.setThemeSource(...)`)++Rule: [`lint-plugins/ok-rules/rules/no-resolved-value-theme-source.mjs`](rules/no-resolved-value-theme-source.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/no-resolved-value-theme-source.fixture.tsx`](__fixtures__/no-resolved-value-theme-source.fixture.tsx). Test: [`packages/desktop/tests/integration/no-resolved-value-theme-source.test.ts`](../../packages/desktop/tests/integration/no-resolved-value-theme-source.test.ts).++### `no-split-suggestion-dispatch`++One-transaction suggestion insertion ([PRECEDENTS.md #58](../../PRECEDENTS.md#one-transaction-menu-insertions-precedent-58)). Inside a `@tiptap/suggestion` `Suggestion({ ... })` config, a trigger-range delete dispatched on its own (separate from the content insert) opens a re-entrant-dispatch window: anything fired synchronously during the delete's own `updateState` (a plugin `appendTransaction`, a view/NodeView update, the y-prosemirror binding reacting to the delete) can remap the selection onto an adjacent `selectable: true` node, and the follow-up insert then silently REPLACES that node. The fix is one chain (`.deleteRange(range).insertContent(...).run()`) or an `applySlashCommandItem`-style boundary (`packages/app/src/editor/slash-command/apply-item.ts`) for items needing post-commit work.++Detection patterns (scoped to `Suggestion($config)` call sites, so delete-only surfaces outside suggestion configs — e.g. a mention chip's remove button — never fire):+- a chain whose `.run()` receiver is the `deleteRange(...)` call itself (`....deleteRange(range).run()` — a compliant atomic chain always continues past the delete before `.run()`)+- `$editor.commands.deleteRange($range)` — the `commands.*` form dispatches immediately, always a standalone delete transaction++**Unscoped** (workspace-wide, like `microcopy-ellipsis` — it carries no `RULE_SCOPES` entry and sits in `UNSCOPED_RULES`): the pattern self-scopes to `Suggestion(...)` calls, and a future suggestion surface in any package must be covered without a scope-table edit.++The rule does NOT catch:+- a split whose delete chain carries a non-content step after `deleteRange` and before `.run()` (e.g. `.deleteRange(r).focus().run()`) — the `.run()` receiver is then not the `deleteRange` call+- a second dispatch made inside a delegated item body (`item.command(editor)` running its own `editor.chain().run()`) — lint can't see through delegation+- raw `view.dispatch(tr.delete(...))` inside a Suggestion config — no occurrence today++Runtime complement: `packages/app/src/editor/extensions/suggestion-atomicity.dom.test.tsx` + `slash-command-atomicity.dom.test.tsx` drive every registered suggestion surface through a real Enter and assert exactly one doc-changing transaction — they catch the delegated-dispatch shapes the lint can't.++Rule: [`lint-plugins/ok-rules/rules/no-split-suggestion-dispatch.mjs`](rules/no-split-suggestion-dispatch.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/no-split-suggestion-dispatch.fixture.tsx`](__fixtures__/no-split-suggestion-dispatch.fixture.tsx). Test: [`packages/app/tests/lint-plugins/no-split-suggestion-dispatch.test.ts`](../../packages/app/tests/lint-plugins/no-split-suggestion-dispatch.test.ts).++### `no-unportaled-editor-content`++H6 cross-doc DOM bleed contract. `@tiptap/react`'s `PureEditorContent.componentDidMount` runs `element.append(...editor.view.dom.parentNode.childNodes)` — a sibling-vacuum primitive. When `view.dom` shares a parent with another editor's `view.dom` (e.g., V2 cache parked nodes, cross-Activity reconciliation transitions), the vacuum drags foreign content into the active wrapper. The structural fix is to render every `<EditorContent>` via `React.createPortal` into a per-Activity exclusively-owned DOM target, so `view.dom`'s parent only ever contains THIS editor's nodes.++The rule flags every JSX usage of `<EditorContent>` — both self-closing and child-bearing forms — and asks the author to suppress at the canonical portaled site (where the createPortal call lives) with `// oxlint-disable-next-line ok/no-unportaled-editor-content -- <reason>`. Adding a non-portaled `<EditorContent>` anywhere else in the codebase becomes a lint error, gated at editor-save / `pnpm lint` time.++Canonical sanctioned shape (TiptapEditor.tsx):++```tsx+createPortal(+ <EditorContent editor={editor} className="..." />,+ portalTarget,+);+```++Rule: [`lint-plugins/ok-rules/rules/no-unportaled-editor-content.mjs`](rules/no-unportaled-editor-content.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/no-unportaled-editor-content.fixture.tsx`](__fixtures__/no-unportaled-editor-content.fixture.tsx). Test: [`packages/app/tests/integration/no-unportaled-editor-content.test.ts`](../../packages/app/tests/integration/no-unportaled-editor-content.test.ts). See [PRECEDENTS.md #44](../../PRECEDENTS.md) for the H6 cross-doc DOM bleed contract and [PRECEDENTS.md #42](../../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the custom-rule convention.++### `no-uninstall-forbidden-import`++"Connects to nothing" first-hop feedback. The self-uninstall window's survey and completion screens render after `ok uninstall --yes` has stopped the local Hocuspocus server and removed `~/.ok`, so the uninstall entry must never reach the editor, the CRDT stack, the provider pool, or the server bootstrap — and must eager-load (no dynamic `import()`) so those screens paint from memory once teardown is under way.++Scoped (see the rule's `RULE_SCOPES` entry in [`scope.mjs`](scope.mjs)) to `packages/app/src/uninstall/**` (test files exempt — a dom test legitimately does `await import('./main')` to prove the entry paints). Two diagnostics:+- A static import (`import … from`, `import type … from`, `import * as … from`, or side-effect `import`) whose source is an editor / CRDT / provider-pool / Hocuspocus-server specifier (`@/editor/*`, `@inkeep/open-knowledge-server`, `@hocuspocus/*`, `yjs`, `y-protocols`, `y-prosemirror`, `y-codemirror.next`, `y-indexeddb`, `@tiptap/y-tiptap`, `@tiptap/extension-collaboration*`). `@inkeep/open-knowledge-core` (shared types + constants) is deliberately allowed.+- Any dynamic `import()`.++This rule is **shallow, first-hop feedback only**. The authoritative gate is the transitive-module-graph test at [`packages/desktop/tests/unit/uninstall-module-graph.test.ts`](../../packages/desktop/tests/unit/uninstall-module-graph.test.ts), which builds the entry alone and checks its whole loaded-module set — so it also catches a forbidden module reached indirectly through a shared `@/lib` / `@/components/ui` module, and re-export (`export … from`) edges a first-hop rule cannot express.++**Scope** (`RULE_SCOPES['no-uninstall-forbidden-import']` in [`scope.mjs`](scope.mjs)). "Connects to nothing" first-hop feedback. The self-uninstall window's survey/completion screens render after `ok uninstall --yes` stops the local Hocuspocus server and removes ~/.ok, so the uninstall entry must never import the editor / CRDT / provider-pool / Hocuspocus-server surface, and must eager-load (no dynamic import). This is SHALLOW first-hop feedback; the authoritative gate is the transitive-graph test at packages/desktop/tests/unit/uninstall-module-graph.test.ts, which also catches indirect and re-export pull-ins a first-hop rule can't express. @inkeep/open-knowledge-core (shared types + constants) is allowed. Test files are excluded: the invariant is about the SHIPPED entry graph, and a dom test legitimately does `await import('./main')` to prove the entry paints (a dynamic import the eager-load rule would otherwise flag).++Included: `packages/app/src/uninstall/**/*.ts`, `packages/app/src/uninstall/**/*.tsx`, `lint-plugins/ok-rules/__fixtures__/no-uninstall-forbidden-import.fixture.tsx`. Excluded: `packages/app/src/uninstall/**/*.test.ts`, `packages/app/src/uninstall/**/*.test.tsx`, `packages/app/src/uninstall/**/*.dom.test.tsx`.++Rule: [`lint-plugins/ok-rules/rules/no-uninstall-forbidden-import.mjs`](rules/no-uninstall-forbidden-import.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/no-uninstall-forbidden-import.fixture.tsx`](__fixtures__/no-uninstall-forbidden-import.fixture.tsx). Test: [`packages/desktop/tests/integration/no-uninstall-forbidden-import.test.ts`](../../packages/desktop/tests/integration/no-uninstall-forbidden-import.test.ts). See [PRECEDENTS.md #42](../../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the custom-rule convention.++### `path-conditional-map-driven-origin`++Observer A origin discipline. Inside `packages/server/src/server-observers.ts`, every `Y.Doc.transact()` call MUST pass the sanctioned origin `OBSERVER_SYNC_ORIGIN` as its second argument (`doc.transact(fn, OBSERVER_SYNC_ORIGIN)`). Bare `doc.transact(fn)` - or a wrong origin - routes the write to `openknowledge-service` and breaks per-session UndoManager attribution (the `trackedOrigins` Set-identity match skips the transaction).++**Scoped** (see the rule's `RULE_SCOPES` entry in [`scope.mjs`](scope.mjs)) to `packages/server/src/server-observers.ts`. Other server files routing through `session.dc.document.transact(fn, session.origin)` are out of scope - that contract is enforced by `paired-write-enforcement.test.ts`.++The rule checks the **argument position** (the second argument node), not whether the call subtree contains the identifier somewhere. It matches every `transact(...)` call, then excludes the two sanctioned shapes (`transact($_, OBSERVER_SYNC_ORIGIN)` and the 3-arg `transact($_, OBSERVER_SYNC_ORIGIN, $...)`). A callback body that mentions `OBSERVER_SYNC_ORIGIN` for an unrelated reason therefore neither clears a bare/wrong call nor trips a correct one - the prior `contains`-based shape was falsely cleared by such a mention.++The rule does NOT catch:+- Transact calls outside `server-observers.ts` (scoped to the one observer-dispatch file)+- An origin passed in a position other than the second argument (the contract is second-argument placement; no real call site does otherwise)++**Scope** (`RULE_SCOPES['path-conditional-map-driven-origin']` in [`scope.mjs`](scope.mjs)). Observer A origin discipline. Scoped to the one file that owns the observer-cross-CRDT transact spine. Inside this file every `doc.transact(fn, origin)` must pass `OBSERVER_SYNC_ORIGIN` as the second argument; bare `doc.transact(fn)` (or a wrong origin) routes the write to `openknowledge-service` and breaks per-session UndoManager attribution. Other server files routing through `session.dc.document.transact(fn, session.origin)` are out of scope - that contract is enforced by `paired-write-enforcement.test.ts`.++Included: `packages/server/src/server-observers.ts`, `lint-plugins/ok-rules/__fixtures__/path-conditional-map-driven-origin.fixture.tsx`.++Rule: [`lint-plugins/ok-rules/rules/path-conditional-map-driven-origin.mjs`](rules/path-conditional-map-driven-origin.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/path-conditional-map-driven-origin.fixture.tsx`](__fixtures__/path-conditional-map-driven-origin.fixture.tsx). Test: [`packages/server/src/path-conditional-map-driven-origin.test.ts`](../../packages/server/src/path-conditional-map-driven-origin.test.ts).++### `cst-pm-handler-todo-stub`++Codemod handler TODO-stub grep. Flags handler files under `packages/md-conformance/src/substrates/*/handlers/` that still contain the codemod's stub body (`throw new Error("TODO: implement <substrate>:<dir>/<key>")`), so a codemod stub that survives to lint time is caught.++This is a TODO-stub grep, NOT an exhaustiveness check. Whether a substrate covers every PM node type (the node-set traversal over `packages/core/schema-snapshot.json`) is a separate concern owned by a suite-self-consistency gate. The compile-time backstop for missing methods is the TypeScript handlers-table type check against `ICstEngine`.++**Scoped** (see the rule's `RULE_SCOPES` entry in [`scope.mjs`](scope.mjs)) to the per-substrate handlers/ subtrees (see the rule's `RULE_SCOPES` entry in `scope.mjs`). The codemod implementation, harness tests, and oracles are out of scope (they legitimately produce strings containing "TODO: implement" in their own contexts).++The rule does NOT catch:+- Missing handler FILES (file-presence is out of the rule's scope; TypeScript + codemod coverage handle this)+- Whether the handler set is complete per the PM schema (a separate node-set traversal, deferred to the suite-self-consistency gate)+- Error subclasses (only matches `new Error(...)`)+- Non-anchored "TODO" mentions (regex requires the message to start with `TODO: implement`)++**Scope** (`RULE_SCOPES['cst-pm-handler-todo-stub']` in [`scope.mjs`](scope.mjs)). Handler TODO-stub grep: scaffolded handlers are seeded with `throw new Error("TODO: implement …")`, and this rule flags any stub that survives to lint time so an unfinished handler can't pass review. It is NOT an exhaustiveness check — type checks are the compile-time backstop for missing methods. Scoped narrowly to the handlers/ subtrees so harness tests and oracles (which legitimately produce "TODO: implement" strings in their own contexts) are out of scope.++Included: `packages/md-conformance/src/substrates/*/handlers/**/*.ts`, `lint-plugins/ok-rules/__fixtures__/cst-pm-handler-todo-stub.fixture.tsx`.++Rule: [`lint-plugins/ok-rules/rules/cst-pm-handler-todo-stub.mjs`](rules/cst-pm-handler-todo-stub.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/cst-pm-handler-todo-stub.fixture.tsx`](__fixtures__/cst-pm-handler-todo-stub.fixture.tsx). Test: [`packages/md-conformance/src/lint-plugins/cst-pm-handler-todo-stub.test.ts`](../../packages/md-conformance/src/lint-plugins/cst-pm-handler-todo-stub.test.ts).++### `class-proof-registration-discipline`++Class-proof DSL contract enforcement. Two arms, short-circuiting — Pattern A wins when both apply, so a call missing options reports once, not twice:++- **Pattern A (missing args):** flags `defineClassProof(name, opts)` when `opts` doesn't contain both `predicate:` and `proof:` property assignments.+- **Pattern B (outside canonical dir):** flags any `defineClassProof(...)` call. The scope entry excludes `packages/md-conformance/src/class-proofs/proofs/**`, so this fires only on registrations outside the sanctioned location.++Inside the canonical proofs/ dir, neither pattern fires — TypeScript's `ClassProofOptions<M>` signature backstops the missing-args check, and any `defineClassProof` call there is in the sanctioned location.++**Scoped** (see the rule's `RULE_SCOPES` entry in [`scope.mjs`](scope.mjs)) to all `.ts`/`.tsx`/`.mts` files EXCEPT the canonical `class-proofs/proofs/**` dir and `*.test.ts`/`*.test.tsx`/`*.test.mts` (test files that exercise the DSL are exempt — `dsl.test.ts` legitimately calls `defineClassProof` outside the canonical dir).++The rule does NOT catch:+- Missing-args violations inside the canonical proofs/ dir (TypeScript catches those)+- Functions with similar names (`myDefineClassProofVariant`) — pattern matches the exact function name+- Type references to `defineClassProof` — pattern scopes to call expressions++**Scope** (`RULE_SCOPES['class-proof-registration-discipline']` in [`scope.mjs`](scope.mjs)). Class-proof DSL registration discipline: registrations MUST live in the canonical proofs/ dir (one manifest as the single source of truth) and EVERY registration MUST pass `predicate` + `proof` options. The scope entry EXCLUDES the canonical dir — inside it, the TypeScript signature is the missing-args backstop; outside it, any `defineClassProof(...)` call fires (= wrong location), and missing args fire an additional diagnostic.++Included: `**/*.ts`, `**/*.tsx`, `**/*.mts`, `lint-plugins/ok-rules/__fixtures__/class-proof-registration-discipline.fixture.tsx`. Excluded: `**/node_modules/**`, `**/dist/**`, `**/*.test.ts`, `**/*.test.tsx`, `**/*.test.mts`, `packages/md-conformance/src/class-proofs/proofs/**`.++Rule: [`lint-plugins/ok-rules/rules/class-proof-registration-discipline.mjs`](rules/class-proof-registration-discipline.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/class-proof-registration-discipline.fixture.tsx`](__fixtures__/class-proof-registration-discipline.fixture.tsx). Test: [`packages/md-conformance/src/lint-plugins/class-proof-registration-discipline.test.ts`](../../packages/md-conformance/src/lint-plugins/class-proof-registration-discipline.test.ts).++### `playwright-prefer-to-have-count`++Flags `expect(await locator.count())` — the one-shot count snapshot that never retries. Under CI CPU contention the DOM settles a few frames after the read, so the assertion flakes while the auto-retrying web-first form `await expect(locator).toHaveCount(n)` passes deterministically (the no-retry read was one of the hidden-flake shapes in the 2026-06 e2e CI audit). The pattern matches the probe sub-expression regardless of the matcher that follows (`.toBe`, `.toEqual`, `.toBeGreaterThanOrEqual`, ...). Upstream precedent: eslint-plugin-playwright `prefer-to-have-count`.++**Scoped** (see the rule's `RULE_SCOPES` entry in [`scope.mjs`](scope.mjs)) to `packages/app/tests/{stress,visual,a11y}/**/*.e2e.ts` (the same three dirs `tests/integration/e2e-stop-rules.test.ts` source-scans) + the fixture. Not workspace-wide: outside Playwright specs, `.count()` is usually not a `Locator` and the web-first rewrite does not apply.++The rule does NOT catch:+- `expect.soft(await locator.count())` — different callee node shape; zero occurrences today.+- A count read assigned to a variable and asserted later (`const n = await loc.count(); expect(n).toBe(2)`) — two statements; the rule cannot correlate them. Add an e2e-stop-rules source-scan rule if the split form ever recurs.+- oxlint JS-plugin diagnostics are diagnostic-only — the `toHaveCount` rewrite is named in the message but not auto-applied.++**Scope** (`RULE_SCOPES['playwright-prefer-to-have-count']` in [`scope.mjs`](scope.mjs)). One-shot `expect(await locator.count())` reads never retry and are the canonical hidden-flake assertion shape (2026-06 e2e audit). Scoped to the browser e2e suites (all three dirs the e2e-stop-rules source-scan also covers) + the rule's own fixture. Not workspace-wide: outside Playwright specs, `.count()` is usually not a Locator and the web-first rewrite does not apply.++Included: `packages/app/tests/stress/**/*.e2e.ts`, `packages/app/tests/visual/**/*.e2e.ts`, `packages/app/tests/a11y/**/*.e2e.ts`, `lint-plugins/ok-rules/__fixtures__/playwright-prefer-to-have-count.fixture.tsx`.++Rule: [`lint-plugins/ok-rules/rules/playwright-prefer-to-have-count.mjs`](rules/playwright-prefer-to-have-count.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/playwright-prefer-to-have-count.fixture.tsx`](__fixtures__/playwright-prefer-to-have-count.fixture.tsx). Test: [`packages/app/tests/lint-plugins/playwright-prefer-to-have-count.test.ts`](../../packages/app/tests/lint-plugins/playwright-prefer-to-have-count.test.ts). See [PRECEDENTS.md #42](../../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the custom-rule convention.++### `no-roundtrip-identity-oracle`++Forbids the byte-fidelity round-trip oracle in public-mirrored tests. Asserting that re-serializing a freshly-parsed document yields back the *same* input — `serialize(parse(x))` (or the MarkdownManager method form `m.serialize(m.parse(x))`) compared equal to that same `x` via `.toBe` / `.toEqual` / `.toStrictEqual` or `===` — is the engine's byte-identity correctness oracle, exercised by its own fidelity suite. A public test should pin a specific expected output instead; this rule keeps a new public test from reintroducing the general oracle.++**Identity, not contract.** The rule fires only when the parse input and the expected value are the *same expression* — the receiver-identity check (`$x` … `$x`) enforces textual equality. That is what separates the oracle from the assertions that must stay public and green:++- A **contract test** pins a *fixed expected literal* (`expect(serialize(parse('# H'))).toBe('# H\n')`) — the expected differs from the input, so it does not fire.+- The **Bridge-invariant comparator** `normalizeBridge(a) === normalizeBridge(b)` (precedent #38, the documented public contract) contains no `serialize(parse(...))` and is never flagged.+- The **normalizing-construct detector** `serialize(parse(x)) !== x` uses `!==`, a different operator, and is never flagged.++**Scoped** (see the rule's `RULE_SCOPES` entry in [`scope.mjs`](scope.mjs)) to the public-mirrored test surface (`packages/**/*.test.ts`, `*.test.tsx`, `*.e2e.ts`). The internal suites that legitimately own the oracle are excluded as negative globs (see the rule's `RULE_SCOPES` entry in `scope.mjs`); on this surface it is forbidden.++The rule does NOT catch:+- Round-trip identity through a helper (`mdRoundTrip(x)`, `normalize(...)`) or an intermediate variable (`const out = serialize(parse(x)); expect(out).toBe(x)`) — the pattern matches the inline call shape, not helper bodies or cross-statement data flow. Those forms live in the path-excluded fidelity suite, covered by exclusion.+- Equality through matchers other than `toBe` / `toEqual` / `toStrictEqual`, or operators other than `===` (e.g. a custom `assertByteIdentical` helper).+- Any oracle whose two sides are not the same inline expression (e.g. a round-trip compared to a different variable).++**Scope** (`RULE_SCOPES['no-roundtrip-identity-oracle']` in [`scope.mjs`](scope.mjs)). Byte-fidelity round-trip oracle ban. `serialize(parse(x))` (or the MarkdownManager method form) asserted equal to the same `x` is the engine's byte-identity correctness oracle; it is owned by internal suites excluded from this rule's scope entry, so a test on this surface can't reintroduce it. The fixture is in scope so its planted oracle drives the fixture-file test; the Bridge-invariant comparator `normalizeBridge(a) === normalizeBridge(b)` (precedent #38) is the public contract and is left untouched by the rule, not by this scope.++Included: `packages/**/*.test.ts`, `packages/**/*.test.tsx`, `packages/**/*.e2e.ts`, `lint-plugins/ok-rules/__fixtures__/no-roundtrip-identity-oracle.fixture.tsx`. Excluded: `packages/md-conformance/**`, `packages/app/tests/fidelity/**`, `packages/core/src/markdown/**/*.test.ts`, `packages/core/src/bridge/**/*.test.ts`, `**/*.private.*`.++Rule: [`lint-plugins/ok-rules/rules/no-roundtrip-identity-oracle.mjs`](rules/no-roundtrip-identity-oracle.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/no-roundtrip-identity-oracle.fixture.tsx`](__fixtures__/no-roundtrip-identity-oracle.fixture.tsx). Test: [`packages/app/tests/lint-plugins/no-roundtrip-identity-oracle.test.ts`](../../packages/app/tests/lint-plugins/no-roundtrip-identity-oracle.test.ts). See [PRECEDENTS.md #42](../../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the custom-rule convention and [PRECEDENTS.md #38](../../PRECEDENTS.md) for the Bridge-invariant contract.++### `no-hand-rolled-spinner`++Flags `animate-spin` in any `className` / `*ClassName` attribute value. Loading spinners come from the `Spinner` primitive so reduced-motion support and the accessible name are inherited rather than remembered per call site.++`animate-spin` applied by hand keeps spinning through `prefers-reduced-motion` (a vestibular trigger) and carries no role or label unless the author adds them. `Spinner` bakes in `motion-reduce:animate-none`, `role="status"`, and a localized `aria-label`. Pass `icon` when the glyph shape carries meaning (`RefreshCw` for syncing, `Undo2` for reverting), and `aria-hidden="true"` when a wrapper or enclosing control already names the loading state.++Suppress a legitimately non-`Spinner` spin (a decorative flourish, a non-loading rotation) with `// oxlint-disable-next-line ok/no-hand-rolled-spinner -- <reason>` on the line above the class attribute; the attribute must be on its own line for the suppression to attach.++Unscoped, like the other five rules in `UNSCOPED_RULES` — it applies wherever a class string can appear.++The `\b` delimiter is asymmetric in a way that is easy to misread: `animate-spinner` does NOT fire (the trailing boundary fails against a word character) but `animate-spin-slow` DOES (`-` is a boundary). That is the retired pattern's behaviour, kept deliberately — a slowed hand-rolled spin is still hand-rolled — and both halves are pinned in the fixture.++Rule: [`lint-plugins/ok-rules/rules/no-hand-rolled-spinner.mjs`](rules/no-hand-rolled-spinner.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/no-hand-rolled-spinner.fixture.tsx`](__fixtures__/no-hand-rolled-spinner.fixture.tsx). Test: [`packages/app/tests/lint-plugins/no-hand-rolled-spinner.test.ts`](../../packages/app/tests/lint-plugins/no-hand-rolled-spinner.test.ts).++### `no-inline-tolerance-class`++Forbids a public-mirrored test from writing a bridge normalization-class value inline as a string literal. `BRIDGE_TOLERANCE_CLASSES` (`packages/core/src/bridge/normalize.ts`) is the bridge normalizer's catalog of byte-difference equivalence classes it tolerates. A public test should assert observable `normalizeBridge` equivalence between inputs rather than hard-coding one of those class labels inline — the label is an internal classification detail, and pinning it inline both couples the test to that detail and re-declares the catalog outside the modules that own it. `check-mirror-test-policy` Check B already blocks a public test from *importing* the catalog symbol; this rule closes the complementary gap where a test re-encodes a class value inline (`expect(applied).toBe('jsx-container-boundary-blank')`, an array of class names), past the import check.++**Identity, not substring.** The `or {}` matches a string-literal node whose value *is* exactly a catalog member, so the names that appear legitimately on the public surface as prose are not flagged:++- A class name inside a longer **test-title sentence** (`test('… (block-separator-collapse class)', …)`) — a different node value, so it does not fire.+- A class name embedded in a **docName** with a prefix (`'fr34-doc-start-thematic'`) — likewise a substring, not the whole value.+- A class name in a **comment** — the rule matches the string-literal node, not trivia.++The match is quote-style independent (a single-quoted pattern matches the double-quoted form Biome emits). The four **universal text-encoding** classes — `bom`, `crlf`, `trailing-whitespace`, `trailing-newline` — are deliberately NOT matched: they are normalizations every text tool performs, not distinctive classes, and the public floor telemetry runtime (`tolerance-telemetry.ts`) surfaces them, so public tests legitimately assert that runtime emits `class: 'crlf'` for a CRLF input. The 12 markdown-fidelity classes plus those 4 universal classes partition the catalog exactly, and the fixture test's drift canary pins that partition — a class added to `BRIDGE_TOLERANCE_CLASSES` reddens until it is classified into one bucket.++**Scoped** (see the rule's `RULE_SCOPES` entry in [`scope.mjs`](scope.mjs)) to the public-mirrored test surface (`packages/**/*.test.ts`, `*.test.tsx`, `*.e2e.ts`), with the catalog-owning internal suites excluded as negative globs (see the rule's `RULE_SCOPES` entry in `scope.mjs`), so the catalog stays usable there but the inline form is forbidden on this surface.++The rule does NOT catch:+- A class name built by concatenation or template interpolation (`'doc-start-' + 'thematic'`) — neither operand is the whole value.+- A class name in a template literal — the pattern matches string-literal nodes, not template content.++**Scope** (`RULE_SCOPES['no-inline-tolerance-class']` in [`scope.mjs`](scope.mjs)). Inline bridge normalization-class value ban. BRIDGE_TOLERANCE_CLASSES (packages/core/src/bridge/normalize.ts) is the bridge normalizer's class catalog; importing it into a test on this surface is blocked by check-mirror-test-policy Check B, and this rule blocks the complementary inline re-encoding. The catalog is owned by internal suites excluded from this rule's scope entry, so `scoped()` returns an empty visitor for them and the rule body never runs there; the inline form cannot come back through a new test on that surface. The fixture is in scope so its planted literals drive the fixture-file test.++Included: `packages/**/*.test.ts`, `packages/**/*.test.tsx`, `packages/**/*.e2e.ts`, `lint-plugins/ok-rules/__fixtures__/no-inline-tolerance-class.fixture.tsx`. Excluded: `packages/md-conformance/**`, `packages/app/tests/fidelity/**`, `packages/core/src/markdown/**/*.test.ts`, `packages/core/src/bridge/**/*.test.ts`, `**/*.private.*`.++Rule: [`lint-plugins/ok-rules/rules/no-inline-tolerance-class.mjs`](rules/no-inline-tolerance-class.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/no-inline-tolerance-class.fixture.tsx`](__fixtures__/no-inline-tolerance-class.fixture.tsx). Test: [`packages/app/tests/lint-plugins/no-inline-tolerance-class.test.ts`](../../packages/app/tests/lint-plugins/no-inline-tolerance-class.test.ts). See [PRECEDENTS.md #42](../../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the custom-rule convention.++### `require-windowshide-on-spawn`++Windows console-flash prevention. Every hand-rolled `node:child_process` process-spawn (`spawn` / `spawnSync` / `execSync` / `execFile` / `execFileSync`, plus the repo aliases `nodeSpawn` and `execFileAsync`) must hide the Windows console it would otherwise pop — either by wrapping its options in `withHiddenWindowsConsole(...)` (from `@inkeep/open-knowledge-server`, the preferred form shared with the server package) or by an inline `windowsHide: true`.++**Why.** On Windows, `windowsHide` defaults to `false`. When a console-LESS parent — the OK server auto-started by an MCP host with `stdio: 'ignore'`, or spawned detached — spawns a console-subsystem binary like `git.exe`, Windows creates a new console window that flashes on screen and vanishes, once per spawn. During an editing / agent-write session the per-edit `git` reads produce a steady stream of these. Hiding the console fixes it. The flag is a **no-op on both macOS and Linux** (neither allocates a console for child processes), so it is applied uniformly regardless of the command's target platform.++`simple-git` already sets `windowsHide: true` internally, so git routed through it (shadow repo, share, conflicts) is out of scope by nature — this rule governs only the hand-rolled call sites that bypass it.++**Scoped** (see the rule's `RULE_SCOPES` entry in [`scope.mjs`](scope.mjs)) to `packages/{server,cli,desktop}/src/**/*.ts` (the packages that spawn processes at runtime on Windows), with `!**/*.test.ts` + `!**/*.test-helper.ts` excluded.++**Opting out (macOS/Linux-only spawns).** For a spawn that only ever runs on macOS and/or Linux — `codesign`, `sw_vers`, an `open(1)` launch — hiding a console is meaningless. Either add the flag anyway (a harmless no-op that keeps the rule uniform) or suppress that one call with a reason:++```ts+// oxlint-disable-next-line ok/require-windowshide-on-spawn -- macOS-only (never spawned on Windows)+const r = spawnSync('codesign', [...], { ... });+```++Reference opt-out in the tree: [`packages/cli/src/commands/diagnose-health-checks/macos-codesig.ts`](../../packages/cli/src/commands/diagnose-health-checks/macos-codesig.ts). Same-named wrapper false positives (a local `const spawn = deps.spawnDetached ?? …`, or an injected `spawn` param) use the same suppression with a "not node:child_process" reason.++The rule does NOT catch: bare `exec(...)` (the identifier is too commonly shadowed); member calls (`deps.spawn(...)` — a different AST, so the real impl behind the injection is the enforced site); a `windowsHide` / `withHiddenWindowsConsole` written inside a spawn's callback body (would spuriously satisfy the check — no realistic occurrence).++**Scope** (`RULE_SCOPES['require-windowshide-on-spawn']` in [`scope.mjs`](scope.mjs)). Windows console-flash prevention: every hand-rolled `child_process` spawn in the runtime-spawning packages must hide the Windows console (via `withHiddenWindowsConsole(...)` or `windowsHide: true`), else a console-less parent (MCP-spawned/detached OK server) flashes a terminal window per spawn on Windows. Scoped to the server, CLI, and desktop packages that spawn processes on Windows. Tests excluded. `simple-git` sets the flag internally, so git routed through it is out of scope by nature.++Included: `packages/server/src/**/*.ts`, `packages/cli/src/**/*.ts`, `packages/desktop/src/**/*.ts`, `lint-plugins/ok-rules/__fixtures__/require-windowshide-on-spawn.fixture.tsx`. Excluded: `**/*.test.ts`, `**/*.test-helper.ts`.++Rule: [`lint-plugins/ok-rules/rules/require-windowshide-on-spawn.mjs`](rules/require-windowshide-on-spawn.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/require-windowshide-on-spawn.fixture.tsx`](__fixtures__/require-windowshide-on-spawn.fixture.tsx). Test: [`packages/server/src/lint-plugins/require-windowshide-on-spawn.test.ts`](../../packages/server/src/lint-plugins/require-windowshide-on-spawn.test.ts). See [PRECEDENTS.md #42](../../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the custom-rule convention.++### `require-utf8-multipart-parser`++Multipart filename charset correctness. `busboy(...)` may only be constructed inside [`packages/server/src/multipart.ts`](../../packages/server/src/multipart.ts); every other multipart body is parsed through its `createMultipartParser(req, limits)` factory, which hardcodes `defParamCharset: 'utf8'`.++**Why.** busboy defaults `defParamCharset` to `latin1` — an inheritance from `Content-Disposition`'s original MIME/email definition, not from the `multipart/form-data` rules. RFC 7578 governs this surface instead. It issues no receiver mandate — section 5.1.3 is explicit that a parser cannot assume any particular charset was used — so the default is ours to choose, and UTF-8 is the only defensible choice: section 4.2 records that "the encoding used for the file names is typically UTF-8", and the sender-side form-charset ladder in section 5.1.2 terminates at UTF-8. Browsers and Node/undici both put the name on the wire as raw UTF-8 bytes in the plain `filename=` parameter, so at the default every multi-byte sequence is read back as one mojibake code point per byte: `café.png` arrives as `café.png`, `会議メモ.pdf` loses essentially all of its information. The damage lands at the transport-decode boundary, before any sanitizer or storage layer sees it, and it is not invertible there — the mojibake is indistinguishable from a filename the user legitimately owns.++The omission is invisible in review: `busboy({ headers, limits })` reads as complete unless you happen to know the default. It shipped at two construction sites for exactly that reason, the second copied from the first along with its `limits` shape, which is why this is a mechanical gate rather than a review convention.++**Presence match, not absence match.** The sibling `require-windowshide-on-spawn` rule is shaped as "the call must contain `windowsHide`", because there the option's only correct value is `true`. That shape is too weak here: "the call must contain `defParamCharset:`" is satisfied by `defParamCharset: 'latin1'`, which passes lint and reintroduces the bug. The factory takes no charset parameter, so routing through it removes the value hole entirely and reduces this rule to a plain presence check on the constructor. Both the wrong-value and the right-value-wrong-place cases are pinned as must-fire fixtures.++**Scoped** (see [`scope.mjs`](scope.mjs)) repo-wide rather than per-package: server owns the only busboy dependency today, and that is exactly the state a new dependency elsewhere would change, silently. The sanctioned construction site and the test families are excluded. The `Included:` / `Excluded:` line below carries both halves, transcribed from `scope.mjs`, which is the entry the linter actually reads; this prose argues why the scope is shaped that way rather than restating it. The test exclusion is deliberate rather than copied: [`packages/server/src/http/local-api-dispatch.test.ts`](../../packages/server/src/http/local-api-dispatch.test.ts) drives its own parser inside a synthetic `/api/upload-lite` handler that counts bytes and never decodes a non-ASCII name.++**Opting out.** There is no legitimate second construction site. A caller that needs different parser options (`preservePath`, `highWaterMark`, …) should widen the factory — that keeps the charset decision in one place, and forces the path-traversal reasoning `preservePath` demands rather than letting it be set in passing. If you genuinely must construct in place, suppress the one call with a reason:++```ts+// oxlint-disable-next-line ok/require-utf8-multipart-parser -- <reason>+const bb = busboy({ headers, defParamCharset: 'utf8' });+```++The rule does NOT catch: member calls (`parsers.busboy(...)` — a different AST); a call through a renamed binding (`import bb from 'busboy'; bb(...)`). Both are defeatable on purpose rather than by accident. A `ReturnType<typeof busboy>` type annotation is not a call expression and correctly does not fire; it is pinned as a negative fixture so a future pattern change cannot silently start flagging type positions. The behavioural backstop for all of these is [`packages/app/tests/integration/api-error-envelope/upload-filename-charset.test.ts`](../../packages/app/tests/integration/api-error-envelope/upload-filename-charset.test.ts), which asserts the decode end to end over real HTTP through both endpoints.++**Scope** (`RULE_SCOPES['require-utf8-multipart-parser']` in [`scope.mjs`](scope.mjs)). Multipart filename charset: busboy may only be constructed inside `multipart.ts`, whose factory hardcodes `defParamCharset: 'utf8'`. busboy defaults that option to `latin1`, which mojibakes every non-ASCII filename at the transport-decode boundary, irreversibly and invisibly in review. Repo-wide rather than server-scoped: server owns the only busboy dependency today, and that is exactly the state a new dependency in another package would change, silently. The factory itself is excluded so it can make the one sanctioned call. Tests are excluded deliberately, not by copy: `http/local-api-dispatch.test.ts` drives its own parser in a synthetic `/api/upload-lite` handler that counts bytes and never decodes a non-ASCII name. The `.mts` extension in the include list matches one file today, `docs/vitest.real-source.config.mts`, and is carried mainly as forward coverage: this gate exists because the defect spread by copy-paste, so an extension it cannot see is a hole by construction. The sibling `class-proof-registration-discipline` entry carries the same extension: its predicate is a `CallExpression` visitor and its scope already reaches ordinary TypeScript, so nothing about that rule argues for excluding `.mts`.++Included: `**/*.ts`, `**/*.tsx`, `**/*.mts`, `lint-plugins/ok-rules/__fixtures__/require-utf8-multipart-parser.fixture.tsx`. Excluded: `**/node_modules/**`, `**/dist/**`, `**/*.test.ts`, `**/*.test.tsx`, `**/*.test.mts`, `**/*.test-helper.ts`, `packages/server/src/multipart.ts`.++Rule: [`lint-plugins/ok-rules/rules/require-utf8-multipart-parser.mjs`](rules/require-utf8-multipart-parser.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/require-utf8-multipart-parser.fixture.tsx`](__fixtures__/require-utf8-multipart-parser.fixture.tsx). Test: [`packages/server/src/lint-plugins/require-utf8-multipart-parser.test.ts`](../../packages/server/src/lint-plugins/require-utf8-multipart-parser.test.ts). See [PRECEDENTS.md #42](../../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the custom-rule convention.++### `no-blind-agent-host-fanout`++Scope discipline for user-global Agent Skill installs. Bans the `skills` CLI npm specs (`skills@~1.5.0` and its caret / exact / `latest` variants) and the bare `'--agent'` argv token anywhere under `packages/{server,cli}/src/**`.++**Why.** `installUserSkill` used to shell out to `npx -y skills@~1.5.0 add <dir> --agent '*' -g -y --copy`. `--agent '*'` makes that CLI skip its own host detection and target every host in its registry (~75 and growing), so a single `ok init` wrote 110 directories across 54 tool-config homes in a real `$HOME` — 51 of them for tools the reporter had never installed ([issue #820](https://github.com/inkeep/open-knowledge/issues/820)). OK's user-global skills are behavioural instructions autonomous software reads and acts on, so writing one into a tool's config dir is a scope-of-consent decision, not cosmetic clutter.++Nothing about the dependency was load-bearing: OK passed a local path (no source resolution), forced `--copy` (no symlinks), and the CLI writes no lockfile or state at global scope. It contributed a directory table that OK already maintains in core for project scope — while costing a floating-range `npx -y` fetch-and-execute at init time and third-party telemetry OK never opted out of. The install now writes directly, gated on `detectUserSkillHosts`, whose host set derives from `HOSTS_WITH_USER_SKILL_DIR` in [`packages/core/src/constants/editors.ts`](../../packages/core/src/constants/editors.ts).++The rule bans the *ingredients* rather than the assembled command line, because the argv was built as an array of literals that no single AST node spans.++**Scoped** (see the rule's `RULE_SCOPES` entry in [`scope.mjs`](scope.mjs)) to `packages/{server,cli}/src/**/*.ts`. Tests are deliberately **in** scope (unlike the sibling spawn rule): a test that reintroduces the invocation reintroduces the fan-out, and the suite asserts the writer's behavior through the filesystem, never through argv.++The rule does NOT catch a spec assembled by concatenation or interpolation (`` `skills@${range}` ``), or the flag reaching a subprocess through a variable — the rule matches the string-literal node. Both are defeatable-on-purpose rather than accidental; the behavioural backstop is [`packages/server/src/skill-install.test.ts`](../../packages/server/src/skill-install.test.ts), whose "never creates a dotdir for a host that is not installed" case asserts the real filesystem outcome.++Adding a host that needs a different install mechanism? Add it to `HOSTS_WITH_USER_SKILL_DIR` and let the detection gate cover it — don't suppress this rule.++**Scope** (`RULE_SCOPES['no-blind-agent-host-fanout']` in [`scope.mjs`](scope.mjs)). Scope discipline for user-global Agent Skill installs (issue #820). OK writes these dirs itself, gated on `detectUserSkillHosts`; shelling out to the `skills` CLI with `--agent '*'` bypasses host detection and creates config dirs for tools the user never installed. Scoped to server + cli (where the user-global install lives). Tests are NOT excluded — a test reintroducing the invocation is as load-bearing as production code, and the suite asserts through the filesystem, never through argv.++Included: `packages/server/src/**/*.ts`, `packages/cli/src/**/*.ts`, `lint-plugins/ok-rules/__fixtures__/no-blind-agent-host-fanout.fixture.tsx`.++Rule: [`lint-plugins/ok-rules/rules/no-blind-agent-host-fanout.mjs`](rules/no-blind-agent-host-fanout.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/no-blind-agent-host-fanout.fixture.tsx`](__fixtures__/no-blind-agent-host-fanout.fixture.tsx). Test: [`packages/app/tests/lint-plugins/no-blind-agent-host-fanout.test.ts`](../../packages/app/tests/lint-plugins/no-blind-agent-host-fanout.test.ts). See [PRECEDENTS.md #42](../../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the custom-rule convention.++### `no-unwrapped-user-facing-string`++Localization discipline. Makes a hardcoded user-facing string a **build-visible defect** rather than a convention someone has to remember — the gap that let the app accumulate residual English while the `en` catalog grew past 2,800 entries. Four surfaces:++- **Toast arguments** — `toast.error('…')`, `toast.success('…')`, any `toast.<method>` whose first argument is a string literal.+- **JSX text children** — `<span>No documents match your search</span>`.+- **UI-facing attributes** — `aria-label`, `placeholder`, `title`, `alt` with a string-literal value.+- **UI-facing object properties** — `{ label: 'Delete table' }`, `{ description: 'Link to a page or external URL' }`. Same six names as the attribute branch plus `label` and `description`.++The wrapped forms — `<Trans>…</Trans>`, `` t`…` `` from `useLingui()` / `@lingui/core/macro` — are not literals in the positions above and never fire.++**Why object position needed its own branch.** `{ title: '…' }` renders the same words `title="…"` renders, but the attribute branch cannot see it, and that shape was where the residual English actually was: a sweep found 50 of them (menu items, picker entries, hover-preview panels, user-shown error envelopes) against zero the other three branches could reach. The name scope is what keeps it usable — the same measurement that produced the JSX prose test applies here, since an unscoped literal rule fires on every `className`, `data-testid`, and identifier in the tree. With the six names and the prose test, the branch found **1 hit in `packages/app/src`** after the migration landed, and that one is a deliberate non-copy label carrying a `biome-ignore`.++**Implementation note.** The object-property branch visits `Property` nodes directly and keys on the property name, so the branch is written as the code snippet `` `$name: $value` ``. That binds to JS object-literal pairs only: a TypeScript member such as `label: 'left' | 'right'` inside a `type` or `interface` is a different node and is structurally out of reach, which is what keeps string-literal union types from firing.++**Where a `msg` descriptor is the fix instead of `t`.** When the object is module scope — a `const` array of menu items, a severity table, a language list — a `t` call in it resolves once at import and then keeps whatever language was active then, however correctly it is wrapped. `I18nProvider` re-renders context *consumers*, not the whole tree, so nothing corrects it later. Hold a `msg` descriptor in the object and resolve it with `t(descriptor)` at render, in a component that calls `useLingui()`; that hook call is also what subscribes the component to the locale change. `BlockTypeSelector.tsx` and `editor/utils/severity.ts` are the reference shapes.++**The prose test, and why the branches differ.** The two JSX branches require **two letter-words separated by whitespace**; the toast branch takes any literal. That asymmetry is measured, not stylistic: a toast argument is unambiguously user-facing, whereas raw JSX text in this codebase is overwhelmingly *not* prose. Firing on every JSX literal produced 53 hits across the product tree of which **zero** were genuine copy — keyboard-shortcut tokens (`Ctrl+Shift+N`), code identifiers (`open-knowledge`), sample paths (`notes / release-plan.md`), and brand marks (`OpenKnowledge`). With the prose test the same sweep produced **4 hits, all real** (two `aria-label`s and one banner sentence in `ConflictsSection.tsx`, one toast in `FileTree.tsx`), which is the signal-to-noise ratio that makes a lint rule worth obeying. Note the two-word test also excludes tokens joined by punctuation, since `notes / release-plan.md` has no letter–space–letter run.++`<Brand> icon` is exempt in-pattern: it is the accessible name of a third-party mark, and translating it renames the product.++**Scoped** (see the rule's `RULE_SCOPES` entry in [`scope.mjs`](scope.mjs)) to `packages/{app,desktop,plugin}/src/**`, `.ts` as well as `.tsx` — the toast branch's dominant shape is a plain `lib/` helper, not a component. Exemptions as negative `!`-globs: `!packages/app/src/editor/**` (ProseMirror/CodeMirror-managed views, whose placeholder and title strings are editor affordances), `!packages/app/src/components/ui/**` (shadcn primitive wrappers — attribute strings there are prop plumbing), `!packages/desktop/src/main/**` (the Electron main process — see below), and `!**/*.test.ts` / `!**/*.test.tsx` / `!**/*.dom.test.tsx`.++`packages/desktop/src/main/**` is excluded because `lingui extract` reads `packages/app/src` only, so a `t` macro written there reaches no catalog; main's one translated surface, the native menus, goes through `main-i18n.ts`, which looks its labels up by hash against the renderer's compiled catalogs. The object-property branch fires on 20 of main's `dialog.showMessageBox` templates and OTel metric descriptions, and asking for a fix that does not exist is how a rule earns a blanket suppression. Main's four sibling dirs (`preload` / `renderer` / `shared` / `utility`) stay in scope.++The rule does NOT catch:++- **Single-word JSX copy** — `<Button>Save</Button>`. The known cost of the prose test; nothing statically separates `Save` from `Discord`. The backstop is the Simplified-Chinese coverage sweep, where residual English is unmissable against Han script.+- **Object properties outside the six scoped names** — `{ message: 'Server returned…' }`, `{ error: '…' }`, `{ detail: '…' }`. Measured rather than assumed: those three names are dominated by log lines and developer diagnostics (`{ detail: 'copilot is terminal-only; launch via requestTerminalLaunch' }`), so scoping them in would make the rule's first act a demand to translate something no reader ever sees. The user-shown members of that set were wrapped by hand.+- **Module-const strings** — `const TOAST = '…'`. Not a property; a separate shape, and one where a `t` at module scope would be a freeze rather than a fix.+- **A ternary or call in property position** — `{ error: e instanceof Error ? e.message : 'Unknown error' }`. the rule matches the whole node's text, so the value has to *be* a literal; a value that merely *contains* one would also match `{ label: cn('a b') }`.+- **A JSX expression-child string literal** — `<span>{'Loading'}</span>`, or an attribute written `aria-label={'…'}`. The value node opens with `{`, which is what distinguishes a literal from a wrapped macro.+- **Template literals** anywhere, including a toast `description`.+- **The CLI command surface** — `packages/cli/src/**`, deliberately never localized.++**Scope** (`RULE_SCOPES['no-unwrapped-user-facing-string']` in [`scope.mjs`](scope.mjs)). Localization discipline — a shipped hardcoded string is a build-visible defect, not a convention someone has to remember. Scoped to packages/{app,desktop,plugin}/src, `.ts` included: the toast branch's dominant shape is a plain `lib/` helper, not a component. Exemptions: - packages/app/src/editor/** — ProseMirror/CodeMirror-managed views, whose placeholder and title strings are editor affordances rather than chrome copy (matches the no-raw-html-interactive-element exemption). - packages/app/src/components/ui/** — shadcn primitive wrappers; their attribute strings are prop plumbing, not copy. - packages/desktop/src/main/** — the Electron main process. `lingui extract` reads packages/app/src only, so a `t` macro here reaches no catalog; main's one translated surface (the native menus) goes through `main-i18n.ts`, which looks labels up by hash against the renderer's compiled catalogs. Firing on its dialog templates would ask for a fix that does not exist. The other four sibling dirs (preload / renderer / shared / utility) stay in scope. - *.test.ts / *.test.tsx / *.dom.test.tsx — test fixtures aren't user-facing.++Included: `packages/app/src/**/*.ts`, `packages/app/src/**/*.tsx`, `packages/desktop/src/**/*.ts`, `packages/desktop/src/**/*.tsx`, `packages/plugin/src/**/*.ts`, `packages/plugin/src/**/*.tsx`, `lint-plugins/ok-rules/__fixtures__/no-unwrapped-user-facing-string.fixture.tsx`. Excluded: `packages/app/src/editor/**`, `packages/app/src/components/ui/**`, `packages/desktop/src/main/**`, `**/*.test.ts`, `**/*.test.tsx`, `**/*.dom.test.tsx`.++Rule: [`lint-plugins/ok-rules/rules/no-unwrapped-user-facing-string.mjs`](rules/no-unwrapped-user-facing-string.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/no-unwrapped-user-facing-string.fixture.tsx`](__fixtures__/no-unwrapped-user-facing-string.fixture.tsx). Test: [`packages/app/tests/lint-plugins/no-unwrapped-user-facing-string.test.ts`](../../packages/app/tests/lint-plugins/no-unwrapped-user-facing-string.test.ts). See [PRECEDENTS.md #42](../../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the custom-rule convention.++### `no-physical-direction-utility`++Reading-direction discipline. Chrome layout takes its side from the reading direction, never from a hardcoded left or right, so that adding a right-to-left locale is a catalog change rather than a chrome-wide retrofit. The rule flags physical **margin**, **padding**, and **inset** Tailwind utilities — `ml-`/`mr-`, `pl-`/`pr-`, `left-`/`right-` — and asks for `ms-`/`me-`, `ps-`/`pe-`, `start-`/`end-` instead. In a left-to-right locale the two compile to the same used value, so draining the backlog is a visual no-op today and correct later.++**It matches class strings, not stylesheets.** That is where this codebase's physical properties live: the sweep that produced this rule found 148 of them in `className` values against 31 CSS declarations, and 24 of those 31 style the editor or the rendered document rather than the chrome. One `jsx_attribute` branch covers both spellings, because the bound node is the whole initializer clause — a plain `className="ml-2 flex"` and a multi-line `className={cn('…', cond && 'pr-1.5')}` are the same node to the pattern. The name is matched as `*lassName`, so component APIs that forward a second class string (`containerClassName`, `overflowClassName`) are in scope under their own names.++**Two shapes look physical and are not, and both are measured rather than assumed:**++- **`inset-x-*` is already logical.** Tailwind v4 compiles `inset-x-0` to `inset-inline: 0`. It is absent from the pattern for that reason, not as a carve-out.+- **`left-1/2` is the centering anchor.** It exists to be cancelled by the `-translate-x-1/2` beside it, and at 50% the offset is symmetric, so it centers correctly in both directions; `start-1/2` would flip the anchor while the translate kept pulling the same way. The pattern requires a delimiter after a numeric value, which leaves every fractional inset alone — all 10 `left-1/2` sites in the tree carry that translate.++**Scoped** (see the rule's `RULE_SCOPES` entry in [`scope.mjs`](scope.mjs)) to `packages/{app,desktop,plugin}/src/**/*.tsx`. `.tsx` only: the single branch matches a JSX attribute, so a `.ts` glob would be dead scope rather than extra coverage. Exemptions as negative `!`-globs: `!packages/app/src/editor/**` (ProseMirror and CodeMirror own their DOM and take per-string direction from the text rather than from the chrome), `!packages/app/src/components/ui/**` (shadcn primitives are regenerated by `shadcn add`, so an edit there is overwritten on the next pull), and `!**/*.test.tsx` / `!**/*.dom.test.tsx`.++**Pre-rule backlog (ratchet pattern).** The 81 files that pre-date the rule carry a file-level `// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — …` header, same contract as `no-raw-html-interactive-element`: the comment list across the codebase IS the visible backlog, and review treats each header as a backlog marker rather than a free pass. Drain a file by swapping `ml`/`mr` → `ms`/`me`, `pl`/`pr` → `ps`/`pe`, `left`/`right` → `start`/`end`, then deleting the header — the rule starts firing again immediately, so a partial pass that misses one utility fails the gate. 81 of the 292 chrome files in scope carry a header (148 utilities in total), so the rule is live on the other 211 today.++The rule does NOT catch:++- **Class strings outside a class prop** — `{ containerClassName: 'bottom-3 left-3' }` as an object-literal property, or a module-level `const ROW = 'ml-2 flex'`. Five sites in the tree: four object-literal properties in `GraphLegend.tsx`, one const in `editor-tabs-chrome.ts`. A hand fix, not a rule — the name predicate keys on a JSX attribute, and widening it to every string-valued property is the false-positive surface the negative cases below the fixture's group 6 exist to bound.+- **Fractional insets** — `left-1/3` alongside the `left-1/2` the exclusion is aimed at. One site, and separating them costs more regex than it buys.+- **CSS declarations** — `margin-left:` in `globals.css` (25 sites) or inside a `unsafeCSS` template literal (6, all in the file-tree and skill-cluster shadow styles). A `language css` plugin would reach the stylesheet — verified working in Biome 2.4.15 — but not the template literals, and 24 of the 25 stylesheet sites style the editor or the rendered document, surfaces this rule exempts anyway. One chrome site remains: `.tabs-strip-add`.+- **Physical `border-*`, `rounded-*`, and `text-left`/`text-right`** — real direction hazards, outside this rule's margin/padding/inset scope.++**Scope** (`RULE_SCOPES['no-physical-direction-utility']` in [`scope.mjs`](scope.mjs)). Reading-direction discipline. The rule's only branch matches a JSX attribute, so the scope is `.tsx` alone — a `.ts` glob would be dead scope, not extra coverage. Exemptions: - packages/app/src/editor/** — ProseMirror/CodeMirror own their DOM and take per-string direction from the text rather than from the chrome (matches the no-raw-html-interactive-element exemption). - packages/app/src/components/ui/** — shadcn primitives are regenerated by `shadcn add`, so an edit here is overwritten on the next pull. - *.test.tsx / *.dom.test.tsx — fixtures aren't rendered chrome.++Included: `packages/app/src/**/*.tsx`, `packages/desktop/src/**/*.tsx`, `packages/plugin/src/**/*.tsx`, `lint-plugins/ok-rules/__fixtures__/no-physical-direction-utility.fixture.tsx`. Excluded: `packages/app/src/editor/**`, `packages/app/src/components/ui/**`, `**/*.test.tsx`, `**/*.dom.test.tsx`.++Rule: [`lint-plugins/ok-rules/rules/no-physical-direction-utility.mjs`](rules/no-physical-direction-utility.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/no-physical-direction-utility.fixture.tsx`](__fixtures__/no-physical-direction-utility.fixture.tsx). Test: [`packages/app/tests/lint-plugins/no-physical-direction-utility.test.ts`](../../packages/app/tests/lint-plugins/no-physical-direction-utility.test.ts). See [PRECEDENTS.md #42](../../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the custom-rule convention.++### `no-raw-route-hash-construction`++Sole route-hash builder. [`packages/app/src/lib/doc-hash.ts`](../../packages/app/src/lib/doc-hash.ts) owns the `#/` route prefix. Every other file in the app asks it for a hash — `hashFromDocName`, `hashFromFolderPath`, `hashFromAssetPath` or `encodeShareTargetForHash` — rather than joining a name onto the prefix itself.++**Why.** A doc or folder name reaches the router through `window.location.hash`, and the WHATWG fragment percent-encode set does not include `#`, `?` or `%`. A hash built by hand therefore hands those characters to `docNameFromHash` as routing syntax: it reads the text before the first one, so a leading `#` yields null and the app opens a New Tab instead of the document, while a `#` mid-name resolves silently to a truncation. The rule is structural rather than a set of fixes because the prefix is trivially easy to spell, so hand-built copies accumulate faster than they are found, and each one fails silently: the link is still built, it just points somewhere else.++**Scoped** (see the rule's `RULE_SCOPES` entry in [`scope.mjs`](scope.mjs)) to `packages/app/src/**/*.{ts,tsx}`, with `!packages/app/src/lib/doc-hash.ts` (the sanctioned builder) and `!**/*.test.{ts,tsx}` (tests write expected hashes as literals) excluded. `packages/server` builds preview URLs through its own `encodeDocName` and is out of scope.++Reading a hash is untouched: `hash.startsWith('#/')`, `hash === '#/'` and the bare `'#/'` content-root sentinel are comparisons, not constructions, and the fixture pins that they stay legal.++The rule matches a node's own source text, so a comment, JSX text or a regex literal spelling the shape cannot trigger it — the fixture pins all three. The rule does NOT catch: the prefix behind a named constant (`const P = '#/'; P + name`), which needs dataflow and has no occurrence today; `name + '#/'`, the prefix on the right of a concatenation, which does not build a route hash; a helper that takes the prefix as a parameter; and the read side, where [`editor/internal-link-helpers.ts`](../../packages/app/src/editor/internal-link-helpers.ts) still carries a hand-rolled parser — a different rule.++**Scope** (`RULE_SCOPES['no-raw-route-hash-construction']` in [`scope.mjs`](scope.mjs)). Sole route-hash builder. `lib/doc-hash.ts` owns the `#/` prefix; every other file in the app asks it for a hash. Building one by hand emits the doc name unescaped, and the browser leaves `#`, `?` and `%` alone in a fragment, so the parser reads them as routing syntax and the navigation lands somewhere else. Excluded: `lib/doc-hash.ts` itself (the sanctioned site) and tests, which build expected hashes as literals. `packages/server` has its own `encodeDocName` for preview URLs and is out of scope.++Included: `packages/app/src/**/*.ts`, `packages/app/src/**/*.tsx`, `lint-plugins/ok-rules/__fixtures__/no-raw-route-hash-construction.fixture.tsx`. Excluded: `packages/app/src/lib/doc-hash.ts`, `**/*.test.ts`, `**/*.test.tsx`.++Rule: [`lint-plugins/ok-rules/rules/no-raw-route-hash-construction.mjs`](rules/no-raw-route-hash-construction.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/no-raw-route-hash-construction.fixture.tsx`](__fixtures__/no-raw-route-hash-construction.fixture.tsx). Test: [`packages/app/src/lint-plugins/no-raw-route-hash-construction.test.ts`](../../packages/app/src/lint-plugins/no-raw-route-hash-construction.test.ts). See [PRECEDENTS.md #42](../../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the custom-rule convention.++### `no-demoted-dialog-confirm`++Dialog-footer emphasis hierarchy. A confirmation dialog's footer holds two actions, and the confirm has to outrank the dismiss. `secondary` is the one Button variant that draws no border and whose fill is imperceptible: `bg-secondary` sits within roughly 1.1:1 of the dialog surface in both light and dark, so the button reads as flat text rather than an action. `ghost`, `link` and `link-muted` are flat at rest too, so `secondary` is not the only variant that could lose the contest with the `outline` Cancel standing beside it. The rule stays narrow to `secondary` because those three are not plausible footer confirms: `ghost` and `link-muted` are `text-muted-foreground` by definition, and `link` is underline-on-hover text. Nobody reaches for them intending a primary action, so flagging them would report a shape that does not occur rather than an inversion someone authored by accident. Every remaining variant either fills with a contrasting color or draws a border. A footer authored that way inverts the hierarchy: the escape action reads as the primary one, and the actual primary CTA reads as de-emphasized text. The rule flags a `DialogFooter` or `AlertDialogFooter` containing `variant="secondary"` and asks for `default` (or `destructive`, when the action is irreversible removal).++**The typographic treatment comes from the footer, not the variant.** `DialogFooter` and `AlertDialogFooter` carry `[&_button]:` and `[&_[data-slot=button]]:` pairs of `font-mono uppercase`, so every footer action is drawn in the footer's typeface whatever variant it takes. Nothing needs hand-adding at a call site, and a `className="font-mono uppercase"` on a footer button is redundant rather than load-bearing. `default`, `destructive` and `outline-mono` also bake the pair into their variant strings — that is what dresses them outside a footer, so do not delete it on the strength of this paragraph.++**Why two selectors rather than one.** Neither predicate covers every footer shape on its own, so the rule is their union:++| Footer action | `button` element | `[data-slot=button]` |+| --- | --- | --- |+| plain `<Button>` | yes | yes |+| `<Button asChild>` rendering an `<a>` | no | yes |+| `AlertDialogCancel` / `AlertDialogAction` | yes | no |+| `DialogClose asChild` wrapping a `Button` | yes | no |++Radix's `Slot` lets the child's `data-slot` win, so the three wrapper primitives stamp their own slot name and fall out of a slot-only selector; `<Button asChild>` rendering an anchor is not a `<button>` element and falls out of a tag-only one. Keying on both covers all five. Keep the descendant combinator: `ShareBranchSwitchDialog` wraps three footer buttons in a `<div>`, which a child-scoped variant would miss.++Two consequences worth knowing before you fight them:++- **The footer outranks the button.** The compiled rule is `.…\:font-mono button { … }` at specificity `(0,1,1)`; a class on the button itself is `(0,1,0)` and loses, and `tailwind-merge` cannot arbitrate because the two declarations sit on different elements. Opting one footer button out of the treatment therefore needs the important modifier — `font-sans!` / `normal-case!` — not a plain utility.+- **A footer action that is neither a `<button>` nor a `Button` styles itself.** The bare `<a>` in `InstallInClaudeDesktopDialog`'s footer is the one live instance, and it carries its own `font-mono tracking-wide uppercase`. That is deliberate: the footer dresses the design system's buttons, and a hand-rolled action carries its own treatment. Promoting such a link to `<Button asChild>` brings it under the rule.++Historically the two sites this rule was written against had reached for `variant="secondary"` plus a hand-added `className="font-mono uppercase"`, which recovered the footer's typography while leaving the confirm without a perceptible fill. That is what makes the inversion easy to author by accident: the footer still looks like a footer. The canonical shape omits the prop entirely and lets `defaultVariants` supply `default`, matching every other confirm dialog in the tree.++**Matched as one whole JSX element.** The rule visits the footer element and tests its full source text, because a footer holds two or more children and the confirm can sit at any position among them. Testing the whole element text matches the entire node text, so the leading tag name anchors the match to footers themselves rather than to any ancestor that happens to contain one.++**Scoped** (see the rule's `RULE_SCOPES` entry in [`scope.mjs`](scope.mjs)) to `packages/{app,desktop,plugin}/src/**/*.tsx`. `.tsx` only: the single branch matches a JSX element, so a `.ts` glob would be dead scope rather than extra coverage. Exemptions as negative `!`-globs: `!packages/app/src/components/ui/**` (the dialog and button primitives themselves, regenerated by `shadcn add`), and `!**/*.test.tsx` / `!**/*.dom.test.tsx` (a test that renders the demoted shape on purpose is pinning the regression, not shipping it).++The rule does NOT catch:++- **Indirect composition.** A confirm passed into the footer as a prop, or rendered by a shared sub-component, sits outside the footer element's text. The ceiling is deliberate: it keeps the rule to one structural predicate rather than a type-aware analysis.+- **The other direction.** A footer whose dismiss is over-emphasized (a `default` Cancel next to a `default` confirm) is a hierarchy problem this rule has no predicate for, since both buttons carry a fill.+- **Non-footer emphasis inversions.** A `CardFooter` or toolbar pairing a muted primary action with a prominent secondary one. `secondary` outside a dialog footer is a legitimate choice, which is why the scope is the footer element.++Suppress a footer that genuinely wants a muted tertiary control alongside a properly-weighted confirm with an inline `// oxlint-disable-next-line ok/no-demoted-dialog-confirm -- <reason>`.++**Scope** (`RULE_SCOPES['no-demoted-dialog-confirm']` in [`scope.mjs`](scope.mjs)). Dialog-footer emphasis hierarchy. `secondary` is the one Button variant whose fill is low enough in contrast to lose the emphasis contest with the `outline` dismiss standing beside it — a footer authored that way reads with its hierarchy inverted. The rule's only branch matches a JSX element, so the scope is `.tsx` alone; a `.ts` glob would be dead scope, not extra coverage. Exemptions: - packages/app/src/components/ui/** — the dialog and button primitives themselves, regenerated by `shadcn add` (matches the no-physical-direction-utility exemption). - *.test.tsx / *.dom.test.tsx — fixtures aren't rendered chrome, and a test that renders the demoted shape on purpose is pinning the regression, not shipping it.++Included: `packages/app/src/**/*.tsx`, `packages/desktop/src/**/*.tsx`, `packages/plugin/src/**/*.tsx`, `lint-plugins/ok-rules/__fixtures__/no-demoted-dialog-confirm.fixture.tsx`. Excluded: `packages/app/src/components/ui/**`, `**/*.test.tsx`, `**/*.dom.test.tsx`.++Rule: [`lint-plugins/ok-rules/rules/no-demoted-dialog-confirm.mjs`](rules/no-demoted-dialog-confirm.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/no-demoted-dialog-confirm.fixture.tsx`](__fixtures__/no-demoted-dialog-confirm.fixture.tsx). Test: [`packages/app/tests/lint-plugins/no-demoted-dialog-confirm.test.ts`](../../packages/app/tests/lint-plugins/no-demoted-dialog-confirm.test.ts). See [PRECEDENTS.md #42](../../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the custom-rule convention.++## Suppression++Inline `// oxlint-disable-next-line` comments silence individual diagnostics. The form names the plugin, the rule and the reason:++```tsx+// oxlint-disable-next-line ok/<rule-name> -- <reason>+<span>…</span>+```++Two scopes, and the choice between them is meaningful:++- `// oxlint-disable-next-line ok/<rule-name> -- reason` silences the next line. Use it for a genuine one-off exception.+- `// oxlint-disable ok/<rule-name> -- reason` at the top of a file silences the whole file. Use it **only** as a pre-rule backlog marker (see the ratchet contract in the rule's section above), never to opt a new file out.++The `--` separator is required; oxlint reads everything after it as the reason. These replaced biome's `// biome-ignore lint/plugin/<rule>: <reason>` and `// biome-ignore-all` pair, which oxlint does not honour.++Current production suppressions:++| rule | line-level | file-level (backlog) |+| - | - | - |+| `no-physical-direction-utility` | 2 | 78 |+| `no-loosely-typed-webcontents-ipc` | 31 | 0 |+| `no-raw-html-interactive-element` | 0 | 20 |+| `no-unportaled-editor-content` | 7 | 0 |+| `require-windowshide-on-spawn` | 6 | 0 |+| `microcopy-ellipsis` | 2 | 0 |+| `no-unwrapped-user-facing-string` | 1 | 0 |+| `no-hand-rolled-spinner` | 1 | 0 |++Every other rule has zero. The two file-level columns are the visible migration backlogs: 78 files awaiting the logical-property pass, 20 awaiting shadcn migration.++**Where an inline suppression can and cannot sit.** A suppression comment needs a line of its own directly above the reported span, which is a property of the *formatting* rather than of the rule. On a JSX attribute that means the attribute must already be on its own line. A `{/* oxlint-disable-next-line */}` child covers the element that follows it, not a text node that starts after that element.++## Adding a new rule++### 1. Author the rule module++Drop `<rule-name>.mjs` in `rules/`. A rule is an ESLint-shaped visitor object; `context.report({ node, message })` emits the diagnostic:++```js+import { docsUrl } from '../docs.mjs';++const URL = docsUrl('<rule-name>');+const MESSAGE = `<problem>. <fix-noun>. See ${URL}`;++export const ruleName = {+ meta: {+ type: 'problem',+ docs: { description: '<one line>', url: URL },+ },+ create(context) {+ return {+ CallExpression(node) {+ if (!/* matches */ false) return;+ context.report({ node, message: MESSAGE });+ },+ };+ },+};+```++**No prose comments.** Rule modules are `.mjs` and the [no-comments policy](../no-comments/README.md) applies. Rationale goes in this README, in the rule's own section.++**Message shape (load-bearing).** The diagnostic message has three parts in order: (1) the problem statement, (2) the fix-noun naming the action that resolves it, (3) `See <docs-URL>` built by `docsUrl('<rule-name>')` so no message hand-writes the base URL.++### 2. Register the rule++Import it in [`index.mjs`](index.mjs), add it to the `declared` map, then switch it on in [`oxlint.config.ts`](../../oxlint.config.ts) as `'ok/<rule-name>': 'error'`.++A small number of rules are registered from a second plugin instead of this one. If the rule you are adding documents a calibrated measurement, an internal file list, or anything else that should not reach a public clone, do not follow this step as written. That path is documented in a maintainers-only checklist that is not part of this clone; if you cannot reach it, open an issue describing what the rule would enforce and leave the registration to a maintainer rather than guessing at the shape.++### 3. Scope it, if it is not workspace-wide++Add a `RULE_SCOPES['<rule-name>']` entry in [`scope.mjs`](scope.mjs): an array of globs where a leading `!` excludes. A file is in scope when it matches at least one positive glob and no negative one. Include the rule's own fixture path so the fixture test can fire.++Scope lives here rather than in `oxlint.config.ts#overrides` because **oxlint's `overrides[].files` does not honour `!` negation** (measured on oxlint 1.66.0: with the rule `off` at root and an override of `files: ['lint-plugins/ok-rules/__fixtures__/**', '!**/*.fixture.tsx']`, the rule still fired on the excluded fixture — the negative glob did not subtract from the positive one. Re-check this on an oxlint upgrade; if negation lands, this whole scope table becomes revisitable) — a negative glob in that list does not subtract from a positive one, so an override-scoped rule silently fires on its exclusions. Biome's `includes` did honour it, which is why the rules this replaced could scope in config.++### 4. Author the fixture file++Drop `<rule-name>.fixture.tsx` in `__fixtures__/`, pairing positive cases (must fire) with negative cases (must NOT fire), each labelled. Include a boundary negative: the nearest shape the rule must NOT match. The directory is in `oxlint.config.ts#ignorePatterns` so the deliberately-bad content does not break the main lint; `__fixtures__/oxlint.fixtures.json` re-enables every rule for the tests.++### 5. Author the fixture-file test++Shell out to oxlint against the fixture config and assert an exact count:++```ts+import { spawnSync } from 'node:child_process';+import { join } from 'node:path';+import { describe, expect, test } from 'vitest';++const REPO_ROOT = join(__dirname, '..', '..', '..', '..');+const FIXTURE = 'lint-plugins/ok-rules/__fixtures__/<rule-name>.fixture.tsx';+const CONFIG = 'lint-plugins/ok-rules/__fixtures__/oxlint.fixtures.json';++describe('<rule-name> oxlint rule', () => {+ test('fires on exactly N positive cases (and on no negative case)', () => {+ const result = spawnSync('pnpm', ['exec', 'oxlint', '-c', CONFIG, FIXTURE], {+ cwd: REPO_ROOT,+ encoding: 'utf-8',+ });+ expect(result.error).toBeUndefined();+ expect(result.status).not.toBe(0);+ const output = `${result.stdout}\n${result.stderr}`;+ expect((output.match(/ok\(<rule-name>\)/g) ?? []).length).toBe(N);+ expect(output).toContain('<fix-noun>');+ expect(output).toMatch(/https?:\/\/[^\s]+/);+ expect(output).toContain('lint-plugins/ok-rules/README.md#<rule-name>');+ });+});+```++Exact equality is the point: it catches false-negative regressions (count drops below N) and false-positive widenings (count rises above N) alike.++### 6. Verify++```bash+# 1. Rule loads and the main lint stays clean:+pnpm run lint:oxlint++# 2. Fixture test fires the diagnostic on positive cases:+pnpm --dir packages/<host> exec vitest run <rule-name>++# 3. Mutation check (manual, one-time during dev):+# Temporarily break the rule's predicate; re-run the test; confirm it FAILS;+# restore it; re-run; confirm it passes.++# 4. False-positive widening check (manual, one-time):+# Add a positive case to the fixture WITHOUT bumping N in the test.+# Re-run; confirm it FAILS. This verifies toBe(N) is load-bearing.+```++### 7. Document the rule in this README++Add a `### \`<rule-name>\`` section: what it catches, what it deliberately does NOT catch, the `**Scope**` note if it is scoped, and the Rule / Fixture / Test links. The anchor must match `docsUrl('<rule-name>')`, i.e. `#<rule-name>`, because the fixture test asserts the message links here.++## Out of scope++- **Autofix.** oxlint JS-plugin diagnostics are diagnostic-only here; these rules name the fix rather than applying it. If autofix is required, a different enforcement mechanism is needed.+- **Type-aware discrimination.** These rules run on the untyped AST. Where the type system carries the discriminating signal, precedent #42's decision tree routes to a TypeScript Language Service plugin instead.+- **CLI string content.** `process.stderr.write('...')` / `console.log` template-literal content is not reliably matchable and is left to review discipline.++## References++- [oxlint custom JS plugins](https://oxc.rs/docs/guide/usage/linter/plugins.html)+- [PRECEDENTS.md #42](../../PRECEDENTS.md#custom-lint-enforcement-precedent-42) — the custom-lint-enforcement convention+- [`lint-plugins/no-comments/README.md`](../no-comments/README.md) — the sibling oxlint plugin and the comment policy that governs these modulesdiff --git a/biome-plugins/__fixtures__/class-proof-registration-discipline.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/class-proof-registration-discipline.fixture.tsxsimilarity index 71%rename from biome-plugins/__fixtures__/class-proof-registration-discipline.fixture.tsxrename to lint-plugins/ok-rules/__fixtures__/class-proof-registration-discipline.fixture.tsxindex 1003c9692..4c58a1031 100644--- a/biome-plugins/__fixtures__/class-proof-registration-discipline.fixture.tsx+++ b/lint-plugins/ok-rules/__fixtures__/class-proof-registration-discipline.fixture.tsx@@ -1,13 +1,14 @@// FIXTURE — drives `class-proof-registration-discipline.test.ts` via-// shell-out to `pnpm exec biome check`. Not part of the main lint (override-// scope keeps the rule off this fixture's path under normal `pnpm run lint`;-// the test explicitly invokes biome on this file path).+// shell-out to `pnpm exec oxlint`. Not part of the main lint: `__fixtures__/`+// is in `oxlint.config.ts#ignorePatterns`, and+// `__fixtures__/oxlint.fixtures.json` re-enables the rules for the test.//-// GritQL's `or { ... }` is short-circuit: when a call matches the first-// branch (Pattern A: missing predicate/proof), the second branch (Pattern-// B: any defineClassProof) is NOT also considered. Missing-args calls-// therefore get the more-specific Pattern A diagnostic; well-formed calls-// outside the canonical dir get Pattern B's diagnostic.+// The rule's two arms short-circuit: when a call matches the first+// branch (Pattern A: missing predicate/proof), the visitor reports and+// returns, so the second branch (Pattern B: any defineClassProof) is+// never reached. Missing-args calls therefore get the more-specific+// Pattern A diagnostic; well-formed calls outside the canonical dir get+// Pattern B's diagnostic.//// 3 expected diagnostic fires (one per violating call):// - Positive A1: missing predicate (1 fire — Pattern A diagnostic)@@ -19,18 +20,15 @@// Exact-equality (`toBe(3)`) catches both false-negative regressions (drop// below 3) and false-positive widenings (above 3).-// biome-ignore lint/correctness/noExplicitAny: fixture-only — production types unimportant heredeclare const defineClassProof: any;-// biome-ignore lint/correctness/noExplicitAny: fixture-only — production types unimportant heredeclare const enumerateThings: any;-// biome-ignore lint/correctness/noExplicitAny: fixture-only — production types unimportant heredeclare const someOtherFunction: any;// === Positive cases — must fire ===// (A1) Missing `predicate` field — Pattern A's missing-args diagnostic-// wins over Pattern B's outside-canonical diagnostic via `or`'s-// short-circuit. Total: 1 diagnostic.+// wins over Pattern B's outside-canonical diagnostic: the rule returns+// after reporting Pattern A. Total: 1 diagnostic.export const badProofMissingPredicate = defineClassProof('cp-bad-1', {enumerate: enumerateThings,proof: () => ({ pass: true }),diff --git a/biome-plugins/__fixtures__/cst-pm-handler-todo-stub.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/cst-pm-handler-todo-stub.fixture.tsxsimilarity index 84%rename from biome-plugins/__fixtures__/cst-pm-handler-todo-stub.fixture.tsxrename to lint-plugins/ok-rules/__fixtures__/cst-pm-handler-todo-stub.fixture.tsxindex 2e68cc524..4fe209fa6 100644--- a/biome-plugins/__fixtures__/cst-pm-handler-todo-stub.fixture.tsx+++ b/lint-plugins/ok-rules/__fixtures__/cst-pm-handler-todo-stub.fixture.tsx@@ -1,9 +1,8 @@-// FIXTURE - drives `cst-pm-handler-todo-stub.test.ts` via shell-out-// to `pnpm exec biome check`. Not part of the main lint (override scope keeps-// the rule off this fixture's path under normal `pnpm run lint`; the test-// explicitly invokes biome on this file path).+// FIXTURE — drives `cst-pm-handler-todo-stub.test.ts` via shell-out+// to `pnpm exec oxlint`. Not part of the main lint: `__fixtures__/` is in `oxlint.config.ts#ignorePatterns`,+// and `__fixtures__/oxlint.fixtures.json` re-enables the rules for the test.//-// 4 positive cases (deliberate codemod-stub bodies — plugin must fire) ++// 4 positive cases (deliberate codemod-stub bodies — rule must fire) +// 4 negative cases (filled-in bodies + non-handler error throws that must// NOT fire). Exact-equality (`toBe(4)`) in the test catches both// false-negative regressions (drop below 4) and false-positive widenings@@ -25,9 +24,8 @@ export function handleParagraph(_node: unknown): unknown {}// (2) Double-quoted message — the codemod's emitted shape verbatim.-// biome-ignore lint/style/useSingleQuote: fixture covers both quote stylesexport function handleHeading(_node: unknown): unknown {- throw new Error("TODO: implement micromark-event-fold:mdast-to-pm/heading");+ throw new Error('TODO: implement micromark-event-fold:mdast-to-pm/heading');}// (3) Template-literal message — the third quote style; still a TODO stub.diff --git a/biome-plugins/__fixtures__/microcopy-ellipsis.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/microcopy-ellipsis.fixture.tsxsimilarity index 66%rename from biome-plugins/__fixtures__/microcopy-ellipsis.fixture.tsxrename to lint-plugins/ok-rules/__fixtures__/microcopy-ellipsis.fixture.tsxindex b6a3a4ec7..50507581d 100644--- a/biome-plugins/__fixtures__/microcopy-ellipsis.fixture.tsx+++ b/lint-plugins/ok-rules/__fixtures__/microcopy-ellipsis.fixture.tsx@@ -1,11 +1,13 @@-// FIXTURE — drives `microcopy-ellipsis.test.ts` via shell-out to `biome check`.+// FIXTURE — drives `microcopy-ellipsis.test.ts` via shell-out to `pnpm exec oxlint`. Not part+// of the main lint: `__fixtures__/` is in `oxlint.config.ts#ignorePatterns`,+// and `__fixtures__/oxlint.fixtures.json` re-enables the rules for the test.//-// Two positive cases (deliberate `…` in customer-facing strings — plugin+// Two positive cases (deliberate `…` in customer-facing strings — rule// must fire) and three negative cases (no `…`, or `…` in a non-UI-// attribute — plugin must NOT fire).+// attribute — rule must NOT fire).//-// If you add a new pattern to `microcopy-ellipsis.grit`, add a matching-// positive case here and bump the test's floor.+// If you add a new pattern to `rules/microcopy-ellipsis.mjs`, add a matching+// positive case here and raise the test's exact count.export function PositiveJsxText() {return <span>Loading…</span>;@@ -25,7 +27,7 @@ export function NegativeCleanAttribute() {// Boundary negative — `data-raw` is NOT in the rule's UI-attribute filter// list (placeholder | label | title | aria-label | description | tooltip).-// Plugin must NOT fire even though the value contains …. If a future change+// The rule must NOT fire even though the value contains …. If a future change// removes the attribute-name filter, this case raises the count above 2 and// `toBe(2)` catches the regression.export function NegativeNonUiAttribute() {diff --git a/lint-plugins/ok-rules/__fixtures__/no-blind-agent-host-fanout.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/no-blind-agent-host-fanout.fixture.tsxnew file mode 100644index 000000000..9cb98b2f4--- /dev/null+++ b/lint-plugins/ok-rules/__fixtures__/no-blind-agent-host-fanout.fixture.tsx@@ -0,0 +1,56 @@+// FIXTURE — drives `no-blind-agent-host-fanout.test.ts` via shell-out to `pnpm exec oxlint`. Not part+// of the main lint: `__fixtures__/` is in `oxlint.config.ts#ignorePatterns`,+// and `__fixtures__/oxlint.fixtures.json` re-enables the rules for the test.+//+// Pairs 5 positive cases (the `skills` CLI npm specs OK used to shell out to,+// plus the bare `--agent` argv token whose `'*'` value caused issue #820 —+// rule MUST fire) with negative cases (an unrelated `'skills'` word, a+// similarly-spelled flag, a comment mention, a template literal, and a+// concatenation — rule must NOT fire). The fixture-file test asserts the+// diagnostic count with exact equality (`toBe(5)`) so both a weakened pattern+// (drops below 5) and a widened pattern that catches a negative (rises above 5)+// fail the gate.+//+// The template-literal and concatenation negatives are the honest precision+// boundary: the rule matches the string-literal node, so a spec assembled at+// runtime slips through. That is a defeatable-on-purpose escape, not an+// accidental reintroduction — the behavioural backstop is the filesystem+// assertion in `packages/server/src/skill-install.test.ts` ("never creates a+// dotdir for a host that is not installed").+//+// Deliberately NOT linted by the main `pnpm lint` pass (`__fixtures__/` is in+// `oxlint.config.ts#ignorePatterns`); `__fixtures__/oxlint.fixtures.json`+// re-enables the rules for the fixture-file test.+declare const range: string;+declare function spawn(cmd: string, args: readonly string[]): void;++function positives() {+ // P1-P4: every npm spec shape for the `skills` CLI OK used to fetch-and-exec.+ spawn('npx', ['-y', 'skills@~1.5.0', 'add', '.']);+ spawn('npx', ['-y', 'skills@^1.5.0', 'add', '.']);+ spawn('npx', ['-y', '[email protected]', 'add', '.']);+ spawn('npx', ['-y', 'skills@latest', 'add', '.']);+ // P5: the flag itself — the incident was its `'*'` value, but the flag only+ // exists to address that CLI, so the token is the reintroduction signal.+ spawn('npx', ['add', '.', '--agent', '*']);+}++function negatives() {+ // N1: the bare word, unrelated to the npm spec.+ spawn('ok', ['skills', 'list']);+ // N2-N3: similarly-spelled flags that are not the banned token.+ spawn('ok', ['--agents', 'claude']);+ spawn('ok', ['--agent-id', 'abc']);+ // N4: a comment mentioning `npx skills@~1.5.0 add --agent '*'` — this rule+ // visits string-literal nodes only, never comments, so prose describing the+ // old invocation (as the real module's docstring does) must stay silent.+ // Comments are reachable from a rule, just not through node visitors:+ // `no-comments/plugin.mjs` re-lexes `context.sourceCode.text` to find them.+ spawn('ok', ['repair-skills']);+ // N5: interpolation — no single node holds the whole value.+ spawn('npx', [`skills@${range}`, 'add', '.']);+ // N6: concatenation — likewise.+ spawn('npx', [`skills@${''}${range}`, 'add', '.']);+}++export { negatives, positives };diff --git a/biome-plugins/__fixtures__/no-demoted-dialog-confirm.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/no-demoted-dialog-confirm.fixture.tsxsimilarity index 89%rename from biome-plugins/__fixtures__/no-demoted-dialog-confirm.fixture.tsxrename to lint-plugins/ok-rules/__fixtures__/no-demoted-dialog-confirm.fixture.tsxindex 012686d16..1b307d8f7 100644--- a/biome-plugins/__fixtures__/no-demoted-dialog-confirm.fixture.tsx+++ b/lint-plugins/ok-rules/__fixtures__/no-demoted-dialog-confirm.fixture.tsx@@ -1,8 +1,9 @@// FIXTURE — drives `no-demoted-dialog-confirm.test.ts` via shell-out to-// `biome check`. Not part of the main lint (lives outside the lint-// command's path list).+// `pnpm exec oxlint`. Not part of the main lint: `__fixtures__/` is in+// `oxlint.config.ts#ignorePatterns`, and `__fixtures__/oxlint.fixtures.json`+// re-enables the rules for the test.//-// Three positive cases (deliberate violations — plugin must fire) + four+// Three positive cases (deliberate violations — rule must fire) + four// negative cases (clean usage that must NOT fire). Exact-equality// (`toBe(3)`) in the test catches both false-negative regressions (drop// below 3) and false-positive widenings (above 3).@@ -110,7 +111,7 @@ export function Negative3() {// hatch the diagnostic names.export function Negative4() {return (- // biome-ignore lint/plugin/no-demoted-dialog-confirm: tertiary control beside a correctly-weighted confirm+ // oxlint-disable-next-line ok/no-demoted-dialog-confirm -- tertiary control beside a correctly-weighted confirm<DialogFooter><Button variant="secondary" onClick={close}>Remind me laterdiff --git a/lint-plugins/ok-rules/__fixtures__/no-hand-rolled-spinner.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/no-hand-rolled-spinner.fixture.tsxnew file mode 100644index 000000000..67919efd2--- /dev/null+++ b/lint-plugins/ok-rules/__fixtures__/no-hand-rolled-spinner.fixture.tsx@@ -0,0 +1,90 @@+// FIXTURE — drives `no-hand-rolled-spinner.test.ts` via shell-out to+// `pnpm exec oxlint`. Not part of the main lint: `__fixtures__/` is in+// `oxlint.config.ts#ignorePatterns`, and `__fixtures__/oxlint.fixtures.json`+// re-enables the rules for the test.+//+// 5 positive cases (hand-rolled spins — rule MUST fire) paired with 5 negative+// cases (rule must NOT fire). The test asserts exact equality (`toBe(5)`) so a+// weakened predicate drops below 5 and a widened one rises above it.+//+// The boundary cases are the point. `animate-spinner` does NOT fire because the+// trailing `\b` fails against a word character, but `animate-spin-slow` DOES:+// `-` is a word boundary, so the delimiter admits suffixed variants. That is the+// retired GritQL pattern's behaviour too, carried over deliberately — a slowed+// spin is still a hand-rolled one — and it is pinned here because the two look+// symmetric and are not. `data-anim` pins that the attribute-name filter is+// load-bearing: the rule keys on `className` and every `*ClassName` prop, not on+// any attribute containing the token.++declare const cn: (...parts: unknown[]) => string;+declare const isBusy: boolean;+declare const Spinner: (props: Record<string, unknown>) => unknown;+declare const RefreshCw: (props: Record<string, unknown>) => unknown;++// === Positive cases — must fire ===++// (1) Plain string className.+export function PositiveBareClass() {+ return <div className="size-4 animate-spin" />;+}++// (2) Inside a cn() call — the whole initializer is the matched node.+export function PositiveInCn() {+ return <div className={cn('size-4', isBusy && 'animate-spin')} />;+}++// (3) A `*ClassName` prop, not just `className`.+export function PositiveSuffixedProp() {+ return <Spinner iconClassName="animate-spin text-muted-foreground" />;+}++// (4) A suffixed variant: `-` is a word boundary, so this fires like the bare+// utility does. Slowing a hand-rolled spin does not make it a `Spinner`.+export function PositiveSuffixedVariant() {+ return <div className="animate-spin-slow" />;+}++// (5) The wrapped authoring shape as it appears in production. It is NOT a+// boundary pin: it shares case (2)'s AST shape (a JSXExpressionContainer+// wrapping `cn()`), the token sits entirely on one physical line, and the+// predicate reads `sourceCode.getText` of the whole value node, so no+// mutation of the rule separates the two. It is here as a realism sample+// -- the shape a reader will actually meet -- and it costs `toBe(5)`+// nothing.+export function PositiveMultiline() {+ return (+ <RefreshCw+ className={cn(+ 'size-3.5 shrink-0',+ isBusy && 'animate-spin',+ )}+ />+ );+}++// === Negative cases — must NOT fire ===++// (1) The sanctioned primitive, which owns the spin internally.+export function NegativeSpinnerPrimitive() {+ return <Spinner icon={RefreshCw} aria-hidden="true" />;+}++// (2) A longer token that starts with the same prefix.+export function NegativeLongerToken() {+ return <div className="animate-spinner" />;+}++// (3) A non-class attribute carrying the token: the attribute-name filter holds.+export function NegativeNonClassAttribute() {+ return <div data-anim="animate-spin" />;+}++// (4) An unrelated animation utility.+export function NegativeOtherAnimation() {+ return <div className="animate-pulse rounded-md" />;+}++// (5) The token in prose, not in a class position.+export function NegativeProseMention() {+ return <span title="uses animate-spin under the hood">docs</span>;+}diff --git a/biome-plugins/__fixtures__/no-inline-tolerance-class.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/no-inline-tolerance-class.fixture.tsxsimilarity index 60%rename from biome-plugins/__fixtures__/no-inline-tolerance-class.fixture.tsxrename to lint-plugins/ok-rules/__fixtures__/no-inline-tolerance-class.fixture.tsxindex 195f28b31..dc3498d73 100644--- a/biome-plugins/__fixtures__/no-inline-tolerance-class.fixture.tsx+++ b/lint-plugins/ok-rules/__fixtures__/no-inline-tolerance-class.fixture.tsx@@ -1,27 +1,26 @@-/**- * Fixture for `no-inline-tolerance-class.grit`.- *- * Pairs 8 positive cases (a bridge normalization-class value- * written inline as a string literal — plugin MUST fire) with negative cases- * (the four universal text-encoding classes used as legitimate inline literals,- * a class name appearing only as a SUBSTRING of test-title / docName prose, a- * comment mention, a concatenation, and a non-catalog literal — plugin must NOT- * fire). The fixture-file test asserts the diagnostic count with exact equality- * (`toBe(8)`) so both a weakened pattern (drops below 8) and a widened pattern- * that catches a negative (rises above 8) fail the gate.- *- * The universal-encoding negatives (`crlf`, `bom`, `trailing-whitespace`,- * `trailing-newline`) are the load-bearing precision boundary: they are real- * `BRIDGE_TOLERANCE_CLASSES` members, yet they are deliberately NOT flagged- * because the public floor telemetry runtime surfaces them and public tests- * legitimately assert that behavior. Flagging them would redden those floor- * tests; the fixture pins that they stay silent.- *- * Deliberately NOT linted by the main `pnpm run lint` pass (biome-plugins/ is- * outside the lint paths); only the scoped override in biome.jsonc reaches it,- * via the fixture-file test.- */-+// FIXTURE — drives `no-inline-tolerance-class.test.ts` via shell-out to `pnpm exec oxlint`. Not part+// of the main lint: `__fixtures__/` is in `oxlint.config.ts#ignorePatterns`,+// and `__fixtures__/oxlint.fixtures.json` re-enables the rules for the test.+//+// Pairs 8 positive cases (a bridge normalization-class value+// written inline as a string literal — rule MUST fire) with negative cases+// (the four universal text-encoding classes used as legitimate inline literals,+// a class name appearing only as a SUBSTRING of test-title / docName prose, a+// comment mention, a concatenation, and a non-catalog literal — rule must NOT+// fire). The fixture-file test asserts the diagnostic count with exact equality+// (`toBe(8)`) so both a weakened pattern (drops below 8) and a widened pattern+// that catches a negative (rises above 8) fail the gate.+//+// The universal-encoding negatives (`crlf`, `bom`, `trailing-whitespace`,+// `trailing-newline`) are the load-bearing precision boundary: they are real+// `BRIDGE_TOLERANCE_CLASSES` members, yet they are deliberately NOT flagged+// because the public floor telemetry runtime surfaces them and public tests+// legitimately assert that behavior. Flagging them would redden those floor+// tests; the fixture pins that they stay silent.+//+// Deliberately NOT linted by the main `pnpm run lint` pass (`__fixtures__/` is in+// `oxlint.config.ts#ignorePatterns`); `__fixtures__/oxlint.fixtures.json`+// re-enables the rules for the fixture-file test.declare const expect: (v: unknown) => { toBe: (v: unknown) => void };declare const applied: string;declare const cls: string;diff --git a/biome-plugins/__fixtures__/no-loosely-typed-webcontents-ipc.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/no-loosely-typed-webcontents-ipc.fixture.tsxsimilarity index 80%rename from biome-plugins/__fixtures__/no-loosely-typed-webcontents-ipc.fixture.tsxrename to lint-plugins/ok-rules/__fixtures__/no-loosely-typed-webcontents-ipc.fixture.tsxindex b4dd75913..cd8c0cb84 100644--- a/biome-plugins/__fixtures__/no-loosely-typed-webcontents-ipc.fixture.tsx+++ b/lint-plugins/ok-rules/__fixtures__/no-loosely-typed-webcontents-ipc.fixture.tsx@@ -1,9 +1,10 @@// FIXTURE — drives `no-loosely-typed-webcontents-ipc.test.ts` via shell-out-// to `biome check`. Not part of the main lint (lives outside the lint-// command's path list).+// to `pnpm exec oxlint`. Not part of the main lint: `__fixtures__/` is in+// `oxlint.config.ts#ignorePatterns`, and `__fixtures__/oxlint.fixtures.json`+// re-enables the rules for the test.//-// Six positive cases (deliberate violations — plugin must fire) + four-// negative cases (clean usage on the same objects — plugin must NOT fire).+// Six positive cases (deliberate violations — rule must fire) + four+// negative cases (clean usage on the same objects — rule must NOT fire).// Exact-equality (`toBe(6)`) in the test catches both false-negative// regressions (drop below 6) and false-positive widenings (above 6).@@ -23,7 +24,7 @@ ipcRenderer.on('ok:test-channel', () => {});ipcRenderer.once('ok:test-channel', () => {});// === Negative cases — adjacent method calls on the same objects ===-// These exercise the precision of the .grit pattern. If a future widening+// These exercise the precision of the rule. If a future widening// matches any of these, the diagnostic count rises above 6 and `toBe(6)`// catches the regression.diff --git a/biome-plugins/__fixtures__/no-physical-direction-utility.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/no-physical-direction-utility.fixture.tsxsimilarity index 94%rename from biome-plugins/__fixtures__/no-physical-direction-utility.fixture.tsxrename to lint-plugins/ok-rules/__fixtures__/no-physical-direction-utility.fixture.tsxindex 2b86d1d63..eaab09f36 100644--- a/biome-plugins/__fixtures__/no-physical-direction-utility.fixture.tsx+++ b/lint-plugins/ok-rules/__fixtures__/no-physical-direction-utility.fixture.tsx@@ -1,8 +1,9 @@// FIXTURE — drives `no-physical-direction-utility.test.ts` via shell-out to-// `biome check`. Not part of the main lint (lives outside the lint command's-// path list).+// `pnpm exec oxlint`. Not part of the main lint: `__fixtures__/` is in+// `oxlint.config.ts#ignorePatterns`, and `__fixtures__/oxlint.fixtures.json`+// re-enables the rules for the test.//-// Positive cases (deliberate violations — plugin must fire) paired with+// Positive cases (deliberate violations — rule must fire) paired with// negative cases: the logical forms the rule asks for, plus the physical-looking// shapes that are direction-correct already and must stay silent. Exact-equality// `toBe(N)` in the test catches both a weakened pattern (count drops) and adiff --git a/biome-plugins/__fixtures__/no-raw-html-interactive-element.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/no-raw-html-interactive-element.fixture.tsxsimilarity index 78%rename from biome-plugins/__fixtures__/no-raw-html-interactive-element.fixture.tsxrename to lint-plugins/ok-rules/__fixtures__/no-raw-html-interactive-element.fixture.tsxindex b3bf0a160..ef03c7466 100644--- a/biome-plugins/__fixtures__/no-raw-html-interactive-element.fixture.tsx+++ b/lint-plugins/ok-rules/__fixtures__/no-raw-html-interactive-element.fixture.tsx@@ -1,23 +1,18 @@// FIXTURE — drives `no-raw-html-interactive-element.test.ts` via shell-out-// to `biome check`. Not part of the main lint (lives outside the lint-// command's path list).+// to `pnpm exec oxlint`. Not part of the main lint: `__fixtures__/` is in+// `oxlint.config.ts#ignorePatterns`, and `__fixtures__/oxlint.fixtures.json`+// re-enables the rules for the test.//-// Eight positive cases (deliberate violations — plugin must fire) + five+// Eight positive cases (deliberate violations — rule must fire) + five// negative cases (clean usage that must NOT fire). Exact-equality// (`toBe(8)`) in the test catches both false-negative regressions (drop// below 8) and false-positive widenings (above 8).-// biome-ignore lint/correctness/noExplicitAny: fixture-only — production types unimportant heredeclare const Button: any;-// biome-ignore lint/correctness/noExplicitAny: fixture-only — production types unimportant heredeclare const Input: any;-// biome-ignore lint/correctness/noExplicitAny: fixture-only — production types unimportant heredeclare const Textarea: any;-// biome-ignore lint/correctness/noExplicitAny: fixture-only — production types unimportant heredeclare const Select: any;-// biome-ignore lint/correctness/noExplicitAny: fixture-only — production types unimportant heredeclare const ButtonGroup: any;-// biome-ignore lint/correctness/noExplicitAny: fixture-only — production types unimportant heredeclare const InputGroup: any;// === Positive cases — must fire ===diff --git a/biome-plugins/__fixtures__/no-raw-route-hash-construction.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/no-raw-route-hash-construction.fixture.tsxsimilarity index 69%rename from biome-plugins/__fixtures__/no-raw-route-hash-construction.fixture.tsxrename to lint-plugins/ok-rules/__fixtures__/no-raw-route-hash-construction.fixture.tsxindex b2c2a6fb7..4298678fe 100644--- a/biome-plugins/__fixtures__/no-raw-route-hash-construction.fixture.tsx+++ b/lint-plugins/ok-rules/__fixtures__/no-raw-route-hash-construction.fixture.tsx@@ -1,13 +1,13 @@-/**- * Fixture for `no-raw-route-hash-construction`.- *- * 5 positives, then the negatives the rule must leave alone. The negatives- * carry the weight here: the guard this replaced was a hand-rolled lexer that- * went blind after a regex literal, so a comment and a string spelling the- * offending shape are pinned explicitly.- *- * Comment spelling the shape, which must NOT fire: `#/${docName}`- */+// FIXTURE — drives `no-raw-route-hash-construction.test.ts` via shell-out to `pnpm exec oxlint`. Not part+// of the main lint: `__fixtures__/` is in `oxlint.config.ts#ignorePatterns`,+// and `__fixtures__/oxlint.fixtures.json` re-enables the rules for the test.+//+// 5 positives, then the negatives the rule must leave alone. The negatives+// carry the weight here: the guard this replaced was a hand-rolled lexer that+// went blind after a regex literal, so a comment and a string spelling the+// offending shape are pinned explicitly.+//+// Comment spelling the shape, which must NOT fire: `#/${docName}`declare const docName: string;declare const folderPath: string;declare const BASE: string;@@ -20,7 +20,7 @@ export const p1 = `#/${docName}`;export const p2 = '#/' + docName;// POSITIVE 3 — double-quoted concatenation.-export const p3 = "#/" + folderPath;+export const p3 = '#/' + folderPath;// POSITIVE 4 — the prefix reached later in a template.export const p4 = `${BASE}#/${docName}`;diff --git a/biome-plugins/__fixtures__/no-resolved-value-theme-source.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/no-resolved-value-theme-source.fixture.tsxsimilarity index 85%rename from biome-plugins/__fixtures__/no-resolved-value-theme-source.fixture.tsxrename to lint-plugins/ok-rules/__fixtures__/no-resolved-value-theme-source.fixture.tsxindex 368b6d87c..ad143dc7e 100644--- a/biome-plugins/__fixtures__/no-resolved-value-theme-source.fixture.tsx+++ b/lint-plugins/ok-rules/__fixtures__/no-resolved-value-theme-source.fixture.tsx@@ -1,7 +1,7 @@// FIXTURE — drives `no-resolved-value-theme-source.test.ts` via shell-out-// to `pnpm exec biome check`. Excluded from `pnpm run lint` because the lint-// command lists `packages docs *.json *.jsonc *.ts` — `biome-plugins/`-// isn't reached.+// to `pnpm exec oxlint`. Excluded from `pnpm run lint` because `__fixtures__/`+// is in `oxlint.config.ts#ignorePatterns`; `__fixtures__/oxlint.fixtures.json`+// re-enables the rules for the test.//// Three positive cases (deliberate 1-way-contract violations) + four// negative cases (clean usage; must NOT fire). The test asserts the@@ -18,9 +18,7 @@ declare const themeValue: OkThemeSource;declare const merged: { appearance: { theme: OkThemeSource } };// Positive 1: matchMedia inside the argument-bridge.setThemeSource(- matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light',-);+bridge.setThemeSource(matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');// Positive 2: ternary resolving to dark/light literalsokDesktop.setThemeSource(prefersDark ? 'dark' : 'light');diff --git a/biome-plugins/__fixtures__/no-roundtrip-identity-oracle.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/no-roundtrip-identity-oracle.fixture.tsxsimilarity index 74%rename from biome-plugins/__fixtures__/no-roundtrip-identity-oracle.fixture.tsxrename to lint-plugins/ok-rules/__fixtures__/no-roundtrip-identity-oracle.fixture.tsxindex 82ef4d9cd..6d4e617d5 100644--- a/biome-plugins/__fixtures__/no-roundtrip-identity-oracle.fixture.tsx+++ b/lint-plugins/ok-rules/__fixtures__/no-roundtrip-identity-oracle.fixture.tsx@@ -1,19 +1,18 @@-/**- * Fixture for `no-roundtrip-identity-oracle.grit`.- *- * Pairs 10 positive cases (the byte-fidelity round-trip identity oracle —- * plugin MUST fire) with 7 negative cases (contract assertions, the- * Bridge-invariant comparator, the `!==` normalizing-construct detector, the- * helper-wrapped and two-statement round-trip forms — plugin must NOT fire).- * The fixture-file test asserts the diagnostic count with exact equality- * (`toBe(10)`) so both a weakened pattern (drops below 10) and a widened- * pattern that catches a negative (rises above 10) fail the gate.- *- * Deliberately NOT linted by the main `pnpm run lint` pass (biome-plugins/ is- * outside the lint paths); only the scoped override in biome.jsonc reaches it,- * via the fixture-file test.- */-+// FIXTURE — drives `no-roundtrip-identity-oracle.test.ts` via shell-out to `pnpm exec oxlint`. Not part+// of the main lint: `__fixtures__/` is in `oxlint.config.ts#ignorePatterns`,+// and `__fixtures__/oxlint.fixtures.json` re-enables the rules for the test.+//+// Pairs 10 positive cases (the byte-fidelity round-trip identity oracle —+// rule MUST fire) with 7 negative cases (contract assertions, the+// Bridge-invariant comparator, the `!==` normalizing-construct detector, the+// helper-wrapped and two-statement round-trip forms — rule must NOT fire).+// The fixture-file test asserts the diagnostic count with exact equality+// (`toBe(10)`) so both a weakened pattern (drops below 10) and a widened+// pattern that catches a negative (rises above 10) fail the gate.+//+// Deliberately NOT linted by the main `pnpm run lint` pass (`__fixtures__/` is in+// `oxlint.config.ts#ignorePatterns`); `__fixtures__/oxlint.fixtures.json`+// re-enables the rules for the fixture-file test.declare const expect: (v: unknown) => {toBe: (v: unknown) => void;toEqual: (v: unknown) => void;@@ -64,7 +63,7 @@ function negatives() {// used to find constructs the serializer rewrites. Different operator.const normalizes = serialize(parse(md)) !== md;// two-statement round-trip — the round-trip flows through an intermediate- // variable; GritQL cannot correlate the parse input with the matcher value+ // variable; the rule cannot correlate the parse input with the matcher value// across statements.const out = serialize(parse(md));expect(out).toBe(md);diff --git a/biome-plugins/__fixtures__/no-split-suggestion-dispatch.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/no-split-suggestion-dispatch.fixture.tsxsimilarity index 69%rename from biome-plugins/__fixtures__/no-split-suggestion-dispatch.fixture.tsxrename to lint-plugins/ok-rules/__fixtures__/no-split-suggestion-dispatch.fixture.tsxindex 47f58015d..8b23cb76c 100644--- a/biome-plugins/__fixtures__/no-split-suggestion-dispatch.fixture.tsx+++ b/lint-plugins/ok-rules/__fixtures__/no-split-suggestion-dispatch.fixture.tsx@@ -1,25 +1,24 @@-/**- * Fixture for `no-split-suggestion-dispatch.grit` (precedent #58).- *- * 3 positive cases (MUST each fire exactly once):- * P1 — bare trigger-delete chain dispatch inside a Suggestion config- * (`.focus().deleteRange(range).run()` — the pre-fix slash-command shape).- * P2 — bare delete chain without `.focus()` (`.deleteRange(range).run()`).- * P3 — `commands.deleteRange(range)` immediate dispatch inside a Suggestion- * config.- *- * 4 negative cases (MUST NOT fire):- * N1 — atomic single chain: `.deleteRange(range).insertContent(...).run()`- * (the tag/wiki-link/composer-mention shape).- * N2 — boundary composition: `.deleteRange(range).command(...).run()`- * (the applySlashCommandItem shape).- * N3 — delegation to a boundary function (the fixed slash-command shape).- * N4 — a bare `deleteRange(...).run()` chain OUTSIDE any Suggestion config- * (delete-only surfaces like a chip's remove button are legitimate).- *- * The paired test asserts the plugin fires exactly 3 times on this file.- */-+// FIXTURE — drives `no-split-suggestion-dispatch.test.ts` via shell-out to `pnpm exec oxlint`. Not part+// of the main lint: `__fixtures__/` is in `oxlint.config.ts#ignorePatterns`,+// and `__fixtures__/oxlint.fixtures.json` re-enables the rules for the test.+//+// 3 positive cases (MUST each fire exactly once):+// P1 — bare trigger-delete chain dispatch inside a Suggestion config+// (`.focus().deleteRange(range).run()` — the pre-fix slash-command shape).+// P2 — bare delete chain without `.focus()` (`.deleteRange(range).run()`).+// P3 — `commands.deleteRange(range)` immediate dispatch inside a Suggestion+// config.+//+// 4 negative cases (MUST NOT fire):+// N1 — atomic single chain: `.deleteRange(range).insertContent(...).run()`+// (the tag/wiki-link/composer-mention shape).+// N2 — boundary composition: `.deleteRange(range).command(...).run()`+// (the applySlashCommandItem shape).+// N3 — delegation to a boundary function (the fixed slash-command shape).+// N4 — a bare `deleteRange(...).run()` chain OUTSIDE any Suggestion config+// (delete-only surfaces like a chip's remove button are legitimate).+//+// The paired test asserts the rule fires exactly 3 times on this file.// Minimal stand-ins — the rule matches call shapes, not imports.declare function Suggestion(config: Record<string, unknown>): unknown;declare const applySlashCommandItem: (args: Record<string, unknown>) => void;diff --git a/biome-plugins/__fixtures__/no-themeless-pierre-diff.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/no-themeless-pierre-diff.fixture.tsxsimilarity index 77%rename from biome-plugins/__fixtures__/no-themeless-pierre-diff.fixture.tsxrename to lint-plugins/ok-rules/__fixtures__/no-themeless-pierre-diff.fixture.tsxindex 0c0b13eba..27d8c93f5 100644--- a/biome-plugins/__fixtures__/no-themeless-pierre-diff.fixture.tsx+++ b/lint-plugins/ok-rules/__fixtures__/no-themeless-pierre-diff.fixture.tsx@@ -1,23 +1,18 @@// FIXTURE — drives `no-themeless-pierre-diff.test.ts` via shell-out to-// `biome check`. Not part of the main lint (lives outside the lint-// command's path list).+// `pnpm exec oxlint`. Not part of the main lint: `__fixtures__/` is in+// `oxlint.config.ts#ignorePatterns`, and `__fixtures__/oxlint.fixtures.json`+// re-enables the rules for the test.//-// Three positive cases (deliberate violations — plugin must fire) + two+// Three positive cases (deliberate violations — rule must fire) + two// negative cases (clean usage that must NOT fire). Exact-equality in the// test catches both false-negative regressions and false-positive// widenings.-// biome-ignore lint/suspicious/noExplicitAny: fixture-only — production types unimportant heredeclare const MultiFileDiff: any;-// biome-ignore lint/suspicious/noExplicitAny: fixture-only — production types unimportant heredeclare const okPierreTheme: any;-// biome-ignore lint/suspicious/noExplicitAny: fixture-only — production types unimportant heredeclare const oldFile: any;-// biome-ignore lint/suspicious/noExplicitAny: fixture-only — production types unimportant heredeclare const newFile: any;-// biome-ignore lint/suspicious/noExplicitAny: fixture-only — production types unimportant heredeclare const UnresolvedFile: any;-// biome-ignore lint/suspicious/noExplicitAny: fixture-only — production types unimportant heredeclare const PierreFile: any;// === Positive cases — must fire ===diff --git a/biome-plugins/__fixtures__/no-uninstall-forbidden-import.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/no-uninstall-forbidden-import.fixture.tsxsimilarity index 91%rename from biome-plugins/__fixtures__/no-uninstall-forbidden-import.fixture.tsxrename to lint-plugins/ok-rules/__fixtures__/no-uninstall-forbidden-import.fixture.tsxindex 297ace212..97fd39bb9 100644--- a/biome-plugins/__fixtures__/no-uninstall-forbidden-import.fixture.tsx+++ b/lint-plugins/ok-rules/__fixtures__/no-uninstall-forbidden-import.fixture.tsx@@ -1,8 +1,9 @@// FIXTURE — drives `no-uninstall-forbidden-import.test.ts` via shell-out to-// `biome check`. Not part of the main lint (lives outside the lint command's-// path list).+// `pnpm exec oxlint`. Not part of the main lint: `__fixtures__/` is in+// `oxlint.config.ts#ignorePatterns`, and `__fixtures__/oxlint.fixtures.json`+// re-enables the rules for the test.//-// Thirteen positive cases (deliberate violations — plugin must fire): one per+// Thirteen positive cases (deliberate violations — rule must fire): one per// forbidden specifier across every import shape (named / default / namespace /// type / side-effect / subpath) plus a dynamic import. Paired with negative// cases (clean usage that must NOT fire), including the allowed core package anddiff --git a/biome-plugins/__fixtures__/no-unportaled-editor-content.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/no-unportaled-editor-content.fixture.tsxsimilarity index 83%rename from biome-plugins/__fixtures__/no-unportaled-editor-content.fixture.tsxrename to lint-plugins/ok-rules/__fixtures__/no-unportaled-editor-content.fixture.tsxindex 2ae9b278f..5f97f31ef 100644--- a/biome-plugins/__fixtures__/no-unportaled-editor-content.fixture.tsx+++ b/lint-plugins/ok-rules/__fixtures__/no-unportaled-editor-content.fixture.tsx@@ -1,8 +1,9 @@// FIXTURE — drives `no-unportaled-editor-content.test.ts` via shell-out-// to `biome check`. Not part of the main lint (lives outside the lint-// command's path list).+// to `pnpm exec oxlint`. Not part of the main lint: `__fixtures__/` is in+// `oxlint.config.ts#ignorePatterns`, and `__fixtures__/oxlint.fixtures.json`+// re-enables the rules for the test.//-// Three positive cases (deliberate violations — plugin must fire) + three+// Three positive cases (deliberate violations — rule must fire) + three// negative cases (clean usage that must NOT fire). Exact-equality// (`toBe(3)`) in the test catches both false-negative regressions (drop// below 3) and false-positive widenings (above 3).@@ -10,7 +11,6 @@import { EditorContent, PureEditorContent } from '@tiptap/react';import { createPortal } from 'react-dom';-// biome-ignore lint/correctness/noExplicitAny: fixture-only — production types unimportant heredeclare const editor: any;declare const portalTarget: HTMLElement;@@ -42,7 +42,7 @@ export function Positive3() {// itself matches the pattern.export function Negative1() {return createPortal(- // biome-ignore lint/plugin/no-unportaled-editor-content: canonical portaled site — H6 fix per PRECEDENTS.md #44+ // oxlint-disable-next-line ok/no-unportaled-editor-content -- canonical portaled site — H6 fix per PRECEDENTS.md #44<EditorContent editor={editor} className="tiptap-editor-portal-content h-full" />,portalTarget,);diff --git a/biome-plugins/__fixtures__/no-unwrapped-user-facing-string.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/no-unwrapped-user-facing-string.fixture.tsxsimilarity index 91%rename from biome-plugins/__fixtures__/no-unwrapped-user-facing-string.fixture.tsxrename to lint-plugins/ok-rules/__fixtures__/no-unwrapped-user-facing-string.fixture.tsxindex 279a3f3b8..317226750 100644--- a/biome-plugins/__fixtures__/no-unwrapped-user-facing-string.fixture.tsx+++ b/lint-plugins/ok-rules/__fixtures__/no-unwrapped-user-facing-string.fixture.tsx@@ -1,20 +1,17 @@// FIXTURE — drives `no-unwrapped-user-facing-string.test.ts` via shell-out to-// `biome check`. Not part of the main lint (lives outside the lint command's-// path list).+// `pnpm exec oxlint`. Not part of the main lint: `__fixtures__/` is in+// `oxlint.config.ts#ignorePatterns`, and `__fixtures__/oxlint.fixtures.json`+// re-enables the rules for the test.//-// Positive cases (deliberate violations — plugin must fire) paired with+// Positive cases (deliberate violations — rule must fire) paired with// negative cases (already-wrapped copy, and the non-prose token shapes this// codebase legitimately writes raw). Exact-equality `toBe(N)` in the test// catches both a weakened pattern (count drops) and a widened one (a negative// starts firing, count rises).-// biome-ignore lint/correctness/noExplicitAny: fixture-only — production types unimportant heredeclare const toast: any;-// biome-ignore lint/correctness/noExplicitAny: fixture-only — production types unimportant heredeclare const t: any;-// biome-ignore lint/correctness/noExplicitAny: fixture-only — production types unimportant heredeclare const Trans: any;-// biome-ignore lint/correctness/noExplicitAny: fixture-only — production types unimportant heredeclare const MenubarShortcut: any;// === Positive cases — must fire ===diff --git a/lint-plugins/ok-rules/__fixtures__/oxlint.fixtures.json b/lint-plugins/ok-rules/__fixtures__/oxlint.fixtures.jsonnew file mode 100644index 000000000..c54249fc9--- /dev/null+++ b/lint-plugins/ok-rules/__fixtures__/oxlint.fixtures.json@@ -0,0 +1,27 @@+{+ "jsPlugins": ["../index.mjs"],+ "rules": {+ "ok/class-proof-registration-discipline": "error",+ "ok/cst-pm-handler-todo-stub": "error",+ "ok/microcopy-ellipsis": "error",+ "ok/no-blind-agent-host-fanout": "error",+ "ok/no-demoted-dialog-confirm": "error",+ "ok/no-hand-rolled-spinner": "error",+ "ok/no-inline-tolerance-class": "error",+ "ok/no-loosely-typed-webcontents-ipc": "error",+ "ok/no-physical-direction-utility": "error",+ "ok/no-raw-html-interactive-element": "error",+ "ok/no-raw-route-hash-construction": "error",+ "ok/no-resolved-value-theme-source": "error",+ "ok/no-roundtrip-identity-oracle": "error",+ "ok/no-split-suggestion-dispatch": "error",+ "ok/no-themeless-pierre-diff": "error",+ "ok/no-uninstall-forbidden-import": "error",+ "ok/no-unportaled-editor-content": "error",+ "ok/no-unwrapped-user-facing-string": "error",+ "ok/path-conditional-map-driven-origin": "error",+ "ok/playwright-prefer-to-have-count": "error",+ "ok/require-utf8-multipart-parser": "error",+ "ok/require-windowshide-on-spawn": "error"+ }+}diff --git a/biome-plugins/__fixtures__/path-conditional-map-driven-origin.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/path-conditional-map-driven-origin.fixture.tsxsimilarity index 80%rename from biome-plugins/__fixtures__/path-conditional-map-driven-origin.fixture.tsxrename to lint-plugins/ok-rules/__fixtures__/path-conditional-map-driven-origin.fixture.tsxindex 17c371d7c..70577a6b5 100644--- a/biome-plugins/__fixtures__/path-conditional-map-driven-origin.fixture.tsx+++ b/lint-plugins/ok-rules/__fixtures__/path-conditional-map-driven-origin.fixture.tsx@@ -1,9 +1,9 @@// FIXTURE — drives `path-conditional-map-driven-origin.test.ts` via shell-out-// to `biome check`. Not part of the main lint (override scope keeps the rule-// off this fixture's path under normal `pnpm run lint`; the test explicitly-// invokes biome on this file path).+// to `pnpm exec oxlint`. Not part of the main lint: `__fixtures__/` is in+// `oxlint.config.ts#ignorePatterns`, and `__fixtures__/oxlint.fixtures.json`+// re-enables the rules for the test.//-// 7 positive cases (deliberate violations — plugin must fire) + 3 negative+// 7 positive cases (deliberate violations — rule must fire) + 3 negative// cases (sanctioned shapes that must NOT fire). Exact-equality (`toBe(7)`) in// the test catches both false-negative regressions (drop below 7) and// false-positive widenings (above 7).@@ -14,15 +14,10 @@// must NOT clear a call whose origin argument is missing/wrong (Positive7), and// must NOT trip a call whose origin argument is correct (Negative3).-// biome-ignore lint/correctness/noExplicitAny: fixture-only — production types unimportant heredeclare const doc: any;-// biome-ignore lint/correctness/noExplicitAny: fixture-only — production types unimportant heredeclare const session: any;-// biome-ignore lint/correctness/noExplicitAny: fixture-only — production types unimportant heredeclare const OBSERVER_SYNC_ORIGIN: any;-// biome-ignore lint/correctness/noExplicitAny: fixture-only — production types unimportant heredeclare const SOME_OTHER_ORIGIN: any;-// biome-ignore lint/correctness/noExplicitAny: fixture-only — production types unimportant heredeclare const current: any;const noop = (): void => undefined;diff --git a/biome-plugins/__fixtures__/playwright-prefer-to-have-count.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/playwright-prefer-to-have-count.fixture.tsxsimilarity index 55%rename from biome-plugins/__fixtures__/playwright-prefer-to-have-count.fixture.tsxrename to lint-plugins/ok-rules/__fixtures__/playwright-prefer-to-have-count.fixture.tsxindex 3d679070d..a4b27044a 100644--- a/biome-plugins/__fixtures__/playwright-prefer-to-have-count.fixture.tsx+++ b/lint-plugins/ok-rules/__fixtures__/playwright-prefer-to-have-count.fixture.tsx@@ -1,17 +1,16 @@-/**- * Fixture for `playwright-prefer-to-have-count.grit`.- *- * 3 positive cases (one-shot count reads — plugin MUST fire) paired with- * 5 negative cases (web-first / legitimately different shapes — plugin- * must NOT fire). The fixture-file test asserts the diagnostic count with- * exact equality (`toBe(3)`) so both weakened-pattern and widened-pattern- * drift fail the gate.- *- * Deliberately NOT linted by the main `pnpm run lint` pass (biome-plugins/- * is outside the lint paths); only the scoped override in biome.jsonc- * reaches it, via the fixture-file test.- */-+// FIXTURE — drives `playwright-prefer-to-have-count.test.ts` via shell-out to `pnpm exec oxlint`. Not part+// of the main lint: `__fixtures__/` is in `oxlint.config.ts#ignorePatterns`,+// and `__fixtures__/oxlint.fixtures.json` re-enables the rules for the test.+//+// 3 positive cases (one-shot count reads — rule MUST fire) paired with+// 5 negative cases (web-first / legitimately different shapes — rule+// must NOT fire). The fixture-file test asserts the diagnostic count with+// exact equality (`toBe(3)`) so both weakened-pattern and widened-pattern+// drift fail the gate.+//+// Deliberately NOT linted by the main `pnpm run lint` pass (`__fixtures__/` is in+// `oxlint.config.ts#ignorePatterns`); only the fixture config+// `__fixtures__/oxlint.fixtures.json` reaches it, via the fixture-file test.declare const expect: any;declare const page: any;@@ -37,8 +36,9 @@ async function negatives() {// N4: an expect over a different awaited method — must NOT fire.expect(await rows.boundingBox()).toBeTruthy();// N5: count read assigned to a variable, then asserted in a separate- // statement — the documented two-statement escape hatch (GritQL cannot- // correlate across statements); must NOT fire.+ // statement — the documented two-statement escape hatch (this rule's+ // predicate is single-node and does not correlate across statements);+ // must NOT fire.const c = await rows.count();expect(c).toBe(2);}diff --git a/biome-plugins/__fixtures__/require-utf8-multipart-parser.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/require-utf8-multipart-parser.fixture.tsxsimilarity index 87%rename from biome-plugins/__fixtures__/require-utf8-multipart-parser.fixture.tsxrename to lint-plugins/ok-rules/__fixtures__/require-utf8-multipart-parser.fixture.tsxindex 87eff2f4f..050141bcb 100644--- a/biome-plugins/__fixtures__/require-utf8-multipart-parser.fixture.tsx+++ b/lint-plugins/ok-rules/__fixtures__/require-utf8-multipart-parser.fixture.tsx@@ -1,8 +1,8 @@-// FIXTURE - drives `require-utf8-multipart-parser.test.ts` via shell-out to-// `pnpm exec biome check` on this path. The override's `includes[]` self-includes-// this file, so the rule DOES apply here; what keeps the 3 fires below out of a-// normal `pnpm run lint` is that `lint:biome` passes biome an explicit path list-// (`packages docs *.json *.jsonc *.ts`) that never visits `biome-plugins/`.+// FIXTURE — drives `require-utf8-multipart-parser.test.ts` via shell-out to+// `pnpm exec oxlint`. The rule's scope entry self-includes this fixture, so the+// rule DOES apply here; what keeps the 3 fires below out of a normal+// `pnpm run lint` is that `__fixtures__/` is in `oxlint.config.ts#ignorePatterns`,+// which `__fixtures__/oxlint.fixtures.json` re-enables for the test.//// 3 expected diagnostic fires (one per direct `busboy(...)` construction):// P1 the exact pre-fix shape that shipped the bug (no charset declared)diff --git a/biome-plugins/__fixtures__/require-windowshide-on-spawn.fixture.tsx b/lint-plugins/ok-rules/__fixtures__/require-windowshide-on-spawn.fixture.tsxsimilarity index 92%rename from biome-plugins/__fixtures__/require-windowshide-on-spawn.fixture.tsxrename to lint-plugins/ok-rules/__fixtures__/require-windowshide-on-spawn.fixture.tsxindex 4aea248b2..8b8fd004a 100644--- a/biome-plugins/__fixtures__/require-windowshide-on-spawn.fixture.tsx+++ b/lint-plugins/ok-rules/__fixtures__/require-windowshide-on-spawn.fixture.tsx@@ -1,8 +1,7 @@// FIXTURE — drives `require-windowshide-on-spawn.test.ts` via shell-out to-// `pnpm exec biome check`. Not part of the main lint (override scope keeps the rule-// off this fixture's path under normal `pnpm run lint`; the test explicitly-// invokes biome on this file path via the fixture self-include in the-// override's `includes[]`).+// `pnpm exec oxlint`. Not part of the main lint: `__fixtures__/` is in+// `oxlint.config.ts#ignorePatterns`; the fixture is named in the rule's scope+// entry, and `__fixtures__/oxlint.fixtures.json` re-enables the rules for the test.//// 7 expected diagnostic fires (one per spawn that hides neither via// `windowsHide: true` nor `withHiddenWindowsConsole(...)`):diff --git a/lint-plugins/ok-rules/docs.mjs b/lint-plugins/ok-rules/docs.mjsnew file mode 100644index 000000000..83a60cb9c--- /dev/null+++ b/lint-plugins/ok-rules/docs.mjs@@ -0,0 +1,6 @@+const DOCS_URL_BASE =+ 'https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md';++export function docsUrl(ruleName) {+ return `${DOCS_URL_BASE}#${ruleName}`;+}diff --git a/lint-plugins/ok-rules/index.mjs b/lint-plugins/ok-rules/index.mjsnew file mode 100644index 000000000..ba9eb8ebf--- /dev/null+++ b/lint-plugins/ok-rules/index.mjs@@ -0,0 +1,63 @@+import { dirname, resolve } from 'node:path';+import { fileURLToPath } from 'node:url';+import { classProofRegistrationDiscipline } from './rules/class-proof-registration-discipline.mjs';+import { cstPmHandlerTodoStub } from './rules/cst-pm-handler-todo-stub.mjs';+import { microcopyEllipsis } from './rules/microcopy-ellipsis.mjs';+import { noBlindAgentHostFanout } from './rules/no-blind-agent-host-fanout.mjs';+import { noDemotedDialogConfirm } from './rules/no-demoted-dialog-confirm.mjs';+import { noHandRolledSpinner } from './rules/no-hand-rolled-spinner.mjs';+import { noInlineToleranceClass } from './rules/no-inline-tolerance-class.mjs';+import { noLooselyTypedWebcontentsIpc } from './rules/no-loosely-typed-webcontents-ipc.mjs';+import { noPhysicalDirectionUtility } from './rules/no-physical-direction-utility.mjs';+import { noRawHtmlInteractiveElement } from './rules/no-raw-html-interactive-element.mjs';+import { noRawRouteHashConstruction } from './rules/no-raw-route-hash-construction.mjs';+import { noResolvedValueThemeSource } from './rules/no-resolved-value-theme-source.mjs';+import { noRoundtripIdentityOracle } from './rules/no-roundtrip-identity-oracle.mjs';+import { noSplitSuggestionDispatch } from './rules/no-split-suggestion-dispatch.mjs';+import { noThemelessPierreDiff } from './rules/no-themeless-pierre-diff.mjs';+import { noUninstallForbiddenImport } from './rules/no-uninstall-forbidden-import.mjs';+import { noUnportaledEditorContent } from './rules/no-unportaled-editor-content.mjs';+import { noUnwrappedUserFacingString } from './rules/no-unwrapped-user-facing-string.mjs';+import { pathConditionalMapDrivenOrigin } from './rules/path-conditional-map-driven-origin.mjs';+import { playwrightPreferToHaveCount } from './rules/playwright-prefer-to-have-count.mjs';+import { requireUtf8MultipartParser } from './rules/require-utf8-multipart-parser.mjs';+import { requireWindowshideOnSpawn } from './rules/require-windowshide-on-spawn.mjs';+import { scoped } from './scope.mjs';++export const PLUGIN_NAME = 'ok';++const REPO_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..', '..');++const declared = {+ 'class-proof-registration-discipline': classProofRegistrationDiscipline,+ 'cst-pm-handler-todo-stub': cstPmHandlerTodoStub,+ 'microcopy-ellipsis': microcopyEllipsis,+ 'no-blind-agent-host-fanout': noBlindAgentHostFanout,+ 'no-demoted-dialog-confirm': noDemotedDialogConfirm,+ 'no-hand-rolled-spinner': noHandRolledSpinner,+ 'no-inline-tolerance-class': noInlineToleranceClass,+ 'no-loosely-typed-webcontents-ipc': noLooselyTypedWebcontentsIpc,+ 'no-physical-direction-utility': noPhysicalDirectionUtility,+ 'no-raw-html-interactive-element': noRawHtmlInteractiveElement,+ 'no-raw-route-hash-construction': noRawRouteHashConstruction,+ 'no-resolved-value-theme-source': noResolvedValueThemeSource,+ 'no-roundtrip-identity-oracle': noRoundtripIdentityOracle,+ 'no-split-suggestion-dispatch': noSplitSuggestionDispatch,+ 'no-themeless-pierre-diff': noThemelessPierreDiff,+ 'no-uninstall-forbidden-import': noUninstallForbiddenImport,+ 'no-unportaled-editor-content': noUnportaledEditorContent,+ 'no-unwrapped-user-facing-string': noUnwrappedUserFacingString,+ 'path-conditional-map-driven-origin': pathConditionalMapDrivenOrigin,+ 'playwright-prefer-to-have-count': playwrightPreferToHaveCount,+ 'require-utf8-multipart-parser': requireUtf8MultipartParser,+ 'require-windowshide-on-spawn': requireWindowshideOnSpawn,+};++export const rules = Object.fromEntries(+ Object.entries(declared).map(([name, rule]) => [name, scoped(name, rule, REPO_ROOT)]),+);++export default {+ meta: { name: PLUGIN_NAME },+ rules,+};diff --git a/lint-plugins/ok-rules/jsx.mjs b/lint-plugins/ok-rules/jsx.mjsnew file mode 100644index 000000000..8db3f0766--- /dev/null+++ b/lint-plugins/ok-rules/jsx.mjs@@ -0,0 +1,18 @@+export function attributeName(node) {+ const name = node.name;+ if (!name) return '';+ if (name.type === 'JSXNamespacedName') {+ return `${name.namespace?.name ?? ''}:${name.name?.name ?? ''}`;+ }+ return name.name ?? '';+}++export function isClassNameAttribute(node) {+ return attributeName(node).endsWith('lassName');+}++export function elementName(node) {+ const name = node.name;+ if (!name) return '';+ return name.type === 'JSXIdentifier' ? (name.name ?? '') : '';+}diff --git a/lint-plugins/ok-rules/rules/class-proof-registration-discipline.mjs b/lint-plugins/ok-rules/rules/class-proof-registration-discipline.mjsnew file mode 100644index 000000000..6325b99c7--- /dev/null+++ b/lint-plugins/ok-rules/rules/class-proof-registration-discipline.mjs@@ -0,0 +1,35 @@+import { docsUrl } from '../docs.mjs';++const URL = docsUrl('class-proof-registration-discipline');++const OPTIONS_MESSAGE = `Class-proof registration missing \`predicate\` or \`proof\` option — both are required by \`ClassProofOptions<M>\`. Provide all three of \`{ enumerate, predicate, proof }\` to \`defineClassProof()\`. See ${URL}`;+const LOCATION_MESSAGE = `Class-proof registered outside the canonical dir. Move the \`defineClassProof(...)\` call to \`packages/md-conformance/src/class-proofs/proofs/<name>.ts\` and export it from \`run-all.ts\` so it participates in the orchestrator manifest. See ${URL}`;++const HAS_PREDICATE = /\bpredicate\s*:/;+const HAS_PROOF = /\bproof\s*:/;++export const classProofRegistrationDiscipline = {+ meta: {+ type: 'problem',+ docs: {+ description: 'defineClassProof registrations must be complete and live in the canonical dir.',+ url: URL,+ },+ },+ create(context) {+ const source = context.sourceCode;+ return {+ CallExpression(node) {+ if (node.callee?.type !== 'Identifier' || node.callee.name !== 'defineClassProof') return;+ const args = node.arguments ?? [];+ if (args.length < 2) return;+ const options = source.getText(args[1]);+ if (!HAS_PREDICATE.test(options) || !HAS_PROOF.test(options)) {+ context.report({ node, message: OPTIONS_MESSAGE });+ return;+ }+ context.report({ node, message: LOCATION_MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/cst-pm-handler-todo-stub.mjs b/lint-plugins/ok-rules/rules/cst-pm-handler-todo-stub.mjsnew file mode 100644index 000000000..5aaeae9d6--- /dev/null+++ b/lint-plugins/ok-rules/rules/cst-pm-handler-todo-stub.mjs@@ -0,0 +1,32 @@+import { docsUrl } from '../docs.mjs';++const URL = docsUrl('cst-pm-handler-todo-stub');++const MESSAGE = `Codemod-emitted handler stub still throws TODO marker - fill in the substrate-specific body so the handler is implemented per the ICstEngine contract. See ${URL}`;++const TODO = /^TODO: implement/;++export const cstPmHandlerTodoStub = {+ meta: {+ type: 'problem',+ docs: {+ description: 'A codemod-emitted handler stub must not ship still throwing its TODO marker.',+ url: URL,+ },+ },+ create(context) {+ const source = context.sourceCode;+ return {+ ThrowStatement(node) {+ const argument = node.argument;+ if (!argument || argument.type !== 'NewExpression') return;+ if (argument.callee?.type !== 'Identifier' || argument.callee.name !== 'Error') return;+ const [message] = argument.arguments ?? [];+ if (!message) return;+ const text = source.getText(message).slice(1, -1);+ if (!TODO.test(text)) return;+ context.report({ node, message: MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/microcopy-ellipsis.mjs b/lint-plugins/ok-rules/rules/microcopy-ellipsis.mjsnew file mode 100644index 000000000..84186a614--- /dev/null+++ b/lint-plugins/ok-rules/rules/microcopy-ellipsis.mjs@@ -0,0 +1,41 @@+import { docsUrl } from '../docs.mjs';+import { attributeName } from '../jsx.mjs';++const URL = docsUrl('microcopy-ellipsis');++const UI_ATTRIBUTES = new Set([+ 'placeholder',+ 'label',+ 'title',+ 'aria-label',+ 'description',+ 'tooltip',+]);++const TEXT_MESSAGE = `Microcopy: drop the trailing \`…\`. Reserve U+2026 for macOS native menus (menu.ts) or truncation indicators. See ${URL}`;+const ATTRIBUTE_MESSAGE = `Microcopy: drop the trailing \`…\` from this UI-facing attribute. See ${URL}`;++export const microcopyEllipsis = {+ meta: {+ type: 'problem',+ docs: {+ description: 'Reserve U+2026 for macOS native menus and truncation indicators.',+ url: URL,+ },+ },+ create(context) {+ const source = context.sourceCode;+ return {+ JSXText(node) {+ if (!source.getText(node).includes('…')) return;+ context.report({ node, message: TEXT_MESSAGE });+ },+ JSXAttribute(node) {+ if (!UI_ATTRIBUTES.has(attributeName(node))) return;+ if (!node.value) return;+ if (!source.getText(node.value).includes('…')) return;+ context.report({ node: node.value, message: ATTRIBUTE_MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/no-blind-agent-host-fanout.mjs b/lint-plugins/ok-rules/rules/no-blind-agent-host-fanout.mjsnew file mode 100644index 000000000..7259db29d--- /dev/null+++ b/lint-plugins/ok-rules/rules/no-blind-agent-host-fanout.mjs@@ -0,0 +1,33 @@+import { docsUrl } from '../docs.mjs';++const URL = docsUrl('no-blind-agent-host-fanout');++const MESSAGE = `User-global skill installs must be gated on detected hosts, not fanned out via the \`skills\` CLI's \`--agent '*'\`. OK writes these dirs itself — use \`installUserSkill\` / \`detectUserSkillHosts\` from @inkeep/open-knowledge-server, whose host set comes from core's \`HOSTS_WITH_USER_SKILL_DIR\`. \`--agent '*'\` bypasses host detection and creates config dirs for tools the user never installed (issue #820: 51 such dirs from one \`ok init\`). See ${URL}`;++export const FORBIDDEN_SPECS = [+ 'skills@~1.5.0',+ 'skills@^1.5.0',+ '[email protected]',+ 'skills@latest',+ '--agent',+];++const FORBIDDEN = new Set(FORBIDDEN_SPECS);++export const noBlindAgentHostFanout = {+ meta: {+ type: 'problem',+ docs: {+ description: 'User-global skill installs must be gated on detected hosts.',+ url: URL,+ },+ },+ create(context) {+ return {+ Literal(node) {+ if (typeof node.value !== 'string' || !FORBIDDEN.has(node.value)) return;+ context.report({ node, message: MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/no-demoted-dialog-confirm.mjs b/lint-plugins/ok-rules/rules/no-demoted-dialog-confirm.mjsnew file mode 100644index 000000000..a0279966e--- /dev/null+++ b/lint-plugins/ok-rules/rules/no-demoted-dialog-confirm.mjs@@ -0,0 +1,28 @@+import { docsUrl } from '../docs.mjs';+import { elementName } from '../jsx.mjs';++const URL = docsUrl('no-demoted-dialog-confirm');++const MESSAGE = `Demoted confirm in a dialog footer. \`secondary\` draws no border and its \`bg-secondary\` fill sits within about 1.1:1 of the dialog surface, so it reads as flat text and loses the emphasis contest with the \`outline\` dismiss beside it. Drop the variant prop and let the confirm take \`default\` (or \`destructive\` for irreversible removal); the footer already supplies the row's font-mono uppercase treatment, so there is nothing to hand-add. See ${URL}`;++const FOOTERS = new Set(['DialogFooter', 'AlertDialogFooter']);++export const noDemotedDialogConfirm = {+ meta: {+ type: 'problem',+ docs: {+ description: 'A dialog footer confirm must not be demoted to the secondary variant.',+ url: URL,+ },+ },+ create(context) {+ const source = context.sourceCode;+ return {+ JSXElement(node) {+ if (!FOOTERS.has(elementName(node.openingElement ?? {}))) return;+ if (!source.getText(node).includes('variant="secondary"')) return;+ context.report({ node, message: MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/no-hand-rolled-spinner.mjs b/lint-plugins/ok-rules/rules/no-hand-rolled-spinner.mjsnew file mode 100644index 000000000..1008aebe1--- /dev/null+++ b/lint-plugins/ok-rules/rules/no-hand-rolled-spinner.mjs@@ -0,0 +1,29 @@+import { docsUrl } from '../docs.mjs';+import { isClassNameAttribute } from '../jsx.mjs';++const URL = docsUrl('no-hand-rolled-spinner');++const MESSAGE = `Hand-rolled loading spinner. Use \`<Spinner />\` from \`@/components/ui/spinner\` so reduced motion and the accessible name come for free — pass \`icon\` to keep a meaningful glyph, \`aria-hidden\` when a wrapper already announces the state. See ${URL}`;++const ANIMATE_SPIN = /\banimate-spin\b/;++export const noHandRolledSpinner = {+ meta: {+ type: 'problem',+ docs: {+ description:+ 'Loading spinners come from the Spinner primitive so reduced-motion support and the accessible name are inherited.',+ url: URL,+ },+ },+ create(context) {+ const source = context.sourceCode;+ return {+ JSXAttribute(node) {+ if (!isClassNameAttribute(node) || !node.value) return;+ if (!ANIMATE_SPIN.test(source.getText(node.value))) return;+ context.report({ node: node.value, message: MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/no-inline-tolerance-class.mjs b/lint-plugins/ok-rules/rules/no-inline-tolerance-class.mjsnew file mode 100644index 000000000..44a696264--- /dev/null+++ b/lint-plugins/ok-rules/rules/no-inline-tolerance-class.mjs@@ -0,0 +1,40 @@+import { docsUrl } from '../docs.mjs';++const URL = docsUrl('no-inline-tolerance-class');++const MESSAGE = `Inline bridge normalization-class value in a public test. Assert observable \`normalizeBridge\` equivalence between inputs instead of hard-coding a BRIDGE_TOLERANCE_CLASSES label as a string literal. See ${URL}`;++export const MATCHED_FIDELITY_CLASSES = [+ 'commonmark-escape',+ 'emphasis-around-code',+ 'leading-newline',+ 'doc-start-thematic',+ 'block-separator-collapse',+ 'table-align-row-spacing',+ 'row-no-trailing-pipe',+ 'list-indent-canonical',+ 'ordered-list-marker-number',+ 'paragraph-continuation-indent',+ 'jsx-container-boundary-blank',+ 'blank-line-collapse',+];++const MATCHED = new Set(MATCHED_FIDELITY_CLASSES);++export const noInlineToleranceClass = {+ meta: {+ type: 'problem',+ docs: {+ description: 'A public test must not hard-code a BRIDGE_TOLERANCE_CLASSES label inline.',+ url: URL,+ },+ },+ create(context) {+ return {+ Literal(node) {+ if (typeof node.value !== 'string' || !MATCHED.has(node.value)) return;+ context.report({ node, message: MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/no-loosely-typed-webcontents-ipc.mjs b/lint-plugins/ok-rules/rules/no-loosely-typed-webcontents-ipc.mjsnew file mode 100644index 000000000..56edc6e05--- /dev/null+++ b/lint-plugins/ok-rules/rules/no-loosely-typed-webcontents-ipc.mjs@@ -0,0 +1,43 @@+import { docsUrl } from '../docs.mjs';++const URL = docsUrl('no-loosely-typed-webcontents-ipc');++const MESSAGE = `Direct electron IPC primitive — route through createInvoker / createHandler / sendToRenderer from packages/desktop/src/shared/ipc-*.ts. See ${URL}`;++const FORBIDDEN = new Set([+ 'webContents.send',+ 'ipcMain.handle',+ 'ipcMain.on',+ 'ipcRenderer.invoke',+ 'ipcRenderer.on',+ 'ipcRenderer.once',+]);++function memberPath(callee) {+ if (!callee || (callee.type !== 'MemberExpression' && callee.type !== 'StaticMemberExpression')) {+ return '';+ }+ const property = callee.property;+ if (!property || property.type !== 'Identifier') return '';+ const object = callee.object;+ if (object?.type !== 'Identifier') return '';+ return `${object.name}.${property.name}`;+}++export const noLooselyTypedWebcontentsIpc = {+ meta: {+ type: 'problem',+ docs: {+ description: 'Direct electron IPC primitives must route through the typed wrappers.',+ url: URL,+ },+ },+ create(context) {+ return {+ CallExpression(node) {+ if (!FORBIDDEN.has(memberPath(node.callee))) return;+ context.report({ node, message: MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/no-physical-direction-utility.mjs b/lint-plugins/ok-rules/rules/no-physical-direction-utility.mjsnew file mode 100644index 000000000..585b2ba51--- /dev/null+++ b/lint-plugins/ok-rules/rules/no-physical-direction-utility.mjs@@ -0,0 +1,29 @@+import { docsUrl } from '../docs.mjs';+import { isClassNameAttribute } from '../jsx.mjs';++const URL = docsUrl('no-physical-direction-utility');++const MESSAGE = `Physical direction utility in a class string. Use the logical equivalent so the chrome follows the reading direction — \`ms-\`/\`me-\` for margin, \`ps-\`/\`pe-\` for padding, \`start-\`/\`end-\` for inset. See ${URL}`;++const PHYSICAL = /\b(?:ml|mr|pl|pr|left|right)-(?:auto|px|full|\[|[0-9]+(?:\.[0-9]+)?[\s"'`])/;++export const noPhysicalDirectionUtility = {+ meta: {+ type: 'problem',+ docs: {+ description:+ 'Chrome layout derives its side from the reading direction, never from a hardcoded left or right.',+ url: URL,+ },+ },+ create(context) {+ const source = context.sourceCode;+ return {+ JSXAttribute(node) {+ if (!isClassNameAttribute(node) || !node.value) return;+ if (!PHYSICAL.test(source.getText(node.value))) return;+ context.report({ node: node.value, message: MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/no-raw-html-interactive-element.mjs b/lint-plugins/ok-rules/rules/no-raw-html-interactive-element.mjsnew file mode 100644index 000000000..3194caf1e--- /dev/null+++ b/lint-plugins/ok-rules/rules/no-raw-html-interactive-element.mjs@@ -0,0 +1,26 @@+import { docsUrl } from '../docs.mjs';+import { elementName } from '../jsx.mjs';++const URL = docsUrl('no-raw-html-interactive-element');++const MESSAGE = `Raw HTML interactive primitive — use shadcn Button/Input/Textarea/Select from @/components/ui/* (install missing via \`pnpm dlx shadcn@latest add <name>\`). See ${URL}`;++const FORBIDDEN = new Set(['button', 'input', 'textarea', 'select']);++export const noRawHtmlInteractiveElement = {+ meta: {+ type: 'problem',+ docs: {+ description: 'Raw JSX button/input/textarea/select is forbidden; use the shadcn primitives.',+ url: URL,+ },+ },+ create(context) {+ return {+ JSXOpeningElement(node) {+ if (!FORBIDDEN.has(elementName(node))) return;+ context.report({ node, message: MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/no-raw-route-hash-construction.mjs b/lint-plugins/ok-rules/rules/no-raw-route-hash-construction.mjsnew file mode 100644index 000000000..62e2907b2--- /dev/null+++ b/lint-plugins/ok-rules/rules/no-raw-route-hash-construction.mjs@@ -0,0 +1,32 @@+import { docsUrl } from '../docs.mjs';++const URL = docsUrl('no-raw-route-hash-construction');++const MESSAGE = `Raw route-hash construction: this joins a name onto the \`#/\` prefix by hand, so a name containing \`#\`, \`?\` or \`%\` reaches the router unescaped and resolves to the wrong target (or to none, which opens a New Tab). Call \`hashFromDocName\`, \`hashFromFolderPath\`, \`hashFromAssetPath\` or \`encodeShareTargetForHash\` from \`@/lib/doc-hash\` instead — they percent-encode per segment so \`/\` stays a route separator. See ${URL}`;++const TEMPLATE_INTERPOLATION = /#\/\$\{/;+const HASH_PREFIX_LITERAL = /^['"`]#\/['"`]$/;++export const noRawRouteHashConstruction = {+ meta: {+ type: 'problem',+ docs: {+ description: 'Build route hashes through @/lib/doc-hash, never by joining onto `#/` by hand.',+ url: URL,+ },+ },+ create(context) {+ const source = context.sourceCode;+ return {+ TemplateLiteral(node) {+ if (!TEMPLATE_INTERPOLATION.test(source.getText(node))) return;+ context.report({ node, message: MESSAGE });+ },+ BinaryExpression(node) {+ if (node.operator !== '+') return;+ if (!HASH_PREFIX_LITERAL.test(source.getText(node.left))) return;+ context.report({ node, message: MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/no-resolved-value-theme-source.mjs b/lint-plugins/ok-rules/rules/no-resolved-value-theme-source.mjsnew file mode 100644index 000000000..b3886fc6a--- /dev/null+++ b/lint-plugins/ok-rules/rules/no-resolved-value-theme-source.mjs@@ -0,0 +1,47 @@+import { docsUrl } from '../docs.mjs';++const URL = docsUrl('no-resolved-value-theme-source');++const MATCH_MEDIA_MESSAGE = `1-way theme contract: matchMedia inside setThemeSource argument — pass the unresolved CRDT value ('system' | 'light' | 'dark') directly. Resolving 'system' to a concrete 'light'/'dark' loses OS auto-tracking. See ${URL}`;+const LITERAL_PAIR_MESSAGE = `1-way theme contract: setThemeSource argument resolves to 'light'/'dark' literals (likely a ternary) — pass the unresolved CRDT value directly. See ${URL}`;++const LIGHT_THEN_DARK = /['"]light['"][\s\S]*['"]dark['"]/;+const DARK_THEN_LIGHT = /['"]dark['"][\s\S]*['"]light['"]/;++function isSetThemeSource(callee) {+ if (!callee) return false;+ if (callee.type === 'Identifier') return callee.name === 'setThemeSource';+ if (callee.type === 'MemberExpression' || callee.type === 'StaticMemberExpression') {+ return callee.property?.type === 'Identifier' && callee.property.name === 'setThemeSource';+ }+ return false;+}++export const noResolvedValueThemeSource = {+ meta: {+ type: 'problem',+ docs: {+ description:+ 'Pass the unresolved theme value to setThemeSource; never resolve at the call site.',+ url: URL,+ },+ },+ create(context) {+ const source = context.sourceCode;+ return {+ CallExpression(node) {+ if (!isSetThemeSource(node.callee)) return;+ const [argument] = node.arguments ?? [];+ if (!argument) return;+ const text = source.getText(argument);+ if (text.includes('matchMedia')) {+ context.report({ node, message: MATCH_MEDIA_MESSAGE });+ return;+ }+ if (LIGHT_THEN_DARK.test(text) || DARK_THEN_LIGHT.test(text)) {+ context.report({ node, message: LITERAL_PAIR_MESSAGE });+ }+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/no-roundtrip-identity-oracle.mjs b/lint-plugins/ok-rules/rules/no-roundtrip-identity-oracle.mjsnew file mode 100644index 000000000..437264c40--- /dev/null+++ b/lint-plugins/ok-rules/rules/no-roundtrip-identity-oracle.mjs@@ -0,0 +1,78 @@+import { docsUrl } from '../docs.mjs';++const URL = docsUrl('no-roundtrip-identity-oracle');++const MESSAGE = `Byte-fidelity round-trip oracle in a public test: \`serialize(parse(x))\` asserted equal to the same input \`x\`. This general round-trip-identity check belongs to the engine's fidelity suite (packages/app/tests/fidelity or packages/core/src/markdown); a public test should assert a fixed expected literal for a specific contract instead. See ${URL}`;++const MATCHERS = new Set(['toBe', 'toEqual', 'toStrictEqual']);++function calleeName(node) {+ const callee = node?.callee;+ if (!callee) return '';+ if (callee.type === 'Identifier') return callee.name;+ if (callee.type === 'MemberExpression' || callee.type === 'StaticMemberExpression') {+ return callee.property?.type === 'Identifier' ? callee.property.name : '';+ }+ return '';+}++function receiverText(node, source) {+ const callee = node?.callee;+ if (!callee) return null;+ if (callee.type === 'Identifier') return '';+ if (callee.type === 'MemberExpression' || callee.type === 'StaticMemberExpression') {+ return callee.object ? source.getText(callee.object) : null;+ }+ return null;+}++function roundTripInput(node, source) {+ if (!node || node.type !== 'CallExpression' || calleeName(node) !== 'serialize') return null;+ const [inner] = node.arguments ?? [];+ if (!inner || inner.type !== 'CallExpression' || calleeName(inner) !== 'parse') return null;+ const outer = receiverText(node, source);+ const nested = receiverText(inner, source);+ if (outer === null || nested === null || outer !== nested) return null;+ const [input] = inner.arguments ?? [];+ return input ? source.getText(input) : null;+}++export const noRoundtripIdentityOracle = {+ meta: {+ type: 'problem',+ docs: {+ description: 'A byte-fidelity round-trip identity oracle does not belong in a public test.',+ url: URL,+ },+ },+ create(context) {+ const source = context.sourceCode;+ return {+ CallExpression(node) {+ if (!MATCHERS.has(calleeName(node))) return;+ const callee = node.callee;+ const receiver = callee?.object;+ if (!receiver || receiver.type !== 'CallExpression') return;+ if (receiver.callee?.type !== 'Identifier' || receiver.callee.name !== 'expect') return;+ const [actual] = receiver.arguments ?? [];+ const [expected] = node.arguments ?? [];+ if (!actual || !expected) return;+ const input = roundTripInput(actual, source);+ if (input === null || input !== source.getText(expected)) return;+ context.report({ node, message: MESSAGE });+ },+ BinaryExpression(node) {+ if (node.operator !== '===') return;+ const left = roundTripInput(node.left, source);+ if (left !== null && left === source.getText(node.right)) {+ context.report({ node, message: MESSAGE });+ return;+ }+ const right = roundTripInput(node.right, source);+ if (right !== null && right === source.getText(node.left)) {+ context.report({ node, message: MESSAGE });+ }+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/no-split-suggestion-dispatch.mjs b/lint-plugins/ok-rules/rules/no-split-suggestion-dispatch.mjsnew file mode 100644index 000000000..2d7451f57--- /dev/null+++ b/lint-plugins/ok-rules/rules/no-split-suggestion-dispatch.mjs@@ -0,0 +1,64 @@+import { docsUrl } from '../docs.mjs';++const URL = docsUrl('no-split-suggestion-dispatch');++const CHAIN_MESSAGE = `Split suggestion dispatch: this chain dispatches the trigger-range delete on its own. Compose the delete and the insert into ONE chain (\`.deleteRange(range).insertContent(...).run()\`) or route through an applySlashCommandItem-style boundary so the item contributes steps to the same transaction (precedent #58). A separately dispatched delete lets a re-entrant transaction remap the selection and the follow-up insert silently replace an adjacent node. See ${URL}`;+const COMMANDS_MESSAGE = `Split suggestion dispatch: \`commands.deleteRange\` dispatches the trigger-range delete immediately as its own transaction. Compose the delete and the insert into ONE chain (\`.deleteRange(range).insertContent(...).run()\`) or route through an applySlashCommandItem-style boundary so the item contributes steps to the same transaction (precedent #58). See ${URL}`;++function memberName(node) {+ const callee = node?.callee;+ if (!callee) return '';+ if (callee.type !== 'MemberExpression' && callee.type !== 'StaticMemberExpression') return '';+ return callee.property?.type === 'Identifier' ? callee.property.name : '';+}++function isBareDeleteRangeRun(node) {+ if (memberName(node) !== 'run') return false;+ const receiver = node.callee?.object;+ return receiver?.type === 'CallExpression' && memberName(receiver) === 'deleteRange';+}++function isCommandsDeleteRange(node) {+ if (memberName(node) !== 'deleteRange') return false;+ const receiver = node.callee?.object;+ if (!receiver) return false;+ if (receiver.type !== 'MemberExpression' && receiver.type !== 'StaticMemberExpression') {+ return false;+ }+ return receiver.property?.type === 'Identifier' && receiver.property.name === 'commands';+}++export const noSplitSuggestionDispatch = {+ meta: {+ type: 'problem',+ docs: {+ description:+ 'A suggestion surface must delete its trigger range and insert in one transaction.',+ url: URL,+ },+ },+ create(context) {+ let suggestionDepth = 0;+ return {+ CallExpression(node) {+ if (node.callee?.type === 'Identifier' && node.callee.name === 'Suggestion') {+ suggestionDepth += 1;+ return;+ }+ if (suggestionDepth === 0) return;+ if (isBareDeleteRangeRun(node)) {+ context.report({ node, message: CHAIN_MESSAGE });+ return;+ }+ if (isCommandsDeleteRange(node)) {+ context.report({ node, message: COMMANDS_MESSAGE });+ }+ },+ 'CallExpression:exit'(node) {+ if (node.callee?.type === 'Identifier' && node.callee.name === 'Suggestion') {+ suggestionDepth -= 1;+ }+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/no-themeless-pierre-diff.mjs b/lint-plugins/ok-rules/rules/no-themeless-pierre-diff.mjsnew file mode 100644index 000000000..eb82702e0--- /dev/null+++ b/lint-plugins/ok-rules/rules/no-themeless-pierre-diff.mjs@@ -0,0 +1,41 @@+import { docsUrl } from '../docs.mjs';+import { attributeName, elementName } from '../jsx.mjs';++const URL = docsUrl('no-themeless-pierre-diff');++const THEME_MESSAGE = `@pierre/diffs render contract: this renderer passes no theme — add \`theme: okPierreTheme()\` to its options so the pane uses app tokens and tracks light/dark. See ${URL}`;+const STYLE_MESSAGE = `@pierre/diffs render contract: this renderer does not set diffStyle: 'unified' — add it to its options; 'split' desyncs the change stepper. See ${URL}`;++const HAS_THEME = /\btheme\s*:/;+const HAS_UNIFIED = /diffStyle:\s*['"]unified['"]/;+const PIERRE_FILES = new Set(['UnresolvedFile', 'PierreFile']);++export const noThemelessPierreDiff = {+ meta: {+ type: 'problem',+ docs: {+ description: 'Every @pierre/diffs renderer must pass an app theme and unified diff style.',+ url: URL,+ },+ },+ create(context) {+ const source = context.sourceCode;+ return {+ JSXOpeningElement(node) {+ if (elementName(node) !== 'MultiFileDiff') return;+ const options = (node.attributes ?? []).find((a) => attributeName(a) === 'options');+ if (!options || !HAS_THEME.test(source.getText(options))) {+ context.report({ node, message: THEME_MESSAGE });+ }+ if (!HAS_UNIFIED.test(source.getText(node))) {+ context.report({ node, message: STYLE_MESSAGE });+ }+ },+ NewExpression(node) {+ if (node.callee?.type !== 'Identifier' || !PIERRE_FILES.has(node.callee.name)) return;+ if (HAS_THEME.test(source.getText(node))) return;+ context.report({ node, message: THEME_MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/no-uninstall-forbidden-import.mjs b/lint-plugins/ok-rules/rules/no-uninstall-forbidden-import.mjsnew file mode 100644index 000000000..53802d2bb--- /dev/null+++ b/lint-plugins/ok-rules/rules/no-uninstall-forbidden-import.mjs@@ -0,0 +1,32 @@+import { docsUrl } from '../docs.mjs';++const URL = docsUrl('no-uninstall-forbidden-import');++const FORBIDDEN_MESSAGE = `Forbidden module in the uninstall entry — the uninstall window must connect to nothing (survey/completion run after the server is stopped and ~/.ok is removed). Drop this editor / CRDT / provider-pool / Hocuspocus-server import; keep only shared types + constants from @inkeep/open-knowledge-core. See ${URL}`;+const DYNAMIC_MESSAGE = `Dynamic import under src/uninstall — the uninstall screens must eager-load so the completion/failure screens paint from memory after teardown starts removing files. Use a static import. See ${URL}`;++const FORBIDDEN_SOURCE =+ /^(?:@\/editor\/.*|@inkeep\/open-knowledge-server.*|@hocuspocus\/.*|@tiptap\/y-tiptap.*|@tiptap\/extension-collaboration.*|yjs(?:\/.*)?|y-protocols(?:\/.*)?|y-prosemirror(?:\/.*)?|y-codemirror\.next(?:\/.*)?|y-indexeddb(?:\/.*)?)$/;++export const noUninstallForbiddenImport = {+ meta: {+ type: 'problem',+ docs: {+ description:+ 'The uninstall entry may not import editor/CRDT/server modules, or import dynamically.',+ url: URL,+ },+ },+ create(context) {+ return {+ ImportDeclaration(node) {+ const value = node.source?.value;+ if (typeof value !== 'string' || !FORBIDDEN_SOURCE.test(value)) return;+ context.report({ node, message: FORBIDDEN_MESSAGE });+ },+ ImportExpression(node) {+ context.report({ node, message: DYNAMIC_MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/no-unportaled-editor-content.mjs b/lint-plugins/ok-rules/rules/no-unportaled-editor-content.mjsnew file mode 100644index 000000000..e122a8eff--- /dev/null+++ b/lint-plugins/ok-rules/rules/no-unportaled-editor-content.mjs@@ -0,0 +1,24 @@+import { docsUrl } from '../docs.mjs';+import { elementName } from '../jsx.mjs';++const URL = docsUrl('no-unportaled-editor-content');++const MESSAGE = `Portal-only: render <EditorContent /> via React.createPortal(<EditorContent .../>, portalTarget). H6 cross-doc DOM bleed contract — TipTap's PureEditorContent.componentDidMount vacuums sibling DOM nodes into its refDiv; portalling isolates view.dom in a per-Activity DOM target. See ${URL}`;++export const noUnportaledEditorContent = {+ meta: {+ type: 'problem',+ docs: {+ description: 'Every <EditorContent> must be rendered through React.createPortal.',+ url: URL,+ },+ },+ create(context) {+ return {+ JSXOpeningElement(node) {+ if (elementName(node) !== 'EditorContent') return;+ context.report({ node, message: MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/no-unwrapped-user-facing-string.mjs b/lint-plugins/ok-rules/rules/no-unwrapped-user-facing-string.mjsnew file mode 100644index 000000000..c44cde9e3--- /dev/null+++ b/lint-plugins/ok-rules/rules/no-unwrapped-user-facing-string.mjs@@ -0,0 +1,83 @@+import { docsUrl } from '../docs.mjs';+import { attributeName, elementName } from '../jsx.mjs';++const URL = docsUrl('no-unwrapped-user-facing-string');++const TOAST_MESSAGE = `Unwrapped user-facing string in a toast argument. Wrap it with the Lingui \`t\` macro — in a plain module call the macro inside the function, never at module top level, so it resolves against the active locale. See ${URL}`;+const JSX_TEXT_MESSAGE = `Unwrapped user-facing string in JSX text. Wrap it with the Lingui \`<Trans>\` element so it reaches the catalogs. See ${URL}`;+const ATTRIBUTE_MESSAGE = `Unwrapped user-facing string in a UI-facing attribute. Wrap it with the Lingui \`t\` macro from \`useLingui()\` so it reaches the catalogs. See ${URL}`;+const PROPERTY_MESSAGE = `Unwrapped user-facing string in a UI-facing object property. Wrap it with the Lingui \`t\` macro — or, when the object is module scope, hold a \`msg\` descriptor here and resolve it at render, so a language switch is not frozen out. See ${URL}`;++const TWO_WORDS = /[A-Za-z]\s+[A-Za-z]/;+const ICON_NAME = /^[A-Za-z0-9()\-. ]* icon$/;++const COPY_ATTRIBUTES = new Set(['aria-label', 'placeholder', 'title', 'alt']);+const COPY_PROPERTIES = new Set([+ 'aria-label',+ 'placeholder',+ 'title',+ 'alt',+ 'label',+ 'description',+]);++function isCopy(value) {+ return typeof value === 'string' && TWO_WORDS.test(value) && !ICON_NAME.test(value.trim());+}++function propertyKeyName(key) {+ if (!key) return null;+ if (key.type === 'Identifier') return key.name;+ if (key.type === 'Literal' && typeof key.value === 'string') return key.value;+ return null;+}++export const noUnwrappedUserFacingString = {+ meta: {+ type: 'problem',+ docs: {+ description: 'User-facing copy must route through Lingui rather than ship as a bare literal.',+ url: URL,+ },+ },+ create(context) {+ return {+ CallExpression(node) {+ const callee = node.callee;+ if (!callee) return;+ if (callee.type !== 'MemberExpression' && callee.type !== 'StaticMemberExpression') return;+ if (callee.object?.type !== 'Identifier' || callee.object.name !== 'toast') return;+ const [argument] = node.arguments ?? [];+ if (!argument || argument.type !== 'Literal' || typeof argument.value !== 'string') return;+ context.report({ node, message: TOAST_MESSAGE });+ },+ JSXText(node) {+ if (!isCopy(node.value)) return;+ let parent = node.parent;+ while (parent) {+ if (+ parent.type === 'JSXElement' &&+ elementName(parent.openingElement ?? {}) === 'Trans'+ ) {+ return;+ }+ parent = parent.parent;+ }+ context.report({ node, message: JSX_TEXT_MESSAGE });+ },+ JSXAttribute(node) {+ if (!COPY_ATTRIBUTES.has(attributeName(node))) return;+ const value = node.value;+ if (!value || value.type !== 'Literal' || !isCopy(value.value)) return;+ context.report({ node: value, message: ATTRIBUTE_MESSAGE });+ },+ Property(node) {+ const name = propertyKeyName(node.key);+ if (!name || !COPY_PROPERTIES.has(name)) return;+ const value = node.value;+ if (!value || value.type !== 'Literal' || !isCopy(value.value)) return;+ context.report({ node: value, message: PROPERTY_MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/path-conditional-map-driven-origin.mjs b/lint-plugins/ok-rules/rules/path-conditional-map-driven-origin.mjsnew file mode 100644index 000000000..881b9a683--- /dev/null+++ b/lint-plugins/ok-rules/rules/path-conditional-map-driven-origin.mjs@@ -0,0 +1,30 @@+import { docsUrl } from '../docs.mjs';++const URL = docsUrl('path-conditional-map-driven-origin');++const MESSAGE = `Observer-side transact call missing sanctioned origin. Pass \`OBSERVER_SYNC_ORIGIN\` as the second argument: \`doc.transact(fn, OBSERVER_SYNC_ORIGIN)\`. Bare \`doc.transact(fn)\` (or a wrong origin) routes the write to \`openknowledge-service\` and breaks per-session UndoManager attribution. See ${URL}`;++export const pathConditionalMapDrivenOrigin = {+ meta: {+ type: 'problem',+ docs: {+ description:+ 'Observer-side transact calls must pass OBSERVER_SYNC_ORIGIN as the second argument.',+ url: URL,+ },+ },+ create(context) {+ const source = context.sourceCode;+ return {+ CallExpression(node) {+ const callee = node.callee;+ if (!callee) return;+ if (callee.type !== 'MemberExpression' && callee.type !== 'StaticMemberExpression') return;+ if (callee.property?.type !== 'Identifier' || callee.property.name !== 'transact') return;+ const second = (node.arguments ?? [])[1];+ if (second && source.getText(second) === 'OBSERVER_SYNC_ORIGIN') return;+ context.report({ node, message: MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/playwright-prefer-to-have-count.mjs b/lint-plugins/ok-rules/rules/playwright-prefer-to-have-count.mjsnew file mode 100644index 000000000..4be8153f8--- /dev/null+++ b/lint-plugins/ok-rules/rules/playwright-prefer-to-have-count.mjs@@ -0,0 +1,34 @@+import { docsUrl } from '../docs.mjs';++const URL = docsUrl('playwright-prefer-to-have-count');++const MESSAGE = `One-shot count read never retries — use the web-first \`await expect(locator).toHaveCount(n)\` so the assertion polls the live DOM. See ${URL}`;++function isCountCall(node) {+ if (!node || node.type !== 'CallExpression') return false;+ const callee = node.callee;+ if (!callee) return false;+ if (callee.type !== 'MemberExpression' && callee.type !== 'StaticMemberExpression') return false;+ return callee.property?.type === 'Identifier' && callee.property.name === 'count';+}++export const playwrightPreferToHaveCount = {+ meta: {+ type: 'problem',+ docs: {+ description: 'A one-shot `expect(await locator.count())` never retries; use toHaveCount.',+ url: URL,+ },+ },+ create(context) {+ return {+ CallExpression(node) {+ if (node.callee?.type !== 'Identifier' || node.callee.name !== 'expect') return;+ const [argument] = node.arguments ?? [];+ if (!argument || argument.type !== 'AwaitExpression') return;+ if (!isCountCall(argument.argument)) return;+ context.report({ node, message: MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/require-utf8-multipart-parser.mjs b/lint-plugins/ok-rules/rules/require-utf8-multipart-parser.mjsnew file mode 100644index 000000000..675efeaa5--- /dev/null+++ b/lint-plugins/ok-rules/rules/require-utf8-multipart-parser.mjs@@ -0,0 +1,23 @@+import { docsUrl } from '../docs.mjs';++const URL = docsUrl('require-utf8-multipart-parser');++const MESSAGE = `busboy constructed directly - route multipart parsing through \`createMultipartParser(...)\` from \`packages/server/src/multipart.ts\`, which hardcodes \`defParamCharset: 'utf8'\`. busboy defaults that option to \`latin1\`, so every non-ASCII filename is mojibaked at the transport-decode boundary before any sanitizer sees it, irreversibly; RFC 7578 section 4.2 records that multipart/form-data file names are typically UTF-8, which is what every standard client sends. Need different parser options? widen the factory rather than construct here. See ${URL}`;++export const requireUtf8MultipartParser = {+ meta: {+ type: 'problem',+ docs: {+ description: 'busboy may only be constructed inside packages/server/src/multipart.ts.',+ url: URL,+ },+ },+ create(context) {+ return {+ CallExpression(node) {+ if (node.callee?.type !== 'Identifier' || node.callee.name !== 'busboy') return;+ context.report({ node, message: MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/rules/require-windowshide-on-spawn.mjs b/lint-plugins/ok-rules/rules/require-windowshide-on-spawn.mjsnew file mode 100644index 000000000..9bb43abcf--- /dev/null+++ b/lint-plugins/ok-rules/rules/require-windowshide-on-spawn.mjs@@ -0,0 +1,36 @@+import { docsUrl } from '../docs.mjs';++const URL = docsUrl('require-windowshide-on-spawn');++const MESSAGE = `child_process spawn without a hidden Windows console — wrap the options in \`withHiddenWindowsConsole(...)\` (from @inkeep/open-knowledge-server) or add \`windowsHide: true\`. On Windows a console-less parent (MCP-spawned/detached OK server) flashes a terminal window on every spawn; the flag is a no-op on macOS/Linux, so add it unconditionally. macOS/Linux-only spawn, or a same-named wrapper (not node:child_process)? suppress with \`// oxlint-disable-next-line ok/require-windowshide-on-spawn -- <reason>\`. See ${URL}`;++const SPAWNERS = new Set([+ 'spawn',+ 'spawnSync',+ 'execSync',+ 'execFile',+ 'execFileSync',+ 'nodeSpawn',+ 'execFileAsync',+]);++export const requireWindowshideOnSpawn = {+ meta: {+ type: 'problem',+ docs: {+ description: 'Every child_process spawn must hide the Windows console window.',+ url: URL,+ },+ },+ create(context) {+ const source = context.sourceCode;+ return {+ CallExpression(node) {+ if (node.callee?.type !== 'Identifier' || !SPAWNERS.has(node.callee.name)) return;+ const text = source.getText(node);+ if (text.includes('windowsHide:') || text.includes('withHiddenWindowsConsole(')) return;+ context.report({ node, message: MESSAGE });+ },+ };+ },+};diff --git a/lint-plugins/ok-rules/scope.mjs b/lint-plugins/ok-rules/scope.mjsnew file mode 100644index 000000000..12c4e3498--- /dev/null+++ b/lint-plugins/ok-rules/scope.mjs@@ -0,0 +1,204 @@+import { relative } from 'node:path';+import { globToRegExp, normalizeRelativePath } from '../no-comments/scope.mjs';++const CACHE = new Map();++function matches(glob, path) {+ let re = CACHE.get(glob);+ if (!re) {+ re = globToRegExp(glob);+ CACHE.set(glob, re);+ }+ return re.test(path);+}++export const UNSCOPED_RULES = new Set([+ 'microcopy-ellipsis',+ 'no-hand-rolled-spinner',+ 'no-loosely-typed-webcontents-ipc',+ 'no-resolved-value-theme-source',+ 'no-split-suggestion-dispatch',+ 'no-unportaled-editor-content',+]);++export const RULE_SCOPES = {+ 'no-raw-route-hash-construction': [+ 'packages/app/src/**/*.ts',+ 'packages/app/src/**/*.tsx',+ '!packages/app/src/lib/doc-hash.ts',+ '!**/*.test.ts',+ '!**/*.test.tsx',+ 'lint-plugins/ok-rules/__fixtures__/no-raw-route-hash-construction.fixture.tsx',+ ],+ 'path-conditional-map-driven-origin': [+ 'packages/server/src/server-observers.ts',+ 'lint-plugins/ok-rules/__fixtures__/path-conditional-map-driven-origin.fixture.tsx',+ ],+ 'cst-pm-handler-todo-stub': [+ 'packages/md-conformance/src/substrates/*/handlers/**/*.ts',+ 'lint-plugins/ok-rules/__fixtures__/cst-pm-handler-todo-stub.fixture.tsx',+ ],+ 'class-proof-registration-discipline': [+ '**/*.ts',+ '**/*.tsx',+ '**/*.mts',+ '!**/node_modules/**',+ '!**/dist/**',+ '!**/*.test.ts',+ '!**/*.test.tsx',+ '!**/*.test.mts',+ '!packages/md-conformance/src/class-proofs/proofs/**',+ 'lint-plugins/ok-rules/__fixtures__/class-proof-registration-discipline.fixture.tsx',+ ],+ 'require-windowshide-on-spawn': [+ 'packages/server/src/**/*.ts',+ 'packages/cli/src/**/*.ts',+ 'packages/desktop/src/**/*.ts',+ '!**/*.test.ts',+ '!**/*.test-helper.ts',+ 'lint-plugins/ok-rules/__fixtures__/require-windowshide-on-spawn.fixture.tsx',+ ],+ 'require-utf8-multipart-parser': [+ '**/*.ts',+ '**/*.tsx',+ '**/*.mts',+ '!**/node_modules/**',+ '!**/dist/**',+ '!**/*.test.ts',+ '!**/*.test.tsx',+ '!**/*.test.mts',+ '!**/*.test-helper.ts',+ '!packages/server/src/multipart.ts',+ 'lint-plugins/ok-rules/__fixtures__/require-utf8-multipart-parser.fixture.tsx',+ ],+ 'no-blind-agent-host-fanout': [+ 'packages/server/src/**/*.ts',+ 'packages/cli/src/**/*.ts',+ 'lint-plugins/ok-rules/__fixtures__/no-blind-agent-host-fanout.fixture.tsx',+ ],+ 'playwright-prefer-to-have-count': [+ 'packages/app/tests/stress/**/*.e2e.ts',+ 'packages/app/tests/visual/**/*.e2e.ts',+ 'packages/app/tests/a11y/**/*.e2e.ts',+ 'lint-plugins/ok-rules/__fixtures__/playwright-prefer-to-have-count.fixture.tsx',+ ],+ 'no-uninstall-forbidden-import': [+ 'packages/app/src/uninstall/**/*.ts',+ 'packages/app/src/uninstall/**/*.tsx',+ '!packages/app/src/uninstall/**/*.test.ts',+ '!packages/app/src/uninstall/**/*.test.tsx',+ '!packages/app/src/uninstall/**/*.dom.test.tsx',+ 'lint-plugins/ok-rules/__fixtures__/no-uninstall-forbidden-import.fixture.tsx',+ ],+ 'no-raw-html-interactive-element': [+ 'packages/app/src/**/*.tsx',+ 'packages/desktop/src/**/*.tsx',+ 'packages/plugin/src/**/*.tsx',+ '!packages/app/src/editor/**',+ '!packages/app/src/components/ui/**',+ '!**/*.test.tsx',+ '!**/*.dom.test.tsx',+ '!**/*.test-helper.tsx',+ 'lint-plugins/ok-rules/__fixtures__/no-raw-html-interactive-element.fixture.tsx',+ ],+ 'no-themeless-pierre-diff': [+ 'packages/app/src/**/*.tsx',+ '!**/*.test.tsx',+ '!**/*.dom.test.tsx',+ '!**/*.test-helper.tsx',+ 'lint-plugins/ok-rules/__fixtures__/no-themeless-pierre-diff.fixture.tsx',+ ],+ 'no-unwrapped-user-facing-string': [+ 'packages/app/src/**/*.ts',+ 'packages/app/src/**/*.tsx',+ 'packages/desktop/src/**/*.ts',+ 'packages/desktop/src/**/*.tsx',+ 'packages/plugin/src/**/*.ts',+ 'packages/plugin/src/**/*.tsx',+ '!packages/app/src/editor/**',+ '!packages/app/src/components/ui/**',+ '!packages/desktop/src/main/**',+ '!**/*.test.ts',+ '!**/*.test.tsx',+ '!**/*.dom.test.tsx',+ 'lint-plugins/ok-rules/__fixtures__/no-unwrapped-user-facing-string.fixture.tsx',+ ],+ 'no-physical-direction-utility': [+ 'packages/app/src/**/*.tsx',+ 'packages/desktop/src/**/*.tsx',+ 'packages/plugin/src/**/*.tsx',+ '!packages/app/src/editor/**',+ '!packages/app/src/components/ui/**',+ '!**/*.test.tsx',+ '!**/*.dom.test.tsx',+ 'lint-plugins/ok-rules/__fixtures__/no-physical-direction-utility.fixture.tsx',+ ],+ 'no-demoted-dialog-confirm': [+ 'packages/app/src/**/*.tsx',+ 'packages/desktop/src/**/*.tsx',+ 'packages/plugin/src/**/*.tsx',+ '!packages/app/src/components/ui/**',+ '!**/*.test.tsx',+ '!**/*.dom.test.tsx',+ 'lint-plugins/ok-rules/__fixtures__/no-demoted-dialog-confirm.fixture.tsx',+ ],+ 'no-roundtrip-identity-oracle': [+ 'packages/**/*.test.ts',+ 'packages/**/*.test.tsx',+ 'packages/**/*.e2e.ts',+ '!packages/md-conformance/**',+ '!packages/app/tests/fidelity/**',+ '!packages/core/src/markdown/**/*.test.ts',+ '!packages/core/src/bridge/**/*.test.ts',+ '!**/*.private.*',+ 'lint-plugins/ok-rules/__fixtures__/no-roundtrip-identity-oracle.fixture.tsx',+ ],+ 'no-inline-tolerance-class': [+ 'packages/**/*.test.ts',+ 'packages/**/*.test.tsx',+ 'packages/**/*.e2e.ts',+ '!packages/md-conformance/**',+ '!packages/app/tests/fidelity/**',+ '!packages/core/src/markdown/**/*.test.ts',+ '!packages/core/src/bridge/**/*.test.ts',+ '!**/*.private.*',+ 'lint-plugins/ok-rules/__fixtures__/no-inline-tolerance-class.fixture.tsx',+ ],+};++export function isInScope(ruleName, relPath, table = RULE_SCOPES) {+ const globs = table[ruleName];+ if (!globs) {+ if (table === RULE_SCOPES && UNSCOPED_RULES.has(ruleName)) return true;+ throw new Error(+ `ok-rules: rule '${ruleName}' has no entry in the scope table it was looked up in, ` ++ 'and is not in UNSCOPED_RULES. Add it to one. Defaulting to in-scope-everywhere would ' ++ 'silently widen a scoped rule across the whole tree.',+ );+ }+ const path = normalizeRelativePath(relPath);+ let included = false;+ for (const glob of globs) {+ if (glob.startsWith('!')) {+ if (matches(glob.slice(1), path)) return false;+ } else if (!included && matches(glob, path)) {+ included = true;+ }+ }+ return included;+}++function scopedFilename(context, repoRoot) {+ const absolute = context.physicalFilename ?? context.filename;+ return normalizeRelativePath(relative(repoRoot, absolute));+}++export function scoped(ruleName, rule, repoRoot, table = RULE_SCOPES) {+ return {+ ...rule,+ create(context) {+ if (!isInScope(ruleName, scopedFilename(context, repoRoot), table)) return {};+ return rule.create(context);+ },+ };+}diff --git a/oxlint.config.ts b/oxlint.config.tsindex c9b6c2a6a..7d3f8c3e1 100644--- a/oxlint.config.ts+++ b/oxlint.config.ts@@ -28,16 +28,49 @@ const noRequireInTests = {};const NO_COMMENTS_PLUGIN = './lint-plugins/no-comments/plugin.mjs';+const OK_RULES_PLUGIN = './lint-plugins/ok-rules/index.mjs';const NO_COMMENTS_RULE = 'no-comments/no-comments';const NO_COMMENTS_SEVERITY = 'error';export default defineConfig({- ignorePatterns: ['.agents/skills/**', '.codex/skills/**', '/reports/**', '/specs/**'],+ ignorePatterns: [+ '.agents/skills/**',+ '.codex/skills/**',+ '/reports/**',+ '/specs/**',+ 'lint-plugins/ok-rules/__fixtures__/**',+ ],options: {typeAware: true,},- jsPlugins: [{ name: 'eslint-js', specifier: 'oxlint-plugin-eslint' }, NO_COMMENTS_PLUGIN],+ jsPlugins: [+ { name: 'eslint-js', specifier: 'oxlint-plugin-eslint' },+ NO_COMMENTS_PLUGIN,+ OK_RULES_PLUGIN,+ ],rules: {+ 'ok/class-proof-registration-discipline': 'error',+ 'ok/cst-pm-handler-todo-stub': 'error',+ 'ok/microcopy-ellipsis': 'error',+ 'ok/no-blind-agent-host-fanout': 'error',+ 'ok/no-demoted-dialog-confirm': 'error',+ 'ok/no-hand-rolled-spinner': 'error',+ 'ok/no-inline-tolerance-class': 'error',+ 'ok/no-loosely-typed-webcontents-ipc': 'error',+ 'ok/no-physical-direction-utility': 'error',+ 'ok/no-raw-html-interactive-element': 'error',+ 'ok/no-raw-route-hash-construction': 'error',+ 'ok/no-resolved-value-theme-source': 'error',+ 'ok/no-roundtrip-identity-oracle': 'error',+ 'ok/no-split-suggestion-dispatch': 'error',+ 'ok/no-themeless-pierre-diff': 'error',+ 'ok/no-uninstall-forbidden-import': 'error',+ 'ok/no-unportaled-editor-content': 'error',+ 'ok/no-unwrapped-user-facing-string': 'error',+ 'ok/path-conditional-map-driven-origin': 'error',+ 'ok/playwright-prefer-to-have-count': 'error',+ 'ok/require-utf8-multipart-parser': 'error',+ 'ok/require-windowshide-on-spawn': 'error',[NO_COMMENTS_RULE]: NO_COMMENTS_SEVERITY,'eslint/logical-assignment-operators': ['error',diff --git a/packages/app/src/comments/CommentMarginRail.tsx b/packages/app/src/comments/CommentMarginRail.tsxindex 146a2b868..5a8860623 100644--- a/packages/app/src/comments/CommentMarginRail.tsx+++ b/packages/app/src/comments/CommentMarginRail.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { useLingui } from '@lingui/react/macro';import type { Editor } from '@tiptap/react';diff --git a/packages/app/src/comments/CommentSelectionAffordance.tsx b/packages/app/src/comments/CommentSelectionAffordance.tsxindex c82099346..c848ee49b 100644--- a/packages/app/src/comments/CommentSelectionAffordance.tsx+++ b/packages/app/src/comments/CommentSelectionAffordance.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { autoUpdate, computePosition, flip, offset, shift, size } from '@floating-ui/dom';import { commentQuoteText } from '@inkeep/open-knowledge-core';diff --git a/packages/app/src/comments/ThreadCard.tsx b/packages/app/src/comments/ThreadCard.tsxindex 8d339aec0..6913950e5 100644--- a/packages/app/src/comments/ThreadCard.tsx+++ b/packages/app/src/comments/ThreadCard.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { Trans, useLingui } from '@lingui/react/macro';import { CheckCheck, MapPin, Pencil, RotateCcw, Trash2 } from 'lucide-react';diff --git a/packages/app/src/comments/comment-chips.tsx b/packages/app/src/comments/comment-chips.tsxindex b31763d51..5ca072d76 100644--- a/packages/app/src/comments/comment-chips.tsx+++ b/packages/app/src/comments/comment-chips.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { Plural, Trans, useLingui } from '@lingui/react/macro';import { MessageSquare, Plus, X } from 'lucide-react';diff --git a/packages/app/src/components/ActivityModeContent.tsx b/packages/app/src/components/ActivityModeContent.tsxindex fdca27450..3702ee98a 100644--- a/packages/app/src/components/ActivityModeContent.tsx+++ b/packages/app/src/components/ActivityModeContent.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { t } from '@lingui/core/macro';import { Plural, Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/ActivityPanelBurstRow.tsx b/packages/app/src/components/ActivityPanelBurstRow.tsxindex 04ded4503..4e9e1b5ed 100644--- a/packages/app/src/components/ActivityPanelBurstRow.tsx+++ b/packages/app/src/components/ActivityPanelBurstRow.tsx@@ -1,5 +1,5 @@-// biome-ignore-all lint/plugin/no-raw-html-interactive-element: pre-rule backlog — the diff-open row target is a raw <button> awaiting shadcn migration; the Restore action already uses shadcn Button. Tracked at https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-raw-html-interactive-elementgrit-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-raw-html-interactive-element -- pre-rule backlog — the diff-open row target is a raw <button> awaiting shadcn migration; the Restore action already uses shadcn Button. Tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-element+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { t } from '@lingui/core/macro';import { Plural, Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/ActivityPanelFileRow.tsx b/packages/app/src/components/ActivityPanelFileRow.tsxindex 7be174e1f..39ba0f9ac 100644--- a/packages/app/src/components/ActivityPanelFileRow.tsx+++ b/packages/app/src/components/ActivityPanelFileRow.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-raw-html-interactive-element: pre-rule backlog — the filename navigate target is a raw <button> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-raw-html-interactive-elementgrit+// oxlint-disable ok/no-raw-html-interactive-element -- pre-rule backlog — the filename navigate target is a raw <button> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-elementimport { t } from '@lingui/core/macro';import { Trans, useLingui } from '@lingui/react/macro';import { useEffect, useState } from 'react';diff --git a/packages/app/src/components/AddPropertiesButton.tsx b/packages/app/src/components/AddPropertiesButton.tsxindex cc2c8bebf..f98851285 100644--- a/packages/app/src/components/AddPropertiesButton.tsx+++ b/packages/app/src/components/AddPropertiesButton.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { plural } from '@lingui/core/macro';import { Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/AgentDiffPane.tsx b/packages/app/src/components/AgentDiffPane.tsxindex 5d17c2a79..0ed9a20d2 100644--- a/packages/app/src/components/AgentDiffPane.tsx+++ b/packages/app/src/components/AgentDiffPane.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport type { FrontmatterDelta } from '@inkeep/open-knowledge-core';import { Plural, Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/AgentIconCluster.tsx b/packages/app/src/components/AgentIconCluster.tsxindex 1d6729ecf..af33dc5a0 100644--- a/packages/app/src/components/AgentIconCluster.tsx+++ b/packages/app/src/components/AgentIconCluster.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { EDITOR_LABELS } from '@inkeep/open-knowledge-core';import { Folder, Sparkles } from 'lucide-react';diff --git a/packages/app/src/components/ArrayOfObjectsWidget.tsx b/packages/app/src/components/ArrayOfObjectsWidget.tsxindex 64d62f571..0c911e375 100644--- a/packages/app/src/components/ArrayOfObjectsWidget.tsx+++ b/packages/app/src/components/ArrayOfObjectsWidget.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport {closestCenter,diff --git a/packages/app/src/components/AuthModal.tsx b/packages/app/src/components/AuthModal.tsxindex 322f48839..bed367e6d 100644--- a/packages/app/src/components/AuthModal.tsx+++ b/packages/app/src/components/AuthModal.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { Trans, useLingui } from '@lingui/react/macro';import { ArrowUpRight, Check, Copy } from 'lucide-react';diff --git a/packages/app/src/components/BottomComposer.tsx b/packages/app/src/components/BottomComposer.tsxindex f6951953b..e05d95a5a 100644--- a/packages/app/src/components/BottomComposer.tsx+++ b/packages/app/src/components/BottomComposer.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { type TargetData, TERMINAL_CLIS, type TerminalCli } from '@inkeep/open-knowledge-core';import { Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/CommandPalette.tsx b/packages/app/src/components/CommandPalette.tsxindex 38c225af3..4ddedbab9 100644--- a/packages/app/src/components/CommandPalette.tsx+++ b/packages/app/src/components/CommandPalette.tsx@@ -1,6 +1,6 @@-// biome-ignore-all lint/plugin/no-raw-html-interactive-element: pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-raw-html-interactive-elementgrit+// oxlint-disable ok/no-raw-html-interactive-element -- pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-element-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport type { WorktreeSelectorEntry } from '@inkeep/open-knowledge-core';import { Plural, Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/ComposerContextChips.tsx b/packages/app/src/components/ComposerContextChips.tsxindex 15b857539..783887e98 100644--- a/packages/app/src/components/ComposerContextChips.tsx+++ b/packages/app/src/components/ComposerContextChips.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { useLingui } from '@lingui/react/macro';import { X } from 'lucide-react';diff --git a/packages/app/src/components/ConflictsSection.tsx b/packages/app/src/components/ConflictsSection.tsxindex 335158492..fedb98766 100644--- a/packages/app/src/components/ConflictsSection.tsx+++ b/packages/app/src/components/ConflictsSection.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { Trans, useLingui } from '@lingui/react/macro';import { AlertTriangle } from 'lucide-react';diff --git a/packages/app/src/components/ConnectingBanner.tsx b/packages/app/src/components/ConnectingBanner.tsxindex 91436ddcf..032ad6472 100644--- a/packages/app/src/components/ConnectingBanner.tsx+++ b/packages/app/src/components/ConnectingBanner.tsx@@ -1,5 +1,5 @@-// biome-ignore-all lint/plugin/no-raw-html-interactive-element: pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-raw-html-interactive-elementgrit-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-raw-html-interactive-element -- pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-element+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { t } from '@lingui/core/macro';import { Trans } from '@lingui/react/macro';diff --git a/packages/app/src/components/ConsentDialogBody.tsx b/packages/app/src/components/ConsentDialogBody.tsxindex 65eddc581..2bb00a8f4 100644--- a/packages/app/src/components/ConsentDialogBody.tsx+++ b/packages/app/src/components/ConsentDialogBody.tsx@@ -1,6 +1,6 @@-// biome-ignore-all lint/plugin/no-raw-html-interactive-element: pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-raw-html-interactive-elementgrit+// oxlint-disable ok/no-raw-html-interactive-element -- pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-element-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { receivesProjectIntegrationWrite } from '@inkeep/open-knowledge-core';import type { MessageDescriptor } from '@lingui/core';diff --git a/packages/app/src/components/DocPanel.tsx b/packages/app/src/components/DocPanel.tsxindex e0d2e234c..deebdc537 100644--- a/packages/app/src/components/DocPanel.tsx+++ b/packages/app/src/components/DocPanel.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { t } from '@lingui/core/macro';import { Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/EditorArea.tsx b/packages/app/src/components/EditorArea.tsxindex b95c4017e..c0d18ac46 100644--- a/packages/app/src/components/EditorArea.tsx+++ b/packages/app/src/components/EditorArea.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport type { HocuspocusProvider } from '@hocuspocus/provider';import {diff --git a/packages/app/src/components/EditorHeader.tsx b/packages/app/src/components/EditorHeader.tsxindex a27d5af5b..95e43ad0d 100644--- a/packages/app/src/components/EditorHeader.tsx+++ b/packages/app/src/components/EditorHeader.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { parseManagedArtifactName } from '@inkeep/open-knowledge-core';import { useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/EditorTabs.tsx b/packages/app/src/components/EditorTabs.tsxindex b4031bc4a..772135ac9 100644--- a/packages/app/src/components/EditorTabs.tsx+++ b/packages/app/src/components/EditorTabs.tsx@@ -1,6 +1,6 @@-// biome-ignore-all lint/plugin/no-raw-html-interactive-element: pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-raw-html-interactive-elementgrit+// oxlint-disable ok/no-raw-html-interactive-element -- pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-element-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { useDndContext } from '@dnd-kit/core';import { horizontalListSortingStrategy, SortableContext, useSortable } from '@dnd-kit/sortable';diff --git a/packages/app/src/components/EditorToolbar.tsx b/packages/app/src/components/EditorToolbar.tsxindex 1f94a9076..a6a0fc224 100644--- a/packages/app/src/components/EditorToolbar.tsx+++ b/packages/app/src/components/EditorToolbar.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport type { HocuspocusProvider } from '@hocuspocus/provider';import {diff --git a/packages/app/src/components/EditorWorkspace.tsx b/packages/app/src/components/EditorWorkspace.tsxindex e387c8256..ed6046d2e 100644--- a/packages/app/src/components/EditorWorkspace.tsx+++ b/packages/app/src/components/EditorWorkspace.tsx@@ -133,7 +133,7 @@ function PaneEdgeDropTarget({data-pane-edge={side}data-editor-pane-id={paneId}data-pane-drop-side={isOver ? side : undefined}- // biome-ignore lint/plugin/no-physical-direction-utility: `side` is the split model's own physical left/right, not a reading-direction edge — this strip has to land on the pane side the pointer is actually over. Whether panes themselves mirror under RTL is still open; mapping to start/end now would pre-commit that answer while looking like a no-op, since the two are identical in LTR.+ // oxlint-disable-next-line ok/no-physical-direction-utility -- `side` is the split model's own physical left/right, not a reading-direction edge — this strip has to land on the pane side the pointer is actually over. Whether panes themselves mirror under RTL is still open; mapping to start/end now would pre-commit that answer while looking like a no-op, since the two are identical in LTR.className={cn('pointer-events-none absolute inset-y-0 z-30 w-12 opacity-0',side === 'left' ? 'left-0' : 'right-0',diff --git a/packages/app/src/components/FeedbackForm.tsx b/packages/app/src/components/FeedbackForm.tsxindex d9b96a1cc..e51760fc7 100644--- a/packages/app/src/components/FeedbackForm.tsx+++ b/packages/app/src/components/FeedbackForm.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { zodResolver } from '@hookform/resolvers/zod';import type { MessageDescriptor } from '@lingui/core';diff --git a/packages/app/src/components/FileSidebar.tsx b/packages/app/src/components/FileSidebar.tsxindex d71f68578..05563caed 100644--- a/packages/app/src/components/FileSidebar.tsx+++ b/packages/app/src/components/FileSidebar.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { humanFormat } from '@inkeep/open-knowledge-core';import { Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/FileTree.tsx b/packages/app/src/components/FileTree.tsxindex 8f587d3b5..68e2cc44d 100644--- a/packages/app/src/components/FileTree.tsx+++ b/packages/app/src/components/FileTree.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport {CreateFolderSuccessSchema,diff --git a/packages/app/src/components/FolderOverview.tsx b/packages/app/src/components/FolderOverview.tsxindex 94b44ba30..7e790072f 100644--- a/packages/app/src/components/FolderOverview.tsx+++ b/packages/app/src/components/FolderOverview.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { t } from '@lingui/core/macro';import { Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/FolderTimelineCard.tsx b/packages/app/src/components/FolderTimelineCard.tsxindex 0cb61d908..aba090f77 100644--- a/packages/app/src/components/FolderTimelineCard.tsx+++ b/packages/app/src/components/FolderTimelineCard.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport type { TimelineEntry } from '@inkeep/open-knowledge-core';import { t } from '@lingui/core/macro';diff --git a/packages/app/src/components/FrontmatterRow.tsx b/packages/app/src/components/FrontmatterRow.tsxindex d1313808d..e0c8591ac 100644--- a/packages/app/src/components/FrontmatterRow.tsx+++ b/packages/app/src/components/FrontmatterRow.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { useSortable } from '@dnd-kit/sortable';import { CSS } from '@dnd-kit/utilities';diff --git a/packages/app/src/components/GraphPanel.tsx b/packages/app/src/components/GraphPanel.tsxindex 38c15b732..b45dfd750 100644--- a/packages/app/src/components/GraphPanel.tsx+++ b/packages/app/src/components/GraphPanel.tsx@@ -1,5 +1,5 @@-// biome-ignore-all lint/plugin/no-raw-html-interactive-element: pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-raw-html-interactive-elementgrit-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-raw-html-interactive-element -- pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-element+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport {type HubEntry,HubsSuccessSchema,diff --git a/packages/app/src/components/HelpPopover.tsx b/packages/app/src/components/HelpPopover.tsxindex 0d99301c2..8cbe84cab 100644--- a/packages/app/src/components/HelpPopover.tsx+++ b/packages/app/src/components/HelpPopover.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { getGitHubStars } from '@inkeep/open-knowledge-core';import type { MessageDescriptor } from '@lingui/core';diff --git a/packages/app/src/components/ImportSkillForm.tsx b/packages/app/src/components/ImportSkillForm.tsxindex 809eb3a52..e9f9f3a0c 100644--- a/packages/app/src/components/ImportSkillForm.tsx+++ b/packages/app/src/components/ImportSkillForm.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport type { SkillDiscover, SkillScope } from '@inkeep/open-knowledge-core';import { Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/InstallInClaudeDesktopDialog.tsx b/packages/app/src/components/InstallInClaudeDesktopDialog.tsxindex 2023d873a..4a2172671 100644--- a/packages/app/src/components/InstallInClaudeDesktopDialog.tsx+++ b/packages/app/src/components/InstallInClaudeDesktopDialog.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { Trans, useLingui } from '@lingui/react/macro';import { ArrowRight, CheckCircle2, Copy, Download, MoveUpRight } from 'lucide-react';diff --git a/packages/app/src/components/LinksPanel.tsx b/packages/app/src/components/LinksPanel.tsxindex 3fdb5debd..ac98edae9 100644--- a/packages/app/src/components/LinksPanel.tsx+++ b/packages/app/src/components/LinksPanel.tsx@@ -1,5 +1,5 @@-// biome-ignore-all lint/plugin/no-raw-html-interactive-element: pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-raw-html-interactive-elementgrit-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-raw-html-interactive-element -- pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-element+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport {type BacklinkEntry,BacklinksSuccessSchema,diff --git a/packages/app/src/components/McpConsentDialogBody.tsx b/packages/app/src/components/McpConsentDialogBody.tsxindex d0b232262..2f90422b9 100644--- a/packages/app/src/components/McpConsentDialogBody.tsx+++ b/packages/app/src/components/McpConsentDialogBody.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { i18n } from '@lingui/core';import { Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/NavigatorApp.tsx b/packages/app/src/components/NavigatorApp.tsxindex 5a7501391..a5b993958 100644--- a/packages/app/src/components/NavigatorApp.tsx+++ b/packages/app/src/components/NavigatorApp.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { Trans, useLingui } from '@lingui/react/macro';import { FileText, Folder, FolderOpenIcon, GitBranch, PlusIcon, XIcon } from 'lucide-react';diff --git a/packages/app/src/components/NewItemDialog.tsx b/packages/app/src/components/NewItemDialog.tsxindex 4affcb72f..9dc95fba1 100644--- a/packages/app/src/components/NewItemDialog.tsx+++ b/packages/app/src/components/NewItemDialog.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport type { MessageDescriptor } from '@lingui/core';import { msg } from '@lingui/core/macro';diff --git a/packages/app/src/components/NewWorktreeDialog.tsx b/packages/app/src/components/NewWorktreeDialog.tsxindex 8271f3c20..287c5902b 100644--- a/packages/app/src/components/NewWorktreeDialog.tsx+++ b/packages/app/src/components/NewWorktreeDialog.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { stripRemotePrefix } from '@inkeep/open-knowledge-core';import type { MessageDescriptor } from '@lingui/core';diff --git a/packages/app/src/components/ObjectWidget.tsx b/packages/app/src/components/ObjectWidget.tsxindex 90d8c5f25..093d8b271 100644--- a/packages/app/src/components/ObjectWidget.tsx+++ b/packages/app/src/components/ObjectWidget.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport {closestCenter,diff --git a/packages/app/src/components/OkBlobRunner.tsx b/packages/app/src/components/OkBlobRunner.tsxindex 50c27440a..974afcf37 100644--- a/packages/app/src/components/OkBlobRunner.tsx+++ b/packages/app/src/components/OkBlobRunner.tsx@@ -231,7 +231,7 @@ export function OkBlobRunner({ autoStart = false }: OkBlobRunnerProps = {}) {ref={(node) => {obstacleRefs.current[i] = node;}}- // biome-ignore lint/plugin/no-physical-direction-utility: physical origin is load-bearing here+ // oxlint-disable-next-line ok/no-physical-direction-utility -- physical origin is load-bearing hereclassName="absolute bottom-0 left-0 rounded-sm bg-muted-foreground/70 will-change-transform"style={{ opacity: 0 }}/>diff --git a/packages/app/src/components/OutlinePanel.tsx b/packages/app/src/components/OutlinePanel.tsxindex e0d59ae7c..efa94a48f 100644--- a/packages/app/src/components/OutlinePanel.tsx+++ b/packages/app/src/components/OutlinePanel.tsx@@ -1,5 +1,5 @@-// biome-ignore-all lint/plugin/no-raw-html-interactive-element: pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-raw-html-interactive-elementgrit-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-raw-html-interactive-element -- pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-element+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport {type HeadingEntry,PageHeadingsSuccessSchema,diff --git a/packages/app/src/components/PackCardGrid.tsx b/packages/app/src/components/PackCardGrid.tsxindex d648b1fc3..84d03d27c 100644--- a/packages/app/src/components/PackCardGrid.tsx+++ b/packages/app/src/components/PackCardGrid.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-raw-html-interactive-element: pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-raw-html-interactive-elementgrit+// oxlint-disable ok/no-raw-html-interactive-element -- pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-elementimport { Trans, useLingui } from '@lingui/react/macro';import {ArrowRight,diff --git a/packages/app/src/components/PageHeaderWidgets.tsx b/packages/app/src/components/PageHeaderWidgets.tsxindex 41ce0789f..df21ec93b 100644--- a/packages/app/src/components/PageHeaderWidgets.tsx+++ b/packages/app/src/components/PageHeaderWidgets.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-raw-html-interactive-element: matches the existing PropertyWidgets.tsx posture — raw `<input>` is the typed-input affordance shared across every frontmatter widget; migrating to shadcn `<Input>` is the file-wide pre-rule backlog described in PropertyWidgets.tsx's top-of-file ignore comment.+// oxlint-disable ok/no-raw-html-interactive-element -- matches the existing PropertyWidgets.tsx posture — raw `<input>` is the typed-input affordance shared across every frontmatter widget; migrating to shadcn `<Input>` is the file-wide pre-rule backlog described in PropertyWidgets.tsx's top-of-file ignore comment.import { ALLOWED_IMAGE_MIME_TYPES } from '@inkeep/open-knowledge-core';import { useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/ProblemsPanel.tsx b/packages/app/src/components/ProblemsPanel.tsxindex a07c7211e..213c86230 100644--- a/packages/app/src/components/ProblemsPanel.tsx+++ b/packages/app/src/components/ProblemsPanel.tsx@@ -1,5 +1,5 @@-// biome-ignore-all lint/plugin/no-raw-html-interactive-element: matches sibling OutlinePanel — positional list of <button> rows awaiting a shared shadcn list primitive; tracked at https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-raw-html-interactive-elementgrit-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-raw-html-interactive-element -- matches sibling OutlinePanel — positional list of <button> rows awaiting a shared shadcn list primitive; tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-element+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport {type FrontmatterScope,isEditableTextDocFile,diff --git a/packages/app/src/components/PropertyWidgets.tsx b/packages/app/src/components/PropertyWidgets.tsxindex 630687f1c..49bfd7ad5 100644--- a/packages/app/src/components/PropertyWidgets.tsx+++ b/packages/app/src/components/PropertyWidgets.tsx@@ -1,6 +1,6 @@-// biome-ignore-all lint/plugin/no-raw-html-interactive-element: pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-raw-html-interactive-elementgrit+// oxlint-disable ok/no-raw-html-interactive-element -- pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-element-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport {FRONTMATTER_TAG_GRAMMAR_HINT,diff --git a/packages/app/src/components/ProseFindBar.tsx b/packages/app/src/components/ProseFindBar.tsxindex 86537e12a..b5f945c26 100644--- a/packages/app/src/components/ProseFindBar.tsx+++ b/packages/app/src/components/ProseFindBar.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { Trans, useLingui } from '@lingui/react/macro';import { ChevronDown, ChevronUp, X } from 'lucide-react';diff --git a/packages/app/src/components/PublishToGitHubDialog.tsx b/packages/app/src/components/PublishToGitHubDialog.tsxindex d9cc86aff..4e5d5ca20 100644--- a/packages/app/src/components/PublishToGitHubDialog.tsx+++ b/packages/app/src/components/PublishToGitHubDialog.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport type { SharePublishOwner } from '@inkeep/open-knowledge-core';import { Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/RecentProjectsMenu.tsx b/packages/app/src/components/RecentProjectsMenu.tsxindex ae591ce6e..1ede0cf1c 100644--- a/packages/app/src/components/RecentProjectsMenu.tsx+++ b/packages/app/src/components/RecentProjectsMenu.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport type { WorktreeSelectorEntry, WorktreeSelectorModel } from '@inkeep/open-knowledge-core';import { Plural, Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/RenderedDiffView.tsx b/packages/app/src/components/RenderedDiffView.tsxindex cd49d9b9a..862d30d71 100644--- a/packages/app/src/components/RenderedDiffView.tsx+++ b/packages/app/src/components/RenderedDiffView.tsx@@ -77,7 +77,7 @@ export function RenderedDiffView({ diff }: { diff: RenderedDiff }) {<div ref={portalSlotRef} style={{ display: 'contents' }} /></div>{createPortal(- // biome-ignore lint/plugin/no-unportaled-editor-content: portaled site — view.dom parent is the exclusively-owned portalTarget per the H6 contract (PRECEDENTS.md #44)+ // oxlint-disable-next-line ok/no-unportaled-editor-content -- portaled site — view.dom parent is the exclusively-owned portalTarget per the H6 contract (PRECEDENTS.md #44)<EditorContent editor={editor} className="tiptap-editor-portal-content" />,portalTarget,)}diff --git a/packages/app/src/components/ReportBugDialogBody.tsx b/packages/app/src/components/ReportBugDialogBody.tsxindex 91b9db273..fd653dd5d 100644--- a/packages/app/src/components/ReportBugDialogBody.tsx+++ b/packages/app/src/components/ReportBugDialogBody.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport type {OkBugReportCrashDetectedEvent,diff --git a/packages/app/src/components/SchemaConfigEditor.tsx b/packages/app/src/components/SchemaConfigEditor.tsxindex 517c015f0..29104eece 100644--- a/packages/app/src/components/SchemaConfigEditor.tsx+++ b/packages/app/src/components/SchemaConfigEditor.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { useLingui } from '@lingui/react/macro';import { useEffect, useState } from 'react';diff --git a/packages/app/src/components/SessionsHost.tsx b/packages/app/src/components/SessionsHost.tsxindex 59fb8741a..0661ae994 100644--- a/packages/app/src/components/SessionsHost.tsx+++ b/packages/app/src/components/SessionsHost.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport {TERMINAL_CLIS,diff --git a/packages/app/src/components/ShareBranchSwitchDialog.tsx b/packages/app/src/components/ShareBranchSwitchDialog.tsxindex efa627faf..c5befbc7b 100644--- a/packages/app/src/components/ShareBranchSwitchDialog.tsx+++ b/packages/app/src/components/ShareBranchSwitchDialog.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport type { WorktreeCreateResult } from '@inkeep/open-knowledge-core';import { Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/ShareButton.tsx b/packages/app/src/components/ShareButton.tsxindex d053b8c11..b725c4dc0 100644--- a/packages/app/src/components/ShareButton.tsx+++ b/packages/app/src/components/ShareButton.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport type { ShareFreshness } from '@inkeep/open-knowledge-core';import { Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/ShareReceiveDialog.tsx b/packages/app/src/components/ShareReceiveDialog.tsxindex 71de26f35..a08f907de 100644--- a/packages/app/src/components/ShareReceiveDialog.tsx+++ b/packages/app/src/components/ShareReceiveDialog.tsx@@ -1,6 +1,6 @@-// biome-ignore-all lint/plugin/no-raw-html-interactive-element: pre-rule backlog — Q2 card grid uses raw <button> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-raw-html-interactive-elementgrit+// oxlint-disable ok/no-raw-html-interactive-element -- pre-rule backlog — Q2 card grid uses raw <button> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-element-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { classifyBranchMatch } from '@inkeep/open-knowledge-core';import { Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/SkillMarkdownViewer.tsx b/packages/app/src/components/SkillMarkdownViewer.tsxindex 596096ec1..be1dfcb27 100644--- a/packages/app/src/components/SkillMarkdownViewer.tsx+++ b/packages/app/src/components/SkillMarkdownViewer.tsx@@ -97,7 +97,7 @@ export function SkillMarkdownViewer({</main>)}{createPortal(- // biome-ignore lint/plugin/no-unportaled-editor-content: portaled site — view.dom parent is the exclusively-owned portalTarget per the H6 contract (PRECEDENTS.md #44)+ // oxlint-disable-next-line ok/no-unportaled-editor-content -- portaled site — view.dom parent is the exclusively-owned portalTarget per the H6 contract (PRECEDENTS.md #44)<EditorContenteditor={editor}className={flow ? 'tiptap-editor-portal-content' : 'tiptap-editor-portal-content h-full'}diff --git a/packages/app/src/components/SkillModeBanner.tsx b/packages/app/src/components/SkillModeBanner.tsxindex 28a955d57..027d00c97 100644--- a/packages/app/src/components/SkillModeBanner.tsx+++ b/packages/app/src/components/SkillModeBanner.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport type { ReactNode } from 'react';import { cn } from '@/lib/utils';diff --git a/packages/app/src/components/SubscribeCard.tsx b/packages/app/src/components/SubscribeCard.tsxindex b8b45759a..5ed3ffbbf 100644--- a/packages/app/src/components/SubscribeCard.tsx+++ b/packages/app/src/components/SubscribeCard.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { Trans, useLingui } from '@lingui/react/macro';import type { ComponentProps, FC } from 'react';diff --git a/packages/app/src/components/SubscribeForm.tsx b/packages/app/src/components/SubscribeForm.tsxindex 5ecc33371..fcff06f4a 100644--- a/packages/app/src/components/SubscribeForm.tsx+++ b/packages/app/src/components/SubscribeForm.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { zodResolver } from '@hookform/resolvers/zod';import { Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/SyncStatusBadge.tsx b/packages/app/src/components/SyncStatusBadge.tsxindex aee634ca6..2094ab823 100644--- a/packages/app/src/components/SyncStatusBadge.tsx+++ b/packages/app/src/components/SyncStatusBadge.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport {type GitStatusCode,diff --git a/packages/app/src/components/TemplateRow.tsx b/packages/app/src/components/TemplateRow.tsxindex 5d75bb2db..de9bef742 100644--- a/packages/app/src/components/TemplateRow.tsx+++ b/packages/app/src/components/TemplateRow.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { Trans, useLingui } from '@lingui/react/macro';import { FilePlus, MoreVertical, Pencil, Trash2 } from 'lucide-react';diff --git a/packages/app/src/components/TerminalTabStrip.tsx b/packages/app/src/components/TerminalTabStrip.tsxindex fe0bbf114..281673d3f 100644--- a/packages/app/src/components/TerminalTabStrip.tsx+++ b/packages/app/src/components/TerminalTabStrip.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { DndContext, type DragEndEvent, PointerSensor, useSensor, useSensors } from '@dnd-kit/core';import {diff --git a/packages/app/src/components/TimelineDiffPane.tsx b/packages/app/src/components/TimelineDiffPane.tsxindex b2738c6e2..0cf238656 100644--- a/packages/app/src/components/TimelineDiffPane.tsx+++ b/packages/app/src/components/TimelineDiffPane.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { ProblemDetailsSchema } from '@inkeep/open-knowledge-core';import { Plural, Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/TimelinePanel.tsx b/packages/app/src/components/TimelinePanel.tsxindex 474bdb4ce..feb85f1ac 100644--- a/packages/app/src/components/TimelinePanel.tsx+++ b/packages/app/src/components/TimelinePanel.tsx@@ -1,5 +1,5 @@-// biome-ignore-all lint/plugin/no-raw-html-interactive-element: pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-raw-html-interactive-elementgrit-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-raw-html-interactive-element -- pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-element+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport {AGENT_ICON_COLORS,diff --git a/packages/app/src/components/UpdateNotices.tsx b/packages/app/src/components/UpdateNotices.tsxindex ea17f182f..a3c9d3e10 100644--- a/packages/app/src/components/UpdateNotices.tsx+++ b/packages/app/src/components/UpdateNotices.tsx@@ -1,6 +1,6 @@-// biome-ignore-all lint/plugin/no-raw-html-interactive-element: pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-raw-html-interactive-elementgrit+// oxlint-disable ok/no-raw-html-interactive-element -- pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-element-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { useLingui } from '@lingui/react/macro';import { X } from 'lucide-react';diff --git a/packages/app/src/components/acp/ThreadView.tsx b/packages/app/src/components/acp/ThreadView.tsxindex f042b94c7..fec3d7d37 100644--- a/packages/app/src/components/acp/ThreadView.tsx+++ b/packages/app/src/components/acp/ThreadView.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { deriveAgentPosture } from '@inkeep/open-knowledge-core/acp/agent-posture';import type {diff --git a/packages/app/src/components/emoji-picker.tsx b/packages/app/src/components/emoji-picker.tsxindex f9721f620..19c2ec17d 100644--- a/packages/app/src/components/emoji-picker.tsx+++ b/packages/app/src/components/emoji-picker.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-raw-html-interactive-element: frimousse's `EmojiPicker.List` overrides spread the library's own props (active-state data attrs, virtualised-grid wiring) onto a plain element; shadcn Button's variant styling would fight the picker grid. Moved verbatim from PageHeaderWidgets.tsx, which carries the same file-level posture.+// oxlint-disable ok/no-raw-html-interactive-element -- frimousse's `EmojiPicker.List` overrides spread the library's own props (active-state data attrs, virtualised-grid wiring) onto a plain element; shadcn Button's variant styling would fight the picker grid. Moved verbatim from PageHeaderWidgets.tsx, which carries the same file-level posture.import { Trans, useLingui } from '@lingui/react/macro';import { EmojiPicker, type EmojiPickerListComponents } from 'frimousse';diff --git a/packages/app/src/components/file-entry-icon.tsx b/packages/app/src/components/file-entry-icon.tsxindex 4359c13e6..658697f94 100644--- a/packages/app/src/components/file-entry-icon.tsx+++ b/packages/app/src/components/file-entry-icon.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { mediaKindForSidebarAssetExtension } from '@inkeep/open-knowledge-core';import { File, Film, FolderOpen, ImageIcon, Volume2 } from 'lucide-react';diff --git a/packages/app/src/components/handoff/OpenInAgentContextSubmenu.tsx b/packages/app/src/components/handoff/OpenInAgentContextSubmenu.tsxindex 37355ef49..b8b3b6e27 100644--- a/packages/app/src/components/handoff/OpenInAgentContextSubmenu.tsx+++ b/packages/app/src/components/handoff/OpenInAgentContextSubmenu.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport {type HandoffOutcome,diff --git a/packages/app/src/components/handoff/OpenInAgentEmptySpaceSubmenu.tsx b/packages/app/src/components/handoff/OpenInAgentEmptySpaceSubmenu.tsxindex 0ef52cc77..d65948a73 100644--- a/packages/app/src/components/handoff/OpenInAgentEmptySpaceSubmenu.tsx+++ b/packages/app/src/components/handoff/OpenInAgentEmptySpaceSubmenu.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport {type HandoffOutcome,diff --git a/packages/app/src/components/handoff/OpenInAgentMenuItem.tsx b/packages/app/src/components/handoff/OpenInAgentMenuItem.tsxindex 7e67840c0..17d9722b6 100644--- a/packages/app/src/components/handoff/OpenInAgentMenuItem.tsx+++ b/packages/app/src/components/handoff/OpenInAgentMenuItem.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport {AGENT_ICON_COLORS,diff --git a/packages/app/src/components/recent-remove-controls.tsx b/packages/app/src/components/recent-remove-controls.tsxindex 568e816e4..b25e40689 100644--- a/packages/app/src/components/recent-remove-controls.tsx+++ b/packages/app/src/components/recent-remove-controls.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { Trans, useLingui } from '@lingui/react/macro';import { X } from 'lucide-react';diff --git a/packages/app/src/components/settings/CustomThemeEditor.tsx b/packages/app/src/components/settings/CustomThemeEditor.tsxindex 6f283f94d..10f8ddadd 100644--- a/packages/app/src/components/settings/CustomThemeEditor.tsx+++ b/packages/app/src/components/settings/CustomThemeEditor.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport {BASE16_SLOT_ROLES,diff --git a/packages/app/src/components/settings/LinkPreviewsSection.tsx b/packages/app/src/components/settings/LinkPreviewsSection.tsxindex a16f64e36..803c4afeb 100644--- a/packages/app/src/components/settings/LinkPreviewsSection.tsx+++ b/packages/app/src/components/settings/LinkPreviewsSection.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { humanFormat } from '@inkeep/open-knowledge-core';import { Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/settings/OkignoreSection.tsx b/packages/app/src/components/settings/OkignoreSection.tsxindex d9febb12d..95ccec96a 100644--- a/packages/app/src/components/settings/OkignoreSection.tsx+++ b/packages/app/src/components/settings/OkignoreSection.tsx@@ -1,6 +1,6 @@-// biome-ignore-all lint/plugin/no-raw-html-interactive-element: pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-raw-html-interactive-elementgrit+// oxlint-disable ok/no-raw-html-interactive-element -- pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-element-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport {closestCenter,diff --git a/packages/app/src/components/settings/SearchSection.tsx b/packages/app/src/components/settings/SearchSection.tsxindex 59346a7ee..52c1f77b4 100644--- a/packages/app/src/components/settings/SearchSection.tsx+++ b/packages/app/src/components/settings/SearchSection.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport {checkEmbeddingsBaseUrl,diff --git a/packages/app/src/components/settings/SettingsDialogShell.tsx b/packages/app/src/components/settings/SettingsDialogShell.tsxindex 43c1febd3..428d9233f 100644--- a/packages/app/src/components/settings/SettingsDialogShell.tsx+++ b/packages/app/src/components/settings/SettingsDialogShell.tsx@@ -1,6 +1,6 @@-// biome-ignore-all lint/plugin/no-raw-html-interactive-element: pre-rule backlog — file uses raw <button> awaiting shadcn Button migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-raw-html-interactive-elementgrit+// oxlint-disable ok/no-raw-html-interactive-element -- pre-rule backlog — file uses raw <button> awaiting shadcn Button migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-element-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { SHOW_INSTALL_SKILL } from '@inkeep/open-knowledge-core';import { Plural, Trans, useLingui } from '@lingui/react/macro';diff --git a/packages/app/src/components/settings/SharingSection.tsx b/packages/app/src/components/settings/SharingSection.tsxindex 36e567a48..b98c86e24 100644--- a/packages/app/src/components/settings/SharingSection.tsx+++ b/packages/app/src/components/settings/SharingSection.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport { Trans, useLingui } from '@lingui/react/macro';import { useEffect, useState } from 'react';diff --git a/packages/app/src/components/settings/SkillTargetsPicker.tsx b/packages/app/src/components/settings/SkillTargetsPicker.tsxindex 97bca93ea..eea53b0f7 100644--- a/packages/app/src/components/settings/SkillTargetsPicker.tsx+++ b/packages/app/src/components/settings/SkillTargetsPicker.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport {AGENTS_SKILLS_ROOT,diff --git a/packages/app/src/components/settings/frontmatter-schema-field-editor.tsx b/packages/app/src/components/settings/frontmatter-schema-field-editor.tsxindex 5ddaa92f7..35d80317c 100644--- a/packages/app/src/components/settings/frontmatter-schema-field-editor.tsx+++ b/packages/app/src/components/settings/frontmatter-schema-field-editor.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport type {FrontmatterFieldConstraint,diff --git a/packages/app/src/components/settings/lint-plugin-meta.ts b/packages/app/src/components/settings/lint-plugin-meta.tsindex 26fb61d0e..ba3b6ada7 100644--- a/packages/app/src/components/settings/lint-plugin-meta.ts+++ b/packages/app/src/components/settings/lint-plugin-meta.ts@@ -14,7 +14,7 @@ export const LINT_PLUGIN_META: LintPluginMeta[] = [{ id: 'markdownlint', label: 'markdownlint', docUrl: `${DOCS_BASE}/markdownlint` },{id: 'frontmatter',- // biome-ignore lint/plugin/no-unwrapped-user-facing-string: names the frontmatter plugin, and `frontmatter` is a GLOSSARY never-translate term — this label is the plugin's name beside `markdownlint`, not copy.+ // oxlint-disable-next-line ok/no-unwrapped-user-facing-string -- names the frontmatter plugin, and `frontmatter` is a GLOSSARY never-translate term — this label is the plugin's name beside `markdownlint`, not copy.label: 'Frontmatter schemas',docUrl: `${DOCS_BASE}/frontmatter`,},diff --git a/packages/app/src/components/ui/spinner.tsx b/packages/app/src/components/ui/spinner.tsxindex ac9d4286c..6d963d7c6 100644--- a/packages/app/src/components/ui/spinner.tsx+++ b/packages/app/src/components/ui/spinner.tsx@@ -13,7 +13,7 @@ function Spinner({<Iconrole="status"aria-label={t`Loading`}- // biome-ignore lint/plugin/no-hand-rolled-spinner: this is the primitive the rule points callers to+ // oxlint-disable-next-line ok/no-hand-rolled-spinner -- this is the primitive the rule points callers toclassName={cn('size-4 animate-spin motion-reduce:animate-none', className)}{...props}/>diff --git a/packages/app/src/editor/ComposerMentionInput.tsx b/packages/app/src/editor/ComposerMentionInput.tsxindex cf9060a2e..ebef50e49 100644--- a/packages/app/src/editor/ComposerMentionInput.tsx+++ b/packages/app/src/editor/ComposerMentionInput.tsx@@ -237,7 +237,7 @@ export function ComposerMentionInput({return (<>- {/* biome-ignore lint/plugin/no-unportaled-editor-content: standalone single-instance composer editor — not an Activity-pool document editor. EditorContent's own wrapper element still exclusively parents view.dom (the slash hint below is a sibling of that wrapper, never inside it), so the H6 cross-doc DOM vacuum the portal guards against (precedent #44) cannot apply here. */}+ {/* oxlint-disable-next-line ok/no-unportaled-editor-content -- standalone single-instance composer editor — not an Activity-pool document editor. EditorContent's own wrapper element still exclusively parents view.dom (the slash hint below is a sibling of that wrapper, never inside it), so the H6 cross-doc DOM vacuum the portal guards against (precedent #44) cannot apply here. */}<EditorContent editor={editor} className={className} />{}{slashCommands !== undefined ? (diff --git a/packages/app/src/editor/TiptapEditor.tsx b/packages/app/src/editor/TiptapEditor.tsxindex c1112ed2e..eecccab26 100644--- a/packages/app/src/editor/TiptapEditor.tsx+++ b/packages/app/src/editor/TiptapEditor.tsx@@ -1229,7 +1229,7 @@ const TiptapEditorChrome: FC<TiptapEditorChromeProps> = ({{}<div ref={portalSlotRef} style={{ display: 'contents' }} />{createPortal(- // biome-ignore lint/plugin/no-unportaled-editor-content: canonical portaled site — H6 fix per PRECEDENTS.md #44+ // oxlint-disable-next-line ok/no-unportaled-editor-content -- canonical portaled site — H6 fix per PRECEDENTS.md #44<EditorContentkey={editorContentRevision}editor={editor}diff --git a/packages/app/src/editor/extensions/ImageReferenceView.dom.test.tsx b/packages/app/src/editor/extensions/ImageReferenceView.dom.test.tsxindex fdad2a561..5f6fba681 100644--- a/packages/app/src/editor/extensions/ImageReferenceView.dom.test.tsx+++ b/packages/app/src/editor/extensions/ImageReferenceView.dom.test.tsx@@ -24,7 +24,7 @@ function Host({ content }: { content: object }) {}, [portalTarget]);return createPortal(- // biome-ignore lint/plugin/no-unportaled-editor-content: portalled per the H6 contract — this IS the sanctioned createPortal shape, in a test harness with a per-render exclusive target+ // oxlint-disable-next-line ok/no-unportaled-editor-content -- portalled per the H6 contract — this IS the sanctioned createPortal shape, in a test harness with a per-render exclusive target<EditorContent editor={editor} />,portalTarget,);diff --git a/packages/app/src/editor/extensions/JsxInlineView.dom.test.tsx b/packages/app/src/editor/extensions/JsxInlineView.dom.test.tsxindex 94f48d6cc..fbfec8ae4 100644--- a/packages/app/src/editor/extensions/JsxInlineView.dom.test.tsx+++ b/packages/app/src/editor/extensions/JsxInlineView.dom.test.tsx@@ -24,7 +24,7 @@ function Host({ content, onEditor }: { content: object; onEditor: (e: Editor) =>}, [portalTarget]);if (editor) onEditor(editor);return createPortal(- // biome-ignore lint/plugin/no-unportaled-editor-content: portalled per the H6 contract — this IS the sanctioned createPortal shape, in a test harness with a per-render exclusive target+ // oxlint-disable-next-line ok/no-unportaled-editor-content -- portalled per the H6 contract — this IS the sanctioned createPortal shape, in a test harness with a per-render exclusive target<EditorContent editor={editor} />,portalTarget,);diff --git a/packages/app/src/editor/extensions/WikiLinkEmbedImageView.dom.test.tsx b/packages/app/src/editor/extensions/WikiLinkEmbedImageView.dom.test.tsxindex b3e934015..a7bcaf170 100644--- a/packages/app/src/editor/extensions/WikiLinkEmbedImageView.dom.test.tsx+++ b/packages/app/src/editor/extensions/WikiLinkEmbedImageView.dom.test.tsx@@ -38,7 +38,7 @@ function WikiImageHost() {}, [portalTarget]);return createPortal(- // biome-ignore lint/plugin/no-unportaled-editor-content: portalled per the H6 contract — this IS the sanctioned createPortal shape, in a test harness with a per-render exclusive target+ // oxlint-disable-next-line ok/no-unportaled-editor-content -- portalled per the H6 contract — this IS the sanctioned createPortal shape, in a test harness with a per-render exclusive target<EditorContent editor={editor} />,portalTarget,);diff --git a/packages/app/src/editor/extensions/suggestion-atomicity.dom.test.tsx b/packages/app/src/editor/extensions/suggestion-atomicity.dom.test.tsxindex 1a953c925..d1d362a0a 100644--- a/packages/app/src/editor/extensions/suggestion-atomicity.dom.test.tsx+++ b/packages/app/src/editor/extensions/suggestion-atomicity.dom.test.tsx@@ -14,7 +14,7 @@* data loss.** This is the runtime complement to the `no-split-suggestion-dispatch`- * GritQL rule: the lint catches a bare trigger-delete dispatch statically;+ * oxlint rule: the lint catches a bare trigger-delete dispatch statically;* this test drives each surface through a real Enter keydown (the production* `command` callbacks are closure-held inside the Suggestion plugins, so the* keydown path is the only way to run them) and asserts thediff --git a/packages/app/src/lint-plugins/no-raw-route-hash-construction.test.ts b/packages/app/src/lint-plugins/no-raw-route-hash-construction.test.tsindex e6b54bb0e..5f957808d 100644--- a/packages/app/src/lint-plugins/no-raw-route-hash-construction.test.ts+++ b/packages/app/src/lint-plugins/no-raw-route-hash-construction.test.ts@@ -1,15 +1,19 @@import { spawnSync } from 'node:child_process';import { join } from 'node:path';import { describe, expect, test } from 'vitest';-import { readBiomeConfig } from '../../../../test-support/read-biome-config.test-helper.ts';+import {+ oxlintFixtureArgs,+ readEnabledRuleIds,+ readRegisteredRuleNames,+ readRuleScope,+} from '../../../../test-support/read-ok-rules-config.test-helper';const REPO_ROOT = join(__dirname, '..', '..', '..', '..');-const FIXTURE_REL = 'biome-plugins/__fixtures__/no-raw-route-hash-construction.fixture.tsx';-const PLUGIN_REL = './biome-plugins/no-raw-route-hash-construction.grit';+const FIXTURE_REL = 'lint-plugins/ok-rules/__fixtures__/no-raw-route-hash-construction.fixture.tsx';-describe('no-raw-route-hash-construction GritQL plugin', () => {+describe('no-raw-route-hash-construction oxlint rule', () => {test('fires exactly 5 times — one per hand-built hash, none on the read forms', () => {- const result = spawnSync('pnpm', ['exec', 'biome', 'check', FIXTURE_REL], {+ const result = spawnSync('pnpm', oxlintFixtureArgs(FIXTURE_REL), {cwd: REPO_ROOT,encoding: 'utf-8',windowsHide: true,@@ -23,22 +27,25 @@ describe('no-raw-route-hash-construction GritQL plugin', () => {expect(output).toContain('hashFromDocName');expect(output).toContain('hashFromFolderPath');- expect(output).toContain('biome-plugins/README.md#no-raw-route-hash-constructiongrit');+ expect(output).toContain('lint-plugins/ok-rules/README.md#no-raw-route-hash-construction');});- test('plugin is registered in biome.jsonc via overrides, with doc-hash.ts excluded', () => {- const config = readBiomeConfig(REPO_ROOT);-- expect(config.plugins ?? []).not.toContain(PLUGIN_REL);-- const overrides = config.overrides ?? [];- const matchingOverride = overrides.find((entry) => (entry.plugins ?? []).includes(PLUGIN_REL));- expect(matchingOverride).toBeDefined();+ test('rule is registered, enabled, and scoped with doc-hash.ts excluded', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain('no-raw-route-hash-construction');+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain('ok/no-raw-route-hash-construction');+ });- const includes = matchingOverride?.includes ?? [];- expect(includes).toContain('packages/app/src/**/*.ts');- expect(includes).toContain('packages/app/src/**/*.tsx');- expect(includes).toContain('!packages/app/src/lib/doc-hash.ts');- expect(includes).toContain(FIXTURE_REL);+ test('its scope table still carries every include and exclude the rule depends on', () => {+ const scope = readRuleScope(REPO_ROOT, 'no-raw-route-hash-construction');+ expect(scope.sort()).toEqual(+ [+ 'packages/app/src/**/*.ts',+ 'packages/app/src/**/*.tsx',+ '!packages/app/src/lib/doc-hash.ts',+ '!**/*.test.ts',+ '!**/*.test.tsx',+ 'lint-plugins/ok-rules/__fixtures__/no-raw-route-hash-construction.fixture.tsx',+ ].sort(),+ );});});diff --git a/packages/app/src/presence/PresenceBar.tsx b/packages/app/src/presence/PresenceBar.tsxindex 4679477f8..b1c48e05d 100644--- a/packages/app/src/presence/PresenceBar.tsx+++ b/packages/app/src/presence/PresenceBar.tsx@@ -1,5 +1,5 @@-// biome-ignore-all lint/plugin/no-raw-html-interactive-element: pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-raw-html-interactive-elementgrit-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-raw-html-interactive-element -- pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-raw-html-interactive-element+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport {type AgentPresenceEntry,computeInitials,diff --git a/packages/app/src/uninstall/UninstallNoticeScreen.tsx b/packages/app/src/uninstall/UninstallNoticeScreen.tsxindex 404db8d8c..293959cbf 100644--- a/packages/app/src/uninstall/UninstallNoticeScreen.tsx+++ b/packages/app/src/uninstall/UninstallNoticeScreen.tsx@@ -1,4 +1,4 @@-// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit+// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utilityimport type {UninstallNoticeChecklistItem,diff --git a/packages/app/src/uninstall/UninstallProgressScreen.tsx b/packages/app/src/uninstall/UninstallProgressScreen.tsxindex 6a23cd529..27382b48f 100644--- a/packages/app/src/uninstall/UninstallProgressScreen.tsx+++ b/packages/app/src/uninstall/UninstallProgressScreen.tsx@@ -7,7 +7,7 @@ export function UninstallProgressScreen() {<div role="status" className="max-w-vw px-7 py-7 text-center"><Spinner aria-hidden="true" className="mx-auto mb-4 size-8 text-primary" /><h1 className="mb-2 font-medium text-base leading-none">- {/* biome-ignore lint/plugin/microcopy-ellipsis: the uninstall migration to React is a+ {/* oxlint-disable-next-line ok/microcopy-ellipsis -- the uninstall migration to React is apure render-swap — this heading is carried over verbatim from the screen it replaces,and a copy-parity gate compares the two. Reword both surfaces together or neither. */}<Trans>Removing OpenKnowledge files…</Trans>diff --git a/packages/app/tests/dom/jsx-inline-item-growth.dom.test.tsx b/packages/app/tests/dom/jsx-inline-item-growth.dom.test.tsxindex dbb5b216c..22655b0f7 100644--- a/packages/app/tests/dom/jsx-inline-item-growth.dom.test.tsx+++ b/packages/app/tests/dom/jsx-inline-item-growth.dom.test.tsx@@ -58,7 +58,7 @@ function Host({ ydoc, onEditor }: { ydoc: Y.Doc; onEditor: (editor: Editor) => v}, [portalTarget]);if (editor) onEditor(editor);return createPortal(- // biome-ignore lint/plugin/no-unportaled-editor-content: portalled per the H6 contract, with a per-render exclusive target owned by this harness+ // oxlint-disable-next-line ok/no-unportaled-editor-content -- portalled per the H6 contract, with a per-render exclusive target owned by this harness<EditorContent editor={editor} />,portalTarget,);diff --git a/packages/app/tests/integration/microcopy-ellipsis.test.ts b/packages/app/tests/integration/microcopy-ellipsis.test.tsindex 0f65d353e..d7fef8f35 100644--- a/packages/app/tests/integration/microcopy-ellipsis.test.ts+++ b/packages/app/tests/integration/microcopy-ellipsis.test.ts@@ -1,8 +1,8 @@/**- * Microcopy ellipsis convention — `microcopy-ellipsis` GritQL plugin.+ * Microcopy ellipsis convention — `microcopy-ellipsis` oxlint rule.*- * Plugin: `biome-plugins/microcopy-ellipsis.grit`- * Fixture: `biome-plugins/__fixtures__/microcopy-ellipsis.fixture.tsx`+ * Rule: `lint-plugins/ok-rules/rules/microcopy-ellipsis.mjs`+ * Fixture: `lint-plugins/ok-rules/__fixtures__/microcopy-ellipsis.fixture.tsx`** The codebase reserves U+2026 (`…`) for two surfaces only:* 1. macOS native menu items (`packages/desktop/src/main/menu.ts`)@@ -11,27 +11,31 @@* Per precedent #42. The fixture pairs 2 positive cases (JSX text + JSX* attribute containing `…`) with 3 negative cases (clean text, clean* attribute, and `…` inside a non-UI attribute that the rule must skip);- * the test asserts the plugin fires exactly 2 times.+ * the test asserts the rule fires exactly 2 times.** Exact equality (`toBe(2)`) catches drift in both directions:* - false-negative: a weakened pattern drops below 2 → fails* - false-positive: a widened pattern fires on a clean case → above 2 → fails** Test shape: real input → public- * interface (`biome check`) → observable outcome (diagnostic count).+ * interface (`oxlintFixtureArgs()` → `pnpm exec oxlint`) → observable outcome (diagnostic count).*/import { spawnSync } from 'node:child_process';import { join } from 'node:path';import { describe, expect, test } from 'vitest';-import { readBiomeConfig } from '../../../../test-support/read-biome-config.test-helper';+import {+ oxlintFixtureArgs,+ readEnabledRuleIds,+ readRegisteredRuleNames,+} from '../../../../test-support/read-ok-rules-config.test-helper';const REPO_ROOT = join(__dirname, '..', '..', '..', '..');-const FIXTURE_REL = 'biome-plugins/__fixtures__/microcopy-ellipsis.fixture.tsx';+const FIXTURE_REL = 'lint-plugins/ok-rules/__fixtures__/microcopy-ellipsis.fixture.tsx';-describe('microcopy-ellipsis GritQL plugin', () => {+describe('microcopy-ellipsis oxlint rule', () => {test('fires on exactly 2 positive cases (and on no negative case)', () => {- const result = spawnSync('pnpm', ['exec', 'biome', 'check', FIXTURE_REL], {+ const result = spawnSync('pnpm', oxlintFixtureArgs(FIXTURE_REL), {cwd: REPO_ROOT,encoding: 'utf-8',});@@ -41,12 +45,11 @@ describe('microcopy-ellipsis GritQL plugin', () => {expect(fires).toBe(2);expect(output).toContain('drop the trailing');expect(output).toMatch(/https?:\/\/[^\s]+/);- expect(output).toContain('biome-plugins/README.md#microcopy-ellipsisgrit');+ expect(output).toContain('lint-plugins/ok-rules/README.md#microcopy-ellipsis');});- test('plugin is registered in biome.jsonc', () => {- const config = readBiomeConfig(REPO_ROOT);- const plugins = config.plugins ?? [];- expect(plugins).toContain('./biome-plugins/microcopy-ellipsis.grit');+ test('rule is registered, enabled, and deliberately unscoped', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain('microcopy-ellipsis');+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain('ok/microcopy-ellipsis');});});diff --git a/packages/app/tests/integration/no-unportaled-editor-content.test.ts b/packages/app/tests/integration/no-unportaled-editor-content.test.tsindex 1aae69922..44822a917 100644--- a/packages/app/tests/integration/no-unportaled-editor-content.test.ts+++ b/packages/app/tests/integration/no-unportaled-editor-content.test.ts@@ -1,34 +1,38 @@/**- * `no-unportaled-editor-content` GritQL plugin test.+ * `no-unportaled-editor-content` oxlint rule test.*- * Plugin: `biome-plugins/no-unportaled-editor-content.grit`- * Fixture: `biome-plugins/__fixtures__/no-unportaled-editor-content.fixture.tsx`+ * Rule: `lint-plugins/ok-rules/rules/no-unportaled-editor-content.mjs`+ * Fixture: `lint-plugins/ok-rules/__fixtures__/no-unportaled-editor-content.fixture.tsx`*- * Per precedent #42 (custom Biome enforcement is GritQL plugins). The+ * Per precedent #42 (custom lint enforcement is oxlint JS-plugin rules). The* fixture pairs 3 positive cases (bare/paired/nested `<EditorContent />`)* with 3 negative cases (canonical portaled site with inline suppression,* `<PureEditorContent />` sibling, bare import). The test asserts the- * plugin fires exactly 3 times.+ * rule fires exactly 3 times.** Exact equality (`toBe(3)`) catches drift in both directions:* - false-negative: a weakened pattern drops below 3 → fails* - false-positive: a widened pattern fires on a negative case → above 3 → fails** real input → public- * interface (`biome check`) → observable outcome (diagnostic count).+ * interface (`oxlintFixtureArgs()` → `pnpm exec oxlint`) → observable outcome (diagnostic count).*/import { spawnSync } from 'node:child_process';import { join } from 'node:path';import { describe, expect, test } from 'vitest';-import { readBiomeConfig } from '../../../../test-support/read-biome-config.test-helper';+import {+ oxlintFixtureArgs,+ readEnabledRuleIds,+ readRegisteredRuleNames,+} from '../../../../test-support/read-ok-rules-config.test-helper';const REPO_ROOT = join(__dirname, '..', '..', '..', '..');-const FIXTURE_REL = 'biome-plugins/__fixtures__/no-unportaled-editor-content.fixture.tsx';+const FIXTURE_REL = 'lint-plugins/ok-rules/__fixtures__/no-unportaled-editor-content.fixture.tsx';-describe('no-unportaled-editor-content GritQL plugin', () => {+describe('no-unportaled-editor-content oxlint rule', () => {test('fires on exactly 3 positive cases (and on no negative case)', () => {- const result = spawnSync('pnpm', ['exec', 'biome', 'check', FIXTURE_REL], {+ const result = spawnSync('pnpm', oxlintFixtureArgs(FIXTURE_REL), {cwd: REPO_ROOT,encoding: 'utf-8',});@@ -38,12 +42,11 @@ describe('no-unportaled-editor-content GritQL plugin', () => {expect(fires).toBe(3);expect(output).toContain('render <EditorContent />');expect(output).toMatch(/https?:\/\/[^\s]+/);- expect(output).toContain('biome-plugins/README.md#no-unportaled-editor-contentgrit');+ expect(output).toContain('lint-plugins/ok-rules/README.md#no-unportaled-editor-content');});- test('plugin is registered in biome.jsonc', () => {- const config = readBiomeConfig(REPO_ROOT);- const plugins = config.plugins ?? [];- expect(plugins).toContain('./biome-plugins/no-unportaled-editor-content.grit');+ test('rule is registered, enabled, and deliberately unscoped', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain('no-unportaled-editor-content');+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain('ok/no-unportaled-editor-content');});});diff --git a/packages/app/tests/lint-plugins/no-blind-agent-host-fanout.test.ts b/packages/app/tests/lint-plugins/no-blind-agent-host-fanout.test.tsindex 635accb09..7d143711f 100644--- a/packages/app/tests/lint-plugins/no-blind-agent-host-fanout.test.ts+++ b/packages/app/tests/lint-plugins/no-blind-agent-host-fanout.test.ts@@ -1,10 +1,10 @@/**- * no-blind-agent-host-fanout — Biome GritQL plugin fixture test.+ * no-blind-agent-host-fanout — oxlint rule fixture test.*- * Plugin: `biome-plugins/no-blind-agent-host-fanout.grit`- * Fixture: `biome-plugins/__fixtures__/no-blind-agent-host-fanout.fixture.tsx`+ * Rule: `lint-plugins/ok-rules/rules/no-blind-agent-host-fanout.mjs`+ * Fixture: `lint-plugins/ok-rules/__fixtures__/no-blind-agent-host-fanout.fixture.tsx`*- * Per precedent #42 (custom Biome enforcement is GritQL plugins). Forbids+ * Per precedent #42 (custom lint enforcement is oxlint JS-plugin rules). Forbids* re-introducing the `npx skills … --agent '*'` shell-out that made `ok init`* create skill directories in every host the third-party CLI knows about,* including ~51 for tools the user had never installed (issue #820). OK now@@ -13,7 +13,7 @@* Three guarantees, each its own test:* 1. Fires on exactly the planted positives (and on no negative) — the* bidirectional `toBe(5)` count, plus the diagnostic-message contract.- * 2. Registered as an override scoped to the packages that own the install,+ * 2. Scoped via its RULE_SCOPES entry to the packages that own the install,* with tests deliberately IN scope.* 3. The banned npm-spec arms cover every range shape of the pinned spec the* incident shipped with, so a caret/exact/latest variant can't slip past a@@ -21,19 +21,22 @@*/import { spawnSync } from 'node:child_process';-import { readFileSync } from 'node:fs';import { join } from 'node:path';import { describe, expect, test } from 'vitest';-import { readBiomeConfig } from '../../../../test-support/read-biome-config.test-helper';+import { FORBIDDEN_SPECS } from '../../../../lint-plugins/ok-rules/rules/no-blind-agent-host-fanout.mjs';+import {+ oxlintFixtureArgs,+ readEnabledRuleIds,+ readRegisteredRuleNames,+ readRuleScope,+} from '../../../../test-support/read-ok-rules-config.test-helper';const REPO_ROOT = join(__dirname, '..', '..', '..', '..');-const FIXTURE_REL = 'biome-plugins/__fixtures__/no-blind-agent-host-fanout.fixture.tsx';-const PLUGIN_REL = './biome-plugins/no-blind-agent-host-fanout.grit';-const GRIT_ABS = join(REPO_ROOT, 'biome-plugins/no-blind-agent-host-fanout.grit');+const FIXTURE_REL = 'lint-plugins/ok-rules/__fixtures__/no-blind-agent-host-fanout.fixture.tsx';-describe('no-blind-agent-host-fanout GritQL plugin', () => {+describe('no-blind-agent-host-fanout oxlint rule', () => {test('fires on exactly 5 planted positives (and on no negative case)', () => {- const result = spawnSync('pnpm', ['exec', 'biome', 'check', FIXTURE_REL], {+ const result = spawnSync('pnpm', oxlintFixtureArgs(FIXTURE_REL), {cwd: REPO_ROOT,encoding: 'utf-8',});@@ -47,32 +50,27 @@ describe('no-blind-agent-host-fanout GritQL plugin', () => {expect(output).toContain('detectUserSkillHosts');expect(output).toContain('HOSTS_WITH_USER_SKILL_DIR');expect(output).toMatch(/https?:\/\/[^\s]+/);- expect(output).toContain('biome-plugins/README.md#no-blind-agent-host-fanoutgrit');+ expect(output).toContain('lint-plugins/ok-rules/README.md#no-blind-agent-host-fanout');});- test('registered as an override over the packages that own the install, tests included', () => {- const config = readBiomeConfig(REPO_ROOT);- const rootPlugins: string[] = config.plugins ?? [];- expect(rootPlugins).not.toContain(PLUGIN_REL);+ test('rule is registered, enabled, and scoped via its RULE_SCOPES entry', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain('no-blind-agent-host-fanout');+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain('ok/no-blind-agent-host-fanout');+ expect(readRuleScope(REPO_ROOT, 'no-blind-agent-host-fanout')).not.toEqual([]);+ });- const overrides: Array<{ includes?: string[]; plugins?: string[] }> = config.overrides ?? [];- const entry = overrides.find((o) => (o.plugins ?? []).includes(PLUGIN_REL));- expect(entry).toBeDefined();- const includes = entry?.includes ?? [];- expect(includes).toContain(FIXTURE_REL);- expect(includes).toContain('packages/server/src/**/*.ts');- expect(includes).toContain('packages/cli/src/**/*.ts');+ test('its scope table still carries every include and exclude the rule depends on', () => {+ const scope = readRuleScope(REPO_ROOT, 'no-blind-agent-host-fanout');+ expect(scope).toContain(FIXTURE_REL);+ expect(scope).toContain('packages/server/src/**/*.ts');+ expect(scope).toContain('packages/cli/src/**/*.ts');for (const excluded of ['!**/*.test.ts', '!**/*.test-helper.ts']) {- expect(includes).not.toContain(excluded);+ expect(scope).not.toContain(excluded);}});test('bans every range shape of the spec, not just the one that shipped', () => {- const gritArms = readFileSync(GRIT_ABS, 'utf-8')- .split('\n')- .filter((line) => !line.trimStart().startsWith('//'))- .join('\n');- const matched = [...gritArms.matchAll(/`'([^']+)'`/g)].map((m) => m[1]).sort();+ const matched = [...FORBIDDEN_SPECS].sort();expect(matched.length).toBeGreaterThan(0);for (const spec of ['skills@~1.5.0', 'skills@^1.5.0', '[email protected]', 'skills@latest']) {expect(matched).toContain(spec);diff --git a/packages/app/tests/lint-plugins/no-demoted-dialog-confirm.test.ts b/packages/app/tests/lint-plugins/no-demoted-dialog-confirm.test.tsindex 64ba816b4..859088c45 100644--- a/packages/app/tests/lint-plugins/no-demoted-dialog-confirm.test.ts+++ b/packages/app/tests/lint-plugins/no-demoted-dialog-confirm.test.ts@@ -1,14 +1,14 @@/**- * no-demoted-dialog-confirm — Biome GritQL plugin fixture test.+ * no-demoted-dialog-confirm — oxlint rule fixture test.*- * Plugin: `biome-plugins/no-demoted-dialog-confirm.grit`- * Fixture: `biome-plugins/__fixtures__/no-demoted-dialog-confirm.fixture.tsx`+ * Rule: `lint-plugins/ok-rules/rules/no-demoted-dialog-confirm.mjs`+ * Fixture: `lint-plugins/ok-rules/__fixtures__/no-demoted-dialog-confirm.fixture.tsx`*- * Per precedent #42 (custom Biome enforcement is GritQL plugins). Forbids a+ * Per precedent #42 (custom lint enforcement is oxlint JS-plugin rules). Forbids a* dialog footer whose confirm sits on `secondary`, whose near-invisible fill* loses the emphasis contest with the `outline` dismiss standing beside it.* `ghost`, `link` and `link-muted` are flat at rest too but are not plausible- * footer confirms; the plugin header records why the pattern stays narrow.+ * footer confirms; the rule's README section records why the pattern stays narrow.** The fixture pairs 3 positive cases (the reported shape, the same inversion* with the dismiss wrapped in `DialogClose asChild`, and the@@ -23,15 +23,19 @@import { spawnSync } from 'node:child_process';import { join } from 'node:path';import { describe, expect, test } from 'vitest';-import { readBiomeConfig } from '../../../../test-support/read-biome-config.test-helper';+import {+ oxlintFixtureArgs,+ readEnabledRuleIds,+ readRegisteredRuleNames,+ readRuleScope,+} from '../../../../test-support/read-ok-rules-config.test-helper';const REPO_ROOT = join(__dirname, '..', '..', '..', '..');-const FIXTURE_REL = 'biome-plugins/__fixtures__/no-demoted-dialog-confirm.fixture.tsx';-const PLUGIN_REL = './biome-plugins/no-demoted-dialog-confirm.grit';+const FIXTURE_REL = 'lint-plugins/ok-rules/__fixtures__/no-demoted-dialog-confirm.fixture.tsx';-describe('no-demoted-dialog-confirm GritQL plugin', () => {+describe('no-demoted-dialog-confirm oxlint rule', () => {test('fires on exactly 3 demoted dialog footers (and on no negative case)', () => {- const result = spawnSync('pnpm', ['exec', 'biome', 'check', FIXTURE_REL], {+ const result = spawnSync('pnpm', oxlintFixtureArgs(FIXTURE_REL), {cwd: REPO_ROOT,encoding: 'utf-8',});@@ -42,28 +46,26 @@ describe('no-demoted-dialog-confirm GritQL plugin', () => {expect(fires).toBe(3);expect(output).toContain('Drop the variant prop');expect(output).toMatch(/https?:\/\/[^\s]+/);- expect(output).toContain('biome-plugins/README.md#no-demoted-dialog-confirmgrit');+ expect(output).toContain('lint-plugins/ok-rules/README.md#no-demoted-dialog-confirm');});- test('plugin is registered as an override scoped to product chrome (not workspace-wide)', () => {- const config = readBiomeConfig(REPO_ROOT);- const rootPlugins: string[] = config.plugins ?? [];- expect(rootPlugins).not.toContain(PLUGIN_REL);+ test('rule is registered, enabled, and scoped to product chrome', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain('no-demoted-dialog-confirm');+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain('ok/no-demoted-dialog-confirm');+ });- const overrides: Array<{ includes?: string[]; plugins?: string[] }> = config.overrides ?? [];- const entry = overrides.find((o) => (o.plugins ?? []).includes(PLUGIN_REL));- expect(entry).toBeDefined();- const includes = entry?.includes ?? [];- expect(includes).toContain(FIXTURE_REL);- expect(includes).toContain('packages/app/src/**/*.tsx');- expect(includes).toContain('packages/desktop/src/**/*.tsx');- expect(includes).toContain('packages/plugin/src/**/*.tsx');- for (const excluded of [- '!packages/app/src/components/ui/**',- '!**/*.test.tsx',- '!**/*.dom.test.tsx',- ]) {- expect(includes).toContain(excluded);- }+ test('its scope table still carries every include and exclude the rule depends on', () => {+ const scope = readRuleScope(REPO_ROOT, 'no-demoted-dialog-confirm');+ expect(scope.sort()).toEqual(+ [+ 'packages/app/src/**/*.tsx',+ 'packages/desktop/src/**/*.tsx',+ 'packages/plugin/src/**/*.tsx',+ '!packages/app/src/components/ui/**',+ '!**/*.test.tsx',+ '!**/*.dom.test.tsx',+ 'lint-plugins/ok-rules/__fixtures__/no-demoted-dialog-confirm.fixture.tsx',+ ].sort(),+ );});});diff --git a/packages/app/tests/lint-plugins/no-hand-rolled-spinner.test.ts b/packages/app/tests/lint-plugins/no-hand-rolled-spinner.test.tsnew file mode 100644index 000000000..6d8445c5a--- /dev/null+++ b/packages/app/tests/lint-plugins/no-hand-rolled-spinner.test.ts@@ -0,0 +1,77 @@+/**+ * no-hand-rolled-spinner — oxlint rule fixture test.+ *+ * Rule: `lint-plugins/ok-rules/rules/no-hand-rolled-spinner.mjs`+ * Fixture: `lint-plugins/ok-rules/__fixtures__/no-hand-rolled-spinner.fixture.tsx`+ *+ * Per precedent #42 (custom lint enforcement is oxlint JS-plugin rules), which+ * requires every rule to ship with a fixture-file test. This rule was the one+ * exception: it shipped without a fixture under both the retired GritQL plugin+ * and the initial oxlint port, so the contract named a guarantee it did not have.+ *+ * Three guarantees, each its own test:+ * 1. Fires on exactly the planted positives and on no negative — the+ * bidirectional `toBe(5)` count, plus the diagnostic-message contract.+ * 2. Registered and enabled, and deliberately unscoped: a class string can+ * appear anywhere, so this rule belongs in `UNSCOPED_RULES` rather than+ * carrying a `RULE_SCOPES` entry.+ * 3. The `\b` delimiter admits `animate-spin-slow` but not `animate-spinner`.+ * The two look symmetric and are not, so the asymmetry is pinned directly+ * rather than left to the aggregate count.+ */++import { spawnSync } from 'node:child_process';+import { readFileSync } from 'node:fs';+import { join } from 'node:path';+import { describe, expect, test } from 'vitest';+import {+ oxlintFixtureArgs,+ parseOxlintDiagnostics,+ readEnabledRuleIds,+ readRegisteredRuleNames,+} from '../../../../test-support/read-ok-rules-config.test-helper';++const REPO_ROOT = join(__dirname, '..', '..', '..', '..');+const FIXTURE_REL = 'lint-plugins/ok-rules/__fixtures__/no-hand-rolled-spinner.fixture.tsx';++function checkFixture(): string {+ const result = spawnSync('pnpm', oxlintFixtureArgs(FIXTURE_REL), {+ cwd: REPO_ROOT,+ encoding: 'utf-8',+ });+ expect(result.error).toBeUndefined();+ expect(result.status).not.toBe(0);+ return `${result.stdout}\n${result.stderr}`;+}++describe('no-hand-rolled-spinner oxlint rule', () => {+ test('fires on exactly 5 hand-rolled spins (and on no negative case)', () => {+ const output = checkFixture();+ const fires = parseOxlintDiagnostics(output).filter(+ (d) => d.code === 'ok(no-hand-rolled-spinner)',+ );+ expect(fires.length).toBe(5);+ expect(output).toContain('Hand-rolled loading spinner');+ expect(output).toContain('@/components/ui/spinner');+ expect(output).toMatch(/https?:\/\/[^\s]+/);+ expect(output).toContain('lint-plugins/ok-rules/README.md#no-hand-rolled-spinner');+ });++ test('rule is registered, enabled, and deliberately unscoped', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain('no-hand-rolled-spinner');+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain('ok/no-hand-rolled-spinner');+ });++ test('the word boundary admits a suffixed variant but not a longer token', () => {+ const lines = parseOxlintDiagnostics(checkFixture())+ .filter((d) => d.code === 'ok(no-hand-rolled-spinner)')+ .map((d) => d.labels?.[0]?.span?.line)+ .filter((n): n is number => typeof n === 'number');++ const source = readFileSync(join(REPO_ROOT, FIXTURE_REL), 'utf-8').split('\n');+ const flagged = lines.map((n) => source[n - 1]).join('\n');++ expect(flagged).toContain('animate-spin-slow');+ expect(flagged).not.toContain('animate-spinner');+ });+});diff --git a/packages/app/tests/lint-plugins/no-inline-tolerance-class.test.ts b/packages/app/tests/lint-plugins/no-inline-tolerance-class.test.tsindex a90285a80..5ad4de233 100644--- a/packages/app/tests/lint-plugins/no-inline-tolerance-class.test.ts+++ b/packages/app/tests/lint-plugins/no-inline-tolerance-class.test.ts@@ -1,10 +1,10 @@/**- * no-inline-tolerance-class — Biome GritQL plugin fixture test.+ * no-inline-tolerance-class — oxlint rule fixture test.*- * Plugin: `biome-plugins/no-inline-tolerance-class.grit`- * Fixture: `biome-plugins/__fixtures__/no-inline-tolerance-class.fixture.tsx`+ * Rule: `lint-plugins/ok-rules/rules/no-inline-tolerance-class.mjs`+ * Fixture: `lint-plugins/ok-rules/__fixtures__/no-inline-tolerance-class.fixture.tsx`*- * Per precedent #42 (custom Biome enforcement is GritQL plugins). Forbids a+ * Per precedent #42 (custom lint enforcement is oxlint JS-plugin rules). Forbids a* public-mirrored test from writing a bridge tolerance-class catalog value* (`BRIDGE_TOLERANCE_CLASSES`) inline as a string literal. Importing the catalog* symbol into a public test is already blocked by `check-mirror-test-policy`@@ -14,9 +14,9 @@* Three guarantees, each its own test:* 1. Fires on exactly the planted positives (and on no negative) — the* bidirectional `toBe(8)` count, plus the diagnostic-message contract.- * 2. Registered as an override scoped to the public test surface, never at- * root `plugins[]` (which would fire on the excluded clusters where the- * catalog legitimately lives).+ * 2. Scoped via its `RULE_SCOPES` entry to the public test surface rather than+ * left unscoped, which would fire on the excluded clusters where the+ * catalog legitimately lives.* 3. The matched fidelity classes plus the four universal text-encoding* classes partition `BRIDGE_TOLERANCE_CLASSES` exactly — a class added to* the catalog reddens here until it is classified into one bucket, so the@@ -27,17 +27,21 @@ import { spawnSync } from 'node:child_process';import { readFileSync } from 'node:fs';import { join } from 'node:path';import { describe, expect, test } from 'vitest';-import { readBiomeConfig } from '../../../../test-support/read-biome-config.test-helper';+import { MATCHED_FIDELITY_CLASSES } from '../../../../lint-plugins/ok-rules/rules/no-inline-tolerance-class.mjs';+import {+ oxlintFixtureArgs,+ readEnabledRuleIds,+ readRegisteredRuleNames,+ readRuleScope,+} from '../../../../test-support/read-ok-rules-config.test-helper';const REPO_ROOT = join(__dirname, '..', '..', '..', '..');-const FIXTURE_REL = 'biome-plugins/__fixtures__/no-inline-tolerance-class.fixture.tsx';-const PLUGIN_REL = './biome-plugins/no-inline-tolerance-class.grit';-const GRIT_ABS = join(REPO_ROOT, 'biome-plugins/no-inline-tolerance-class.grit');+const FIXTURE_REL = 'lint-plugins/ok-rules/__fixtures__/no-inline-tolerance-class.fixture.tsx';const CATALOG_SOURCE_ABS = join(REPO_ROOT, 'packages/core/src/bridge/normalize.ts');-describe('no-inline-tolerance-class GritQL plugin', () => {+describe('no-inline-tolerance-class oxlint rule', () => {test('fires on exactly 8 inline fidelity-class literals (and on no negative case)', () => {- const result = spawnSync('pnpm', ['exec', 'biome', 'check', FIXTURE_REL], {+ const result = spawnSync('pnpm', oxlintFixtureArgs(FIXTURE_REL), {cwd: REPO_ROOT,encoding: 'utf-8',});@@ -49,28 +53,12 @@ describe('no-inline-tolerance-class GritQL plugin', () => {expect(fires).toBe(8);expect(output).toContain('hard-coding a BRIDGE_TOLERANCE_CLASSES label');expect(output).toMatch(/https?:\/\/[^\s]+/);- expect(output).toContain('biome-plugins/README.md#no-inline-tolerance-classgrit');+ expect(output).toContain('lint-plugins/ok-rules/README.md#no-inline-tolerance-class');});- test('plugin is registered as an override scoped to the public test surface (not workspace-wide)', () => {- const config = readBiomeConfig(REPO_ROOT);- const rootPlugins: string[] = config.plugins ?? [];- expect(rootPlugins).not.toContain(PLUGIN_REL);-- const overrides: Array<{ includes?: string[]; plugins?: string[] }> = config.overrides ?? [];- const entry = overrides.find((o) => (o.plugins ?? []).includes(PLUGIN_REL));- expect(entry).toBeDefined();- const includes = entry?.includes ?? [];- expect(includes).toContain(FIXTURE_REL);- for (const excluded of [- '!packages/md-conformance/**',- '!packages/app/tests/fidelity/**',- '!packages/core/src/markdown/**/*.test.ts',- '!packages/core/src/bridge/**/*.test.ts',- '!**/*.private.*',- ]) {- expect(includes).toContain(excluded);- }+ test('rule is registered, enabled, and scoped to the public test surface', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain('no-inline-tolerance-class');+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain('ok/no-inline-tolerance-class');});test('matched fidelity set + universal-encoding set partition BRIDGE_TOLERANCE_CLASSES', () => {@@ -82,14 +70,27 @@ describe('no-inline-tolerance-class GritQL plugin', () => {const catalog = [...(arrayBody ?? '').matchAll(/'([^']+)'/g)].map((m) => m[1]).sort();expect(catalog.length).toBeGreaterThan(0);- const gritArms = readFileSync(GRIT_ABS, 'utf-8')- .split('\n')- .filter((line) => !line.trimStart().startsWith('//'))- .join('\n');- const matched = [...gritArms.matchAll(/`'([^']+)'`/g)].map((m) => m[1]).sort();+ const matched = [...MATCHED_FIDELITY_CLASSES].sort();expect(matched.filter((c) => UNIVERSAL_ENCODING.includes(c))).toEqual([]);const union = [...new Set([...matched, ...UNIVERSAL_ENCODING])].sort();expect(union).toEqual(catalog);});++ test('its scope table still carries every include and exclude the rule depends on', () => {+ const scope = readRuleScope(REPO_ROOT, 'no-inline-tolerance-class');+ expect(scope.sort()).toEqual(+ [+ 'packages/**/*.test.ts',+ 'packages/**/*.test.tsx',+ 'packages/**/*.e2e.ts',+ '!packages/md-conformance/**',+ '!packages/app/tests/fidelity/**',+ '!packages/core/src/markdown/**/*.test.ts',+ '!packages/core/src/bridge/**/*.test.ts',+ '!**/*.private.*',+ 'lint-plugins/ok-rules/__fixtures__/no-inline-tolerance-class.fixture.tsx',+ ].sort(),+ );+ });});diff --git a/packages/app/tests/lint-plugins/no-physical-direction-utility.test.ts b/packages/app/tests/lint-plugins/no-physical-direction-utility.test.tsindex 13b45065b..d299d6328 100644--- a/packages/app/tests/lint-plugins/no-physical-direction-utility.test.ts+++ b/packages/app/tests/lint-plugins/no-physical-direction-utility.test.ts@@ -1,10 +1,10 @@/**- * no-physical-direction-utility — Biome GritQL plugin fixture test.+ * no-physical-direction-utility — oxlint rule fixture test.*- * Plugin: `biome-plugins/no-physical-direction-utility.grit`- * Fixture: `biome-plugins/__fixtures__/no-physical-direction-utility.fixture.tsx`+ * Rule: `lint-plugins/ok-rules/rules/no-physical-direction-utility.mjs`+ * Fixture: `lint-plugins/ok-rules/__fixtures__/no-physical-direction-utility.fixture.tsx`*- * Per precedent #42 (custom Biome enforcement is GritQL plugins). The rule keeps+ * Per precedent #42 (custom lint enforcement is oxlint JS-plugin rules). The rule keeps* left-to-right assumptions from hardening into the chrome while right-to-left* layout is deferred — the plumbing is inert without an RTL locale, but the rule* works every day.@@ -26,16 +26,22 @@*/import { spawnSync } from 'node:child_process';+import { readFileSync } from 'node:fs';import { join } from 'node:path';import { describe, expect, test } from 'vitest';-import { readBiomeConfig } from '../../../../test-support/read-biome-config.test-helper';+import {+ oxlintFixtureArgs,+ parseOxlintDiagnostics,+ readEnabledRuleIds,+ readRegisteredRuleNames,+ readRuleScope,+} from '../../../../test-support/read-ok-rules-config.test-helper';const REPO_ROOT = join(__dirname, '..', '..', '..', '..');-const FIXTURE_REL = 'biome-plugins/__fixtures__/no-physical-direction-utility.fixture.tsx';-const PLUGIN_REL = './biome-plugins/no-physical-direction-utility.grit';+const FIXTURE_REL = 'lint-plugins/ok-rules/__fixtures__/no-physical-direction-utility.fixture.tsx';function checkFixture(): string {- const result = spawnSync('pnpm', ['exec', 'biome', 'check', FIXTURE_REL], {+ const result = spawnSync('pnpm', oxlintFixtureArgs(FIXTURE_REL), {cwd: REPO_ROOT,encoding: 'utf-8',});@@ -49,12 +55,16 @@ function countMatches(output: string, pattern: RegExp): number {}function flaggedSource(output: string): string {- return (output.match(/^\s*>\s*\d+ │ .*$/gm) ?? [])- .map((line) => line.replace(/^[^│]*│ /, ''))- .join('\n');+ const fixture = readFileSync(join(REPO_ROOT, FIXTURE_REL), 'utf-8').split('\n');+ const lines = parseOxlintDiagnostics(output)+ .filter((d) => d.code === 'ok(no-physical-direction-utility)')+ .map((d) => d.labels?.[0]?.span?.line)+ .filter((n): n is number => typeof n === 'number');+ expect(lines.length).toBeGreaterThan(0);+ return lines.map((n) => fixture.slice(n - 1, n + 2).join('\n')).join('\n');}-describe('no-physical-direction-utility GritQL plugin', () => {+describe('no-physical-direction-utility oxlint rule', () => {test('fires on exactly 7 physical direction utilities (and on no negative case)', () => {expect(countMatches(checkFixture(), /Physical direction utility/g)).toBe(7);});@@ -96,33 +106,27 @@ describe('no-physical-direction-utility GritQL plugin', () => {const output = checkFixture();expect(output).toContain('Use the logical equivalent');expect(output).toMatch(/https?:\/\/[^\s]+/);- expect(output).toContain('biome-plugins/README.md#no-physical-direction-utilitygrit');+ expect(output).toContain('lint-plugins/ok-rules/README.md#no-physical-direction-utility');});- test('plugin is registered as an override scoped to the chrome (not workspace-wide)', () => {- const config = readBiomeConfig(REPO_ROOT);- const rootPlugins: string[] = config.plugins ?? [];- expect(rootPlugins).not.toContain(PLUGIN_REL);+ test('rule is registered, enabled, and scoped to the chrome', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain('no-physical-direction-utility');+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain('ok/no-physical-direction-utility');+ });- const overrides: Array<{ includes?: string[]; plugins?: string[] }> = config.overrides ?? [];- const entry = overrides.find((o) => (o.plugins ?? []).includes(PLUGIN_REL));- expect(entry).toBeDefined();- const includes = entry?.includes ?? [];- expect(includes).toContain(FIXTURE_REL);- for (const included of [- 'packages/app/src/**/*.tsx',- 'packages/desktop/src/**/*.tsx',- 'packages/plugin/src/**/*.tsx',- ]) {- expect(includes).toContain(included);- }- for (const excluded of [- '!packages/app/src/editor/**',- '!packages/app/src/components/ui/**',- '!**/*.test.tsx',- '!**/*.dom.test.tsx',- ]) {- expect(includes).toContain(excluded);- }+ test('its scope table still carries every include and exclude the rule depends on', () => {+ const scope = readRuleScope(REPO_ROOT, 'no-physical-direction-utility');+ expect(scope.sort()).toEqual(+ [+ 'packages/app/src/**/*.tsx',+ 'packages/desktop/src/**/*.tsx',+ 'packages/plugin/src/**/*.tsx',+ '!packages/app/src/editor/**',+ '!packages/app/src/components/ui/**',+ '!**/*.test.tsx',+ '!**/*.dom.test.tsx',+ 'lint-plugins/ok-rules/__fixtures__/no-physical-direction-utility.fixture.tsx',+ ].sort(),+ );});});diff --git a/packages/app/tests/lint-plugins/no-raw-html-interactive-element.test.ts b/packages/app/tests/lint-plugins/no-raw-html-interactive-element.test.tsindex 7b490f5df..3612ba606 100644--- a/packages/app/tests/lint-plugins/no-raw-html-interactive-element.test.ts+++ b/packages/app/tests/lint-plugins/no-raw-html-interactive-element.test.ts@@ -1,14 +1,20 @@import { spawnSync } from 'node:child_process';import { join } from 'node:path';import { describe, expect, test } from 'vitest';-import { readBiomeConfig } from '../../../../test-support/read-biome-config.test-helper';+import {+ oxlintFixtureArgs,+ readEnabledRuleIds,+ readRegisteredRuleNames,+ readRuleScope,+} from '../../../../test-support/read-ok-rules-config.test-helper';const REPO_ROOT = join(__dirname, '..', '..', '..', '..');-const FIXTURE_REL = 'biome-plugins/__fixtures__/no-raw-html-interactive-element.fixture.tsx';+const FIXTURE_REL =+ 'lint-plugins/ok-rules/__fixtures__/no-raw-html-interactive-element.fixture.tsx';-describe('no-raw-html-interactive-element GritQL plugin', () => {+describe('no-raw-html-interactive-element oxlint rule', () => {test('fires on exactly 8 positive cases (and on no negative case)', () => {- const result = spawnSync('pnpm', ['exec', 'biome', 'check', FIXTURE_REL], {+ const result = spawnSync('pnpm', oxlintFixtureArgs(FIXTURE_REL), {cwd: REPO_ROOT,encoding: 'utf-8',});@@ -18,31 +24,28 @@ describe('no-raw-html-interactive-element GritQL plugin', () => {expect(fires).toBe(8);expect(output).toContain('use shadcn Button/Input/Textarea/Select');expect(output).toMatch(/https?:\/\/[^\s]+/);- expect(output).toContain('biome-plugins/README.md#no-raw-html-interactive-elementgrit');+ expect(output).toContain('lint-plugins/ok-rules/README.md#no-raw-html-interactive-element');});- test('plugin is registered in biome.jsonc via overrides (not root plugins)', () => {- const config = readBiomeConfig(REPO_ROOT);-- const rootPlugins = config.plugins ?? [];- expect(rootPlugins).not.toContain('./biome-plugins/no-raw-html-interactive-element.grit');-- const overrides = config.overrides ?? [];- const matchingOverride = overrides.find((entry) =>- (entry.plugins ?? []).includes('./biome-plugins/no-raw-html-interactive-element.grit'),- );- expect(matchingOverride).toBeDefined();+ test('rule is registered, enabled, and scoped via its RULE_SCOPES entry', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain('no-raw-html-interactive-element');+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain('ok/no-raw-html-interactive-element');+ });- const includes = matchingOverride?.includes ?? [];- expect(includes).toContain('packages/app/src/**/*.tsx');- expect(includes).toContain('packages/desktop/src/**/*.tsx');- expect(includes).toContain('packages/plugin/src/**/*.tsx');- expect(includes).toContain('!packages/app/src/editor/**');- expect(includes).toContain('!packages/app/src/components/ui/**');- expect(includes).toContain('!**/*.test.tsx');- expect(includes).toContain('!**/*.dom.test.tsx');- expect(includes).toContain(- 'biome-plugins/__fixtures__/no-raw-html-interactive-element.fixture.tsx',+ test('its scope table still carries every include and exclude the rule depends on', () => {+ const scope = readRuleScope(REPO_ROOT, 'no-raw-html-interactive-element');+ expect(scope.sort()).toEqual(+ [+ 'packages/app/src/**/*.tsx',+ 'packages/desktop/src/**/*.tsx',+ 'packages/plugin/src/**/*.tsx',+ '!packages/app/src/editor/**',+ '!packages/app/src/components/ui/**',+ '!**/*.test.tsx',+ '!**/*.dom.test.tsx',+ '!**/*.test-helper.tsx',+ 'lint-plugins/ok-rules/__fixtures__/no-raw-html-interactive-element.fixture.tsx',+ ].sort(),);});});diff --git a/packages/app/tests/lint-plugins/no-roundtrip-identity-oracle.test.ts b/packages/app/tests/lint-plugins/no-roundtrip-identity-oracle.test.tsindex c5a8ec386..a3b08f9e7 100644--- a/packages/app/tests/lint-plugins/no-roundtrip-identity-oracle.test.ts+++ b/packages/app/tests/lint-plugins/no-roundtrip-identity-oracle.test.ts@@ -1,10 +1,10 @@/**- * no-roundtrip-identity-oracle — Biome GritQL plugin fixture test.+ * no-roundtrip-identity-oracle — oxlint rule fixture test.*- * Plugin: `biome-plugins/no-roundtrip-identity-oracle.grit`- * Fixture: `biome-plugins/__fixtures__/no-roundtrip-identity-oracle.fixture.tsx`+ * Rule: `lint-plugins/ok-rules/rules/no-roundtrip-identity-oracle.mjs`+ * Fixture: `lint-plugins/ok-rules/__fixtures__/no-roundtrip-identity-oracle.fixture.tsx`*- * Per precedent #42 (custom Biome enforcement is GritQL plugins). Forbids the+ * Per precedent #42 (custom lint enforcement is oxlint JS-plugin rules). Forbids the* byte-fidelity round-trip oracle — `serialize(parse(x))` (or the* MarkdownManager method form) asserted equal to the same input `x` — in* public-mirrored tests, so a new public test can't reintroduce the engine's@@ -25,15 +25,19 @@import { spawnSync } from 'node:child_process';import { join } from 'node:path';import { describe, expect, test } from 'vitest';-import { readBiomeConfig } from '../../../../test-support/read-biome-config.test-helper';+import {+ oxlintFixtureArgs,+ readEnabledRuleIds,+ readRegisteredRuleNames,+ readRuleScope,+} from '../../../../test-support/read-ok-rules-config.test-helper';const REPO_ROOT = join(__dirname, '..', '..', '..', '..');-const FIXTURE_REL = 'biome-plugins/__fixtures__/no-roundtrip-identity-oracle.fixture.tsx';-const PLUGIN_REL = './biome-plugins/no-roundtrip-identity-oracle.grit';+const FIXTURE_REL = 'lint-plugins/ok-rules/__fixtures__/no-roundtrip-identity-oracle.fixture.tsx';-describe('no-roundtrip-identity-oracle GritQL plugin', () => {+describe('no-roundtrip-identity-oracle oxlint rule', () => {test('fires on exactly 10 byte-identity oracle assertions (and on no negative case)', () => {- const result = spawnSync('pnpm', ['exec', 'biome', 'check', FIXTURE_REL], {+ const result = spawnSync('pnpm', oxlintFixtureArgs(FIXTURE_REL), {cwd: REPO_ROOT,encoding: 'utf-8',});@@ -44,27 +48,28 @@ describe('no-roundtrip-identity-oracle GritQL plugin', () => {expect(fires).toBe(10);expect(output).toContain('assert a fixed expected literal for a specific contract');expect(output).toMatch(/https?:\/\/[^\s]+/);- expect(output).toContain('biome-plugins/README.md#no-roundtrip-identity-oraclegrit');+ expect(output).toContain('lint-plugins/ok-rules/README.md#no-roundtrip-identity-oracle');});- test('plugin is registered as an override scoped to the public test surface (not workspace-wide)', () => {- const config = readBiomeConfig(REPO_ROOT);- const rootPlugins: string[] = config.plugins ?? [];- expect(rootPlugins).not.toContain(PLUGIN_REL);+ test('rule is registered, enabled, and scoped to the public test surface', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain('no-roundtrip-identity-oracle');+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain('ok/no-roundtrip-identity-oracle');+ });- const overrides: Array<{ includes?: string[]; plugins?: string[] }> = config.overrides ?? [];- const entry = overrides.find((o) => (o.plugins ?? []).includes(PLUGIN_REL));- expect(entry).toBeDefined();- const includes = entry?.includes ?? [];- expect(includes).toContain(FIXTURE_REL);- for (const excluded of [- '!packages/md-conformance/**',- '!packages/app/tests/fidelity/**',- '!packages/core/src/markdown/**/*.test.ts',- '!packages/core/src/bridge/**/*.test.ts',- '!**/*.private.*',- ]) {- expect(includes).toContain(excluded);- }+ test('its scope table still carries every include and exclude the rule depends on', () => {+ const scope = readRuleScope(REPO_ROOT, 'no-roundtrip-identity-oracle');+ expect(scope.sort()).toEqual(+ [+ 'packages/**/*.test.ts',+ 'packages/**/*.test.tsx',+ 'packages/**/*.e2e.ts',+ '!packages/md-conformance/**',+ '!packages/app/tests/fidelity/**',+ '!packages/core/src/markdown/**/*.test.ts',+ '!packages/core/src/bridge/**/*.test.ts',+ '!**/*.private.*',+ 'lint-plugins/ok-rules/__fixtures__/no-roundtrip-identity-oracle.fixture.tsx',+ ].sort(),+ );});});diff --git a/packages/app/tests/lint-plugins/no-split-suggestion-dispatch.test.ts b/packages/app/tests/lint-plugins/no-split-suggestion-dispatch.test.tsindex 386c2abaf..117229ebe 100644--- a/packages/app/tests/lint-plugins/no-split-suggestion-dispatch.test.ts+++ b/packages/app/tests/lint-plugins/no-split-suggestion-dispatch.test.ts@@ -1,16 +1,16 @@/*** One-transaction suggestion insertion enforcement — `no-split-suggestion-dispatch`- * GritQL plugin (precedent #58).+ * oxlint rule (precedent #58).*- * Plugin: `biome-plugins/no-split-suggestion-dispatch.grit`- * Fixture: `biome-plugins/__fixtures__/no-split-suggestion-dispatch.fixture.tsx`+ * Rule: `lint-plugins/ok-rules/rules/no-split-suggestion-dispatch.mjs`+ * Fixture: `lint-plugins/ok-rules/__fixtures__/no-split-suggestion-dispatch.fixture.tsx`** The fixture pairs 3 positive cases (bare trigger-delete chain dispatch with* and without `.focus()`, plus the immediately-dispatching `commands.deleteRange`* form — all inside a `Suggestion({ ... })` config) with 4 negative cases (the* atomic single chain, the `.command()` boundary composition, delegation to* `applySlashCommandItem`, and a delete-only chain outside any Suggestion- * config). The test asserts the plugin fires exactly 3 times.+ * config). The test asserts the rule fires exactly 3 times.** Exact equality (`toBe(3)`) catches drift in both directions:* - false-negative: a weakened pattern drops below 3 → fails@@ -26,14 +26,18 @@import { spawnSync } from 'node:child_process';import { join } from 'node:path';import { describe, expect, test } from 'vitest';-import { readBiomeConfig } from '../../../../test-support/read-biome-config.test-helper';+import {+ oxlintFixtureArgs,+ readEnabledRuleIds,+ readRegisteredRuleNames,+} from '../../../../test-support/read-ok-rules-config.test-helper';const REPO_ROOT = join(__dirname, '..', '..', '..', '..');-const FIXTURE_REL = 'biome-plugins/__fixtures__/no-split-suggestion-dispatch.fixture.tsx';+const FIXTURE_REL = 'lint-plugins/ok-rules/__fixtures__/no-split-suggestion-dispatch.fixture.tsx';-describe('no-split-suggestion-dispatch GritQL plugin', () => {+describe('no-split-suggestion-dispatch oxlint rule', () => {test('fires on exactly 3 positive cases (and on no negative case)', () => {- const result = spawnSync('pnpm', ['exec', 'biome', 'check', FIXTURE_REL], {+ const result = spawnSync('pnpm', oxlintFixtureArgs(FIXTURE_REL), {cwd: REPO_ROOT,encoding: 'utf-8',});@@ -43,12 +47,11 @@ describe('no-split-suggestion-dispatch GritQL plugin', () => {expect(fires).toBe(3);expect(output).toContain('Compose the delete and the insert into ONE chain');expect(output).toMatch(/https?:\/\/[^\s]+/);- expect(output).toContain('biome-plugins/README.md#no-split-suggestion-dispatchgrit');+ expect(output).toContain('lint-plugins/ok-rules/README.md#no-split-suggestion-dispatch');});- test('plugin is registered in biome.jsonc at root plugins (workspace-wide)', () => {- const config = readBiomeConfig(REPO_ROOT);- const plugins = config.plugins ?? [];- expect(plugins).toContain('./biome-plugins/no-split-suggestion-dispatch.grit');+ test('rule is registered, enabled, and deliberately unscoped', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain('no-split-suggestion-dispatch');+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain('ok/no-split-suggestion-dispatch');});});diff --git a/packages/app/tests/lint-plugins/no-themeless-pierre-diff.test.ts b/packages/app/tests/lint-plugins/no-themeless-pierre-diff.test.tsindex bdc642f2c..23767a81e 100644--- a/packages/app/tests/lint-plugins/no-themeless-pierre-diff.test.ts+++ b/packages/app/tests/lint-plugins/no-themeless-pierre-diff.test.ts@@ -1,14 +1,19 @@import { spawnSync } from 'node:child_process';import { join } from 'node:path';import { describe, expect, test } from 'vitest';-import { readBiomeConfig } from '../../../../test-support/read-biome-config.test-helper';+import {+ oxlintFixtureArgs,+ readEnabledRuleIds,+ readRegisteredRuleNames,+ readRuleScope,+} from '../../../../test-support/read-ok-rules-config.test-helper';const REPO_ROOT = join(__dirname, '..', '..', '..', '..');-const FIXTURE_REL = 'biome-plugins/__fixtures__/no-themeless-pierre-diff.fixture.tsx';+const FIXTURE_REL = 'lint-plugins/ok-rules/__fixtures__/no-themeless-pierre-diff.fixture.tsx';-describe('no-themeless-pierre-diff GritQL plugin', () => {+describe('no-themeless-pierre-diff oxlint rule', () => {test('fires on exactly 7 positive cases (and on no negative case)', () => {- const result = spawnSync('pnpm', ['exec', 'biome', 'check', FIXTURE_REL], {+ const result = spawnSync('pnpm', oxlintFixtureArgs(FIXTURE_REL), {cwd: REPO_ROOT,encoding: 'utf-8',});@@ -21,25 +26,24 @@ describe('no-themeless-pierre-diff GritQL plugin', () => {expect(themeFires).toBe(5);expect(styleFires).toBe(2);expect(output).toMatch(/https?:\/\/[^\s]+/);- expect(output).toContain('biome-plugins/README.md#no-themeless-pierre-diffgrit');+ expect(output).toContain('lint-plugins/ok-rules/README.md#no-themeless-pierre-diff');});- test('plugin is registered in biome.jsonc via overrides (not root plugins)', () => {- const config = readBiomeConfig(REPO_ROOT);-- const rootPlugins = config.plugins ?? [];- expect(rootPlugins).not.toContain('./biome-plugins/no-themeless-pierre-diff.grit');+ test('rule is registered, enabled, and scoped via its RULE_SCOPES entry', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain('no-themeless-pierre-diff');+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain('ok/no-themeless-pierre-diff');+ });- const overrides = config.overrides ?? [];- const matchingOverride = overrides.find((entry) =>- (entry.plugins ?? []).includes('./biome-plugins/no-themeless-pierre-diff.grit'),+ test('its scope table still carries every include and exclude the rule depends on', () => {+ const scope = readRuleScope(REPO_ROOT, 'no-themeless-pierre-diff');+ expect(scope.sort()).toEqual(+ [+ 'packages/app/src/**/*.tsx',+ '!**/*.test.tsx',+ '!**/*.dom.test.tsx',+ '!**/*.test-helper.tsx',+ 'lint-plugins/ok-rules/__fixtures__/no-themeless-pierre-diff.fixture.tsx',+ ].sort(),);- expect(matchingOverride).toBeDefined();-- const includes = matchingOverride?.includes ?? [];- expect(includes).toContain('packages/app/src/**/*.tsx');- expect(includes).toContain('!**/*.test.tsx');- expect(includes).toContain('!**/*.dom.test.tsx');- expect(includes).toContain('biome-plugins/__fixtures__/no-themeless-pierre-diff.fixture.tsx');});});diff --git a/packages/app/tests/lint-plugins/no-unwrapped-user-facing-string.test.ts b/packages/app/tests/lint-plugins/no-unwrapped-user-facing-string.test.tsindex 63b90a2d3..ca3511dbb 100644--- a/packages/app/tests/lint-plugins/no-unwrapped-user-facing-string.test.ts+++ b/packages/app/tests/lint-plugins/no-unwrapped-user-facing-string.test.ts@@ -1,10 +1,10 @@/**- * no-unwrapped-user-facing-string — Biome GritQL plugin fixture test.+ * no-unwrapped-user-facing-string — oxlint rule fixture test.*- * Plugin: `biome-plugins/no-unwrapped-user-facing-string.grit`- * Fixture: `biome-plugins/__fixtures__/no-unwrapped-user-facing-string.fixture.tsx`+ * Rule: `lint-plugins/ok-rules/rules/no-unwrapped-user-facing-string.mjs`+ * Fixture: `lint-plugins/ok-rules/__fixtures__/no-unwrapped-user-facing-string.fixture.tsx`*- * Per precedent #42 (custom Biome enforcement is GritQL plugins). The rule makes+ * Per precedent #42 (custom lint enforcement is oxlint JS-plugin rules). The rule makes* a hardcoded user-facing string a build-visible defect instead of a convention* a contributor has to remember.*@@ -22,21 +22,22 @@import { spawnSync } from 'node:child_process';import { join } from 'node:path';import { describe, expect, test } from 'vitest';-import { readBiomeConfig } from '../../../../test-support/read-biome-config.test-helper';+import {+ oxlintFixtureArgs,+ readEnabledRuleIds,+ readRegisteredRuleNames,+ readRuleScope,+} from '../../../../test-support/read-ok-rules-config.test-helper';const REPO_ROOT = join(__dirname, '..', '..', '..', '..');-const FIXTURE_REL = 'biome-plugins/__fixtures__/no-unwrapped-user-facing-string.fixture.tsx';-const PLUGIN_REL = './biome-plugins/no-unwrapped-user-facing-string.grit';+const FIXTURE_REL =+ 'lint-plugins/ok-rules/__fixtures__/no-unwrapped-user-facing-string.fixture.tsx';function checkFixture(): string {- const result = spawnSync(- 'pnpm',- ['exec', 'biome', 'check', '--max-diagnostics=200', FIXTURE_REL],- {- cwd: REPO_ROOT,- encoding: 'utf-8',- },- );+ const result = spawnSync('pnpm', oxlintFixtureArgs(FIXTURE_REL), {+ cwd: REPO_ROOT,+ encoding: 'utf-8',+ });expect(result.error).toBeUndefined();expect(result.status).not.toBe(0);return `${result.stdout}\n${result.stderr}`;@@ -46,7 +47,7 @@ function countMatches(output: string, pattern: RegExp): number {return (output.match(pattern) ?? []).length;}-describe('no-unwrapped-user-facing-string GritQL plugin', () => {+describe('no-unwrapped-user-facing-string oxlint rule', () => {test('fires on exactly 15 unwrapped user-facing strings (and on no negative case)', () => {expect(countMatches(checkFixture(), /Unwrapped user-facing string/g)).toBe(15);});@@ -65,38 +66,32 @@ describe('no-unwrapped-user-facing-string GritQL plugin', () => {const output = checkFixture();expect(output).toContain('Wrap it with the Lingui');expect(output).toMatch(/https?:\/\/[^\s]+/);- expect(output).toContain('biome-plugins/README.md#no-unwrapped-user-facing-stringgrit');+ expect(output).toContain('lint-plugins/ok-rules/README.md#no-unwrapped-user-facing-string');});- test('plugin is registered as an override scoped to the product surface (not workspace-wide)', () => {- const config = readBiomeConfig(REPO_ROOT);- const rootPlugins: string[] = config.plugins ?? [];- expect(rootPlugins).not.toContain(PLUGIN_REL);+ test('rule is registered, enabled, and scoped to the product surface', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain('no-unwrapped-user-facing-string');+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain('ok/no-unwrapped-user-facing-string');+ });- const overrides: Array<{ includes?: string[]; plugins?: string[] }> = config.overrides ?? [];- const entry = overrides.find((o) => (o.plugins ?? []).includes(PLUGIN_REL));- expect(entry).toBeDefined();- const includes = entry?.includes ?? [];- expect(includes).toContain(FIXTURE_REL);- for (const included of [- 'packages/app/src/**/*.ts',- 'packages/app/src/**/*.tsx',- 'packages/desktop/src/**/*.ts',- 'packages/desktop/src/**/*.tsx',- 'packages/plugin/src/**/*.ts',- 'packages/plugin/src/**/*.tsx',- ]) {- expect(includes).toContain(included);- }- for (const excluded of [- '!packages/app/src/editor/**',- '!packages/app/src/components/ui/**',- '!packages/desktop/src/main/**',- '!**/*.test.ts',- '!**/*.test.tsx',- '!**/*.dom.test.tsx',- ]) {- expect(includes).toContain(excluded);- }+ test('its scope table still carries every include and exclude the rule depends on', () => {+ const scope = readRuleScope(REPO_ROOT, 'no-unwrapped-user-facing-string');+ expect(scope.sort()).toEqual(+ [+ 'packages/app/src/**/*.ts',+ 'packages/app/src/**/*.tsx',+ 'packages/desktop/src/**/*.ts',+ 'packages/desktop/src/**/*.tsx',+ 'packages/plugin/src/**/*.ts',+ 'packages/plugin/src/**/*.tsx',+ '!packages/app/src/editor/**',+ '!packages/app/src/components/ui/**',+ '!packages/desktop/src/main/**',+ '!**/*.test.ts',+ '!**/*.test.tsx',+ '!**/*.dom.test.tsx',+ 'lint-plugins/ok-rules/__fixtures__/no-unwrapped-user-facing-string.fixture.tsx',+ ].sort(),+ );});});diff --git a/packages/app/tests/lint-plugins/ok-rules-scope-partition.test.ts b/packages/app/tests/lint-plugins/ok-rules-scope-partition.test.tsnew file mode 100644index 000000000..936c4bce2--- /dev/null+++ b/packages/app/tests/lint-plugins/ok-rules-scope-partition.test.ts@@ -0,0 +1,71 @@+import { join } from 'node:path';+import { describe, expect, test } from 'vitest';+import plugin, { rules } from '../../../../lint-plugins/ok-rules/index.mjs';+import {+ isInScope,+ RULE_SCOPES,+ UNSCOPED_RULES,+} from '../../../../lint-plugins/ok-rules/scope.mjs';+import { readJsPluginSpecifiers } from '../../../../test-support/read-ok-rules-config.test-helper';++const registered = Object.keys(rules).sort();++describe('ok-rules scope table', () => {+ test('every registered rule is either scoped or deliberately unscoped, never both', () => {+ const scoped = Object.keys(RULE_SCOPES);+ const unscoped = [...UNSCOPED_RULES];+ expect([...scoped, ...unscoped].sort()).toEqual(registered);+ expect(scoped.filter((r) => UNSCOPED_RULES.has(r))).toEqual([]);+ });++ test('UNSCOPED_RULES holds exactly the six rules that are deliberately global', () => {+ expect([...UNSCOPED_RULES].sort()).toEqual([+ 'microcopy-ellipsis',+ 'no-hand-rolled-spinner',+ 'no-loosely-typed-webcontents-ipc',+ 'no-resolved-value-theme-source',+ 'no-split-suggestion-dispatch',+ 'no-unportaled-editor-content',+ ]);+ });++ test('the `ok` plugin registers exactly the rules it exports', () => {+ expect(Object.keys(plugin.rules).sort()).toEqual(registered);+ });++ test('an unclassified rule name fails closed rather than scoping everywhere', () => {+ expect(() => isInScope('rule-that-does-not-exist', 'packages/app/src/x.tsx')).toThrow(+ /no entry in the scope table it was looked up in/,+ );+ });++ test('UNSCOPED_RULES does not leak into a caller-supplied table', () => {+ const unscopedName = [...UNSCOPED_RULES][0];+ expect(() => isInScope(unscopedName, 'packages/app/src/x.tsx', {})).toThrow(+ /no entry in the scope table it was looked up in/,+ );+ expect(isInScope(unscopedName, 'packages/app/src/x.tsx')).toBe(true);+ });++ test('oxlint.config.ts still loads the `ok` plugin these rules are exported from', async () => {+ expect(await readJsPluginSpecifiers(join(__dirname, '..', '..', '..', '..'))).toContain(+ './lint-plugins/ok-rules/index.mjs',+ );+ });++ test('every scope entry names its own fixture, so the fixture test can fire', () => {+ for (const [rule, globs] of Object.entries(RULE_SCOPES)) {+ const fixture = globs.find((g) => g.includes('__fixtures__'));+ expect(fixture, `${rule} has no fixture glob in its scope`).toBeDefined();+ expect(fixture).toContain(rule);+ }+ });++ test('the matcher rejects glob syntax it does not implement, rather than mis-scoping', () => {+ for (const globs of Object.values(RULE_SCOPES)) {+ for (const glob of globs) {+ expect(glob.replace(/^!/, '')).not.toMatch(/[?{}[\]()]/);+ }+ }+ });+});diff --git a/packages/app/tests/lint-plugins/ok-rules-vocabulary.test.ts b/packages/app/tests/lint-plugins/ok-rules-vocabulary.test.tsnew file mode 100644index 000000000..406b818e4--- /dev/null+++ b/packages/app/tests/lint-plugins/ok-rules-vocabulary.test.ts@@ -0,0 +1,310 @@+/**+ * The `ok` rule corpus carries no vocabulary from the mechanism it replaced.+ *+ * Corpus: `CORPUS_DIRS` and `TEST_DIRS`. Read the constants, not a paraphrase.+ * The conformance property catalogs are in scope because they describe rules+ * in prose and one of them drifted. That package does not ship, so its two+ * entries are the ones in `ABSENT_ON_MIRROR`; every other entry must+ * contribute a scanned file or the corpus test reds with the directory named.+ * The exemption is gated on the PACKAGE root rather than on those leaves,+ * because a leaf that vanishes is the condition being detected.+ *+ * Per precedent #42 (custom lint enforcement is oxlint JS-plugin rules), which+ * names the rule corpus this scans. Two vocabularies are banned and they come+ * from different retirements: `gritql` / `.grit` / `biome-plugins` are the+ * Biome GritQL mechanism precedent #42 was rewritten away from, and `bun run`+ * is Bun syntax retired by the earlier remove-bun migration. `biome-ignore`+ * and `biome check` are deliberately NOT banned: Biome is still a live linter+ * here alongside oxlint.+ *+ * `judgeDemotion` blanks true plugin references in two passes and tests for a+ * demotion between them. Every strip is length-preserving, because two of the+ * checks are bounded-distance patterns and deleting text would pull unrelated+ * words inside a window they were never in.+ *+ * 1. `REAL_PLUGIN_NAMES` — this repo's own plugin directories, read from+ * disk so a third plugin needs no edit here. This one MUST run first:+ * the names are kebab-cased, so ``no-comments plugin`` would otherwise+ * false-fire `DEMOTED_UNAMBIGUOUS`'s kebab-identifier alternative.+ * 2. `DEMOTED_UNAMBIGUOUS` — a rule identifier next to `plugin`, optionally+ * through an engine qualifier (`<rule> oxlint plugin`), or `plugin test`+ * / `plugin fixture`. It runs BEFORE the remaining strips because either+ * of them can span a demotion and delete the token this keys on. Two+ * pinned cases assert exactly that, by running the same function with+ * the order inverted.+ * 3. `ENGINE_PLUGINS` then `PLUGIN_AS_MODULE`, then `NEAR_RULE_VOCABULARY`+ * on what survives. `ENGINE_PLUGINS` is a PHRASE strip rather than a+ * line verdict: one unrelated engine token must not immunise a real+ * demotion sitting beside it.+ *+ * `PLUGIN_AS_MODULE` holds module referents (a path, a file name, `plugin`+ * qualified by the module it names), the config key and code identifiers that+ * spell one, and `JS-plugin`, the one sanctioned category term, which about a+ * dozen corpus lines use for the rule mechanism itself.+ */++import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';+import { join, relative, sep } from 'node:path';+import { describe, expect, test } from 'vitest';++const REPO_ROOT = join(__dirname, '..', '..', '..', '..');++const CORPUS_DIRS = [+ 'lint-plugins/ok-rules',+ 'packages/app/tests/lint-plugins',+ 'packages/app/src/lint-plugins',+ 'packages/server/src/lint-plugins',+ 'packages/md-conformance/src/lint-plugins',+ 'packages/md-conformance/src/contracts',+];++const TEST_DIRS = [+ 'packages/app/tests/integration',+ 'packages/server/src',+ 'packages/desktop/tests/integration',+];++const RETIRED = /gritql|\.grit\b|biome-plugins|bun run/i;++const HISTORICAL = /\b(?:retired|replaced|superseded|no longer|used to|formerly|migrat)/i;++const ENGINE_NAMES = ['GritQL', 'biome', 'eslint', 'remark', 'rehype', 'vite', 'babel', 'oxlint'];++const DEMOTED_UNAMBIGUOUS = new RegExp(+ [+ String.raw`\b[a-z][a-z0-9]*(?:-[a-z0-9]+)+ (?:(?:${ENGINE_NAMES.join('|')}) )?plugins?\b`,+ String.raw`\bok/[a-z0-9-]+\b.{0,60}\bplugins?\b`,+ String.raw`\bplugins?\b\s*(?:test|fixture)\b`,+ ].join('|'),+ 'i',+);++const ENGINE_PLUGINS = new RegExp(`\\b(?:${ENGINE_NAMES.join('|')})[- ]plugins?\\b`, 'gi');++function pluginDirNames(): string[] {+ const dir = join(REPO_ROOT, 'lint-plugins');+ const names = readdirSync(dir, { withFileTypes: true })+ .filter((e) => e.isDirectory())+ .map((e) => e.name);+ if (names.length === 0) {+ throw new Error(+ `ok-rules-vocabulary: ${relative(REPO_ROOT, dir)} lists no plugin directories. An empty ` ++ 'alternation would strip every `plugin` token and green the gate.',+ );+ }+ return names;+}++const REAL_PLUGIN_NAMES = new RegExp(+ `\\b(?:${pluginDirNames()+ .map((n) => n.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'))+ .join('|')})\\b[^.]{0,3}(?:(?:${ENGINE_NAMES.join('|')}) )?plugins?\\b`,+ 'gi',+);++const PLUGIN_AS_MODULE = new RegExp(+ [+ 'lint-plugins',+ 'jsPlugins',+ 'plugin\\.mjs',+ 'plugins\\.html',+ 'JS[- ]plugins?',+ 'packages/\\{[^}]*plugin[^}]*\\}',+ 'packages/plugin',+ 'index\\.(?:private\\.)?mjs',+ 'lint/plugin/',+ 'import plugin',+ 'plugin\\.rules',+ '(?:`ok`|`\\.private\\.`) plugins?',+ 'PLUGIN_NAME',+ ].join('|'),+ 'gi',+);++const NEAR_RULE_VOCABULARY = new RegExp(+ [+ String.raw`\bplugins?\b\s*(?:test|fixture)`,+ String.raw`\b(?:rule|test|fixture)\b.{0,60}\bplugins?\b`,+ String.raw`\bplugins?\b.{0,60}\b(?:fires|must fire|fixture|test)\b`,+ ].join('|'),+ 'i',+);++const SELF = 'packages/app/tests/lint-plugins/ok-rules-vocabulary.test.ts';++const MIRROR_ABSENT_PACKAGE_ROOT = 'packages/md-conformance';++const ABSENT_ON_MIRROR = [+ 'packages/md-conformance/src/lint-plugins',+ 'packages/md-conformance/src/contracts',+];++function ruleStems(): string[] {+ const dir = join(REPO_ROOT, 'lint-plugins/ok-rules/__fixtures__');+ if (!existsSync(dir)) {+ throw new Error(+ `ok-rules-vocabulary: ${relative(REPO_ROOT, dir)} is missing. Every rule's fixture lives ` ++ 'there and it ships to the public mirror, so its absence means the corpus definition is ' ++ 'wrong rather than that this is a reduced clone.',+ );+ }+ return readdirSync(dir)+ .filter((f) => f.endsWith('.fixture.tsx'))+ .map((f) => f.replace(/\.fixture\.tsx$/, ''));+}++function walkCorpus(onFile: (file: string) => void): void {+ const walk = (dir: string) => {+ for (const entry of readdirSync(dir)) {+ const full = join(dir, entry);+ if (statSync(full).isDirectory()) walk(full);+ else if (/\.(mjs|ts|tsx|json|md)$/.test(entry)) onFile(full);+ }+ };+ for (const dir of CORPUS_DIRS) {+ const abs = join(REPO_ROOT, dir);+ if (existsSync(abs)) walk(abs);+ }+}++function posixRel(file: string): string {+ return relative(REPO_ROOT, file).split(sep).join('/');+}++function filesPerDir(): Map<string, number> {+ const counts = new Map<string, number>([...CORPUS_DIRS, ...TEST_DIRS].map((d) => [d, 0]));+ const bump = (dirs: readonly string[]) => (file: string) => {+ const rel = posixRel(file);+ if (rel === SELF) return;+ for (const dir of dirs) {+ if (rel.startsWith(`${dir}/`)) counts.set(dir, (counts.get(dir) ?? 0) + 1);+ }+ };+ walkCorpus(bump(CORPUS_DIRS));+ const bumpTestDir = bump(TEST_DIRS);+ for (const file of testDirFiles()) bumpTestDir(file);+ return counts;+}++function testDirFiles(): string[] {+ const stems = new Set(ruleStems());+ const found: string[] = [];+ for (const dir of TEST_DIRS) {+ const abs = join(REPO_ROOT, dir);+ if (!existsSync(abs)) continue;+ for (const entry of readdirSync(abs)) {+ if (!entry.endsWith('.test.ts')) continue;+ if (stems.has(entry.replace(/\.test\.ts$/, ''))) found.push(join(abs, entry));+ }+ }+ return found;+}++function corpusFiles(): string[] {+ const found: string[] = [];+ walkCorpus((file) => found.push(file));+ return [...new Set([...found, ...testDirFiles()])];+}++function readmeLine(startsWith: string): string {+ const lines = readFileSync(join(REPO_ROOT, 'lint-plugins/ok-rules/README.md'), 'utf-8').split(+ '\n',+ );+ const found = lines.filter((l) => l.startsWith(startsWith));+ if (found.length !== 1) {+ throw new Error(+ `ok-rules-vocabulary: expected exactly one README line starting "${startsWith}", found ` ++ `${found.length}. The pinned legitimate case must track a real line, not an index.`,+ );+ }+ return found[0];+}++function blank(line: string, pattern: RegExp): string {+ return line.replace(pattern, (m) => ' '.repeat(m.length));+}++function judgeDemotion(line: string, { demotedFirst = true } = {}): boolean {+ const named = blank(line, REAL_PLUGIN_NAMES);+ if (demotedFirst && DEMOTED_UNAMBIGUOUS.test(named)) return true;+ const residue = blank(blank(named, ENGINE_PLUGINS), PLUGIN_AS_MODULE);+ if (!demotedFirst && DEMOTED_UNAMBIGUOUS.test(residue)) return true;+ return /\bplugins?\b/i.test(residue) && NEAR_RULE_VOCABULARY.test(residue);+}++function scan(judge: (line: string) => boolean): string[] {+ const out: string[] = [];+ for (const file of corpusFiles()) {+ const rel = posixRel(file);+ if (rel === SELF) continue;+ readFileSync(file, 'utf-8')+ .split('\n')+ .forEach((line, i) => {+ if (judge(line)) out.push(`${rel}:${i + 1}: ${line.trim()}`);+ });+ }+ return out;+}++describe('ok-rules corpus vocabulary', () => {+ test('every corpus directory contributes at least one scanned file', () => {+ const counts = filesPerDir();+ const missing = [...counts]+ .filter(([dir, n]) => n === 0 && !ABSENT_ON_MIRROR.includes(dir))+ .map(([dir]) => dir);+ expect(missing).toEqual([]);+ });++ test('every mirror-exempt entry lives under the one package the mirror drops', () => {+ expect(+ ABSENT_ON_MIRROR.filter((dir) => !dir.startsWith(`${MIRROR_ABSENT_PACKAGE_ROOT}/`)),+ ).toEqual([]);+ });++ test('on a full checkout the exempt directories are held to the same standard', () => {+ if (!existsSync(join(REPO_ROOT, MIRROR_ABSENT_PACKAGE_ROOT))) return;+ const counts = filesPerDir();+ expect(ABSENT_ON_MIRROR.filter((dir) => (counts.get(dir) ?? 0) === 0)).toEqual([]);+ });++ test('demotion detection survives an engine name and a spanning phrase', () => {+ const demotions = [+ 'The no-hand-rolled-spinner plugin registers exactly 5 diagnostics.',+ 'The GritQL era is over; the no-hand-rolled-spinner plugin registers exactly 5 diagnostics.',+ 'The GritQL plugins were slow; the no-hand-rolled-spinner plugin fires on its fixture.',+ 'The sibling plugin fires twice on that fixture.',+ 'what the plugin test counts',+ "the oxlint path-conditional-origin plugin's enforcement target",+ 'the ok/no-hand-rolled-spinner oxlint plugin fires on its fixture.',+ 'the path-conditional-origin oxlint plugin fires on its fixture.',+ ];+ for (const line of demotions) expect(judgeDemotion(line), line).toBe(true);++ const legitimate = [+ readmeLine('One plugin holding every rule is deliberate'),+ 'This rule ships as its own `.private.` plugin rather than inside the `ok` plugin.',+ "describe('no-comments oxlint plugin', () => {",+ ...pluginDirNames().map((name) => `the ${name} plugin fires on that fixture`),+ 'the rehype clipboard cleanup plugins (eight strip-* plugins plus a skipper)',+ ];+ for (const line of legitimate) expect(judgeDemotion(line), line).toBe(false);+ });++ test('the stage order is load-bearing, not incidental', () => {+ for (const orderSensitive of [+ 'the `ok` plugin test',+ 'the ok/no-hand-rolled-spinner oxlint plugin fires on its fixture.',+ ]) {+ expect(judgeDemotion(orderSensitive), orderSensitive).toBe(true);+ expect(judgeDemotion(orderSensitive, { demotedFirst: false }), orderSensitive).toBe(false);+ }+ });++ test('no file names the retired GritQL or Bun mechanism as if it were current', () => {+ expect(scan((line) => RETIRED.test(line) && !HISTORICAL.test(line))).toEqual([]);+ });++ test('no file calls an ok rule a plugin', () => {+ expect(scan(judgeDemotion)).toEqual([]);+ });+});diff --git a/packages/app/tests/lint-plugins/playwright-prefer-to-have-count.test.ts b/packages/app/tests/lint-plugins/playwright-prefer-to-have-count.test.tsindex c43931eb0..abf0d8669 100644--- a/packages/app/tests/lint-plugins/playwright-prefer-to-have-count.test.ts+++ b/packages/app/tests/lint-plugins/playwright-prefer-to-have-count.test.ts@@ -1,10 +1,10 @@/**- * playwright-prefer-to-have-count — Biome GritQL plugin fixture test.+ * playwright-prefer-to-have-count — oxlint rule fixture test.*- * Plugin: `biome-plugins/playwright-prefer-to-have-count.grit`- * Fixture: `biome-plugins/__fixtures__/playwright-prefer-to-have-count.fixture.tsx`+ * Rule: `lint-plugins/ok-rules/rules/playwright-prefer-to-have-count.mjs`+ * Fixture: `lint-plugins/ok-rules/__fixtures__/playwright-prefer-to-have-count.fixture.tsx`*- * Per precedent #42 (custom Biome enforcement is GritQL plugins). Bans the+ * Per precedent #42 (custom lint enforcement is oxlint JS-plugin rules). Bans the* one-shot `expect(await locator.count())` snapshot read in the browser* e2e suites — the no-retry assertion shape behind hidden flakes — in* favor of the web-first auto-retrying@@ -12,9 +12,9 @@* eslint-plugin-playwright `prefer-to-have-count`.** The fixture pairs 3 positive cases (one-shot reads through different- * matchers — plugin must fire) with 5 negative cases (toHaveCount,+ * matchers — the rule must fire) with 5 negative cases (toHaveCount,* expect.poll, bare count read, different awaited method, two-statement- * read-then-assert — plugin must NOT fire). Exact-equality (`toBe(3)`)+ * read-then-assert — rule must NOT fire). Exact-equality (`toBe(3)`)* catches both false-negative regressions (weakened pattern drops below 3)* and false-positive widenings (above 3).*/@@ -22,15 +22,20 @@import { spawnSync } from 'node:child_process';import { join } from 'node:path';import { describe, expect, test } from 'vitest';-import { readBiomeConfig } from '../../../../test-support/read-biome-config.test-helper';+import {+ oxlintFixtureArgs,+ readEnabledRuleIds,+ readRegisteredRuleNames,+ readRuleScope,+} from '../../../../test-support/read-ok-rules-config.test-helper';const REPO_ROOT = join(__dirname, '..', '..', '..', '..');-const FIXTURE_REL = 'biome-plugins/__fixtures__/playwright-prefer-to-have-count.fixture.tsx';-const PLUGIN_REL = './biome-plugins/playwright-prefer-to-have-count.grit';+const FIXTURE_REL =+ 'lint-plugins/ok-rules/__fixtures__/playwright-prefer-to-have-count.fixture.tsx';-describe('playwright-prefer-to-have-count GritQL plugin', () => {+describe('playwright-prefer-to-have-count oxlint rule', () => {test('fires on exactly 3 one-shot count reads (and on no negative case)', () => {- const result = spawnSync('pnpm', ['exec', 'biome', 'check', FIXTURE_REL], {+ const result = spawnSync('pnpm', oxlintFixtureArgs(FIXTURE_REL), {cwd: REPO_ROOT,encoding: 'utf-8',});@@ -40,21 +45,23 @@ describe('playwright-prefer-to-have-count GritQL plugin', () => {expect(fires).toBe(3);expect(output).toContain('use the web-first `await expect(locator).toHaveCount(n)`');expect(output).toMatch(/https?:\/\/[^\s]+/);- expect(output).toContain('biome-plugins/README.md#playwright-prefer-to-have-countgrit');+ expect(output).toContain('lint-plugins/ok-rules/README.md#playwright-prefer-to-have-count');});- test('plugin is registered as an override scoped to the e2e suites (not workspace-wide)', () => {- const config = readBiomeConfig(REPO_ROOT);- const rootPlugins: string[] = config.plugins ?? [];- expect(rootPlugins).not.toContain(PLUGIN_REL);+ test('rule is registered, enabled, and scoped to the e2e suites', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain('playwright-prefer-to-have-count');+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain('ok/playwright-prefer-to-have-count');+ });- const overrides: Array<{ includes?: string[]; plugins?: string[] }> = config.overrides ?? [];- const entry = overrides.find((o) => (o.plugins ?? []).includes(PLUGIN_REL));- expect(entry).toBeDefined();- const includes = entry?.includes ?? [];- expect(includes).toContain(FIXTURE_REL);- for (const dir of ['stress', 'visual', 'a11y']) {- expect(includes).toContain(`packages/app/tests/${dir}/**/*.e2e.ts`);- }+ test('its scope table still carries every include and exclude the rule depends on', () => {+ const scope = readRuleScope(REPO_ROOT, 'playwright-prefer-to-have-count');+ expect(scope.sort()).toEqual(+ [+ 'packages/app/tests/stress/**/*.e2e.ts',+ 'packages/app/tests/visual/**/*.e2e.ts',+ 'packages/app/tests/a11y/**/*.e2e.ts',+ 'lint-plugins/ok-rules/__fixtures__/playwright-prefer-to-have-count.fixture.tsx',+ ].sort(),+ );});});diff --git a/packages/cli/src/commands/diagnose-health-checks/macos-codesig.ts b/packages/cli/src/commands/diagnose-health-checks/macos-codesig.tsindex 68f21437d..1da4ebb60 100644--- a/packages/cli/src/commands/diagnose-health-checks/macos-codesig.ts+++ b/packages/cli/src/commands/diagnose-health-checks/macos-codesig.ts@@ -11,7 +11,7 @@ const PROBE_TIMEOUT_MS = 5000;const TRANSLOCATED_PREFIX = '/private/var/folders/';function defaultCodesignVerify(bundlePath: string): { ok: boolean; stderr: string } {- // biome-ignore lint/plugin/require-windowshide-on-spawn: macOS-only (codesign; never spawned on Windows or Linux)+ // oxlint-disable-next-line ok/require-windowshide-on-spawn -- macOS-only (codesign; never spawned on Windows or Linux)const r = spawnSync('codesign', ['--verify', '--deep', '--strict', bundlePath], {encoding: 'utf-8',timeout: PROBE_TIMEOUT_MS,diff --git a/packages/desktop/src/main/claude-readiness.ts b/packages/desktop/src/main/claude-readiness.tsindex 1953cf81b..f6fa7d557 100644--- a/packages/desktop/src/main/claude-readiness.ts+++ b/packages/desktop/src/main/claude-readiness.ts@@ -49,7 +49,7 @@ function runInjectedProbe(spec: InjectedProbeSpec): Promise<number | null> {return new Promise<number | null>((resolve) => {let child: ProbeChild;try {- // biome-ignore lint/plugin/require-windowshide-on-spawn: injected probe seam; the production child_process adapter owns its spawn options+ // oxlint-disable-next-line ok/require-windowshide-on-spawn -- injected probe seam; the production child_process adapter owns its spawn optionschild = spawn(file, args);} catch (err) {getLogger(loggerName).warn(diff --git a/packages/desktop/src/main/ipc/local-op.ts b/packages/desktop/src/main/ipc/local-op.tsindex 12da416c6..6d1d1ec80 100644--- a/packages/desktop/src/main/ipc/local-op.ts+++ b/packages/desktop/src/main/ipc/local-op.ts@@ -159,7 +159,7 @@ function runCoalescedAuthQuery<T>(if (inFlight.size >= MAX_CONCURRENT_AUTH_QUERIES) {return Promise.resolve(tooManyError(host));}- // biome-ignore lint/plugin/require-windowshide-on-spawn: callback starts a request; it is not node:child_process.spawn+ // oxlint-disable-next-line ok/require-windowshide-on-spawn -- callback starts a request; it is not node:child_process.spawnconst promise = spawn().finally(() => {inFlight.delete(host);});diff --git a/packages/desktop/src/main/path-install.ts b/packages/desktop/src/main/path-install.tsindex 4e3841269..174cd84ef 100644--- a/packages/desktop/src/main/path-install.ts+++ b/packages/desktop/src/main/path-install.ts@@ -341,7 +341,7 @@ async function discoverRealInteractivePath(const spawn = opts.spawn ?? defaultSpawn;const logger = opts.logger ?? DEFAULT_LOGGER;try {- // biome-ignore lint/plugin/require-windowshide-on-spawn: injected command-runner seam; defaultSpawn owns child_process options+ // oxlint-disable-next-line ok/require-windowshide-on-spawn -- injected command-runner seam; defaultSpawn owns child_process optionsconst result = await spawn(shell, ['-ilc', 'printf %s "$PATH"'], { timeoutMs: 2000, env });if (result.code !== 0 || result.timedOut || !result.stdout) {logger.event({diff --git a/packages/desktop/src/main/shell-env.ts b/packages/desktop/src/main/shell-env.tsindex f780e7663..44ea801a8 100644--- a/packages/desktop/src/main/shell-env.ts+++ b/packages/desktop/src/main/shell-env.ts@@ -28,7 +28,7 @@ export async function harvestShellAuthSock(const spawn = opts.spawn ?? defaultSpawn;const logger = opts.logger ?? DEFAULT_LOGGER;try {- // biome-ignore lint/plugin/require-windowshide-on-spawn: injected command-runner seam; defaultSpawn owns child_process options+ // oxlint-disable-next-line ok/require-windowshide-on-spawn -- injected command-runner seam; defaultSpawn owns child_process optionsconst result = await spawn(shell, ['-ilc', `printf %s "${MARK}$SSH_AUTH_SOCK${MARK}"`], {timeoutMs: opts.timeoutMs ?? 2000,env,diff --git a/packages/desktop/src/preload/index.ts b/packages/desktop/src/preload/index.tsindex 35d3a9ecf..e7e19daa9 100644--- a/packages/desktop/src/preload/index.ts+++ b/packages/desktop/src/preload/index.ts@@ -118,7 +118,7 @@ function createIpcEventStream<E extends { type: string }>(}};- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on(eventChannel, listener);listenerAttached = true;@@ -235,7 +235,7 @@ function readConfigFromArgv(): OkDesktopConfig {* reads the live binding rather than as a field on the frozen config.*/let screenReaderActive = parseArg('screen-reader-active') === '1';-// biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+// oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:accessibility:changed', (_event, info: { screenReaderActive: boolean }) => {screenReaderActive = info.screenReaderActive === true;});@@ -299,7 +299,7 @@ function deliverMenuAction(dispatch: OkMenuActionDispatch): void {const bufferedMenuActions: OkMenuActionDispatch[] = [];-// biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+// oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:menu-action', (_event, dispatch: OkMenuActionDispatch) => {if (menuActionListeners.size > 0) {deliverMenuAction(dispatch);@@ -327,7 +327,7 @@ const bridge: OkDesktopBridge = {* function registered, so the wrapper — not `cb` — is what both calls use.*/const listener = (_event: IpcRendererEvent, next: OkDesktopConfig) => cb(next);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:project:switched', listener);return () => ipcRenderer.removeListener('ok:project:switched', listener);},@@ -352,91 +352,91 @@ const bridge: OkDesktopBridge = {onUpdateDownloaded(cb: (info: OkUpdateDownloadedInfo) => void) {const listener = (_event: IpcRendererEvent, info: OkUpdateDownloadedInfo) => cb(info);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:update:downloaded', listener);return () => ipcRenderer.removeListener('ok:update:downloaded', listener);},onUpdateRelaunching(cb: (info: OkUpdateRelaunchingInfo) => void) {const listener = (_event: IpcRendererEvent, info: OkUpdateRelaunchingInfo) => cb(info);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:update:relaunching', listener);return () => ipcRenderer.removeListener('ok:update:relaunching', listener);},onUpdateFetchingLatest(cb: (info: OkUpdateFetchingLatestInfo) => void) {const listener = (_event: IpcRendererEvent, info: OkUpdateFetchingLatestInfo) => cb(info);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:update:fetching-latest', listener);return () => ipcRenderer.removeListener('ok:update:fetching-latest', listener);},onUpdateRelaunchFailed(cb: (info: OkUpdateRelaunchFailedInfo) => void) {const listener = (_event: IpcRendererEvent, info: OkUpdateRelaunchFailedInfo) => cb(info);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:update:relaunch-failed', listener);return () => ipcRenderer.removeListener('ok:update:relaunch-failed', listener);},onWhatsNew(cb: (info: OkWhatsNewInfo) => void) {const listener = (_event: IpcRendererEvent, info: OkWhatsNewInfo) => cb(info);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:update:whats-new', listener);return () => ipcRenderer.removeListener('ok:update:whats-new', listener);},onWhatsNewDismissed(cb: (info: { version: string }) => void) {const listener = (_event: IpcRendererEvent, info: { version: string }) => cb(info);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:update:whats-new-dismissed', listener);return () => ipcRenderer.removeListener('ok:update:whats-new-dismissed', listener);},onUpdateStuckHint(cb: (info: OkUpdateStuckHintInfo) => void) {const listener = (_event: IpcRendererEvent, info: OkUpdateStuckHintInfo) => cb(info);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:update:stuck-hint', listener);return () => ipcRenderer.removeListener('ok:update:stuck-hint', listener);},onUpdateManualCheck(cb: (info: OkUpdateManualCheckInfo) => void) {const listener = (_event: IpcRendererEvent, info: OkUpdateManualCheckInfo) => cb(info);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:update:manual-check', listener);return () => ipcRenderer.removeListener('ok:update:manual-check', listener);},onDeepLink(cb: (evt: OkDeepLinkPayload) => void) {const listener = (_event: IpcRendererEvent, evt: OkDeepLinkPayload) => cb(evt);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:deep-link', listener);return () => ipcRenderer.removeListener('ok:deep-link', listener);},onShareReceived(cb: (payload: OkShareReceivedPayload) => void) {const listener = (_event: IpcRendererEvent, payload: OkShareReceivedPayload) => cb(payload);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:share:received', listener);return () => ipcRenderer.removeListener('ok:share:received', listener);},onServerVersionDrift(cb: (info: OkServerVersionDriftInfo) => void) {const listener = (_event: IpcRendererEvent, info: OkServerVersionDriftInfo) => cb(info);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:server-version-drift', listener);return () => ipcRenderer.removeListener('ok:server-version-drift', listener);},onServerRestarted(cb: (info: OkServerRestartedInfo) => void) {const listener = (_event: IpcRendererEvent, info: OkServerRestartedInfo) => cb(info);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:server-restarted', listener);return () => ipcRenderer.removeListener('ok:server-restarted', listener);},onRecentRemovedMissing(cb: (info: OkRecentRemovedMissingInfo) => void) {const listener = (_event: IpcRendererEvent, info: OkRecentRemovedMissingInfo) => cb(info);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:project:recent-removed-missing', listener);return () => ipcRenderer.removeListener('ok:project:recent-removed-missing', listener);},@@ -569,7 +569,7 @@ const bridge: OkDesktopBridge = {onCrashDetected(cb: (event: OkBugReportCrashDetectedEvent) => void) {const listener = (_event: IpcRendererEvent, event: OkBugReportCrashDetectedEvent) =>cb(event);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:bug-report:crash-detected', listener);return () => ipcRenderer.removeListener('ok:bug-report:crash-detected', listener);},@@ -612,7 +612,7 @@ const bridge: OkDesktopBridge = {}) as Promise<OkNoteWindowMainActionResult>,onMainAction(cb: (action: OkNoteWindowMainAction) => void) {const listener = (_event: IpcRendererEvent, action: OkNoteWindowMainAction) => cb(action);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:note-window:main-action', listener);return () => ipcRenderer.removeListener('ok:note-window:main-action', listener);},@@ -643,7 +643,7 @@ const bridge: OkDesktopBridge = {mcpWiring: {onShow(cb: (payload: OkMcpWiringShowPayload) => void) {const listener = (_event: IpcRendererEvent, payload: OkMcpWiringShowPayload) => cb(payload);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:mcp-wiring:show', listener);return () => ipcRenderer.removeListener('ok:mcp-wiring:show', listener);},@@ -704,7 +704,7 @@ const bridge: OkDesktopBridge = {onboarding: {onShow(cb: (payload: OkOnboardingShowPayload) => void) {const listener = (_event: IpcRendererEvent, payload: OkOnboardingShowPayload) => cb(payload);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:onboarding:show', listener);return () => ipcRenderer.removeListener('ok:onboarding:show', listener);},@@ -716,7 +716,7 @@ const bridge: OkDesktopBridge = {probeContent: (request) => invoke('ok:onboarding:probe-content', request),onToast(cb: (payload: OkOnboardingToastPayload) => void) {const listener = (_event: IpcRendererEvent, payload: OkOnboardingToastPayload) => cb(payload);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:onboarding:toast', listener);return () => ipcRenderer.removeListener('ok:onboarding:toast', listener);},@@ -762,13 +762,13 @@ const bridge: OkDesktopBridge = {sidebar: {expandAll(cb: () => void) {const listener = (_event: IpcRendererEvent) => cb();- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:sidebar:expand-all', listener);return () => ipcRenderer.removeListener('ok:sidebar:expand-all', listener);},collapseAll(cb: () => void) {const listener = (_event: IpcRendererEvent) => cb();- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:sidebar:collapse-all', listener);return () => ipcRenderer.removeListener('ok:sidebar:collapse-all', listener);},@@ -821,19 +821,19 @@ const bridge: OkDesktopBridge = {},onData(cb) {const listener = (_event: IpcRendererEvent, msg: OkPtyData) => cb(msg);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:pty:data', listener);return () => ipcRenderer.removeListener('ok:pty:data', listener);},onExit(cb) {const listener = (_event: IpcRendererEvent, msg: OkPtyExit) => cb(msg);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:pty:exit', listener);return () => ipcRenderer.removeListener('ok:pty:exit', listener);},onNotice(cb) {const listener = (_event: IpcRendererEvent, msg: OkPtyNotice) => cb(msg);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:pty:notice', listener);return () => ipcRenderer.removeListener('ok:pty:notice', listener);},@@ -848,7 +848,7 @@ const bridge: OkDesktopBridge = {onScreenReaderChanged(cb) {const listener = (_event: IpcRendererEvent, info: { screenReaderActive: boolean }) =>cb(info.screenReaderActive === true);- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: preload-side subscription wrapper (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- preload-side subscription wrapper (precedent #14)ipcRenderer.on('ok:accessibility:changed', listener);return () => ipcRenderer.removeListener('ok:accessibility:changed', listener);},diff --git a/packages/desktop/src/shared/ipc-send.ts b/packages/desktop/src/shared/ipc-send.tsindex 485b8495e..4913fd5c7 100644--- a/packages/desktop/src/shared/ipc-send.ts+++ b/packages/desktop/src/shared/ipc-send.ts@@ -10,7 +10,7 @@ export function sendToRenderer<K extends keyof EventChannels>(channel: K,payload: EventChannels[K]['payload'],): void {- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: typed sendToRenderer factory body (precedent #14)+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- typed sendToRenderer factory body (precedent #14)webContents.send(channel, payload);}diff --git a/packages/desktop/tests/integration/no-loosely-typed-webcontents-ipc.test.ts b/packages/desktop/tests/integration/no-loosely-typed-webcontents-ipc.test.tsindex fb8d125af..b8cfa4a6c 100644--- a/packages/desktop/tests/integration/no-loosely-typed-webcontents-ipc.test.ts+++ b/packages/desktop/tests/integration/no-loosely-typed-webcontents-ipc.test.ts@@ -1,13 +1,13 @@/**- * IPC discipline enforcement — `no-loosely-typed-webcontents-ipc` GritQL plugin.+ * IPC discipline enforcement — `no-loosely-typed-webcontents-ipc` oxlint rule.*- * Plugin: `biome-plugins/no-loosely-typed-webcontents-ipc.grit`- * Fixture: `biome-plugins/__fixtures__/no-loosely-typed-webcontents-ipc.fixture.tsx`+ * Rule: `lint-plugins/ok-rules/rules/no-loosely-typed-webcontents-ipc.mjs`+ * Fixture: `lint-plugins/ok-rules/__fixtures__/no-loosely-typed-webcontents-ipc.fixture.tsx`*- * Per precedent #42 (custom Biome enforcement is GritQL plugins) + precedent+ * Per precedent #42 (custom lint enforcement is oxlint JS-plugin rules) + precedent* #14 (IPC discipline). The fixture pairs 6 positive cases (one per banned* primitive) with 4 negative cases (adjacent methods on the same objects +- * bare-function with the same name); the test asserts the plugin fires+ * bare-function with the same name); the test asserts the rule fires* exactly 6 times.** Exact equality (`toBe(6)`) catches drift in both directions:@@ -15,20 +15,25 @@* - false-positive: a widened pattern fires on a negative case → above 6 → fails** Real input → public- * interface (`biome check`) → observable outcome (diagnostic count).+ * interface (`oxlintFixtureArgs()` → `pnpm exec oxlint`) → observable outcome (diagnostic count).*/import { spawnSync } from 'node:child_process';import { join } from 'node:path';import { describe, expect, test } from 'vitest';-import { readBiomeConfig } from '../../../../test-support/read-biome-config.test-helper.ts';+import {+ oxlintFixtureArgs,+ readEnabledRuleIds,+ readRegisteredRuleNames,+} from '../../../../test-support/read-ok-rules-config.test-helper';const REPO_ROOT = join(__dirname, '..', '..', '..', '..');-const FIXTURE_REL = 'biome-plugins/__fixtures__/no-loosely-typed-webcontents-ipc.fixture.tsx';+const FIXTURE_REL =+ 'lint-plugins/ok-rules/__fixtures__/no-loosely-typed-webcontents-ipc.fixture.tsx';-describe('no-loosely-typed-webcontents-ipc GritQL plugin', () => {+describe('no-loosely-typed-webcontents-ipc oxlint rule', () => {test('fires on exactly 6 banned primitives (and on no negative case)', () => {- const result = spawnSync('pnpm', ['exec', 'biome', 'check', FIXTURE_REL], {+ const result = spawnSync('pnpm', oxlintFixtureArgs(FIXTURE_REL), {cwd: REPO_ROOT,encoding: 'utf-8',});@@ -38,12 +43,11 @@ describe('no-loosely-typed-webcontents-ipc GritQL plugin', () => {expect(fires).toBe(6);expect(output).toContain('route through createInvoker');expect(output).toMatch(/https?:\/\/[^\s]+/);- expect(output).toContain('biome-plugins/README.md#no-loosely-typed-webcontents-ipcgrit');+ expect(output).toContain('lint-plugins/ok-rules/README.md#no-loosely-typed-webcontents-ipc');});- test('plugin is registered in biome.jsonc', () => {- const config = readBiomeConfig(REPO_ROOT);- const plugins = config.plugins ?? [];- expect(plugins).toContain('./biome-plugins/no-loosely-typed-webcontents-ipc.grit');+ test('rule is registered, enabled, and deliberately unscoped', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain('no-loosely-typed-webcontents-ipc');+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain('ok/no-loosely-typed-webcontents-ipc');});});diff --git a/packages/desktop/tests/integration/no-resolved-value-theme-source.test.ts b/packages/desktop/tests/integration/no-resolved-value-theme-source.test.tsindex 9a67a211a..1be927944 100644--- a/packages/desktop/tests/integration/no-resolved-value-theme-source.test.ts+++ b/packages/desktop/tests/integration/no-resolved-value-theme-source.test.ts@@ -1,12 +1,12 @@/**- * 1-way theme contract — `no-resolved-value-theme-source` GritQL plugin.+ * 1-way theme contract — `no-resolved-value-theme-source` oxlint rule.*- * Plugin: `biome-plugins/no-resolved-value-theme-source.grit`- * Fixture: `biome-plugins/__fixtures__/no-resolved-value-theme-source.fixture.tsx`+ * Rule: `lint-plugins/ok-rules/rules/no-resolved-value-theme-source.mjs`+ * Fixture: `lint-plugins/ok-rules/__fixtures__/no-resolved-value-theme-source.fixture.tsx`*- * Per precedent #42, GritQL plugins are the canonical custom-enforcement+ * Per precedent #42, oxlint rules are the canonical custom-enforcement* mechanism. This test mirrors the shape codified in precedent #42's- * authoring template: shell out to `pnpm exec biome check` on a fixture file+ * authoring template: shell out to `pnpm exec oxlint` on a fixture file* with deliberate violations + clean usage; assert exact diagnostic count.** Exact-equality assertion (`toBe(3)`) catches BOTH directions of drift:@@ -19,20 +19,24 @@* lacks; it's why fixture design pairs positive cases with negative ones.** Pattern C test: real input → public- * interface (`biome check`) → observable outcome (diagnostic count).+ * interface (`oxlintFixtureArgs()` → `pnpm exec oxlint`) → observable outcome (diagnostic count).*/import { spawnSync } from 'node:child_process';import { join } from 'node:path';import { describe, expect, test } from 'vitest';-import { readBiomeConfig } from '../../../../test-support/read-biome-config.test-helper.ts';+import {+ oxlintFixtureArgs,+ readEnabledRuleIds,+ readRegisteredRuleNames,+} from '../../../../test-support/read-ok-rules-config.test-helper';const REPO_ROOT = join(__dirname, '..', '..', '..', '..');-const FIXTURE_REL = 'biome-plugins/__fixtures__/no-resolved-value-theme-source.fixture.tsx';+const FIXTURE_REL = 'lint-plugins/ok-rules/__fixtures__/no-resolved-value-theme-source.fixture.tsx';-describe('1-way theme contract — no-resolved-value-theme-source GritQL plugin', () => {+describe('1-way theme contract — no-resolved-value-theme-source oxlint rule', () => {test('fires on exactly 3 positive cases (and on no negative case)', () => {- const result = spawnSync('pnpm', ['exec', 'biome', 'check', FIXTURE_REL], {+ const result = spawnSync('pnpm', oxlintFixtureArgs(FIXTURE_REL), {cwd: REPO_ROOT,encoding: 'utf-8',});@@ -42,12 +46,11 @@ describe('1-way theme contract — no-resolved-value-theme-source GritQL plugin'expect(fires).toBe(3);expect(output).toContain('pass the unresolved CRDT value');expect(output).toMatch(/https?:\/\/[^\s]+/);- expect(output).toContain('biome-plugins/README.md#no-resolved-value-theme-sourcegrit');+ expect(output).toContain('lint-plugins/ok-rules/README.md#no-resolved-value-theme-source');});- test('plugin is registered in biome.jsonc', () => {- const config = readBiomeConfig(REPO_ROOT);- const plugins = config.plugins ?? [];- expect(plugins).toContain('./biome-plugins/no-resolved-value-theme-source.grit');+ test('rule is registered, enabled, and deliberately unscoped', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain('no-resolved-value-theme-source');+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain('ok/no-resolved-value-theme-source');});});diff --git a/packages/desktop/tests/integration/no-uninstall-forbidden-import.test.ts b/packages/desktop/tests/integration/no-uninstall-forbidden-import.test.tsindex 1cdb7e7e7..e2f0f5dbe 100644--- a/packages/desktop/tests/integration/no-uninstall-forbidden-import.test.ts+++ b/packages/desktop/tests/integration/no-uninstall-forbidden-import.test.ts@@ -1,22 +1,26 @@import { spawnSync } from 'node:child_process';import { join } from 'node:path';import { describe, expect, test } from 'vitest';-import { readBiomeConfig } from '../../../../test-support/read-biome-config.test-helper.ts';+import {+ oxlintFixtureArgs,+ readEnabledRuleIds,+ readRegisteredRuleNames,+ readRuleScope,+} from '../../../../test-support/read-ok-rules-config.test-helper';const REPO_ROOT = join(__dirname, '..', '..', '..', '..');-const FIXTURE_REL = 'biome-plugins/__fixtures__/no-uninstall-forbidden-import.fixture.tsx';-const PLUGIN_REL = './biome-plugins/no-uninstall-forbidden-import.grit';+const FIXTURE_REL = 'lint-plugins/ok-rules/__fixtures__/no-uninstall-forbidden-import.fixture.tsx';-describe('no-uninstall-forbidden-import GritQL plugin', () => {+describe('no-uninstall-forbidden-import oxlint rule', () => {test('fires on exactly 13 cases (12 forbidden imports + 1 dynamic import), and on no negative case', () => {- const result = spawnSync('pnpm', ['exec', 'biome', 'check', FIXTURE_REL], {+ const result = spawnSync('pnpm', oxlintFixtureArgs(FIXTURE_REL), {cwd: REPO_ROOT,encoding: 'utf-8',});expect(result.status).not.toBe(0);const output = `${result.stdout}\n${result.stderr}`;- const fires = (output.match(/no-uninstall-forbidden-importgrit/g) ?? []).length;+ const fires = (output.match(/ok\(no-uninstall-forbidden-import\)/g) ?? []).length;expect(fires).toBe(13);const forbidden = (output.match(/Forbidden module in the uninstall entry/g) ?? []).length;const dynamic = (output.match(/Dynamic import under src\/uninstall/g) ?? []).length;@@ -26,25 +30,21 @@ describe('no-uninstall-forbidden-import GritQL plugin', () => {expect(output).toContain('must connect to nothing');expect(output).toContain('eager-load');expect(output).toMatch(/https?:\/\/[^\s]+/);- expect(output).toContain('biome-plugins/README.md#no-uninstall-forbidden-importgrit');+ expect(output).toContain('lint-plugins/ok-rules/README.md#no-uninstall-forbidden-import');});- test('is registered in biome.jsonc via overrides scoped to src/uninstall (not root plugins)', () => {- const config = readBiomeConfig(REPO_ROOT);-- const rootPlugins = config.plugins ?? [];- expect(rootPlugins).not.toContain(PLUGIN_REL);-- const overrides = config.overrides ?? [];- const matchingOverride = overrides.find((entry) => (entry.plugins ?? []).includes(PLUGIN_REL));- expect(matchingOverride).toBeDefined();+ test('rule is registered, enabled, and scoped via its RULE_SCOPES entry', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain('no-uninstall-forbidden-import');+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain('ok/no-uninstall-forbidden-import');+ expect(readRuleScope(REPO_ROOT, 'no-uninstall-forbidden-import')).not.toEqual([]);+ });- const includes = matchingOverride?.includes ?? [];- expect(includes).toContain('packages/app/src/uninstall/**/*.ts');- expect(includes).toContain('packages/app/src/uninstall/**/*.tsx');- expect(includes).toContain('!packages/app/src/uninstall/**/*.test.ts');- expect(includes).toContain('!packages/app/src/uninstall/**/*.test.tsx');- expect(includes).toContain('!packages/app/src/uninstall/**/*.dom.test.tsx');- expect(includes).toContain(FIXTURE_REL);+ test('its scope table still carries every include and exclude the rule depends on', () => {+ const scope = readRuleScope(REPO_ROOT, 'no-uninstall-forbidden-import');+ expect(scope).toContain('packages/app/src/uninstall/**/*.ts');+ expect(scope).toContain('packages/app/src/uninstall/**/*.tsx');+ expect(scope).toContain('!packages/app/src/uninstall/**/*.test.ts');+ expect(scope).toContain('!packages/app/src/uninstall/**/*.test.tsx');+ expect(scope).toContain('!packages/app/src/uninstall/**/*.dom.test.tsx');});});diff --git a/packages/desktop/tests/smoke/theme-sync.e2e.ts b/packages/desktop/tests/smoke/theme-sync.e2e.tsindex e5251677c..82a7ec1d8 100644--- a/packages/desktop/tests/smoke/theme-sync.e2e.ts+++ b/packages/desktop/tests/smoke/theme-sync.e2e.ts@@ -161,7 +161,7 @@ test.describe('chrome-modernization theme-sync smoke', () => {const themeAppliedCalls: Array<{ opts: unknown; at: number }> = [];g.__okThemeAppliedCalls = themeAppliedCalls;ipcMain.removeHandler('ok:theme:applied');- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: E2E test scaffolding — installs mock IPC handler inside the Electron process under test+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- E2E test scaffolding — installs mock IPC handler inside the Electron process under testipcMain.handle('ok:theme:applied', async (_event, opts) => {themeAppliedCalls.push({ opts, at: Date.now() });return undefined;@@ -169,7 +169,7 @@ test.describe('chrome-modernization theme-sync smoke', () => {ipcMain.removeHandler('ok:theme:set-source');let alreadyThrew = false;- // biome-ignore lint/plugin/no-loosely-typed-webcontents-ipc: E2E test scaffolding — installs mock IPC handler inside the Electron process under test+ // oxlint-disable-next-line ok/no-loosely-typed-webcontents-ipc -- E2E test scaffolding — installs mock IPC handler inside the Electron process under testipcMain.handle('ok:theme:set-source', async (_e, _args) => {if (!alreadyThrew) {alreadyThrew = true;diff --git a/packages/server/src/git-preflight.ts b/packages/server/src/git-preflight.tsindex b068484ad..68eca12c8 100644--- a/packages/server/src/git-preflight.ts+++ b/packages/server/src/git-preflight.ts@@ -117,7 +117,7 @@ function probeGit(command: string): ProbeResult {timeout: PROBE_TIMEOUT_MS,env: { ...process.env, LANG: 'C', LC_ALL: 'C' },});- // biome-ignore lint/plugin/require-windowshide-on-spawn: windowsHide is set on `opts` via withHiddenWindowsConsole above; the rule can't see through the by-reference options variable.+ // oxlint-disable-next-line ok/require-windowshide-on-spawn -- windowsHide is set on `opts` via withHiddenWindowsConsole above; the rule can't see through the by-reference options variable.const result = spawnSync(command, ['--version'], opts);if (result.error) {if ('signal' in result && result.signal === 'SIGTERM')diff --git a/packages/server/src/lint-plugins/require-utf8-multipart-parser.test.ts b/packages/server/src/lint-plugins/require-utf8-multipart-parser.test.tsindex 8d766eb50..f93fdf690 100644--- a/packages/server/src/lint-plugins/require-utf8-multipart-parser.test.ts+++ b/packages/server/src/lint-plugins/require-utf8-multipart-parser.test.ts@@ -1,15 +1,19 @@import { spawnSync } from 'node:child_process';import { join } from 'node:path';import { describe, expect, test } from 'vitest';-import { readBiomeConfig } from '../../../../test-support/read-biome-config.test-helper.ts';+import {+ oxlintFixtureArgs,+ readEnabledRuleIds,+ readRegisteredRuleNames,+ readRuleScope,+} from '../../../../test-support/read-ok-rules-config.test-helper';const REPO_ROOT = join(__dirname, '..', '..', '..', '..');-const FIXTURE_REL = 'biome-plugins/__fixtures__/require-utf8-multipart-parser.fixture.tsx';-const PLUGIN_REL = './biome-plugins/require-utf8-multipart-parser.grit';+const FIXTURE_REL = 'lint-plugins/ok-rules/__fixtures__/require-utf8-multipart-parser.fixture.tsx';-describe('require-utf8-multipart-parser GritQL plugin', () => {+describe('require-utf8-multipart-parser oxlint rule', () => {test('fires exactly 3 times — one per direct busboy construction', () => {- const result = spawnSync('pnpm', ['exec', 'biome', 'check', FIXTURE_REL], {+ const result = spawnSync('pnpm', oxlintFixtureArgs(FIXTURE_REL), {cwd: REPO_ROOT,encoding: 'utf-8',windowsHide: true,@@ -24,42 +28,42 @@ describe('require-utf8-multipart-parser GritQL plugin', () => {expect(output).toContain('createMultipartParser');expect(output).toContain('packages/server/src/multipart.ts');expect(output).toMatch(/https?:\/\/[^\s]+/);- expect(output).toContain('biome-plugins/README.md#require-utf8-multipart-parsergrit');+ expect(output).toContain('lint-plugins/ok-rules/README.md#require-utf8-multipart-parser');});test('the factory module itself is exempt, so the sanctioned call passes', () => {- const result = spawnSync(- 'pnpm',- ['exec', 'biome', 'check', 'packages/server/src/multipart.ts'],- {- cwd: REPO_ROOT,- encoding: 'utf-8',- windowsHide: true,- },- );+ const result = spawnSync('pnpm', oxlintFixtureArgs('packages/server/src/multipart.ts'), {+ cwd: REPO_ROOT,+ encoding: 'utf-8',+ windowsHide: true,+ });expect(result.error).toBeUndefined();const output = `${result.stdout}\n${result.stderr}`;- expect(output).toMatch(/Checked \d+ file/);+ expect(output).not.toContain('ok(require-utf8-multipart-parser)');expect(output).not.toContain('busboy constructed directly');});- test('plugin is registered in biome.jsonc via overrides (not root plugins)', () => {- const config = readBiomeConfig(REPO_ROOT);-- const rootPlugins = config.plugins ?? [];- expect(rootPlugins).not.toContain(PLUGIN_REL);-- const overrides = config.overrides ?? [];- const matchingOverride = overrides.find((entry) => (entry.plugins ?? []).includes(PLUGIN_REL));- expect(matchingOverride).toBeDefined();+ test('rule is registered, enabled, and scoped via its RULE_SCOPES entry', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain('require-utf8-multipart-parser');+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain('ok/require-utf8-multipart-parser');+ });- const includes = matchingOverride?.includes ?? [];- expect(includes).toContain('**/*.ts');- expect(includes).toContain('**/*.tsx');- expect(includes).toContain('**/*.mts');- expect(includes).not.toContain('packages/server/src/**/*.ts');- expect(includes).toContain('!packages/server/src/multipart.ts');- expect(includes).toContain('!**/*.test.ts');- expect(includes).toContain(FIXTURE_REL);+ test('its scope table still carries every include and exclude the rule depends on', () => {+ const scope = readRuleScope(REPO_ROOT, 'require-utf8-multipart-parser');+ expect(scope.sort()).toEqual(+ [+ '**/*.ts',+ '**/*.tsx',+ '**/*.mts',+ '!**/node_modules/**',+ '!**/dist/**',+ '!**/*.test.ts',+ '!**/*.test.tsx',+ '!**/*.test.mts',+ '!**/*.test-helper.ts',+ '!packages/server/src/multipart.ts',+ 'lint-plugins/ok-rules/__fixtures__/require-utf8-multipart-parser.fixture.tsx',+ ].sort(),+ );});});diff --git a/packages/server/src/lint-plugins/require-windowshide-on-spawn.test.ts b/packages/server/src/lint-plugins/require-windowshide-on-spawn.test.tsindex 3d9ad60ca..ec1458a60 100644--- a/packages/server/src/lint-plugins/require-windowshide-on-spawn.test.ts+++ b/packages/server/src/lint-plugins/require-windowshide-on-spawn.test.ts@@ -1,14 +1,19 @@import { spawnSync } from 'node:child_process';import { join } from 'node:path';import { describe, expect, test } from 'vitest';-import { readBiomeConfig } from '../../../../test-support/read-biome-config.test-helper.ts';+import {+ oxlintFixtureArgs,+ readEnabledRuleIds,+ readRegisteredRuleNames,+ readRuleScope,+} from '../../../../test-support/read-ok-rules-config.test-helper';const REPO_ROOT = join(__dirname, '..', '..', '..', '..');-const FIXTURE_REL = 'biome-plugins/__fixtures__/require-windowshide-on-spawn.fixture.tsx';+const FIXTURE_REL = 'lint-plugins/ok-rules/__fixtures__/require-windowshide-on-spawn.fixture.tsx';-describe('require-windowshide-on-spawn GritQL plugin', () => {+describe('require-windowshide-on-spawn oxlint rule', () => {test('fires exactly 7 times — one per spawn that hides neither way', () => {- const result = spawnSync('pnpm', ['exec', 'biome', 'check', FIXTURE_REL], {+ const result = spawnSync('pnpm', oxlintFixtureArgs(FIXTURE_REL), {cwd: REPO_ROOT,encoding: 'utf-8',windowsHide: true,@@ -23,28 +28,25 @@ describe('require-windowshide-on-spawn GritQL plugin', () => {expect(output).toContain('withHiddenWindowsConsole');expect(output).toContain('windowsHide: true');expect(output).toMatch(/https?:\/\/[^\s]+/);- expect(output).toContain('biome-plugins/README.md#require-windowshide-on-spawngrit');+ expect(output).toContain('lint-plugins/ok-rules/README.md#require-windowshide-on-spawn');});- test('plugin is registered in biome.jsonc via overrides (not root plugins)', () => {- const config = readBiomeConfig(REPO_ROOT);-- const rootPlugins = config.plugins ?? [];- expect(rootPlugins).not.toContain('./biome-plugins/require-windowshide-on-spawn.grit');-- const overrides = config.overrides ?? [];- const matchingOverride = overrides.find((entry) =>- (entry.plugins ?? []).includes('./biome-plugins/require-windowshide-on-spawn.grit'),- );- expect(matchingOverride).toBeDefined();+ test('rule is registered, enabled, and scoped via its RULE_SCOPES entry', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain('require-windowshide-on-spawn');+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain('ok/require-windowshide-on-spawn');+ });- const includes = matchingOverride?.includes ?? [];- expect(includes).toContain('packages/server/src/**/*.ts');- expect(includes).toContain('packages/cli/src/**/*.ts');- expect(includes).toContain('packages/desktop/src/**/*.ts');- expect(includes).toContain('!**/*.test.ts');- expect(includes).toContain(- 'biome-plugins/__fixtures__/require-windowshide-on-spawn.fixture.tsx',+ test('its scope table still carries every include and exclude the rule depends on', () => {+ const scope = readRuleScope(REPO_ROOT, 'require-windowshide-on-spawn');+ expect(scope.sort()).toEqual(+ [+ 'packages/server/src/**/*.ts',+ 'packages/cli/src/**/*.ts',+ 'packages/desktop/src/**/*.ts',+ '!**/*.test.ts',+ '!**/*.test-helper.ts',+ 'lint-plugins/ok-rules/__fixtures__/require-windowshide-on-spawn.fixture.tsx',+ ].sort(),);});});diff --git a/packages/server/src/path-conditional-map-driven-origin.test.ts b/packages/server/src/path-conditional-map-driven-origin.test.tsindex c0fa27cf1..4ccee3c2d 100644--- a/packages/server/src/path-conditional-map-driven-origin.test.ts+++ b/packages/server/src/path-conditional-map-driven-origin.test.ts@@ -1,14 +1,20 @@import { spawnSync } from 'node:child_process';import { join } from 'node:path';import { describe, expect, test } from 'vitest';-import { readBiomeConfig } from '../../../test-support/read-biome-config.test-helper';+import {+ oxlintFixtureArgs,+ readEnabledRuleIds,+ readRegisteredRuleNames,+ readRuleScope,+} from '../../../test-support/read-ok-rules-config.test-helper';const REPO_ROOT = join(__dirname, '..', '..', '..');-const FIXTURE_REL = 'biome-plugins/__fixtures__/path-conditional-map-driven-origin.fixture.tsx';+const FIXTURE_REL =+ 'lint-plugins/ok-rules/__fixtures__/path-conditional-map-driven-origin.fixture.tsx';-describe('path-conditional-map-driven-origin GritQL plugin', () => {+describe('path-conditional-map-driven-origin oxlint rule', () => {test('fires on exactly 7 positive cases (and on no negative case)', () => {- const result = spawnSync('pnpm', ['exec', 'biome', 'check', FIXTURE_REL], {+ const result = spawnSync('pnpm', oxlintFixtureArgs(FIXTURE_REL), {cwd: REPO_ROOT,encoding: 'utf-8',});@@ -19,25 +25,23 @@ describe('path-conditional-map-driven-origin GritQL plugin', () => {expect(fires).toBe(7);expect(output).toContain('Pass `OBSERVER_SYNC_ORIGIN` as the second argument');expect(output).toMatch(/https?:\/\/[^\s]+/);- expect(output).toContain('biome-plugins/README.md#path-conditional-map-driven-origingrit');+ expect(output).toContain('lint-plugins/ok-rules/README.md#path-conditional-map-driven-origin');});- test('plugin is registered in biome.jsonc via overrides (not root plugins)', () => {- const config = readBiomeConfig(REPO_ROOT);-- const rootPlugins = config.plugins ?? [];- expect(rootPlugins).not.toContain('./biome-plugins/path-conditional-map-driven-origin.grit');-- const overrides = config.overrides ?? [];- const matchingOverride = overrides.find((entry) =>- (entry.plugins ?? []).includes('./biome-plugins/path-conditional-map-driven-origin.grit'),+ test('rule is registered, enabled, and scoped via its RULE_SCOPES entry', async () => {+ expect(await readRegisteredRuleNames(REPO_ROOT)).toContain(+ 'path-conditional-map-driven-origin',);- expect(matchingOverride).toBeDefined();+ expect(await readEnabledRuleIds(REPO_ROOT)).toContain('ok/path-conditional-map-driven-origin');+ });- const includes = matchingOverride?.includes ?? [];- expect(includes).toContain('packages/server/src/server-observers.ts');- expect(includes).toContain(- 'biome-plugins/__fixtures__/path-conditional-map-driven-origin.fixture.tsx',+ test('its scope table still carries every include and exclude the rule depends on', () => {+ const scope = readRuleScope(REPO_ROOT, 'path-conditional-map-driven-origin');+ expect(scope.sort()).toEqual(+ [+ 'packages/server/src/server-observers.ts',+ 'lint-plugins/ok-rules/__fixtures__/path-conditional-map-driven-origin.fixture.tsx',+ ].sort(),);});});diff --git a/test-support/no-net-connect.ts b/test-support/no-net-connect.tsindex b67cea83d..6cfe8b1e3 100644--- a/test-support/no-net-connect.ts+++ b/test-support/no-net-connect.ts@@ -68,8 +68,7 @@ export function isLoopbackHostname(hostname: string): boolean {}function resolveTarget(input: unknown): URL | null {- const base =- typeof globalThis.location?.href === 'string' ? globalThis.location.href : undefined;+ const base = typeof globalThis.location?.href === 'string' ? globalThis.location.href : undefined;const raw =typeof input === 'string'? inputdiff --git a/test-support/read-biome-config.test-helper.ts b/test-support/read-biome-config.test-helper.tsdeleted file mode 100644index bfd5ddf62..000000000--- a/test-support/read-biome-config.test-helper.ts+++ /dev/null@@ -1,71 +0,0 @@-import { readFileSync } from 'node:fs';-import { join } from 'node:path';--export interface BiomeConfig {- plugins?: string[];- overrides?: Array<{ includes?: string[]; plugins?: string[] }>;-}--/**- * Strip `//` line and block comments, then trailing commas, from JSONC text.- * String-aware so the `//` inside a URL value (e.g. the `$schema` field)- * survives — a plain regex strip would truncate it.- */-function stripJsonc(text: string): string {- let out = '';- let inStr = false;- let inLine = false;- let inBlock = false;- let esc = false;- for (let i = 0; i < text.length; i++) {- const c = text[i];- const next = text[i + 1];- if (inLine) {- if (c === '\n') {- inLine = false;- out += c;- }- continue;- }- if (inBlock) {- if (c === '*' && next === '/') {- inBlock = false;- i++;- }- continue;- }- if (inStr) {- out += c;- if (esc) esc = false;- else if (c === '\\') esc = true;- else if (c === '"') inStr = false;- continue;- }- if (c === '"') {- inStr = true;- out += c;- continue;- }- if (c === '/' && next === '/') {- inLine = true;- i++;- continue;- }- if (c === '/' && next === '*') {- inBlock = true;- i++;- continue;- }- out += c;- }- return out.replace(/,(\s*[}\]])/g, '$1');-}--/**- * Read and parse the repo-root `biome.jsonc`. Node's `JSON.parse` rejects the- * comments Biome's config carries, so parse via a string-aware JSONC strip.- */-export function readBiomeConfig(repoRoot: string): BiomeConfig {- const raw = readFileSync(join(repoRoot, 'biome.jsonc'), 'utf8');- return JSON.parse(stripJsonc(raw)) as BiomeConfig;-}diff --git a/test-support/read-ok-rules-config.test-helper.ts b/test-support/read-ok-rules-config.test-helper.tsnew file mode 100644index 000000000..976161368--- /dev/null+++ b/test-support/read-ok-rules-config.test-helper.ts@@ -0,0 +1,79 @@+import { join } from 'node:path';+import { pathToFileURL } from 'node:url';+// @ts-expect-error untyped ESM lint-plugin module+import { RULE_SCOPES } from '../lint-plugins/ok-rules/scope.mjs';++const OK_RULES_FIXTURE_CONFIG = 'lint-plugins/ok-rules/__fixtures__/oxlint.fixtures.json';++export function oxlintFixtureArgs(fixtureRel: string): string[] {+ return ['exec', 'oxlint', '-f', 'json', '-c', OK_RULES_FIXTURE_CONFIG, fixtureRel];+}++export interface OxlintDiagnostic {+ message: string;+ code: string;+ filename: string;+ labels?: Array<{ span?: { line?: number; column?: number } }>;+}++export function parseOxlintDiagnostics(output: string): OxlintDiagnostic[] {+ const start = output.indexOf('{');+ const end = output.lastIndexOf('}');+ if (start === -1 || end === -1) return [];+ return (JSON.parse(output.slice(start, end + 1)).diagnostics ?? []) as OxlintDiagnostic[];+}++interface OxlintConfig {+ jsPlugins?: Array<string | { name?: string; specifier: string }>;+ rules?: Record<string, unknown>;+}++const OXLINT_CONFIG = 'oxlint.config.ts';+const OK_RULES_INDEX = 'lint-plugins/ok-rules/index.mjs';++type ReadModule = typeof OXLINT_CONFIG | typeof OK_RULES_INDEX;++function required<T>(+ value: T | undefined,+ { module, exportName }: { module: ReadModule; exportName: string },+): T {+ if (value === undefined) {+ throw new Error(+ `read-ok-rules-config: ${module} exposes no \`${exportName}\`. Substituting an empty ` ++ 'value would report every rule as unregistered, so this fails loudly instead.',+ );+ }+ return value;+}++async function loadOxlintConfig(repoRoot: string): Promise<OxlintConfig> {+ const url = pathToFileURL(join(repoRoot, OXLINT_CONFIG)).href;+ const mod = (await import(/* @vite-ignore */ url)) as { default?: OxlintConfig };+ return required(mod.default, { module: OXLINT_CONFIG, exportName: 'default export' });+}++export async function readEnabledRuleIds(repoRoot: string): Promise<string[]> {+ const config = await loadOxlintConfig(repoRoot);+ const rules = required(config.rules, { module: OXLINT_CONFIG, exportName: 'rules' });+ return Object.entries(rules)+ .filter(([id, severity]) => /^ok(?:-private)?\//.test(id) && severity === 'error')+ .map(([id]) => id);+}++export async function readJsPluginSpecifiers(repoRoot: string): Promise<string[]> {+ const config = await loadOxlintConfig(repoRoot);+ const jsPlugins = required(config.jsPlugins, { module: OXLINT_CONFIG, exportName: 'jsPlugins' });+ return jsPlugins.map((entry) => (typeof entry === 'string' ? entry : entry.specifier));+}++export async function readRegisteredRuleNames(repoRoot: string): Promise<string[]> {+ const url = pathToFileURL(join(repoRoot, OK_RULES_INDEX)).href;+ const { rules } = (await import(/* @vite-ignore */ url)) as {+ rules?: Record<string, unknown>;+ };+ return Object.keys(required(rules, { module: OK_RULES_INDEX, exportName: 'rules' }));+}++export function readRuleScope(_repoRoot: string, ruleName: string): string[] {+ return (RULE_SCOPES as Record<string, string[]>)[ruleName] ?? [];+}diff --git a/turbo.json b/turbo.jsonindex 2b454991c..c61904f08 100644--- a/turbo.json+++ b/turbo.json@@ -82,7 +82,9 @@"tests/lingui-macro-shim.tsx","tests/integration/idb-preload.ts","../../test-support/*.ts",- "../test-support/*.ts"+ "../test-support/*.ts",+ "../../oxlint.config.ts",+ "../../lint-plugins/**"]},"@inkeep/open-knowledge-docs#test": {@@ -101,7 +103,6 @@"tsconfig.json","vitest.config.ts","vitest.*.config.mts",- "../../test-support/*.ts","../test-support/*.ts"]},@@ -127,7 +128,8 @@"!CHANGELOG.md","!README.md","../../biome.jsonc",- "../../biome-plugins/**",+ "../../oxlint.config.ts",+ "../../lint-plugins/**","../../test-support/**","../../.github/scripts/smoke-packaged-dmg.mjs","../../scripts/verify-native-config-in-packaged-dmg.mjs",@@ -148,7 +150,9 @@"corpora/**/*.json","vitest.config.ts","../../test-support/*.ts",- "../server/src/**/*.ts"+ "../server/src/**/*.ts",+ "../../oxlint.config.ts",+ "../../lint-plugins/**"]},"@inkeep/open-knowledge-core#test": {@@ -167,8 +171,7 @@"vite.dedupe.ts","tests/lingui-macro-shim.tsx","tests/integration/idb-preload.ts",- "../../test-support/*.ts",- "../test-support/*.ts"+ "../../test-support/**"]},"test:dom": {@@ -212,11 +215,15 @@"vite.dedupe.ts","vite.react-babel.ts","../../pnpm-lock.yaml",- "../../test-support/*.ts",+ "../../test-support/**","../server/src/**/*.ts","../core/src/**/*.ts",+ "../desktop/tests/**/*.{ts,tsx}",+ "../md-conformance/src/**/*.{ts,tsx,mjs,json,md}",+ "tests/lint-plugins/**/*.{mjs,json,md}",+ "src/lint-plugins/**/*.{mjs,json,md}",+ "../server/src/lint-plugins/**/*.{tsx,mjs,json,md}","../../biome.jsonc",- "../../biome-plugins/**","../../lint-plugins/**","../../oxlint.config.ts"]@@ -238,11 +245,15 @@"vite.dedupe.ts","vite.react-babel.ts","../../pnpm-lock.yaml",- "../../test-support/*.ts",+ "../../test-support/**","../server/src/**/*.ts","../core/src/**/*.ts",+ "../desktop/tests/**/*.{ts,tsx}",+ "../md-conformance/src/**/*.{ts,tsx,mjs,json,md}",+ "tests/lint-plugins/**/*.{mjs,json,md}",+ "src/lint-plugins/**/*.{mjs,json,md}",+ "../server/src/lint-plugins/**/*.{tsx,mjs,json,md}","../../biome.jsonc",- "../../biome-plugins/**","../../lint-plugins/**","../../oxlint.config.ts"]@@ -264,11 +275,15 @@"vite.dedupe.ts","vite.react-babel.ts","../../pnpm-lock.yaml",- "../../test-support/*.ts",+ "../../test-support/**","../server/src/**/*.ts","../core/src/**/*.ts",+ "../desktop/tests/**/*.{ts,tsx}",+ "../md-conformance/src/**/*.{ts,tsx,mjs,json,md}",+ "tests/lint-plugins/**/*.{mjs,json,md}",+ "src/lint-plugins/**/*.{mjs,json,md}",+ "../server/src/lint-plugins/**/*.{tsx,mjs,json,md}","../../biome.jsonc",- "../../biome-plugins/**","../../lint-plugins/**","../../oxlint.config.ts"]@@ -290,11 +305,15 @@"vite.dedupe.ts","vite.react-babel.ts","../../pnpm-lock.yaml",- "../../test-support/*.ts",+ "../../test-support/**","../server/src/**/*.ts","../core/src/**/*.ts",+ "../desktop/tests/**/*.{ts,tsx}",+ "../md-conformance/src/**/*.{ts,tsx,mjs,json,md}",+ "tests/lint-plugins/**/*.{mjs,json,md}",+ "src/lint-plugins/**/*.{mjs,json,md}",+ "../server/src/lint-plugins/**/*.{tsx,mjs,json,md}","../../biome.jsonc",- "../../biome-plugins/**","../../lint-plugins/**","../../oxlint.config.ts"]