superlab 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -7
- package/README.zh-CN.md +58 -7
- package/bin/superlab.cjs +479 -4
- package/lib/auto.cjs +782 -0
- package/lib/context.cjs +240 -1
- package/lib/i18n.cjs +603 -199
- package/lib/install.cjs +33 -0
- package/package-assets/claude/commands/lab/auto.md +11 -0
- package/package-assets/claude/commands/lab/data.md +11 -0
- package/package-assets/claude/commands/lab.md +7 -0
- package/package-assets/codex/prompts/lab-auto.md +9 -0
- package/package-assets/codex/prompts/lab-data.md +9 -0
- package/package-assets/codex/prompts/lab.md +7 -0
- package/package-assets/shared/lab/.managed/templates/data.md +168 -0
- package/package-assets/shared/lab/config/workflow.json +4 -1
- package/package-assets/shared/lab/context/auto-mode.md +42 -0
- package/package-assets/shared/lab/context/auto-status.md +23 -0
- package/package-assets/shared/lab/context/data-decisions.md +59 -0
- package/package-assets/shared/lab/context/session-brief.md +3 -0
- package/package-assets/shared/lab/context/summary.md +4 -0
- package/package-assets/shared/lab/system/core.md +18 -1
- package/package-assets/shared/skills/lab/SKILL.md +45 -8
- package/package-assets/shared/skills/lab/references/workflow.md +3 -0
- package/package-assets/shared/skills/lab/stages/auto.md +59 -0
- package/package-assets/shared/skills/lab/stages/data.md +69 -0
- package/package-assets/shared/skills/lab/stages/iterate.md +9 -0
- package/package-assets/shared/skills/lab/stages/report.md +1 -0
- package/package-assets/shared/skills/lab/stages/review.md +3 -0
- package/package-assets/shared/skills/lab/stages/run.md +5 -0
- package/package-assets/shared/skills/lab/stages/spec.md +7 -0
- package/package-assets/shared/skills/lab/stages/write.md +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,6 +55,8 @@ This writes:
|
|
|
55
55
|
- `.lab/changes/`
|
|
56
56
|
- `.lab/.managed/templates/`
|
|
57
57
|
- `.lab/.managed/scripts/`
|
|
58
|
+
- `results/`
|
|
59
|
+
- `figures/`
|
|
58
60
|
|
|
59
61
|
If you prefer non-interactive use:
|
|
60
62
|
|
|
@@ -87,6 +89,14 @@ Refresh a specific project:
|
|
|
87
89
|
superlab update --target /path/to/project
|
|
88
90
|
```
|
|
89
91
|
|
|
92
|
+
Attach a user-provided LaTeX template directory without rewriting it:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
superlab paper attach-template --target /path/to/project --path /path/to/template
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
This only records the template root in project config. Template files are treated as user-owned assets and may already include upstream or local modifications. `superlab` does not rewrite them by default.
|
|
99
|
+
|
|
90
100
|
Refresh every registered project initialized from this user account:
|
|
91
101
|
|
|
92
102
|
```bash
|
|
@@ -133,8 +143,33 @@ superlab doctor
|
|
|
133
143
|
|
|
134
144
|
- required `.lab` files
|
|
135
145
|
- `workflow.json` schema
|
|
146
|
+
- `results_root` and `figures_root` placement
|
|
136
147
|
- `deliverables_root` placement
|
|
148
|
+
- `paper_template_root` when configured
|
|
137
149
|
- LaTeX-first paper output layout under `<deliverables_root>/paper/`
|
|
150
|
+
- boundary violations such as durable run outputs stored under `.lab/changes/*/runs`
|
|
151
|
+
|
|
152
|
+
## Auto Mode
|
|
153
|
+
|
|
154
|
+
First fill `.lab/context/auto-mode.md` with the bounded contract, the per-stage commands, and the policy check commands for the campaign, then arm it for the current project:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
superlab auto start
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Inspect the live auto-mode state:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
superlab auto status
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Stop the current auto-mode run:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
superlab auto stop
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
`/lab:auto` is an orchestration mode layered on top of approved execution stages. It reuses `run`, `iterate`, `review`, `report`, and optional `write` inside the limits defined by `.lab/context/auto-mode.md` and `.lab/context/auto-status.md`. `superlab auto start` runs the configured stage commands in the foreground, polls for completion, enforces `success/stop/promotion` check commands, and guards the configured frozen core. It does not replace manual `idea`, `data`, `framing`, or `spec` decisions.
|
|
138
173
|
|
|
139
174
|
## Version
|
|
140
175
|
|
|
@@ -174,7 +209,10 @@ This installer also writes `.lab/config/workflow.json`, which is the global cont
|
|
|
174
209
|
- `workflow_language`
|
|
175
210
|
- `paper_language`
|
|
176
211
|
- `paper_format`
|
|
212
|
+
- `results_root`
|
|
213
|
+
- `figures_root`
|
|
177
214
|
- `deliverables_root`
|
|
215
|
+
- `paper_template_root`
|
|
178
216
|
|
|
179
217
|
Stages should follow that file rather than guess language locally.
|
|
180
218
|
|
|
@@ -189,9 +227,12 @@ Stages should follow that file rather than guess language locally.
|
|
|
189
227
|
## Command Set
|
|
190
228
|
|
|
191
229
|
- `/lab:idea` researches an idea, critiques it, and writes the initial research framing.
|
|
230
|
+
- `/lab:data` turns the approved idea into a dataset and benchmark package with years, paper usage, source audit, download plans, explicit benchmark-role rationale for classic-public, recent-strong-public, and claim-specific benchmarks, and explicit comparison rationale for canonical baselines, strong historical baselines, recent strong public methods, and closest prior work.
|
|
192
231
|
- `/lab:framing` locks paper-facing method names, module names, titles, and contribution wording before drafting.
|
|
232
|
+
- `/lab:auto` orchestrates approved `run`, `iterate`, `review`, `report`, and optional `write` stages inside a bounded contract and can promote exploratory additions to the primary package when the promotion policy is satisfied.
|
|
193
233
|
- `/lab:spec` converts the approved idea into one `.lab/changes/<change-id>/` directory.
|
|
194
234
|
- `/lab:run` executes a small-scale validation run and establishes the evaluation pipeline.
|
|
235
|
+
- Durable run outputs should go under the configured `results_root`, not `.lab/changes/`.
|
|
195
236
|
- `/lab:iterate` runs bounded experiment loops with fixed mission, explicit thresholds, and per-round reports.
|
|
196
237
|
- `/lab:review` audits documents and results in reviewer mode.
|
|
197
238
|
- `/lab:report` produces the final report from accumulated artifacts.
|
|
@@ -208,6 +249,7 @@ See the source command docs in [commands/codex/lab.md](/Users/zhouhao119/coding/
|
|
|
208
249
|
- `skills/lab/` contains the shared workflow contract and reference guidance.
|
|
209
250
|
- `templates/` contains durable document templates.
|
|
210
251
|
- `scripts/` contains reproducibility helpers.
|
|
252
|
+
- `results/` and `figures/` are the natural roots for durable experiment outputs and plots.
|
|
211
253
|
- `tests/` contains minimal regression coverage for the helper scripts.
|
|
212
254
|
- `examples/` contains a minimal end-to-end usage example.
|
|
213
255
|
- `docs/` contains the design spec and release notes.
|
|
@@ -215,13 +257,14 @@ See the source command docs in [commands/codex/lab.md](/Users/zhouhao119/coding/
|
|
|
215
257
|
## Typical Flow
|
|
216
258
|
|
|
217
259
|
1. Run `/lab:idea` to produce the initial idea artifact.
|
|
218
|
-
2. Run `/lab:
|
|
219
|
-
3. Run `/lab:
|
|
220
|
-
4. Run `/lab:
|
|
221
|
-
5. Run `/lab:
|
|
222
|
-
6. Run `/lab:
|
|
223
|
-
7. Run `/lab:
|
|
224
|
-
8. Run `/lab:
|
|
260
|
+
2. Run `/lab:data` to lock the approved dataset package, source hierarchy, benchmark-class coverage, and the rationale for each comparison-method class.
|
|
261
|
+
3. Run `/lab:spec` to convert the idea into one self-contained lab change directory.
|
|
262
|
+
4. Run `/lab:run` to verify the experiment path and register the first run.
|
|
263
|
+
5. Run `/lab:iterate` to improve against fixed targets using bounded iterations.
|
|
264
|
+
6. Run `/lab:review` whenever you need reviewer-grade critique.
|
|
265
|
+
7. Run `/lab:report` to synthesize the final report.
|
|
266
|
+
8. Run `/lab:framing` to lock naming, title, and contribution wording.
|
|
267
|
+
9. Run `/lab:write` to draft paper sections from stable report evidence.
|
|
225
268
|
|
|
226
269
|
`/lab:write` writes final manuscript output under the configured `deliverables_root` (default: `docs/research`):
|
|
227
270
|
|
|
@@ -235,6 +278,14 @@ Internal writing-control artifacts stay under:
|
|
|
235
278
|
- `.lab/writing/plan.md`
|
|
236
279
|
- `.lab/writing/iterations/*.md`
|
|
237
280
|
|
|
281
|
+
If `paper_template_root` is configured, `/lab:write` should inspect that template directory first and align drafting to it. If no template is configured, it falls back to the managed default LaTeX scaffold.
|
|
282
|
+
|
|
283
|
+
`/lab` treats `.lab/` as the workflow-control layer only. Durable outputs should use natural project roots:
|
|
284
|
+
|
|
285
|
+
- `results_root` for logs, checkpoints, and metrics
|
|
286
|
+
- `figures_root` for plots and exported figures
|
|
287
|
+
- `deliverables_root` for reports and paper sources
|
|
288
|
+
|
|
238
289
|
## Helper Scripts
|
|
239
290
|
|
|
240
291
|
- `scripts/register_run.py` records run metadata in a JSON registry.
|
package/README.zh-CN.md
CHANGED
|
@@ -53,6 +53,8 @@ npx github:zhouhaoUCAS/superlab init
|
|
|
53
53
|
- `.lab/changes/`
|
|
54
54
|
- `.lab/.managed/templates/`
|
|
55
55
|
- `.lab/.managed/scripts/`
|
|
56
|
+
- `results/`
|
|
57
|
+
- `figures/`
|
|
56
58
|
|
|
57
59
|
如果你更喜欢非交互方式,也可以直接传参:
|
|
58
60
|
|
|
@@ -85,6 +87,14 @@ superlab update
|
|
|
85
87
|
superlab update --target /path/to/project
|
|
86
88
|
```
|
|
87
89
|
|
|
90
|
+
接入一个用户自己提供的 LaTeX 模板目录,但默认不改模板文件:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
superlab paper attach-template --target /path/to/project --path /path/to/template
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
这个命令只会把模板目录记录进项目配置。模板目录会被视为用户资产,里面可能已经有上游或你自己的修改,`superlab` 默认不会重写它。
|
|
97
|
+
|
|
88
98
|
刷新当前用户登记过的所有项目:
|
|
89
99
|
|
|
90
100
|
```bash
|
|
@@ -131,8 +141,33 @@ superlab doctor
|
|
|
131
141
|
|
|
132
142
|
- 必需的 `.lab` 文件是否存在
|
|
133
143
|
- `workflow.json` 结构是否合法
|
|
144
|
+
- `results_root` 和 `figures_root` 是否放在合理位置
|
|
134
145
|
- `deliverables_root` 是否放在合理位置
|
|
146
|
+
- `paper_template_root` 在配置时是否合法
|
|
135
147
|
- `<deliverables_root>/paper/` 下是否仍然满足 LaTeX-first 输出约束
|
|
148
|
+
- 是否把长期 run 输出错误地堆在 `.lab/changes/*/runs`
|
|
149
|
+
|
|
150
|
+
## 自动模式
|
|
151
|
+
|
|
152
|
+
先填写 `.lab/context/auto-mode.md`,明确本次自治执行的边界契约、各阶段命令,以及 success/stop/promotion 的检查命令,再启动当前项目的自动模式:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
superlab auto start
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
查看自动模式当前状态:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
superlab auto status
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
停止当前自动模式:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
superlab auto stop
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
`/lab:auto` 是叠加在现有执行阶段之上的编排模式。它会在 `.lab/context/auto-mode.md` 和 `.lab/context/auto-status.md` 的约束下,复用 `run`、`iterate`、`review`、`report`,以及可选的 `write`。`superlab auto start` 会在前台执行这些已配置阶段命令、轮询完成情况,并真正执行 success/stop/promotion 检查命令,同时保护已声明的 frozen core。它不会替代手动的 `idea`、`data`、`framing`、`spec` 决策。
|
|
136
171
|
|
|
137
172
|
## 版本查询
|
|
138
173
|
|
|
@@ -172,7 +207,10 @@ superlab init --lang en
|
|
|
172
207
|
- `workflow_language`
|
|
173
208
|
- `paper_language`
|
|
174
209
|
- `paper_format`
|
|
210
|
+
- `results_root`
|
|
211
|
+
- `figures_root`
|
|
175
212
|
- `deliverables_root`
|
|
213
|
+
- `paper_template_root`
|
|
176
214
|
|
|
177
215
|
后续 stage 应该按这个配置决定语言和论文格式,而不是各模板自己猜。
|
|
178
216
|
|
|
@@ -187,9 +225,12 @@ superlab init --lang en
|
|
|
187
225
|
## 命令集合
|
|
188
226
|
|
|
189
227
|
- `/lab:idea` 调研 idea、文献、数据集、指标和 baseline,并输出初始方案。
|
|
228
|
+
- `/lab:data` 把已批准的 idea 收敛成数据集与 benchmark 方案,要求记录年份、使用论文、来源审计、下载计划,并明确 classic-public、recent-strong-public、claim-specific 三类 benchmark 的纳入理由,以及 canonical baselines、strong historical baselines、recent strong public methods、closest prior work 四类对比方法的纳入理由。
|
|
190
229
|
- `/lab:framing` 在正式写作前收紧方法名、模块名、论文题目和 contribution wording。
|
|
230
|
+
- `/lab:auto` 在已批准边界内编排 `run`、`iterate`、`review`、`report` 和可选 `write`,并在升格策略满足时允许把 exploratory additions 自动升级为 primary package。
|
|
191
231
|
- `/lab:spec` 把批准后的方案转换成一个统一的 `.lab/changes/<change-id>/` 目录。
|
|
192
232
|
- `/lab:run` 执行最小可运行实验,并建立首版评估链路。
|
|
233
|
+
- 持久 run 输出应写到 `results_root`,不要写进 `.lab/changes/`。
|
|
193
234
|
- `/lab:iterate` 以固定 mission、固定阈值和最大轮次做有边界的实验迭代。
|
|
194
235
|
- `/lab:review` 以审稿人模式检查方法、对照、公平性、泄漏和统计问题。
|
|
195
236
|
- `/lab:report` 根据累积工件生成最终实验报告。
|
|
@@ -201,13 +242,14 @@ superlab init --lang en
|
|
|
201
242
|
|
|
202
243
|
1. 在目标项目执行 `superlab init`。
|
|
203
244
|
2. 在 Codex 或 Claude 中直接调用 `/lab:idea`。
|
|
204
|
-
3. 经确认后执行 `/lab:
|
|
205
|
-
4.
|
|
206
|
-
5. 用 `/lab:
|
|
207
|
-
6.
|
|
208
|
-
7.
|
|
209
|
-
8.
|
|
210
|
-
9. 用 `/lab:
|
|
245
|
+
3. 经确认后执行 `/lab:data`,锁定数据集、下载来源、benchmark 类别覆盖,以及各类对比方法的纳入理由。
|
|
246
|
+
4. 再执行 `/lab:spec`。
|
|
247
|
+
5. 用 `/lab:run` 打通最小实验链路。
|
|
248
|
+
6. 用 `/lab:iterate` 进行多轮迭代。
|
|
249
|
+
7. 在关键节点运行 `/lab:review`。
|
|
250
|
+
8. 最后用 `/lab:report` 产出总报告。
|
|
251
|
+
9. 用 `/lab:framing` 收紧题目、命名和 contribution wording。
|
|
252
|
+
10. 用 `/lab:write` 把稳定结果写成论文各 section。
|
|
211
253
|
|
|
212
254
|
`/lab:write` 会把最终可交付物写到 `deliverables_root` 指定的目录,默认是 `docs/research`:
|
|
213
255
|
|
|
@@ -221,6 +263,14 @@ superlab init --lang en
|
|
|
221
263
|
- `.lab/writing/plan.md`
|
|
222
264
|
- `.lab/writing/iterations/*.md`
|
|
223
265
|
|
|
266
|
+
如果配置了 `paper_template_root`,`/lab:write` 应先检查该模板目录并按其结构写作;如果没有配置模板,就回退到内置的默认 LaTeX scaffold。
|
|
267
|
+
|
|
268
|
+
`/lab` 把 `.lab/` 视为工作流控制层,不是正式结果目录。持久输出应按自然根目录放置:
|
|
269
|
+
|
|
270
|
+
- `results_root`:日志、checkpoint、metrics
|
|
271
|
+
- `figures_root`:图表和导出图片
|
|
272
|
+
- `deliverables_root`:报告和论文源码
|
|
273
|
+
|
|
224
274
|
## 仓库内容
|
|
225
275
|
|
|
226
276
|
- `commands/` 是源码仓库里的说明文件。
|
|
@@ -228,6 +278,7 @@ superlab init --lang en
|
|
|
228
278
|
- `skills/lab/` 是仓库开发时使用的共享 workflow 定义。
|
|
229
279
|
- `templates/` 是研究工件模板。
|
|
230
280
|
- `scripts/` 是运行登记、评估汇总和结果校验脚本。
|
|
281
|
+
- `results/` 和 `figures/` 是默认的自然结果目录。
|
|
231
282
|
- `tests/` 是脚本与安装器测试。
|
|
232
283
|
- `examples/` 是最小端到端示例。
|
|
233
284
|
- `docs/` 存放设计文档和发布说明。
|