paperlint 18.9.0 → 19.0.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 (56) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CLAUDE.md +7 -1
  3. package/dist/skill-chunks/{chunk-NPQVDEE4.js → chunk-4MHEJ6FR.js} +50 -1
  4. package/dist/skill-chunks/{chunk-KWK6RT4T.js → chunk-EOVEVX67.js} +1 -1
  5. package/dist/skill-chunks/{chunk-65X5HVIJ.js → chunk-UL4INX2P.js} +1 -1
  6. package/lib/skill-corpus.mjs +2 -113
  7. package/lib/skill-corpus.test.mjs +10 -11
  8. package/package.json +4 -3
  9. package/presets/agentverify-2027.jsonc +12 -6
  10. package/presets/agentverify-2027.md +11 -7
  11. package/presets/aidc-2026.jsonc +4 -4
  12. package/presets/aidc-2026.md +4 -0
  13. package/presets/nlbse-2027.jsonc +11 -6
  14. package/presets/nlbse-2027.md +7 -7
  15. package/scripts/harness-api.frozen.json +0 -18
  16. package/scripts/sync-skills.test.ts +69 -0
  17. package/scripts/sync-skills.ts +57 -0
  18. package/skills/argument-arc/scripts/headings.js +2 -2
  19. package/skills/build-label-page/build-label-page.test.ts +2 -7
  20. package/skills/build-label-page/scripts/label-page.js +1 -1
  21. package/skills/cold-read-diff/scripts/cold-read.js +2 -2
  22. package/skills/harden-paper/check-numbers.test.ts +104 -0
  23. package/skills/harden-paper/check-release-claims.test.ts +126 -0
  24. package/skills/label-agent-runs/label-agent-runs.harness.ts +2 -6
  25. package/skills/label-agent-runs/scripts/labels.js +1 -1
  26. package/skills/paper-pipeline/scripts/extract-ref-facts.js +3 -3
  27. package/skills/pc-panel-review/scripts/prior-reviews.js +1 -1
  28. package/skills/render-paper/render-paper.harness.mjs +153 -0
  29. package/skills/rewrite-unclear/rewrite-unclear.harness.ts +0 -5
  30. package/skills/run-agent-grid/run-agent-grid.harness.ts +2 -6
  31. package/skills/run-agent-grid/scripts/grid-guard.js +1 -1
  32. package/skills/submit-paper/check-deanon.test.ts +165 -0
  33. package/skills/verify-citations/scripts/bib-authors.js +3 -3
  34. package/skills/verify-citations/scripts/verify-cites.js +3 -3
  35. package/src/edition-rule.test.ts +16 -12
  36. package/lib/skill-checks.d.mts +0 -10
  37. package/lib/skill-checks.mjs +0 -403
  38. package/lib/skill-checks.test.mjs +0 -288
  39. package/skills/analyze-sibling-paper/analyze-sibling-paper.harness.mjs +0 -23
  40. package/skills/argument-arc/argument-arc.harness.mjs +0 -23
  41. package/skills/build-benchmark/build-benchmark.harness.mjs +0 -23
  42. package/skills/camera-ready/camera-ready.harness.mjs +0 -23
  43. package/skills/cold-read-diff/cold-read-diff.harness.mjs +0 -21
  44. package/skills/draft-paper/draft-paper.harness.mjs +0 -23
  45. package/skills/extend-paper/extend-paper.harness.mjs +0 -23
  46. package/skills/find-venue/find-venue.harness.mjs +0 -23
  47. package/skills/harden-paper/harden-paper.harness.mjs +0 -23
  48. package/skills/map-prior-work/map-prior-work.harness.mjs +0 -23
  49. package/skills/paper-status/paper-status.harness.mjs +0 -25
  50. package/skills/pc-panel-review/pc-panel-review.harness.mjs +0 -24
  51. package/skills/plan-paper-timeline/plan-paper-timeline.harness.mjs +0 -23
  52. package/skills/research-ideate/research-ideate.harness.mjs +0 -23
  53. package/skills/study-accepted-papers/study-accepted-papers.harness.mjs +0 -23
  54. package/skills/submit-paper/submit-paper.harness.mjs +0 -23
  55. package/skills/tighten-paper/tighten-paper.harness.mjs +0 -23
  56. package/skills/verify-citations/verify-citations.harness.mjs +0 -23
