paperlint 16.8.0 → 17.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/CLAUDE.md +10 -2
  2. package/CONTRIBUTING.md +1 -1
  3. package/README.md +17 -14
  4. package/dist/adapters/latex/abstract.d.ts +7 -1
  5. package/dist/adapters/latex/abstract.d.ts.map +1 -1
  6. package/dist/adapters/latex/abstract.js +19 -4
  7. package/dist/adapters/latex/abstract.js.map +1 -1
  8. package/dist/adapters/latex/captions.d.ts +6 -5
  9. package/dist/adapters/latex/captions.d.ts.map +1 -1
  10. package/dist/adapters/latex/captions.js +14 -30
  11. package/dist/adapters/latex/captions.js.map +1 -1
  12. package/dist/adapters/latex/index.d.ts +1 -1
  13. package/dist/adapters/latex/index.d.ts.map +1 -1
  14. package/dist/adapters/latex/index.js +5 -2
  15. package/dist/adapters/latex/index.js.map +1 -1
  16. package/dist/adapters/latex/prose.d.ts +6 -0
  17. package/dist/adapters/latex/prose.d.ts.map +1 -1
  18. package/dist/adapters/latex/prose.js +18 -12
  19. package/dist/adapters/latex/prose.js.map +1 -1
  20. package/dist/cli.d.ts +6 -1
  21. package/dist/cli.d.ts.map +1 -1
  22. package/dist/cli.js +16 -8
  23. package/dist/cli.js.map +1 -1
  24. package/dist/domain/register.d.ts +23 -1
  25. package/dist/domain/register.d.ts.map +1 -1
  26. package/dist/domain/register.js +37 -14
  27. package/dist/domain/register.js.map +1 -1
  28. package/dist/domain/term-definitions.d.ts +48 -0
  29. package/dist/domain/term-definitions.d.ts.map +1 -0
  30. package/dist/domain/term-definitions.js +228 -0
  31. package/dist/domain/term-definitions.js.map +1 -0
  32. package/dist/domain/tex-document.d.ts +11 -0
  33. package/dist/domain/tex-document.d.ts.map +1 -1
  34. package/dist/domain/tex-document.js.map +1 -1
  35. package/dist/eslint-rules/review-frontmatter.js +5 -5
  36. package/dist/eslint-rules/review-frontmatter.schema.json +15 -8
  37. package/dist/eslint-rules/sibling-frontmatter.d.ts.map +1 -1
  38. package/dist/folder-venue-rule.d.ts +1 -1
  39. package/dist/folder-venue-rule.d.ts.map +1 -1
  40. package/dist/folder-venue-rule.js +4 -2
  41. package/dist/folder-venue-rule.js.map +1 -1
  42. package/dist/hooks-notice.d.ts +3 -3
  43. package/dist/hooks-notice.d.ts.map +1 -1
  44. package/dist/hooks-notice.js +41 -8
  45. package/dist/hooks-notice.js.map +1 -1
  46. package/dist/link-skills.d.ts +5 -0
  47. package/dist/link-skills.d.ts.map +1 -1
  48. package/dist/link-skills.js +7 -0
  49. package/dist/link-skills.js.map +1 -1
  50. package/dist/ports/latex.d.ts +11 -1
  51. package/dist/ports/latex.d.ts.map +1 -1
  52. package/dist/presets.d.ts +21 -2
  53. package/dist/presets.d.ts.map +1 -1
  54. package/dist/presets.js +66 -17
  55. package/dist/presets.js.map +1 -1
  56. package/dist/readability.d.ts +12 -2
  57. package/dist/readability.d.ts.map +1 -1
  58. package/dist/readability.js +76 -3
  59. package/dist/readability.js.map +1 -1
  60. package/dist/register-bands.d.ts +16 -5
  61. package/dist/register-bands.d.ts.map +1 -1
  62. package/dist/register-bands.js +56 -17
  63. package/dist/register-bands.js.map +1 -1
  64. package/dist/skills/argument-arc/scripts/headings-core.d.ts +12 -0
  65. package/dist/skills/argument-arc/scripts/headings.d.ts +2 -0
  66. package/dist/skills/cold-read-diff/scripts/cold-read-core.d.ts +12 -0
  67. package/dist/skills/cold-read-diff/scripts/readers.d.ts +2 -1
  68. package/dist/term-definition-rules.d.ts +26 -0
  69. package/dist/term-definition-rules.d.ts.map +1 -0
  70. package/dist/term-definition-rules.js +137 -0
  71. package/dist/term-definition-rules.js.map +1 -0
  72. package/dist/tex-paper.d.ts +6 -0
  73. package/dist/tex-paper.d.ts.map +1 -1
  74. package/dist/tex-paper.js +10 -0
  75. package/dist/tex-paper.js.map +1 -1
  76. package/dist/tex-requirements.d.ts +2 -0
  77. package/dist/tex-requirements.d.ts.map +1 -1
  78. package/dist/tex-requirements.js +9 -0
  79. package/dist/tex-requirements.js.map +1 -1
  80. package/dist/tex-venue-rules.d.ts +3 -2
  81. package/dist/tex-venue-rules.d.ts.map +1 -1
  82. package/dist/tex-venue-rules.js +3 -2
  83. package/dist/tex-venue-rules.js.map +1 -1
  84. package/docs/configuration.md +2 -2
  85. package/{skills/paper-pipeline/references → docs/design}/acceptance-gate.md +50 -53
  86. package/docs/design/paper-pipeline-history.md +217 -0
  87. package/docs/design/skill-provenance.md +132 -0
  88. package/docs/design/study-modes.md +1 -1
  89. package/docs/design/verify-citations-history.md +135 -0
  90. package/docs/design/writing-exemplars.md +19 -0
  91. package/docs/install.md +7 -4
  92. package/docs/layout.md +5 -4
  93. package/docs/optional-rules.md +4 -0
  94. package/docs/osf-artifact.md +54 -0
  95. package/docs/pipeline.md +171 -0
  96. package/docs/render.md +82 -0
  97. package/docs/rules/paper/folder-venue-leftover.md +10 -7
  98. package/docs/rules/tex/contrast-frames.md +1 -2
  99. package/docs/rules/tex/max-caption-words.md +82 -0
  100. package/docs/rules/tex/max-paragraph-words.md +2 -2
  101. package/docs/rules/tex/negated-sentences.md +96 -0
  102. package/docs/rules/tex/term-before-definition.md +103 -0
  103. package/docs/rules/tex/term-defined-twice.md +62 -0
  104. package/docs/rules/tex/venue-leftover.md +13 -1
  105. package/docs/rules.md +23 -18
  106. package/docs/skills.md +16 -21
  107. package/docs/submission.md +14 -0
  108. package/docs/texlive-install-decision.md +1 -1
  109. package/docs/toolchain.md +11 -11
  110. package/eslint-rules/review-frontmatter.schema.json +15 -8
  111. package/eslint-rules/review-frontmatter.test.mjs +8 -5
  112. package/eslint-rules/review-frontmatter.ts +5 -5
  113. package/eslint.config.mjs +1 -5
  114. package/hooks/paper-status-gates.sh +21 -4
  115. package/hooks/paper-status-gates.test.ts +51 -0
  116. package/lib/skill-checks.test.mjs +2 -6
  117. package/lib/skill-trigger-cases.mjs +12 -97
  118. package/lib/skill-trigger-cases.test.ts +0 -6
  119. package/package.json +3 -1
  120. package/presets/acm-sigconf.md +1 -1
  121. package/presets/agenticdev.jsonc +5 -2
  122. package/presets/agenticdev.md +4 -2
  123. package/presets/aidc.jsonc +14 -1
  124. package/presets/aidc.md +3 -2
  125. package/presets/aisec.jsonc +9 -3
  126. package/presets/aisec.md +4 -1
  127. package/presets/ase.jsonc +145 -0
  128. package/presets/ase.md +178 -0
  129. package/presets/ccs.jsonc +87 -0
  130. package/presets/ccs.md +184 -0
  131. package/presets/icse.jsonc +100 -0
  132. package/presets/icse.md +126 -0
  133. package/presets/ieee-conference.md +1 -1
  134. package/presets/sp.jsonc +152 -0
  135. package/presets/sp.md +160 -0
  136. package/presets/venue-profile.schema.json +22 -3
  137. package/scripts/harness-api.frozen.json +0 -4
  138. package/scripts/pipeline.ts +481 -0
  139. package/skills/CLAUDE.md +2 -2
  140. package/skills/CLAUDE.md.spec.ts +26 -1
  141. package/skills/analyze-sibling-paper/SKILL.md +2 -20
  142. package/skills/analyze-sibling-paper/SKILL.md.spec.ts +9 -19
  143. package/skills/argument-arc/SKILL.md +32 -18
  144. package/skills/argument-arc/SKILL.md.spec.ts +43 -17
  145. package/skills/argument-arc/scripts/headings-core.js +46 -0
  146. package/skills/argument-arc/scripts/headings-core.ts +65 -0
  147. package/skills/argument-arc/scripts/headings.js +15 -0
  148. package/skills/argument-arc/scripts/headings.test.ts +105 -0
  149. package/skills/argument-arc/scripts/headings.ts +20 -0
  150. package/skills/build-benchmark/SKILL.md +1 -12
  151. package/skills/build-benchmark/SKILL.md.spec.ts +15 -11
  152. package/skills/build-label-page/SKILL.md.spec.ts +11 -0
  153. package/skills/camera-ready/SKILL.md +1 -8
  154. package/skills/camera-ready/SKILL.md.spec.ts +8 -7
  155. package/skills/cold-read-diff/SKILL.md +36 -25
  156. package/skills/cold-read-diff/SKILL.md.spec.ts +44 -24
  157. package/skills/cold-read-diff/scripts/cold-read-core.js +63 -6
  158. package/skills/cold-read-diff/scripts/cold-read-core.ts +81 -6
  159. package/skills/cold-read-diff/scripts/cold-read.js +1 -1
  160. package/skills/cold-read-diff/scripts/cold-read.test.ts +66 -0
  161. package/skills/cold-read-diff/scripts/cold-read.ts +1 -1
  162. package/skills/cold-read-diff/scripts/readers.js +2 -1
  163. package/skills/cold-read-diff/scripts/readers.ts +2 -1
  164. package/skills/draft-paper/SKILL.md +16 -29
  165. package/skills/draft-paper/SKILL.md.spec.ts +27 -28
  166. package/skills/extend-paper/SKILL.md +7 -16
  167. package/skills/extend-paper/SKILL.md.spec.ts +18 -15
  168. package/skills/find-venue/SKILL.md +11 -24
  169. package/skills/find-venue/SKILL.md.spec.ts +19 -23
  170. package/skills/harden-paper/SKILL.md +62 -290
  171. package/skills/harden-paper/SKILL.md.spec.ts +82 -304
  172. package/skills/harden-paper/harden-paper.harness.mjs +1 -2
  173. package/skills/jobs.ts +25 -0
  174. package/skills/label-agent-runs/SKILL.md.spec.ts +10 -0
  175. package/skills/map-prior-work/SKILL.md +5 -4
  176. package/skills/map-prior-work/SKILL.md.spec.ts +13 -3
  177. package/skills/paper-pipeline/SKILL.md +80 -278
  178. package/skills/paper-pipeline/SKILL.md.spec.ts +130 -276
  179. package/skills/paper-pipeline/description-language.eval.mjs +0 -22
  180. package/skills/paper-pipeline/framing-vs-vocabulary.eval.mjs +0 -29
  181. package/skills/paper-pipeline/paper-pipeline.harness.mjs +0 -16
  182. package/skills/paper-pipeline/pipeline-firing.eval.mjs +7 -29
  183. package/skills/paper-pipeline/pipeline-language.eval.mjs +0 -52
  184. package/skills/paper-pipeline/references/artifact-checklist.md +6 -1
  185. package/skills/paper-pipeline/references/body-vs-appendix.md +3 -4
  186. package/skills/paper-pipeline/references/pipeline-status-template.md +8 -10
  187. package/skills/paper-pipeline/references/review-ratchet.md +4 -7
  188. package/skills/paper-pipeline/references/venue-bar.md +1 -2
  189. package/skills/paper-pipeline/references/writing-craft.md +21 -281
  190. package/skills/paper-status/SKILL.md +17 -20
  191. package/skills/paper-status/SKILL.md.spec.ts +23 -19
  192. package/skills/pc-panel-review/SKILL.md +66 -93
  193. package/skills/pc-panel-review/SKILL.md.spec.ts +75 -92
  194. package/skills/plan-paper-timeline/SKILL.md +7 -29
  195. package/skills/plan-paper-timeline/SKILL.md.spec.ts +16 -28
  196. package/skills/plan-paper-timeline/plan-paper-timeline.effects.harness.mjs +2 -2
  197. package/skills/render-paper/check-render.sh +2 -2
  198. package/skills/render-paper/render-paper.harness.mjs +4 -20
  199. package/skills/research-ideate/SKILL.md +15 -32
  200. package/skills/research-ideate/SKILL.md.spec.ts +25 -31
  201. package/skills/rewrite-unclear/SKILL.md +15 -14
  202. package/skills/rewrite-unclear/SKILL.md.spec.ts +24 -15
  203. package/skills/rewrite-unclear/rewrite-unclear.eval.ts +2 -3
  204. package/skills/run-agent-grid/SKILL.md +3 -3
  205. package/skills/run-agent-grid/SKILL.md.spec.ts +10 -2
  206. package/skills/study-accepted-papers/SKILL.md +5 -5
  207. package/skills/study-accepted-papers/SKILL.md.spec.ts +27 -4
  208. package/skills/submit-paper/SKILL.md +37 -31
  209. package/skills/submit-paper/SKILL.md.spec.ts +46 -30
  210. package/skills/submit-paper/check-deanon.sh +1 -1
  211. package/skills/tighten-paper/SKILL.md +43 -68
  212. package/skills/tighten-paper/SKILL.md.spec.ts +51 -67
  213. package/skills/verify-citations/SKILL.md +18 -112
  214. package/skills/verify-citations/SKILL.md.spec.ts +27 -114
  215. package/src/adapters/latex/abstract.test.ts +42 -0
  216. package/src/adapters/latex/abstract.ts +23 -6
  217. package/src/adapters/latex/captions.test.ts +36 -38
  218. package/src/adapters/latex/captions.ts +16 -33
  219. package/src/adapters/latex/index.test.ts +11 -0
  220. package/src/adapters/latex/index.ts +5 -2
  221. package/src/adapters/latex/prose.ts +23 -11
  222. package/src/cli.ts +26 -5
  223. package/src/domain/register.test.ts +65 -0
  224. package/src/domain/register.ts +72 -16
  225. package/src/domain/term-definitions.test.ts +240 -0
  226. package/src/domain/term-definitions.ts +329 -0
  227. package/src/domain/tex-document.ts +12 -0
  228. package/src/domain/venue-name.test.ts +4 -4
  229. package/src/folder-venue-rule.test.ts +23 -2
  230. package/src/folder-venue-rule.ts +8 -8
  231. package/src/hooks-notice.test.ts +127 -0
  232. package/src/hooks-notice.ts +50 -10
  233. package/src/link-skills.ts +9 -0
  234. package/src/new-paper.test.ts +2 -2
  235. package/src/paper-settings-commands.test.ts +1 -1
  236. package/src/ports/latex.ts +11 -0
  237. package/src/preset-card-rule.test.ts +4 -0
  238. package/src/presets.test.ts +141 -4
  239. package/src/presets.ts +113 -22
  240. package/src/readability.test.ts +92 -0
  241. package/src/readability.ts +113 -5
  242. package/src/register-bands.test.ts +81 -1
  243. package/src/register-bands.ts +88 -23
  244. package/src/rule-cases.test.ts +122 -2
  245. package/src/term-definition-rules.test.ts +150 -0
  246. package/src/term-definition-rules.ts +189 -0
  247. package/src/tex-paper.test.ts +18 -1
  248. package/src/tex-paper.ts +11 -0
  249. package/src/tex-requirements.ts +15 -0
  250. package/src/tex-venue-rules.test.ts +45 -1
  251. package/src/tex-venue-rules.ts +8 -3
  252. package/src/venue-rules.test.ts +2 -2
  253. package/templates/paper/PIPELINE-STATUS.md +19 -19
  254. package/dist/paper-prose.d.ts +0 -17
  255. package/dist/paper-prose.d.ts.map +0 -1
  256. package/dist/paper-prose.js +0 -46
  257. package/dist/paper-prose.js.map +0 -1
  258. package/skills/grade-paper-writing/SKILL.md +0 -494
  259. package/skills/grade-paper-writing/SKILL.md.spec.ts +0 -501
  260. package/skills/grade-paper-writing/__snapshots__/prose-lint.test.ts.snap +0 -84
  261. package/skills/grade-paper-writing/fixtures/control_gopen.txt +0 -1
  262. package/skills/grade-paper-writing/fixtures/control_human_paper.txt +0 -1
  263. package/skills/grade-paper-writing/fixtures/rewrite.txt +0 -1
  264. package/skills/grade-paper-writing/fixtures/specimen.txt +0 -1
  265. package/skills/grade-paper-writing/fixtures/structure-checks.md +0 -22
  266. package/skills/grade-paper-writing/grade-paper-writing.eval.mjs +0 -19
  267. package/skills/grade-paper-writing/grade-paper-writing.harness.mjs +0 -23
  268. package/skills/grade-paper-writing/prose-lint.mjs +0 -602
  269. package/skills/grade-paper-writing/prose-lint.test.ts +0 -413
  270. package/skills/osf-artifact-upload/SKILL.md +0 -58
  271. package/skills/osf-artifact-upload/SKILL.md.spec.ts +0 -65
  272. package/skills/osf-artifact-upload/osf-artifact-upload.eval.mjs +0 -22
  273. package/skills/osf-artifact-upload/osf-artifact-upload.harness.ts +0 -102
  274. package/skills/paper-adversarial-review/SKILL.md +0 -100
  275. package/skills/paper-adversarial-review/SKILL.md.spec.ts +0 -107
  276. package/skills/paper-adversarial-review/paper-adversarial-review.eval.mjs +0 -19
  277. package/skills/paper-adversarial-review/paper-adversarial-review.harness.mjs +0 -24
  278. package/skills/paper-pipeline/grade-paper-writing-ablation.eval.mjs +0 -1274
  279. package/skills/paper-pipeline/references/credit-criteria.md +0 -69
  280. package/skills/paper-pipeline/references/occupancy-2026-08-06-probe/README.md +0 -35
  281. package/skills/paper-pipeline/references/occupancy-2026-08-06-probe/run_retext.mjs +0 -24
  282. package/skills/paper-pipeline/references/occupancy-2026-08-06-probe/sentences.txt +0 -11
  283. package/skills/paper-pipeline/references/occupancy-2026-08-06-probe/test_sentences.py +0 -25
  284. package/skills/paper-pipeline/references/occupancy-2026-08-06-prose-checkers.md +0 -538
  285. package/skills/paper-pipeline/references/occupancy-2026-08-06-reproducible-tooling.md +0 -431
  286. package/skills/paper-pipeline/references/occupancy-2026-08-06-staleness-and-orchestration.md +0 -592
  287. package/skills/paper-pipeline/repro/2026-08-08-parent-replication.mjs +0 -92
  288. package/skills/render-paper/SKILL.md +0 -123
  289. package/skills/render-paper/SKILL.md.spec.ts +0 -130
  290. package/skills/render-paper/render-paper.eval.mjs +0 -19
  291. package/skills/submission-portal/SKILL.md +0 -129
  292. package/skills/submission-portal/SKILL.md.spec.ts +0 -134
  293. package/skills/submission-portal/submission-portal.eval.mjs +0 -15
  294. package/skills/submission-portal/submission-portal.test.ts +0 -12
  295. package/skills/sweep-design-space/SKILL.md +0 -232
  296. package/skills/sweep-design-space/SKILL.md.spec.ts +0 -248
  297. package/skills/sweep-design-space/sweep-design-space.eval.mjs +0 -19
  298. package/skills/sweep-design-space/sweep-design-space.harness.mjs +0 -23
  299. package/src/paper-prose.test.ts +0 -78
  300. package/src/paper-prose.ts +0 -67
