paperlint 16.8.0 → 17.1.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 (300) hide show
  1. package/CLAUDE.md +10 -2
  2. package/CONTRIBUTING.md +1 -1
  3. package/README.md +17 -14
  4. package/dist/adapters/latex/abstract.d.ts +7 -1
  5. package/dist/adapters/latex/abstract.d.ts.map +1 -1
  6. package/dist/adapters/latex/abstract.js +19 -4
  7. package/dist/adapters/latex/abstract.js.map +1 -1
  8. package/dist/adapters/latex/captions.d.ts +6 -5
  9. package/dist/adapters/latex/captions.d.ts.map +1 -1
  10. package/dist/adapters/latex/captions.js +14 -30
  11. package/dist/adapters/latex/captions.js.map +1 -1
  12. package/dist/adapters/latex/index.d.ts +1 -1
  13. package/dist/adapters/latex/index.d.ts.map +1 -1
  14. package/dist/adapters/latex/index.js +5 -2
  15. package/dist/adapters/latex/index.js.map +1 -1
  16. package/dist/adapters/latex/prose.d.ts +6 -0
  17. package/dist/adapters/latex/prose.d.ts.map +1 -1
  18. package/dist/adapters/latex/prose.js +18 -12
  19. package/dist/adapters/latex/prose.js.map +1 -1
  20. package/dist/cli.d.ts +6 -1
  21. package/dist/cli.d.ts.map +1 -1
  22. package/dist/cli.js +16 -8
  23. package/dist/cli.js.map +1 -1
  24. package/dist/domain/register.d.ts +23 -1
  25. package/dist/domain/register.d.ts.map +1 -1
  26. package/dist/domain/register.js +37 -14
  27. package/dist/domain/register.js.map +1 -1
  28. package/dist/domain/term-definitions.d.ts +48 -0
  29. package/dist/domain/term-definitions.d.ts.map +1 -0
  30. package/dist/domain/term-definitions.js +228 -0
  31. package/dist/domain/term-definitions.js.map +1 -0
  32. package/dist/domain/tex-document.d.ts +11 -0
  33. package/dist/domain/tex-document.d.ts.map +1 -1
  34. package/dist/domain/tex-document.js.map +1 -1
  35. package/dist/eslint-rules/review-frontmatter.js +5 -5
  36. package/dist/eslint-rules/review-frontmatter.schema.json +15 -8
  37. package/dist/eslint-rules/sibling-frontmatter.d.ts.map +1 -1
  38. package/dist/folder-venue-rule.d.ts +1 -1
  39. package/dist/folder-venue-rule.d.ts.map +1 -1
  40. package/dist/folder-venue-rule.js +4 -2
  41. package/dist/folder-venue-rule.js.map +1 -1
  42. package/dist/hooks-notice.d.ts +3 -3
  43. package/dist/hooks-notice.d.ts.map +1 -1
  44. package/dist/hooks-notice.js +41 -8
  45. package/dist/hooks-notice.js.map +1 -1
  46. package/dist/link-skills.d.ts +5 -0
  47. package/dist/link-skills.d.ts.map +1 -1
  48. package/dist/link-skills.js +7 -0
  49. package/dist/link-skills.js.map +1 -1
  50. package/dist/ports/latex.d.ts +11 -1
  51. package/dist/ports/latex.d.ts.map +1 -1
  52. package/dist/presets.d.ts +21 -2
  53. package/dist/presets.d.ts.map +1 -1
  54. package/dist/presets.js +66 -17
  55. package/dist/presets.js.map +1 -1
  56. package/dist/readability.d.ts +12 -2
  57. package/dist/readability.d.ts.map +1 -1
  58. package/dist/readability.js +76 -3
  59. package/dist/readability.js.map +1 -1
  60. package/dist/register-bands.d.ts +16 -5
  61. package/dist/register-bands.d.ts.map +1 -1
  62. package/dist/register-bands.js +56 -17
  63. package/dist/register-bands.js.map +1 -1
  64. package/dist/skills/argument-arc/scripts/headings-core.d.ts +12 -0
  65. package/dist/skills/argument-arc/scripts/headings.d.ts +2 -0
  66. package/dist/skills/cold-read-diff/scripts/cold-read-core.d.ts +12 -0
  67. package/dist/skills/cold-read-diff/scripts/readers.d.ts +2 -1
  68. package/dist/term-definition-rules.d.ts +26 -0
  69. package/dist/term-definition-rules.d.ts.map +1 -0
  70. package/dist/term-definition-rules.js +137 -0
  71. package/dist/term-definition-rules.js.map +1 -0
  72. package/dist/tex-paper.d.ts +6 -0
  73. package/dist/tex-paper.d.ts.map +1 -1
  74. package/dist/tex-paper.js +10 -0
  75. package/dist/tex-paper.js.map +1 -1
  76. package/dist/tex-requirements.d.ts +2 -0
  77. package/dist/tex-requirements.d.ts.map +1 -1
  78. package/dist/tex-requirements.js +9 -0
  79. package/dist/tex-requirements.js.map +1 -1
  80. package/dist/tex-venue-rules.d.ts +3 -2
  81. package/dist/tex-venue-rules.d.ts.map +1 -1
  82. package/dist/tex-venue-rules.js +3 -2
  83. package/dist/tex-venue-rules.js.map +1 -1
  84. package/docs/configuration.md +2 -2
  85. package/{skills/paper-pipeline/references → docs/design}/acceptance-gate.md +50 -53
  86. package/docs/design/paper-pipeline-history.md +217 -0
  87. package/docs/design/skill-provenance.md +132 -0
  88. package/docs/design/study-modes.md +1 -1
  89. package/docs/design/verify-citations-history.md +135 -0
  90. package/docs/design/writing-exemplars.md +19 -0
  91. package/docs/install.md +7 -4
  92. package/docs/layout.md +5 -4
  93. package/docs/optional-rules.md +4 -0
  94. package/docs/osf-artifact.md +54 -0
  95. package/docs/pipeline.md +171 -0
  96. package/docs/render.md +82 -0
  97. package/docs/rules/paper/folder-venue-leftover.md +10 -7
  98. package/docs/rules/tex/contrast-frames.md +1 -2
  99. package/docs/rules/tex/max-caption-words.md +82 -0
  100. package/docs/rules/tex/max-paragraph-words.md +2 -2
  101. package/docs/rules/tex/negated-sentences.md +96 -0
  102. package/docs/rules/tex/term-before-definition.md +103 -0
  103. package/docs/rules/tex/term-defined-twice.md +62 -0
  104. package/docs/rules/tex/venue-leftover.md +13 -1
  105. package/docs/rules.md +23 -18
  106. package/docs/skills.md +16 -21
  107. package/docs/submission.md +14 -0
  108. package/docs/texlive-install-decision.md +1 -1
  109. package/docs/toolchain.md +11 -11
  110. package/eslint-rules/review-frontmatter.schema.json +15 -8
  111. package/eslint-rules/review-frontmatter.test.mjs +8 -5
  112. package/eslint-rules/review-frontmatter.ts +5 -5
  113. package/eslint.config.mjs +1 -5
  114. package/hooks/paper-status-gates.sh +21 -4
  115. package/hooks/paper-status-gates.test.ts +51 -0
  116. package/lib/skill-checks.test.mjs +2 -6
  117. package/lib/skill-trigger-cases.mjs +12 -97
  118. package/lib/skill-trigger-cases.test.ts +0 -6
  119. package/package.json +3 -1
  120. package/presets/acm-sigconf.md +1 -1
  121. package/presets/agenticdev.jsonc +5 -2
  122. package/presets/agenticdev.md +4 -2
  123. package/presets/aidc.jsonc +14 -1
  124. package/presets/aidc.md +3 -2
  125. package/presets/aisec.jsonc +9 -3
  126. package/presets/aisec.md +4 -1
  127. package/presets/ase.jsonc +145 -0
  128. package/presets/ase.md +178 -0
  129. package/presets/ccs.jsonc +87 -0
  130. package/presets/ccs.md +184 -0
  131. package/presets/icse.jsonc +100 -0
  132. package/presets/icse.md +126 -0
  133. package/presets/ieee-conference.md +1 -1
  134. package/presets/sp.jsonc +152 -0
  135. package/presets/sp.md +160 -0
  136. package/presets/venue-profile.schema.json +22 -3
  137. package/scripts/harness-api.frozen.json +0 -4
  138. package/scripts/pipeline.ts +481 -0
  139. package/skills/CLAUDE.md +2 -2
  140. package/skills/CLAUDE.md.spec.ts +26 -1
  141. package/skills/analyze-sibling-paper/SKILL.md +2 -20
  142. package/skills/analyze-sibling-paper/SKILL.md.spec.ts +9 -19
  143. package/skills/argument-arc/SKILL.md +32 -18
  144. package/skills/argument-arc/SKILL.md.spec.ts +43 -17
  145. package/skills/argument-arc/scripts/headings-core.js +46 -0
  146. package/skills/argument-arc/scripts/headings-core.ts +65 -0
  147. package/skills/argument-arc/scripts/headings.js +15 -0
  148. package/skills/argument-arc/scripts/headings.test.ts +105 -0
  149. package/skills/argument-arc/scripts/headings.ts +20 -0
  150. package/skills/build-benchmark/SKILL.md +1 -12
  151. package/skills/build-benchmark/SKILL.md.spec.ts +15 -11
  152. package/skills/build-label-page/SKILL.md.spec.ts +11 -0
  153. package/skills/camera-ready/SKILL.md +1 -8
  154. package/skills/camera-ready/SKILL.md.spec.ts +8 -7
  155. package/skills/cold-read-diff/SKILL.md +36 -25
  156. package/skills/cold-read-diff/SKILL.md.spec.ts +44 -24
  157. package/skills/cold-read-diff/scripts/cold-read-core.js +63 -6
  158. package/skills/cold-read-diff/scripts/cold-read-core.ts +81 -6
  159. package/skills/cold-read-diff/scripts/cold-read.js +1 -1
  160. package/skills/cold-read-diff/scripts/cold-read.test.ts +66 -0
  161. package/skills/cold-read-diff/scripts/cold-read.ts +1 -1
  162. package/skills/cold-read-diff/scripts/readers.js +2 -1
  163. package/skills/cold-read-diff/scripts/readers.ts +2 -1
  164. package/skills/draft-paper/SKILL.md +16 -29
  165. package/skills/draft-paper/SKILL.md.spec.ts +27 -28
  166. package/skills/extend-paper/SKILL.md +7 -16
  167. package/skills/extend-paper/SKILL.md.spec.ts +18 -15
  168. package/skills/find-venue/SKILL.md +11 -24
  169. package/skills/find-venue/SKILL.md.spec.ts +19 -23
  170. package/skills/harden-paper/SKILL.md +62 -290
  171. package/skills/harden-paper/SKILL.md.spec.ts +82 -304
  172. package/skills/harden-paper/harden-paper.harness.mjs +1 -2
  173. package/skills/jobs.ts +25 -0
  174. package/skills/label-agent-runs/SKILL.md.spec.ts +10 -0
  175. package/skills/map-prior-work/SKILL.md +5 -4
  176. package/skills/map-prior-work/SKILL.md.spec.ts +13 -3
  177. package/skills/paper-pipeline/SKILL.md +80 -278
  178. package/skills/paper-pipeline/SKILL.md.spec.ts +130 -276
  179. package/skills/paper-pipeline/description-language.eval.mjs +0 -22
  180. package/skills/paper-pipeline/framing-vs-vocabulary.eval.mjs +0 -29
  181. package/skills/paper-pipeline/paper-pipeline.harness.mjs +0 -16
  182. package/skills/paper-pipeline/pipeline-firing.eval.mjs +7 -29
  183. package/skills/paper-pipeline/pipeline-language.eval.mjs +0 -52
  184. package/skills/paper-pipeline/references/artifact-checklist.md +6 -1
  185. package/skills/paper-pipeline/references/body-vs-appendix.md +3 -4
  186. package/skills/paper-pipeline/references/pipeline-status-template.md +8 -10
  187. package/skills/paper-pipeline/references/review-ratchet.md +4 -7
  188. package/skills/paper-pipeline/references/venue-bar.md +1 -2
  189. package/skills/paper-pipeline/references/writing-craft.md +21 -281
  190. package/skills/paper-status/SKILL.md +17 -20
  191. package/skills/paper-status/SKILL.md.spec.ts +23 -19
  192. package/skills/pc-panel-review/SKILL.md +66 -93
  193. package/skills/pc-panel-review/SKILL.md.spec.ts +75 -92
  194. package/skills/plan-paper-timeline/SKILL.md +7 -29
  195. package/skills/plan-paper-timeline/SKILL.md.spec.ts +16 -28
  196. package/skills/plan-paper-timeline/plan-paper-timeline.effects.harness.mjs +2 -2
  197. package/skills/render-paper/check-render.sh +2 -2
  198. package/skills/render-paper/render-paper.harness.mjs +4 -20
  199. package/skills/research-ideate/SKILL.md +15 -32
  200. package/skills/research-ideate/SKILL.md.spec.ts +25 -31
  201. package/skills/rewrite-unclear/SKILL.md +15 -14
  202. package/skills/rewrite-unclear/SKILL.md.spec.ts +24 -15
  203. package/skills/rewrite-unclear/rewrite-unclear.eval.ts +2 -3
  204. package/skills/run-agent-grid/SKILL.md +3 -3
  205. package/skills/run-agent-grid/SKILL.md.spec.ts +10 -2
  206. package/skills/study-accepted-papers/SKILL.md +5 -5
  207. package/skills/study-accepted-papers/SKILL.md.spec.ts +27 -4
  208. package/skills/submit-paper/SKILL.md +37 -31
  209. package/skills/submit-paper/SKILL.md.spec.ts +46 -30
  210. package/skills/submit-paper/check-deanon.sh +1 -1
  211. package/skills/tighten-paper/SKILL.md +43 -68
  212. package/skills/tighten-paper/SKILL.md.spec.ts +51 -67
  213. package/skills/verify-citations/SKILL.md +18 -112
  214. package/skills/verify-citations/SKILL.md.spec.ts +27 -114
  215. package/src/adapters/latex/abstract.test.ts +42 -0
  216. package/src/adapters/latex/abstract.ts +23 -6
  217. package/src/adapters/latex/captions.test.ts +36 -38
  218. package/src/adapters/latex/captions.ts +16 -33
  219. package/src/adapters/latex/index.test.ts +11 -0
  220. package/src/adapters/latex/index.ts +5 -2
  221. package/src/adapters/latex/prose.ts +23 -11
  222. package/src/cli.ts +26 -5
  223. package/src/domain/register.test.ts +65 -0
  224. package/src/domain/register.ts +72 -16
  225. package/src/domain/term-definitions.test.ts +240 -0
  226. package/src/domain/term-definitions.ts +329 -0
  227. package/src/domain/tex-document.ts +12 -0
  228. package/src/domain/venue-name.test.ts +4 -4
  229. package/src/folder-venue-rule.test.ts +23 -2
  230. package/src/folder-venue-rule.ts +8 -8
  231. package/src/hooks-notice.test.ts +127 -0
  232. package/src/hooks-notice.ts +50 -10
  233. package/src/link-skills.ts +9 -0
  234. package/src/new-paper.test.ts +2 -2
  235. package/src/paper-settings-commands.test.ts +1 -1
  236. package/src/ports/latex.ts +11 -0
  237. package/src/preset-card-rule.test.ts +4 -0
  238. package/src/presets.test.ts +141 -4
  239. package/src/presets.ts +113 -22
  240. package/src/readability.test.ts +92 -0
  241. package/src/readability.ts +113 -5
  242. package/src/register-bands.test.ts +81 -1
  243. package/src/register-bands.ts +88 -23
  244. package/src/rule-cases.test.ts +122 -2
  245. package/src/term-definition-rules.test.ts +150 -0
  246. package/src/term-definition-rules.ts +189 -0
  247. package/src/tex-paper.test.ts +18 -1
  248. package/src/tex-paper.ts +11 -0
  249. package/src/tex-requirements.ts +15 -0
  250. package/src/tex-venue-rules.test.ts +45 -1
  251. package/src/tex-venue-rules.ts +8 -3
  252. package/src/venue-rules.test.ts +2 -2
  253. package/templates/paper/PIPELINE-STATUS.md +19 -19
  254. package/dist/paper-prose.d.ts +0 -17
  255. package/dist/paper-prose.d.ts.map +0 -1
  256. package/dist/paper-prose.js +0 -46
  257. package/dist/paper-prose.js.map +0 -1
  258. package/skills/grade-paper-writing/SKILL.md +0 -494
  259. package/skills/grade-paper-writing/SKILL.md.spec.ts +0 -501
  260. package/skills/grade-paper-writing/__snapshots__/prose-lint.test.ts.snap +0 -84
  261. package/skills/grade-paper-writing/fixtures/control_gopen.txt +0 -1
  262. package/skills/grade-paper-writing/fixtures/control_human_paper.txt +0 -1
  263. package/skills/grade-paper-writing/fixtures/rewrite.txt +0 -1
  264. package/skills/grade-paper-writing/fixtures/specimen.txt +0 -1
  265. package/skills/grade-paper-writing/fixtures/structure-checks.md +0 -22
  266. package/skills/grade-paper-writing/grade-paper-writing.eval.mjs +0 -19
  267. package/skills/grade-paper-writing/grade-paper-writing.harness.mjs +0 -23
  268. package/skills/grade-paper-writing/prose-lint.mjs +0 -602
  269. package/skills/grade-paper-writing/prose-lint.test.ts +0 -413
  270. package/skills/osf-artifact-upload/SKILL.md +0 -58
  271. package/skills/osf-artifact-upload/SKILL.md.spec.ts +0 -65
  272. package/skills/osf-artifact-upload/osf-artifact-upload.eval.mjs +0 -22
  273. package/skills/osf-artifact-upload/osf-artifact-upload.harness.ts +0 -102
  274. package/skills/paper-adversarial-review/SKILL.md +0 -100
  275. package/skills/paper-adversarial-review/SKILL.md.spec.ts +0 -107
  276. package/skills/paper-adversarial-review/paper-adversarial-review.eval.mjs +0 -19
  277. package/skills/paper-adversarial-review/paper-adversarial-review.harness.mjs +0 -24
  278. package/skills/paper-pipeline/grade-paper-writing-ablation.eval.mjs +0 -1274
  279. package/skills/paper-pipeline/references/credit-criteria.md +0 -69
  280. package/skills/paper-pipeline/references/occupancy-2026-08-06-probe/README.md +0 -35
  281. package/skills/paper-pipeline/references/occupancy-2026-08-06-probe/run_retext.mjs +0 -24
  282. package/skills/paper-pipeline/references/occupancy-2026-08-06-probe/sentences.txt +0 -11
  283. package/skills/paper-pipeline/references/occupancy-2026-08-06-probe/test_sentences.py +0 -25
  284. package/skills/paper-pipeline/references/occupancy-2026-08-06-prose-checkers.md +0 -538
  285. package/skills/paper-pipeline/references/occupancy-2026-08-06-reproducible-tooling.md +0 -431
  286. package/skills/paper-pipeline/references/occupancy-2026-08-06-staleness-and-orchestration.md +0 -592
  287. package/skills/paper-pipeline/repro/2026-08-08-parent-replication.mjs +0 -92
  288. package/skills/render-paper/SKILL.md +0 -123
  289. package/skills/render-paper/SKILL.md.spec.ts +0 -130
  290. package/skills/render-paper/render-paper.eval.mjs +0 -19
  291. package/skills/submission-portal/SKILL.md +0 -129
  292. package/skills/submission-portal/SKILL.md.spec.ts +0 -134
  293. package/skills/submission-portal/submission-portal.eval.mjs +0 -15
  294. package/skills/submission-portal/submission-portal.test.ts +0 -12
  295. package/skills/sweep-design-space/SKILL.md +0 -232
  296. package/skills/sweep-design-space/SKILL.md.spec.ts +0 -248
  297. package/skills/sweep-design-space/sweep-design-space.eval.mjs +0 -19
  298. package/skills/sweep-design-space/sweep-design-space.harness.mjs +0 -23
  299. package/src/paper-prose.test.ts +0 -78
  300. package/src/paper-prose.ts +0 -67
