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.
- package/CLAUDE.md +10 -2
- package/CONTRIBUTING.md +1 -1
- package/README.md +17 -14
- package/dist/adapters/latex/abstract.d.ts +7 -1
- package/dist/adapters/latex/abstract.d.ts.map +1 -1
- package/dist/adapters/latex/abstract.js +19 -4
- package/dist/adapters/latex/abstract.js.map +1 -1
- package/dist/adapters/latex/captions.d.ts +6 -5
- package/dist/adapters/latex/captions.d.ts.map +1 -1
- package/dist/adapters/latex/captions.js +14 -30
- package/dist/adapters/latex/captions.js.map +1 -1
- package/dist/adapters/latex/index.d.ts +1 -1
- package/dist/adapters/latex/index.d.ts.map +1 -1
- package/dist/adapters/latex/index.js +5 -2
- package/dist/adapters/latex/index.js.map +1 -1
- package/dist/adapters/latex/prose.d.ts +6 -0
- package/dist/adapters/latex/prose.d.ts.map +1 -1
- package/dist/adapters/latex/prose.js +18 -12
- package/dist/adapters/latex/prose.js.map +1 -1
- package/dist/cli.d.ts +6 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +16 -8
- package/dist/cli.js.map +1 -1
- package/dist/domain/register.d.ts +23 -1
- package/dist/domain/register.d.ts.map +1 -1
- package/dist/domain/register.js +37 -14
- package/dist/domain/register.js.map +1 -1
- package/dist/domain/term-definitions.d.ts +48 -0
- package/dist/domain/term-definitions.d.ts.map +1 -0
- package/dist/domain/term-definitions.js +228 -0
- package/dist/domain/term-definitions.js.map +1 -0
- package/dist/domain/tex-document.d.ts +11 -0
- package/dist/domain/tex-document.d.ts.map +1 -1
- package/dist/domain/tex-document.js.map +1 -1
- package/dist/eslint-rules/review-frontmatter.js +5 -5
- package/dist/eslint-rules/review-frontmatter.schema.json +15 -8
- package/dist/eslint-rules/sibling-frontmatter.d.ts.map +1 -1
- package/dist/folder-venue-rule.d.ts +1 -1
- package/dist/folder-venue-rule.d.ts.map +1 -1
- package/dist/folder-venue-rule.js +4 -2
- package/dist/folder-venue-rule.js.map +1 -1
- package/dist/hooks-notice.d.ts +3 -3
- package/dist/hooks-notice.d.ts.map +1 -1
- package/dist/hooks-notice.js +41 -8
- package/dist/hooks-notice.js.map +1 -1
- package/dist/link-skills.d.ts +5 -0
- package/dist/link-skills.d.ts.map +1 -1
- package/dist/link-skills.js +7 -0
- package/dist/link-skills.js.map +1 -1
- package/dist/ports/latex.d.ts +11 -1
- package/dist/ports/latex.d.ts.map +1 -1
- package/dist/presets.d.ts +21 -2
- package/dist/presets.d.ts.map +1 -1
- package/dist/presets.js +66 -17
- package/dist/presets.js.map +1 -1
- package/dist/readability.d.ts +12 -2
- package/dist/readability.d.ts.map +1 -1
- package/dist/readability.js +76 -3
- package/dist/readability.js.map +1 -1
- package/dist/register-bands.d.ts +16 -5
- package/dist/register-bands.d.ts.map +1 -1
- package/dist/register-bands.js +56 -17
- package/dist/register-bands.js.map +1 -1
- package/dist/skills/argument-arc/scripts/headings-core.d.ts +12 -0
- package/dist/skills/argument-arc/scripts/headings.d.ts +2 -0
- package/dist/skills/cold-read-diff/scripts/cold-read-core.d.ts +12 -0
- package/dist/skills/cold-read-diff/scripts/readers.d.ts +2 -1
- package/dist/term-definition-rules.d.ts +26 -0
- package/dist/term-definition-rules.d.ts.map +1 -0
- package/dist/term-definition-rules.js +137 -0
- package/dist/term-definition-rules.js.map +1 -0
- package/dist/tex-paper.d.ts +6 -0
- package/dist/tex-paper.d.ts.map +1 -1
- package/dist/tex-paper.js +10 -0
- package/dist/tex-paper.js.map +1 -1
- package/dist/tex-requirements.d.ts +2 -0
- package/dist/tex-requirements.d.ts.map +1 -1
- package/dist/tex-requirements.js +9 -0
- package/dist/tex-requirements.js.map +1 -1
- package/dist/tex-venue-rules.d.ts +3 -2
- package/dist/tex-venue-rules.d.ts.map +1 -1
- package/dist/tex-venue-rules.js +3 -2
- package/dist/tex-venue-rules.js.map +1 -1
- package/docs/configuration.md +2 -2
- package/{skills/paper-pipeline/references → docs/design}/acceptance-gate.md +50 -53
- package/docs/design/paper-pipeline-history.md +217 -0
- package/docs/design/skill-provenance.md +132 -0
- package/docs/design/study-modes.md +1 -1
- package/docs/design/verify-citations-history.md +135 -0
- package/docs/design/writing-exemplars.md +19 -0
- package/docs/install.md +7 -4
- package/docs/layout.md +5 -4
- package/docs/optional-rules.md +4 -0
- package/docs/osf-artifact.md +54 -0
- package/docs/pipeline.md +171 -0
- package/docs/render.md +82 -0
- package/docs/rules/paper/folder-venue-leftover.md +10 -7
- package/docs/rules/tex/contrast-frames.md +1 -2
- package/docs/rules/tex/max-caption-words.md +82 -0
- package/docs/rules/tex/max-paragraph-words.md +2 -2
- package/docs/rules/tex/negated-sentences.md +96 -0
- package/docs/rules/tex/term-before-definition.md +103 -0
- package/docs/rules/tex/term-defined-twice.md +62 -0
- package/docs/rules/tex/venue-leftover.md +13 -1
- package/docs/rules.md +23 -18
- package/docs/skills.md +16 -21
- package/docs/submission.md +14 -0
- package/docs/texlive-install-decision.md +1 -1
- package/docs/toolchain.md +11 -11
- package/eslint-rules/review-frontmatter.schema.json +15 -8
- package/eslint-rules/review-frontmatter.test.mjs +8 -5
- package/eslint-rules/review-frontmatter.ts +5 -5
- package/eslint.config.mjs +1 -5
- package/hooks/paper-status-gates.sh +21 -4
- package/hooks/paper-status-gates.test.ts +51 -0
- package/lib/skill-checks.test.mjs +2 -6
- package/lib/skill-trigger-cases.mjs +12 -97
- package/lib/skill-trigger-cases.test.ts +0 -6
- package/package.json +3 -1
- package/presets/acm-sigconf.md +1 -1
- package/presets/agenticdev.jsonc +5 -2
- package/presets/agenticdev.md +4 -2
- package/presets/aidc.jsonc +14 -1
- package/presets/aidc.md +3 -2
- package/presets/aisec.jsonc +9 -3
- package/presets/aisec.md +4 -1
- package/presets/ase.jsonc +145 -0
- package/presets/ase.md +178 -0
- package/presets/ccs.jsonc +87 -0
- package/presets/ccs.md +184 -0
- package/presets/icse.jsonc +100 -0
- package/presets/icse.md +126 -0
- package/presets/ieee-conference.md +1 -1
- package/presets/sp.jsonc +152 -0
- package/presets/sp.md +160 -0
- package/presets/venue-profile.schema.json +22 -3
- package/scripts/harness-api.frozen.json +0 -4
- package/scripts/pipeline.ts +481 -0
- package/skills/CLAUDE.md +2 -2
- package/skills/CLAUDE.md.spec.ts +26 -1
- package/skills/analyze-sibling-paper/SKILL.md +2 -20
- package/skills/analyze-sibling-paper/SKILL.md.spec.ts +9 -19
- package/skills/argument-arc/SKILL.md +32 -18
- package/skills/argument-arc/SKILL.md.spec.ts +43 -17
- package/skills/argument-arc/scripts/headings-core.js +46 -0
- package/skills/argument-arc/scripts/headings-core.ts +65 -0
- package/skills/argument-arc/scripts/headings.js +15 -0
- package/skills/argument-arc/scripts/headings.test.ts +105 -0
- package/skills/argument-arc/scripts/headings.ts +20 -0
- package/skills/build-benchmark/SKILL.md +1 -12
- package/skills/build-benchmark/SKILL.md.spec.ts +15 -11
- package/skills/build-label-page/SKILL.md.spec.ts +11 -0
- package/skills/camera-ready/SKILL.md +1 -8
- package/skills/camera-ready/SKILL.md.spec.ts +8 -7
- package/skills/cold-read-diff/SKILL.md +36 -25
- package/skills/cold-read-diff/SKILL.md.spec.ts +44 -24
- package/skills/cold-read-diff/scripts/cold-read-core.js +63 -6
- package/skills/cold-read-diff/scripts/cold-read-core.ts +81 -6
- package/skills/cold-read-diff/scripts/cold-read.js +1 -1
- package/skills/cold-read-diff/scripts/cold-read.test.ts +66 -0
- package/skills/cold-read-diff/scripts/cold-read.ts +1 -1
- package/skills/cold-read-diff/scripts/readers.js +2 -1
- package/skills/cold-read-diff/scripts/readers.ts +2 -1
- package/skills/draft-paper/SKILL.md +16 -29
- package/skills/draft-paper/SKILL.md.spec.ts +27 -28
- package/skills/extend-paper/SKILL.md +7 -16
- package/skills/extend-paper/SKILL.md.spec.ts +18 -15
- package/skills/find-venue/SKILL.md +11 -24
- package/skills/find-venue/SKILL.md.spec.ts +19 -23
- package/skills/harden-paper/SKILL.md +62 -290
- package/skills/harden-paper/SKILL.md.spec.ts +82 -304
- package/skills/harden-paper/harden-paper.harness.mjs +1 -2
- package/skills/jobs.ts +25 -0
- package/skills/label-agent-runs/SKILL.md.spec.ts +10 -0
- package/skills/map-prior-work/SKILL.md +5 -4
- package/skills/map-prior-work/SKILL.md.spec.ts +13 -3
- package/skills/paper-pipeline/SKILL.md +80 -278
- package/skills/paper-pipeline/SKILL.md.spec.ts +130 -276
- package/skills/paper-pipeline/description-language.eval.mjs +0 -22
- package/skills/paper-pipeline/framing-vs-vocabulary.eval.mjs +0 -29
- package/skills/paper-pipeline/paper-pipeline.harness.mjs +0 -16
- package/skills/paper-pipeline/pipeline-firing.eval.mjs +7 -29
- package/skills/paper-pipeline/pipeline-language.eval.mjs +0 -52
- package/skills/paper-pipeline/references/artifact-checklist.md +6 -1
- package/skills/paper-pipeline/references/body-vs-appendix.md +3 -4
- package/skills/paper-pipeline/references/pipeline-status-template.md +8 -10
- package/skills/paper-pipeline/references/review-ratchet.md +4 -7
- package/skills/paper-pipeline/references/venue-bar.md +1 -2
- package/skills/paper-pipeline/references/writing-craft.md +21 -281
- package/skills/paper-status/SKILL.md +17 -20
- package/skills/paper-status/SKILL.md.spec.ts +23 -19
- package/skills/pc-panel-review/SKILL.md +66 -93
- package/skills/pc-panel-review/SKILL.md.spec.ts +75 -92
- package/skills/plan-paper-timeline/SKILL.md +7 -29
- package/skills/plan-paper-timeline/SKILL.md.spec.ts +16 -28
- package/skills/plan-paper-timeline/plan-paper-timeline.effects.harness.mjs +2 -2
- package/skills/render-paper/check-render.sh +2 -2
- package/skills/render-paper/render-paper.harness.mjs +4 -20
- package/skills/research-ideate/SKILL.md +15 -32
- package/skills/research-ideate/SKILL.md.spec.ts +25 -31
- package/skills/rewrite-unclear/SKILL.md +15 -14
- package/skills/rewrite-unclear/SKILL.md.spec.ts +24 -15
- package/skills/rewrite-unclear/rewrite-unclear.eval.ts +2 -3
- package/skills/run-agent-grid/SKILL.md +3 -3
- package/skills/run-agent-grid/SKILL.md.spec.ts +10 -2
- package/skills/study-accepted-papers/SKILL.md +5 -5
- package/skills/study-accepted-papers/SKILL.md.spec.ts +27 -4
- package/skills/submit-paper/SKILL.md +37 -31
- package/skills/submit-paper/SKILL.md.spec.ts +46 -30
- package/skills/submit-paper/check-deanon.sh +1 -1
- package/skills/tighten-paper/SKILL.md +43 -68
- package/skills/tighten-paper/SKILL.md.spec.ts +51 -67
- package/skills/verify-citations/SKILL.md +18 -112
- package/skills/verify-citations/SKILL.md.spec.ts +27 -114
- package/src/adapters/latex/abstract.test.ts +42 -0
- package/src/adapters/latex/abstract.ts +23 -6
- package/src/adapters/latex/captions.test.ts +36 -38
- package/src/adapters/latex/captions.ts +16 -33
- package/src/adapters/latex/index.test.ts +11 -0
- package/src/adapters/latex/index.ts +5 -2
- package/src/adapters/latex/prose.ts +23 -11
- package/src/cli.ts +26 -5
- package/src/domain/register.test.ts +65 -0
- package/src/domain/register.ts +72 -16
- package/src/domain/term-definitions.test.ts +240 -0
- package/src/domain/term-definitions.ts +329 -0
- package/src/domain/tex-document.ts +12 -0
- package/src/domain/venue-name.test.ts +4 -4
- package/src/folder-venue-rule.test.ts +23 -2
- package/src/folder-venue-rule.ts +8 -8
- package/src/hooks-notice.test.ts +127 -0
- package/src/hooks-notice.ts +50 -10
- package/src/link-skills.ts +9 -0
- package/src/new-paper.test.ts +2 -2
- package/src/paper-settings-commands.test.ts +1 -1
- package/src/ports/latex.ts +11 -0
- package/src/preset-card-rule.test.ts +4 -0
- package/src/presets.test.ts +141 -4
- package/src/presets.ts +113 -22
- package/src/readability.test.ts +92 -0
- package/src/readability.ts +113 -5
- package/src/register-bands.test.ts +81 -1
- package/src/register-bands.ts +88 -23
- package/src/rule-cases.test.ts +122 -2
- package/src/term-definition-rules.test.ts +150 -0
- package/src/term-definition-rules.ts +189 -0
- package/src/tex-paper.test.ts +18 -1
- package/src/tex-paper.ts +11 -0
- package/src/tex-requirements.ts +15 -0
- package/src/tex-venue-rules.test.ts +45 -1
- package/src/tex-venue-rules.ts +8 -3
- package/src/venue-rules.test.ts +2 -2
- package/templates/paper/PIPELINE-STATUS.md +19 -19
- package/dist/paper-prose.d.ts +0 -17
- package/dist/paper-prose.d.ts.map +0 -1
- package/dist/paper-prose.js +0 -46
- package/dist/paper-prose.js.map +0 -1
- package/skills/grade-paper-writing/SKILL.md +0 -494
- package/skills/grade-paper-writing/SKILL.md.spec.ts +0 -501
- package/skills/grade-paper-writing/__snapshots__/prose-lint.test.ts.snap +0 -84
- package/skills/grade-paper-writing/fixtures/control_gopen.txt +0 -1
- package/skills/grade-paper-writing/fixtures/control_human_paper.txt +0 -1
- package/skills/grade-paper-writing/fixtures/rewrite.txt +0 -1
- package/skills/grade-paper-writing/fixtures/specimen.txt +0 -1
- package/skills/grade-paper-writing/fixtures/structure-checks.md +0 -22
- package/skills/grade-paper-writing/grade-paper-writing.eval.mjs +0 -19
- package/skills/grade-paper-writing/grade-paper-writing.harness.mjs +0 -23
- package/skills/grade-paper-writing/prose-lint.mjs +0 -602
- package/skills/grade-paper-writing/prose-lint.test.ts +0 -413
- package/skills/osf-artifact-upload/SKILL.md +0 -58
- package/skills/osf-artifact-upload/SKILL.md.spec.ts +0 -65
- package/skills/osf-artifact-upload/osf-artifact-upload.eval.mjs +0 -22
- package/skills/osf-artifact-upload/osf-artifact-upload.harness.ts +0 -102
- package/skills/paper-adversarial-review/SKILL.md +0 -100
- package/skills/paper-adversarial-review/SKILL.md.spec.ts +0 -107
- package/skills/paper-adversarial-review/paper-adversarial-review.eval.mjs +0 -19
- package/skills/paper-adversarial-review/paper-adversarial-review.harness.mjs +0 -24
- package/skills/paper-pipeline/grade-paper-writing-ablation.eval.mjs +0 -1274
- package/skills/paper-pipeline/references/credit-criteria.md +0 -69
- package/skills/paper-pipeline/references/occupancy-2026-08-06-probe/README.md +0 -35
- package/skills/paper-pipeline/references/occupancy-2026-08-06-probe/run_retext.mjs +0 -24
- package/skills/paper-pipeline/references/occupancy-2026-08-06-probe/sentences.txt +0 -11
- package/skills/paper-pipeline/references/occupancy-2026-08-06-probe/test_sentences.py +0 -25
- package/skills/paper-pipeline/references/occupancy-2026-08-06-prose-checkers.md +0 -538
- package/skills/paper-pipeline/references/occupancy-2026-08-06-reproducible-tooling.md +0 -431
- package/skills/paper-pipeline/references/occupancy-2026-08-06-staleness-and-orchestration.md +0 -592
- package/skills/paper-pipeline/repro/2026-08-08-parent-replication.mjs +0 -92
- package/skills/render-paper/SKILL.md +0 -123
- package/skills/render-paper/SKILL.md.spec.ts +0 -130
- package/skills/render-paper/render-paper.eval.mjs +0 -19
- package/skills/submission-portal/SKILL.md +0 -129
- package/skills/submission-portal/SKILL.md.spec.ts +0 -134
- package/skills/submission-portal/submission-portal.eval.mjs +0 -15
- package/skills/submission-portal/submission-portal.test.ts +0 -12
- package/skills/sweep-design-space/SKILL.md +0 -232
- package/skills/sweep-design-space/SKILL.md.spec.ts +0 -248
- package/skills/sweep-design-space/sweep-design-space.eval.mjs +0 -19
- package/skills/sweep-design-space/sweep-design-space.harness.mjs +0 -23
- package/src/paper-prose.test.ts +0 -78
- 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:
|
|
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
|
-
- **
|
|
24
|
-
|
|
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`).
|
|
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
|
|
151
|
-
|
|
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
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
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
|
-
|
|
261
|
-
|
|
262
|
-
|
|
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
|
|
296
|
-
|
|
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.
|
|
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
|
-
- **
|
|
40
|
-
|
|
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\`).
|
|
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
|
|
167
|
-
|
|
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
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
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
|
-
|
|
277
|
-
|
|
278
|
-
|
|
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
|
|
312
|
-
|
|
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.
|
|
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
|
-
|
|
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
|
-
/**
|
|
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
|
|
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(
|
|
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 (`
|
|
3
|
-
* whatever optional argument, star or space precedes it,
|
|
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 {
|
|
7
|
+
import { bodySentences, wordsOf } from "../../domain/register.ts";
|
|
8
|
+
import { captionProse, parseLatex } from "./index.ts";
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
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
|
-
|
|
15
|
-
"\\begin{figure}\\caption{\\textbf{Big.}
|
|
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([
|
|
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
|
|
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
|
-
|
|
24
|
-
"\\caption[Short]{With option.} \\caption*{Starred.} \\caption {Spaced.}
|
|
25
|
-
),
|
|
26
|
-
).toEqual([
|
|
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(
|
|
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
|
});
|