paperlint 13.0.3 → 13.2.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 (114) hide show
  1. package/CLAUDE.md +9 -1
  2. package/dist/adapters/git/index.d.ts.map +1 -1
  3. package/dist/adapters/git/index.js +13 -0
  4. package/dist/adapters/git/index.js.map +1 -1
  5. package/dist/adapters/study-registry/index.d.ts +142 -1
  6. package/dist/adapters/study-registry/index.d.ts.map +1 -1
  7. package/dist/adapters/study-registry/index.js +160 -1
  8. package/dist/adapters/study-registry/index.js.map +1 -1
  9. package/dist/cli.d.ts.map +1 -1
  10. package/dist/cli.js +3 -0
  11. package/dist/cli.js.map +1 -1
  12. package/dist/domain/decide-first.d.ts +43 -0
  13. package/dist/domain/decide-first.d.ts.map +1 -1
  14. package/dist/domain/decide-first.js +45 -2
  15. package/dist/domain/decide-first.js.map +1 -1
  16. package/dist/domain/study-gates.d.ts +96 -0
  17. package/dist/domain/study-gates.d.ts.map +1 -0
  18. package/dist/domain/study-gates.js +56 -0
  19. package/dist/domain/study-gates.js.map +1 -0
  20. package/dist/domain/study-mode.d.ts +6 -0
  21. package/dist/domain/study-mode.d.ts.map +1 -1
  22. package/dist/domain/study-mode.js.map +1 -1
  23. package/dist/domain/study-registry.d.ts +24 -4
  24. package/dist/domain/study-registry.d.ts.map +1 -1
  25. package/dist/domain/study-registry.js +39 -2
  26. package/dist/domain/study-registry.js.map +1 -1
  27. package/dist/domain/study-result.d.ts +151 -0
  28. package/dist/domain/study-result.d.ts.map +1 -0
  29. package/dist/domain/study-result.js +175 -0
  30. package/dist/domain/study-result.js.map +1 -0
  31. package/dist/outputs-before-decision-rule.d.ts.map +1 -1
  32. package/dist/outputs-before-decision-rule.js +37 -3
  33. package/dist/outputs-before-decision-rule.js.map +1 -1
  34. package/dist/ports/git-history.d.ts +12 -0
  35. package/dist/ports/git-history.d.ts.map +1 -1
  36. package/dist/ports/study-registry-codec.d.ts +3 -0
  37. package/dist/ports/study-registry-codec.d.ts.map +1 -1
  38. package/dist/skills/build-label-page/scripts/label-page-cli.d.ts +6 -0
  39. package/dist/skills/build-label-page/scripts/label-page-commands.d.ts +14 -0
  40. package/dist/skills/build-label-page/scripts/label-page-core.d.ts +149 -0
  41. package/dist/skills/build-label-page/scripts/label-page-html.d.ts +5 -0
  42. package/dist/skills/build-label-page/scripts/label-page.d.ts +2 -0
  43. package/dist/study-modes.d.ts +3 -0
  44. package/dist/study-modes.d.ts.map +1 -1
  45. package/dist/study-modes.js +8 -1
  46. package/dist/study-modes.js.map +1 -1
  47. package/dist/study-registry-rule.d.ts.map +1 -1
  48. package/dist/study-registry-rule.js +1 -0
  49. package/dist/study-registry-rule.js.map +1 -1
  50. package/dist/study-result-rule.d.ts +12 -0
  51. package/dist/study-result-rule.d.ts.map +1 -0
  52. package/dist/study-result-rule.js +87 -0
  53. package/dist/study-result-rule.js.map +1 -0
  54. package/docs/design/study-gates.md +208 -0
  55. package/docs/rules/repro/outputs-before-decision.md +8 -0
  56. package/docs/rules/repro/study-registered.md +38 -15
  57. package/docs/rules/repro/study-result.md +100 -0
  58. package/docs/rules.md +1 -0
  59. package/eslint.config.mjs +1 -1
  60. package/hooks/hooks.harness.ts +51 -13
  61. package/hooks/paper-skills-nudge.hook.d.mts +22 -0
  62. package/hooks/paper-skills-nudge.hook.mjs +85 -23
  63. package/hooks/paper-skills-nudge.test.ts +82 -4
  64. package/package.json +2 -1
  65. package/plugin/hooks/hooks.json +7 -2
  66. package/schemas/plan.v2.schema.json +341 -0
  67. package/skills/argument-arc/SKILL.md.spec.ts +1 -1
  68. package/skills/build-label-page/SKILL.md +85 -54
  69. package/skills/build-label-page/SKILL.md.spec.ts +85 -53
  70. package/skills/build-label-page/build-label-page.test.ts +10 -941
  71. package/skills/build-label-page/references/checklist.md +45 -3
  72. package/skills/build-label-page/references/closed-choice-generator.md +88 -0
  73. package/skills/build-label-page/scripts/label-page-cli.js +72 -0
  74. package/skills/build-label-page/scripts/label-page-cli.ts +85 -0
  75. package/skills/build-label-page/scripts/label-page-commands.js +14 -0
  76. package/skills/build-label-page/scripts/label-page-commands.ts +14 -0
  77. package/skills/build-label-page/scripts/label-page-core.js +850 -0
  78. package/skills/build-label-page/scripts/label-page-core.test.ts +1164 -0
  79. package/skills/build-label-page/scripts/label-page-core.ts +1210 -0
  80. package/skills/build-label-page/scripts/label-page-html.js +33 -0
  81. package/skills/build-label-page/scripts/label-page-html.test.ts +413 -0
  82. package/skills/build-label-page/scripts/label-page-html.ts +43 -0
  83. package/skills/build-label-page/scripts/label-page.js +70 -0
  84. package/skills/build-label-page/scripts/label-page.test.ts +71 -0
  85. package/skills/build-label-page/scripts/label-page.ts +71 -0
  86. package/skills/build-label-page/scripts/page-template.html +513 -0
  87. package/skills/find-venue/SKILL.md.spec.ts +1 -1
  88. package/skills/paper-status/SKILL.md.spec.ts +1 -1
  89. package/skills/render-paper/SKILL.md.spec.ts +1 -1
  90. package/src/adapters/git/index.test.ts +33 -0
  91. package/src/adapters/git/index.ts +19 -0
  92. package/src/adapters/study-registry/gates.test.ts +181 -0
  93. package/src/adapters/study-registry/index.ts +219 -1
  94. package/src/adapters/study-registry/mode.test.ts +6 -0
  95. package/src/cli.ts +3 -0
  96. package/src/domain/decide-first.test.ts +131 -0
  97. package/src/domain/decide-first.ts +92 -2
  98. package/src/domain/study-gates.ts +125 -0
  99. package/src/domain/study-measurements.test.ts +71 -0
  100. package/src/domain/study-mode.ts +6 -0
  101. package/src/domain/study-registry.ts +64 -2
  102. package/src/domain/study-result.test.ts +300 -0
  103. package/src/domain/study-result.ts +358 -0
  104. package/src/outputs-before-decision-rule.test.ts +115 -2
  105. package/src/outputs-before-decision-rule.ts +50 -2
  106. package/src/ports/git-history.ts +12 -0
  107. package/src/ports/study-registry-codec.ts +3 -0
  108. package/src/rule-cases.test.ts +74 -0
  109. package/src/studies.test.ts +3 -0
  110. package/src/study-modes.ts +10 -1
  111. package/src/study-registry-rule.ts +1 -0
  112. package/src/study-result-rule.test.ts +281 -0
  113. package/src/study-result-rule.ts +123 -0
  114. package/skills/build-label-page/references/example-generator.py +0 -803