@@ -4,7 +4,7 @@ description: Verify every citation is a real work with correct metadata, and tha
4
4
  allowed-tools: [Read, Write, Edit, Grep, Glob, Bash, WebSearch, WebFetch, Agent]
5
5
  ---
6
6
 
7
- <!-- vigiles:sha256:519bc353fb71f90c compiled from skills/verify-citations/SKILL.md.spec.ts -->
7
+ <!-- vigiles:sha256:25a05cd3468a3a26 compiled from skills/verify-citations/SKILL.md.spec.ts -->
8
8
 
9
9
  # verify-citations — every cite real, the delta explicit
10
10
 
@@ -20,18 +20,14 @@ your delta over the nearest prior work isn't spelled out. This skill closes both
20
20
  bibliography changes, including the edit you make on the last day. Scorecard row **`cites`** in
21
21
  `<paper-dir>/PIPELINE-STATUS.md`; see the CONTINUOUS section of `paper-pipeline`.
22
22
 
23
- - **A pass dated before the current text is STALE, and stale reads as green.** The date in the `cites`
24
- row is compared against the paper's own mtime — because a `☑` from three days and forty edits ago is worse than a `☐`: it looks closed.
23
+ - **The trigger is the bibliography, not the text.** A `cites` row dated before a `\cite` was added or
24
+ moved does not cover that cite; a prose edit that moves no `\cite` leaves the row as it is.
25
+ `paper/refs-checked` says when the last build's references were not checked.
25
26
  - **"We checked last cycle" does not count.** Say it plainly, because it is the exact sentence that
