superlab 0.1.50 → 0.1.52

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/README.md CHANGED
@@ -327,8 +327,8 @@ If `paper_template_root` is configured, `/lab:write` should inspect that templat
327
327
  If no template is configured, the first manuscript-writing round should ask once whether to continue with the managed default LaTeX scaffold or attach a template directory first.
328
328
  If the user approves the default scaffold, persist that choice in `.lab/config/workflow.json` and stop asking on ordinary rounds.
329
329
  Ordinary manuscript drafting rounds should follow `workflow_language`.
330
- If `workflow_language` and `paper_language` differ, `/lab:write` should preserve a readable workflow-language deliverable first, then the first final-draft or export round should ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, then persist that decision.
331
- The workflow-language deliverable is a real reading copy, not a review layer, and should stay persisted until it is explicitly refreshed.
330
+ If `workflow_language` and `paper_language` differ, `/lab:write` should preserve a full workflow-language paper layer first, then the first final-draft or export round should ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, then persist that decision.
331
+ The workflow-language paper layer is a real LaTeX mirror of the paper, not a review layer, and should stay persisted until it is explicitly refreshed.
332
332
  At the final export or final-draft boundary, if the project is still on the default scaffold and no attached template exists, ask one final reminder question before finalizing.
333
333
  For final-draft or export rounds, `/lab:write` should materialize real LaTeX tables, figure placeholders with figure intent, a non-empty `references.bib`, and pass `.lab/.managed/scripts/validate_manuscript_delivery.py --paper-dir <deliverables_root>/paper` before stopping.
334
334
 
