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
@@ -1,413 +0,0 @@
1
- /**
2
- * prose-lint.mjs as a process — the way the skill runs it. Every mode, on an accepted paper and on
3
- * fixtures written here, with the WHOLE output compared: the report is the product, so a changed
4
- * number or a dropped line is a changed result.
5
- */
6
- import assert from "node:assert/strict";
7
- import { join } from "node:path";
8
- import { dirname } from "node:path";
9
- import { fileURLToPath } from "node:url";
10
- import { expect, test } from "vitest";
11
- import { cpSync, readFileSync } from "node:fs";
12
- import { layRecord, recordedTree } from "../../test/recorded-fixture.ts";
13
- import { runNode, useTempDir, writeTree } from "../../test/support.ts";
14
-
15
- const SCRIPT = join(dirname(fileURLToPath(import.meta.url)), "prose-lint.mjs");
16
- /**
17
- * One process that loads the LaTeX parser and reads a full accepted paper: about 1 s alone, 5.6 s
18
- * measured under coverage with the suite running in parallel — past vitest's 5 s default.
19
- */
20
- const SPAWN_LATEX_MS = 60_000;
21
- /** An accepted paper whose bibliography sits inline in `filecontents`, beside a long preamble. */
22
- const ACCEPTED_DIR = join(
23
- dirname(fileURLToPath(import.meta.url)),
24
- "..",
25
- "..",
26
- "fixtures",
27
- "accepted-papers",
28
- "agenticdev-acm26",
29
- );
30
- const root = useTempDir("prose-lint-");
31
- /** The accepted paper as a build left it: a copy with TeX's record laid at `_build/sources.json`. */
32
- const ACCEPTED = join(root, "accepted", "paper.tex");
33
-
34
- const LONG_CAPTION_SENTENCE = Array.from(
35
- { length: 45 },
36
- (_, i) => `word${String(i)}`,
37
- ).join(" ");
38
-
39
- /** A paper.tex whose body is `body`. */
40
- const tex = (body: string): string =>
41
- `\\documentclass{article}\n\\begin{document}\n${body}\n\\end{document}\n`;
42
-
43
- const TREE = {
44
- "p/paper.tex": tex(
45
- "\\section{Introduction}\nIn this paper we present a linter. It might possibly help.\n\\input{figures/fig1}\n\\input{figures/fig2}\n\\input{figures/fig4}\n\\input{figures/fig5}",
46
- ),
47
- "p/figures/fig1.tex": `\\begin{figure}\\caption{\\textbf{Big.} ${LONG_CAPTION_SENTENCE}. ${"More words here. ".repeat(20)}}\\end{figure}`,
48
- // Empty once LaTeX commands and braces are stripped: skipped, not counted as a zero-word caption.
49
- "p/figures/fig2.tex": "\\caption{\\centering}",
50
- // A lone "#": no word at all — measured as zero words, never flagged.
51
- "p/figures/fig4.tex": "\\caption{{#}}",
52
- // Rules only: seen by the reader, but no word once the dashes are stripped — skipped.
53
- "p/figures/fig5.tex": "\\caption{---}",
54
- "p/figures/notes.txt": "not a figure",
55
- "clean/paper.tex": tex("Short and plain. Nothing else."),
56
- // Captions in the paper itself and in a section it includes — not under figures/.
57
- "inline/paper.tex": tex(
58
- `Prose here. \\begin{figure}\\caption{${LONG_CAPTION_SENTENCE}.}\\end{figure}\n\\input{sec/results}`,
59
- ),
60
- "inline/sec/results.tex": `\\begin{figure}\\caption{${"Short words here. ".repeat(40)}}\\end{figure}`,
61
- // One real over-long caption, and the same caption commented out and inside verbatim.
62
- "commented/paper.tex": tex(
63
- `Prose here.\n% \\caption{Commented ${LONG_CAPTION_SENTENCE}.}\n\\begin{verbatim}\n\\caption{Quoted ${LONG_CAPTION_SENTENCE}.}\n\\end{verbatim}\n\\begin{figure}\\caption{Real ${LONG_CAPTION_SENTENCE}.}\\end{figure}`,
64
- ),
65
- // The caption command with an optional argument, and with a space before its brace.
66
- "optarg/paper.tex": tex(
67
- `Prose here. \\begin{figure}\\caption[Short]{${LONG_CAPTION_SENTENCE}.}\\end{figure}`,
68
- ),
69
- "spaced/paper.tex": tex(
70
- `Prose here. \\begin{figure}\\caption {${LONG_CAPTION_SENTENCE}.}\\end{figure}`,
71
- ),
72
- "negated/paper.tex": tex(
73
- "It is not fast. It is not small. It is not red. Nothing here is plain.",
74
- ),
75
- "ends-on-marks/paper.tex": tex(
76
- "The method holds on every input~\\cite{knuth}. The proof is given in full (Section~\\ref{proof}). The result is new.",
77
- ),
78
- "empty/paper.tex": "\\documentclass{article}",
79
- "page.txt":
80
- "A rendered page. It was hyphen-\nated across a line.\n\n12\n\fNext page text here.\nReferences\n[1] cut here.\n",
81
- "notes.rtf": "not a paper",
82
- };
83
- /** What each paper's last build read: its paper.tex, and the files it includes. */
84
- const READ: Readonly<Record<string, readonly string[]>> = {
85
- p: [
86
- "paper.tex",
87
- "figures/fig1.tex",
88
- "figures/fig2.tex",
89
- "figures/fig4.tex",
90
- "figures/fig5.tex",
91
- ],
92
- clean: ["paper.tex"],
93
- inline: ["paper.tex", "sec/results.tex"],
94
- commented: ["paper.tex"],
95
- "ends-on-marks": ["paper.tex"],
96
- negated: ["paper.tex"],
97
- optarg: ["paper.tex"],
98
- spaced: ["paper.tex"],
99
- empty: ["paper.tex"],
100
- };
101
- writeTree(
102
- root,
103
- Object.entries(READ).reduce<Record<string, string>>(
104
- (tree, [dir, files]) =>
105
- recordedTree(
106
- tree,
107
- dir,
108
- files.map((path) => ({ path, role: "body" as const })),
109
- ),
110
- TREE,
111
- ),
112
- );
113
- cpSync(ACCEPTED_DIR, join(root, "accepted"), { recursive: true });
114
- layRecord(join(root, "accepted"), join(ACCEPTED_DIR, "tex-truth.json"));
115
-
116
- test("no arguments: the usage line, exit 0", () => {
117
- assert.deepEqual(runNode(SCRIPT), {
118
- status: 0,
119
- stdout: "",
120
- stderr:
121
- "usage: node prose-lint.mjs <paper.tex|page.txt> [more files] [--flags-only|--headings]\n",
122
- });
123
- });
124
-
125
- test(
126
- "🔴 a paper.tex is measured on the prose a reader sees — not its preamble, comments or inline .bib",
127
- { timeout: SPAWN_LATEX_MS },
128
- () => {
129
- const r = runNode(SCRIPT, [ACCEPTED]);
130
- // Guards: a .tex read as raw text counted the preamble, the comments and the `filecontents`
131
- // bibliography — 8127 "words" on this paper's submitted version against about 4636 real ones.
132
- const words = Number(
133
- /^=== paper\.tex — (\d+) words, \d+ sentences ===$/m.exec(r.stdout)?.[1],
134
- );
135
- assert.deepEqual(
136
- {
137
- status: r.status,
138
- stderr: r.stderr,
139
- inBand: words > 4000 && words < 5500,
140
- },
141
- { status: 0, stderr: "", inBand: true },
142
- );
143
- // No BibTeX field and no preamble command reaches the measured text.
144
- assert.doesNotMatch(r.stdout, /author\s*=|\\usepackage|\\documentclass/);
145
- expect(r.stdout).toMatchSnapshot();
146
- },
147
- );
148
-
149
- test(
150
- "--headings on a paper.tex lists its section titles, in order",
151
- { timeout: SPAWN_LATEX_MS },
152
- () => {
153
- const r = runNode(SCRIPT, ["--headings", ACCEPTED]);
154
- assert.deepEqual(
155
- { status: r.status, stderr: r.stderr },
156
- { status: 0, stderr: "" },
157
- );
158
- expect(r.stdout).toMatchSnapshot();
159
- },
160
- );
161
-
162
- test("the report over a rendered page: page numbers, hyphenation and the references are dropped", () => {
163
- const r = runNode(SCRIPT, [join(root, "page.txt")]);
164
- assert.deepEqual(
165
- { status: r.status, stderr: r.stderr },
166
- { status: 0, stderr: "" },
167
- );
168
- expect(r.stdout).toMatchSnapshot();
169
- });
170
-
171
- test("--headings on a rendered page is refused: it marks no heading", () => {
172
- const file = join(root, "page.txt");
173
- assert.deepEqual(runNode(SCRIPT, ["--headings", file]), {
174
- status: 2,
175
- stdout: "",
176
- stderr: `prose-lint: --headings reads a paper.tex — a rendered page (${file}) marks no heading\n`,
177
- });
178
- });
179
-
180
- test("a file that is neither a paper.tex nor a rendered page is refused with exit 2, and nothing is measured", () => {
181
- const file = join(root, "notes.rtf");
182
- assert.deepEqual(runNode(SCRIPT, [file]), {
183
- status: 2,
184
- stdout: "",
185
- stderr: `prose-lint reads a paper.tex or the text of its rendered PDF (.txt), not: ${file}\n`,
186
- });
187
- });
188
-
189
- test("--flags-only: an over-long caption flags and exits 1", () => {
190
- const r = runNode(SCRIPT, ["--flags-only", join(root, "p", "paper.tex")]);
191
- assert.deepEqual(
192
- { status: r.status, stdout: r.stdout },
193
- { status: 1, stdout: "" },
194
- );
195
- expect(r.stderr).toMatchSnapshot();
196
- });
197
-
198
- test("--flags-only: a metric over its threshold (not a caption) is a finding too, and the report flags the same line", () => {
199
- const file = join(root, "negated", "paper.tex");
200
- const only = runNode(SCRIPT, ["--flags-only", file]);
201
- const report = runNode(SCRIPT, [file]);
202
- // Guards: the mode promised "print nothing on a clean paper, any output means a finding" and
203
- // looked only at captions; the metrics the report FLAGs are findings of the same kind.
204
- assert.deepEqual(
205
- { status: only.status, stdout: only.stdout },
206
- { status: 1, stdout: "" },
207
- );
208
- expect(only.stderr).toMatchSnapshot();
209
- assert.match(
210
- report.stdout,
211
- /^FLAG sentences whose main claim is a negation: 75%$/m,
212
- );
213
- });
214
-
215
- test("--flags-only: a paper with no figures directory is clean, exit 0 and silent", () => {
216
- assert.deepEqual(
217
- runNode(SCRIPT, ["--flags-only", join(root, "clean", "paper.tex")]),
218
- { status: 0, stdout: "", stderr: "" },
219
- );
220
- });
221
-
222
- test("🔴 a paper no build has recorded is read as paper.tex alone, and the run says so", () => {
223
- writeTree(root, {
224
- "unbuilt/paper.tex": tex("Short and plain. Nothing else."),
225
- });
226
- const file = join(root, "unbuilt", "paper.tex");
227
- const r = runNode(SCRIPT, ["--flags-only", file]);
228
- assert.deepEqual(
229
- { status: r.status, stdout: r.stdout, stderr: r.stderr },
230
- {
231
- status: 0,
232
- stdout: "",
233
- stderr: `prose-lint: ${file} has no current build record (_build/sources.json), so only paper.tex was read, not the files it includes — run \`npx paperlint build\` first\n`,
234
- },
235
- );
236
- });
237
-
238
- test("a .tex with no prose in its body is refused with exit 2, not reported as NaN", () => {
239
- const file = join(root, "empty", "paper.tex");
240
- assert.deepEqual(runNode(SCRIPT, [file]), {
241
- status: 2,
242
- stdout: "",
243
- stderr:
244
- `prose-lint: ${file} has no prose to measure — after the preamble, comments, floats and ` +
245
- "the back matter are left out, no word is left.\n",
246
- });
247
- });
248
-
249
- test("a rendered page with no sentence before its references is refused the same way", () => {
250
- writeTree(root, { "blank.txt": "12\nReferences\n[1] only this.\n" });
251
- const file = join(root, "blank.txt");
252
- assert.deepEqual(runNode(SCRIPT, [file]), {
253
- status: 2,
254
- stdout: "",
255
- stderr: `prose-lint: ${file} has no prose to measure — no sentence is left before the references.\n`,
256
- });
257
- });
258
-
259
- test("🔴 in a paper.tex, a sentence ending on a citation or a cross-reference wastes its stress position", () => {
260
- const r = runNode(SCRIPT, [join(root, "ends-on-marks", "paper.tex")]);
261
- // Guards: the marks used to be dropped from the prose, so neither ending could be seen.
262
- assert.match(
263
- r.stdout,
264
- /^FLAG sentences ending on a cross-ref\/citation\/hedge \(wasted stress position\): 2$/m,
265
- );
266
- });
267
-
268
- test("🔴 --flags-only reads the captions of the paper.tex and of the files it includes", () => {
269
- const r = runNode(SCRIPT, [
270
- "--flags-only",
271
- join(root, "inline", "paper.tex"),
272
- ]);
273
- // Guards: captions were read only from figures/*.tex beside the paper, so a caption set inline,
274
- // or in an included section, was never checked and the run exited clean.
275
- assert.deepEqual(
276
- {
277
- status: r.status,
278
- stdout: r.stdout,
279
- flagged: r.stderr
280
- .split("\n")
281
- .filter((l) => l.startsWith(" > "))
282
- .map((l) => l.split(":")[0]),
283
- },
284
- {
285
- status: 1,
286
- stdout: "",
287
- flagged: [" > paper.tex", " > sec/results.tex"],
288
- },
289
- );
290
- });
291
-
292
- test("--flags-only on a rendered page reads the captions in figures/*.tex beside it", () => {
293
- writeTree(root, {
294
- "rendered/page.txt": "A rendered page. Its prose is fine.\n",
295
- "rendered/figures/f.tex": `\\caption{${LONG_CAPTION_SENTENCE}.}`,
296
- "rendered/figures/notes.txt": "not a figure",
297
- });
298
- const r = runNode(SCRIPT, [
299
- "--flags-only",
300
- join(root, "rendered", "page.txt"),
301
- ]);
302
- assert.deepEqual(
303
- {
304
- status: r.status,
305
- first: r.stderr
306
- .split("\n")
307
- .find((l) => l.startsWith(" > "))
308
- ?.split(":")[0],
309
- },
310
- { status: 1, first: " > figures/f.tex" },
311
- );
312
- // …and a page with no figures/ beside it has no caption to flag.
313
- assert.deepEqual(runNode(SCRIPT, ["--flags-only", join(root, "page.txt")]), {
314
- status: 0,
315
- stdout: "",
316
- stderr: "",
317
- });
318
- });
319
-
320
- test("🔴 a caption commented out or quoted in verbatim is not measured; a real one still is", () => {
321
- const r = runNode(SCRIPT, [
322
- "--flags-only",
323
- join(root, "commented", "paper.tex"),
324
- ]);
325
- // Guards: the scan matched every `\caption{` in the raw text, comments and verbatim included.
326
- assert.deepEqual(
327
- {
328
- status: r.status,
329
- findings: r.stderr
330
- .split("\n")
331
- .filter((l) => l.startsWith(" > paper.tex:"))
332
- .map((l) => /— "(\w+)/.exec(l)?.[1]),
333
- },
334
- { status: 1, findings: ["Real"] },
335
- );
336
- });
337
-
338
- /** The `prose-lint.mjs` invocations SKILL.md documents (Step 6), their arguments with `<paper-dir>` filled in. */
339
- const documentedInvocations = (paperDir: string): readonly string[][] =>
340
- readFileSync(join(dirname(SCRIPT), "SKILL.md"), "utf8")
341
- .split("\n")
342
- .flatMap((line) => {
343
- const m =
344
- /node \$\{CLAUDE_SKILL_DIR\}\/prose-lint\.mjs ([^#]+?)\s*(#|$)/.exec(
345
- line,
346
- );
347
- return m?.[1] === undefined
348
- ? []
349
- : [m[1].replaceAll("<paper-dir>", paperDir).split(/\s+/)];
350
- });
351
-
352
- test("🔴 the invocation SKILL.md documents reports an over-long caption, with no flag the skill does not name", () => {
353
- const documented = documentedInvocations(join(root, "p"));
354
- // Guards: the report is the documented way to run the checks (Step 6), and captions were
355
- // measured only under an undocumented flag — an over-long caption produced no finding.
356
- const report = documented.find((a) => !a.includes("--headings"));
357
- assert.ok(report !== undefined, "SKILL.md documents a report invocation");
358
- const r = runNode(SCRIPT, report);
359
- assert.deepEqual(
360
- {
361
- status: r.status,
362
- flagged: r.stdout
363
- .split("\n")
364
- .filter(
365
- (l) => l.startsWith("FLAG figure captions") || l.includes("caption"),
366
- ),
367
- },
368
- {
369
- status: 0,
370
- flagged: [
371
- "FLAG figure captions over the limit: 2",
372
- ' > figures/fig1.tex: caption sentence of 46 words (warn >40) — "Big. word0 word1 word2 word3 word4 word5 word6 word7 word8 word9 word10 word11 word12 word13 word14 word15 wor…"',
373
- " > figures/fig1.tex: caption is 106 words (warn >100) — a caption this long is a section under a picture",
374
- ],
375
- },
376
- );
377
- });
378
-
379
- test("the report says a paper whose captions are within the limits is clean on that line", () => {
380
- const r = runNode(SCRIPT, [join(root, "clean", "paper.tex")]);
381
- // Guards: the line is printed on a clean paper too, so its absence is never read as a pass.
382
- assert.match(r.stdout, /^ok {3}figure captions over the limit: 0$/m);
383
- });
384
-
385
- test("🔴 a caption with an optional argument, or a space before its brace, is measured", () => {
386
- const found = (dir: string) => {
387
- const r = runNode(SCRIPT, [join(root, dir, "paper.tex")]);
388
- return [
389
- r.status,
390
- /^FLAG figure captions over the limit: (\d+)$/m.exec(r.stdout)?.[1],
391
- ];
392
- };
393
- // Guards: the scan matched `\caption{` only, so `\caption[Short]{…}` and `\caption {…}` were never
394
- // read and the report printed "ok ... 0" for a long caption.
395
- expect([found("optarg"), found("spaced")]).toEqual([
396
- [0, "1"],
397
- [0, "1"],
398
- ]);
399
- });
400
-
401
- test("🔴 the caption of the package's own p1 fixture, which has an optional argument, is reported", () => {
402
- const p1 = join(
403
- dirname(fileURLToPath(import.meta.url)),
404
- "..",
405
- "..",
406
- "fixtures",
407
- "paper-sources",
408
- "p1",
409
- "paper.tex",
410
- );
411
- const r = runNode(SCRIPT, ["--flags-only", p1]);
412
- assert.match(r.stderr, /— "Optional-arg caption this sentence/);
413
- });
@@ -1,58 +0,0 @@
1
- ---
2
- name: osf-artifact-upload
3
- description: Upload or replace a paper's reproduction artifact file on an OSF project via the OSF API — for anonymized/view-only artifacts hosted for peer review (AISec/AgenticDev etc.). Use when a paper's OSF-hosted artifact needs a file added or a new version pushed (e.g. after fixing the artifact README or regenerating artifact.zip), and the OSF web UI is inconvenient. Composes with submit-paper / submit-paper-<venue>.
4
- allowed-tools: [Read, Write, Grep, Glob, Bash]
5
- ---
6
-
7
- <!-- vigiles:sha256:953fdd419dbc789c compiled from skills/osf-artifact-upload/SKILL.md.spec.ts -->
8
-
9
- # osf-artifact-upload — push/replace a file on an OSF project via API
10
-
11
- Verified working 2026-07-18 (replaced `artifact.zip` on the node of a real submission's artifact).
12
-
13
- ## Prereq — an OSF personal access token
14
- - Create at **osf.io/settings/tokens** → scope **`osf.full_write`** (read-only cannot write). Shown once.
15
- - Put it in the env as `OSF_TOKEN` for the session, OR the user pastes it. **NEVER commit it, never echo it,
16
- never write it into a file or the skill.** Remind the user to **revoke it** after the upload.
17
- - ⚠️ Note: a token stored as a gzipped/base64 blob in some other env var may be **blocked from decoding by
18
- the auto-mode classifier** (correctly). Don't fight it — ask for a fresh `osf.full_write` token instead.
19
-
20
- ## Gotchas learned (bake these in)
21
- - **curl globbing:** OSF API URLs with `[ ]` (e.g. `?page[size]=50`) make curl fail silently (empty body,
22
- no status). Always use **`curl -g`** (disable globbing) or drop the bracketed param.
23
- - **Flaky proxy:** calls intermittently return 0 bytes / empty. **Retry** (loop until valid JSON;
24
- `--retry 3`). Verify by API metadata, not only by the waterbutler download (download-back flakes most).
25
- - **CA bundle:** in this env, add `--cacert /root/.ccr/ca-bundle.crt` to every curl.
26
- - **Node GUID:** the `osf.io/<guid>` in the paper's Availability (a five-character guid, e.g. `ab12c`) IS the node id; the
27
- `?view_only=…` is a separate anonymized link. With the owner token you address the node by its guid.
28
- - **`set +x`** and keep the token only in a shell variable — never in printed output.
29
-
30
- ## Recipe (all curl; `$T`=token, `$CA`=/root/.ccr/ca-bundle.crt, `$NODE`=guid, `$ZIP`=local file)
31
- ```bash
32
- set +x; CA=/root/.ccr/ca-bundle.crt; T="$OSF_TOKEN"; AUTH="Authorization: Bearer $T"; NODE=<guid> # the node from YOUR paper's Availability line
33
- # 1. verify auth (expect HTTP 200 + your name)
34
- curl -g -s --retry 3 --cacert $CA -H "$AUTH" https://api.osf.io/v2/users/me/ \
35
- | python3 -c "import sys,json;d=json.load(sys.stdin);print('auth:',d['data']['attributes']['full_name'])"
36
- # 2. list osfstorage files → each file's links.upload is its waterbutler URL (for a NEW VERSION)
37
- curl -g -s --retry 3 --cacert $CA -H "$AUTH" "https://api.osf.io/v2/nodes/$NODE/files/osfstorage/" >/tmp/f.json
38
- # parse: find the target file's attributes.name==X → f['links']['upload'] (call it $UP)
39
- # to ADD a new file instead: use the folder's upload link from /v2/nodes/$NODE/files/ (osfstorage provider)
40
- # 3. push new version (PUT the bytes; append kind=file)
41
- curl -g -s --retry 3 --cacert $CA -H "$AUTH" -X PUT --data-binary @"$ZIP" "${UP}?kind=file" -o /tmp/up.json
42
- # success = HTTP 200 + data.attributes.extra.version incremented + size matches
43
- # 4. VERIFY by API metadata: re-list files, confirm attributes.size and extra.hashes.md5 == md5sum of $ZIP
44
- ```
45
- Verification that actually holds: **OSF-stored md5 == `md5sum $ZIP`**. The upload response also returns the
46
- md5; matching it to the local file is proof even when the download-back call flakes.
47
-
48
- ## What the artifact ships about each study
49
- Before zipping, the artifact carries, for every study the paper reports: its `plan.json` (its mode)
50
- and its decision file; and `repro/README.md` with the index regenerated (`npx paperlint studies index <paper-dir>`)
51
- — each study's mode, decision commit and first output — with the command that re-checks the order
52
- (`npx paperlint lint` on a full clone). A zip without them asks a reviewer to take the modes on trust.
53
-
54
- ## After
55
- - Confirm the paper's Availability `\url{}` still points at the same node (it does — same guid).
56
- - Tell the user to **revoke the token** (osf.io/settings/tokens → Delete).
57
- - If the artifact is stored unpacked (README.md, reproduce.py, data/…) rather than as a zip, replace each
58
- stale file the same way (each has its own `links.upload`).
@@ -1,65 +0,0 @@
1
- // Compiled to SKILL.md by `vigiles compile`. Edit THIS file, never the markdown.
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
- import { experimental_skill } from "vigiles/spec";
8
-
9
- export default experimental_skill({
10
- name: "osf-artifact-upload",
11
- description:
12
- "Upload or replace a paper's reproduction artifact file on an OSF project via the OSF API — for anonymized/view-only artifacts hosted for peer review (AISec/AgenticDev etc.). Use when a paper's OSF-hosted artifact needs a file added or a new version pushed (e.g. after fixing the artifact README or regenerating artifact.zip), and the OSF web UI is inconvenient. Composes with submit-paper / submit-paper-<venue>.",
13
- tools: ["Read", "Write", "Grep", "Glob", "Bash"],
14
- body: `
15
- # osf-artifact-upload — push/replace a file on an OSF project via API
16
-
17
- Verified working 2026-07-18 (replaced \`artifact.zip\` on the node of a real submission's artifact).
18
-
19
- ## Prereq — an OSF personal access token
20
- - Create at **osf.io/settings/tokens** → scope **\`osf.full_write\`** (read-only cannot write). Shown once.
21
- - Put it in the env as \`OSF_TOKEN\` for the session, OR the user pastes it. **NEVER commit it, never echo it,
22
- never write it into a file or the skill.** Remind the user to **revoke it** after the upload.
23
- - ⚠️ Note: a token stored as a gzipped/base64 blob in some other env var may be **blocked from decoding by
24
- the auto-mode classifier** (correctly). Don't fight it — ask for a fresh \`osf.full_write\` token instead.
25
-
26
- ## Gotchas learned (bake these in)
27
- - **curl globbing:** OSF API URLs with \`[ ]\` (e.g. \`?page[size]=50\`) make curl fail silently (empty body,
28
- no status). Always use **\`curl -g\`** (disable globbing) or drop the bracketed param.
29
- - **Flaky proxy:** calls intermittently return 0 bytes / empty. **Retry** (loop until valid JSON;
30
- \`--retry 3\`). Verify by API metadata, not only by the waterbutler download (download-back flakes most).
31
- - **CA bundle:** in this env, add \`--cacert /root/.ccr/ca-bundle.crt\` to every curl.
32
- - **Node GUID:** the \`osf.io/<guid>\` in the paper's Availability (a five-character guid, e.g. \`ab12c\`) IS the node id; the
33
- \`?view_only=…\` is a separate anonymized link. With the owner token you address the node by its guid.
34
- - **\`set +x\`** and keep the token only in a shell variable — never in printed output.
35
-
36
- ## Recipe (all curl; \`$T\`=token, \`$CA\`=/root/.ccr/ca-bundle.crt, \`$NODE\`=guid, \`$ZIP\`=local file)
37
- \`\`\`bash
38
- set +x; CA=/root/.ccr/ca-bundle.crt; T="$OSF_TOKEN"; AUTH="Authorization: Bearer $T"; NODE=<guid> # the node from YOUR paper's Availability line
39
- # 1. verify auth (expect HTTP 200 + your name)
40
- curl -g -s --retry 3 --cacert $CA -H "$AUTH" https://api.osf.io/v2/users/me/ \\
41
- | python3 -c "import sys,json;d=json.load(sys.stdin);print('auth:',d['data']['attributes']['full_name'])"
42
- # 2. list osfstorage files → each file's links.upload is its waterbutler URL (for a NEW VERSION)
43
- curl -g -s --retry 3 --cacert $CA -H "$AUTH" "https://api.osf.io/v2/nodes/$NODE/files/osfstorage/" >/tmp/f.json
44
- # parse: find the target file's attributes.name==X → f['links']['upload'] (call it $UP)
45
- # to ADD a new file instead: use the folder's upload link from /v2/nodes/$NODE/files/ (osfstorage provider)
46
- # 3. push new version (PUT the bytes; append kind=file)
47
- curl -g -s --retry 3 --cacert $CA -H "$AUTH" -X PUT --data-binary @"$ZIP" "\${UP}?kind=file" -o /tmp/up.json
48
- # success = HTTP 200 + data.attributes.extra.version incremented + size matches
49
- # 4. VERIFY by API metadata: re-list files, confirm attributes.size and extra.hashes.md5 == md5sum of $ZIP
50
- \`\`\`
51
- Verification that actually holds: **OSF-stored md5 == \`md5sum $ZIP\`**. The upload response also returns the
52
- md5; matching it to the local file is proof even when the download-back call flakes.
53
-
54
- ## What the artifact ships about each study
55
- Before zipping, the artifact carries, for every study the paper reports: its \`plan.json\` (its mode)
56
- and its decision file; and \`repro/README.md\` with the index regenerated (\`npx paperlint studies index <paper-dir>\`)
57
- — each study's mode, decision commit and first output — with the command that re-checks the order
58
- (\`npx paperlint lint\` on a full clone). A zip without them asks a reviewer to take the modes on trust.
59
-
60
- ## After
61
- - Confirm the paper's Availability \`\\url{}\` still points at the same node (it does — same guid).
62
- - Tell the user to **revoke the token** (osf.io/settings/tokens → Delete).
63
- - If the artifact is stored unpacked (README.md, reproduce.py, data/…) rather than as a zip, replace each
64
- stale file the same way (each has its own \`links.upload\`).`,
65
- });
@@ -1,22 +0,0 @@
1
- /**
2
- * osf-artifact-upload — the PAID tier: does this skill's description actually fire?
3
- *
4
- * COLOCATED ON PURPOSE (vigiles decides coverage by placement as of 2026-08-11).
5
- * The prompts live in `.claude/lib/skill-trigger-cases.mjs` so every case is
6
- * reviewed as one table where collisions between siblings are visible; copying
7
- * them here would recreate the drift that rule exists to prevent.
8
- *
9
- * Measures recall (fires on its own territory) AND precision (stays quiet on a
10
- * colliding sibling's territory), against the REAL `.claude` harness so the skill
11
- * competes with every other installed description — an isolated run overstates
12
- * recall and understates false positives.
13
- *
14
- * ⚠️ NEVER RUN. This case was written 2026-08-11 with the other two the coverage
15
- * sweep surfaced; its rate is UNKNOWN, not assumed good.
16
- *
17
- * Costs money; not CI.
18
- * node .claude/skills/osf-artifact-upload/osf-artifact-upload.eval.mjs [trials]
19
- */
20
- import { runSkillTriggerEval } from "../../lib/skill-eval-kit.mjs";
21
-
22
- await runSkillTriggerEval("osf-artifact-upload");
@@ -1,102 +0,0 @@
1
- /**
2
- * osf-artifact-upload — the free, deterministic tier. No model, no network, no OSF.
3
- *
4
- * WHY THIS ONE IS NOT A `checkSkill()` ONE-LINER. It is not a stage — it is a
5
- * utility `submit-paper` composes with — and what matters about it is the rules
6
- * it states about its own commands, which the shared per-skill checks do not read.
7
- *
8
- * WHAT IT CHECKS: the two rules this skill states about its OWN commands, in its
9
- * own §gotchas — that every `curl` carries `-g` (bracketed OSF params glob and
10
- * the request fails SILENTLY: empty body, no status) and `--cacert` (this
11
- * environment's proxy). The rule and its violation would live in the same file
12
- * three paragraphs apart, with nothing comparing them. That is `prose isn't
13
- * policy` at its smallest, applied to us.
14
- *
15
- * 🔴 THIS FILE WAS ~100 LINES ON 2026-08-11 AND IS NOW ~30. The difference is not
16
- * cleverness, it is that the parsing moved into vigiles (`commandsIn` /
17
- * `mustInclude`, shipped the same day for this reason). What remains is the rule
18
- * itself. That is the whole test of "mechanism in vigiles, data here": the
19
- * markdown parsing, the prose-vs-command distinction and the message formatting
20
- * are the same for anyone; the flags are ours.
21
- *
22
- * What it does NOT prove: that an upload works. That needs a live OSF project
23
- * and a real token, deliberately out of scope.
24
- */
25
- import { readFileSync } from "node:fs";
26
- import { dirname, join } from "node:path";
27
- import { fileURLToPath } from "node:url";
28
- // ⚠️ `commandsIn`/`mustInclude` shipped AFTER vigiles 15.0.2. A test that simply
29
- // threw on the import would read as "this skill is broken"; the honest state is
30
- // "the check exists and its library is not here yet", so it SKIPS with exit 77 —
31
- // the documented convention, which the runner surfaces as a loud ⊘ rather than a
32
- // silent ✓. The guard stays even though 16.0.1 ships all three: it is what turns a
33
- // future removal into a legible message instead of a stack trace.
34
- //
35
- // The subpath was `vigiles/testing` until v16 split the exports BY COST (#149) —
36
- // free deterministic testing is now the root barrel, and anything that spends money
37
- // lives in `vigiles/eval` behind a `paid_` prefix. These three are free.
38
- const testing = await import("vigiles");
39
- const { commandsIn, mustInclude, mustNotInclude, assertChecks, recordCheck } =
40
- testing;
41
- if (typeof commandsIn !== "function") {
42
- console.log(
43
- "⊘ SKIP osf-artifact-upload: needs `commandsIn`/`mustInclude` from vigiles " +
44
- "(newer than the installed 15.0.2). The rules below are the test; only the " +
45
- "library that evaluates them is missing.",
46
- );
47
- process.exit(77);
48
- }
49
-
50
- const src = readFileSync(
51
- join(dirname(fileURLToPath(import.meta.url)), "SKILL.md"),
52
- "utf-8",
53
- );
54
- const curls = commandsIn(src, /(^|[|;&]\s*)curl\b/);
55
-
56
- assertChecks(curls, [
57
- mustInclude(
58
- "-g",
59
- "the skill's own §gotchas: bracketed OSF params (?page[size]=50) glob and the " +
60
- "request fails SILENTLY — empty body, no status code. Silent is why this is " +
61
- "asserted rather than trusted.",
62
- ),
63
- mustInclude(
64
- "--cacert",
65
- "the skill's own §gotchas: this environment's proxy needs the CA bundle on every curl.",
66
- ),
67
- // Not stated in the file, and it should never need to be: this skill sends an
68
- // OSF bearer token, so an example that disabled TLS verification would teach
69
- // the agent to leak it on any hostile network.
70
- mustNotInclude(
71
- "-k",
72
- "this skill sends a bearer token; -k/--insecure disables verification and hands it to any proxy.",
73
- ),
74
- ]);
75
-
76
- // The token check has no home in the command vocabulary — it is about the file's
77
- // prose, not its commands. The skill's own instruction is "NEVER commit it,
78
- // never echo it", and this file IS committed.
79
- const literal = /\b[0-9a-fA-F]{40,}\b/.exec(src);
80
- if (literal)
81
- throw new Error(
82
- `a literal credential-shaped string is present (${literal[0].slice(0, 12)}…). ` +
83
- `This skill's own text says "NEVER commit it, never echo it".`,
84
- );
85
-
86
- // 🔴 WITHOUT THIS THE RUNNER READS THIS FILE AS DOING NOTHING, and says so:
87
- // `∅ 0 CHECKS (it ran clean and verified nothing)` — and exits 1 on it, which is
88
- // the whole job red. Everything above DOES assert; it just asserts through
89
- // `assertChecks` and a thrown Error, neither of which increments the counter the
90
- // runner reads. So the file was simultaneously the strictest thing here (it is the
91
- // only guard standing between a bearer token and `-k`) and the reason CI was red.
92
- //
93
- // `recordCheck` exists for exactly this — its own doc says to call it "when you
94
- // assert some OTHER way … instead of leaving it to conclude the file did nothing".
95
- // Counted, not guessed: three command properties (-g, --cacert, no -k) across the
96
- // curls, plus the one credential check over the file.
97
- recordCheck(3 * curls.length + 1);
98
-
99
- console.log(
100
- `✓ osf-artifact-upload: ${String(curls.length)} curl command(s) carry -g and --cacert, ` +
101
- `none disable TLS, no pasted credential`,
102
- );