pi-lens 4.4.12 → 4.5.0

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.
Files changed (155) hide show
  1. package/CHANGELOG-USER.md +6 -6
  2. package/CHANGELOG.md +172 -0
  3. package/README.md +103 -217
  4. package/dist/{chunk-KXDQD34C.js → chunk-27JQHK7Y.js} +1 -1
  5. package/dist/{chunk-W6VLB6LL.js → chunk-2APSZHHI.js} +61 -3
  6. package/dist/{chunk-5EEWCJG7.js → chunk-2H5GHZKC.js} +8 -8
  7. package/dist/{chunk-TS5EIWEF.js → chunk-2H7NFZ4Q.js} +11 -11
  8. package/dist/{chunk-6GWCYEP7.js → chunk-37IDWT6O.js} +64 -16
  9. package/dist/{chunk-OEPWTSUG.js → chunk-3PAS2ERX.js} +8 -8
  10. package/dist/{chunk-ET3DSSFZ.js → chunk-3PO4YYOX.js} +9 -17
  11. package/dist/{chunk-C6V2DSZZ.js → chunk-3QXFUP6T.js} +11 -11
  12. package/dist/{chunk-HWMNTQBJ.js → chunk-3TSMQZG6.js} +32 -11
  13. package/dist/{chunk-QY6J2FTK.js → chunk-4DAHGU3V.js} +15 -14
  14. package/dist/{chunk-PCREZ4HJ.js → chunk-4IZZEN63.js} +33 -34
  15. package/dist/{chunk-OYXD2MOM.js → chunk-5HBQL7DH.js} +2 -2
  16. package/dist/{chunk-B4FAFEBP.js → chunk-5JB4WENL.js} +1 -1
  17. package/dist/chunk-5YJXF2IS.js +56 -0
  18. package/dist/{chunk-GHATCG2A.js → chunk-6CFSDLHE.js} +22 -18
  19. package/dist/{chunk-FVQKX5KI.js → chunk-6E5QLMWI.js} +24 -22
  20. package/dist/{chunk-AVBEPUCD.js → chunk-6GLMMGCX.js} +2 -2
  21. package/dist/{chunk-YTXFNCVN.js → chunk-74AMPWNC.js} +2 -2
  22. package/dist/{chunk-K2GV34T2.js → chunk-7CLWC2UH.js} +26 -37
  23. package/dist/{chunk-MOEWCPMC.js → chunk-7DPXUPRF.js} +2 -2
  24. package/dist/{chunk-7BEADGAZ.js → chunk-7U36VQL6.js} +2 -2
  25. package/dist/{chunk-PPYUBO6Y.js → chunk-7WKVCZI4.js} +1 -1
  26. package/dist/{chunk-ILC2B7IJ.js → chunk-7ZVTFLCC.js} +10 -10
  27. package/dist/{chunk-IT7MFVGP.js → chunk-ADYQRETD.js} +2 -2
  28. package/dist/{chunk-NCDH2JB7.js → chunk-ARTYCUGF.js} +25 -10
  29. package/dist/{chunk-Z6WTLVUL.js → chunk-AXAR5ZW2.js} +225 -104
  30. package/dist/{chunk-PK3GDU4M.js → chunk-AZG5UJYY.js} +1 -1
  31. package/dist/{chunk-NRVWLTOY.js → chunk-B2OXE4AH.js} +60 -21
  32. package/dist/{chunk-ORYQGVC3.js → chunk-B42AIWPJ.js} +2 -2
  33. package/dist/{chunk-IC4L65U7.js → chunk-BBSDJTOV.js} +12 -13
  34. package/dist/{chunk-HJWF7CGW.js → chunk-BKWFDWYM.js} +16 -16
  35. package/dist/{chunk-D2ZYRI7M.js → chunk-C5PLBTNR.js} +1 -1
  36. package/dist/{chunk-SRXYSLMW.js → chunk-CQY2HEH7.js} +1 -1
  37. package/dist/{chunk-7424ANRU.js → chunk-CXQYK4YT.js} +1 -1
  38. package/dist/{chunk-HYR25MV3.js → chunk-CZJGAOKL.js} +8 -7
  39. package/dist/{chunk-DIIDMDZU.js → chunk-DCA2MXVQ.js} +11 -11
  40. package/dist/{chunk-K2LD6YNH.js → chunk-DFKOA74L.js} +9 -9
  41. package/dist/{chunk-AYDE7RFV.js → chunk-DI4AZZNY.js} +2 -2
  42. package/dist/{chunk-6EXGCXM5.js → chunk-G53LBDNU.js} +99 -5
  43. package/dist/chunk-GCSDF5IE.js +27 -0
  44. package/dist/{chunk-5KLRCUDT.js → chunk-H5API74E.js} +6 -6
  45. package/dist/chunk-HBX55MWO.js +27 -0
  46. package/dist/{chunk-JRSS6KM4.js → chunk-HIJ4CHFF.js} +2 -2
  47. package/dist/{chunk-3MHY4BQY.js → chunk-HIRBC72R.js} +4 -4
  48. package/dist/{chunk-F7AMFFVK.js → chunk-HRLF35WL.js} +8 -8
  49. package/dist/{chunk-HSTN27NR.js → chunk-I2FYOZNW.js} +9 -9
  50. package/dist/{chunk-5FDUKJZO.js → chunk-I3NZVAMN.js} +9 -9
  51. package/dist/{chunk-NZINZCHB.js → chunk-INBK3HIT.js} +3 -3
  52. package/dist/{chunk-PXGVB2CY.js → chunk-J2ZB5MDS.js} +20 -18
  53. package/dist/{chunk-HYDJUVOE.js → chunk-JGUDT5KD.js} +4 -4
  54. package/dist/chunk-JOIKBUQN.js +88 -0
  55. package/dist/{chunk-AZXTLZHE.js → chunk-K4Z7MK6T.js} +169 -165
  56. package/dist/{chunk-WTSQKJAR.js → chunk-K7O6AHSJ.js} +10 -10
  57. package/dist/{chunk-S6ZQFPOX.js → chunk-KNJH6WJQ.js} +6 -6
  58. package/dist/{chunk-SUIZOCSY.js → chunk-KNSOA43J.js} +1 -1
  59. package/dist/{chunk-3QMLB4TI.js → chunk-KXGTLAUW.js} +2 -2
  60. package/dist/{chunk-OHEUOWYT.js → chunk-KZ732ZVW.js} +1 -1
  61. package/dist/{chunk-G3LR6V6N.js → chunk-L6BDRYUK.js} +19 -17
  62. package/dist/{chunk-OVPR3GQ6.js → chunk-LGH2HHZG.js} +24 -6
  63. package/dist/{chunk-3R3Z54J7.js → chunk-LOEJFTF2.js} +1 -1
  64. package/dist/{chunk-HGEE5LDW.js → chunk-LQQNFCQJ.js} +1 -1
  65. package/dist/chunk-LVLPA32Q.js +810 -0
  66. package/dist/chunk-M2YMBT5G.js +73 -0
  67. package/dist/{chunk-Z2W5YJBW.js → chunk-MJRGPEQ5.js} +11 -11
  68. package/dist/{chunk-3EIZMRXI.js → chunk-MOAVEPC4.js} +10 -10
  69. package/dist/{chunk-TOOXNL6M.js → chunk-NGNBJIUO.js} +7 -7
  70. package/dist/{chunk-AGEQRJ5A.js → chunk-NHA5K226.js} +1 -1
  71. package/dist/{chunk-YLW26OHX.js → chunk-NNEQOC3U.js} +31 -59
  72. package/dist/{chunk-ZWZD4TJ5.js → chunk-O2MHF7QM.js} +35 -36
  73. package/dist/{chunk-PTJXMYRY.js → chunk-OLWGYBYT.js} +15 -16
  74. package/dist/{chunk-JKAVKTMY.js → chunk-OZQQ3AIR.js} +17 -20
  75. package/dist/{chunk-6JLNZ6DP.js → chunk-P5MSLVUW.js} +10 -10
  76. package/dist/{chunk-OF2YGDUE.js → chunk-PFJLYRO3.js} +37 -38
  77. package/dist/chunk-PKWEBMCA.js +2957 -0
  78. package/dist/{chunk-JLMS7EMD.js → chunk-PPQHMSPH.js} +16 -15
  79. package/dist/{chunk-6EIV3H7O.js → chunk-PQF6YGYB.js} +12 -5
  80. package/dist/{chunk-VU2PRGRI.js → chunk-PQXUZYTQ.js} +4 -4
  81. package/dist/{chunk-MV6ST2KT.js → chunk-Q7J3JYJ2.js} +13 -12
  82. package/dist/{chunk-BMMRLJA4.js → chunk-QE5DJ7MX.js} +27 -10
  83. package/dist/{chunk-IZ36G463.js → chunk-QE7BJQ6K.js} +7 -7
  84. package/dist/{chunk-E5SSUV2A.js → chunk-QMWKSYWB.js} +4 -4
  85. package/dist/{chunk-QJ4T73J5.js → chunk-QV3JPCMK.js} +1 -1
  86. package/dist/{chunk-3PMLYGJN.js → chunk-R4L7KZ7R.js} +5 -5
  87. package/dist/{chunk-7ZVEFWOE.js → chunk-RIH3UBK4.js} +10 -10
  88. package/dist/{chunk-T5EGSBM2.js → chunk-RJ3APNIP.js} +3 -3
  89. package/dist/{chunk-AAIVSSUU.js → chunk-S6MCMD27.js} +35 -12
  90. package/dist/{chunk-SF7KSXB5.js → chunk-SCU62JLX.js} +6 -6
  91. package/dist/{chunk-FDLGJFAE.js → chunk-SDYLT45T.js} +3 -3
  92. package/dist/chunk-TFKN5EIR.js +27 -0
  93. package/dist/{chunk-Y7XMKBFP.js → chunk-TKOFTLGB.js} +34 -26
  94. package/dist/chunk-TQWRH25U.js +35 -0
  95. package/dist/{chunk-DZSQXG66.js → chunk-TWEOJE3D.js} +277 -62
  96. package/dist/{chunk-R67WQ5RY.js → chunk-UN72ZAJ5.js} +8 -8
  97. package/dist/{chunk-AD7JDEI6.js → chunk-UNP6Y4JV.js} +16 -16
  98. package/dist/{chunk-D6ANA6YU.js → chunk-VGRGW4UL.js} +63 -55
  99. package/dist/{chunk-DFAY7JUN.js → chunk-VSQT6IHZ.js} +2 -2
  100. package/dist/{chunk-7T64QA5D.js → chunk-VWEBZ2JV.js} +39 -38
  101. package/dist/{chunk-HRQTYU2T.js → chunk-W26QZ3OM.js} +1 -1
  102. package/dist/{chunk-2HWVG3IM.js → chunk-XDNWR7SG.js} +2 -2
  103. package/dist/{chunk-75TVYCQW.js → chunk-XSC3BCN3.js} +5 -5
  104. package/dist/{chunk-ME6MF2N2.js → chunk-YCR6ZYTE.js} +1 -1
  105. package/dist/{chunk-LD7SXICE.js → chunk-ZI7YHV6I.js} +5 -5
  106. package/dist/{chunk-E3PNZDPH.js → chunk-ZQSSO7LO.js} +33 -1
  107. package/dist/{chunk-T6PPK3T6.js → chunk-ZULZS2I6.js} +385 -407
  108. package/dist/index.js +6508 -5413
  109. package/dist/mcp/analyze-cli.js +9 -9
  110. package/dist/mcp/cli.js +39 -38
  111. package/dist/mcp/server.js +602 -345
  112. package/dist/mcp/worker.js +57 -58
  113. package/dist/probes/installer.js +19 -17
  114. package/docs/architecture.md +113 -0
  115. package/docs/ast-grep_rules_catalog.md +2 -2
  116. package/docs/ci.md +18 -4
  117. package/docs/defect-shapes.md +41 -3
  118. package/docs/dependencies.md +10 -10
  119. package/docs/features.md +3 -3
  120. package/docs/invariants/dispatch-runners.md +13 -1
  121. package/docs/invariants/lsp-trust-exec.md +19 -0
  122. package/docs/language-coverage.md +39 -0
  123. package/docs/lsp-capability-matrix.md +10 -4
  124. package/docs/lsp-idle-eviction.md +1 -1
  125. package/docs/pi-lens-fixer.md +4 -0
  126. package/docs/pi-lens-merge-policy.md +1 -1
  127. package/docs/pi-lens-reviewer.md +4 -5
  128. package/docs/pi-lens-subagent.md +5 -2
  129. package/docs/prose-standard.md +112 -0
  130. package/docs/servercapabilities.md +1 -1
  131. package/docs/usage.md +50 -0
  132. package/package.json +1 -1
  133. package/rules/ast-grep-rules/rule-tests/array-callback-return-js-test.yml +23 -0
  134. package/rules/ast-grep-rules/rule-tests/array-callback-return-test.yml +23 -0
  135. package/rules/ast-grep-rules/rule-tests/no-negation-in-equality-check-js-test.yml +8 -0
  136. package/rules/ast-grep-rules/rule-tests/no-negation-in-equality-check-test.yml +8 -0
  137. package/rules/ast-grep-rules/rule-tests/unchecked-throwing-call-js-test.yml +16 -0
  138. package/rules/ast-grep-rules/rule-tests/unchecked-throwing-call-test.yml +16 -0
  139. package/rules/ast-grep-rules/rules/array-callback-return-js.yml +8 -0
  140. package/rules/ast-grep-rules/rules/array-callback-return.yml +8 -0
  141. package/rules/ast-grep-rules/rules/no-negation-in-equality-check-js.yml +17 -5
  142. package/rules/ast-grep-rules/rules/no-negation-in-equality-check.yml +17 -5
  143. package/rules/ast-grep-rules/rules/unchecked-throwing-call-js.yml +8 -1
  144. package/rules/ast-grep-rules/rules/unchecked-throwing-call.yml +8 -1
  145. package/rules/tree-sitter-queries/typescript/ts-react-antipatterns.yml +8 -0
  146. package/dist/chunk-3VWEZ6H2.js +0 -72
  147. package/dist/chunk-7KWI5UHL.js +0 -28
  148. package/dist/chunk-7M64NTAK.js +0 -38
  149. package/dist/chunk-BEIPWPVR.js +0 -1037
  150. package/dist/chunk-D7OEGXDX.js +0 -2417
  151. package/dist/chunk-KUDUKKQE.js +0 -89
  152. package/dist/chunk-TM3A3K7T.js +0 -28
  153. package/dist/chunk-VD7MQFEV.js +0 -56
  154. package/dist/chunk-YLHJWAQS.js +0 -256
  155. package/dist/chunk-YULIERZW.js +0 -27
