paperlint 20.1.2 → 20.2.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 +5 -1
  3. package/dist/adapters/venue-corpus/index.d.ts +345 -0
  4. package/dist/adapters/venue-corpus/index.d.ts.map +1 -0
  5. package/dist/adapters/venue-corpus/index.js +205 -0
  6. package/dist/adapters/venue-corpus/index.js.map +1 -0
  7. package/dist/domain/licence.d.ts +51 -0
  8. package/dist/domain/licence.d.ts.map +1 -0
  9. package/dist/domain/licence.js +61 -0
  10. package/dist/domain/licence.js.map +1 -0
  11. package/dist/domain/venue-corpus.d.ts +120 -0
  12. package/dist/domain/venue-corpus.d.ts.map +1 -0
  13. package/dist/domain/venue-corpus.js +13 -0
  14. package/dist/domain/venue-corpus.js.map +1 -0
  15. package/dist/eslint-rules/CLAUDE.md.spec.d.ts.map +1 -1
  16. package/dist/eslint-rules/CLAUDE.md.spec.js +1 -0
  17. package/dist/eslint-rules/CLAUDE.md.spec.js.map +1 -1
  18. package/dist/ports/venue-corpus-codec.d.ts +11 -0
  19. package/dist/ports/venue-corpus-codec.d.ts.map +1 -0
  20. package/dist/ports/venue-corpus-codec.js +2 -0
  21. package/dist/ports/venue-corpus-codec.js.map +1 -0
  22. package/dist/skill-chunks/chunk-5KCU4WTN.js +108 -0
  23. package/dist/skill-chunks/{chunk-X4VKG4KT.js → chunk-6YEM4VDI.js} +11 -9
  24. package/dist/skill-chunks/{chunk-L3NJUJUP.js → chunk-CXAGKT44.js} +5 -3
  25. package/dist/skill-chunks/{chunk-6NU6CXUS.js → chunk-J5XYPERO.js} +12 -72
  26. package/dist/skill-chunks/{chunk-IREAROCV.js → chunk-Z5YMDZYW.js} +4 -0
  27. package/dist/skills/study-accepted-papers/scripts/corpus-licences-core.d.ts +54 -0
  28. package/dist/skills/study-accepted-papers/scripts/corpus-licences.d.ts +2 -0
  29. package/docs/design/venue-corpus.md +250 -0
  30. package/docs/venues.md +144 -21
  31. package/eslint-rules/CLAUDE.md +5 -1
  32. package/eslint-rules/CLAUDE.md.spec.ts +3 -0
  33. package/package.json +2 -1
  34. package/scripts/bundle-skills.ts +1 -0
  35. package/scripts/venue-corpus-schema.test.ts +39 -0
  36. package/scripts/venue-corpus-schema.ts +17 -0
  37. package/skills/argument-arc/scripts/headings.js +6 -4
  38. package/skills/cold-read-diff/scripts/cold-read.js +6 -4
  39. package/skills/paper-pipeline/scripts/extract-ref-facts.js +6 -5
  40. package/skills/pc-panel-review/scripts/prior-reviews.js +7 -5
  41. package/skills/study-accepted-papers/SKILL.md +28 -2
  42. package/skills/study-accepted-papers/SKILL.md.spec.ts +27 -1
  43. package/skills/study-accepted-papers/papers.schema.json +427 -0
  44. package/skills/study-accepted-papers/scripts/corpus-licences-core.js +180 -0
  45. package/skills/study-accepted-papers/scripts/corpus-licences-core.ts +302 -0
  46. package/skills/study-accepted-papers/scripts/corpus-licences.js +383 -0
  47. package/skills/study-accepted-papers/scripts/corpus-licences.test.ts +485 -0
  48. package/skills/study-accepted-papers/scripts/corpus-licences.ts +27 -0
  49. package/skills/verify-citations/scripts/bib-authors.js +6 -5
  50. package/skills/verify-citations/scripts/verify-cites.js +6 -5
  51. package/src/adapters/venue-corpus/index.test.ts +279 -0
  52. package/src/adapters/venue-corpus/index.ts +286 -0
  53. package/src/domain/licence.test.ts +122 -0
  54. package/src/domain/licence.ts +95 -0
  55. package/src/domain/venue-corpus.ts +130 -0
  56. package/src/ports/venue-corpus-codec.ts +11 -0