@@ -139,3 +139,168 @@ describe("check-deanon.sh — both halves of the scan", () => {
139
139
  });
140
140
  });
141
141
  });
142
+
143
+ const python = (code: string, ...args: readonly string[]) =>
144
+ spawnSync("python3", ["-W", "ignore", "-c", code, ...args], {
145
+ encoding: "utf8",
146
+ });
147
+ const havePython = python("").status === 0;
148
+ const havePymupdf = havePython && python("import fitz").status === 0;
149
+
150
+ /** A one-page PDF at `path` whose text is `text`. */
151
+ const writePdf = (path: string, text: string): void => {
152
+ const r = python(
153
+ "import sys,fitz\nd=fitz.open()\np=d.new_page()\np.insert_text((72,72),sys.argv[2])\nd.save(sys.argv[1])",
154
+ path,
155
+ text,
156
+ );
157
+ expect(r.status).toBe(0);
158
+ };
159
+
160
+ /** An `artifact.zip` at `path` holding the given members. */
161
+ const writeZip = (path: string, members: Record<string, string>): void => {
162
+ const r = python(
163
+ "import sys,json,zipfile\nwith zipfile.ZipFile(sys.argv[1],'w') as f:\n [f.writestr(k,v) for k,v in json.loads(sys.argv[2]).items()]",
164
+ path,
165
+ JSON.stringify(members),
166
+ );
167
+ expect(r.status).toBe(0);
168
+ };
169
+
170
+ describe("check-deanon.sh — what the deny-list matches", () => {
171
+ const list =
172
+ "# fake identity\nquillfeather\n\\bmoss\\b\ngithub\\.com/quillfeather\n";
173
+
174
+ it("a word-boundary entry does not match ordinary prose that contains the word", () => {
175
+ const { root, paper } = project(
176
+ "The mossy-green plots in Figure 3 come from run.sh.",
177
+ );
178
+ mkdirSync(join(root, ".paperlint"));
179
+ writeFileSync(join(root, ".paperlint", "deanon-denylist.txt"), list);
180
+ expect(run([paper], { env: { CLAUDE_PROJECT_DIR: root } }).status).toBe(0);
181
+ });
182
+
183
+ it("a file whose extension no list names (.yml) is scanned like any other", () => {
184
+ const { root, paper } = project("Authors omitted for double-blind review.");
185
+ mkdirSync(join(root, ".paperlint"));
186
+ writeFileSync(join(root, ".paperlint", "deanon-denylist.txt"), list);
187
+ writeFileSync(
188
+ join(paper, "artifact", "config.yml"),
189
+ "maintainer: quillfeather\nrepo: github.com/quillfeather/toolkit\n",
190
+ );
191
+ const { status, stdout } = run([paper], {
192
+ env: { CLAUDE_PROJECT_DIR: root },
193
+ });
194
+ expect({
195
+ status,
196
+ leaks: stdout.split("\n").filter((l) => l.includes("LEAK")),
197
+ }).toEqual({
198
+ status: 1,
199
+ leaks: [
200
+ " LEAK artifact/config.yml:1:maintainer: quillfeather",
201
+ " LEAK artifact/config.yml:2:repo: github.com/quillfeather/toolkit",
202
+ ],
203
+ });
204
+ });
205
+ });
206
+
207
+ describe("check-deanon.sh — the bundle that gets uploaded", () => {
208
+ it.skipIf(!havePython)(
209
+ "a leak that exists only inside artifact.zip names the zip and the member",
210
+ () => {
211
+ const { root, paper } = project(
212
+ "Authors omitted for double-blind review.",
213
+ );
214
+ const deny = denyList(join(root, "deny.txt"));
215
+ writeZip(join(paper, "artifact.zip"), {
216
+ "artifact/README.md": "Authors omitted for double-blind review.\n",
217
+ "artifact/METADATA.txt": "upstream: by Quillfeather\n",
218
+ });
219
+ expect(run([paper, "paper.pdf", deny]).stdout).toContain(
220
+ " LEAK artifact.zip!artifact/METADATA.txt:1:upstream: by Quillfeather\n",
221
+ );
222
+ expect(run([paper, "paper.pdf", deny]).status).toBe(1);
223
+ },
224
+ );
225
+ });
226
+
227
+ describe("check-deanon.sh — a deny-list that cannot protect anything", () => {
228
+ it("a named deny-list that does not exist is exit 2, never a pass", () => {
229
+ const { root, paper } = project("by Quillfeather");
230
+ const missing = join(root, "does-not-exist.txt");
231
+ expect(run([paper, "paper.pdf", missing])).toEqual({
232
+ status: 2,
233
+ stdout: `FAIL: no deny-list ${missing}\n`,
234
+ });
235
+ });
236
+
237
+ it("a deny-list that is all comments is exit 2, never a pass", () => {
238
+ const { root, paper } = project("by Quillfeather");
239
+ const named = join(root, "deny.txt");
240
+ writeFileSync(
241
+ named,
242
+ "# emptied while chasing a false positive\n#quillfeather\n\n",
243
+ );
244
+ expect(run([paper, "paper.pdf", named])).toEqual({
245
+ status: 2,
246
+ stdout: `FAIL: deny-list ${named} has no patterns\n`,
247
+ });
248
+ });
249
+ });
250
+
251
+ describe("check-deanon.sh — the compiled PDF", () => {
252
+ it("an absent PDF is a warning, not silence", () => {
253
+ const { root, paper } = project("Authors omitted.");
254
+ const deny = denyList(join(root, "deny.txt"));
255
+ expect(run([paper, "nonexistent.pdf", deny]).stdout).toBe(
256
+ [
257
+ `== check-deanon: ${paper} (pdf=nonexistent.pdf, 1 patterns) ==`,
258
+ ` WARN: ${paper}/nonexistent.pdf not found — PDF not scanned`,
259
+ "-- summary: 0 identifier hit(s) across PDF + artifact + zip",
260
+ "PASS: no author-identifying strings found. Safe for double-blind.",
261
+ "",
262
+ ].join("\n"),
263
+ );
264
+ });
265
+
266
+ it("a PDF that cannot be read is a warning, not a pass about a document never opened", () => {
267
+ const { root, paper } = project("Authors omitted.");
268
+ const deny = denyList(join(root, "deny.txt"));
269
+ writeFileSync(join(paper, "paper.pdf"), "%PDF-1.4\n% not a real pdf\n");
270
+ expect(run([paper, "paper.pdf", deny]).stdout).toContain(
271
+ " WARN: could not extract PDF text (pymupdf missing?) — PDF not scanned\n",
272
+ );
273
+ });
274
+
275
+ it.skipIf(!havePymupdf)(
276
+ "an identifier compiled into the PDF text is a leak naming the PDF",
277
+ () => {
278
+ const { root, paper } = project("Authors omitted.");
279
+ const deny = denyList(join(root, "deny.txt"));
280
+ writePdf(
281
+ join(paper, "paper.pdf"),
282
+ "Anonymous submission. Tooling: Quillfeather-kit.",
283
+ );
284
+ const { status, stdout } = run([paper, "paper.pdf", deny]);
285
+ expect({
286
+ status,
287
+ leaks: stdout.split("\n").filter((l) => l.includes("LEAK")),
288
+ }).toEqual({
289
+ status: 1,
290
+ leaks: [
291
+ " LEAK PDF[paper.pdf]:1:Anonymous submission. Tooling: Quillfeather-kit.",
292
+ ],
293
+ });
294
+ },
295
+ );
296
+
297
+ it.skipIf(!havePymupdf)("a PDF with no identifier in it passes", () => {
298
+ const { root, paper } = project("Authors omitted.");
299
+ const deny = denyList(join(root, "deny.txt"));
300
+ writePdf(
301
+ join(paper, "paper.pdf"),
302
+ "Anonymous submission. Tooling: REDACTED for review.",
303
+ );
304
+ expect(run([paper, "paper.pdf", deny]).status).toBe(0);
305
+ });
306
+ });
@@ -10,18 +10,18 @@ import {
10
10
  bibliographyAt,
11
11
  bibliographyUnreadWhy,
12
12
  isMain
13
- } from "../../../dist/skill-chunks/chunk-KWK6RT4T.js";
13
+ } from "../../../dist/skill-chunks/chunk-EOVEVX67.js";
14
14
  import {
15
15
  latexReader,
16
16
  sourcesCodec
17
- } from "../../../dist/skill-chunks/chunk-65X5HVIJ.js";
17
+ } from "../../../dist/skill-chunks/chunk-UL4INX2P.js";
18
18
  import "../../../dist/skill-chunks/chunk-IREAROCV.js";
