paperlint 20.0.0 → 20.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 (73) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/dist/cli.d.ts +7 -4
  3. package/dist/cli.d.ts.map +1 -1
  4. package/dist/cli.js +36 -19
  5. package/dist/cli.js.map +1 -1
  6. package/dist/domain/paper-folder.d.ts.map +1 -1
  7. package/dist/domain/paper-folder.js +4 -0
  8. package/dist/domain/paper-folder.js.map +1 -1
  9. package/dist/domain/paper-stage.d.ts +20 -0
  10. package/dist/domain/paper-stage.d.ts.map +1 -0
  11. package/dist/domain/paper-stage.js +9 -0
  12. package/dist/domain/paper-stage.js.map +1 -0
  13. package/dist/eslint-rules/CLAUDE.md.spec.d.ts.map +1 -1
  14. package/dist/eslint-rules/CLAUDE.md.spec.js +1 -0
  15. package/dist/eslint-rules/CLAUDE.md.spec.js.map +1 -1
  16. package/dist/hook-counts.d.ts +30 -0
  17. package/dist/hook-counts.d.ts.map +1 -0
  18. package/dist/hook-counts.js +35 -0
  19. package/dist/hook-counts.js.map +1 -0
  20. package/dist/hooks-settings.d.ts +8 -10
  21. package/dist/hooks-settings.d.ts.map +1 -1
  22. package/dist/hooks-settings.js +31 -35
  23. package/dist/hooks-settings.js.map +1 -1
  24. package/dist/lint-edited-block.d.ts +8 -0
  25. package/dist/lint-edited-block.d.ts.map +1 -0
  26. package/dist/lint-edited-block.js +30 -0
  27. package/dist/lint-edited-block.js.map +1 -0
  28. package/dist/lint-edited-hook.d.ts +5 -6
  29. package/dist/lint-edited-hook.d.ts.map +1 -1
  30. package/dist/lint-edited-hook.js +47 -25
  31. package/dist/lint-edited-hook.js.map +1 -1
  32. package/dist/lint-edited-shell.d.ts +15 -0
  33. package/dist/lint-edited-shell.d.ts.map +1 -0
  34. package/dist/lint-edited-shell.js +49 -0
  35. package/dist/lint-edited-shell.js.map +1 -0
  36. package/dist/paper-files.d.ts +2 -1
  37. package/dist/paper-files.d.ts.map +1 -1
  38. package/dist/paper-files.js +1 -0
  39. package/dist/paper-files.js.map +1 -1
  40. package/dist/rules-config.d.ts +6 -0
  41. package/dist/rules-config.d.ts.map +1 -1
  42. package/dist/rules-config.js.map +1 -1
  43. package/dist/settled-paper.d.ts +6 -0
  44. package/dist/settled-paper.d.ts.map +1 -0
  45. package/dist/settled-paper.js +69 -0
  46. package/dist/settled-paper.js.map +1 -0
  47. package/docs/configuration.md +17 -3
  48. package/docs/e2e.md +1 -1
  49. package/docs/layout.md +19 -4
  50. package/docs/rules/paper/edition-over.md +4 -3
  51. package/eslint-rules/CLAUDE.md +5 -1
  52. package/eslint-rules/CLAUDE.md.spec.ts +3 -0
  53. package/package.json +1 -1
  54. package/plugin/hooks/hooks.json +11 -0
  55. package/src/cli.ts +44 -22
  56. package/src/doctor.test.ts +23 -6
  57. package/src/domain/paper-folder.ts +3 -0
  58. package/src/domain/paper-stage.ts +25 -0
  59. package/src/hook-counts.test.ts +67 -0
  60. package/src/hook-counts.ts +64 -0
  61. package/src/hooks-settings.harness.ts +15 -18
  62. package/src/hooks-settings.ts +43 -49
  63. package/src/init-plugin.test.ts +8 -2
  64. package/src/lint-edited-bash.test.ts +324 -0
  65. package/src/lint-edited-block.ts +44 -0
  66. package/src/lint-edited-hook.test.ts +10 -11
  67. package/src/lint-edited-hook.ts +72 -35
  68. package/src/lint-edited-shell.ts +72 -0
  69. package/src/paper-files.ts +8 -1
  70. package/src/paper-settings-commands.test.ts +13 -16
  71. package/src/rules-config.ts +8 -0
  72. package/src/settled-paper.test.ts +214 -0
  73. package/src/settled-paper.ts +78 -0