@@ -0,0 +1,175 @@
1
+ /**
2
+ * WHAT A STUDY'S RUN SHOWED, AGAINST WHAT ITS PLAN V2 FIXED — `repro/study-result`
3
+ * (docs/rules/repro/study-result.md, src/domain/study-gates.ts).
4
+ *
5
+ * A study whose plan is v2 writes its numbers to `result.json` beside the plan; the study's own
6
+ * script produces the facts, this module judges them. For a study that is `done`:
7
+ *
8
+ * we_lose_if the number it names is in the file; when it crosses the threshold the file says
9
+ * `"claim": "lost"` — a loss is written where the paper reads its numbers, never
10
+ * left for a reader to work out — and it never says so of a claim that holds.
11
+ * second_check each step's kappa is in `kappa`, and at least its `min_kappa`.
12
+ * self_test `self_test` holds `passed` and `failed`, and `failed` is 0.
13
+ * funnel `funnel` counts every declared reason.
14
+ * recall_audit `recall_audit` gives the files a person read in full, the units found there, and
15
+ * how many of them the extractor found; at least `n_files` files, and a recall
16
+ * (extracted / units) of at least `min_recall`. The counts, not a recall the study
17
+ * computed: the files are checked against the plan, and the share is computed here.
18
+ *
19
+ * A gate that is `"none"` asks nothing of the file. Pure.
20
+ */
21
+ import { loses, thresholdText, RESULT_FILE, } from "./study-gates.js";
22
+ /** The value a study's result says its claim has, when its number crossed `we_lose_if`. */
23
+ export const CLAIM_LOST = "lost";
24
+ /** Whether a gate is decided: neither absent (a plan v1) nor null (not decided yet). */
25
+ const decided = (g) => g !== null && g !== undefined;
26
+ /**
27
+ * The gates of plan `p`, when every one is decided; null for a plan v1 or a draft. An exploratory
28
+ * plan, or one whose mode carries no `we_lose_if`, has no claim to lose.
29
+ */
30
+ export const gatesOf = (p) => {
31
+ const { second_check, self_test, funnel, recall_audit, mode } = p;
32
+ if (!decided(second_check) ||
33
+ !decided(self_test) ||
34
+ !decided(funnel) ||
35
+ !decided(recall_audit))
36
+ return null;
37
+ const w = mode?.kind === "decide_before_run" ? mode.we_lose_if : null;
38
+ return {
39
+ we_lose_if: decided(w) ? w : null,
40
+ second_check,
41
+ self_test,
42
+ funnel,
43
+ recall_audit,
44
+ };
45
+ };
46
+ /** What `we_lose_if` asks of `r`: the number, and a loss said in so many words. */
47
+ const claimFindings = (id, w, r) => {
48
+ const value = r[w.result];
49
+ if (typeof value !== "number")
50
+ return [{ problem: "no-number", id, key: w.result }];
51
+ const lost = loses(w, value);
52
+ const said = r.claim === CLAIM_LOST;
53
+ if (lost === said)
54
+ return [];
55
+ const at = { id, key: w.result, value, threshold: thresholdText(w) };
56
+ return [
57
+ lost ? { problem: "claim-lost", ...at } : { problem: "claim-holds", ...at },
58
+ ];
59
+ };
60
+ /** What `second_check` asks of `r`: each step's kappa, at least its least. */
61
+ const kappaFindings = (id, c, r) => c === "none"
62
+ ? []
63
+ : c.flatMap((s) => {
64
+ const got = r.kappa?.[s.step] ?? null;
65
+ return got !== null && got >= s.min_kappa
66
+ ? []
67
+ : [{ problem: "kappa", id, step: s.step, min: s.min_kappa, got }];
68
+ });
69
+ /** What `self_test` asks of `r`: its counts, none failed. */
70
+ const selfTestFindings = (id, t, r) => {
71
+ if (t === "none")
72
+ return [];
73
+ const run = r.self_test;
74
+ if (run === undefined)
75
+ return [{ problem: "self-test", id, failed: null }];
76
+ if (run.failed !== 0)
77
+ return [{ problem: "self-test", id, failed: run.failed }];
78
+ return run.passed > 0 ? [] : [{ problem: "self-test-empty", id }];
79
+ };
80
+ /** What `funnel` asks of `r`: a count for every reason. */
81
+ const funnelFindings = (id, f, r) => {
82
+ if (f === "none")
83
+ return [];
84
+ const missing = f.filter((reason) => r.funnel?.[reason] === undefined);
85
+ return missing.length === 0 ? [] : [{ problem: "funnel", id, missing }];
86
+ };
87
+ /** The audit's file count against the plan's: too few files is a finding. */
88
+ const sampleFindings = (id, a, c) => c.files < a.n_files
89
+ ? [{ problem: "recall-sample", id, files: c.files, min_files: a.n_files }]
90
+ : [];
91
+ /** The recall the counts give, against the plan's least. */
92
+ const shareFindings = (id, a, c) => c.extracted / c.units_in_files < a.min_recall
93
+ ? [
94
+ {
95
+ problem: "recall",
96
+ id,
97
+ extracted: c.extracted,
98
+ units: c.units_in_files,
99
+ min: a.min_recall,
100
+ },
101
+ ]
102
+ : [];
103
+ /** What `recall_audit` asks of `r`: the counts, on enough files, with a recall at least its least. */
104
+ const recallFindings = (id, a, r) => {
105
+ if (a === "none")
106
+ return [];
107
+ const c = r.recall_audit;
108
+ if (c === undefined)
109
+ return [{ problem: "no-recall-audit", id }];
110
+ return [...sampleFindings(id, a, c), ...shareFindings(id, a, c)];
111
+ };
112
+ /** Every defect of one study's result, in the order of its gates. */
113
+ export const judgeResult = (s) => {
114
+ const st = s.state;
115
+ switch (st.kind) {
116
+ case "absent":
117
+ return [{ problem: "no-result-file", id: s.id }];
118
+ case "linked":
119
+ return [{ problem: "result-linked", id: s.id, link: st.link }];
120
+ case "unreadable":
121
+ return [{ problem: "result-unreadable", id: s.id, why: st.why }];
122
+ case "read":
123
+ return [
124
+ ...(s.we_lose_if === null
125
+ ? []
126
+ : claimFindings(s.id, s.we_lose_if, st.result)),
127
+ ...kappaFindings(s.id, s.second_check, st.result),
128
+ ...selfTestFindings(s.id, s.self_test, st.result),
129
+ ...funnelFindings(s.id, s.funnel, st.result),
130
+ ...recallFindings(s.id, s.recall_audit, st.result),
131
+ ];
132
+ }
133
+ };
134
+ const RULE = "repro/study-result";
135
+ const tick = (s) => `\`${s}\``;
136
+ /** The text of each finding: what is wrong, and what to do. */
137
+ const HEADS = {
138
+ "no-result-file": (f) => `${tick(f.id)} is \`done\` and its plan is v2, but its folder has no ${tick(RESULT_FILE)}. What to do: have the study's script write its numbers there — the one its \`we_lose_if\` names, \`kappa\`, \`self_test\` and \`funnel\` as its plan declares them.`,
139
+ "result-linked": (f) => `The ${tick(RESULT_FILE)} of ${tick(f.id)} passes through the symbolic link ${tick(f.link)}; nothing is read through a link. What to do: write the file itself in the study's folder.`,
140
+ "result-unreadable": (f) => `The ${tick(RESULT_FILE)} of ${tick(f.id)} is not a study result: ${f.why}. What to do: give it the shape on the rule's page.`,
141
+ "no-number": (f) => `The ${tick(RESULT_FILE)} of ${tick(f.id)} has no number ${tick(f.key)}, the one its plan's \`we_lose_if\` names. What to do: write it there, or correct \`we_lose_if.result\` — before the run, never after.`,
142
+ "claim-lost": (f) => `${tick(f.id)}'s claim LOST: its ${tick(f.key)} is ${String(f.value)}, ${f.threshold}, the threshold its plan fixed before the run. What to do: report the loss in the paper, and say so in ${tick(RESULT_FILE)} with \`"claim": "${CLAIM_LOST}"\`; the threshold is not moved after the run.`,
143
+ "claim-holds": (f) => `The ${tick(RESULT_FILE)} of ${tick(f.id)} says \`"claim": "${CLAIM_LOST}"\`, but its ${tick(f.key)} is ${String(f.value)}, not ${f.threshold}: by its plan the claim holds. What to do: remove \`claim\`, or correct the number.`,
144
+ kappa: (f) => f.got === null
145
+ ? `The ${tick(RESULT_FILE)} of ${tick(f.id)} has no kappa for the step ${tick(f.step)} its plan's \`second_check\` declares. What to do: write it in \`kappa.${f.step}\`.`
146
+ : `${tick(f.id)}: the two raters of the step ${tick(f.step)} agree with kappa ${String(f.got)}, below the ${String(f.min)} its plan fixed before labelling. What to do: the labels of that step do not carry a number — revise the codebook and label again, or report the step as unreliable; the threshold is not lowered after the fact.`,
147
+ "self-test": (f) => f.failed === null
148
+ ? `The ${tick(RESULT_FILE)} of ${tick(f.id)} has no \`self_test\` counts, and its plan declares a self-test. What to do: write \`"self_test": { "passed": n, "failed": n }\` from the run on the known answers.`
149
+ : `${tick(f.id)}: ${String(f.failed)} self-test case(s) failed — a check that misses a known answer counts nothing. What to do: fix the check or leave it out of the count, and run the self-test again.`,
150
+ "self-test-empty": (f) => `${tick(f.id)}: its self-test ran no case (0 passed, 0 failed) — a check never tried on a known answer is not tested. What to do: make the self-test find and run its known inputs, and write the counts of that run.`,
151
+ funnel: (f) => `The ${tick(RESULT_FILE)} of ${tick(f.id)} counts no drop for ${f.missing.map(tick).join(", ")}, declared in its plan's \`funnel\`. What to do: write each in \`funnel\`, 0 when none was dropped for it.`,
152
+ "no-recall-audit": (f) => `The ${tick(RESULT_FILE)} of ${tick(f.id)} has no \`recall_audit\` counts, and its plan declares a recall audit. What to do: have a person read the sampled files in full and write \`"recall_audit": { "files": n, "units_in_files": n, "extracted": n }\`.`,
153
+ "recall-sample": (f) => `${tick(f.id)}: its recall audit read ${String(f.files)} file(s) in full, fewer than the ${String(f.min_files)} its plan fixed. What to do: audit the remaining files of the sample before the recall is reported.`,
154
+ recall: (f) => `${tick(f.id)}: the extractor found ${String(f.extracted)} of the ${String(f.units)} units a person found reading the audited files in full, a recall of ${(f.extracted / f.units).toFixed(3)}, below the ${String(f.min)} its plan fixed before the run — the extractor misses too much. What to do: report the recall as a limit of the number, or fix the extractor and audit again; the bar is not lowered after the fact.`,
155
+ };
156
+ const headOf = (p, f) => HEADS[p](f);
157
+ /** The one text a finding is reported with. */
158
+ export const resultMessage = (f) => `${headOf(f.problem, f)}\nRule ${RULE}: https://github.com/zernie/paperlint/blob/main/docs/rules/${RULE}.md`;
159
+ /** Every problem the rule reports, each its own message id. */
160
+ export const RESULT_PROBLEMS = [
161
+ "no-result-file",
162
+ "result-linked",
163
+ "result-unreadable",
164
+ "no-number",
165
+ "claim-lost",
166
+ "claim-holds",
167
+ "kappa",
168
+ "self-test",
169
+ "self-test-empty",
170
+ "funnel",
171
+ "no-recall-audit",
172
+ "recall-sample",
173
+ "recall",
174
+ ];
175
+ //# sourceMappingURL=study-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"study-result.js","sourceRoot":"","sources":["../../src/domain/study-result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EACL,KAAK,EACL,aAAa,EACb,WAAW,GAOZ,MAAM,kBAAkB,CAAC;AAG1B,2FAA2F;AAC3F,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC;AAkDjC,wFAAwF;AACxF,MAAM,OAAO,GAAG,CAAI,CAAuB,EA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C,CAAgD,CAAC"}
1
+ {"version":3,"file":"outputs-before-decision-rule.d.ts","sourceRoot":"","sources":["../src/outputs-before-decision-rule.ts"],"names":[],"mappings":"AAmBA,OAAO,EAIL,KAAK,gBAAgB,EAItB,MAAM,0BAA0B,CAAC;AAKlC,OAAO,KAAK,EAEV,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAOvD,iEAAiE;AACjE,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;CACxB;AAED,mGAAmG;AACnG,eAAO,MAAM,kBAAkB,GAC7B,OAAO,MAAM,EACb,MAAM,SAAS,KACd,SAAS,gBAAgB,EA0B3B,CAAC;AA+EF,2DAA2D;AAC3D,eAAO,MAAM,0BAA0B,GACrC,MAAM,SAAS,KACd,QAAQ,CAAC,MAAM,CAAC,yBAAyB,EAAE,gBAAgB,CAAC,CAc7D,CAAC;AAEH,qDAAqD;AACrD,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC;IACvC,+BAA+B,EAAE,OAAO,CAAC;CAC1C,CAAgD,CAAC"}
@@ -17,7 +17,8 @@ import { basename, dirname, join } from "node:path";
17
17
  import { filter, map, pipe } from "remeda";