19
19
  import {
20
20
  absolutePath,
21
21
  nodeFiles
22
22
  } from "../../../dist/skill-chunks/chunk-6NU6CXUS.js";
23
23
  import "../../../dist/skill-chunks/chunk-GRSXIWYF.js";
24
- import "../../../dist/skill-chunks/chunk-NPQVDEE4.js";
24
+ import "../../../dist/skill-chunks/chunk-4MHEJ6FR.js";
25
25
  import "../../../dist/skill-chunks/chunk-PJ4KNV4J.js";
26
26
 
27
27
  // skills/verify-citations/scripts/bib-authors.mjs
@@ -11,18 +11,18 @@ import {
11
11
  bibliographyUnreadWhy,
12
12
  consumerContactEmail,
13
13
  isMain
14
- } from "../../../dist/skill-chunks/chunk-KWK6RT4T.js";
14
+ } from "../../../dist/skill-chunks/chunk-EOVEVX67.js";
15
15
  import {
16
16
  latexReader,
17
17
  sourcesCodec
18
- } from "../../../dist/skill-chunks/chunk-65X5HVIJ.js";
18
+ } from "../../../dist/skill-chunks/chunk-UL4INX2P.js";
19
19
  import "../../../dist/skill-chunks/chunk-IREAROCV.js";