@@ -0,0 +1,189 @@
1
+ /**
2
+ * A TERM AGAINST ITS DEFINITION — two rules of the `tex` plugin over the body, off by default:
3
+ *
4
+ * tex/term-before-definition a term the body defines (an `\emph` phrase, by default) is used
5
+ * before that definition: reported once, at the first earlier use
6
+ * tex/term-defined-twice a term is set as a definition again: reported at each later one
7
+ *
8
+ * Two rules, not one: an author may keep an introduction's gloss and a Method paragraph that both
9
+ * define a word, and still want to know where a word comes before its meaning. What a definition
10
+ * and a use are is `src/domain/term-definitions.ts`.
11
+ *
12
+ * ── OFF BY DEFAULT ───────────────────────────────────────────────────────────────
13
+ * The rules are right only for a paper that marks its definitions with the commands they read.
14
+ * On 113 papers by other authors, most italic phrases stress a word or label an item, and the rules
15
+ * report something in 52 of them; the measurement is on the rules' pages. A project that follows
16
+ * the convention turns them on.
17
+ *
18
+ * ── WHAT THEY READ ───────────────────────────────────────────────────────────────
19
+ * `paper.tex` with its includes spliced (`readPaper`), through the `LatexReader` port: the phrases
20
+ * emphasised in the body (`bodyEmphasis`), its sentences (`bodyProse`), and where the abstract is.
21
+ */
22
+ import { hasAtLeast, isNumber, isString } from "remeda";
23
+ import type { BodySentence } from "./domain/register.ts";
24
+ import { bodySentences } from "./domain/register.ts";
25
+ import { fieldOf } from "./domain/record.ts";
26
+ import {
27
+ DEFAULT_TERM_OPTIONS,
28
+ definedAgain,
29
+ definitionsOf,
30
+ EMPHASIS_COMMANDS,
31
+ usedBefore,
32
+ type Definition,
33
+ type TermOptions,
34
+ } from "./domain/term-definitions.ts";
35
+ import type { PaperSource } from "./domain/paper-source.ts";
36
+ import type { Span } from "./domain/tex-document.ts";
37
+ import { startOf } from "./register.ts";
38
+ import {
39
+ readPaper,
40
+ reportInPaper,
41
+ whereIn,
42
+ type ProseDeps,
43
+ } from "./tex-paper.ts";
44
+ import {
45
+ ruleDocsUrl,
46
+ type Located,
47
+ type TexRuleContext,
48
+ type TexRuleModule,
49
+ } from "./tex-venue-rules.ts";
50
+
51
+ export type TermRuleName = "term-before-definition" | "term-defined-twice";
52
+
53
+ const MESSAGES = {
54
+ before:
55
+ "«{{term}}» is used here before its definition (\\{{command}} at {{where}}; {{count}} earlier use(s) outside the abstract). Move the definition to this first use, or say here in plain words what it means.",
56
+ again:
57
+ "«{{term}}» is set as a definition again; it was first defined at {{where}}. Keep one definition and set later mentions in roman, or point back to the first one.",
58
+ none: "this rule is on, and no term in the body is set with {{commands}}: it checks nothing in this paper. Mark each definition with \\{{first}}, or turn the rule off.",
59
+ };
60
+
61
+ const SCHEMA = [
62
+ {
63
+ type: "object",
64
+ properties: {
65
+ commands: {
66
+ type: "array",
67
+ items: { enum: EMPHASIS_COMMANDS },
68
+ minItems: 1,
69
+ uniqueItems: true,
70
+ },
71
+ maxWords: { type: "integer", minimum: 1 },
72
+ },
73
+ additionalProperties: false,
74
+ },
75
+ ];
76
+
77
+ /** The options the config sets, the defaults for the rest: ESLint has validated them against the schema. */
78
+ export function termOptionsOf(
79
+ options: readonly unknown[] | undefined,
80
+ ): TermOptions {
81
+ const o = options?.[0];
82
+ const listed = fieldOf(o, "commands");
83
+ const commands = Array.isArray(listed) ? listed.filter(isString) : [];
84
+ const maxWords = fieldOf(o, "maxWords");
85
+ return {
86
+ commands: hasAtLeast(commands, 1)
87
+ ? commands
88
+ : DEFAULT_TERM_OPTIONS.commands,
89
+ maxWords: isNumber(maxWords) ? maxWords : DEFAULT_TERM_OPTIONS.maxWords,
90
+ };
91
+ }
92
+
93
+ /** The body as both rules read it: its definitions, its sentences, the abstract, where it starts. */
94
+ interface Read {
95
+ readonly paper: PaperSource;
96
+ readonly opts: TermOptions;
97
+ readonly defs: readonly Definition[];
98
+ readonly sentences: readonly BodySentence[];
99
+ readonly abstract: Span | null;
100
+ readonly start: Span | null;
101
+ }
102
+
103
+ function readBody(context: TexRuleContext, deps: ProseDeps): Read {
104
+ const sc = context.sourceCode;
105
+ const paper = readPaper(context.filename, sc.raw ?? sc.text, deps);
106
+ const opts = termOptionsOf(context.options);
107
+ const abstract = deps.latex.abstractSpan(paper.text);
108
+ const passages = deps.latex.bodyProse(paper.text);
109
+ const [first] = passages;
110
+ return {
111
+ paper,
112
+ opts,
113
+ defs: definitionsOf(deps.latex.bodyEmphasis(paper.text), opts, abstract),
114
+ sentences: bodySentences(passages),
115
+ abstract,
116
+ start: first === undefined ? null : startOf(first),
117
+ };
118
+ }
119
+
120
+ /** `tex/term-before-definition`'s findings: each term at its first earlier use, or that it checks nothing. */
121
+ export function judgeBefore(r: Read): readonly Located[] {
122
+ if (r.defs.length === 0)
123
+ return [
124
+ {
125
+ messageId: "none",
126
+ data: {
127
+ commands: r.opts.commands.map((c) => `\\${c}`).join(", "),
128
+ first: r.opts.commands[0],
129
+ },
130
+ at: r.start,
131
+ },
132
+ ];
133
+ return usedBefore(r.defs, r.sentences, r.abstract).map((u) => ({
134
+ messageId: "before",
135
+ data: {
136
+ term: u.term,
137
+ command: u.definition.command,
138
+ where: whereIn(r.paper, u.definition.span),
139
+ count: u.count,
140
+ },
141
+ at: u.firstUse,
142
+ }));
143
+ }
144
+
145
+ /** `tex/term-defined-twice`'s findings: each later definition, against the first. */
146
+ export const judgeAgain = (r: Read): readonly Located[] =>
147
+ definedAgain(r.defs).map((d) => ({
148
+ messageId: "again",
149
+ data: { term: d.again.text, where: whereIn(r.paper, d.first.span) },
150
+ at: d.again.span,
151
+ }));
152
+
153
+ const DESCRIPTIONS: Readonly<Record<TermRuleName, string>> = {
154
+ "term-before-definition":
155
+ "a term the body defines (an \\emph phrase, by default) is not used before that definition. Off until a project turns it on",
156
+ "term-defined-twice":
157
+ "a term the body defines is set as a definition once. Off until a project turns it on",
158
+ };
159
+
160
+ const JUDGES: Readonly<Record<TermRuleName, (r: Read) => readonly Located[]>> =
161
+ {
162
+ "term-before-definition": judgeBefore,
163
+ "term-defined-twice": judgeAgain,
164
+ };
165
+
166
+ const rule = (name: TermRuleName, deps: ProseDeps): TexRuleModule => ({
167
+ meta: {
168
+ type: "suggestion",
169
+ docs: { description: DESCRIPTIONS[name], url: ruleDocsUrl(name) },
170
+ schema: SCHEMA,
171
+ messages: MESSAGES,
172
+ },
173
+ create(context) {
174
+ return {
175
+ root() {
176
+ const r = readBody(context, deps);
177
+ reportInPaper(context, MESSAGES, r.paper, JUDGES[name](r));
178
+ },
179
+ };
180
+ },
181
+ });
182
+
183
+ /** The two rules, as rules of the `tex` plugin. Not on in any default config. */
184
+ export const termDefinitionRules = (
185
+ deps: ProseDeps,
186
+ ): Readonly<Record<TermRuleName, TexRuleModule>> => ({
187
+ "term-before-definition": rule("term-before-definition", deps),
188
+ "term-defined-twice": rule("term-defined-twice", deps),
189
+ });
@@ -10,7 +10,7 @@ import { memoryFiles } from "./adapters/memory/index.ts";
10
10
  import { sourcesCodec } from "./adapters/sources-record/index.ts";