26
27
  ships a fabricated cite: a review round adds text, added text adds citations, and the run that
27
28
  cleared the bibliography never saw them.
28
29
  - A single new `\cite` is enough to fire it. There is no batch size below which this is skippable.
29
30
 
30
- *This skill used to sit at a number in the middle of a stage list, which made it read like a one-shot
31
- step you tick off and move past — one of the three concrete errors that numbering produced, and the
32
- reason the list was replaced on 2026-08-03. The project rule was always that it re-runs every cycle;
33
- the position contradicted the rule, and the position is what people followed.*
34
-
35
31
  ## 1. Every \cite is a real work with correct metadata
36
32
 
37
33
  For EACH reference in the `.bib` / bibliography:
@@ -76,10 +72,7 @@ and positioned. If you genuinely shouldn't cite it, know why.
76
72
  Sections 1–4 are LLM judgment: good for the *delta* and the *expected-citation* calls, but non-reproducible
77
73
  for the mechanical part — "does this id actually resolve?". `scripts/verify-cites.mjs` compiles that part into
78
74
  a deterministic, cacheable gate (same "prose isn't policy → make it a self-checking artifact" move as
79
- `build-benchmark`). Ported fresh (own code) from the OSS mining note
80
- `papers/research/oss-skill-mining-imbad0202.md` (STEAL #1) + the CVE/PoC-SHA pinning from
81
- `oss-skill-mining-euzun.md`.
82
-
75
+ `build-benchmark`).
83
76
  **What it does.** For each citation it hits four real databases — Crossref, OpenAlex, Semantic Scholar,
