paperlint 20.2.0 → 20.4.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 (64) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/dist/adapters/venue-corpus/index.d.ts +19 -3
  3. package/dist/adapters/venue-corpus/index.d.ts.map +1 -1
  4. package/dist/adapters/venue-corpus/index.js +36 -8
  5. package/dist/adapters/venue-corpus/index.js.map +1 -1
  6. package/dist/cli.d.ts +4 -3
  7. package/dist/cli.d.ts.map +1 -1
  8. package/dist/cli.js +42 -13
  9. package/dist/cli.js.map +1 -1
  10. package/dist/corpus-record-rule.d.ts +65 -0
  11. package/dist/corpus-record-rule.d.ts.map +1 -0
  12. package/dist/corpus-record-rule.js +85 -0
  13. package/dist/corpus-record-rule.js.map +1 -0
  14. package/dist/domain/corpus-record.d.ts +51 -0
  15. package/dist/domain/corpus-record.d.ts.map +1 -0
  16. package/dist/domain/corpus-record.js +119 -0
  17. package/dist/domain/corpus-record.js.map +1 -0
  18. package/dist/domain/venue-corpus.d.ts +36 -5
  19. package/dist/domain/venue-corpus.d.ts.map +1 -1
  20. package/dist/domain/venue-corpus.js +20 -0
  21. package/dist/domain/venue-corpus.js.map +1 -1
  22. package/dist/paper-files.d.ts +10 -3
  23. package/dist/paper-files.d.ts.map +1 -1
  24. package/dist/paper-files.js +17 -2
  25. package/dist/paper-files.js.map +1 -1
  26. package/dist/papers-roots.d.ts +6 -0
  27. package/dist/papers-roots.d.ts.map +1 -1
  28. package/dist/papers-roots.js +14 -0
  29. package/dist/papers-roots.js.map +1 -1
  30. package/docs/design/venue-corpus.md +62 -40
  31. package/docs/layout.md +2 -2
  32. package/docs/rules/corpus/record.md +122 -0
  33. package/docs/rules.md +1 -0
  34. package/docs/venues.md +35 -20
  35. package/eslint.config.mjs +1 -0
  36. package/package.json +2 -1
  37. package/scripts/eslint-file-length.mjs +3 -3
  38. package/skills/study-accepted-papers/SKILL.md +14 -8
  39. package/skills/study-accepted-papers/SKILL.md.spec.ts +13 -7
  40. package/skills/study-accepted-papers/papers.schema.json +50 -2
  41. package/skills/study-accepted-papers/scripts/corpus-licences-core.js +2 -2
  42. package/skills/study-accepted-papers/scripts/corpus-licences-core.ts +2 -1
  43. package/skills/study-accepted-papers/scripts/corpus-licences.js +39 -10
  44. package/skills/study-accepted-papers/scripts/corpus-licences.test.ts +5 -1
  45. package/src/adapters/venue-corpus/index.test.ts +81 -55
  46. package/src/adapters/venue-corpus/index.ts +42 -9
  47. package/src/adapters/venue-corpus/schema.test.ts +47 -0
  48. package/src/cli-e2e.test.mjs +2 -2
  49. package/src/cli.test.ts +1 -1
  50. package/src/cli.ts +57 -13
  51. package/src/corpus-record-rule.test.ts +229 -0
  52. package/src/corpus-record-rule.ts +175 -0
  53. package/src/domain/corpus-record.test.ts +163 -0
  54. package/src/domain/corpus-record.ts +210 -0
  55. package/src/domain/venue-corpus.test.ts +85 -0
  56. package/src/domain/venue-corpus.ts +59 -5
  57. package/src/paper-files.test.ts +13 -4
  58. package/src/paper-files.ts +23 -2
  59. package/src/paper-settings-commands.test.ts +2 -2
  60. package/src/papers-roots.test.ts +34 -1
  61. package/src/papers-roots.ts +15 -0
  62. package/src/rule-cases.test.ts +15 -0
  63. package/src/settled-paper.test.ts +1 -1
  64. package/src/unowned-file.test.ts +1 -1
package/docs/layout.md CHANGED
@@ -15,7 +15,7 @@ flowchart TB
15
15
  N["<b>paperlint new</b><br/>creates the paper folder<br/>checked from here on:<br/>every lint · paper/allowed-files-only<br/>every new file · hook paper-folder-layout"]
16
16
  S1["<b>1 · idea</b><br/>research-ideate · map-prior-work<br/>analyze-sibling-paper<br/>writes: siblings/<br/>checked by: sibling/frontmatter"]
17
17
  S2["<b>2 · venue</b><br/>find-venue · plan-paper-timeline<br/>study-accepted-papers, mode A or B<br/>writes: paperlint.json, a report in reviews/<br/>checked by: review/frontmatter"]
18
- V[("<b>#lt;papers-root#gt;/venues/#lt;venue#gt;/</b><br/>beside the papers, not in one:<br/>the venue's accepted papers,<br/>shared by every paper aimed at it<br/>checked by: nothing")]
18
+ V[("<b>#lt;papers-root#gt;/venues/#lt;venue#gt;/</b><br/>beside the papers, not in one:<br/>the venue's accepted papers,<br/>shared by every paper aimed at it<br/>checked by: corpus/record")]
19
19
  subgraph S3["3 · study: repro/#lt;id#gt;-#lt;slug#gt;/"]