11
11
  import { join } from "node:path";
12
12
  import { texInputsDir } from "./package-dirs.ts";
13
- import { readPaper, reportInPaper } from "./tex-paper.ts";
13
+ import { readPaper, reportInPaper, whereIn } from "./tex-paper.ts";
14
14
  import {
15
15
  builtFixture,
16
16
  builtPaper,
@@ -216,3 +216,20 @@ describe("readPaper — how an include names its file", () => {
216
216
  expect(readPaper(MAIN, textOf(files), proseDeps(files)).text).toBe("xI\ny");
217
217
  });
218
218
  });
219
+
220
+ describe("whereIn — where a span of the paper stands, as an author looks for it", () => {
221
+ it("🔴 the main file and its line, or the included file and its own line; outside the text, the main file", () => {
222
+ // p1: paper.tex line 12 cites the inline entry; sections/intro.tex line 2 releases the harness.
223
+ const files = builtFixture("p1", "/p");
224
+ const p = readPaper(MAIN, textOf(files), proseDeps(files));
225
+ const at = (needle: string) => {
226
+ const start = p.text.indexOf(needle);
227
+ return { start, end: start + needle.length };
228
+ };
229
+ expect([
230
+ whereIn(p, at("We cite the inline entry")),
231
+ whereIn(p, at("We release the harness")),
232
+ whereIn(p, { start: p.text.length + 5, end: p.text.length + 6 }),
233
+ ]).toEqual(["paper.tex:12", "sections/intro.tex:2", "paper.tex"]);
234
+ });
235
+ });
package/src/tex-paper.ts CHANGED
@@ -75,6 +75,17 @@ export function lineColumn(text: string, at: number): string {
75
75
  return `${String(line)}:${String(column)}`;
76
76
  }
