paperlint 20.8.0 → 20.9.1

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 (41) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/dist/skill-chunks/{chunk-J5XYPERO.js → chunk-FOYA3JCS.js} +0 -6
  3. package/dist/skill-chunks/chunk-KCX34KV4.js +7610 -0
  4. package/dist/skill-chunks/{chunk-WYQTXKNM.js → chunk-KIKDPXE4.js} +2 -2
  5. package/dist/skill-chunks/{chunk-EDHTB7KT.js → chunk-MX3LJNFG.js} +4 -2
  6. package/dist/skill-chunks/chunk-UE2CAVD6.js +34 -0
  7. package/dist/skill-chunks/{chunk-QPWFSYJG.js → chunk-ZWJMR4TF.js} +5 -7
  8. package/dist/skills/paper-pipeline/scripts/revision-plan-core.d.ts +79 -0
  9. package/dist/skills/paper-pipeline/scripts/revision-plan.d.ts +2 -0
  10. package/package.json +1 -1
  11. package/scripts/bundle-skills.ts +1 -0
  12. package/scripts/test.test.ts +1 -0
  13. package/scripts/test.ts +4 -0
  14. package/skills/argument-arc/scripts/headings.js +3 -2
  15. package/skills/cold-read-diff/scripts/cold-read.js +3 -2
  16. package/skills/find-venue/SKILL.md +3 -2
  17. package/skills/find-venue/SKILL.md.spec.ts +2 -1
  18. package/skills/harden-paper/SKILL.md +5 -1
  19. package/skills/harden-paper/SKILL.md.spec.ts +4 -0
  20. package/skills/paper-pipeline/SKILL.md +29 -4
  21. package/skills/paper-pipeline/SKILL.md.spec.ts +28 -3
  22. package/skills/paper-pipeline/scripts/README.md +6 -5
  23. package/skills/paper-pipeline/scripts/extract-ref-facts.js +4 -3
  24. package/skills/paper-pipeline/scripts/revision-plan-core.js +194 -0
  25. package/skills/paper-pipeline/scripts/revision-plan-core.ts +286 -0
  26. package/skills/paper-pipeline/scripts/revision-plan.js +462 -0
  27. package/skills/paper-pipeline/scripts/revision-plan.test.ts +386 -0
  28. package/skills/paper-pipeline/scripts/revision-plan.ts +21 -0
  29. package/skills/paper-status/SKILL.md +2 -1
  30. package/skills/paper-status/SKILL.md.spec.ts +1 -0
  31. package/skills/pc-panel-review/SKILL.md +5 -2
  32. package/skills/pc-panel-review/SKILL.md.spec.ts +4 -1
  33. package/skills/pc-panel-review/pc-panel-review.harness.ts +122 -0
  34. package/skills/pc-panel-review/scripts/prior-reviews.js +11 -7031
  35. package/skills/study-accepted-papers/SKILL.md +5 -2
  36. package/skills/study-accepted-papers/SKILL.md.spec.ts +4 -1
  37. package/skills/study-accepted-papers/scripts/corpus-licences.js +1 -1
  38. package/skills/tighten-paper/SKILL.md +3 -2
  39. package/skills/tighten-paper/SKILL.md.spec.ts +2 -1
  40. package/skills/verify-citations/scripts/bib-authors.js +4 -3
  41. package/skills/verify-citations/scripts/verify-cites.js +4 -3