@@ -1,4 +1,4 @@
1
- import type { ConfigBlock, RuleBlock, RuleEntry } from "./rules-config.ts";
1
+ import type { ConfigBlock, RuleBlock, RuleEntry, StageLinterOptions } from "./rules-config.ts";
2
2
  /**
3
3
  * Which papers' own files paperlint's blocks claim. `any` is the config's SHAPE, for the rule list and
4
4
  * the docs: a file in any folder. `papers` is what `paperlint lint` runs on: the real papers, as glob
@@ -39,6 +39,7 @@ export interface ScopedBlock {
39
39
  readonly basePath: string;
40
40
  readonly files?: readonly FilesEntry[];
41
41
  readonly ignores?: readonly string[];
42
+ readonly linterOptions?: StageLinterOptions;
42
43
  readonly rules: Readonly<Record<string, RuleEntry>>;
43
44
  }
44
45
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"paper-files.d.ts","sourceRoot":"","sources":["../src/paper-files.ts"],"names":[],"mappings":"AA2CA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAClB;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAA;CAAE,GACxB;IACE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC,CAAC;AAEN,eAAO,MAAM,SAAS,EAAE,UAA4B,CAAC;AAUrD,sFAAsF;AACtF,eAAO,MAAM,WAAW,GACtB,MAAM,SAAS,MAAM,EAAE,EACvB,KAAK,MAAM,KACV,UAID,CAAC;AAEH,iGAAiG;AACjG,eAAO,MAAM,UAAU,GACrB,OAAO,UAAU,EACjB,MAAM,MAAM,KACX,SAAS,MAAM,EAGiD,CAAC;AAEpE;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GACrB,MAAM,MAAM,EACZ,KAAK,MAAM,EACX,MAAM,MAAM,KACX,SAAS,MAAM,EAOjB,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,iEAAiE;AACjE,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS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ED,qEAAqE;AACrE,wBAAgB,aAAa,CAAC,GAAG,EAAE,SAAS,WAAW,EAAE,GAAG,MAAM,EAAE,CAEnE;AAKD,4EAA4E;AAC5E,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG;IACtD,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;CAC5B,CASA;AAQD;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,SAAS,WAAW,EAAE,GAC1B,GAAG,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC,CAYpC;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC,EAClD,MAAM,GAAE,UAAsB,GAC7B,WAAW,EAAE,CAkBf"}
@@ -183,6 +183,7 @@ function within(block, scope, rules) {
183
183
  basePath: block.basePath,
184
184
  files,
185
185
  ...(ignores.length ? { ignores } : {}),
186
+ ...(block.linterOptions ? { linterOptions: block.linterOptions } : {}),
186
187
  rules,
187
188
  },
188
189
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"paper-files.js","sourceRoot":"","sources":["../src/paper-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAiB1C,MAAM,CAAC,MAAM,SAAS,GAAe,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AAErD,mGAAmG;AACnG,MAAM,WAAW,GAAG,CAAC,IAAY,EAAU,EAAE,CAC3C,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;AAE7C,oDAAoD;AACpD,MAAM,aAAa,GAAG,CAAC,IAAY,EAAE,EAAU,EAAU,EAAE,CACzD,QAAQ,CAAC,IAAI,EAAE,EAAE,CA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AC9C,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC5D,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC;IAChB,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;IAC7D,OAAO;QACL;YACE,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,KAAK;YACL,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACtC,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACtE,KAAK;SACN;KACF,CAAC;AACJ,CAAC"}
@@ -1,11 +1,17 @@
1
1
  /** ESLint's severities, in both of its spellings. */
2
2
  export type Severity = "off" | "warn" | "error" | 0 | 1 | 2;
3
3
  export type RuleEntry = Severity | readonly [Severity, ...unknown[]];
4
+ /** The one linter option paperlint's own blocks set: a final paper's disable comments are not "unused". */
5
+ export type StageLinterOptions = Readonly<{
6
+ reportUnusedDisableDirectives: "off";
7
+ }>;
4
8
  /** One block of the `rules` key, parsed. `basePath` is the settings file's directory. */
5
9
  export interface RuleBlock {
6
10
  readonly basePath: string;
7
11
  readonly files?: readonly string[];
8
12
  readonly ignores?: readonly string[];
13
+ /** Set only by paperlint's own blocks (a paper's stage); `paperlint.json` cannot write it. */
14
+ readonly linterOptions?: StageLinterOptions;
9
15
  readonly rules: Readonly<Record<string, RuleEntry>>;
10
16
  }
