feat: implement oxlint sensor spec v2 alignment corrections - #42
Merged
Merged
Conversation
- Create .reviews/.oxlintrc.json sensor config with pedantic/style categories at warn level (14 bloat-relevant rules) - Add --config .reviews/.oxlintrc.json to all oxlint invocations across ReviewPR, AnalyzeRepo, AnalyzeRepoCI, and Doctor probe - Scope PR oxlint to changed files only via git diff --name-only + xargs for meaningful density metrics - Expand tsconfig.oxlint.json include paths in PR entry points to cover full monorepo (core, cli, durable-streams, durable-effects) - Add density calibration thresholds and Rule of Three to ExtraneousCodePolicy LLM prompt - Change diagnostics from optional to required in BloatPolicy, SlopPolicy, PrPolicyReport; remove defensive guard clauses - Add Rule of Three and YAGNI principles to RepoCleanupPolicy - Fix density precision to 3 decimal places in parseDiagnostics - Add prose narration to Doctor.md for local visibility - Create lint-plugins/no-scheme-specifiers.ts Deno lint plugin for jsr:/npm: bare specifier enforcement - Create .github/pull_request_template.md for process enforcement - Integrate oxlint sensor extension into code-review-agent spec
PR #42: feat: implement oxlint sensor spec v2 alignment corrections25 files, +473 / -75 Scope🟡 548 lines changed. PRs under 400 receive more thorough review. 🟡 25 files changed. Are all changes related? 🟡 Large PR with no linked issue. 🟡 PR mixes config and source changes. Structural✅ No structural bloat detected. SlopStatic Analysis✅ Oxlint found no issues. CorrectnessNo extraneous code patterns detected. |
added 2 commits
March 17, 2026 20:05
…l-select Fix Doctor.md JSON parsing failure in CI: prose narration text was included in the rendered output, causing parseDoctorResult to fall back to defaults (oxlintInstalled: false). Doctor.md now wraps its JSON return in a code fence, and all entry points use <Capture select="code[lang=json]"> to extract just the JSON. The select prop parses rendered markdown via remark into an mdast tree, then queries it with unist-util-select using CSS selector syntax (e.g. code[lang=json], paragraph, heading[depth=1]). Falls back to full rendered content when no node matches. Also fix UnusedInDiff false positive on non-TS files by filtering pr.added to .ts/.tsx files before scanning for type/interface declarations. Updates executable-mdx-spec.md §1, §6.5 (Capture rules, select prop section, pseudocode, test table C29-C31, decisions 94-96) and code-review-agent-spec.md §13.2 (Doctor description).
Add <Capture select="code[lang=json]"> to the smoke test document's Binding Capture section. The test captures a JSON array from a code fence surrounded by prose text, verifies the selector extracts only the code block value, and confirms the prose is not in the output. Uses printf to avoid bash quote stripping on the interpolated JSON.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Implements the oxlint-sensor-spec-v2 alignment corrections: sensor config, PR-scoped analysis, density calibration, lint plugin, and process enforcement.
Why?
Post-implementation review of the oxlint sensor found 10 alignment gaps (spec §6.1–§6.10) between the spec and implementation that degraded signal quality — missing config references, whole-project scans inflating density, optional diagnostics hiding signals, and insufficient LLM context.
Summary
Config & Environment (§6.1, §6.3)
.reviews/.oxlintrc.jsonsensor config withpedantic: "warn"andstyle: "warn"(14 bloat-relevant rules vs defaults' 108 correctness-only)--config .reviews/.oxlintrc.jsonto all oxlint invocations across 5 filesDoctor.mdfor local visibilityPR-Scoped Analysis (§6.6, §8.1)
.ts/.tsxfiles only in PR entry points viagit diff --name-only+xargstsconfig.oxlint.jsoninclude paths to cover full monorepoPolicy Corrections (§6.5, §6.7, §7)
ExtraneousCodePolicy.mdLLM promptdiagnosticsfromrequired: falsetorequired: trueinBloatPolicy.md,SlopPolicy.md,PrPolicyReport.md; remove defensive guard clausesRepoCleanupPolicy.mdCode Fixes (§6.9)
parseDiagnosticsfor narrow-band signal preservationNew Files (§6.4, §6.8, §3.4)
lint-plugins/no-scheme-specifiers.ts— Deno lint plugin flaggingjsr:/npm:scheme specifiers with auto-fix to bare specifiers.github/pull_request_template.md— scope confirmation and Rule of Three checklists.reviews/.oxlintrc.json— committed sensor configSpec Integration
specs/code-review-agent-spec.mdScope confirmation
New abstractions (if any)
Verification