20
20
  import {
21
21
  absolutePath,
22
22
  nodeFiles
23
23
  } from "../../../dist/skill-chunks/chunk-6NU6CXUS.js";
24
24
  import "../../../dist/skill-chunks/chunk-GRSXIWYF.js";
25
- import "../../../dist/skill-chunks/chunk-NPQVDEE4.js";
25
+ import "../../../dist/skill-chunks/chunk-4MHEJ6FR.js";
26
26
  import "../../../dist/skill-chunks/chunk-PJ4KNV4J.js";
27
27
 
28
28
  // skills/verify-citations/scripts/verify-cites.mjs
@@ -1,7 +1,7 @@
1
1
  /**
2
- * `paper/edition-over` (`src/edition-rule.ts`) on papers held in memory beside the SHIPPED presets,
3
- * with the clock fixed: the warning when every deadline of the paper's edition has passed, naming
4
- * the newer editions of its series; silence while one is still ahead, and with nothing to judge.
2
+ * `paper/edition-over` (`src/edition-rule.ts`) on papers held in memory beside the preset catalog,
3
+ * with the clock and AIDC's deadlines fixed. The rule warns when every deadline has passed and names
4
+ * newer editions of the same series. It is silent while a deadline is ahead or no deadline is recorded.
5
5
  */