11
17
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"r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AC,CAAC,EAAE,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC;QACnC,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,EAAE,GAAG,KAAK,YAAY,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE;YACxD,OAAO;YACP,OAAO;SACR,CAAC,CAAC;QACH,IAAI,CAAC,CAAC,CAAC,EAAE;YAAE,OAAO,CAAC,CAAC;QACpB,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;AAClC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC5B,MAA8B,EAC9B,OAA2B;IAE3B,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAC9B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,CAAC;YACjE,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;gBAAE,SAAS;YACvC,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;gBAChD,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { Cycles } from "./domain/cycle.ts";
2
+ import type { Files } from "./ports/files.ts";
3
+ import type { RuleBlock } from "./rules-config.ts";
4
+ /** The blocks for the paper in `dir`, or none while it is being written. Reads the lock through `files`. */
5
+ export declare function stageBlocks(dir: string, cycles: Cycles | null, files: Files, shipped: ReadonlySet<string>): readonly RuleBlock[];
6
+ //# sourceMappingURL=settled-paper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settled-paper.d.ts","sourceRoot":"","sources":["../src/settled-paper.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAuBnD,4GAA4G;AAC5G,wBAAgB,WAAW,CACzB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,GAC3B,SAAS,SAAS,EAAE,CA2BtB"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * The rule blocks a paper's stage adds (#583, #553).
3
+ *
4
+ * A rule judges its own subject and knows nothing about where a paper is in its life. Whether it
5
+ * should run on a paper that is done is a question about WHICH FILES a rule runs on, and in ESLint
6
+ * that is the config's question. So the stage (`src/domain/paper-stage.ts`) becomes blocks here, in
7
+ * the one place that already reads every paper's `paperlint.json` to build its blocks:
8
+ *
9
+ * accepted `paper/edition-over` off: the edition being over is where an accepted paper ends up
10
+ * final also every rule about the text and the build off on the paper's `.tex`: the published
11
+ * text and PDF are frozen in `versions/`, so "rebuild", "too long" or "not built yet" has
12
+ * nothing left to fix. The talk, the artifact and the records keep their rules
13
+ *
14
+ * The blocks go LAST, after the root `paperlint.json` and after the paper's own `rules`: a writing
15
+ * rule turned on while the paper was written, at either level, says nothing on its published text.
16
+ * Nothing turns a text rule back on for a final paper; the paper is worked on again in a new cycle,
17
+ * and an open cycle makes it `working`.
18
+ */
19
+ import { paperStage } from "./domain/paper-stage.js";
20
+ import { readLock } from "./versions.js";
21
+ /** The paper's own `.tex` files: `paper.tex` and the files it includes. Relative to the paper. */
22
+ const PAPER_TEX = "**/*.tex";
23
+ /**
24
+ * The plugins whose rules judge the paper's TEXT and its BUILD: what the frozen camera-ready already
25
+ * fixed. Only these go off on a final paper. The rest stay on, because freezing the PDF says nothing
26
+ * about them: the talk and the public artifact are still being delivered (`talk/*`, `artifact/*`),
27
+ * and the records are what a final paper is judged on (`cycle/*`, `versions/*`, `repro/*`,
28
+ * `study/*`). A list of what goes off, not of what stays, so a new plugin stays on until someone
29
+ * decides it judges the frozen text.
30
+ */
31
+ const FROZEN_TEXT_PLUGINS = [
32
+ "tex",
33
+ "bib",
34
+ "pdf",
35
+ "format",
36
+ "anonymity",
37
+ "paper",
38
+ ];
39
+ /** The blocks for the paper in `dir`, or none while it is being written. Reads the lock through `files`. */
40
+ export function stageBlocks(dir, cycles, files, shipped) {
41
+ if (cycles === null)
42
+ return [];
43
+ const lock = readLock(dir, files);
44
+ const stage = paperStage(cycles.current, lock?.ok ? lock.value : {});
45
+ if (stage === "working")
46
+ return [];
47
+ const accepted = {
48
+ basePath: dir,
49
+ rules: { "paper/edition-over": "off" },
50
+ };
51
+ if (stage === "accepted")
52
+ return [accepted];
53
+ const textOff = Object.fromEntries([...shipped]
54
+ .filter((id) => FROZEN_TEXT_PLUGINS.some((p) => id.startsWith(`${p}/`)))
55
+ .map((id) => [id, "off"]));
56
+ // A disable comment for a rule this block turns off suppresses nothing, and ESLint would report it
57
+ // as unused, and `--fix` would delete it from the published text: the trap `rulesOff` in cli.ts
58
+ // closes the same way.
59
+ return [
60
+ accepted,
61
+ {
62
+ basePath: dir,
63
+ files: [PAPER_TEX],
64
+ linterOptions: { reportUnusedDisableDirectives: "off" },
65
+ rules: textOff,
66
+ },
67
+ ];
68
+ }
69
+ //# sourceMappingURL=settled-paper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settled-paper.js","sourceRoot":"","sources":["../src/settled-paper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAIrD,OAA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AAE,GAAG;YACb,KAAK,EAAE,CAAC,SAAS,CAAC;YAClB,aAAa,EAAE,EAAE,6BAA6B,EAAE,KAAK,EAAE;YACvD,KAAK,EAAE,OAAO;SACf;KACF,CAAC;AACJ,CAAC"}
@@ -154,9 +154,23 @@ silently do nothing. The key list is `SETTINGS_KEYS` in `lib/paper-config.mjs`.
154
154
 
155
155
  **Where a paper's rules come from, in order — a later one wins, rule by rule:** paperlint's own
156
156
  configuration → the preset chain's `rules`, from the root preset to the one the paper extends →