@@ -0,0 +1,386 @@
1
+ /**
2
+ * revision-plan-core.ts: the report every review skill reads before it starts. Its line format is the
3
+ * contract (the skills read `plan:`, `scope:`, the rows and `stop:`), so the tests pin whole lines.
4
+ * Papers are written to a temporary folder and read through the real disk adapter, so a venue preset
5
+ * resolves against the shipped presets.
6
+ */
7
+ import { dirname, join } from "node:path";
8
+ import { fileURLToPath } from "node:url";
9
+ import { describe, expect, it } from "vitest";
10
+ import { nodeFiles } from "#src/adapters/node/index";
11
+ import { revisionPlanCodec } from "#src/adapters/revision-plan/index";
12
+ import { presetsDir } from "#src/package-dirs";
13
+ import { runNode, useTempDir, writeTree } from "../../../test/support.ts";
14
+ import {
15
+ main,
16
+ report,
17
+ scopeText,
18
+ stopOf,
19
+ type Deps,
20
+ } from "./revision-plan-core.ts";
21
+
22
+ const SCRIPT = join(
23
+ dirname(fileURLToPath(import.meta.url)),
24
+ "revision-plan.ts",
25
+ );
26
+ const DEPS: Deps = {
27
+ files: nodeFiles,
28
+ codec: revisionPlanCodec,
29
+ venuesDir: presetsDir(),
30
+ };
31
+ const root = useTempDir();
32
+
33
+ const cycle = (id: string, extendsSpec: string, outcome?: object) => ({
34
+ id,
35
+ venue: { kind: "preset", extends: extendsSpec },
36
+ opened: "2026-11-01",
37
+ deadlines: [],
38
+ ...(outcome === undefined ? {} : { outcome }),
39
+ });
40
+ const LANGCODE = cycle("langcode-2027", "paperlint:langcode-2027");
41
+
42
+ const ROWS = [
43
+ {
44
+ id: "R1",
45
+ what: "the threats section names the second model",
46
+ from: { kind: "author" },
47
+ added: "2026-11-25",
48
+ state: "done",
49
+ evidence: "reviews/2026-11-25-panel.md",
50
+ },
51
+ {
52
+ id: "R2",
53
+ what: "a Limitations section",
54
+ from: { kind: "venue" },
55
+ added: "2026-11-25",
56
+ state: "by-rule",
57
+ rule: "tex/required-section",
58
+ },
59
+ {
60
+ id: "R3",
61
+ what: "rerun the grid on a third model",
62
+ from: { kind: "author" },
63
+ added: "2026-11-25",
64
+ state: "dropped",
65
+ reason: "no budget this cycle",
66
+ kind: "accepted-cap",
67
+ },
68
+ {
69
+ id: "R4",
70
+ what: "shorten the introduction",
71
+ from: { kind: "author" },
72
+ added: "2026-11-27",
73
+ state: "todo",
74
+ },
75
+ ];
76
+ const PLAN = {
77
+ cycle: "langcode-2027",
78
+ written: "2026-11-25",
79
+ bar: { kind: "none", why: "no corpus of this workshop yet" },
80
+ measurement: { kind: "open" },
81
+ remaining: ROWS,
82
+ };
83
+
84
+ /** A paper folder with these files; its path. */
85
+ const paper = (
86
+ name: string,
87
+ files: Readonly<Record<string, unknown>>,
88
+ ): string => {
89
+ const dir = join(root, name);
90
+ writeTree(
91
+ dir,
92
+ Object.fromEntries(
93
+ Object.entries(files).map(([k, v]) => [
94
+ k,
95
+ typeof v === "string" ? v : JSON.stringify(v),
96
+ ]),
97
+ ),
98
+ );
99
+ return dir;
100
+ };
101
+
102
+ const LANGCODE_SCOPE = [
103
+ "scope: https://langcode2027.github.io/ (read 2026-11-25)",
104
+ " > Towards secure, trustworthy, robust, and multilingual code generation.",
105
+ " > We invite submissions across five areas, including but not limited to:",
106
+ ];
107
+
108
+ describe("report: a plan for the current cycle", () => {
109
+ it("prints the cycle, bar, measurement, growth, scope, each row and the stop line", () => {
110
+ const dir = paper("current", {
111
+ "paperlint.json": { cycles: [LANGCODE] },
112
+ "revision-plan.json": PLAN,
113
+ });
114
+ const r = report(dir, DEPS);
115
+ expect(r.code).toBe(0);
116
+ // Guards: the scope is the preset's own sentences, verbatim, after the plan's head lines.
117
+ expect(r.lines.slice(0, 7)).toEqual([
118
+ "plan: langcode-2027, written 2026-11-25 · the current cycle",
119
+ "bar: none — no corpus of this workshop yet",
120
+ "measurement: open — new evidence may still be added",
121
+ "rows added after the plan was written: 1 (R4)",
122
+ ...LANGCODE_SCOPE,
123
+ ]);
124
+ // Guards: each row's state and what closes it; the stop line names open and lint-decided rows.
125
+ expect(r.lines.slice(-5)).toEqual([
126
+ "R1 done the threats section names the second model — evidence: reviews/2026-11-25-panel.md",
127
+ "R2 by-rule a Limitations section — closed when paperlint lint reports nothing for tex/required-section",
128
+ "R3 dropped rerun the grid on a third model — accepted-cap: no budget this cycle",
129
+ "R4 todo shorten the introduction",
130
+ "stop: not met — open R4 · paperlint lint decides R2",
131
+ ]);
132
+ });
133
+
134
+ it("says met when every row is done or dropped", () => {
135
+ const closed = ROWS.filter((row) => row.id === "R1" || row.id === "R3");
136
+ const dir = paper("met", {
137
+ "paperlint.json": { cycles: [LANGCODE] },
138
+ "revision-plan.json": {
139
+ ...PLAN,
140
+ bar: { kind: "corpus", series: "naacl", editions: [2025, 2026] },
141
+ measurement: {
142
+ kind: "enough",
143
+ since: "2026-11-20",
144
+ evidence: "repro/README.md",
145
+ },
146
+ remaining: closed,
147
+ },
148
+ });
149
+ const r = report(dir, DEPS);
150
+ expect(r.lines.slice(1, 4)).toEqual([
151
+ "bar: the accepted papers of naacl, 2025, 2026",
152
+ "measurement: enough since 2026-11-20 (repro/README.md) — no new study, only the text",
153
+ "rows added after the plan was written: 0",
154
+ ]);
155
+ expect(r.lines.at(-1)).toBe("stop: met — every row is done or dropped");
156
+ });
157
+ });
158
+
159
+ describe("report: the bar and stop line variants", () => {
160
+ it("names the series a proxy bar stands in for", () => {
161
+ const dir = paper("proxy", {
162
+ "paperlint.json": { cycles: [LANGCODE] },
163
+ "revision-plan.json": {
164
+ ...PLAN,
165
+ bar: { kind: "proxy", series: "acl", stands_in_for: "LangCode" },
166
+ },
167
+ });
168
+ expect(report(dir, DEPS).lines[1]).toBe(
169
+ "bar: the accepted papers of acl, standing in for LangCode",
170
+ );
171
+ });
172
+ it("names only what lint decides when no row is open", () => {
173
+ const dir = paper("by-rule-only", {
174
+ "paperlint.json": { cycles: [LANGCODE] },
175
+ "revision-plan.json": {
176
+ ...PLAN,
177
+ remaining: ROWS.filter((row) => row.id !== "R4"),
178
+ },
179
+ });
180
+ expect(report(dir, DEPS).lines.at(-1)).toBe(
181
+ "stop: not met — paperlint lint decides R2",
182
+ );
183
+ });
184
+
185
+ it("names only the open rows when no row is left to lint", () => {
186
+ const dir = paper("open-only", {
187
+ "paperlint.json": { cycles: [LANGCODE] },
188
+ "revision-plan.json": {
189
+ ...PLAN,
190
+ remaining: ROWS.filter((row) => row.id !== "R2"),
191
+ },
192
+ });
193
+ expect(report(dir, DEPS).lines.at(-1)).toBe("stop: not met — open R4");
194
+ });
195
+ });
196
+
197
+ describe("scopeText", () => {
198
+ it("prints no topics heading for a scope that lists none", () => {
199
+ expect(
200
+ scopeText({
201
+ url: "https://example.org/cfp",
202
+ read: "2026-11-25",
203
+ sentences: ["Papers on code."],
204
+ topics: [],
205
+ }),
206
+ ).toEqual([
207
+ "scope: https://example.org/cfp (read 2026-11-25)",
208
+ " > Papers on code.",
209
+ ]);
210
+ });
211
+ });
212
+
213
+ describe("report: a plan that does not fit the paper's cycles", () => {
214
+ it("says a plan for an earlier cycle must be rewritten, and gives no stop verdict", () => {
215
+ const dir = paper("stale", {
216
+ "paperlint.json": {
217
+ cycles: [
218
+ cycle("acsac-2026", "paperlint:acsac-2026", {
219
+ kind: "withdrawn",
220
+ date: "2026-11-02",
221
+ evidence: "reviews/withdrawn.eml",
222
+ }),
223
+ LANGCODE,
224
+ ],
225
+ },
226
+ "revision-plan.json": { ...PLAN, cycle: "acsac-2026" },
227
+ });
228
+ const r = report(dir, DEPS);
229
+ expect(r.lines[0]).toBe(
230
+ "plan: acsac-2026, written 2026-11-25 · the current cycle is langcode-2027 — rewrite the plan for it",
231
+ );
232
+ expect(r.lines.at(-1)).toBe(
233
+ "stop: unknown — the plan is for acsac-2026, not langcode-2027",
234
+ );
235
+ });
236
+
237
+ it("says so when the paper has no open cycle", () => {
238
+ const dir = paper("closed", {
239
+ "paperlint.json": {
240
+ cycles: [
241
+ cycle("langcode-2027", "paperlint:langcode-2027", {
242
+ kind: "withdrawn",
243
+ date: "2026-11-30",
244
+ evidence: "reviews/withdrawn.eml",
245
+ }),
246
+ ],
247
+ },
248
+ "revision-plan.json": PLAN,
249
+ });
250
+ expect(report(dir, DEPS).lines[0]).toBe(
251
+ "plan: langcode-2027, written 2026-11-25 · the paper has no open cycle",
252
+ );
253
+ });
254
+
255
+ it("says so when paperlint.json keeps no cycles", () => {
256
+ const dir = paper("flat", {
257
+ "paperlint.json": { extends: "paperlint:acsac-2026" },
258
+ "revision-plan.json": PLAN,
259
+ });
260
+ const r = report(dir, DEPS);
261
+ expect(r.lines[0]).toBe(
262
+ "plan: langcode-2027, written 2026-11-25 · paperlint.json keeps no cycles to hold it against",
263
+ );
264
+ // Guards: a venue whose preset has no `scope` says so and names the skill that adds it.
265
+ expect(r.lines[4]).toBe(
266
+ "scope: none recorded — acsac-2026 has no `scope` in its preset (add-venue)",
267
+ );
268
+ });
269
+ });
270
+
271
+ describe("report: no plan", () => {
272
+ it("with no plan, prints that and the venue's scope, and exits 0", () => {
273
+ const dir = paper("none", { "paperlint.json": { cycles: [LANGCODE] } });
274
+ const r = report(dir, DEPS);
275
+ expect(r.code).toBe(0);
276
+ expect(r.lines.slice(0, 5)).toEqual([
277
+ `plan: none written — ${join(dir, "revision-plan.json")} does not exist`,
278
+ ...LANGCODE_SCOPE,
279
+ " topics:",
280
+ ]);
281
+ // Guards: the call's topic list follows, one topic a line, and the stop line closes the report.
282
+ const topics = r.lines.slice(5, -1);
283
+ expect(topics.length).toBeGreaterThan(0);
284
+ expect(topics.every((l) => l.startsWith(" - "))).toBe(true);
285
+ expect(r.lines.at(-1)).toBe("stop: no plan — nothing says what is left");
286
+ });
287
+
288
+ it("with no paperlint.json, says the paper names no venue", () => {
289
+ const dir = paper("bare", { "paper.tex": "" });
290
+ expect(report(dir, DEPS).lines).toEqual([
291
+ `plan: none written — ${join(dir, "revision-plan.json")} does not exist`,
292
+ "scope: no venue — paperlint.json names no preset",
293
+ "stop: no plan — nothing says what is left",
294
+ ]);
295
+ });
296
+ });
297
+
298
+ describe("report: a plan or paperlint.json that cannot be read", () => {
299
+ it("reports a plan that does not parse at its fields, and exits 1", () => {
300
+ const dir = paper("broken", {
301
+ "paperlint.json": { cycles: [LANGCODE] },
302
+ "revision-plan.json": { ...PLAN, bar: { kind: "corpus" } },
303
+ });
304
+ const r = report(dir, DEPS);
305
+ expect(r.code).toBe(1);
306
+ expect(r.lines[0]).toBe(
307
+ `plan: unreadable — ${join(dir, "revision-plan.json")}`,
308
+ );
309
+ expect(r.lines.slice(1, -1).every((l) => l.startsWith(" bar."))).toBe(
310
+ true,
311
+ );
312
+ expect(r.lines.at(-1)).toBe("stop: unreadable — fix the plan first");
313
+ });
314
+
315
+ it("names the whole file when it is not JSON", () => {
316
+ const dir = paper("not-json", {
317
+ "paperlint.json": { cycles: [LANGCODE] },
318
+ "revision-plan.json": "{",
319
+ });
320
+ expect(report(dir, DEPS).lines[1]).toBe(" (the file): not JSON");
321
+ });
322
+
323
+ it("refuses a paperlint.json that does not parse, before reading the plan", () => {
324
+ const dir = paper("bad-settings", {
325
+ "paperlint.json": "{",
326
+ "revision-plan.json": PLAN,
327
+ });
328
+ const r = report(dir, DEPS);
329
+ expect(r.code).toBe(1);
330
+ expect(r.lines).toHaveLength(1);
331
+ expect(r.lines[0]?.startsWith(join(dir, "paperlint.json"))).toBe(true);
332
+ });
333
+
334
+ it("prints the plan with the scope unknown when the preset does not resolve", () => {
335
+ const dir = paper("bad-preset", {
336
+ "paperlint.json": { extends: "paperlint:no-such-venue" },
337
+ "revision-plan.json": PLAN,
338
+ });
339
+ const r = report(dir, DEPS);
340
+ expect(r.code).toBe(0);
341
+ expect(r.lines[4]?.startsWith("scope: unknown — ")).toBe(true);
342
+ });
343
+ });
344
+
345
+ describe("stopOf", () => {
346
+ it("is met on an empty list", () => {
347
+ expect(stopOf([])).toEqual({ kind: "met" });
348
+ });
349
+ });
350
+
351
+ describe("the command", () => {
352
+ it("prints the report on stdout as a process", () => {
353
+ const dir = paper("process", {
354
+ "paperlint.json": { cycles: [LANGCODE] },
355
+ });
356
+ const r = runNode(SCRIPT, [dir], { cwd: "/" });
357
+ expect(r.status).toBe(0);
358
+ expect(r.stdout.split("\n")[0]).toBe(
359
+ `plan: none written — ${join(dir, "revision-plan.json")} does not exist`,
360
+ );
361
+ });
362
+
363
+ it("writes an unreadable plan to stderr", () => {
364
+ const dir = paper("stderr", {
365
+ "paperlint.json": { cycles: [LANGCODE] },
366
+ "revision-plan.json": "{",
367
+ });
368
+ const out: string[] = [];
369
+ const err: string[] = [];
370
+ const code = main([dir], DEPS, {
371
+ out: (s) => out.push(s),
372
+ err: (s) => err.push(s),
373
+ });
374
+ expect({ code, out }).toEqual({ code: 1, out: [] });
375
+ expect(err.join("").startsWith("plan: unreadable")).toBe(true);
376
+ });
377
+
378
+ it("asks for the paper folder on stderr with exit 2, as a process", () => {
379
+ const r = runNode(SCRIPT, [], { cwd: "/" });
380
+ expect({ status: r.status, stdout: r.stdout, stderr: r.stderr }).toEqual({
381
+ status: 2,
382
+ stdout: "",
383
+ stderr: "usage: node revision-plan.js <paper-dir>\n",
384
+ });
385
+ });
386
+ });
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * revision-plan — what a paper's `revision-plan.json` says is left before it is submitted
4
+ * (`revision-plan-core.ts`); this file only runs it. A consumer runs the compiled `revision-plan.js`
5
+ * (Node strips no types under node_modules).
6
+ *
7
+ * Usage: node revision-plan.js <paper-dir>
8
+ */
9
+ import { nodeFiles } from "#src/adapters/node/index";
10
+ import { revisionPlanCodec } from "#src/adapters/revision-plan/index";
11
+ import { presetsDir } from "#src/package-dirs";
12
+ import { main } from "./revision-plan-core.ts";
13
+
14
+ process.exitCode = main(
15
+ process.argv.slice(2),
16
+ { files: nodeFiles, codec: revisionPlanCodec, venuesDir: presetsDir() },
17
+ {
18
+ out: (s) => process.stdout.write(s),
19
+ err: (s) => process.stderr.write(s),
20
+ },
21
+ );
@@ -4,7 +4,7 @@ description: Answer "what's the status of the paper?" in one pass — MEASURE wh
4
4
  allowed-tools: [Bash, Read, Grep, Glob]