@@ -69,15 +69,21 @@ TypeScript 7+ decides first: with `@effect/tsgo` installed beside it (the same
69
69
  `node_modules` level, with a readable manifest version and an existing
70
70
  `.bin/effect-tsgo` path) the launch is `effect-tsgo tsc --lsp --stdio`
71
71
  (`launchVariant: "effect-tsgo"`, #4914); otherwise the native `tsc --lsp --stdio`
72
- (`"native-ts7"`); with TypeScript 6 or older, or none, the classic
73
- `typescript-language-server` (`"classic"`). Installing `@effect/tsgo` is the
72
+ (`"native-ts7"`). With TypeScript 6 or older and a TypeScript 7+
73
+ `@typescript/native` alias at the same level, the alias's own `bin/tsc` runs
74
+ with Node (`"native-ts7"`, #5504); an alias that exits at launch or fails
75
+ `initialize` falls back once to the classic launch below and records one
76
+ `lsp-registry-decision` row (`typescript-native-alias`) per root per generation.
77
+ Otherwise, with TypeScript 6 or older, or
78
+ none, the launch is the classic `typescript-language-server` (`"classic"`). Installing `@effect/tsgo` is the
74
79
  only opt-in. pi-lens never installs it, adds no setting for it, and runs the
75
80
  binary only when pi trusts the project, like the project's compiler. A
76
81
  malformed `@effect/tsgo` install keeps the native launch and never takes an
77
82
  ancestor's. So does an install the finder admits but the launcher cannot start
78
83
  (no exec bit, a directory at the bin path): the failure records one
79
84
  `lsp-registry-decision` row per root per generation and the native launch
80
- follows. A process that starts and then fails `initialize` is not covered.
85
+ follows. A process that starts and then exits or fails `initialize` falls back
86
+ to the native launch once, with the same `lsp-registry-decision` row (#5504).
81
87
  `effect-tsgo` wraps the same typescript-go server, so it uses the
82
88
  native variant's wait strategy and cascade tier (`isTsgoLaunchVariant`,
83
89
  `clients/lsp/server-traits.ts`) and is excluded from classic's marker the same
@@ -269,7 +275,7 @@ carries the named admission until then.
269
275
  | json | vscode-json-language-server | pull | — | n/a (pull) | 1 | dev+ci | — | pi-lens-auto | — |
270
276
  | css | vscode-css-language-server | pull | — | n/a (pull) | 1 | dev+ci | — | pi-lens-auto | — |
271
277
  | html | vscode-html-language-server | pull | — | n/a (pull) | 1 | dev+ci | — | pi-lens-auto | — |
272
- | rust | rust-analyzer | pull | — | n/a (pull) | 1 | dev+ci | 0.3.3105-standalone | global-path | — |
278
+ | rust | rust-analyzer | pull | — | n/a (pull) | 1 | dev+ci | 0.3.3113-standalone | global-path | — |
273
279
  | svelte | svelte-language-server | pull | — | n/a (pull) | 1 | dev+ci | — | pi-lens-auto | — |
274
280
  | deno | deno (alt of typescript) | pull | — | n/a (pull) | 1 | dev+ci | 2.9.8 | global-path | — |
275
281
  | ruby | ruby-lsp | pull | — | n/a (pull) | 1 | ci | — | — | — |
@@ -15,7 +15,7 @@ respawned server reports every finding it reported before eviction; the
15
15
  content-bound coverage check the auxiliary freeze depends on. A server that
16
16
  cannot demonstrate it is never proposed for eviction on perf grounds alone.
17
17
 
18
- _Last generated: 2026-11-08 on linux; 51 registry servers: 38 eligible, 0 vetoed, 3 inconclusive, 10 unavailable (0 not reached: budget)._
18
+ _Last generated: 2026-11-11 on linux; 51 registry servers: 38 eligible, 0 vetoed, 3 inconclusive, 10 unavailable (0 not reached: budget)._
19
19
 
20
20
  ## Per-server rows
21
21
 
@@ -242,6 +242,10 @@ registry; other doubles only as `AGENTS.md` admits them.
242
242
 
243
243
  ## Before the report
244
244
 
245
+ Before any `gh issue comment`, `gh pr comment` or thread reply over 12 lines,
246
+ run `node scripts/check-prose.mjs --comment --body-file <f>`
247
+ (`docs/prose-standard.md` "Comment layout").
248
+
245
249
  Re-climb the minimalism ladder on what you built. Challenge anything
246
250
  unnecessary or unverified with a probe, delete what can go, and simplify what
247
251
  remains: prefer deleting over simplifying, simplifying over optimizing, and
@@ -321,7 +321,7 @@ operator's private notes, so a different orchestrator can run the same train.
321
321
  | a test that spawns a real child (LSP fake server, tool smoke, installer) | the lane admission (header + `vitest.config.ts` project + coverage baseline) and `tests/config/` — #2783 r5 |
322
322
  | a new fixture under `tests/fixtures/` | the fixture-contract sweeps for that directory (style-preserving, population guards) — #2782 r2 |
323
323
  | a change that touches identifier uses of a glossary-retired synonym | run `tests/config/glossary-synonym-sweep.test.ts` on the head AND on the merge with `origin/master`, then re-pin in the PR from the sweep's own `UNPINNED`/`STALE` output — #3279, #3283, #3284, #3288 |
324
- | a new `vi.mock` in a test file | run `tests/config/vi-mock-export-sweep.test.ts`; whole-module mocks of a production module must spread `importOriginal` — PR #3268's CI red, fixed by trailing commit `621d61c5c` |
324
+ | a new `vi.mock` or `vi.doMock` in a test file | run `tests/config/vi-mock-export-sweep.test.ts`; whole-module mocks of a production module must spread `importOriginal` — PR #3268's CI red, fixed by trailing commit `621d61c5c` |
325
325
  | a changelog fragment | front matter `section: <Section>` plus `audience: user` or `audience: internal` and exactly one top-level entry; a `user` entry also has `area: <id>` and the one shape `- **Headline sentence.** Body. (refs #N)` (limits in `.changelog/README.md`), never `CHANGELOG.md`, validated by `node scripts/check-changelog-fragments.mjs` — PR #3268 r1 shipped `category:` and a paragraph |
326
326
  | a PR body | the header gate: `## Summary`, `## Notes for the reviewer`, `## Change outline`, plus Tests / Class sweep / Fold check / Observability, inside the caps; run `node scripts/check-pr-body.mjs --lint-local` before pushing — three PRs this week needed orchestrator body edits |
327
327
  | a whole-tree docs restructure of `AGENTS.md` | every governance test that reads `AGENTS.md`, with markers on their own lines — PR #3265 r1 |
@@ -425,8 +425,7 @@ Use short, active, plain prose.
425
425
 
426
426
  ## Documentation and prose standard
427
427
 
428
- Apply this standard to PR and issue bodies, review comments, commit messages, documentation, and changelog entries. Lead with the outcome. Remove words that do no work. Use active voice and present tense. Use second person for instructions, and use the imperative for steps. Keep one idea per sentence, with about 20–25 words and no more than 30 words. Use consistent terminology and sentence-case headings. Define acronyms on first use. Prefer plain words over jargon. Avoid `please`, filler, noun piles, nested parentheticals, and em-dash chains. Use the Oxford comma.
429
-
430
- The mechanical rules are checked by `scripts/check-prose.mjs`. The checker ignores fenced code, inline code, URLs, quoted log lines, blockquotes, and tables. It warns on long sentences, filler, and passive voice, and it blocks title-case headings (#5110). The CLI accepts a body file or standard input and supports `--json`.
431
-
432
- Reviewers judge clarity, terminology, active voice, sentence structure, and whether each list uses parallel grammar. Treat a mechanically clean result as necessary, not sufficient. Report prose that obscures the outcome or makes a user infer the action.
428
+ The standard lives in `docs/prose-standard.md`. Judge prose against it. A
429
+ review or verify text that will be posted as an issue or PR comment over 12
430
+ lines follows its "Comment layout" and passes
431
+ `node scripts/check-prose.mjs --comment --body-file <f>` first.
@@ -8,7 +8,7 @@ holds the pi-lens rules every role shares, for every runner and model. The
8
8
  principles apply throughout and are not restated; project files win on
9
9
  conflict.
10
10
 
11
- User-facing prose follows the live standard in `docs/pi-lens-reviewer.md`.
11
+ User-facing prose follows the live standard in `docs/prose-standard.md`.
12
12
 
13
13
  ## Worktree and Git
14
14
 
@@ -134,7 +134,10 @@ the brief gives.
134
134
  write `PR_BODY.md` and `COMMIT_MSG.txt` at the worktree root
135
135
  ("Worktree and Git"). A reviewer is always `none` and read-only.
136
136
  GitHub comments and issue edits are separate: only a brief that grants them
137
- allows them.
137
+ allows them. Before any `gh issue comment`, `gh pr comment` or thread reply
138
+ over 12 lines, run `node scripts/check-prose.mjs --comment --body-file <f>`
139
+ (`docs/prose-standard.md` "Comment layout"); never post a hand-back as a
140
+ comment.
138
141
  - **Deliverable.** The report opens with an `ORCHESTRATOR SUMMARY`. Its cap
139
142
  follows the lane kind: at most 6 lines for a mechanical lane (trailing fold,
140
143
  pin or allowlist move, merge-and-resolve), 20 for a locate or investigation
@@ -0,0 +1,112 @@
1
+ # Prose standard
2
+
3
+ Apply this standard to PR and issue bodies, review comments, commit messages, documentation, and changelog entries. Every agent and every role contract follows it. Roles do not carry their own copy.
4
+
5
+ ## Sources
6
+
7
+ ASD-STE100 (Simplified Technical English) is the default. Where it is too strict for a passage, such as design rationale or the explanation of a trade-off, use the Google developer documentation style guide instead. Review comments also follow Google's engineering practices for code review comments: comment on the code, explain the reason, and say what you expect the author to do. This file states the rules in short form, so you do not need to read the sources to apply it.
8
+
9
+ ## House rules
10
+
11
+ Lead with the outcome. Remove words that do no work. Use active voice and present tense. Use second person for instructions, and use the imperative for steps. Keep one idea per sentence, with about 20–25 words and no more than 30 words. Use consistent terminology and sentence-case headings. Define acronyms on first use. Prefer plain words over jargon. Avoid `please`, filler, noun piles, nested parentheticals, and em-dash chains. Use the Oxford comma.
12
+
13
+ ## What the checker covers
14
+
15
+ `scripts/check-prose.mjs` checks the mechanical rules. The checker ignores fenced code, inline code, URLs, quoted log lines, blockquotes, and tables. It warns on long sentences, filler, and passive voice, and it blocks title-case headings (#5110). The heading check reads inline code too, so a capitalised name in backticks counts toward title case. The CLI accepts a body file or standard input and supports `--json`.
16
+
17
+ ```
18
+ node scripts/check-prose.mjs --body-file docs/prose-standard.md
19
+ ```
20
+
21
+ A clean result is necessary, not sufficient. Reviewers judge the rules below and the rules above that the checker cannot see.
22
+
23
+ ## Judgement-only rules
24
+
25
+ The checker does not check these ASD-STE100 rules. Reviewers judge them.
26
+
27
+ - **One meaning per word, one word per meaning.** Pick one term for one thing and keep it. Do not use "lane", "worker" and "task" for the same thing. Do not use one word for two different things.
28
+ - **Verbs, not nominalisations.** Write "validate the input", not "perform validation of the input". Write "the cache expires", not "the expiration of the cache occurs".
29
+ - **Noun clusters of three words at most.** Write "the cache for LSP diagnostics", not "the LSP diagnostics cache entry lookup". Break a long cluster with a preposition.
30
+ - **Procedure steps as one imperative instruction each.** Give each numbered step one command to the reader. Put a condition or a warning in its own sentence or step, not inside the instruction.
31
+
32
+ Reviewers also judge clarity, terminology, sentence structure, and whether each list uses parallel grammar. Report prose that obscures the outcome or makes a user infer the action.
33
+
34
+ ## Comment layout
35
+
36
+ This layout applies to posted triage, review, verify, and status comments on issues and PRs. It also applies to a thread reply of more than a few lines. PR bodies keep their linted sections (`.github/PULL_REQUEST_TEMPLATE.md`) and do not use it.
37
+
38
+ Open with a short visible part: the outcome, the decision or ask, and who acts next. Then fold the detail into a collapsed block. Readers skip long agent comments, so the line that matters must stay visible without a click. The pattern comes from <https://simonwillison.net/2026/Nov/9/details-summary/>.
39
+
40
+ ```html
41
+ <details>
42
+ <summary>Claude Opus 5.5 (high): full triage</summary>
43
+
44
+ ...evidence, file references, probes...
45
+
46
+ </details>
47
+ ```
48
+
49
+ ### What the checker enforces
50
+
51
+ Run the checker on the comment file before every `gh issue comment`, `gh pr comment`, and thread reply of more than 12 non-blank lines. Roles do not post a long comment that has not passed.
52
+
53
+ ```
54
+ node scripts/check-prose.mjs --comment --body-file <file>
55
+ ```
56
+
57
+ A comment of 13 or more non-blank lines passes only when all of these hold:
58
+
59
+ - At least 1 and at most 8 non-blank lines sit outside the folds (the visible part). The first fold needs a visible line before it, the verdict. A code fence outside a fold counts as visible.
60
+ - Each fold opens with a plain `<details>`. `<details open>` renders expanded, so the checker refuses it. Each `<details>` has a one-line `<summary>...</summary>` on the same line or the next non-blank line, with nothing after `</summary>`.
61
+ - A blank line follows the `</summary>` line.
62
+ - Each fold closes with `</details>` on its own line. Folds do not nest.
63
+ - The summary names a model in one of two forms: `<Model name> (<effort>): <what is inside>` or `<Model name>: <what is inside>`. The model name starts with a known family (Claude, Opus, Sonnet, Haiku, GPT, Codex, Sol, Luna, DeepSeek, Qwen, GLM, Gemini, Muse, Kimi, Mistral, Llama, Grok). The parenthesis holds an effort (low, medium, high, xhigh, max, minimal, or default, which may follow `thinking`) or a role word (investigator, reviewer, fixer, or verify), as in `Claude Sonnet 5.5 (investigator): probes`. The checker refuses anything else in the parenthesis. Add a new family to `MODEL_FAMILIES` in `scripts/check-prose.mjs`.
64
+
65
+ A comment of 12 non-blank lines or fewer needs no fold. A fold in a short comment still follows the structure rules. The checker also runs the prose checks above in this mode.
66
+
67
+ The one escape is `--long-ok "<reason>"`, a reason of 12 or more characters. It waives only the fold and visible-part rules for a long comment that cannot fold, for example a verbatim quote. The checker prints the reason, and a bare flag fails.
68
+
69
+ ### Reply shape for review and verify
70
+
71
+ The visible part says, in this order:
72
+
73
+ 1. The verdict, with the head sha it covers.
74
+ 2. What the author must do, or "nothing".
75
+ 3. Who acts next.
76
+
77
+ Findings, probes, what held up, and bot dispositions go inside the fold. A hand-back is never posted as a comment. Post a summary in this layout, and link or attach nothing private, such as a local path under `/home`.
78
+
79
+ ### Worked example
80
+
81
+ This is the #5394 review rewritten into the shape. The visible part is three short paragraphs, and the detail sits in the fold. The test `tests/scripts/check-prose.test.ts` runs this block through the checker.
82
+
83
+ ```markdown
84
+ Verdict at head 1145734f3 (merged with master 011b5420a): needs changes, nothing high severity.
85
+
86
+ Author: say what the digests enable (F1), cover the four `retireScope` mutants (F3), and fold the duplicate reader (F5).
87
+
88
+ Next: we re-review after your push.
89
+
90
+ <details>
91
+ <summary>Claude Opus 5.5 (high): review findings and what held up</summary>
92
+
93
+ **Premises**
94
+
95
+ - **(a) MCP bootstrap reset race.** `_resetMcpSessionContext` has no production callers, so the guard protects a test hook only.
96
+ - **(b) Config digests.** No production code reads `contributingConfigSources`.
97
+
98
+ **Findings**
99
+
100
+ - **F1 (medium): the digests have no consumer.** The field also lists absent, unparseable and unreadable candidates. Probe: a `{ not json` file and seven missing paths all appear in it.
101
+ - **F2 (medium): a hand-rolled epoch counter.** Addressed in 233efdbf1 with `createGenerationSource`.
102
+ - **F3 (medium): mutation survivors.** We mutated each of the four `retireScope` calls in the built output. `session-context-eviction` stayed green for all four.
103
+ - **F5 (low): near-duplicate reader.** `readConfigDocumentAndDigest` nearly copies `readConfigDocument`.
104
+
105
+ **What held up**
106
+
107
+ - The digest hashes the exact buffer that gets parsed.
108
+ - Across 6 walk scenarios, resolution matched master exactly.
109
+ - Red first: with `clients/` reverted and your tests kept, both new tests fail.
110
+
111
+ </details>
112
+ ```
@@ -6,7 +6,7 @@ server's `initialize` handshake. Generated by `node scripts/server-capabilities.
6
6
  absent on the generating host are listed under *Unavailable* — run in a
7
7
  provisioned environment (the nightly) to capture those rows.
8
8
 
9
- _Last generated: 2026-11-08 on linux; 42 servers captured, 9 unavailable._
9
+ _Last generated: 2026-11-11 on linux; 42 servers captured, 9 unavailable._
10
10
 
11
11
  ## Diagnostic mode + navigation/edit operations
12
12
 
package/docs/usage.md CHANGED
@@ -211,3 +211,53 @@ turn-end is skipped, not faked: one line on stderr and nothing on stdout.
211
211
  installing or spawning anything, that the resolvers find project-local tools in
212
212
  `.venv/bin`, `vendor/bin` and `node_modules/.bin` (it runs nightly in
213
213
  tool-smoke).
214
+
215
+ ### Install notes
216
+
217
+ pi-lens delivers its four skills through the `pi.skills` package manifest, so
218
+ install it as a package (`npm:`, `git:`, or a local path); a package install
219
+ honours the host's `packages[].skills` filters (for example `[]`,
220
+ `!skills/<name>/SKILL.md`, or `-skills/<name>/SKILL.md`). Loading the extension
221
+ file directly (`pi --extension ./index.js`) does not read that manifest and
222
+ loads no pi-lens skills. To install from git, run
223
+ `pi install git:github.com/apmantza/pi-lens`.
224
+
225
+ > **npm v12 users:** dependency lifecycle scripts (e.g. `@ast-grep/cli`'s
226
+ > `postinstall`) now require explicit approval — if `npm install` warns about
227
+ > unreviewed install scripts, review and allow them with
228
+ > `npm approve-scripts` in pi's install root. The `allowScripts` entries in
229
+ > pi-lens's own `package.json` do not apply when pi-lens is installed as a
230
+ > dependency: copy them into the install root's `package.json` instead
231
+ > (maintainers: see CONTRIBUTING.md "Lifecycle-script approvals"). Installing from a git source (`pi install
232
+ > git:...` / `pi update --extension git:...`) may similarly prompt for
233
+ > git-dependency approval; accept it to let the `prepare` build step run.
234
+
235
+ #### Android and Termux fallback
236
+
237
+ Try the normal install first. If it fails in `@ast-grep/cli`'s
238
+ `postinstall.js` with `Failed to locate @ast-grep/cli native binary`, the
239
+ fallback below has worked in one Termux environment:
240
+
241
+ ```bash
242
+ pkg install rust clang
243
+ cargo install ast-grep --locked
244
+ ast-grep --version
245
+ npm_config_ignore_scripts=true pi install npm:pi-lens
246
+ ```
247
+
248
+ `npm_config_ignore_scripts=true` skips every dependency lifecycle script for
249
+ that `pi install` command, not only the failing `@ast-grep/cli` script. Use it
250
+ only for this fallback after installing and checking the Rust-built `ast-grep`
251
+ binary separately. `pi update` runs the same postinstall, so set the variable
252
+ for it too. `ast-grep --version` must succeed from a new shell, which means
253
+ `~/.cargo/bin` is on your `PATH`.
254
+
255
+ In the verified environment, `/lens-health` reported zero pipeline crashes and
256
+ listed the `ast-grep` and `bash` LSP servers as available. This confirms startup
257
+ and server discovery only; `ast_grep_search` was not tested end to end.
258
+
259
+ pi-lens only looks for an `ast-grep` on `PATH` (such as Cargo's
260
+ `~/.cargo/bin/ast-grep`) when pi trusts the project, so in an untrusted
261
+ project this fallback leaves `ast_grep_search` unavailable. The in-process
262
+ ast-grep rules (`@ast-grep/napi`) and Biome have no Android build, so they stay
263
+ unavailable either way.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-lens",
3
- "version": "4.4.12",
3
+ "version": "4.5.0",
4
4
  "type": "module",
5
5
  "description": "Real-time code feedback for pi — LSP, linters, formatters, type-checking, structural analysis & booboo",
6
6
  "repository": {
@@ -4,7 +4,30 @@ valid:
4
4
  - "arr.map(x => x + 1)"
5
5
  - "arr.forEach(x => console.log(x))"
6
6
  - "arr.reduce((acc, x) => { return acc + x })"
7
+ # #5466: an async callback always returns a promise, so the missing-return
8
+ # heuristic cannot fire on it.
9
+ - "arr.map(async x => { await f(x) })"
10
+ - "Array.from(set, async x => { await f(x) })"
11
+ # #5466: async modifier forms without spaces/parens and async function
12
+ # expressions are exempt too.
13
+ - "arr.map(async()=>{ await f(1) })"
14
+ - "arr.map(async function (x) { await g(x) })"
15
+ # #5466: own async token with a parameter named `async`, and a comment
16
+ # between the modifier and the parameter — both exempt.
17
+ - "arr.map(async async => { await f(async) })"
18
+ - "arr.map(async /* m */ x => { await f(x) })"
7
19
  invalid:
8
20
  - "arr.map(x => { x + 1 })"
9
21
  - "arr.filter(function (x) { console.log(x) })"
10
22
  - "Array.from(set, x => { x + 1 })"
23
+ # #5466 mutation guards: the async exemption keys on the callback's OWN
24
+ # async token. An async ANCESTOR must not exempt a sync callback (wrong
25
+ # scope upward), and an async DESCENDANT must not either (wrong scope
26
+ # downward).
27
+ - "async function run() { arr.map(x => { g(x) }) }"
28
+ - "arr.map(x => { const f = async () => {}; g(x) })"
29
+ # #5466 guard: a sync callback whose PARAMETER is named `async` is not an
30
+ # async callback — must still fire, including with a comment before `=>`.
31
+ - "arr.map(async => { g(async) })"
32
+ - "arr.filter(function (async) { g(async) })"
33
+ - "arr.map(async /* keep */ => { g(async) })"
@@ -4,7 +4,30 @@ valid:
4
4
  - "arr.map(x => x + 1)"
5
5
  - "arr.forEach(x => console.log(x))"
6
6
  - "arr.reduce((acc, x) => { return acc + x })"
7
+ # #5466: an async callback always returns a promise, so the missing-return
8
+ # heuristic cannot fire on it.
9
+ - "arr.map(async x => { await f(x) })"
10
+ - "Array.from(set, async x => { await f(x) })"
11
+ # #5466: async modifier forms without spaces/parens and async function
12
+ # expressions are exempt too.
13
+ - "arr.map(async()=>{ await f(1) })"
14
+ - "arr.map(async function (x) { await g(x) })"
15
+ # #5466: own async token with a parameter named `async`, and a comment
16
+ # between the modifier and the parameter — both exempt.
17
+ - "arr.map(async async => { await f(async) })"
18
+ - "arr.map(async /* m */ x => { await f(x) })"
7
19
  invalid:
8
20
  - "arr.map(x => { x + 1 })"
9
21
  - "arr.filter(function (x) { console.log(x) })"
10
22
  - "Array.from(set, x => { x + 1 })"
23
+ # #5466 mutation guards: the async exemption keys on the callback's OWN
24
+ # async token. An async ANCESTOR must not exempt a sync callback (wrong
25
+ # scope upward), and an async DESCENDANT must not either (wrong scope
26
+ # downward).
27
+ - "async function run() { arr.map(x => { g(x) }) }"
28
+ - "arr.map(x => { const f = async () => {}; g(x) })"
29
+ # #5466 guard: a sync callback whose PARAMETER is named `async` is not an
30
+ # async callback — must still fire, including with a comment before `=>`.
31
+ - "arr.map(async => { g(async) })"
32
+ - "arr.filter(function (async) { g(async) })"
33
+ - "arr.map(async /* keep */ => { g(async) })"
@@ -3,6 +3,14 @@ valid:
3
3
  - 'a !== b'
4
4
  - '!(a === b)'
5
5
  - 'a === b'
6
+ # #5466: a double-negation comparison (both operands negated) is a
7
+ # deliberate boolean comparison, not a negation binding tighter than the
8
+ # operator. A single negated operand below stays invalid — the mutation
9
+ # guard for this exemption.
10
+ - '!a === !b'
11
+ - '!a !== !b'
12
+ - '!a == !b'
13
+ - '!a != !b'
6
14
  invalid:
7
15
  - '!a === b'
8
16
  - '!a !== b'
@@ -3,6 +3,14 @@ valid:
3
3
  - 'a !== b'
4
4
  - '!(a === b)'
5
5
  - 'a === b'
6
+ # #5466: a double-negation comparison (both operands negated) is a
7
+ # deliberate boolean comparison, not a negation binding tighter than the
8
+ # operator. A single negated operand below stays invalid — the mutation
9
+ # guard for this exemption.
10
+ - '!a === !b'
11
+ - '!a !== !b'
12
+ - '!a == !b'
13
+ - '!a != !b'
6
14
  invalid:
7
15
  - '!a === b'
8
16
  - '!a !== b'
@@ -11,3 +11,19 @@ invalid:
11
11
  - 'new URL(s)'
12
12
  - 'execSync(cmd)'
13
13
  - 'execSync(cmd, opts)'
14
+ # #5466 documented limit (why this rule ships below `error`): The check is
15
+ # lexical. A call counts as checked when any enclosing `try` statement
16
+ # contains it, whatever the function boundary and whichever block (try,
17
+ # catch or finally). A `try` or `safe(() => …)` wrapper in a caller of the
18
+ # function is invisible, so a handled call can still be reported and an
19
+ # unhandled one can be missed. Read a hit as a prompt to verify the handling.
20
+ # The caller below wraps parse() in try/catch, and `safe(() => …)`-style
21
+ # wrappers exist, but neither is visible inside parse() — so this still
22
+ # reports, at warning severity.
23
+ - |
24
+ function parse(raw) {
25
+ return JSON.parse(raw);
26
+ }
27
+ try {
28
+ parse(raw);
29
+ } catch (e) {}
@@ -11,3 +11,19 @@ invalid:
11
11
  - 'new URL(s)'
12
12
  - 'execSync(cmd)'
13
13
  - 'execSync(cmd, opts)'
14
+ # #5466 documented limit (why this rule ships below `error`): The check is
15
+ # lexical. A call counts as checked when any enclosing `try` statement
16
+ # contains it, whatever the function boundary and whichever block (try,
17
+ # catch or finally). A `try` or `safe(() => …)` wrapper in a caller of the
18
+ # function is invisible, so a handled call can still be reported and an
19
+ # unhandled one can be missed. Read a hit as a prompt to verify the handling.
20
+ # The caller below wraps parse() in try/catch, and `safe(() => …)`-style
21
+ # wrappers exist, but neither is visible inside parse() — so this still
22
+ # reports, at warning severity.
23
+ - |
24
+ function parse(raw) {
25
+ return JSON.parse(raw);
26
+ }
27
+ try {
28
+ parse(raw);
29
+ } catch (e) {}
@@ -18,6 +18,14 @@ rule:
18
18
  - pattern: $$$ => $R
19
19
  - not:
20
20
  pattern: $$$ => { $$$ }
21
+ - not:
22
+ any:
23
+ - pattern: "async $$$ => { $$$ }"
24
+ # Bare named functions parse as declarations, not expressions.
25
+ - pattern:
26
+ context: "(async function $NAME($$$) { $$$ })"
27
+ selector: function_expression
28
+ - pattern: "async function ($$$) { $$$ }"
21
29
  # The original used `Array.from($, $FUNC)` with an anonymous `$`
22
30
  # metavariable for the first arg — ast-grep 0.42.0's `inside`
23
31
  # matcher treats `$` (anonymous) and `$FUNC` (named) inconsistently
@@ -18,6 +18,14 @@ rule:
18
18
  - pattern: $$$ => $R
19
19
  - not:
20
20
  pattern: $$$ => { $$$ }
21
+ - not:
22
+ any:
23
+ - pattern: "async $$$ => { $$$ }"
24
+ # Bare named functions parse as declarations, not expressions.
25
+ - pattern:
26
+ context: "(async function $NAME($$$) { $$$ })"
27
+ selector: function_expression
28
+ - pattern: "async function ($$$) { $$$ }"
21
29
  # The original used `Array.from($, $FUNC)` with an anonymous `$`
22
30
  # metavariable for the first arg — ast-grep 0.42.0's `inside`
23
31
  # matcher treats `$` (anonymous) and `$FUNC` (named) inconsistently
@@ -4,9 +4,21 @@ severity: error
4
4
  message: "Negation before equality check — !a === b evaluates as (!a) === b, not !(a === b)"
5
5
  note: |
6
6
  Use !== instead of !a === b. Or write !(a === b) if you meant negated equality.
7
+
8
+ #5466: both operands negated (`!a === !b`) is a deliberate boolean
9
+ comparison of two negations, not a misspelled negated equality — the
10
+ double-negation form is exempt on every equality operator. A single
11
+ negated operand is still reported.
7
12
  rule:
8
- any:
9
- - pattern: "!$A === $B"
10
- - pattern: "!$A !== $B"
11
- - pattern: "!$A == $B"
12
- - pattern: "!$A != $B"
13
+ all:
14
+ - any:
15
+ - pattern: "!$A === $B"
16
+ - pattern: "!$A !== $B"
17
+ - pattern: "!$A == $B"
18
+ - pattern: "!$A != $B"
19
+ - not:
20
+ any:
21
+ - pattern: "!$X === !$Y"
22
+ - pattern: "!$X !== !$Y"
23
+ - pattern: "!$X == !$Y"
24
+ - pattern: "!$X != !$Y"
@@ -4,9 +4,21 @@ severity: error
4
4
  message: "Negation before equality check — !a === b evaluates as (!a) === b, not !(a === b)"
5
5
  note: |
6
6
  Use !== instead of !a === b. Or write !(a === b) if you meant negated equality.
7
+
8
+ #5466: both operands negated (`!a === !b`) is a deliberate boolean
9
+ comparison of two negations, not a misspelled negated equality — the
10
+ double-negation form is exempt on every equality operator. A single
11
+ negated operand is still reported.
7
12
  rule:
8
- any:
9
- - pattern: "!$A === $B"
10
- - pattern: "!$A !== $B"
11
- - pattern: "!$A == $B"
12
- - pattern: "!$A != $B"
13
+ all:
14
+ - any:
15
+ - pattern: "!$A === $B"
16
+ - pattern: "!$A !== $B"
17
+ - pattern: "!$A == $B"
18
+ - pattern: "!$A != $B"
19
+ - not:
20
+ any:
21
+ - pattern: "!$X === !$Y"
22
+ - pattern: "!$X !== !$Y"
23
+ - pattern: "!$X == !$Y"
24
+ - pattern: "!$X != !$Y"
@@ -1,6 +1,6 @@
1
1
  id: unchecked-throwing-call-js
2
2
  language: JavaScript
3
- severity: error
3
+ severity: warning
4
4
  message: "$CALL without try/catch — throws on invalid input"
5
5
  note: |
6
6
  These calls throw on malformed input and should always be wrapped.
@@ -9,6 +9,13 @@ note: |
9
9
  new URL(): throws TypeError on invalid URL string
10
10
  execSync(): throws on non-zero exit code
11
11
 
12
+ LIMIT (why this rule reports below `error`, #5466): The check is lexical. A
13
+ call counts as checked when any enclosing `try` statement contains it,
14
+ whatever the function boundary and whichever block (try, catch or finally).
15
+ A `try` or `safe(() => …)` wrapper in a caller of the function is invisible,
16
+ so a handled call can still be reported and an unhandled one can be missed.
17
+ Read a hit as a prompt to verify the handling.
18
+
12
19
  ✅ WRAP IN TRY/CATCH:
13
20
  try {
14
21
  const data = JSON.parse(raw);
@@ -1,6 +1,6 @@
1
1
  id: unchecked-throwing-call
2
2
  language: TypeScript
3
- severity: error
3
+ severity: warning
4
4
  message: "$CALL without try/catch — throws on invalid input"
5
5
  note: |
6
6
  These calls throw on malformed input and should always be wrapped.
@@ -9,6 +9,13 @@ note: |
9
9
  new URL(): throws TypeError on invalid URL string
10
10
  execSync(): throws on non-zero exit code
11
11
 
12
+ LIMIT (why this rule reports below `error`, #5466): The check is lexical. A
13
+ call counts as checked when any enclosing `try` statement contains it,
14
+ whatever the function boundary and whichever block (try, catch or finally).
15
+ A `try` or `safe(() => …)` wrapper in a caller of the function is invisible,
16
+ so a handled call can still be reported and an unhandled one can be missed.
17
+ Read a hit as a prompt to verify the handling.
18
+
12
19
  ✅ WRAP IN TRY/CATCH:
13
20
  try {
14
21
  const data = JSON.parse(raw);
@@ -16,6 +16,12 @@ description: |
16
16
 
17
17
  ✅ FIX: compute the new state value in the loop, then call setState once after.
18
18
 
19
+ #5466: reported only for React context — a top-level ES `import` from the
20
+ react/preact family, or any JSX node. `require("react")`,
21
+ `import X = require("react")`, `export ... from "react"` and dynamic
22
+ `import()` do not count. A plain module's `setFoo` loop is a different idiom
23
+ and stays silent.
24
+
19
25
  query: |
20
26
  [
21
27
  (for_statement
@@ -32,6 +38,8 @@ query: |
32
38
  (#not-match? @BODY "set(Timeout|Interval|Immediate)"))
33
39
  ]
34
40
 
41
+ post_filter: has_react_context
42
+
35
43
  metavars:
36
44
  - BODY
37
45