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
@@ -0,0 +1,58 @@
1
+ /**
2
+ * The packed `.claude-plugin/plugin.json` carries the package's version; the tracked one carries the
3
+ * placeholder semantic-release leaves in `package.json`.
4
+ *
5
+ * 🔴 WHY THE VERSION MUST BE IN plugin.json. The marketplace installs the plugin from the npm package
6
+ * (`.claude-plugin/marketplace.json`, source `npm`). Measured 2026-11-22 (Claude Code 2.1.330): an
7
+ * npm-sourced plugin whose plugin.json and marketplace entry name no version is listed as version
8
+ * "unknown" — Claude Code does not read `package.json` — so neither a person nor `paperlint doctor`
9
+ * could tell which paperlint the plugin's skills and hooks belong to.
10
+ *
11
+ * `npm pack` and `npm publish` run `prepack` (stamp) and `postpack` (restore) around the tarball: by
12
+ * then `@semantic-release/npm` has written the release's version into `package.json`. A local pack
13
+ * of the placeholder stamps the placeholder, so nothing changes.
14
+ */
15
+ import { readFileSync, realpathSync, writeFileSync } from "node:fs";
16
+ import { dirname, join } from "node:path";
17
+ import { fileURLToPath } from "node:url";
18
+
19
+ /** The version the tracked files carry between releases. */
20
+ export const PLACEHOLDER = "0.0.0-semantically-released";
21
+
22
+ const ROOT = dirname(dirname(fileURLToPath(import.meta.url)));
23
+
24
+ /** A JSON object's text with its `version` set, in the file's own two-space form. */
25
+ export function withVersion(json: string, version: string): string {
26
+ const parsed: unknown = JSON.parse(json);
27
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed))
28
+ throw new Error("plugin.json is not a JSON object");
29
+ return `${JSON.stringify({ ...parsed, version }, null, 2)}\n`;
30
+ }
31
+
32
+ /** `stamp`: the package's version into plugin.json; `restore`: the placeholder back. */
33
+ export function main(verb: string | undefined, root: string = ROOT): number {
34
+ const plugin = join(root, ".claude-plugin", "plugin.json");
35
+ const pkg: unknown = JSON.parse(
36
+ readFileSync(join(root, "package.json"), "utf8"),
37
+ );
38
+ const version =
39
+ typeof pkg === "object" && pkg !== null && "version" in pkg
40
+ ? String(pkg.version)
41
+ : PLACEHOLDER;
42
+ const to =
43
+ verb === "stamp" ? version : verb === "restore" ? PLACEHOLDER : null;
44
+ if (to === null) {
45
+ console.error("usage: node scripts/plugin-version.ts stamp|restore");
46
+ return 2;
47
+ }
48
+ writeFileSync(plugin, withVersion(readFileSync(plugin, "utf8"), to));
49
+ return 0;
50
+ }
51
+
52
+ // Imports nothing of the package: `npm pack` runs this before anything else, in a tree it may not resolve.
53
+ const invoked = process.argv[1];
54
+ if (
55
+ invoked !== undefined &&
56
+ realpathSync(invoked) === realpathSync(fileURLToPath(import.meta.url))
57
+ )
58
+ process.exit(main(process.argv[2]));
package/skills/CLAUDE.md CHANGED
@@ -1,4 +1,4 @@
1
- <!-- vigiles:sha256:7c3a2ced786e9294 compiled from skills/CLAUDE.md.spec.ts -->
1
+ <!-- vigiles:sha256:dd8a735385fbcd2d compiled from skills/CLAUDE.md.spec.ts -->
2
2
 
3
3
  # CLAUDE.md
4
4
 
@@ -12,7 +12,7 @@ package's location come from `skills/paper-pipeline/scripts/consumer.mjs`; the l
12
12
 
13
13
  ### Skills Ship In Skills
14
14
 