77
77
 
78
+ /**
79
+ * Where a span of the assembled text stands, as an author looks for it: `paper.tex:151`, or the
80
+ * included file and its line (`sections/intro.tex:12`). A span outside the text names the main file.
81
+ */
82
+ export function whereIn(paper: PaperSource, at: Span): string {
83
+ const o = originOf(paper, at);
84
+ return o === null
85
+ ? paper.main
86
+ : `${o.file}:${String(o.source.slice(0, o.span.start).split("\n").length)}`;
87
+ }
88
+
78
89
  /** A message template with its data filled in, the way ESLint fills it. */
79
90
  const filled = (
80
91
  template: string,
@@ -205,6 +205,8 @@ export interface PresetFile {
205
205
  readonly identity: PresetIdentity;
206
206
  /** The preset this one builds on: `paperlint:<name>` or a relative path. */
207
207
  readonly extends: string | null;
208
+ /** The conference a workshop is held at, spelled as `extends` is; null when the file names none. */
209
+ readonly parent: string | null;
208
210
  /** The `\\documentclass` the venue's template uses, as the file spells it; null when it names none. */
209
211
  readonly template: string | null;
210
212
  /** Class options the venue forbids, read with `template`; empty when the file names none. */
@@ -283,6 +285,7 @@ type PresetJson = PresetBodyJson &
283
285
  /** Every key of a preset but its identity. */
284
286
  interface PresetBodyJson {
285
287
  readonly extends?: string;
288
+ readonly parent?: string;
286
289
  readonly template?: string;
287
290
  readonly template_forbids?: readonly string[];
288
291
  readonly aliases?: readonly string[];
@@ -301,6 +304,9 @@ interface PresetBodyJson {
301
304
  readonly anchors: readonly ({
302
305
  readonly paper: string;
303
306
  readonly words: number;
307
+ /** The schema requires both or neither. */
308
+ readonly sentences?: number;
309
+ readonly negated_sentences?: number;
304
310
  } & Readonly<Record<RegisterMeasureName, number>>)[];
305
311
  };
306
312
  readonly talk?: VenueTalkJson;
@@ -474,6 +480,14 @@ const anchorsOf = (
474
480
  claim_emphasis: a.claim_emphasis,
475
481
  relation_markers: a.relation_markers,
476
482
  },
483
+ ...(a.sentences === undefined || a.negated_sentences === undefined
484
+ ? {}
485
+ : {
486
+ negation: {
487
+ sentences: a.sentences,
488
+ negated: a.negated_sentences,
489
+ },
490
+ }),
477
491
  }));