18
18
  import { callerPath } from "./caller-path.js";
19
19
  import { decisionEntry, modeStudies } from "./study-modes.js";
20
- import { judgeOrder, orderMessage, } from "./domain/decide-first.js";
20
+ import { firstOutputAfter, judgeOrder, orderMessage, } from "./domain/decide-first.js";
21
+ import { gatesOf } from "./domain/study-gates.js";
21
22
  import { REPRO_DIR } from "./domain/repro-layout.js";
22
23
  import { studyFolder } from "./study-folder.js";
23
24
  import { registryOf } from "./study-registry-rule.js";
@@ -26,11 +27,11 @@ const STATUS_FILE = "PIPELINE-STATUS.md";
26
27
  /** Every decide-first study of the paper folder `paper`, with its tree and its history's order. */
27
28
  export const decideFirstStudies = (paper, deps) => {
28
29
  const reader = studyFolder(paper, deps);
29
- return pipe(modeStudies(registryOf(paper, deps), reader, deps.codec), filter(isDecidedAndReady), map(({ row, plan, mode }) => {
30
+ return pipe(modeStudies(registryOf(paper, deps), reader, deps.codec), filter(isDecidedAndReady), map(({ row, plan, mode, gates }) => {
30
31
  const folder = join(paper, REPRO_DIR, row.folder);
31
32
  const decision = join(paper, mode.decision.file);
32
33
  const on = decisionEntry(reader, mode.decision.file);
33
- return {
34
+ const study = {
34
35
  id: row.id,
35
36
  folder: row.folder,
36
37
  plan,
@@ -40,8 +41,39 @@ export const decideFirstStudies = (paper, deps) => {
40
41
  ? deps.git.order(callerPath(folder), callerPath(decision))
41
42
  : on,
42
43
  };
44
+ return {
45
+ ...study,
46
+ gates: gateHistory(study, { now: gates, kind: row.kind, folder }, deps),
47
+ };
43
48
  }));
44
49
  };
50
+ /**
51
+ * The gates of a plan v2 now, and the plan at the study's first output after its decision: none for
52
+ * a plan v1, a history not read, or a study with no such output yet.
53
+ */
54
+ const gateHistory = (s, from, deps) => {
55
+ if (from.now === null || s.facts.kind !== "read")
56
+ return undefined;
57
+ const output = firstOutputAfter(s, s.facts.files);
58
+ if (output === null)
59
+ return undefined;
60
+ const at = deps.git.fileAt(callerPath(from.folder), output.commit, s.plan);
61
+ return { now: from.now, output, then: planThen(at, from.kind, deps) };
62
+ };
63
+ /** What the plan held at that commit, by gates. */
64
+ const planThen = (at, kind, deps) => {
65
+ if (at.kind === "unknown")
66
+ return at;
67
+ if (at.kind === "absent")
68
+ return { kind: "no-gates", why: "absent" };
69
+ const parsed = deps.codec.parsePlan(at.text, kind);
70
+ if (parsed.kind === "unreadable")
71
+ return { kind: "no-gates", why: "unreadable" };
72
+ const gates = gatesOf(parsed.plan);
73
+ return gates === null
74
+ ? { kind: "no-gates", why: "v1" }
75
+ : { kind: "gates", gates };
76
+ };
45
77
  /** Only a ready plan decides: a draft may name no outputs, or an empty decision file. */
46
78
  const isDecidedAndReady = (s) => s.mode.kind === "decide_before_run" && s.empty.length === 0;
47
79
  const PROBLEMS = [
@@ -53,6 +85,8 @@ const PROBLEMS = [
53
85
  "shallow",
54
86
  "undecided-output",
55
87
  "output-before-decision",
88
+ "gates-changed",
89
+ "gates-not-fixed",
56
90
  ];
57
91
  const NAME = "repro/outputs-before-decision";
58
92
  /** On `PIPELINE-STATUS.md`, every finding of every decide-first study of its paper, at its first line. */
@@ -1 +1 @@
1
- {"version":3,"file":"outputs-before-decision-rule.js","sourceRoot":"","sources":["../src/outputs-before-decision-rule.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAkB,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EACL,UAAU,EACV,YAAY,GAGb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAQrD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,WAAW,GAAG,oBAAoB,CAAC;AAOzC,mGAAmG;AACnG,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,KAAa,EACb,IAAe,EACc,EAAE;IAC/B,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACxC,OAAO,IAAI,CACT,WAAW,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,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AC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC;SACnE;QACD,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;KAC7C;CACF,CAAC,CAAC;AAEH,qDAAqD;AACrD,MAAM,CAAC,MAAM,iBAAiB,GAEzB,EAAE,+BAA+B,EAAE,OAAO,EAAE,CAAC"}
@@ -37,8 +37,20 @@ export interface GitHistory {
37
37
  /** `file` (absolute, in the repository that holds `paper`), asked from the paper's folder. */
38
38
  readonly committed: (paper: AbsolutePath, file: AbsolutePath) => Committed;
39
39
  }
40
+ /** A file as it stood at a commit: its text, not there, or why git could not say. */
41
+ export type FileAt = {
42
+ readonly kind: "text";
43
+ readonly text: string;
44
+ } | {
45
+ readonly kind: "absent";
46
+ } | {
47
+ readonly kind: "unknown";
48
+ readonly why: string;
49
+ };
40
50
  export interface GitOrder {
41
51
  /** The order of `decision`'s first commit against every file's under `studyDir` (a folder that exists). */
42
52
  readonly order: (studyDir: AbsolutePath, decision: AbsolutePath) => OrderFacts;
53
+ /** `path` (relative to `studyDir`) as it stood at `commit`: what a plan's gates were at the first output. */
54
+ readonly fileAt: (studyDir: AbsolutePath, commit: string, path: string) => FileAt;
43
55
  }
44
56
  //# sourceMappingURL=git-history.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"git-history.d.ts","sourceRoot":"","sources":["../../src/ports/git-history.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,YAAY,EACV,QAAQ,EACR,WAAW,EACX,KAAK,EACL,UAAU,GACX,MAAM,2BAA2B,CAAC;AAEnC,MAAM,MAAM,SAAS;AACnB,0EAA0E;AACxE;IAAE,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAA;CAAE;A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ires it.
5
5
  */
6
6
  import type { ParsedPlan, ParsedRegistry, StudyKind } from "../domain/study-registry.ts";
7
+ import type { ParsedResult } from "../domain/study-result.ts";
7
8
  export interface StudyRegistryCodec {
8
9
  /** A `studies.json`'s text: the registry, or the one reason it is not one of this schema. */
9
10
  readonly parse: (text: string) => ParsedRegistry;
@@ -14,5 +15,7 @@ export interface StudyRegistryCodec {
14
15
  readonly parsePlan: (text: string, kind: StudyKind) => ParsedPlan;
15
16
  /** A plan still named `prereg.json`, loose: the same three outcomes. */
16
17
  readonly parseLegacyPlan: (text: string) => ParsedPlan;
18
+ /** A study's `result.json`: its numbers, or why it is none (src/domain/study-result.ts). */
19
+ readonly parseResult: (text: string) => ParsedResult;
17
20
  }
18
21
  //# sourceMappingURL=study-registry-codec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"study-registry-codec.d.ts","sourceRoot":"","sources":["../../src/ports/study-registry-codec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,6BAA6B,CAAC;AAErC,MAAM,WAAW,kBAAkB;IACjC,6FAA6F;IAC7F,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,cAAc,CAAC;IACjD;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,KAAK,UAAU,CAAC;IAClE,wEAAwE;IACxE,QAAQ,CAAC,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,UAAU,CAAC;CACxD"}
1
+ {"version":3,"file":"study-registry-codec.d.ts","sourceRoot":"","sources":["../../src/ports/study-registry-codec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D,MAAM,WAAW,kBAAkB;IACjC,6FAA6F;IAC7F,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,cAAc,CAAC;IACjD;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,KAAK,UAAU,CAAC;IAClE,wEAAwE;IACxE,QAAQ,CAAC,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,UAAU,CAAC;IACvD,4FAA4F;IAC5F,QAAQ,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,YAAY,CAAC;CACtD"}
@@ -0,0 +1,6 @@
1
+ /** One command line: what it printed to stdout and to stderr, and its exit code. */
2
+ export declare function cli(argv: readonly string[]): {
3
+ readonly status: number;
4
+ readonly stdout: string;
5
+ readonly stderr: string;
6
+ };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The subcommands of `label-page`, by name. One table, read twice: the dispatcher in `label-page.ts`
3
+ * compares against these, and `SKILL.md.spec.ts` interpolates them into every command it instructs
4
+ * (a name that is not here is a type error there). So the skill cannot instruct a subcommand the
5
+ * script does not have.
6
+ *
7
+ * A module of its own, with no side effects: the spec imports it at compile time, and importing
8
+ * `label-page.ts` itself would run the command line.
9
+ */
10
+ export declare const COMMANDS: {
11
+ readonly build: "build";
12
+ readonly export: "export";
13
+ readonly schema: "schema";
14
+ };
@@ -0,0 +1,149 @@
1
+ export declare class Refusal extends Error {
2
+ readonly exitCode: number;
3
+ constructor(exitCode: number, message: string);
4
+ }
5
+ export declare const fail: (message: string) => never;
6
+ /** The lines printed since the last call, each ending in a newline. */
7
+ export declare const takePrinted: () => string;
8
+ export declare const say: (line: string) => void;
9
+ type Json = null | boolean | number | string | readonly Json[] | {
10
+ readonly [key: string]: Json;
11
+ };
12
+ type JsonObject = {
13
+ readonly [key: string]: Json;
14
+ };
15
+ type SchemaNode = {
16
+ kind: "string";
17
+ required: boolean;
18
+ pattern?: string;
19
+ } | {
20
+ kind: "integer";
21
+ required: boolean;
22
+ } | {
23
+ kind: "array";
24
+ required: boolean;
25
+ min: number;
26
+ items: SchemaNode;
27
+ } | {
28
+ kind: "map";
29
+ required: boolean;
30
+ min: number;
31
+ key_pattern: string;
32
+ values: SchemaNode;
33
+ } | {
34
+ kind: "object";
35
+ required: boolean;
36
+ closed: boolean;
37
+ fields: Readonly<Record<string, SchemaNode>>;
38
+ };
39
+ export declare const CONFIG_SCHEMA: SchemaNode;
40
+ interface Option {
41
+ readonly value: string;
42
+ readonly label: string;
43
+ readonly example: string;
44
+ readonly icon?: string;
45
+ readonly ask_why?: string;
46
+ }
47
+ interface Question {
48
+ readonly id: string;
49
+ readonly text: string;
50
+ readonly short?: string;
51
+ readonly options: readonly Option[];
52
+ }
53
+ type Item = Readonly<Record<string, string>> & {
54
+ readonly source_id: string;
55
+ readonly group: string;
56
+ };
57
+ interface Practice {
58
+ readonly title?: string;
59
+ readonly body: string;
60
+ readonly code?: string;
61
+ readonly context?: string;
62
+ readonly expected: Readonly<Record<string, string>>;
63
+ readonly why: string;
64
+ }
65
+ interface Config {
66
+ readonly study: string;
67
+ readonly title: string;
68
+ readonly intro?: string;
69
+ readonly seed: number;
70
+ readonly groups: Readonly<Record<string, string>>;
71
+ readonly labeller_knows?: readonly string[];
72
+ readonly familiarity_question?: string;
73
+ readonly questions: readonly Question[];
74
+ readonly practice: readonly Practice[];
75
+ readonly practice_round?: number;
76
+ readonly items: readonly Item[];
77
+ }
78
+ interface KeyEntry {
79
+ readonly source_id: string;
80
+ readonly group: string;
81
+ readonly on_page: boolean;
82
+ }
83
+ /** Only what the labeller can answer goes on the page, and only that gets an id, in id order. */
84
+ declare function itemsOnPage(cfg: Config, keyPath: string): {
85
+ items: Item[];
86
+ ids: ReadonlyMap<string, string>;
87
+ entries: Readonly<Record<string, KeyEntry>>;
88
+ idOf: (i: Item) => string;
89
+ };
90
+ /** What a page shows: the questions, the practice and the items, blind, with their neutral ids. */
91
+ declare function payloadOf(cfg: Config, page: ReturnType<typeof itemsOnPage>): {
92
+ title: string;
93
+ intro: string;
94
+ groups: {
95
+ id: string;
96
+ label: string;
97
+ }[];
98
+ familiarity_question: string;
99
+ familiarity: {
100
+ value: string;
101
+ label: string;
102
+ }[];
103
+ allowed: JsonObject;
104
+ questions: readonly Question[];
105
+ practice: {
106
+ round: number;
107
+ items: readonly (Practice & {
108
+ readonly id: string;
109
+ })[];
110
+ };
111
+ items: {
112
+ id: string;
113
+ }[];
114
+ };
115
+ export type Payload = ReturnType<typeof payloadOf>;
116
+ /**
117
+ * Everything a build does but lay out the page: reads and checks items.json (the schema, the
118
+ * cross-field checks, the leak guard), gives the items their ids, writes key.json beside the page and
119
+ * returns what the page shows. A page written by hand can take its blindness and its key from here.
120
+ */
121
+ export declare function prepareBuild(configPath: string, outDir: string): {
122
+ payload: {
123
+ title: string;
124
+ intro: string;
125
+ groups: {
126
+ id: string;
127
+ label: string;
128
+ }[];
129
+ familiarity_question: string;
130
+ familiarity: {
131
+ value: string;
132
+ label: string;
133
+ }[];
134
+ allowed: JsonObject;
135
+ questions: readonly Question[];
136
+ practice: {
137
+ round: number;
138
+ items: readonly (Practice & {
139
+ readonly id: string;
140
+ })[];
141
+ };
142
+ items: {
143
+ id: string;
144
+ }[];
145
+ };
146
+ dropped: number;
147
+ };
148
+ export declare function exportLabels(dumpPath: string, keyPath: string, outDir: string, day: string): void;
149
+ export {};
@@ -0,0 +1,5 @@
1
+ import { type Payload } from "./label-page-core.ts";
2
+ /** The page: the template with its title and its data. */
3
+ export declare function pageHtml(payload: Payload): string;
4
+ /** items.json → out/page.html and out/key.json. */
5
+ export declare function build(configPath: string, outDir: string): void;
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -1,4 +1,5 @@
1
1
  import type { NotAFile } from "./domain/decide-first.ts";
2
+ import { type PlanGates } from "./domain/study-gates.ts";
2
3
  import type { StudyMode } from "./domain/study-mode.ts";
3
4
  import { type PlanTextField, type RegistryState, type Study } from "./domain/study-registry.ts";
4
5
  import type { StudyRegistryCodec } from "./ports/study-registry-codec.ts";
@@ -30,6 +31,8 @@ export interface ModeStudy {
30
31
  readonly plan: string;
31
32
  readonly mode: StudyMode;
32
33
  readonly empty: readonly PlanTextField[];
34
+ /** A plan v2's gates as HEAD holds them; null for a plan v1. */
35
+ readonly gates: PlanGates | null;
33
36
  }
34
37
  /** What reading the plan of one row gave: its mode study, nothing, or a link on the way to it. */
35
38
  export type ModeRead = {
@@ -1 +1 @@
1
- {"version":3,"file":"study-modes.d.ts","sourceRoot":"","sources":["../src/study-modes.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,KAAK,EACX,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,6FAA6F;AAC7F,MAAM,MAAM,aAAa,GACrB;IAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAA;CAAE,GACvB;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GACxD;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GACxB,QAAQ,WAAW,EACnB,MAAM,MAAM,KACX,aAQF,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC;IACpB,QAAQ,CAAC,I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ates.js";
9
10
  import { studiesOf, } from "./domain/study-registry.js";
10
11
  /**
11
12
  * What the decision file `file` (relative to the paper) is, read through `folder` without following
@@ -45,7 +46,13 @@ export const readModeStudy = (s, folder, codec) => {
45
46
  const empty = parsed.kind === "draft" ? parsed.empty : [];
46
47
  return {
47
48
  kind: "mode",
48
- study: { row: s, plan, mode: parsed.plan.mode, empty },
49
+ study: {
50
+ row: s,
51
+ plan,
52
+ mode: parsed.plan.mode,
53
+ empty,
54
+ gates: gatesOf(parsed.plan),
55
+ },
49
56
  };
50
57
  };
51
58
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"study-modes.js","sourceRoot":"","sources":["../src/study-modes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG3C,OAAO,EACL,SAAS,GAIV,MAAM,4BAA4B,CAAC;AAUpC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,MAAmB,EACnB,IAAY,EACG,EAAE;IACjB,MAAM,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,IAAI,EAAE,CAAC,IAAI,KAAK,KAAK;QAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;IACxE,IAAI,EAAE,CAAC,IAAI,KAAK,OAAO;QAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;IAC7E,IAAI,EAAE,CAAC,IAAI,KAAK,QAAQ;QAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAChD,OAAO,EAAE,CAAC,IAAI,KAAK,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC;QACtC,CAAC,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE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B,SAAQ,gBAAgB;IACzD,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC;IACnC,mGAAmG;IACnG,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;CAC/B;AAED,uFAAuF;AACvF,eAAO,MAAM,MAAM,GAAI,OAAO,KAAK,EAAE,GAAG,MAAM,KAAG,MAAM,GAAG,IAGzD,CAAC;AAEF,oFAAoF;AACpF,wBAAgB,UAAU,CACxB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,OAAO,CAAC,GAC/C,aAAa,CAOf;AAoCD;;;GAGG;AACH,eAAO,MAAM,OAAO,GAClB,GAAG,aAAa,EAChB,QAAQ,WAAW,EACnB,OAAO,kBAAkB,KACxB,WAAW,CAAC,MAAM,EAAE,SAAS,CAQ7B,CAAC;AAqBJ,iGAAiG;AACjG,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,iBAAiB,GACtB,SAAS,YAAY,EAAE,CAUzB;AAgED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,iBAAiB,GACtB,QAAQ,CAAC,MAAM,CAAC,kBAAkB,GAAG,iBAAiB,EAAE,gBAAgB,CAAC,CAAC,CAqB5E;AAED,mGAAmG;AACnG,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC;IAChD,wBAAwB,EAAE,OAAO,CAAC;IAClC,uBAAuB,EAAE,MAAM,CAAC;CACjC,CAA0E,CAAC"}
@@ -110,6 +110,7 @@ const PROBLEMS = [
110
110
  "unknown-requirement",
111
111
  "headline-approval",
112
112
  "bad-plan",
113
+ "plan-version",
113
114
  "author-check",
114
115
  ];
115
116
  /** A rule's meta: its page, and a message id per problem, the whole text being `studyMessage`. */