84
77
  arXiv — DOI/arXiv-id first, then a title search. Title comparison is **robust**, not raw Levenshtein: it
85
78
  also does token-set containment + acronym expansion, so a split subtitle ("Gotta Catch 'Em All" vs the
@@ -147,23 +140,9 @@ build (the requests already in flight still land); the entries it would have ans
147
140
  ## 5b. The author-list gate — `scripts/bib-authors.mjs`
148
141
 
149
142
  `verify-cites.mjs` answers *"does this citation exist, and does the id point at it?"*. There is a second
150
- question it structurally cannot ask, and on 2026-08-24 that gap cost three real defects in a bibliography
151
- this skill had already reported as **"ALL 23 cites verified real"**:
152
-
153
- > We write `@inproceedings{... NeurIPS 2023}`. Is our author list the **NeurIPS** one — or did we copy the
154
- > **arXiv preprint's**?
155
-
156
- The preprint and the published version are frequently **different lists**, and every existence check passes
157
- either way: the paper is real, the id resolves, the title matches. What was found:
158
-
159
- | entry | ours | the version we CLAIM to cite |
160
- |---|---|---|
161
- | `schick2023toolformer` | 8 authors | NeurIPS 2023 has **9** — **Eric Hambro** was simply absent |
162
- | `dehghani2022efficiency` | Dehghani, Arnab, Beyer, Vaswani, Tay | ICLR 2022: Dehghani, **Tay**, Arnab, Beyer, Vaswani |
163
- | `raji2021benchmark` | Raji, Bender, Paullada, Denton, Hanna | NeurIPS D&B 2021: Raji, **Denton**, Bender, **Hanna**, **Paullada** |
164
-
165
- The first is a **real person dropped from a citation in an archival publication** — by our own scale that is
166
- heavier than a typo, and it is exactly the class §"any regalia about third parties" already warns about.
143
+ question it structurally cannot ask: is our author list the one of the version we cite (the proceedings),
144
+ or the arXiv preprint's? The two are often different lists, and every existence check passes either way.
145
+ The three defects that found it: `docs/design/verify-citations-history.md` in the package.
167
146
 
168
147
  **How to run.**
169
148
  ```
@@ -180,35 +159,10 @@ not a reading of the source. A `.bib` named is read as itself.
180
159
  difference is real and not a metadata glitch. Entries that themselves declare a preprint venue are out of
181
160
  scope (a preprint entry is allowed to carry preprint metadata).
182
161
 
183
- ⚠️ **Discovery credit, and why it is NOT a dependency.** The class was found by running **rebiber**
184
- (`yuchenlin/rebiber`), which rewrites bib entries into their DBLP records. Re-measured 2026-09-27 on rebiber
185
- 1.4.0 (GitHub commit `b917e36`, the pin in `render-paper/checkers-requirements.txt`; the PyPI package is
186
- a 2021 release upstream disowns):
187
- - **Install: no longer broken, but heavy.** It installs in 36 s in a clean venv (bibtexparser 2.0.1 wheel,
188
- rebiber built from source) — and carries **409 MB** of bundled venue data.
189
- - **Rewrites: now optional.** `--dry-run --report` previews and leaves the file untouched; `-s True` shortens
190
- venues (NAACL 2019 becomes `Proc. of NAACL-HLT` instead of a 160-character booktitle).
191
- - **Bundled data still misses what live DBLP finds.** `raji2021benchmark` stayed an arXiv entry, local
192
- index and `--live-lookup` alike, as it did in August.
193
-
194
- So the reason not to depend on it is now scope, not breakage: we need the **comparison** of an author list
195
- against the published record, not a rewrite of the entry, and that is one DBLP query with zero dependencies.
196
-
197
- 🔴 **Two design decisions that are load-bearing, both learned by measurement the same day:**
198
- 1. **Compare surname SEQUENCES, nothing else.** A first cut reported 13 differences of which **11 were
199
- "Last, First" vs "First Last"** — pure formatting. A checker that cries 13 when 2 are real is read once
200
- and then ignored; this repo has already killed a check that way (33 findings, 22 of them live files).
201
- 2. **A failed lookup is NOT a skip.** The first run printed *"PASS: no author-list disagreement"* while
202
- **9 of 27 entries had never been examined** (DBLP answered 429). Failures now retry with backoff and land
203
- in a separate bucket that downgrades the verdict to **PARTIAL** — never `PASS`.
204
-
205
- **Tests:** `node scripts/bib-authors.test.mjs` — 11 assertions, offline, with the three real entries above
206
- pinned as regressions. Mutation-checked: collapsing the name normalisation makes it fail.
207
-
208
- **Pure/impure split + tests.** The verdict logic (`reduceVerdict` / `classifyResolver` / `checkNvd` /
209
- `checkCommit` + the string helpers) is a pure function of `(citation, evidence)` — the live HTTP layer only
210
- shapes raw API responses into that evidence. `scripts/verify-cites.test.mjs` exercises the reducer offline with
211
- injected fixtures (`node scripts/verify-cites.test.mjs`); no test touches the network.
162
+ Two rules hold the checker honest: it compares surname sequences only (`Last, First` vs
163
+ `First Last` is formatting, not a finding), and a failed lookup is never a skip — it lands in its own
164
+ bucket and turns the verdict to **PARTIAL**, never `PASS`. Why DBLP and not rebiber, and how both rules
165
+ were measured: `docs/design/verify-citations-history.md` in the package.
212
166
 
213
167
  **Honest limits.** Semantic Scholar rate-limits (HTTP 429) without an API key, and arXiv's export API can be
214
168
  unreachable behind some proxies — both degrade to `unreachable` (→ contribute nothing, never `false`). And,
@@ -244,10 +198,6 @@ English CS bib. Identifier-prefix / trailing-punctuation mangling (`doi:`, `arXi
244
198
  describes* — and those are different questions, which is why they are different tools and not one flag.
245
199
  Run both; neither replaces the other.
246
200
 
247
- 🔴 **Moved 2026-08-26 out of a script and into rules** (ladder step 3, the `CLAUDE.md` beside the papers).
248
- It used to be one script, `verify-refs.mjs`; the measurement half stayed a script and the judgement half
249
- became twelve ESLint rules over the facts it writes.
250
-
251
201
  ```
252
202
  # 1. measure: parse the bibliography bibtex opened (build the paper first), ask CrossRef/arXiv, write _build/refs.facts.json
253
203
  node .claude/skills/paper-pipeline/scripts/extract-ref-facts.mjs <paper-dir>
@@ -257,43 +207,13 @@ node .claude/skills/paper-pipeline/scripts/extract-ref-facts.mjs <paper-dir> --o
257
207
  npx eslint --no-config-lookup --config eslint.config.mjs "<paper-dir>/_build/refs.facts.json"
258
208
  ```
259
209
 
260
- **Why it exists, stated plainly: `verify-cites.mjs` never compares an author list.** It parses `author`
261
- out of a `.bib` into the citation object and then does nothing with it — the string appears twice in 991
262
- lines, once in a doc comment and once in the extractor. So of the nine broken references this project
263
- shipped across two nights, the shapes it structurally cannot see are the ones about ATTRIBUTION: seven
264
- wrong initials on correct surnames, a reversed author order, an invented award. This leg closes that,
265
- the same one MedSci Skills (arXiv:2606.09500) closes with `verify_refs.py`.
266
-
267
- | | `verify-cites.mjs` (§5) | the `refs/*` rules (§5b) |
268
- |---|---|---|
269
- | question | does the id resolve to *something* | is *that* the work the entry describes |
270
- | registries | Crossref · OpenAlex · Semantic Scholar · arXiv | CrossRef · arXiv (the two that matter for CS) |
271
- | authors | **never compared** | surname multiset **+ order-sensitive first author** |
272
- | year | ±1 on a title search | exact, and only against the record that dates the cited version |
273
- | preprint→published | not asked | arXiv `journal_ref`/`doi` present and no venue named → say so |
274
- | what it could not check | folded into `unresolvable` | **enumerated, one rule per reason, never counted as verified** |
275
- | tests | `verify-cites.test.mjs` — not a `*.harness.mjs`, so `npx vigiles test` never runs it | `src/references.test.ts` (the `refs/*` rules in `src/reference-rules.ts`) + `skills/paper-pipeline/scripts/extract-ref-facts.test.mjs` and `.harness.mjs`, under the package's 100% line and branch coverage gate |
276
-
277
- **The uncovered set is the point.** A reference with no resolvable identifier is a FINDING here
278
- (`refs/no-identifier`), and every partial comparison is another (`refs/partial-check`, one messageId per
279
- reason). On this project's submitted bibliography that set is 17 entries of 67 — an npm package, a Supreme
280
- Court dissent, an FAA circular, Dijkstra. None of them is a defect; all of them are things a model checker
281
- would have reported as fine. Being able to hand a reviewer the list of what was NOT machine-verified is a
282
- property no model-driven pass has.
283
-
284
- 🔴 **`.bib` papers were never checked by the old script — two dead legs, both measured 2026-08-26.**
285
- `refs.bib` was not in its source list (so `agenticdev-2026` and `aisec-2026` answered "nothing to check"),
286
- and its `.bib` regex required a closing `}` on its own line, which neither real file has (`parsed 0
287
- references`). The `.bib` half now goes through `@retorquere/bibtex-parser`. Two of the three papers are
288
- therefore being checked for the first time.
289
-
290
- **Every check is exercised.** `src/references.test.ts` drives the `refs/*` rules, and `npm run coverage`
291
- fails CI if any line or branch of them goes unexercised. Run `npx vitest run src/references.test.ts`
292
- after any edit to the rules.
210
+ The difference from §5: `verify-cites.mjs` never compares an author list or an exact year; the `refs/*`
211
+ rules do, and a reference they cannot check (no identifier, a partial comparison) is reported as a
212
+ finding, one rule per reason, never counted as verified. Why, and what it found: `docs/design/verify-citations-history.md` in the package.
293
213
 
294
214
  ## Rules
295
- - **Re-run on every `\cite` added or moved.** A `cites` row older than the paper's text is a stale pass,
296
- not a green one — "we checked last cycle" is not a verification.
215
+ - **Re-run on every `\cite` added or moved.** A `cites` row older than that change does not cover
216
+ it — "we checked last cycle" is not a verification.
297
217
  - No cite ships unverified. Exists + correct metadata + says-what-you-claim, or it's `% VERIFY`.
298
218
  - Never fabricate to fill a gap — soften the claim instead.
299
219
  - The delta over the nearest neighbor is prose, not an implication.
@@ -305,22 +225,8 @@ after any edit to the rules.
305
225
  ## Compose with
306
226
  - **draft-paper** — related-work and the delta sentence are drafted there; this skill audits them.
307
227
  - **map-prior-work** — fan-out prior-art search; use it to resolve hard-to-find cites and to surface
308
- the expected-but-missing citation. ⚠️ **Was `deep-research` until 2026-08-31 — no such skill has
309
- ever existed in this base** (0 matches on disk), and the name appeared BOTH here and in this
310
- skill's own `description`. A pointer to a non-existent skill fails silently: the step is simply
311
- not performed, and the compose line still reads as if coverage were arranged.
228
+ the expected-but-missing citation.
312
229
  - **analyze-sibling-paper** — when a resolved cite turns out to be a close neighbor, that skill does
313
230
  the deep overlap/scoop analysis this one is too shallow for.
314
231
  - **pc-panel-review** — its novelty/related-work reviewer will probe the delta and hunt uncited neighbors;
315
232
  clear this skill first so that lens finds nothing.
316
-
317
- ## Provenance
318
- Both papers grounded their novelty delta over the nearest prior work explicitly, and that framing is what
319
- made them land:
320
- - **AgenticDev 2026 — "Measuring the Wrong Number":** positioned against Kapoor et al. *"AI Agents That
321
- Matter"* and Dehghani et al. *"The Efficiency Misnomer"* — the delta being a cost-aware,
322
- correctness-gated *measurement* where those argued the problem.
323
- - **AISec 2026 @ CCS — "Safety Theater":** positioned against Ptacek & Newsham (the classic
324
- evasion-testing framing), **AgentDojo**, and **IsolateGPT** — the delta being a static, mutation-and-
325
- ablation evaluation of real command-guards rather than a new defense. Each of these was verified real,
326
- with correct venue/year, before submit.
@@ -1,10 +1,9 @@
1
1
  // Compiled to SKILL.md by `vigiles compile`. Edit THIS file, never the markdown.
2
2
  //
3
- // Adopted 2026-08-17 (batch 3). Body carried over VERBATIM so the compiled diff shows
4
- // only what the compiler adds. No `disallowedTools` fence yet — the field landed on
5
- // `SkillSpec` in vigiles branch `claude/skill-disallowed-tools` and is not in a release
6
- // this repo installs, so writing one here would not compile.
7
3
  import { experimental_skill } from "vigiles/spec";
4
+ import type { Flow } from "../../scripts/pipeline.ts";
5
+ import analyzeSiblingPaper from "../analyze-sibling-paper/SKILL.md.spec.ts";
6
+ import mapPriorWork from "../map-prior-work/SKILL.md.spec.ts";
8
7
 
9
8
  export default experimental_skill({
10
9
  name: "verify-citations",
@@ -36,18 +35,14 @@ your delta over the nearest prior work isn't spelled out. This skill closes both
36
35
  bibliography changes, including the edit you make on the last day. Scorecard row **\`cites\`** in
37
36
  \`<paper-dir>/PIPELINE-STATUS.md\`; see the CONTINUOUS section of \`paper-pipeline\`.
38
37
 
39
- - **A pass dated before the current text is STALE, and stale reads as green.** The date in the \`cites\`
40
- row is compared against the paper's own mtime — because a \`☑\` from three days and forty edits ago is worse than a \`☐\`: it looks closed.
38
+ - **The trigger is the bibliography, not the text.** A \`cites\` row dated before a \`\\cite\` was added or
39
+ moved does not cover that cite; a prose edit that moves no \`\\cite\` leaves the row as it is.
40
+ \`paper/refs-checked\` says when the last build's references were not checked.
41
41
  - **"We checked last cycle" does not count.** Say it plainly, because it is the exact sentence that
42
42
  ships a fabricated cite: a review round adds text, added text adds citations, and the run that
43
43
  cleared the bibliography never saw them.
44
44
  - A single new \`\\cite\` is enough to fire it. There is no batch size below which this is skippable.
45
45
 
46
- *This skill used to sit at a number in the middle of a stage list, which made it read like a one-shot
47
- step you tick off and move past — one of the three concrete errors that numbering produced, and the
48
- reason the list was replaced on 2026-08-03. The project rule was always that it re-runs every cycle;
49
- the position contradicted the rule, and the position is what people followed.*
50
-
51
46
  ## 1. Every \\cite is a real work with correct metadata
52
47
 
53
48
  For EACH reference in the \`.bib\` / bibliography:
@@ -92,10 +87,7 @@ and positioned. If you genuinely shouldn't cite it, know why.
92
87
  Sections 1–4 are LLM judgment: good for the *delta* and the *expected-citation* calls, but non-reproducible
93
88
  for the mechanical part — "does this id actually resolve?". \`scripts/verify-cites.mjs\` compiles that part into
94
89
  a deterministic, cacheable gate (same "prose isn't policy → make it a self-checking artifact" move as
95
- \`build-benchmark\`). Ported fresh (own code) from the OSS mining note
96
- \`papers/research/oss-skill-mining-imbad0202.md\` (STEAL #1) + the CVE/PoC-SHA pinning from
97
- \`oss-skill-mining-euzun.md\`.
98
-
90
+ \`build-benchmark\`).
99
91
  **What it does.** For each citation it hits four real databases — Crossref, OpenAlex, Semantic Scholar,
100
92
  arXiv — DOI/arXiv-id first, then a title search. Title comparison is **robust**, not raw Levenshtein: it
101
93
  also does token-set containment + acronym expansion, so a split subtitle ("Gotta Catch 'Em All" vs the
@@ -163,23 +155,9 @@ build (the requests already in flight still land); the entries it would have ans
163
155
  ## 5b. The author-list gate — \`scripts/bib-authors.mjs\`
164
156
 
165
157
  \`verify-cites.mjs\` answers *"does this citation exist, and does the id point at it?"*. There is a second
166
- question it structurally cannot ask, and on 2026-08-24 that gap cost three real defects in a bibliography
167
- this skill had already reported as **"ALL 23 cites verified real"**:
168
-
169
- > We write \`@inproceedings{... NeurIPS 2023}\`. Is our author list the **NeurIPS** one — or did we copy the
170
- > **arXiv preprint's**?
171
-
172
- The preprint and the published version are frequently **different lists**, and every existence check passes
173
- either way: the paper is real, the id resolves, the title matches. What was found:
174
-
175
- | entry | ours | the version we CLAIM to cite |
176
- |---|---|---|
177
- | \`schick2023toolformer\` | 8 authors | NeurIPS 2023 has **9** — **Eric Hambro** was simply absent |
178
- | \`dehghani2022efficiency\` | Dehghani, Arnab, Beyer, Vaswani, Tay | ICLR 2022: Dehghani, **Tay**, Arnab, Beyer, Vaswani |
179
- | \`raji2021benchmark\` | Raji, Bender, Paullada, Denton, Hanna | NeurIPS D&B 2021: Raji, **Denton**, Bender, **Hanna**, **Paullada** |
180
-
181
- The first is a **real person dropped from a citation in an archival publication** — by our own scale that is
182
- heavier than a typo, and it is exactly the class §"any regalia about third parties" already warns about.
158
+ question it structurally cannot ask: is our author list the one of the version we cite (the proceedings),
159
+ or the arXiv preprint's? The two are often different lists, and every existence check passes either way.
160
+ The three defects that found it: \`docs/design/verify-citations-history.md\` in the package.
183
161
 
184
162
  **How to run.**
185
163
  \`\`\`
@@ -196,35 +174,10 @@ not a reading of the source. A \`.bib\` named is read as itself.
196
174
  difference is real and not a metadata glitch. Entries that themselves declare a preprint venue are out of
197
175
  scope (a preprint entry is allowed to carry preprint metadata).
198
176
 
199
- ⚠️ **Discovery credit, and why it is NOT a dependency.** The class was found by running **rebiber**
200
- (\`yuchenlin/rebiber\`), which rewrites bib entries into their DBLP records. Re-measured 2026-09-27 on rebiber
201
- 1.4.0 (GitHub commit \`b917e36\`, the pin in \`render-paper/checkers-requirements.txt\`; the PyPI package is
202
- a 2021 release upstream disowns):
203
- - **Install: no longer broken, but heavy.** It installs in 36 s in a clean venv (bibtexparser 2.0.1 wheel,
204
- rebiber built from source) — and carries **409 MB** of bundled venue data.
205
- - **Rewrites: now optional.** \`--dry-run --report\` previews and leaves the file untouched; \`-s True\` shortens
206
- venues (NAACL 2019 becomes \`Proc. of NAACL-HLT\` instead of a 160-character booktitle).
207
- - **Bundled data still misses what live DBLP finds.** \`raji2021benchmark\` stayed an arXiv entry, local
208
- index and \`--live-lookup\` alike, as it did in August.
209
-
210
- So the reason not to depend on it is now scope, not breakage: we need the **comparison** of an author list
211
- against the published record, not a rewrite of the entry, and that is one DBLP query with zero dependencies.
212
-
213
- 🔴 **Two design decisions that are load-bearing, both learned by measurement the same day:**
214
- 1. **Compare surname SEQUENCES, nothing else.** A first cut reported 13 differences of which **11 were
215
- "Last, First" vs "First Last"** — pure formatting. A checker that cries 13 when 2 are real is read once
216
- and then ignored; this repo has already killed a check that way (33 findings, 22 of them live files).
217
- 2. **A failed lookup is NOT a skip.** The first run printed *"PASS: no author-list disagreement"* while
218
- **9 of 27 entries had never been examined** (DBLP answered 429). Failures now retry with backoff and land
219
- in a separate bucket that downgrades the verdict to **PARTIAL** — never \`PASS\`.
220
-
221
- **Tests:** \`node scripts/bib-authors.test.mjs\` — 11 assertions, offline, with the three real entries above
222
- pinned as regressions. Mutation-checked: collapsing the name normalisation makes it fail.
223
-
224
- **Pure/impure split + tests.** The verdict logic (\`reduceVerdict\` / \`classifyResolver\` / \`checkNvd\` /
225
- \`checkCommit\` + the string helpers) is a pure function of \`(citation, evidence)\` — the live HTTP layer only
226
- shapes raw API responses into that evidence. \`scripts/verify-cites.test.mjs\` exercises the reducer offline with
227
- injected fixtures (\`node scripts/verify-cites.test.mjs\`); no test touches the network.
177
+ Two rules hold the checker honest: it compares surname sequences only (\`Last, First\` vs
178
+ \`First Last\` is formatting, not a finding), and a failed lookup is never a skip — it lands in its own
179
+ bucket and turns the verdict to **PARTIAL**, never \`PASS\`. Why DBLP and not rebiber, and how both rules
180
+ were measured: \`docs/design/verify-citations-history.md\` in the package.
228
181
 
229
182
  **Honest limits.** Semantic Scholar rate-limits (HTTP 429) without an API key, and arXiv's export API can be
230
183
  unreachable behind some proxies — both degrade to \`unreachable\` (→ contribute nothing, never \`false\`). And,
@@ -260,10 +213,6 @@ English CS bib. Identifier-prefix / trailing-punctuation mangling (\`doi:\`, \`a
260
213
  describes* — and those are different questions, which is why they are different tools and not one flag.
261
214
  Run both; neither replaces the other.
262
215
 
263
- 🔴 **Moved 2026-08-26 out of a script and into rules** (ladder step 3, the \`CLAUDE.md\` beside the papers).
264
- It used to be one script, \`verify-refs.mjs\`; the measurement half stayed a script and the judgement half
265
- became twelve ESLint rules over the facts it writes.
266
-
267
216
  \`\`\`
268
217
  # 1. measure: parse the bibliography bibtex opened (build the paper first), ask CrossRef/arXiv, write _build/refs.facts.json
269
218
  node .claude/skills/paper-pipeline/scripts/extract-ref-facts.mjs <paper-dir>
@@ -273,43 +222,13 @@ node .claude/skills/paper-pipeline/scripts/extract-ref-facts.mjs <paper-dir> --o
273
222
  npx eslint --no-config-lookup --config eslint.config.mjs "<paper-dir>/_build/refs.facts.json"
274
223
  \`\`\`
275
224
 
276
- **Why it exists, stated plainly: \`verify-cites.mjs\` never compares an author list.** It parses \`author\`
277
- out of a \`.bib\` into the citation object and then does nothing with it — the string appears twice in 991
278
- lines, once in a doc comment and once in the extractor. So of the nine broken references this project
279
- shipped across two nights, the shapes it structurally cannot see are the ones about ATTRIBUTION: seven
280
- wrong initials on correct surnames, a reversed author order, an invented award. This leg closes that,
281
- the same one MedSci Skills (arXiv:2606.09500) closes with \`verify_refs.py\`.
282
-
283
- | | \`verify-cites.mjs\` (§5) | the \`refs/*\` rules (§5b) |
284
- |---|---|---|
285
- | question | does the id resolve to *something* | is *that* the work the entry describes |
286
- | registries | Crossref · OpenAlex · Semantic Scholar · arXiv | CrossRef · arXiv (the two that matter for CS) |
287
- | authors | **never compared** | surname multiset **+ order-sensitive first author** |
288
- | year | ±1 on a title search | exact, and only against the record that dates the cited version |
289
- | preprint→published | not asked | arXiv \`journal_ref\`/\`doi\` present and no venue named → say so |
290
- | what it could not check | folded into \`unresolvable\` | **enumerated, one rule per reason, never counted as verified** |
291
- | tests | \`verify-cites.test.mjs\` — not a \`*.harness.mjs\`, so \`npx vigiles test\` never runs it | \`src/references.test.ts\` (the \`refs/*\` rules in \`src/reference-rules.ts\`) + \`skills/paper-pipeline/scripts/extract-ref-facts.test.mjs\` and \`.harness.mjs\`, under the package's 100% line and branch coverage gate |
292
-
293
- **The uncovered set is the point.** A reference with no resolvable identifier is a FINDING here
294
- (\`refs/no-identifier\`), and every partial comparison is another (\`refs/partial-check\`, one messageId per
295
- reason). On this project's submitted bibliography that set is 17 entries of 67 — an npm package, a Supreme
296
- Court dissent, an FAA circular, Dijkstra. None of them is a defect; all of them are things a model checker
297
- would have reported as fine. Being able to hand a reviewer the list of what was NOT machine-verified is a
298
- property no model-driven pass has.
299
-
300
- 🔴 **\`.bib\` papers were never checked by the old script — two dead legs, both measured 2026-08-26.**
301
- \`refs.bib\` was not in its source list (so \`agenticdev-2026\` and \`aisec-2026\` answered "nothing to check"),
302
- and its \`.bib\` regex required a closing \`}\` on its own line, which neither real file has (\`parsed 0
303
- references\`). The \`.bib\` half now goes through \`@retorquere/bibtex-parser\`. Two of the three papers are
304
- therefore being checked for the first time.
305
-
306
- **Every check is exercised.** \`src/references.test.ts\` drives the \`refs/*\` rules, and \`npm run coverage\`
307
- fails CI if any line or branch of them goes unexercised. Run \`npx vitest run src/references.test.ts\`
308
- after any edit to the rules.
225
+ The difference from §5: \`verify-cites.mjs\` never compares an author list or an exact year; the \`refs/*\`
226
+ rules do, and a reference they cannot check (no identifier, a partial comparison) is reported as a
227
+ finding, one rule per reason, never counted as verified. Why, and what it found: \`docs/design/verify-citations-history.md\` in the package.
309
228
 
310
229
  ## Rules
311
- - **Re-run on every \`\\cite\` added or moved.** A \`cites\` row older than the paper's text is a stale pass,
312
- not a green one — "we checked last cycle" is not a verification.
230
+ - **Re-run on every \`\\cite\` added or moved.** A \`cites\` row older than that change does not cover
231
+ it — "we checked last cycle" is not a verification.
313
232
  - No cite ships unverified. Exists + correct metadata + says-what-you-claim, or it's \`% VERIFY\`.
314
233
  - Never fabricate to fill a gap — soften the claim instead.
315
234
  - The delta over the nearest neighbor is prose, not an implication.
@@ -321,23 +240,17 @@ after any edit to the rules.
321
240
  ## Compose with
322
241
  - **draft-paper** — related-work and the delta sentence are drafted there; this skill audits them.
323
242
  - **map-prior-work** — fan-out prior-art search; use it to resolve hard-to-find cites and to surface
324
- the expected-but-missing citation. ⚠️ **Was \`deep-research\` until 2026-08-31 — no such skill has
325
- ever existed in this base** (0 matches on disk), and the name appeared BOTH here and in this
326
- skill's own \`description\`. A pointer to a non-existent skill fails silently: the step is simply
327
- not performed, and the compose line still reads as if coverage were arranged.
243
+ the expected-but-missing citation.
328
244
  - **analyze-sibling-paper** — when a resolved cite turns out to be a close neighbor, that skill does
329
245
  the deep overlap/scoop analysis this one is too shallow for.
330
246
  - **pc-panel-review** — its novelty/related-work reviewer will probe the delta and hunt uncited neighbors;
331
247
  clear this skill first so that lens finds nothing.
332
248
 
333
- ## Provenance
334
- Both papers grounded their novelty delta over the nearest prior work explicitly, and that framing is what
335
- made them land:
336
- - **AgenticDev 2026 — "Measuring the Wrong Number":** positioned against Kapoor et al. *"AI Agents That
337
- Matter"* and Dehghani et al. *"The Efficiency Misnomer"* — the delta being a cost-aware,
338
- correctness-gated *measurement* where those argued the problem.
339
- - **AISec 2026 @ CCS — "Safety Theater":** positioned against Ptacek & Newsham (the classic
340
- evasion-testing framing), **AgentDojo**, and **IsolateGPT** — the delta being a static, mutation-and-
341
- ablation evaluation of real command-guards rather than a new defense. Each of these was verified real,
342
- with correct venue/year, before submit.`,
249
+ `,
343
250
  });
251
+
252
+ export const flow = {
253
+ stage: "review",
254
+ handsTo: () => [],
255
+ calls: () => [analyzeSiblingPaper, mapPriorWork],
256
+ } satisfies Flow;
@@ -44,6 +44,13 @@ describe("abstractText — what TeX prints, as plain text", () => {
44
44
  });
45
45
  });
46
46
 
47
+ it("a brace group prints its contents, nested groups too", () => {
48
+ expect(text("", "{Braced} words {print {their} text}.")).toEqual({
49
+ ok: true,
50
+ value: "Braced words print their text.",
51
+ });
52
+ });
53
+
47
54
  it("citations and comments are dropped; formatting commands say what their argument says", () => {
48
55
  expect(
49
56
  text(
@@ -154,6 +161,21 @@ describe("abstractText — where the refusal stands, and what is not read at all
154
161
  ]);
155
162
  });
156
163
 
164
+ it("an abstract inside a macro definition is not the paper's abstract, for the text and the span alike", () => {
165
+ const src = doc(
166
+ "\\newcommand{\\draft}{\\begin{abstract}old draft\\end{abstract}}",
167
+ "Real one.",
168
+ );
169
+ const span = latexReader.abstractSpan(src);
170
+ expect([
171
+ latexReader.abstractText(src),
172
+ span && src.slice(span.start, span.end),
173
+ ]).toStrictEqual([
174
+ { ok: true, value: "Real one." },
175
+ "\\begin{abstract}\nReal one.\n\\end{abstract}",
176
+ ]);
177
+ });
178
+
157
179
  it("no abstract environment: said so", () => {
158
180
  expect(
159
181
  latexReader.abstractText(
@@ -278,3 +300,23 @@ describe("abstractText — the edges of what the source may hold", () => {
278
300
  expect(abstractOfTree(tree, "")).toEqual({ ok: true, value: "A" });
279
301
  });
280
302
  });
303
+
304
+ describe("abstractSpan — where the abstract stands, for a rule that leaves it out", () => {
305
+ it("🔴 the whole environment, \\begin to \\end, in the source as given", () => {
306
+ const src = doc("", "We find \\emph{gates}.");
307
+ const span = latexReader.abstractSpan(src);
308
+ expect(span && src.slice(span.start, span.end)).toBe(
309
+ "\\begin{abstract}\nWe find \\emph{gates}.\n\\end{abstract}",
310
+ );
311
+ });
312
+
313
+ it("none without an abstract, and none in a comment or after the document ends", () => {
314
+ expect(
315
+ [
316
+ "\\begin{document}\nText.\n\\end{document}\n",
317
+ "% \\begin{abstract}x\\end{abstract}\n\\begin{document}\n\\end{document}\n",
318
+ "\\begin{document}\n\\end{document}\n\\begin{abstract}x\\end{abstract}\n",
319
+ ].map((s) => latexReader.abstractSpan(s)),
320
+ ).toEqual([null, null, null]);
321
+ });
322
+ });
@@ -24,8 +24,10 @@ import {
24
24
  import { replaceNode } from "@unified-latex/unified-latex-util-replace";
25
25
  import { fieldOf } from "../../domain/record.ts";
26
26
  import { err, ok, type Result } from "../../domain/result.ts";
27
+ import type { Span } from "../../domain/tex-document.ts";
27
28
  import type { AbstractProblem } from "../../ports/latex.ts";
28
29
  import { INVISIBLE, LINE_BREAKS, TRANSPARENT } from "./headings.ts";
30
+ import { isDefinition, isUnrendered } from "./hidden.ts";
29
31
  import {
30
32
  argumentsOf,
31
33
  isNode,
@@ -250,7 +252,25 @@ function typeset(
250
252
  return body;
251
253
  }
252
254
 
253
- /** The abstract of `src` as one paragraph of plain text, or what stops it; nothing after `\\end{document}` is read. */
255
+ /**
256
+ * Where the first live `abstract` environment of `src` stands, `\begin` to `\end`, or null when it
257
+ * has none: not one in a comment, and nothing after `\end{document}`.
258
+ */
259
+ export function abstractSpan(src: string): Span | null {
260
+ const env = firstAbstract(liveRoot(parseLatex(src)));
261
+ return env === undefined ? null : { start: at(env), end: end(env) };
262
+ }
263
+
264
+ /**
265
+ * The first `abstract` environment the PDF shows: the walk skips what never prints and a macro
266
+ * definition's body, as the outline's does, so a draft abstract kept in a `\newcommand` is not it.
267
+ */
268
+ const firstAbstract = (root: Readonly<Ast.Root>): Node | undefined =>
269
+ visited(root, (v, parent) => isUnrendered(v, parent) || isDefinition(v))
270
+ .filter(isNode)
271
+ .find((n) => n.type === "environment" && n.env === "abstract");
272
+
273
+ /** The abstract of `src` as one paragraph of plain text, or what stops it; nothing after `\end{document}` is read. */
254
274
  export const abstractText = (src: string): Result<string, AbstractProblem> =>
255
275
  abstractOfTree(liveRoot(parseLatex(src)), src);
256
276
 
@@ -259,12 +279,9 @@ export function abstractOfTree(
259
279
  root: Readonly<Ast.Root>,
260
280
  src: string,
261
281
  ): Result<string, AbstractProblem> {
262
- const nodes = visited(root, () => false).filter(isNode);
263
- const env = nodes.find(
264
- (n) => n.type === "environment" && n.env === "abstract",
265
- );
282
+ const env = firstAbstract(root);
266
283
  if (env?.type !== "environment") return err({ kind: "none" });
267
- const defs = definitionsIn(nodes);
284
+ const defs = definitionsIn(visited(root, () => false).filter(isNode));
268
285
  const start = at(env);
269
286
  const body = typeset(env.content, defs, start);
270
287
  const t = joined(body.content, (n) => textNode(n, { src, defs, start }));
@@ -1,57 +1,55 @@
1
1
  /**
2
- * The captions of a LaTeX source (`captionsOf`) on real parses: the mandatory argument of `\caption`,
3
- * whatever optional argument, star or space precedes it, and none that a reader of the PDF never sees.
2
+ * The captions of a LaTeX source (`captionProse`) on real parses: the mandatory argument of
3
+ * `\caption`, whatever optional argument, star or space precedes it, read as prose the way the body
4
+ * is, and none that a reader of the PDF never sees.
4
5
  */
5
6
  import { describe, expect, it } from "vitest";
6
- import { captionsOf, parseLatex } from "./index.ts";
7
+ import { bodySentences, wordsOf } from "../../domain/register.ts";
8
+ import { captionProse, parseLatex } from "./index.ts";
7
9
 
8
- const captions = (src: string): readonly string[] =>
9
- captionsOf(parseLatex(src));
10
+ describe("captionProse — each caption a reader sees, as prose with its place", () => {
11
+ /** Each caption as its source text, its words and its sentences' words. */
12
+ const shape = (src: string) =>
13
+ captionProse(parseLatex(src)).map((c) => {
14
+ const ss = bodySentences(c.passages);
15
+ return {
16
+ source: src.slice(c.span.start, c.span.end),
17
+ words: wordsOf(ss),
18
+ sentences: ss.map((s) => s.words),
19
+ };
20
+ });
10
21
 
11
- describe("captionsOf", () => {
12
- it("the text of a caption: formatting kept as words, whitespace collapsed", () => {
22
+ it("🔴 the \\caption with its argument, its words counted as the body's are: a formula or a citation is one word", () => {
13
23
  expect(
14
- captions(
15
- "\\begin{figure}\\caption{\\textbf{Big.} Some words.}\\end{figure}",
24
+ shape(
25
+ "\\begin{figure}\\caption{\\textbf{Big.} Cut by 65\\% of $20\\%$ \\cite{a}. Two more.}\\label{f}\\end{figure}",
16
26
  ),
17
- ).toEqual(["Big. Some words."]);
27
+ ).toEqual([
28
+ {
29
+ source:
30
+ "\\caption{\\textbf{Big.} Cut by 65\\% of $20\\%$ \\cite{a}. Two more.}",
31
+ words: 9,
32
+ // «Big.» ends a sentence: a label is read as the reader reads it.
33
+ sentences: [1, 6, 2],
34
+ },
35
+ ]);
18
36
  });
19
37
 
20
- it("with an optional argument, a star, or a space before the brace", () => {
21
- // Guards: a scan for `\caption{` read none of these.
38
+ it("🔴 with an optional argument, a star or a space before the brace; in order; one with no words left out", () => {
22
39
  expect(
23
- captions(
24
- "\\caption[Short]{With option.} \\caption*{Starred.} \\caption {Spaced.}\n\\caption\n {Next line.}",
25
- ),
26
- ).toEqual(["With option.", "Starred.", "Spaced.", "Next line."]);
27
- });
28
-
29
- it("in order, in the files' text as given; a caption with no words is left out", () => {
30
- expect(
31
- captions(
32
- "\\caption{One.}\\caption{}\\caption{\\centering}\\caption{Two.}",
33
- ),
34
- ).toEqual(["One.", "Two."]);
40
+ shape(
41
+ "\\caption[Short]{With option.} \\caption*{Starred.} \\caption {Spaced.}\\caption{}\\caption{\\centering} \\caption",
42
+ ).map((c) => c.words),
43
+ ).toEqual([2, 1, 1]);
35
44
  });
36
45
 
37
- it("not one that is commented out, in verbatim, or in a macro's definition", () => {
46
+ it("🔴 not one that is commented out, in verbatim, or in a macro's definition", () => {
38
47
  const src = [
39
48
  "% \\caption{Commented.}",
40
49
  "\\begin{verbatim}\\caption{Quoted.}\\end{verbatim}",
41
50
  "\\newcommand{\\fig}{\\caption{Defined.}}",
42
- "\\caption{Real.}",
51
+ "\\caption{Real one.}",
43
52
  ].join("\n");
44
- expect(captions(src)).toEqual(["Real."]);
45
- });
46
- });
47
-
48
- describe("captionsOf — what a reader sees", () => {
49
- it("a formula counts as one word and an escaped character is itself", () => {
50
- // Guards: dropping them made a caption of 54 words one of 40 and let it pass.
51
- expect(
52
- captions(
53
- "\\caption{Cut by 65\\% of $20\\%$ and Welch $p$; \\textbf{bold} \\& more.}",
54
- ),
55
- ).toEqual(["Cut by 65% of math and Welch math; bold & more."]);
53
+ expect(shape(src).map((c) => c.source)).toEqual(["\\caption{Real one.}"]);
56
54
  });
57
55
  });