pipeline-router

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Pipeline 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
    DECISIONS.md
    (and, for
    C0
    , seeding
    queries.md
    from
    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.md
  • STATUS.md
  • DECISIONS.md
  • PIPELINE.lock.md
Optional template:
  • assets/pipeline-selection-form.md
工作区上下文(若有):
  • GOAL.md
  • STATUS.md
  • DECISIONS.md
  • PIPELINE.lock.md
可选模板:
  • assets/pipeline-selection-form.md

Outputs

输出项

  • PIPELINE.lock.md
    (Mode A; selection + lock)
  • Updates to
    DECISIONS.md
    (all modes; checkpoint blocks + approvals checklist)
  • queries.md
    (best-effort for
    C0
    ; seeded from
    GOAL.md
    )
  • Optional: updates to
    STATUS.md
  • PIPELINE.lock.md
    (模式A:选择与锁定)
  • 更新
    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优先)

  1. Read the goal from
    GOAL.md
    (or the user message).
  2. If key details are missing, use
    assets/pipeline-selection-form.md
    to draft a concise question list into
    DECISIONS.md
    and stop.
  3. Select exactly one pipeline under
    pipelines/*.pipeline.md
    .
  4. Write
    PIPELINE.lock.md
    with:
    • pipeline: <path>
    • units_template: <path from pipeline front matter>
    • locked_at: <YYYY-MM-DD>
  5. Update
    STATUS.md
    (“Current pipeline” + checkpoint).
  1. GOAL.md
    (或用户消息)中读取目标。
  2. 若关键信息缺失,使用
    assets/pipeline-selection-form.md
    DECISIONS.md
    中起草简洁的问题列表,然后暂停。
  3. pipelines/*.pipeline.md
    中选择恰好一个pipeline。
  4. 写入
    PIPELINE.lock.md
    ,内容包括:
    • pipeline: <路径>
    • units_template: <pipeline前置内容中的路径>
    • locked_at: <YYYY-MM-DD>
  5. 更新
    STATUS.md
    (“当前流水线” + 检查点)。

Mode B — checkpoint blocks (script helper)

模式B — 检查点块(脚本辅助)

Use the helper to keep
DECISIONS.md
in sync with checkpoints:
  • 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

质量检查清单

  • DECISIONS.md
    has a checkpoint block for the active
    C*
    .
  • Approvals checklist exists and includes
    Approve C*
    checkboxes.
  • If selection was needed,
    PIPELINE.lock.md
    points to exactly one pipeline file.
  • If the run is retrieval-based,
    queries.md
    is non-empty after
    C0
    seeding.
  • DECISIONS.md
    包含针对当前
    C*
    的检查点块。
  • 存在审批清单,且包含
    Approve C*
    复选框。
  • 若需要选择流水线,
    PIPELINE.lock.md
    指向恰好一个pipeline文件。
  • 若运行基于检索,
    C0
    生成初始内容后
    queries.md
    不为空。

Side effects

副作用

  • Allowed: create/update
    PIPELINE.lock.md
    ; edit
    STATUS.md
    ; append/update
    DECISIONS.md
    ; seed
    queries.md
    .
  • Not allowed: modify files under
    .codex/skills/
    assets/templates.
  • 允许操作:创建/更新
    PIPELINE.lock.md
    ;编辑
    STATUS.md
    ;追加/更新
    DECISIONS.md
    ;生成
    queries.md
    初始内容。
  • 禁止操作:修改
    .codex/skills/
    下的资产/模板文件。

Script

脚本

Quick Start

快速开始

  • python .codex/skills/pipeline-router/scripts/run.py --help
  • python .codex/skills/pipeline-router/scripts/run.py --workspace <workspace_dir> --checkpoint C0
  • python .codex/skills/pipeline-router/scripts/run.py --help
  • python .codex/skills/pipeline-router/scripts/run.py --workspace <workspace_dir> --checkpoint C0

All Options

所有选项

  • --checkpoint <C0|C1|C2|...>
    : which checkpoint block to draft/update (unknown checkpoints get a generic template)
  • --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

注意事项

  • python scripts/pipeline.py kickoff|init
    writes
    PIPELINE.lock.md
    and then (best-effort) runs this script for
    C0
    .
  • The script reads
    PIPELINE.lock.md
    (if present) to display the pipeline in the kickoff block; it does not choose the pipeline.
  • 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.md
指向一个pipeline,但
UNITS.csv
看起来对应另一个

Cause:
  • Workspace was initialized from one pipeline and later re-pointed without updating
    UNITS.csv
    .
Fix:
  • Re-run
    python scripts/pipeline.py init --workspace <ws> --pipeline <name> --overwrite-units
    , or copy the correct
    templates/UNITS.*.csv
    into
    UNITS.csv
    .
原因
  • 工作区从一个pipeline初始化,之后重新指向了其他pipeline但未更新
    UNITS.csv
解决方法
  • 重新运行
    python scripts/pipeline.py init --workspace <ws> --pipeline <name> --overwrite-units
    ,或者将正确的
    templates/UNITS.*.csv
    复制到
    UNITS.csv
    中。