6
6
  import { readdirSync, readFileSync } from "node:fs";
7
7
  import { join } from "node:path";
@@ -13,15 +13,19 @@ import {
13
13
  editionRules,
14
14
  judgeEdition,
15
15
  } from "./edition-rule.ts";
16
+ import { frozenText } from "../test/frozen-presets.ts";
16
17
  import { venuePreset } from "../test/support.ts";
17
18
 
18
19
  const VENUES = presetsDir();
19
20
  const PAPERS = "/work/papers";
20
- const shipped = Object.fromEntries(
21
- readdirSync(VENUES)
22
- .filter((f) => f.endsWith(".jsonc") || f.endsWith(".json"))
23
- .map((f) => [join(VENUES, f), readFileSync(join(VENUES, f))]),
24
- );
21
+ const presets = {
22
+ ...Object.fromEntries(
23
+ readdirSync(VENUES)
24
+ .filter((f) => f.endsWith(".jsonc") || f.endsWith(".json"))
25
+ .map((f) => [join(VENUES, f), readFileSync(join(VENUES, f))]),
26
+ ),
27
+ [join(VENUES, "aidc-2026.jsonc")]: frozenText("aidc-2026.jsonc"),
28
+ };
25
29
 
26
30
  /** The rule over one paper's PIPELINE-STATUS.md at the instant `now`: each message, as ESLint words it. */
27
31
  function lint(
@@ -34,7 +38,7 @@ function lint(
34
38
  ): string[] {
35
39
  const dir = `${PAPERS}/p`;
36
40
  const files = memoryFiles({
37
- ...shipped,
41
+ ...presets,
38
42
  [`${dir}/paperlint.json`]: JSON.stringify(settings),
39
43
  ...extra,
40
44
  });
@@ -75,7 +79,7 @@ describe("paper/edition-over — every deadline of the edition has passed", () =
75
79
  "2027-01-01T00:00:00Z",
76
80
  ),
77
81
  ).toEqual([
78
- 'AIDC 2026 is over: every deadline its preset records has passed, the last (camera-ready) at 2026-11-09T11:59:59Z. paperlint ships no newer edition of it yet; if the paper goes elsewhere, point "extends" at that venue',
82
+ 'AIDC 2026 is over: every deadline its preset records has passed, the last (camera-ready) at 2026-10-31T11:59:59Z. paperlint ships no newer edition of it yet; if the paper goes elsewhere, point "extends" at that venue',
79
83
  ]);
80
84
  });
81
85
 
@@ -102,12 +106,12 @@ describe("paper/edition-over — silent", () => {
102
106
  [
103
107
  "a deadline is still ahead",
104
108
  { extends: "paperlint:aidc-2026", kind: "regular" },
105
- "2026-11-01T00:00:00Z",
109
+ "2026-10-30T00:00:00Z",
106
110
  ],
107
111
  [
108
112
  "at the last deadline's very instant",
109
113
  { extends: "paperlint:aidc-2026", kind: "regular" },
110
- "2026-11-09T11:59:59Z",
114
+ "2026-10-31T11:59:59Z",
111
115
  ],
112
116
  [
113
117
  "an edition whose preset records no deadline",
@@ -1,10 +0,0 @@
1
- /**
2
- * Types for `skill-checks.mjs`, for the TypeScript tests that call it. Only what they call is
3
- * declared; the module stays JavaScript.
4
- */
5
-
6
- /** The shared per-skill checks for `skills/<name>/SKILL.md`; rejects naming every failure. */
7
- export function checkSkill(name: string): Promise<void>;
8
-
9
- /** Asserts a soundness- or novelty-scoring skill points to the shared venue-bar reference and carries the fallback line. */
10
- export function checkVenueBar(name: string): number;