superlab 0.1.70 → 0.1.72
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 +178 -6
- package/lib/install.cjs +1 -0
- package/lib/lab_idea_contract.json +4 -4
- package/lib/lab_write_contract.json +1 -1
- package/package-assets/claude/commands/lab/idea.md +1 -1
- package/package-assets/claude/commands/lab/report.md +1 -0
- package/package-assets/claude/commands/lab/write.md +1 -0
- package/package-assets/claude/commands/lab-idea.md +1 -1
- package/package-assets/claude/commands/lab-report.md +1 -0
- package/package-assets/claude/commands/lab-write.md +1 -0
- package/package-assets/claude/commands/lab:idea.md +1 -1
- package/package-assets/claude/commands/lab:report.md +1 -0
- package/package-assets/claude/commands/lab:write.md +1 -0
- package/package-assets/claude/commands/lab/357/274/232idea.md +1 -1
- package/package-assets/claude/commands/lab/357/274/232report.md +1 -0
- package/package-assets/claude/commands/lab/357/274/232write.md +1 -0
- package/package-assets/codex/prompts/lab/idea.md +1 -1
- package/package-assets/codex/prompts/lab/report.md +1 -0
- package/package-assets/codex/prompts/lab/write.md +1 -1
- package/package-assets/codex/prompts/lab-idea.md +1 -1
- package/package-assets/codex/prompts/lab-report.md +1 -0
- package/package-assets/codex/prompts/lab-write.md +1 -1
- package/package-assets/codex/prompts/lab:idea.md +1 -1
- package/package-assets/codex/prompts/lab:report.md +1 -0
- package/package-assets/codex/prompts/lab:write.md +1 -1
- package/package-assets/codex/prompts/lab/357/274/232idea.md +1 -1
- package/package-assets/codex/prompts/lab/357/274/232report.md +1 -0
- package/package-assets/codex/prompts/lab/357/274/232write.md +1 -1
- package/package-assets/shared/lab/.managed/scripts/validate_collaborator_report.py +55 -1
- package/package-assets/shared/lab/.managed/scripts/validate_idea_artifact.py +75 -0
- package/package-assets/shared/lab/.managed/scripts/validate_section_draft.py +119 -0
- package/package-assets/shared/lab/.managed/scripts/validate_stage_report.py +547 -0
- package/package-assets/shared/lab/.managed/templates/final-report.md +11 -0
- package/package-assets/shared/lab/.managed/templates/idea.md +18 -0
- package/package-assets/shared/lab/.managed/templates/main-tables.md +6 -0
- package/package-assets/shared/lab/.managed/templates/paper-plan.md +9 -0
- package/package-assets/shared/lab/.managed/templates/stage-report.md +71 -0
- package/package-assets/shared/lab/.managed/templates/write-iteration.md +13 -0
- package/package-assets/shared/skills/lab/SKILL.md +23 -0
- package/package-assets/shared/skills/lab/references/paper-writing/abstract.md +14 -0
- package/package-assets/shared/skills/lab/references/paper-writing/conclusion.md +13 -0
- package/package-assets/shared/skills/lab/references/paper-writing/experiments.md +19 -0
- package/package-assets/shared/skills/lab/references/paper-writing/introduction.md +17 -2
- package/package-assets/shared/skills/lab/references/paper-writing/method.md +10 -0
- package/package-assets/shared/skills/lab/references/paper-writing/section-style-policies.md +10 -1
- package/package-assets/shared/skills/lab/stages/auto.md +26 -0
- package/package-assets/shared/skills/lab/stages/data.md +9 -0
- package/package-assets/shared/skills/lab/stages/framing.md +9 -0
- package/package-assets/shared/skills/lab/stages/idea.md +33 -13
- package/package-assets/shared/skills/lab/stages/iterate.md +9 -0
- package/package-assets/shared/skills/lab/stages/report.md +17 -0
- package/package-assets/shared/skills/lab/stages/review.md +9 -0
- package/package-assets/shared/skills/lab/stages/run.md +9 -0
- package/package-assets/shared/skills/lab/stages/spec.md +9 -0
- package/package-assets/shared/skills/lab/stages/write.md +18 -0
- package/package.json +1 -1
|
@@ -261,10 +261,102 @@ INTERNAL_CONFIG_LABEL_PATTERN = re.compile(
|
|
|
261
261
|
r"\b[a-z]{1,4}\d+(?:[-_][a-z]?\d+(?:\.\d+)?){1,4}\b",
|
|
262
262
|
flags=re.IGNORECASE,
|
|
263
263
|
)
|
|
264
|
+
ISOLATED_INSIGHT_HEADING_PATTERN = re.compile(
|
|
265
|
+
r"\\(?:sub)*section\*?\s*\{\s*(?:our\s+)?insights?\s*\}|"
|
|
266
|
+
r"\\(?:sub)*section\*?\s*\{\s*(?:核心)?洞见\s*\}",
|
|
267
|
+
flags=re.IGNORECASE,
|
|
268
|
+
)
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
def has_insight_contrast(text: str) -> bool:
|
|
272
|
+
return contains_any(
|
|
273
|
+
text,
|
|
274
|
+
(
|
|
275
|
+
"counterintuitively",
|
|
276
|
+
"we observe",
|
|
277
|
+
"we find",
|
|
278
|
+
"a closer inspection",
|
|
279
|
+
"while it might seem",
|
|
280
|
+
"existing work assumes",
|
|
281
|
+
"common assumption",
|
|
282
|
+
"suggesting that",
|
|
283
|
+
"reveals that",
|
|
284
|
+
"反直觉",
|
|
285
|
+
"我们观察到",
|
|
286
|
+
"我们发现",
|
|
287
|
+
"进一步检查",
|
|
288
|
+
"通常假设",
|
|
289
|
+
"常规认知",
|
|
290
|
+
"这表明",
|
|
291
|
+
"揭示",
|
|
292
|
+
),
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
def has_mechanism_explanation(text: str) -> bool:
|
|
297
|
+
return contains_any(
|
|
298
|
+
text,
|
|
299
|
+
(
|
|
300
|
+
"because",
|
|
301
|
+
"mechanism",
|
|
302
|
+
"attributed to",
|
|
303
|
+
"explains",
|
|
304
|
+
"to capture",
|
|
305
|
+
"to model",
|
|
306
|
+
"based on",
|
|
307
|
+
"therefore",
|
|
308
|
+
"causal",
|
|
309
|
+
"causes",
|
|
310
|
+
"amplifies",
|
|
311
|
+
"propagates",
|
|
312
|
+
"因为",
|
|
313
|
+
"机制",
|
|
314
|
+
"归因于",
|
|
315
|
+
"解释",
|
|
316
|
+
"为了刻画",
|
|
317
|
+
"为了建模",
|
|
318
|
+
"基于",
|
|
319
|
+
"因此",
|
|
320
|
+
"因果",
|
|
321
|
+
"放大",
|
|
322
|
+
"传播",
|
|
323
|
+
),
|
|
324
|
+
)
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
def has_diagnostic_interpretation(text: str) -> bool:
|
|
328
|
+
return contains_any(
|
|
329
|
+
text,
|
|
330
|
+
(
|
|
331
|
+
"supports our hypothesis",
|
|
332
|
+
"supports the hypothesis",
|
|
333
|
+
"diagnostic",
|
|
334
|
+
"mechanism",
|
|
335
|
+
"ablation shows",
|
|
336
|
+
"ablation indicates",
|
|
337
|
+
"this suggests",
|
|
338
|
+
"rather than",
|
|
339
|
+
"not merely",
|
|
340
|
+
"we attribute",
|
|
341
|
+
"验证了",
|
|
342
|
+
"支持假设",
|
|
343
|
+
"诊断",
|
|
344
|
+
"机制",
|
|
345
|
+
"消融表明",
|
|
346
|
+
"这表明",
|
|
347
|
+
"并非只是",
|
|
348
|
+
"不是单纯",
|
|
349
|
+
"归因于",
|
|
350
|
+
),
|
|
351
|
+
)
|
|
264
352
|
|
|
265
353
|
|
|
266
354
|
def check_common_section_gate_risks(text: str, issues: list[str]):
|
|
267
355
|
prose_text = strip_latex_commands(text)
|
|
356
|
+
if ISOLATED_INSIGHT_HEADING_PATTERN.search(text):
|
|
357
|
+
issues.append(
|
|
358
|
+
"paper prose should not isolate insight under an 'Our Insights' style heading; weave the insight into the section's motivation, mechanism, evidence, and boundary"
|
|
359
|
+
)
|
|
268
360
|
if contains_any(prose_text, SERVICE_STYLE_PHRASES):
|
|
269
361
|
issues.append(
|
|
270
362
|
"service-style or AI-assistant meta language appears in reader-facing prose; rewrite it as academic manuscript text"
|
|
@@ -530,6 +622,8 @@ def check_abstract(text: str, issues: list[str]):
|
|
|
530
622
|
issues.append("abstract should state the core challenge or gap")
|
|
531
623
|
if not contains_any(text, ("boundary", "bounded", "limitation", "however", "but", "局限", "边界", "限制")):
|
|
532
624
|
issues.append("abstract should include a bounded result or explicit limitation")
|
|
625
|
+
if not (has_insight_contrast(text) or has_mechanism_explanation(text)):
|
|
626
|
+
issues.append("abstract should include a one-sentence insight or mechanism, not only task, method, and metric results")
|
|
533
627
|
|
|
534
628
|
|
|
535
629
|
def check_introduction(text: str, issues: list[str]):
|
|
@@ -568,6 +662,10 @@ def check_introduction(text: str, issues: list[str]):
|
|
|
568
662
|
),
|
|
569
663
|
):
|
|
570
664
|
issues.append("introduction should explain what is missing in prior work")
|
|
665
|
+
if not has_insight_contrast(text):
|
|
666
|
+
issues.append("introduction should create an insight contrast, such as common assumption versus observed mechanism")
|
|
667
|
+
if not has_mechanism_explanation(text):
|
|
668
|
+
issues.append("introduction should state the root mechanism or explanation behind the gap")
|
|
571
669
|
|
|
572
670
|
|
|
573
671
|
def check_related_work(text: str, issues: list[str]):
|
|
@@ -592,6 +690,8 @@ def check_method(text: str, issues: list[str]):
|
|
|
592
690
|
issues.append("method should explain the concrete design")
|
|
593
691
|
if not contains_any(text, ("advantage", "benefit", "improves", "优势", "收益")):
|
|
594
692
|
issues.append("method should explain the technical advantage")
|
|
693
|
+
if not has_mechanism_explanation(text):
|
|
694
|
+
issues.append("method should present design choices as consequences of the core insight or mechanism, not as an API-style module list")
|
|
595
695
|
|
|
596
696
|
|
|
597
697
|
def check_experiments(text: str, issues: list[str]):
|
|
@@ -621,6 +721,8 @@ def check_experiments(text: str, issues: list[str]):
|
|
|
621
721
|
),
|
|
622
722
|
):
|
|
623
723
|
issues.append("experiments should include benchmark scene notes")
|
|
724
|
+
if not has_diagnostic_interpretation(text):
|
|
725
|
+
issues.append("experiments should interpret results as diagnostic evidence for the paper's mechanism or insight, not only restate table values")
|
|
624
726
|
|
|
625
727
|
|
|
626
728
|
def check_conclusion(text: str, issues: list[str]):
|
|
@@ -628,6 +730,23 @@ def check_conclusion(text: str, issues: list[str]):
|
|
|
628
730
|
issues.append("conclusion should state at least one limitation or boundary")
|
|
629
731
|
if not contains_any(text, ("future work", "next step", "future direction", "下一步", "未来工作")):
|
|
630
732
|
issues.append("conclusion should state one next step or future direction")
|
|
733
|
+
if not contains_any(
|
|
734
|
+
text,
|
|
735
|
+
(
|
|
736
|
+
"broader principle",
|
|
737
|
+
"suggests",
|
|
738
|
+
"indicates",
|
|
739
|
+
"implies",
|
|
740
|
+
"takeaway",
|
|
741
|
+
"principle",
|
|
742
|
+
"更广泛",
|
|
743
|
+
"表明",
|
|
744
|
+
"意味着",
|
|
745
|
+
"启示",
|
|
746
|
+
"原则",
|
|
747
|
+
),
|
|
748
|
+
):
|
|
749
|
+
issues.append("conclusion should state the broader principle or takeaway implied by the evidence")
|
|
631
750
|
|
|
632
751
|
|
|
633
752
|
SECTION_CHECKS = {
|