superlab 0.1.75 → 0.1.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/i18n.cjs +58 -9
- package/lib/lab_write_contract.json +1 -0
- package/package-assets/claude/commands/lab/write.md +2 -0
- package/package-assets/claude/commands/lab-write.md +2 -0
- package/package-assets/claude/commands/lab.md +1 -1
- package/package-assets/claude/commands/lab:write.md +2 -0
- package/package-assets/claude/commands/lab/357/274/232write.md +2 -0
- package/package-assets/codex/prompts/lab/auto.md +1 -1
- package/package-assets/codex/prompts/lab/write.md +2 -0
- package/package-assets/codex/prompts/lab-auto.md +1 -1
- package/package-assets/codex/prompts/lab-write.md +2 -0
- package/package-assets/codex/prompts/lab.md +1 -1
- package/package-assets/codex/prompts/lab:auto.md +1 -1
- package/package-assets/codex/prompts/lab:write.md +2 -0
- package/package-assets/codex/prompts/lab/357/274/232auto.md +1 -1
- package/package-assets/codex/prompts/lab/357/274/232write.md +2 -0
- package/package-assets/shared/lab/.managed/scripts/validate_workflow_language_text.py +221 -0
- package/package-assets/shared/lab/.managed/templates/rebuttal-panel.md +21 -2
- package/package-assets/shared/lab/.managed/templates/terminology-glossary.md +5 -0
- package/package-assets/shared/skills/lab/SKILL.md +4 -2
- package/package-assets/shared/skills/lab/references/rebuttal-mode.md +32 -5
- package/package-assets/shared/skills/lab/stages/auto.md +8 -0
- package/package-assets/shared/skills/lab/stages/review.md +3 -2
- package/package-assets/shared/skills/lab/stages/write.md +4 -1
- package/package.json +1 -1
package/lib/i18n.cjs
CHANGED
|
@@ -1602,6 +1602,7 @@ const ZH_SKILL_FILES = {
|
|
|
1602
1602
|
- 正文里只用自然语言全称。
|
|
1603
1603
|
- 正文里不要使用包含 \`_\` 或 \`-\` 的标签名。
|
|
1604
1604
|
- 内部标识符、配置键和实验包标签默认不要进正文;若必须出现,也只能先给读者做一次映射,然后移回正文之外。
|
|
1605
|
+
- Chinese workflow-language terminology / 中文工作流层术语:当 \`workflow_language=zh\` 时,概念术语默认使用中文 paper-facing 名称和中文简称。英文最多在首次出现时以 \`中文全称(English full form, ACRONYM)\` 形式括注一次,后文复用中文简称。优先使用自然紧凑的中文简称;二字、三字、四字或更长短语都可以,只要读起来自然。不要强制固定字数。避免在中文正文里反复夹入 \`residual-fitting pathology\`、\`treated-group noise\` 或 \`gain-head function class\` 这类英文概念碎片。中文工作语言层完成前要运行 \`validate_workflow_language_text.py\` 扫描 touched sections、tables、figures 和 analysis assets。
|
|
1605
1606
|
|
|
1606
1607
|
## Entries
|
|
1607
1608
|
|
|
@@ -1610,6 +1611,10 @@ const ZH_SKILL_FILES = {
|
|
|
1610
1611
|
- Canonical paper-facing term:
|
|
1611
1612
|
- Full form at first mention:
|
|
1612
1613
|
- Approved short form or acronym:
|
|
1614
|
+
- Chinese short form, if workflow_language is zh:
|
|
1615
|
+
- English full form plus acronym allowed at first mention:
|
|
1616
|
+
- Allowed English fragments that may remain in Chinese prose:
|
|
1617
|
+
- Subsequent-language rule:
|
|
1613
1618
|
- Reader-facing explanation:
|
|
1614
1619
|
- Why this term matters here:
|
|
1615
1620
|
- First-use section:
|
|
@@ -1974,7 +1979,7 @@ for (const [relativePath, content] of Object.entries(ZH_SKILL_FILES)) {
|
|
|
1974
1979
|
|
|
1975
1980
|
const zhRebuttalModeReference = `# Rebuttal Mode
|
|
1976
1981
|
|
|
1977
|
-
本文件是 reviewer panel 和外部 rebuttal intake 的唯一共享合同。review、write、auto
|
|
1982
|
+
本文件是 reviewer panel 和外部 rebuttal intake 的唯一共享合同。review、write、auto 阶段只引用本文件,不复制五审稿人逻辑。
|
|
1978
1983
|
|
|
1979
1984
|
## 触发条件
|
|
1980
1985
|
|
|
@@ -1985,6 +1990,19 @@ const zhRebuttalModeReference = `# Rebuttal Mode
|
|
|
1985
1990
|
|
|
1986
1991
|
普通路径修复、依赖安装、实验轮询不触发本模式,除非它们会影响 paper-facing claim。
|
|
1987
1992
|
|
|
1993
|
+
## Light Read Set / 轻量读取范围
|
|
1994
|
+
|
|
1995
|
+
Rebuttal 是批评和路由,不是全仓审计。默认只读最小证据集合:
|
|
1996
|
+
|
|
1997
|
+
- active LaTeX / 现役 LaTeX:\`main.tex\`、\`sections/*.tex\`、\`tables/*.tex\`、\`figures/*.tex\`、\`analysis/*.tex\`
|
|
1998
|
+
- result summaries / 结果摘要:\`summary.csv\`、\`summary.tsv\`、\`summary.json\`、\`score_effect_summary.json\`、\`metric_summary.*\`、\`run_table.*\`
|
|
1999
|
+
- 受管索引:evidence index、evaluation protocol、paper plan、metric glossary、terminology glossary、artifact status、active topology
|
|
2000
|
+
- 用户提供的外部 rebuttal、批评或审稿意见
|
|
2001
|
+
|
|
2002
|
+
Do not run a whole-repository scan / 不要默认全仓扫描。不要默认读取 raw datasets / 原始数据集、full logs / 完整日志、完整 outputs 树、源码、notebook 或无关旧稿。
|
|
2003
|
+
|
|
2004
|
+
只有在 LaTeX claim 与结果摘要冲突、表格数值无来源、validator 指向具体文件、或用户明确要求 deep audit 时,才扩大读取范围。扩大时必须在 rebuttal panel 记录原因和额外路径。
|
|
2005
|
+
|
|
1988
2006
|
## 外部 Rebuttal Intake
|
|
1989
2007
|
|
|
1990
2008
|
外部批评必须先转成内部 issue,再进入改稿或实验。
|
|
@@ -1994,7 +2012,7 @@ const zhRebuttalModeReference = `# Rebuttal Mode
|
|
|
1994
2012
|
- 来源:reviewer id、AC、meta-review、同事或用户
|
|
1995
2013
|
- 批评摘要
|
|
1996
2014
|
- 影响对象:claim、section、table、figure、protocol、metric、threat model、experiment 或 wording
|
|
1997
|
-
- 审稿轴:R1、R2、R3 或
|
|
2015
|
+
- 审稿轴:R1、R2、R3、R4 或 R5
|
|
1998
2016
|
- 严重性:fatal、major、minor 或 clarification
|
|
1999
2017
|
- 路由:\`write\`、\`iterate\`、\`report\`、\`framing\`、\`data\`、\`spec\` 或 \`ask-user\`
|
|
2000
2018
|
- 接受检查:什么证据或稿件状态算修完
|
|
@@ -2013,7 +2031,11 @@ const zhRebuttalModeReference = `# Rebuttal Mode
|
|
|
2013
2031
|
|
|
2014
2032
|
检查消融、鲁棒性、泛化、失败案例、替代解释和指标解释是否完整。
|
|
2015
2033
|
|
|
2016
|
-
### R4
|
|
2034
|
+
### R4 Results / Tables / Numeric Evidence / 结果、表格与数值证据
|
|
2035
|
+
|
|
2036
|
+
检查实验数值、差值、表格设计、指标方向、split 数、统计支持、加粗规则、caption 和表注是否可审计;每张主表是否说明评估什么、指标如何解释、协议如何产生行,以及哪些比较边界不能跨越。
|
|
2037
|
+
|
|
2038
|
+
### R5 Presentation / Clarity
|
|
2017
2039
|
|
|
2018
2040
|
检查叙事线、术语、图表自解释、引用、LaTeX 和 section flow 是否清楚。
|
|
2019
2041
|
|
|
@@ -2037,13 +2059,25 @@ ZH_CONTENT[path.join(".lab", ".managed", "templates", "rebuttal-panel.md")] = `#
|
|
|
2037
2059
|
- 证据基础:
|
|
2038
2060
|
- 外部 rebuttal 来源(如果有):
|
|
2039
2061
|
|
|
2062
|
+
## Read-scope audit / 读取范围审计
|
|
2063
|
+
|
|
2064
|
+
- 是否从 Light Read Set / 轻量读取范围开始:
|
|
2065
|
+
- Active LaTeX / 现役 LaTeX 文件:
|
|
2066
|
+
- Result summaries / 结果摘要:
|
|
2067
|
+
- 受管索引:
|
|
2068
|
+
- 额外读取路径:
|
|
2069
|
+
- 如有扩大范围,原因:
|
|
2070
|
+
- 是否避免 whole-repository scan / 全仓扫描:
|
|
2071
|
+
- 是否避免 raw datasets / 原始数据集:
|
|
2072
|
+
- 是否避免 full logs / 完整日志:
|
|
2073
|
+
|
|
2040
2074
|
## 外部 Rebuttal Intake
|
|
2041
2075
|
|
|
2042
2076
|
| 来源 | 批评摘要 | 影响对象 | 审稿轴 | 严重性 | 路由 | 接受检查 |
|
|
2043
2077
|
| --- | --- | --- | --- | --- | --- | --- |
|
|
2044
2078
|
| | | | | | | |
|
|
2045
2079
|
|
|
2046
|
-
##
|
|
2080
|
+
## 五类审稿视角
|
|
2047
2081
|
|
|
2048
2082
|
### R1 Significance / Originality / Insight
|
|
2049
2083
|
|
|
@@ -2069,7 +2103,15 @@ ZH_CONTENT[path.join(".lab", ".managed", "templates", "rebuttal-panel.md")] = `#
|
|
|
2069
2103
|
- 路由:
|
|
2070
2104
|
- 接受检查:
|
|
2071
2105
|
|
|
2072
|
-
### R4
|
|
2106
|
+
### R4 Results / Tables / Numeric Evidence / 结果、表格与数值证据
|
|
2107
|
+
|
|
2108
|
+
- 问题:
|
|
2109
|
+
- 为什么重要:
|
|
2110
|
+
- 必要修复:
|
|
2111
|
+
- 路由:
|
|
2112
|
+
- 接受检查:
|
|
2113
|
+
|
|
2114
|
+
### R5 Presentation / Clarity
|
|
2073
2115
|
|
|
2074
2116
|
- 问题:
|
|
2075
2117
|
- 为什么重要:
|
|
@@ -2172,9 +2214,10 @@ const zhReviewRebuttalMode = `
|
|
|
2172
2214
|
## Rebuttal 模式
|
|
2173
2215
|
|
|
2174
2216
|
- 当目标是论文、section、表、图、report、claim set 或外部 rebuttal 批评时,必须读取 \`skills/lab/references/rebuttal-mode.md\`。
|
|
2175
|
-
- 不要在 review
|
|
2217
|
+
- 不要在 review 阶段复制五审稿人逻辑;使用 \`.lab/.managed/templates/rebuttal-panel.md\` 写持久 reviewer panel 工件。
|
|
2218
|
+
- 对“rebuttal 一下看有什么缺点”这类快速审查,默认只用 Light Read Set / 轻量读取范围:active LaTeX / 现役 LaTeX、result summaries / 结果摘要、受管索引和用户提供的批评。不要默认 whole-repository scan / 全仓扫描。
|
|
2176
2219
|
- 外部 reviewer、AC、meta-review、同事或用户批评必须先转成内部可执行 issue,再进入改稿或 response draft。
|
|
2177
|
-
- Reviewer Panel 按 R1 Significance / Originality / Insight、R2 Soundness / Technical Quality、R3 Evaluation / Analysis、R4 Presentation / Clarity
|
|
2220
|
+
- Reviewer Panel 按 R1 Significance / Originality / Insight、R2 Soundness / Technical Quality、R3 Evaluation / Analysis、R4 Results / Tables / Numeric Evidence、R5 Presentation / Clarity 五类审稿视角分类。
|
|
2178
2221
|
- L1/L2 默认把核心变更当作批准边界;L3 通过共享核心变更台账策略处理核心 claim、协议、指标、threat model、数据集范围、benchmark 范围或 framing 变化。
|
|
2179
2222
|
`;
|
|
2180
2223
|
|
|
@@ -2184,8 +2227,9 @@ const zhWriteRebuttalMode = `
|
|
|
2184
2227
|
|
|
2185
2228
|
- 当用户提供外部 reviewer、AC、meta-review、rebuttal、同事或用户自己的批评时,起草前必须读取 \`skills/lab/references/rebuttal-mode.md\`。
|
|
2186
2229
|
- 非平凡 paper-facing 写作轮次应把 rebuttal mode 当成 reviewer acceptance gate,并用 \`.lab/.managed/templates/rebuttal-panel.md\` 写 critique artifact。
|
|
2230
|
+
- write 的 rebuttal gate 必须先用 Light Read Set / 轻量读取范围:active LaTeX / 现役 LaTeX、result summaries / 结果摘要、受管索引和用户提供的批评;除非 rebuttal panel 记录具体扩大原因,否则不要 whole-repository scan / 全仓扫描。
|
|
2187
2231
|
- 不要实现 write-only rebuttal workflow;共享 rebuttal-mode 负责审稿轴、外部 rebuttal intake、issue routing 和核心变更策略。
|
|
2188
|
-
- fatal 或 major 的 R1/R2/R3 issue 未解决前,不要进入 prose polish;先修复、路由到 \`iterate\` / \`report\` / \`framing\` / \`spec\`,或用证据显式 waive。
|
|
2232
|
+
- fatal 或 major 的 R1/R2/R3/R4 issue 未解决前,不要进入 prose polish;先修复、路由到 \`iterate\` / \`report\` / \`framing\` / \`spec\`,或用证据显式 waive。
|
|
2189
2233
|
- L3 或显式授权的写作 campaign 可以改 paper-level claim、协议、指标、threat model、数据集范围、benchmark 范围或 framing,但必须通过 \`skills/lab/references/rebuttal-mode.md\` 里的 Core Mutation Ledger 策略。
|
|
2190
2234
|
- 在 write iteration artifact 里记录 rebuttal panel 路径、核心变更台账路径和未解决 issue id。
|
|
2191
2235
|
`;
|
|
@@ -2196,6 +2240,7 @@ const zhAutoRebuttalMode = `
|
|
|
2196
2240
|
|
|
2197
2241
|
- 当 auto campaign 包含 paper-facing \`report\`、\`write\`、外部 rebuttal repair 或 reviewer-driven paper revision 时,必须读取 \`skills/lab/references/rebuttal-mode.md\`。
|
|
2198
2242
|
- 使用 \`.lab/.managed/templates/rebuttal-panel.md\` 写持久 Reviewer Panel 工件,不要在 auto mode 里复制一套 reviewer workflow。
|
|
2243
|
+
- reviewer-driven repair 先用 Light Read Set / 轻量读取范围:active LaTeX / 现役 LaTeX、result summaries / 结果摘要、受管索引和用户批评。除非 rebuttal panel 记录扩大原因,否则不要 whole-repository scan / 全仓扫描、raw datasets / 原始数据集或 full logs / 完整日志。
|
|
2199
2244
|
- 外部 rebuttal 批评必须先转成内部 issue、route 和 acceptance check,再开始 \`run\`、\`iterate\`、\`report\` 或 \`write\`。
|
|
2200
2245
|
- L1/L2 默认把核心变更当作批准边界;L3 可以在已批准 envelope 内修改 paper-level claim、协议、指标、threat model、reviewer profile、数据集范围、benchmark 范围或 framing。
|
|
2201
2246
|
- L3 执行核心变更前,必须用 \`.lab/.managed/templates/core-mutation-ledger.md\` 写或更新 \`.lab/writing/core-mutation-ledger.md\`。
|
|
@@ -2507,6 +2552,7 @@ ZH_CONTENT[path.join(".codex", "skills", "lab", "stages", "write.md")] = `# \`/l
|
|
|
2507
2552
|
- 把 \`.lab/writing/terminology-glossary.md\` 当成写作期 glossary,用来沉淀全称、批准缩写、对外解释和可接受别名;它和 \`.lab/context/terminology-lock.md\` 的职责不同,不能混用。
|
|
2508
2553
|
- 无论当前语言是什么,都要满足同一套学术可读性标准;如果本轮引入或改写了关键术语、缩写、指标名、机制名或系统标签,就在首次出现时顺手说明它是什么、为什么在这里重要。
|
|
2509
2554
|
- 第一次出现先写全称;如果后面要复用简称或缩写,就在首次出现时定义。
|
|
2555
|
+
- 中文工作流层术语必须更严格:当 \`workflow_language=zh\` 时,概念术语默认使用中文 paper-facing 名称和中文简称;英文最多在首次出现时以 \`中文全称(English full form, ACRONYM)\` 形式括注一次,后文复用中文简称。优先使用自然紧凑的中文简称;二字、三字、四字或更长短语都可以,只要读起来自然。不要强制固定字数;不要在中文正文里反复夹入英文概念碎片。中文工作语言层完成前要运行 \`validate_workflow_language_text.py\`。
|
|
2510
2556
|
- 同一个概念只保留一个自然语言 paper-facing 名称。
|
|
2511
2557
|
- 正文里使用自然语言全称;如果后面要复用简称,就先在第一次出现时定义。
|
|
2512
2558
|
- 不要假定固定的写作顺序,例如 Method 一定先于 Experiments;formal naming 可以先在 Method、Experiments 或其他 section 里出现。
|
|
@@ -2704,7 +2750,7 @@ const zhAutoPriorityCodexLine =
|
|
|
2704
2750
|
const zhAutoPriorityClaudeLine =
|
|
2705
2751
|
"显式的 `/lab auto` 或 `/lab-auto` 请求,其优先级高于 brainstorming、spec review 这类更宽的创作或审阅技能路径。";
|
|
2706
2752
|
const zhAutoVisibleCloseoutLine =
|
|
2707
|
-
"最终可见收尾必须直接消费已通过校验的 stage report
|
|
2753
|
+
"最终可见收尾必须直接消费已通过校验的 stage report,并严格使用结果收尾格式作为顶层结构:`Requested outcome status` / `请求结果状态`、`Plain-language result table` / `白话结果表`、`Evidence and validation` / `证据与验证`、`Gaps and next action` / `缺口与下一步`。白话结果表必须回答用户要什么、改了什么、什么有效、什么无效、验证了什么、还没验证什么、是否还需要改进及原因。不要使用 `核心修复`、`主要修改文件`、`已完成`、`已推送` 这类顶层收尾标题;文件、commit 或修改细节只能放在四个必需标题下面。不能只用“已完成”“已推送”或流水账命令日志结束。";
|
|
2708
2754
|
|
|
2709
2755
|
ZH_CONTENT[path.join(".codex", "prompts", "lab.md")] = ZH_CONTENT[
|
|
2710
2756
|
path.join(".codex", "prompts", "lab.md")
|
|
@@ -3403,6 +3449,7 @@ ZH_CONTENT[path.join(".codex", "skills", "lab", "stages", "auto.md")] = `# \`/la
|
|
|
3403
3449
|
- 把 \`.lab/writing/terminology-glossary.md\` 当成写作期 glossary,用来沉淀全称、批准缩写、对外解释和可接受别名
|
|
3404
3450
|
- 当循环推进 \`write\` 时,无论 workflow language 还是 paper language,都要满足同一套学术可读性标准;如果本轮引入或改写了关键术语、缩写、指标名、机制名或系统标签,就在首次出现时说明它是什么、为什么在这里重要
|
|
3405
3451
|
- 当循环推进 \`write\` 时,第一次出现先写全称;如果后面要复用简称或缩写,就在首次出现时定义;一个概念只保留一个 paper-facing 名称,并尽量避免新造的连字符拼接标签
|
|
3452
|
+
- 当循环推进中文 \`write\` 时,使用 Chinese workflow-language terminology:概念术语默认中文名和 Chinese short form / 中文简称;English full form plus acronym / 英文全称和缩写最多首次括注一次;后文复用自然中文简称,不限制二字、三字、四字或更长短语;用 \`validate_workflow_language_text.py\` 拦截不必要的中英混杂
|
|
3406
3453
|
- 不要靠术语堆积来制造学术感;如果本轮引入或改写了关键术语,就在用户可见的总结里补一段简短术语说明,并把 terminology-clarity 自检写进最新 write iteration
|
|
3407
3454
|
- 不要把 \`sleep 30\`、单次 \`pgrep\` 或一次性的 \`metrics.json\` 探针当成 rung 主命令;这些只能算进度检查。
|
|
3408
3455
|
- 当真实实验进程还活着时,只允许发进度更新并继续等待,不能把这一 rung 当作已经完成。
|
|
@@ -3425,7 +3472,9 @@ const zhAutoStageVisibleCloseout = `
|
|
|
3425
3472
|
|
|
3426
3473
|
- 最终可见收尾必须在 stage report 校验通过后给出,不能只写“已完成”“已推送”或命令流水账。
|
|
3427
3474
|
- 最终可见收尾必须直接来自已校验的阶段报告,而不是另起一套临场叙述。
|
|
3475
|
+
- 最终可见收尾必须严格使用 Result Closeout Shape / 结果收尾格式作为顶层结构:\`Requested outcome status\` / 请求结果状态、\`Plain-language result table\` / 白话结果表、\`Evidence and validation\` / 证据与验证、\`Gaps and next action\` / 缺口与下一步。
|
|
3428
3476
|
- 最终可见收尾至少包含:请求交付物或目标及状态、核心说明表关键行、证据路径、验证命令和验证结果、已知缺口、下一步动作和为什么这样做。
|
|
3477
|
+
- 不要使用 \`核心修复\`、\`主要修改文件\`、\`已完成\`、\`已推送\` 这类顶层收尾标题;文件、commit 或修改细节只能放在四个必需标题下面。
|
|
3429
3478
|
- 如果说“已完成”,也必须同时写明仍然存在的 handoff 边界,例如 PDF 编译、版面检查、外部审批、预算耗尽、冻结核心风险或环境缺失。
|
|
3430
3479
|
`;
|
|
3431
3480
|
if (!ZH_CONTENT[path.join(".codex", "skills", "lab", "stages", "auto.md")].includes("最终可见收尾")) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"chinese_terminology_rule": "Chinese workflow-language terminology: when `workflow_language=zh`, concept terms should use a Chinese paper-facing name and a Chinese short form by default. English full form plus acronym may appear at first mention only as `中文全称(English full form, ACRONYM)`, then prose should reuse the Chinese short form. Prefer natural compact Chinese short forms; two-character, three-character, four-character, or longer short phrases are all acceptable when they read naturally. Do not force a fixed-length abbreviation. Avoid repeating English concept fragments throughout Chinese prose. Run `validate_workflow_language_text.py` on touched Chinese workflow-language sections, tables, figures, and analysis assets before completing the write round.",
|
|
2
3
|
"stage_prompt": {
|
|
3
4
|
"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. Carry the same core insight anchor through the paper: Introduction creates the cognitive contrast, Method turns the insight into design motivation, Experiments diagnose it with evidence, and Conclusion states the broader principle and boundary. Do not create a standalone `Our Insights` section just to satisfy this; weave the insight into motivation, mechanism, evidence, and limitations. Read the matching paper-writing reference, the current section block in `section-style-policies.md`, 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. When `workflow_language` and `paper_language` differ, treat the workflow-language paper layer as the default ordinary working layer. Resolve the active paper topology from `.lab/config/workflow.json` before drafting: the active canonical root is `<deliverables_root>/paper/`, and when workflow-language is active its root is `<deliverables_root>/paper/workflow-language/`. Ordinary write rounds should still edit one target paper layer at a time rather than silently refreshing both language layers. If the user names a concrete file or layer, treat that as the only target for the round unless they also explicitly request synchronization. Classify the named target path before editing it. Only active-layer targets count as managed manuscript rounds; legacy side layers such as `review_zh`, `translation_zh`, `sections_zh`, or stale `deliverables/.../workflow-language/*.md` paths are out-of-band/legacy edits and must not silently replace the active paper topology. If a workflow-language paper layer is active and the round still targets the canonical manuscript, record why canonical-only writing was acceptable in the write iteration artifact. If `paper_language_finalization_decision=convert-to-paper-language`, explicit canonical-manuscript work may target the canonical `paper_language` manuscript, but that does not make canonical the default ordinary working layer while workflow-language remains active. 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, do not use labels containing `_` or `-` in reader-facing prose, apply the same first-mention rule to table headers, table captions, table notes, and figure captions or labels, do not assume a fixed drafting order such as Method before Experiments, add a local naming bridge when a section uses canonical short names before their defining section has been drafted, and reuse the canonical label instead of replacing it with a narrative alias. Follow the current section's encouraged, discouraged, and banned expression lists from `section-style-policies.md`; section-specific banned expressions take priority over prose-polish goals. Before any additional tighten, compress, or polish pass on the same section, run a section-level acceptance gate first. That gate must explicitly confirm naming consistency, adjacent-section consistency, claim, metric, and ranking consistency with the current evidence, local clarity, local concision, and section-style compliance. If the round changes the paper's canonical experiment or evaluation protocol, treat that change as a canonical replacement unless the user explicitly scoped it as supplementary or appendix-only, run a paper-wide impact audit before more polishing, update the highest-impact stale sections and assets first, and do not default to translation/workflow-layer sync work unless the user explicitly asked for it or the language-finalization workflow requires it. Only edit both the canonical manuscript and the workflow-language paper layer in the same round when the user explicitly asks for cross-language synchronization or when a final-draft/export language-finalization step requires both layers to be refreshed together. Do not treat a routine tighten/compress/polish request as an instruction to sync the workflow-language companion. For export or remote-publication rounds, if `paper_language_finalization_decision=convert-to-paper-language`, include the workflow-language paper layer in the exported or pushed bundle by default. Allow canonical-only export or remote publication only when the user explicitly asked for it or when the remote target forbids extra files. If any gate item is unresolved, or if a banned expression or move from the current section policy remains, spend the round fixing that blocker instead of polishing sentences further, and do not default the next-step recommendation to another polish pass. Main tables must be locally self-contained: the title, header, note, and adjacent prose should tell the reader what each row and column means, the metric direction, and any relevant unit, denominator, or event condition. Short headers remain allowed, but abbreviations in paper-facing tables must be expanded locally in the same table. If Method or Experiments prose promises a metric family, the main table set must either expose those metrics directly or explicitly mark the missing ones as appendix-only and explain why. If a metric is measured but omitted because it is zero everywhere, redundant, or appendix-only, state that disposition explicitly in the table note instead of silently dropping it. Do not treat `\\resizebox{\\linewidth}{!}{...}` as the default way to fit a main table. Fit main tables by redesign first: shorten headers, move secondary metrics out of the main table, reduce or split columns, then adjust `\\tabcolsep` conservatively; only use `\\resizebox` as a last resort, keep width changes readable, and explain the width-control rationale locally in the same table note. Do not use `\\scriptsize` or `\\tiny` as the default main-table fit strategy. 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, the section-level acceptance gate, section-style policy compliance, the protocol/scope impact audit, the export or remote bundle audit, the round target layer, any canonical-only justification while workflow-language was active, any cross-language sync justification, the active canonical/workflow-language roots, the resolved target path role, any out-of-band justification, the insight integration audit, and the table-semantics audit 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
5
|
"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, the current section block in `section-style-policies.md`, 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. When `workflow_language` and `paper_language` differ, treat the workflow-language paper layer as the default ordinary working layer. Ordinary write rounds should still edit one target paper layer at a time rather than silently refreshing both language layers. If the user names a concrete file or layer, treat that as the only target for the round unless they also explicitly request synchronization. If a workflow-language paper layer is active and the round still targets the canonical manuscript, record why canonical-only writing was acceptable in the write iteration artifact. If `paper_language_finalization_decision=convert-to-paper-language`, explicit canonical-manuscript work may target the canonical `paper_language` manuscript, but that does not make canonical the default ordinary working layer while workflow-language remains active. 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, do not use labels containing `_` or `-` in reader-facing prose, apply the same first-mention rule to table headers, table captions, table notes, and figure captions or labels, do not assume a fixed drafting order such as Method before Experiments, add a local naming bridge when a section uses canonical short names before their defining section has been drafted, and reuse the canonical label instead of replacing it with a narrative alias. Follow the current section's encouraged, discouraged, and banned expression lists from `section-style-policies.md`; section-specific banned expressions take priority over prose-polish goals. Before any additional tighten, compress, or polish pass on the same section, run a section-level acceptance gate first. That gate must explicitly confirm naming consistency, adjacent-section consistency, claim, metric, and ranking consistency with the current evidence, local clarity, local concision, and section-style compliance. If the round changes the paper's canonical experiment or evaluation protocol, treat that change as a canonical replacement unless the user explicitly scoped it as supplementary or appendix-only, run a paper-wide impact audit before more polishing, update the highest-impact stale sections and assets first, and do not default to translation/workflow-layer sync work unless the user explicitly asked for it or the language-finalization workflow requires it. Only edit both the canonical manuscript and the workflow-language paper layer in the same round when the user explicitly asks for cross-language synchronization or when a final-draft/export language-finalization step requires both layers to be refreshed together. Do not treat a routine tighten/compress/polish request as an instruction to sync the workflow-language companion. For export or remote-publication rounds, if `paper_language_finalization_decision=convert-to-paper-language`, include the workflow-language paper layer in the exported or pushed bundle by default. Allow canonical-only export or remote publication only when the user explicitly asked for it or when the remote target forbids extra files. If any gate item is unresolved, or if a banned expression or move from the current section policy remains, spend the round fixing that blocker instead of polishing sentences further, and do not default the next-step recommendation to another polish pass. Main tables must be locally self-contained: the title, header, note, and adjacent prose should tell the reader what each row and column means, the metric direction, and any relevant unit, denominator, or event condition. Short headers remain allowed, but abbreviations in paper-facing tables must be expanded locally in the same table. If Method or Experiments prose promises a metric family, the main table set must either expose those metrics directly or explicitly mark the missing ones as appendix-only and explain why. If a metric is measured but omitted because it is zero everywhere, redundant, or appendix-only, state that disposition explicitly in the table note instead of silently dropping it. Do not treat `\\resizebox{\\linewidth}{!}{...}` as the default way to fit a main table. Fit main tables by redesign first: shorten headers, move secondary metrics out of the main table, reduce or split columns, then adjust `\\tabcolsep` conservatively; only use `\\resizebox` as a last resort, keep width changes readable, and explain the width-control rationale locally in the same table note. Do not use `\\scriptsize` or `\\tiny` as the default main-table fit strategy. 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, the section-level acceptance gate, section-style policy compliance, the protocol/scope impact audit, the export or remote bundle audit, the round target layer, any canonical-only justification while workflow-language was active, any cross-language sync justification, and the table-semantics audit 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.",
|
|
@@ -10,4 +10,6 @@ Execute the requested `/lab-write` command against the user's argument now. Do n
|
|
|
10
10
|
When the user provides reference PDFs, paper URLs, local reference-paper paths, or asks to write by reference, stay within the write stage and switch to reference-guided deep-write. Extract structure, map section/subsection slots, paragraph roles, table/figure roles, and bridge logic to the current paper, record the consumption plan, and only then draft prose. The current section must visibly realize the mapped slots; do not treat a consumption plan as enough. Reuse structure only; do not copy wording, claims, metrics, captions, or conclusions. Keep service-style or AI-assistant meta language and workflow-only placeholder language out of paper-facing prose.
|
|
11
11
|
When Method, Experiments, captions, tables, or analysis assets introduce or revise reported metrics, create or update `.lab/writing/metric-glossary.md` before prose polish. Each metric must define its paper-facing name, approved short name, table/header label, plain-language definition, calculation, unit or denominator, direction, scope or conditions, allowed aliases, forbidden aliases, and first-use location. Use the same metric names across prose, captions, table notes, table headers, and result summaries. Run `validate_metric_glossary.py` and remove forbidden aliases from reader-facing LaTeX before finalizing the round.
|
|
12
12
|
Carry the same core insight anchor through the paper: Introduction creates the cognitive contrast, Method turns the insight into design motivation, Experiments diagnose it with evidence, and Conclusion states the broader principle and boundary. Do not create a standalone `Our Insights` section just to satisfy this; weave the insight into motivation, mechanism, evidence, and limitations.
|
|
13
|
+
Chinese workflow-language terminology: when `workflow_language=zh`, concept terms should use a Chinese paper-facing name and a Chinese short form by default. English full form plus acronym may appear at first mention only as `中文全称(English full form, ACRONYM)`, then prose should reuse the Chinese short form. Prefer natural compact Chinese short forms; two-character, three-character, four-character, or longer short phrases are all acceptable when they read naturally. Do not force a fixed-length abbreviation. Avoid repeating English concept fragments throughout Chinese prose. Run `validate_workflow_language_text.py` on touched Chinese workflow-language sections, tables, figures, and analysis assets before completing the write round.
|
|
14
|
+
For Chinese workflow-language output, run `validate_workflow_language_text.py` over the touched workflow-language sections, tables, figures, and analysis assets before completing the write round. If it reports English concept fragments, translate them or define a justified glossary exception before prose polish.
|
|
13
15
|
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, the current section block in `section-style-policies.md`, 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. When `workflow_language` and `paper_language` differ, treat the workflow-language paper layer as the default ordinary working layer. Ordinary write rounds should still edit one target paper layer at a time rather than silently refreshing both language layers. If the user names a concrete file or layer, treat that as the only target for the round unless they also explicitly request synchronization. If a workflow-language paper layer is active and the round still targets the canonical manuscript, record why canonical-only writing was acceptable in the write iteration artifact. If `paper_language_finalization_decision=convert-to-paper-language`, explicit canonical-manuscript work may target the canonical `paper_language` manuscript, but that does not make canonical the default ordinary working layer while workflow-language remains active. 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, do not use labels containing `_` or `-` in reader-facing prose, apply the same first-mention rule to table headers, table captions, table notes, and figure captions or labels, do not assume a fixed drafting order such as Method before Experiments, add a local naming bridge when a section uses canonical short names before their defining section has been drafted, and reuse the canonical label instead of replacing it with a narrative alias. Follow the current section's encouraged, discouraged, and banned expression lists from `section-style-policies.md`; section-specific banned expressions take priority over prose-polish goals. Before any additional tighten, compress, or polish pass on the same section, run a section-level acceptance gate first. That gate must explicitly confirm naming consistency, adjacent-section consistency, claim, metric, and ranking consistency with the current evidence, local clarity, local concision, and section-style compliance. If the round changes the paper's canonical experiment or evaluation protocol, treat that change as a canonical replacement unless the user explicitly scoped it as supplementary or appendix-only, run a paper-wide impact audit before more polishing, update the highest-impact stale sections and assets first, and do not default to translation/workflow-layer sync work unless the user explicitly asked for it or the language-finalization workflow requires it. Only edit both the canonical manuscript and the workflow-language paper layer in the same round when the user explicitly asks for cross-language synchronization or when a final-draft/export language-finalization step requires both layers to be refreshed together. Do not treat a routine tighten/compress/polish request as an instruction to sync the workflow-language companion. For export or remote-publication rounds, if `paper_language_finalization_decision=convert-to-paper-language`, include the workflow-language paper layer in the exported or pushed bundle by default. Allow canonical-only export or remote publication only when the user explicitly asked for it or when the remote target forbids extra files. If any gate item is unresolved, or if a banned expression or move from the current section policy remains, spend the round fixing that blocker instead of polishing sentences further, and do not default the next-step recommendation to another polish pass. Main tables must be locally self-contained: the title, header, note, and adjacent prose should tell the reader what each row and column means, the metric direction, and any relevant unit, denominator, or event condition. Short headers remain allowed, but abbreviations in paper-facing tables must be expanded locally in the same table. If Method or Experiments prose promises a metric family, the main table set must either expose those metrics directly or explicitly mark the missing ones as appendix-only and explain why. If a metric is measured but omitted because it is zero everywhere, redundant, or appendix-only, state that disposition explicitly in the table note instead of silently dropping it. Do not treat `\resizebox{\linewidth}{!}{...}` as the default way to fit a main table. Fit main tables by redesign first: shorten headers, move secondary metrics out of the main table, reduce or split columns, then adjust `\tabcolsep` conservatively; only use `\resizebox` as a last resort, keep width changes readable, and explain the width-control rationale locally in the same table note. Do not use `\scriptsize` or `\tiny` as the default main-table fit strategy. 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, the section-level acceptance gate, section-style policy compliance, the protocol/scope impact audit, the export or remote bundle audit, the round target layer, any canonical-only justification while workflow-language was active, any cross-language sync justification, and the table-semantics audit 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.
|
|
@@ -10,4 +10,6 @@ Execute the requested `/lab-write` command against the user's argument now. Do n
|
|
|
10
10
|
When the user provides reference PDFs, paper URLs, local reference-paper paths, or asks to write by reference, stay within the write stage and switch to reference-guided deep-write. Extract structure, map section/subsection slots, paragraph roles, table/figure roles, and bridge logic to the current paper, record the consumption plan, and only then draft prose. The current section must visibly realize the mapped slots; do not treat a consumption plan as enough. Reuse structure only; do not copy wording, claims, metrics, captions, or conclusions. Keep service-style or AI-assistant meta language and workflow-only placeholder language out of paper-facing prose.
|
|
11
11
|
When Method, Experiments, captions, tables, or analysis assets introduce or revise reported metrics, create or update `.lab/writing/metric-glossary.md` before prose polish. Each metric must define its paper-facing name, approved short name, table/header label, plain-language definition, calculation, unit or denominator, direction, scope or conditions, allowed aliases, forbidden aliases, and first-use location. Use the same metric names across prose, captions, table notes, table headers, and result summaries. Run `validate_metric_glossary.py` and remove forbidden aliases from reader-facing LaTeX before finalizing the round.
|
|
12
12
|
Carry the same core insight anchor through the paper: Introduction creates the cognitive contrast, Method turns the insight into design motivation, Experiments diagnose it with evidence, and Conclusion states the broader principle and boundary. Do not create a standalone `Our Insights` section just to satisfy this; weave the insight into motivation, mechanism, evidence, and limitations.
|
|
13
|
+
Chinese workflow-language terminology: when `workflow_language=zh`, concept terms should use a Chinese paper-facing name and a Chinese short form by default. English full form plus acronym may appear at first mention only as `中文全称(English full form, ACRONYM)`, then prose should reuse the Chinese short form. Prefer natural compact Chinese short forms; two-character, three-character, four-character, or longer short phrases are all acceptable when they read naturally. Do not force a fixed-length abbreviation. Avoid repeating English concept fragments throughout Chinese prose. Run `validate_workflow_language_text.py` on touched Chinese workflow-language sections, tables, figures, and analysis assets before completing the write round.
|
|
14
|
+
For Chinese workflow-language output, run `validate_workflow_language_text.py` over the touched workflow-language sections, tables, figures, and analysis assets before completing the write round. If it reports English concept fragments, translate them or define a justified glossary exception before prose polish.
|
|
13
15
|
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, the current section block in `section-style-policies.md`, 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. When `workflow_language` and `paper_language` differ, treat the workflow-language paper layer as the default ordinary working layer. Ordinary write rounds should still edit one target paper layer at a time rather than silently refreshing both language layers. If the user names a concrete file or layer, treat that as the only target for the round unless they also explicitly request synchronization. If a workflow-language paper layer is active and the round still targets the canonical manuscript, record why canonical-only writing was acceptable in the write iteration artifact. If `paper_language_finalization_decision=convert-to-paper-language`, explicit canonical-manuscript work may target the canonical `paper_language` manuscript, but that does not make canonical the default ordinary working layer while workflow-language remains active. 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, do not use labels containing `_` or `-` in reader-facing prose, apply the same first-mention rule to table headers, table captions, table notes, and figure captions or labels, do not assume a fixed drafting order such as Method before Experiments, add a local naming bridge when a section uses canonical short names before their defining section has been drafted, and reuse the canonical label instead of replacing it with a narrative alias. Follow the current section's encouraged, discouraged, and banned expression lists from `section-style-policies.md`; section-specific banned expressions take priority over prose-polish goals. Before any additional tighten, compress, or polish pass on the same section, run a section-level acceptance gate first. That gate must explicitly confirm naming consistency, adjacent-section consistency, claim, metric, and ranking consistency with the current evidence, local clarity, local concision, and section-style compliance. If the round changes the paper's canonical experiment or evaluation protocol, treat that change as a canonical replacement unless the user explicitly scoped it as supplementary or appendix-only, run a paper-wide impact audit before more polishing, update the highest-impact stale sections and assets first, and do not default to translation/workflow-layer sync work unless the user explicitly asked for it or the language-finalization workflow requires it. Only edit both the canonical manuscript and the workflow-language paper layer in the same round when the user explicitly asks for cross-language synchronization or when a final-draft/export language-finalization step requires both layers to be refreshed together. Do not treat a routine tighten/compress/polish request as an instruction to sync the workflow-language companion. For export or remote-publication rounds, if `paper_language_finalization_decision=convert-to-paper-language`, include the workflow-language paper layer in the exported or pushed bundle by default. Allow canonical-only export or remote publication only when the user explicitly asked for it or when the remote target forbids extra files. If any gate item is unresolved, or if a banned expression or move from the current section policy remains, spend the round fixing that blocker instead of polishing sentences further, and do not default the next-step recommendation to another polish pass. Main tables must be locally self-contained: the title, header, note, and adjacent prose should tell the reader what each row and column means, the metric direction, and any relevant unit, denominator, or event condition. Short headers remain allowed, but abbreviations in paper-facing tables must be expanded locally in the same table. If Method or Experiments prose promises a metric family, the main table set must either expose those metrics directly or explicitly mark the missing ones as appendix-only and explain why. If a metric is measured but omitted because it is zero everywhere, redundant, or appendix-only, state that disposition explicitly in the table note instead of silently dropping it. Do not treat `\resizebox{\linewidth}{!}{...}` as the default way to fit a main table. Fit main tables by redesign first: shorten headers, move secondary metrics out of the main table, reduce or split columns, then adjust `\tabcolsep` conservatively; only use `\resizebox` as a last resort, keep width changes readable, and explain the width-control rationale locally in the same table note. Do not use `\scriptsize` or `\tiny` as the default main-table fit strategy. 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, the section-level acceptance gate, section-style policy compliance, the protocol/scope impact audit, the export or remote bundle audit, the round target layer, any canonical-only justification while workflow-language was active, any cross-language sync justification, and the table-semantics audit 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.
|
|
@@ -100,7 +100,7 @@ Treat all of these as equivalent stage requests:
|
|
|
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
101
|
- Separate internal polling from user-facing progress reports.
|
|
102
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.
|
|
103
|
-
- Final visible closeout must consume the validated stage report:
|
|
103
|
+
- Final visible closeout must consume the validated stage report and use this Result Closeout Shape as top-level headings: `Requested outcome status`, `Plain-language result table`, `Evidence and validation`, and `Gaps and next action`. Show requested deliverable statuses, Core Explanation Table rows, evidence paths, validation/verification commands and results, known gaps, and the next action. Do not use top-level closeout headings such as `核心修复` or `主要修改文件`, and do not end with only "done", "pushed", or a chronological command log.
|
|
104
104
|
|
|
105
105
|
- Treat `Autonomy level L1/L2/L3` as the execution privilege level, not as a paper layer, phase, or table number.
|
|
106
106
|
- 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`.
|
|
@@ -10,4 +10,6 @@ Execute the requested `/lab-write` command against the user's argument now. Do n
|
|
|
10
10
|
When the user provides reference PDFs, paper URLs, local reference-paper paths, or asks to write by reference, stay within the write stage and switch to reference-guided deep-write. Extract structure, map section/subsection slots, paragraph roles, table/figure roles, and bridge logic to the current paper, record the consumption plan, and only then draft prose. The current section must visibly realize the mapped slots; do not treat a consumption plan as enough. Reuse structure only; do not copy wording, claims, metrics, captions, or conclusions. Keep service-style or AI-assistant meta language and workflow-only placeholder language out of paper-facing prose.
|
|
11
11
|
When Method, Experiments, captions, tables, or analysis assets introduce or revise reported metrics, create or update `.lab/writing/metric-glossary.md` before prose polish. Each metric must define its paper-facing name, approved short name, table/header label, plain-language definition, calculation, unit or denominator, direction, scope or conditions, allowed aliases, forbidden aliases, and first-use location. Use the same metric names across prose, captions, table notes, table headers, and result summaries. Run `validate_metric_glossary.py` and remove forbidden aliases from reader-facing LaTeX before finalizing the round.
|
|
12
12
|
Carry the same core insight anchor through the paper: Introduction creates the cognitive contrast, Method turns the insight into design motivation, Experiments diagnose it with evidence, and Conclusion states the broader principle and boundary. Do not create a standalone `Our Insights` section just to satisfy this; weave the insight into motivation, mechanism, evidence, and limitations.
|
|
13
|
+
Chinese workflow-language terminology: when `workflow_language=zh`, concept terms should use a Chinese paper-facing name and a Chinese short form by default. English full form plus acronym may appear at first mention only as `中文全称(English full form, ACRONYM)`, then prose should reuse the Chinese short form. Prefer natural compact Chinese short forms; two-character, three-character, four-character, or longer short phrases are all acceptable when they read naturally. Do not force a fixed-length abbreviation. Avoid repeating English concept fragments throughout Chinese prose. Run `validate_workflow_language_text.py` on touched Chinese workflow-language sections, tables, figures, and analysis assets before completing the write round.
|
|
14
|
+
For Chinese workflow-language output, run `validate_workflow_language_text.py` over the touched workflow-language sections, tables, figures, and analysis assets before completing the write round. If it reports English concept fragments, translate them or define a justified glossary exception before prose polish.
|
|
13
15
|
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, the current section block in `section-style-policies.md`, 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. When `workflow_language` and `paper_language` differ, treat the workflow-language paper layer as the default ordinary working layer. Ordinary write rounds should still edit one target paper layer at a time rather than silently refreshing both language layers. If the user names a concrete file or layer, treat that as the only target for the round unless they also explicitly request synchronization. If a workflow-language paper layer is active and the round still targets the canonical manuscript, record why canonical-only writing was acceptable in the write iteration artifact. If `paper_language_finalization_decision=convert-to-paper-language`, explicit canonical-manuscript work may target the canonical `paper_language` manuscript, but that does not make canonical the default ordinary working layer while workflow-language remains active. 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, do not use labels containing `_` or `-` in reader-facing prose, apply the same first-mention rule to table headers, table captions, table notes, and figure captions or labels, do not assume a fixed drafting order such as Method before Experiments, add a local naming bridge when a section uses canonical short names before their defining section has been drafted, and reuse the canonical label instead of replacing it with a narrative alias. Follow the current section's encouraged, discouraged, and banned expression lists from `section-style-policies.md`; section-specific banned expressions take priority over prose-polish goals. Before any additional tighten, compress, or polish pass on the same section, run a section-level acceptance gate first. That gate must explicitly confirm naming consistency, adjacent-section consistency, claim, metric, and ranking consistency with the current evidence, local clarity, local concision, and section-style compliance. If the round changes the paper's canonical experiment or evaluation protocol, treat that change as a canonical replacement unless the user explicitly scoped it as supplementary or appendix-only, run a paper-wide impact audit before more polishing, update the highest-impact stale sections and assets first, and do not default to translation/workflow-layer sync work unless the user explicitly asked for it or the language-finalization workflow requires it. Only edit both the canonical manuscript and the workflow-language paper layer in the same round when the user explicitly asks for cross-language synchronization or when a final-draft/export language-finalization step requires both layers to be refreshed together. Do not treat a routine tighten/compress/polish request as an instruction to sync the workflow-language companion. For export or remote-publication rounds, if `paper_language_finalization_decision=convert-to-paper-language`, include the workflow-language paper layer in the exported or pushed bundle by default. Allow canonical-only export or remote publication only when the user explicitly asked for it or when the remote target forbids extra files. If any gate item is unresolved, or if a banned expression or move from the current section policy remains, spend the round fixing that blocker instead of polishing sentences further, and do not default the next-step recommendation to another polish pass. Main tables must be locally self-contained: the title, header, note, and adjacent prose should tell the reader what each row and column means, the metric direction, and any relevant unit, denominator, or event condition. Short headers remain allowed, but abbreviations in paper-facing tables must be expanded locally in the same table. If Method or Experiments prose promises a metric family, the main table set must either expose those metrics directly or explicitly mark the missing ones as appendix-only and explain why. If a metric is measured but omitted because it is zero everywhere, redundant, or appendix-only, state that disposition explicitly in the table note instead of silently dropping it. Do not treat `\resizebox{\linewidth}{!}{...}` as the default way to fit a main table. Fit main tables by redesign first: shorten headers, move secondary metrics out of the main table, reduce or split columns, then adjust `\tabcolsep` conservatively; only use `\resizebox` as a last resort, keep width changes readable, and explain the width-control rationale locally in the same table note. Do not use `\scriptsize` or `\tiny` as the default main-table fit strategy. 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, the section-level acceptance gate, section-style policy compliance, the protocol/scope impact audit, the export or remote bundle audit, the round target layer, any canonical-only justification while workflow-language was active, any cross-language sync justification, and the table-semantics audit 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.
|
|
@@ -10,4 +10,6 @@ Execute the requested `/lab-write` command against the user's argument now. Do n
|
|
|
10
10
|
When the user provides reference PDFs, paper URLs, local reference-paper paths, or asks to write by reference, stay within the write stage and switch to reference-guided deep-write. Extract structure, map section/subsection slots, paragraph roles, table/figure roles, and bridge logic to the current paper, record the consumption plan, and only then draft prose. The current section must visibly realize the mapped slots; do not treat a consumption plan as enough. Reuse structure only; do not copy wording, claims, metrics, captions, or conclusions. Keep service-style or AI-assistant meta language and workflow-only placeholder language out of paper-facing prose.
|
|
11
11
|
When Method, Experiments, captions, tables, or analysis assets introduce or revise reported metrics, create or update `.lab/writing/metric-glossary.md` before prose polish. Each metric must define its paper-facing name, approved short name, table/header label, plain-language definition, calculation, unit or denominator, direction, scope or conditions, allowed aliases, forbidden aliases, and first-use location. Use the same metric names across prose, captions, table notes, table headers, and result summaries. Run `validate_metric_glossary.py` and remove forbidden aliases from reader-facing LaTeX before finalizing the round.
|
|
12
12
|
Carry the same core insight anchor through the paper: Introduction creates the cognitive contrast, Method turns the insight into design motivation, Experiments diagnose it with evidence, and Conclusion states the broader principle and boundary. Do not create a standalone `Our Insights` section just to satisfy this; weave the insight into motivation, mechanism, evidence, and limitations.
|
|
13
|
+
Chinese workflow-language terminology: when `workflow_language=zh`, concept terms should use a Chinese paper-facing name and a Chinese short form by default. English full form plus acronym may appear at first mention only as `中文全称(English full form, ACRONYM)`, then prose should reuse the Chinese short form. Prefer natural compact Chinese short forms; two-character, three-character, four-character, or longer short phrases are all acceptable when they read naturally. Do not force a fixed-length abbreviation. Avoid repeating English concept fragments throughout Chinese prose. Run `validate_workflow_language_text.py` on touched Chinese workflow-language sections, tables, figures, and analysis assets before completing the write round.
|
|
14
|
+
For Chinese workflow-language output, run `validate_workflow_language_text.py` over the touched workflow-language sections, tables, figures, and analysis assets before completing the write round. If it reports English concept fragments, translate them or define a justified glossary exception before prose polish.
|
|
13
15
|
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, the current section block in `section-style-policies.md`, 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. When `workflow_language` and `paper_language` differ, treat the workflow-language paper layer as the default ordinary working layer. Ordinary write rounds should still edit one target paper layer at a time rather than silently refreshing both language layers. If the user names a concrete file or layer, treat that as the only target for the round unless they also explicitly request synchronization. If a workflow-language paper layer is active and the round still targets the canonical manuscript, record why canonical-only writing was acceptable in the write iteration artifact. If `paper_language_finalization_decision=convert-to-paper-language`, explicit canonical-manuscript work may target the canonical `paper_language` manuscript, but that does not make canonical the default ordinary working layer while workflow-language remains active. 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, do not use labels containing `_` or `-` in reader-facing prose, apply the same first-mention rule to table headers, table captions, table notes, and figure captions or labels, do not assume a fixed drafting order such as Method before Experiments, add a local naming bridge when a section uses canonical short names before their defining section has been drafted, and reuse the canonical label instead of replacing it with a narrative alias. Follow the current section's encouraged, discouraged, and banned expression lists from `section-style-policies.md`; section-specific banned expressions take priority over prose-polish goals. Before any additional tighten, compress, or polish pass on the same section, run a section-level acceptance gate first. That gate must explicitly confirm naming consistency, adjacent-section consistency, claim, metric, and ranking consistency with the current evidence, local clarity, local concision, and section-style compliance. If the round changes the paper's canonical experiment or evaluation protocol, treat that change as a canonical replacement unless the user explicitly scoped it as supplementary or appendix-only, run a paper-wide impact audit before more polishing, update the highest-impact stale sections and assets first, and do not default to translation/workflow-layer sync work unless the user explicitly asked for it or the language-finalization workflow requires it. Only edit both the canonical manuscript and the workflow-language paper layer in the same round when the user explicitly asks for cross-language synchronization or when a final-draft/export language-finalization step requires both layers to be refreshed together. Do not treat a routine tighten/compress/polish request as an instruction to sync the workflow-language companion. For export or remote-publication rounds, if `paper_language_finalization_decision=convert-to-paper-language`, include the workflow-language paper layer in the exported or pushed bundle by default. Allow canonical-only export or remote publication only when the user explicitly asked for it or when the remote target forbids extra files. If any gate item is unresolved, or if a banned expression or move from the current section policy remains, spend the round fixing that blocker instead of polishing sentences further, and do not default the next-step recommendation to another polish pass. Main tables must be locally self-contained: the title, header, note, and adjacent prose should tell the reader what each row and column means, the metric direction, and any relevant unit, denominator, or event condition. Short headers remain allowed, but abbreviations in paper-facing tables must be expanded locally in the same table. If Method or Experiments prose promises a metric family, the main table set must either expose those metrics directly or explicitly mark the missing ones as appendix-only and explain why. If a metric is measured but omitted because it is zero everywhere, redundant, or appendix-only, state that disposition explicitly in the table note instead of silently dropping it. Do not treat `\resizebox{\linewidth}{!}{...}` as the default way to fit a main table. Fit main tables by redesign first: shorten headers, move secondary metrics out of the main table, reduce or split columns, then adjust `\tabcolsep` conservatively; only use `\resizebox` as a last resort, keep width changes readable, and explain the width-control rationale locally in the same table note. Do not use `\scriptsize` or `\tiny` as the default main-table fit strategy. 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, the section-level acceptance gate, section-style policy compliance, the protocol/scope impact audit, the export or remote bundle audit, the round target layer, any canonical-only justification while workflow-language was active, any cross-language sync justification, and the table-semantics audit 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.
|
|
@@ -27,4 +27,4 @@ If the preflight block cannot be completed because any required field is missing
|
|
|
27
27
|
When the repository workflow language is Chinese, summaries, checklist items, task labels, and progress updates should be written in Chinese unless a literal identifier must stay unchanged.
|
|
28
28
|
Treat `Layer 3`, `Phase 1`, or `Table 2` as paper-scope targets. Treat `Autonomy level L3` as the execution permission level.
|
|
29
29
|
Do not replace the real long-running experiment command with a short watcher such as `sleep 30`, `pgrep`, or a one-shot `metrics.json` probe. While the real experiment process is still alive, emit only a progress update and keep waiting.
|
|
30
|
-
Final visible closeout is mandatory when `/lab:auto` reaches stop, failure, escalation, or handoff. After validating the stage report, the final answer must consume that report directly: list the requested deliverables or objectives with status, summarize the Core Explanation Table rows, provide evidence paths, show validation/verification commands and validation results, name known gaps or commands that could not run, and state the next action plus why it is appropriate. Do not end with only `done`, `pushed`, `completed`, or a chronological command log.
|
|
30
|
+
Final visible closeout is mandatory when `/lab:auto` reaches stop, failure, escalation, or handoff. After validating the stage report, the final answer must consume that report directly: list the requested deliverables or objectives with status, summarize the Core Explanation Table rows, provide evidence paths, show validation/verification commands and validation results, name known gaps or commands that could not run, and state the next action plus why it is appropriate. Use this Result Closeout Shape exactly as the top-level structure: `Requested outcome status`, `Plain-language result table`, `Evidence and validation`, and `Gaps and next action`. The plain-language result table must answer what was requested, what changed, what worked, what did not work, what was verified, what remains unverified, and whether improvement is still needed. Do not use top-level closeout headings such as `Core fixes`, `核心修复`, `Main modified files`, `主要修改文件`, `Done`, or `已推送`; those details may appear only under the required four headings. Do not end with only `done`, `pushed`, `completed`, or a chronological command log.
|
|
@@ -8,4 +8,6 @@ Use the installed `lab` skill at `.codex/skills/lab/SKILL.md`.
|
|
|
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
9
|
When the user provides reference PDFs, paper URLs, local reference-paper paths, or asks to write by reference, stay within the write stage and switch to reference-guided deep-write. Extract structure, map section/subsection slots, paragraph roles, table/figure roles, and bridge logic to the current paper, record the consumption plan, and only then draft prose. The current section must visibly realize the mapped slots; do not treat a consumption plan as enough. Reuse structure only; do not copy wording, claims, metrics, captions, or conclusions. Keep service-style or AI-assistant meta language and workflow-only placeholder language out of paper-facing prose.
|
|
10
10
|
When Method, Experiments, captions, tables, or analysis assets introduce or revise reported metrics, create or update `.lab/writing/metric-glossary.md` before prose polish. Each metric must define its paper-facing name, approved short name, table/header label, plain-language definition, calculation, unit or denominator, direction, scope or conditions, allowed aliases, forbidden aliases, and first-use location. Use the same metric names across prose, captions, table notes, table headers, and result summaries. Run `validate_metric_glossary.py` and remove forbidden aliases from reader-facing LaTeX before finalizing the round.
|
|
11
|
+
Chinese workflow-language terminology: when `workflow_language=zh`, concept terms should use a Chinese paper-facing name and a Chinese short form by default. English full form plus acronym may appear at first mention only as `中文全称(English full form, ACRONYM)`, then prose should reuse the Chinese short form. Prefer natural compact Chinese short forms; two-character, three-character, four-character, or longer short phrases are all acceptable when they read naturally. Do not force a fixed-length abbreviation. Avoid repeating English concept fragments throughout Chinese prose. Run `validate_workflow_language_text.py` on touched Chinese workflow-language sections, tables, figures, and analysis assets before completing the write round.
|
|
12
|
+
For Chinese workflow-language output, run `validate_workflow_language_text.py` over the touched workflow-language sections, tables, figures, and analysis assets before completing the write round. If it reports English concept fragments, translate them or define a justified glossary exception before prose polish.
|
|
11
13
|
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. Carry the same core insight anchor through the paper: Introduction creates the cognitive contrast, Method turns the insight into design motivation, Experiments diagnose it with evidence, and Conclusion states the broader principle and boundary. Do not create a standalone `Our Insights` section just to satisfy this; weave the insight into motivation, mechanism, evidence, and limitations. Read the matching paper-writing reference, the current section block in `section-style-policies.md`, 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. When `workflow_language` and `paper_language` differ, treat the workflow-language paper layer as the default ordinary working layer. Resolve the active paper topology from `.lab/config/workflow.json` before drafting: the active canonical root is `<deliverables_root>/paper/`, and when workflow-language is active its root is `<deliverables_root>/paper/workflow-language/`. Ordinary write rounds should still edit one target paper layer at a time rather than silently refreshing both language layers. If the user names a concrete file or layer, treat that as the only target for the round unless they also explicitly request synchronization. Classify the named target path before editing it. Only active-layer targets count as managed manuscript rounds; legacy side layers such as `review_zh`, `translation_zh`, `sections_zh`, or stale `deliverables/.../workflow-language/*.md` paths are out-of-band/legacy edits and must not silently replace the active paper topology. If a workflow-language paper layer is active and the round still targets the canonical manuscript, record why canonical-only writing was acceptable in the write iteration artifact. If `paper_language_finalization_decision=convert-to-paper-language`, explicit canonical-manuscript work may target the canonical `paper_language` manuscript, but that does not make canonical the default ordinary working layer while workflow-language remains active. 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, do not use labels containing `_` or `-` in reader-facing prose, apply the same first-mention rule to table headers, table captions, table notes, and figure captions or labels, do not assume a fixed drafting order such as Method before Experiments, add a local naming bridge when a section uses canonical short names before their defining section has been drafted, and reuse the canonical label instead of replacing it with a narrative alias. Follow the current section's encouraged, discouraged, and banned expression lists from `section-style-policies.md`; section-specific banned expressions take priority over prose-polish goals. Before any additional tighten, compress, or polish pass on the same section, run a section-level acceptance gate first. That gate must explicitly confirm naming consistency, adjacent-section consistency, claim, metric, and ranking consistency with the current evidence, local clarity, local concision, and section-style compliance. If the round changes the paper's canonical experiment or evaluation protocol, treat that change as a canonical replacement unless the user explicitly scoped it as supplementary or appendix-only, run a paper-wide impact audit before more polishing, update the highest-impact stale sections and assets first, and do not default to translation/workflow-layer sync work unless the user explicitly asked for it or the language-finalization workflow requires it. Only edit both the canonical manuscript and the workflow-language paper layer in the same round when the user explicitly asks for cross-language synchronization or when a final-draft/export language-finalization step requires both layers to be refreshed together. Do not treat a routine tighten/compress/polish request as an instruction to sync the workflow-language companion. For export or remote-publication rounds, if `paper_language_finalization_decision=convert-to-paper-language`, include the workflow-language paper layer in the exported or pushed bundle by default. Allow canonical-only export or remote publication only when the user explicitly asked for it or when the remote target forbids extra files. If any gate item is unresolved, or if a banned expression or move from the current section policy remains, spend the round fixing that blocker instead of polishing sentences further, and do not default the next-step recommendation to another polish pass. Main tables must be locally self-contained: the title, header, note, and adjacent prose should tell the reader what each row and column means, the metric direction, and any relevant unit, denominator, or event condition. Short headers remain allowed, but abbreviations in paper-facing tables must be expanded locally in the same table. If Method or Experiments prose promises a metric family, the main table set must either expose those metrics directly or explicitly mark the missing ones as appendix-only and explain why. If a metric is measured but omitted because it is zero everywhere, redundant, or appendix-only, state that disposition explicitly in the table note instead of silently dropping it. Do not treat `\resizebox{\linewidth}{!}{...}` as the default way to fit a main table. Fit main tables by redesign first: shorten headers, move secondary metrics out of the main table, reduce or split columns, then adjust `\tabcolsep` conservatively; only use `\resizebox` as a last resort, keep width changes readable, and explain the width-control rationale locally in the same table note. Do not use `\scriptsize` or `\tiny` as the default main-table fit strategy. 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, the section-level acceptance gate, section-style policy compliance, the protocol/scope impact audit, the export or remote bundle audit, the round target layer, any canonical-only justification while workflow-language was active, any cross-language sync justification, the active canonical/workflow-language roots, the resolved target path role, any out-of-band justification, the insight integration audit, and the table-semantics audit 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.
|
|
@@ -27,4 +27,4 @@ If the preflight block cannot be completed because any required field is missing
|
|
|
27
27
|
When the repository workflow language is Chinese, summaries, checklist items, task labels, and progress updates should be written in Chinese unless a literal identifier must stay unchanged.
|
|
28
28
|
Treat `Layer 3`, `Phase 1`, or `Table 2` as paper-scope targets. Treat `Autonomy level L3` as the execution permission level.
|
|
29
29
|
Do not replace the real long-running experiment command with a short watcher such as `sleep 30`, `pgrep`, or a one-shot `metrics.json` probe. While the real experiment process is still alive, emit only a progress update and keep waiting.
|
|
30
|
-
Final visible closeout is mandatory when `/lab:auto` reaches stop, failure, escalation, or handoff. After validating the stage report, the final answer must consume that report directly: list the requested deliverables or objectives with status, summarize the Core Explanation Table rows, provide evidence paths, show validation/verification commands and validation results, name known gaps or commands that could not run, and state the next action plus why it is appropriate. Do not end with only `done`, `pushed`, `completed`, or a chronological command log.
|
|
30
|
+
Final visible closeout is mandatory when `/lab:auto` reaches stop, failure, escalation, or handoff. After validating the stage report, the final answer must consume that report directly: list the requested deliverables or objectives with status, summarize the Core Explanation Table rows, provide evidence paths, show validation/verification commands and validation results, name known gaps or commands that could not run, and state the next action plus why it is appropriate. Use this Result Closeout Shape exactly as the top-level structure: `Requested outcome status`, `Plain-language result table`, `Evidence and validation`, and `Gaps and next action`. The plain-language result table must answer what was requested, what changed, what worked, what did not work, what was verified, what remains unverified, and whether improvement is still needed. Do not use top-level closeout headings such as `Core fixes`, `核心修复`, `Main modified files`, `主要修改文件`, `Done`, or `已推送`; those details may appear only under the required four headings. Do not end with only `done`, `pushed`, `completed`, or a chronological command log.
|
|
@@ -8,4 +8,6 @@ Use the installed `lab` skill at `.codex/skills/lab/SKILL.md`.
|
|
|
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
9
|
When the user provides reference PDFs, paper URLs, local reference-paper paths, or asks to write by reference, stay within the write stage and switch to reference-guided deep-write. Extract structure, map section/subsection slots, paragraph roles, table/figure roles, and bridge logic to the current paper, record the consumption plan, and only then draft prose. The current section must visibly realize the mapped slots; do not treat a consumption plan as enough. Reuse structure only; do not copy wording, claims, metrics, captions, or conclusions. Keep service-style or AI-assistant meta language and workflow-only placeholder language out of paper-facing prose.
|
|
10
10
|
When Method, Experiments, captions, tables, or analysis assets introduce or revise reported metrics, create or update `.lab/writing/metric-glossary.md` before prose polish. Each metric must define its paper-facing name, approved short name, table/header label, plain-language definition, calculation, unit or denominator, direction, scope or conditions, allowed aliases, forbidden aliases, and first-use location. Use the same metric names across prose, captions, table notes, table headers, and result summaries. Run `validate_metric_glossary.py` and remove forbidden aliases from reader-facing LaTeX before finalizing the round.
|
|
11
|
+
Chinese workflow-language terminology: when `workflow_language=zh`, concept terms should use a Chinese paper-facing name and a Chinese short form by default. English full form plus acronym may appear at first mention only as `中文全称(English full form, ACRONYM)`, then prose should reuse the Chinese short form. Prefer natural compact Chinese short forms; two-character, three-character, four-character, or longer short phrases are all acceptable when they read naturally. Do not force a fixed-length abbreviation. Avoid repeating English concept fragments throughout Chinese prose. Run `validate_workflow_language_text.py` on touched Chinese workflow-language sections, tables, figures, and analysis assets before completing the write round.
|
|
12
|
+
For Chinese workflow-language output, run `validate_workflow_language_text.py` over the touched workflow-language sections, tables, figures, and analysis assets before completing the write round. If it reports English concept fragments, translate them or define a justified glossary exception before prose polish.
|
|
11
13
|
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. Carry the same core insight anchor through the paper: Introduction creates the cognitive contrast, Method turns the insight into design motivation, Experiments diagnose it with evidence, and Conclusion states the broader principle and boundary. Do not create a standalone `Our Insights` section just to satisfy this; weave the insight into motivation, mechanism, evidence, and limitations. Read the matching paper-writing reference, the current section block in `section-style-policies.md`, 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. When `workflow_language` and `paper_language` differ, treat the workflow-language paper layer as the default ordinary working layer. Resolve the active paper topology from `.lab/config/workflow.json` before drafting: the active canonical root is `<deliverables_root>/paper/`, and when workflow-language is active its root is `<deliverables_root>/paper/workflow-language/`. Ordinary write rounds should still edit one target paper layer at a time rather than silently refreshing both language layers. If the user names a concrete file or layer, treat that as the only target for the round unless they also explicitly request synchronization. Classify the named target path before editing it. Only active-layer targets count as managed manuscript rounds; legacy side layers such as `review_zh`, `translation_zh`, `sections_zh`, or stale `deliverables/.../workflow-language/*.md` paths are out-of-band/legacy edits and must not silently replace the active paper topology. If a workflow-language paper layer is active and the round still targets the canonical manuscript, record why canonical-only writing was acceptable in the write iteration artifact. If `paper_language_finalization_decision=convert-to-paper-language`, explicit canonical-manuscript work may target the canonical `paper_language` manuscript, but that does not make canonical the default ordinary working layer while workflow-language remains active. 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, do not use labels containing `_` or `-` in reader-facing prose, apply the same first-mention rule to table headers, table captions, table notes, and figure captions or labels, do not assume a fixed drafting order such as Method before Experiments, add a local naming bridge when a section uses canonical short names before their defining section has been drafted, and reuse the canonical label instead of replacing it with a narrative alias. Follow the current section's encouraged, discouraged, and banned expression lists from `section-style-policies.md`; section-specific banned expressions take priority over prose-polish goals. Before any additional tighten, compress, or polish pass on the same section, run a section-level acceptance gate first. That gate must explicitly confirm naming consistency, adjacent-section consistency, claim, metric, and ranking consistency with the current evidence, local clarity, local concision, and section-style compliance. If the round changes the paper's canonical experiment or evaluation protocol, treat that change as a canonical replacement unless the user explicitly scoped it as supplementary or appendix-only, run a paper-wide impact audit before more polishing, update the highest-impact stale sections and assets first, and do not default to translation/workflow-layer sync work unless the user explicitly asked for it or the language-finalization workflow requires it. Only edit both the canonical manuscript and the workflow-language paper layer in the same round when the user explicitly asks for cross-language synchronization or when a final-draft/export language-finalization step requires both layers to be refreshed together. Do not treat a routine tighten/compress/polish request as an instruction to sync the workflow-language companion. For export or remote-publication rounds, if `paper_language_finalization_decision=convert-to-paper-language`, include the workflow-language paper layer in the exported or pushed bundle by default. Allow canonical-only export or remote publication only when the user explicitly asked for it or when the remote target forbids extra files. If any gate item is unresolved, or if a banned expression or move from the current section policy remains, spend the round fixing that blocker instead of polishing sentences further, and do not default the next-step recommendation to another polish pass. Main tables must be locally self-contained: the title, header, note, and adjacent prose should tell the reader what each row and column means, the metric direction, and any relevant unit, denominator, or event condition. Short headers remain allowed, but abbreviations in paper-facing tables must be expanded locally in the same table. If Method or Experiments prose promises a metric family, the main table set must either expose those metrics directly or explicitly mark the missing ones as appendix-only and explain why. If a metric is measured but omitted because it is zero everywhere, redundant, or appendix-only, state that disposition explicitly in the table note instead of silently dropping it. Do not treat `\resizebox{\linewidth}{!}{...}` as the default way to fit a main table. Fit main tables by redesign first: shorten headers, move secondary metrics out of the main table, reduce or split columns, then adjust `\tabcolsep` conservatively; only use `\resizebox` as a last resort, keep width changes readable, and explain the width-control rationale locally in the same table note. Do not use `\scriptsize` or `\tiny` as the default main-table fit strategy. 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, the section-level acceptance gate, section-style policy compliance, the protocol/scope impact audit, the export or remote bundle audit, the round target layer, any canonical-only justification while workflow-language was active, any cross-language sync justification, the active canonical/workflow-language roots, the resolved target path role, any out-of-band justification, the insight integration audit, and the table-semantics audit 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.
|
|
@@ -94,7 +94,7 @@ Treat all of these as equivalent stage requests:
|
|
|
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
95
|
- Separate internal polling from user-facing progress reports.
|
|
96
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.
|
|
97
|
-
- Final visible closeout must consume the validated stage report:
|
|
97
|
+
- Final visible closeout must consume the validated stage report and use this Result Closeout Shape as top-level headings: `Requested outcome status`, `Plain-language result table`, `Evidence and validation`, and `Gaps and next action`. Show requested deliverable statuses, Core Explanation Table rows, evidence paths, validation/verification commands and results, known gaps, and the next action. Do not use top-level closeout headings such as `核心修复` or `主要修改文件`, and do not end with only "done", "pushed", or a chronological command log.
|
|
98
98
|
|
|
99
99
|
- Treat `Autonomy level L1/L2/L3` as the execution privilege level, not as a paper layer, phase, or table number.
|
|
100
100
|
- 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`.
|
|
@@ -27,4 +27,4 @@ If the preflight block cannot be completed because any required field is missing
|
|
|
27
27
|
When the repository workflow language is Chinese, summaries, checklist items, task labels, and progress updates should be written in Chinese unless a literal identifier must stay unchanged.
|
|
28
28
|
Treat `Layer 3`, `Phase 1`, or `Table 2` as paper-scope targets. Treat `Autonomy level L3` as the execution permission level.
|
|
29
29
|
Do not replace the real long-running experiment command with a short watcher such as `sleep 30`, `pgrep`, or a one-shot `metrics.json` probe. While the real experiment process is still alive, emit only a progress update and keep waiting.
|
|
30
|
-
Final visible closeout is mandatory when `/lab:auto` reaches stop, failure, escalation, or handoff. After validating the stage report, the final answer must consume that report directly: list the requested deliverables or objectives with status, summarize the Core Explanation Table rows, provide evidence paths, show validation/verification commands and validation results, name known gaps or commands that could not run, and state the next action plus why it is appropriate. Do not end with only `done`, `pushed`, `completed`, or a chronological command log.
|
|
30
|
+
Final visible closeout is mandatory when `/lab:auto` reaches stop, failure, escalation, or handoff. After validating the stage report, the final answer must consume that report directly: list the requested deliverables or objectives with status, summarize the Core Explanation Table rows, provide evidence paths, show validation/verification commands and validation results, name known gaps or commands that could not run, and state the next action plus why it is appropriate. Use this Result Closeout Shape exactly as the top-level structure: `Requested outcome status`, `Plain-language result table`, `Evidence and validation`, and `Gaps and next action`. The plain-language result table must answer what was requested, what changed, what worked, what did not work, what was verified, what remains unverified, and whether improvement is still needed. Do not use top-level closeout headings such as `Core fixes`, `核心修复`, `Main modified files`, `主要修改文件`, `Done`, or `已推送`; those details may appear only under the required four headings. Do not end with only `done`, `pushed`, `completed`, or a chronological command log.
|
|
@@ -8,4 +8,6 @@ Use the installed `lab` skill at `.codex/skills/lab/SKILL.md`.
|
|
|
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
9
|
When the user provides reference PDFs, paper URLs, local reference-paper paths, or asks to write by reference, stay within the write stage and switch to reference-guided deep-write. Extract structure, map section/subsection slots, paragraph roles, table/figure roles, and bridge logic to the current paper, record the consumption plan, and only then draft prose. The current section must visibly realize the mapped slots; do not treat a consumption plan as enough. Reuse structure only; do not copy wording, claims, metrics, captions, or conclusions. Keep service-style or AI-assistant meta language and workflow-only placeholder language out of paper-facing prose.
|
|
10
10
|
When Method, Experiments, captions, tables, or analysis assets introduce or revise reported metrics, create or update `.lab/writing/metric-glossary.md` before prose polish. Each metric must define its paper-facing name, approved short name, table/header label, plain-language definition, calculation, unit or denominator, direction, scope or conditions, allowed aliases, forbidden aliases, and first-use location. Use the same metric names across prose, captions, table notes, table headers, and result summaries. Run `validate_metric_glossary.py` and remove forbidden aliases from reader-facing LaTeX before finalizing the round.
|
|
11
|
+
Chinese workflow-language terminology: when `workflow_language=zh`, concept terms should use a Chinese paper-facing name and a Chinese short form by default. English full form plus acronym may appear at first mention only as `中文全称(English full form, ACRONYM)`, then prose should reuse the Chinese short form. Prefer natural compact Chinese short forms; two-character, three-character, four-character, or longer short phrases are all acceptable when they read naturally. Do not force a fixed-length abbreviation. Avoid repeating English concept fragments throughout Chinese prose. Run `validate_workflow_language_text.py` on touched Chinese workflow-language sections, tables, figures, and analysis assets before completing the write round.
|
|
12
|
+
For Chinese workflow-language output, run `validate_workflow_language_text.py` over the touched workflow-language sections, tables, figures, and analysis assets before completing the write round. If it reports English concept fragments, translate them or define a justified glossary exception before prose polish.
|
|
11
13
|
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. Carry the same core insight anchor through the paper: Introduction creates the cognitive contrast, Method turns the insight into design motivation, Experiments diagnose it with evidence, and Conclusion states the broader principle and boundary. Do not create a standalone `Our Insights` section just to satisfy this; weave the insight into motivation, mechanism, evidence, and limitations. Read the matching paper-writing reference, the current section block in `section-style-policies.md`, 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. When `workflow_language` and `paper_language` differ, treat the workflow-language paper layer as the default ordinary working layer. Resolve the active paper topology from `.lab/config/workflow.json` before drafting: the active canonical root is `<deliverables_root>/paper/`, and when workflow-language is active its root is `<deliverables_root>/paper/workflow-language/`. Ordinary write rounds should still edit one target paper layer at a time rather than silently refreshing both language layers. If the user names a concrete file or layer, treat that as the only target for the round unless they also explicitly request synchronization. Classify the named target path before editing it. Only active-layer targets count as managed manuscript rounds; legacy side layers such as `review_zh`, `translation_zh`, `sections_zh`, or stale `deliverables/.../workflow-language/*.md` paths are out-of-band/legacy edits and must not silently replace the active paper topology. If a workflow-language paper layer is active and the round still targets the canonical manuscript, record why canonical-only writing was acceptable in the write iteration artifact. If `paper_language_finalization_decision=convert-to-paper-language`, explicit canonical-manuscript work may target the canonical `paper_language` manuscript, but that does not make canonical the default ordinary working layer while workflow-language remains active. 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, do not use labels containing `_` or `-` in reader-facing prose, apply the same first-mention rule to table headers, table captions, table notes, and figure captions or labels, do not assume a fixed drafting order such as Method before Experiments, add a local naming bridge when a section uses canonical short names before their defining section has been drafted, and reuse the canonical label instead of replacing it with a narrative alias. Follow the current section's encouraged, discouraged, and banned expression lists from `section-style-policies.md`; section-specific banned expressions take priority over prose-polish goals. Before any additional tighten, compress, or polish pass on the same section, run a section-level acceptance gate first. That gate must explicitly confirm naming consistency, adjacent-section consistency, claim, metric, and ranking consistency with the current evidence, local clarity, local concision, and section-style compliance. If the round changes the paper's canonical experiment or evaluation protocol, treat that change as a canonical replacement unless the user explicitly scoped it as supplementary or appendix-only, run a paper-wide impact audit before more polishing, update the highest-impact stale sections and assets first, and do not default to translation/workflow-layer sync work unless the user explicitly asked for it or the language-finalization workflow requires it. Only edit both the canonical manuscript and the workflow-language paper layer in the same round when the user explicitly asks for cross-language synchronization or when a final-draft/export language-finalization step requires both layers to be refreshed together. Do not treat a routine tighten/compress/polish request as an instruction to sync the workflow-language companion. For export or remote-publication rounds, if `paper_language_finalization_decision=convert-to-paper-language`, include the workflow-language paper layer in the exported or pushed bundle by default. Allow canonical-only export or remote publication only when the user explicitly asked for it or when the remote target forbids extra files. If any gate item is unresolved, or if a banned expression or move from the current section policy remains, spend the round fixing that blocker instead of polishing sentences further, and do not default the next-step recommendation to another polish pass. Main tables must be locally self-contained: the title, header, note, and adjacent prose should tell the reader what each row and column means, the metric direction, and any relevant unit, denominator, or event condition. Short headers remain allowed, but abbreviations in paper-facing tables must be expanded locally in the same table. If Method or Experiments prose promises a metric family, the main table set must either expose those metrics directly or explicitly mark the missing ones as appendix-only and explain why. If a metric is measured but omitted because it is zero everywhere, redundant, or appendix-only, state that disposition explicitly in the table note instead of silently dropping it. Do not treat `\resizebox{\linewidth}{!}{...}` as the default way to fit a main table. Fit main tables by redesign first: shorten headers, move secondary metrics out of the main table, reduce or split columns, then adjust `\tabcolsep` conservatively; only use `\resizebox` as a last resort, keep width changes readable, and explain the width-control rationale locally in the same table note. Do not use `\scriptsize` or `\tiny` as the default main-table fit strategy. 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, the section-level acceptance gate, section-style policy compliance, the protocol/scope impact audit, the export or remote bundle audit, the round target layer, any canonical-only justification while workflow-language was active, any cross-language sync justification, the active canonical/workflow-language roots, the resolved target path role, any out-of-band justification, the insight integration audit, and the table-semantics audit 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.
|
|
@@ -27,4 +27,4 @@ If the preflight block cannot be completed because any required field is missing
|
|
|
27
27
|
When the repository workflow language is Chinese, summaries, checklist items, task labels, and progress updates should be written in Chinese unless a literal identifier must stay unchanged.
|
|
28
28
|
Treat `Layer 3`, `Phase 1`, or `Table 2` as paper-scope targets. Treat `Autonomy level L3` as the execution permission level.
|
|
29
29
|
Do not replace the real long-running experiment command with a short watcher such as `sleep 30`, `pgrep`, or a one-shot `metrics.json` probe. While the real experiment process is still alive, emit only a progress update and keep waiting.
|
|
30
|
-
Final visible closeout is mandatory when `/lab:auto` reaches stop, failure, escalation, or handoff. After validating the stage report, the final answer must consume that report directly: list the requested deliverables or objectives with status, summarize the Core Explanation Table rows, provide evidence paths, show validation/verification commands and validation results, name known gaps or commands that could not run, and state the next action plus why it is appropriate. Do not end with only `done`, `pushed`, `completed`, or a chronological command log.
|
|
30
|
+
Final visible closeout is mandatory when `/lab:auto` reaches stop, failure, escalation, or handoff. After validating the stage report, the final answer must consume that report directly: list the requested deliverables or objectives with status, summarize the Core Explanation Table rows, provide evidence paths, show validation/verification commands and validation results, name known gaps or commands that could not run, and state the next action plus why it is appropriate. Use this Result Closeout Shape exactly as the top-level structure: `Requested outcome status`, `Plain-language result table`, `Evidence and validation`, and `Gaps and next action`. The plain-language result table must answer what was requested, what changed, what worked, what did not work, what was verified, what remains unverified, and whether improvement is still needed. Do not use top-level closeout headings such as `Core fixes`, `核心修复`, `Main modified files`, `主要修改文件`, `Done`, or `已推送`; those details may appear only under the required four headings. Do not end with only `done`, `pushed`, `completed`, or a chronological command log.
|
|
@@ -8,4 +8,6 @@ Use the installed `lab` skill at `.codex/skills/lab/SKILL.md`.
|
|
|
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
9
|
When the user provides reference PDFs, paper URLs, local reference-paper paths, or asks to write by reference, stay within the write stage and switch to reference-guided deep-write. Extract structure, map section/subsection slots, paragraph roles, table/figure roles, and bridge logic to the current paper, record the consumption plan, and only then draft prose. The current section must visibly realize the mapped slots; do not treat a consumption plan as enough. Reuse structure only; do not copy wording, claims, metrics, captions, or conclusions. Keep service-style or AI-assistant meta language and workflow-only placeholder language out of paper-facing prose.
|
|
10
10
|
When Method, Experiments, captions, tables, or analysis assets introduce or revise reported metrics, create or update `.lab/writing/metric-glossary.md` before prose polish. Each metric must define its paper-facing name, approved short name, table/header label, plain-language definition, calculation, unit or denominator, direction, scope or conditions, allowed aliases, forbidden aliases, and first-use location. Use the same metric names across prose, captions, table notes, table headers, and result summaries. Run `validate_metric_glossary.py` and remove forbidden aliases from reader-facing LaTeX before finalizing the round.
|
|
11
|
+
Chinese workflow-language terminology: when `workflow_language=zh`, concept terms should use a Chinese paper-facing name and a Chinese short form by default. English full form plus acronym may appear at first mention only as `中文全称(English full form, ACRONYM)`, then prose should reuse the Chinese short form. Prefer natural compact Chinese short forms; two-character, three-character, four-character, or longer short phrases are all acceptable when they read naturally. Do not force a fixed-length abbreviation. Avoid repeating English concept fragments throughout Chinese prose. Run `validate_workflow_language_text.py` on touched Chinese workflow-language sections, tables, figures, and analysis assets before completing the write round.
|
|
12
|
+
For Chinese workflow-language output, run `validate_workflow_language_text.py` over the touched workflow-language sections, tables, figures, and analysis assets before completing the write round. If it reports English concept fragments, translate them or define a justified glossary exception before prose polish.
|
|
11
13
|
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. Carry the same core insight anchor through the paper: Introduction creates the cognitive contrast, Method turns the insight into design motivation, Experiments diagnose it with evidence, and Conclusion states the broader principle and boundary. Do not create a standalone `Our Insights` section just to satisfy this; weave the insight into motivation, mechanism, evidence, and limitations. Read the matching paper-writing reference, the current section block in `section-style-policies.md`, 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. When `workflow_language` and `paper_language` differ, treat the workflow-language paper layer as the default ordinary working layer. Resolve the active paper topology from `.lab/config/workflow.json` before drafting: the active canonical root is `<deliverables_root>/paper/`, and when workflow-language is active its root is `<deliverables_root>/paper/workflow-language/`. Ordinary write rounds should still edit one target paper layer at a time rather than silently refreshing both language layers. If the user names a concrete file or layer, treat that as the only target for the round unless they also explicitly request synchronization. Classify the named target path before editing it. Only active-layer targets count as managed manuscript rounds; legacy side layers such as `review_zh`, `translation_zh`, `sections_zh`, or stale `deliverables/.../workflow-language/*.md` paths are out-of-band/legacy edits and must not silently replace the active paper topology. If a workflow-language paper layer is active and the round still targets the canonical manuscript, record why canonical-only writing was acceptable in the write iteration artifact. If `paper_language_finalization_decision=convert-to-paper-language`, explicit canonical-manuscript work may target the canonical `paper_language` manuscript, but that does not make canonical the default ordinary working layer while workflow-language remains active. 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, do not use labels containing `_` or `-` in reader-facing prose, apply the same first-mention rule to table headers, table captions, table notes, and figure captions or labels, do not assume a fixed drafting order such as Method before Experiments, add a local naming bridge when a section uses canonical short names before their defining section has been drafted, and reuse the canonical label instead of replacing it with a narrative alias. Follow the current section's encouraged, discouraged, and banned expression lists from `section-style-policies.md`; section-specific banned expressions take priority over prose-polish goals. Before any additional tighten, compress, or polish pass on the same section, run a section-level acceptance gate first. That gate must explicitly confirm naming consistency, adjacent-section consistency, claim, metric, and ranking consistency with the current evidence, local clarity, local concision, and section-style compliance. If the round changes the paper's canonical experiment or evaluation protocol, treat that change as a canonical replacement unless the user explicitly scoped it as supplementary or appendix-only, run a paper-wide impact audit before more polishing, update the highest-impact stale sections and assets first, and do not default to translation/workflow-layer sync work unless the user explicitly asked for it or the language-finalization workflow requires it. Only edit both the canonical manuscript and the workflow-language paper layer in the same round when the user explicitly asks for cross-language synchronization or when a final-draft/export language-finalization step requires both layers to be refreshed together. Do not treat a routine tighten/compress/polish request as an instruction to sync the workflow-language companion. For export or remote-publication rounds, if `paper_language_finalization_decision=convert-to-paper-language`, include the workflow-language paper layer in the exported or pushed bundle by default. Allow canonical-only export or remote publication only when the user explicitly asked for it or when the remote target forbids extra files. If any gate item is unresolved, or if a banned expression or move from the current section policy remains, spend the round fixing that blocker instead of polishing sentences further, and do not default the next-step recommendation to another polish pass. Main tables must be locally self-contained: the title, header, note, and adjacent prose should tell the reader what each row and column means, the metric direction, and any relevant unit, denominator, or event condition. Short headers remain allowed, but abbreviations in paper-facing tables must be expanded locally in the same table. If Method or Experiments prose promises a metric family, the main table set must either expose those metrics directly or explicitly mark the missing ones as appendix-only and explain why. If a metric is measured but omitted because it is zero everywhere, redundant, or appendix-only, state that disposition explicitly in the table note instead of silently dropping it. Do not treat `\resizebox{\linewidth}{!}{...}` as the default way to fit a main table. Fit main tables by redesign first: shorten headers, move secondary metrics out of the main table, reduce or split columns, then adjust `\tabcolsep` conservatively; only use `\resizebox` as a last resort, keep width changes readable, and explain the width-control rationale locally in the same table note. Do not use `\scriptsize` or `\tiny` as the default main-table fit strategy. 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, the section-level acceptance gate, section-style policy compliance, the protocol/scope impact audit, the export or remote bundle audit, the round target layer, any canonical-only justification while workflow-language was active, any cross-language sync justification, the active canonical/workflow-language roots, the resolved target path role, any out-of-band justification, the insight integration audit, and the table-semantics audit 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.
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import argparse
|
|
5
|
+
import re
|
|
6
|
+
import sys
|
|
7
|
+
from collections import Counter
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
CJK_RE = re.compile(r"[\u3400-\u4dbf\u4e00-\u9fff]")
|
|
12
|
+
FIRST_MENTION_RE = re.compile(
|
|
13
|
+
r"[\u3400-\u4dbf\u4e00-\u9fff][^()()\n]{0,48}(([A-Za-z][A-Za-z0-9 .,'/&+\-]*?(?:,\s*[A-Z][A-Z0-9+\-]{1,})?))"
|
|
14
|
+
)
|
|
15
|
+
ENGLISH_FRAGMENT_RE = re.compile(
|
|
16
|
+
r"(?<![A-Za-z0-9_])([A-Za-z][A-Za-z0-9+]*(?:-[A-Za-z][A-Za-z0-9+]*)*"
|
|
17
|
+
r"(?:[ \t]+[A-Za-z][A-Za-z0-9+]*(?:-[A-Za-z][A-Za-z0-9+]*)*)*)(?![A-Za-z0-9_])"
|
|
18
|
+
)
|
|
19
|
+
FIELD_RE = re.compile(r"^[ \t]*-[ \t]*([^::]+)[::][ \t]*([^\n]*)[ \t]*$", flags=re.MULTILINE)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
DEFAULT_ALLOWED_FRAGMENTS = {
|
|
23
|
+
"api",
|
|
24
|
+
"arxiv",
|
|
25
|
+
"auuc",
|
|
26
|
+
"bert",
|
|
27
|
+
"csv",
|
|
28
|
+
"doi",
|
|
29
|
+
"gpt",
|
|
30
|
+
"html",
|
|
31
|
+
"iclr",
|
|
32
|
+
"icml",
|
|
33
|
+
"json",
|
|
34
|
+
"latex",
|
|
35
|
+
"llm",
|
|
36
|
+
"mlp",
|
|
37
|
+
"neurips",
|
|
38
|
+
"pdf",
|
|
39
|
+
"qini",
|
|
40
|
+
"rag",
|
|
41
|
+
"relu",
|
|
42
|
+
"sota",
|
|
43
|
+
"svm",
|
|
44
|
+
"tex",
|
|
45
|
+
"url",
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def parse_args() -> argparse.Namespace:
|
|
50
|
+
parser = argparse.ArgumentParser(
|
|
51
|
+
description="Validate that Chinese workflow-language files avoid unnecessary English concept fragments."
|
|
52
|
+
)
|
|
53
|
+
parser.add_argument("--workflow-language", required=True, help="Workflow language, for example zh or en")
|
|
54
|
+
parser.add_argument("--file", action="append", default=[], help="Workflow-language .tex/.md file to scan")
|
|
55
|
+
parser.add_argument(
|
|
56
|
+
"--terminology-glossary",
|
|
57
|
+
help="Optional .lab/writing/terminology-glossary.md used for allowed English exceptions",
|
|
58
|
+
)
|
|
59
|
+
parser.add_argument(
|
|
60
|
+
"--allowed-fragment",
|
|
61
|
+
action="append",
|
|
62
|
+
default=[],
|
|
63
|
+
help="Explicit English fragment allowed to remain in Chinese workflow-language prose",
|
|
64
|
+
)
|
|
65
|
+
parser.add_argument("--mode", required=True, choices=("draft", "final"))
|
|
66
|
+
return parser.parse_args()
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def read_text(path: Path) -> str:
|
|
70
|
+
return path.read_text(encoding="utf-8")
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def normalize_fragment(value: str) -> str:
|
|
74
|
+
value = re.sub(r"\s+", " ", value.strip().strip("`").strip())
|
|
75
|
+
return value.lower()
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def split_fragments(value: str) -> list[str]:
|
|
79
|
+
fragments: list[str] = []
|
|
80
|
+
for fragment in re.split(r"[,;,;、\n]+", value):
|
|
81
|
+
cleaned = fragment.strip().strip("`").strip()
|
|
82
|
+
if cleaned and cleaned.lower() not in {"none", "n/a", "na", "无", "不适用", "todo", "tbd"}:
|
|
83
|
+
fragments.append(cleaned)
|
|
84
|
+
return fragments
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def load_allowed_fragments(glossary_path: str | None, explicit: list[str]) -> set[str]:
|
|
88
|
+
allowed = {normalize_fragment(fragment) for fragment in DEFAULT_ALLOWED_FRAGMENTS}
|
|
89
|
+
allowed.update(normalize_fragment(fragment) for fragment in explicit if fragment.strip())
|
|
90
|
+
if not glossary_path:
|
|
91
|
+
return allowed
|
|
92
|
+
path = Path(glossary_path)
|
|
93
|
+
if not path.exists():
|
|
94
|
+
return allowed
|
|
95
|
+
text = read_text(path)
|
|
96
|
+
for field, value in FIELD_RE.findall(text):
|
|
97
|
+
normalized_field = field.strip().lower()
|
|
98
|
+
if normalized_field in {
|
|
99
|
+
"allowed english fragments",
|
|
100
|
+
"allowed english fragments that may remain in chinese prose",
|
|
101
|
+
"allowed english fragments that may remain in zh prose",
|
|
102
|
+
"允许保留的英文片段",
|
|
103
|
+
}:
|
|
104
|
+
allowed.update(normalize_fragment(fragment) for fragment in split_fragments(value))
|
|
105
|
+
return allowed
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def strip_latex_noise(text: str) -> str:
|
|
109
|
+
text = re.sub(r"%.*", " ", text)
|
|
110
|
+
text = re.sub(r"\\begin\{[^}]+\}", " ", text)
|
|
111
|
+
text = re.sub(r"\\end\{[^}]+\}", " ", text)
|
|
112
|
+
text = re.sub(r"\\(?:cite|citep|citet|ref|eqref|label|url|href|path|input|includegraphics)\*?(?:\[[^\]]*\])?\{[^}]*\}", " ", text)
|
|
113
|
+
text = re.sub(r"\$\$[\s\S]*?\$\$", " ", text)
|
|
114
|
+
text = re.sub(r"\$[^$]*\$", " ", text)
|
|
115
|
+
text = re.sub(r"\\\[[\s\S]*?\\\]", " ", text)
|
|
116
|
+
text = re.sub(r"\\\([\s\S]*?\\\)", " ", text)
|
|
117
|
+
text = re.sub(r"\\[A-Za-z@*]+(?:\[[^\]]*\])?", " ", text)
|
|
118
|
+
text = text.replace("{", " ").replace("}", " ")
|
|
119
|
+
text = text.replace("~", " ")
|
|
120
|
+
return text
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def first_mention_fragments(text: str) -> list[str]:
|
|
124
|
+
return [normalize_fragment(match.group(1)) for match in FIRST_MENTION_RE.finditer(text)]
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def remove_first_mention_parentheticals(text: str) -> str:
|
|
128
|
+
return FIRST_MENTION_RE.sub(" ", text)
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
def should_ignore_candidate(candidate: str, allowed: set[str]) -> bool:
|
|
132
|
+
normalized = normalize_fragment(candidate)
|
|
133
|
+
if not normalized:
|
|
134
|
+
return True
|
|
135
|
+
if normalized in allowed:
|
|
136
|
+
return True
|
|
137
|
+
if normalized.replace(" ", "") in allowed:
|
|
138
|
+
return True
|
|
139
|
+
tokens = re.findall(r"[A-Za-z][A-Za-z0-9+]*", candidate)
|
|
140
|
+
if not tokens:
|
|
141
|
+
return True
|
|
142
|
+
if all(token.lower() in allowed for token in tokens):
|
|
143
|
+
return True
|
|
144
|
+
if all(token.isupper() or re.fullmatch(r"[A-Z][A-Za-z]*\d*", token) for token in tokens) and len(tokens) == 1:
|
|
145
|
+
return True
|
|
146
|
+
return False
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
def find_mixed_fragments(text: str, allowed: set[str]) -> list[tuple[int, str]]:
|
|
150
|
+
issues: list[tuple[int, str]] = []
|
|
151
|
+
stripped = strip_latex_noise(remove_first_mention_parentheticals(text))
|
|
152
|
+
for line_no, line in enumerate(stripped.splitlines(), start=1):
|
|
153
|
+
if not CJK_RE.search(line):
|
|
154
|
+
continue
|
|
155
|
+
seen_on_line: set[str] = set()
|
|
156
|
+
for match in ENGLISH_FRAGMENT_RE.finditer(line):
|
|
157
|
+
candidate = match.group(1).strip()
|
|
158
|
+
if " " not in candidate and "-" not in candidate:
|
|
159
|
+
continue
|
|
160
|
+
normalized = normalize_fragment(candidate)
|
|
161
|
+
if normalized in seen_on_line:
|
|
162
|
+
continue
|
|
163
|
+
seen_on_line.add(normalized)
|
|
164
|
+
if should_ignore_candidate(candidate, allowed):
|
|
165
|
+
continue
|
|
166
|
+
issues.append((line_no, candidate))
|
|
167
|
+
return issues
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
def validate_files(files: list[str], allowed: set[str]) -> list[str]:
|
|
171
|
+
issues: list[str] = []
|
|
172
|
+
for file_name in files:
|
|
173
|
+
path = Path(file_name)
|
|
174
|
+
if not path.exists():
|
|
175
|
+
issues.append(f"workflow-language file does not exist: {path}")
|
|
176
|
+
continue
|
|
177
|
+
text = read_text(path)
|
|
178
|
+
mentions = Counter(first_mention_fragments(text))
|
|
179
|
+
for fragment, count in mentions.items():
|
|
180
|
+
if count > 1:
|
|
181
|
+
issues.append(
|
|
182
|
+
f"{path}: English first-mention parenthetical '{fragment}' appears {count} times; define it once, then use the Chinese short form"
|
|
183
|
+
)
|
|
184
|
+
for line_no, fragment in find_mixed_fragments(text, allowed):
|
|
185
|
+
issues.append(
|
|
186
|
+
f"{path}:{line_no}: English concept fragment '{fragment}' appears in Chinese workflow-language prose; translate it, define it once as a first mention, or add a justified glossary exception"
|
|
187
|
+
)
|
|
188
|
+
return issues
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
def main() -> int:
|
|
192
|
+
args = parse_args()
|
|
193
|
+
if args.workflow_language.lower() != "zh":
|
|
194
|
+
print(f"workflow-language text validation skipped for workflow_language={args.workflow_language}")
|
|
195
|
+
return 0
|
|
196
|
+
if not args.file:
|
|
197
|
+
message = "at least one --file is required for zh workflow-language validation"
|
|
198
|
+
if args.mode == "draft":
|
|
199
|
+
print(f"WARNING: {message}")
|
|
200
|
+
return 0
|
|
201
|
+
print(message, file=sys.stderr)
|
|
202
|
+
return 1
|
|
203
|
+
|
|
204
|
+
allowed = load_allowed_fragments(args.terminology_glossary, args.allowed_fragment)
|
|
205
|
+
issues = validate_files(args.file, allowed)
|
|
206
|
+
if not issues:
|
|
207
|
+
print("workflow-language text is valid")
|
|
208
|
+
return 0
|
|
209
|
+
|
|
210
|
+
if args.mode == "draft":
|
|
211
|
+
for issue in issues:
|
|
212
|
+
print(f"WARNING: {issue}")
|
|
213
|
+
return 0
|
|
214
|
+
|
|
215
|
+
for issue in issues:
|
|
216
|
+
print(issue, file=sys.stderr)
|
|
217
|
+
return 1
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
if __name__ == "__main__":
|
|
221
|
+
raise SystemExit(main())
|
|
@@ -8,6 +8,18 @@
|
|
|
8
8
|
- Evidence base:
|
|
9
9
|
- External rebuttal source, if any:
|
|
10
10
|
|
|
11
|
+
## Read-scope audit
|
|
12
|
+
|
|
13
|
+
- Started from the Light Read Set:
|
|
14
|
+
- active LaTeX files read:
|
|
15
|
+
- result summaries read:
|
|
16
|
+
- Managed indices read:
|
|
17
|
+
- Extra paths read:
|
|
18
|
+
- Why scope was expanded, if any:
|
|
19
|
+
- Whole-repository scan avoided:
|
|
20
|
+
- Raw datasets avoided:
|
|
21
|
+
- Full logs avoided:
|
|
22
|
+
|
|
11
23
|
## External Rebuttal Intake
|
|
12
24
|
|
|
13
25
|
| Source | Raw criticism summary | Affected unit | Reviewer axis | Severity | Route | Acceptance check |
|
|
@@ -40,7 +52,15 @@
|
|
|
40
52
|
- Route:
|
|
41
53
|
- Acceptance check:
|
|
42
54
|
|
|
43
|
-
### R4
|
|
55
|
+
### R4 Results / Tables / Numeric Evidence
|
|
56
|
+
|
|
57
|
+
- Finding:
|
|
58
|
+
- Why it matters:
|
|
59
|
+
- Required fix:
|
|
60
|
+
- Route:
|
|
61
|
+
- Acceptance check:
|
|
62
|
+
|
|
63
|
+
### R5 Presentation / Clarity
|
|
44
64
|
|
|
45
65
|
- Finding:
|
|
46
66
|
- Why it matters:
|
|
@@ -68,4 +88,3 @@
|
|
|
68
88
|
- Next route:
|
|
69
89
|
- Blocking issue, if any:
|
|
70
90
|
- Handoff note:
|
|
71
|
-
|
|
@@ -9,6 +9,7 @@ Use this glossary during `/lab:write` to keep reader-facing naming stable.
|
|
|
9
9
|
- Use natural-language full names in prose.
|
|
10
10
|
- Do not use labels containing `_` or `-` in reader-facing prose.
|
|
11
11
|
- Keep internal identifiers, config keys, and experiment package labels out of prose unless they are mapped once for the reader and then moved back out of prose.
|
|
12
|
+
- Chinese workflow-language terminology: when `workflow_language=zh`, concept terms should use a Chinese paper-facing name and a Chinese short form by default. English may appear at first mention only as `中文全称(English full form, ACRONYM)`, then prose should reuse the Chinese short form. Prefer natural compact Chinese short forms; two-character, three-character, four-character, or longer short phrases are all acceptable when they read naturally. Do not force a fixed-length abbreviation. Avoid repeating English concept fragments such as `residual-fitting pathology`, `treated-group noise`, or `gain-head function class` throughout Chinese prose.
|
|
12
13
|
|
|
13
14
|
## Entries
|
|
14
15
|
|
|
@@ -17,6 +18,10 @@ Use this glossary during `/lab:write` to keep reader-facing naming stable.
|
|
|
17
18
|
- Canonical paper-facing term:
|
|
18
19
|
- Full form at first mention:
|
|
19
20
|
- Approved short form or acronym:
|
|
21
|
+
- Chinese short form, if workflow_language is zh:
|
|
22
|
+
- English full form plus acronym allowed at first mention:
|
|
23
|
+
- Allowed English fragments that may remain in Chinese prose:
|
|
24
|
+
- Subsequent-language rule:
|
|
20
25
|
- Reader-facing explanation:
|
|
21
26
|
- Why this term matters here:
|
|
22
27
|
- First-use section:
|
|
@@ -49,12 +49,12 @@ Use this skill when the user invokes `/lab:*` or asks for the structured researc
|
|
|
49
49
|
- If the stage says improvement is needed, do not choose `stop` unless the next action states a concrete terminal boundary such as budget exhaustion, frozen-core risk, safety or integrity failure, impossible target, or a required approval boundary. Otherwise choose `continue`, `revise`, `rerun`, or `escalate`.
|
|
50
50
|
- Stage reports are closeout and handoff artifacts, not a new user command and not a replacement for stage-specific artifacts such as idea memos, iteration reports, final reports, or write-iteration records.
|
|
51
51
|
- Run `.lab/.managed/scripts/validate_stage_report.py --stage-report <stage-report> --stage <stage>` before claiming the stage is complete, and include the stage-report path plus validation result in the final user-facing summary.
|
|
52
|
-
- For `/lab:auto`, the final user-facing answer must visibly consume the validated stage report: summarize requested deliverable statuses, Core Explanation Table rows, evidence paths, validation/verification commands and results, known gaps, and the next action. A chat-only chronological result list is not
|
|
52
|
+
- For `/lab:auto`, the final user-facing answer must visibly consume the validated stage report and use the Result Closeout Shape as top-level headings: `Requested outcome status`, `Plain-language result table`, `Evidence and validation`, and `Gaps and next action`. It must summarize requested deliverable statuses, Core Explanation Table rows, evidence paths, validation/verification commands and results, known gaps, and the next action. A chat-only chronological result list or top-level `核心修复` / `主要修改文件` closeout is not valid.
|
|
53
53
|
- Final paper output should default to LaTeX, and its manuscript language should be decided separately from the workflow language.
|
|
54
54
|
- Separate sourced facts from model-generated hypotheses.
|
|
55
55
|
- Preserve failed runs, failed ideas, and limitations.
|
|
56
56
|
- Use `skills/lab/references/recipes.md` as the quick path for common stage chains without inventing new commands.
|
|
57
|
-
- Use `.codex/skills/lab/references/rebuttal-mode.md` or `.claude/skills/lab/references/rebuttal-mode.md` as the single shared reviewer-panel and external rebuttal intake contract. Do not copy
|
|
57
|
+
- Use `.codex/skills/lab/references/rebuttal-mode.md` or `.claude/skills/lab/references/rebuttal-mode.md` as the single shared reviewer-panel and external rebuttal intake contract. Do not copy five-reviewer logic into `review`, `write`, or `auto` stage guides.
|
|
58
58
|
|
|
59
59
|
## Stage Contract
|
|
60
60
|
|
|
@@ -313,6 +313,8 @@ Use this skill when the user invokes `/lab:*` or asks for the structured researc
|
|
|
313
313
|
- For each subsection, explicitly cover motivation, design, and technical advantage when applicable.
|
|
314
314
|
- Keep terminology stable across rounds and sections.
|
|
315
315
|
- Maintain `.lab/writing/terminology-glossary.md` as the write-stage source for full forms, approved short forms, reader-facing explanations, allowed aliases, and terms that should stay out of prose.
|
|
316
|
+
- When `workflow_language=zh`, use Chinese workflow-language terminology: concept terms need a Chinese paper-facing name and Chinese short form by default; English full form plus acronym may appear only at first mention, then prose should reuse the Chinese short form. Prefer natural compact Chinese short forms; two-character, three-character, four-character, or longer short phrases are all acceptable when they read naturally.
|
|
317
|
+
- When completing Chinese workflow-language output, run `validate_workflow_language_text.py` on touched sections, tables, figures, and analysis assets before claiming the round is accepted; unresolved English concept fragments are blockers for final/export write rounds.
|
|
316
318
|
- Maintain `.lab/writing/metric-glossary.md` as the write-stage source for reported metric names, definitions, calculations, denominators, directions, scopes, and aliases.
|
|
317
319
|
- When a round introduces or revises key terms, include a compact terminology note in the user-facing write summary and record the terminology-clarity self-check in the latest write iteration artifact.
|
|
318
320
|
- When a round introduces or revises metrics, include a compact metric-glossary note in the user-facing write summary and record the metric-glossary validation in the latest write iteration artifact.
|
|
@@ -23,6 +23,28 @@ Do not trigger rebuttal mode for routine implementation reviews, path fixes, dep
|
|
|
23
23
|
- external rebuttal text when provided
|
|
24
24
|
- active autonomy level when the stage is `/lab:auto`
|
|
25
25
|
|
|
26
|
+
## Light Read Set
|
|
27
|
+
|
|
28
|
+
Rebuttal mode is a criticism and routing pass, not a full repository audit. Start with the smallest evidence bundle that can support reviewer-style findings.
|
|
29
|
+
|
|
30
|
+
Default read set:
|
|
31
|
+
|
|
32
|
+
- active LaTeX manuscript files: `main.tex`, `sections/*.tex`, `tables/*.tex`, `figures/*.tex`, and `analysis/*.tex` when they are part of the active paper topology
|
|
33
|
+
- result summaries: `summary.csv`, `summary.tsv`, `summary.json`, `score_effect_summary.json`, `metric_summary.*`, `run_table.*`, selected aggregate tables, and already-rendered table inputs
|
|
34
|
+
- managed paper indices when present: evidence index, evaluation protocol, paper plan, metric glossary, terminology glossary, artifact status, and active topology file
|
|
35
|
+
- the specific external rebuttal text, user criticism, or reviewer comments supplied for the pass
|
|
36
|
+
|
|
37
|
+
Do not run a whole-repository scan by default. Do not read raw datasets, full logs, full output trees, source code, notebooks, or unrelated drafts unless a specific issue cannot be resolved from the light read set.
|
|
38
|
+
|
|
39
|
+
Expand the read set only when one of these conditions holds:
|
|
40
|
+
|
|
41
|
+
- a LaTeX claim names a result whose summary file is missing or contradictory
|
|
42
|
+
- a table value cannot be traced to any result summary
|
|
43
|
+
- a validator points to a specific source file or generated artifact
|
|
44
|
+
- the user explicitly asks for a deep audit instead of a rebuttal pass
|
|
45
|
+
|
|
46
|
+
When expanding scope, record the reason and extra paths in the rebuttal panel. If the pass stays within the light read set, record that as well.
|
|
47
|
+
|
|
26
48
|
## External Rebuttal Intake
|
|
27
49
|
|
|
28
50
|
External criticism must be converted into internal issues before any rewrite.
|
|
@@ -32,7 +54,7 @@ For each external comment, record:
|
|
|
32
54
|
- source: reviewer id, AC, meta-review, colleague, or user
|
|
33
55
|
- raw criticism summary
|
|
34
56
|
- affected paper unit: claim, section, table, figure, protocol, metric, threat model, experiment, or wording
|
|
35
|
-
- reviewer axis: R1, R2, R3, or
|
|
57
|
+
- reviewer axis: R1, R2, R3, R4, or R5
|
|
36
58
|
- severity: fatal, major, minor, or clarification
|
|
37
59
|
- route: `write`, `iterate`, `report`, `framing`, `data`, `spec`, or `ask-user`
|
|
38
60
|
- acceptance check: concrete evidence or manuscript condition that resolves the issue
|
|
@@ -41,7 +63,7 @@ Do not answer external criticism with prose-only reassurance. If the issue is va
|
|
|
41
63
|
|
|
42
64
|
## Reviewer Panel
|
|
43
65
|
|
|
44
|
-
Run
|
|
66
|
+
Run five independent review lenses. Each lens must produce actionable issues, not vague advice.
|
|
45
67
|
|
|
46
68
|
### R1 Significance / Originality / Insight
|
|
47
69
|
|
|
@@ -61,7 +83,13 @@ Ask whether evaluation covers ablations, robustness, generalization, failure cas
|
|
|
61
83
|
|
|
62
84
|
Typical fixes route to `iterate`, `report`, or `write`.
|
|
63
85
|
|
|
64
|
-
### R4
|
|
86
|
+
### R4 Results / Tables / Numeric Evidence
|
|
87
|
+
|
|
88
|
+
Ask whether reported numbers, deltas, table design, metric directions, split counts, statistical support, bolding, captions, and table notes make the evidence auditable. Check whether each major table states what it evaluates, how metrics are computed or interpreted, what protocol generated the rows, and what can or cannot be compared.
|
|
89
|
+
|
|
90
|
+
Typical fixes route to `report`, `iterate`, or `write`.
|
|
91
|
+
|
|
92
|
+
### R5 Presentation / Clarity
|
|
65
93
|
|
|
66
94
|
Ask whether the storyline, terminology, figure/table semantics, citations, LaTeX, and section flow are readable and self-contained.
|
|
67
95
|
|
|
@@ -121,7 +149,7 @@ If old evidence remains usable under a narrower interpretation, say exactly wher
|
|
|
121
149
|
|
|
122
150
|
`/lab:review` uses rebuttal mode as its reviewer-panel operating mode when the target is paper-facing or when external criticism is supplied.
|
|
123
151
|
|
|
124
|
-
`/lab:write` uses rebuttal mode as an acceptance gate for nontrivial section or manuscript rounds. A write round may not proceed to prose polish while a fatal or major R1/R2/R3 issue remains unresolved.
|
|
152
|
+
`/lab:write` uses rebuttal mode as an acceptance gate for nontrivial section or manuscript rounds. A write round may not proceed to prose polish while a fatal or major R1/R2/R3/R4 issue remains unresolved.
|
|
125
153
|
|
|
126
154
|
`/lab:auto` uses rebuttal mode as a promotion guard when the campaign includes paper-facing `report`, `write`, or external rebuttal repair. In L3, auto may execute core mutation after ledger entry and impact audit.
|
|
127
155
|
|
|
@@ -132,4 +160,3 @@ If old evidence remains usable under a narrower interpretation, say exactly wher
|
|
|
132
160
|
- Revise when the fix is manuscript-only.
|
|
133
161
|
- Escalate when the issue requires a decision outside the current autonomy level.
|
|
134
162
|
- Stop only when the remaining issue is terminal, already waived with evidence, or outside the campaign boundary.
|
|
135
|
-
|
|
@@ -129,6 +129,7 @@
|
|
|
129
129
|
|
|
130
130
|
- When an auto campaign includes paper-facing `report`, `write`, external rebuttal repair, or reviewer-driven paper revision, load the shared rebuttal procedure in `skills/lab/references/rebuttal-mode.md`.
|
|
131
131
|
- Use `.lab/.managed/templates/rebuttal-panel.md` for the durable Reviewer Panel artifact instead of embedding a separate reviewer workflow in auto mode.
|
|
132
|
+
- Start reviewer-driven repair from the rebuttal Light Read Set: active LaTeX, result summaries, managed indices, and supplied criticism. Do not perform whole-repository scans, raw dataset reads, or full log sweeps unless the rebuttal panel records a concrete expansion reason.
|
|
132
133
|
- External rebuttal criticism must be converted into internal issues, routes, and acceptance checks before `run`, `iterate`, `report`, or `write` work starts.
|
|
133
134
|
- In L1/L2, core mutation remains an approval boundary unless explicitly authorized by the auto contract.
|
|
134
135
|
- In L3, auto may change paper-level claim, protocol, metric, threat model, reviewer profile, dataset scope, benchmark scope, or framing inside the approved campaign envelope. It must first write or update `.lab/writing/core-mutation-ledger.md` from `.lab/.managed/templates/core-mutation-ledger.md`.
|
|
@@ -232,6 +233,11 @@
|
|
|
232
233
|
- Run `.lab/.managed/scripts/validate_stage_report.py --stage-report <stage-report> --stage auto` and include the report path plus validation result in the final user-facing summary.
|
|
233
234
|
- Final visible closeout is mandatory after validation. Do not end `/lab:auto` with only "done", "pushed", "completed", or a chronological command log.
|
|
234
235
|
- The final visible closeout must be derived from the validated stage report, not from a separate improvised narrative.
|
|
236
|
+
- Use this Result Closeout Shape exactly as the top-level structure:
|
|
237
|
+
- `Requested outcome status`
|
|
238
|
+
- `Plain-language result table`
|
|
239
|
+
- `Evidence and validation`
|
|
240
|
+
- `Gaps and next action`
|
|
235
241
|
- The final visible closeout must include:
|
|
236
242
|
- the user's requested deliverables or objectives and their status: completed, repaired, failed-gate, not promoted, blocked, or handoff
|
|
237
243
|
- the key Core Explanation Table rows: what was done, how it was done, what worked, what did not work, what was verified, what remains unverified, whether improvement is needed and why, how to improve and why
|
|
@@ -239,4 +245,6 @@
|
|
|
239
245
|
- validation/verification commands and validation result, including commands that could not run
|
|
240
246
|
- known gaps or compile/runtime limitations
|
|
241
247
|
- next action and why that action is appropriate
|
|
248
|
+
- The `Plain-language result table` must answer, in user-facing language, what was requested, what changed, what worked, what did not work, what was verified, what remains unverified, and whether improvement is still needed.
|
|
249
|
+
- Do not use top-level closeout headings such as `Core fixes`, `核心修复`, `Main modified files`, `主要修改文件`, `Done`, or `已推送`. If useful, put file lists, commits, or modification details under the required four headings.
|
|
242
250
|
- If the final answer says the work is "completed", it must still name any remaining handoff boundary such as PDF compile, layout check, external approval, budget exhaustion, frozen-core risk, or missing environment.
|
|
@@ -44,9 +44,10 @@
|
|
|
44
44
|
## Rebuttal Mode
|
|
45
45
|
|
|
46
46
|
- When the target is a paper, paper section, table, figure, report, claim set, or external rebuttal criticism, run the shared reviewer-panel procedure in `skills/lab/references/rebuttal-mode.md`.
|
|
47
|
-
- Do not duplicate the
|
|
47
|
+
- Do not duplicate the five-reviewer logic in this stage file. Use `.lab/.managed/templates/rebuttal-panel.md` for the durable critique artifact.
|
|
48
|
+
- For quick prompts such as "rebuttal一下看有什么缺点", start with the rebuttal Light Read Set only: active LaTeX, result summaries, managed indices, and supplied criticism. Do not run a whole-repository scan unless the panel records a specific escalation reason.
|
|
48
49
|
- External rebuttal, AC, meta-review, colleague, or user criticism must be converted into internal actionable issues before any rewrite or response draft.
|
|
49
|
-
- The Reviewer Panel must classify issues across R1 Significance / Originality / Insight, R2 Soundness / Technical Quality, R3 Evaluation / Analysis, and
|
|
50
|
+
- The Reviewer Panel must classify issues across R1 Significance / Originality / Insight, R2 Soundness / Technical Quality, R3 Evaluation / Analysis, R4 Results / Tables / Numeric Evidence, and R5 Presentation / Clarity.
|
|
50
51
|
- Each issue must include severity, affected artifact, required fix, route, acceptance check, and whether core mutation is required.
|
|
51
52
|
- In L1/L2, core mutation remains an approval boundary unless explicitly authorized. In L3, route core mutation through the shared ledger policy instead of treating it as a reviewer-stage blocker.
|
|
52
53
|
|
|
@@ -75,8 +75,9 @@ Run these on every round:
|
|
|
75
75
|
|
|
76
76
|
- When the user provides external reviewer, AC, meta-review, rebuttal, colleague, or user criticism, load `skills/lab/references/rebuttal-mode.md` before drafting.
|
|
77
77
|
- For nontrivial paper-facing write rounds, use rebuttal mode as the reviewer acceptance gate and write the critique artifact from `.lab/.managed/templates/rebuttal-panel.md`.
|
|
78
|
+
- Rebuttal gating in write mode must start from the rebuttal Light Read Set. Read active LaTeX, result summaries, managed indices, and supplied criticism first; avoid whole-repository scans unless the rebuttal panel records a concrete expansion reason.
|
|
78
79
|
- Do not implement a separate write-only rebuttal workflow. The shared rebuttal-mode reference owns reviewer axes, external rebuttal intake, issue routing, and core mutation policy.
|
|
79
|
-
- Fatal or major R1/R2/R3 issues block prose polish until they are repaired, routed to `iterate`/`report`/`framing`/`spec`, or explicitly waived with evidence.
|
|
80
|
+
- Fatal or major R1/R2/R3/R4 issues block prose polish until they are repaired, routed to `iterate`/`report`/`framing`/`spec`, or explicitly waived with evidence.
|
|
80
81
|
- In L3 or an explicitly core-authorized write campaign, paper-level claim, protocol, metric, threat model, dataset scope, benchmark scope, or framing changes are allowed only through the shared Core Mutation Ledger policy in `skills/lab/references/rebuttal-mode.md`.
|
|
81
82
|
- Record the rebuttal panel path, any core mutation ledger path, and unresolved issue ids in the write-iteration artifact.
|
|
82
83
|
|
|
@@ -186,6 +187,8 @@ Do not enter prose polish until the current section has passed the reference-con
|
|
|
186
187
|
- If any section-level acceptance item is still unresolved, spend the round fixing that blocker instead of doing more prose polish.
|
|
187
188
|
- Do not default the next-step recommendation to another polish pass. Recommend the first unresolved section-level blocker, or stop if the section is already accepted for the round.
|
|
188
189
|
- Use natural-language full names in prose. If an approved short form is needed later, define it once and reuse it consistently.
|
|
190
|
+
- Chinese workflow-language terminology must be stricter than generic first-mention rules. When `workflow_language=zh`, concept terms should use a Chinese paper-facing name and a Chinese short form by default. English full form plus acronym may appear at first mention only as `中文全称(English full form, ACRONYM)`, then prose should reuse the Chinese short form. Prefer natural compact Chinese short forms; two-character, three-character, four-character, or longer short phrases are all acceptable when they read naturally. Do not force a fixed-length abbreviation. Avoid repeating English concept fragments such as `residual-fitting pathology`, `treated-group noise`, `gain-head function class`, `input-matched`, or `refinement` throughout Chinese prose.
|
|
191
|
+
- For `workflow_language=zh`, run `validate_workflow_language_text.py` over touched workflow-language sections, tables, figures, and analysis assets before completing the round. If it reports English concept fragments, translate them, define them once as `中文全称(English full form, ACRONYM)`, or add a justified glossary exception before prose polish.
|
|
189
192
|
- Do not use labels containing `_` or `-` in reader-facing prose.
|
|
190
193
|
- Keep internal identifiers, config keys, and experiment package labels out of reader-facing prose unless they are mapped once for the reader and then moved back out of prose.
|
|
191
194
|
- Keep run provenance such as tuning-run labels, probe names, internal config strings, rerun ids, and package labels out of reader-facing prose. If the evidence is useful, rewrite it as a bounded paper-facing diagnostic or move the raw provenance to workflow notes or appendix metadata.
|