15
- **Guidance only** — Skills ship in `skills/`, never `.claude/skills/`. `paperlint init` symlinks each one into the consumer's `.claude/skills/<name>`; the link's directory name is the skill's name. `skills/` is the npm layout: of 855 packages scanned, 336 shipped `skills/` against 15 `.claude/skills/`. Rejected: leaving the skills for Claude Code to find inside `node_modules` (`docs/install.md`); a symlink loads at startup, deterministically. A skill for working on paperlint itself (it edits this repository's presets, tests or source) does not ship: it lives in `.claude/skills/<name>/` as a real directory, outside `files`, and no shipped skill or user doc names it (`add-venue`).
15
+ **Guidance only** — Skills ship in `skills/`, never `.claude/skills/`. The Claude Code plugin carries `skills/` as it is (`.claude-plugin/plugin.json`); without the plugin, `paperlint init` symlinks each one into the consumer's `.claude/skills/<name>`, and the link's directory name is the skill's name. `skills/` is the npm layout: of 855 packages scanned, 336 shipped `skills/` against 15 `.claude/skills/`. Rejected: leaving the skills for Claude Code to find inside `node_modules` (`docs/install.md`); a symlink loads at startup, deterministically. A skill for working on paperlint itself (it edits this repository's presets, tests or source) does not ship: it lives in `.claude/skills/<name>/` as a real directory, outside `files`, and no shipped skill or user doc names it (`add-venue`).
16
16
 
17
17
  ### One Owner Per Job
18
18
 