478
492
 
479
493
  /** A preset's `portal`, or null when it names none. */
@@ -539,6 +553,7 @@ export function parsePreset(
539
553
  return {
540
554
  identity: identityOf(j),
541
555
  extends: orNull(j.extends),
556
+ parent: orNull(j.parent),
542
557
  template: orNull(j.template),
543
558
  templateForbids: j.template_forbids ?? [],
544
559
  aliases: j.aliases ?? [],
@@ -758,7 +758,7 @@ describe("tex/venue-leftover — another venue named in the text", () => {
758
758
  const fs = leftovers(lint(tex, AIDC));
759
759
  expect(fs.map((f) => f.message)).toEqual([
760
760
  "«AISec» names AISec, and this paper extends AIDC — a leftover from an earlier submission? A reviewer reads it before the abstract. Comments and citation keys are not reported; a sentence that names the other venue on purpose can keep it with a disable directive",
761
- expect.stringContaining("«ACM CCS» names AISec"),
761
+ expect.stringContaining("«ACM CCS» names ACM CCS"),
762
762
  ]);
763
763
  const line = tex.split("\n").indexOf(INSTITUTION) + 1;
764
764
  expect(fs.map((f) => f.line)).toEqual([line, line]);
@@ -797,6 +797,46 @@ describe("tex/venue-leftover — another venue named in the text", () => {
797
797
  });
798
798
  });
799
799
 
800
+ describe("tex/venue-leftover — a workshop's parent conference (`parent`) is the paper's own", () => {
801
+ const agenticdev = (text: string) =>
802
+ paper("\\documentclass[sigconf]{acmart}", `${text}\nText.`);
803
+ const AGENTICDEV = { extends: "paperlint:agenticdev", kind: "full" };
804
+ const named = (fs: readonly Finding[]) =>
805
+ leftovers(fs).map((f) => /«(.*?)» names (.*?),/u.exec(f.message)?.slice(1));
806
+
807
+ it("an AgenticDev paper may name ASE 2026, the conference it is held at: silent", () => {
808
+ expect(
809
+ leftovers(lint(agenticdev("A workshop of ASE 2026."), AGENTICDEV)),
810
+ ).toEqual([]);
811
+ });
812
+
813
+ it("🔴 an AIDC paper naming ASE 2026 is reported once, as ASE", () => {
814
+ const tex = aidcPaper(`Formerly at ASE 2026.\n${BODY}${STATEMENT}`);
815
+ expect(named(lint(tex, AIDC))).toEqual([["ASE", "ASE"]]);
816
+ });
817
+
818
+ it("🔴 an AIDC paper naming ACM CCS 2026 is reported once, as ACM CCS; an AISec paper is silent", () => {
819
+ const text = "Co-located with ACM CCS 2026.";
820
+ expect(
821
+ named(lint(aidcPaper(`${text}\n${BODY}${STATEMENT}`), AIDC)),
822
+ ).toEqual([["ACM CCS", "ACM CCS"]]);
823
+ expect(
824
+ leftovers(
825
+ lint(agenticdev(text), {
826
+ extends: "paperlint:aisec",
827
+ kind: "research",
828
+ }),
829
+ ),
830
+ ).toEqual([]);
831
+ });
832
+
833
+ it("the parent's names are the paper's own, not the workshop's: AgenticDev still reports AISec", () => {
834
+ expect(
835
+ named(lint(agenticdev("ASE 2026, after AISec."), AGENTICDEV)),
836
+ ).toEqual([["AISec", "AISec"]]);
837
+ });
838
+ });
839
+
800
840
  describe("tex/venue-leftover — MSR, a name that is also an acronym, counts only with a year (`mentions`)", () => {
801
841
  const under = (text: string) =>
802
842
  leftovers(lint(aidcPaper(`${text}\n${BODY}${STATEMENT}`), AIDC));
@@ -1002,8 +1042,12 @@ describe("otherVenues", () => {
1002
1042
  "AgenticDev",
1003
1043
  "AGENTVERIFY",
1004
1044
  "AISec",
1045
+ "ASE",
1046
+ "ACM CCS",
1047
+ "ICSE 2028",
1005
1048
  "MSR",
1006
1049
  "NLBSE",
1050
+ "IEEE S&P",
1007
1051
  ]);
1008
1052
  });
1009
1053
  });