157
- the root `paperlint.json`'s `rules` → the paper's own `rules`. So a venue can turn a rule on, the
158
- project can change that for every paper, and one paper can still change it for itself. Only rules
159
- paperlint ships may be named, at every level.
157
+ the root `paperlint.json`'s `rules` → the paper's own `rules` → the paper's stage. So a venue can
158
+ turn a rule on, the project can change that for every paper, one paper can still change it for
159
+ itself, and none of them reaches a published paper's text. Only rules paperlint ships may be named,
160
+ at every level.
161
+
162
+ **The paper's stage** is read from its `cycles` and `versions/lock.json`; nothing new is written
163
+ for it. An **accepted** paper turns `paper/edition-over` off: the edition being over is where an
164
+ accepted paper ends up. A **final** paper, accepted with its `<cycle>/camera-ready.pdf` frozen
165
+ (`paperlint versions lock`), also turns the rules about its text and build (`tex/*`, `bib/*`,
166
+ `pdf/*`, `format/*`, `anonymity/*`, `paper/*`) off on its `.tex`: the published text and PDF no
167
+ longer change, so "not built yet", "rebuild" or "too long" has nothing left to fix. Every other rule
168
+ stays on: the talk and the public artifact are still being delivered (`talk/*`, `artifact/*`), and
169
+ whether the frozen camera-ready came from what was accepted is a question only a final paper has
170
+ (`cycle/*`). A `% eslint-disable` comment in a final paper's text is not reported as unused, and
171
+ `--fix` leaves the published text as it is. A paper that is open, rejected or withdrawn is still
172
+ being written, and every rule applies. To work on a final paper's text again, open a new cycle: an
173
+ open cycle makes the paper a working one.
160
174
 
161
175
  ## The paper's cycles
162
176
 
package/docs/e2e.md CHANGED
@@ -55,7 +55,7 @@ depend on each other — and drives the installed binary:
55
55
  - `paperlint init` takes the default papers directory and writes no `paperlint.json` for it
56
56
  - `paperlint init` finishes with zero — its doctor found no discrepancy
57
57
  - `paperlint init` wires the hooks into `.claude/settings.json` — the same commands `hooks.json`
58
- publishes, once each — and says they need `npm install` in a fresh clone; a second `init`
58
+ publishes, each as often as it publishes it — and says they need `npm install` in a fresh clone; a second `init`
59
59
  leaves that file byte-identical
60
60
  - `paperlint lint` passes the staged corpus
