pi-lens 2.0.27 → 2.0.28

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 CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  All notable changes to pi-lens will be documented in this file.
4
4
 
5
+ ## [2.0.27] - 2026-03-26
6
+
7
+ ### Added
8
+ - **`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'`.
9
+ - **`clients/type-safety-client.ts`**: New client for type safety checks. Extensible for future checks (null safety, exhaustive type guards).
10
+
11
+ ### Changed
12
+ - **Type safety violations added to inline feedback**: Missing switch cases now block the agent mid-task, same as TypeScript errors.
13
+ - **Type safety violations in `/lens-booboo-fix`**: Marked as agent-fixable (add missing case or default clause).
14
+
15
+ ## [2.0.26] - 2026-03-26
16
+
17
+ ### Added
18
+ - **5 new ast-grep rules** for AI slop detection:
19
+ - `no-process-env`: Block direct `process.env` access (use DI or config module) — error level
20
+ - `no-param-reassign`: Detect function parameter reassignment — warning level
21
+ - `no-single-char-var`: Flag single-character variable names — info level
22
+ - `switch-without-default`: Ensure switch statements have default case — warning level
23
+ - `no-architecture-violation`: Block cross-layer imports (models/db) — error level
24
+
25
+ ### Changed
26
+ - **RULE_ACTIONS updated** for new rules:
27
+ - `agent` type (inline + booboo-fix): `no-param-reassign`, `switch-without-default`, `switch-exhaustiveness`
28
+ - `skip` type (booboo-refactor only): `no-process-env`, `no-single-char-var`, `no-architecture-violation`
29
+
5
30
  ## [2.0.24] - 2026-03-26
6
31
 
7
32
  ### Changed
package/README.md CHANGED
@@ -202,11 +202,17 @@ Each rule includes a `message` and `note` that are shown in diagnostics, so the
202
202
  `no-debugger`, `no-throw-string`, `no-return-await`, `no-await-in-loop`, `no-await-in-promise-all`, `require-await`, `empty-catch`, `strict-equality`, `strict-inequality`
203
203
 
204
204
  **Patterns**
205
- `no-console-log`, `no-alert`, `no-delete-operator`, `no-shadow`, `no-star-imports`, `switch-needs-default`
205
+ `no-console-log`, `no-alert`, `no-delete-operator`, `no-shadow`, `no-star-imports`, `switch-needs-default`, `switch-without-default`
206
+
207
+ **Type Safety** (type-aware checks via `type-safety-client.ts`)
208
+ `switch-exhaustiveness` — detects missing cases in union type switches (inline blocker)
206
209
 
207
210
  **Design Smells**
208
211
  `long-method`, `long-parameter-list`, `large-class`
209
212
 
213
+ **AI Slop Detection**
214
+ `no-param-reassign`, `no-single-char-var`, `no-process-env`, `no-architecture-violation`
215
+
210
216
  ---
211
217
 
212
218
  ## External dependencies summary
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-lens",
3
- "version": "2.0.27",
3
+ "version": "2.0.28",
4
4
  "description": "Real-time code quality feedback for pi — TypeScript LSP, Biome, ast-grep, Ruff, complexity metrics, duplicate detection. Includes automated fix loop (/lens-booboo-fix) and interactive architectural refactoring (/lens-booboo-refactor) with browser-based interviews.",
5
5
  "repository": {
6
6
  "type": "git",