research-pipeline-runner

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Research Pipeline Runner

研究管道运行器

Goal: let a user trigger a full pipeline with one natural-language request, while keeping the run auditable (Units + artifacts + checkpoints).
This skill is coordination:
  • semantic work is done by the relevant skills’
    SKILL.md
  • scripts are deterministic helpers (scaffold/validate/compile), not the author
目标:让用户通过一个自然语言请求触发完整管道,同时保持运行过程可审计(包含Units、工件与检查点)。
本Skill的核心是协调调度
  • 语义层面的工作由对应Skill的
    SKILL.md
    完成
  • 脚本是确定性的辅助工具(用于搭建/验证/编译),而非内容生成主体

Inputs

输入

  • User goal (one sentence is enough), e.g.:
    • “给我写一个 agent 的 latex-survey”
  • Optional:
    • explicit pipeline path (e.g.,
      pipelines/arxiv-survey-latex.pipeline.md
      )
    • constraints (time window, language: EN/中文, evidence_mode: abstract/fulltext)
  • 用户目标(一句话即可),例如:
    • “给我写一个关于agent的latex-survey”
  • 可选参数:
    • 明确的管道路径(如
      pipelines/arxiv-survey-latex.pipeline.md
    • 约束条件(时间范围、语言:EN/中文、证据模式:摘要/全文)

Outputs

输出

  • A workspace under
    workspaces/<name>/
    containing:
    • STATUS.md
      ,
      GOAL.md
      ,
      PIPELINE.lock.md
      ,
      UNITS.csv
      ,
      CHECKPOINTS.md
      ,
      DECISIONS.md
    • pipeline-specific artifacts (papers/outline/sections/output/latex)
  • workspaces/<name>/
    目录下的工作区,包含:
    • STATUS.md
      GOAL.md
      PIPELINE.lock.md
      UNITS.csv
      CHECKPOINTS.md
      DECISIONS.md
    • 管道专属工件(论文/大纲/章节/输出内容/latex文件)

Non-negotiables

不可违背规则

  • Use
    UNITS.csv
    as the execution contract; one unit at a time.
  • Respect checkpoints (
    CHECKPOINTS.md
    ): no long prose until required approvals are recorded in
    DECISIONS.md
    (survey default:
    C2
    ).
  • Stop at HUMAN checkpoints and wait for explicit sign-off.
  • Never create workspace artifacts in the repo root; always use
    workspaces/<name>/
    .
  • UNITS.csv
    作为执行契约;每次仅执行一个单元。
  • 严格遵循检查点(
    CHECKPOINTS.md
    ):未获得明确批准(记录在
    DECISIONS.md
    中)不得撰写长篇文稿
    (默认调研管道的检查点为
    C2
    )。
  • 遇到HUMAN检查点时暂停,等待明确的批准指令。
  • 禁止在仓库根目录创建工作区工件;必须使用
    workspaces/<name>/
    目录。

Decision tree: pick a pipeline

决策树:选择管道

User goal → choose:
  • Survey/综述/调研 + Markdown draft →
    pipelines/arxiv-survey.pipeline.md
  • Survey/综述/调研 + PDF output →
    pipelines/arxiv-survey-latex.pipeline.md
  • Snapshot/速览 →
    pipelines/lit-snapshot.pipeline.md
  • Tutorial/教程 →
    pipelines/tutorial.pipeline.md
  • Systematic review/系统综述 →
    pipelines/systematic-review.pipeline.md
  • Peer review/审稿 →
    pipelines/peer-review.pipeline.md
根据用户目标选择对应管道:
  • 调研/综述/调研 + Markdown草稿 →
    pipelines/arxiv-survey.pipeline.md
  • 调研/综述/调研 + PDF输出 →
    pipelines/arxiv-survey-latex.pipeline.md
  • 速览 →
    pipelines/lit-snapshot.pipeline.md
  • 教程 →
    pipelines/tutorial.pipeline.md
  • 系统综述 →
    pipelines/systematic-review.pipeline.md
  • 审稿 →
    pipelines/peer-review.pipeline.md

Recommended run loop (skills-first)

推荐运行循环(优先使用Skill)

  1. Initialize workspace (C0):
  • create
    workspaces/<name>/
  • write
    GOAL.md
    , lock pipeline (
    PIPELINE.lock.md
    ), seed
    queries.md
  1. Execute units sequentially:
  • follow each unit’s
    SKILL.md
    to produce the declared outputs
  • only mark
    DONE
    when acceptance criteria are satisfied and outputs exist
  1. Stop at HUMAN checkpoints:
  • default survey checkpoint is
    C2
    (scope + outline)
  • write a concise approval request in
    DECISIONS.md
    and wait
  1. Writing-stage self-loop (when drafts look thin/template-y):
  • prefer local fixes over rewriting everything:
    • writer-context-pack
      (C4→C5 bridge) makes packs debuggable
    • subsection-writer
      writes per-file units
    • writer-selfloop
      fixes only failing
      sections/*.md
    • draft-polisher
      removes generator voice without changing citation keys
  1. 初始化工作区(C0):
  • 创建
    workspaces/<name>/
    目录
  • 写入
    GOAL.md
    、锁定管道(
    PIPELINE.lock.md
    )、生成初始
    queries.md
  1. 依次执行单元:
  • 遵循每个单元的
    SKILL.md
    生成指定输出
  • 仅当满足验收标准且输出存在时,标记为
    DONE
  1. 遇到HUMAN检查点时暂停:
  • 默认调研管道的检查点为
    C2
    (范围+大纲)
  • DECISIONS.md
    中写入简洁的批准请求并等待
  1. 撰写阶段自循环(当草稿内容单薄/模板化时):
  • 优先局部修复而非重写全部内容:
    • writer-context-pack
      (C4→C5的桥梁)使上下文包可调试
    • subsection-writer
      按文件单元撰写内容
    • writer-selfloop
      仅修复有问题的
      sections/*.md
      文件
    • draft-polisher
      移除生成式语气,同时保留引用标识

Strict-mode behavior (by design)

严格模式行为(设计如此)

In
--strict
runs, several semantic C3/C4 artifacts are treated as scaffolds until explicitly marked refined. This is intentional: it prevents bootstrap JSONL from silently passing into C5 writing (a major source of hollow/templated prose).
Create these markers only after you have manually refined/spot-checked the artifacts:
  • outline/subsection_briefs.refined.ok
  • outline/chapter_briefs.refined.ok
  • outline/evidence_bindings.refined.ok
  • outline/evidence_drafts.refined.ok
  • outline/anchor_sheet.refined.ok
  • outline/writer_context_packs.refined.ok
The runner may BLOCK even if the JSONL exists; add the marker after refinement, then rerun/resume the unit.
  1. Finish:
  • merge → audit → (optional) LaTeX scaffold/compile
--strict
运行模式下,多个语义层面的C3/C4工件会被视为脚手架,直到被明确标记为已优化。 这是有意设计的:防止引导式JSONL文件无声进入C5撰写阶段(这是导致内容空洞/模板化的主要原因)。
仅在手动优化/抽查工件后,创建以下标记文件:
  • outline/subsection_briefs.refined.ok
  • outline/chapter_briefs.refined.ok
  • outline/evidence_bindings.refined.ok
  • outline/evidence_drafts.refined.ok
  • outline/anchor_sheet.refined.ok
  • outline/writer_context_packs.refined.ok
即使JSONL文件存在,运行器也可能会阻塞;优化完成后添加标记文件,然后重新运行/恢复单元。
  1. 完成阶段:
  • 合并 → 审计 → (可选)LaTeX脚手架搭建/编译

Optional CLI helpers (debug only)

可选CLI辅助工具(仅用于调试)

  • Kickoff + run (optional; convenient, not required):
    python scripts/pipeline.py kickoff --topic "<topic>" --pipeline <pipeline-name> --run --strict
  • Resume:
    python scripts/pipeline.py run --workspace <ws> --strict
  • Approve checkpoint:
    python scripts/pipeline.py approve --workspace <ws> --checkpoint C2
  • Mark refined unit:
    python scripts/pipeline.py mark --workspace <ws> --unit-id <U###> --status DONE --note "LLM refined"
  • 启动+运行(可选;便捷操作,非必须):
    python scripts/pipeline.py kickoff --topic "<topic>" --pipeline <pipeline-name> --run --strict
  • 恢复运行:
    python scripts/pipeline.py run --workspace <ws> --strict
  • 批准检查点:
    python scripts/pipeline.py approve --workspace <ws> --checkpoint C2
  • 标记已优化单元:
    python scripts/pipeline.py mark --workspace <ws> --unit-id <U###> --status DONE --note "LLM refined"

Handling common blocks

常见阻塞问题处理

  • HUMAN approval required: summarize produced artifacts, ask for approval, then record it and resume.
  • Quality gate blocked (
    output/QUALITY_GATE.md
    exists): treat current outputs as scaffolding; refine per the unit’s
    SKILL.md
    ; mark
    DONE
    ; resume.
  • No network: use offline imports (
    papers/imports/
    or
    arxiv-search --input
    ).
  • Weak coverage: broaden queries or reduce/merge subsections (
    outline-budgeter
    ) before writing.
  • 需要HUMAN批准:总结已生成的工件,请求批准,记录批准信息后恢复运行。
  • 质量门阻塞(存在
    output/QUALITY_GATE.md
    ):将当前输出视为脚手架;根据对应单元的
    SKILL.md
    进行优化;标记为
    DONE
    后恢复运行。
  • 无网络:使用离线导入(
    papers/imports/
    arxiv-search --input
    )。
  • 覆盖范围不足:在撰写前扩大查询范围或合并/缩减小节(使用
    outline-budgeter
    )。

Quality checklist

质量检查清单

  • UNITS.csv
    statuses reflect actual outputs (no
    DONE
    without outputs).
  • No prose is written unless
    DECISIONS.md
    explicitly approves it.
  • The run stops at HUMAN checkpoints with clear next questions.
  • In strict mode, scaffold/stub outputs do not get marked
    DONE
    without refinement.
  • UNITS.csv
    中的状态与实际输出一致(无输出不得标记为
    DONE
    )。
  • 仅当
    DECISIONS.md
    中明确批准后,才可撰写文稿。
  • 遇到HUMAN检查点时暂停,并明确提示下一步操作。
  • 严格模式下,脚手架/占位输出未经过优化不得标记为
    DONE