5
5
  ---
6
6
 
7
- <!-- vigiles:sha256:5ecfb3138808a249 compiled from skills/paper-status/SKILL.md.spec.ts -->
7
+ <!-- vigiles:sha256:6e99938b691306d5 compiled from skills/paper-status/SKILL.md.spec.ts -->
8
8
 
9
9
  # paper-status — state, measured before it is narrated
10
10
 
@@ -51,6 +51,7 @@ cd <paper-dir>
51
51
  bash repro/tools/build-submission.sh 2>&1 | grep -Ei 'body pages|VERDICT|Overfull|undefined|anonymity'
52
52
  git status --porcelain # uncommitted work
53
53
  git log --oneline @{u}..HEAD # unpushed commits
54
+ node ${CLAUDE_SKILL_DIR}/../paper-pipeline/scripts/revision-plan.js . # what is left this cycle (paper-pipeline, "The revision plan")
54
55
  npx paperlint lint # every error is a blocker
55
56
  ```
56
57
 
@@ -58,6 +58,7 @@ cd <paper-dir>
58
58
  bash repro/tools/build-submission.sh 2>&1 | grep -Ei 'body pages|VERDICT|Overfull|undefined|anonymity'
59
59
  git status --porcelain # uncommitted work
60
60
  git log --oneline @{u}..HEAD # unpushed commits
61
+ node \${CLAUDE_SKILL_DIR}/../paper-pipeline/scripts/revision-plan.js . # what is left this cycle (paper-pipeline, "The revision plan")
61
62
  npx paperlint lint # every error is a blocker
62
63
  \`\`\`
63
64
 
@@ -4,7 +4,7 @@ description: Use when asking "what would the program committee decide?" / "simul
4
4
  allowed-tools: [Read, Write, Grep, Glob, Bash, WebSearch, WebFetch, Agent, Skill]
5
5
  ---
6
6
 
7
- <!-- vigiles:sha256:0f74ef7b0488f6e2 compiled from skills/pc-panel-review/SKILL.md.spec.ts -->
7
+ <!-- vigiles:sha256:7603a4ee3cd7aada compiled from skills/pc-panel-review/SKILL.md.spec.ts -->
8
8
 
9
9
  # pc-panel-review — model the whole PC, not one reviewer
10
10
 
@@ -22,7 +22,10 @@ prose-only read can.
22
22
 
23
23
  ## How to run it
24
24
 
25
- 1. **Get the venue rubric + bar** (fetch the CFP; quote the criteria). Calibrate to the *track*: a
25
+ 0. **Read the revision plan:** `node ${CLAUDE_SKILL_DIR}/../paper-pipeline/scripts/revision-plan.js <paper-dir>`, read as `paper-pipeline` says ("The revision plan").
26
+ Its `scope:` lines are the venue's call: hand them to every seat. A must-fix no row covers is
27
+ reported as a proposal, not a blocker.
28
+ 1. **Get the venue rubric + bar** (fetch the CFP for what the `scope:` lines do not give; quote the criteria). Calibrate to the *track*: a
26
29
  WIP/short/workshop bar rewards promise and discussion value; a full-paper/top-tier bar demands
27
30
  completeness. Do not import top-tier standards into a WIP review.
28
31
  **Then load the venue's measured bar** per `paper-pipeline/references/venue-bar.md`: read
@@ -41,7 +41,10 @@ prose-only read can.
41
41
 
42
42
  ## How to run it
43
43
 
44
- 1. **Get the venue rubric + bar** (fetch the CFP; quote the criteria). Calibrate to the *track*: a
44
+ 0. **Read the revision plan:** \`node \${CLAUDE_SKILL_DIR}/../paper-pipeline/scripts/revision-plan.js <paper-dir>\`, read as \`paper-pipeline\` says ("The revision plan").
45
+ Its \`scope:\` lines are the venue's call: hand them to every seat. A must-fix no row covers is
46
+ reported as a proposal, not a blocker.
47
+ 1. **Get the venue rubric + bar** (fetch the CFP for what the \`scope:\` lines do not give; quote the criteria). Calibrate to the *track*: a
45
48
  WIP/short/workshop bar rewards promise and discussion value; a full-paper/top-tier bar demands
46
49
  completeness. Do not import top-tier standards into a WIP review.
47
50
  **Then load the venue's measured bar** per \`paper-pipeline/references/venue-bar.md\`: read
@@ -0,0 +1,122 @@
1
+ /**
2
+ * pc-panel-review — the agent-facing tier. Does an agent that loads this skill get step 0, and does
3
+ * the command step 0 names run from the skill's link and print the revision plan's report?
4
+ *
5
+ * Runs the REAL `claude` CLI against a SCRIPTED MOCK MODEL (`runHarnessTest`): $0, no API key.
6
+ * The script activates the skill, then runs step 0's command through the Bash tool from the link
7
+ * `paperlint init` makes. The command reaches `../paper-pipeline/scripts/revision-plan.js`, the
8
+ * BUNDLED script (`npm run build` makes it), which is what runs from `node_modules` or a plugin
9
+ * copy. A wrong relative path, or a script the bundle leaves out, fails here and in no unit test.
10
+ *
11
+ * What it does NOT prove: that a real model runs step 0 before it reviews, or treats a finding no
12
+ * row covers as a proposal. That is a behaviour eval, not this file.
13
+ */
14
+ import { spawnSync } from "node:child_process";
15
+ import { join } from "node:path";
16
+ import { runHarnessTest, skip, type ToolCall } from "vigiles";
17
+ import { createChecker } from "../../lib/check.ts";
18
+ import { observeAgentCli } from "#lib/agent-cli-version";
19
+ import { claudeDir } from "#src/package-dirs";
20
+
21
+ const check = createChecker();
22
+
23
+ const LINK = join(claudeDir(), "skills", "pc-panel-review");
24
+ const cli = observeAgentCli({ spawnSync });
25
+ if (!cli.present) skip(`pc-panel-review effects: ${cli.note}`);
26
+
27
+ const PLAN = {
28
+ cycle: "langcode-2027",
29
+ written: "2026-11-25",
30
+ bar: { kind: "none", why: "no corpus of this workshop yet" },
31
+ measurement: { kind: "open" },
32
+ remaining: [
33
+ {
34
+ id: "R1",
35
+ what: "a Limitations section",
36
+ from: { kind: "venue" },
37
+ added: "2026-11-25",
38
+ state: "by-rule",
39
+ rule: "tex/required-section",
40
+ },
41
+ {
42
+ id: "R2",
43
+ what: "shorten the introduction",
44
+ from: { kind: "author" },
45
+ added: "2026-11-25",
46
+ state: "todo",
47
+ },
48
+ ],
49
+ };
50
+ const SETTINGS = {
51
+ cycles: [
52
+ {
53
+ id: "langcode-2027",
54
+ venue: { kind: "preset", extends: "paperlint:langcode-2027" },
55
+ opened: "2026-11-01",
56
+ deadlines: [],
57
+ },
58
+ ],
59
+ };
60
+
61
+ const r = await runHarnessTest({
62
+ pluginDir: claudeDir(),
63
+ // bubblewrap is absent here; the code loaded is this repository's own `.claude`.
64
+ sandbox: false,
65
+ transcript: true,
66
+ timeoutMs: 180_000,
67
+ prompt: "run a PC panel review of the paper in paper/",
68
+ allowedTools: ["Skill", "Bash"],
69
+ files: {
70
+ "paper/paper.tex": "\\section{Introduction}\nText.\n",
71
+ "paper/paperlint.json": JSON.stringify(SETTINGS),
72
+ "paper/revision-plan.json": JSON.stringify(PLAN),
73
+ },
74
+ model: [
75
+ { tool: "Skill", input: { skill: "pc-panel-review" } },
76
+ {
77
+ tool: "Bash",
78
+ input: {
79
+ command: `node ${LINK}/../paper-pipeline/scripts/revision-plan.js paper`,
80
+ },
81
+ },
82
+ { text: "done" },
83
+ ],
84
+ });
85
+
86
+ const shown = (c: ToolCall | undefined): string =>
87
+ c ? c.resultText.slice(0, 600) : "never called";
88
+
89
+ try {
90
+ const activation = r.toolCalls.find((c) => c.name === "Skill");
91
+ check(
92
+ "the skill activated",
93
+ activation !== undefined && !activation.isError,
94
+ shown(activation),
95
+ );
96
+ const reached = r.modelRequests
97
+ .map((q) => [q.system, ...q.messages.map((m) => m.text)].join("\n"))
98
+ .join("\n");
99
+ check(
100
+ "step 0 reached the model, naming the plan script beside paper-pipeline",
101
+ reached.includes("Read the revision plan") &&
102
+ reached.includes("/../paper-pipeline/scripts/revision-plan.js"),
103
+ `${String(r.modelRequests.length)} requests`,
104
+ );
105
+ const report = r.toolCalls.find((c) => c.name === "Bash");
106
+ const lines = report?.resultText.trim().split("\n") ?? [];
107
+ check(
108
+ "step 0's command ran from the link and printed the plan, the venue's scope and the stop line",
109
+ report !== undefined &&
110
+ !report.isError &&
111
+ lines[0] ===
112
+ "plan: langcode-2027, written 2026-11-25 · the current cycle" &&
113
+ lines.some((l) => l.startsWith("scope: https://")) &&
114
+ lines.at(-1) === "stop: not met — open R2 · paperlint lint decides R1",
115
+ shown(report),
116
+ );
117
+ console.log(
118
+ `✓ pc-panel-review [effects]: skill activated; step 0 ran the bundled revision-plan.js from the link.\n CLI: ${cli.note}`,
119
+ );
120
+ } finally {
121
+ r.cleanup();
122
+ }