argument-selfloop
🎯Skillfrom willoscar/research-units-pipeline-skills
Checks and repairs self-referential or circular arguments within a research document to ensure logical consistency and prevent circular reasoning.
Installation
npx skills add https://github.com/willoscar/research-units-pipeline-skills --skill argument-selfloopSkill Details
Overview
# research-units-pipeline-skills
> 一句话:让 Pipeline 会"带人 / 带模型"做研究——不是给一堆脚本,而是给一套语义化的 skills,每个 skill 知道"该做什么、怎么做、做到什么程度、不能做什么"。
---
WIP
- 在 Appendix 增加了表格
- 持续打磨写作技巧,提升写作上下限(已经尝试了增加 role playing 的 soft 约束)
Todo
- 加入多 cli 协作,multi-agent design (在合适的环节接入 API,替代或者分担 codex 执行过程中的压力)
- 完善剩余的Pipeline,example 新增例子
- 精简Pipeline中冗余的中间内容,遵循优雅的奥卡姆剃刀原则,如无必要,勿增实体。
核心设计:Skills-First + 拆解链路 + 证据先行
传统问题:研究流水线要么是黑盒脚本(不知道怎么改),要么是松散文档(执行时靠人肉判断)。
本设计的解法:
- Skills 语义化:每个 skill 不是函数,而是带引导的执行单元——
- inputs / outputs:明确依赖和产物
- acceptance:验收标准(如"每小节映射 >=8 篇论文")
- notes:怎么做、边界条件、常见错误
- guardrail:不能做什么(如 C2-C4 阶段 NO PROSE)
- 拆解链路:6 个 checkpoint(C0→C5),约 40+ 个原子 units(不同 pipeline 略有差异;LaTeX 版本会多几个),依赖关系显式写在
UNITS.csv - 证据先行:C2-C4 强制先建证据底座(taxonomy → mapping → evidence packs),C5 才写作
设计目标:
- 可复用:同一个 skill(如
subsection-writer)可被多个 pipeline 复用,换个 pipeline 不用重写逻辑 - 可引导:新手/模型按 skill 的
acceptance+notes执行,不需要"猜"该做到什么程度 - 可约束:
guardrail防止执行者(尤其是模型)越界(如在 C3 阶段偷偷写正文) - 可定位:失败时报告指向具体 skill + 中间产物,修复后从失败点继续
---
为什么这样设计?
| 特性 | 传统做法 | 本设计 |
|------|----------|--------|
| 可见 | 黑盒脚本 | 每个 unit 产出中间文件(papers/、outline/、citations/、sections/) |
| 可审计 | 日志散落 | UNITS.csv 记录执行历史与验收标准,DECISIONS.md 记录人类检查点 |
| 可自循环 | 失败全部重跑 | 质量门 FAIL → 报告告诉你改哪个中间产物 → 修复后从失败 unit 继续 |
| 可复用 | 每个项目重写 | skills 模块化,跨 pipeline 复用(如 taxonomy-builder、evidence-binder) |
| 可引导 | 靠人肉判断 | 每个 skill 带 acceptance + notes,执行者知道"做到什么程度" |
English version: [README.en.md](README.en.md).
codex 参考配置
```toml
[sandbox_workspace_write]
network_access = true
[features]
unified_exec = true
shell_snapshot = true
steer = true
```
一句话启用(推荐:对话里跑 Pipeline)
启动 codex
> codex --sandbox workspace-write --ask-for-approval never
把下面这句话丢给 Codex(或 Claude Code)即可:
> 给我写一个 agent 的 latex-survey
这句话会触发 repo 内的 skills 自动路由并执行 pipeline(按 UNITS.csv 合同落盘中间产物)。
(可选:指定 pipeline 文件:pipelines/arxiv-survey-latex.pipeline.md(或 research-units-pipeline-skills/pipelines/arxiv-survey-latex.pipeline.md);不想自动同意 C2:把“C2 自动同意”删掉即可。C2 是一个 human in the loop 的介入点)
你也可以更明确一点(避免 router 选错):
> 用 pipelines/arxiv-survey-latex.pipeline.md 给我写一个 agent 的 latex-survey(启用 strict 质量门;C2 自动同意)
你会得到什么(分层产物 + 自循环入口)
执行层:
UNITS.csv:39+(还在增加) 个原子 unit 的执行合约(依赖 → 输入 → 输出 → 验收标准)DECISIONS.md:人类检查点(C2 必须审批大纲后才进入写作)
中间产物层(按 checkpoint 分层):
```
C1: papers/papers_raw.jsonl → papers/papers_dedup.jsonl → papers/core_set.csv (+ papers/retrieval_report.md) # 检索 + 去重/精选
C2: outline/taxonomy.yml → outline/outline.yml → outline/mapping.tsv (+ outline/coverage_report.md; outline/outline_state.jsonl) # 结构(NO PROSE)
C3: papers/fulltext_index.jsonl → papers/paper_notes.jsonl + papers/evidence_bank.jsonl → outline/subsection_briefs.jsonl (+ outline/chapter_briefs.jsonl) # 证据底座(NO PROSE)
C4: citations/ref.bib + citations/verified.jsonl → outline/evidence_bindings.jsonl → outline/evidence_drafts.jsonl → outline/anchor_sheet.jsonl → outline/writer_context_packs.jsonl (+ outline/claim_evidence_matrix.md) # 引用 + 证据包(NO PROSE)
C5: sections/*.md → output/DRAFT.md → latex/main.tex → latex/main.pdf # 写作 + 编译
```
质量门 + 自循环入口:
--strict模式才会持续写入质量门结论:unit 被 BLOCKED 时看output/QUALITY_GATE.md(最新条目)定位需要修的中间产物;脚本/缺产物等运行问题看output/RUN_ERRORS.md- 非
--strict跑法:不会做 unit-level 质量门拦截(output/QUALITY_GATE.md可能只有模板/历史记录);以output/AUDIT_REPORT.md(全局审计)+output/RUN_ERRORS.md为主 - 写作层自循环(只修复失败小节):
- output/WRITER_SELFLOOP_TODO.md(写作门:PASS/FAIL + 需要修复的 sections 列表)
- output/SECTION_LOGIC_REPORT.md(thesis + 连接词密度)
- output/ARGUMENT_SELFLOOP_TODO.md(论证链路 + 前提/口径一致性;ledger 为中间态,不进终稿)
- output/CITATION_BUDGET_REPORT.md(引用增密建议)
简单的对话式执行(从 0 到 PDF)
```
你:给我写一个 agent 的 latex-survey
↓ [C0-C1] 检索 1200+ 候选论文(目标 1500+)→ core set=300(最终文献150++ 默认;arXiv 可补全 meta)
↓ [C2] 构建 taxonomy + outline + mappin
More from this repository10
Plans and structures research unit workflows by defining precise execution guidelines, inputs, outputs, acceptance criteria, and guardrails for each research pipeline skill, ensuring systematic and...
Validates and checks evaluation anchors in research papers to ensure they meet specific quality and consistency standards during the research pipeline.
Curates and processes a corpus of research papers specifically focused on agent-related research, preparing the collection for systematic survey and analysis.
Coordinates and guides the writing of a research chapter, ensuring coherent structure, academic rigor, and alignment with the predefined outline and evidence base.
Enables self-correcting and iterative writing processes within a research pipeline, allowing automatic recovery and continuation from writing failures by identifying and fixing specific intermediat...
Extracts raw text content from PDF files, preparing research papers for further text-based analysis and processing in the research pipeline.
Executes individual research pipeline units according to predefined semantic contracts, tracking inputs, outputs, acceptance criteria, and guardrails for each atomic research task.
Generates concise, structured briefs for research paper chapters, mapping key insights and arguments to support systematic literature review writing.
Identifies and contextualizes academic citations by mapping references to specific sections or claims within a research document, ensuring precise and meaningful citation placement.
Extracts and summarizes key insights and notes from research papers, organizing them in a structured format for further analysis and reference during the research pipeline.