pipeline-router
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePipeline Router
Pipeline Router
“Routing” usually means two different things:
- Pipeline selection + lock: choose a single pipeline and write .
PIPELINE.lock.md - Checkpoint routing: keep the run auditable by drafting/updating checkpoint blocks in (and, for
DECISIONS.md, seedingC0fromqueries.md).GOAL.md
This skill supports both, but keeps the semantic choice LLM-first and the repetitive checkpoint scaffolding scriptable.
“路由”通常有两种含义:
- Pipeline选择与锁定:选择单个pipeline并写入。
PIPELINE.lock.md - 检查点路由:通过在中起草/更新检查点块(对于
DECISIONS.md,从C0生成GOAL.md),确保运行过程可审计。queries.md
该技能同时支持这两种功能,但优先由LLM进行语义选择,而重复性的检查点框架则可通过脚本实现。
Inputs
输入项
Workspace context (when available):
GOAL.mdSTATUS.mdDECISIONS.mdPIPELINE.lock.md
Optional template:
assets/pipeline-selection-form.md
工作区上下文(若有):
GOAL.mdSTATUS.mdDECISIONS.mdPIPELINE.lock.md
可选模板:
assets/pipeline-selection-form.md
Outputs
输出项
- (Mode A; selection + lock)
PIPELINE.lock.md - Updates to (all modes; checkpoint blocks + approvals checklist)
DECISIONS.md - (best-effort for
queries.md; seeded fromC0)GOAL.md - Optional: updates to
STATUS.md
- (模式A:选择与锁定)
PIPELINE.lock.md - 更新(所有模式:检查点块+审批清单)
DECISIONS.md - (针对
queries.md尽力生成;从C0生成初始内容)GOAL.md - 可选:更新
STATUS.md
Decision tree (selection)
选择决策树
User goal → choose:
- “survey / 综述 / 调研” →
pipelines/arxiv-survey.pipeline.md - “survey + PDF / LaTeX / 可编译” →
pipelines/arxiv-survey-latex.pipeline.md - “tutorial / 教程” →
pipelines/tutorial.pipeline.md - “systematic review / PRISMA / 系统综述” →
pipelines/systematic-review.pipeline.md - “peer review / 审稿” →
pipelines/peer-review.pipeline.md - “snapshot / 速览” →
pipelines/lit-snapshot.pipeline.md
根据用户目标选择:
- “survey/综述/调研” →
pipelines/arxiv-survey.pipeline.md - “survey + PDF/LaTeX/可编译” →
pipelines/arxiv-survey-latex.pipeline.md - “tutorial/教程” →
pipelines/tutorial.pipeline.md - “systematic review/PRISMA/系统综述” →
pipelines/systematic-review.pipeline.md - “peer review/审稿” →
pipelines/peer-review.pipeline.md - “snapshot/速览” →
pipelines/lit-snapshot.pipeline.md
Workflow
工作流
Mode A — selection + lock (LLM-first)
模式A — 选择与锁定(LLM优先)
- Read the goal from (or the user message).
GOAL.md - If key details are missing, use to draft a concise question list into
assets/pipeline-selection-form.mdand stop.DECISIONS.md - Select exactly one pipeline under .
pipelines/*.pipeline.md - Write with:
PIPELINE.lock.mdpipeline: <path>units_template: <path from pipeline front matter>locked_at: <YYYY-MM-DD>
- Update (“Current pipeline” + checkpoint).
STATUS.md
- 从(或用户消息)中读取目标。
GOAL.md - 若关键信息缺失,使用在
assets/pipeline-selection-form.md中起草简洁的问题列表,然后暂停。DECISIONS.md - 在中选择恰好一个pipeline。
pipelines/*.pipeline.md - 写入,内容包括:
PIPELINE.lock.mdpipeline: <路径>units_template: <pipeline前置内容中的路径>locked_at: <YYYY-MM-DD>
- 更新(“当前流水线” + 检查点)。
STATUS.md
Mode B — checkpoint blocks (script helper)
模式B — 检查点块(脚本辅助)
Use the helper to keep in sync with checkpoints:
DECISIONS.md- Kickoff questions + seed queries (C0):
python .codex/skills/pipeline-router/scripts/run.py --workspace <ws> --checkpoint C0
- Scope/outline approval summary (C2):
python .codex/skills/pipeline-router/scripts/run.py --workspace <ws> --checkpoint C2
- Other checkpoints:
python .codex/skills/pipeline-router/scripts/run.py --workspace <ws> --checkpoint C1
使用辅助工具保持与检查点同步:
DECISIONS.md- 启动问题+初始查询(C0):
python .codex/skills/pipeline-router/scripts/run.py --workspace <ws> --checkpoint C0
- 范围/大纲审批汇总(C2):
python .codex/skills/pipeline-router/scripts/run.py --workspace <ws> --checkpoint C2
- 其他检查点:
python .codex/skills/pipeline-router/scripts/run.py --workspace <ws> --checkpoint C1
Quality checklist
质量检查清单
- has a checkpoint block for the active
DECISIONS.md.C* - Approvals checklist exists and includes checkboxes.
Approve C* - If selection was needed, points to exactly one pipeline file.
PIPELINE.lock.md - If the run is retrieval-based, is non-empty after
queries.mdseeding.C0
- 包含针对当前
DECISIONS.md的检查点块。C* - 存在审批清单,且包含复选框。
Approve C* - 若需要选择流水线,指向恰好一个pipeline文件。
PIPELINE.lock.md - 若运行基于检索,生成初始内容后
C0不为空。queries.md
Side effects
副作用
- Allowed: create/update ; edit
PIPELINE.lock.md; append/updateSTATUS.md; seedDECISIONS.md.queries.md - Not allowed: modify files under assets/templates.
.codex/skills/
- 允许操作:创建/更新;编辑
PIPELINE.lock.md;追加/更新STATUS.md;生成DECISIONS.md初始内容。queries.md - 禁止操作:修改下的资产/模板文件。
.codex/skills/
Script
脚本
Quick Start
快速开始
python .codex/skills/pipeline-router/scripts/run.py --helppython .codex/skills/pipeline-router/scripts/run.py --workspace <workspace_dir> --checkpoint C0
python .codex/skills/pipeline-router/scripts/run.py --helppython .codex/skills/pipeline-router/scripts/run.py --workspace <workspace_dir> --checkpoint C0
All Options
所有选项
- : which checkpoint block to draft/update (unknown checkpoints get a generic template)
--checkpoint <C0|C1|C2|...>
- :要起草/更新的检查点块(未知检查点将使用通用模板)
--checkpoint <C0|C1|C2|...>
Examples
示例
- Kickoff questions + seed queries:
python .codex/skills/pipeline-router/scripts/run.py --workspace <ws> --checkpoint C0
- Generic protocol approval block (systematic review C1):
python .codex/skills/pipeline-router/scripts/run.py --workspace <ws> --checkpoint C1
- Scope/outline approval summary:
python .codex/skills/pipeline-router/scripts/run.py --workspace <ws> --checkpoint C2
- 启动问题+初始查询:
python .codex/skills/pipeline-router/scripts/run.py --workspace <ws> --checkpoint C0
- 通用协议审批块(系统综述C1):
python .codex/skills/pipeline-router/scripts/run.py --workspace <ws> --checkpoint C1
- 范围/大纲审批汇总:
python .codex/skills/pipeline-router/scripts/run.py --workspace <ws> --checkpoint C2
Notes
注意事项
- writes
python scripts/pipeline.py kickoff|initand then (best-effort) runs this script forPIPELINE.lock.md.C0 - The script reads (if present) to display the pipeline in the kickoff block; it does not choose the pipeline.
PIPELINE.lock.md
- 会写入
python scripts/pipeline.py kickoff|init,然后(尽力)针对PIPELINE.lock.md运行此脚本。C0 - 该脚本会读取(若存在)以在启动块中显示流水线,但不会选择流水线。
PIPELINE.lock.md
Troubleshooting
故障排除
Issue: PIPELINE.lock.md
points to one pipeline but UNITS.csv
looks like another
PIPELINE.lock.mdUNITS.csv问题:PIPELINE.lock.md
指向一个pipeline,但UNITS.csv
看起来对应另一个
PIPELINE.lock.mdUNITS.csvCause:
- Workspace was initialized from one pipeline and later re-pointed without updating .
UNITS.csv
Fix:
- Re-run , or copy the correct
python scripts/pipeline.py init --workspace <ws> --pipeline <name> --overwrite-unitsintotemplates/UNITS.*.csv.UNITS.csv
原因:
- 工作区从一个pipeline初始化,之后重新指向了其他pipeline但未更新。
UNITS.csv
解决方法:
- 重新运行,或者将正确的
python scripts/pipeline.py init --workspace <ws> --pipeline <name> --overwrite-units复制到templates/UNITS.*.csv中。UNITS.csv