@@ -286,14 +286,15 @@ const literal = (s: string): string =>
286
286
 
287
287
  /**
288
288
  * Each place the rendered text names another venue — one of its aliases as a whole word, case
289
- * and all — unless that alias is also this paper's venue's own (a shared parent conference).
289
+ * and all — unless that alias is also this paper's venue's own, or its parent conference's
290
+ * (`parentNames`: an AgenticDev paper may say «ASE 2026»).
290
291
  */
291
292
  export function judgeLeftover(
292
293
  runs: readonly TextRun[],
293
294
  preset: Preset,
294
295
  others: readonly OtherVenue[],
295
296
  ): readonly Located[] {
296
- const own = new Set(preset.aliases);
297
+ const own = new Set([...preset.aliases, ...preset.parentNames]);
297
298
  const names = others.flatMap((o) =>
298
299
  o.aliases
299
300
  .filter((a) => !own.has(a))
@@ -325,10 +326,14 @@ export const ruleDocsUrl = (
325
326
  | "contrast-frames"
326
327
  | "claim-emphasis"
327
328
  | "relation-markers"
329
+ | "negated-sentences"
328
330
  | "heading-case"
329
331
  | "max-paragraph-words"
330
332
  | "max-paragraph-numbers"
331
- | "max-sentence-words",
333
+ | "max-sentence-words"
334
+ | "max-caption-words"
335
+ | "term-before-definition"
336
+ | "term-defined-twice",
332
337
  ): string =>
333
338
  `https://github.com/zernie/paperlint/blob/main/docs/rules/tex/${name}.md`;
334
339
 
@@ -271,13 +271,13 @@ describe("pdf/profile — the declaration must resolve, or nothing is judged", (
271
271
  "an unknown venue (a typo would silently disable every check)",
272
272
  { extends: "paperlint:agentic-dev", kind: "short" },
273
273
  "preset",
274
- /agent, agenticdev, agentverify, aidc, aisec, ieee-conference, msr, nlbse, realm/,
274
+ /agent, agenticdev, agentverify, aidc, aisec, ase, ccs, icse, ieee-conference, msr, nlbse, realm, sp/,
275
275
  ],
276
276
  [
277
277
  "the base TeX set is not a venue",
278
278
  { extends: "paperlint:tex-base" },
279
279
  "preset",
280
- /agent, agenticdev, agentverify, aidc, aisec, ieee-conference, msr, nlbse, realm/,
280
+ /agent, agenticdev, agentverify, aidc, aisec, ase, ccs, icse, ieee-conference, msr, nlbse, realm, sp/,
281
281
  ],
282
282
  [
283
283
  "paperlint.json that is not JSON",
@@ -13,7 +13,7 @@ Updated: <ISO>
13
13
  **Readiness verdict:** <one line — submit-ready? if not, the WORST failing gate first. Any failing
14
14
  gate caps "ready"; an accept probability alone is not a verdict.>
15
15
 
16
- **Gates at a glance (worst first — mark any failing gate ✗):** readability(persona stalls) <density/verdict> · structure(tighten-paper) <verdict> · claims-honest(claims) <clean?> · defects(panel) <accept-prob/decision> · writing <NN/60> · content(strong-accept scorecard) <run?/mode>
16
+ **Gates at a glance (worst first — mark any failing gate ✗):** readability(cold-read-diff, whole paper) <verdict> · structure(tighten-paper) <verdict> · claims-honest(claims) <clean?> · defects(panel) <accept-prob/decision> · content(strong-accept scorecard) <run?/mode>
17
17
 
18
18
  ## Plan / now
19
19
 
@@ -71,28 +71,28 @@ Status: `pass` · `partial` · `fail` · `—` (not scored). A `fail` names an o
71
71
 
72
72
  ### CONTINUOUS
73
73
 
74
- Date = when it last ran. If that predates the current text, the pass is stale — the checker says so.
74
+ Date = when it last ran. Each row fires on its own trigger, not on an edit of the text.
75
75
 
76
- | id | Trigger | Skill | Status | Date | Result | Open |
77
- | ---------- | --------------------- | ------------------------- | ------ | ---- | --------------------- | --------- |
78
- | cites | any \cite added/moved | verify-citations | ☐ | — | — | — |
79
- | siblings | a sibling surfaces | analyze-sibling-paper | ☐ | — | — | siblings/ |
80
- | priordelta | framing moved | map-prior-work (delta) | ☐ | — | — | — |
81
- | render | any source edit | render-paper + page count | ☐ | — | <N> pages / limit <M> | — |
76
+ | id | Trigger | Skill | Status | Date | Result | Open |
77
+ | ---------- | --------------------- | ----------------------- | ------ | ---- | --------------------- | --------- |
78
+ | cites | any \cite added/moved | verify-citations | ☐ | — | — | — |
79
+ | siblings | a sibling surfaces | analyze-sibling-paper | ☐ | — | — | siblings/ |
80
+ | priordelta | framing moved | map-prior-work (delta) | ☐ | — | — | — |
81
+ | render | any source edit | paperlint build + pages | ☐ | — | <N> pages / limit <M> | — |
82
82
 
83
83
  ### GATES
84
84
 
85
- | id | Gate | Skill | Requires | Status | Date | Result | Open |
86
- | --------- | ------------------ | ------------------- | -------------------------------------------- | ------ | ---- | ------ | ---- |
87
- | structure | Structure | tighten-paper | render, arc | ☐ | — | — | — |
88
- | writing | Writing craft | grade-paper-writing | draft, arc, structure | ☐ | — | — | — |
89
- | panel | Review decision | pc-panel-review | structure, writing | ☐ | — | — | — |
90
- | claims | Claim preservation | Fable diff | draft, writing | ☐ | — | — | — |
91
- | harden | Harden (all axes) | harden-paper | panel, structure, writing, cites, priordelta | ☐ | — | — | — |
92
- | submit | Submit | submit-paper | harden, access | ☐ | — | — | — |
93
-
94
- **Harden sub-axes** (`harden` is an orchestrator — track its axes so `◐` is legible):
95
- structure(=structure) ☐ · threat-model ☐ · ethics/dual-use ☐ · page/word-fit ☐ · de-anon hygiene ☐ · citability ☐ · artifact-runs-clean ☐ · writing(=writing) ☐
85
+ | id | Gate | Skill | Requires | Status | Date | Result | Open |
86
+ | --------- | ----------------------- | --------------- | ------------------------ | ------ | ---- | ------ | ---- |
87
+ | structure | Structure | tighten-paper | render, arc | ☐ | — | — | — |
88
+ | coldread | Cold read (whole paper) | cold-read-diff | draft, arc, structure | ☐ | — | — | — |
89
+ | panel | Review decision | pc-panel-review | structure, coldread | ☐ | — | — | — |
90
+ | claims | Claim preservation | Fable diff | draft, coldread | ☐ | — | — | — |
91
+ | harden | Submit checklist | harden-paper | panel, cites, priordelta | ☐ | — | — | — |
92
+ | submit | Submit | submit-paper | harden, access | ☐ | — | — | — |
93
+
94
+ **Harden checklist items** (track them so `◐` is legible):
95
+ lint ☐ · final review closed ☐ · citations and siblings ☐ · claims ☐ · threat model and ethics ☐ · artifact and numbers ☐ · headline table ☐ · anonymity beyond the PDF ☐
96
96
 
97
97
  ### AFTER
98
98
 
@@ -1,17 +0,0 @@
1
- import { type ProseDeps } 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: ProseDeps): PaperProse;
17
- //# sourceMappingURL=paper-prose.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,46 +0,0 @@
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
@@ -1 +0,0 @@
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,KAAK,CAAC;KAC3B,UAAU,CAAC,SAAS,EAAE,GAAG,CAAC;KAC1B,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC;KACpB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;KACrB,IAAI,EAAE,CAAC;AAaZ,iGAAiG;AACjG,MAAM,UAAU,UAAU,CACxB,QAAgB,EAChB,GAAW,EACX,IAAe;IAEf,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IAC1D,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK;SACxB,SAAS,CAAC,IAAI,CAAC;SACf,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACT,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;SACf,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;SAC3B,IAAI,CAAC,GAAG,CAAC,CACb;SACA,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;IAC3B,OAAO;QACL,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;QAC3B,QAAQ,EAAE,IAAI,CAAC,KAAK;aACjB,QAAQ,CAAC,IAAI,CAAC;aACd,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,IAAI,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC;aACrE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QAC3D,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,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"}