@@ -7,6 +7,7 @@ const {
7
7
  isMeaningful,
8
8
  normalizeList,
9
9
  normalizeScalar,
10
+ parseDurationMs,
10
11
  parseInteger,
11
12
  readFileIfExists,
12
13
  readWorkflowConfig,
@@ -29,6 +30,11 @@ const CAMPAIGN_KIND_DEFAULT_STAGES = {
29
30
  "experiment-loop": ["run", "iterate", "review", "report"],
30
31
  "report-polish": ["review", "report", "write"],
31
32
  };
33
+ const LONG_POLL_AUTO_STAGES = new Set(["run", "iterate"]);
34
+ const DEFAULT_SHORT_POLL_INTERVAL_MS = 15 * 1000;
35
+ const DEFAULT_LONG_POLL_INTERVAL_MS = 2 * 60 * 1000;
36
+ const DEFAULT_SHORT_PROGRESS_REPORT_INTERVAL_MS = 2 * 60 * 1000;
37
+ const DEFAULT_LONG_PROGRESS_REPORT_INTERVAL_MS = 10 * 60 * 1000;
32
38
  const FROZEN_CORE_ALIASES = {
33
39
  mission: [path.join(".lab", "context", "mission.md")],
34
40
  framing: [
@@ -539,6 +545,22 @@ function resolveStageCommand(mode, stage, commandOverride = "") {
539
545
  return isMeaningful(commandOverride) ? commandOverride : mode.stageCommands[stage];
540
546
  }
541
547
 
548
+ function resolveAutoPollIntervalMs({ configuredPollInterval = "", stage = "" }) {
549
+ const normalizedStage = normalizeScalar(stage).toLowerCase();
550
+ const defaultMs = LONG_POLL_AUTO_STAGES.has(normalizedStage)
551
+ ? DEFAULT_LONG_POLL_INTERVAL_MS
552
+ : DEFAULT_SHORT_POLL_INTERVAL_MS;
553
+ return parseDurationMs(configuredPollInterval, defaultMs);
554
+ }
555
+
556
+ function resolveAutoProgressReportIntervalMs({ configuredProgressReportInterval = "", stage = "" }) {
557
+ const normalizedStage = normalizeScalar(stage).toLowerCase();
558
+ const defaultMs = LONG_POLL_AUTO_STAGES.has(normalizedStage)
559
+ ? DEFAULT_LONG_PROGRESS_REPORT_INTERVAL_MS
560
+ : DEFAULT_SHORT_PROGRESS_REPORT_INTERVAL_MS;
561
+ return parseDurationMs(configuredProgressReportInterval, defaultMs);
562
+ }
563
+
542
564
  module.exports = {
543
565
  ALLOWED_AUTO_STAGES,
544
566
  AUTO_LEVEL_STAGE_ENVELOPES,
@@ -558,6 +580,8 @@ module.exports = {
558
580
  inferCampaignKind,
559
581
  isLocalProcessAlive,
560
582
  normalizeRequestedAutoContract,
583
+ resolveAutoPollIntervalMs,
584
+ resolveAutoProgressReportIntervalMs,
561
585
  resolveRequestedAutonomyLevel,
562
586
  resolveFrozenCoreEntries,
563
587
  resolveStageCommand,
@@ -15,6 +15,8 @@ const {
15
15
  inferCampaignKind,
16
16
  isLocalProcessAlive,
17
17
  normalizeRequestedAutoContract,
18
+ resolveAutoPollIntervalMs,
19
+ resolveAutoProgressReportIntervalMs,
18
20
  resolveRequestedAutonomyLevel,
19
21
  resolveStageCommand,
20
22
  snapshotFrozenCore,
@@ -141,6 +143,20 @@ function makeCampaignId({ requested, now }) {
141
143
  return raw.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
142
144
  }
143
145
 
146
+ function formatDurationLabel(ms) {
147
+ if (ms % (60 * 1000) === 0) {
148
+ return `${ms / (60 * 1000)}m`;
149
+ }
150
+ if (ms % 1000 === 0) {
151
+ return `${ms / 1000}s`;
152
+ }
153
+ return `${ms}ms`;
154
+ }
155
+
156
+ function buildContinueBoundary({ stage, pollIntervalMs, progressReportIntervalMs }) {
157
+ return `Keep polling while the active owner is alive. Emit a user-facing progress update only on a meaningful change (stage or rung transition, new checkpoint or artifact, owner exit, stop or escalation match, or anomaly) or once every ${formatDurationLabel(progressReportIntervalMs)} as a keepalive; do not ask the user to trigger the next poll. Internal poll cadence for ${stage || "auto"} is ${formatDurationLabel(pollIntervalMs)} unless the contract overrides it.`;
158
+ }
159
+
144
160
  function archiveAutoArtifact(targetDir, relativePath, campaignId, now) {
145
161
  const absolutePath = path.join(targetDir, relativePath);
146
162
  if (!fs.existsSync(absolutePath)) {
@@ -184,6 +200,7 @@ function buildRolledOverAutoMode(mode, requested, now) {
184
200
  maxWallClockTime: mode.maxWallClockTime,
185
201
  maxFailures: mode.maxFailures,
186
202
  pollInterval: mode.pollInterval,
203
+ progressReportInterval: mode.progressReportInterval,
187
204
  stageCommands: {
188
205
  run: "",
189
206
  iterate: "",
@@ -554,7 +571,6 @@ async function startAutoMode({ targetDir, now = new Date(), requestedContract =
554
571
  writeAutoStatus(targetDir, status, { lang });
555
572
 
556
573
  const startedAt = status.startedAt;
557
- const pollIntervalMs = parseDurationMs(mode.pollInterval, 1000);
558
574
  const maxWallClockMs = parseDurationMs(mode.maxWallClockTime, 60 * 60 * 1000);
559
575
  const deadlineMs = Date.now() + maxWallClockMs;
560
576
  const maxFailures = parseInteger(mode.maxFailures, 0);
@@ -572,6 +588,14 @@ async function startAutoMode({ targetDir, now = new Date(), requestedContract =
572
588
  let stopReason = "";
573
589
  let finalRung = "";
574
590
  const campaignId = resumePlan?.campaignId || `auto-${startedAt.replace(/[:.]/g, "-")}`;
591
+ const initialPollIntervalMs = resolveAutoPollIntervalMs({
592
+ configuredPollInterval: mode.pollInterval,
593
+ stage: status.currentStage,
594
+ });
595
+ const initialProgressReportIntervalMs = resolveAutoProgressReportIntervalMs({
596
+ configuredProgressReportInterval: mode.progressReportInterval,
597
+ stage: status.currentStage,
598
+ });
575
599
  let currentLedger = {
576
600
  campaignId,
577
601
  objective: mode.objective,
@@ -587,7 +611,11 @@ async function startAutoMode({ targetDir, now = new Date(), requestedContract =
587
611
  lastCheckpoint: resumePlan?.lastCheckpoint || "",
588
612
  checkpointSummary: resumePlan?.reason || "auto loop armed and waiting for the first owned command",
589
613
  nextTransition: resumePlan?.rungId || "",
590
- continueBoundary: "Continue while the active owner is still running and no stop condition has matched.",
614
+ continueBoundary: buildContinueBoundary({
615
+ stage: status.currentStage,
616
+ pollIntervalMs: initialPollIntervalMs,
617
+ progressReportIntervalMs: initialProgressReportIntervalMs,
618
+ }),
591
619
  stopBoundary: mode.stopConditions,
592
620
  escalationBoundary: mode.escalationConditions,
593
621
  requiredReadSet: ".lab/context/eval-protocol.md, .lab/context/auto-mode.md, .lab/context/auto-status.md, .lab/context/auto-ledger.md, .lab/context/auto-outcome.md",
@@ -707,6 +735,14 @@ async function startAutoMode({ targetDir, now = new Date(), requestedContract =
707
735
  while (!stageCompleted) {
708
736
  try {
709
737
  const contract = stageContractSnapshot(targetDir, stage);
738
+ const pollIntervalMs = resolveAutoPollIntervalMs({
739
+ configuredPollInterval: mode.pollInterval,
740
+ stage,
741
+ });
742
+ const progressReportIntervalMs = resolveAutoProgressReportIntervalMs({
743
+ configuredProgressReportInterval: mode.progressReportInterval,
744
+ stage,
745
+ });
710
746
  await runCommandWithPolling({
711
747
  targetDir,
712
748
  stage,
@@ -720,7 +756,15 @@ async function startAutoMode({ targetDir, now = new Date(), requestedContract =
720
756
  watchTarget,
721
757
  nextRung,
722
758
  ownerInfo: { ownerType: "local-process" },
723
- updateLedger: writeLedger,
759
+ updateLedger: (overrides = {}) =>
760
+ writeLedger({
761
+ continueBoundary: buildContinueBoundary({
762
+ stage,
763
+ pollIntervalMs,
764
+ progressReportIntervalMs,
765
+ }),
766
+ ...overrides,
767
+ }),
724
768
  });
725
769
  verifyStageContract({ stage, snapshot: contract.snapshot });
726
770
  executedStages.push(stage);
@@ -816,7 +860,10 @@ async function startAutoMode({ targetDir, now = new Date(), requestedContract =
816
860
  targetDir,
817
861
  stage: "promotion",
818
862
  command: mode.promotionCommand,
819
- pollIntervalMs,
863
+ pollIntervalMs: resolveAutoPollIntervalMs({
864
+ configuredPollInterval: mode.pollInterval,
865
+ stage: "promotion",
866
+ }),
820
867
  deadlineMs,
821
868
  startedAt,
822
869
  status: currentStatus,
@@ -36,6 +36,7 @@ function parseAutoMode(targetDir) {
36
36
  maxWallClockTime: extractValue(text, ["Max wall-clock time", "最大运行时长"]),
37
37
  maxFailures: extractValue(text, ["Max failures", "最大失败次数"]),
38
38
  pollInterval: extractValue(text, ["Poll interval", "轮询间隔"]),
39
+ progressReportInterval: extractValue(text, ["Progress report interval", "进度汇报间隔"]),
39
40
  stageCommands: {
40
41
  run: extractValue(text, ["Run command", "运行命令"]),
41
42
  iterate: extractValue(text, ["Iterate command", "迭代命令"]),
package/lib/i18n.cjs CHANGED
@@ -1598,6 +1598,9 @@ const ZH_SKILL_FILES = {
1598
1598
  - Max wall-clock time:
1599
1599
  - Max failures:
1600
1600
  - Poll interval:
1601
+ - 如果 \`Poll interval\` 留空,使用保守默认值:\`run\`/\`iterate\` 每 \`2m\` 轮询一次,其他 auto 轮询默认 \`15s\`。
1602
+ - Progress report interval:
1603
+ - 如果 \`Progress report interval\` 留空,只在出现有意义变化时对用户汇报;如果一直没有新变化,则 \`run\`/\`iterate\` 最多每 \`10m\` 发一次保活更新,其他 auto 轮询最多每 \`2m\` 发一次保活更新。
1601
1604
 
1602
1605
  ## 阶段命令
1603
1606
 
@@ -2023,7 +2026,9 @@ ZH_CONTENT[path.join(".codex", "skills", "lab", "stages", "write.md")] = `# \`/l
2023
2026
  - 每轮只改一个 section 或一个明确子问题。
2024
2027
  - 最终稿必须是 LaTeX。
2025
2028
  - 普通起草轮次先跟随 \`workflow_language\`。
2026
- - 把可阅读的 workflow-language 交付稿当成正式持久化产物,而不是 review 层。
2029
+ - workflow-language 论文层当成正式持久化产物,而不是 review 层。
2030
+ - workflow-language 层必须是一套完整的 LaTeX 镜像,至少包含 \`workflow-language/main.tex\`、\`workflow-language/references.bib\`、\`workflow-language/sections/*.tex\`、\`workflow-language/tables/*.tex\`、\`workflow-language/figures/*.tex\` 和 \`workflow-language/analysis/analysis-asset.tex\`。
2031
+ - 不要再把新的 workflow-language 输出写到已经废弃的 review 层路径,例如 \`docs/lab/paper/review_zh/\`。
2027
2032
  - 如果配置了 \`paper_template_root\`,先检查该模板目录,再按其结构起草论文。
2028
2033
  - 已接入的模板目录可能包含用户或上游修改,默认不要改模板文件。
2029
2034
  - 如果没有配置模板且 \`paper_template_decision\` 是 \`unconfirmed\`,在第一次起草 \`.tex\` 之前必须先追问一次:继续使用默认 LaTeX scaffold,还是先接入模板目录。
@@ -2033,12 +2038,12 @@ ZH_CONTENT[path.join(".codex", "skills", "lab", "stages", "write.md")] = `# \`/l
2033
2038
  - 如果当前是最终导出或最终定稿轮次、\`paper_template_root\` 仍为空、\`paper_template_decision\` 是 \`default-scaffold\`,且 \`paper_template_final_reminder_acknowledged\` 是 \`false\`,就在最终定稿前再提醒一次是否切到模板。
2034
2039
  - 如果用户在最终提醒里仍确认继续使用默认 scaffold,就把 \`paper_template_final_reminder_acknowledged\` 持久化为 \`true\`。
2035
2040
  - 普通 manuscript 起草轮次虽然也是 LaTeX,但普通 \`.tex\` section 草稿必须先跟随 \`workflow_language\`,不要把 \`paper_language\` 当成默认草稿语言。
2036
- - 如果当前是最终导出或最终定稿轮次,且 \`workflow_language\` 与 \`paper_language\` 不一致、\`paper_language_finalization_decision\` 还是 \`unconfirmed\`,就先完成并保留 workflow-language 交付稿,再追问一次:保持当前 workflow language,还是把 canonical manuscript 转换成 \`paper_language\`。
2041
+ - 如果当前是最终导出或最终定稿轮次,且 \`workflow_language\` 与 \`paper_language\` 不一致、\`paper_language_finalization_decision\` 还是 \`unconfirmed\`,就先完成并保留 workflow-language 论文层,再追问一次:保持当前 workflow language,还是把 canonical manuscript 转换成 \`paper_language\`。
2037
2042
  - 如果用户选择保持当前 workflow language,就把 \`paper_language_finalization_decision\` 持久化成 \`keep-workflow-language\`。
2038
2043
  - 如果用户选择转换成最终论文语言,就把 \`paper_language_finalization_decision\` 持久化成 \`convert-to-paper-language\`。
2039
2044
  - 如果 \`workflow_language\` 与 \`paper_language\` 不一致,就不要在确认前先把最终论文正文改写成 \`paper_language\`;必须先追问、再持久化、再改稿。
2040
- - 如果 \`workflow_language\` 与 \`paper_language\` 不一致,就要在最新 write iteration artifact 里记录工作流语言、论文语言、最终语言决定、为什么这样决定,以及 workflow-language 交付稿路径。
2041
- - 如果 \`paper_language_finalization_decision\` 是 \`convert-to-paper-language\`,在接受最终定稿前必须保留 workflow-language 交付稿,并把 canonical manuscript 转换到 \`paper_language\`。
2045
+ - 如果 \`workflow_language\` 与 \`paper_language\` 不一致,就要在最新 write iteration artifact 里记录工作流语言、论文语言、最终语言决定、为什么这样决定,以及 workflow-language 论文层路径。
2046
+ - 如果 \`paper_language_finalization_decision\` 是 \`convert-to-paper-language\`,在接受最终定稿前必须保留 workflow-language 论文层,并把 canonical manuscript 转换到 \`paper_language\`。
2042
2047
  - 把 \`.lab/writing/terminology-glossary.md\` 当成写作期 glossary,用来沉淀全称、批准缩写、对外解释和可接受别名;它和 \`.lab/context/terminology-lock.md\` 的职责不同,不能混用。
2043
2048
  - 无论当前语言是什么,都要满足同一套学术可读性标准;如果本轮引入或改写了关键术语、缩写、指标名、机制名或系统标签,就在首次出现时顺手说明它是什么、为什么在这里重要。
2044
2049
  - 第一次出现先写全称;如果后面要复用简称或缩写,就在首次出现时定义。
@@ -2181,7 +2186,7 @@ ZH_CONTENT[path.join(".codex", "prompts", "lab-data.md")] = codexPrompt(
2181
2186
  ZH_CONTENT[path.join(".codex", "prompts", "lab-auto.md")] = codexPrompt(
2182
2187
  "在已批准边界内编排自动实验循环",
2183
2188
  "auto mode objective",
2184
- "使用已安装的 `lab` 技能:`.codex/skills/lab/SKILL.md`。\n\n继续当前活动:`/lab-auto: 继续`。\n以最高执行级别继续当前活动:`/lab-auto: L3,继续`。\n\n立刻针对用户当前给出的参数执行 `/lab:auto`,不要只推荐别的 `/lab` 阶段。只有在缺少阻塞性前提时,才明确指出缺什么,并且一次最多追问一个问题。\n\n先把用户请求规范化成可交给 CLI 的 auto contract 字段:objective、autonomy level、campaign kind、allowed stages,以及任何不改变范围就能明确的 terminal-goal 提示。\n如果用户没写级别,默认按 `L2` 处理;接受 `L1/L2/L3`、`l1/l2/l3` 这类短写,`最高级别`、`最高自治` 也按 `L3` 处理。\n如果用户只写了 `继续`,且当前已有 active 或可恢复 campaign,就直接继承当前 campaign 的级别,而不是要求用户重复写。\n如果你想沿用 runtime 里已存的 campaign 级别继续,就直接写 `/lab-auto: 继续`。\n只有当级别本身真的有歧义时,才停下来追问,例如 `第三层`、`phase 3`、`table 3`。\n已批准的 `L2` 和 `L3` 执行 campaign 默认进入执行模式。\n在执行模式里,不要进入 brainstorming,不要进入 spec review,也不要为了常规实现路径选择、helper script、路径修正、数据集适配、同 family 候选切换或普通自检而生成 reviewer、explorer 或其他子智能体循环。\n只有当用户明确要求设计或审阅帮助、contract fit 需要新 campaign,或 contract 的 escalation condition 明确要求独立复核时,才从执行模式切到设计或 reviewer 模式。\n你的第一步执行动作必须是对当前项目运行 `superlab auto start`,而不是自己直接改写 `.lab/context/auto-mode.md`、`.lab/context/auto-status.md`、`.lab/context/auto-ledger.md` 或 `.lab/context/auto-outcome.md`。\n把规范化后的字段通过 CLI 参数传下去,包括 `--objective`、`--campaign-kind`、`--allowed-stages`,以及在用户已明确或已隐含时传 `--autonomy-level`。\nCLI 返回后的 runtime 结果才是事实来源。如果 CLI 报 rollover、conflict、缺字段,或已经成功启动 campaign,就如实回报,不要绕过 CLI 自己做 prompt 侧写回。\n\n本命令运行 `/lab:auto` 阶段。它必须读取 `.lab/context/eval-protocol.md`、`.lab/context/auto-mode.md`、`.lab/context/auto-status.md`、`.lab/context/auto-ledger.md` 与 `.lab/context/auto-outcome.md`,先确认 autonomy level、approval status、terminal goal schema,以及 primary gate、secondary guard、promotion condition、stop reason、escalation reason,再把 eval-protocol 里的指标释义、主表计划、来源约束与结构化实验阶梯当作执行依据,在不修改 mission、framing 和核心 claims 的前提下编排已批准的 `run`、`iterate`、`review`、`report`,轮询长任务完成情况;如果声明了 rung,就保持会话活着并按 rung 转移继续推进。\n首个可见输出块必须是 `Auto preflight`。这个块必须列出已读取文件,并回显 `Autonomy level`、`Approval status`、`Allowed stages`、`Terminal goal`、`Primary gate` 和 `Secondary guard`,然后才能进入执行摘要或动作计划。\n如果 preflight 所需字段缺失、过期或彼此冲突,就必须在执行前停下,并明确指出到底是哪一个字段阻止了 loop 启动。\n当 loop 活着时,必须把当前 owner、观察状态、checkpoint 摘要、继续边界、停止边界和恢复读取集合写进 `.lab/context/auto-ledger.md`。\n如果仓库的 workflow language 是中文,摘要、清单条目、任务标签和进度更新都必须使用中文,除非某个文件路径、代码标识符或字面指标名必须保持原样。\n把 `Layer 3`、`Phase 1`、`Table 2` 这类表达视为论文范围目标;只有显式写成 `Autonomy level L3` 或 `自治级别 L3` 时,才把它当成执行权限级别。\n不要用 `sleep 30`、单次 `pgrep` 或一次性的 `metrics.json` 探针来代替真实长任务命令;当真实实验进程还活着时,只允许发进度更新并继续等待。"
2189
+ "使用已安装的 `lab` 技能:`.codex/skills/lab/SKILL.md`。\n\n继续当前活动:`/lab-auto: 继续`。\n以最高执行级别继续当前活动:`/lab-auto: L3,继续`。\n\n立刻针对用户当前给出的参数执行 `/lab:auto`,不要只推荐别的 `/lab` 阶段。只有在缺少阻塞性前提时,才明确指出缺什么,并且一次最多追问一个问题。\n\n先把用户请求规范化成可交给 CLI 的 auto contract 字段:objective、autonomy level、campaign kind、allowed stages,以及任何不改变范围就能明确的 terminal-goal 提示。\n如果用户没写级别,默认按 `L2` 处理;接受 `L1/L2/L3`、`l1/l2/l3` 这类短写,`最高级别`、`最高自治` 也按 `L3` 处理。\n如果用户只写了 `继续`,且当前已有 active 或可恢复 campaign,就直接继承当前 campaign 的级别,而不是要求用户重复写。\n如果你想沿用 runtime 里已存的 campaign 级别继续,就直接写 `/lab-auto: 继续`。\n只有当级别本身真的有歧义时,才停下来追问,例如 `第三层`、`phase 3`、`table 3`。\n已批准的 `L2` 和 `L3` 执行 campaign 默认进入执行模式。\n在执行模式里,不要进入 brainstorming,不要进入 spec review,也不要为了常规实现路径选择、helper script、路径修正、数据集适配、同 family 候选切换或普通自检而生成 reviewer、explorer 或其他子智能体循环。\n只有当用户明确要求设计或审阅帮助、contract fit 需要新 campaign,或 contract 的 escalation condition 明确要求独立复核时,才从执行模式切到设计或 reviewer 模式。\n你的第一步执行动作必须是对当前项目运行 `superlab auto start`,而不是自己直接改写 `.lab/context/auto-mode.md`、`.lab/context/auto-status.md`、`.lab/context/auto-ledger.md` 或 `.lab/context/auto-outcome.md`。\n把规范化后的字段通过 CLI 参数传下去,包括 `--objective`、`--campaign-kind`、`--allowed-stages`,以及在用户已明确或已隐含时传 `--autonomy-level`。\nCLI 返回后的 runtime 结果才是事实来源。如果 CLI 报 rollover、conflict、缺字段,或已经成功启动 campaign,就如实回报,不要绕过 CLI 自己做 prompt 侧写回。\n\n本命令运行 `/lab:auto` 阶段。它必须读取 `.lab/context/eval-protocol.md`、`.lab/context/auto-mode.md`、`.lab/context/auto-status.md`、`.lab/context/auto-ledger.md` 与 `.lab/context/auto-outcome.md`,先确认 autonomy level、approval status、terminal goal schema,以及 primary gate、secondary guard、promotion condition、stop reason、escalation reason,再把 eval-protocol 里的指标释义、主表计划、来源约束与结构化实验阶梯当作执行依据,在不修改 mission、framing 和核心 claims 的前提下编排已批准的 `run`、`iterate`、`review`、`report`,轮询长任务完成情况;如果声明了 rung,就保持会话活着并按 rung 转移继续推进。\n首个可见输出块必须是 `Auto preflight`。这个块必须列出已读取文件,并回显 `Autonomy level`、`Approval status`、`Allowed stages`、`Terminal goal`、`Primary gate` 和 `Secondary guard`,然后才能进入执行摘要或动作计划。\n如果 preflight 所需字段缺失、过期或彼此冲突,就必须在执行前停下,并明确指出到底是哪一个字段阻止了 loop 启动。\n当 loop 活着时,必须把当前 owner、观察状态、checkpoint 摘要、继续边界、停止边界和恢复读取集合写进 `.lab/context/auto-ledger.md`。\n如果仓库的 workflow language 是中文,摘要、清单条目、任务标签和进度更新都必须使用中文,除非某个文件路径、代码标识符或字面指标名必须保持原样。\n把 `Layer 3`、`Phase 1`、`Table 2` 这类表达视为论文范围目标;只有显式写成 `Autonomy level L3` 或 `自治级别 L3` 时,才把它当成执行权限级别。\n不要用 `sleep 30`、单次 `pgrep` 或一次性的 `metrics.json` 探针来代替真实长任务命令;当真实实验进程还活着时,只允许在出现有意义变化时发进度更新,并继续等待。没有新变化时,也只按保活节奏汇报,不要让用户触发下一次轮询。"
2185
2190
  );
2186
2191
 
2187
2192
  ZH_CONTENT[path.join(".claude", "commands", "lab.md")] = claudeCommand(
@@ -2202,7 +2207,7 @@ ZH_CONTENT[path.join(".claude", "commands", "lab-auto.md")] = claudeCommand(
2202
2207
  "lab-auto",
2203
2208
  "在已批准边界内编排自动实验循环",
2204
2209
  "auto mode objective",
2205
- "使用已安装的 `lab` 技能:`.claude/skills/lab/SKILL.md`。\n\n继续当前活动:`/lab-auto: 继续`。\n以最高执行级别继续当前活动:`/lab-auto: L3,继续`。\n\n立刻针对用户当前给出的参数执行 `auto` 阶段,不要只推荐别的 lab 阶段。只有在缺少阻塞性前提时,才明确指出缺什么,并且一次最多追问一个问题。\n\n先把用户请求规范化成可交给 CLI 的 auto contract 字段:objective、autonomy level、campaign kind、allowed stages,以及任何不改变范围就能明确的 terminal-goal 提示。\n如果用户没写级别,默认按 `L2` 处理;接受 `L1/L2/L3`、`l1/l2/l3` 这类短写,`最高级别`、`最高自治` 也按 `L3` 处理。\n如果用户只写了 `继续`,且当前已有 active 或可恢复 campaign,就直接继承当前 campaign 的级别,而不是要求用户重复写。\n如果你想沿用 runtime 里已存的 campaign 级别继续,就直接写 `/lab-auto: 继续`。\n只有当级别本身真的有歧义时,才停下来追问,例如 `第三层`、`phase 3`、`table 3`。\n已批准的 `L2` 和 `L3` 执行 campaign 默认进入执行模式。\n在执行模式里,不要进入 brainstorming,不要进入 spec review,也不要为了常规实现路径选择、helper script、路径修正、数据集适配、同 family 候选切换或普通自检而生成 reviewer、explorer 或其他子智能体循环。\n只有当用户明确要求设计或审阅帮助、contract fit 需要新 campaign,或 contract 的 escalation condition 明确要求独立复核时,才从执行模式切到设计或 reviewer 模式。\n你的第一步执行动作必须是对当前项目运行 `superlab auto start`,而不是自己直接改写 `.lab/context/auto-mode.md`、`.lab/context/auto-status.md`、`.lab/context/auto-ledger.md` 或 `.lab/context/auto-outcome.md`。\n把规范化后的字段通过 CLI 参数传下去,包括 `--objective`、`--campaign-kind`、`--allowed-stages`,以及在用户已明确或已隐含时传 `--autonomy-level`。\nCLI 返回后的 runtime 结果才是事实来源。如果 CLI 报 rollover、conflict、缺字段,或已经成功启动 campaign,就如实回报,不要绕过 CLI 自己做 prompt 侧写回。\n\n本命令运行 lab workflow 的 `auto` 阶段。它必须读取 `.lab/context/eval-protocol.md`、`.lab/context/auto-mode.md`、`.lab/context/auto-status.md`、`.lab/context/auto-ledger.md` 与 `.lab/context/auto-outcome.md`,先确认 autonomy level、approval status、terminal goal schema,以及 primary gate、secondary guard、promotion condition、stop reason、escalation reason,再把 eval-protocol 里的指标释义、主表计划、来源约束与结构化实验阶梯当作执行依据,在不修改 mission、framing 和核心 claims 的前提下编排已批准的 `run`、`iterate`、`review`、`report`,轮询长任务完成情况;如果声明了 rung,就保持会话活着并按 rung 转移继续推进。\n首个可见输出块必须是 `Auto preflight`。这个块必须列出已读取文件,并回显 `Autonomy level`、`Approval status`、`Allowed stages`、`Terminal goal`、`Primary gate` 和 `Secondary guard`,然后才能进入执行摘要或动作计划。\n如果 preflight 所需字段缺失、过期或彼此冲突,就必须在执行前停下,并明确指出到底是哪一个字段阻止了 loop 启动。\n当 loop 活着时,必须把当前 owner、观察状态、checkpoint 摘要、继续边界、停止边界和恢复读取集合写进 `.lab/context/auto-ledger.md`。\n如果仓库的 workflow language 是中文,摘要、清单条目、任务标签和进度更新都必须使用中文,除非某个文件路径、代码标识符或字面指标名必须保持原样。\n把 `Layer 3`、`Phase 1`、`Table 2` 这类表达视为论文范围目标;只有显式写成 `Autonomy level L3` 或 `自治级别 L3` 时,才把它当成执行权限级别。\n不要用 `sleep 30`、单次 `pgrep` 或一次性的 `metrics.json` 探针来代替真实长任务命令;当真实实验进程还活着时,只允许发进度更新并继续等待。"
2210
+ "使用已安装的 `lab` 技能:`.claude/skills/lab/SKILL.md`。\n\n继续当前活动:`/lab-auto: 继续`。\n以最高执行级别继续当前活动:`/lab-auto: L3,继续`。\n\n立刻针对用户当前给出的参数执行 `auto` 阶段,不要只推荐别的 lab 阶段。只有在缺少阻塞性前提时,才明确指出缺什么,并且一次最多追问一个问题。\n\n先把用户请求规范化成可交给 CLI 的 auto contract 字段:objective、autonomy level、campaign kind、allowed stages,以及任何不改变范围就能明确的 terminal-goal 提示。\n如果用户没写级别,默认按 `L2` 处理;接受 `L1/L2/L3`、`l1/l2/l3` 这类短写,`最高级别`、`最高自治` 也按 `L3` 处理。\n如果用户只写了 `继续`,且当前已有 active 或可恢复 campaign,就直接继承当前 campaign 的级别,而不是要求用户重复写。\n如果你想沿用 runtime 里已存的 campaign 级别继续,就直接写 `/lab-auto: 继续`。\n只有当级别本身真的有歧义时,才停下来追问,例如 `第三层`、`phase 3`、`table 3`。\n已批准的 `L2` 和 `L3` 执行 campaign 默认进入执行模式。\n在执行模式里,不要进入 brainstorming,不要进入 spec review,也不要为了常规实现路径选择、helper script、路径修正、数据集适配、同 family 候选切换或普通自检而生成 reviewer、explorer 或其他子智能体循环。\n只有当用户明确要求设计或审阅帮助、contract fit 需要新 campaign,或 contract 的 escalation condition 明确要求独立复核时,才从执行模式切到设计或 reviewer 模式。\n你的第一步执行动作必须是对当前项目运行 `superlab auto start`,而不是自己直接改写 `.lab/context/auto-mode.md`、`.lab/context/auto-status.md`、`.lab/context/auto-ledger.md` 或 `.lab/context/auto-outcome.md`。\n把规范化后的字段通过 CLI 参数传下去,包括 `--objective`、`--campaign-kind`、`--allowed-stages`,以及在用户已明确或已隐含时传 `--autonomy-level`。\nCLI 返回后的 runtime 结果才是事实来源。如果 CLI 报 rollover、conflict、缺字段,或已经成功启动 campaign,就如实回报,不要绕过 CLI 自己做 prompt 侧写回。\n\n本命令运行 lab workflow 的 `auto` 阶段。它必须读取 `.lab/context/eval-protocol.md`、`.lab/context/auto-mode.md`、`.lab/context/auto-status.md`、`.lab/context/auto-ledger.md` 与 `.lab/context/auto-outcome.md`,先确认 autonomy level、approval status、terminal goal schema,以及 primary gate、secondary guard、promotion condition、stop reason、escalation reason,再把 eval-protocol 里的指标释义、主表计划、来源约束与结构化实验阶梯当作执行依据,在不修改 mission、framing 和核心 claims 的前提下编排已批准的 `run`、`iterate`、`review`、`report`,轮询长任务完成情况;如果声明了 rung,就保持会话活着并按 rung 转移继续推进。\n首个可见输出块必须是 `Auto preflight`。这个块必须列出已读取文件,并回显 `Autonomy level`、`Approval status`、`Allowed stages`、`Terminal goal`、`Primary gate` 和 `Secondary guard`,然后才能进入执行摘要或动作计划。\n如果 preflight 所需字段缺失、过期或彼此冲突,就必须在执行前停下,并明确指出到底是哪一个字段阻止了 loop 启动。\n当 loop 活着时,必须把当前 owner、观察状态、checkpoint 摘要、继续边界、停止边界和恢复读取集合写进 `.lab/context/auto-ledger.md`。\n如果仓库的 workflow language 是中文,摘要、清单条目、任务标签和进度更新都必须使用中文,除非某个文件路径、代码标识符或字面指标名必须保持原样。\n把 `Layer 3`、`Phase 1`、`Table 2` 这类表达视为论文范围目标;只有显式写成 `Autonomy level L3` 或 `自治级别 L3` 时,才把它当成执行权限级别。\n不要用 `sleep 30`、单次 `pgrep` 或一次性的 `metrics.json` 探针来代替真实长任务命令;当真实实验进程还活着时,只允许在出现有意义变化时发进度更新,并继续等待。没有新变化时,也只按保活节奏汇报,不要让用户触发下一次轮询。"
2206
2211
  );
2207
2212
 
2208
2213
  const zhAutoPriorityCodexLine =
@@ -2865,12 +2870,12 @@ ZH_CONTENT[path.join(".codex", "skills", "lab", "stages", "auto.md")] = `# \`/la
2865
2870
  - 如果用户在最终提醒里仍确认继续使用默认 scaffold,就持久化 \`paper_template_final_reminder_acknowledged: true\`
2866
2871
  - 普通 \`write\` 起草轮次先跟随 \`workflow_language\`。
2867
2872
  - 普通 \`write\` 起草轮次里的 manuscript 仍然是 LaTeX,所以普通 manuscript \`.tex\` sections 也必须先保留在 \`workflow_language\`,还不是 \`paper_language\` 版本。
2868
- - 把可阅读的 workflow-language 交付稿当成正式持久化产物,而不是 review 层。
2869
- - 如果当前写作目标是最终导出、\`workflow_language\` 与 \`paper_language\` 不一致,且 \`paper_language_finalization_decision\` 还是 \`unconfirmed\`,就在最终定稿前先完成并保留 workflow-language 交付稿,再追问一次:保持当前 workflow language,还是转换成 \`paper_language\`
2873
+ - workflow-language 论文层当成正式持久化产物,而不是 review 层。
2874
+ - 如果当前写作目标是最终导出、\`workflow_language\` 与 \`paper_language\` 不一致,且 \`paper_language_finalization_decision\` 还是 \`unconfirmed\`,就在最终定稿前先完成并保留 workflow-language 论文层,再追问一次:保持当前 workflow language,还是转换成 \`paper_language\`
2870
2875
  - 如果用户选择保持当前语言,就持久化 \`paper_language_finalization_decision: keep-workflow-language\`
2871
2876
  - 如果用户选择转换,就持久化 \`paper_language_finalization_decision: convert-to-paper-language\`
2872
2877
  - 如果当前写作目标是最终导出,且语言不一致,就不要在追问前先把最终论文正文改成 \`paper_language\`;先问、先持久化,再改稿
2873
- - 如果当前写作目标是最终导出,且语言不一致,就在最新 write iteration 里记录语言决策审计:工作流语言、论文语言、最终语言决定、为什么这样决定,以及 workflow-language 交付稿路径
2878
+ - 如果当前写作目标是最终导出,且语言不一致,就在最新 write iteration 里记录语言决策审计:工作流语言、论文语言、最终语言决定、为什么这样决定,以及 workflow-language 论文层路径
2874
2879
  - 把 \`.lab/writing/terminology-glossary.md\` 当成写作期 glossary,用来沉淀全称、批准缩写、对外解释和可接受别名
2875
2880
  - 当循环推进 \`write\` 时,无论 workflow language 还是 paper language,都要满足同一套学术可读性标准;如果本轮引入或改写了关键术语、缩写、指标名、机制名或系统标签,就在首次出现时说明它是什么、为什么在这里重要
2876
2881
  - 当循环推进 \`write\` 时,第一次出现先写全称;如果后面要复用简称或缩写,就在首次出现时定义;一个概念只保留一个 paper-facing 名称,并尽量避免新造的连字符拼接标签
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "stage_prompt": {
3
- "codex_en": "This command runs the `/lab:write` stage. Use `.codex/skills/lab/stages/write.md` as the single source of truth for template choice, paper-plan requirements, section references, validator gates, asset coverage, and final manuscript rules. Read the matching paper-writing reference and any bundled example-bank files for the requested section, revise only one section, and keep draft rounds warning-only while final-draft or export rounds must satisfy the write-stage acceptance gates. Draft ordinary manuscript rounds in `workflow_language`, and ordinary `.tex` section drafts must stay in `workflow_language` instead of treating `paper_language` as the default draft language. Treat a readable workflow-language deliverable as a real persisted artifact rather than a review layer. Maintain `.lab/writing/terminology-glossary.md` as the write-stage glossary for full forms, approved short forms, reader-facing explanations, and aliases. Apply the same academic readability standard in every language: when the round introduces or revises key terms, abbreviations, metrics, mechanism names, or system labels, use the full form first, define any short form at first mention, explain what the term is and why it matters here, keep one natural-language paper-facing name per concept, use natural-language full names in prose, and do not use labels containing `_` or `-` in reader-facing prose. Keep internal identifiers out of reader-facing prose unless they are mapped once for the reader and then moved back out of prose, and record the terminology-clarity self-check in the write iteration artifact. If the manuscript would start from the managed scaffold and no template decision is recorded yet, ask once whether to keep the default scaffold or attach a template directory first. If finalization reaches a round where `workflow_language` and `paper_language` differ, finish and preserve the workflow-language deliverable first, then ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, persist that answer, record both the language decision and the workflow-language deliverable path in the latest write iteration, and only then edit the final manuscript in the chosen language.",
4
- "claude_en": "This command runs the `write` stage of the lab workflow. Use `.claude/skills/lab/stages/write.md` as the single source of truth for template choice, paper-plan requirements, section references, validator gates, asset coverage, and final manuscript rules. Read the matching paper-writing reference and any bundled example-bank files for the requested section, revise only one section, and keep draft rounds warning-only while final-draft or export rounds must satisfy the write-stage acceptance gates. Draft ordinary manuscript rounds in `workflow_language`, and ordinary `.tex` section drafts must stay in `workflow_language` instead of treating `paper_language` as the default draft language. Treat a readable workflow-language deliverable as a real persisted artifact rather than a review layer. Maintain `.lab/writing/terminology-glossary.md` as the write-stage glossary for full forms, approved short forms, reader-facing explanations, and aliases. Apply the same academic readability standard in every language: when the round introduces or revises key terms, abbreviations, metrics, mechanism names, or system labels, use the full form first, define any short form at first mention, explain what the term is and why it matters here, keep one natural-language paper-facing name per concept, use natural-language full names in prose, and do not use labels containing `_` or `-` in reader-facing prose. Keep internal identifiers out of reader-facing prose unless they are mapped once for the reader and then moved back out of prose, and record the terminology-clarity self-check in the write iteration artifact. If the manuscript would start from the managed scaffold and no template decision is recorded yet, ask once whether to keep the default scaffold or attach a template directory first. If finalization reaches a round where `workflow_language` and `paper_language` differ, finish and preserve the workflow-language deliverable first, then ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, persist that answer, record both the language decision and the workflow-language deliverable path in the latest write iteration, and only then edit the final manuscript in the chosen language.",
5
- "codex_zh": "本命令运行 `/lab:write` 阶段。把 `.codex/skills/lab/stages/write.md` 当成模板选择、paper-plan、section 参考、校验 gate、资产覆盖和最终 manuscript 规则的单一来源。读取与当前 section 对应的 paper-writing reference 和 bundled example-bank 文件,一次只修改一个 section;普通草稿轮次把写作校验当 warning,最终定稿或导出轮次必须满足 write-stage 的接受 gate。普通起草轮次先跟随 `workflow_language`,普通 `.tex` section 草稿也必须先停留在 `workflow_language`,不能把 `paper_language` 当成默认草稿语言,并把可阅读的 workflow-language 交付稿当成正式持久化产物,而不是 review 层。把 `.lab/writing/terminology-glossary.md` 作为写作期 glossary,用来沉淀全称、批准缩写、对外解释和可接受别名。无论当前语言是什么,都要满足同一套学术可读性标准:如果本轮引入或改写了关键术语、缩写、指标名、机制名或系统标签,就先写全称;如果后面要复用短写,就在首次出现时定义;同时说明它是什么、为什么在这里重要,保持一个概念只有一个 paper-facing 名称,并尽量避免新造的连字符拼接标签。内部标识符默认不要进入 reader-facing prose;若必须出现,只能在完成一次读者映射后使用,并把 terminology-clarity 自检写进 write iteration artifact。如果当前稿件将从托管默认 scaffold 开始,且还没有模板决定,就先追问一次:继续使用默认 scaffold,还是先接入模板目录。如果进入最终定稿时 `workflow_language` 与 `paper_language` 不一致,就先完成并保留 workflow-language 交付稿,再追问一次:保持当前语言,还是把 canonical manuscript 转成 `paper_language`;先持久化这个决定,再在最新 write iteration 里记录语言决策和 workflow-language 交付稿路径,最后才允许按该语言修改最终稿。",
6
- "claude_zh": "本命令运行 lab workflow 的 `write` 阶段。把 `.claude/skills/lab/stages/write.md` 当成模板选择、paper-plan、section 参考、校验 gate、资产覆盖和最终 manuscript 规则的单一来源。读取与当前 section 对应的 paper-writing reference 和 bundled example-bank 文件,一次只修改一个 section;普通草稿轮次把写作校验当 warning,最终定稿或导出轮次必须满足 write-stage 的接受 gate。普通起草轮次先跟随 `workflow_language`,普通 `.tex` section 草稿也必须先停留在 `workflow_language`,不能把 `paper_language` 当成默认草稿语言,并把可阅读的 workflow-language 交付稿当成正式持久化产物,而不是 review 层。把 `.lab/writing/terminology-glossary.md` 作为写作期 glossary,用来沉淀全称、批准缩写、对外解释和可接受别名。无论当前语言是什么,都要满足同一套学术可读性标准:如果本轮引入或改写了关键术语、缩写、指标名、机制名或系统标签,就先写全称;如果后面要复用短写,就在首次出现时定义;同时说明它是什么、为什么在这里重要,保持一个概念只有一个 paper-facing 名称,并尽量避免新造的连字符拼接标签。内部标识符默认不要进入 reader-facing prose;若必须出现,只能在完成一次读者映射后使用,并把 terminology-clarity 自检写进 write iteration artifact。如果当前稿件将从托管默认 scaffold 开始,且还没有模板决定,就先追问一次:继续使用默认 scaffold,还是先接入模板目录。如果进入最终定稿时 `workflow_language` 与 `paper_language` 不一致,就先完成并保留 workflow-language 交付稿,再追问一次:保持当前语言,还是把 canonical manuscript 转成 `paper_language`;先持久化这个决定,再在最新 write iteration 里记录语言决策和 workflow-language 交付稿路径,最后才允许按该语言修改最终稿。"
3
+ "codex_en": "This command runs the `/lab:write` stage. Use `.codex/skills/lab/stages/write.md` as the single source of truth for template choice, paper-plan requirements, section references, validator gates, asset coverage, and final manuscript rules. Read the matching paper-writing reference and any bundled example-bank files for the requested section, revise only one section, and keep draft rounds warning-only while final-draft or export rounds must satisfy the write-stage acceptance gates. Draft ordinary manuscript rounds in `workflow_language`, and ordinary `.tex` section drafts must stay in `workflow_language` instead of treating `paper_language` as the default draft language. Treat the workflow-language paper layer as a real persisted artifact rather than a review layer, and preserve it as a full LaTeX mirror with `workflow-language/main.tex`, `workflow-language/references.bib`, `workflow-language/sections/*.tex`, `workflow-language/tables/*.tex`, `workflow-language/figures/*.tex`, and `workflow-language/analysis/analysis-asset.tex`. Do not write new workflow-language output to deprecated review-layer paths such as `docs/lab/paper/review_zh/`. Maintain `.lab/writing/terminology-glossary.md` as the write-stage glossary for full forms, approved short forms, reader-facing explanations, and aliases. Apply the same academic readability standard in every language: when the round introduces or revises key terms, abbreviations, metrics, mechanism names, or system labels, use the full form first, define any short form at first mention, explain what the term is and why it matters here, keep one natural-language paper-facing name per concept, use natural-language full names in prose, and do not use labels containing `_` or `-` in reader-facing prose. Keep internal identifiers out of reader-facing prose unless they are mapped once for the reader and then moved back out of prose, and record the terminology-clarity self-check in the write iteration artifact. If the manuscript would start from the managed scaffold and no template decision is recorded yet, ask once whether to keep the default scaffold or attach a template directory first. If finalization reaches a round where `workflow_language` and `paper_language` differ, finish and preserve the workflow-language paper layer first, then ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, persist that answer, record both the language decision and the workflow-language paper-layer path in the latest write iteration, and only then edit the final manuscript in the chosen language.",
4
+ "claude_en": "This command runs the `write` stage of the lab workflow. Use `.claude/skills/lab/stages/write.md` as the single source of truth for template choice, paper-plan requirements, section references, validator gates, asset coverage, and final manuscript rules. Read the matching paper-writing reference and any bundled example-bank files for the requested section, revise only one section, and keep draft rounds warning-only while final-draft or export rounds must satisfy the write-stage acceptance gates. Draft ordinary manuscript rounds in `workflow_language`, and ordinary `.tex` section drafts must stay in `workflow_language` instead of treating `paper_language` as the default draft language. Treat the workflow-language paper layer as a real persisted artifact rather than a review layer, and preserve it as a full LaTeX mirror with `workflow-language/main.tex`, `workflow-language/references.bib`, `workflow-language/sections/*.tex`, `workflow-language/tables/*.tex`, `workflow-language/figures/*.tex`, and `workflow-language/analysis/analysis-asset.tex`. Do not write new workflow-language output to deprecated review-layer paths such as `docs/lab/paper/review_zh/`. Maintain `.lab/writing/terminology-glossary.md` as the write-stage glossary for full forms, approved short forms, reader-facing explanations, and aliases. Apply the same academic readability standard in every language: when the round introduces or revises key terms, abbreviations, metrics, mechanism names, or system labels, use the full form first, define any short form at first mention, explain what the term is and why it matters here, keep one natural-language paper-facing name per concept, use natural-language full names in prose, and do not use labels containing `_` or `-` in reader-facing prose. Keep internal identifiers out of reader-facing prose unless they are mapped once for the reader and then moved back out of prose, and record the terminology-clarity self-check in the write iteration artifact. If the manuscript would start from the managed scaffold and no template decision is recorded yet, ask once whether to keep the default scaffold or attach a template directory first. If finalization reaches a round where `workflow_language` and `paper_language` differ, finish and preserve the workflow-language paper layer first, then ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, persist that answer, record both the language decision and the workflow-language paper-layer path in the latest write iteration, and only then edit the final manuscript in the chosen language.",
5
+ "codex_zh": "本命令运行 `/lab:write` 阶段。把 `.codex/skills/lab/stages/write.md` 当成模板选择、paper-plan、section 参考、校验 gate、资产覆盖和最终 manuscript 规则的单一来源。读取与当前 section 对应的 paper-writing reference 和 bundled example-bank 文件,一次只修改一个 section;普通草稿轮次把写作校验当 warning,最终定稿或导出轮次必须满足 write-stage 的接受 gate。普通起草轮次先跟随 `workflow_language`,普通 `.tex` section 草稿也必须先停留在 `workflow_language`,不能把 `paper_language` 当成默认草稿语言,并把 workflow-language 论文层当成正式持久化产物,而不是 review 层。workflow-language 层必须是一套完整的 LaTeX 镜像,至少包含 `workflow-language/main.tex`、`workflow-language/references.bib`、`workflow-language/sections/*.tex`、`workflow-language/tables/*.tex`、`workflow-language/figures/*.tex` 和 `workflow-language/analysis/analysis-asset.tex`。不要再把新的 workflow-language 输出写到已经废弃的 review 层路径,例如 `docs/lab/paper/review_zh/`。把 `.lab/writing/terminology-glossary.md` 作为写作期 glossary,用来沉淀全称、批准缩写、对外解释和可接受别名。无论当前语言是什么,都要满足同一套学术可读性标准:如果本轮引入或改写了关键术语、缩写、指标名、机制名或系统标签,就先写全称;如果后面要复用短写,就在首次出现时定义;同时说明它是什么、为什么在这里重要,保持一个概念只有一个 paper-facing 名称,并尽量避免新造的连字符拼接标签。内部标识符默认不要进入 reader-facing prose;若必须出现,只能在完成一次读者映射后使用,并把 terminology-clarity 自检写进 write iteration artifact。如果当前稿件将从托管默认 scaffold 开始,且还没有模板决定,就先追问一次:继续使用默认 scaffold,还是先接入模板目录。如果进入最终定稿时 `workflow_language` 与 `paper_language` 不一致,就先完成并保留 workflow-language 论文层,再追问一次:保持当前语言,还是把 canonical manuscript 转成 `paper_language`;先持久化这个决定,再在最新 write iteration 里记录语言决策和 workflow-language 论文层路径,最后才允许按该语言修改最终稿。",
6
+ "claude_zh": "本命令运行 lab workflow 的 `write` 阶段。把 `.claude/skills/lab/stages/write.md` 当成模板选择、paper-plan、section 参考、校验 gate、资产覆盖和最终 manuscript 规则的单一来源。读取与当前 section 对应的 paper-writing reference 和 bundled example-bank 文件,一次只修改一个 section;普通草稿轮次把写作校验当 warning,最终定稿或导出轮次必须满足 write-stage 的接受 gate。普通起草轮次先跟随 `workflow_language`,普通 `.tex` section 草稿也必须先停留在 `workflow_language`,不能把 `paper_language` 当成默认草稿语言,并把 workflow-language 论文层当成正式持久化产物,而不是 review 层。workflow-language 层必须是一套完整的 LaTeX 镜像,至少包含 `workflow-language/main.tex`、`workflow-language/references.bib`、`workflow-language/sections/*.tex`、`workflow-language/tables/*.tex`、`workflow-language/figures/*.tex` 和 `workflow-language/analysis/analysis-asset.tex`。不要再把新的 workflow-language 输出写到已经废弃的 review 层路径,例如 `docs/lab/paper/review_zh/`。把 `.lab/writing/terminology-glossary.md` 作为写作期 glossary,用来沉淀全称、批准缩写、对外解释和可接受别名。无论当前语言是什么,都要满足同一套学术可读性标准:如果本轮引入或改写了关键术语、缩写、指标名、机制名或系统标签,就先写全称;如果后面要复用短写,就在首次出现时定义;同时说明它是什么、为什么在这里重要,保持一个概念只有一个 paper-facing 名称,并尽量避免新造的连字符拼接标签。内部标识符默认不要进入 reader-facing prose;若必须出现,只能在完成一次读者映射后使用,并把 terminology-clarity 自检写进 write iteration artifact。如果当前稿件将从托管默认 scaffold 开始,且还没有模板决定,就先追问一次:继续使用默认 scaffold,还是先接入模板目录。如果进入最终定稿时 `workflow_language` 与 `paper_language` 不一致,就先完成并保留 workflow-language 论文层,再追问一次:保持当前语言,还是把 canonical manuscript 转成 `paper_language`;先持久化这个决定,再在最新 write iteration 里记录语言决策和 workflow-language 论文层路径,最后才允许按该语言修改最终稿。"
7
7
  }
8
8
  }
@@ -7,4 +7,4 @@ argument-hint: section or writing target
7
7
  Use the installed `lab` skill at `.claude/skills/lab/SKILL.md`.
8
8
 
9
9
  Execute the requested `/lab-write` command against the user's argument now. Do not only recommend another lab stage. If a blocking prerequisite is missing, say exactly what is missing and ask at most one clarifying question.
10
- This command runs the `write` stage of the lab workflow. Use `.claude/skills/lab/stages/write.md` as the single source of truth for template choice, paper-plan requirements, section references, validator gates, asset coverage, and final manuscript rules. Read the matching paper-writing reference and any bundled example-bank files for the requested section, revise only one section, and keep draft rounds warning-only while final-draft or export rounds must satisfy the write-stage acceptance gates. Draft ordinary manuscript rounds in `workflow_language`, and ordinary `.tex` section drafts must stay in `workflow_language` instead of treating `paper_language` as the default draft language. Treat a readable workflow-language deliverable as a real persisted artifact rather than a review layer. Maintain `.lab/writing/terminology-glossary.md` as the write-stage glossary for full forms, approved short forms, reader-facing explanations, and aliases. Apply the same academic readability standard in every language: when the round introduces or revises key terms, abbreviations, metrics, mechanism names, or system labels, use the full form first, define any short form at first mention, explain what the term is and why it matters here, keep one natural-language paper-facing name per concept, use natural-language full names in prose, and do not use labels containing `_` or `-` in reader-facing prose. Keep internal identifiers out of reader-facing prose unless they are mapped once for the reader and then moved back out of prose, and record the terminology-clarity self-check in the write iteration artifact. If the manuscript would start from the managed scaffold and no template decision is recorded yet, ask once whether to keep the default scaffold or attach a template directory first. If finalization reaches a round where `workflow_language` and `paper_language` differ, finish and preserve the workflow-language deliverable first, then ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, persist that answer, record both the language decision and the workflow-language deliverable path in the latest write iteration, and only then edit the final manuscript in the chosen language.
10
+ This command runs the `write` stage of the lab workflow. Use `.claude/skills/lab/stages/write.md` as the single source of truth for template choice, paper-plan requirements, section references, validator gates, asset coverage, and final manuscript rules. Read the matching paper-writing reference and any bundled example-bank files for the requested section, revise only one section, and keep draft rounds warning-only while final-draft or export rounds must satisfy the write-stage acceptance gates. Draft ordinary manuscript rounds in `workflow_language`, and ordinary `.tex` section drafts must stay in `workflow_language` instead of treating `paper_language` as the default draft language. Treat the workflow-language paper layer as a real persisted artifact rather than a review layer, and preserve it as a full LaTeX mirror with `workflow-language/main.tex`, `workflow-language/references.bib`, `workflow-language/sections/*.tex`, `workflow-language/tables/*.tex`, `workflow-language/figures/*.tex`, and `workflow-language/analysis/analysis-asset.tex`. Do not write new workflow-language output to deprecated review-layer paths such as `docs/lab/paper/review_zh/`. Maintain `.lab/writing/terminology-glossary.md` as the write-stage glossary for full forms, approved short forms, reader-facing explanations, and aliases. Apply the same academic readability standard in every language: when the round introduces or revises key terms, abbreviations, metrics, mechanism names, or system labels, use the full form first, define any short form at first mention, explain what the term is and why it matters here, keep one natural-language paper-facing name per concept, use natural-language full names in prose, and do not use labels containing `_` or `-` in reader-facing prose. Keep internal identifiers out of reader-facing prose unless they are mapped once for the reader and then moved back out of prose, and record the terminology-clarity self-check in the write iteration artifact. If the manuscript would start from the managed scaffold and no template decision is recorded yet, ask once whether to keep the default scaffold or attach a template directory first. If finalization reaches a round where `workflow_language` and `paper_language` differ, finish and preserve the workflow-language paper layer first, then ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, persist that answer, record both the language decision and the workflow-language paper-layer path in the latest write iteration, and only then edit the final manuscript in the chosen language.
@@ -7,4 +7,4 @@ argument-hint: section or writing target
7
7
  Use the installed `lab` skill at `.claude/skills/lab/SKILL.md`.
8
8
 
9
9
  Execute the requested `/lab-write` command against the user's argument now. Do not only recommend another lab stage. If a blocking prerequisite is missing, say exactly what is missing and ask at most one clarifying question.
10
- This command runs the `write` stage of the lab workflow. Use `.claude/skills/lab/stages/write.md` as the single source of truth for template choice, paper-plan requirements, section references, validator gates, asset coverage, and final manuscript rules. Read the matching paper-writing reference and any bundled example-bank files for the requested section, revise only one section, and keep draft rounds warning-only while final-draft or export rounds must satisfy the write-stage acceptance gates. Draft ordinary manuscript rounds in `workflow_language`, and ordinary `.tex` section drafts must stay in `workflow_language` instead of treating `paper_language` as the default draft language. Treat a readable workflow-language deliverable as a real persisted artifact rather than a review layer. Maintain `.lab/writing/terminology-glossary.md` as the write-stage glossary for full forms, approved short forms, reader-facing explanations, and aliases. Apply the same academic readability standard in every language: when the round introduces or revises key terms, abbreviations, metrics, mechanism names, or system labels, use the full form first, define any short form at first mention, explain what the term is and why it matters here, keep one natural-language paper-facing name per concept, use natural-language full names in prose, and do not use labels containing `_` or `-` in reader-facing prose. Keep internal identifiers out of reader-facing prose unless they are mapped once for the reader and then moved back out of prose, and record the terminology-clarity self-check in the write iteration artifact. If the manuscript would start from the managed scaffold and no template decision is recorded yet, ask once whether to keep the default scaffold or attach a template directory first. If finalization reaches a round where `workflow_language` and `paper_language` differ, finish and preserve the workflow-language deliverable first, then ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, persist that answer, record both the language decision and the workflow-language deliverable path in the latest write iteration, and only then edit the final manuscript in the chosen language.
10
+ This command runs the `write` stage of the lab workflow. Use `.claude/skills/lab/stages/write.md` as the single source of truth for template choice, paper-plan requirements, section references, validator gates, asset coverage, and final manuscript rules. Read the matching paper-writing reference and any bundled example-bank files for the requested section, revise only one section, and keep draft rounds warning-only while final-draft or export rounds must satisfy the write-stage acceptance gates. Draft ordinary manuscript rounds in `workflow_language`, and ordinary `.tex` section drafts must stay in `workflow_language` instead of treating `paper_language` as the default draft language. Treat the workflow-language paper layer as a real persisted artifact rather than a review layer, and preserve it as a full LaTeX mirror with `workflow-language/main.tex`, `workflow-language/references.bib`, `workflow-language/sections/*.tex`, `workflow-language/tables/*.tex`, `workflow-language/figures/*.tex`, and `workflow-language/analysis/analysis-asset.tex`. Do not write new workflow-language output to deprecated review-layer paths such as `docs/lab/paper/review_zh/`. Maintain `.lab/writing/terminology-glossary.md` as the write-stage glossary for full forms, approved short forms, reader-facing explanations, and aliases. Apply the same academic readability standard in every language: when the round introduces or revises key terms, abbreviations, metrics, mechanism names, or system labels, use the full form first, define any short form at first mention, explain what the term is and why it matters here, keep one natural-language paper-facing name per concept, use natural-language full names in prose, and do not use labels containing `_` or `-` in reader-facing prose. Keep internal identifiers out of reader-facing prose unless they are mapped once for the reader and then moved back out of prose, and record the terminology-clarity self-check in the write iteration artifact. If the manuscript would start from the managed scaffold and no template decision is recorded yet, ask once whether to keep the default scaffold or attach a template directory first. If finalization reaches a round where `workflow_language` and `paper_language` differ, finish and preserve the workflow-language paper layer first, then ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, persist that answer, record both the language decision and the workflow-language paper-layer path in the latest write iteration, and only then edit the final manuscript in the chosen language.
@@ -98,6 +98,8 @@ Treat all of these as equivalent stage requests:
98
98
  - That first visible output must show files read plus `Autonomy level`, `Allowed stages`, `Terminal goal`, `Primary gate`, and `Secondary guard`.
99
99
  - If the preflight block cannot be completed from `.lab/context/eval-protocol.md`, `.lab/context/auto-mode.md`, `.lab/context/auto-status.md`, `.lab/context/auto-ledger.md`, and `.lab/context/auto-outcome.md`, `/lab auto` should stop instead of acting like the loop is armed.
100
100
  - While the loop is alive, `/lab auto` should keep `.lab/context/auto-ledger.md` updated with the active owner, observed state, and resume boundary.
101
+ - Separate internal polling from user-facing progress reports.
102
+ - While the loop is healthy, `/lab auto` should report to the user only on a meaningful change or at the keepalive cadence recorded in the current contract or runtime state, and it should not ask the user to trigger the next poll.
101
103
 
102
104
  - Treat `Autonomy level L1/L2/L3` as the execution privilege level, not as a paper layer, phase, or table number.
103
105
  - Treat `paper layer`, `phase`, and `table` as experiment targets. For example, `paper layer 3` or `Phase 1` should not be interpreted as `Autonomy level L3`.
@@ -7,4 +7,4 @@ argument-hint: section or writing target
7
7
  Use the installed `lab` skill at `.claude/skills/lab/SKILL.md`.
8
8
 
9
9
  Execute the requested `/lab-write` command against the user's argument now. Do not only recommend another lab stage. If a blocking prerequisite is missing, say exactly what is missing and ask at most one clarifying question.
10
- This command runs the `write` stage of the lab workflow. Use `.claude/skills/lab/stages/write.md` as the single source of truth for template choice, paper-plan requirements, section references, validator gates, asset coverage, and final manuscript rules. Read the matching paper-writing reference and any bundled example-bank files for the requested section, revise only one section, and keep draft rounds warning-only while final-draft or export rounds must satisfy the write-stage acceptance gates. Draft ordinary manuscript rounds in `workflow_language`, and ordinary `.tex` section drafts must stay in `workflow_language` instead of treating `paper_language` as the default draft language. Treat a readable workflow-language deliverable as a real persisted artifact rather than a review layer. Maintain `.lab/writing/terminology-glossary.md` as the write-stage glossary for full forms, approved short forms, reader-facing explanations, and aliases. Apply the same academic readability standard in every language: when the round introduces or revises key terms, abbreviations, metrics, mechanism names, or system labels, use the full form first, define any short form at first mention, explain what the term is and why it matters here, keep one natural-language paper-facing name per concept, use natural-language full names in prose, and do not use labels containing `_` or `-` in reader-facing prose. Keep internal identifiers out of reader-facing prose unless they are mapped once for the reader and then moved back out of prose, and record the terminology-clarity self-check in the write iteration artifact. If the manuscript would start from the managed scaffold and no template decision is recorded yet, ask once whether to keep the default scaffold or attach a template directory first. If finalization reaches a round where `workflow_language` and `paper_language` differ, finish and preserve the workflow-language deliverable first, then ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, persist that answer, record both the language decision and the workflow-language deliverable path in the latest write iteration, and only then edit the final manuscript in the chosen language.
10
+ This command runs the `write` stage of the lab workflow. Use `.claude/skills/lab/stages/write.md` as the single source of truth for template choice, paper-plan requirements, section references, validator gates, asset coverage, and final manuscript rules. Read the matching paper-writing reference and any bundled example-bank files for the requested section, revise only one section, and keep draft rounds warning-only while final-draft or export rounds must satisfy the write-stage acceptance gates. Draft ordinary manuscript rounds in `workflow_language`, and ordinary `.tex` section drafts must stay in `workflow_language` instead of treating `paper_language` as the default draft language. Treat the workflow-language paper layer as a real persisted artifact rather than a review layer, and preserve it as a full LaTeX mirror with `workflow-language/main.tex`, `workflow-language/references.bib`, `workflow-language/sections/*.tex`, `workflow-language/tables/*.tex`, `workflow-language/figures/*.tex`, and `workflow-language/analysis/analysis-asset.tex`. Do not write new workflow-language output to deprecated review-layer paths such as `docs/lab/paper/review_zh/`. Maintain `.lab/writing/terminology-glossary.md` as the write-stage glossary for full forms, approved short forms, reader-facing explanations, and aliases. Apply the same academic readability standard in every language: when the round introduces or revises key terms, abbreviations, metrics, mechanism names, or system labels, use the full form first, define any short form at first mention, explain what the term is and why it matters here, keep one natural-language paper-facing name per concept, use natural-language full names in prose, and do not use labels containing `_` or `-` in reader-facing prose. Keep internal identifiers out of reader-facing prose unless they are mapped once for the reader and then moved back out of prose, and record the terminology-clarity self-check in the write iteration artifact. If the manuscript would start from the managed scaffold and no template decision is recorded yet, ask once whether to keep the default scaffold or attach a template directory first. If finalization reaches a round where `workflow_language` and `paper_language` differ, finish and preserve the workflow-language paper layer first, then ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, persist that answer, record both the language decision and the workflow-language paper-layer path in the latest write iteration, and only then edit the final manuscript in the chosen language.
@@ -7,4 +7,4 @@ argument-hint: section or writing target
7
7
  Use the installed `lab` skill at `.claude/skills/lab/SKILL.md`.
8
8
 
9
9
  Execute the requested `/lab-write` command against the user's argument now. Do not only recommend another lab stage. If a blocking prerequisite is missing, say exactly what is missing and ask at most one clarifying question.
10
- This command runs the `write` stage of the lab workflow. Use `.claude/skills/lab/stages/write.md` as the single source of truth for template choice, paper-plan requirements, section references, validator gates, asset coverage, and final manuscript rules. Read the matching paper-writing reference and any bundled example-bank files for the requested section, revise only one section, and keep draft rounds warning-only while final-draft or export rounds must satisfy the write-stage acceptance gates. Draft ordinary manuscript rounds in `workflow_language`, and ordinary `.tex` section drafts must stay in `workflow_language` instead of treating `paper_language` as the default draft language. Treat a readable workflow-language deliverable as a real persisted artifact rather than a review layer. Maintain `.lab/writing/terminology-glossary.md` as the write-stage glossary for full forms, approved short forms, reader-facing explanations, and aliases. Apply the same academic readability standard in every language: when the round introduces or revises key terms, abbreviations, metrics, mechanism names, or system labels, use the full form first, define any short form at first mention, explain what the term is and why it matters here, keep one natural-language paper-facing name per concept, use natural-language full names in prose, and do not use labels containing `_` or `-` in reader-facing prose. Keep internal identifiers out of reader-facing prose unless they are mapped once for the reader and then moved back out of prose, and record the terminology-clarity self-check in the write iteration artifact. If the manuscript would start from the managed scaffold and no template decision is recorded yet, ask once whether to keep the default scaffold or attach a template directory first. If finalization reaches a round where `workflow_language` and `paper_language` differ, finish and preserve the workflow-language deliverable first, then ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, persist that answer, record both the language decision and the workflow-language deliverable path in the latest write iteration, and only then edit the final manuscript in the chosen language.
10
+ This command runs the `write` stage of the lab workflow. Use `.claude/skills/lab/stages/write.md` as the single source of truth for template choice, paper-plan requirements, section references, validator gates, asset coverage, and final manuscript rules. Read the matching paper-writing reference and any bundled example-bank files for the requested section, revise only one section, and keep draft rounds warning-only while final-draft or export rounds must satisfy the write-stage acceptance gates. Draft ordinary manuscript rounds in `workflow_language`, and ordinary `.tex` section drafts must stay in `workflow_language` instead of treating `paper_language` as the default draft language. Treat the workflow-language paper layer as a real persisted artifact rather than a review layer, and preserve it as a full LaTeX mirror with `workflow-language/main.tex`, `workflow-language/references.bib`, `workflow-language/sections/*.tex`, `workflow-language/tables/*.tex`, `workflow-language/figures/*.tex`, and `workflow-language/analysis/analysis-asset.tex`. Do not write new workflow-language output to deprecated review-layer paths such as `docs/lab/paper/review_zh/`. Maintain `.lab/writing/terminology-glossary.md` as the write-stage glossary for full forms, approved short forms, reader-facing explanations, and aliases. Apply the same academic readability standard in every language: when the round introduces or revises key terms, abbreviations, metrics, mechanism names, or system labels, use the full form first, define any short form at first mention, explain what the term is and why it matters here, keep one natural-language paper-facing name per concept, use natural-language full names in prose, and do not use labels containing `_` or `-` in reader-facing prose. Keep internal identifiers out of reader-facing prose unless they are mapped once for the reader and then moved back out of prose, and record the terminology-clarity self-check in the write iteration artifact. If the manuscript would start from the managed scaffold and no template decision is recorded yet, ask once whether to keep the default scaffold or attach a template directory first. If finalization reaches a round where `workflow_language` and `paper_language` differ, finish and preserve the workflow-language paper layer first, then ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, persist that answer, record both the language decision and the workflow-language paper-layer path in the latest write iteration, and only then edit the final manuscript in the chosen language.
@@ -6,4 +6,4 @@ argument-hint: section or writing target
6
6
  Use the installed `lab` skill at `.codex/skills/lab/SKILL.md`.
7
7
 
8
8
  Execute the requested `/lab:write` stage against the user's argument now. Do not only recommend another lab stage. If a blocking prerequisite is missing, say exactly what is missing and ask at most one clarifying question.
9
- This command runs the `/lab:write` stage. Use `.codex/skills/lab/stages/write.md` as the single source of truth for template choice, paper-plan requirements, section references, validator gates, asset coverage, and final manuscript rules. Read the matching paper-writing reference and any bundled example-bank files for the requested section, revise only one section, and keep draft rounds warning-only while final-draft or export rounds must satisfy the write-stage acceptance gates. Draft ordinary manuscript rounds in `workflow_language`, and ordinary `.tex` section drafts must stay in `workflow_language` instead of treating `paper_language` as the default draft language. Treat a readable workflow-language deliverable as a real persisted artifact rather than a review layer. Maintain `.lab/writing/terminology-glossary.md` as the write-stage glossary for full forms, approved short forms, reader-facing explanations, and aliases. Apply the same academic readability standard in every language: when the round introduces or revises key terms, abbreviations, metrics, mechanism names, or system labels, use the full form first, define any short form at first mention, explain what the term is and why it matters here, keep one natural-language paper-facing name per concept, use natural-language full names in prose, and do not use labels containing `_` or `-` in reader-facing prose. Keep internal identifiers out of reader-facing prose unless they are mapped once for the reader and then moved back out of prose, and record the terminology-clarity self-check in the write iteration artifact. If the manuscript would start from the managed scaffold and no template decision is recorded yet, ask once whether to keep the default scaffold or attach a template directory first. If finalization reaches a round where `workflow_language` and `paper_language` differ, finish and preserve the workflow-language deliverable first, then ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, persist that answer, record both the language decision and the workflow-language deliverable path in the latest write iteration, and only then edit the final manuscript in the chosen language.
9
+ This command runs the `/lab:write` stage. Use `.codex/skills/lab/stages/write.md` as the single source of truth for template choice, paper-plan requirements, section references, validator gates, asset coverage, and final manuscript rules. Read the matching paper-writing reference and any bundled example-bank files for the requested section, revise only one section, and keep draft rounds warning-only while final-draft or export rounds must satisfy the write-stage acceptance gates. Draft ordinary manuscript rounds in `workflow_language`, and ordinary `.tex` section drafts must stay in `workflow_language` instead of treating `paper_language` as the default draft language. Treat the workflow-language paper layer as a real persisted artifact rather than a review layer, and preserve it as a full LaTeX mirror with `workflow-language/main.tex`, `workflow-language/references.bib`, `workflow-language/sections/*.tex`, `workflow-language/tables/*.tex`, `workflow-language/figures/*.tex`, and `workflow-language/analysis/analysis-asset.tex`. Do not write new workflow-language output to deprecated review-layer paths such as `docs/lab/paper/review_zh/`. Maintain `.lab/writing/terminology-glossary.md` as the write-stage glossary for full forms, approved short forms, reader-facing explanations, and aliases. Apply the same academic readability standard in every language: when the round introduces or revises key terms, abbreviations, metrics, mechanism names, or system labels, use the full form first, define any short form at first mention, explain what the term is and why it matters here, keep one natural-language paper-facing name per concept, use natural-language full names in prose, and do not use labels containing `_` or `-` in reader-facing prose. Keep internal identifiers out of reader-facing prose unless they are mapped once for the reader and then moved back out of prose, and record the terminology-clarity self-check in the write iteration artifact. If the manuscript would start from the managed scaffold and no template decision is recorded yet, ask once whether to keep the default scaffold or attach a template directory first. If finalization reaches a round where `workflow_language` and `paper_language` differ, finish and preserve the workflow-language paper layer first, then ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, persist that answer, record both the language decision and the workflow-language paper-layer path in the latest write iteration, and only then edit the final manuscript in the chosen language.
@@ -6,4 +6,4 @@ argument-hint: section or writing target
6
6
  Use the installed `lab` skill at `.codex/skills/lab/SKILL.md`.
7
7
 
8
8
  Execute the requested `/lab:write` stage against the user's argument now. Do not only recommend another lab stage. If a blocking prerequisite is missing, say exactly what is missing and ask at most one clarifying question.
9
- This command runs the `/lab:write` stage. Use `.codex/skills/lab/stages/write.md` as the single source of truth for template choice, paper-plan requirements, section references, validator gates, asset coverage, and final manuscript rules. Read the matching paper-writing reference and any bundled example-bank files for the requested section, revise only one section, and keep draft rounds warning-only while final-draft or export rounds must satisfy the write-stage acceptance gates. Draft ordinary manuscript rounds in `workflow_language`, and ordinary `.tex` section drafts must stay in `workflow_language` instead of treating `paper_language` as the default draft language. Treat a readable workflow-language deliverable as a real persisted artifact rather than a review layer. Maintain `.lab/writing/terminology-glossary.md` as the write-stage glossary for full forms, approved short forms, reader-facing explanations, and aliases. Apply the same academic readability standard in every language: when the round introduces or revises key terms, abbreviations, metrics, mechanism names, or system labels, use the full form first, define any short form at first mention, explain what the term is and why it matters here, keep one natural-language paper-facing name per concept, use natural-language full names in prose, and do not use labels containing `_` or `-` in reader-facing prose. Keep internal identifiers out of reader-facing prose unless they are mapped once for the reader and then moved back out of prose, and record the terminology-clarity self-check in the write iteration artifact. If the manuscript would start from the managed scaffold and no template decision is recorded yet, ask once whether to keep the default scaffold or attach a template directory first. If finalization reaches a round where `workflow_language` and `paper_language` differ, finish and preserve the workflow-language deliverable first, then ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, persist that answer, record both the language decision and the workflow-language deliverable path in the latest write iteration, and only then edit the final manuscript in the chosen language.
9
+ This command runs the `/lab:write` stage. Use `.codex/skills/lab/stages/write.md` as the single source of truth for template choice, paper-plan requirements, section references, validator gates, asset coverage, and final manuscript rules. Read the matching paper-writing reference and any bundled example-bank files for the requested section, revise only one section, and keep draft rounds warning-only while final-draft or export rounds must satisfy the write-stage acceptance gates. Draft ordinary manuscript rounds in `workflow_language`, and ordinary `.tex` section drafts must stay in `workflow_language` instead of treating `paper_language` as the default draft language. Treat the workflow-language paper layer as a real persisted artifact rather than a review layer, and preserve it as a full LaTeX mirror with `workflow-language/main.tex`, `workflow-language/references.bib`, `workflow-language/sections/*.tex`, `workflow-language/tables/*.tex`, `workflow-language/figures/*.tex`, and `workflow-language/analysis/analysis-asset.tex`. Do not write new workflow-language output to deprecated review-layer paths such as `docs/lab/paper/review_zh/`. Maintain `.lab/writing/terminology-glossary.md` as the write-stage glossary for full forms, approved short forms, reader-facing explanations, and aliases. Apply the same academic readability standard in every language: when the round introduces or revises key terms, abbreviations, metrics, mechanism names, or system labels, use the full form first, define any short form at first mention, explain what the term is and why it matters here, keep one natural-language paper-facing name per concept, use natural-language full names in prose, and do not use labels containing `_` or `-` in reader-facing prose. Keep internal identifiers out of reader-facing prose unless they are mapped once for the reader and then moved back out of prose, and record the terminology-clarity self-check in the write iteration artifact. If the manuscript would start from the managed scaffold and no template decision is recorded yet, ask once whether to keep the default scaffold or attach a template directory first. If finalization reaches a round where `workflow_language` and `paper_language` differ, finish and preserve the workflow-language paper layer first, then ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, persist that answer, record both the language decision and the workflow-language paper-layer path in the latest write iteration, and only then edit the final manuscript in the chosen language.
@@ -92,6 +92,8 @@ Treat all of these as equivalent stage requests:
92
92
  - That first visible output must show files read plus `Autonomy level`, `Allowed stages`, `Terminal goal`, `Primary gate`, and `Secondary guard`.
93
93
  - If the preflight block cannot be completed from `.lab/context/eval-protocol.md`, `.lab/context/auto-mode.md`, `.lab/context/auto-status.md`, `.lab/context/auto-ledger.md`, and `.lab/context/auto-outcome.md`, `/lab:auto` should stop instead of acting like the loop is armed.
94
94
  - While the loop is alive, `/lab:auto` should keep `.lab/context/auto-ledger.md` updated with the active owner, observed state, and resume boundary.
95
+ - Separate internal polling from user-facing progress reports.
96
+ - While the loop is healthy, `/lab:auto` should report to the user only on a meaningful change or at the keepalive cadence recorded in the current contract or runtime state, and it should not ask the user to trigger the next poll.
95
97
 
96
98
  - Treat `Autonomy level L1/L2/L3` as the execution privilege level, not as a paper layer, phase, or table number.
97
99
  - Treat `paper layer`, `phase`, and `table` as experiment targets. For example, `paper layer 3` or `Phase 1` should not be interpreted as `Autonomy level L3`.
@@ -6,4 +6,4 @@ argument-hint: section or writing target
6
6
  Use the installed `lab` skill at `.codex/skills/lab/SKILL.md`.
7
7
 
8
8
  Execute the requested `/lab:write` stage against the user's argument now. Do not only recommend another lab stage. If a blocking prerequisite is missing, say exactly what is missing and ask at most one clarifying question.
9
- This command runs the `/lab:write` stage. Use `.codex/skills/lab/stages/write.md` as the single source of truth for template choice, paper-plan requirements, section references, validator gates, asset coverage, and final manuscript rules. Read the matching paper-writing reference and any bundled example-bank files for the requested section, revise only one section, and keep draft rounds warning-only while final-draft or export rounds must satisfy the write-stage acceptance gates. Draft ordinary manuscript rounds in `workflow_language`, and ordinary `.tex` section drafts must stay in `workflow_language` instead of treating `paper_language` as the default draft language. Treat a readable workflow-language deliverable as a real persisted artifact rather than a review layer. Maintain `.lab/writing/terminology-glossary.md` as the write-stage glossary for full forms, approved short forms, reader-facing explanations, and aliases. Apply the same academic readability standard in every language: when the round introduces or revises key terms, abbreviations, metrics, mechanism names, or system labels, use the full form first, define any short form at first mention, explain what the term is and why it matters here, keep one natural-language paper-facing name per concept, use natural-language full names in prose, and do not use labels containing `_` or `-` in reader-facing prose. Keep internal identifiers out of reader-facing prose unless they are mapped once for the reader and then moved back out of prose, and record the terminology-clarity self-check in the write iteration artifact. If the manuscript would start from the managed scaffold and no template decision is recorded yet, ask once whether to keep the default scaffold or attach a template directory first. If finalization reaches a round where `workflow_language` and `paper_language` differ, finish and preserve the workflow-language deliverable first, then ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, persist that answer, record both the language decision and the workflow-language deliverable path in the latest write iteration, and only then edit the final manuscript in the chosen language.
9
+ This command runs the `/lab:write` stage. Use `.codex/skills/lab/stages/write.md` as the single source of truth for template choice, paper-plan requirements, section references, validator gates, asset coverage, and final manuscript rules. Read the matching paper-writing reference and any bundled example-bank files for the requested section, revise only one section, and keep draft rounds warning-only while final-draft or export rounds must satisfy the write-stage acceptance gates. Draft ordinary manuscript rounds in `workflow_language`, and ordinary `.tex` section drafts must stay in `workflow_language` instead of treating `paper_language` as the default draft language. Treat the workflow-language paper layer as a real persisted artifact rather than a review layer, and preserve it as a full LaTeX mirror with `workflow-language/main.tex`, `workflow-language/references.bib`, `workflow-language/sections/*.tex`, `workflow-language/tables/*.tex`, `workflow-language/figures/*.tex`, and `workflow-language/analysis/analysis-asset.tex`. Do not write new workflow-language output to deprecated review-layer paths such as `docs/lab/paper/review_zh/`. Maintain `.lab/writing/terminology-glossary.md` as the write-stage glossary for full forms, approved short forms, reader-facing explanations, and aliases. Apply the same academic readability standard in every language: when the round introduces or revises key terms, abbreviations, metrics, mechanism names, or system labels, use the full form first, define any short form at first mention, explain what the term is and why it matters here, keep one natural-language paper-facing name per concept, use natural-language full names in prose, and do not use labels containing `_` or `-` in reader-facing prose. Keep internal identifiers out of reader-facing prose unless they are mapped once for the reader and then moved back out of prose, and record the terminology-clarity self-check in the write iteration artifact. If the manuscript would start from the managed scaffold and no template decision is recorded yet, ask once whether to keep the default scaffold or attach a template directory first. If finalization reaches a round where `workflow_language` and `paper_language` differ, finish and preserve the workflow-language paper layer first, then ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, persist that answer, record both the language decision and the workflow-language paper-layer path in the latest write iteration, and only then edit the final manuscript in the chosen language.
@@ -6,4 +6,4 @@ argument-hint: section or writing target
6
6
  Use the installed `lab` skill at `.codex/skills/lab/SKILL.md`.
7
7
 
8
8
  Execute the requested `/lab:write` stage against the user's argument now. Do not only recommend another lab stage. If a blocking prerequisite is missing, say exactly what is missing and ask at most one clarifying question.
9
- This command runs the `/lab:write` stage. Use `.codex/skills/lab/stages/write.md` as the single source of truth for template choice, paper-plan requirements, section references, validator gates, asset coverage, and final manuscript rules. Read the matching paper-writing reference and any bundled example-bank files for the requested section, revise only one section, and keep draft rounds warning-only while final-draft or export rounds must satisfy the write-stage acceptance gates. Draft ordinary manuscript rounds in `workflow_language`, and ordinary `.tex` section drafts must stay in `workflow_language` instead of treating `paper_language` as the default draft language. Treat a readable workflow-language deliverable as a real persisted artifact rather than a review layer. Maintain `.lab/writing/terminology-glossary.md` as the write-stage glossary for full forms, approved short forms, reader-facing explanations, and aliases. Apply the same academic readability standard in every language: when the round introduces or revises key terms, abbreviations, metrics, mechanism names, or system labels, use the full form first, define any short form at first mention, explain what the term is and why it matters here, keep one natural-language paper-facing name per concept, use natural-language full names in prose, and do not use labels containing `_` or `-` in reader-facing prose. Keep internal identifiers out of reader-facing prose unless they are mapped once for the reader and then moved back out of prose, and record the terminology-clarity self-check in the write iteration artifact. If the manuscript would start from the managed scaffold and no template decision is recorded yet, ask once whether to keep the default scaffold or attach a template directory first. If finalization reaches a round where `workflow_language` and `paper_language` differ, finish and preserve the workflow-language deliverable first, then ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, persist that answer, record both the language decision and the workflow-language deliverable path in the latest write iteration, and only then edit the final manuscript in the chosen language.
9
+ This command runs the `/lab:write` stage. Use `.codex/skills/lab/stages/write.md` as the single source of truth for template choice, paper-plan requirements, section references, validator gates, asset coverage, and final manuscript rules. Read the matching paper-writing reference and any bundled example-bank files for the requested section, revise only one section, and keep draft rounds warning-only while final-draft or export rounds must satisfy the write-stage acceptance gates. Draft ordinary manuscript rounds in `workflow_language`, and ordinary `.tex` section drafts must stay in `workflow_language` instead of treating `paper_language` as the default draft language. Treat the workflow-language paper layer as a real persisted artifact rather than a review layer, and preserve it as a full LaTeX mirror with `workflow-language/main.tex`, `workflow-language/references.bib`, `workflow-language/sections/*.tex`, `workflow-language/tables/*.tex`, `workflow-language/figures/*.tex`, and `workflow-language/analysis/analysis-asset.tex`. Do not write new workflow-language output to deprecated review-layer paths such as `docs/lab/paper/review_zh/`. Maintain `.lab/writing/terminology-glossary.md` as the write-stage glossary for full forms, approved short forms, reader-facing explanations, and aliases. Apply the same academic readability standard in every language: when the round introduces or revises key terms, abbreviations, metrics, mechanism names, or system labels, use the full form first, define any short form at first mention, explain what the term is and why it matters here, keep one natural-language paper-facing name per concept, use natural-language full names in prose, and do not use labels containing `_` or `-` in reader-facing prose. Keep internal identifiers out of reader-facing prose unless they are mapped once for the reader and then moved back out of prose, and record the terminology-clarity self-check in the write iteration artifact. If the manuscript would start from the managed scaffold and no template decision is recorded yet, ask once whether to keep the default scaffold or attach a template directory first. If finalization reaches a round where `workflow_language` and `paper_language` differ, finish and preserve the workflow-language paper layer first, then ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`, persist that answer, record both the language decision and the workflow-language paper-layer path in the latest write iteration, and only then edit the final manuscript in the chosen language.
@@ -372,36 +372,80 @@ def check_language_layers(paper_dir: Path, issues: list[str]):
372
372
  if section_text and not text_looks_like_language(section_text, target_language):
373
373
  issues.append(
374
374
  f"final manuscript sections should follow {target_language} after paper_language_finalization_decision={finalization_decision}"
375
- )
375
+ )
376
376
 
377
377
  if finalization_decision != "convert-to-paper-language":
378
378
  return
379
379
 
380
- workflow_deliverable_sections = paper_dir / "workflow-language" / "sections"
381
- if not workflow_deliverable_sections.exists():
380
+ workflow_layer_dir = paper_dir / "workflow-language"
381
+ workflow_deliverable_sections = workflow_layer_dir / "sections"
382
+ workflow_tables_dir = workflow_layer_dir / "tables"
383
+ workflow_figures_dir = workflow_layer_dir / "figures"
384
+ workflow_analysis_dir = workflow_layer_dir / "analysis"
385
+ if not workflow_layer_dir.exists():
382
386
  issues.append(
383
- "missing persisted workflow-language deliverable under workflow-language/sections before converting the final manuscript to paper_language"
387
+ "missing persisted workflow-language paper layer under workflow-language/ before converting the final manuscript to paper_language"
384
388
  )
385
389
  return
390
+ workflow_main_tex = workflow_layer_dir / "main.tex"
391
+ workflow_references = workflow_layer_dir / "references.bib"
392
+ if not workflow_main_tex.exists():
393
+ issues.append("workflow-language paper layer is missing main.tex")
394
+ if not workflow_references.exists():
395
+ issues.append("workflow-language paper layer is missing references.bib")
396
+ if not workflow_deliverable_sections.exists():
397
+ issues.append("workflow-language paper layer is missing sections/")
398
+ if not workflow_tables_dir.exists():
399
+ issues.append("workflow-language paper layer is missing tables/")
400
+ if not workflow_figures_dir.exists():
401
+ issues.append("workflow-language paper layer is missing figures/")
402
+ if not workflow_analysis_dir.exists():
403
+ issues.append("workflow-language paper layer is missing analysis/")
386
404
 
387
405
  manuscript_section_files = sorted(path for path in sections_dir.glob("*.tex") if path.is_file())
388
406
  for manuscript_section in manuscript_section_files:
389
- companion_path = workflow_deliverable_sections / f"{manuscript_section.stem}.md"
407
+ companion_path = workflow_deliverable_sections / f"{manuscript_section.stem}.tex"
390
408
  if not companion_path.exists():
391
409
  issues.append(
392
- f"workflow-language deliverable is missing section companion: workflow-language/sections/{manuscript_section.stem}.md"
410
+ f"workflow-language paper layer is missing section companion: workflow-language/sections/{manuscript_section.stem}.tex"
393
411
  )
394
412
  continue
395
413
  companion_text = read_text(companion_path)
396
414
  if not text_looks_like_language(companion_text, workflow_language):
397
415
  issues.append(
398
- f"workflow-language deliverable section {companion_path.name} should follow workflow_language={workflow_language}"
416
+ f"workflow-language paper-layer section {companion_path.name} should follow workflow_language={workflow_language}"
399
417
  )
400
418
  if any(marker in companion_text for marker in WORKFLOW_LANGUAGE_DELIVERABLE_REVIEW_MARKERS):
401
419
  issues.append(
402
- f"workflow-language deliverable section {companion_path.name} contains review-only scaffolding and cannot substitute for a readable deliverable"
420
+ f"workflow-language paper-layer section {companion_path.name} contains review-only scaffolding and cannot substitute for a readable deliverable"
403
421
  )
404
422
 
423
+ mirror_asset_dirs = [
424
+ (paper_dir / "tables", workflow_tables_dir, REQUIRED_TABLE_FILES, "table asset"),
425
+ (paper_dir / "figures", workflow_figures_dir, REQUIRED_FIGURE_FILES, "figure asset"),
426
+ (paper_dir / "analysis", workflow_analysis_dir, ("analysis-asset.tex",), "analysis asset"),
427
+ ]
428
+ for manuscript_dir, workflow_dir, filenames, asset_label in mirror_asset_dirs:
429
+ for filename in filenames:
430
+ manuscript_path = manuscript_dir / filename
431
+ if not manuscript_path.exists():
432
+ continue
433
+ workflow_path = workflow_dir / filename
434
+ if not workflow_path.exists():
435
+ issues.append(
436
+ f"workflow-language paper layer is missing mirrored {asset_label}: workflow-language/{workflow_dir.name}/{filename}"
437
+ )
438
+ continue
439
+ workflow_text = read_text(workflow_path)
440
+ if not text_looks_like_language(workflow_text, workflow_language):
441
+ issues.append(
442
+ f"workflow-language paper-layer asset {workflow_path.name} should follow workflow_language={workflow_language}"
443
+ )
444
+ if any(marker in workflow_text for marker in WORKFLOW_LANGUAGE_DELIVERABLE_REVIEW_MARKERS):
445
+ issues.append(
446
+ f"workflow-language paper-layer asset {workflow_path.name} contains review-only scaffolding and cannot substitute for a readable deliverable"
447
+ )
448
+
405
449
 
406
450
  def main():
407
451
  args = parse_args()
@@ -40,6 +40,9 @@ Use `.lab/context/auto-ledger.md` as the live runtime ledger for ownership, chec
40
40
  - Max wall-clock time:
41
41
  - Max failures:
42
42
  - Poll interval:
43
+ - Leave `Poll interval` blank to use conservative defaults: `run`/`iterate` poll every `2m`; other auto polling defaults to `15s`.
44
+ - Progress report interval:
45
+ - Leave `Progress report interval` blank to report to the user only on a meaningful change, plus a keepalive at most every `10m` for `run`/`iterate` and every `2m` for other auto polling.
43
46
 
44
47
  ## Stage Commands
45
48
 
@@ -213,10 +213,10 @@ Use this skill when the user invokes `/lab:*` or asks for the structured researc
213
213
  - Write one paper section or one explicit subproblem per round.
214
214
  - Ordinary manuscript drafting rounds should follow `workflow_language`.
215
215
  - In those ordinary rounds, the manuscript is still LaTeX, so the initial `.tex` section drafts must stay in `workflow_language` rather than jumping straight to `paper_language`.
216
- - Treat the readable workflow-language paper as a real persisted deliverable, not as a review layer.
217
- - If `workflow_language` and `paper_language` differ, finish and preserve the workflow-language deliverable first, then the first final-draft or export round must ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`.
216
+ - Treat the workflow-language paper as a real persisted paper layer, not as a review layer.
217
+ - If `workflow_language` and `paper_language` differ, finish and preserve the workflow-language paper layer first, then the first final-draft or export round must ask once whether to keep the draft language or convert the canonical manuscript to `paper_language`.
218
218
  - When the languages differ, do not rewrite final manuscript sections in `paper_language` before that question has been answered; ask first, persist the choice, then edit the final manuscript in the chosen language.
219
- - When the languages differ, record the workflow language, paper language, finalization decision, why the decision was chosen, and the workflow-language deliverable path in the latest write iteration artifact.
219
+ - When the languages differ, record the workflow language, paper language, finalization decision, why the decision was chosen, and the workflow-language paper-layer path in the latest write iteration artifact.
220
220
  - Apply the same reader-facing standard in both languages: when a round introduces or revises key terms, abbreviations, metrics, mechanism names, or system labels, explain them at first mention by saying what they are and why they matter here.
221
221
  - First mention should use the full form. If a short form or acronym will be reused, define it at first mention and then keep usage stable.
222
222
  - Keep one canonical natural-language paper-facing name per concept.
@@ -252,7 +252,7 @@ Use this skill when the user invokes `/lab:*` or asks for the structured researc
252
252
  - No final report without validated normalized results.
253
253
  - No paper-writing round without stable report artifacts, an approved framing artifact, evidence links, and LaTeX manuscript output.
254
254
  - No final-draft or export round without passing section-quality, claim-safety, and manuscript-delivery validation.
255
- - No final-draft or export round with mismatched `workflow_language` and `paper_language` unless the latest write iteration records the language decision audit that justified the final manuscript language and the persisted workflow-language deliverable path.
255
+ - No final-draft or export round with mismatched `workflow_language` and `paper_language` unless the latest write iteration records the language decision audit that justified the final manuscript language and the persisted workflow-language paper-layer path.
256
256
 
257
257
  ## References
258
258
 
@@ -77,6 +77,10 @@
77
77
  - You may promote exploratory additions to the primary package only when the contract's promotion policy is satisfied and the promotion is written back into `data-decisions.md`, `decisions.md`, and `workflow-state.md`, then refresh derived views.
78
78
  - Poll long-running commands until they finish, hit a timeout, or hit a stop condition.
79
79
  - Keep a poll-based waiting loop instead of sleeping blindly.
80
+ - When `Poll interval` is blank, use conservative defaults: `run` and `iterate` poll every `2m`; other auto polling defaults to `15s`.
81
+ - Separate internal polling from user-facing progress reports.
82
+ - When `Progress report interval` is blank, report to the user only on a meaningful change, plus a keepalive at most every `10m` for `run`/`iterate` and every `2m` for other auto polling.
83
+ - A meaningful change means a stage or rung transition, a new checkpoint or artifact, an owner exit, a stop or escalation match, or an anomaly signal.
80
84
  - Do not treat a short watcher such as `sleep 30`, a one-shot `pgrep`, or a single `metrics.json` probe as the rung command when the real experiment is still running.
81
85
  - Bind each rung to the real long-running command or process that owns the experiment result.
82
86
  - Record the active owner as one of:
@@ -181,3 +185,4 @@
181
185
  - If the user chooses to keep the draft language, persist `paper_language_finalization_decision: keep-workflow-language`
182
186
  - If the user chooses to convert, persist `paper_language_finalization_decision: convert-to-paper-language`
183
187
  - While the real experiment process is still alive, emit only a progress update and keep waiting. Do not present a terminal summary for that rung until the process exits or the rung hits an explicit stop boundary.
188
+ - While the loop is healthy, do not ask the user to trigger the next poll. Keep polling until a meaningful change, keepalive boundary, stop boundary, escalation boundary, or terminal boundary is reached.
@@ -65,9 +65,11 @@ Run these on every round:
65
65
  - LaTeX is the required manuscript output format.
66
66
  - Ordinary manuscript drafting rounds should follow `workflow_language`.
67
67
  - During ordinary rounds, ordinary `.tex` section drafts must stay in `workflow_language`; do not treat `paper_language` as the default draft language.
68
- - Treat the workflow-language manuscript as a real deliverable layer, not just an internal review note.
69
- - If the user asks to read the paper in `workflow_language`, materialize or refresh a readable workflow-language deliverable under `<deliverables_root>/paper/workflow-language/sections/<section>.md` instead of pointing to a review layer.
70
- - The workflow-language deliverable should mirror the current manuscript logic in reader-facing prose and must not contain review-only scaffolding such as paragraph outlines, self-check blocks, or claim-evidence maps.
68
+ - Treat the workflow-language manuscript as a real persisted paper layer, not just an internal review note.
69
+ - If the user asks to read the paper in `workflow_language`, materialize or refresh a full workflow-language paper layer under `<deliverables_root>/paper/workflow-language/` instead of pointing to a review layer.
70
+ - The workflow-language paper layer must stay in LaTeX and mirror the canonical paper structure with its own `main.tex`, `references.bib`, `sections/*.tex`, `tables/*.tex`, `figures/*.tex`, and `analysis/analysis-asset.tex`.
71
+ - The workflow-language paper layer must mirror the current manuscript logic in reader-facing prose and must not contain review-only scaffolding such as paragraph outlines, self-check blocks, or claim-evidence maps.
72
+ - Do not write new workflow-language output to deprecated review-layer paths such as `docs/lab/paper/review_zh/`.
71
73
  - If `paper_template_root` is configured, inspect that template directory before drafting and align the manuscript structure to it.
72
74
  - Treat attached template directories as user-owned and potentially modified. Do not rewrite template files unless the user explicitly asks.
73
75
  - If no paper template is configured and `paper_template_decision` is `unconfirmed`, ask one explicit question before the first `.tex` drafting round: continue with the default LaTeX scaffold, or attach a template directory first.
@@ -83,11 +85,11 @@ Run these on every round:
83
85
  - If the current round is a final manuscript export or final-draft pass, `paper_template_root` is still empty, `paper_template_decision` is `default-scaffold`, and `paper_template_final_reminder_acknowledged` is `false`, ask one final reminder question about switching to a template before finalizing.
84
86
  - If the user confirms staying on the default scaffold at that final reminder, persist `paper_template_final_reminder_acknowledged: true`.
85
87
  - If the current round is a final manuscript export or final-draft pass, `workflow_language` and `paper_language` differ, and `paper_language_finalization_decision` is `unconfirmed`, ask one explicit question before finalizing: keep the manuscript in `workflow_language`, or convert the final manuscript to `paper_language`.
86
- - When `workflow_language` and `paper_language` differ, finish and preserve the readable workflow-language deliverable first, then ask whether the canonical manuscript should be converted to `paper_language`.
88
+ - When `workflow_language` and `paper_language` differ, finish and preserve the workflow-language paper layer first, then ask whether the canonical manuscript should be converted to `paper_language`.
87
89
  - Do not rewrite final manuscript sections in `paper_language` before that question has been answered. Ask first, persist the answer, then edit the final manuscript.
88
90
  - If the user chooses to keep the draft language, persist `paper_language_finalization_decision: keep-workflow-language`.
89
91
  - If the user chooses to convert, persist `paper_language_finalization_decision: convert-to-paper-language`.
90
- - If `paper_language_finalization_decision` is `convert-to-paper-language`, preserve the workflow-language deliverable under `<deliverables_root>/paper/workflow-language/sections/` and convert only the canonical manuscript output to `paper_language` before accepting the final round.
92
+ - If `paper_language_finalization_decision` is `convert-to-paper-language`, preserve the workflow-language paper layer under `<deliverables_root>/paper/workflow-language/` and convert only the canonical manuscript output to `paper_language` before accepting the final round.
91
93
  - Load only the current section guide. Do not load every section guide at once.
92
94
  - Reuse example-bank structure, paragraph roles, sentence logic, and paper-facing LaTeX asset patterns when examples are bundled, but never copy wording verbatim.
93
95
  - Treat example cites and example file names as writing references, not as evidence for the current paper.
@@ -138,14 +140,14 @@ Run these on every round:
138
140
  - 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.
139
141
  - Run `.lab/.managed/scripts/validate_manuscript_delivery.py --paper-dir <deliverables_root>/paper` before accepting a final-draft or export round.
140
142
  - 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.
141
- - The manuscript-delivery validator should also fail if `paper_language_finalization_decision=convert-to-paper-language` but the persisted workflow-language deliverable is missing, missing section coverage, written in the wrong language, or still contains review-only scaffolding.
143
+ - 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.
142
144
  - If the manuscript validator fails, keep editing and asset generation until it passes; do not stop at prose-only completion.
143
145
  - Run a LaTeX compile smoke test when a local LaTeX toolchain is available; if not available, record the missing verification in the write iteration artifact.
144
146
  - Record what changed and why in a write-iteration artifact.
145
147
  - Maintain `.lab/writing/terminology-glossary.md` as the write-stage source for full forms, approved short forms, reader-facing explanations, and aliases whenever terminology changes.
146
148
  - When a round introduces or revises key terms, include a compact terminology note in the user-facing round summary and record the terminology-clarity self-check in the write-iteration artifact.
147
149
  - When `workflow_language` and `paper_language` differ, record the final manuscript language choice in the write-iteration artifact with the workflow language, paper language, finalization decision, and why that decision was chosen.
148
- - When `workflow_language` and `paper_language` differ, also record the persisted workflow-language deliverable path in the write-iteration artifact.
150
+ - When `workflow_language` and `paper_language` differ, also record the persisted workflow-language paper-layer path in the write-iteration artifact.
149
151
  - Keep the handoff wording in the write-iteration artifact explicit and stable: say what is completed, what scope is frozen for the next round, what the next owner is allowed to do, what they must read first, and what counts as accept, revise, or reject.
150
152
  - Return paragraph-level roles for the revised prose when drafting.
151
153
  - Run the five-dimension self-review checklist before accepting a round.
@@ -168,7 +170,15 @@ Run these on every round:
168
170
  - `<deliverables_root>/paper/figures/method-overview.tex`
169
171
  - `<deliverables_root>/paper/figures/results-overview.tex`
170
172
  - `<deliverables_root>/paper/analysis/analysis-asset.tex`
171
- - `<deliverables_root>/paper/workflow-language/sections/<section>.md` when the user requests a readable workflow-language deliverable or when `paper_language_finalization_decision=convert-to-paper-language`
173
+ - `<deliverables_root>/paper/workflow-language/main.tex` when the user requests a workflow-language paper layer or when `paper_language_finalization_decision=convert-to-paper-language`
174
+ - `<deliverables_root>/paper/workflow-language/references.bib` when the user requests a workflow-language paper layer or when `paper_language_finalization_decision=convert-to-paper-language`
175
+ - `<deliverables_root>/paper/workflow-language/sections/<section>.tex` when the user requests a workflow-language paper layer or when `paper_language_finalization_decision=convert-to-paper-language`
176
+ - `<deliverables_root>/paper/workflow-language/tables/main-results.tex` when the current paper contains experimental claims and `paper_language_finalization_decision=convert-to-paper-language`
177
+ - `<deliverables_root>/paper/workflow-language/tables/ablations.tex` when the current paper contains experimental claims and `paper_language_finalization_decision=convert-to-paper-language`
178
+ - `<deliverables_root>/paper/workflow-language/figures/problem-setting.tex` when the current paper contains method or experiments claims and `paper_language_finalization_decision=convert-to-paper-language`
179
+ - `<deliverables_root>/paper/workflow-language/figures/method-overview.tex` when the current paper contains method or experiments claims and `paper_language_finalization_decision=convert-to-paper-language`
180
+ - `<deliverables_root>/paper/workflow-language/figures/results-overview.tex` when the current paper contains experimental claims and `paper_language_finalization_decision=convert-to-paper-language`
181
+ - `<deliverables_root>/paper/workflow-language/analysis/analysis-asset.tex` when the current paper contains experimental claims and `paper_language_finalization_decision=convert-to-paper-language`
172
182
 
173
183
  ## Stop Conditions
174
184
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superlab",
3
- "version": "0.1.50",
3
+ "version": "0.1.52",
4
4
  "description": "Strict /lab research workflow installer for Codex and Claude",
5
5
  "keywords": [
6
6
  "codex",