20
20
  direction TB
21
21
  D["<b>design</b> · build-benchmark<br/>paperlint studies new<br/>writes: the study's folder, README.md,<br/>its row in repro/studies.json<br/>checked by: repro/allowed-files-only,<br/>repro/study-registered"]
@@ -103,7 +103,7 @@ Both are explained in [`venues.md`](venues.md).
103
103
 
104
104
  | place | stage | written by | checked by |
105
105
  | ------------------------------------ | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
106
- | `<papers-root>/venues/<venue>/` | 2 venue | `study-accepted-papers`, its first run for that venue (mode A, usually) | nothing ([why](venues.md#what-checks-it)) |
106
+ | `<papers-root>/venues/<venue>/` | 2 venue | `study-accepted-papers`, its first run for that venue (mode A, usually) | [`corpus/record`](rules/corpus/record.md) ([what it reads](venues.md#what-checks-it)) |
107
107
  | the paper folder's root | before 1 | `paperlint new`: the three files, and an empty `.gitkeep` folder for `reviews/`, `research/`, `figures/`, `versions/`, `submission/`, `repro/tools/`, `repro/data/` (`repro/` gets a stub index) | [`paper/allowed-files-only`](rules/paper/allowed-files-only.md); the hook `paper-folder-layout` refuses a new stray entry |
108
108
  | `PIPELINE-STATUS.md` | every stage | `paperlint new`, then `paper-pipeline`, `paper-status`; `study-accepted-papers` (the scorecard) | `paper/stages`, `paper/source`, [`cycle/submitted-frozen`](rules/cycle/submitted-frozen.md) ([rules](rules.md)) |
109
109
  | `paperlint.json` | before 1, then 2 | `paperlint new`; `find-venue` names the venue | `paperlint lint` refuses an unknown key; [`cycle/record`](rules/cycle/record.md) |
@@ -0,0 +1,122 @@
1
+ # corpus/record
2
+
3
+ **Level:** error, on by default · **Reads:** a venue corpus's `papers.json`, and the listing of its
4
+ `pdf/` and `text/` · **Reported on:** `papers.json`, at the line of the field each finding names
5
+
6
+ ## What it catches
7
+
8
+ A venue corpus, `<papers-root>/venues/<venue>/` ([`venues.md`](../../venues.md#the-corpus-of-accepted-papers)),
9
+ keeps copies of accepted papers in `pdf/` and `text/`. Its record, `papers.json`, says for each
10
+ paper which copy every stored file is and under which licence, and how the corpus was collected.
11
+ `paperlint lint` lints `papers.json` with ESLint's JSON language, and the rule reports:
12
+
13
+ - a field that does not match the record's schema (`unparsed`), at that field: a misspelt key where
14
+ it stands, a wrong value at its key, a required field left out at the object that should hold it.
15
+ It is the parser the skill's script uses, so the two refuse the same record; the fields are in
16
+ `papers.schema.json`, shipped with `study-accepted-papers`;
17
+ - a file in `pdf/` or `text/` that no copy's `stored` claims (`unclaimed`), including a name that
18
+ is not `pdf/<key>.pdf`, `text/<key>.txt` or `text/<key>.<variant>.txt`: at the paper's `copies`
19
+ when the record lists the paper, otherwise on the first line;
20
+ - a copy whose `stored` names a kind whose file is not there (`missing`), at that `stored`;
21
+ - two copies of one paper that both store one kind (`twice`), at the second copy's `stored`: one
22
+ file is a copy of one version.
23
+ - an edition whose papers do not add up to its `accepted` (`unparsed`, at that `accepted`): without
24
+ `capped` the record lists every paper the edition accepted, winners included; with `capped` it
25
+ lists at most that many. A list copied in half is caught here, not by the schema.
26
+
27
+ A `papers.json` that is not JSON is not this rule's finding: ESLint reports it as a parse error on
28
+ its first line. A `paper.tex` or `PIPELINE-STATUS.md` kept in a corpus (an accepted paper's source)
29
+ is not one of the project's papers: no paper rule judges it.
30
+
31
+ ## Why
32
+
33
+ A real consumer kept six corpora with five names for the paper list and 217 stored copies, 179 of
34
+ them with no licence recorded and 18 whose source nobody wrote down
35
+ ([the design note](../../design/venue-corpus.md#measured-on-a-real-consumer-2026-11-24)). A copy
36
+ the record does not name is a copy nobody can say may be kept. The rule holds that every stored
37
+ file is a recorded fact; whether its licence permits keeping it is a separate question, for a
38
+ separate rule.
39
+
40
+ It is on by default because it holds for every corpus whatever the venue: a `papers.json` that
41
+ does not parse breaks the skill that reads it, and a file the record does not name is one no reader
42
+ knows the meaning of. It is silent in a project with no `venues/`.
43
+
44
+ ## Examples
45
+
46
+ Failing: a date written as a number.
47
+
48
+ ```text
49
+ papers/venues/agent/papers.json
50
+ 27:13 error `papers.0.copies.0.licence.read_on`: Invalid input: expected string, received number.
51
+ What to do: correct the field; the fields are in the JSON Schema `papers.schema.json`
52
+ that `study-accepted-papers` ships corpus/record
53
+ ```
54
+
55
+ Failing: a copy claims a PDF that is not there.
56
+
57
+ ```text
58
+ papers/venues/agent/papers.json
59
+ 30:11 error a copy of `2026-01` stores `pdf` in `papers.json`, and `pdf/2026-01.pdf` is not there.
60
+ What to do: put the file back, or remove `"pdf"` from that copy's `stored` corpus/record
61
+ ```
62
+
63
+ Passing: the PDF claimed by the copy it was downloaded from, and the file in `pdf/2026-01.pdf`.
64
+
65
+ ```json
66
+ {
67
+ "key": "2026-01",
68
+ "copies": [
69
+ {
70
+ "version": "published",
71
+ "url": "https://doi.org/10.1145/3786167.3788430",
72
+ "licence": {
73
+ "id": "CC-BY-4.0",
74
+ "read_from": "https://api.crossref.org/works/10.1145/3786167.3788430",
75
+ "read_on": "2026-11-03"
76
+ },
77
+ "fetched_from": "https://dl.acm.org/doi/pdf/10.1145/3786167.3788430",
78
+ "stored": ["pdf"]
79
+ }
80
+ ]
81
+ }
82
+ ```
83
+
84
+ Passing: a corpus that keeps only ids, with `pdf/` and `text/` absent or empty.
85
+
86
+ ## Options / preset fields
87
+
88
+ No rule options. The rule is on for every corpus; a project turns it off in its root
89
+ `paperlint.json`:
90
+
91
+ ```json
92
+ { "rules": { "corpus/record": "off" } }
93
+ ```
94
+
95
+ A paper's own `paperlint.json` does not reach a corpus: the corpus belongs to the venue, not to one
96
+ paper.
97
+
98
+ ## What it does not check
99
+
100
+ - A corpus folder with no `papers.json`: there is no file to report on. The planned
101
+ `corpus/allowed-files-only` reports a corpus that stores files without one.
102
+ - Whether a stored copy's licence permits keeping it, or whether a licence was read at all: that is
103
+ the licence rule, planned and off by default.
104
+ - That a stored file is the copy it is attributed to; it checks that the attribution was recorded.
105
+ - Names in the corpus folder outside `pdf/` and `text/` (`deep-reads/`, `sources/`, a stray file),
106
+ and folders inside `pdf/` or `text/` beyond their names: the planned `corpus/allowed-files-only`.
107
+ - Hidden files in `pdf/` and `text/` (`.gitkeep`, `.DS_Store`): they are not copies.
108
+ - A corpus outside `<papers-root>/venues/`.
109
+ - `MANIFEST.md` (optional, caveats only) and `measurements.json`.
110
+
111
+ ## How to fix
112
+
113
+ Each finding names its cure. In short:
114
+
115
+ - A field that breaks the schema: correct it. `capped`, `proxy` and `rebuild` are required; "none"
116
+ is `null` (`capped`, `proxy`) or `[]` (`rebuild`), never a field left out.
117
+ - A file nobody claims: add its kind to the `stored` of the copy it was fetched from, with
118
+ `fetched_from`, its licence and where the licence was read (`"version": "unknown"` with
119
+ `"licence": { "id": "NOASSERTION" }` where the licence was never read); or remove the file and
120
+ keep the paper's ids.
121
+ - A claimed file that is missing: put it back, or remove the kind from that copy's `stored`.
122
+ - Two copies storing one kind: keep the kind on the copy the file was fetched from.
package/docs/rules.md CHANGED
@@ -9,6 +9,7 @@ reads and when it fails. Errors fail `paperlint lint`; warnings print and do not
9
9
  | `paper/source` | error | `PIPELINE-STATUS.md` | a declared stage has no frozen `.tex` beside its PDF (a commit hash does not count — squash and gc destroy it). Silent in a paper that keeps `cycles`: there [`versions/layout`](rules/versions/layout.md) holds each PDF to its source |
10
10
  | [`study/declare-sample`](rules/study/declare-sample.md) | experimental; off unless a paper turns it on (`"error"`) | each study's `repro/<study>/prereg.json` | a study's pre-registration does not declare its `population` (what the claim is about, source, size), the `strata` and what each of its `screens` removed per stratum value, its `coverage` (share 0–1 or null with a reason, and the strata it cannot reach), or the `author_check` of the drawn units (a doubtful verdict needs a recorded `decision`); reported on `PIPELINE-STATUS.md`, once per problem — [page](rules/study/declare-sample.md) |
11
11
  | [`cycle/record`](rules/cycle/record.md) | error | `paperlint.json` (`cycles`) | the paper's attempts at venues (`cycles`, one entry per attempt) hold one source's deadlines out of order (registration ≤ submission ≤ resubmission < notification < camera-ready), or copy a portal reading the venue's preset carries; reported on `PIPELINE-STATUS.md`. A record that does not parse — a bare date, two open cycles, an unknown key — is refused by `paperlint lint` itself before any rule runs, exit 2 — [page](rules/cycle/record.md) |
12
+ | [`corpus/record`](rules/corpus/record.md) | error | a venue corpus's `papers.json` → its `pdf/` and `text/` listing | a field of `papers.json` breaks the record's schema, a stored file is claimed by no copy, a claimed file is missing, or two copies of a paper store one kind; reported in `papers.json` at the field. Off with `"corpus/record": "off"` in the root `paperlint.json` — [page](rules/corpus/record.md) |
12
13
  | [`cycle/evidence`](rules/cycle/evidence.md) | error | `paperlint.json` (`cycles`) → the paper folder | a closed cycle (`accepted`, `rejected`, `withdrawn`) or a deadline's `override` names an `evidence` file — the decision mail, the reviews, the withdrawal note, the chairs' mail — that is not in the paper folder; reported on `PIPELINE-STATUS.md` — [page](rules/cycle/evidence.md) |
13
14
  | [`cycle/port-done`](rules/cycle/port-done.md) | error | `paper.tex` → `paperlint.json` (`cycles`) → the preset's `template` | the current cycle still declares `"phase": "porting"` (which silences the venue's format rules) while the `\documentclass` is already the venue's template: the port is done, drop the phase — [page](rules/cycle/port-done.md) |
14
15
  | [`cycle/prior-reviews-answered`](rules/cycle/prior-reviews-answered.md) | error | `paper.tex` → `paperlint.json` (`cycles`) → the rejection's `points` file | the attempt before the open one was rejected with reviews, and a point in its points file has no answer, or is answered in a place that is no `\section` of the paper — [page](rules/cycle/prior-reviews-answered.md) |
package/docs/venues.md CHANGED
@@ -168,8 +168,8 @@ what is missing.
168
168
 
169
169
  ```text
170
170
  <papers-root>/venues/<venue>/
171
- ├── papers.json ← the record: every paper, and every copy of it with its licence
172
- ├── MANIFEST.md ← the sources, the years, what was capped, the stand-in for "strong accept" and how often it occurs
171
+ ├── papers.json ← the record: every paper and every copy of it with its licence; the sources, years, what was capped, the stand-in for "strong accept", the commands that rebuild it
172
+ ├── MANIFEST.md ← optional: caveats only, the prose no field holds
173
173
  ├── measurements.json ← the codes of L0 and L1, one row per paper, keyed by its key
174
174
  ├── pdf/<key>.pdf ← a paper's PDF, only when a copy's licence permits keeping it
175
175
  ├── text/<key>.txt ← its extracted text, on the same condition
@@ -180,10 +180,14 @@ what is missing.
180
180
 
181
181
  These are all the names a corpus holds. The award winners and the ordinary accepted papers are rows
182
182
  of `papers.json` (`group` `award` and `accepted`), and so are the papers of other venues, corpus 2
183
- (`group` `sister`): one record, the corpora told apart by a field. The commands that fetched and
184
- measured are named in `MANIFEST.md`; the scripts are not kept in the corpus. The author's own paper
185
- is never in a corpus: its text belongs in its paper folder. A mechanism the venue adds to the generic
186
- ten (M1–M10, kept beside the skill), or one that does not hold there, is written in `MANIFEST.md`.
183
+ (`group` `sister`): one record, the corpora told apart by a field. How the corpus was collected is
184
+ in the record too: each edition's `capped` (what was left out and why, `null` when nothing was) and
185
+ `proxy` (the stand-in for "strong accept" and how many papers it marks, `null` when there is none),
186
+ and `rebuild`, the commands that fetched and measured (the scripts are not kept in the corpus).
187
+ Coverage is never written down: it is counted from the rows. `MANIFEST.md` is optional and holds
188
+ caveats only, such as a mechanism the venue adds to the generic ten (M1–M10, kept beside the skill)
189
+ or one that does not hold there; no rule reads it. The author's own paper is never in a corpus: its
190
+ text belongs in its paper folder.
187
191
 
188
192
  ### The record, `papers.json`
189
193
 
@@ -198,7 +202,9 @@ row, from a workshop's 2026 list:
198
202
  "edition": 2026,
199
203
  "listed_from": "https://conf.researchr.org/home/icse-2026/agent-2026",
200
204
  "read_on": "2026-11-03",
201
- "accepted": 27
205
+ "accepted": 27,
206
+ "capped": null,
207
+ "proxy": null
202
208
  }
203
209
  ],
204
210
  "papers": [
@@ -228,10 +234,15 @@ row, from a workshop's 2026 list:
228
234
  }
229
235
  ]
230
236
  }
231
- ]
237
+ ],
238
+ "rebuild": []
232
239
  }
233
240
  ```
234
241
 
242
+ The example shows one of the edition's 27 rows. `accepted` is the count of the listing page's rows
243
+ and is required: with `capped` null the record lists all 27 papers of 2026 (`accepted` and `award`
244
+ rows together), and `corpus/record` reports an edition whose rows do not add up to it.
245
+
235
246
  The fields, their values and which are required are the JSON Schema
236
247
  [`skills/study-accepted-papers/papers.schema.json`](../skills/study-accepted-papers/papers.schema.json),
237
248
  generated from the parser (`src/adapters/venue-corpus/index.ts`; `npm run schema:venue-corpus`
@@ -308,21 +319,25 @@ whole site and none per paper. Where no source gives a copy's licence, it stays
308
319
 
309
320
  ### What checks it
310
321
 
311
- **No rule reads the corpus yet.** `paperlint lint` treats a folder in the papers directory as a paper
312
- only when it holds `PIPELINE-STATUS.md`, `paper.tex` or `paperlint.json`, and `venues/` holds none of
313
- them, so nothing in it is linted. The hook that refuses misplaced files does not act there either:
314
- it acts only inside a paper folder. Today `papers.json` is parsed against its schema only when the
315
- skill's script reads it.
322
+ [`corpus/record`](rules/corpus/record.md), on by default, reads every corpus's `papers.json` under
323
+ `<papers-root>/venues/`: `paperlint lint` lints the file as JSON and reports, at the line of the field,
324
+ a field that breaks the record's schema, a stored file no copy claims, a claimed file that is
325
+ missing, and two copies of one paper storing one kind. A `papers.json` that is not JSON fails as a
326
+ parse error on its first line. A corpus folder without `papers.json` is not this rule's: the planned
327
+ `corpus/allowed-files-only` will report it. A project turns the rule off with
328
+ `{ "rules": { "corpus/record": "off" } }` in its root `paperlint.json`.
329
+
330
+ Nothing in a corpus is a paper: a `paper.tex` kept there is an accepted paper's source, and no
331
+ paper rule judges it. The hook that refuses misplaced files acts only inside a paper folder.
316
332
 
317
- Three rules of a family `corpus/` are planned for later releases, **not shipped yet**:
333
+ Two more rules of the family are planned for later releases, **not shipped yet**:
318
334
 
319
- | rule | will report |
320
- | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
321
- | `corpus/record` | a corpus with `pdf/` or `text/` and no `papers.json`; a `papers.json` that does not parse; a stored file no copy claims; a copy that claims a missing file; two copies of one paper storing one kind |
322
- | `corpus/licence` | a stored file whose copy's licence was not read, or does not permit that kind; planned off by default, for a project whose corpus others read |
323
- | `corpus/allowed-files-only` | a name in the corpus folder outside the names above |
335
+ | rule | will report |
336
+ | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
337
+ | `corpus/licence` | a stored file whose copy's licence was not read, or does not permit that kind; planned off by default, for a project whose corpus others read |
338
+ | `corpus/allowed-files-only` | a name in the corpus folder outside the names above, and a corpus that stores files with no `papers.json` |
324
339
 
325
- What is checked today is the other side: a corpus started **inside** a paper folder. A `venues/` or
340
+ Also checked: a corpus started **inside** a paper folder. A `venues/` or
326
341
  `venue-corpus/` folder at a paper's root is reported, with this place as where it goes
327
342
  ([the paper folder's layout](rules/paper/allowed-files-only.md)), and the hook refuses to create one.
328
343
 
package/eslint.config.mjs CHANGED
@@ -267,6 +267,7 @@ export const IO_MODULES = [
267
267
  */
268
268
  export const TOOL_PACKAGES = [
269
269
  "@clack/prompts", // the terminal questions of `paperlint init`
270
+ "@eslint/json", // ESLint's JSON language
270
271
  "@eslint/markdown", // ESLint's Markdown language
271
272
  "@eslint/plugin-kit",
272
273
  "@retorquere/bibtex-parser", // BibTeX
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paperlint",
3
- "version": "20.2.0",
3
+ "version": "20.4.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",
@@ -28,6 +28,7 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@clack/prompts": "1.9.0",
31
+ "@eslint/json": "^2.1.1",
31
32
  "@eslint/markdown": "^8.0.3",
32
33
  "@eslint/plugin-kit": "^0.7.2",
33
34
  "@retorquere/bibtex-parser": "^10.0.1",
@@ -12,7 +12,7 @@ const legacyCeilings = {
12
12
  "eslint-rules/prereg-coverage.test.ts": 407,
13
13
  "eslint-rules/prereg-coverage.ts": 320,
14
14
  "eslint-rules/tex-build.test.mjs": 557,
15
- "eslint.config.mjs": 635,
15
+ "eslint.config.mjs": 636,
16
16
  "scripts/coverage-config.test.ts": 376,
17
17
  "scripts/pipeline.ts": 380,
18
18
  "src/adapters/git/history.test.ts": 327,
@@ -65,7 +65,7 @@ const legacyCeilings = {
65
65
  "src/lint-edited-hook.test.ts": 542,
66
66
  "src/new-paper.test.ts": 783,
67
67
  "src/outputs-before-decision-rule.test.ts": 406,
68
- "src/paper-files.test.ts": 436,
68
+ "src/paper-files.test.ts": 443,
69
69
  "src/paper-includes.test.ts": 321,
70
70
  "src/paper-settings-commands.test.ts": 318,
71
71
  "src/paper-settings.test.ts": 519,
@@ -75,7 +75,7 @@ const legacyCeilings = {
75
75
  "src/readability.test.ts": 331,
76
76
  "src/references.test.ts": 715,
77
77
  "src/register-bands.test.ts": 353,
78
- "src/rule-cases.test.ts": 1888,
78
+ "src/rule-cases.test.ts": 1902,
79
79
  "src/studies.test.ts": 354,
80
80
  "src/study-gate.test.ts": 420,
81
81
  "src/study-registry-rule.test.ts": 712,
@@ -5,7 +5,7 @@ context: fork
5
5
  allowed-tools: [Read, Write, Edit, Grep, Glob, Bash, WebSearch, WebFetch, Agent]
6
6
  ---
7
7
 
8
- <!-- vigiles:sha256:76bb88cdae7aef50 compiled from skills/study-accepted-papers/SKILL.md.spec.ts -->
8
+ <!-- vigiles:sha256:e956f9144d8c9170 compiled from skills/study-accepted-papers/SKILL.md.spec.ts -->
9
9
 
10
10
  # study-accepted-papers — what this venue rewards, measured on its own papers
11
11
 
@@ -108,7 +108,7 @@ as judgement, against the base rates of `references/base-rates.md`; simulated pa
108
108
 
109
109
  | what | where | why there |
110
110
  |---|---|---|
111
- | **the venue corpus** | `<papers-root>/venues/<venue>/` (the papers directory from the project's `paperlint.json`; the folder is the preset's series) | **shared by every paper that targets the venue**, collected once and reused by every later mode. `papers.json` (one row per paper: winners `award`, ordinary `accepted`, corpus 2 `sister`; every copy with its licence), `MANIFEST.md` (sources, years, what was capped, the proxy and its base rate, the commands run), `measurements.json` (L0/L1 codes keyed by the row's `key`), `pdf/<key>.pdf` and `text/<key>.txt` only as the licence step below permits, `deep-reads/<key>.md`, `sources/` (saved listing and call pages). No other name. |
111
+ | **the venue corpus** | `<papers-root>/venues/<venue>/` (the papers directory from the project's `paperlint.json`; the folder is the preset's series) | **shared by every paper that targets the venue**, collected once and reused by every later mode. `papers.json` (one row per paper: winners `award`, ordinary `accepted`, corpus 2 `sister`; every copy with its licence; how the corpus was collected, in fields: each edition's `listed_from`, `read_on`, `accepted` (the listing's row count), `capped` and `proxy`, and `rebuild`, the commands run), `MANIFEST.md` (optional: caveats only, the prose no field holds), `measurements.json` (L0/L1 codes keyed by the row's `key`), `pdf/<key>.pdf` and `text/<key>.txt` only as the licence step below permits, `deep-reads/<key>.md`, `sources/` (saved listing and call pages). No other name. |
112
112
  | **the scorecard** | the section **"Strong-accept scorecard (M1–M10)"** of the paper's `PIPELINE-STATUS.md` | a row per mechanism: status (pass / partial / fail), evidence (`file:line`), owner, plan or "accept ceiling". **The only place the verdicts live**; update it there. |
113
113
  | **the reasoning** | `<paper>/reviews/<YYYY-MM-DD>-study-accepted-<venue>-<mode>.md` | a dated report per run, with frontmatter (below). It keeps the reasoning, the selection and the per-mechanism argument, and **points to the scorecard section; it never copies the table**. |
114
114
  | **the stage** | the SETUP row with id `venuebar` in `PIPELINE-STATUS.md` (the id is kept for existing scorecards) | status, date, the mode and depth run, and a link to the report. One row, updated by every mode. |
@@ -145,24 +145,30 @@ downloaded or extracted. The record's fields are in `${CLAUDE_SKILL_DIR}/papers.
145
145
  script below refuses a record that breaks them, with the path of the field, and checks what a schema
146
146
  cannot (unique keys, a paper's edition among the listed ones, a stored copy's `fetched_from`).
147
147
 
148
- 1. **A row per paper** in `papers.json`, with its ids, title, authors and abstract: metadata, kept
148
+ 1. **The collection facts** in `papers.json`, never in `MANIFEST.md`: per edition `capped` (what
149
+ was left out and why, `null` when nothing was) and `proxy` (`{ "what", "papers" }`, the stand-in
150
+ for "strong accept" and how many papers it marks, `null` when there is none); for the record
151
+ `rebuild`, the commands that regenerate it (`[]` when none). All three are required; coverage is
152
+ counted from the rows, never written.
153
+ 2. **A row per paper** in `papers.json`, with its ids, title, authors and abstract: metadata, kept
149
154
  whatever the licence.
150
- 2. **A copy per version you find** (the published one, the arXiv preprint), each with the licence read
155
+ 3. **A copy per version you find** (the published one, the arXiv preprint), each with the licence read
151
156
  from the source `docs/venues.md` names for that kind of copy ("Where a copy's licence is read
152
157
  from"): `read_from` is the page or API response, `read_on` the date. Never the licence line
153
158
  printed inside a PDF: it can belong to another copy. No source gives it → `{ "id": "NOASSERTION" }`.
154
- 3. **Run** `node ${CLAUDE_SKILL_DIR}/scripts/corpus-licences.js <venue>`.
159
+ 4. **Run** `node ${CLAUDE_SKILL_DIR}/scripts/corpus-licences.js <venue>`.
155
160
  Exit 1: the record does not parse, or there is not exactly one; fix what it names and run it again. Exit 0: one line per paper
156
161
  and kind (`text`, `pdf`).
157
- 4. **Store only on a `keep` line**: download from that copy to `pdf/<key>.pdf`, or extract to
162
+ 5. **Store only on a `keep` line**: download from that copy to `pdf/<key>.pdf`, or extract to
158
163
  `text/<key>.txt`, then add the kind to that copy's `stored` and set `fetched_from` to the URL the
159
164
  bytes came from. On a `none` line store nothing of that kind: read the copy where it is, in a
160
165
  scratch folder outside the repository, and keep only codes, short quotes and ids. A copy refused
161
166
  only as "permits it only in a project declared non-commercial" may be stored when the author says
162
167
  the project is non-commercial.
163
168
 
164
- `corpus/record` and `corpus/licence` (not shipped yet) will hold what this step writes; until they
165
- ship, the script is the only check of the record.
169
+ `paperlint lint` checks the record with `corpus/record`, at the line of each wrong field; whether a
170
+ stored copy's licence permits it is `corpus/licence` (not shipped yet), so until then the script is
171
+ the only check of that.
166
172
 
167
173
  ## Before any level: pin the venue's stated bar
168
174
 
@@ -133,7 +133,7 @@ as judgement, against the base rates of \`references/base-rates.md\`; simulated
133
133
 
134
134
  | what | where | why there |
135
135
  |---|---|---|
136
- | **the venue corpus** | \`<papers-root>/venues/<venue>/\` (the papers directory from the project's \`paperlint.json\`; the folder is the preset's series) | **shared by every paper that targets the venue**, collected once and reused by every later mode. \`papers.json\` (one row per paper: winners \`award\`, ordinary \`accepted\`, corpus 2 \`sister\`; every copy with its licence), \`MANIFEST.md\` (sources, years, what was capped, the proxy and its base rate, the commands run), \`measurements.json\` (L0/L1 codes keyed by the row's \`key\`), \`pdf/<key>.pdf\` and \`text/<key>.txt\` only as the licence step below permits, \`deep-reads/<key>.md\`, \`sources/\` (saved listing and call pages). No other name. |
136
+ | **the venue corpus** | \`<papers-root>/venues/<venue>/\` (the papers directory from the project's \`paperlint.json\`; the folder is the preset's series) | **shared by every paper that targets the venue**, collected once and reused by every later mode. \`papers.json\` (one row per paper: winners \`award\`, ordinary \`accepted\`, corpus 2 \`sister\`; every copy with its licence; how the corpus was collected, in fields: each edition's \`listed_from\`, \`read_on\`, \`accepted\` (the listing's row count), \`capped\` and \`proxy\`, and \`rebuild\`, the commands run), \`MANIFEST.md\` (optional: caveats only, the prose no field holds), \`measurements.json\` (L0/L1 codes keyed by the row's \`key\`), \`pdf/<key>.pdf\` and \`text/<key>.txt\` only as the licence step below permits, \`deep-reads/<key>.md\`, \`sources/\` (saved listing and call pages). No other name. |
137
137
  | **the scorecard** | the section **"Strong-accept scorecard (M1–M10)"** of the paper's \`PIPELINE-STATUS.md\` | a row per mechanism: status (pass / partial / fail), evidence (\`file:line\`), owner, plan or "accept ceiling". **The only place the verdicts live**; update it there. |
138
138
  | **the reasoning** | \`<paper>/reviews/<YYYY-MM-DD>-study-accepted-<venue>-<mode>.md\` | a dated report per run, with frontmatter (below). It keeps the reasoning, the selection and the per-mechanism argument, and **points to the scorecard section; it never copies the table**. |
139
139
  | **the stage** | the SETUP row with id \`venuebar\` in \`PIPELINE-STATUS.md\` (the id is kept for existing scorecards) | status, date, the mode and depth run, and a link to the report. One row, updated by every mode. |
@@ -170,24 +170,30 @@ downloaded or extracted. The record's fields are in \`\${CLAUDE_SKILL_DIR}/paper
170
170
  script below refuses a record that breaks them, with the path of the field, and checks what a schema
171
171
  cannot (unique keys, a paper's edition among the listed ones, a stored copy's \`fetched_from\`).
172
172
 
173
- 1. **A row per paper** in \`papers.json\`, with its ids, title, authors and abstract: metadata, kept
173
+ 1. **The collection facts** in \`papers.json\`, never in \`MANIFEST.md\`: per edition \`capped\` (what
174
+ was left out and why, \`null\` when nothing was) and \`proxy\` (\`{ "what", "papers" }\`, the stand-in
175
+ for "strong accept" and how many papers it marks, \`null\` when there is none); for the record
176
+ \`rebuild\`, the commands that regenerate it (\`[]\` when none). All three are required; coverage is
177
+ counted from the rows, never written.
178
+ 2. **A row per paper** in \`papers.json\`, with its ids, title, authors and abstract: metadata, kept
174
179
  whatever the licence.
175
- 2. **A copy per version you find** (the published one, the arXiv preprint), each with the licence read
180
+ 3. **A copy per version you find** (the published one, the arXiv preprint), each with the licence read
176
181
  from the source \`docs/venues.md\` names for that kind of copy ("Where a copy's licence is read
177
182
  from"): \`read_from\` is the page or API response, \`read_on\` the date. Never the licence line
178
183
  printed inside a PDF: it can belong to another copy. No source gives it → \`{ "id": "NOASSERTION" }\`.
179
- 3. **Run** \`node \${CLAUDE_SKILL_DIR}/scripts/corpus-licences.js <venue>\`.
184
+ 4. **Run** \`node \${CLAUDE_SKILL_DIR}/scripts/corpus-licences.js <venue>\`.
180
185
  Exit 1: the record does not parse, or there is not exactly one; fix what it names and run it again. Exit 0: one line per paper
181
186
  and kind (\`text\`, \`pdf\`).
182
- 4. **Store only on a \`keep\` line**: download from that copy to \`pdf/<key>.pdf\`, or extract to
187
+ 5. **Store only on a \`keep\` line**: download from that copy to \`pdf/<key>.pdf\`, or extract to
183
188
  \`text/<key>.txt\`, then add the kind to that copy's \`stored\` and set \`fetched_from\` to the URL the
184
189
  bytes came from. On a \`none\` line store nothing of that kind: read the copy where it is, in a
185
190
  scratch folder outside the repository, and keep only codes, short quotes and ids. A copy refused
186
191
  only as "permits it only in a project declared non-commercial" may be stored when the author says
187
192
  the project is non-commercial.
188
193
 
189
- \`corpus/record\` and \`corpus/licence\` (not shipped yet) will hold what this step writes; until they
190
- ship, the script is the only check of the record.
194
+ \`paperlint lint\` checks the record with \`corpus/record\`, at the line of each wrong field; whether a
195
+ stored copy's licence permits it is \`corpus/licence\` (not shipped yet), so until then the script is
196
+ the only check of that.
191
197
 
192
198
  ## Before any level: pin the venue's stated bar
193
199
 
@@ -29,12 +29,52 @@
29
29
  "type": "integer",
30
30
  "minimum": 0,
31
31
  "maximum": 9007199254740991
32
+ },
33
+ "capped": {
34
+ "anyOf": [
35
+ {
36
+ "type": "string",
37
+ "minLength": 1
38
+ },
39
+ {
40
+ "type": "null"
41
+ }
42
+ ]
43
+ },
44
+ "proxy": {
45
+ "anyOf": [
46
+ {
47
+ "type": "object",
48
+ "properties": {
49
+ "what": {
50
+ "type": "string",
51
+ "minLength": 1
52
+ },
53
+ "papers": {
54
+ "type": "integer",
55
+ "minimum": 0,
56
+ "maximum": 9007199254740991
57
+ }
58
+ },
59
+ "required": [
60
+ "what",
61
+ "papers"
62
+ ],
63
+ "additionalProperties": false
64
+ },
65
+ {
66
+ "type": "null"
67
+ }
68
+ ]
32
69
  }
33
70
  },
34
71
  "required": [
35
72
  "edition",
36
73
  "listed_from",
37
- "read_on"
74
+ "read_on",
75
+ "accepted",
76
+ "capped",
77
+ "proxy"
38
78
  ],
39
79
  "additionalProperties": false
40
80
  }
@@ -414,12 +454,20 @@
414
454
  }
415
455
  ]
416
456
  }
457
+ },
458
+ "rebuild": {
459
+ "type": "array",
460
+ "items": {
461
+ "type": "string",
462
+ "minLength": 1
463
+ }
417
464
  }
418
465
  },
419
466
  "required": [
420
467
  "venue",
421
468
  "editions",
422
- "papers"
469
+ "papers",
470
+ "rebuild"
423
471
  ],
424
472
  "additionalProperties": false,
425
473
  "title": "A venue corpus's papers.json",
@@ -19,7 +19,7 @@ import { dirname, join } from "node:path";
19
19
  import { CONFIG_FILE, PAPERS_DIR_FIELD } from "#lib/paper-config";
20
20
  import { callerPath } from "#src/caller-path";
21
21
  import { permits, STORED_KINDS, } from "#src/domain/licence";
22
- import { CORPUS_RECORD, } from "#src/domain/venue-corpus";
22
+ import { CORPUS_RECORD, problemsText, } from "#src/domain/venue-corpus";
23
23
  import { papersRoots } from "#src/papers-roots";
24
24
  const isRefused = (j) => j.permission.kind !== "permitted";
25
25
  /** The first copy, in the record's order, whose licence permits the kind. */
@@ -172,7 +172,7 @@ export function main(argv, deps, { out, err }) {
172
172
  }
173
173
  const parsed = deps.codec.parse(new TextDecoder().decode(bytes));
174
174
  if (!parsed.ok) {
175
- err(`corpus-licences: ${parsed.why}\n`);
175
+ err(`corpus-licences: ${problemsText(parsed.problems)}\n`);
176
176
  return 1;
177
177
  }
178
178
  out(listing(verdicts(parsed.corpus, UNDECLARED)));
@@ -27,6 +27,7 @@ import {
27
27
  } from "#src/domain/licence";
28
28
  import {
29
29
  CORPUS_RECORD,
30
+ problemsText,
30
31
  type Copy,
31
32
  type KnownVersion,
32
33
  type Paper,
@@ -294,7 +295,7 @@ export function main(
294
295
  }
295
296
  const parsed = deps.codec.parse(new TextDecoder().decode(bytes));
296
297
  if (!parsed.ok) {
297
- err(`corpus-licences: ${parsed.why}\n`);
298
+ err(`corpus-licences: ${problemsText(parsed.problems)}\n`);
298
299
  return 1;
299
300
  }
300
301
  out(listing(verdicts(parsed.corpus, UNDECLARED)));