superlab 0.1.58 → 0.1.59

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/lib/i18n.cjs CHANGED
@@ -2084,6 +2084,7 @@ ZH_CONTENT[path.join(".codex", "skills", "lab", "stages", "write.md")] = `# \`/l
2084
2084
  - 如果 \`paper-plan\` 校验失败,就先补 \`.lab/writing/plan.md\`,不能直接跳去写 prose。
2085
2085
  - 普通草稿轮次在改完当前 section 后,必须运行 \`.lab/.managed/scripts/validate_section_draft.py --section <section> --section-file <section-file> --mode draft\` 和 \`.lab/.managed/scripts/validate_paper_claims.py --section-file <section-file> --mode draft\`。
2086
2086
  - 普通草稿轮次里,这两类校验先按 warning 处理;warning 必须写进 write iteration artifact,不能假装没看到。
2087
+ - 如果当前 section 已经位于论文层的 \`sections/\` 目录下,草稿期的 section validator 还必须检查同一论文层里相邻的必需图占位符或 analysis 资产文件是否已经物化;缺失时至少给出 warning。
2087
2088
  - 如果要建议继续 tighten、compress 或 polish 同一个 section,必须先把 section-level acceptance gate 写进 write iteration artifact。
2088
2089
  - 在 write iteration artifact 里记录当前 section 的 section-style policy 合规性、保留了哪些 discouraged move 及其理由、以及是否还存在任何禁用表达。
2089
2090
  - 如果本轮替换或重写了 canonical 实验/评测协议,就把 protocol/scope impact audit 也写进 write iteration artifact。
@@ -2103,6 +2104,7 @@ ZH_CONTENT[path.join(".codex", "skills", "lab", "stages", "write.md")] = `# \`/l
2103
2104
  - 论文源码里不要出现绝对本地路径、workflow provenance、shell 日志或 \`+/-\` 这类工程记法;应改成 paper-facing LaTeX 表达。
2104
2105
  - 最终定稿或导出轮次结束前,必须先通过 \`.lab/.managed/scripts/validate_section_draft.py --section <section> --section-file <section-file> --mode final\` 和 \`.lab/.managed/scripts/validate_paper_claims.py --section-file <section-file> --mode final\`。
2105
2106
  - 如果最终轮次的 section 或 claim 校验失败,就继续改正文;不能因为资产齐全就停下。
2107
+ - 如果某个最终定稿 section 已经位于论文层,但对应的必需 figure placeholder 或 analysis asset 文件仍未在同层物化,section validator 必须直接失败,不能只看 prose 引用是否存在。
2106
2108
  - 在最终定稿或导出轮次结束前,必须运行 \`.lab/.managed/scripts/validate_manuscript_delivery.py --paper-dir <deliverables_root>/paper\`;如果失败,就继续补表、图、引用和正文。
2107
2109
  - 如果 \`workflow_language\` 与 \`paper_language\` 不一致,\`validate_manuscript_delivery.py\` 还会检查最新 write iteration 里是否存在语言决策审计;缺这块就不能算最终稿合格。
2108
2110
  - 如果本地有 LaTeX 工具链,就再跑一次 compile smoke test;如果没有,也要在 write iteration artifact 里记录该限制。
@@ -239,6 +239,38 @@ def check_section_style_policy(text: str, section: str, issues: list[str]):
239
239
  )
240
240
 
241
241
 
242
+ def infer_paper_layer_root(section_path: Path) -> Path | None:
243
+ for parent in section_path.parents:
244
+ if parent.name == "sections":
245
+ return parent.parent
246
+ return None
247
+
248
+
249
+ def check_neighbor_asset_files(section: str, section_path: Path, issues: list[str]):
250
+ paper_layer_root = infer_paper_layer_root(section_path)
251
+ if paper_layer_root is None:
252
+ return
253
+
254
+ required_assets: list[Path] = []
255
+ if section == "introduction":
256
+ required_assets.append(paper_layer_root / "figures" / "problem-setting.tex")
257
+ elif section == "method":
258
+ required_assets.append(paper_layer_root / "figures" / "method-overview.tex")
259
+ elif section == "experiments":
260
+ required_assets.extend(
261
+ (
262
+ paper_layer_root / "figures" / "results-overview.tex",
263
+ paper_layer_root / "analysis" / "analysis-asset.tex",
264
+ )
265
+ )
266
+
267
+ for asset_path in required_assets:
268
+ if not asset_path.exists():
269
+ issues.append(
270
+ f"{section} section is missing the required paper-layer asset file: {asset_path.as_posix()}"
271
+ )
272
+
273
+
242
274
  def check_abstract(text: str, issues: list[str]):
243
275
  numbers = re.findall(r"\b\d+(?:\.\d+)?\b", text)
244
276
  if len(numbers) > 6:
@@ -369,6 +401,7 @@ def main():
369
401
  check_common_section_gate_risks(text, issues)
370
402
  check_section_style_policy(text, args.section, issues)
371
403
  SECTION_CHECKS[args.section](text, issues)
404
+ check_neighbor_asset_files(args.section, section_path, issues)
372
405
 
373
406
  if not issues:
374
407
  print("section draft is valid")
@@ -145,6 +145,7 @@ Run these on every round:
145
145
  - If the paper-plan validator fails, stop and fill `.lab/writing/plan.md` first instead of drafting prose.
146
146
  - During ordinary draft rounds, run `.lab/.managed/scripts/validate_section_draft.py --section <section> --section-file <section-file> --mode draft` and `.lab/.managed/scripts/validate_paper_claims.py --section-file <section-file> --mode draft` after revising the active section.
147
147
  - Treat draft-round output from the section and claim validators as warnings that must be recorded and addressed in the write-iteration artifact, not as immediate stop conditions.
148
+ - If the active section already lives under a paper-layer `sections/` directory, the draft section validator should also warn when the neighboring required figure or analysis placeholder files are still missing from that same paper layer.
148
149
  - For each subsection, explicitly include motivation, design, and technical advantage when applicable.
149
150
  - Avoid a writing style that reads like incremental patching of a naive baseline.
150
151
  - Keep terminology stable across the full paper.
@@ -171,6 +172,7 @@ Run these on every round:
171
172
  - Keep `.lab/writing/plan.md` synchronized with the current table plan, figure plan, citation plan, and section-to-asset map whenever manuscript assets change.
172
173
  - For final-draft or export rounds, run `.lab/.managed/scripts/validate_section_draft.py --section <section> --section-file <section-file> --mode final` and `.lab/.managed/scripts/validate_paper_claims.py --section-file <section-file> --mode final` before accepting the round.
173
174
  - If the final-round section or claim validators fail, keep editing the affected section until it passes; do not stop at asset-complete but rhetorically weak or unsafe prose.
175
+ - Final-round section validation should fail when a section in the paper layer references required figure or analysis placeholders but the neighboring asset files are still missing from that layer.
174
176
  - Run `.lab/.managed/scripts/validate_manuscript_delivery.py --paper-dir <deliverables_root>/paper` before accepting a final-draft or export round.
175
177
  - The manuscript-delivery validator should fail if the core figures and tables are only inserted but never cited from section prose, if final manuscript acceptance tries to bypass the one-time `paper_language_finalization_decision` gate when `workflow_language` and `paper_language` differ, or if the latest write iteration does not audit that language decision.
176
178
  - The manuscript-delivery validator should also fail if `paper_language_finalization_decision=convert-to-paper-language` but the persisted workflow-language paper layer is missing, missing `main.tex` or `references.bib`, missing mirrored section or asset coverage, written in the wrong language, or still contains review-only scaffolding.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superlab",
3
- "version": "0.1.58",
3
+ "version": "0.1.59",
4
4
  "description": "Strict /lab research workflow installer for Codex and Claude",
5
5
  "keywords": [
6
6
  "codex",