paperlint 7.2.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +1 -6
- package/dist/build.js.map +1 -1
- package/dist/cli.d.ts +3 -4
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +13 -42
- package/dist/cli.js.map +1 -1
- package/dist/eslint-rules/latex-language.d.ts.map +1 -1
- package/dist/eslint-rules/latex-language.js +10 -13
- package/dist/eslint-rules/latex-language.js.map +1 -1
- package/dist/eslint-rules/paper-context.js +2 -2
- package/dist/eslint-rules/paper-typography.d.ts.map +1 -1
- package/dist/eslint-rules/paper-typography.js +22 -91
- package/dist/eslint-rules/paper-typography.js.map +1 -1
- package/dist/eslint-rules/papers.d.ts +1 -3
- package/dist/eslint-rules/papers.d.ts.map +1 -1
- package/dist/eslint-rules/papers.js +2 -4
- package/dist/eslint-rules/papers.js.map +1 -1
- package/dist/eslint-rules/tex-build.d.ts.map +1 -1
- package/dist/eslint-rules/tex-build.js +8 -25
- package/dist/eslint-rules/tex-build.js.map +1 -1
- package/dist/init.d.ts +1 -4
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +3 -9
- package/dist/init.js.map +1 -1
- package/dist/lib/markdown.d.ts +5 -81
- package/dist/lib/markdown.d.ts.map +1 -1
- package/dist/lib/markdown.js +5 -116
- package/dist/lib/markdown.js.map +1 -1
- package/dist/lib/paper-config.d.ts.map +1 -1
- package/dist/lib/paper-config.js +0 -2
- package/dist/lib/paper-config.js.map +1 -1
- package/dist/lib/skill-eval-fixture.d.ts +6 -4
- package/dist/lib/skill-eval-fixture.d.ts.map +1 -1
- package/dist/lib/skill-eval-fixture.js +25 -18
- package/dist/lib/skill-eval-fixture.js.map +1 -1
- package/dist/new-paper.d.ts +5 -11
- package/dist/new-paper.d.ts.map +1 -1
- package/dist/new-paper.js +12 -23
- package/dist/new-paper.js.map +1 -1
- package/dist/paper-files.d.ts +4 -4
- package/dist/paper-prose.d.ts +17 -0
- package/dist/paper-prose.d.ts.map +1 -0
- package/dist/paper-prose.js +46 -0
- package/dist/paper-prose.js.map +1 -0
- package/dist/structure.d.ts.map +1 -1
- package/dist/structure.js +4 -3
- package/dist/structure.js.map +1 -1
- package/dist/types.d.ts +0 -2
- package/dist/types.d.ts.map +1 -1
- package/docs/configuration.md +7 -9
- package/docs/e2e.md +4 -6
- package/docs/prior-art/paper-folder-scaffolding.md +24 -29
- package/docs/rules/tex/claim-provenance.md +0 -1
- package/docs/rules.md +2 -6
- package/eslint-rules/latex-language.harness.mjs +3 -3
- package/eslint-rules/latex-language.ts +10 -13
- package/eslint-rules/paper-context.ts +2 -2
- package/eslint-rules/paper-typography.test.mjs +17 -85
- package/eslint-rules/paper-typography.ts +22 -98
- package/eslint-rules/papers.harness.mjs +1 -1
- package/eslint-rules/papers.ts +2 -4
- package/eslint-rules/tex-build.harness.mjs +2 -2
- package/eslint-rules/tex-build.ts +8 -25
- package/eslint.config.mjs +0 -1
- package/hooks/hooks.harness.ts +15 -15
- package/hooks/paper-edit-guard.hook.mjs +5 -8
- package/hooks/paper-edit-guard.test.ts +12 -3
- package/hooks/paper-skills-nudge.hook.mjs +2 -3
- package/hooks/paper-skills-nudge.test.ts +13 -3
- package/hooks/paper-status-gates.hook.mjs +2 -2
- package/hooks/paper-status-gates.test.ts +14 -2
- package/lib/markdown.test.mjs +5 -60
- package/lib/markdown.ts +9 -136
- package/lib/paper-config.ts +0 -2
- package/lib/skill-checks.test.mjs +4 -1
- package/lib/skill-eval-fixture.ts +25 -18
- package/package.json +1 -3
- package/presets/realm.jsonc +1 -1
- package/scripts/harness-api.frozen.json +0 -5
- package/skills/cold-read-diff/SKILL.md +3 -3
- package/skills/cold-read-diff/SKILL.md.spec.ts +2 -2
- package/skills/grade-paper-writing/SKILL.md +14 -22
- package/skills/grade-paper-writing/SKILL.md.spec.ts +13 -21
- package/skills/grade-paper-writing/__snapshots__/prose-lint.test.ts.snap +40 -26
- package/skills/grade-paper-writing/prose-lint.mjs +108 -278
- package/skills/grade-paper-writing/prose-lint.test.ts +184 -81
- package/skills/paper-adversarial-review/SKILL.md +2 -2
- package/skills/paper-adversarial-review/SKILL.md.spec.ts +1 -1
- package/skills/paper-pipeline/SKILL.md +9 -12
- package/skills/paper-pipeline/SKILL.md.spec.ts +8 -11
- package/skills/paper-pipeline/description-language.eval.mjs +25 -15
- package/skills/paper-pipeline/framing-vs-vocabulary.eval.mjs +25 -15
- package/skills/paper-pipeline/grade-paper-writing-ablation.eval.mjs +25 -15
- package/skills/paper-pipeline/pipeline-firing.eval.mjs +27 -16
- package/skills/paper-pipeline/pipeline-language.eval.mjs +25 -15
- package/skills/paper-pipeline/references/acceptance-gate.md +16 -20
- package/skills/paper-pipeline/references/artifact-checklist.md +4 -5
- package/skills/paper-pipeline/references/pipeline-status-template.md +1 -1
- package/skills/paper-pipeline/scripts/README.md +0 -4
- package/skills/paper-pipeline/scripts/extract-ref-facts.harness.mjs +8 -72
- package/skills/paper-pipeline/scripts/extract-ref-facts.mjs +48 -156
- package/skills/paper-pipeline/scripts/extract-ref-facts.test.mjs +81 -75
- package/skills/paper-pipeline/scripts/generated-code.harness.mjs +3 -3
- package/skills/paper-status/SKILL.md +2 -2
- package/skills/paper-status/SKILL.md.spec.ts +1 -1
- package/skills/render-paper/SKILL.md +2 -2
- package/skills/render-paper/SKILL.md.spec.ts +1 -1
- package/skills/render-paper/extract-pdf-facts.mjs +2 -2
- package/skills/tighten-paper/SKILL.md +29 -42
- package/skills/tighten-paper/SKILL.md.spec.ts +28 -41
- package/skills/verify-citations/scripts/bib-authors.check.test.mjs +0 -13
- package/skills/verify-citations/scripts/bib-authors.cli.test.ts +23 -11
- package/skills/verify-citations/scripts/bib-authors.mjs +8 -93
- package/skills/verify-citations/scripts/bib-authors.test.mjs +1 -44
- package/src/build.harness.mjs +2 -2
- package/src/build.test.ts +1 -1
- package/src/build.ts +1 -6
- package/src/cli.harness.mjs +26 -46
- package/src/cli.test.ts +32 -40
- package/src/cli.ts +14 -54
- package/src/folder-venue-rule.test.ts +1 -1
- package/src/init.test.ts +6 -7
- package/src/init.ts +3 -22
- package/src/lint-fix.test.ts +10 -4
- package/src/new-paper.harness.mjs +9 -28
- package/src/new-paper.test.ts +6 -6
- package/src/new-paper.ts +11 -30
- package/src/paper-files.test.ts +5 -4
- package/src/paper-files.ts +4 -4
- package/src/paper-prose.test.ts +49 -0
- package/src/paper-prose.ts +67 -0
- package/src/parse-args.test.ts +0 -1
- package/src/structure.harness.ts +5 -11
- package/src/structure.ts +4 -3
- package/src/types.ts +0 -2
- package/fixtures/real-markdown-paper/baseline.json +0 -22
- package/fixtures/real-markdown-paper/baseline.ts +0 -70
- package/skills/paper-pipeline/PIPELINE-MAP.md +0 -381
- package/skills/paper-pipeline/pipeline-firing.baseline.json +0 -270
- package/skills/paper-pipeline/references/sweep-2026-08-09-ideal-pipeline.md +0 -585
- package/skills/paper-pipeline/scripts/artifact-coverage.harness.mjs +0 -492
- package/skills/paper-pipeline/scripts/artifact-coverage.mjs +0 -397
- package/skills/paper-pipeline/scripts/artifact-coverage.test.ts +0 -86
- package/skills/paper-pipeline/scripts/check-provenance.mjs +0 -184
- package/skills/paper-pipeline/scripts/population-map.harness.mjs +0 -135
- package/skills/paper-pipeline/scripts/population-map.mjs +0 -188
- package/skills/paper-pipeline/scripts/population-map.test.mjs +0 -154
- package/skills/paper-pipeline/scripts/provenance.harness.mjs +0 -266
- package/skills/paper-pipeline/scripts/round-diff.harness.ts +0 -907
- package/skills/paper-pipeline/scripts/round-diff.mjs +0 -583
- package/skills/paper-pipeline/scripts/round-diff.test.mjs +0 -159
- package/skills/tighten-paper/__snapshots__/structure.test.ts.snap +0 -133
- package/skills/tighten-paper/structure.mjs +0 -364
- package/skills/tighten-paper/structure.test.ts +0 -117
- package/templates/paper/paper.md +0 -4
package/dist/new-paper.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new-paper.d.ts","sourceRoot":"","sources":["../src/new-paper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"new-paper.d.ts","sourceRoot":"","sources":["../src/new-paper.ts"],"names":[],"mappings":"AA4BA,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,wBAAwB,CAAC;AAEhC,8FAA8F;AAC9F,eAAO,MAAM,iBAAiB,QAE7B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,cAAc,CAAC;AAExC,eAAO,MAAM,WAAW,uBAAuB,CAAC;AAChD,6DAA6D;AAC7D,eAAO,MAAM,WAAW,cAAc,CAAC;AAEvC,mFAAmF;AACnF,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AAErD;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,SAAS,UAAU,EAAE,GAC5B,MAAM,GAAG,IAAI,CAaf;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,sEAAsE;IACtE,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC;IACpC,uDAAuD;IACvD,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACvC;AAED,MAAM,MAAM,cAAc,GACtB;IACE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAClB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,gDAAgD;IAChD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,WAAW,EAAE,CAAC;CACxC,GACD;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpD,iGAAiG;AACjG,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EAIzC,CAAC;AAEF,gGAAgG;AAChG,MAAM,WAAW,YAAY;IAC3B,8EAA8E;IAC9E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,IAAI,CAAC;CAC3D;AAuED,mGAAmG;AACnG,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IACrC,uFAAuF;IACvF,QAAQ,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC;CACxC;AAGD,wBAAgB,QAAQ,CACtB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,eAAe,GACpB,cAAc,CAiChB;AAED,iGAAiG;AACjG,wBAAgB,cAAc,CAC5B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,GAC1B,MAAM,EAAE,CAYV"}
|
package/dist/new-paper.js
CHANGED
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
* Every rule below is taken from a tool that already solved it (docs/prior-art/paper-folder-scaffolding.md):
|
|
9
9
|
* - the template is a FILE with a lookup order — the project's `<papers>/.template/<file>` first,
|
|
10
10
|
* the package's `templates/paper/<file>` second (Hugo's archetypes);
|
|
11
|
-
* - it NEVER overwrites: on an existing folder it adds only the missing required files
|
|
12
|
-
* also the migration for an old folder that has only `paper.md` (`cargo init`);
|
|
11
|
+
* - it NEVER overwrites: on an existing folder it adds only the missing required files (`cargo init`);
|
|
13
12
|
* - the name is validated, because it becomes a path and, through the hooks, a shell argument.
|
|
14
13
|
*
|
|
15
14
|
* The only substitution is `{{name}}` → the folder name. Nothing else in a template is touched.
|
|
@@ -22,8 +21,6 @@ import { fileURLToPath } from "node:url";
|
|
|
22
21
|
import { CONFIG_FILE } from "#lib/paper-config";
|
|
23
22
|
import { isRecord } from "./domain/record.js";
|
|
24
23
|
import { venuesNamedBy, withoutVenues, } from "./domain/venue-name.js";
|
|
25
|
-
export const FORMATS = ["tex", "md"];
|
|
26
|
-
export const DEFAULT_FORMAT = "tex";
|
|
27
24
|
/** The package's default templates. Read from disk, so they ship in the tarball (`files`). */
|
|
28
25
|
export const PACKAGE_TEMPLATES = fileURLToPath(new URL("../templates/paper/", import.meta.url));
|
|
29
26
|
/**
|
|
@@ -33,13 +30,10 @@ export const PACKAGE_TEMPLATES = fileURLToPath(new URL("../templates/paper/", im
|
|
|
33
30
|
*/
|
|
34
31
|
export const OVERRIDE_DIR = ".template";
|
|
35
32
|
export const STATUS_FILE = "PIPELINE-STATUS.md";
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
md: "paper.md",
|
|
39
|
-
};
|
|
33
|
+
/** A paper's source: LaTeX, one file at the paper's root. */
|
|
34
|
+
export const SOURCE_FILE = "paper.tex";
|
|
40
35
|
/** The flag that lets `paperlint new` create a folder whose name names a venue. */
|
|
41
36
|
export const ALLOW_VENUE_NAME = "--allow-venue-name";
|
|
42
|
-
export const isFormat = (v) => FORMATS.some((f) => f === v);
|
|
43
37
|
/**
|
|
44
38
|
* Why a name is refused, or null. `[a-z0-9._-]+` is the charset; a LEADING dot is refused on top
|
|
45
39
|
* of it, because discovery skips dot-directories — a paper named `.x` would be created and then
|
|
@@ -67,17 +61,12 @@ export function nameProblem(name, venues) {
|
|
|
67
61
|
` if the venue really belongs in the name, rerun \`paperlint new\` with ${ALLOW_VENUE_NAME}`,
|
|
68
62
|
].join("\n");
|
|
69
63
|
}
|
|
70
|
-
/**
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
function scorecardAndSource(dir, format) {
|
|
78
|
-
const hasSource = Object.values(SOURCE_FILE).some((f) => existsSync(join(dir, f)));
|
|
79
|
-
return hasSource ? [STATUS_FILE] : [STATUS_FILE, SOURCE_FILE[format]];
|
|
80
|
-
}
|
|
64
|
+
/** The files a paper folder must end up with: the scorecard, the source and `paperlint.json`. */
|
|
65
|
+
export const WANTED_FILES = [
|
|
66
|
+
STATUS_FILE,
|
|
67
|
+
SOURCE_FILE,
|
|
68
|
+
CONFIG_FILE,
|
|
69
|
+
];
|
|
81
70
|
/**
|
|
82
71
|
* The template's `paperlint.json` with the chosen venue written in. The template's `$comment`
|
|
83
72
|
* explains how to choose one, so it goes once one is chosen. A template that is not plain JSON (a
|
|
@@ -114,7 +103,7 @@ function fromTemplate(file, { papersRoot, packageTemplates, name, venue, }) {
|
|
|
114
103
|
return { ok: false, reason: `no template for ${file}: ${src} is missing` };
|
|
115
104
|
const text = readFileSync(src, "utf8").split("{{name}}").join(name);
|
|
116
105
|
const setClass = venue?.setClass ?? null;
|
|
117
|
-
if (file === SOURCE_FILE
|
|
106
|
+
if (file === SOURCE_FILE && setClass !== null)
|
|
118
107
|
return { ok: true, value: { file, text: setClass(text), from } };
|
|
119
108
|
if (file !== CONFIG_FILE || venue === null)
|
|
120
109
|
return { ok: true, value: { file, text, from } };
|
|
@@ -124,7 +113,7 @@ function fromTemplate(file, { papersRoot, packageTemplates, name, venue, }) {
|
|
|
124
113
|
: edited;
|
|
125
114
|
}
|
|
126
115
|
// Documented in README.md#getting-started — update it when this changes.
|
|
127
|
-
export function newPaper(papersRoot, name,
|
|
116
|
+
export function newPaper(papersRoot, name, opts) {
|
|
128
117
|
const { packageTemplates = PACKAGE_TEMPLATES, venue = null } = opts;
|
|
129
118
|
const problem = nameProblem(name, opts.venues);
|
|
130
119
|
if (problem)
|
|
@@ -135,7 +124,7 @@ export function newPaper(papersRoot, name, format, opts) {
|
|
|
135
124
|
return { ok: false, reason: `${dir} exists and is not a directory` };
|
|
136
125
|
const files = [];
|
|
137
126
|
const toWrite = [];
|
|
138
|
-
for (const file of
|
|
127
|
+
for (const file of WANTED_FILES) {
|
|
139
128
|
if (existsSync(join(dir, file))) {
|
|
140
129
|
files.push({ file, status: "kept" });
|
|
141
130
|
continue;
|
package/dist/new-paper.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new-paper.js","sourceRoot":"","sources":["../src/new-paper.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"new-paper.js","sourceRoot":"","sources":["../src/new-paper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,sFAAsF;AACtF,OAAO,EACL,UAAU,EACV,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,2CAA2C;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EACL,aAAa,EACb,aAAa,GAEd,MAAM,wBAAwB,CAAC;AAEhC,8FAA8F;AAC9F,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAC5C,IAAI,GAAG,CAAC,qBAAqB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAChD,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,CAAC;AAExC,MAAM,CAAC,MAAM,WAAW,GAAG,oBAAoB,CAAC;AAChD,6DAA6D;AAC7D,MAAM,CAAC,MAAM,WAAW,GAAG,WAAW,CAAC;AAEvC,mFAAmF;AACnF,MAAM,CAAC,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAErD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,WAAW,CACzB,IAAY,EACZ,MAA6B;IAE7B,IAAI,CAAC,gBAAgB,CAAC,I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CAAC,CAAC,4CAA4C,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;KACrG,CAAC;IACF,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK;QAC1B,GAAG,CAAC,IAAI,CACN,CAAC,CAAC,MAAM,KAAK,SAAS;YACpB,CAAC,CAAC,WAAW,CAAC,CAAC,IAAI,eAAe,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,YAAY,GAAG,CAAC,CAAC,CAAC,SAAS,YAAY;YAC7G,CAAC,CAAC,WAAW,CAAC,CAAC,IAAI,8BAA8B,CACpD,CAAC;IACJ,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/paper-files.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THE FILES PAPERLINT OWNS — read off its own config, and made the only thing ESLint may reach.
|
|
3
3
|
*
|
|
4
|
-
* paperlint's blocks name the files they lint (`PIPELINE-STATUS.md`, `paper.
|
|
5
|
-
*
|
|
4
|
+
* paperlint's blocks name the files they lint (`PIPELINE-STATUS.md`, `paper.tex`, `reviews/*.md`,
|
|
5
|
+
* …). That list is the whole scope of `paperlint lint`, and this module turns it
|
|
6
6
|
* into two things ESLint understands:
|
|
7
7
|
*
|
|
8
8
|
* 1. **A global ignore of everything else** (`scopeToOwned`). Handing ESLint a directory is not
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* 2. **Each rule scoped to the files it was written for** (`ruleOwners` + `narrowToOwners`).
|
|
18
18
|
* One plugin NAME is bound to different plugin objects in different blocks: `paper` holds
|
|
19
19
|
* `stages`/`source`/`author-list` beside `PIPELINE-STATUS.md` and `typography` beside
|
|
20
|
-
* `paper.
|
|
20
|
+
* `paper.tex`. So a consumer block that named `paper/source`
|
|
21
21
|
* for every file under the papers directory reached `paper.tex`, where `paper` has no `source`
|
|
22
22
|
* — and ESLint threw `Could not find "source" in plugin "paper"` from inside `lintFiles`,
|
|
23
23
|
* after paperlint's own validation had (correctly) accepted the id. A block is therefore split
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* - a global-ignore pattern that matches a DIRECTORY hides everything inside it, so directories
|
|
37
37
|
* must be un-ignored (`!` + a pattern ending in a slash) before owned files can be;
|
|
38
38
|
* - that un-ignores `node_modules/` and `.git/` too — ESLint's own defaults — so they are
|
|
39
|
-
* re-ignored after, or a `paper.
|
|
39
|
+
* re-ignored after, or a `paper.tex` inside a dependency would be linted;
|
|
40
40
|
* - later global-ignore patterns win, across blocks, in config order;
|
|
41
41
|
* - `files: [["a", "b"]]` matches a file only when BOTH patterns match.
|
|
42
42
|
*/
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type PaperDeps } from "./tex-paper.ts";
|
|
2
|
+
/**
|
|
3
|
+
* A paper's body prose, one passage per paragraph, its section titles in document order, and the
|
|
4
|
+
* text of each file it is made of — `paper.tex` and every file it includes, once, named as the
|
|
5
|
+
* include names it — for what the body leaves out, such as captions.
|
|
6
|
+
*/
|
|
7
|
+
export interface PaperProse {
|
|
8
|
+
readonly body: string;
|
|
9
|
+
readonly headings: readonly string[];
|
|
10
|
+
readonly files: readonly {
|
|
11
|
+
readonly file: string;
|
|
12
|
+
readonly text: string;
|
|
13
|
+
}[];
|
|
14
|
+
}
|
|
15
|
+
/** The prose and the headings of the paper whose main file is `filename` with the text `src`. */
|
|
16
|
+
export declare function paperProse(filename: string, src: string, deps: PaperDeps): PaperProse;
|
|
17
|
+
//# sourceMappingURL=paper-prose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paper-prose.d.ts","sourceRoot":"","sources":["../src/paper-prose.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAW3D;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,KAAK,EAAE,SAAS;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC7E;AAED,iGAAiG;AACjG,wBAAgB,UAAU,CACxB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,SAAS,GACd,UAAU,CAoBZ"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE PROSE OF A paper.tex AS PLAIN TEXT — what `grade-paper-writing/prose-lint.mjs` measures.
|
|
3
|
+
*
|
|
4
|
+
* prose-lint counts sentences and words, and every metric it prints is a fraction of the word
|
|
5
|
+
* count. Read as raw text, a `.tex` puts the preamble, the `%` comments and an inline `filecontents`
|
|
6
|
+
* bibliography into that count (8127 "words" against about 4636 real ones on one paper), so every
|
|
7
|
+
* rate comes out roughly halved. This reads the paper the way the `tex/register` rule does: the
|
|
8
|
+
* includes spliced in (`readPaper`), then the body's prose as passages (`bodyProse` — the abstract
|
|
9
|
+
* to the back matter, without headings, captions, floats or code), each passage's sentences
|
|
10
|
+
* (`bodySentences`). A blank line separates two passages, so no sentence runs across them.
|
|
11
|
+
*
|
|
12
|
+
* A citation stands as `[1]` and a cross-reference as `1`, where they are set — not left out:
|
|
13
|
+
* prose-lint judges a sentence that ENDS on one (a wasted stress position) and counts references
|
|
14
|
+
* to other parts of the paper (`(Section 1)`), and both are invisible in a sentence the marks
|
|
15
|
+
* were cut out of. Math is left out; prose-lint counts no formula.
|
|
16
|
+
*/
|
|
17
|
+
import { bodySentences } from "./domain/register.js";
|
|
18
|
+
import { CITATION, MATH, REFERENCE } from "./domain/sentences.js";
|
|
19
|
+
import { runText } from "./domain/tex-document.js";
|
|
20
|
+
import { readPaper } from "./tex-paper.js";
|
|
21
|
+
/** A sentence's text with each mark as a reader would see it set, and math left out. */
|
|
22
|
+
const rendered = (raw) => raw
|
|
23
|
+
.replaceAll(CITATION, "[1]")
|
|
24
|
+
.replaceAll(REFERENCE, "1")
|
|
25
|
+
.replaceAll(MATH, "")
|
|
26
|
+
.replace(/\s+/gu, " ")
|
|
27
|
+
.trim();
|
|
28
|
+
/** The prose and the headings of the paper whose main file is `filename` with the text `src`. */
|
|
29
|
+
export function paperProse(filename, src, deps) {
|
|
30
|
+
const { text, segments } = readPaper(filename, src, deps);
|
|
31
|
+
const passages = deps.latex
|
|
32
|
+
.bodyProse(text)
|
|
33
|
+
.map((p) => bodySentences([p])
|
|
34
|
+
.map((s) => rendered(s.raw))
|
|
35
|
+
.join(" "))
|
|
36
|
+
.filter((p) => p !== "");
|
|
37
|
+
return {
|
|
38
|
+
body: passages.join("\n\n"),
|
|
39
|
+
headings: deps.latex
|
|
40
|
+
.headings(text)
|
|
41
|
+
.filter((h) => h.command.kind === "heading" && h.argument === "title")
|
|
42
|
+
.map((h) => runText(h.title).replace(/\s+/g, " ").trim()),
|
|
43
|
+
files: [...new Map(segments.map((s) => [s.file, s.source])).entries()].map(([file, text]) => ({ file, text })),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=paper-prose.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paper-prose.js","sourceRoot":"","sources":["../src/paper-prose.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAE3D,wFAAwF;AACxF,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAU,EAAE,CACvC,GAAG;KACA,UAAU,CAAC,QAAQ,EAAE,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AC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CACxE,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CACnC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/structure.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structure.d.ts","sourceRoot":"","sources":["../src/structure.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"structure.d.ts","sourceRoot":"","sources":["../src/structure.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAIpE,8EAA8E;AAC9E,KAAK,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAEvC;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;;;;;CAK9B,CAAC;AAEF,gGAAgG;AAChG,wBAAgB,cAAc,CAC5B,SAAS,EAAE,eAAe,GAAG,KAAK,GAAG,SAAS,GAC7C,KAAK,GAAG,IAAI,CAGd;AAaD;;GAEG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,SAAS,EAAE,eAAe,GAAG,KAAK,GAAG,SAAS,EAE9C,EAAE,GAAmB,EAAE,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GAC7C,gBAAgB,EAAE,CAyCpB;AAcD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,GAAG,MAAM,CAO7E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,SAAS,gBAAgB,EAAE,GACpC,OAAO,EAAE,CAqBX"}
|
package/dist/structure.js
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
import { readdirSync, existsSync } from "node:fs";
|
|
26
26
|
import { join, relative, basename, isAbsolute, sep } from "node:path";
|
|
27
27
|
import { CONFIG_FILE } from "#lib/paper-config";
|
|
28
|
+
import { SOURCE_FILE } from "./new-paper.js";
|
|
28
29
|
/**
|
|
29
30
|
* The defaults are MEASURED against a live corpus of five paper directories, not picked by taste:
|
|
30
31
|
* under them it passes in full — zero findings. The counter-case was run too: `paper.pdf` added to
|
|
@@ -33,9 +34,9 @@ import { CONFIG_FILE } from "#lib/paper-config";
|
|
|
33
34
|
* byte-compared by the `paper/stages` rule anyway.
|
|
34
35
|
*/
|
|
35
36
|
export const STRUCTURE_DEFAULTS = {
|
|
36
|
-
markers: ["PIPELINE-STATUS.md",
|
|
37
|
+
markers: ["PIPELINE-STATUS.md", SOURCE_FILE, CONFIG_FILE],
|
|
37
38
|
require: ["PIPELINE-STATUS.md"],
|
|
38
|
-
requireOneOf: [[
|
|
39
|
+
requireOneOf: [[SOURCE_FILE]],
|
|
39
40
|
ignore: [],
|
|
40
41
|
};
|
|
41
42
|
/** The consumer's config over the defaults; `structure: false` turns the check off entirely. */
|
|
@@ -104,7 +105,7 @@ export function checkStructure(paths, structure,
|
|
|
104
105
|
* The message NAMES THE CONSEQUENCE rather than restating the condition. "missing
|
|
105
106
|
* PIPELINE-STATUS.md" without the second half reads as nitpicking about formatting; with it you
|
|
106
107
|
* can see which checks the directory silently loses — the rules that read the scorecard; the rules
|
|
107
|
-
* over `paper.
|
|
108
|
+
* over `paper.tex` still run.
|
|
108
109
|
*/
|
|
109
110
|
function whyMissingMatters(file, dirName) {
|
|
110
111
|
if (file === "PIPELINE-STATUS.md")
|
package/dist/structure.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structure.js","sourceRoot":"","sources":["../src/structure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,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AmB,EAAE,CAAC;QACtB,kBAAkB,EAAE,EAAE;QACtB,mBAAmB,EAAE,EAAE;KACxB,CAAC,CAAC,CAAC;AACN,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -58,8 +58,6 @@ export interface Args {
|
|
|
58
58
|
noHooks: boolean;
|
|
59
59
|
/** `--paper <name>`: `init` creates this paper. */
|
|
60
60
|
paper: string | null;
|
|
61
|
-
/** `--format tex|md` for `new` and `init --paper`. Validated by the command, not here. */
|
|
62
|
-
format: string | null;
|
|
63
61
|
/** `--venue <preset>` for `new`: a shipped preset name, or a path to the project's own. */
|
|
64
62
|
venue: string | null;
|
|
65
63
|
/** `--kind <kind>` for `new`: one of the venue preset's kinds. */
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B;;;sCAGkC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sFAAsF;IACtF,SAAS,CAAC,EAAE,eAAe,GAAG,KAAK,GAAG,SAAS,CAAC;IAChD,iGAAiG;IACjG,KAAK,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;IAC7B,yFAAyF;IACzF,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qFAAqF;IACrF,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,kCAAkC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,mFAAmF;IACnF,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;I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AAS,CAAC;IACjB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC"}
|
package/docs/configuration.md
CHANGED
|
@@ -79,7 +79,7 @@ where your papers are, and writes `{ "papersDir": … }` only when that is not `
|
|
|
79
79
|
`papersDir` already declared is kept, and nothing is measured or asked.
|
|
80
80
|
|
|
81
81
|
**Under `papersDir`, only the files paperlint's own rules are written for are linted:**
|
|
82
|
-
`PIPELINE-STATUS.md`, `paper.
|
|
82
|
+
`PIPELINE-STATUS.md`, `paper.tex` (and the files it includes), `reviews/*.md` and `siblings/*.md`.
|
|
83
83
|
Everything else — a paper's `repro/` scripts, vendored JavaScript, data files — is never handed to
|
|
84
84
|
ESLint, so it cannot fail the run. A file you name on the command line that is not one of these is
|
|
85
85
|
refused by name. `node_modules/`, `.git/` and `<papers>/.template/` are skipped.
|
|
@@ -328,8 +328,8 @@ can turn on a rule that is off by default, or change the severity of one that is
|
|
|
328
328
|
A pattern ending in `/**` is the usual way to name one paper.
|
|
329
329
|
- **Each rule reaches only the files it is written for.** A block with `"files": ["papers/**"]` and
|
|
330
330
|
`"rules": { "paper/source": "warn" }` turns `paper/source` on for every `PIPELINE-STATUS.md` under
|
|
331
|
-
`papers/`; `paper/section-word` in the same block lands on every `paper.
|
|
332
|
-
|
|
331
|
+
`papers/`; `paper/section-word` in the same block lands on every `paper.tex`. You do not need to
|
|
332
|
+
know which file a rule reads: your `files` narrow where it runs,
|
|
333
333
|
never widen it. The [rule tables](rules.md) name each rule's file.
|
|
334
334
|
- **A rule entry** is a severity (`"off"`, `"warn"`, `"error"`, or `0`/`1`/`2`), or a list whose
|
|
335
335
|
first element is a severity and the rest are the rule's options.
|
|
@@ -354,16 +354,14 @@ and the real findings leave with it.
|
|
|
354
354
|
|
|
355
355
|
```json
|
|
356
356
|
"structure": {
|
|
357
|
-
"markers": ["PIPELINE-STATUS.md", "paper.tex", "
|
|
357
|
+
"markers": ["PIPELINE-STATUS.md", "paper.tex", "paperlint.json"],
|
|
358
358
|
"require": ["PIPELINE-STATUS.md"],
|
|
359
|
-
"requireOneOf": [["paper.tex"
|
|
359
|
+
"requireOneOf": [["paper.tex"]],
|
|
360
360
|
"ignore": []
|
|
361
361
|
}
|
|
362
362
|
```
|
|
363
363
|
|
|
364
|
-
Those are the defaults; you only write the block to change them.
|
|
365
|
-
because Markdown papers are deprecated but not yet removed
|
|
366
|
-
([#57](https://github.com/zernie/paperlint/issues/57)). They were measured against a
|
|
364
|
+
Those are the defaults; you only write the block to change them. They were measured against a
|
|
367
365
|
real five-paper corpus rather than chosen — it passes with zero findings, while adding
|
|
368
366
|
`paper.pdf` to `require` produces two findings on papers that are perfectly fine, which is why it
|
|
369
367
|
is not there.
|
|
@@ -493,7 +491,7 @@ export default [
|
|
|
493
491
|
It registers every rule paperlint ships, each turned off (`paperlint lint` is where they run), and
|
|
494
492
|
the LaTeX language as `tex/latex` — use that instead of registering a `tex` plugin of your own, or
|
|
495
493
|
ESLint refuses the config with `Cannot redefine plugin "tex"`, with or without the language. Without
|
|
496
|
-
`texLanguage` it registers the rules only
|
|
494
|
+
`texLanguage` it registers the rules only.
|
|
497
495
|
|
|
498
496
|
On the files paperlint lints it also turns off ESLint's report of unused disable directives: a
|
|
499
497
|
directive naming a rule that is off suppresses nothing, and would be reported as unused in every such
|
package/docs/e2e.md
CHANGED
|
@@ -179,10 +179,6 @@ everything.
|
|
|
179
179
|
- **macOS and Windows.** Locally these run on whatever machine you have. In CI `build-e2e` is a
|
|
180
180
|
matrix over `ubuntu-latest` and `macos-latest`; Windows is not run anywhere, and `paperlint toolchain`
|
|
181
181
|
refuses it.
|
|
182
|
-
- **The rules, on a real document.** `fixtures/real-markdown-paper/` holds a published article and
|
|
183
|
-
a recorded baseline of what the rules say about it. That is a **lint** fixture, driven by a
|
|
184
|
-
harness — it does not go through the installed package. Wiring it into the install corpus is
|
|
185
|
-
open work, not something already done.
|
|
186
182
|
- **The skills as behaviour.** The install run proves a skill arrived and that its paths resolve.
|
|
187
183
|
Whether the agent then does the right thing with it is a different measurement, and it belongs
|
|
188
184
|
to the harness tier of `vigiles`, not here.
|
|
@@ -199,5 +195,7 @@ PDF, its byte counts, the cross-check between them — and copies `fixtures/buil
|
|
|
199
195
|
it so the LaTeX rules see LaTeX rather than a placeholder.
|
|
200
196
|
|
|
201
197
|
⚠️ **Every line of that corpus was written by somebody who already knew which rule would read it.**
|
|
202
|
-
It keeps the stage machinery honest and it cannot tell you anything about false positives.
|
|
203
|
-
|
|
198
|
+
It keeps the stage machinery honest and it cannot tell you anything about false positives. So the
|
|
199
|
+
run then adds one accepted paper from `fixtures/accepted-papers/` (`secure-acsac24`) and holds the
|
|
200
|
+
installed binary to that paper's recorded `baseline.json` — the same recording
|
|
201
|
+
`fixtures/accepted-papers/accepted-papers.test.ts` holds the repository's own `run` to.
|
|
@@ -16,10 +16,6 @@ still left to a human copying something by hand?**
|
|
|
16
16
|
> - `--hooks=local` is **deferred, not implemented**; `init` refuses it by name.
|
|
17
17
|
>
|
|
18
18
|
> Where the build differed from this text, it is listed at the end, in § 8.
|
|
19
|
-
>
|
|
20
|
-
> **Later, 2026-09-24:** Markdown papers are deprecated and being removed
|
|
21
|
-
> ([#57](https://github.com/zernie/research-paper-pipeline/issues/57)). Where this record mentions
|
|
22
|
-
> `paper.md` or `--format md`, it describes the tool as it was when written.
|
|
23
19
|
|
|
24
20
|
1. A paper folder needs a `PIPELINE-STATUS.md`, and today nothing makes it — you copy a template.
|
|
25
21
|
Should there be a command, and where should per-paper settings live: in a file in every paper
|
|
@@ -66,11 +62,11 @@ changes, no migration.
|
|
|
66
62
|
(`src/init.ts:448`), offers a CI workflow, reports missing programs, and **prints** the two
|
|
67
63
|
`/plugin` lines (`src/init.ts:257-258`). It never creates the papers directory and never creates
|
|
68
64
|
a paper.
|
|
69
|
-
- **A directory is a paper** if it holds any of `PIPELINE-STATUS.md`, `paper.tex`, `
|
|
70
|
-
|
|
71
|
-
- **`rpp lint` requires `PIPELINE-STATUS.md`** in every such directory, plus
|
|
72
|
-
|
|
73
|
-
|
|
65
|
+
- **A directory is a paper** if it holds any of `PIPELINE-STATUS.md`, `paper.tex`, `venue.json`
|
|
66
|
+
(`src/build.ts`, `src/structure.ts`). Detection is generous.
|
|
67
|
+
- **`rpp lint` requires `PIPELINE-STATUS.md`** in every such directory, plus `paper.tex`
|
|
68
|
+
(`src/structure.ts`). A paper with only `paper.tex` fails the very first `rpp lint` with
|
|
69
|
+
`missing PIPELINE-STATUS.md` — that is the README's own "First run" example.
|
|
74
70
|
|
|
75
71
|
⚠️ **One inconsistency worth knowing.** `paper/stages` says in its header that a missing `stages`
|
|
76
72
|
field is _legitimate_ — "a paper that has shipped nothing owes nothing" (`eslint-rules/paper-stages.mjs:24-27`) —
|
|
@@ -101,7 +97,7 @@ human to copy and tick them.
|
|
|
101
97
|
## 2. What `PIPELINE-STATUS.md` actually holds — the split
|
|
102
98
|
|
|
103
99
|
Read from the template (`skills/paper-pipeline/references/pipeline-status-template.md`), the
|
|
104
|
-
fixtures (`fixtures/paper-stages
|
|
100
|
+
fixtures (`fixtures/paper-stages/*`) and four real files in the
|
|
105
101
|
owner's corpus. Real sizes: 86, 95, 1 057 and 1 301 lines. In the two big ones the machine-read
|
|
106
102
|
part is the first 10–25 lines of front matter; the rest is a dated journal of decisions. (No
|
|
107
103
|
content of those files is reproduced here.)
|
|
@@ -110,7 +106,6 @@ content of those files is reproduced here.)
|
|
|
110
106
|
| ------------------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
111
107
|
| paper short name / title | **config** | human, once — `rpp new` can prefill from the folder name |
|
|
112
108
|
| venue, deadline, blind model (the `Venue:` header line) | **config** | human; changes when the paper is re-targeted |
|
|
113
|
-
| format (`.tex` vs `.md`) | **derived** | from which source file exists |
|
|
114
109
|
| venue profile, paper kind, pdf path (a separate `venue.json` in one real paper) | **config** | human; already a per-paper file in practice |
|
|
115
110
|
| typography allowance (`typographyDebt`) | **config** | human, but it sits in the root key keyed by path today |
|
|
116
111
|
| `stages[]`: `stage`, `date`, `venue` | **state** | **tool** at the moment of freezing (`rpp freeze`, a later step) |
|
|
@@ -172,9 +167,9 @@ parsing markdown — the fix is to ship the template as its own file and have th
|
|
|
172
167
|
(entry front matter), Cargo (member `Cargo.toml`), Eleventy (directory data). The tools that put
|
|
173
168
|
per-unit settings in the root (ESLint `files`, Vale sections) are _linters of code_, where units
|
|
174
169
|
have no identity of their own — a paper does.
|
|
175
|
-
3. **Front matter of the source itself is not available to rpp**, because
|
|
176
|
-
|
|
177
|
-
|
|
170
|
+
3. **Front matter of the source itself is not available to rpp**, because a paper is LaTeX, which
|
|
171
|
+
has no YAML front matter. Quarto and Astro can use the document's own header only because their
|
|
172
|
+
documents carry one. So rpp needs a per-paper **file**, and it already has one:
|
|
178
173
|
`PIPELINE-STATUS.md`, whose front matter is exactly where Quarto would put these fields.
|
|
179
174
|
4. **Root-level keys that are really per-paper** (`typographyDebt: { "papers/my-paper": … }`,
|
|
180
175
|
`src/cli.ts:104`) are the ESLint-overrides style. They work, but they break silently on a folder
|
|
@@ -209,9 +204,9 @@ written once at freeze time, then checked forever — and today a human types it
|
|
|
209
204
|
|
|
210
205
|
### Commands
|
|
211
206
|
|
|
212
|
-
**`rpp new <name
|
|
207
|
+
**`rpp new <name>`** — creates `<papers>/<name>/` with:
|
|
213
208
|
|
|
214
|
-
- `paper.tex`
|
|
209
|
+
- `paper.tex` (a minimal stub);
|
|
215
210
|
- `PIPELINE-STATUS.md` from a **template file** shipped in the package, with the name filled in and
|
|
216
211
|
**no** `stages` field (a new paper has shipped nothing — `paper-stages.mjs:24`).
|
|
217
212
|
|
|
@@ -228,7 +223,7 @@ Rules for it, each taken from a tool above:
|
|
|
228
223
|
**Later step, NOT part of this change — `rpp freeze <paper> <stage> [--pdf <file>] [--date <iso>]`**,
|
|
229
224
|
the release-please move, recorded so the design is not lost:
|
|
230
225
|
|
|
231
|
-
- copies the built pdf and the source into `versions/<date>-<stage>.pdf|.tex
|
|
226
|
+
- copies the built pdf and the source into `versions/<date>-<stage>.pdf|.tex`;
|
|
232
227
|
- **appends** one record to `stages` with `stage`, `date`, `pdf`, `bytes`, `source`, `sourceBytes`;
|
|
233
228
|
- refuses a stage outside `STAGES` (`paper-stages.mjs:53`) and a date/stage pair already present.
|
|
234
229
|
|
|
@@ -259,15 +254,15 @@ the skills tell agents to update them.
|
|
|
259
254
|
|
|
260
255
|
- **Existing folders with a `PIPELINE-STATUS.md`** (the owner's four): nothing changes. Their
|
|
261
256
|
front matter is already the per-paper carrier; a later `rpp freeze` would append to their lists.
|
|
262
|
-
- **Existing folders without one** (a draft that has only `paper.
|
|
263
|
-
the missing file and touches nothing else.
|
|
257
|
+
- **Existing folders without one** (a draft that has only `paper.tex`): `rpp new <that-name>`
|
|
258
|
+
fills the missing file and touches nothing else.
|
|
264
259
|
- **No `rpp migrate` is needed** for this recommendation. One would be needed only if the carrier
|
|
265
260
|
later moves to `paper.yml`.
|
|
266
261
|
|
|
267
262
|
### The smallest first step
|
|
268
263
|
|
|
269
264
|
Move the template out of the code fence into its own file (say
|
|
270
|
-
`templates/paper/PIPELINE-STATUS.md`, plus `paper.tex`
|
|
265
|
+
`templates/paper/PIPELINE-STATUS.md`, plus a `paper.tex` stub), make
|
|
271
266
|
`pipeline-status-template.md` point at it instead of containing it, and add `rpp new` that copies
|
|
272
267
|
it. Then the README sentence "Nothing generates it and no command refreshes it" becomes "`rpp new`
|
|
273
268
|
creates it". No rule changes, no consumer migration. `rpp freeze` is step two; `init` offering to
|
|
@@ -435,13 +430,13 @@ unset **and** no `--yes`._
|
|
|
435
430
|
|
|
436
431
|
### What `init` asks, and what it does without asking
|
|
437
432
|
|
|
438
|
-
| decision | human at a terminal
|
|
439
|
-
| ----------------- |
|
|
440
|
-
| papers directory | asked only if several candidates (today)
|
|
441
|
-
| **hooks** | "Wire the three paper hooks into `.claude/settings.json` (committed, shared)? **[Y/n]**"
|
|
442
|
-
| CI workflow | "Add a GitHub Actions workflow? **[y/N]**" (today)
|
|
443
|
-
| first paper | only when the papers dir holds no paper: "Create a first paper? name: [skip]"
|
|
444
|
-
| external programs | reported (today)
|
|
433
|
+
| decision | human at a terminal | agent / CI / `--yes` | flag |
|
|
434
|
+
| ----------------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------- |
|
|
435
|
+
| papers directory | asked only if several candidates (today) | first candidate, said so (today) | `init <dir>` then the key |
|
|
436
|
+
| **hooks** | "Wire the three paper hooks into `.claude/settings.json` (committed, shared)? **[Y/n]**" | **yes** — the guard is what the package is for, the edit is idempotent and shows up in `git diff` | `--no-hooks` (`--hooks=local` deferred) |
|
|
437
|
+
| CI workflow | "Add a GitHub Actions workflow? **[y/N]**" (today) | **no** (today) — it writes into `.github/` and spends Actions minutes, which are metered | `--ci` / `--no-ci` |
|
|
438
|
+
| first paper | only when the papers dir holds no paper: "Create a first paper? name: [skip]" | **no**, unless `--paper <name>` is given | `--paper <name>` |
|
|
439
|
+
| external programs | reported (today) | reported (today) | — |
|
|
445
440
|
|
|
446
441
|
Why the hooks default is "yes" even without asking, while CI is "no": the rule `install.md` already
|
|
447
442
|
adopted from Playwright is _"ask only about what cannot be guessed or is expensive"_. Installing a
|
|
@@ -495,8 +490,8 @@ Recorded so the design and the code do not quietly disagree.
|
|
|
495
490
|
- **`rpp new` lints the new folder itself** (`rpp lint <papers>/<name>`), so the structure check —
|
|
496
491
|
which looks at the subdirectories of the path it is given — does not run there; the folder was
|
|
497
492
|
just made with the required files, so there is nothing for it to find.
|
|
498
|
-
- **Interactive `init` asks "Create a first paper? name: [skip]"
|
|
499
|
-
|
|
493
|
+
- **Interactive `init` asks "Create a first paper? name: [skip]"** only when the papers directory
|
|
494
|
+
holds no paper.
|
|
500
495
|
|
|
501
496
|
## Sources checked
|
|
502
497
|
|
|
@@ -68,7 +68,6 @@ any other rule.
|
|
|
68
68
|
3 of the model_) is read as a quantity, and so is the number of a name that opens the sentence
|
|
69
69
|
(_Claude 3 fails …_).
|
|
70
70
|
- Whether a count followed by a plural noun is really the sample (_3 times faster_ passes as one).
|
|
71
|
-
- Markdown papers (`paper.md`): it reads the LaTeX parse tree only.
|
|
72
71
|
|
|
73
72
|
## How to fix
|
|
74
73
|
|
package/docs/rules.md
CHANGED
|
@@ -13,8 +13,8 @@ reads and when it fails. Errors fail `paperlint lint`; warnings print and do not
|
|
|
13
13
|
| [`cycle/port-done`](rules/cycle/port-done.md) | error | `paper.tex` → `paperlint.json` (`cycles`) → the preset's `template` | the current cycle still declares `"phase": "porting"` (which silences the venue's format rules) while the `\documentclass` is already the venue's template: the port is done, drop the phase — [page](rules/cycle/port-done.md) |
|
|
14
14
|
| [`paper/folder-venue-leftover`](rules/paper/folder-venue-leftover.md) | warn | the folder name → `paperlint.json` | the paper's folder is named after another shipped venue than the one it extends (`papers/aisec-2026/` for a paper now set for AIDC); reported on `PIPELINE-STATUS.md` — [page](rules/paper/folder-venue-leftover.md) |
|
|
15
15
|
| `paper/author-list` | error | `paper.tex` → `_build/references.json` | an entry's authors are not those of the version it cites — typically the arXiv preprint's list under a published venue. Checked online by `paperlint build` (DBLP), reported on the entry's own line |
|
|
16
|
-
| `paper/section-word` | warn | `paper.tex` and its body files
|
|
17
|
-
| `paper/leading-zero` | warn | `paper.tex` and its body files
|
|
16
|
+
| `paper/section-word` | warn | `paper.tex` and its body files | `§` or `\S\ref` instead of the word Section. **Fixable:** `--fix` writes `Section~\ref{…}` / `Section 5` |
|
|
17
|
+
| `paper/leading-zero` | warn | `paper.tex` and its body files | a decimal below 1 without its leading zero (`.05` instead of `0.05`, IEEE / ISO 80000-1 style), counted only where the reader sees it — prose, math and table cells, not macro options, column specs, comments, code or tikz. A number right after `¶` or `§` (`¶¶.42`) is a paragraph designator and is not reported; in a paragraph that cites numbers that way, another bare decimal is reported without a fix, with the zero as a suggestion. **Fixable** |
|
|
18
18
|
| `paper/figure-ref-style` | warn | `paper.tex` and its body files | `Fig.~\ref` and `Figure~\ref` mixed in one document; each minority occurrence is reported. **Fixable:** `--fix` writes the majority form |
|
|
19
19
|
| `bib/reachable-entry` | warn | `paper.tex` (its `filecontents` bibliography) | an entry has no doi, url or arXiv id — a reader has nothing to follow. Reported on the entry; no fix, the link has to be looked up |
|
|
20
20
|
| `paper/cite-exists` | error | `paper.tex` → `_build/references.json` | an entry's doi or arXiv id resolves to nothing, or to a different work. Checked online by `paperlint build`; a work that was merely not found is not a finding |
|
|
@@ -268,10 +268,6 @@ The paper body is `paper.tex`, and it gets three rules of its own: `paper/typogr
|
|
|
268
268
|
run on it but judge the files beside it. The scorecard and the review notes are Markdown files, and
|
|
269
269
|
the other five rules read those.
|
|
270
270
|
|
|
271
|
-
A Markdown body (`paper.md`, or `draft.md`) is still read today and gets only the two `paper/`
|
|
272
|
-
rules, which is why they list it above. Markdown papers are deprecated and being removed
|
|
273
|
-
([#57](https://github.com/zernie/paperlint/issues/57)); do not start a new one.
|
|
274
|
-
|
|
275
271
|
## The scorecard's `bytes:` and `sourceBytes:`
|
|
276
272
|
|
|
277
273
|
**When you submit,** copy the PDF and `paper.tex` you sent into the paper's `versions/` folder and
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
* registry) through this language and froze their finding counts on three real papers
|
|
28
28
|
* (35 · 52 · 15 at the 2026-08-27 measurement, later 32 · 53 · 20 after captions became
|
|
29
29
|
* visible on 2026-09-06). None of those modules was extracted, and the papers are private, so:
|
|
30
|
-
* - the "rules
|
|
30
|
+
* - the "rules read the projection correctly" half is GONE. What is left proves the
|
|
31
31
|
* projection is correct, not that a downstream rule consumes it correctly;
|
|
32
|
-
* - the config half that
|
|
33
|
-
*
|
|
32
|
+
* - the config half that listed the rules explicitly switched `off` on `.tex` WITH A
|
|
33
|
+
* REASON is GONE with the rules;
|
|
34
34
|
* - the only rule that still runs through this language here is `tex/future-promise`, and it
|
|
35
35
|
* reads the file from disk rather than the projection — so end-to-end it proves the
|
|
36
36
|
* language parses and dispatches, not that the projection is what a rule reads.
|