@@ -34,7 +34,7 @@ ${file("src/link-skills.ts")}; install-specific paths are flagged by ${file("esl
34
34
  },
35
35
  rules: {
36
36
  "skills-ship-in-skills": guidance(
37
- "Skills ship in `skills/`, never `.claude/skills/`. `paperlint init` symlinks each one into the consumer's `.claude/skills/<name>`; the link's directory name is the skill's name. `skills/` is the npm layout: of 855 packages scanned, 336 shipped `skills/` against 15 `.claude/skills/`. Rejected: leaving the skills for Claude Code to find inside `node_modules` (`docs/install.md`); a symlink loads at startup, deterministically. A skill for working on paperlint itself (it edits this repository's presets, tests or source) does not ship: it lives in `.claude/skills/<name>/` as a real directory, outside `files`, and no shipped skill or user doc names it (`add-venue`).",
37
+ "Skills ship in `skills/`, never `.claude/skills/`. The Claude Code plugin carries `skills/` as it is (`.claude-plugin/plugin.json`); without the plugin, `paperlint init` symlinks each one into the consumer's `.claude/skills/<name>`, and the link's directory name is the skill's name. `skills/` is the npm layout: of 855 packages scanned, 336 shipped `skills/` against 15 `.claude/skills/`. Rejected: leaving the skills for Claude Code to find inside `node_modules` (`docs/install.md`); a symlink loads at startup, deterministically. A skill for working on paperlint itself (it edits this repository's presets, tests or source) does not ship: it lives in `.claude/skills/<name>/` as a real directory, outside `files`, and no shipped skill or user doc names it (`add-venue`).",
38
38
  ),
39
39
  "one-owner-per-job": guidance(
40
40
  `Each job on a paper's text has one owner skill, and the others hand over to it instead of carrying their own instructions for it: ${owners}. The owners are \`skills/jobs.ts\`; who hands work to whom is each skill's \`flow\`, drawn in \`docs/pipeline.md\` and checked by \`test/pipeline.test.ts\`. A skill that finds a problem it does not own names the owner and stops. A second copy of an owner's rule in another skill is a defect: two copies drift, and the reader follows whichever it read last.`,
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: argument-arc
3
3
  description: Build or repair the paper's argument architecture — the one-sentence-per-section outline, the bottom-up inevitability pass, and the name/number budget. Run it when the reader says the paper throws ideas at them, when a structural objection repeats, or before any large rewrite. Not a prose or length skill.
4
- allowed-tools: [Read, Write, Grep, Glob, Agent]
4
+ allowed-tools: [Read, Write, Grep, Glob, Bash, Agent]
5
5
  ---
6
6
 
7
- <!-- vigiles:sha256:3a416cbcd232144a compiled from skills/argument-arc/SKILL.md.spec.ts -->
7
+ <!-- vigiles:sha256:6a52098196a11a05 compiled from skills/argument-arc/SKILL.md.spec.ts -->
8
8
 
9
9
  # argument-arc — does the paper carry the reader to one conclusion
10
10
 
@@ -14,7 +14,7 @@ export default experimental_skill({
14
14
  name: "argument-arc",
15
15
  description:
16
16
  "Build or repair the paper's argument architecture — the one-sentence-per-section outline, the bottom-up inevitability pass, and the name/number budget. Run it when the reader says the paper throws ideas at them, when a structural objection repeats, or before any large rewrite. Not a prose or length skill.",
17
- tools: ["Read", "Write", "Grep", "Glob", "Agent"],
17
+ tools: ["Read", "Write", "Grep", "Glob", "Bash", "Agent"],
18
18
  body: `
19
19
  # argument-arc — does the paper carry the reader to one conclusion
20
20
 
@@ -1,15 +1,59 @@
1
1
  #!/usr/bin/env node
2
- /**
3
- * headings — every heading of a paper, in order (`headings-core.ts`); this file only runs it. A
4
- * consumer runs the compiled `headings.js` (Node strips no types under node_modules).
5
- *
6
- * Usage: node headings.js <paper.tex>
7
- */
8
- import { latexReader } from "#src/adapters/latex/index";
9
- import { nodeFiles } from "#src/adapters/node/index";
10
- import { sourcesCodec } from "#src/adapters/sources-record/index";
11
- import { main } from "./headings-core.js";
12
- process.exitCode = main(process.argv.slice(2), { files: nodeFiles, latex: latexReader, codec: sourcesCodec }, {
2
+ import { createRequire as __plCreateRequire } from "node:module";
3
+ import { fileURLToPath as __plFileURLToPath } from "node:url";
4
+ import { dirname as __plDirname } from "node:path";
5
+ const require = __plCreateRequire(import.meta.url);
6
+ const __filename = __plFileURLToPath(import.meta.url);
7
+ const __dirname = __plDirname(__filename);
8
+ import {
9
+ latexReader,
10
+ sourcesCodec
11
+ } from "../../../dist/skill-chunks/chunk-65X5HVIJ.js";
12
+ import {
13
+ callerPath,
14
+ decoded,
15
+ nodeFiles,
16
+ readPaper,
17
+ runText
18
+ } from "../../../dist/skill-chunks/chunk-6NU6CXUS.js";
19
+ import "../../../dist/skill-chunks/chunk-GRSXIWYF.js";
20
+ import "../../../dist/skill-chunks/chunk-NPQVDEE4.js";
21
+ import "../../../dist/skill-chunks/chunk-PJ4KNV4J.js";
22
+
23
+ // skills/argument-arc/scripts/headings-core.ts
24
+ import { resolve } from "node:path";
25
+ var headingsOf = (file, src, deps) => deps.latex.headings(readPaper(file, src, deps).text).filter((h) => h.command.kind === "heading" && h.argument === "title").map((h) => runText(h.title).replace(/\s+/gu, " ").trim());
26
+ var listing = (name, headings) => [
27
+ `=== ${name} \u2014 every heading, in order ===`,
28
+ ...headings.map((h, i) => `${String(i + 1).padStart(3)}. ${h}`),
29
+ "",
30
+ "Read these as a stranger who will read nothing else. Each should name a thing:",
31
+ 'a linter, a configuration, a repository, a rule \u2014 not "answers", "kinds", "moves".',
32
+ ""
33
+ ].join("\n");
34
+ function main(argv, deps, { out, err }) {
35
+ const [arg] = argv;
36
+ if (arg === void 0) {
37
+ err("usage: node headings.js <paper.tex>\n");
38
+ return 2;
39
+ }
40
+ const file = resolve(arg);
41
+ const src = decoded(deps.files.readBytes(callerPath(file)));
42
+ if (src === null) {
43
+ err(`headings: no file at ${file}
44
+ `);
45
+ return 2;
46
+ }
47
+ out(listing(arg, headingsOf(file, src, deps)));
48
+ return 0;
49
+ }
50
+
51
+ // skills/argument-arc/scripts/headings.ts
52
+ process.exitCode = main(
53
+ process.argv.slice(2),
54
+ { files: nodeFiles, latex: latexReader, codec: sourcesCodec },
55
+ {
13
56
  out: (s) => process.stdout.write(s),
14
- err: (s) => process.stderr.write(s),
15
- });
57
+ err: (s) => process.stderr.write(s)
58
+ }
59
+ );