superlab 0.1.62 → 0.1.64
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/auto_state.cjs +3 -0
- package/lib/i18n.cjs +10 -4
- package/lib/install.cjs +1 -1
- package/lib/lab_write_contract.json +1 -1
- package/lib/paper_topology.cjs +91 -0
- package/lib/rule_preflight.cjs +49 -1
- package/package-assets/codex/prompts/lab/write.md +1 -1
- package/package-assets/codex/prompts/lab-write.md +1 -1
- package/package-assets/codex/prompts/lab:write.md +1 -1
- package/package-assets/codex/prompts/lab/357/274/232write.md +1 -1
- package/package-assets/shared/lab/.managed/scripts/paper_topology.py +91 -0
- package/package-assets/shared/lab/.managed/scripts/render_rule_preflight.py +115 -0
- package/package-assets/shared/lab/.managed/scripts/validate_manuscript_delivery.py +2 -0
- package/package-assets/shared/lab/.managed/scripts/validate_paper_topology.py +83 -0
- package/package-assets/shared/lab/.managed/scripts/validate_rule_preflight.py +183 -0
- package/package-assets/shared/lab/.managed/scripts/validate_section_draft.py +85 -32
- package/package-assets/shared/lab/.managed/templates/iteration-report.md +1 -0
- package/package-assets/shared/lab/.managed/templates/write-iteration.md +8 -0
- package/package-assets/shared/lab/context/auto-status.md +1 -0
- package/package-assets/shared/skills/lab/SKILL.md +5 -0
- package/package-assets/shared/skills/lab/stages/auto.md +1 -1
- package/package-assets/shared/skills/lab/stages/write.md +8 -2
- package/package.json +1 -1
|
@@ -33,9 +33,10 @@
|
|
|
33
33
|
## Rule Preflight
|
|
34
34
|
|
|
35
35
|
- Read `.lab/.managed/rule-manifest.json` before drafting.
|
|
36
|
-
-
|
|
37
|
-
- The `Rule Preflight` block must record the installed rule source file, rule source revision, project version, resolved stage, resolved mode, resolved target, and any override reason.
|
|
36
|
+
- Write the `Rule Preflight` block with `.lab/.managed/scripts/render_rule_preflight.py` before revising prose; do not hand-fill it from memory.
|
|
37
|
+
- The `Rule Preflight` block must record the installed rule source file, rule source revision, project version, resolved stage, resolved mode, resolved target, a machine-generated preflight stamp, and any override reason.
|
|
38
38
|
- If the installed write rule and the current round behavior disagree, fix the targeting or record a valid override reason before further editing.
|
|
39
|
+
- In draft mode, rule-preflight mismatches and paper-topology mismatches are blockers, not polish warnings.
|
|
39
40
|
|
|
40
41
|
## Context Write Set
|
|
41
42
|
|
|
@@ -75,8 +76,11 @@ Run these on every round:
|
|
|
75
76
|
- Ordinary manuscript drafting rounds should follow `workflow_language`.
|
|
76
77
|
- During ordinary rounds, ordinary `.tex` section drafts must stay in `workflow_language`; do not treat `paper_language` as the default draft language.
|
|
77
78
|
- When `workflow_language` and `paper_language` differ, treat the workflow-language paper layer as active and use it as the default ordinary working layer.
|
|
79
|
+
- Resolve the active paper topology from `.lab/config/workflow.json` before drafting: the active canonical layer is `<deliverables_root>/paper/`, and when `workflow_language` differs from `paper_language` the active workflow-language layer is `<deliverables_root>/paper/workflow-language/`.
|
|
78
80
|
- Ordinary write rounds should still edit one target paper layer at a time, not both language layers at once.
|
|
79
81
|
- If the user names a concrete file or layer, treat that as the only target for the round unless they also explicitly request synchronization.
|
|
82
|
+
- Classify the named target path before editing it. Active-layer targets (`active-canonical` / `active-workflow-language`) remain managed manuscript rounds; deprecated or legacy paper-layer targets are only acceptable as out-of-band file edits and must not silently replace the active paper topology.
|
|
83
|
+
- Do not treat old layer names such as `review_zh`, `translation_zh`, `sections_zh`, or stale `deliverables/.../workflow-language/*.md` paths as active manuscript roots, even if older project files still reference them.
|
|
80
84
|
- 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 instead of silently treating canonical as the default working layer.
|
|
81
85
|
- 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.
|
|
82
86
|
- 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.
|
|
@@ -153,6 +157,7 @@ Run these on every round:
|
|
|
153
157
|
- record what each figure or analysis asset should show and why the reader needs it
|
|
154
158
|
- record which citation anchors must appear in the section and why each anchor matters
|
|
155
159
|
- Before drafting `introduction`, `method`, `experiments`, `related work`, or `conclusion`, run `.lab/.managed/scripts/validate_paper_plan.py --paper-plan .lab/writing/plan.md`.
|
|
160
|
+
- Before drafting `introduction`, `method`, `experiments`, `related work`, or `conclusion`, also run `.lab/.managed/scripts/validate_paper_topology.py --project-root .` so plan/context files cannot keep presenting legacy layers as the active paper topology. If that validator fails, do not mark the topology as repaired and do not continue section polish.
|
|
156
161
|
- When the repository workflow config is available, the paper-plan validator also checks that `.lab/writing/plan.md` stays in `workflow_language` instead of silently drifting into another language.
|
|
157
162
|
- If the paper-plan validator fails, stop and fill `.lab/writing/plan.md` first instead of drafting prose.
|
|
158
163
|
- During ordinary draft rounds, run `.lab/.managed/scripts/validate_section_draft.py --section <section> --section-file <section-file> --mode draft` and `.lab/.managed/scripts/validate_paper_claims.py --section-file <section-file> --mode draft` after revising the active section.
|
|
@@ -198,6 +203,7 @@ Run these on every round:
|
|
|
198
203
|
- Record the round target layer in the write-iteration artifact as `canonical manuscript`, `workflow-language paper layer`, or `both`.
|
|
199
204
|
- If workflow-language was active and the round still targeted the canonical manuscript, record why canonical-only writing was acceptable in the write-iteration artifact.
|
|
200
205
|
- If both layers were edited, record why the cross-language sync was required and whether it was explicitly requested by the user or required by final-draft/export finalization.
|
|
206
|
+
- Record the active canonical paper root, the active workflow-language paper root when present, the resolved target path role, and any out-of-band reason in the write-iteration artifact before accepting the round.
|
|
201
207
|
- Record the protocol/scope impact audit in the write-iteration artifact whenever a round replaces or rewrites a canonical experiment/evaluation protocol.
|
|
202
208
|
- If the round is an export or remote-publication round, record the export target, whether the workflow-language paper layer was included in the exported or pushed bundle, and why any canonical-only export was acceptable.
|
|
203
209
|
- When `workflow_language` and `paper_language` differ, record the final manuscript language choice in the write-iteration artifact with the workflow language, paper language, finalization decision, and why that decision was chosen.
|