superlab 0.1.34 → 0.1.35
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 +2 -1
- package/README.zh-CN.md +2 -1
- package/lib/i18n.cjs +8 -5
- package/lib/lab_idea_contract.json +4 -4
- package/lib/lab_write_contract.json +4 -4
- package/package-assets/claude/commands/lab-idea.md +1 -1
- package/package-assets/claude/commands/lab-write.md +1 -1
- package/package-assets/codex/prompts/lab-idea.md +1 -1
- package/package-assets/codex/prompts/lab-write.md +1 -1
- package/package-assets/shared/lab/.managed/scripts/validate_manuscript_delivery.py +48 -0
- package/package-assets/shared/lab/.managed/templates/write-iteration.md +1 -0
- package/package-assets/shared/lab/system/core.md +1 -0
- package/package-assets/shared/skills/lab/SKILL.md +5 -3
- package/package-assets/shared/skills/lab/stages/idea.md +2 -0
- package/package-assets/shared/skills/lab/stages/write.md +8 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -327,7 +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, the first final-draft or export round should ask once whether to keep the draft language or convert the
|
|
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.
|
|
331
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.
|
|
332
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.
|
|
333
334
|
|
package/README.zh-CN.md
CHANGED
|
@@ -312,7 +312,8 @@ Codex 和 Claude 的命令入口不一样:
|
|
|
312
312
|
如果没有配置模板,第一次进入论文 `.tex` 写作时应先追问一次:继续使用内置默认 LaTeX scaffold,还是先接入模板目录。
|
|
313
313
|
如果用户确认先用默认 scaffold,就把这个决定持久化到 `.lab/config/workflow.json`,后续普通轮次不再重复追问。
|
|
314
314
|
普通论文起草轮次应先跟随 `workflow_language`。
|
|
315
|
-
如果 `workflow_language` 和 `paper_language`
|
|
315
|
+
如果 `workflow_language` 和 `paper_language` 不一致,`/lab:write` 应先保留一套可阅读的 workflow-language 交付稿,再在第一次进入最终定稿或导出轮次时追问一次:保持当前草稿语言,还是把 canonical manuscript 转换成 `paper_language`,并把这个决定持久化。
|
|
316
|
+
这套 workflow-language 交付稿是正式持久化产物,不是 review 层,除非被明确刷新,否则应继续保留。
|
|
316
317
|
但在最终导出或最终定稿节点,如果项目仍在使用默认 scaffold 且没有接入模板,应再提醒一次,给用户最后切换模板的机会。
|
|
317
318
|
在最终定稿或导出轮次里,`/lab:write` 还应物化真正的 LaTeX 表格、带图意图的 figure placeholders、非空的 `references.bib`,并在停止前通过 `.lab/.managed/scripts/validate_manuscript_delivery.py --paper-dir <deliverables_root>/paper`。
|
|
318
319
|
|
package/lib/i18n.cjs
CHANGED
|
@@ -467,6 +467,7 @@ const ZH_SKILL_FILES = {
|
|
|
467
467
|
- 只有用户明确要求 rewrite-only 时,才允许只改已有 idea 文档的结构;否则显式 \`/lab:idea\` 请求一律按完整 stage 重跑。
|
|
468
468
|
- 现有方法对照必须显式写出,不能只说“更创新”。
|
|
469
469
|
- 不要只说“比现有方法更好”;要说清楚现有方法在做什么、为什么不够、我们的方向大致怎么做。
|
|
470
|
+
- 最终给用户的简要总结里,要直接说明:现有方法在做什么、为什么还是不够、推荐方向和现有方法有什么不同、大致怎么做、主要风险是什么,以及详细版去哪里看(\`.lab/writing/idea.md\` 和 \`.lab/writing/idea-source-log.md\`)。
|
|
470
471
|
- 不要在没有文献范围包和最接近前作对照的情况下直接下 novelty 判断。
|
|
471
472
|
- 不要在只做了一轮脑暴或一轮文献检索的情况下直接下 final recommendation。
|
|
472
473
|
- 不要把 idea 工件本身当成唯一证据记录;两轮文献检索的查询、来源分桶和最终来源数必须同步记到 \`.lab/writing/idea-source-log.md\`。
|
|
@@ -1880,6 +1881,7 @@ ZH_CONTENT[path.join(".codex", "skills", "lab", "stages", "write.md")] = `# \`/l
|
|
|
1880
1881
|
- 每轮只改一个 section 或一个明确子问题。
|
|
1881
1882
|
- 最终稿必须是 LaTeX。
|
|
1882
1883
|
- 普通起草轮次先跟随 \`workflow_language\`。
|
|
1884
|
+
- 把可阅读的 workflow-language 交付稿当成正式持久化产物,而不是 review 层。
|
|
1883
1885
|
- 如果配置了 \`paper_template_root\`,先检查该模板目录,再按其结构起草论文。
|
|
1884
1886
|
- 已接入的模板目录可能包含用户或上游修改,默认不要改模板文件。
|
|
1885
1887
|
- 如果没有配置模板且 \`paper_template_decision\` 是 \`unconfirmed\`,在第一次起草 \`.tex\` 之前必须先追问一次:继续使用默认 LaTeX scaffold,还是先接入模板目录。
|
|
@@ -1888,12 +1890,12 @@ ZH_CONTENT[path.join(".codex", "skills", "lab", "stages", "write.md")] = `# \`/l
|
|
|
1888
1890
|
- 如果 \`paper_template_decision\` 已经是 \`default-scaffold\`,就使用交付目录下的默认 LaTeX scaffold。
|
|
1889
1891
|
- 如果当前是最终导出或最终定稿轮次、\`paper_template_root\` 仍为空、\`paper_template_decision\` 是 \`default-scaffold\`,且 \`paper_template_final_reminder_acknowledged\` 是 \`false\`,就在最终定稿前再提醒一次是否切到模板。
|
|
1890
1892
|
- 如果用户在最终提醒里仍确认继续使用默认 scaffold,就把 \`paper_template_final_reminder_acknowledged\` 持久化为 \`true\`。
|
|
1891
|
-
- 如果当前是最终导出或最终定稿轮次,且 \`workflow_language\` 与 \`paper_language\` 不一致、\`paper_language_finalization_decision\` 还是 \`unconfirmed
|
|
1893
|
+
- 如果当前是最终导出或最终定稿轮次,且 \`workflow_language\` 与 \`paper_language\` 不一致、\`paper_language_finalization_decision\` 还是 \`unconfirmed\`,就先完成并保留 workflow-language 交付稿,再追问一次:保持当前 workflow language,还是把 canonical manuscript 转换成 \`paper_language\`。
|
|
1892
1894
|
- 如果用户选择保持当前 workflow language,就把 \`paper_language_finalization_decision\` 持久化成 \`keep-workflow-language\`。
|
|
1893
1895
|
- 如果用户选择转换成最终论文语言,就把 \`paper_language_finalization_decision\` 持久化成 \`convert-to-paper-language\`。
|
|
1894
1896
|
- 如果 \`workflow_language\` 与 \`paper_language\` 不一致,就不要在确认前先把最终论文正文改写成 \`paper_language\`;必须先追问、再持久化、再改稿。
|
|
1895
|
-
- 如果 \`workflow_language\` 与 \`paper_language\` 不一致,就要在最新 write iteration artifact
|
|
1896
|
-
- 如果 \`paper_language_finalization_decision\` 是 \`convert-to-paper-language
|
|
1897
|
+
- 如果 \`workflow_language\` 与 \`paper_language\` 不一致,就要在最新 write iteration artifact 里记录工作流语言、论文语言、最终语言决定、为什么这样决定,以及 workflow-language 交付稿路径。
|
|
1898
|
+
- 如果 \`paper_language_finalization_decision\` 是 \`convert-to-paper-language\`,在接受最终定稿前必须保留 workflow-language 交付稿,并把 canonical manuscript 转换到 \`paper_language\`。
|
|
1897
1899
|
- 只加载当前 section guide,不要一次加载全部章节参考。
|
|
1898
1900
|
- 如果当前 section 是 \`abstract\`、\`introduction\` 或 \`method\`,还必须继续读取本地 example bank:\`references/paper-writing/examples/index.md\`、对应的 examples index,以及 1-2 个具体 example 文件。
|
|
1899
1901
|
- 如果当前 section 是 \`related work\`、\`experiments\` 或 \`conclusion\`,也要读取对应的本地 example bank:\`references/paper-writing/examples/index.md\`、对应的 examples index,以及 1-2 个具体 example 文件。
|
|
@@ -2627,11 +2629,12 @@ ZH_CONTENT[path.join(".codex", "skills", "lab", "stages", "auto.md")] = `# \`/la
|
|
|
2627
2629
|
- 如果当前是最终导出或最终定稿、\`paper_template_decision\` 是 \`default-scaffold\`,且 \`paper_template_final_reminder_acknowledged\` 是 \`false\`,就在最终定稿前再提醒一次
|
|
2628
2630
|
- 如果用户在最终提醒里仍确认继续使用默认 scaffold,就持久化 \`paper_template_final_reminder_acknowledged: true\`
|
|
2629
2631
|
- 普通 \`write\` 起草轮次先跟随 \`workflow_language\`。
|
|
2630
|
-
-
|
|
2632
|
+
- 把可阅读的 workflow-language 交付稿当成正式持久化产物,而不是 review 层。
|
|
2633
|
+
- 如果当前写作目标是最终导出、\`workflow_language\` 与 \`paper_language\` 不一致,且 \`paper_language_finalization_decision\` 还是 \`unconfirmed\`,就在最终定稿前先完成并保留 workflow-language 交付稿,再追问一次:保持当前 workflow language,还是转换成 \`paper_language\`
|
|
2631
2634
|
- 如果用户选择保持当前语言,就持久化 \`paper_language_finalization_decision: keep-workflow-language\`
|
|
2632
2635
|
- 如果用户选择转换,就持久化 \`paper_language_finalization_decision: convert-to-paper-language\`
|
|
2633
2636
|
- 如果当前写作目标是最终导出,且语言不一致,就不要在追问前先把最终论文正文改成 \`paper_language\`;先问、先持久化,再改稿
|
|
2634
|
-
- 如果当前写作目标是最终导出,且语言不一致,就在最新 write iteration
|
|
2637
|
+
- 如果当前写作目标是最终导出,且语言不一致,就在最新 write iteration 里记录语言决策审计:工作流语言、论文语言、最终语言决定、为什么这样决定,以及 workflow-language 交付稿路径
|
|
2635
2638
|
- 不要把 \`sleep 30\`、单次 \`pgrep\` 或一次性的 \`metrics.json\` 探针当成 rung 主命令;这些只能算进度检查。
|
|
2636
2639
|
- 当真实实验进程还活着时,只允许发进度更新并继续等待,不能把这一 rung 当作已经完成。
|
|
2637
2640
|
`;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"stage_prompt": {
|
|
3
|
-
"codex_en": "This command runs the `/lab:idea` stage. Use `.codex/skills/lab/stages/idea.md` as the single source of truth for the two brainstorm passes, two literature sweeps, closest-prior comparison, source-backed proposal memo, evaluation sketch, tentative contributions, user guidance, minimum viable experiment, convergence status, and approval gate. An explicit `/lab:idea` request defaults to a full-stage rerun, even if the user asks to reorganize or rewrite an existing idea memo. Only switch to rewrite-only mode when the user explicitly asks to only reorganize or rewrite the existing idea artifact without new searching. Rewrite-only mode may improve structure or readability, but it must not change the recommendation, paper-fit judgment, convergence status, or canonical context; it must say that the stage remains unconverged because the literature sweeps were not rerun. Start with brainstorm pass 1 over 3-4 candidate directions. For each candidate direction, explain what it is, why it matters, roughly how it would work, what problem it solves, and its main risk. Run literature sweep 1 with real closest-prior references for each direction, narrow the field with brainstorm pass 2 to 1-2 surviving directions, explain why each survivor remains, why each rejected direction was dropped, and why the narrowed recommendation is stronger now, then run literature sweep 2 to build the final source bundle before producing a collaborator-readable recommendation. Materialize or update `.lab/writing/idea.md` and `.lab/writing/idea-source-log.md` before any final recommendation, paper-fit judgment, or mission writeback. Do not end the stage with a chat-only brainstorm; if the work is still unconverged, say so explicitly, list what is still missing, and stop there. The final idea memo must explain the real-world scenario, the problem solved, why current methods fall short, roughly how the idea would work, how it would be evaluated, what the tentative contributions are, what is already source-backed, what is still hypothesis-only, and what the user should decide next. It must also include a user-visible literature summary naming the closest prior found, the recent strong papers found, and what existing work still does not solve. Keep `.lab/writing/idea-source-log.md` synchronized with the actual search queries, bucketed sources, and final source count used in both sweeps. The literature bundle should default to about 20 sources unless the field is genuinely narrow and that smaller bundle is explicitly justified. Only after `.lab/.managed/scripts/validate_idea_artifact.py` passes may the stage present a final recommendation as converged.",
|
|
4
|
-
"claude_en": "This command runs the `idea` stage of the lab workflow. Use `.claude/skills/lab/stages/idea.md` as the single source of truth for the two brainstorm passes, two literature sweeps, closest-prior comparison, source-backed proposal memo, evaluation sketch, tentative contributions, user guidance, minimum viable experiment, convergence status, and approval gate. An explicit `/lab:idea` request defaults to a full-stage rerun, even if the user asks to reorganize or rewrite an existing idea memo. Only switch to rewrite-only mode when the user explicitly asks to only reorganize or rewrite the existing idea artifact without new searching. Rewrite-only mode may improve structure or readability, but it must not change the recommendation, paper-fit judgment, convergence status, or canonical context; it must say that the stage remains unconverged because the literature sweeps were not rerun. Start with brainstorm pass 1 over 3-4 candidate directions. For each candidate direction, explain what it is, why it matters, roughly how it would work, what problem it solves, and its main risk. Run literature sweep 1 with real closest-prior references for each direction, narrow the field with brainstorm pass 2 to 1-2 surviving directions, explain why each survivor remains, why each rejected direction was dropped, and why the narrowed recommendation is stronger now, then run literature sweep 2 to build the final source bundle before producing a collaborator-readable recommendation. Materialize or update `.lab/writing/idea.md` and `.lab/writing/idea-source-log.md` before any final recommendation, paper-fit judgment, or mission writeback. Do not end the stage with a chat-only brainstorm; if the work is still unconverged, say so explicitly, list what is still missing, and stop there. The final idea memo must explain the real-world scenario, the problem solved, why current methods fall short, roughly how the idea would work, how it would be evaluated, what the tentative contributions are, what is already source-backed, what is still hypothesis-only, and what the user should decide next. It must also include a user-visible literature summary naming the closest prior found, the recent strong papers found, and what existing work still does not solve. Keep `.lab/writing/idea-source-log.md` synchronized with the actual search queries, bucketed sources, and final source count used in both sweeps. The literature bundle should default to about 20 sources unless the field is genuinely narrow and that smaller bundle is explicitly justified. Only after `.lab/.managed/scripts/validate_idea_artifact.py` passes may the stage present a final recommendation as converged.",
|
|
5
|
-
"codex_zh": "本命令运行 `/lab:idea` 阶段。把 `.codex/skills/lab/stages/idea.md` 当成两轮脑暴、两轮文献检索、最接近前作对照、source-backed proposal memo、评测草图、暂定贡献、用户引导、最小可行实验、收敛状态和 approval gate 的单一来源。显式调用 `/lab:idea` 时,默认就是一次完整重跑,即使用户说的是“根据现有 idea 重组一下”也一样。只有当用户明确要求“只重写或重组现有 idea 文档,不重新检索”时,才允许进入 rewrite-only 模式。rewrite-only 模式只能改结构和可读性,不能改变推荐结论、paper fit 判断、收敛状态或 canonical context,并且必须明确说明:由于没有重跑文献检索,这一轮仍然处于未收敛状态。先做第一轮脑暴,产出 3-4 个候选方向。每个候选方向都要说明:它是什么、为什么值得研究、大致怎么做、解决了什么问题、主要风险是什么。再做第一轮文献检索,为每个方向补最接近前作;然后用第二轮脑暴把范围收敛到 1-2 个幸存方向,并写清每个幸存方向为什么保留、每个被淘汰方向为什么淘汰、为什么当前 narrowed recommendation 更强;最后做第二轮文献检索,补齐最终来源包,再输出协作者可读的推荐结论。任何 final recommendation、paper fit 判断或 mission 写回之前,都必须先 materialize or update `.lab/writing/idea.md` 和 `.lab/writing/idea-source-log.md`。不要以纯聊天脑暴收尾;如果当前还没收敛,就明确写出还缺什么,并停在未收敛状态。最终 idea memo 必须讲清真实场景、解决了什么问题、现有方法为什么不够、准备怎么做、大致怎么评、暂定贡献是什么、哪些部分已经 source-backed、哪些还只是 hypothesis
|
|
6
|
-
"claude_zh": "本命令运行 lab workflow 的 `idea` 阶段。把 `.claude/skills/lab/stages/idea.md` 当成两轮脑暴、两轮文献检索、最接近前作对照、source-backed proposal memo、评测草图、暂定贡献、用户引导、最小可行实验、收敛状态和 approval gate 的单一来源。显式调用 `/lab:idea` 时,默认就是一次完整重跑,即使用户说的是“根据现有 idea 重组一下”也一样。只有当用户明确要求“只重写或重组现有 idea 文档,不重新检索”时,才允许进入 rewrite-only 模式。rewrite-only 模式只能改结构和可读性,不能改变推荐结论、paper fit 判断、收敛状态或 canonical context,并且必须明确说明:由于没有重跑文献检索,这一轮仍然处于未收敛状态。先做第一轮脑暴,产出 3-4 个候选方向。每个候选方向都要说明:它是什么、为什么值得研究、大致怎么做、解决了什么问题、主要风险是什么。再做第一轮文献检索,为每个方向补最接近前作;然后用第二轮脑暴把范围收敛到 1-2 个幸存方向,并写清每个幸存方向为什么保留、每个被淘汰方向为什么淘汰、为什么当前 narrowed recommendation 更强;最后做第二轮文献检索,补齐最终来源包,再输出协作者可读的推荐结论。任何 final recommendation、paper fit 判断或 mission 写回之前,都必须先 materialize or update `.lab/writing/idea.md` 和 `.lab/writing/idea-source-log.md`。不要以纯聊天脑暴收尾;如果当前还没收敛,就明确写出还缺什么,并停在未收敛状态。最终 idea memo 必须讲清真实场景、解决了什么问题、现有方法为什么不够、准备怎么做、大致怎么评、暂定贡献是什么、哪些部分已经 source-backed、哪些还只是 hypothesis
|
|
3
|
+
"codex_en": "This command runs the `/lab:idea` stage. Use `.codex/skills/lab/stages/idea.md` as the single source of truth for the two brainstorm passes, two literature sweeps, closest-prior comparison, source-backed proposal memo, evaluation sketch, tentative contributions, user guidance, minimum viable experiment, convergence status, and approval gate. An explicit `/lab:idea` request defaults to a full-stage rerun, even if the user asks to reorganize or rewrite an existing idea memo. Only switch to rewrite-only mode when the user explicitly asks to only reorganize or rewrite the existing idea artifact without new searching. Rewrite-only mode may improve structure or readability, but it must not change the recommendation, paper-fit judgment, convergence status, or canonical context; it must say that the stage remains unconverged because the literature sweeps were not rerun. Start with brainstorm pass 1 over 3-4 candidate directions. For each candidate direction, explain what it is, why it matters, roughly how it would work, what problem it solves, and its main risk. Run literature sweep 1 with real closest-prior references for each direction, narrow the field with brainstorm pass 2 to 1-2 surviving directions, explain why each survivor remains, why each rejected direction was dropped, and why the narrowed recommendation is stronger now, then run literature sweep 2 to build the final source bundle before producing a collaborator-readable recommendation. Materialize or update `.lab/writing/idea.md` and `.lab/writing/idea-source-log.md` before any final recommendation, paper-fit judgment, or mission writeback. Do not end the stage with a chat-only brainstorm; if the work is still unconverged, say so explicitly, list what is still missing, and stop there. The final idea memo must explain the real-world scenario, the problem solved, why current methods fall short, roughly how the idea would work, how it would be evaluated, what the tentative contributions are, what is already source-backed, what is still hypothesis-only, and what the user should decide next. It must also include a user-visible literature summary naming the closest prior found, the recent strong papers found, and what existing work still does not solve. In the final user-facing summary, say what current methods do, why they still fall short, how the proposed direction differs, the rough approach, the main risk, and where to read the full idea artifact and source log. Keep `.lab/writing/idea-source-log.md` synchronized with the actual search queries, bucketed sources, and final source count used in both sweeps. The literature bundle should default to about 20 sources unless the field is genuinely narrow and that smaller bundle is explicitly justified. Only after `.lab/.managed/scripts/validate_idea_artifact.py` passes may the stage present a final recommendation as converged.",
|
|
4
|
+
"claude_en": "This command runs the `idea` stage of the lab workflow. Use `.claude/skills/lab/stages/idea.md` as the single source of truth for the two brainstorm passes, two literature sweeps, closest-prior comparison, source-backed proposal memo, evaluation sketch, tentative contributions, user guidance, minimum viable experiment, convergence status, and approval gate. An explicit `/lab:idea` request defaults to a full-stage rerun, even if the user asks to reorganize or rewrite an existing idea memo. Only switch to rewrite-only mode when the user explicitly asks to only reorganize or rewrite the existing idea artifact without new searching. Rewrite-only mode may improve structure or readability, but it must not change the recommendation, paper-fit judgment, convergence status, or canonical context; it must say that the stage remains unconverged because the literature sweeps were not rerun. Start with brainstorm pass 1 over 3-4 candidate directions. For each candidate direction, explain what it is, why it matters, roughly how it would work, what problem it solves, and its main risk. Run literature sweep 1 with real closest-prior references for each direction, narrow the field with brainstorm pass 2 to 1-2 surviving directions, explain why each survivor remains, why each rejected direction was dropped, and why the narrowed recommendation is stronger now, then run literature sweep 2 to build the final source bundle before producing a collaborator-readable recommendation. Materialize or update `.lab/writing/idea.md` and `.lab/writing/idea-source-log.md` before any final recommendation, paper-fit judgment, or mission writeback. Do not end the stage with a chat-only brainstorm; if the work is still unconverged, say so explicitly, list what is still missing, and stop there. The final idea memo must explain the real-world scenario, the problem solved, why current methods fall short, roughly how the idea would work, how it would be evaluated, what the tentative contributions are, what is already source-backed, what is still hypothesis-only, and what the user should decide next. It must also include a user-visible literature summary naming the closest prior found, the recent strong papers found, and what existing work still does not solve. In the final user-facing summary, say what current methods do, why they still fall short, how the proposed direction differs, the rough approach, the main risk, and where to read the full idea artifact and source log. Keep `.lab/writing/idea-source-log.md` synchronized with the actual search queries, bucketed sources, and final source count used in both sweeps. The literature bundle should default to about 20 sources unless the field is genuinely narrow and that smaller bundle is explicitly justified. Only after `.lab/.managed/scripts/validate_idea_artifact.py` passes may the stage present a final recommendation as converged.",
|
|
5
|
+
"codex_zh": "本命令运行 `/lab:idea` 阶段。把 `.codex/skills/lab/stages/idea.md` 当成两轮脑暴、两轮文献检索、最接近前作对照、source-backed proposal memo、评测草图、暂定贡献、用户引导、最小可行实验、收敛状态和 approval gate 的单一来源。显式调用 `/lab:idea` 时,默认就是一次完整重跑,即使用户说的是“根据现有 idea 重组一下”也一样。只有当用户明确要求“只重写或重组现有 idea 文档,不重新检索”时,才允许进入 rewrite-only 模式。rewrite-only 模式只能改结构和可读性,不能改变推荐结论、paper fit 判断、收敛状态或 canonical context,并且必须明确说明:由于没有重跑文献检索,这一轮仍然处于未收敛状态。先做第一轮脑暴,产出 3-4 个候选方向。每个候选方向都要说明:它是什么、为什么值得研究、大致怎么做、解决了什么问题、主要风险是什么。再做第一轮文献检索,为每个方向补最接近前作;然后用第二轮脑暴把范围收敛到 1-2 个幸存方向,并写清每个幸存方向为什么保留、每个被淘汰方向为什么淘汰、为什么当前 narrowed recommendation 更强;最后做第二轮文献检索,补齐最终来源包,再输出协作者可读的推荐结论。任何 final recommendation、paper fit 判断或 mission 写回之前,都必须先 materialize or update `.lab/writing/idea.md` 和 `.lab/writing/idea-source-log.md`。不要以纯聊天脑暴收尾;如果当前还没收敛,就明确写出还缺什么,并停在未收敛状态。最终 idea memo 必须讲清真实场景、解决了什么问题、现有方法为什么不够、准备怎么做、大致怎么评、暂定贡献是什么、哪些部分已经 source-backed、哪些还只是 hypothesis,以及用户下一步该决定什么。它还必须包含一个用户可见的文献摘要,明确写出:找到的最接近前作、找到的近期强相关论文、以及现有工作仍未解决什么。最终给用户的简要总结里,还要说清:现有方法在做什么、为什么还是不够、推荐方向和现有方法有什么不同、大致怎么做、主要风险是什么,以及详细版去哪里看(`.lab/writing/idea.md` 和 `.lab/writing/idea-source-log.md`)。`.lab/writing/idea-source-log.md` 必须和两轮检索实际用到的查询、来源分桶和最终来源数保持一致。文献来源包默认目标约 20 篇;如果领域确实很窄,必须显式解释为什么合理地低于这个目标。只有在 `.lab/.managed/scripts/validate_idea_artifact.py` 通过之后,才可以把最终推荐当成已收敛结论输出。",
|
|
6
|
+
"claude_zh": "本命令运行 lab workflow 的 `idea` 阶段。把 `.claude/skills/lab/stages/idea.md` 当成两轮脑暴、两轮文献检索、最接近前作对照、source-backed proposal memo、评测草图、暂定贡献、用户引导、最小可行实验、收敛状态和 approval gate 的单一来源。显式调用 `/lab:idea` 时,默认就是一次完整重跑,即使用户说的是“根据现有 idea 重组一下”也一样。只有当用户明确要求“只重写或重组现有 idea 文档,不重新检索”时,才允许进入 rewrite-only 模式。rewrite-only 模式只能改结构和可读性,不能改变推荐结论、paper fit 判断、收敛状态或 canonical context,并且必须明确说明:由于没有重跑文献检索,这一轮仍然处于未收敛状态。先做第一轮脑暴,产出 3-4 个候选方向。每个候选方向都要说明:它是什么、为什么值得研究、大致怎么做、解决了什么问题、主要风险是什么。再做第一轮文献检索,为每个方向补最接近前作;然后用第二轮脑暴把范围收敛到 1-2 个幸存方向,并写清每个幸存方向为什么保留、每个被淘汰方向为什么淘汰、为什么当前 narrowed recommendation 更强;最后做第二轮文献检索,补齐最终来源包,再输出协作者可读的推荐结论。任何 final recommendation、paper fit 判断或 mission 写回之前,都必须先 materialize or update `.lab/writing/idea.md` 和 `.lab/writing/idea-source-log.md`。不要以纯聊天脑暴收尾;如果当前还没收敛,就明确写出还缺什么,并停在未收敛状态。最终 idea memo 必须讲清真实场景、解决了什么问题、现有方法为什么不够、准备怎么做、大致怎么评、暂定贡献是什么、哪些部分已经 source-backed、哪些还只是 hypothesis,以及用户下一步该决定什么。它还必须包含一个用户可见的文献摘要,明确写出:找到的最接近前作、找到的近期强相关论文、以及现有工作仍未解决什么。最终给用户的简要总结里,还要说清:现有方法在做什么、为什么还是不够、推荐方向和现有方法有什么不同、大致怎么做、主要风险是什么,以及详细版去哪里看(`.lab/writing/idea.md` 和 `.lab/writing/idea-source-log.md`)。`.lab/writing/idea-source-log.md` 必须和两轮检索实际用到的查询、来源分桶和最终来源数保持一致。文献来源包默认目标约 20 篇;如果领域确实很窄,必须显式解释为什么合理地低于这个目标。只有在 `.lab/.managed/scripts/validate_idea_artifact.py` 通过之后,才可以把最终推荐当成已收敛结论输出。"
|
|
7
7
|
}
|
|
8
8
|
}
|
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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 treat a readable workflow-language deliverable as a real persisted artifact rather than a review layer. 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 treat a readable workflow-language deliverable as a real persisted artifact rather than a review layer. 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`,并把可阅读的 workflow-language 交付稿当成正式持久化产物,而不是 review 层。如果当前稿件将从托管默认 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`,并把可阅读的 workflow-language 交付稿当成正式持久化产物,而不是 review 层。如果当前稿件将从托管默认 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: idea or research problem
|
|
|
7
7
|
Use the installed `lab` skill at `.claude/skills/lab/SKILL.md`.
|
|
8
8
|
|
|
9
9
|
Execute the requested `/lab-idea` 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 `idea` stage of the lab workflow. Use `.claude/skills/lab/stages/idea.md` as the single source of truth for the two brainstorm passes, two literature sweeps, closest-prior comparison, source-backed proposal memo, evaluation sketch, tentative contributions, user guidance, minimum viable experiment, convergence status, and approval gate. An explicit `/lab:idea` request defaults to a full-stage rerun, even if the user asks to reorganize or rewrite an existing idea memo. Only switch to rewrite-only mode when the user explicitly asks to only reorganize or rewrite the existing idea artifact without new searching. Rewrite-only mode may improve structure or readability, but it must not change the recommendation, paper-fit judgment, convergence status, or canonical context; it must say that the stage remains unconverged because the literature sweeps were not rerun. Start with brainstorm pass 1 over 3-4 candidate directions. For each candidate direction, explain what it is, why it matters, roughly how it would work, what problem it solves, and its main risk. Run literature sweep 1 with real closest-prior references for each direction, narrow the field with brainstorm pass 2 to 1-2 surviving directions, explain why each survivor remains, why each rejected direction was dropped, and why the narrowed recommendation is stronger now, then run literature sweep 2 to build the final source bundle before producing a collaborator-readable recommendation. Materialize or update `.lab/writing/idea.md` and `.lab/writing/idea-source-log.md` before any final recommendation, paper-fit judgment, or mission writeback. Do not end the stage with a chat-only brainstorm; if the work is still unconverged, say so explicitly, list what is still missing, and stop there. The final idea memo must explain the real-world scenario, the problem solved, why current methods fall short, roughly how the idea would work, how it would be evaluated, what the tentative contributions are, what is already source-backed, what is still hypothesis-only, and what the user should decide next. It must also include a user-visible literature summary naming the closest prior found, the recent strong papers found, and what existing work still does not solve. Keep `.lab/writing/idea-source-log.md` synchronized with the actual search queries, bucketed sources, and final source count used in both sweeps. The literature bundle should default to about 20 sources unless the field is genuinely narrow and that smaller bundle is explicitly justified. Only after `.lab/.managed/scripts/validate_idea_artifact.py` passes may the stage present a final recommendation as converged.
|
|
10
|
+
This command runs the `idea` stage of the lab workflow. Use `.claude/skills/lab/stages/idea.md` as the single source of truth for the two brainstorm passes, two literature sweeps, closest-prior comparison, source-backed proposal memo, evaluation sketch, tentative contributions, user guidance, minimum viable experiment, convergence status, and approval gate. An explicit `/lab:idea` request defaults to a full-stage rerun, even if the user asks to reorganize or rewrite an existing idea memo. Only switch to rewrite-only mode when the user explicitly asks to only reorganize or rewrite the existing idea artifact without new searching. Rewrite-only mode may improve structure or readability, but it must not change the recommendation, paper-fit judgment, convergence status, or canonical context; it must say that the stage remains unconverged because the literature sweeps were not rerun. Start with brainstorm pass 1 over 3-4 candidate directions. For each candidate direction, explain what it is, why it matters, roughly how it would work, what problem it solves, and its main risk. Run literature sweep 1 with real closest-prior references for each direction, narrow the field with brainstorm pass 2 to 1-2 surviving directions, explain why each survivor remains, why each rejected direction was dropped, and why the narrowed recommendation is stronger now, then run literature sweep 2 to build the final source bundle before producing a collaborator-readable recommendation. Materialize or update `.lab/writing/idea.md` and `.lab/writing/idea-source-log.md` before any final recommendation, paper-fit judgment, or mission writeback. Do not end the stage with a chat-only brainstorm; if the work is still unconverged, say so explicitly, list what is still missing, and stop there. The final idea memo must explain the real-world scenario, the problem solved, why current methods fall short, roughly how the idea would work, how it would be evaluated, what the tentative contributions are, what is already source-backed, what is still hypothesis-only, and what the user should decide next. It must also include a user-visible literature summary naming the closest prior found, the recent strong papers found, and what existing work still does not solve. In the final user-facing summary, say what current methods do, why they still fall short, how the proposed direction differs, the rough approach, the main risk, and where to read the full idea artifact and source log. Keep `.lab/writing/idea-source-log.md` synchronized with the actual search queries, bucketed sources, and final source count used in both sweeps. The literature bundle should default to about 20 sources unless the field is genuinely narrow and that smaller bundle is explicitly justified. Only after `.lab/.managed/scripts/validate_idea_artifact.py` passes may the stage present a final recommendation as converged.
|
|
@@ -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
|
|
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 treat a readable workflow-language deliverable as a real persisted artifact rather than a review layer. 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.
|
|
@@ -6,4 +6,4 @@ argument-hint: idea or research problem
|
|
|
6
6
|
Use the installed `lab` skill at `.codex/skills/lab/SKILL.md`.
|
|
7
7
|
|
|
8
8
|
Execute the requested `/lab:idea` 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:idea` stage. Use `.codex/skills/lab/stages/idea.md` as the single source of truth for the two brainstorm passes, two literature sweeps, closest-prior comparison, source-backed proposal memo, evaluation sketch, tentative contributions, user guidance, minimum viable experiment, convergence status, and approval gate. An explicit `/lab:idea` request defaults to a full-stage rerun, even if the user asks to reorganize or rewrite an existing idea memo. Only switch to rewrite-only mode when the user explicitly asks to only reorganize or rewrite the existing idea artifact without new searching. Rewrite-only mode may improve structure or readability, but it must not change the recommendation, paper-fit judgment, convergence status, or canonical context; it must say that the stage remains unconverged because the literature sweeps were not rerun. Start with brainstorm pass 1 over 3-4 candidate directions. For each candidate direction, explain what it is, why it matters, roughly how it would work, what problem it solves, and its main risk. Run literature sweep 1 with real closest-prior references for each direction, narrow the field with brainstorm pass 2 to 1-2 surviving directions, explain why each survivor remains, why each rejected direction was dropped, and why the narrowed recommendation is stronger now, then run literature sweep 2 to build the final source bundle before producing a collaborator-readable recommendation. Materialize or update `.lab/writing/idea.md` and `.lab/writing/idea-source-log.md` before any final recommendation, paper-fit judgment, or mission writeback. Do not end the stage with a chat-only brainstorm; if the work is still unconverged, say so explicitly, list what is still missing, and stop there. The final idea memo must explain the real-world scenario, the problem solved, why current methods fall short, roughly how the idea would work, how it would be evaluated, what the tentative contributions are, what is already source-backed, what is still hypothesis-only, and what the user should decide next. It must also include a user-visible literature summary naming the closest prior found, the recent strong papers found, and what existing work still does not solve. Keep `.lab/writing/idea-source-log.md` synchronized with the actual search queries, bucketed sources, and final source count used in both sweeps. The literature bundle should default to about 20 sources unless the field is genuinely narrow and that smaller bundle is explicitly justified. Only after `.lab/.managed/scripts/validate_idea_artifact.py` passes may the stage present a final recommendation as converged.
|
|
9
|
+
This command runs the `/lab:idea` stage. Use `.codex/skills/lab/stages/idea.md` as the single source of truth for the two brainstorm passes, two literature sweeps, closest-prior comparison, source-backed proposal memo, evaluation sketch, tentative contributions, user guidance, minimum viable experiment, convergence status, and approval gate. An explicit `/lab:idea` request defaults to a full-stage rerun, even if the user asks to reorganize or rewrite an existing idea memo. Only switch to rewrite-only mode when the user explicitly asks to only reorganize or rewrite the existing idea artifact without new searching. Rewrite-only mode may improve structure or readability, but it must not change the recommendation, paper-fit judgment, convergence status, or canonical context; it must say that the stage remains unconverged because the literature sweeps were not rerun. Start with brainstorm pass 1 over 3-4 candidate directions. For each candidate direction, explain what it is, why it matters, roughly how it would work, what problem it solves, and its main risk. Run literature sweep 1 with real closest-prior references for each direction, narrow the field with brainstorm pass 2 to 1-2 surviving directions, explain why each survivor remains, why each rejected direction was dropped, and why the narrowed recommendation is stronger now, then run literature sweep 2 to build the final source bundle before producing a collaborator-readable recommendation. Materialize or update `.lab/writing/idea.md` and `.lab/writing/idea-source-log.md` before any final recommendation, paper-fit judgment, or mission writeback. Do not end the stage with a chat-only brainstorm; if the work is still unconverged, say so explicitly, list what is still missing, and stop there. The final idea memo must explain the real-world scenario, the problem solved, why current methods fall short, roughly how the idea would work, how it would be evaluated, what the tentative contributions are, what is already source-backed, what is still hypothesis-only, and what the user should decide next. It must also include a user-visible literature summary naming the closest prior found, the recent strong papers found, and what existing work still does not solve. In the final user-facing summary, say what current methods do, why they still fall short, how the proposed direction differs, the rough approach, the main risk, and where to read the full idea artifact and source log. Keep `.lab/writing/idea-source-log.md` synchronized with the actual search queries, bucketed sources, and final source count used in both sweeps. The literature bundle should default to about 20 sources unless the field is genuinely narrow and that smaller bundle is explicitly justified. Only after `.lab/.managed/scripts/validate_idea_artifact.py` passes may the stage present a final recommendation as converged.
|
|
@@ -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
|
|
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 treat a readable workflow-language deliverable as a real persisted artifact rather than a review layer. 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.
|
|
@@ -13,6 +13,15 @@ REF_PATTERN_TEMPLATE = r"\\(?:auto|c|C)?ref\{%s\}"
|
|
|
13
13
|
WRITE_ITERATION_LANGUAGE_SECTION = {
|
|
14
14
|
"Language Decision": (r"^##\s+Language Decision\s*$", r"^##\s+语言决策\s*$"),
|
|
15
15
|
}
|
|
16
|
+
WORKFLOW_LANGUAGE_DELIVERABLE_REVIEW_MARKERS = (
|
|
17
|
+
"Paragraph Outline",
|
|
18
|
+
"Self-check",
|
|
19
|
+
"Claim-Evidence Map",
|
|
20
|
+
"段落大纲",
|
|
21
|
+
"自检",
|
|
22
|
+
"Claim-Evidence 映射",
|
|
23
|
+
"Claim-Evidence Map",
|
|
24
|
+
)
|
|
16
25
|
|
|
17
26
|
|
|
18
27
|
def parse_args():
|
|
@@ -341,6 +350,17 @@ def check_language_layers(paper_dir: Path, issues: list[str]):
|
|
|
341
350
|
("Why this decision was chosen", "Why this language was chosen", "为什么这样决定"),
|
|
342
351
|
):
|
|
343
352
|
issues.append("latest write iteration is missing why the language decision was chosen")
|
|
353
|
+
if finalization_decision == "convert-to-paper-language" and not has_field_value(
|
|
354
|
+
language_section,
|
|
355
|
+
(
|
|
356
|
+
"Workflow-language deliverable path",
|
|
357
|
+
"workflow_language_deliverable_path",
|
|
358
|
+
"工作流交付稿路径",
|
|
359
|
+
),
|
|
360
|
+
):
|
|
361
|
+
issues.append(
|
|
362
|
+
"latest write iteration is missing the workflow-language deliverable path in its language decision audit"
|
|
363
|
+
)
|
|
344
364
|
if workflow_language == "zh" and not text_looks_like_language(iteration_text, workflow_language):
|
|
345
365
|
issues.append("latest write iteration should follow workflow_language=zh instead of drifting into another language")
|
|
346
366
|
|
|
@@ -354,6 +374,34 @@ def check_language_layers(paper_dir: Path, issues: list[str]):
|
|
|
354
374
|
f"final manuscript sections should follow {target_language} after paper_language_finalization_decision={finalization_decision}"
|
|
355
375
|
)
|
|
356
376
|
|
|
377
|
+
if finalization_decision != "convert-to-paper-language":
|
|
378
|
+
return
|
|
379
|
+
|
|
380
|
+
workflow_deliverable_sections = paper_dir / "workflow-language" / "sections"
|
|
381
|
+
if not workflow_deliverable_sections.exists():
|
|
382
|
+
issues.append(
|
|
383
|
+
"missing persisted workflow-language deliverable under workflow-language/sections before converting the final manuscript to paper_language"
|
|
384
|
+
)
|
|
385
|
+
return
|
|
386
|
+
|
|
387
|
+
manuscript_section_files = sorted(path for path in sections_dir.glob("*.tex") if path.is_file())
|
|
388
|
+
for manuscript_section in manuscript_section_files:
|
|
389
|
+
companion_path = workflow_deliverable_sections / f"{manuscript_section.stem}.md"
|
|
390
|
+
if not companion_path.exists():
|
|
391
|
+
issues.append(
|
|
392
|
+
f"workflow-language deliverable is missing section companion: workflow-language/sections/{manuscript_section.stem}.md"
|
|
393
|
+
)
|
|
394
|
+
continue
|
|
395
|
+
companion_text = read_text(companion_path)
|
|
396
|
+
if not text_looks_like_language(companion_text, workflow_language):
|
|
397
|
+
issues.append(
|
|
398
|
+
f"workflow-language deliverable section {companion_path.name} should follow workflow_language={workflow_language}"
|
|
399
|
+
)
|
|
400
|
+
if any(marker in companion_text for marker in WORKFLOW_LANGUAGE_DELIVERABLE_REVIEW_MARKERS):
|
|
401
|
+
issues.append(
|
|
402
|
+
f"workflow-language deliverable section {companion_path.name} contains review-only scaffolding and cannot substitute for a readable deliverable"
|
|
403
|
+
)
|
|
404
|
+
|
|
357
405
|
|
|
358
406
|
def main():
|
|
359
407
|
args = parse_args()
|
|
@@ -30,6 +30,7 @@ For auto-mode orchestration or long-running experiment campaigns, also read:
|
|
|
30
30
|
- Durable run outputs belong under the configured `results_root`, not inside `.lab/changes/`.
|
|
31
31
|
- Figures and plots belong under the configured `figures_root`, not inside `.lab/changes/`.
|
|
32
32
|
- Deliverables belong under the configured `deliverables_root`, not inside `.lab/context/`.
|
|
33
|
+
- When `workflow_language` and `paper_language` differ, the deliverable set may include both the canonical manuscript and a persisted workflow-language reading deliverable. Review layers remain separate project-owned artifacts and must not substitute for readable deliverables.
|
|
33
34
|
- Change-local `data/` directories may hold lightweight manifests or batch specs, but not the canonical dataset copy.
|
|
34
35
|
- `.lab/context/state.md` is a derived durable research snapshot; `.lab/context/workflow-state.md` holds live workflow state.
|
|
35
36
|
- `.lab/context/summary.md` is the durable project summary; `.lab/context/session-brief.md` is the next-session startup brief.
|
|
@@ -55,6 +55,7 @@ Use this skill when the user invokes `/lab:*` or asks for the structured researc
|
|
|
55
55
|
- Classify the idea by contribution category and breakthrough level.
|
|
56
56
|
- Compare against existing methods explicitly and state why the idea should be better.
|
|
57
57
|
- Include a closest-prior-work comparison and a plain-language description of how the proposed direction would work.
|
|
58
|
+
- In the final user-facing summary, state what current methods do, why they still fall short, how the proposed direction differs, the rough approach, the main risk, and where to read `.lab/writing/idea.md` plus `.lab/writing/idea-source-log.md`.
|
|
58
59
|
- Distinguish sourced evidence from generated innovation claims.
|
|
59
60
|
- End with three meaningful points that are clear, short, and easy to scan.
|
|
60
61
|
- Produce 2-3 candidate approaches with trade-offs before recommending one.
|
|
@@ -190,9 +191,10 @@ Use this skill when the user invokes `/lab:*` or asks for the structured researc
|
|
|
190
191
|
- Read `.lab/context/mission.md`, `.lab/context/decisions.md`, `.lab/context/evidence-index.md`, and `.lab/context/data-decisions.md` before drafting.
|
|
191
192
|
- Write one paper section or one explicit subproblem per round.
|
|
192
193
|
- Ordinary manuscript drafting rounds should follow `workflow_language`.
|
|
193
|
-
-
|
|
194
|
+
- Treat the readable workflow-language paper as a real persisted deliverable, not as a review layer.
|
|
195
|
+
- 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`.
|
|
194
196
|
- 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.
|
|
195
|
-
- When the languages differ, record the workflow language, paper language, finalization decision,
|
|
197
|
+
- 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.
|
|
196
198
|
- Bind each claim to evidence from `report`, iteration reports, or normalized summaries.
|
|
197
199
|
- Use the write-stage contract in `.codex/skills/lab/stages/write.md` or `.claude/skills/lab/stages/write.md` as the single source of truth for template choice, paper-plan requirements, section-specific references, validator calls, asset coverage, and final manuscript gates.
|
|
198
200
|
- Use the vendored paper-writing references under `skills/lab/references/paper-writing/` and the matching example-bank files under `skills/lab/references/paper-writing/examples/`.
|
|
@@ -219,7 +221,7 @@ Use this skill when the user invokes `/lab:*` or asks for the structured researc
|
|
|
219
221
|
- No final report without validated normalized results.
|
|
220
222
|
- No paper-writing round without stable report artifacts, an approved framing artifact, evidence links, and LaTeX manuscript output.
|
|
221
223
|
- No final-draft or export round without passing section-quality, claim-safety, and manuscript-delivery validation.
|
|
222
|
-
- 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.
|
|
224
|
+
- 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.
|
|
223
225
|
|
|
224
226
|
## References
|
|
225
227
|
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
- If the field is genuinely too narrow to support that target, say so explicitly in both the idea artifact and the idea source log, and justify the smaller literature bundle instead of silently skipping the search.
|
|
63
63
|
- The idea artifact must follow the repository `workflow_language`, not whichever language is easiest locally.
|
|
64
64
|
- Before writing the full artifact, give the user a short summary with the one-sentence problem, why current methods fail, and the three meaningful points.
|
|
65
|
+
- Before ending the stage, give the user a concise decision summary that states the recommended direction, what current methods do, why they still fall short, how the proposed direction differs, the rough approach, the main risk, and where to read the full idea artifact and source log.
|
|
65
66
|
- If the current evaluation plan uses a proxy, simulator, or synthetic user in place of a real subject, say that explicitly in the idea artifact and explain why it is acceptable at the idea stage.
|
|
66
67
|
- Keep tentative contributions at the idea level. Do not drift into final paper-facing naming, title, or contribution wording; that belongs to `/lab:framing`.
|
|
67
68
|
- End the stage output with a user-guidance block that tells the user what to decide next, what information would most improve the idea, and which `/lab` stage should follow.
|
|
@@ -140,5 +141,6 @@
|
|
|
140
141
|
- Keep contributions tentative and high-level. The goal here is to explain what the paper might contribute, not to freeze paper-facing wording.
|
|
141
142
|
- The three meaningful points should each fit in one direct sentence.
|
|
142
143
|
- The final output must guide the user. Tell them what decision matters now, what information would sharpen the idea, and which `/lab` stage should come next.
|
|
144
|
+
- The final output must be short but decision-capable. Do not hide the key recommendation logic only inside `.lab/writing/idea.md`; summarize the recommended direction, current-method contrast, difference, rough approach, and main risk in the user-facing reply, then point to `.lab/writing/idea.md` and `.lab/writing/idea-source-log.md` for the full detail.
|
|
143
145
|
- Before approval, run `.lab/.managed/scripts/validate_idea_artifact.py --idea <idea-artifact> --source-log .lab/writing/idea-source-log.md --workflow-config .lab/config/workflow.json`.
|
|
144
146
|
- Do not leave `.lab/context/mission.md` as an empty template after convergence; write the approved problem, why it matters, the current benchmark scope, and the approved direction back into canonical context.
|
|
@@ -62,6 +62,9 @@ Run these on every round:
|
|
|
62
62
|
- Change one section or one clearly bounded subsection per round.
|
|
63
63
|
- LaTeX is the required manuscript output format.
|
|
64
64
|
- Ordinary manuscript drafting rounds should follow `workflow_language`.
|
|
65
|
+
- Treat the workflow-language manuscript as a real deliverable layer, not just an internal review note.
|
|
66
|
+
- 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.
|
|
67
|
+
- 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.
|
|
65
68
|
- If `paper_template_root` is configured, inspect that template directory before drafting and align the manuscript structure to it.
|
|
66
69
|
- Treat attached template directories as user-owned and potentially modified. Do not rewrite template files unless the user explicitly asks.
|
|
67
70
|
- 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.
|
|
@@ -77,10 +80,11 @@ Run these on every round:
|
|
|
77
80
|
- 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.
|
|
78
81
|
- If the user confirms staying on the default scaffold at that final reminder, persist `paper_template_final_reminder_acknowledged: true`.
|
|
79
82
|
- 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`.
|
|
83
|
+
- 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`.
|
|
80
84
|
- 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.
|
|
81
85
|
- If the user chooses to keep the draft language, persist `paper_language_finalization_decision: keep-workflow-language`.
|
|
82
86
|
- If the user chooses to convert, persist `paper_language_finalization_decision: convert-to-paper-language`.
|
|
83
|
-
- If `paper_language_finalization_decision` is `convert-to-paper-language`, the
|
|
87
|
+
- 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.
|
|
84
88
|
- Load only the current section guide. Do not load every section guide at once.
|
|
85
89
|
- Reuse example-bank structure, paragraph roles, sentence logic, and paper-facing LaTeX asset patterns when examples are bundled, but never copy wording verbatim.
|
|
86
90
|
- Treat example cites and example file names as writing references, not as evidence for the current paper.
|
|
@@ -123,10 +127,12 @@ Run these on every round:
|
|
|
123
127
|
- 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.
|
|
124
128
|
- Run `.lab/.managed/scripts/validate_manuscript_delivery.py --paper-dir <deliverables_root>/paper` before accepting a final-draft or export round.
|
|
125
129
|
- 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.
|
|
130
|
+
- 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.
|
|
126
131
|
- If the manuscript validator fails, keep editing and asset generation until it passes; do not stop at prose-only completion.
|
|
127
132
|
- 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.
|
|
128
133
|
- Record what changed and why in a write-iteration artifact.
|
|
129
134
|
- 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.
|
|
135
|
+
- When `workflow_language` and `paper_language` differ, also record the persisted workflow-language deliverable path in the write-iteration artifact.
|
|
130
136
|
- Return paragraph-level roles for the revised prose when drafting.
|
|
131
137
|
- Run the five-dimension self-review checklist before accepting a round.
|
|
132
138
|
- Run reviewer-style checks after every round.
|
|
@@ -147,6 +153,7 @@ Run these on every round:
|
|
|
147
153
|
- `<deliverables_root>/paper/figures/method-overview.tex`
|
|
148
154
|
- `<deliverables_root>/paper/figures/results-overview.tex`
|
|
149
155
|
- `<deliverables_root>/paper/analysis/analysis-asset.tex`
|
|
156
|
+
- `<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`
|
|
150
157
|
|
|
151
158
|
## Stop Conditions
|
|
152
159
|
|