paperlint 18.6.0 → 18.8.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 (165) hide show
  1. package/.claude-plugin/marketplace.json +11 -0
  2. package/.claude-plugin/plugin.json +7 -0
  3. package/CLAUDE.md +3 -3
  4. package/CONTRIBUTING.md +5 -2
  5. package/README.md +6 -6
  6. package/dist/adapters/clack/index.d.ts +3 -0
  7. package/dist/adapters/clack/index.d.ts.map +1 -0
  8. package/dist/adapters/clack/index.js +3 -0
  9. package/dist/adapters/clack/index.js.map +1 -0
  10. package/dist/adapters/clack/prompts.io.d.ts +8 -0
  11. package/dist/adapters/clack/prompts.io.d.ts.map +1 -0
  12. package/dist/adapters/clack/prompts.io.js +20 -0
  13. package/dist/adapters/clack/prompts.io.js.map +1 -0
  14. package/dist/adapters/claude-code/claude.io.d.ts +13 -0
  15. package/dist/adapters/claude-code/claude.io.d.ts.map +1 -0
  16. package/dist/adapters/claude-code/claude.io.js +68 -0
  17. package/dist/adapters/claude-code/claude.io.js.map +1 -0
  18. package/dist/adapters/claude-code/index.d.ts +4 -0
  19. package/dist/adapters/claude-code/index.d.ts.map +1 -0
  20. package/dist/adapters/claude-code/index.js +4 -0
  21. package/dist/adapters/claude-code/index.js.map +1 -0
  22. package/dist/adapters/claude-code/plugin.d.ts +19 -0
  23. package/dist/adapters/claude-code/plugin.d.ts.map +1 -0
  24. package/dist/adapters/claude-code/plugin.js +66 -0
  25. package/dist/adapters/claude-code/plugin.js.map +1 -0
  26. package/dist/adapters/package-manager/index.d.ts +4 -0
  27. package/dist/adapters/package-manager/index.d.ts.map +1 -0
  28. package/dist/adapters/package-manager/index.js +4 -0
  29. package/dist/adapters/package-manager/index.js.map +1 -0
  30. package/dist/adapters/package-manager/install.io.d.ts +3 -0
  31. package/dist/adapters/package-manager/install.io.d.ts.map +1 -0
  32. package/dist/adapters/package-manager/install.io.js +23 -0
  33. package/dist/adapters/package-manager/install.io.js.map +1 -0
  34. package/dist/adapters/package-manager/manager.d.ts +13 -0
  35. package/dist/adapters/package-manager/manager.d.ts.map +1 -0
  36. package/dist/adapters/package-manager/manager.js +22 -0
  37. package/dist/adapters/package-manager/manager.js.map +1 -0
  38. package/dist/adapters/study-registry/index.d.ts +2 -2
  39. package/dist/cli.d.ts +9 -1
  40. package/dist/cli.d.ts.map +1 -1
  41. package/dist/cli.js +73 -13
  42. package/dist/cli.js.map +1 -1
  43. package/dist/doctor-plugin.d.ts +23 -0
  44. package/dist/doctor-plugin.d.ts.map +1 -0
  45. package/dist/doctor-plugin.js +56 -0
  46. package/dist/doctor-plugin.js.map +1 -0
  47. package/dist/doctor.d.ts +6 -1
  48. package/dist/doctor.d.ts.map +1 -1
  49. package/dist/doctor.js +69 -26
  50. package/dist/doctor.js.map +1 -1
  51. package/dist/hooks-settings.d.ts +18 -0
  52. package/dist/hooks-settings.d.ts.map +1 -1
  53. package/dist/hooks-settings.js +25 -0
  54. package/dist/hooks-settings.js.map +1 -1
  55. package/dist/init.d.ts +47 -16
  56. package/dist/init.d.ts.map +1 -1
  57. package/dist/init.js +231 -86
  58. package/dist/init.js.map +1 -1
  59. package/dist/link-skills.d.ts +15 -0
  60. package/dist/link-skills.d.ts.map +1 -1
  61. package/dist/link-skills.js +18 -1
  62. package/dist/link-skills.js.map +1 -1
  63. package/dist/plugin-offer.d.ts +73 -0
  64. package/dist/plugin-offer.d.ts.map +1 -0
  65. package/dist/plugin-offer.js +96 -0
  66. package/dist/plugin-offer.js.map +1 -0
  67. package/dist/ports/claude-code.d.ts +31 -0
  68. package/dist/ports/claude-code.d.ts.map +1 -0
  69. package/dist/ports/claude-code.js +2 -0
  70. package/dist/ports/claude-code.js.map +1 -0
  71. package/dist/ports/project-install.d.ts +19 -0
  72. package/dist/ports/project-install.d.ts.map +1 -0
  73. package/dist/ports/project-install.js +2 -0
  74. package/dist/ports/project-install.js.map +1 -0
  75. package/dist/ports/prompts.d.ts +31 -0
  76. package/dist/ports/prompts.d.ts.map +1 -0
  77. package/dist/ports/prompts.js +2 -0
  78. package/dist/ports/prompts.js.map +1 -0
  79. package/dist/self-install.d.ts +65 -0
  80. package/dist/self-install.d.ts.map +1 -0
  81. package/dist/self-install.js +145 -0
  82. package/dist/self-install.js.map +1 -0
  83. package/dist/skill-chunks/chunk-65X5HVIJ.js +26462 -0
  84. package/dist/skill-chunks/chunk-6NU6CXUS.js +258 -0
  85. package/dist/skill-chunks/chunk-GRSXIWYF.js +352 -0
  86. package/dist/skill-chunks/chunk-IREAROCV.js +84 -0
  87. package/dist/skill-chunks/chunk-KWK6RT4T.js +24267 -0
  88. package/dist/skill-chunks/chunk-NPQVDEE4.js +19681 -0
  89. package/dist/skill-chunks/chunk-PJ4KNV4J.js +45 -0
  90. package/dist/skill-chunks/dist-UPCJMLBM.js +385 -0
  91. package/dist/skill-chunks/pdfjs-LUMEFOH2.js +39518 -0
  92. package/dist/types.d.ts +4 -0
  93. package/dist/types.d.ts.map +1 -1
  94. package/docs/e2e.md +10 -0
  95. package/docs/install.md +88 -29
  96. package/docs/prior-art/README.md +2 -0
  97. package/docs/prior-art/one-command-install.md +33 -0
  98. package/docs/prior-art/prompt-libraries.md +32 -0
  99. package/eslint.config.mjs +1 -0
  100. package/hooks/CLAUDE.md +2 -2
  101. package/hooks/CLAUDE.md.spec.ts +1 -1
  102. package/lib/skill-checks.mjs +13 -6
  103. package/lib/skill-checks.test.mjs +28 -15
  104. package/lib/skill-corpus.mjs +5 -2
  105. package/package.json +8 -3
  106. package/plugin/CLAUDE.md +22 -14
  107. package/plugin/CLAUDE.md.spec.ts +20 -12
  108. package/scripts/bundle-skills.test.ts +226 -0
  109. package/scripts/bundle-skills.ts +304 -0
  110. package/scripts/plugin-version.test.ts +80 -0
  111. package/scripts/plugin-version.ts +58 -0
  112. package/skills/CLAUDE.md +2 -2
  113. package/skills/CLAUDE.md.spec.ts +1 -1
  114. package/skills/argument-arc/SKILL.md +2 -2
  115. package/skills/argument-arc/SKILL.md.spec.ts +1 -1
  116. package/skills/argument-arc/scripts/headings.js +57 -13
  117. package/skills/build-label-page/scripts/label-page.js +2005 -93
  118. package/skills/cold-read-diff/scripts/cold-read.js +221 -14
  119. package/skills/label-agent-runs/scripts/labels.js +272 -348
  120. package/skills/paper-pipeline/references/anonymization.md +4 -3
  121. package/skills/paper-pipeline/scripts/extract-ref-facts.js +304 -0
  122. package/skills/pc-panel-review/scripts/prior-reviews.js +7244 -12
  123. package/skills/run-agent-grid/scripts/grid-guard.js +562 -627
  124. package/skills/submit-paper/SKILL.md +5 -4
  125. package/skills/submit-paper/SKILL.md.spec.ts +4 -3
  126. package/skills/submit-paper/check-deanon.sh +17 -2
  127. package/skills/submit-paper/check-deanon.test.ts +141 -0
  128. package/skills/verify-citations/SKILL.md +9 -9
  129. package/skills/verify-citations/SKILL.md.spec.ts +8 -8
  130. package/skills/verify-citations/scripts/bib-authors.js +228 -0
  131. package/skills/verify-citations/scripts/verify-cites.js +816 -0
  132. package/src/adapters/clack/index.ts +2 -0
  133. package/src/adapters/clack/prompts.io.ts +35 -0
  134. package/src/adapters/clack/prompts.test.ts +58 -0
  135. package/src/adapters/claude-code/claude.io.ts +103 -0
  136. package/src/adapters/claude-code/index.test.ts +233 -0
  137. package/src/adapters/claude-code/index.ts +11 -0
  138. package/src/adapters/claude-code/plugin.ts +82 -0
  139. package/src/adapters/package-manager/index.test.ts +67 -0
  140. package/src/adapters/package-manager/index.ts +3 -0
  141. package/src/adapters/package-manager/install.io.ts +27 -0
  142. package/src/adapters/package-manager/manager.ts +33 -0
  143. package/src/cli.harness.mjs +47 -26
  144. package/src/cli.test.ts +179 -2
  145. package/src/cli.ts +130 -10
  146. package/src/doctor-plugin.test.ts +103 -0
  147. package/src/doctor-plugin.ts +83 -0
  148. package/src/doctor.test.ts +111 -2
  149. package/src/doctor.ts +83 -32
  150. package/src/hooks-notice.test.ts +82 -0
  151. package/src/hooks-settings.ts +49 -0
  152. package/src/init-plugin.test.ts +178 -0
  153. package/src/init.test.ts +138 -27
  154. package/src/init.ts +341 -124
  155. package/src/link-skills.test.ts +34 -1
  156. package/src/link-skills.ts +34 -0
  157. package/src/parse-args.test.ts +2 -0
  158. package/src/plugin-offer.test.ts +276 -0
  159. package/src/plugin-offer.ts +160 -0
  160. package/src/ports/claude-code.ts +30 -0
  161. package/src/ports/project-install.ts +18 -0
  162. package/src/ports/prompts.ts +27 -0
  163. package/src/self-install.test.ts +267 -0
  164. package/src/self-install.ts +224 -0
  165. package/src/types.ts +4 -0