61
61
  - `paperlint new demo` scaffolds a paper from the templates that shipped in the tarball (and the
package/docs/layout.md CHANGED
@@ -145,7 +145,7 @@ A check runs at one of five moments:
145
145
  | what | kind | when it runs | what it stops |
146
146
  | ------------------------------------------------------------------------------------------- | ------- | ----------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
147
147
  | `paper-folder-layout` | hook | before an agent creates a file (Edit, Write) | a new entry the layout does not allow, at a paper's root or the top of its `repro/`; never an existing file |
148
- | `lint-edited` | hook | after an agent edits a file of a paper (Edit, Write) | nothing is undone: an error the edit introduced is put next to the edit's result, so the agent fixes it in the same turn |
148
+ | `lint-edited` | hook | after an Edit or Write in a paper, or Bash on a `.tex` | nothing is undone: an error the edit introduced is put next to the edit's result, so the agent fixes it in the same turn |
149
149
  | `submission-confirm` | hook | before an agent's shell command | a submission send (`--save`, `--submit`), or a command naming a portal's host, that the person has not said yes to in a question naming its PDF's sha256 (or the host and the command) |
150
150
  | [`paper/allowed-files-only`](rules/paper/allowed-files-only.md) | rule | every `paperlint lint`, and CI | a stray file or folder at a paper's root (error) |
151
151
  | [`repro/allowed-files-only`](rules/repro/allowed-files-only.md) | rule | every `paperlint lint`, and CI | a loose entry at the top of `repro/`, a folder that is not a study's, a study folder without `README.md` (error) |
@@ -175,6 +175,14 @@ so a file the lint skips (`research/notes.txt`) gets nothing. An edit of any oth
175
175
  before the CLI loads: 36–39 ms per edit against 28 ms for `node -e 0` (medians of 15, measured
176
176
  2026-11-09), where it was 662 ms while the CLI loaded on every edit.
177
177
 
178
+ **After a shell command, too.** The same hook hangs off Bash with `"if": "Bash(*.tex*)"` in its
179
+ wiring, so Claude Code does not even start it for a command that names no `.tex` (measured on Claude
180
+ Code 2.1.330: `ls` and `cat Makefile` started nothing; `sed -i … paper.tex`, `/usr/bin/sed -i …` and
181
+ `python3 -c "…paper.tex…"` started it). Started, it reads the command with vigiles' shell parser and
182
+ lints every `.tex` the command names that is a file in a paper, as a word or as the target of a
183
+ redirection that writes, resolved against the session's working directory; papers are linted one by
184
+ one, each against its own snapshot.
185
+
178
186
  **What it lints.** The edited file and the paper's `paper.tex`, with the same ESLint, config and
179
187
  rules as `paperlint lint` on that paper: one setup serves both. Inside a paper it takes about as long
180
188
  as `paperlint lint` on that paper: 701 ms for an edit of a one-page paper, against 781 ms for
@@ -199,12 +207,19 @@ Each error is keyed by its file, rule, message and the trimmed text of the line
199
207
  the line number, so a line inserted above an old error does not make it new. The next edit reports
200
208
  an error only when its key occurs more often than in the snapshot. A file the snapshot has not seen
201
209
  yet (the first edit in a paper) has no "before": only the errors on the lines that edit wrote are
202
- reported — an Edit's new text, each MultiEdit's, every line of a Write. Delete the file to start over.
210
+ reported — an Edit's new text, each MultiEdit's, every line of a Write. A shell command has no such
211
+ lines, so in a file the snapshot has not seen it reports nothing and only records the snapshot; the
212
+ next change is judged against it. Delete the file to start over.
203
213
 
204
214
  **What it cannot see.**
205
215
 
206
- - A file written by a shell command (`sed -i`, a script, `mv`, `cp`): no Edit, no Write, no hook.
207
- `paperlint lint` and CI still see it.
216
+ - A shell command whose `.tex` is not one of its words: a path inside an interpreter's code
217
+ (`python3 -c "open('paper.tex')…"` starts the hook but names no `.tex` word), a relative path after
218
+ a `cd` in the same command, a name built at run time, a `mv` or `cp` of a file. And a write by
219
+ redirection alone (`cat > paper.tex <<EOF`): Claude Code leaves a redirection's target out of the
220
+ text the `if` matches, so the hook never starts (measured on 2.1.330,
221
+ [zernie/vigiles#214](https://github.com/zernie/vigiles/issues/214)). `paperlint lint` and CI still
222
+ see all of these.
208
223
  - The body files of a paper whose build record is stale. `_build/sources.json` hashes every file TeX
209
224
  read, so the first edit to any of them makes the record stale, and until the next
210
225
  `paperlint build` the paper is `paper.tex` alone — to this hook exactly as to `paperlint lint`
@@ -53,9 +53,10 @@ of each shipped preset's id. The clock is read once per lint by `paperlint lint`
53
53
 
54
54
  ## How to fix
55
55
 
56
- Point `extends` at the edition the paper goes to next, or at another venue. A paper that stays with
57
- the finished edition on purpose — it was accepted there, and the repository is its record — turns
58
- the rule off in its `paperlint.json`:
56
+ Point `extends` at the edition the paper goes to next, or at another venue. A paper accepted at the
57
+ edition needs nothing: when its last cycle is `accepted`, paperlint turns this rule off for it
58
+ ([the paper's stage](../../configuration.md)). Any other paper that stays with the finished edition
59
+ on purpose — the repository is its record — turns the rule off in its `paperlint.json`:
59
60
 
60
61
  ```json
61
62
  {
@@ -1,4 +1,4 @@
1
- <!-- vigiles:sha256:a24e4a23a4caaf86 compiled from eslint-rules/CLAUDE.md.spec.ts -->
1
+ <!-- vigiles:sha256:f83563bacd9214c9 compiled from eslint-rules/CLAUDE.md.spec.ts -->
2
2
 
3
3
  # CLAUDE.md
4
4
 
@@ -44,6 +44,10 @@ the checks push every paper toward a blog post.
44
44
 
45
45
  **Guidance only** — A check over a syntax tree is a lint rule, not a script. It fires in the editor on save, gets the AST for free, and has a suppression syntax people already know. A script is for corpus-wide questions — index connectivity, ratios across many files. When the work has to run a program, a script may do the work and write facts to a JSON file, and a rule judges that file: the verdict still lands in the engine.
46
46
 
47
+ ### The Config Decides Where A Rule Runs
48
+
49
+ **Guidance only** — A NEW decision about which files a rule runs on goes into the config, not into the rule. A rule judges its own subject wherever it is turned on; whether it applies to a paper at a given stage is a rule block the lint config builds (`paperRuleBlocks` in `src/cli.ts`): `files`, `ignores`, or a rule set to `off`, where a later block wins, as in ESLint. Example: a finished paper (accepted, camera-ready frozen) has its text and build rules turned off by `src/settled-paper.ts`, and no rule reads its cycles for that (#583, #553). Two older decisions still live inside rules and are not a precedent: `phase` set to `porting` silences the venue rules from inside them (`src/venue-rules.ts`), and the anonymity rules go quiet on an accepted cycle (`effectiveBlind`, `src/domain/cycle.ts`); #599 decides whether they move. The author decided this on 2026-11-23.
50
+
47
51
  ### A Rule Is Configured The Eslint Way
48
52
 
49
53
  **Guidance only** — Provisional, pending #599 (the author is not sure it is right). A rule's own switches (what to require, a threshold, a file to compare) come from its options where it is turned on: `["warn", { … }]`. A new rule is not on by default and silent until some key of `paperlint.json` is declared: that hides a check behind a setting nobody sees in the rule list. A fact several rules share about a paper (its venue, cycles, artifact, talk) reaches them through ESLint's `settings`, filled once by `buildConfig` from `paperlint.json`; a rule does not open `paperlint.json` itself. A rule whose subject IS `paperlint.json` (it validates the config) is exempt. Where an outside service varies (an artifact host, a portal), the rule reads a file of facts a command wrote and never the service; the services are adapters behind a port, as `src/ports/submission-portal.ts` and `src/adapters/hotcrp/` are, and eslint-plugin-import's `settings["import/resolver"]` is the ESLint precedent. About 25 existing rules predate this; #599 decides whether to move them, narrow this rule, or drop it and allow a rule to read `paperlint.json`. The author proposed this on 2026-11-21.
@@ -40,6 +40,9 @@ the checks push every paper toward a blog post.
40
40
  "lint-rule-over-script": guidance(
41
41
  "A check over a syntax tree is a lint rule, not a script. It fires in the editor on save, gets the AST for free, and has a suppression syntax people already know. A script is for corpus-wide questions — index connectivity, ratios across many files. When the work has to run a program, a script may do the work and write facts to a JSON file, and a rule judges that file: the verdict still lands in the engine.",
42
42
  ),
43
+ "the-config-decides-where-a-rule-runs": guidance(
44
+ "A NEW decision about which files a rule runs on goes into the config, not into the rule. A rule judges its own subject wherever it is turned on; whether it applies to a paper at a given stage is a rule block the lint config builds (`paperRuleBlocks` in `src/cli.ts`): `files`, `ignores`, or a rule set to `off`, where a later block wins, as in ESLint. Example: a finished paper (accepted, camera-ready frozen) has its text and build rules turned off by `src/settled-paper.ts`, and no rule reads its cycles for that (#583, #553). Two older decisions still live inside rules and are not a precedent: `phase` set to `porting` silences the venue rules from inside them (`src/venue-rules.ts`), and the anonymity rules go quiet on an accepted cycle (`effectiveBlind`, `src/domain/cycle.ts`); #599 decides whether they move. The author decided this on 2026-11-23.",
45
+ ),
43
46
  "a-rule-is-configured-the-eslint-way": guidance(
44
47
  'Provisional, pending #599 (the author is not sure it is right). A rule\'s own switches (what to require, a threshold, a file to compare) come from its options where it is turned on: `["warn", { … }]`. A new rule is not on by default and silent until some key of `paperlint.json` is declared: that hides a check behind a setting nobody sees in the rule list. A fact several rules share about a paper (its venue, cycles, artifact, talk) reaches them through ESLint\'s `settings`, filled once by `buildConfig` from `paperlint.json`; a rule does not open `paperlint.json` itself. A rule whose subject IS `paperlint.json` (it validates the config) is exempt. Where an outside service varies (an artifact host, a portal), the rule reads a file of facts a command wrote and never the service; the services are adapters behind a port, as `src/ports/submission-portal.ts` and `src/adapters/hotcrp/` are, and eslint-plugin-import\'s `settings["import/resolver"]` is the ESLint precedent. About 25 existing rules predate this; #599 decides whether to move them, narrow this rule, or drop it and allow a rule to read `paperlint.json`. The author proposed this on 2026-11-21.',
45
48
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paperlint",
3
- "version": "20.0.0",
3
+ "version": "20.1.0",
4
4
  "description": "A linter for scientific papers written in LaTeX: catches mistakes before you submit to a conference or journal.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -30,6 +30,17 @@
30
30
  "timeout": 20
31
31
  }
32
32
  ]
33
+ },
34
+ {
35
+ "matcher": "Bash",
36
+ "hooks": [
37
+ {
38
+ "type": "command",
39
+ "if": "Bash(*.tex*)",
40
+ "command": "node \"${CLAUDE_PROJECT_DIR}/node_modules/paperlint/bin/paperlint.mjs\" hook lint-edited",
41
+ "timeout": 20
42
+ }
43
+ ]
33
44
  }
34
45
  ]
35
46
  }
package/src/cli.ts CHANGED
@@ -32,6 +32,7 @@ import {
32
32
  statSync,
33
33
  } from "node:fs";
34
34
  import { absolutePath } from "./domain/paths.ts";
35
+ import { isOk } from "./domain/result.ts";
35
36
  import { stripVTControlCharacters } from "node:util";
36
37
  import { fileURLToPath } from "node:url";
37
38
  import { join, dirname, resolve, relative, basename, sep } from "node:path";
@@ -142,6 +143,7 @@ import {
142
143
  scopeToOwned,
143
144
  } from "./paper-files.ts";
144
145
  import type { PaperScope } from "./paper-files.ts";
146
+ import { stageBlocks } from "./settled-paper.ts";
145
147
  import {
146
148
  paperPreset,
147
149
  settingsProblemLine,
@@ -1043,35 +1045,42 @@ const paperDirs = (paths: readonly string[]): readonly string[] =>
1043
1045
  * them. A file that does not parse, or names a rule paperlint does not ship, stops the run with one
1044
1046
  * line naming the file — the same strictness as the root's own `rules`.
1045
1047
  */
1046
- export function paperRuleBlocks(
1047
- paths: readonly string[],
1048
- ): Parsed<{ preset: RuleBlock[]; own: RuleBlock[] }> {
1049
- const papers = paperDirs(paths);
1050
- const out: { preset: RuleBlock[]; own: RuleBlock[] } = {
1051
- preset: [],
1052
- own: [],
1053
- };
1054
- for (const dir of papers) {
1048
+ export function paperRuleBlocks(paths: readonly string[]): Parsed<PaperBlocks> {
1049
+ const each = paperDirs(paths).map((dir): Parsed<PaperBlocks> => {
1055
1050
  const p = paperPreset(dir, PRESET_DEPS);
1056
- if (p.kind === "settings-problem")
1057
- return { ok: false, error: settingsProblemLine(dir, p.problem) };
1058
- const blocks = rulesOfPaper(dir, p);
1059
- if (!blocks.ok) return blocks;
1060
- out.preset.push(...blocks.value.preset);
1061
- out.own.push(...blocks.value.own);
1062
- }
1063
- return { ok: true, value: out };
1051
+ return p.kind === "settings-problem"
1052
+ ? { ok: false, error: settingsProblemLine(dir, p.problem) }
1053
+ : rulesOfPaper(dir, p);
1054
+ });
1055
+ const failed = each.find((r) => !r.ok);
1056
+ if (failed !== undefined) return failed;
1057
+ const all = each.filter(isOk).map((r) => r.value);
1058
+ return {
1059
+ ok: true,
1060
+ value: {
1061
+ preset: all.flatMap((b) => b.preset),
1062
+ stage: all.flatMap((b) => b.stage),
1063
+ own: all.flatMap((b) => b.own),
1064
+ },
1065
+ };
1066
+ }
1067
+
1068
+ /** One paper's blocks, in the order `lint` applies them around the root's (most general first). */
1069
+ interface PaperBlocks {
1070
+ readonly preset: readonly RuleBlock[];
1071
+ readonly stage: readonly RuleBlock[];
1072
+ readonly own: readonly RuleBlock[];
1064
1073
  }
1065
1074
 
1066
1075
  /**
1067
- * One paper's blocks: its preset chain's `rules`, and its own — either `{ id: severity }` over the
1076
+ * One paper's blocks: its preset chain's `rules`, the blocks its stage adds, and its own — either `{ id: severity }` over the
1068
1077
  * paper's files, or ESLint blocks with globs relative to the paper. A preset that does not resolve
1069
1078
  * contributes nothing here; `pdf/profile` reports it on the paper.
1070
1079
  */
1071
1080
  function rulesOfPaper(
1072
1081
  dir: string,
1073
1082
  p: Exclude<PaperPreset, { kind: "settings-problem" }>,
1074
- ): Parsed<{ preset: RuleBlock[]; own: RuleBlock[] }> {
1083
+ ): Parsed<PaperBlocks> {
1075
1084
  const { settings } = p;
1076
1085
  const fromPreset =
1077
1086
  p.kind === "resolved"
@@ -1100,7 +1109,13 @@ function rulesOfPaper(
1100
1109
  Object.keys(rules).length ? [{ basePath: dir, rules }] : [];
1101
1110
  return {
1102
1111
  ok: true,
1103
- value: { preset: scoped(fromPreset.value), own: [...own.value] },
1112
+ value: {
1113
+ preset: scoped(fromPreset.value),
1114
+ stage: [
1115
+ ...stageBlocks(dir, settings?.cycles ?? null, nodeFiles, SHIPPED_RULES),
1116
+ ],
1117
+ own: [...own.value],
1118
+ },
1104
1119
  };
1105
1120
  }
1106
1121
 
@@ -1458,7 +1473,11 @@ const IN_PROCESS_HOOKS: Readonly<
1458
1473
  "lint-edited": ({ err, stdin, out }) =>
1459
1474
  lintEditedHook(
1460
1475
  stdin,
1461
- { files: nodeFiles, linter: editLinter(loadLatexLanguage) },
1476
+ {
1477
+ files: nodeFiles,
1478
+ linter: editLinter(loadLatexLanguage),
1479
+ shellLeaves: leafCommandsNormalized,
1480
+ },
1462
1481
  { out, err },
1463
1482
  ),
1464
1483
  "paper-folder-layout": ({ err, stdin, out }) => {
@@ -2715,7 +2734,9 @@ async function paperEslint(
2715
2734
  }>
2716
2735
  > {
2717
2736
  // The order, most general first so the most specific wins (ESLint: a later block wins): each
2718
- // paper's venue preset → the root paperlint.json → the paper's own paperlint.json.
2737
+ // paper's venue preset → the root paperlint.json → the paper's own paperlint.json → the paper's
2738
+ // stage (src/settled-paper.ts), last because a published text has nothing left to fix whoever
2739
+ // turned a writing rule on.
2719
2740
  const papers = paperRuleBlocks(paths);
2720
2741
  if (!papers.ok) return papers;
2721
2742
  const opts = {
@@ -2724,6 +2745,7 @@ async function paperEslint(
2724
2745
  ...papers.value.preset,
2725
2746
  ...(cfg.opts.rules ?? []),
2726
2747
  ...papers.value.own,
2748
+ ...papers.value.stage,
2727
2749
  ],
2728
2750
  };
2729
2751
 
@@ -64,13 +64,20 @@ test("doctor: a settings file silent on papersDir, an occupied entry, an unreada
64
64
  assert.equal(typeof code, "number");
65
65
  });
66
66
 
67
- /** Doctor's exit code for a project whose `.claude/settings.json` carries the given commands. */
68
- const exitWithHooks = (commands: readonly string[]): number => {
67
+ /**
68
+ * Doctor's exit code for a project whose `.claude/settings.json` carries the given commands, each
69
+ * under the matcher `matcherOf` gives it (by default a matcher of its own).
70
+ */
71
+ const exitWithHooks = (
72
+ commands: readonly string[],
73
+ matcherOf: (command: string, i: number) => string = (_, i) =>
74
+ `Tool${String(i)}`,
75
+ ): number => {
69
76
  const root = project();
70
77
  writeFileSync(join(root, "paperlint.json"), "{}\n");
71
78
  mkdirSync(join(root, ".claude"), { recursive: true });
72
- const entries = commands.map((command) => ({
73
- matcher: "Bash",
79
+ const entries = commands.map((command, i) => ({
80
+ matcher: matcherOf(command, i),
74
81
  hooks: [{ type: "command", command }],
75
82
  }));
76
83
  writeFileSync(
@@ -92,9 +99,13 @@ const exitWithHooks = (commands: readonly string[]): number => {
92
99
  };
93
100
 
94
101
  const hookCommand = (name: string): string => `npx paperlint hook ${name}`;
95
- const allHooks = shippedWiring().names;
102
+ const shipped = shippedWiring();
103
+ /** Each shipped hook as many times as the wiring runs it: `lint-edited` after an Edit and a Bash. */
104
+ const allHooks = shipped.names.flatMap((n) =>
105
+ Array.from({ length: shipped.times[n] ?? 1 }, () => n),
106
+ );
96
107
 
97
- test("doctor exits 0 when every hook is wired once, or none is (--no-hooks is a choice)", () => {
108
+ test("doctor exits 0 when every hook is wired as shipped, or none is (--no-hooks is a choice)", () => {
98
109
  assert.equal(exitWithHooks(allHooks.map(hookCommand)), 0);
99
110
  assert.equal(exitWithHooks([]), 0);
100
111
  });
@@ -102,6 +113,12 @@ test("doctor exits 0 when every hook is wired once, or none is (--no-hooks is a
102
113
  test("doctor exits non-zero when the hooks are only partly wired", () => {
103
114
  assert.equal(exitWithHooks(allHooks.slice(1).map(hookCommand)), 2);
104
115
  assert.equal(exitWithHooks([hookCommand("submission-confirm")]), 2);
116
+ // Wired by an older init: every hook once, so lint-edited has one of its two commands.
117
+ assert.equal(exitWithHooks(shipped.names.map(hookCommand)), 2);
118
+ // lint-edited twice after an Edit and never after a Bash: two commands in one place are not two places.
119
+ const editOnly = (c: string, i: number) =>
120
+ c.endsWith("lint-edited") ? "Edit" : `Tool${String(i)}`;
121
+ assert.equal(exitWithHooks(allHooks.map(hookCommand), editOnly), 2);
105
122
  });
106
123
 
107
124
  /** Doctor's output for a project with one of init's hook commands and one present skill link. */
@@ -105,6 +105,9 @@ const concernsAPaper = (stdin: () => string, files: IsFile): boolean => {
105
105
  try {
106
106
  const payload = parsed(stdin());
107
107
  if (payload === undefined) return true;
108
+ // A Bash payload names no file the gate could look up without a shell parser; the wiring's
109
+ // `"if": "Bash(*.tex*)"` already kept every command that names no `.tex` from starting the hook.
110
+ if (fieldOf(payload, "tool_name") === "Bash") return true;
108
111
  const file = writtenPath(payload);
109
112
  return file !== null && paperFolderOf(file, files) !== null;
110
113
  } catch {
@@ -0,0 +1,25 @@
1
+ /**
2
+ * How far a paper is, read from what paperlint already records: its `cycles` and the files its
3
+ * `versions/lock.json` holds frozen. Nothing new is written down to say a paper is done.
4
+ *
5
+ * working no cycle is accepted: the paper is being written, submitted or moved (open, rejected,
6
+ * withdrawn, none) — every rule applies
7
+ * accepted the last cycle is accepted and its camera-ready is still to come: the build is still
8
+ * changing, but the edition being over is the expected end, not a problem (#553)
9
+ * final accepted, and `<cycle>/camera-ready.pdf` is frozen: the published text and PDF no
10
+ * longer change, so nothing on the paper's `.tex` has anything left to fix (#583)
11
+ *
12
+ * The rules do not read this. The config does (`src/settled-paper.ts`): a stage decides which rules
13
+ * run on which files, the ESLint way, and each rule stays about its own subject.
14
+ */
15
+ import type { Current } from "./cycle.ts";
16
+ import { frozenKey, type Lock } from "./versions.ts";
17
+
18
+ export type PaperStage = "working" | "accepted" | "final";
19
+
20
+ /** The paper's stage from its current attempt and its lock. Pure. */
21
+ export function paperStage(current: Current, lock: Lock): PaperStage {
22
+ if (current.kind !== "accepted") return "working";
23
+ const key = frozenKey(current.cycle.id, "camera-ready", "pdf");
24
+ return lock[key]?.kind === "file" ? "final" : "accepted";
25
+ }