@@ -0,0 +1,250 @@
1
+ # The venue corpus record — design
2
+
3
+ A venue's corpus (`<papers-root>/venues/<venue>/`, [`docs/venues.md`](../venues.md)) is where
4
+ `study-accepted-papers` keeps the papers a venue accepted, so every paper aimed at that venue measures
5
+ against the same set. Until now its shape was prose: fixed names for `MANIFEST.md`, `measurements.json`,
6
+ `text/` and `deep-reads/`, the lists "named by whoever runs the skill", and "the PDFs are not committed".
7
+ A real consumer kept six corpora, and they drifted: five names for the paper list, two ways of writing a
8
+ licence (a field per row in one, a separate TSV in another), PDFs committed in one corpus against the
9
+ rule, one corpus with no manifest, and one outside `venues/` altogether. Nothing could read them all, and
10
+ nothing could say whether a stored copy was allowed to be there.
11
+
12
+ This note fixes one record per corpus, the check that keeps its stored copies legal, and the order of the
13
+ pull requests that follow. It is the base for #302, #568, #356, #500, #215, #608 and #465.
14
+
15
+ ## What is decided
16
+
17
+ 1. **One record, `papers.json`, JSON with a schema**, beside `MANIFEST.md`. It is the list of papers and,
18
+ for each, every copy we know of with its licence. The schema (zod, in `src/adapters/venue-corpus/`)
19
+ is checked where the file is read; nothing after it re-validates (the study registry's pattern,
20
+ [`study-registry.md`](study-registry.md)). Codes and measurements stay in `measurements.json`, keyed by
21
+ the paper's `key`; prose (sources, caps, the strong-accept proxy) stays in `MANIFEST.md`.
22
+
23
+ ```json
24
+ {
25
+ "venue": "agent",
26
+ "editions": [
27
+ {
28
+ "edition": 2026,
29
+ "listed_from": "https://conf.researchr.org/home/icse-2026/agent-2026",
30
+ "read_on": "2026-11-03",
31
+ "accepted": 27
32
+ }
33
+ ],
34
+ "papers": [
35
+ {
36
+ "key": "2026-01",
37
+ "edition": 2026,
38
+ "group": "accepted",
39
+ "title": "A Catalogue of Evaluation Metrics for LLM-Based Multi-Agent Frameworks in Software Engineering",
40
+ "authors": [
41
+ "Ingrid Lima",
42
+ "Vitor Linhares",
43
+ "Anderson Martins Gomes",
44
+ "Paulo Maia"
45
+ ],
46
+ "abstract": "LLM-based Multi-Agent (LMA) frameworks have recently gained traction …",
47
+ "ids": { "doi": "10.1145/3786167.3788430" },
48
+ "copies": [
49
+ {
50
+ "version": "published",
51
+ "url": "https://doi.org/10.1145/3786167.3788430",
52
+ "licence": {
53
+ "id": "CC-BY-4.0",
54
+ "read_from": "https://api.crossref.org/works/10.1145/3786167.3788430",
55
+ "read_on": "2026-11-03"
56
+ },
57
+ "stored": []
58
+ }
59
+ ]
60
+ }
61
+ ]
62
+ }
63
+ ```
64
+
65
+ | field | values |
66
+ | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
67
+ | `venue` | the corpus folder's name, which is the venue preset's series: the preset id without its year (`agent` for `paperlint:agent-2027`) |
68
+ | `editions[]` | each edition of THIS venue the corpus covers: the year, the page that lists what it accepted, the date read; `accepted` (the count) when the page gives one |
69
+ | `papers[].key` | unique in the file; names the stored files and the measurement rows |
70
+ | `papers[].group` | `accepted`, `award`, or `sister` (corpus 2: papers of another venue) |
71
+ | `papers[].edition` | for `accepted` and `award`: one of `editions[].edition` |
72
+ | `papers[].venue`, `.year` | for `sister`: the other venue and its year; `listed_from` on the row says where it was found |
73
+ | `papers[].ids` | any of `doi`, `arxiv`, `dblp`, `s2`, `url` (the paper's page on the listing, when nothing else identifies it); at least one |
74
+ | `copies[].version` | `published`, `accepted`, `preprint` (OpenAlex's `publishedVersion` / `acceptedVersion` / `submittedVersion`), or `unknown` |
75
+ | `copies[].licence` | `id`, `read_from` (the page or API response it was read from, never inferred), `read_on` |
76
+ | `copies[].fetched_from` | required when `stored` is not empty: the URL the stored bytes were downloaded from |
77
+ | `copies[].stored` | what of this copy is in the corpus: `[]`, `["text"]`, `["pdf"]` or both; `"text"` covers every text variant of the paper |
78
+
79
+ The top level, the edition, the copy and the licence objects are strict, so a misspelt key is an error.
80
+ A paper row keeps any further fields as they are: the consumer's scripts read about forty of them
81
+ (award flags, page counts, where a PDF was found), and a strict row would force every corpus to drop
82
+ them to migrate.
83
+
84
+ 2. **The licence belongs to a copy, not to a paper.** The same paper is often CC BY in the proceedings and
85
+ under arXiv's non-exclusive licence as a preprint (one real 27-paper list had nine combinations, a
86
+ 16-paper one seven). A stored file is a copy of one version, so it is judged by that version's licence.
87
+ This follows OpenAlex, which records a licence per location ("Different locations of the same work can
88
+ carry different licenses"), and Crossref's per-work `license` array.
89
+
90
+ That a stored file **is** the copy it is attributed to is a recorded fact, not a construction: the
91
+ copy names `fetched_from`, and at most one copy of a paper may store each kind (two copies claiming
92
+ `pdf/<key>.pdf` is a finding). A file whose origin nobody recorded is stored under a copy with
93
+ `version: "unknown"`, which is allowed only with the licence `NOASSERTION`, and so permits nothing:
94
+ the record cannot be made to pass by attributing a file to whichever copy has the friendlier licence
95
+ without saying where the bytes came from.
96
+
97
+ 3. **The licence table, in one module** (`src/domain/licence.ts`). Any SPDX id or `LicenseRef-…`
98
+ parses; the table decides what it permits, and an id the table does not list permits nothing and
99
+ gets a finding of its own that names it (so a `CC-BY-3.0` does not hide the rest of the record, and
100
+ a typo is still loud).
101
+
102
+ | id | may store text | may store the PDF | why |
103
+ | -------------------------------------- | ---------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
104
+ | `CC0-1.0`, `CC-BY-4.0`, `CC-BY-SA-4.0` | yes | yes | "anyone who has access to a copy of the material may continue to redistribute it" (CC FAQ) |
105
+ | `CC-BY-NC-4.0`, `CC-BY-NC-SA-4.0` | when the project is non-commercial | when the project is non-commercial | non-commercial reproduction is granted; whether a repository is non-commercial is the project's to declare, not paperlint's to assume |
106
+ | `CC-BY-ND-4.0`, `CC-BY-NC-ND-4.0` | no | yes (NC: as above) | "the ND licenses do allow you to reproduce the material in unmodified form"; whether an extracted text is an adaptation is unsettled, so no |
107
+ | `LicenseRef-arxiv-nonexclusive-1.0` | no | no | it grants arXiv alone the right to distribute: "We are thus unable to grant others the right to distribute arXiv articles" |
108
+ | `LicenseRef-publisher` | no | no | no grant to third parties |
109
+ | `NOASSERTION` | no | no | the licence was not read |
110
+
111
+ The project declares itself non-commercial with one setting; without it an NC copy that is stored is a
112
+ finding that names the setting. SPDX ids where SPDX has one; `LicenseRef-…` where it has none, as SPDX
113
+ and REUSE prescribe. A version of a CC licence other than 4.0 gets its row when a corpus meets it.
114
+
115
+ 4. **Three rules, one family, `corpus/`.** The family is the folder they judge, as `paper/`, `repro/` and
116
+ `versions/` are; the names follow the ones those families already use (`paper/allowed-files-only`,
117
+ `cycle/record`). Structure and licence are separate rules because they are needed by different
118
+ projects: every corpus needs its structure held, and only a corpus that others can read needs its
119
+ licences judged.
120
+
121
+ | rule | reports | default |
122
+ | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
123
+ | `corpus/allowed-files-only` | a name in the corpus folder outside the fixed names (decision 5), any extension, plus names the settings add (#500's second rule, renamed from `venue/allowed-files-only`) | on |
124
+ | `corpus/record` | a corpus with `pdf/` or `text/` and no `papers.json`; a `papers.json` that does not parse, with the zod path of the first problem; a file in `pdf/` or `text/` that no copy's `stored` claims; a copy whose `stored` names a missing file; two copies of one paper storing one kind | on |
125
+ | `corpus/licence` | a stored file whose copy has no licence recorded (`NOASSERTION`, decided by the author 2026-11-24), or whose licence does not permit that kind (decision 3), including an id outside the table and an NC licence in a project not declared non-commercial | off, in no set |
126
+
127
+ Each finding names its cure: record the licence and where it was read, or remove the file and keep
128
+ the ids.
129
+
130
+ **Why the two structure rules are on by default.** They hold for every corpus whatever the venue and
131
+ whoever reads the repository: a `papers.json` that does not parse breaks the skill that reads it, and
132
+ a stray file is a file no reader knows the meaning of. They are silent where no corpus exists.
133
+
134
+ **Why the licence rule is off and in no set.** The same stored files are illegal in a public
135
+ repository and legal in a private one, and the rule cannot tell which it is in; that is a finding a
136
+ careful author can dispute ("The Default Set Is What The Venue Decides"). A project whose corpus
137
+ others read turns it on; a private one leaves it off. It belongs to none of today's sets
138
+ (`paperlint:writing` is about prose); when #524 adds `recommended` and `strict`, it is a candidate
139
+ for one of them.
140
+
141
+ **Where they report, and how paperlint reaches a corpus.** Today nothing under `venues/` is linted
142
+ ([`docs/venues.md`](../venues.md#what-checks-it)): rule blocks are scoped to paper files, and a rule
143
+ runs only for a file that exists. PR 1b adds a block for `<papers-root>/venues/*/`, anchored on the
144
+ corpus's `MANIFEST.md`; a corpus folder without `MANIFEST.md` (recognised by `papers.json`, `pdf/` or
145
+ `text/`) is reported by the same structural pass that reports stray files in a paper folder
146
+ (`src/folder-layout-rule.ts`), on a file ESLint does lint. The same PR keeps the corpus out of the
147
+ paper rules (#215, part 1): a `paper.tex` saved in a corpus is an accepted paper's source, not one of
148
+ the user's papers.
149
+
150
+ 5. **The fixed file names**: `papers.json`, `MANIFEST.md`, `measurements.json`, `pdf/<key>.pdf`,
151
+ `text/<key>.txt` and `text/<key>.<variant>.txt` (one paper extracted twice, by `pdftotext` and by
152
+ `pdfminer`, or its first page alone), `deep-reads/<key>.md`, `sources/` (saved listing and call
153
+ pages, not judged). The author's own paper is never in a corpus: its text belongs in its paper folder.
154
+
155
+ 6. **What is a copy, and what is not.** `pdf/` and `text/` hold copies; the rule judges only them.
156
+ Titles, abstracts, and short quotes inside codes or deep reads are metadata and quotation, not copies
157
+ (decided below).
158
+
159
+ 7. **A behaviour change, said plainly.** `docs/venues.md` and `study-accepted-papers` today tell the
160
+ skill to extract a text for every paper. From PR 1a they tell it to read the copy's licence first and
161
+ extract only what the table permits, keeping ids for the rest; "the PDFs are not committed" becomes
162
+ "a PDF is kept when its copy's licence permits it" (#302's proposal). The rule then turns the old
163
+ instruction's output into findings on a corpus that opts in.
164
+
165
+ ## Measured on a real consumer (2026-11-24)
166
+
167
+ Before writing the rule, a consumer's six corpora were inventoried, git-tracked files only:
168
+
169
+ | stored third-party copies | permitted by the recorded licence | non-commercial | ND, extracted text | not permitted | no licence recorded | source of the copy not recorded |
170
+ | ------------------------: | --------------------------------: | -------------: | -----------------: | ------------: | ------------------: | ------------------------------: |
171
+ | 217 | 19 | 3–4 | 5 | 12 | 179 | 18 |
172
+
173
+ The 12 not permitted are extracted texts of arXiv preprints under the non-exclusive licence, two of them in
174
+ a corpus that had already dropped the same papers' PDFs for that licence and kept the text. The 179 are
175
+ whole corpora built before a licence field existed; for most of them the licence is one request away (the
176
+ copy is an arXiv or ACL Anthology paper), which is what PR 2 automates. No corpus there has a `papers.json`
177
+ yet, so until it migrates the rule reports one finding per corpus that stores copies, not 12 + 179.
178
+
179
+ Identity is thinner than a DOI: 4 of 16, 23 of 49, 12 of 48 and 11 of 17 rows in four of its lists have
180
+ neither a DOI nor an arXiv id, only the conference page's id or URL. Hence `ids.url`.
181
+
182
+ ## Migration
183
+
184
+ A corpus migrates by a script the consumer runs once, which writes `papers.json` from its old lists and
185
+ renames stored files to `pdf/<key>.pdf` and `text/<key>[.<variant>].txt`; old fields stay on the rows, and
186
+ a script that read a path from an old field reads the derived path instead. The author's own paper moves
187
+ to its paper folder. Licences that were never read stay `NOASSERTION` until PR 2's lister fills them in.
188
+
189
+ ## The order of the pull requests
190
+
191
+ | PR | what | part of |
192
+ | --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
193
+ | 1a | the schema and its parser, the licence table, this note, `docs/venues.md` and `study-accepted-papers` rewritten to the record (decision 7) | #302 |
194
+ | 1b | `corpus/record` and `corpus/licence` with their pages under `docs/rules/corpus/`, linked from `docs/venues.md` and (the licence rule) `docs/optional-rules.md`; a test that every rule id has the one-slash shape of "A Rule Id Names Its Subject"; the lint block that reaches a corpus, the structural check for a corpus without `MANIFEST.md`, and the corpus kept out of the paper rules | #302, #215 (1) |
195
+ | 2 | the venue lister #568 asks for, as a shared tested script that `study-accepted-papers` calls (not a new CLI command), writing `papers.json` rows with ids and licences | #568 |
196
+ | 3 | the current cycle's venue has a corpus (matched by series, decision 1), the first of #356's three parts | #356 (1 of 3) |
197
+ | 4 | `corpus/allowed-files-only` (#500's second rule) | #500 (1 of 2) |
198
+
199
+ PR 1a stands alone: a corpus written by hand, or by the skill, validates. Readers that compare a paper with
200
+ the corpus (#608 abstract rewrites, #465 the panel's demands, a title and scope comparison) come after PR 2.
201
+ The source order of PR 2 was measured on 2026-11-24, keyless, against three venues whose accepted
202
+ lists were known (27, 16 and 34 papers):
203
+
204
+ | field | first source | then | never |
205
+ | ----------------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- |
206
+ | the list | Crossref, filtered by the proceedings' full container title (ACM); the Anthology volume `.bib`/`.xml` (ACL) | OpenAlex by source id, as a cross-check; the programme page for papers without a DOI | |
207
+ | abstract | the programme's paper page | Semantic Scholar by DOI, OpenAlex, arXiv OAI-PMH | Crossref (none deposited) |
208
+ | arXiv id | Semantic Scholar and OpenAlex, their union | | Crossref `relation` (always empty) |
209
+ | licence of the published copy | Crossref `license[]`, every URL kept | | |
210
+ | licence of the arXiv copy | arXiv OAI-PMH `<license>` | | OpenAlex (null for the arXiv default, once wrong), Semantic Scholar (its licence is of whichever copy it picked) |
211
+
212
+ Three gaps stay open: IEEE deposits no Creative Commons licence (only text-and-data-mining policy URLs), the
213
+ ACL Anthology states one licence for the whole site and none per paper, and the licence printed inside a PDF
214
+ can belong to another copy (an arXiv PDF printing its published version's footer), so the PDF is not a
215
+ source. Semantic Scholar's venue search and the arXiv Atom API refused every request that day (HTTP 429),
216
+ so neither was measured.
217
+
218
+ ## Decided by the author (2026-11-24)
219
+
220
+ - **A copy with no licence recorded is a finding**, like a licence that forbids it: a check that passes
221
+ what it cannot see looks the same as one that checked. On the consumer above that is 179 findings once
222
+ it migrates and opts in, until PR 2's lister fills the licences in.
223
+ - **Titles and abstracts are kept as metadata whatever the licence**, and `docs/venues.md` says so. Every
224
+ scholarly API (Crossref, Semantic Scholar, arXiv) serves them openly and every corpus examined keeps
225
+ them; no source settles that storing them is allowed.
226
+
227
+ ## Rejected
228
+
229
+ - **One licence per paper.** It cannot say which copy a stored file is, and the same paper's two copies
230
+ routinely differ.
231
+ - **A dataset-level licence, as S2ORC or the ACL OCL corpus declare.** The corpus mixes publishers and
232
+ licences; one line cannot be true for all of it.
233
+ - **A licence sidecar only (one row per stored file), the old lists left as they are.** It catches the same
234
+ violations in one PR and cannot have two copies claim one file, but it gives no list a lister can write
235
+ and #356, #608 and #465 can read, and a hand-written path drifts. Its one strength is kept: each stored
236
+ file is a recorded fact (`fetched_from`, one storing copy per kind).
237
+ - **Rejecting an unlisted licence id at parse time.** One `CC-BY-3.0` would hide every other check and
238
+ break every later reader until a release; it gets a finding instead.
239
+ - **Paths to stored files written in the record.** A second fact that can drift from the folder; the path
240
+ is derived from `key`.
241
+
242
+ ## What it does not check
243
+
244
+ - That a stored file is the copy it is attributed to: it checks that the attribution and its source were
245
+ recorded.
246
+ - Whether the recorded licence is the true one: it checks that a licence was read and from where.
247
+ - Whether the repository is public, or the project really non-commercial.
248
+ - The legal questions the sources leave open (extraction under ND, what counts as non-commercial); the
249
+ table takes the cautious reading for the first and asks the project for the second.
250
+ - Anything outside `pdf/` and `text/` until PR 4.
package/docs/venues.md CHANGED
@@ -137,7 +137,8 @@ merged 2026-10-27 09:35 UTC, the wait for review included), AIDC with the IEEE f
137
137
 
138
138
  `<papers-root>` is the papers directory: `papersDir` in the project's `paperlint.json`, default
139
139
  `papers/`. The corpus lives there, beside the paper folders and not inside any of them, because it
140
- belongs to the venue: every paper aimed at that venue reads the same one.
140
+ belongs to the venue: every paper aimed at that venue reads the same one. The corpus folder is named
141
+ after the venue preset's series, the preset id without its year: `agent` for `paperlint:agent-2027`.
141
142
 
142
143
  ```text
143
144
  <papers-root>/
@@ -151,12 +152,12 @@ belongs to the venue: every paper aimed at that venue reads the same one.
151
152
  The skill `study-accepted-papers` makes it, the first time it runs for that venue. It always asks
152
153
  which mode to run, and suggests one from what exists:
153
154
 
154
- | mode | when | stage | what it adds to the corpus |
155
- | -------- | ---------------------------------------------- | -------- | ----------------------------------------------------------- |
156
- | A idea | a target venue and an idea; no `paper.tex` yet | 2 venue | the winner and ordinary lists, their measurements (L0, L1) |
157
- | B design | a planned claim and measurements; no text yet | 2 venue | the same, if not there yet |
158
- | C draft | the paper's text exists | 5 review | the deep reads (L2), one file per paper |
159
- | D final | near-final text, the deadline close | 5 review | nothing new; it compares wording against the closest papers |
155
+ | mode | when | stage | what it adds to the corpus |
156
+ | -------- | ---------------------------------------------- | -------- | --------------------------------------------------------------------------- |
157
+ | A idea | a target venue and an idea; no `paper.tex` yet | 2 venue | the rows of the award winners and the ordinary papers, their codes (L0, L1) |
158
+ | B design | a planned claim and measurements; no text yet | 2 venue | the same, if not there yet |
159
+ | C draft | the paper's text exists | 5 review | the deep reads (L2), one file per paper |
160
+ | D final | near-final text, the deadline close | 5 review | nothing new; it compares wording against the closest papers |
160
161
 
161
162
  So the corpus usually appears at stage 2, right after `find-venue` and before the study is
162
163
  designed, when what the venue rewards can still shape the study. A paper that first runs the skill
@@ -167,21 +168,134 @@ what is missing.
167
168
 
168
169
  ```text
169
170
  <papers-root>/venues/<venue>/
170
- ├── MANIFEST.md ← the sources, the years, what was capped, the stand-in for "strong accept" and how often it occurs
171
- ├── the winner and ordinary lists
172
- ├── measurements.json ← the codes of L0 and L1, one row per paper
173
- ├── text/ ← the text extracted from each paper
174
- ├── deep-reads/ ← one file per paper read in full (L2), usable by any paper
175
- ├── the scripts that fetched and measured
176
- └── a labelled subfolder for corpus 2: award papers on the topic at other venues
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
173
+ ├── measurements.json ← the codes of L0 and L1, one row per paper, keyed by its key
174
+ ├── pdf/<key>.pdf ← a paper's PDF, only when a copy's licence permits keeping it
175
+ ├── text/<key>.txt ← its extracted text, on the same condition
176
+ ├── text/<key>.<variant>.txt ← a second extraction of the same paper (another extractor, the first page alone)
177
+ ├── deep-reads/<key>.md ← one file per paper read in full (L2), usable by any paper
178
+ └── sources/ ← the listing and call pages as they were read
177
179
  ```
178
180
 
179
- Only `MANIFEST.md`, `measurements.json`, `text/` and `deep-reads/` have fixed names; the lists, the
180
- scripts and the corpus-2 folder are named by whoever runs the skill. The PDFs are not committed: the
181
- manifest records each paper's identifier and the command that fetches it.
181
+ These are all the names a corpus holds. The award winners and the ordinary accepted papers are rows
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`.
187
+
188
+ ### The record, `papers.json`
189
+
190
+ One row per paper, and in it every copy of the paper we know of with that copy's licence. A real
191
+ row, from a workshop's 2026 list:
192
+
193
+ ```json
194
+ {
195
+ "venue": "agent",
196
+ "editions": [
197
+ {
198
+ "edition": 2026,
199
+ "listed_from": "https://conf.researchr.org/home/icse-2026/agent-2026",
200
+ "read_on": "2026-11-03",
201
+ "accepted": 27
202
+ }
203
+ ],
204
+ "papers": [
205
+ {
206
+ "key": "2026-01",
207
+ "edition": 2026,
208
+ "group": "accepted",
209
+ "title": "A Catalogue of Evaluation Metrics for LLM-Based Multi-Agent Frameworks in Software Engineering",
210
+ "authors": [
211
+ "Ingrid Lima",
212
+ "Vitor Linhares",
213
+ "Anderson Martins Gomes",
214
+ "Paulo Maia"
215
+ ],
216
+ "abstract": "LLM-based Multi-Agent (LMA) frameworks have recently gained traction …",
217
+ "ids": { "doi": "10.1145/3786167.3788430" },
218
+ "copies": [
219
+ {
220
+ "version": "published",
221
+ "url": "https://doi.org/10.1145/3786167.3788430",
222
+ "licence": {
223
+ "id": "CC-BY-4.0",
224
+ "read_from": "https://api.crossref.org/works/10.1145/3786167.3788430",
225
+ "read_on": "2026-11-03"
226
+ },
227
+ "stored": []
228
+ }
229
+ ]
230
+ }
231
+ ]
232
+ }
233
+ ```
234
+
235
+ The fields, their values and which are required are the JSON Schema
236
+ [`skills/study-accepted-papers/papers.schema.json`](../skills/study-accepted-papers/papers.schema.json),
237
+ generated from the parser (`src/adapters/venue-corpus/index.ts`; `npm run schema:venue-corpus`
238
+ rewrites it, and a test fails when it is stale). A schema cannot say that a key is unique, that a
239
+ paper's edition is one of `editions[].edition`, or that a copy that stores a file names where it was
240
+ fetched from; the parser checks those and the skill's script reports each with its path.
241
+
242
+ Every web address is `http` or `https`. The top level, an edition, a copy, a licence and `ids` are
243
+ strict, so a misspelt key is an error; a paper row keeps any further field as it is, for a project's
244
+ own scripts. A copy whose origin nobody recorded is `unknown`, and its licence can only be
245
+ `NOASSERTION`. The paths of stored files are not written in the record: they follow from `key`.
246
+
247
+ ### Licences: what a corpus may keep
248
+
249
+ A licence belongs to a **copy**, not to a paper. The same paper is often CC BY in the proceedings and
250
+ under arXiv's non-exclusive licence as a preprint, and a stored file is a copy of one version, so it
251
+ is judged by that version's licence.
252
+
253
+ Before it downloads a PDF or extracts a text, `study-accepted-papers` reads each copy's licence,
254
+ writes it in `papers.json`, and keeps a PDF or a text only when a copy's licence permits that kind;
255
+ for the other papers it keeps the ids. What each licence permits is one table, in paperlint's
256
+ `src/domain/licence.ts`, with its reasons in [the design note](design/venue-corpus.md#what-is-decided)
257
+ (decision 3). In short: CC0 1.0, CC BY 4.0 and CC BY-SA 4.0 permit both; an ND licence permits the
258
+ PDF and not an extracted text; an NC licence permits only in a project declared non-commercial; arXiv's
259
+ non-exclusive licence, a publisher's own and a licence not read (`NOASSERTION`) permit neither; and an
260
+ id the table does not list, another CC version included, permits nothing. The
261
+ setting by which a project declares itself non-commercial is not shipped yet: until it is, an NC
262
+ copy is treated as not permitted.
263
+
264
+ The skill's script prints, for each paper and each kind, the copy to keep or each copy's reason:
265
+
266
+ ```text
267
+ node <skills>/study-accepted-papers/scripts/corpus-licences.js agent
268
+ 2026-01 text: keep the published copy (CC-BY-4.0), https://doi.org/10.1145/3786167.3788430
269
+ 2026-01 pdf: keep the published copy (CC-BY-4.0), https://doi.org/10.1145/3786167.3788430
270
+ ```
271
+
272
+ It takes the venue, and finds `<papers-root>/venues/<venue>/papers.json` itself: the project is the git
273
+ top level of the folder it runs in, and the papers roots are `papersDir` in the project's
274
+ `paperlint.json`. Exactly one root may hold the venue; none or several is exit 1, naming the folders.
275
+ It parses `papers.json` first, and a record that does not parse is reported with the path of each
276
+ problem, exit 1.
182
277
 
183
- A mechanism the venue adds to the generic ten (M1–M10, kept beside the skill), or one that does not
184
- hold there, is written in `MANIFEST.md`.
278
+ **Titles and abstracts are kept as metadata whatever the licence.** Every scholarly API (Crossref,
279
+ Semantic Scholar, arXiv) serves them openly; they are not copies. Neither are the short quotes inside
280
+ the codes or a deep read.
281
+
282
+ ### Where a copy's licence is read from
283
+
284
+ Measured on 2026-11-24, without API keys, on three venues whose accepted lists were known (27, 16 and
285
+ 34 papers). `read_from` names the page or the API response the licence was read from:
286
+
287
+ | what | read it from | then | never |
288
+ | ----------------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- |
289
+ | the list | Crossref, filtered by the proceedings' full container title (ACM); the Anthology volume `.bib`/`.xml` (ACL) | OpenAlex by source id, as a cross-check; the programme page for papers without a DOI | |
290
+ | abstract | the programme's paper page | Semantic Scholar by DOI, OpenAlex, arXiv OAI-PMH | Crossref (none deposited) |
291
+ | arXiv id | Semantic Scholar and OpenAlex, their union | | Crossref `relation` (always empty) |
292
+ | licence of the published copy | Crossref `license[]`, every URL kept | | |
293
+ | licence of the arXiv copy | arXiv OAI-PMH `<license>` | | OpenAlex (null for the arXiv default, once wrong), Semantic Scholar (its licence is of whichever copy it picked) |
294
+
295
+ **The licence line printed inside a PDF is not a source**: it can belong to another copy (an arXiv
296
+ PDF printing its published version's footer). Two gaps stay open: IEEE deposits no Creative Commons
297
+ licence (only text-and-data-mining policy URLs), and the ACL Anthology states one licence for the
298
+ whole site and none per paper. Where no source gives a copy's licence, it stays `NOASSERTION`.
185
299
 
186
300
  ### Who reads it
187
301
 
@@ -197,9 +311,18 @@ hold there, is written in `MANIFEST.md`.
197
311
  **No rule reads the corpus yet.** `paperlint lint` treats a folder in the papers directory as a paper
198
312
  only when it holds `PIPELINE-STATUS.md`, `paper.tex` or `paperlint.json`, and `venues/` holds none of
199
313
  them, so nothing in it is linted. The hook that refuses misplaced files does not act there either:
200
- it acts only inside a paper folder.
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.
316
+
317
+ Three rules of a family `corpus/` are planned for later releases, **not shipped yet**:
318
+
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 |
201
324
 
202
- What is checked is the other side: a corpus started **inside** a paper folder. A `venues/` or
325
+ What is checked today is the other side: a corpus started **inside** a paper folder. A `venues/` or
203
326
  `venue-corpus/` folder at a paper's root is reported, with this place as where it goes
204
327
  ([the paper folder's layout](rules/paper/allowed-files-only.md)), and the hook refuses to create one.
205
328
 
@@ -1,4 +1,4 @@
1
- <!-- vigiles:sha256:f83563bacd9214c9 compiled from eslint-rules/CLAUDE.md.spec.ts -->
1
+ <!-- vigiles:sha256:35cb814eec608ef3 compiled from eslint-rules/CLAUDE.md.spec.ts -->
2
2
 
3
3
  # CLAUDE.md
4
4
 
@@ -40,6 +40,10 @@ the checks push every paper toward a blog post.
40
40
 
41
41
  ## Rules
42
42
 
43
+ ### A Rule Id Names Its Subject
44
+
45
+ **Guidance only** — A rule id is `<family>/<rule>`: one slash, kebab-case, as ESLint's `plugin/rule`. The family is the folder or record the rule judges (`paper/`, `repro/`, `cycle/`, `corpus/`), never the kind of check and never a venue; a new family only when no existing one judges that subject. The same check keeps the same name in every family: `allowed-files-only` for a folder's whitelist of names, `record` for a record file read against its schema, `layout` for a folder's shape. So related rules sort together and a reader who knows one family can guess another's rule. The rule's page is `docs/rules/<family>/<rule>.md`, held by `src/rule-docs.test.ts`. The author asked for this on 2026-11-24.
46
+
43
47
  ### Lint Rule Over Script
44
48
 
45
49
  **Guidance only** — A check over a syntax tree is a lint rule, not a script. It fires in the editor on save, gets the AST for free, and has a suppression syntax people already know. A script is for corpus-wide questions — index connectivity, ratios across many files. When the work has to run a program, a script may do the work and write facts to a JSON file, and a rule judges that file: the verdict still lands in the engine.
@@ -37,6 +37,9 @@ the checks push every paper toward a blog post.
37
37
  tic, plus a check that no claim was softened or strengthened.`,
38
38
  },
39
39
  rules: {
40
+ "a-rule-id-names-its-subject": guidance(
41
+ "A rule id is `<family>/<rule>`: one slash, kebab-case, as ESLint's `plugin/rule`. The family is the folder or record the rule judges (`paper/`, `repro/`, `cycle/`, `corpus/`), never the kind of check and never a venue; a new family only when no existing one judges that subject. The same check keeps the same name in every family: `allowed-files-only` for a folder's whitelist of names, `record` for a record file read against its schema, `layout` for a folder's shape. So related rules sort together and a reader who knows one family can guess another's rule. The rule's page is `docs/rules/<family>/<rule>.md`, held by `src/rule-docs.test.ts`. The author asked for this on 2026-11-24.",
42
+ ),
40
43
  "lint-rule-over-script": guidance(
41
44
  "A check over a syntax tree is a lint rule, not a script. It fires in the editor on save, gets the AST for free, and has a suppression syntax people already know. A script is for corpus-wide questions — index connectivity, ratios across many files. When the work has to run a program, a script may do the work and write facts to a JSON file, and a rule judges that file: the verdict still lands in the engine.",
42
45
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paperlint",
3
- "version": "20.1.2",
3
+ "version": "20.2.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",
@@ -20,6 +20,7 @@
20
20
  "check": "node scripts/check.ts",
21
21
  "pipeline": "node scripts/pipeline.ts",
22
22
  "refresh-deadlines": "node --conditions=paperlint-source scripts/refresh-deadlines/main.ts",
23
+ "schema:venue-corpus": "node --conditions=paperlint-source scripts/venue-corpus-schema.ts skills/study-accepted-papers/papers.schema.json",
23
24
  "sync:skills": "node scripts/sync-skills.ts",
24
25
  "fmt": "prettier --write .",
25
26
  "fmt:check": "prettier --check . && npm run sync:skills -- --check",
@@ -49,6 +49,7 @@ export const SKILL_ENTRIES: readonly string[] = [
49
49
  "skills/paper-pipeline/scripts/extract-ref-facts.mjs",
50
50
  "skills/pc-panel-review/scripts/prior-reviews.ts",
51
51
  "skills/run-agent-grid/scripts/grid-guard.ts",
52
+ "skills/study-accepted-papers/scripts/corpus-licences.ts",
52
53
  "skills/verify-citations/scripts/bib-authors.mjs",
53
54
  "skills/verify-citations/scripts/verify-cites.mjs",
54
55
  ];
@@ -0,0 +1,39 @@
1
+ /**
2
+ * `npm run schema:venue-corpus`: the script writes the schema the parser generates, where it is told.
3
+ */
4
+ import { readFileSync } from "node:fs";
5
+ import { dirname, join } from "node:path";
6
+ import { fileURLToPath } from "node:url";
7
+ import { describe, expect, it } from "vitest";
8
+ import { venueCorpusSchemaText } from "../src/adapters/venue-corpus/index.ts";
9
+ import { runNode, useTempDir } from "../test/support.ts";
10
+
11
+ const SCRIPT = join(
12
+ dirname(fileURLToPath(import.meta.url)),
13
+ "venue-corpus-schema.ts",
14
+ );
15
+
16
+ describe("venue-corpus-schema.ts", () => {
17
+ const dir = useTempDir();
18
+
19
+ it("🔴 writes the generated schema to the file it is given", () => {
20
+ const out = join(dir, "papers.schema.json");
21
+ expect(
22
+ runNode(SCRIPT, [out], { nodeArgs: ["--conditions=paperlint-source"] }),
23
+ ).toEqual({ status: 0, stdout: "", stderr: "" });
24
+ expect(readFileSync(out, "utf8")).toBe(venueCorpusSchemaText());
25
+ });
26
+
27
+ it("no output file, or more than one: the usage, exit 2, nothing written", () => {
28
+ const usage = {
29
+ status: 2,
30
+ stdout: "",
31
+ stderr: "usage: node venue-corpus-schema.ts <output-file>\n",
32
+ };
33
+ const opts = { nodeArgs: ["--conditions=paperlint-source"] };
34
+ expect(runNode(SCRIPT, [], opts)).toEqual(usage);
35
+ expect(runNode(SCRIPT, [join(dir, "a"), join(dir, "b")], opts)).toEqual(
36
+ usage,
37
+ );
38
+ });
39
+ });
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Regenerates the JSON Schema of a venue corpus's papers.json from the record's parser
4
+ * (`src/adapters/venue-corpus`) into the file it is given. `npm run schema:venue-corpus` writes the
5
+ * shipped one (`SCHEMA_FILE`); a test fails until the committed file is the one this writes.
6
+ *
7
+ * Usage: node venue-corpus-schema.ts <output-file>
8
+ */
9
+ import { writeFileSync } from "node:fs";
10
+ import { resolve } from "node:path";
11
+ import { venueCorpusSchemaText } from "#src/adapters/venue-corpus/index";
12
+
13
+ const [out, ...rest] = process.argv.slice(2);
14
+ if (out === undefined || rest.length > 0) {
15
+ process.stderr.write("usage: node venue-corpus-schema.ts <output-file>\n");
16
+ process.exitCode = 2;
17
+ } else writeFileSync(resolve(out), venueCorpusSchemaText());
@@ -8,15 +8,17 @@ const __dirname = __plDirname(__filename);
8
8
  import {
9
9
  latexReader,
10
10
  sourcesCodec
11
- } from "../../../dist/skill-chunks/chunk-L3NJUJUP.js";
11
+ } from "../../../dist/skill-chunks/chunk-CXAGKT44.js";
12
12
  import {
13
- callerPath,
14
13
  decoded,
15
- nodeFiles,
16
14
  readPaper,
17
15
  runText
18
- } from "../../../dist/skill-chunks/chunk-6NU6CXUS.js";
16
+ } from "../../../dist/skill-chunks/chunk-J5XYPERO.js";
19
17
  import "../../../dist/skill-chunks/chunk-C2G5EK7S.js";
18
+ import {
19
+ callerPath,
20
+ nodeFiles
21
+ } from "../../../dist/skill-chunks/chunk-5KCU4WTN.js";
20
22
  import "../../../dist/skill-chunks/chunk-4MHEJ6FR.js";
21
23
  import "../../../dist/skill-chunks/chunk-PJ4KNV4J.js";
22
24
 
@@ -10,17 +10,19 @@ import {
10
10
  parseLatex,
11
11
  sourcesCodec,
12
12
  visit
13
- } from "../../../dist/skill-chunks/chunk-L3NJUJUP.js";
13
+ } from "../../../dist/skill-chunks/chunk-CXAGKT44.js";
14
14
  import {
15
- messageOf,
16
- nodeFiles,
17
15
  paperRecord,
18
16
  readPaper
19
- } from "../../../dist/skill-chunks/chunk-6NU6CXUS.js";
17
+ } from "../../../dist/skill-chunks/chunk-J5XYPERO.js";
20
18
  import {
21
19
  chunk,
22
20
  last
23
21
  } from "../../../dist/skill-chunks/chunk-C2G5EK7S.js";
22
+ import {
23
+ messageOf,
24
+ nodeFiles
25
+ } from "../../../dist/skill-chunks/chunk-5KCU4WTN.js";
24
26
  import "../../../dist/skill-chunks/chunk-4MHEJ6FR.js";
25
27
  import "../../../dist/skill-chunks/chunk-PJ4KNV4J.js";
26
28