superlab 0.1.26 → 0.1.27
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 +62 -4
- package/package-assets/claude/commands/lab-write.md +1 -1
- package/package-assets/claude/commands/lab.md +1 -0
- package/package-assets/codex/prompts/lab-write.md +1 -1
- package/package-assets/codex/prompts/lab.md +1 -0
- package/package-assets/shared/lab/.managed/scripts/validate_paper_plan.py +228 -0
- package/package-assets/shared/lab/.managed/templates/paper-plan.md +54 -0
- package/package-assets/shared/skills/lab/stages/write.md +7 -4
- package/package.json +1 -1
package/lib/i18n.cjs
CHANGED
|
@@ -60,7 +60,7 @@ const ZH_CONTENT = {
|
|
|
60
60
|
[path.join(".codex", "prompts", "lab-write.md")]: codexPrompt(
|
|
61
61
|
"把验证过的研究工件转成论文 section,并按小步方式修订",
|
|
62
62
|
"section or writing target",
|
|
63
|
-
"使用已安装的 `lab` 技能:`.codex/skills/lab/SKILL.md`。\n\n立刻针对用户当前给出的参数执行 `/lab:write`,不要只推荐别的 `/lab` 阶段。只有在缺少阻塞性前提时,才明确指出缺什么,并且一次最多追问一个问题。\n\n本命令运行 `/lab:write` 阶段。它必须先有来自 `/lab:framing` 的已批准 framing artifact,再读取 `.codex/skills/lab/references/paper-writing/` 下与当前 section 对应的参考文件;如果当前 section 有 bundled example bank,还必须继续读取 `.codex/skills/lab/references/paper-writing/examples/index.md`、对应的 examples index,以及 1-2 个具体 example 文件。然后结合 `paper-review.md` 与 `does-my-writing-flow-source.md`,先写 mini-outline,先规划该 section 需要的表、图和 citation,再只修改一个 section
|
|
63
|
+
"使用已安装的 `lab` 技能:`.codex/skills/lab/SKILL.md`。\n\n立刻针对用户当前给出的参数执行 `/lab:write`,不要只推荐别的 `/lab` 阶段。只有在缺少阻塞性前提时,才明确指出缺什么,并且一次最多追问一个问题。\n\n本命令运行 `/lab:write` 阶段。它必须先有来自 `/lab:framing` 的已批准 framing artifact,再读取 `.codex/skills/lab/references/paper-writing/` 下与当前 section 对应的参考文件;如果当前 section 有 bundled example bank,还必须继续读取 `.codex/skills/lab/references/paper-writing/examples/index.md`、对应的 examples index,以及 1-2 个具体 example 文件。然后结合 `paper-review.md` 与 `does-my-writing-flow-source.md`,先写 mini-outline,先规划该 section 需要的表、图和 citation,再只修改一个 section。在起草 `method`、`experiments`、`related work` 或 `conclusion` 之前,必须先运行 `.lab/.managed/scripts/validate_paper_plan.py --paper-plan .lab/writing/plan.md`。最终定稿或导出轮次必须运行 `.lab/.managed/scripts/validate_manuscript_delivery.py --paper-dir <deliverables_root>/paper`。第一次进入会产出论文 `.tex` 的路径时,如果 `paper_template_root` 为空,必须先问一次:继续使用默认 LaTeX scaffold,还是先接入模板目录。"
|
|
64
64
|
),
|
|
65
65
|
[path.join(".claude", "commands", "lab-idea.md")]: claudeCommand(
|
|
66
66
|
"lab-idea",
|
|
@@ -925,9 +925,10 @@ const ZH_SKILL_FILES = {
|
|
|
925
925
|
|
|
926
926
|
## 目标
|
|
927
927
|
|
|
928
|
-
-
|
|
929
|
-
-
|
|
928
|
+
- 目标会议或读者:
|
|
929
|
+
- 论文状态:
|
|
930
930
|
- 一句话主线:
|
|
931
|
+
- 已批准 framing artifact:
|
|
931
932
|
- Terminology lock:
|
|
932
933
|
|
|
933
934
|
## Section 状态
|
|
@@ -946,6 +947,60 @@ const ZH_SKILL_FILES = {
|
|
|
946
947
|
- Limitation sources:
|
|
947
948
|
- 哪些 claim 还缺证据:
|
|
948
949
|
|
|
950
|
+
## 表计划
|
|
951
|
+
|
|
952
|
+
- 主结果表:
|
|
953
|
+
- 资产文件:
|
|
954
|
+
- 作用章节:
|
|
955
|
+
- 作用:
|
|
956
|
+
- 证据:
|
|
957
|
+
- 状态:
|
|
958
|
+
- 消融表:
|
|
959
|
+
- 资产文件:
|
|
960
|
+
- 作用章节:
|
|
961
|
+
- 作用:
|
|
962
|
+
- 证据:
|
|
963
|
+
- 状态:
|
|
964
|
+
|
|
965
|
+
## 图计划
|
|
966
|
+
|
|
967
|
+
- 方法总览图:
|
|
968
|
+
- 资产文件:
|
|
969
|
+
- 作用章节:
|
|
970
|
+
- 图意图:
|
|
971
|
+
- 证据:
|
|
972
|
+
- 状态:
|
|
973
|
+
- 结果总览图:
|
|
974
|
+
- 资产文件:
|
|
975
|
+
- 作用章节:
|
|
976
|
+
- 图意图:
|
|
977
|
+
- 证据:
|
|
978
|
+
- 状态:
|
|
979
|
+
|
|
980
|
+
## 引用计划
|
|
981
|
+
|
|
982
|
+
- 背景锚点:
|
|
983
|
+
- 引用或来源锚点:
|
|
984
|
+
- 作用章节:
|
|
985
|
+
- 为什么重要:
|
|
986
|
+
- 状态:
|
|
987
|
+
- 最接近前作:
|
|
988
|
+
- 引用或来源锚点:
|
|
989
|
+
- 作用章节:
|
|
990
|
+
- 为什么重要:
|
|
991
|
+
- 状态:
|
|
992
|
+
- 指标或 benchmark 来源:
|
|
993
|
+
- 引用或来源锚点:
|
|
994
|
+
- 作用章节:
|
|
995
|
+
- 为什么重要:
|
|
996
|
+
- 状态:
|
|
997
|
+
|
|
998
|
+
## 章节到资产映射
|
|
999
|
+
|
|
1000
|
+
- 方法:
|
|
1001
|
+
- 实验:
|
|
1002
|
+
- 相关工作:
|
|
1003
|
+
|
|
949
1004
|
## 写作顺序
|
|
950
1005
|
|
|
951
1006
|
1. 第一优先 section:
|
|
@@ -1586,13 +1641,16 @@ ZH_CONTENT[path.join(".codex", "skills", "lab", "stages", "write.md")] = `# \`/l
|
|
|
1586
1641
|
- 如果当前 section 是 \`related work\`、\`experiments\` 或 \`conclusion\`,也要读取对应的本地 example bank:\`references/paper-writing/examples/index.md\`、对应的 examples index,以及 1-2 个具体 example 文件。
|
|
1587
1642
|
- 例子只能复用结构、段落角色和句法逻辑,不能直接复用原句。
|
|
1588
1643
|
- 先写 mini-outline 再写 prose。
|
|
1589
|
-
- 如果当前 section
|
|
1644
|
+
- 如果当前 section 带方法、实验、相关工作或结论 claim,先规划需要的表格、figure placeholders 和 citations,再写 prose。
|
|
1645
|
+
- 在起草 \`method\`、\`experiments\`、\`related work\` 或 \`conclusion\` 之前,必须先运行 \`.lab/.managed/scripts/validate_paper_plan.py --paper-plan .lab/writing/plan.md\`。
|
|
1646
|
+
- 如果 \`paper-plan\` 校验失败,就先补 \`.lab/writing/plan.md\`,不能直接跳去写 prose。
|
|
1590
1647
|
- 最终定稿或导出轮次里,必须维护非空的 \`references.bib\`,并把关键实验结果物化成真正的 LaTeX 表格:
|
|
1591
1648
|
- \`<deliverables_root>/paper/tables/main-results.tex\`
|
|
1592
1649
|
- \`<deliverables_root>/paper/tables/ablations.tex\`
|
|
1593
1650
|
- 方法或实验章节还必须物化带 caption、label 和图意图的 figure placeholders:
|
|
1594
1651
|
- \`<deliverables_root>/paper/figures/method-overview.tex\`
|
|
1595
1652
|
- \`<deliverables_root>/paper/figures/results-overview.tex\`
|
|
1653
|
+
- 只要论文资产发生变化,就同步更新 \`.lab/writing/plan.md\` 里的表计划、图计划、引用计划和章节到资产映射。
|
|
1596
1654
|
- 不要把纯 prose section 当成论文交付完成。
|
|
1597
1655
|
- 论文源码里不要出现绝对本地路径、workflow provenance、shell 日志或 \`+/-\` 这类工程记法;应改成 paper-facing LaTeX 表达。
|
|
1598
1656
|
- 在最终定稿或导出轮次结束前,必须运行 \`.lab/.managed/scripts/validate_manuscript_delivery.py --paper-dir <deliverables_root>/paper\`;如果失败,就继续补表、图、引用和正文。
|
|
@@ -7,4 +7,4 @@ argument-hint: section or writing target
|
|
|
7
7
|
Use the installed `lab` skill at `.claude/skills/lab/SKILL.md`.
|
|
8
8
|
|
|
9
9
|
Execute the requested `/lab-write` command against the user's argument now. Do not only recommend another lab stage. If a blocking prerequisite is missing, say exactly what is missing and ask at most one clarifying question.
|
|
10
|
-
This command runs the `write` stage of the lab workflow. It requires an approved framing artifact from the `framing` stage, must read the matching section reference from `.claude/skills/lab/references/paper-writing/`, and for any section with a bundled example bank it must also read `.claude/skills/lab/references/paper-writing/examples/index.md` plus the matching examples index and 1-2 concrete example files. Then it should run `paper-review.md` and `does-my-writing-flow-source.md`, build a mini-outline, plan the section's paper-facing tables/figures/citations, and revise only one section. Final-draft or export rounds must run `.lab/.managed/scripts/validate_manuscript_delivery.py --paper-dir <deliverables_root>/paper` before stopping.
|
|
10
|
+
This command runs the `write` stage of the lab workflow. It requires an approved framing artifact from the `framing` stage, must read the matching section reference from `.claude/skills/lab/references/paper-writing/`, and for any section with a bundled example bank it must also read `.claude/skills/lab/references/paper-writing/examples/index.md` plus the matching examples index and 1-2 concrete example files. Then it should run `paper-review.md` and `does-my-writing-flow-source.md`, build a mini-outline, plan the section's paper-facing tables/figures/citations, and revise only one section. Before drafting `method`, `experiments`, `related work`, or `conclusion`, it must run `.lab/.managed/scripts/validate_paper_plan.py --paper-plan .lab/writing/plan.md`. Final-draft or export rounds must run `.lab/.managed/scripts/validate_manuscript_delivery.py --paper-dir <deliverables_root>/paper` before stopping.
|
|
@@ -59,6 +59,7 @@ Use the same repository artifacts and stage boundaries every time.
|
|
|
59
59
|
- `run`, `iterate`, `auto`, and `report` should all follow `.lab/context/eval-protocol.md`, including its recorded sources for metrics and comparison implementations.
|
|
60
60
|
- `write` requires an approved framing artifact from the `framing` stage.
|
|
61
61
|
- `write` requires stable report artifacts, a mini-outline, the active section guide, the matching bundled examples when available, `paper-review.md`, and `does-my-writing-flow-source.md`, and should only change one section per round.
|
|
62
|
+
- Before drafting `method`, `experiments`, `related work`, or `conclusion`, `write` should validate `.lab/writing/plan.md` with `.lab/.managed/scripts/validate_paper_plan.py --paper-plan .lab/writing/plan.md`.
|
|
62
63
|
- Final-draft or export rounds in `write` should materialize paper-facing tables, figure placeholders, a non-empty `references.bib`, and pass `.lab/.managed/scripts/validate_manuscript_delivery.py --paper-dir <deliverables_root>/paper`.
|
|
63
64
|
|
|
64
65
|
## How to Ask for `/lab auto`
|
|
@@ -6,4 +6,4 @@ argument-hint: section or writing target
|
|
|
6
6
|
Use the installed `lab` skill at `.codex/skills/lab/SKILL.md`.
|
|
7
7
|
|
|
8
8
|
Execute the requested `/lab:write` stage against the user's argument now. Do not only recommend another lab stage. If a blocking prerequisite is missing, say exactly what is missing and ask at most one clarifying question.
|
|
9
|
-
This command runs the `/lab:write` stage. It requires an approved framing artifact from `/lab:framing`, must read the matching section reference from `.codex/skills/lab/references/paper-writing/`, and for any section with a bundled example bank it must also read `.codex/skills/lab/references/paper-writing/examples/index.md` plus the matching examples index and 1-2 concrete example files. Then it should run `paper-review.md` and `does-my-writing-flow-source.md`, build a mini-outline, plan the section's paper-facing tables/figures/citations, and revise only one section. Final-draft or export rounds must run `.lab/.managed/scripts/validate_manuscript_delivery.py --paper-dir <deliverables_root>/paper` before stopping.
|
|
9
|
+
This command runs the `/lab:write` stage. It requires an approved framing artifact from `/lab:framing`, must read the matching section reference from `.codex/skills/lab/references/paper-writing/`, and for any section with a bundled example bank it must also read `.codex/skills/lab/references/paper-writing/examples/index.md` plus the matching examples index and 1-2 concrete example files. Then it should run `paper-review.md` and `does-my-writing-flow-source.md`, build a mini-outline, plan the section's paper-facing tables/figures/citations, and revise only one section. Before drafting `method`, `experiments`, `related work`, or `conclusion`, it must run `.lab/.managed/scripts/validate_paper_plan.py --paper-plan .lab/writing/plan.md`. Final-draft or export rounds must run `.lab/.managed/scripts/validate_manuscript_delivery.py --paper-dir <deliverables_root>/paper` before stopping.
|
|
@@ -53,6 +53,7 @@ argument-hint: workflow question or stage choice
|
|
|
53
53
|
- `/lab:run`, `/lab:iterate`, `/lab:auto`, and `/lab:report` should all follow `.lab/context/eval-protocol.md`, including its recorded sources for metrics and comparison implementations.
|
|
54
54
|
- `/lab:write` requires an approved framing artifact from `/lab:framing`.
|
|
55
55
|
- `/lab:write` requires stable report artifacts, a mini-outline, the active section guide, the matching bundled examples when available, `paper-review.md`, and `does-my-writing-flow-source.md`, and should only change one section per round.
|
|
56
|
+
- Before drafting `method`, `experiments`, `related work`, or `conclusion`, `/lab:write` should validate `.lab/writing/plan.md` with `.lab/.managed/scripts/validate_paper_plan.py --paper-plan .lab/writing/plan.md`.
|
|
56
57
|
- Final-draft or export rounds in `/lab:write` should materialize paper-facing tables, figure placeholders, a non-empty `references.bib`, and pass `.lab/.managed/scripts/validate_manuscript_delivery.py --paper-dir <deliverables_root>/paper`.
|
|
57
58
|
|
|
58
59
|
## How to Ask for `/lab:auto`
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
import argparse
|
|
3
|
+
import re
|
|
4
|
+
import sys
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
REQUIRED_SECTIONS = {
|
|
9
|
+
"Target": [r"^##\s+Target\s*$", r"^##\s+目标\s*$"],
|
|
10
|
+
"Section Status": [r"^##\s+Section Status\s*$", r"^##\s+Section 状态\s*$"],
|
|
11
|
+
"Evidence Map": [r"^##\s+Evidence Map\s*$", r"^##\s+证据地图\s*$"],
|
|
12
|
+
"Table Plan": [r"^##\s+Table Plan\s*$", r"^##\s+表计划\s*$"],
|
|
13
|
+
"Figure Plan": [r"^##\s+Figure Plan\s*$", r"^##\s+图计划\s*$"],
|
|
14
|
+
"Citation Plan": [r"^##\s+Citation Plan\s*$", r"^##\s+引用计划\s*$"],
|
|
15
|
+
"Section-to-Asset Map": [r"^##\s+Section-to-Asset Map\s*$", r"^##\s+章节到资产映射\s*$"],
|
|
16
|
+
"Writing Order": [r"^##\s+Writing Order\s*$", r"^##\s+写作顺序\s*$"],
|
|
17
|
+
"Five-Dimension Self-Review Status": [
|
|
18
|
+
r"^##\s+Five-Dimension Self-Review Status\s*$",
|
|
19
|
+
r"^##\s+五维自评状态\s*$",
|
|
20
|
+
],
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
TARGET_FIELDS = (
|
|
24
|
+
"Venue or audience",
|
|
25
|
+
"Paper status",
|
|
26
|
+
"Core story in one sentence",
|
|
27
|
+
"Approved framing artifact",
|
|
28
|
+
"Terminology lock",
|
|
29
|
+
"目标会议或读者",
|
|
30
|
+
"论文状态",
|
|
31
|
+
"一句话主线",
|
|
32
|
+
"已批准 framing artifact",
|
|
33
|
+
"术语锁",
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
SECTION_STATUS_FIELDS = (
|
|
37
|
+
"Abstract",
|
|
38
|
+
"Introduction",
|
|
39
|
+
"Related Work",
|
|
40
|
+
"Method",
|
|
41
|
+
"Experiments",
|
|
42
|
+
"Conclusion",
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
EVIDENCE_FIELDS = (
|
|
46
|
+
"Main result sources",
|
|
47
|
+
"Ablation sources",
|
|
48
|
+
"Limitation sources",
|
|
49
|
+
"Claims that still need more evidence",
|
|
50
|
+
"主结果来源",
|
|
51
|
+
"消融来源",
|
|
52
|
+
"限制来源",
|
|
53
|
+
"还缺更多证据的 claim",
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
TABLE_DETAIL_FIELDS = (
|
|
57
|
+
"Asset file",
|
|
58
|
+
"Section",
|
|
59
|
+
"Message",
|
|
60
|
+
"Evidence",
|
|
61
|
+
"Status",
|
|
62
|
+
"资产文件",
|
|
63
|
+
"作用章节",
|
|
64
|
+
"作用",
|
|
65
|
+
"证据",
|
|
66
|
+
"状态",
|
|
67
|
+
)
|
|
68
|
+
FIGURE_DETAIL_FIELDS = (
|
|
69
|
+
"Asset file",
|
|
70
|
+
"Section",
|
|
71
|
+
"Figure intent",
|
|
72
|
+
"Evidence",
|
|
73
|
+
"Status",
|
|
74
|
+
"资产文件",
|
|
75
|
+
"作用章节",
|
|
76
|
+
"图意图",
|
|
77
|
+
"证据",
|
|
78
|
+
"状态",
|
|
79
|
+
)
|
|
80
|
+
CITATION_DETAIL_FIELDS = (
|
|
81
|
+
"Citation or source anchor",
|
|
82
|
+
"Section",
|
|
83
|
+
"Why it matters",
|
|
84
|
+
"Status",
|
|
85
|
+
"引用或来源锚点",
|
|
86
|
+
"作用章节",
|
|
87
|
+
"为什么重要",
|
|
88
|
+
"状态",
|
|
89
|
+
)
|
|
90
|
+
SECTION_MAP_FIELDS = ("Method", "Experiments", "Related Work", "方法", "实验", "相关工作")
|
|
91
|
+
WRITING_ORDER_FIELDS = (
|
|
92
|
+
"First section target",
|
|
93
|
+
"Second section target",
|
|
94
|
+
"Deferred sections",
|
|
95
|
+
"第一优先 section",
|
|
96
|
+
"第二优先 section",
|
|
97
|
+
"延后 section",
|
|
98
|
+
)
|
|
99
|
+
SELF_REVIEW_FIELDS = (
|
|
100
|
+
"Contribution",
|
|
101
|
+
"Writing clarity",
|
|
102
|
+
"Experimental strength",
|
|
103
|
+
"Evaluation completeness",
|
|
104
|
+
"Method design soundness",
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def parse_args():
|
|
109
|
+
parser = argparse.ArgumentParser(
|
|
110
|
+
description="Validate that the managed paper plan contains concrete asset planning before prose drafting."
|
|
111
|
+
)
|
|
112
|
+
parser.add_argument("--paper-plan", required=True, help="Path to .lab/writing/plan.md")
|
|
113
|
+
return parser.parse_args()
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def read_text(path: Path) -> str:
|
|
117
|
+
return path.read_text(encoding="utf-8")
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def extract_section_body(text: str, patterns: list[str]) -> str:
|
|
121
|
+
for pattern in patterns:
|
|
122
|
+
match = re.search(pattern, text, flags=re.MULTILINE)
|
|
123
|
+
if not match:
|
|
124
|
+
continue
|
|
125
|
+
start = match.end()
|
|
126
|
+
next_heading = re.search(r"^##\s+", text[start:], flags=re.MULTILINE)
|
|
127
|
+
end = start + next_heading.start() if next_heading else len(text)
|
|
128
|
+
return text[start:end].strip()
|
|
129
|
+
return ""
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
def missing_sections(text: str) -> list[str]:
|
|
133
|
+
missing = []
|
|
134
|
+
for section_name, patterns in REQUIRED_SECTIONS.items():
|
|
135
|
+
if not any(re.search(pattern, text, flags=re.MULTILINE) for pattern in patterns):
|
|
136
|
+
missing.append(section_name)
|
|
137
|
+
return missing
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def has_filled_field(body: str, field_labels: tuple[str, ...]) -> bool:
|
|
141
|
+
for label in field_labels:
|
|
142
|
+
pattern = re.compile(rf"^\s*(?:-|\d+\.)\s*{re.escape(label)}:[ \t]*([^\n]+?)\s*$", flags=re.MULTILINE)
|
|
143
|
+
for match in pattern.finditer(body):
|
|
144
|
+
value = match.group(1).strip()
|
|
145
|
+
if value and value not in {"TBD", "TODO", "待补", "待定"}:
|
|
146
|
+
return True
|
|
147
|
+
return False
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def count_filled_fields(body: str, field_labels: tuple[str, ...]) -> int:
|
|
151
|
+
count = 0
|
|
152
|
+
for label in field_labels:
|
|
153
|
+
pattern = re.compile(rf"^\s*(?:-|\d+\.)\s*{re.escape(label)}:[ \t]*([^\n]+?)\s*$", flags=re.MULTILINE)
|
|
154
|
+
for match in pattern.finditer(body):
|
|
155
|
+
value = match.group(1).strip()
|
|
156
|
+
if value and value not in {"TBD", "TODO", "待补", "待定"}:
|
|
157
|
+
count += 1
|
|
158
|
+
return count
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
def validate_filled_fields(text: str) -> list[str]:
|
|
162
|
+
issues: list[str] = []
|
|
163
|
+
|
|
164
|
+
target_body = extract_section_body(text, REQUIRED_SECTIONS["Target"])
|
|
165
|
+
if not has_filled_field(target_body, TARGET_FIELDS):
|
|
166
|
+
issues.append("paper plan is missing filled target fields")
|
|
167
|
+
|
|
168
|
+
section_status_body = extract_section_body(text, REQUIRED_SECTIONS["Section Status"])
|
|
169
|
+
if count_filled_fields(section_status_body, SECTION_STATUS_FIELDS) < 6:
|
|
170
|
+
issues.append("paper plan is missing filled section-status entries")
|
|
171
|
+
|
|
172
|
+
evidence_body = extract_section_body(text, REQUIRED_SECTIONS["Evidence Map"])
|
|
173
|
+
if not has_filled_field(evidence_body, EVIDENCE_FIELDS):
|
|
174
|
+
issues.append("paper plan is missing filled evidence-map entries")
|
|
175
|
+
|
|
176
|
+
table_body = extract_section_body(text, REQUIRED_SECTIONS["Table Plan"])
|
|
177
|
+
if count_filled_fields(table_body, TABLE_DETAIL_FIELDS) < 10:
|
|
178
|
+
issues.append("paper plan must fill both required table-asset blocks")
|
|
179
|
+
|
|
180
|
+
figure_body = extract_section_body(text, REQUIRED_SECTIONS["Figure Plan"])
|
|
181
|
+
if count_filled_fields(figure_body, FIGURE_DETAIL_FIELDS) < 10:
|
|
182
|
+
issues.append("paper plan must fill both required figure-asset blocks")
|
|
183
|
+
|
|
184
|
+
citation_body = extract_section_body(text, REQUIRED_SECTIONS["Citation Plan"])
|
|
185
|
+
if count_filled_fields(citation_body, CITATION_DETAIL_FIELDS) < 12:
|
|
186
|
+
issues.append("paper plan must fill all required citation-plan blocks")
|
|
187
|
+
|
|
188
|
+
section_map_body = extract_section_body(text, REQUIRED_SECTIONS["Section-to-Asset Map"])
|
|
189
|
+
if not has_filled_field(section_map_body, SECTION_MAP_FIELDS):
|
|
190
|
+
issues.append("paper plan is missing filled section-to-asset mappings")
|
|
191
|
+
|
|
192
|
+
writing_order_body = extract_section_body(text, REQUIRED_SECTIONS["Writing Order"])
|
|
193
|
+
if count_filled_fields(writing_order_body, WRITING_ORDER_FIELDS) < 3:
|
|
194
|
+
issues.append("paper plan is missing filled writing-order entries")
|
|
195
|
+
|
|
196
|
+
self_review_body = extract_section_body(text, REQUIRED_SECTIONS["Five-Dimension Self-Review Status"])
|
|
197
|
+
if count_filled_fields(self_review_body, SELF_REVIEW_FIELDS) < 5:
|
|
198
|
+
issues.append("paper plan is missing filled self-review status entries")
|
|
199
|
+
|
|
200
|
+
return issues
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
def main():
|
|
204
|
+
args = parse_args()
|
|
205
|
+
plan_path = Path(args.paper_plan)
|
|
206
|
+
if not plan_path.exists():
|
|
207
|
+
print(f"paper plan does not exist: {plan_path}", file=sys.stderr)
|
|
208
|
+
return 1
|
|
209
|
+
|
|
210
|
+
text = read_text(plan_path)
|
|
211
|
+
issues = []
|
|
212
|
+
|
|
213
|
+
missing = missing_sections(text)
|
|
214
|
+
if missing:
|
|
215
|
+
issues.append(f"paper plan is missing required sections: {', '.join(missing)}")
|
|
216
|
+
issues.extend(validate_filled_fields(text))
|
|
217
|
+
|
|
218
|
+
if issues:
|
|
219
|
+
for issue in issues:
|
|
220
|
+
print(issue, file=sys.stderr)
|
|
221
|
+
return 1
|
|
222
|
+
|
|
223
|
+
print("paper plan is valid")
|
|
224
|
+
return 0
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
if __name__ == "__main__":
|
|
228
|
+
raise SystemExit(main())
|
|
@@ -24,6 +24,60 @@
|
|
|
24
24
|
- Limitation sources:
|
|
25
25
|
- Claims that still need more evidence:
|
|
26
26
|
|
|
27
|
+
## Table Plan
|
|
28
|
+
|
|
29
|
+
- Main results table:
|
|
30
|
+
- Asset file:
|
|
31
|
+
- Section:
|
|
32
|
+
- Message:
|
|
33
|
+
- Evidence:
|
|
34
|
+
- Status:
|
|
35
|
+
- Ablation table:
|
|
36
|
+
- Asset file:
|
|
37
|
+
- Section:
|
|
38
|
+
- Message:
|
|
39
|
+
- Evidence:
|
|
40
|
+
- Status:
|
|
41
|
+
|
|
42
|
+
## Figure Plan
|
|
43
|
+
|
|
44
|
+
- Method overview figure:
|
|
45
|
+
- Asset file:
|
|
46
|
+
- Section:
|
|
47
|
+
- Figure intent:
|
|
48
|
+
- Evidence:
|
|
49
|
+
- Status:
|
|
50
|
+
- Results overview figure:
|
|
51
|
+
- Asset file:
|
|
52
|
+
- Section:
|
|
53
|
+
- Figure intent:
|
|
54
|
+
- Evidence:
|
|
55
|
+
- Status:
|
|
56
|
+
|
|
57
|
+
## Citation Plan
|
|
58
|
+
|
|
59
|
+
- Background anchor:
|
|
60
|
+
- Citation or source anchor:
|
|
61
|
+
- Section:
|
|
62
|
+
- Why it matters:
|
|
63
|
+
- Status:
|
|
64
|
+
- Closest prior work:
|
|
65
|
+
- Citation or source anchor:
|
|
66
|
+
- Section:
|
|
67
|
+
- Why it matters:
|
|
68
|
+
- Status:
|
|
69
|
+
- Metric or benchmark source:
|
|
70
|
+
- Citation or source anchor:
|
|
71
|
+
- Section:
|
|
72
|
+
- Why it matters:
|
|
73
|
+
- Status:
|
|
74
|
+
|
|
75
|
+
## Section-to-Asset Map
|
|
76
|
+
|
|
77
|
+
- Method:
|
|
78
|
+
- Experiments:
|
|
79
|
+
- Related Work:
|
|
80
|
+
|
|
27
81
|
## Writing Order
|
|
28
82
|
|
|
29
83
|
1. First section target:
|
|
@@ -76,10 +76,12 @@ Run these on every round:
|
|
|
76
76
|
- Reuse example-bank structure, paragraph roles, sentence logic, and paper-facing LaTeX asset patterns when examples are bundled, but never copy wording verbatim.
|
|
77
77
|
- Treat example cites and example file names as writing references, not as evidence for the current paper.
|
|
78
78
|
- Build a compact mini-outline before prose.
|
|
79
|
-
- Build the paper asset plan before prose when the section carries experimental or
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
79
|
+
- Build the paper asset plan before prose when the section carries experimental, method, related-work, or conclusion claims:
|
|
80
|
+
- record which table asset files the section needs, what each table should show, and which evidence supports it
|
|
81
|
+
- record which figure placeholder files the section needs, what each figure should show, and why the reader needs it
|
|
82
|
+
- record which citation anchors must appear in the section and why each anchor matters
|
|
83
|
+
- Before drafting `method`, `experiments`, `related work`, or `conclusion`, run `.lab/.managed/scripts/validate_paper_plan.py --paper-plan .lab/writing/plan.md`.
|
|
84
|
+
- If the paper-plan validator fails, stop and fill `.lab/writing/plan.md` first instead of drafting prose.
|
|
83
85
|
- For each subsection, explicitly include motivation, design, and technical advantage when applicable.
|
|
84
86
|
- Avoid a writing style that reads like incremental patching of a naive baseline.
|
|
85
87
|
- Keep terminology stable across the full paper.
|
|
@@ -97,6 +99,7 @@ Run these on every round:
|
|
|
97
99
|
- `<deliverables_root>/paper/figures/results-overview.tex`
|
|
98
100
|
- Table assets must use paper-facing LaTeX structure with `booktabs`, caption, label, and consistent precision.
|
|
99
101
|
- Figure placeholders must explain what the final figure should show and why the reader needs it.
|
|
102
|
+
- Keep `.lab/writing/plan.md` synchronized with the current table plan, figure plan, citation plan, and section-to-asset map whenever manuscript assets change.
|
|
100
103
|
- Run `.lab/.managed/scripts/validate_manuscript_delivery.py --paper-dir <deliverables_root>/paper` before accepting a final-draft or export round.
|
|
101
104
|
- If the manuscript validator fails, keep editing and asset generation until it passes; do not stop at prose-only completion.
|
|
102
105
|
- Run a LaTeX compile smoke test when a local LaTeX toolchain is available; if not available, record the missing verification in the write iteration artifact.
|