pi-lens 3.8.31 → 3.8.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +340 -8
- package/README.md +111 -134
- package/clients/bootstrap.ts +0 -23
- package/clients/dispatch/dispatcher.ts +0 -1
- package/clients/dispatch/plan.ts +19 -22
- package/clients/dispatch/runners/architect.ts +3 -1
- package/clients/dispatch/runners/ast-grep-napi.ts +10 -32
- package/clients/dispatch/runners/biome-check.ts +34 -114
- package/clients/dispatch/runners/detekt.ts +111 -0
- package/clients/dispatch/runners/eslint.ts +10 -41
- package/clients/dispatch/runners/golangci-lint.ts +24 -37
- package/clients/dispatch/runners/hadolint.ts +16 -10
- package/clients/dispatch/runners/htmlhint.ts +22 -10
- package/clients/dispatch/runners/index.ts +4 -4
- package/clients/dispatch/runners/ktlint.ts +19 -5
- package/clients/dispatch/runners/lsp.ts +31 -23
- package/clients/dispatch/runners/markdownlint.ts +18 -29
- package/clients/dispatch/runners/mypy.ts +11 -46
- package/clients/dispatch/runners/oxlint.ts +19 -6
- package/clients/dispatch/runners/phpstan.ts +11 -22
- package/clients/dispatch/runners/rubocop.ts +27 -33
- package/clients/dispatch/runners/ruff.ts +28 -36
- package/clients/dispatch/runners/shellcheck.ts +2 -0
- package/clients/dispatch/runners/shfmt.ts +7 -3
- package/clients/dispatch/runners/similarity.ts +12 -0
- package/clients/dispatch/runners/spellcheck.ts +16 -10
- package/clients/dispatch/runners/sqlfluff.ts +12 -44
- package/clients/dispatch/runners/stylelint.ts +18 -52
- package/clients/dispatch/runners/taplo.ts +11 -5
- package/clients/dispatch/runners/tree-sitter.ts +10 -2
- package/clients/dispatch/runners/ts-lsp.ts +11 -6
- package/clients/dispatch/runners/utils/diagnostic-parsers.ts +25 -0
- package/clients/dispatch/runners/utils/runner-helpers.ts +170 -9
- package/clients/dispatch/runners/yamllint.ts +12 -52
- package/clients/dispatch/types.ts +5 -1
- package/clients/format-service.ts +14 -11
- package/clients/formatters.ts +200 -234
- package/clients/installer/index.ts +132 -44
- package/clients/jscpd-client.ts +40 -3
- package/clients/language-policy.ts +13 -13
- package/clients/lsp/client.ts +224 -31
- package/clients/lsp/config.ts +31 -15
- package/clients/lsp/index.ts +224 -49
- package/clients/lsp/server.ts +105 -70
- package/clients/pipeline.ts +429 -399
- package/clients/project-index.ts +42 -34
- package/clients/read-guard-logger.ts +38 -0
- package/clients/read-guard-tool-lines.ts +128 -0
- package/clients/read-guard.ts +522 -0
- package/clients/review-graph/builder.ts +5 -1
- package/clients/runtime-config.ts +2 -2
- package/clients/runtime-context.ts +26 -0
- package/clients/runtime-coordinator.ts +43 -4
- package/clients/runtime-session.ts +0 -6
- package/clients/runtime-tool-result.ts +81 -30
- package/clients/runtime-turn.ts +64 -0
- package/clients/tool-policy.ts +1774 -0
- package/clients/tree-sitter-client.ts +80 -31
- package/commands/booboo.ts +0 -45
- package/index.ts +498 -56
- package/package.json +6 -1
- package/rules/ast-grep-rules/rules/no-ellipsis-body.yml +26 -0
- package/rules/ast-grep-rules/rules/no-raise-not-implemented.yml +16 -0
- package/rules/ast-grep-rules/rules/no-unimplemented-stub-js.yml +11 -0
- package/rules/ast-grep-rules/rules/no-unimplemented-stub.yml +11 -0
- package/tools/lsp-navigation.js +118 -42
- package/tools/lsp-navigation.ts +216 -116
- package/clients/dispatch/runners/prettier-check.ts +0 -110
package/CHANGELOG.md
CHANGED
|
@@ -4,20 +4,163 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
## [3.8.33] - 2026-04-27
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **JSON/JSONC autofix skipped without biome config** — `getAutofixPolicyForFile` now returns `undefined` for `.json`/`.jsonc` files when no `biome.json`/`biome.jsonc` is present, matching the format policy's `defaultWhenUnconfigured: false` gate. Previously biome was always invoked for JSON edits (~688ms) even when it had no config and fixed nothing. `hasBiomeConfig` added to `AutofixPolicyContext` and wired into the autofix context in `runAutofix`.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- **Early-unblock diagnostic aggregation** — `getDiagnostics()` now races `Promise.all` against a first-client-done + grace window (`PI_LENS_LSP_EARLY_UNBLOCK_GRACE_MS`, default 400ms). Once the fastest client delivers results, remaining clients have the grace window before the call returns with whatever is ready. Eliminates the previous worst case where a slow push-only server forced the full 1500ms aggregate wait even when a faster server already had errors. `earlyUnblockedCount` is logged in `lsp_diagnostics_aggregate` latency records.
|
|
18
|
+
- **Dynamic LSP capability registration tracking** — `client/registerCapability` and `client/unregisterCapability` handlers now record live registrations (`id → method`) in `dynamicRegistrations`. `applyDynamicCapabilities()` upgrades `workspaceDiagnosticsSupport` to pull mode when `textDocument/diagnostic` or `workspace/diagnostic` is dynamically registered, and reverts when the last such registration is removed (unless statically advertised). Operation support flags are also upgraded for dynamically-registered nav methods. Servers that defer capability advertisement past `initialize` are now treated correctly.
|
|
19
|
+
- **Deno/TypeScript server disambiguation** — `TypeScriptServer.root` now returns `undefined` for any file with a `deno.json` or `deno.jsonc` ancestor, preventing TypeScript LSP from being spawned alongside Deno LSP for the same file. Eliminates false diagnostics for Deno-specific APIs and removes the wasted parallel spawn.
|
|
20
|
+
- **`CONDA_PREFIX` support in Python venv detection** — conda environments do not set `VIRTUAL_ENV`; venv detection now checks `CONDA_PREFIX` as a fallback between `VIRTUAL_ENV` and the local `.venv`/`venv` directories.
|
|
21
|
+
- **pylsp venv initialization** — `PythonPylspServer.spawn` now passes `{ pylsp: { plugins: { jedi: { environment: pythonPath } } } }` when a virtual environment is detected. Previously pylsp always used the system Python, so completions and diagnostics resolved against the wrong package set in virtualenv projects.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- **Push/pull LSP diagnostic caches split** — `LSPClientState` now maintains separate `pushDiagnostics` and `documentPullDiagnostics` maps with independent timestamps. Public API (`getDiagnostics`, `getAllDiagnostics`, `pruneDiagnostics`) operates on a merged, deduplicated view. Clears and prunes invalidate both sources independently. Makes diagnostic freshness and source attribution inspectable without changing caller behavior.
|
|
26
|
+
- **Explicit LSP touch diagnostics modes** — `touchFile()` now takes `{ diagnostics: "none" | "document" | "full", clientScope: "primary" | "all", source, maxClientWaitMs }` instead of a boolean `waitForDiagnostics` flag. Read/tool-call warming uses `"none"`; write validation uses `"document"`. Latency records include `diagnosticsMode`, `clientScope`, and `source`.
|
|
27
|
+
- **Pipeline reordered around final content** — format → refresh → autofix → refresh → LSP sync once with final content → dispatch. LSP diagnostics and dispatch runners now always operate on the final post-format/post-fix on-disk state. Removed previously-dead `supportsAutofix` / deferred sync logic.
|
|
28
|
+
- **Python venv detection deduplicated** — `PythonServer.spawn` previously ran identical 20-line venv detection blocks in both the direct and managed code paths. Both now call the shared `detectPythonVenv(root)` helper.
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
|
|
32
|
+
- **Formatter failures now visible in output** — formatter crashes (missing binary, timeout, I/O error) now append `⚠️ Auto-format failed: <reason>` to pipeline output instead of silently writing to debug logs. Prevents misleading all-clear output when a required format phase failed.
|
|
33
|
+
- **Same-file same-turn pipeline dedupe keyed on content hash** — previously any later pipeline for a file already reported in the same turn was skipped by file path alone, suppressing legitimate second edits. Dedupe is now keyed on post-write content hash: concurrent duplicate events for the same final content are collapsed, but a later edit with changed content runs the full pipeline again.
|
|
34
|
+
- **Autofix side-effect files tracked in turn state** — `runAutofix()` now returns `changedFiles[]`. File-scoped fixers (ruff, biome, eslint, stylelint, sqlfluff, rubocop, ktlint) record the target file on a successful fix; project-wide fixers (cargo clippy --fix, dart fix --apply) snapshot the project tree before and after to detect side-effect changes. Non-target changed files are added to turn state via `cacheManager.addModifiedRange()` so cascade and read-guard see the full mutation set.
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
- **Linter dispatch runners promoted to always-on for 11 languages** — runners that previously fired only when LSP failed (`mode: "fallback"`) now run alongside LSP unconditionally (`mode: "all"`): `pyright` (Python), `rust-clippy` (Rust), `go-vet` (Go), `shellcheck` (Shell), `tflint` (Terraform), `elixir-check` + `credo` (Elixir), `cpp-check` (C/C++), `dart-analyze` (Dart), `gleam-check` (Gleam), `psscriptanalyzer` (PowerShell), `prisma-validate` (Prisma). These tools provide orthogonal signal to the LSP that was previously invisible on healthy sessions.
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- **Linter policy entries for 9 languages** — `getLinterPolicyForFile` now covers Rust (rust-clippy, smart-default), Shell (shellcheck, smart-default), Terraform (tflint, smart-default), Elixir (credo, smart-default), C/C++ (cpp-check, smart-default), Dart (dart-analyze, smart-default), Gleam (gleam-check, smart-default), PowerShell (psscriptanalyzer, smart-default), and Prisma (prisma-validate, smart-default). These linters now participate in the full policy layer rather than being dispatch-only.
|
|
43
|
+
- **`cargo clippy --fix` autofix for Rust** — `rust-clippy` is now a safe pipeline autofix tool for `.rs` files. After each edit, `cargo clippy --fix --allow-dirty --allow-staged` runs in the nearest `Cargo.toml` directory before dispatch lint, applying machine-fixable clippy suggestions. Gated `smart-default`; skips silently if `cargo` is unavailable or no `Cargo.toml` is found.
|
|
44
|
+
- **`dart fix --apply` autofix for Dart** — `dart-analyze` is now a safe pipeline autofix tool for `.dart` files. After each edit, `dart fix --apply` runs in the nearest `pubspec.yaml` directory before dispatch lint. Gated `smart-default`; skips silently if `dart` is unavailable or no `pubspec.yaml` is found.
|
|
45
|
+
|
|
46
|
+
### Fixed
|
|
47
|
+
|
|
48
|
+
- **Unknown/support files no longer trigger opportunistic LSP auto-touch** — `tool_call` LSP warming now defaults unknown file kinds to non-LSP-capable and explicitly skips internal/support artifacts such as `.pi-lens/*`, `.harness/*`, `stdout.jsonl`, `stderr.txt`, `prompt.txt`, and harness `case.json` files. This removes pointless `lsp_touch_file` `no_clients` waits on logs, prompts, and turn-state sidecars.
|
|
49
|
+
- **Spawn-heavy LSP capability checks removed from hot paths** — added a pure `supportsLSP(filePath)` check and a lightweight `hasWarmLSP(filePath)` helper so hot write/read paths no longer use `hasLSP()` merely to ask whether a file type is supported. `pipeline` sync/resync, the unified LSP runner, and `lsp_navigation` unsupported-file messaging now avoid accidental client spawns during simple capability checks.
|
|
50
|
+
- **`ktlint` autofix case missing `continue`** — the `ktlint` branch in `runAutofix` lacked a `continue` guard, causing fall-through into the next tool match on every ktlint run.
|
|
51
|
+
|
|
52
|
+
## [Unreleased — mypy + detekt]
|
|
53
|
+
|
|
54
|
+
### Added
|
|
55
|
+
|
|
56
|
+
- **`mypy` wired into Python dispatch** — runner already existed but was never included in the dispatch plan or linter policy. Added to Python `writeGroups` in `plan.ts` and to `getLinterPolicyForFile` for `.py`/`.pyi`. When `mypy.ini` or `[tool.mypy]` is present, mypy is appended to `preferredRunners` alongside ruff-lint (gate: `mixed`); unconfigured projects are unaffected.
|
|
57
|
+
- **`detekt` runner for Kotlin** — new runner (`detekt.ts`) that runs `detekt --input <file> --config <config>` for static analysis of `.kt`/`.kts` files. Config-first: activates only when `detekt.yml`, `.detekt.yml`, `config/detekt/detekt.yml`, or `detekt/detekt.yml` is found. Added `hasDetektConfig` helper, `"detekt"` to `LintRunnerName`, `hasDetektConfig` to `LinterPolicyContext`, and detekt to Kotlin's linter policy (appended to `preferredRunners` alongside ktlint when configured). Kotlin `plan.ts` `writeGroups` updated to include detekt.
|
|
58
|
+
|
|
59
|
+
## [3.8.32] - 2026-04-26
|
|
60
|
+
|
|
61
|
+
### Fixed
|
|
62
|
+
|
|
63
|
+
- **`lspExpansionsHelped` counter undercounted in `/lens-health`** — `getSummary` used `reads.find(r => r.timestamp <= record.precedingReads[0]?.timestamp)` which always selected the first ever read for the file, so only sessions where the very first read used LSP expansion were counted. Fixed to `record.precedingReads.some(r => r.expandedByLsp)`, correctly checking all reads that preceded the specific edit.
|
|
64
|
+
- **`preserveDiagnostics` incorrectly set when autofix also ran** — when a formatter and an autofix tool both modified a file, the LSP resync was still called with `preserveDiagnostics: true` because `formatChanged` was set, even though autofix changes can affect code semantics. Fixed by gating on `formatChanged && fixedCount === 0`, ensuring semantics-changing autofix always triggers a fresh diagnostics cycle.
|
|
65
|
+
- **Empty-result message for `workspaceSymbol` had dangling "at"** — `"No results for workspaceSymbol at "` was produced when no `filePath` was given (workspace-scoped query with no file). Fixed by guarding the `" at <filename>"` segment on `filePath` being non-empty.
|
|
66
|
+
|
|
67
|
+
### Fixed
|
|
68
|
+
|
|
69
|
+
- **TypeScript LSP 5-second pipeline stall on every edit to clean files** — after biome or another formatter rewrote a file, `resyncLspFile` called `lsp.openFile` which deleted the diagnostics cache and sent `textDocument/didChange`. `waitForDiagnostics` then waited the full 5000ms timeout for TypeScript to re-publish what it already knew (formatting doesn't change semantics, so the error set is identical). Added `preserveDiagnostics` option to `openFile`/`handleNotifyOpen`: format-only resyncs no longer clear the cache, so `waitForDiagnostics` fast-paths immediately. For pi-free provider files this cuts per-edit pipeline time from ~12s to ~3-4s.
|
|
70
|
+
- **`ktlint` formatter silently inactive when installed by the linter runner** — `ktlint` is both a smart-default formatter (`.kt`/`.kts`) and a smart-default linter with a managed GitHub-release install. The formatter's `detect()` used only `which("ktlint")`, never `getToolPath("ktlint")`, and the formatter was absent from `AUTO_INSTALLABLE_DEFAULT_FORMATTERS`. When the linter runner auto-installed `ktlint` to `~/.pi-lens/bin/`, the formatter was blind to it — Kotlin files got linted but never formatted. Fixed by adding `ktlint` to `AUTO_INSTALLABLE_DEFAULT_FORMATTERS`, adding `resolveCommand` that calls `ensureTool`, and making `detect` check `getToolPath` as fallback.
|
|
71
|
+
- **Subagent process hangs indefinitely after completing work (issue #22)** — `scheduleLSPIdleReset` created a 240-second `setTimeout` without `.unref()`. Every `turn_end` with no file edits scheduled this timer, keeping the Node.js event loop alive for 4 full minutes. pi-subagents killed the child at the 5-second drain deadline and reported `exit code 1` / SIGTERM even though all work completed successfully. Confirmed: `--no-lsp` exited cleanly because the timer is gated on LSP being enabled. Fixed by calling `.unref()` on the timer (lets the process exit naturally if there is no other pending work) and by registering a `session_shutdown` handler that cancels the timer explicitly and calls `resetLSPService()`.
|
|
72
|
+
- **Read-guard false-blocks multi-chunk reads** — `checkCoverage` checked each `ReadRecord` independently, so reading a 200-line file as two 100-line chunks and then Writing it was falsely blocked because neither chunk alone covered `[1, 200]`. Fixed by adding a second-pass union-merge of all read intervals: overlapping/adjacent ranges are merged in sorted order, and coverage is satisfied if any merged interval contains the edit range.
|
|
73
|
+
- **`requestedLimit` field recorded as `effectiveReadLimit` instead of the agent's actual requested limit** — `ReadRecord.requestedLimit` was always the computed effective limit, not what the agent asked for. Fixed to record the raw requested limit (falling back to effective when not provided).
|
|
74
|
+
- **Read-guard blocks legitimate full-file writes** — `write` tool calls were assigned the range `[1, Number.MAX_SAFE_INTEGER]`, which can never be covered by any prior read, so every full-file write on an existing file was incorrectly blocked with "Edit outside read range … lines 1–9007199254740991". Fixed by passing the file path into `getTouchedLinesForGuard` and using the actual on-disk line count (`countFileLines`) as the end of the write range. An agent that read all N lines of a file can now rewrite it without a false block.
|
|
75
|
+
- **Read-guard false-blocks text replacement edits without explicit line ranges** — `edit` calls using `oldText` / `newText` matching but no `range` metadata were previously inferred as touching line `1`, producing bogus `"🔴 BLOCKED — Edit outside read range"` failures even when the agent had read the correct target region. Fixed touched-line inference so range-less replacement edits return `undefined` instead of defaulting to `1-1`, avoiding fabricated line-1 violations.
|
|
76
|
+
- **`NEEDS_POSTINSTALL` broken for scoped npm packages** — `@biomejs/biome`, `@ast-grep/cli`, and `@ast-grep/napi` were incorrectly checked with `packageName.split("@")[0]` which always yields `""` for scoped packages; the nullish-coalescing fallback never fired. These packages always received `--ignore-scripts`, preventing native binary postinstall scripts from running and silently breaking their auto-installation. Fixed by checking the full package name directly.
|
|
77
|
+
- **Silent formatter failures in pipeline** — when a formatter crashed (binary missing, timeout, or I/O error) the post-write pipeline never emitted a debug log; only `anyChanged` triggered output. Formatter errors are now surfaced via `dbg()` so they appear in debug/latency logs.
|
|
78
|
+
- **`tryLazyInstallFormatterTool` failures logged** — lazy `gem install rubocop` and `rustup component add rustfmt` failures were silently swallowed with no log output anywhere. Both now emit a `[format] lazy-install <tool> failed: <reason>` message to stderr.
|
|
79
|
+
- **`getFormattersByName` broken for hyphenated formatter names** — constructing the export key as `` `${name}Formatter` `` produced `"php-cs-fixerFormatter"` and `"clang-formatFormatter"` instead of the real camelCase exports (`phpCsFixerFormatter`, `clangFormatFormatter`). These formatters were silently filtered out when selected by name via the explicit `options.formatters` API. Fixed by converting hyphenated names to camelCase before appending `Formatter`.
|
|
80
|
+
- **Read-before-edit guard correctness** — fixed `read.path` vs `read.filePath` mismatch, full-file read coverage tracking, read-guard range math, session reset leakage, and guard messaging so edit enforcement now correctly reflects actual reads
|
|
81
|
+
- **First-read LSP warmup behavior** — first `read` now triggers non-blocking async LSP warmup once per file/session window, with retry-safe state tracking and reset handling
|
|
82
|
+
- **Formatter selection bugs and drift** — formatter chooser now reliably selects exactly one formatter, no longer lets registry order accidentally block smart defaults, and keeps explicit config precedence over defaults
|
|
83
|
+
- **Ruby auto-install policy mismatch** — `rubocop` policy and installer behavior are now aligned through managed gem install support
|
|
84
|
+
- **Prettier dispatch redundancy** — removed `prettier-check` from the active dispatch path to avoid re-checking formatting after the authoritative autoformat pipeline has already run
|
|
85
|
+
- **LSP race condition in `initLSPConfig`** — `configInFlight` Map deduplicates concurrent initialization calls for the same workspace; parallel session starts no longer double-initialize and race on `workspaceConfigs`
|
|
86
|
+
- **`lsp_navigation` rejected accidentally quoted `operation` values at schema-validation time** — the tool previously declared `operation` as a `Type.Union` of string literals, so model outputs like `"workspaceDiagnostics"` were rejected before `execute()` ran, causing confusing retry loops with no recovery path. The tool now accepts a string, normalizes accidental surrounding quotes, validates against the allowed operation set inside `execute()`, and returns a clear error listing valid operations when the value is still invalid.
|
|
87
|
+
- **`LSPService` use-after-shutdown** — `isDestroyed` flag added; all public methods (`getClientForFile`, `openFile`, `updateFile`, `waitForDiagnostics`, `getDiagnostics`, `shutdown`) return early once the service has been shut down
|
|
88
|
+
- **`theme.fg` crash during session start** — `updateLspStatus` wraps theme calls in try/catch; theme may not be fully initialized during early session startup events
|
|
89
|
+
- **`isCommandAvailable` hangs on slow tools** — added 5s timeout with `proc.kill()` and a double-resolve guard; probe commands that stall no longer block session startup indefinitely
|
|
90
|
+
- **Tree-sitter `client_unavailable` log spam** — `TreeSitterClient.isAvailable()` now re-evaluates `grammarsDir` when the cached path goes missing, instead of caching an empty string forever. Added `resolveWebTreeSitterAsset()` helper with three strategies: (1) `createRequire` module resolution (hoisted installs — issue #20), (2) `resolvePackagePath(import.meta.url)` fallback (on-the-fly TS compilation by pi), (3) `process.cwd()` fallback. Fixes 108 skipped-runner log lines when the initial grammar probe failed transiently.
|
|
91
|
+
- **Pipeline test assertion drift** — updated `tests/clients/pipeline.test.ts` to match the current auto-format warning text (`File was modified by auto-format/fix...`)
|
|
92
|
+
|
|
93
|
+
### Added
|
|
94
|
+
|
|
95
|
+
- **Autofix decision/attempt logging** — the post-write pipeline now logs autofix policy selection, preferred tools, attempted tools, explicit skip reasons, and the important distinction between “autofix skipped” vs “autofix ran but applied 0 fixes.” This makes it much easier to understand whether TypeScript files chose Biome or ESLint autofix and why.
|
|
96
|
+
- **Dedicated read-guard trace log** — added `~/.pi-lens/read-guard.log` with structured events for read recording, LSP range expansion, touched-line derivation, edit checks, verdicts, and exemptions. This separates guard-policy debugging from the noisier general `latency.log` stream.
|
|
97
|
+
- **Centralized formatter policy layer** — added normalized per-extension formatter policy with explicit config detection, smart-default selection, and managed-vs-toolchain default handling
|
|
98
|
+
- **Centralized command spec / execution policy layer** — added shared tool command specs, execution policy, and resolver helpers used by dispatch runners and autofix paths
|
|
99
|
+
- **Centralized linter policy layer** — added policy selectors for dispatch lint runner choice so config-first and smart-default lint behavior is now encoded centrally instead of only in individual runners
|
|
100
|
+
- **Centralized autofix policy and capability metadata** — added policy selectors for safe pipeline autofix plus explicit capability metadata separating tool-level fix support from safe automatic post-write autofix
|
|
101
|
+
- **Expanded smart-default formatter coverage** — added smart defaults across web/content formats and additional language ecosystems, including managed smart-default support for `prettier`, `shfmt`, and `taplo`
|
|
102
|
+
- **LSP footer status indicator** — session start and turn end now show `LSP Active (N)` in green or `LSP Inactive` in red; count reflects alive (connected + initialized) clients via `getAliveClientCount()`
|
|
103
|
+
- **Rust monorepo workspace root detection** — `RustServer` walks up from the detected crate root checking parent `Cargo.toml` files for a `[workspace]` section; rust-analyzer now resolves correctly in Cargo workspaces
|
|
104
|
+
- **Opportunistic LSP read range expansion** — single-line `read` tool calls are silently expanded to the full enclosing symbol when a warm LSP client is available; best-effort, no-op if LSP is cold or the lookup doesn't resolve in time
|
|
105
|
+
- **`workspaceSymbol` result filtering and cap** — `lsp_navigation` now filters and caps workspace symbol results at 15 entries to avoid overwhelming the context window
|
|
106
|
+
|
|
107
|
+
### Performance
|
|
108
|
+
|
|
109
|
+
- **LSP pre-edit touch bounded and file-kind gated** — `edit` / `write` tool calls now skip opportunistic LSP pre-touch for non-LSP-capable files (for example Markdown) and cap the warm-client wait with `PI_LENS_TOOLCALL_TOUCH_MS` (default `750ms`). This avoids pointless `no_clients` touch attempts and reduces edit-path stalls.
|
|
110
|
+
- **Empty aggregate diagnostic waits shortened** — aggregate LSP diagnostics no longer wait the old hardcoded multi-second timeout just to confirm an empty result set. New settle/wait budgets (`PI_LENS_LSP_DIAGNOSTICS_AGGREGATE_WAIT_MS`, `PI_LENS_LSP_DIAGNOSTICS_SEMANTIC_THRESHOLD_MS`, `PI_LENS_LSP_DIAGNOSTICS_SEMANTIC_SETTLE_MS`) make clean-edit loops return faster.
|
|
111
|
+
- **Tool path resolution fast path** — `getToolPath` checks the local managed install (`~/.pi-lens/tools/node_modules/.bin/`) before global PATH probes, npm/pip/GitHub lookups; eliminates 2–5s overhead per tool on session start
|
|
112
|
+
- **`jscpd` availability fast path** — `ensureAvailable()` probes the local install with `fs.existsSync` before spawning a process, and deduplicates concurrent calls via `ensureInFlight`
|
|
113
|
+
- **Concurrent project indexing** — `buildProjectIndex` processes files in batches of 8 with `Promise.all` instead of sequentially; large projects index significantly faster
|
|
114
|
+
- **`buildFunctionMatrixFromNode` avoids re-parse** — walks the existing TypeScript AST directly instead of extracting function source text and creating a new `SourceFile`; removes per-function re-parse overhead from similarity indexing
|
|
115
|
+
|
|
116
|
+
### Removed
|
|
117
|
+
|
|
118
|
+
- **`prettier-check` runner fully removed** — the dead `clients/dispatch/runners/prettier-check.ts` file is now deleted entirely after its earlier removal from active dispatch plans; formatting remains owned by the autoformat pipeline instead of dispatch re-checks
|
|
119
|
+
- **Worthless `diagnostic-logger` tests** — deleted `tests/clients/diagnostic-logger.test.ts` (5 tests that only asserted mock objects equaled what was just assigned; zero behavior coverage)
|
|
120
|
+
- **Redundant circular-dependency regression tests** — removed 3 no-op import tests from `tests/clients/circular-deps-regression.test.ts` (`expect(module).toBeDefined()` after `await import(...)` adds no value; import failure throws before the assertion)
|
|
121
|
+
|
|
122
|
+
### Changed
|
|
123
|
+
|
|
124
|
+
- **Normal dispatch no longer runs `similarity` by default** — removed `similarity` from standard JS/TS write and full lint dispatch plans so targeted edits no longer pay its hot-path cost; similarity analysis remains available in explicit workflows like `/lens-booboo` and inline advisory logic.
|
|
125
|
+
- **Cascade diagnostics prune stale cache entries earlier** — LSP diagnostic merging now drops TTL-expired and non-existent file entries before cascade aggregation, reducing stale-path noise and improving cache hygiene during long sessions.
|
|
126
|
+
- **Autoformat policy normalized across supported languages** — formatter behavior is now: exactly one formatter runs, explicit config wins, otherwise smart default applies, and config-first file types do nothing when unconfigured
|
|
127
|
+
- **JS/TS lint fallback normalized** — no-config JavaScript/TypeScript dispatch now consistently prefers `oxlint` with `biome-check-json` fallback, while explicit ESLint/Oxlint/Biome config still wins
|
|
128
|
+
- **Safe autofix remains pipeline-owned** — autofix selection now flows through centralized policy and remains in the post-write pipeline, while dispatch runners stay diagnostics-only
|
|
129
|
+
- **Dispatch runner gating centralized** — major runners (`stylelint`, `yamllint`, `markdownlint`, `htmlhint`, `hadolint`, `sqlfluff`, `rubocop`, `ktlint`, `taplo`, `golangci-lint`, `phpstan`, `ruff`) now consult centralized lint policy before running
|
|
130
|
+
- **Kotlin safe autofix added** — `ktlint -F` is now treated as a safe pipeline autofix path for Kotlin files
|
|
131
|
+
- **Fixability semantics clarified** — dispatch diagnostics now distinguish generic fixability from safe pipeline autofix availability and expected fix mode (`pipeline`, `manual`, `suggestion`), including suggestion/manual-fix runners like LSP, TS-LSP, shellcheck, shfmt, spellcheck, tree-sitter, architect, and ast-grep-napi
|
|
132
|
+
- **Test runner moved to turn_end (non-blocking)** — previously fired inline on every write, blocking the pipeline for up to 60s mid-refactor and producing false failures while the codebase was in an inconsistent state. Tests now run once per turn after all edits complete: unique test targets are collected from modified files, fired concurrently as a fire-and-forget `Promise.allSettled`, and failures are written to cache for injection into the next turn's context. Results are discarded if the agent starts a new turn before tests finish, preventing stale failures from clobbering newer results.
|
|
133
|
+
- **Similarity runner skips small edits** — when `modifiedRanges` total lines is below `MIN_FUNCTION_LINES` (8), the similarity runner exits early; a new function can't fit in fewer lines than that, so the ~1100ms scan is wasted on targeted fixes
|
|
134
|
+
- **Stronger auto-format/fix re-read warning** — message now explicitly tells the agent it MUST re-read the file before any further edits, listing what may have changed (whitespace, indentation, quotes, code)
|
|
135
|
+
- **Turn-end findings cap tightened** — reduced `maxLines` from 24 → 20 and `maxChars` from 1600 → 1000 to stay conservative with context budget
|
|
136
|
+
|
|
137
|
+
### Tests
|
|
138
|
+
|
|
139
|
+
- **Read-guard touched-line regression tests** — added `tests/clients/read-guard-tool-lines.test.ts` covering full-file writes and range-less text replacement edits so read-guard line inference no longer regresses to bogus `1-1` edits.
|
|
140
|
+
- **Policy normalization regression coverage** — added and updated tests for read-guard fixes, runtime coordinator warm/reset behavior, formatter policy selection, command resolution, linter/autofix policy metadata, dispatch plan exposure, and runner status semantics across the formatter/linter/autofix normalization work
|
|
141
|
+
- **LSP integration tests** — added `tests/clients/lsp/integration.test.ts` with a fake JSON-RPC server (`tests/fixtures/fake-lsp-server.mjs`) covering LSP client lifecycle: initialize handshake, file open/change notifications, diagnostics, and graceful shutdown
|
|
142
|
+
- **Tree-sitter resolution regression tests** — added 3 tests to `tests/clients/tree-sitter-client-init.test.ts`:
|
|
143
|
+
- `TreeSitterClient.isAvailable returns true when grammars are installed` (smoke test)
|
|
144
|
+
- `falls back to resolvePackagePath when require.resolve fails` (on-the-fly compilation scenario)
|
|
145
|
+
- `re-evaluates grammarsDir when isAvailable is called after initial miss` (prevents cached-empty-string bug)
|
|
146
|
+
|
|
7
147
|
## [3.8.31] - 2026-04-23
|
|
8
148
|
|
|
9
149
|
### Fixed
|
|
150
|
+
|
|
10
151
|
- **Duplicate inline feedback on edit arrays** — `tool_result` calls for the same file are now deduplicated within a turn using a `reportedThisTurn` set on `RuntimeCoordinator`, cleared on each `turn_start`; previously pi's sequential per-hunk `tool_result` firing caused the pipeline to re-run and feedback to repeat N times per edit array
|
|
11
152
|
- **Double latency logging on pipeline completion** — removed redundant `logLatency` call in `pipeline.ts`; `runtime-tool-result.ts` already logs the outer `tool_result completed` with full duration including format, autofix, and cascade phases
|
|
12
153
|
- **Modified range tracking broken for 3-digit+ line numbers** — `parseDiffRanges` regex changed from `\s+` to `\s*` to handle unpadded line numbers; the diff format right-pads to the file's max digit width so e.g. line 613 in a <1000-line file has no leading space and was silently dropped
|
|
13
154
|
- **Stale gleam grammar entries** — removed dead `LANGUAGE_TO_GRAMMAR` and `getExtensionsForLanguage` entries for gleam; `tree-sitter-gleam.wasm` was never published in `tree-sitter-wasms@0.1.13`
|
|
14
155
|
|
|
15
156
|
### Changed
|
|
157
|
+
|
|
16
158
|
- **TypeBox 0.34.x → 1.x migration** — updated `package.json` dependency from `@sinclair/typebox` to `typebox ^1.0.0` and updated imports in `tools/lsp-navigation.ts`, `tools/ast-grep-search.ts`, and `tools/ast-grep-replace.ts` to match pi-mono 0.69.0
|
|
17
159
|
|
|
18
160
|
## [3.8.30] - 2026-04-22
|
|
19
161
|
|
|
20
162
|
### Fixed
|
|
163
|
+
|
|
21
164
|
- **lsp_navigation permanently disabled** — removed stale `lens-lsp` flag check (flag was removed in 3.8.29) that caused every `lsp_navigation` call to short-circuit with `lsp_disabled`; tool now only gates on `--no-lsp`
|
|
22
165
|
- **ast_grep_search / ast_grep_replace auto-install** — switched availability check from sync `isAvailable()` to async `ensureAvailable()` so the auto-installer triggers when `sg` is missing
|
|
23
166
|
- **@ast-grep/cli postinstall skipped** — added `@ast-grep/cli` to `NEEDS_POSTINSTALL`; without it `--ignore-scripts` left ASCII stubs in place of `sg.exe` / `ast-grep.exe` on Windows
|
|
@@ -37,6 +180,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
37
180
|
- **Pipeline deduplication** — `handleToolResult` now deduplicates concurrent pipeline calls for the same file; the pi framework fires `tool_result` once per hunk in an Edit array, causing duplicate pipeline runs and doubled agent output
|
|
38
181
|
|
|
39
182
|
### Changed
|
|
183
|
+
|
|
40
184
|
- **Tuned false-positive thresholds across all runners** — reduced noise in `lens-booboo` and dispatch for all users:
|
|
41
185
|
- Added `FACT_SEVERITY_FILTER` (`error`/`warning` only) and `MIN_TREE_SITTER_HITS_PER_RULE = 3`
|
|
42
186
|
- Filtered entropy/AI-style warnings from complexity metrics
|
|
@@ -46,6 +190,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
46
190
|
- Unregistered `no-magic-numbers` and `high-entropy-string` fact rules globally
|
|
47
191
|
|
|
48
192
|
### Removed
|
|
193
|
+
|
|
49
194
|
- **Dead code across 32 files** — removed 51 sites of unused imports, locals, and parameters flagged by `tsc --noUnusedLocals --noUnusedParameters`:
|
|
50
195
|
- `clients/architect-client.ts`, `ast-grep-client.ts`, `biome-client.ts`, `complexity-client.ts`, `go-client.ts`, `rust-client.ts`, `scan-utils.ts`, `secrets-scanner.ts`, `subprocess-client.ts`, `test-runner-client.ts`, `tool-availability.ts`, `tree-sitter-cache.ts`, `tree-sitter-client.ts`, `type-coverage-client.ts`, `type-safety-client.ts`
|
|
51
196
|
- `clients/dispatch/dispatcher.ts`, `runners/ast-grep-napi.ts`, `runners/golangci-lint.ts`, `runners/index.ts`, `runners/python-slop.ts`, `runners/ts-lsp.ts`, `runners/utils/diagnostic-parsers.ts`
|
|
@@ -54,6 +199,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
54
199
|
- `commands/booboo.ts`, `index.ts`
|
|
55
200
|
|
|
56
201
|
### Tests
|
|
202
|
+
|
|
57
203
|
- **Pipeline regression tests** — `tests/clients/pipeline.test.ts` (11 tests): secrets blocking, format modification, LSP sync, dispatch blockers, autofix output, test runner skip, all-clear output
|
|
58
204
|
- **Autofix helper tests** — `tests/clients/autofix-helpers.test.ts` (12 tests): config detection (eslint, stylelint, sqlfluff), malformed JSON handling, file change detection after command
|
|
59
205
|
- **LSP lifecycle tests** — `tests/clients/lsp/lifecycle.test.ts` (4 tests): missing binary error, process spawn, immediate exit detection, process kill
|
|
@@ -65,17 +211,20 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
65
211
|
- **Tree-sitter hoisted-install tests** — `tests/clients/tree-sitter-client-init.test.ts` (3 tests): wasm resolution via `require.resolve`, `locateFile` directory derivation, `findGrammarsDir` external package resolution
|
|
66
212
|
|
|
67
213
|
### Refactored
|
|
214
|
+
|
|
68
215
|
- **Extract `detectFileChangedAfterCommand`** — moved from `clients/pipeline.ts` to `clients/file-utils.ts` and exported for reuse/testing; imported back into `pipeline.ts`; `tests/clients/autofix-helpers.test.ts` now imports the real function instead of reimplementing a copy
|
|
69
216
|
- **Export testable pipeline helpers** — exported `hasEslintConfig`, `hasStylelintConfig`, `hasSqlfluffConfig` from `clients/pipeline.ts` so config detection is testable
|
|
70
217
|
- **Export LSP client internals** — exported `clientWaitForDiagnostics`, `handleNotifyOpen`, `handleNotifyChange`, and `LSPClientState` from `clients/lsp/client.ts` for direct testing with mocks
|
|
71
218
|
- **Export `isCmdShimValid`** — exported from `clients/lsp/launch.ts` so the npm `.cmd` shim validator is unit-testable
|
|
72
219
|
|
|
73
220
|
### CI
|
|
221
|
+
|
|
74
222
|
- **Dead-code gate** — `lint-and-typecheck` job now runs `tsc --noUnusedLocals --noUnusedParameters --noEmit` alongside `--noEmit` so dead code regressions fail CI immediately
|
|
75
223
|
|
|
76
224
|
## [3.8.29] - 2026-04-21
|
|
77
225
|
|
|
78
226
|
### Added
|
|
227
|
+
|
|
79
228
|
- **New diagnostic commands** — added `/lens-tools` and `/lens-health` for system visibility:
|
|
80
229
|
- `/lens-tools` — shows tool installation status: globally installed, pi-lens auto-installed, or npx fallback
|
|
81
230
|
- `/lens-health` — shows runtime health: pipeline crashes, slow runners, diagnostic stats
|
|
@@ -92,6 +241,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
92
241
|
- Project-level logs (`{cwd}/.pi-lens/*`) intentionally excluded from cleanup
|
|
93
242
|
|
|
94
243
|
### Changed
|
|
244
|
+
|
|
95
245
|
- **`/lens-tools` output improved** — added explanatory note when GitHub-release tools are shown as missing: "GitHub-release tools auto-install when you open files of those languages"
|
|
96
246
|
- **Simplified agent prompts** — removed verbose prompt sections to reduce token burn:
|
|
97
247
|
- Removed startup notes about project rules count (now just logged, not shown)
|
|
@@ -109,6 +259,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
109
259
|
- **Cross-platform line ending handling** — all `.split("\n")` changed to `.split(/\r?\n/)` for Windows CRLF compatibility (11 files updated)
|
|
110
260
|
|
|
111
261
|
### Fixed
|
|
262
|
+
|
|
112
263
|
- **Biome VCS/ignore file errors eliminated** — disabled VCS integration in biome config to prevent "ignore file not found" errors:
|
|
113
264
|
- Changed `vcs.enabled: true` → `vcs.enabled: false` in `config/biome/core.jsonc`
|
|
114
265
|
- Biome was searching for `.gitignore` files that don't exist when running on arbitrary projects via pi-lens
|
|
@@ -153,6 +304,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
153
304
|
- Prevents false positives when env var names are used as placeholder strings
|
|
154
305
|
|
|
155
306
|
### Changed
|
|
307
|
+
|
|
156
308
|
- **Biome check performance** — reduced lint latency from ~1.4s to ~100ms per file (92% improvement):
|
|
157
309
|
- Removed redundant `--version` pre-check spawn (~200ms saved)
|
|
158
310
|
- Switched from `biome check` to `biome lint` command (skip format validation)
|
|
@@ -166,6 +318,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
166
318
|
## [3.8.28] - 2026-04-19
|
|
167
319
|
|
|
168
320
|
### Fixed
|
|
321
|
+
|
|
169
322
|
- **Session startup no longer blocks the Node event loop** — tool availability probes (biome, ast-grep, ruff, knip, jscpd, madge) now run via async `ensureAvailable()` in a fire-and-forget IIFE instead of `setImmediate` + `spawnSync`, eliminating ~8–10 s of main-thread freeze on startup.
|
|
170
323
|
- **Biome binary lookup extended** — `getBiomeBinary()` now checks `~/.pi-lens/tools/node_modules/.bin/biome` so the async probe finds the pre-installed binary without falling back to `npx`.
|
|
171
324
|
- **CSS roots and Windows LSP shims tightened** — improved root resolution for CSS language server on Windows.
|
|
@@ -177,6 +330,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
177
330
|
## [3.8.27] - 2026-04-19
|
|
178
331
|
|
|
179
332
|
### Added
|
|
333
|
+
|
|
180
334
|
- **Review graph impact cascade** — turn-end cascade now renders a review-graph impact view showing which files were affected and how diagnostics propagated.
|
|
181
335
|
- **Fact-rule pipeline in dispatch** — new `fact-rules` dispatch runner computes function-level facts (depth, cyclomatic complexity, call counts) and evaluates quality rules inline, replacing the bespoke tree-sitter booboo runner.
|
|
182
336
|
- **Function facts: depth / CC / calls** — tree-sitter extracts per-function cyclomatic complexity, nesting depth, and outgoing call count for fact-rule evaluation.
|
|
@@ -214,6 +368,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
214
368
|
- **CI: tsx extension load check** — CI verifies that required extensions load correctly to catch missing dependency errors early.
|
|
215
369
|
|
|
216
370
|
### Changed
|
|
371
|
+
|
|
217
372
|
- **Promote LSP-backed languages into dispatch** — languages with active LSP servers now route through dispatch's standard pipeline instead of ad-hoc paths.
|
|
218
373
|
- **Dispatch language fallbacks aligned** — LSP-backed and fallback runner selection now uses consistent language-to-capability mapping.
|
|
219
374
|
- **CSS / HTML / TOML / Elixir fallback wiring** — dispatch fallbacks now include CSS (stylelint), HTML (htmlhint), TOML (taplo), and Elixir (credo).
|
|
@@ -237,6 +392,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
237
392
|
- **Complexity reduction** — decomposed four highest-complexity functions (CC 75–153 → <20 each) for maintainability.
|
|
238
393
|
|
|
239
394
|
### Fixed
|
|
395
|
+
|
|
240
396
|
- **Windows LSP startup fallback** — hardened spawn logic for `.cmd` wrappers, PATH resolution, and process creation on Windows.
|
|
241
397
|
- **C# launch and secondary language fallbacks** — C# LSP and secondary language servers start reliably in more project layouts.
|
|
242
398
|
- **Prettier-check / stylelint cwd overshoot** — both runners now find the project root correctly instead of silently skipping.
|
|
@@ -264,15 +420,18 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
264
420
|
- **Tree-sitter rule false positives** — fixed query syntax, scan scripts, and architect glob patterns that produced incorrect findings.
|
|
265
421
|
|
|
266
422
|
### Performance
|
|
423
|
+
|
|
267
424
|
- **Startup: defer npm tool availability probes** — tool availability checks (Biome, ESLint, etc.) now run lazily out of the critical path, reducing session start latency.
|
|
268
425
|
- **Defer TypeScript loading in similarity runner** — similarity detection lazily imports the TypeScript parser, eliminating cold-start cost on first call.
|
|
269
426
|
|
|
270
427
|
### Refactored
|
|
428
|
+
|
|
271
429
|
- **LSP: collapse resolution into `resolveAndLaunch`** — unified four spawn mechanisms into one function with clear platform-aware fallbacks.
|
|
272
430
|
- **Booboo: replace bespoke tree-sitter runner** — `/lens-booboo` tree-sitter checks now use the same fact-rule pipeline as dispatch, eliminating code duplication.
|
|
273
431
|
- **Drop redundant async from LSP spawn** — removed unnecessary `async`/`await` from functions that already return Promises.
|
|
274
432
|
|
|
275
433
|
### Tests
|
|
434
|
+
|
|
276
435
|
- **GitHub release asset selection and PATH tests** — installer asset URL construction and PATH resolution covered by unit tests.
|
|
277
436
|
- **Rust-analyzer Windows .zip asset expectation** — test fixture updated for `.zip` extension on Windows.
|
|
278
437
|
- **Async-noise test multi-statement function** — test rule updated to match multi-statement function bodies.
|
|
@@ -280,38 +439,46 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
280
439
|
## [3.8.26] - 2026-04-15
|
|
281
440
|
|
|
282
441
|
### Fixed
|
|
442
|
+
|
|
283
443
|
- **Silent crash on unhandled promise rejection** — the LSP crash guard's `unhandledRejection` handler was swallowing all non-ignorable rejections without rethrowing, causing silent process exits. The handler now rethrows so non-ignorable rejections surface as `uncaughtException` and are properly reported. Triggered most visibly when editing JSON files while Biome or another LSP server was active.
|
|
284
444
|
|
|
285
445
|
## [3.8.25] - 2026-04-13
|
|
286
446
|
|
|
287
447
|
### Changed
|
|
448
|
+
|
|
288
449
|
- **Go LSP PATH augmentation on Windows** — LSP subprocess PATH now includes common Go install directories (`C:\Program Files\Go\bin`, `C:\Go\bin`) to prevent `gopls` startup/runtime failures when `go` is not in inherited shell PATH.
|
|
289
450
|
- **Similarity runner cold-start behavior** — similarity now skips fast when no cached project index exists and for tiny/trivial files, reducing write/edit pipeline tail latency and eliminating frequent 30s timeout noise in scratch-file workflows.
|
|
290
451
|
|
|
291
452
|
### Fixed
|
|
453
|
+
|
|
292
454
|
- **Non-git workspace commit lookup noise** — metrics snapshot commit detection now pre-checks repository context before invoking Git, preventing `fatal: not a git repository` terminal noise in non-repo folders.
|
|
293
455
|
|
|
294
456
|
## [3.8.24] - 2026-04-12
|
|
295
457
|
|
|
296
458
|
### Changed
|
|
459
|
+
|
|
297
460
|
- **Lazy bootstrap client loading** — startup now defers heavy client initialization behind a shared bootstrap promise, reducing first-turn startup overhead while preserving tool behavior.
|
|
298
461
|
- **LSP config discovery scope** — `.pi-lens/lsp.json` (and related config paths) are now resolved from the current directory up through parent directories, improving nested-workspace support.
|
|
299
462
|
- **Ruby server fallback chain** — Ruby LSP startup now tries `ruby-lsp`, then `solargraph`, then `rubocop --lsp` for broader environment compatibility.
|
|
300
463
|
|
|
301
464
|
### Fixed
|
|
465
|
+
|
|
302
466
|
- **LSP config activation timing** — LSP server config initialization now runs reliably at `session_start` and before LSP-backed `tool_call` operations, so server enable/disable overrides apply in one-shot and interactive sessions.
|
|
303
467
|
|
|
304
468
|
## [3.8.23] - 2026-04-12
|
|
305
469
|
|
|
306
470
|
### Added
|
|
471
|
+
|
|
307
472
|
- **LSP auto-touch warm-up** — tool-call flow now proactively opens/syncs supported files (`read`/`write`/`edit`/`lsp_navigation`) so LSP clients warm up earlier and first semantic requests are less likely to return cold-start empties.
|
|
308
473
|
|
|
309
474
|
### Changed
|
|
475
|
+
|
|
310
476
|
- **Ruby LSP spawn resilience on Windows** — Ruby command discovery now tries `ruby-lsp`/`solargraph` from PATH plus common Ruby install locations before marking servers unavailable.
|
|
311
477
|
- **LSP diagnostics dedupe strategy** — multi-server diagnostics aggregation now dedupes using a simpler key (`line`, `character`, `message`) to better collapse equivalent findings across servers.
|
|
312
478
|
- **Windows LSP PATH fallback** — language-server spawns now augment PATH with common user-level tool locations (`.cargo\bin`, `go\bin`, common Ruby bin dirs) to improve server discovery on Windows shells.
|
|
313
479
|
|
|
314
480
|
### Fixed
|
|
481
|
+
|
|
315
482
|
- **LSP diagnostics key normalization** — publish diagnostics now store/update using normalized file-path keys, fixing Windows path mismatches that could hide diagnostics in some languages.
|
|
316
483
|
- **Pull diagnostics fallback path** — when a server advertises pull diagnostics, `textDocument/diagnostic` is now attempted before push-wait fallback.
|
|
317
484
|
- **Navigation diagnostics/health observability** — `lsp_navigation` and diagnostics aggregation now emit explicit `failureKind`/health metadata to latency logs and tool details for faster root-cause triage (`no_server`, `unsupported`, `empty_result`, `lsp_error`, etc.).
|
|
@@ -322,23 +489,28 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
322
489
|
## [3.8.22] - 2026-04-09
|
|
323
490
|
|
|
324
491
|
### Changed
|
|
492
|
+
|
|
325
493
|
- **Quick startup path for one-shot print sessions** — `--print`/`-p` now auto-selects quick startup mode to skip heavy bootstrap work and reduce startup latency. Added `PI_LENS_STARTUP_MODE=full|minimal|quick` override for explicit control.
|
|
326
494
|
|
|
327
495
|
### Fixed
|
|
496
|
+
|
|
328
497
|
- **Cascade diagnostics formatting clarity** — turn-end cascade entries now render source location as `line <n>, col <m> code=<id>:` so diagnostic codes (for example `TS2322`) are no longer formatted in a way that can be mistaken for file line numbers.
|
|
329
498
|
|
|
330
499
|
## [3.8.21] - 2026-04-08
|
|
331
500
|
|
|
332
501
|
### Changed
|
|
502
|
+
|
|
333
503
|
- **Session guidance channeling** — session-start guidance is now injected as `system` context instead of synthetic `user` context, reducing acknowledgement-only first replies before task execution.
|
|
334
504
|
- **Coverage warning dedupe** — "Pi-lens analysis unavailable" warnings are now shown once per file per session and reset on session baseline reset.
|
|
335
505
|
|
|
336
506
|
### Fixed
|
|
507
|
+
|
|
337
508
|
- **Turn-end read-loop pressure** — turn-end findings now suppress duplicate persisted blocker prompts and avoid imperative "read this file" phrasing that could trigger repeated read loops.
|
|
338
509
|
|
|
339
510
|
## [3.8.20] - 2026-04-08
|
|
340
511
|
|
|
341
512
|
### Changed
|
|
513
|
+
|
|
342
514
|
- **Session startup hardening** — background startup tasks now run with session-generation safety guards and startup in-flight tracking, preventing stale task writes across session boundaries.
|
|
343
515
|
- **Turn-end overlap guardrails** — turn-end `knip`/`jscpd` checks now skip when the corresponding startup scan is still in-flight.
|
|
344
516
|
- **Language-profile centralization** — startup and dispatch now share a centralized project language profile for supported language detection and LSP-capable kind policy.
|
|
@@ -346,6 +518,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
346
518
|
- **Language setup hints** — `session_start` now emits actionable install hints for detected Go/Rust/Ruby projects when key tools are missing.
|
|
347
519
|
|
|
348
520
|
### Fixed
|
|
521
|
+
|
|
349
522
|
- **TODO baseline scan resilience** — unreadable files are now skipped safely instead of crashing TODO scanning in cloud-synced projects.
|
|
350
523
|
- **Startup scan gating consistency** — TODO warmup now respects startup warm-cache gating and avoids unnecessary scan work in restricted startup contexts.
|
|
351
524
|
- **Path exclusion coverage** — shared exclusion list now includes common agent/tooling directories (`.claude`, `.codex`, `.worktrees`, `.vscode`, and related dirs).
|
|
@@ -356,39 +529,47 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
356
529
|
## [3.8.19] - 2026-04-07
|
|
357
530
|
|
|
358
531
|
### Fixed
|
|
532
|
+
|
|
359
533
|
- **Biome autofix gating** — Biome autofix/auto-install now runs only when the project has Biome configuration (`biome.json`/`biome.jsonc`) or `@biomejs/biome` in `devDependencies`, preventing unwanted Biome installs in non-Biome JS/TS projects.
|
|
360
534
|
|
|
361
535
|
## [3.8.18] - 2026-04-07
|
|
362
536
|
|
|
363
537
|
### Changed
|
|
538
|
+
|
|
364
539
|
- **Similarity calibration tightened** — raised semantic similarity threshold to `0.96`, raised minimum transition signal to `40`, and added transition-ratio filtering to reduce boilerplate-wrapper false positives.
|
|
365
540
|
- **Dispatch + booboo alignment** — similarity guardrails are now aligned between `/lens-booboo` reporting and the dispatch `similarity` runner.
|
|
366
541
|
- **Tree-sitter structural dedupe in booboo** — advanced structural findings now dedupe repeated line-level matches by normalized matched scope so deep nesting/promise chain reports collapse to one representative issue.
|
|
367
542
|
|
|
368
543
|
### Tests
|
|
544
|
+
|
|
369
545
|
- Added similarity runner guardrail assertions in `tests/clients/similarity-runner.test.ts`.
|
|
370
546
|
|
|
371
547
|
## [3.8.17] - 2026-04-07
|
|
372
548
|
|
|
373
549
|
### Changed
|
|
550
|
+
|
|
374
551
|
- **Delta-only unused variable blocking** — diagnostics matching unused-value patterns are now promoted to blocking only when they are newly introduced in delta mode.
|
|
375
552
|
- **Unused diagnostic heuristics** — improved detection covers TypeScript unused codes/messages and `no-unused*` rule identifiers, while preserving non-blocking behavior for pre-existing baseline debt.
|
|
376
553
|
|
|
377
554
|
### Tests
|
|
555
|
+
|
|
378
556
|
- Added dispatch flow coverage for delta-mode unused-value promotion in `tests/clients/dispatch/dispatcher-flow.test.ts`.
|
|
379
557
|
|
|
380
558
|
## [3.8.16] - 2026-04-07
|
|
381
559
|
|
|
382
560
|
### Changed
|
|
561
|
+
|
|
383
562
|
- **Ast-grep fix guidance upgraded** — ast-grep diagnostics now prefer explicit rule-level guidance from YAML (`fix` first, then `note`) before falling back to generic defect-class suggestions.
|
|
384
563
|
- **Rule parser metadata support** — YAML rule parsing now supports top-level `note` and `fix` fields (including multiline values) for agent-facing remediation text.
|
|
385
564
|
|
|
386
565
|
### Tests
|
|
566
|
+
|
|
387
567
|
- Added parser coverage for `note`/`fix` extraction in `tests/clients/dispatch/runners/yaml-rule-parser.test.ts`.
|
|
388
568
|
|
|
389
569
|
## [3.8.15] - 2026-04-07
|
|
390
570
|
|
|
391
571
|
### Added
|
|
572
|
+
|
|
392
573
|
- **Security rule: no global eval** — added ast-grep rule to block `eval(...)`, `Function(...)`, and string-based `setTimeout`/`setInterval` execution.
|
|
393
574
|
- **Security rule: no blank target** — added ast-grep rule to warn on `<a target="_blank">` without `rel=...`.
|
|
394
575
|
- **Performance rule: no accumulating spread** — added ast-grep rule to warn on reduce patterns that repeatedly spread accumulators.
|
|
@@ -396,60 +577,72 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
396
577
|
## [3.8.14] - 2026-04-07
|
|
397
578
|
|
|
398
579
|
### Added
|
|
580
|
+
|
|
399
581
|
- **YAML lint runner** — added `yamllint` dispatch support for `.yaml`/`.yml` files, with LSP prepended when enabled.
|
|
400
582
|
- **SQL lint + format support** — added `sqlfluff` dispatch support for `.sql` files and `sqlfluff` formatter integration.
|
|
401
583
|
- **SQL file kind support** — introduced `sql` file kind detection and language-id mapping.
|
|
402
584
|
|
|
403
585
|
### Changed
|
|
586
|
+
|
|
404
587
|
- **Capability matrix coverage expanded** — YAML and SQL now map to dedicated lint runners in the centralized capability matrix.
|
|
405
588
|
- **Lazy auto-install expansion** — added lazy-install support for `yamllint` and `sqlfluff` via installer-managed pip tools.
|
|
406
589
|
- **Runner inventory docs updated** — README runner list now includes `yamllint` and `sqlfluff`.
|
|
407
590
|
|
|
408
591
|
### Tests
|
|
592
|
+
|
|
409
593
|
- Added YAML/SQL runner parsing/semantics coverage in `tests/clients/dispatch/runners/yaml-sql-runners.test.ts`.
|
|
410
594
|
- Updated dispatch plan/integration tests for YAML+SQL capability mapping and group ordering.
|
|
411
595
|
|
|
412
596
|
## [3.8.13] - 2026-04-07
|
|
413
597
|
|
|
414
598
|
### Changed
|
|
599
|
+
|
|
415
600
|
- **Centralized capability matrix** — dispatch planning now derives from `LANGUAGE_CAPABILITY_MATRIX`, which defines per-language capability dimensions and write/full runner groups in one place.
|
|
416
601
|
- **Plan generation simplified** — `TOOL_PLANS` (write path) and `FULL_LINT_PLANS` (full scans) are generated from matrix entries instead of duplicated hand-maintained plan objects.
|
|
417
602
|
|
|
418
603
|
### Tests
|
|
604
|
+
|
|
419
605
|
- Extended dispatch plan exposure coverage to assert capability dimensions for main languages (`jsts`, `python`, `go`, `rust`, `ruby`) in `tests/clients/dispatch/plan-exposure.test.ts`.
|
|
420
606
|
|
|
421
607
|
## [3.8.12] - 2026-04-07
|
|
422
608
|
|
|
423
609
|
### Changed
|
|
610
|
+
|
|
424
611
|
- **Excluded-dir policy consolidated** — scanners now share `isExcludedDirName(...)` matching logic from `file-utils` instead of ad-hoc `EXCLUDED_DIRS.includes(...)` checks.
|
|
425
612
|
- **Pattern-aware exclusions** — exclusion matching now supports case-insensitive exact matches and lightweight glob patterns (for example `*.dSYM`).
|
|
426
613
|
- **Cross-scanner consistency** — startup scan, source filter, jscpd precheck, tree-sitter file collection, slop scan, production-readiness scan, and legacy scan-utils path checks now use the same exclusion semantics.
|
|
427
614
|
|
|
428
615
|
### Tests
|
|
616
|
+
|
|
429
617
|
- Added exclusion matcher coverage in `tests/clients/file-utils.test.ts`.
|
|
430
618
|
- Expanded source-filter coverage for glob exclusions (`*.dSYM`) and case-insensitive directory exclusion in `tests/source-filter.test.ts`.
|
|
431
619
|
|
|
432
620
|
## [3.8.11] - 2026-04-07
|
|
433
621
|
|
|
434
622
|
### Added
|
|
623
|
+
|
|
435
624
|
- **Experimental git guard flag** — added `--lens-guard` to gate commit/push attempts behind a blocker preflight check.
|
|
436
625
|
- **Git guard commit preflight** — when enabled, `bash` calls containing `git commit` or `git push` are blocked if unresolved inline blockers or pending turn-end blockers exist.
|
|
437
626
|
|
|
438
627
|
### Changed
|
|
628
|
+
|
|
439
629
|
- **Guard status tracking** — runtime now tracks blocker state/summary from post-write pipeline output so commit blocking messages stay concise and actionable.
|
|
440
630
|
|
|
441
631
|
### Tests
|
|
632
|
+
|
|
442
633
|
- Added focused coverage for git guard command detection and block/allow behavior in `tests/clients/git-guard.test.ts`.
|
|
443
634
|
- Updated runtime tool-result tests for guard status updates in `tests/clients/runtime-tool-result.test.ts`.
|
|
444
635
|
|
|
445
636
|
## [3.8.10] - 2026-04-07
|
|
446
637
|
|
|
447
638
|
### Changed
|
|
639
|
+
|
|
448
640
|
- **LSP default-on** — `--lens-lsp` is now enabled by default to provide unified LSP diagnostics across supported file kinds.
|
|
449
641
|
- **Capability-driven LSP dispatch** — dispatch now prepends LSP dynamically by file kind/flag state, while still using runtime `hasLSP(file)` checks for safe activation.
|
|
450
642
|
- **Fallback safety switch clarified** — `--no-lsp` is documented and wired as the explicit opt-out path to language-specific fallbacks.
|
|
451
643
|
|
|
452
644
|
### Fixed
|
|
645
|
+
|
|
453
646
|
- **`--no-lsp` consistency** — LSP sync/reset/navigation and runner gating now respect `--no-lsp` consistently, so fallback behavior is predictable.
|
|
454
647
|
- **LSP/lint overlap noise** — non-blocking lint diagnostics overlapping with LSP on the same file/line are suppressed to keep inline output focused.
|
|
455
648
|
- **turn_end actionability** — blocker summaries for jscpd/knip now include direct file hints to reduce path-guessing loops.
|
|
@@ -460,16 +653,19 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
460
653
|
## [3.8.9] - 2026-04-07
|
|
461
654
|
|
|
462
655
|
### Changed
|
|
656
|
+
|
|
463
657
|
- **README restructured** — Expanded the "What It Does" section with write/edit, session_start, and turn_end behavior; added a complete runner list and a dependency table with auto-installed vs manual tools.
|
|
464
658
|
- **Test runner strategy improved** — Added hybrid test targeting: rerun known failures first, otherwise run related tests for the edited file.
|
|
465
659
|
|
|
466
660
|
### Fixed
|
|
661
|
+
|
|
467
662
|
- **Non-JSON test runner parsing** — Go/Cargo/Dotnet/Gradle/Maven/RSpec/Minitest now use generic parsing instead of returning "Unknown runner".
|
|
468
663
|
- **Dispatch delta baseline compatibility** — Baseline lookups now support both normalized absolute and cwd-relative keys to prevent stale/new misclassification in mixed-key scenarios.
|
|
469
664
|
|
|
470
665
|
## [3.8.8] - 2026-04-07
|
|
471
666
|
|
|
472
667
|
### Changed
|
|
668
|
+
|
|
473
669
|
- **README massively simplified** — Reduced the README to core purpose, install/run, key commands, and concise usage notes.
|
|
474
670
|
- **Docs trimmed** — Removed deep internal documentation files from `docs/` to keep project docs minimal and focused.
|
|
475
671
|
- **Positioning text clarified** — Updated wording to describe pi-lens as real-time inline feedback for AI agents.
|
|
@@ -477,6 +673,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
477
673
|
## [3.8.7] - 2026-04-06
|
|
478
674
|
|
|
479
675
|
### Fixed
|
|
676
|
+
|
|
480
677
|
- **Baseline duplication in dispatch delta mode** — `ctx.baselines.set()` was called with `[...allDiagnostics, ...diagnostics]`, but `allDiagnostics` already contained `diagnostics` from the push below. Baseline inflated by N items per dispatch, causing `filterDelta` to misidentify issues on subsequent writes.
|
|
481
678
|
- **No delta on warnings** — `DispatchResult.warnings` was cumulative (total warning count across all runs), so the `N warning(s) -> /lens-booboo` message never decreased even when the agent fixed warnings. Added `baselineWarningCount` to track the baseline separately. Message now shows `3 new (15 total) warning(s)` so the agent sees progress.
|
|
482
679
|
- **LSP sync fire-and-forget** — Phase 3 (LSP file sync) was attached via `.then()` without being awaited, so dispatch lint (phase 5) and cascade diagnostics (phase 7) ran against stale LSP state. Now properly `await`ed before subsequent phases.
|
|
@@ -484,6 +681,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
484
681
|
## [3.8.6] - 2026-04-06
|
|
485
682
|
|
|
486
683
|
### Changed
|
|
684
|
+
|
|
487
685
|
- **Remove new-TODO reporting from turn_end** — The agent writes TODOs intentionally;
|
|
488
686
|
reporting them back at turn-end is noise. Removed the diff-against-baseline TODO
|
|
489
687
|
injection from turn-end findings.
|
|
@@ -491,20 +689,22 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
491
689
|
## [3.8.5] - 2026-04-06
|
|
492
690
|
|
|
493
691
|
### Fixed
|
|
692
|
+
|
|
494
693
|
- **Pyright CLI duplicates LSP under `--lens-lsp`** — The Pyright CLI runner now skips
|
|
495
694
|
itself when `--lens-lsp` is active, mirroring the existing `ts-lsp` behaviour. The
|
|
496
695
|
`lsp` runner (priority 4, Pyright language server) already covers Python type-checking
|
|
497
696
|
in that mode; running the CLI in parallel was redundant.
|
|
498
697
|
|
|
499
|
-
|
|
500
698
|
## [3.8.2] - 2026-04-06
|
|
501
699
|
|
|
502
700
|
### Fixed
|
|
701
|
+
|
|
503
702
|
- **npm publish bump** — 3.8.1 was already published with the broken postinstall; 3.8.2 contains the actual fix.
|
|
504
703
|
|
|
505
704
|
## [3.8.1] - 2026-04-06
|
|
506
705
|
|
|
507
706
|
### Fixed
|
|
707
|
+
|
|
508
708
|
- **`console-statement` hijacking `no-console-in-tests`** — The keyword match for
|
|
509
709
|
`console-statement` (`pattern.includes("console")`) was catching `no-console-in-tests`
|
|
510
710
|
because both contain "console". The simpler rule always won, so both fired on every
|
|
@@ -557,20 +757,24 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
557
757
|
### Added — New Rules (50+)
|
|
558
758
|
|
|
559
759
|
**Structural safety (ast-grep, TypeScript + JavaScript):**
|
|
760
|
+
|
|
560
761
|
- `unchecked-sync-fs` — `fs.statSync/readFileSync/writeFileSync/...` outside try/catch (error)
|
|
561
762
|
- `unchecked-throwing-call` — `JSON.parse`, `new URL()`, `execSync` outside try/catch (error)
|
|
562
763
|
- `no-nan-comparison` — `x === NaN` always false, use `Number.isNaN()` (error)
|
|
563
764
|
- `no-discarded-error` — `new Error()` as standalone statement without throw (error)
|
|
564
765
|
|
|
565
766
|
**Structural safety (ast-grep, Python):**
|
|
767
|
+
|
|
566
768
|
- `unchecked-throwing-call-python` — `open()`, `json.loads()`, `os.stat()` etc. outside
|
|
567
769
|
try/except (error)
|
|
568
770
|
|
|
569
771
|
**Structural safety (ast-grep, Ruby):**
|
|
772
|
+
|
|
570
773
|
- `unchecked-throwing-call-ruby` — `File.read`, `JSON.parse`, `Integer()` etc. outside
|
|
571
774
|
begin/rescue (error)
|
|
572
775
|
|
|
573
776
|
**Tree-sitter Python rules (new):**
|
|
777
|
+
|
|
574
778
|
- `python-mutable-class-attr` — class-level `list`/`dict`/`set` shared across all instances (error)
|
|
575
779
|
- `python-debugger` — `breakpoint()`, `pdb.set_trace()` left in code (error)
|
|
576
780
|
- `python-print-statement` — `print()` debug output in production code (warning)
|
|
@@ -580,6 +784,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
580
784
|
- `python-raise-string` — `raise "string"` is TypeError in Python 3 (error)
|
|
581
785
|
|
|
582
786
|
**Tree-sitter Ruby rules (new):**
|
|
787
|
+
|
|
583
788
|
- `ruby-rescue-exception` — `rescue Exception` catches SystemExit and signals (error)
|
|
584
789
|
- `ruby-empty-rescue` — rescue with no body silently swallows errors (error)
|
|
585
790
|
- `ruby-debugger` — `binding.pry` / `binding.irb` left in code (error)
|
|
@@ -588,13 +793,14 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
588
793
|
- `ruby-unsafe-regex` — `Regexp.new(variable)` ReDoS risk (error)
|
|
589
794
|
|
|
590
795
|
**Tree-sitter Go rules (new):**
|
|
796
|
+
|
|
591
797
|
- `go-hardcoded-secrets` — hardcoded credentials in short/var/const declarations (error)
|
|
592
798
|
|
|
593
799
|
**JavaScript coverage (38 new rules):**
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
800
|
+
All runtime-applicable TypeScript ast-grep rules now have JavaScript equivalents:
|
|
801
|
+
`strict-equality`, `empty-catch`, `no-throw-string`, `no-cond-assign`,
|
|
802
|
+
`no-async-promise-executor`, `toctou`, `no-hardcoded-secrets`, `no-inner-html`,
|
|
803
|
+
`no-insecure-randomness`, `no-sql-in-code`, `jwt-no-verify`, `weak-rsa-key`, and 26 more.
|
|
598
804
|
|
|
599
805
|
### Changed — Severity Upgrades
|
|
600
806
|
|
|
@@ -671,6 +877,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
671
877
|
## [3.7.2] - 2026-04-05
|
|
672
878
|
|
|
673
879
|
### Added
|
|
880
|
+
|
|
674
881
|
- **All-clear signal** — When the pipeline runs clean (no blockers, no test failures),
|
|
675
882
|
the agent now receives a confirmation one-liner instead of silence:
|
|
676
883
|
`✓ TypeScript clean · 12/12 tests · 847ms`
|
|
@@ -678,10 +885,12 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
678
885
|
Agents can now distinguish "checks ran clean" from "checks didn't run".
|
|
679
886
|
|
|
680
887
|
### Fixed
|
|
888
|
+
|
|
681
889
|
- **Auto-fix message now names the tool** — `✅ Auto-fixed 3 issue(s) (eslint:2, biome:1)`
|
|
682
890
|
instead of the vague `Auto-fixed 3 issue(s)`. Agents know exactly what was corrected.
|
|
683
891
|
|
|
684
892
|
### Security
|
|
893
|
+
|
|
685
894
|
- **Remove `effect` dependency** — Used for 5 trivial `tryPromise` wrappers in one file,
|
|
686
895
|
never consumed via Effect's runtime. Dead dependency removed.
|
|
687
896
|
- **`--ignore-scripts` in auto-installer** — `npm install` for auto-installed tools now
|
|
@@ -700,12 +909,14 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
700
909
|
## [3.7.2] - 2026-04-05 (previous)
|
|
701
910
|
|
|
702
911
|
### Added
|
|
912
|
+
|
|
703
913
|
- **ESLint `--fix` in autofix phase** — Projects with an ESLint config now have fixable
|
|
704
914
|
issues auto-corrected (import ordering, jsx style, etc.) before dispatch runs, using
|
|
705
915
|
`--fix-dry-run` to get the accurate fixed count then `--fix` to apply. Availability
|
|
706
916
|
is cached per session. Only fires on JS/TS files with an ESLint config present.
|
|
707
917
|
|
|
708
918
|
### Fixed
|
|
919
|
+
|
|
709
920
|
- **Misleading infinite-loop comment in biome/ruff runners** — The comment incorrectly
|
|
710
921
|
stated that writing files from runners would trigger infinite loops (formatters already
|
|
711
922
|
prove this isn't true). Updated to explain the real reason: dispatch runners report
|
|
@@ -717,6 +928,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
717
928
|
## [3.7.1] - 2026-04-05
|
|
718
929
|
|
|
719
930
|
### Added
|
|
931
|
+
|
|
720
932
|
- **ESLint dispatch runner** — Projects with `.eslintrc` / `eslint.config.js` (any variant)
|
|
721
933
|
now run ESLint automatically on every JS/TS file write. Prefers local
|
|
722
934
|
`node_modules/.bin/eslint` over global. Skips silently on projects using Biome/OxLint
|
|
@@ -739,6 +951,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
739
951
|
## [3.7.0] - 2026-04-05
|
|
740
952
|
|
|
741
953
|
### Added
|
|
954
|
+
|
|
742
955
|
- **Test runner in pipeline** — After every file write/edit, pi-lens now automatically detects and
|
|
743
956
|
runs the corresponding test file (vitest, jest, pytest). Results surface inline so the agent sees
|
|
744
957
|
failures immediately without a separate test step. Supports TypeScript/JS/Python; file-level
|
|
@@ -749,6 +962,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
749
962
|
Typical wall-clock savings: 500–1500ms per file write (`parallelGainMs` logged in latency log).
|
|
750
963
|
|
|
751
964
|
### Fixed
|
|
965
|
+
|
|
752
966
|
- **`semantic: "none"` when 0 diagnostics** — LSP, Pyright, and type-safety runners were returning
|
|
753
967
|
`semantic: "warning"` even when `diagnosticCount` was 0 (clean file). Now correctly returns
|
|
754
968
|
`"none"` when no diagnostics are present, `"warning"` when warnings exist, `"blocking"` on errors.
|
|
@@ -779,6 +993,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
779
993
|
silent skip.
|
|
780
994
|
|
|
781
995
|
### Changed
|
|
996
|
+
|
|
782
997
|
- **`startedAt` added to latency log runner entries** — Every runner entry now records when it
|
|
783
998
|
started, making wall-clock vs. sequential comparisons accurate. `dispatch_complete` also logs
|
|
784
999
|
`parallelGainMs = sumMs - wallClockMs` to quantify parallelism benefit.
|
|
@@ -787,6 +1002,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
787
1002
|
for runner loading; all imports are static, eliminating ~50ms warm-up latency on first dispatch.
|
|
788
1003
|
|
|
789
1004
|
### Tests
|
|
1005
|
+
|
|
790
1006
|
- Added formatter venv/vendor resolution and interactive-install coverage
|
|
791
1007
|
- Added LSP lifecycle test suite with mock LSP server (process spawn, open/change/close, shutdown)
|
|
792
1008
|
|
|
@@ -795,6 +1011,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
795
1011
|
## [3.6.7] - 2026-04-04
|
|
796
1012
|
|
|
797
1013
|
### Fixed
|
|
1014
|
+
|
|
798
1015
|
- **LSP `ERR_STREAM_DESTROYED` crash** — When an LSP process (e.g. rust-analyzer) exits, Node.js emits
|
|
799
1016
|
`'error'` events on the destroyed stdio streams. Without listeners these became uncaught exceptions
|
|
800
1017
|
that crashed the extension. Added persistent `error` listeners to `stdin`, `stdout`, and `stderr`
|
|
@@ -802,6 +1019,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
802
1019
|
Same guard added to `NativeRustCoreClient` stdin writes.
|
|
803
1020
|
|
|
804
1021
|
### Added
|
|
1022
|
+
|
|
805
1023
|
- **Rust performance core (`pi-lens-core`)** — Optional Rust binary for CPU-intensive operations.
|
|
806
1024
|
All features fall back to TypeScript automatically if the binary is not available (it is **not**
|
|
807
1025
|
built automatically on `npm install` — run `npm run rust:build` once if you have Rust installed).
|
|
@@ -819,6 +1037,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
819
1037
|
failure. Feature flag `USE_RUST = true` at top of file.
|
|
820
1038
|
|
|
821
1039
|
### Changed
|
|
1040
|
+
|
|
822
1041
|
- **Similarity threshold raised from 0.75 → 0.90** — Empirical evaluation showed that below 0.90
|
|
823
1042
|
false positives (structurally similar but semantically unrelated functions) outnumber true
|
|
824
1043
|
positives with the current 57×72 matrix resolution. Applies to both the dispatch runner and
|
|
@@ -830,6 +1049,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
830
1049
|
unnamed tokens no longer pollute named slots.
|
|
831
1050
|
|
|
832
1051
|
### Fixed (Rust)
|
|
1052
|
+
|
|
833
1053
|
- `tree_sitter_rust::language_rust()` → `language()` (correct API for tree-sitter-rust 0.21)
|
|
834
1054
|
- `FunctionInfo` missing `#[derive(Clone)]` — caused compile error in `find_similar_to`
|
|
835
1055
|
- `export function foo()` was missed by the index builder — TypeScript wraps exported functions
|
|
@@ -839,6 +1059,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
839
1059
|
- Deleted orphan `test_lsp.rs` (intentional type errors caused rust-analyzer to crash the LSP stream)
|
|
840
1060
|
|
|
841
1061
|
### Repository
|
|
1062
|
+
|
|
842
1063
|
- Rust source (`rust/src/`, `rust/Cargo.toml`) added to npm `files` whitelist so users can build
|
|
843
1064
|
the binary from an npm-installed package
|
|
844
1065
|
- Removed stale `src/main.rs` rule from root `.gitignore` (no such file at repo root)
|
|
@@ -849,11 +1070,11 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
849
1070
|
## [3.6.3] - 2026-04-03
|
|
850
1071
|
|
|
851
1072
|
### Removed (Dead Code Cleanup)
|
|
1073
|
+
|
|
852
1074
|
- **Deleted unused interviewer tool** — Browser-based interview with diff confirmation was never used:
|
|
853
1075
|
- Removed `clients/interviewer.ts` (290 lines)
|
|
854
1076
|
- Removed `clients/interviewer-templates.ts` (240 lines)
|
|
855
1077
|
- Removed initialization from `index.ts`
|
|
856
|
-
|
|
857
1078
|
- **Deleted deprecated commands** — All were superseded by `/lens-booboo`:
|
|
858
1079
|
- `/lens-booboo-fix` command (fix-from-booboo.ts, 430 lines) — showed warning to use `/lens-booboo`
|
|
859
1080
|
- `/lens-fix-simplified` command (fix-simplified.ts, 770 lines) — never registered, unused
|
|
@@ -865,13 +1086,13 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
865
1086
|
- All imports already used `safe-spawn.ts`, making `safe-spawn-async.ts` pure dead code
|
|
866
1087
|
|
|
867
1088
|
### Test Suite Overhaul
|
|
1089
|
+
|
|
868
1090
|
- **Removed ~85 wasteful/broken test files**:
|
|
869
1091
|
- "Is tool available" tests (8 files) — just checked if external CLIs installed
|
|
870
1092
|
- Heavy integration tests (2 files) — 5s timeouts, full codebase scans
|
|
871
1093
|
- Broken LSP tests (7 files) — import path errors
|
|
872
1094
|
- Broken runner tests (7 files) — thin CLI wrappers with wrong imports
|
|
873
1095
|
- Trivial utility tests (5 files) — file extension parsing, string sanitization
|
|
874
|
-
|
|
875
1096
|
- **Added meaningful integration tests**:
|
|
876
1097
|
- `tests/clients/dispatch/dispatcher-flow.test.ts` — Runner registration, execution, delta mode, conditional runners
|
|
877
1098
|
- `tests/extension-hooks.test.ts` — pi API: tool/command/flag registration, event handlers
|
|
@@ -882,12 +1103,14 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
882
1103
|
## [3.6.2] - 2026-04-02
|
|
883
1104
|
|
|
884
1105
|
### Added
|
|
1106
|
+
|
|
885
1107
|
- **Condensed skill auto-loading** — Injects ~70-token tool selection guidance at session start (vs 1,355 for full skills):
|
|
886
1108
|
- Quick reference for when to use lsp_navigation vs ast_grep_search vs grep
|
|
887
1109
|
- References full skills for lazy loading (ast-grep, lsp-navigation)
|
|
888
1110
|
- Prevents common tool selection errors without loading full skill content
|
|
889
1111
|
|
|
890
1112
|
### Changed
|
|
1113
|
+
|
|
891
1114
|
- **Streamlined session start injection** — Removed TODO/Knip/jscpd reports from initial context:
|
|
892
1115
|
- Scans still run and cache for on-demand access via `/lens-booboo`
|
|
893
1116
|
- Reduces session start noise (only active tools list, error reminder, skill guidance remain)
|
|
@@ -896,15 +1119,18 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
896
1119
|
## [3.6.1] - 2026-04-02
|
|
897
1120
|
|
|
898
1121
|
### Changed
|
|
1122
|
+
|
|
899
1123
|
- **Updated package description** — More concise: "Real-time code feedback for pi — LSP, linters, formatters, type-checking, structural analysis & booboo"
|
|
900
1124
|
|
|
901
1125
|
### Repository
|
|
1126
|
+
|
|
902
1127
|
- **AGENTS.md is now local-only** — Removed from git repo and added to `.gitignore` so it stays local to each developer's environment
|
|
903
1128
|
- **Cleaned up debug files** — Removed old test files (`_debug-*.ts`, `_trigger-test.ts`, `_test-*.ts`) from repo
|
|
904
1129
|
|
|
905
1130
|
## [3.6.0] - 2026-04-02
|
|
906
1131
|
|
|
907
1132
|
### Added
|
|
1133
|
+
|
|
908
1134
|
- **LSP Call Hierarchy Support** — Added 3 new operations to `lsp_navigation` tool:
|
|
909
1135
|
- `prepareCallHierarchy` — Get callable item at position
|
|
910
1136
|
- `incomingCalls` — Find all functions/methods that CALL this function
|
|
@@ -923,6 +1149,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
923
1149
|
- New thresholds: MaxCyc >10 bad, >30 critical; Entropy >4.0 bits risky, >7.0 critical
|
|
924
1150
|
|
|
925
1151
|
### Removed
|
|
1152
|
+
|
|
926
1153
|
- **TDR (Technical Debt Ratio)** — Removed orphaned metric tracking system:
|
|
927
1154
|
- Deleted `TDREntry`, `TDRCategory` types, `tdrFindings` Map, `updateTDR()` method
|
|
928
1155
|
- Removed `convertDiagnosticsToTDREntries()` helper and all `tdrCategory` assignments
|
|
@@ -930,6 +1157,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
930
1157
|
- TDI is sufficient for code health tracking; inline diagnostics provide immediate feedback
|
|
931
1158
|
|
|
932
1159
|
### Changed
|
|
1160
|
+
|
|
933
1161
|
- **Updated `/lens-tdi` display** — Shows 5 category breakdown with descriptions:
|
|
934
1162
|
```
|
|
935
1163
|
Debt breakdown:
|
|
@@ -946,6 +1174,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
946
1174
|
## [3.5.0] - 2026-04-02
|
|
947
1175
|
|
|
948
1176
|
### Added
|
|
1177
|
+
|
|
949
1178
|
- **Tree-sitter query compilation cache** — 10× performance improvement for structural analysis. Query files (`.yml`) are compiled to binary `.wasm-cache` format once and cached to disk. Subsequent loads use the compiled cache directly, reducing tree-sitter startup from ~50ms to ~5ms per query. Cache uses mtime-based invalidation — automatically recompiles when source `.yml` changes.
|
|
950
1179
|
- **Rule cache infrastructure** (`clients/cache/`) — New disk-backed cache system with:
|
|
951
1180
|
- `RuleCache` class for storing compiled artifacts
|
|
@@ -954,6 +1183,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
954
1183
|
- TTL and integrity validation
|
|
955
1184
|
|
|
956
1185
|
### Fixed
|
|
1186
|
+
|
|
957
1187
|
- **YAML parser colon truncation** — Fixed regex-based parser that incorrectly truncated values containing colons. Changed from `split(':', 2)` to `indexOf(':')` for proper value extraction.
|
|
958
1188
|
- **Tree-sitter rules directory resolution** — Fixed path resolution to use `ctx.cwd` instead of hardcoded `.pi-lens/rules/` path. Rules now load correctly from the actual project root regardless of where pi is invoked.
|
|
959
1189
|
- **Tree-sitter post_filter support** — Implemented missing `post_filter` functionality for tree-sitter queries. Rules with post-filters (e.g., semantic validation for `bare-except` vs specific exception handlers) now work correctly instead of being silently skipped.
|
|
@@ -961,6 +1191,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
961
1191
|
- **Latency logging restored** — Fixed missing latency logging in `tool_result` handler. Runner timing data now correctly flows to `~/.pi-lens/latency.log` again.
|
|
962
1192
|
|
|
963
1193
|
### Removed
|
|
1194
|
+
|
|
964
1195
|
- **Broken ast-grep rules** — Removed overlapping rules that were causing false positives or conflicts with tree-sitter coverage.
|
|
965
1196
|
|
|
966
1197
|
---
|
|
@@ -968,10 +1199,12 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
968
1199
|
## [3.4.0] - 2026-04-02
|
|
969
1200
|
|
|
970
1201
|
### Fixed
|
|
1202
|
+
|
|
971
1203
|
- **Delta mode was broken** — `dispatchLint()` created a fresh empty baseline store on every call, making delta filtering a complete no-op. Every issue looked "new" every time. Now uses a persistent session-level baseline store. First write captures baseline, subsequent writes only show NEW issues.
|
|
972
1204
|
- **Duplicate type-checking with `--lens-lsp`** — Both the `lsp` runner (priority 4) and `ts-lsp` runner (priority 5) were calling the same LSP service for TypeScript files. `ts-lsp` now skips when `--lens-lsp` is active.
|
|
973
1205
|
|
|
974
1206
|
### Added
|
|
1207
|
+
|
|
975
1208
|
- **Inline security rules via ast-grep-napi** — Re-enabled the ast-grep-napi runner for real-time blocking on security violations (`no-eval`, `jwt-no-verify`, `no-hardcoded-secrets`, `weak-rsa-key`, `no-open-redirect`, etc.). Only error-severity rules fire inline; warnings remain in `/lens-booboo`. Skips 5 rules already covered by tree-sitter to avoid duplicates. ~9ms execution time.
|
|
976
1209
|
- **Pre-write duplicate detection (two layers):**
|
|
977
1210
|
- **Exact name match** — Checks exported names in new content against the session’s cached export index. If a function/class/type already exists in another file, blocks the write: `🔴 STOP — function X already exists in utils.ts. Import instead.`
|
|
@@ -979,6 +1212,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
979
1212
|
- **Project similarity index at session start** — Builds 57×72 state matrices for all TS functions at session start (cached to `.pi-lens/index.json`). Makes pre-write similarity checks ~50ms instead of seconds.
|
|
980
1213
|
|
|
981
1214
|
### Changed
|
|
1215
|
+
|
|
982
1216
|
- **Extracted post-write pipeline** — Moved the entire post-write pipeline (secrets, format, autofix, dispatch, tests, cascade diagnostics) from `index.ts` into `clients/pipeline.ts`. `index.ts` reduced from 1764 to 1439 lines.
|
|
983
1217
|
- **Removed inline complexity warnings** — `⚠️ Complexity increased: +4 cognitive` no longer shown on every write. No agent acts on this mid-task. Complexity data still captured for `/lens-booboo` and `/lens-tdi`.
|
|
984
1218
|
- **Simplified pre-write handler** — Removed pre-write TypeScript and LSP diagnostics checks (checked old content before write landed — post-write catches everything). Kept only complexity baseline capture and duplicate detection.
|
|
@@ -988,6 +1222,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
988
1222
|
## [3.3.1] - 2026-04-02
|
|
989
1223
|
|
|
990
1224
|
### Fixed
|
|
1225
|
+
|
|
991
1226
|
- **LSP spawn `EINVAL` on Windows** — `.cmd` files (e.g. `vscode-json-language-server.cmd`) found via npm global lookup were spawned without `shell: true`, causing `EINVAL` from `CreateProcess`. The `needsShell` recomputation for npm global paths incorrectly treated `.cmd` the same as `.exe`. Fixed in both primary and fallback spawn paths.
|
|
992
1227
|
- **Unhandled `EINVAL` rejection** — LSP error handlers only caught `ENOENT` (binary not found). `EINVAL` (binary found but can't execute directly) now caught alongside `ENOENT` in both `launchLSP` and `launchViaPackageManager`.
|
|
993
1228
|
|
|
@@ -996,11 +1231,13 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
996
1231
|
## [3.3.0] - 2026-04-02
|
|
997
1232
|
|
|
998
1233
|
### Removed
|
|
1234
|
+
|
|
999
1235
|
- **`--lens-bus`**: Removed the experimental event bus system (Phase 1). The sequential dispatcher has richer features (delta mode, per-runner latency, baseline tracking) that the bus system never had.
|
|
1000
1236
|
- **`--lens-bus-debug`**: Removed alongside `--lens-bus`.
|
|
1001
1237
|
- **`--lens-effect`**: Removed the Effect-TS concurrent runner execution system (Phase 2). The sequential `dispatchForFile` is the authoritative implementation — it has delta mode, async `when()` handling, and latency tracking that the effect system lacked.
|
|
1002
1238
|
|
|
1003
1239
|
### Changed
|
|
1240
|
+
|
|
1004
1241
|
- **LSP client**: `waitForDiagnostics` in `clients/lsp/client.ts` now uses a local `EventEmitter` scoped to the client instance instead of the global bus for internal diagnostic signalling.
|
|
1005
1242
|
|
|
1006
1243
|
---
|
|
@@ -1008,11 +1245,13 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
1008
1245
|
## [3.2.0] - 2026-04-02
|
|
1009
1246
|
|
|
1010
1247
|
### Fixed
|
|
1248
|
+
|
|
1011
1249
|
- **LSP server initialization errors** — Fixed `workspaceFolders` capability format that caused gopls and rust-analyzer to crash with JSON RPC parse errors. Changed from object `{supported: true, changeNotifications: true}` to simple boolean `true` for broader compatibility.
|
|
1012
1250
|
- **Formatter cwd not passed** — `formatFile` now passes `cwd` to `safeSpawn`, fixing Biome's "nested root configuration" error when formatting files in subdirectories.
|
|
1013
1251
|
- **LSP runner error handling** — Added try-catch around LSP operations to properly detect and report server spawn/connection failures instead of silently returning empty success.
|
|
1014
1252
|
|
|
1015
1253
|
### Changed
|
|
1254
|
+
|
|
1016
1255
|
- **Go/Rust LSP initialization** — Added server-specific initialization options for better compatibility.
|
|
1017
1256
|
|
|
1018
1257
|
---
|
|
@@ -1020,6 +1259,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
1020
1259
|
## [3.1.3] - 2026-04-02
|
|
1021
1260
|
|
|
1022
1261
|
### Fixed
|
|
1262
|
+
|
|
1023
1263
|
- **Biome autofix: removed `--unsafe` flag** — `--unsafe` silently deleted unused variables
|
|
1024
1264
|
and interfaces, removing code the agent was mid-way through writing (e.g. a new interface
|
|
1025
1265
|
not yet wired up). Only safe fixes (`--write`) are now applied automatically on every write.
|
|
@@ -1041,6 +1281,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
1041
1281
|
of the actual condition. The check is now awaited properly inside `runRunner()`.
|
|
1042
1282
|
|
|
1043
1283
|
### Performance
|
|
1284
|
+
|
|
1044
1285
|
- **Biome: local binary instead of npx** — `BiomeClient` now resolves
|
|
1045
1286
|
`node_modules/.bin/biome.cmd` (Windows) or `node_modules/.bin/biome` before falling back
|
|
1046
1287
|
to `npx @biomejs/biome`. Eliminates ~1 s npx startup overhead per invocation.
|
|
@@ -1063,6 +1304,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
1063
1304
|
## [3.1.1] - 2026-04-01
|
|
1064
1305
|
|
|
1065
1306
|
### Added
|
|
1307
|
+
|
|
1066
1308
|
- **File-based latency logging** — Performance analysis via `~/.pi-lens/latency.log`
|
|
1067
1309
|
- New `latency-logger.ts` module for centralized logging
|
|
1068
1310
|
- Logs every runner's timing (ts-lsp, ast-grep-napi, biome, test-runner, etc.)
|
|
@@ -1075,6 +1317,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
1075
1317
|
## [3.1.0] - 2026-04-01
|
|
1076
1318
|
|
|
1077
1319
|
### Changed
|
|
1320
|
+
|
|
1078
1321
|
- **Consolidated ast-grep runners** — Unified CLI and NAPI runners with shared rule set
|
|
1079
1322
|
- NAPI runner now primary for dispatch (100x faster than CLI spawn)
|
|
1080
1323
|
- Merged ts-slop-rules (21 files) into ast-grep-rules/slop-patterns.yml (33 patterns)
|
|
@@ -1083,6 +1326,7 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
1083
1326
|
- CLI ast-grep kept only for `ast_grep_search` / `ast_grep_replace` tools
|
|
1084
1327
|
|
|
1085
1328
|
### Fixed
|
|
1329
|
+
|
|
1086
1330
|
- **ast-grep-napi stability** — Fixed stack overflow crashes in AST traversal
|
|
1087
1331
|
- Added `_MAX_AST_DEPTH = 50` depth limit to `findByKind()` and `getAllNodes()`
|
|
1088
1332
|
- Added `_MAX_RULE_DEPTH = 5` recursion limit for structured rules
|
|
@@ -1095,12 +1339,14 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
1095
1339
|
## [3.0.1] - 2026-03-31
|
|
1096
1340
|
|
|
1097
1341
|
### Changed
|
|
1342
|
+
|
|
1098
1343
|
- **Documentation refresh**: Updated npm and README descriptions for v3.0.0 features
|
|
1099
1344
|
- New tagline: "pi extension for real-time code quality"
|
|
1100
1345
|
- Highlights 31 LSP servers, tree-sitter analysis, auto-install capability
|
|
1101
1346
|
- Clarified blockers vs warnings split (inline vs `/lens-booboo`)
|
|
1102
1347
|
|
|
1103
1348
|
### Fixed
|
|
1349
|
+
|
|
1104
1350
|
- **Entropy threshold**: Increased from 3.5 → 5.5 bits to reduce false positives
|
|
1105
1351
|
- Previous threshold was too sensitive for tooling codebases
|
|
1106
1352
|
- Eliminates ~70-80% of "High entropy" warnings on legitimate complex code
|
|
@@ -1112,7 +1358,9 @@ All notable changes to pi-lens will be documented in this file.
|
|
|
1112
1358
|
### Breaking Changes
|
|
1113
1359
|
|
|
1114
1360
|
#### Removed - Deprecated Commands
|
|
1361
|
+
|
|
1115
1362
|
The following deprecated commands have been removed:
|
|
1363
|
+
|
|
1116
1364
|
- `/lens-booboo-fix` → Use `/lens-booboo` with autofix capability
|
|
1117
1365
|
- `/lens-booboo-delta` → Delta mode now automatic
|
|
1118
1366
|
- `/lens-booboo-refactor` → Use `/lens-booboo` findings
|
|
@@ -1120,20 +1368,25 @@ The following deprecated commands have been removed:
|
|
|
1120
1368
|
- `/lens-rate` → Use `/lens-booboo` quality scoring
|
|
1121
1369
|
|
|
1122
1370
|
#### Changed - Blockers vs Warnings Architecture
|
|
1371
|
+
|
|
1123
1372
|
- **🔴 Blockers** (type errors, secrets, empty catch blocks) → Appear **inline** and stop the agent
|
|
1124
1373
|
- **🟡 Warnings** (complexity, code smells) → Go to **`/lens-booboo`** only (not inline)
|
|
1125
1374
|
- Tree-sitter rules with `severity: error` now properly block inline
|
|
1126
1375
|
- Dispatcher checks individual diagnostic semantic, not just group default
|
|
1127
1376
|
|
|
1128
1377
|
### Added - Tree-Sitter Runner
|
|
1378
|
+
|
|
1129
1379
|
New structural analysis runner at priority 14:
|
|
1380
|
+
|
|
1130
1381
|
- **18 YAML query files** for TypeScript and Python patterns
|
|
1131
1382
|
- TypeScript: empty-catch, eval, debugger, console-statement, hardcoded-secrets, deep-nesting, deep-promise-chain, mixed-async-styles, nested-ternary, long-parameter-list, await-in-loop, dangerously-set-inner-html
|
|
1132
1383
|
- Python: bare-except, eval-exec, wildcard-import, is-vs-equals, mutable-default-arg, unreachable-except
|
|
1133
1384
|
- Blockers appear inline (severity: error), warnings go to `/lens-booboo` (severity: warning)
|
|
1134
1385
|
|
|
1135
1386
|
### Added - Auto-Install for Core Tools
|
|
1387
|
+
|
|
1136
1388
|
Four tools now auto-install on first use (no manual setup required):
|
|
1389
|
+
|
|
1137
1390
|
1. **TypeScript Language Server** (`typescript-language-server`) — TS/JS type checking
|
|
1138
1391
|
2. **Pyright** — Python type checking (`pip install pyright`)
|
|
1139
1392
|
3. **Ruff** — Python linting (`pip install ruff`)
|
|
@@ -1142,12 +1395,15 @@ Four tools now auto-install on first use (no manual setup required):
|
|
|
1142
1395
|
Installs to `.pi-lens/tools/` with verification step (`--version` check).
|
|
1143
1396
|
|
|
1144
1397
|
### Added - NAPI Security Rules
|
|
1398
|
+
|
|
1145
1399
|
Migrated 20 critical security rules to NAPI (fast native execution):
|
|
1400
|
+
|
|
1146
1401
|
- Rules with `weight >= 4` are **blocking** (stop the agent)
|
|
1147
1402
|
- Includes: no-eval, no-hardcoded-secrets, no-implied-eval, no-inner-html, no-dangerously-set-inner-html, no-debugger, no-javascript-url, no-open-redirect, no-mutable-default, weak-rsa-key, jwt-no-verify, and more
|
|
1148
1403
|
- NAPI runs at priority 15 (after tree-sitter, before slop rules)
|
|
1149
1404
|
|
|
1150
1405
|
### Fixed
|
|
1406
|
+
|
|
1151
1407
|
- **Tree-sitter query loading**: Added missing `loadQueries()` call before `getAllQueries()`
|
|
1152
1408
|
- **Windows path handling**: Changed from `lastIndexOf("/")` to `path.dirname()` for cross-platform compatibility
|
|
1153
1409
|
- **Dispatcher blocker detection**: Now checks if any individual diagnostic has `semantic === "blocking"`
|
|
@@ -1158,6 +1414,7 @@ Migrated 20 critical security rules to NAPI (fast native execution):
|
|
|
1158
1414
|
- **Biome/Prettier race**: Biome is now default (priority 10), Prettier is fallback only
|
|
1159
1415
|
|
|
1160
1416
|
### Changed
|
|
1417
|
+
|
|
1161
1418
|
- **README reorganization**: Removed redundant sections (Architecture, Language Support, Rules, Delta-mode, Slop Detection)
|
|
1162
1419
|
- **Consolidated Additional Safeguards** into Features section with Runners table
|
|
1163
1420
|
- **Updated .gitignore**: Local tracking files stay out of repo
|
|
@@ -1196,6 +1453,7 @@ Three new lint runners with full test coverage:
|
|
|
1196
1453
|
- Flag: `--no-shellcheck` to disable
|
|
1197
1454
|
|
|
1198
1455
|
### Changed
|
|
1456
|
+
|
|
1199
1457
|
- Updated README.md with new runners in dispatcher diagram and available runners table
|
|
1200
1458
|
- Added installation instructions for new tools in Dependent Tools section
|
|
1201
1459
|
- Added new flags to Flag Reference
|
|
@@ -1205,6 +1463,7 @@ Three new lint runners with full test coverage:
|
|
|
1205
1463
|
## [2.6.0] - 2026-03-30
|
|
1206
1464
|
|
|
1207
1465
|
### Added - Phase 1: Event Bus Architecture
|
|
1466
|
+
|
|
1208
1467
|
- **Event Bus System** (`clients/bus/`): Decoupled pub/sub for diagnostic events
|
|
1209
1468
|
- `bus.ts` — Core publish/subscribe with `once()`, `waitFor()`, middleware support
|
|
1210
1469
|
- `events.ts` — 12 typed event definitions (DiagnosticFound, RunnerStarted, LspDiagnostic, etc.)
|
|
@@ -1213,6 +1472,7 @@ Three new lint runners with full test coverage:
|
|
|
1213
1472
|
- **New flags**: `--lens-bus`, `--lens-bus-debug` for event system control
|
|
1214
1473
|
|
|
1215
1474
|
### Added - Phase 2: Effect-TS Service Layer
|
|
1475
|
+
|
|
1216
1476
|
- **Effect-TS infrastructure** (`clients/services/`): Composable async operations
|
|
1217
1477
|
- `runner-service.ts` — Concurrent runner execution with timeout handling
|
|
1218
1478
|
- `effect-integration.ts` — Bus-integrated Effect dispatch
|
|
@@ -1221,6 +1481,7 @@ Three new lint runners with full test coverage:
|
|
|
1221
1481
|
- **New flag**: `--lens-effect` for concurrent execution
|
|
1222
1482
|
|
|
1223
1483
|
### Added - Phase 3: Multi-LSP Client (31 Language Servers)
|
|
1484
|
+
|
|
1224
1485
|
- **LSP Core** (`clients/lsp/`): Full Language Server Protocol support
|
|
1225
1486
|
- `client.ts` — JSON-RPC client with debounced diagnostics (150ms)
|
|
1226
1487
|
- `server.ts` — 31 LSP server definitions with root detection
|
|
@@ -1242,6 +1503,7 @@ Three new lint runners with full test coverage:
|
|
|
1242
1503
|
- **Deprecated**: Old `ts-lsp` runner falls back to built-in TypeScriptClient when `--lens-lsp` not set
|
|
1243
1504
|
|
|
1244
1505
|
### Added - Phase 4: Auto-Installation System
|
|
1506
|
+
|
|
1245
1507
|
- **Auto-installer** (`clients/installer/`): Automatic tool installation
|
|
1246
1508
|
- `index.ts` — Core installation logic for npm/pip packages
|
|
1247
1509
|
- `isToolInstalled()` — Check global PATH or local `.pi-lens/tools/`
|
|
@@ -1253,22 +1515,26 @@ Three new lint runners with full test coverage:
|
|
|
1253
1515
|
- **LSP integration**: TypeScript and Python servers now use `ensureTool()` before spawning
|
|
1254
1516
|
|
|
1255
1517
|
### Changed - Commands
|
|
1518
|
+
|
|
1256
1519
|
- **Disabled**: `/lens-booboo-fix` — Now shows warning "currently disabled. Use /lens-booboo"
|
|
1257
1520
|
- **Disabled**: `/lens-booboo-delta` — Now shows warning "currently disabled. Use /lens-booboo"
|
|
1258
1521
|
- **Disabled**: `/lens-booboo-refactor` — Now shows warning "currently disabled. Use /lens-booboo"
|
|
1259
1522
|
- **Active**: `/lens-booboo` — Full codebase review (only booboo command now)
|
|
1260
1523
|
|
|
1261
1524
|
### Changed - Architecture
|
|
1525
|
+
|
|
1262
1526
|
- **Three-phase system**: Bus → Effect → LSP can be enabled independently
|
|
1263
1527
|
- **Dispatcher priority**: `lens-effect` > `lens-bus` > default (sequential)
|
|
1264
1528
|
- **LSP deprecation**: Old built-in TypeScriptClient deprecated, LSP client preferred
|
|
1265
1529
|
|
|
1266
1530
|
### Documentation
|
|
1531
|
+
|
|
1267
1532
|
- **LSP configuration guide**: `docs/LSP_CONFIG.md` — How to add custom LSP servers
|
|
1268
1533
|
- **README updated**: Added LSP section, three-phase architecture, 31 language matrix
|
|
1269
1534
|
- **CHANGELOG restructured**: Now organized by Phase 1/2/3/4
|
|
1270
1535
|
|
|
1271
1536
|
### Technical Details
|
|
1537
|
+
|
|
1272
1538
|
- **New dependencies**: `effect` (Phase 2), `vscode-jsonrpc` (Phase 3)
|
|
1273
1539
|
- **Lines added**: ~6,000 across 4 phases
|
|
1274
1540
|
- **Test status**: 617 passing (3 flaky unrelated tests)
|
|
@@ -1277,6 +1543,7 @@ Three new lint runners with full test coverage:
|
|
|
1277
1543
|
## [2.5.0] - 2026-03-30
|
|
1278
1544
|
|
|
1279
1545
|
### Added
|
|
1546
|
+
|
|
1280
1547
|
- **Python tree-sitter support**: 6 structural patterns for Python code analysis
|
|
1281
1548
|
- `bare-except` — Detects `except:` that catches SystemExit/KeyboardInterrupt
|
|
1282
1549
|
- `mutable-default-arg` — Detects mutable defaults like `def f(x=[])`
|
|
@@ -1291,10 +1558,12 @@ Three new lint runners with full test coverage:
|
|
|
1291
1558
|
- **Query file extraction**: Moved TypeScript patterns from embedded code to `rules/tree-sitter-queries/typescript/*.yml`
|
|
1292
1559
|
|
|
1293
1560
|
### Changed
|
|
1561
|
+
|
|
1294
1562
|
- **README updated**: Added Python patterns to structural analysis section
|
|
1295
1563
|
- **Architect client**: Fixed TypeScript errors (`configPath` property declaration)
|
|
1296
1564
|
|
|
1297
1565
|
### Technical Details
|
|
1566
|
+
|
|
1298
1567
|
- Downloaded `tree-sitter-python.wasm` (458KB) for Python AST parsing
|
|
1299
1568
|
- Post-filters for semantic validation (e.g., distinguishing bare except from specific handlers)
|
|
1300
1569
|
- ~50ms analysis time per file for Python
|
|
@@ -1302,6 +1571,7 @@ Three new lint runners with full test coverage:
|
|
|
1302
1571
|
## [2.4.0] - 2026-03-30
|
|
1303
1572
|
|
|
1304
1573
|
### Added
|
|
1574
|
+
|
|
1305
1575
|
- **`safeSpawn` utility**: Cross-platform spawn wrapper that eliminates `DEP0190` deprecation warnings on Windows. Uses command string construction instead of shell+args array.
|
|
1306
1576
|
- **Runner tracking for `/lens-booboo`**: Each runner now reports execution time and findings count. Summary shows `[1/10] runner name...` progress and final table with `| Runner | Status | Findings | Time |`.
|
|
1307
1577
|
- **Shared runner utilities**: Extracted `runner-helpers.ts` with:
|
|
@@ -1317,6 +1587,7 @@ Three new lint runners with full test coverage:
|
|
|
1317
1587
|
- **Type extraction**: Created `clients/ast-grep-types.ts` to break circular dependencies between `ast-grep-client`, `ast-grep-parser`, and `ast-grep-rule-manager`.
|
|
1318
1588
|
|
|
1319
1589
|
### Changed
|
|
1590
|
+
|
|
1320
1591
|
- **26 files refactored to use `safeSpawn`**: Eliminated `shell: process.platform === "win32"` deprecation pattern across all clients and runners.
|
|
1321
1592
|
- **Updated runners to use shared utilities**:
|
|
1322
1593
|
- `ruff.ts`, `pyright.ts` → use `createAvailabilityChecker()`
|
|
@@ -1330,16 +1601,19 @@ Three new lint runners with full test coverage:
|
|
|
1330
1601
|
- **Test cleanup safety**: Fixed all test files to use `fs.existsSync()` before `fs.unlinkSync()` to prevent ENOENT errors.
|
|
1331
1602
|
|
|
1332
1603
|
### Fixed
|
|
1604
|
+
|
|
1333
1605
|
- **Circular dependencies**: Eliminated 2 cycles (`ast-grep-client` ↔ `ast-grep-parser`, `ast-grep-client` ↔ `ast-grep-rule-manager`) by extracting shared types.
|
|
1334
1606
|
- **Test flakiness**: All 70 test files now pass consistently (666 tests total).
|
|
1335
1607
|
|
|
1336
1608
|
### Code Quality
|
|
1609
|
+
|
|
1337
1610
|
- **Lines saved**: ~350 lines of duplicated code removed across utilities and parsers.
|
|
1338
1611
|
- **Architect violations**: Reduced from 404 to ~50-80 (after test file exclusion + relaxed rules).
|
|
1339
1612
|
|
|
1340
1613
|
## [2.3.0] - 2026-03-30
|
|
1341
1614
|
|
|
1342
1615
|
### Added
|
|
1616
|
+
|
|
1343
1617
|
- **NAPI-based runner (`ast-grep-napi`)**: 100x faster TypeScript/JavaScript analysis (~9ms vs ~1200ms). Uses `@ast-grep/napi` for native-speed structural pattern matching. Priority 15, applies to TS/JS files only.
|
|
1344
1618
|
- **Python slop detection (`python-slop`)**: New CLI runner with ~40 AI slop patterns from slop-code-bench research. Detects chained comparisons, manual min/max, redundant if/else, list comprehension opportunities, etc.
|
|
1345
1619
|
- **TypeScript slop detection (`ts-slop-rules`)**: ~30 patterns for TS/JS slop detection including `for-index-length`, `empty-array-check`, `redundant-filter-map`, `double-negation`, `unnecessary-array-from`.
|
|
@@ -1348,29 +1622,35 @@ Three new lint runners with full test coverage:
|
|
|
1348
1622
|
- **Codebase self-scan**: `scan_codebase.test.ts` for testing the NAPI runner against the pi-lens codebase itself.
|
|
1349
1623
|
|
|
1350
1624
|
### Changed
|
|
1625
|
+
|
|
1351
1626
|
- **Architecture documentation**: Updated README with complete architecture overview, runner system diagram, and language support matrix.
|
|
1352
1627
|
- **Disabled problematic slop rules**: `ts-for-index-length` and `ts-unnecessary-array-isarray` disabled due to false positives on legitimate index-based operations.
|
|
1353
1628
|
- **Runner registration**: Updated `clients/dispatch/runners/index.ts` with new runner priorities (ts-lsp/pyright at 5, ast-grep-napi at 15, python-slop at 25).
|
|
1354
1629
|
- **TS slop runner disabled**: CLI runner `ts-slop.ts` disabled in favor of NAPI-based detection (faster, same rules).
|
|
1355
1630
|
|
|
1356
1631
|
### Deprecated
|
|
1632
|
+
|
|
1357
1633
|
- **`/lens-rate` command**: Now shows deprecation warning. Needs re-structuring. Users should use `/lens-booboo` instead.
|
|
1358
1634
|
- **`/lens-metrics` command**: Now shows deprecation warning. Temporarily disabled, will be restructured. Users should use `/lens-booboo` instead.
|
|
1359
1635
|
|
|
1360
1636
|
### Removed
|
|
1637
|
+
|
|
1361
1638
|
- **Old implementations removed**: 259 lines of deprecated command code removed from `index.ts`.
|
|
1362
1639
|
|
|
1363
1640
|
### Repository Cleanup
|
|
1641
|
+
|
|
1364
1642
|
- **Local-only files removed from GitHub**: `.pisessionsummaries/` and `refactor.md` removed from repo (still in local `.gitignore`).
|
|
1365
1643
|
|
|
1366
1644
|
## [2.1.1] - 2026-03-29
|
|
1367
1645
|
|
|
1368
1646
|
### Added
|
|
1647
|
+
|
|
1369
1648
|
- **Content-level secret scanning**: Catches secrets in ANY file type on write/edit (`.env`, `.yaml`, `.json`, not just TypeScript). Blocks before save with patterns for `sk-*`, `ghp_*`, `AKIA*`, private keys, hardcoded passwords.
|
|
1370
1649
|
- **Project rules integration**: Scans for `.claude/rules/`, `.agents/rules/`, `CLAUDE.md`, `AGENTS.md` at session start and surfaces in system prompt.
|
|
1371
1650
|
- **Grep-ability rules**: New ast-grep rules for `no-default-export` and `no-relative-cross-package-import` to improve agent searchability.
|
|
1372
1651
|
|
|
1373
1652
|
### Changed
|
|
1653
|
+
|
|
1374
1654
|
- **Inline feedback stripped to blocking only**: Warnings no longer shown inline (noise). Only blocking violations and test failures interrupt the agent.
|
|
1375
1655
|
- **booboo-fix output compacted**: Summary in terminal, full plan in `.pi-lens/reports/fix-plan.tsv`.
|
|
1376
1656
|
- **booboo-refactor output compacted**: Top 5 worst offenders in terminal, full ranked list in `.pi-lens/reports/refactor-ranked.tsv`.
|
|
@@ -1383,12 +1663,14 @@ Three new lint runners with full test coverage:
|
|
|
1383
1663
|
## [2.0.40] - 2026-03-27
|
|
1384
1664
|
|
|
1385
1665
|
### Changed
|
|
1666
|
+
|
|
1386
1667
|
- **Passive capture on every file edit**: `captureSnapshot()` now called from `tool_call` hook with 5s debounce. Zero latency — reuses complexity metrics already computed for real-time feedback.
|
|
1387
1668
|
- **Skip duplicate snapshots**: Same commit + same MI = no write (reduces noise).
|
|
1388
1669
|
|
|
1389
1670
|
## [2.0.39] - 2026-03-27
|
|
1390
1671
|
|
|
1391
1672
|
### Added
|
|
1673
|
+
|
|
1392
1674
|
- **Historical metrics tracking**: New `clients/metrics-history.ts` module captures complexity snapshots per commit. Tracks MI, cognitive complexity, and nesting depth across sessions.
|
|
1393
1675
|
- **Trend analysis in `/lens-metrics`**: New "Trend" column shows 📈/📉/➡️ with MI delta. "Trend Summary" section aggregates improving/stable/regressing counts with worst regressions.
|
|
1394
1676
|
- **Passive capture**: Snapshots captured on every file edit (tool_call hook) + `/lens-metrics` run. Max 20 snapshots per file (sliding window).
|
|
@@ -1396,6 +1678,7 @@ Three new lint runners with full test coverage:
|
|
|
1396
1678
|
## [2.0.38] - 2026-03-27
|
|
1397
1679
|
|
|
1398
1680
|
### Changed
|
|
1681
|
+
|
|
1399
1682
|
- **Refactored 4 client files** via `/lens-booboo-refactor` loop:
|
|
1400
1683
|
- `biome-client.ts`: Extracted `withValidatedPath()` guard pattern (4 methods consolidated)
|
|
1401
1684
|
- `complexity-client.ts`: Extracted `analyzeFile()` pipeline into `readAndParse()`, `computeMetrics()`, `aggregateFunctionStats()`
|
|
@@ -1405,28 +1688,34 @@ Three new lint runners with full test coverage:
|
|
|
1405
1688
|
## [2.0.29] - 2026-03-26
|
|
1406
1689
|
|
|
1407
1690
|
### Added
|
|
1691
|
+
|
|
1408
1692
|
- **`clients/ts-service.ts`**: Shared TypeScript service that creates one `ts.Program` per session. Both `complexity-client` and `type-safety-client` now share the same program instead of creating a new one per file. Significant performance improvement on large codebases.
|
|
1409
1693
|
|
|
1410
1694
|
### Removed
|
|
1695
|
+
|
|
1411
1696
|
- **3 redundant ast-grep rules** that overlap with Biome: `no-var`, `prefer-template`, `no-useless-concat`. Biome handles these natively with auto-fix. ast-grep no longer duplicates this coverage.
|
|
1412
1697
|
- **`prefer-const` from RULE_ACTIONS** — no longer needed (Biome handles directly).
|
|
1413
1698
|
|
|
1414
1699
|
### Changed
|
|
1700
|
+
|
|
1415
1701
|
- **Consolidated rule overlap**: Biome is now the single source of truth for style/format rules. ast-grep focuses on structural patterns Biome doesn't cover (security, design smells, AI slop).
|
|
1416
1702
|
|
|
1417
1703
|
## [2.0.27] - 2026-03-26
|
|
1418
1704
|
|
|
1419
1705
|
### Added
|
|
1706
|
+
|
|
1420
1707
|
- **`switch-exhaustiveness` check**: New type safety rule detects missing cases in union type switches. Uses TypeScript compiler API for type-aware analysis. Reports as inline blocker: `🔴 STOP — Switch on 'X' is not exhaustive. Missing cases: 'Y'`.
|
|
1421
1708
|
- **`clients/type-safety-client.ts`**: New client for type safety checks. Extensible for future checks (null safety, exhaustive type guards).
|
|
1422
1709
|
|
|
1423
1710
|
### Changed
|
|
1711
|
+
|
|
1424
1712
|
- **Type safety violations added to inline feedback**: Missing switch cases now block the agent mid-task, same as TypeScript errors.
|
|
1425
1713
|
- **Type safety violations in `/lens-booboo-fix`**: Marked as agent-fixable (add missing case or default clause).
|
|
1426
1714
|
|
|
1427
1715
|
## [2.0.26] - 2026-03-26
|
|
1428
1716
|
|
|
1429
1717
|
### Added
|
|
1718
|
+
|
|
1430
1719
|
- **5 new ast-grep rules** for AI slop detection:
|
|
1431
1720
|
- `no-process-env`: Block direct `process.env` access (use DI or config module) — error level
|
|
1432
1721
|
- `no-param-reassign`: Detect function parameter reassignment — warning level
|
|
@@ -1435,6 +1724,7 @@ Three new lint runners with full test coverage:
|
|
|
1435
1724
|
- `no-architecture-violation`: Block cross-layer imports (models/db) — error level
|
|
1436
1725
|
|
|
1437
1726
|
### Changed
|
|
1727
|
+
|
|
1438
1728
|
- **RULE_ACTIONS updated** for new rules:
|
|
1439
1729
|
- `agent` type (inline + booboo-fix): `no-param-reassign`, `switch-without-default`, `switch-exhaustiveness`
|
|
1440
1730
|
- `skip` type (booboo-refactor only): `no-process-env`, `no-single-char-var`, `no-architecture-violation`
|
|
@@ -1442,12 +1732,14 @@ Three new lint runners with full test coverage:
|
|
|
1442
1732
|
## [2.0.24] - 2026-03-26
|
|
1443
1733
|
|
|
1444
1734
|
### Changed
|
|
1735
|
+
|
|
1445
1736
|
- **Simplified `/lens-booboo-refactor` confirmation flow**: Post-change report instead of pre-change gate. Agent implements first, then shows what was changed (git diff + metrics delta). User reviews and can request refinements via chat. No more temp files or dry-run diffs.
|
|
1446
1737
|
- **Confirmation screen**: "✅ Looks good — move to next offender" / "💬 Request changes" (chat textarea). Diff display is optional.
|
|
1447
1738
|
|
|
1448
1739
|
## [2.0.23] - 2026-03-26
|
|
1449
1740
|
|
|
1450
1741
|
### Changed
|
|
1742
|
+
|
|
1451
1743
|
- **Extracted interviewer and scan modules from `index.ts`**: `index.ts` reduced by 460 lines.
|
|
1452
1744
|
- `clients/interviewer.ts` — all browser interview infrastructure (HTML generation, HTTP server, browser launch, option selection, diff confirmation screen)
|
|
1453
1745
|
- `clients/scan-architectural-debt.ts` — shared scanning utilities (`scanSkipViolations`, `scanComplexityMetrics`, `scoreFiles`, `extractCodeSnippet`)
|
|
@@ -1456,6 +1748,7 @@ Three new lint runners with full test coverage:
|
|
|
1456
1748
|
## [2.0.22] - 2026-03-26
|
|
1457
1749
|
|
|
1458
1750
|
### Added
|
|
1751
|
+
|
|
1459
1752
|
- **Impact metrics in interview options**: Each option now supports an `impact` object (`linesReduced`, `miProjection`, `cognitiveProjection`) rendered as colored badges in the browser form. Agent estimates impact when presenting refactoring options.
|
|
1460
1753
|
- **Iterative confirmation loop**: Confirmation screen now includes "🔄 Describe a different approach" option with free-text textarea. Agent regenerates plan+diff based on feedback, re-opens confirmation. Repeat until user confirms or cancels.
|
|
1461
1754
|
- **Auto-close on confirm**: Browser tab closes automatically after user submits.
|
|
@@ -1463,42 +1756,50 @@ Three new lint runners with full test coverage:
|
|
|
1463
1756
|
## [2.0.21] - 2026-03-26
|
|
1464
1757
|
|
|
1465
1758
|
### Added
|
|
1759
|
+
|
|
1466
1760
|
- **Two-step confirmation for `/lens-booboo-refactor`**: Agent implements changes, then calls `interviewer` with `confirmationMode=true` to show plan (markdown) + unified diff (green/red line coloring) + line counts at the top. User can Confirm, Cancel, or describe a different approach.
|
|
1467
1761
|
- **Plan + diff confirmation screen**: Plan rendered as styled markdown, diff rendered with syntax-colored `+`/`-` lines. Line counts (`+N / −N`) shown in diff header.
|
|
1468
1762
|
|
|
1469
1763
|
## [2.0.20] - 2026-03-26
|
|
1470
1764
|
|
|
1471
1765
|
### Added
|
|
1766
|
+
|
|
1472
1767
|
- **Impact metrics in interview options**: Structured `impact` field per option with `linesReduced`, `miProjection`, `cognitiveProjection`. Rendered as colored badges (green for lines reduced, blue for metric projections) inside each option card.
|
|
1473
1768
|
|
|
1474
1769
|
## [2.0.19] - 2026-03-26
|
|
1475
1770
|
|
|
1476
1771
|
### Changed
|
|
1772
|
+
|
|
1477
1773
|
- **`/lens-booboo-fix` jscpd filter**: Only within-file duplicates shown in actionable section. Cross-file duplicates are architectural — shown in skip section only.
|
|
1478
1774
|
- **AI slop filter tightened**: Require 2+ signals per file (was 1+). Single-issue flags on small files are noise — skip them.
|
|
1479
1775
|
|
|
1480
1776
|
## [2.0.18] - 2026-03-26
|
|
1481
1777
|
|
|
1482
1778
|
### Fixed
|
|
1779
|
+
|
|
1483
1780
|
- **`/lens-booboo-fix` max iterations**: Session file auto-deletes when hitting max iterations. Previously blocked with a manual "delete .pi-lens/fix-session.json" message.
|
|
1484
1781
|
|
|
1485
1782
|
## [2.0.17] - 2026-03-26
|
|
1486
1783
|
|
|
1487
1784
|
### Changed
|
|
1785
|
+
|
|
1488
1786
|
- **Agent-driven option generation**: `/lens-booboo-refactor` no longer hardcodes refactoring options per violation type. The command scans and presents the problem + code to the agent; the agent analyzes the actual code and generates 3-5 contextual options with rationale and impact estimates. Calls the `interviewer` tool to present them.
|
|
1489
1787
|
- **`interviewer` tool**: Generic, reusable browser-based interview mechanism. Accepts `question`, `options` (with `value`, `label`, `context`, `recommended`, `impact`), and `confirmationMode`. Zero dependencies — Node's built-in `http` module + platform CLI `open`/`start`/`xdg-open`.
|
|
1490
1788
|
|
|
1491
1789
|
## [2.0.16] - 2026-03-26
|
|
1492
1790
|
|
|
1493
1791
|
### Added
|
|
1792
|
+
|
|
1494
1793
|
- **`/lens-booboo-refactor`**: Interactive architectural refactor session. Scans for worst offender by combined debt score (ast-grep skip violations + complexity metrics). Opens a browser interview with the problem, code context, and AI-generated options. Steers the agent to propose a plan and wait for user confirmation before making changes.
|
|
1495
1794
|
|
|
1496
1795
|
### Changed
|
|
1796
|
+
|
|
1497
1797
|
- **Inline tool_result suppresses skip-category rules**: `long-method`, `large-class`, `long-parameter-list`, `no-shadow`, `no-as-any`, `no-non-null-assertion`, `no-star-imports` no longer show as hard stops in real-time feedback. They are architectural — handled by `/lens-booboo-refactor` instead.
|
|
1498
1798
|
|
|
1499
1799
|
## [2.0.15] - 2026-03-26
|
|
1500
1800
|
|
|
1501
1801
|
### Removed
|
|
1802
|
+
|
|
1502
1803
|
- **Complexity metrics from real-time feedback**: MI, cognitive complexity, nesting depth, try/catch counts, and entropy scores removed from tool_result output. These were always noise — the agent never acted on "MI dropped to 5.6" mid-task. Metrics still available via `/lens-metrics` and `/lens-booboo`.
|
|
1503
1804
|
- **Session summary injection**: The `[Session Start]` block (TODOs, dead code, jscpd, type-coverage) is no longer injected into the first tool result. Scans still run for caching purposes (exports, clones, baselines). Data surfaced on-demand via explicit commands.
|
|
1504
1805
|
- **`/lens-todos`**: Removed (covered by `/lens-booboo`).
|
|
@@ -1506,12 +1807,14 @@ Three new lint runners with full test coverage:
|
|
|
1506
1807
|
- **`/lens-deps`**: Removed — circular dep scan added to `/lens-booboo` as Part 8.
|
|
1507
1808
|
|
|
1508
1809
|
### Changed
|
|
1810
|
+
|
|
1509
1811
|
- **Hardened stop signals**: New violations (ast-grep, Biome, jscpd, duplicate exports) now all use `🔴 STOP` framing. The agent is instructed to fix these before continuing.
|
|
1510
1812
|
- **`/lens-booboo` now includes circular dependencies**: Added as Part 8 (after type coverage) using `depChecker.scanProject`.
|
|
1511
1813
|
|
|
1512
1814
|
## [2.0.14] - 2026-03-26
|
|
1513
1815
|
|
|
1514
1816
|
### Fixed
|
|
1817
|
+
|
|
1515
1818
|
- **`/lens-booboo-fix` excludes `.js` compiled output**: Detects `tsconfig.json` and excludes `*.js` from jscpd, ast-grep, and complexity scans. Prevents double-counting of the same code in `.ts` and `.js` forms.
|
|
1516
1819
|
- **`raw-strings` rule added to skip list**: 230 false positives in CLI/tooling codebases.
|
|
1517
1820
|
- **`typescript-client.ts` duplication**: Extracted `resolvePosition()`, `resolveTree()`, and `toLocations()` helpers, deduplicating 6+ LSP methods.
|
|
@@ -1520,36 +1823,44 @@ Three new lint runners with full test coverage:
|
|
|
1520
1823
|
## [2.0.13] - 2026-03-26
|
|
1521
1824
|
|
|
1522
1825
|
### Removed
|
|
1826
|
+
|
|
1523
1827
|
- **`raw-strings` ast-grep rule**: Not an AI-specific pattern. Humans write magic strings too. Biome handles style. Generated 230 false positives on first real run.
|
|
1524
1828
|
|
|
1525
1829
|
## [2.0.12] - 2026-03-26
|
|
1526
1830
|
|
|
1527
1831
|
### Fixed
|
|
1832
|
+
|
|
1528
1833
|
- **`/lens-booboo-fix` sequential scan order**: Reordered to Biome/Ruff → jscpd (duplicates) → knip (dead code) → ast-grep → AI slop → remaining Biome. Duplicates should be fixed before violations (fixing one fixes both). Dead code should be deleted before fixing violations in it.
|
|
1529
1834
|
|
|
1530
1835
|
### Changed
|
|
1836
|
+
|
|
1531
1837
|
- **Remaining Biome section rephrased**: "These couldn't be auto-fixed even with `--unsafe` — fix each manually."
|
|
1532
1838
|
|
|
1533
1839
|
## [2.0.11] - 2026-03-26
|
|
1534
1840
|
|
|
1535
1841
|
### Added
|
|
1842
|
+
|
|
1536
1843
|
- **Circular dependency scan to `/lens-booboo`**: Added as Part 8, using `depChecker.scanProject()` to detect circular chains across the codebase.
|
|
1537
1844
|
|
|
1538
1845
|
### Removed
|
|
1846
|
+
|
|
1539
1847
|
- **`/lens-todos`**, **`/lens-dead-code`**, **`/lens-deps`**: Removed standalone commands — all covered by `/lens-booboo`.
|
|
1540
1848
|
|
|
1541
1849
|
## [2.0.10] - 2026-03-26
|
|
1542
1850
|
|
|
1543
1851
|
### Changed
|
|
1852
|
+
|
|
1544
1853
|
- **Session summary injection removed**: The `[Session Start]` block is no longer injected into the first tool result. Scans still run silently for caching (exports for duplicate detection, clones for jscpd, complexity baselines for deltas).
|
|
1545
1854
|
|
|
1546
1855
|
## [2.0.1] - 2026-03-25
|
|
1547
1856
|
|
|
1548
1857
|
### Fixed
|
|
1858
|
+
|
|
1549
1859
|
- **ast-grep in `/lens-booboo` was silently dropping all results** — newer ast-grep versions exit `0` with `--json` even when issues are found; fixed the exit code check.
|
|
1550
1860
|
- **Renamed "Design Smells" to "ast-grep"** in booboo report — the scan runs all 65 rules (security, correctness, style, design), not just design smells.
|
|
1551
1861
|
|
|
1552
1862
|
### Changed
|
|
1863
|
+
|
|
1553
1864
|
- **Stronger real-time feedback messages** — all messages now use severity emoji and imperative language:
|
|
1554
1865
|
- `🔴 Fix N TypeScript error(s) — these must be resolved`
|
|
1555
1866
|
- `🧹 Remove N unused import(s) — they are dead code`
|
|
@@ -1564,6 +1875,7 @@ Three new lint runners with full test coverage:
|
|
|
1564
1875
|
## [2.0.0] - 2026-03-25
|
|
1565
1876
|
|
|
1566
1877
|
### Added
|
|
1878
|
+
|
|
1567
1879
|
- **`/lens-metrics` command**: Measure complexity metrics for all files. Exports a full `report.md` with A-F grades, summary stats, AI slop aggregate table, and top 10 worst files with actionable warnings.
|
|
1568
1880
|
- **`/lens-booboo` saves full report**: Results saved to `.pi-lens/reviews/booboo-<timestamp>.md` — no truncation, all issues, agent-readable.
|
|
1569
1881
|
- **AI slop indicators**: Four new real-time and report-based detectors:
|
|
@@ -1575,7 +1887,8 @@ Three new lint runners with full test coverage:
|
|
|
1575
1887
|
- **Shared test utilities**: `createTempFile` and `setupTestEnvironment` extracted to `clients/test-utils.ts`, eliminating copy-paste across 13 test files.
|
|
1576
1888
|
|
|
1577
1889
|
### Changed
|
|
1578
|
-
|
|
1890
|
+
|
|
1891
|
+
- **Delta mode for real-time feedback**: ast-grep and Biome now only show _new_ violations introduced by the current edit — not all pre-existing ones. Fixed violations shown as `✓ Fixed: rule-name (-N)`. No change = silent.
|
|
1579
1892
|
- **Removed redundant pre-write hints**: ast-grep and Biome pre-write counts removed (delta mode makes them obsolete). TypeScript pre-write warning kept (blocking errors).
|
|
1580
1893
|
- **Test files excluded from AI slop warnings**: MI/complexity thresholds are inherently low in test files — warnings suppressed for `*.test.ts` / `*.spec.ts`.
|
|
1581
1894
|
- **Test files excluded from TODO scanner**: Test fixture annotations (`FIXME`, `BUG`, etc.) no longer appear in TODO reports.
|
|
@@ -1584,12 +1897,14 @@ Three new lint runners with full test coverage:
|
|
|
1584
1897
|
- **Removed unused dependencies**: `vscode-languageserver-protocol` and `vscode-languageserver-types` removed; `@sinclair/typebox` added (was unlisted).
|
|
1585
1898
|
|
|
1586
1899
|
### Fixed
|
|
1900
|
+
|
|
1587
1901
|
- Removed 3 unconditional `console.log` calls leaking `[scan_exports]` to terminal.
|
|
1588
1902
|
- Duplicate Biome scan in `tool_call` hook eliminated (was scanning twice for pre-write hint + baseline).
|
|
1589
1903
|
|
|
1590
1904
|
## [1.3.14] - 2026-03-25
|
|
1591
1905
|
|
|
1592
1906
|
### Added
|
|
1907
|
+
|
|
1593
1908
|
- **Actionable feedback messages**: All real-time warnings now include specific guidance on what to do.
|
|
1594
1909
|
- **Code entropy metric**: Shannon entropy in bits (threshold: >3.5 indicates risky AI-induced complexity).
|
|
1595
1910
|
- **Advanced pattern matching**: `/lens-booboo` now finds structurally similar functions (e.g., `formatDate` and `formatTimestamp`).
|
|
@@ -1599,31 +1914,37 @@ Three new lint runners with full test coverage:
|
|
|
1599
1914
|
## [1.3.10] - 2026-03-25
|
|
1600
1915
|
|
|
1601
1916
|
### Added
|
|
1917
|
+
|
|
1602
1918
|
- **Actionable complexity warnings**: Real-time feedback when metrics break limits with specific fix guidance.
|
|
1603
1919
|
|
|
1604
1920
|
## [1.3.9] - 2026-03-25
|
|
1605
1921
|
|
|
1606
1922
|
### Fixed
|
|
1923
|
+
|
|
1607
1924
|
- **Entropy calculation**: Corrected to use bits with 3.5-bit threshold for AI-induced complexity.
|
|
1608
1925
|
|
|
1609
1926
|
## [1.3.8] - 2026-03-25
|
|
1610
1927
|
|
|
1611
1928
|
### Added
|
|
1929
|
+
|
|
1612
1930
|
- **Code entropy metric**: Shannon entropy to detect repetitive or unpredictable code patterns.
|
|
1613
1931
|
|
|
1614
1932
|
## [1.3.7] - 2026-03-25
|
|
1615
1933
|
|
|
1616
1934
|
### Added
|
|
1935
|
+
|
|
1617
1936
|
- **Advanced pattern matching in `/lens-booboo`**: Finds structurally similar functions across the codebase.
|
|
1618
1937
|
|
|
1619
1938
|
## [1.3.6] - 2026-03-25
|
|
1620
1939
|
|
|
1621
1940
|
### Added
|
|
1941
|
+
|
|
1622
1942
|
- **Duplicate export detection on write**: Warns when defining a function that already exists elsewhere.
|
|
1623
1943
|
|
|
1624
1944
|
## [1.3.5] - 2026-03-25
|
|
1625
1945
|
|
|
1626
1946
|
### Changed
|
|
1947
|
+
|
|
1627
1948
|
- **Consistent command prefix**: All commands now start with `lens-`.
|
|
1628
1949
|
- `/find-todos` → `/lens-todos`
|
|
1629
1950
|
- `/dead-code` → `/lens-dead-code`
|
|
@@ -1634,10 +1955,12 @@ Three new lint runners with full test coverage:
|
|
|
1634
1955
|
## [1.5.0] - 2026-03-23
|
|
1635
1956
|
|
|
1636
1957
|
### Added
|
|
1958
|
+
|
|
1637
1959
|
- **Real-time jscpd duplicate detection**: Code duplication is now detected on every write. Duplicates involving the edited file are shown to the agent in real-time.
|
|
1638
1960
|
- **`/lens-review` command**: Combined code review: design smells + complexity metrics in one command.
|
|
1639
1961
|
|
|
1640
1962
|
### Changed
|
|
1963
|
+
|
|
1641
1964
|
- **Consistent command prefix**: All commands now start with `lens-`.
|
|
1642
1965
|
- `/find-todos` → `/lens-todos`
|
|
1643
1966
|
- `/dead-code` → `/lens-dead-code`
|
|
@@ -1648,6 +1971,7 @@ Three new lint runners with full test coverage:
|
|
|
1648
1971
|
## [1.4.0] - 2026-03-23
|
|
1649
1972
|
|
|
1650
1973
|
### Added
|
|
1974
|
+
|
|
1651
1975
|
- **Test runner feedback**: Runs corresponding test file on every write (vitest, jest, pytest). Silent if no test file exists. Disable with `--no-tests`.
|
|
1652
1976
|
- **Complexity metrics**: AST-based analysis: Maintainability Index, Cyclomatic/Cognitive Complexity, Halstead Volume, nesting depth, function length.
|
|
1653
1977
|
- **`/lens-metrics` command**: Full project complexity scan.
|
|
@@ -1657,38 +1981,46 @@ Three new lint runners with full test coverage:
|
|
|
1657
1981
|
- **Rust language support**: New Rust client for Rust projects.
|
|
1658
1982
|
|
|
1659
1983
|
### Changed
|
|
1984
|
+
|
|
1660
1985
|
- **Improved ast-grep tool descriptions**: Better pattern guidance to prevent overly broad searches.
|
|
1661
1986
|
|
|
1662
1987
|
## [2.2.1] - 2026-03-29
|
|
1663
1988
|
|
|
1664
1989
|
### Fixed
|
|
1990
|
+
|
|
1665
1991
|
- **No auto-install**: Runners (biome, pyright) now use direct CLI commands instead of `npx`. If not installed, gracefully skip instead of attempting to download.
|
|
1666
1992
|
|
|
1667
1993
|
## [2.2.0] - 2026-03-29
|
|
1668
1994
|
|
|
1669
1995
|
### Added
|
|
1996
|
+
|
|
1670
1997
|
- **`/lens-rate` command**: Visual code quality scoring across 6 dimensions (Type Safety, Complexity, Security, Architecture, Dead Code, Tests). Shows grade A-F and colored progress bars.
|
|
1671
1998
|
- **Pyright runner**: Real Python type-checking via pyright. Catches type errors like `result: str = add(1, 2)` that ruff misses. Runs alongside ruff (pyright for types, ruff for linting).
|
|
1672
1999
|
- **Vitest config**: Increased test timeout to 15s for CLI spawn tests. Fixes flaky test failures when npx downloads packages.
|
|
1673
2000
|
|
|
1674
2001
|
### Fixed
|
|
2002
|
+
|
|
1675
2003
|
- **Test flakiness**: Availability tests (biome, knip, jscpd) no longer timeout when npx is downloading packages.
|
|
1676
2004
|
|
|
1677
2005
|
## [1.3.0] - 2026-03-23
|
|
1678
2006
|
|
|
1679
2007
|
### Changed
|
|
2008
|
+
|
|
1680
2009
|
- **Biome auto-fix disabled by default**: Biome still provides linting feedback, but no longer auto-fixes on write. Use `/format` to apply fixes or enable with `--autofix-biome`.
|
|
1681
2010
|
|
|
1682
2011
|
### Added
|
|
2012
|
+
|
|
1683
2013
|
- **ast-grep search/replace tools**: New `ast_grep_search` and `ast_grep_replace` tools for AST-aware code pattern matching. Supports meta-variables and 24 languages.
|
|
1684
2014
|
- **Rule descriptions in diagnostics**: ast-grep violations now include the rule's message and note, making feedback more actionable for the agent.
|
|
1685
2015
|
|
|
1686
2016
|
### Changed
|
|
2017
|
+
|
|
1687
2018
|
- **Reduced console noise**: Extension no longer prints to console by default. Enable with `--lens-verbose`.
|
|
1688
2019
|
|
|
1689
2020
|
## [1.2.0] - 2026-03-23
|
|
1690
2021
|
|
|
1691
2022
|
### Added
|
|
2023
|
+
|
|
1692
2024
|
- GitHub repository link in npm package
|
|
1693
2025
|
|
|
1694
2026
|
## [1.1.2] - Previous
|