package/dist/types.d.ts CHANGED
@@ -56,6 +56,10 @@ export interface Args {
56
56
  yes: boolean;
57
57
  /** `--no-hooks`: `init` does not touch `.claude/settings.json`. */
58
58
  noHooks: boolean;
59
+ /** `--plugin`: `init` turns the Claude Code plugin on without asking. */
60
+ plugin: boolean;
61
+ /** `--no-plugin`: `init` neither asks about the plugin nor turns it on. */
62
+ noPlugin: boolean;
59
63
  /** `--paper <name>`: `init` creates this paper. */
60
64
  paper: string | null;
61
65
  /** `--venue <preset>` for `new`: a shipped preset name, or a path to the project's own. */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B;;;sCAGkC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sFAAsF;IACtF,SAAS,CAAC,EAAE,eAAe,GAAG,KAAK,GAAG,SAAS,CAAC;IAChD,iGAAiG;IACjG,KAAK,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;IAC7B,yFAAyF;IACzF,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qFAAqF;IACrF,QAAQ,CAAC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s/e2e.md CHANGED
@@ -72,6 +72,16 @@ that works under npm can be dead under pnpm with no error anywhere. The same run
72
72
  binary **directly** rather than through `node <path>`: under npm `.bin` holds a symlink, under
73
73
  pnpm a shell wrapper, and calling `node bin` measures the caller's habit instead of the package.
74
74
 
75
+ ## `test/e2e/install/skill-scripts.e2e.ts` — the skill scripts, with no `node_modules`
76
+
77
+ A Claude Code plugin copy is the tarball unpacked without its dependencies. This run packs the
78
+ package, unpacks it into an empty directory, reads every `node <path>` command from the shipped
79
+ `SKILL.md` files and starts each with no arguments and empty stdin. Its whole result (exit code,
80
+ stdout, stderr) must equal the same script's source run in this checkout, where its dependencies
81
+ resolve, and each command must be spelled `node ${CLAUDE_SKILL_DIR}/…`. Before the bundle step
82
+ (`scripts/bundle-skills.ts`, part of `npm run build`) all nine died with `ERR_MODULE_NOT_FOUND`.
83
+ It proves each script reaches its own argument handling; it does not run a real paper through them.
84
+
75
85
  ## `test/e2e/tex/build.e2e.ts` — a real `pdflatex`
76
86
 
77
87
  It copies `fixtures/build-e2e/` — nine papers, none with a build script paperlint would run — into
package/docs/install.md CHANGED
@@ -1,18 +1,27 @@
1
1
  # Installation
2
2
 
3
- This page covers what `npm i -D paperlint` and `npx paperlint init` set up, exactly what
4
- `init` writes, which package managers work, what the install weighs, and what to do when something
5
- is off. The README has the short version.
3
+ This page covers what `npx paperlint init` sets up, exactly what it writes, which package managers
4
+ work, what the install weighs, and what to do when something is off. The README has the short
5
+ version.
6
6
 
7
7
  ## Install
8
8
 
9
9
  ```sh
10
- npm i -D paperlint
11
10
  npx paperlint init
12
11
  ```
13
12
 
14
- Two commands in one terminal, in this order: `init` links the skills and hooks to the copy in
15
- your project's `node_modules`, so it needs the install first.
13
+ One command. When it runs from npx's cache rather than from your project, `init` first adds
14
+ paperlint to the project's devDependencies at its own version, saved exact
15
+ (`npm install --save-dev --save-exact paperlint@<version>`), so the command and the package cannot
16
+ drift. The package manager is the one your lockfile names (`package-lock.json`, `pnpm-lock.yaml`,
17
+ `yarn.lock`, `bun.lock`), npm when there is none. A project without a `package.json` gets a minimal
18
+ one (`private`, named after the folder), and `init` says so.
19
+
20
+ At a terminal it asks first, with Yes preselected; No stops `init` and prints the command to run
21
+ by hand. An agent, CI or `--yes` gets it added without a question, and the command is printed
22
+ before it runs. Already in the project: nothing is added. At another version than the `init` you
23
+ ran: `init` says which, keeps the installed one, and prints the command that would change it.
24
+ `npm i -D paperlint` followed by `npx paperlint init` still works the same way.
16
25
 
17
26
  The npm package carries everything: the `paperlint` command, the ESLint rules, the Claude Code skills
18
27
  and hooks, and the scripts the skills run. External programs are separate:
@@ -28,11 +37,16 @@ and hooks, and the scripts the skills run. External programs are separate:
28
37
 
29
38
  In order:
30
39
 
40
+ 0. **Adds paperlint to the project**, unless it is already there (above).
31
41
  1. **Finds the papers directory**, or asks for it when several directories look like one.
32
42
  2. **Declares it**, in a root `paperlint.json`, only when it is not the default `papers`. A project
33
43
  on the defaults gets no config file at all.
34
- 3. **Links each shipped skill** into `.claude/skills/<name>`, where Claude Code looks for skills.
35
- 4. **Writes the hook commands** into `.claude/settings.json`, beside your own entries.
44
+ 3. **Offers the Claude Code plugin**, which carries the skills and the hooks and is updated with
45
+ paperlint ([below](#the-claude-code-plugin)). Only where Claude Code is: a `.claude/` folder, or
46
+ `claude` on PATH; anywhere else it says nothing.
47
+ 4. **Without the plugin, links each shipped skill** into `.claude/skills/<name>` and **writes the
48
+ hook commands** into `.claude/settings.json`, beside your own entries. With the plugin on, it
49
+ removes the links and hook commands it made earlier, so nothing is listed or run twice.
36
50
  5. **Offers a GitHub Actions workflow** that runs `npm ci`, then the action from `node_modules`.
37
51
  6. **Offers a first paper** (`paperlint new`) if the papers directory has none.
38
52
  7. **Offers TeX Live** for `paperlint build` (`paperlint toolchain`, ~270 MB, ~3 min, once), with
@@ -42,23 +56,68 @@ In order:
42
56
  9. **Runs `paperlint doctor`** and exits with its verdict.
43
57
 
44
58
  It asks only what it cannot guess or what costs something. A human at a terminal is asked; an
45
- agent, CI or `--yes` takes the defaults, and `init` prints which default it took. An unanswered
46
- question (Ctrl+D) also takes the default.
59
+ agent, CI or `--yes` takes the defaults, and `init` prints which default it took. A question whose
60
+ input ends (Ctrl+D) takes the default; Ctrl+C stops `init` at that question, writes nothing after
61
+ it, and exits 130.
47
62
 
48
63
  ## What `paperlint init` writes
49
64
 
50
- | what | where | when |
51
- | -------------------------------------------------------------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
52
- | `{ "papersDir": … }` naming your papers directory | `paperlint.json` | only when it is not the default `papers` |
53
- | the six hook commands, merged in beside your own entries | `.claude/settings.json` | by default. A human at a terminal is asked [Y/n]; an agent, CI or `--yes` gets YES; `--no-hooks` skips. Hand-wired under another spelling: nothing written, so nothing runs twice |
54
- | a GitHub Actions workflow: `npm ci`, then `./node_modules/paperlint` | `.github/workflows/` | only if you say yes; it asks once, and only when a human is at a terminal (stdin and stdout, no `CI`, no `--yes`) |
55
- | a first paper, via `paperlint new`, with its layout's folders | `<papers>/<name>/` | only when the papers directory holds none: asked of a human at a terminal, otherwise only with `--paper <name>` |
56
- | one relative symlink per shipped skill, into the installed package | `.claude/skills/<name>` | always — except where that name is already taken (a directory, a file, a link elsewhere): that entry is left as it is and named in the report |
65
+ | what | where | when |
66
+ | -------------------------------------------------------------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
67
+ | `{ "papersDir": … }` naming your papers directory | `paperlint.json` | only when it is not the default `papers` |
68
+ | the six hook commands, merged in beside your own entries | `.claude/settings.json` | by default. A human at a terminal is asked (Yes preselected); an agent, CI or `--yes` gets YES; `--no-hooks` skips. Hand-wired under another spelling: nothing written, so nothing runs twice |
69
+ | a GitHub Actions workflow: `npm ci`, then `./node_modules/paperlint` | `.github/workflows/` | only if you say yes; it asks once, and only when a human is at a terminal (stdin and stdout, no `CI`, no `--yes`) |
70
+ | a first paper, via `paperlint new`, with its layout's folders | `<papers>/<name>/` | only when the papers directory holds none: asked of a human at a terminal, otherwise only with `--paper <name>` |
71
+ | one relative symlink per shipped skill, into the installed package | `.claude/skills/<name>` | always — except where that name is already taken (a directory, a file, a link elsewhere): that entry is left as it is and named in the report |
57
72
 
58
- It installs no software you did not say yes to, and touches nothing else. Commit `.claude/settings.json` so every clone
59
- gets the hooks; the hook commands run files inside `node_modules`, so a fresh clone needs
73
+ The last two rows are for a project without the plugin. Besides paperlint itself (step 0), it installs no software you did not say yes to, and touches nothing else. Commit `.claude/settings.json` so every clone
74
+ gets the hooks (or the plugin's declaration); the hook commands run files inside `node_modules`, so a fresh clone needs
60
75
  `npm install` first.
61
76
 
77
+ ## The Claude Code plugin
78
+
79
+ The plugin is optional: `paperlint lint`, the build and CI work without it. It carries the 23 skills
80
+ and the six hooks, and it is updated with the package: each release's plugin carries that release's
81
+ version.
82
+
83
+ At a terminal (shown as a terminal without Unicode draws it; others draw the same with Unicode marks):
84
+
85
+ ```text
86
+ |
87
+ * Turn on the paperlint plugin for Claude Code? (the skills and hooks, updated with paperlint)
88
+ | > Yes / No
89
+ ```
90
+
91
+ | how `init` runs | what happens |
92
+ | ---------------------------------------------------- | -------------------------------------------------------------------------------------------- |
93
+ | a human at a terminal | asked once, Yes preselected; No is kept, and `npx paperlint init --plugin` turns it on later |
94
+ | no human (`--yes`, CI, an agent such as Claude Code) | nothing turned on; one line says why and names `npx paperlint init --plugin` |
95
+ | `--plugin` | turned on without asking, with or without a terminal |
96
+ | `--no-plugin` | never asked, never turned on; the skills are linked and the hooks wired as before |
97
+
98
+ Without a human, the one line reads:
99
+
100
+ ```text
101
+ Claude Code plugin: not turned on — stdout is not a terminal, so nothing was asked. To turn it on: npx paperlint init --plugin
102
+ ```
103
+
104
+ **How it is turned on.** With `claude` on PATH, `init` runs Claude Code's own two commands in the
105
+ project: `claude plugin marketplace add zernie/paperlint --scope project` and
106
+ `claude plugin install paperlint@paperlint --scope project`. They declare the marketplace and the
107
+ plugin in `.claude/settings.json` (commit it, and every clone is offered the plugin) and fetch it.
108
+ Without `claude` on PATH, `init` writes the same two keys and prints the two commands to run once
109
+ where `claude` runs: the keys alone load nothing (measured: `claude plugin list` stays empty). Until
110
+ then the skill links and hook commands stay, and the next `npx paperlint init` where `claude` runs
111
+ completes the install without asking again.
112
+
113
+ **In a cloud session** (Claude Code on the web) the repository's settings alone download no plugin:
114
+ add the marketplace `zernie/paperlint` once in your claude.ai settings.
115
+
116
+ **An earlier install.** Re-run `npx paperlint init` (or `npx paperlint init --plugin` without a
117
+ terminal). Once the plugin is on, `init` removes the skill links and hook commands it made itself;
118
+ a skill directory or hook entry of your own stays. `paperlint doctor` names any left beside the
119
+ plugin, and a plugin whose version is not the installed paperlint's.
120
+
62
121
  ## Why it is shaped this way
63
122
 
64
123
  **One file, at the project root.** A vigiles hook cannot import code or walk up a tree looking for
@@ -74,15 +133,14 @@ is that _"the only valid use of install or preinstall scripts is for compilation
74
133
  its install script in 5.0.0 and Playwright in 1.38.0, because a failed install is cached and its
75
134
  output is hidden. An install that can fail quietly is worse than a step that says what it needs.
76
135
 
77
- **Hooks go into `.claude/settings.json`, not a plugin.** Claude Code documents that file as the
78
- way to share hooks with a team, `init` can write it, `paperlint doctor` can read it back, and it needs
79
- nothing installed inside Claude Code. A plugin fetched from npm gets no `node_modules` (`npm pack`
80
- strips the lockfile, and the host runs `npm ci` only when one is present), so it could not carry
81
- code that runs (probes: [`prior-art/repro/`](prior-art/repro/README.md); decision:
82
- [`prior-art/paper-folder-scaffolding.md`](prior-art/paper-folder-scaffolding.md) § 5). The package
83
- ships no plugin.
136
+ **The plugin carries no code of its own.** A plugin fetched from npm gets no `node_modules` (`npm pack`
137
+ strips the lockfile, and the host runs `npm ci` only when one is present; probes:
138
+ [`prior-art/repro/`](prior-art/repro/README.md)). So the skill scripts are bundled to run without
139
+ dependencies, and every hook command runs the project's installed
140
+ `node_modules/paperlint/bin/paperlint.mjs`. The plugin needs the npm package in the project; the
141
+ package does not need the plugin.
84
142
 
85
- **Skills are linked, not left in `node_modules`.** Claude Code finds project skills in
143
+ **Without the plugin, skills are linked, not left in `node_modules`.** Claude Code finds project skills in
86
144
  `.claude/skills/<name>/SKILL.md` and never inside `node_modules`. The links also make the
87
145
  project-relative script paths inside the skills (`.claude/skills/paper-pipeline/scripts/x.mjs`)
88
146
  resolve.
@@ -104,7 +162,8 @@ nothing while guarding and says nothing while watching a directory that does not
104
162
  unusable, the CLI and the hooks disagree on the papers directory, or the hooks are miswired: partly wired (some
105
163
  paperlint hooks present, others missing) or any hook wired twice. A hook set wired by hand under another spelling
106
164
  counts as wired. Not wired at all, a missing external program and an unlinked skill are printed and exit 0,
107
- because `--no-hooks` and the skills you do not use are choices.
165
+ because `--no-hooks` and the skills you do not use are choices. With the plugin on, the skills and
166
+ hooks count as carried by it.
108
167
 
109
168
  **After upgrading, the first paper edit tells you which hooks to wire and which skills to link.** `init` wires the hooks once, so a release
110
169
  that ships one more leaves a project that ran `init` earlier without it, and a release that ships a skill (16.8.0 added
@@ -119,7 +178,7 @@ directory holds is your choice, and `doctor` reports it. It is said once per ins
119
178
  `paper-skills-nudge`, `paper-status-gates`) and never by a PreToolUse hook, so it cannot change an allow or a deny;
120
179
  it never blocks, and an error while checking is one stderr line. `paperlint lint` prints the same finding as one
121
180
  stderr line on every run, without changing its exit code, and the GitHub action fails on it when `check-hooks` is
122
- set ([`ci.md`](ci.md)). Nothing is said about hooks when none is wired (`--no-hooks`) or the settings file cannot be read, and nothing about skills when all are linked or the package does not resolve from the project.
181
+ set ([`ci.md`](ci.md)). Nothing is said about hooks when none is wired (`--no-hooks`) or the settings file cannot be read, nothing about skills when all are linked or the package does not resolve from the project, and nothing at all while the plugin is on: it is updated with paperlint.
123
182
 
124
183
  ### How comparable tools install
125
184
 
@@ -27,6 +27,8 @@ be citable for each one separately.
27
27
  | [`paper-folder-scaffolding.md`](paper-folder-scaffolding.md) | who creates a paper folder, and who wires the hooks — a command or a human? | ship the template as a FILE and scaffold from it (`rpp new`); `init` writes the hooks into `.claude/settings.json` instead of printing `/plugin` lines |
28
28
  | [`citation-checkers.md`](citation-checkers.md) | could the reference check depend on an existing package, and how could it be faster? | no dependable package exists (all Python, mostly prototypes); keep the in-repo checker, and the speedups are batch endpoints (Semantic Scholar, OpenAlex) and a committed cache of responses |
29
29
  | [`edit-time-lint.md`](edit-time-lint.md) | how do tools report only the findings a change introduced? | each compares against a recorded before; none names the new finding for one edit, so the `lint-edited` hook keeps a per-finding snapshot and falls back to reviewdog's `added` lines |
30
+ | [`one-command-install.md`](one-command-install.md) | how does an initializer add its own package to the project? | as `npm init @eslint/config` does, but pinned to the running version, the manager read from the lockfile, a missing `package.json` created, and no question without a terminal |
31
+ | [`prompt-libraries.md`](prompt-libraries.md) | which library draws `paperlint init`'s questions? | `@clack/prompts`, pinned: the smallest maintained one with confirm, select, text and a cancel; Ctrl+C now stops init (exit 130) instead of taking the default |
30
32
  | [`hotcrp-option-types.md`](hotcrp-option-types.md) | which kinds of field can a HotCRP submission form hold, and which can `submission_fields` carry? | HotCRP's 15 option types read from its source (commit `0c03b263e3b4`); every one the API can set has a kind except file uploads (declared, never sent), author certification and section breaks |
31
33
 
32
34
  ## Tools examined, and for what
@@ -0,0 +1,33 @@
1
+ # How an initializer adds its own package to the project
2
+
3
+ `npx paperlint init` adds paperlint to the project it runs in, so the install is one command. The
4
+ model is ESLint's initializer, `npm init @eslint/config`.
5
+
6
+ ## What `@eslint/create-config` does
7
+
8
+ Read from the published package, `@eslint/create-config` 3.2.0 (`npm pack @eslint/create-config`,
9
+ 2026-11-22; source at https://github.com/eslint/create-config):
10
+
11
+ | step | what it does | where |
12
+ | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------- |
13
+ | no `package.json` | stops: "A package.json file is necessary to initialize ESLint. Run `npm init` to create a package.json file and try again." | `bin/create-config.js` |
14
+ | what it installs | `eslint` and the plugins the answers chose, unpinned, into devDependencies | `lib/config-generator.js`, `result.devDependencies` |
15
+ | asking | a toggle "Would you like to install them now?" with Yes preselected (`initial: 1`), then "Which package manager do you want to use?" npm/yarn/pnpm/bun | `lib/questions.js`, `installationQuestions` |
16
+ | the package manager | asked, never read from a lockfile; default npm | the same |
17
+ | the command | `spawn.sync(<manager>, [yarn ? "add" : "install", "-D", ...packages])` | `lib/utils/npm-utils.js`, `installSyncSaveDev` |
18
+ | No | writes the config anyway and warns "You will need to install the dependencies yourself." | `lib/config-generator.js`, `output()` |
19
+ | Ctrl+C | "Operation canceled", exit 1 | `bin/create-config.js` |
20
+ | without a terminal | no flag skips the questions | |
21
+
22
+ ## What paperlint does differently, and why
23
+
24
+ - **The version is pinned to the running one** (`paperlint@<version>`, saved exact). The command
25
+ that ran and the package it installed cannot drift; ESLint installs whatever is latest.
26
+ - **The package manager comes from the lockfile** (`package-lock.json`, `pnpm-lock.yaml`,
27
+ `yarn.lock`, `bun.lock` or `bun.lockb`), npm when there is none: the project already chose one.
28
+ - **A missing `package.json` is created** (`private: true`, the folder's name), and said in one
29
+ line: the paper repositories this is for are often not JavaScript projects.
30
+ - **Without a terminal it installs without asking**, printing the command: that is what running
31
+ `init` asked for. ESLint has no such path.
32
+ - **Already installed at another version**: said, and kept. Nothing is upgraded or downgraded
33
+ silently.
@@ -0,0 +1,32 @@
1
+ # Which library draws `paperlint init`'s questions
2
+
3
+ `paperlint init` asked its questions through `node:readline` until 2026-11-22, typed as
4
+ `[Y/n]` text. They now go through one port (`src/ports/prompts.ts`: a yes/no, a choice, a line of
5
+ text), drawn by `@clack/prompts` in `src/adapters/clack/`.
6
+
7
+ ## The candidates, measured 2026-11-22
8
+
9
+ Each package installed alone into an empty directory with npm; downloads from api.npmjs.org for the
10
+ week 2026-11-14 to 2026-11-20.
11
+
12
+ | package | version | packages installed | on disk | downloads a week | last release |
13
+ | ------------------- | ------- | ------------------ | ------- | ---------------- | ------------ |
14
+ | `@clack/prompts` | 1.9.0 | 6 | 336 KB | 48.6 M | 2026-11-09 |
15
+ | `@inquirer/prompts` | 8.8.0 | 27 | 1900 KB | 66.4 M | |
16
+ | `@inquirer/confirm` | 6.4.0 | 13 | 672 KB | | |
17
+ | `prompts` | 2.4.2 | 3 | 476 KB | 98.2 M | 2023-10 |
18
+ | `enquirer` | 2.4.1 | 4 | 424 KB | 50.9 M | 2023-07 |
19
+
20
+ **Chosen: `@clack/prompts`**, pinned. The smallest on disk of the maintained ones (`prompts` and
21
+ `enquirer` have not released since 2023), and it has the three questions init asks
22
+ (`confirm`, `select`, `text`) plus a cancel value (`isCancel`).
23
+
24
+ ## Two behaviours, measured on a pseudo-terminal
25
+
26
+ - **Ctrl+C.** Under readline, Ctrl+C at a question rejected it, the rejection was read as "no
27
+ answer", and the question's default was taken: a Ctrl+C at the hooks question wired the hooks,
28
+ and the run went on and exited 0. Under clack it is a cancel: init prints one line, writes nothing
29
+ after that question, and exits 130 (`CANCELLED_CODE` in `src/init.ts`).
30
+ - **Width.** Clack redraws a question by moving the cursor up as many lines as it drew. On a
31
+ pseudo-terminal with no size set it counted every character as a line (`ESC[2280A`), so a test
32
+ that drives it on a pseudo-terminal sets the window size first.
package/eslint.config.mjs CHANGED
@@ -252,6 +252,7 @@ export const IO_MODULES = [
252
252
  * (`IO_MODULES`).
253
253
  */
254
254
  export const TOOL_PACKAGES = [
255
+ "@clack/prompts", // the terminal questions of `paperlint init`
255
256
  "@eslint/markdown", // ESLint's Markdown language
256
257
  "@eslint/plugin-kit",
257
258
  "@retorquere/bibtex-parser", // BibTeX
package/hooks/CLAUDE.md CHANGED
@@ -1,4 +1,4 @@
1
- <!-- vigiles:sha256:0407b53b2036133e compiled from hooks/CLAUDE.md.spec.ts -->
1
+ <!-- vigiles:sha256:9ad080d516729f5e compiled from hooks/CLAUDE.md.spec.ts -->
2
2
 
3
3
  # CLAUDE.md
4
4
 
@@ -27,7 +27,7 @@ would undo it.
27
27
 
28
28
  ### One Wiring File
29
29
 
30
- **Guidance only** — The wiring is `plugin/hooks/hooks.json`. `paperlint init` merges it into the consumer's `.claude/settings.json`; there is no second copy.
30
+ **Guidance only** — The wiring is `plugin/hooks/hooks.json`. The Claude Code plugin ships it as its hooks, and `paperlint init` without the plugin merges it into the consumer's `.claude/settings.json`; there is no second copy.
31
31
 
32
32
  ### Vigiles Moves With The Consumer
33
33
 
@@ -21,7 +21,7 @@ would undo it.`,
21
21
  "`checkHookImports` (run by `hooks.harness.ts`) is a text regex. Describe a forbidden import in words; never write one, not even in a comment.",
22
22
  ),
23
23
  "one-wiring-file": guidance(
24
- "The wiring is `plugin/hooks/hooks.json`. `paperlint init` merges it into the consumer's `.claude/settings.json`; there is no second copy.",
24
+ "The wiring is `plugin/hooks/hooks.json`. The Claude Code plugin ships it as its hooks, and `paperlint init` without the plugin merges it into the consumer's `.claude/settings.json`; there is no second copy.",
25
25
  ),
26
26
  "vigiles-moves-with-the-consumer": guidance(
27
27
  "`vigiles` moves with the consumer's pin, in one pass. A major mismatch makes `PreToolUse` refuse every command. `npm ls vigiles` compares what is installed with the manifest, not with the registry; Dependabot (`.github/dependabot.yml`) carries the registry half.",
@@ -35,6 +35,8 @@ import {
35
35
  } from "../skills/paper-pipeline/scripts/consumer.mjs";
36
36
 
37
37
  const PIPELINE = pipelineScripts(scriptsRoot({ env: {}, cwd: ROOT }));
38
+ /** How a SKILL.md names its own directory in a command: Claude Code substitutes it wherever the skill is. */
39
+ const SKILL_DIR_VAR = "${CLAUDE_SKILL_DIR}/";
38
40
 
39
41
  /** How a skill names a file of the package's presets directory. */
40
42
  const PRESETS_PREFIX = "presets/";
@@ -113,15 +115,17 @@ export async function checkSkill(name) {
113
115
  // ═══════════════════════════════════════════════════════════════════════════════════════════════
114
116
  // 7. EVERY script path the skill instructs resolves.
115
117
  //
116
- // Scoped to paths that are unambiguously resolvable: `.claude/…` is repo-root-relative and
117
- // `scripts/…` is skill-relative (both conventions are used consistently across the corpus). Paths
118
+ // Scoped to paths that are unambiguously resolvable: `${CLAUDE_SKILL_DIR}/…` and `scripts/…`, both
119
+ // skill-relative. A `.claude/skills/…` path is not resolved here: under the plugin no such folder
120
+ // exists, and `port/md-install-path` flags it in the skill's text. A `.js` a skill runs is a build output
121
+ // (`npm run build`), so this checks the checkout as built. Paths
118
122
  // like `repro/build-submission.sh` are relative to a PAPER directory that does not exist at test
119
123
  // time, so they are excluded BY NAME rather than by a guess that would fire on correct text.
120
124
  // ═══════════════════════════════════════════════════════════════════════════════════════════════
121
125
  for (const s of skills) {
122
126
  for (const c of commands(s.src)) {
123
- const abs = c.script.startsWith(".claude/")
124
- ? join(ROOT, c.script)
127
+ const abs = c.script.startsWith(SKILL_DIR_VAR)
128
+ ? join(SKILLS_DIR, s.name, c.script.slice(SKILL_DIR_VAR.length))
125
129
  : c.script.startsWith("scripts/")
126
130
  ? join(SKILLS_DIR, s.name, c.script)
127
131
  : null;
@@ -144,8 +148,11 @@ export async function checkSkill(name) {
144
148
  // ═══════════════════════════════════════════════════════════════════════════════════════════════
145
149
  for (const s of skills) {
146
150
  for (const c of commands(s.src)) {
147
- // The pipeline's own scripts; any other command is the consumer's business.
148
- if (!c.script.startsWith(PIPELINE.prefix)) continue;
151
+ // The pipeline's own scripts, by either spelling; any other command is the consumer's business.
152
+ const own =
153
+ c.script.startsWith(PIPELINE.prefix) ||
154
+ c.script.startsWith(SKILL_DIR_VAR);
155
+ if (!own) continue;
149
156
  soft(() =>
150
157
  assert.ok(
151
158
  s.tools.some((t) => permits(t, c.cmd)),
@@ -186,7 +186,7 @@ test("checkSkill reports EVERY finding at once: a renamed skill with no descript
186
186
 
187
187
  test("checkSkill refuses an instructed script that does not exist", async () => {
188
188
  const lines = await brokenBy("verify-citations", (s) =>
189
- s.replaceAll("scripts/extract-ref-facts.mjs", "scripts/missing.mjs"),
189
+ s.replaceAll("scripts/extract-ref-facts.js", "scripts/missing.js"),
190
190
  );
191
191
  assert.equal(
192
192
  lines?.[0],
@@ -194,7 +194,22 @@ test("checkSkill refuses an instructed script that does not exist", async () =>
194
194
  );
195
195
  assert.match(
196
196
  lines?.[1] ?? "",
197
- /instructs `node .*missing\.mjs.*` but .*missing\.mjs does not exist/,
197
+ /instructs `node .*missing\.js.*` but .*missing\.js does not exist/,
198
+ );
199
+ });
200
+
201
+ test("checkSkill resolves a bare scripts/ path from the skill's own directory", async () => {
202
+ const spelled = (path) => (s) =>
203
+ s.replaceAll("${CLAUDE_SKILL_DIR}/scripts/bib-authors.js", path);
204
+ // Guards: a bare path to a script the skill has is accepted.
205
+ assert.equal(
206
+ await brokenBy("verify-citations", spelled("scripts/bib-authors.mjs")),
207
+ null,
208
+ );
209
+ // Guards: a bare path to a script it lacks is refused, once per line that names it.
210
+ assert.deepEqual(
211
+ (await brokenBy("verify-citations", spelled("scripts/missing.js")))?.[0],
212
+ '2 assertion(s) failed for skill "verify-citations":',
198
213
  );
199
214
  });
200
215
 
@@ -209,41 +224,39 @@ test("checkSkill refuses a pipeline script the skill's allowed-tools do not perm
209
224
  .join(", ")}]`,
210
225
  ),
211
226
  );
227
+ // Guards: each of the seven `node ${CLAUDE_SKILL_DIR}/…` lines is named, the first one first.
212
228
  assert.equal(
213
229
  lines?.[0],
214
- '2 assertion(s) failed for skill "verify-citations":',
230
+ '7 assertion(s) failed for skill "verify-citations":',
215
231
  );
216
232
  assert.match(
217
233
  lines?.[1] ?? "",
218
- /extract-ref-facts\.mjs.* permit no such Bash command/,
234
+ /verify-cites\.js.* permit no such Bash command/,
219
235
  );
220
236
  });
221
237
 
222
- test("a Bash entry narrowed to the instructed script permits it, and one narrowed elsewhere does not", async () => {
223
- const narrowTo = (script) => (s) =>
238
+ test("a Bash entry that covers the instructed scripts permits them, and one narrowed to another does not", async () => {
239
+ const narrowTo = (pattern) => (s) =>
224
240
  s.replace(
225
241
  /^allowed-tools: \[(.*)\]$/m,
226
242
  (_, list) =>
227
243
  `allowed-tools: [${list
228
244
  .split(", ")
229
245
  .map((t) =>
230
- t === "Bash"
231
- ? `"Bash(node .claude/skills/paper-pipeline/scripts/${script}:*)"`
232
- : t,
246
+ t === "Bash" ? `"Bash(node \${CLAUDE_SKILL_DIR}/${pattern}:*)"` : t,
233
247
  )
234
248
  .join(", ")}]`,
235
249
  );
236
- assert.equal(
237
- await brokenBy("verify-citations", narrowTo("extract-ref-facts.mjs")),
238
- null,
239
- );
250
+ // Guards: an entry that covers the skill's own scripts permits all seven commands.
251
+ assert.equal(await brokenBy("verify-citations", narrowTo("*")), null);
240
252
  const lines = await brokenBy(
241
253
  "verify-citations",
242
- narrowTo("generated-code.mjs"),
254
+ narrowTo("../paper-pipeline/scripts/extract-ref-facts.js"),
243
255
  );
256
+ // Guards: narrowed to one script, the other five commands (verify-cites.js, bib-authors.js) are named.
244
257
  assert.equal(
245
258
  lines?.[0],
246
- '2 assertion(s) failed for skill "verify-citations":',
259
+ '5 assertion(s) failed for skill "verify-citations":',
247
260
  );
248
261
  assert.match(lines?.[1] ?? "", /permit no such Bash command/);
249
262
  });
@@ -129,11 +129,14 @@ export function permits(entry, cmd) {
129
129
  return rx.test(cmd);
130
130
  }
131
131
 
132
- /** Every `node|bash|python3 <script>` line the SKILL.md instructs, with its full command text. */
132
+ /**
133
+ * Every `node|bash|python3 <script>` line the SKILL.md instructs, with its full command text. The
134
+ * script may start with `${CLAUDE_SKILL_DIR}/`, the skill's own directory wherever it is installed.
135
+ */
133
136
  export function commands(src) {
134
137
  return [
135
138
  ...src.matchAll(
136
- /^\s*(node|bash|python3?) +([A-Za-z0-9_./@-]+\.(?:mjs|js|sh|py))(.*)$/gm,
139
+ /^\s*(node|bash|python3?) +((?:\$\{CLAUDE_SKILL_DIR\}\/)?[A-Za-z0-9_./@-]+\.(?:mjs|js|sh|py))(.*)$/gm,
137
140
  ),
138
141
  ].map((m) => ({
139
142
  runner: m[1],
package/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "paperlint",
3
- "version": "18.6.0",
3
+ "version": "18.8.0",
4
4
  "description": "A linter for scientific papers written in LaTeX: catches mistakes before you submit to a conference or journal.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {
8
- "build": "tsc -b",
9
- "prepare": "tsc -b",
8
+ "build": "tsc -b && node scripts/bundle-skills.ts",
9
+ "prepare": "tsc -b && node scripts/bundle-skills.ts",
10
+ "prepack": "node scripts/plugin-version.ts stamp",
11
+ "postpack": "node scripts/plugin-version.ts restore",
10
12
  "test": "node scripts/test.ts",
11
13
  "test:e2e": "vitest run --project 'e2e-*'",
12
14
  "test:e2e:install": "vitest run --project e2e-install",
@@ -23,6 +25,7 @@
23
25
  "site:build": "npm ci --prefix site && npm run lint --prefix site && npm run typecheck --prefix site && npm run test --prefix site && npm run build --prefix site"
24
26
  },
25
27
  "dependencies": {
28
+ "@clack/prompts": "1.9.0",
26
29
  "@eslint/markdown": "^8.0.3",
27
30
  "@eslint/plugin-kit": "^0.7.2",
28
31
  "@retorquere/bibtex-parser": "^10.0.1",
@@ -56,6 +59,7 @@
56
59
  "c8": "^12.0.0",
57
60
  "conventional-changelog-conventionalcommits": "9.3.1",
58
61
  "dependency-graph": "^1.0.0",
62
+ "esbuild": "0.28.2",
59
63
  "eslint-import-resolver-typescript": "^4.4.5",
60
64
  "eslint-plugin-boundaries": "^7.2.0",
61
65
  "eslint-plugin-functional": "^10.0.1",
@@ -112,6 +116,7 @@
112
116
  "./*": "./*"
113
117
  },
114
118
  "files": [
119
+ ".claude-plugin",
115
120
  ".github",
116
121
  "CLAUDE.md",
117
122
  "CONTRIBUTING.md",
package/plugin/CLAUDE.md CHANGED
@@ -1,22 +1,30 @@
1
- <!-- vigiles:sha256:6312a3b8f9804eba compiled from plugin/CLAUDE.md.spec.ts -->
1
+ <!-- vigiles:sha256:357f503e21646c81 compiled from plugin/CLAUDE.md.spec.ts -->
2
2
 
3
3
  # CLAUDE.md
4
4
 
5
5
  ## `plugin/`
6
6
 
7
- Not a plugin any more. `plugin/hooks/hooks.json` is the hook wiring that `paperlint init` merges
8
- into the consumer's `.claude/settings.json`, and it is the only source of that wiring.
7
+ `plugin/hooks/hooks.json` is the one hook wiring. The Claude Code plugin
8
+ (`.claude-plugin/plugin.json`) ships it as its hooks, and `paperlint init --no-plugin` merges the
9
+ same file into the consumer's `.claude/settings.json`. Every command in it runs the project's installed
10
+ `node_modules/paperlint/bin/paperlint.mjs`: the plugin carries the skills and the hooks, the npm package
11
+ carries the code, and `paperlint lint` works without the plugin.
9
12
 
10
- ## Why there is no Claude Code plugin
13
+ ## Why the plugin came back
11
14
 
12
- There is no Claude Code plugin or marketplace entry; it was removed in the release after 1.0.0
13
- (#82). Do not bring it back without answering each of these, measured (`docs/install.md`,
14
- "Why it is shaped this way"):
15
+ The plugin was removed after 1.0.0 (#82) on three objections. Each now has a measured answer
16
+ (2026-11-22); bring none of them back as a reason without measuring again:
15
17
 
16
- - **A plugin cannot carry the code.** Claude Code installs a plugin's dependencies with a 60-second
17
- timeout, and a failed install never blocks the plugin: the hooks load and fail with
18
- `cannot find module vigiles`, silently.
19
- - **The skills need the npm package anyway.** 23 of 24 skills ran scripts that resolve only through
20
- `node_modules/paperlint/`.
21
- - **Its manifests carried versions nothing updated**, and Claude Code decides plugin updates from
22
- that number.
18
+ - **"A plugin cannot carry the code."** It does not have to. The skill scripts are bundled
19
+ (`scripts/bundle-skills.ts`, #624) and run from a copy of the package with no `node_modules`; the
20
+ hooks call the project's installed paperlint. Installing the plugin from the marketplace took 16.7 s.
21
+ - **"The skills need the npm package anyway."** Only the hooks do, and they find it in the project.
22
+ - **"Its manifests carried versions nothing updated."** The marketplace installs from the npm package,
23
+ and `npm pack` stamps the package's version into the packed `plugin.json`
24
+ (`scripts/plugin-version.ts`); the tracked file keeps the placeholder. Without a version there,
25
+ Claude Code lists the plugin's version as "unknown".
26
+
27
+ Turning it on is `claude`'s own two commands (`src/adapters/claude-code/claude.io.ts`): writing
28
+ `enabledPlugins` and `extraKnownMarketplaces` by hand left `claude plugin list` empty. Repository
29
+ settings alone download nothing in a cloud session either: the user adds the marketplace once in
30
+ their claude.ai settings.