Argument Self-loop (write -> self-check -> ledger -> revise)
Purpose: upgrade C5 from “generate text” to “execute argument actions under explicit constraints”.
This skill operationalizes the mechanism you described as a reusable, pipeline-native component:
- - write section-by-section
- self-check paragraph-by-paragraph
- maintain a small argument ledger that makes dependencies explicit
- revise only what fails until the chain is continuous
It complements (not replaces) the other self-loops:
- -
evidence-selfloop: blocks writing when packs are not writeable (do not pad) - INLINECODE1 : blocks template voice, missing sections/leads, scope/citation violations
- INLINECODE2 (this skill): blocks argument discontinuity and premise drift (even when prose is fluent)
Core idea: two intermediate artifacts (never in the paper)
This skill treats “argument structure” as a first-class intermediate artifact, like evidence packs.
Outputs:
- -
output/SECTION_ARGUMENT_SUMMARIES.jsonl (structured; per-section/per-paragraph argument moves) - INLINECODE4 (compact narrative + dependency map; not a prose restatement)
- INLINECODE5 (PASS/FAIL + actionable edits)
These files are not reader-facing and must never be merged into output/DRAFT.md.
Downstream:
- -
paragraph-curator uses output/SECTION_ARGUMENT_SUMMARIES.jsonl (moves/outputs) + the ## Consistency Contract to run a controlled select->evaluate->subset->fuse pass without changing citation keys.
What this self-loop enforces (your 3 invariants)
After you complete a section (H3 or key front matter), the section must satisfy:
1) Correct narrative linkage (paragraph-to-paragraph)
- - the relation between adjacent paragraphs is explicit (cause/contrast/refinement/boundary)
- no silent topic-switch; no “jump cut”
2) Closed argument loop (section-level)
The section answers, in its own text (not in a hidden outline):
- - what question is it resolving?
- what argument path does it take?
- what is the conclusion?
- what premises does the conclusion rely on?
3) Premises + definitions are explicit and stable
- - new terms / protocol assumptions are defined at first use
- the definition matches global usage (no drift)
- task/metric/constraint assumptions do not silently change across sections
The self-check must result in concrete edits: add a missing definition, add a bridge sentence, add an explicit contrast, add a scope boundary, delete/reorder a paragraph, or strengthen the local conclusion.
Paragraph contract (argument actions)
Every paragraph must execute at least one argument action and be locally self-consistent.
Use this action set (can be combined, but never empty):
- -
Claim: a testable judgement/conclusion (avoid generic background) - INLINECODE11 : introduce a concept, assumption, task definition, protocol, comparison set
- INLINECODE12 : reasoning chain or evidence support (including citations)
- INLINECODE13 : clarify differences, remove ambiguity
- INLINECODE14 : applicability limits, failure modes, threats to validity
- INLINECODE15 : a reusable takeaway / constraint that downstream paragraphs can rely on
One-sentence self-check (per paragraph):
- - "This paragraph’s action(s) are: <…>. Its output is: <…>."
If you cannot answer, the paragraph must be rewritten/merged/split until the action and output are clear.
How to run it (LLM-first workflow)
1) Pick the scope of this pass
- - default: run it after
writer-selfloop PASS, before merge - incremental: run it after finishing 1-2 H3s, so you catch drift early
2) For each target section file (start with H3 bodies)
- - read the section
- do a paragraph-by-paragraph action labeling in the ledger, not in the prose
- identify failures (missing definition, missing bridge, missing conclusion, implicit premise)
- apply the fix to the section file (
sections/S<sub_id>.md) without changing citation keys
3) Update the two-level ledger
- - write/update the record for that section in INLINECODE18
- update
output/ARGUMENT_SKELETON.md so it reflects:
- the section’s functional role in the paper
- what premises it consumes
- what conclusions/definitions it produces for downstream sections
4) Write output/ARGUMENT_SELFLOOP_TODO.md
- -
- Status: FAIL + a list of concrete edits when any section fails - INLINECODE22 only when all required sections are coherent and premises are stable
5) Rerun until PASS
Output contract
output/ARGUMENT_SELFLOOP_TODO.md
Must exist and start with:
Recommended structure (keep it short and debuggable):
- - INLINECODE25
- INLINECODE26 (per file)
- INLINECODE27
output/SECTION_ARGUMENT_SUMMARIES.jsonl
JSONL (one record per section/subsection).
Required fields per record:
- -
kind: h3 | front_matter | discussion | conclusion (minimal set) - INLINECODE34 : for H3 use the subsection id (e.g.,
"3.2") - INLINECODE36
- INLINECODE37 ,
section_title (for H3) - INLINECODE39 : what this unit does in the paper (e.g.,
mechanism, evaluation_lens, risk_lens, synthesis) - INLINECODE44 : list of premises/definitions it assumes
- INLINECODE45 : list of premises/definitions/conclusions it introduces
- INLINECODE46 : list of objects, each with:
-
i (1-based paragraph index)
-
moves (non-empty list; pick from:
claim,
definition_setup,
justification,
contrast,
boundary_failure,
local_conclusion)
-
output (one sentence: what this paragraph produces)
Notes:
- - This is an intermediate ledger: short, structural, no prose restatement.
- Do not paste long sentences from the draft. Use short summaries.
output/ARGUMENT_SKELETON.md
A compact narrative/dependency map (not a retelling of the paper).
It should include:
- - each H2/H3's necessity (what gap it fills)
- explicit dependencies (premises consumed, outputs produced)
- a global Consistency Contract section (single source of truth) that must not drift across edits:
- canonical terminology + synonym policy (what to call the same thing)
- task/environment/threat-model boundary (what counts as in-scope)
- evaluation protocol fields that make numbers interpretable (task + metric + constraint/budget/tool access)
- comparison set naming policy (baseline families; avoid drifting labels)
Minimum format requirement:
- -
output/ARGUMENT_SKELETON.md must contain a heading line: INLINECODE58
Change rule (regression trigger):
- - If you change any definition/protocol assumption/term naming, update the Consistency Contract first, then revise the affected
sections/*.md to match, and rerun this self-loop until PASS.
Keep it "writer-facing": no reader signposting, no “in this section we…”.
Routing rules (avoid polishing around missing substance)
- - If a section cannot produce a justified claim without new evidence: STOP and route to
evidence-selfloop. - If a section fails due to template voice / missing citations / out-of-scope keys: route to
writer-selfloop / citation-* first. - This skill is for argument continuity and premise hygiene, not for adding new facts.
Script (generator + validator)
This skill includes a validator script so the pipeline can block on missing ledgers.
It does not write paper prose, but it does generate the required ledger artifacts from existing sections/*.md files and then validates coverage/consistency.
Quick Start
All Options
- - INLINECODE65
- INLINECODE66
- INLINECODE67
- INLINECODE68
- INLINECODE69
Examples
- - Validate the ledgers exist + are PASS + cover all H3:
- INLINECODE70
技能名称: argument-selfloop
详细描述:
论点自循环(撰写 → 自我检查 → 论点账本 → 修订)
目的:将 C5 从生成文本升级为在显式约束下执行论点操作。
本技能将您描述的机制实现为可复用、流水线原生的组件:
- - 逐节撰写
- 逐段自我检查
- 维护一个小型论点账本,使依赖关系显式化
- 仅修订未通过部分,直至链条连续
它补充(而非替代)其他自循环:
- - evidence-selfloop:当证据包不可写入时阻止撰写(不填充)
- writer-selfloop:阻止模板语气、缺失章节/导语、范围/引用违规
- argument-selfloop(本技能):阻止论点不连续性和前提漂移(即使行文流畅)
核心思想:两个中间产物(绝不进入论文)
本技能将论点结构视为一等中间产物,类似于证据包。
输出:
- - output/SECTIONARGUMENTSUMMARIES.jsonl(结构化;每节/每段的论点动作)
- output/ARGUMENTSKELETON.md(紧凑叙述 + 依赖映射;非散文重述)
- output/ARGUMENTSELFLOOP_TODO.md(通过/失败 + 可操作编辑)
这些文件不面向读者,且绝不能合并到 output/DRAFT.md 中。
下游:
- - paragraph-curator 使用 output/SECTIONARGUMENTSUMMARIES.jsonl(动作/输出)+ ## Consistency Contract 执行受控的选择→评估→子集→融合过程,不更改引用键。
本自循环强制执行的内容(您的3个不变量)
完成一个章节(H3 或关键前文)后,该章节必须满足:
1) 正确的叙述链接(段落到段落)
- - 相邻段落之间的关系是显式的(因果/对比/细化/边界)
- 无静默主题切换;无跳切
2) 闭合的论点循环(章节级别)
该章节在其自身文本中(而非隐藏大纲中)回答:
- - 它解决什么问题?
- 它采取什么论点路径?
- 结论是什么?
- 结论依赖哪些前提?
3) 前提和定义是显式且稳定的
- - 新术语/协议假设在首次使用时定义
- 定义与全局用法一致(无漂移)
- 任务/指标/约束假设不会在不同章节间静默变化
自我检查必须产生具体编辑:添加缺失定义、添加过渡句、添加显式对比、添加范围边界、删除/重排段落、或加强局部结论。
段落契约(论点动作)
每个段落必须执行至少一个论点动作,并在局部自洽。
使用以下动作集(可组合,但绝不能为空):
- - Claim:可检验的判断/结论(避免通用背景)
- Definition/Setup:引入概念、假设、任务定义、协议、比较集
- Justification:推理链或证据支持(包括引用)
- Contrast/Differentiation:澄清差异,消除歧义
- Boundary/Failure:适用性限制、失败模式、有效性威胁
- Local Conclusion:下游段落可依赖的可复用要点/约束
单句自我检查(每段):
若无法回答,则必须重写/合并/拆分该段落,直至动作和输出清晰明确。
如何运行(LLM优先工作流)
1) 选择本次运行的范围
- - 默认:在 writer-selfloop 通过后、合并前运行
- 增量:完成1-2个H3后运行,以便及早发现漂移
2) 对于每个目标章节文件(从H3正文开始)
- - 阅读该章节
- 在账本中(而非散文中)进行逐段动作标注
- 识别失败(缺失定义、缺失过渡、缺失结论、隐含前提)
- 对章节文件(sections/S.md)应用修复,不更改引用键
3) 更新两级账本
- - 在 output/SECTIONARGUMENTSUMMARIES.jsonl 中写入/更新该章节的记录
- 更新 output/ARGUMENT_SKELETON.md,使其反映:
- 该章节在论文中的功能角色
- 它消耗哪些前提
- 它为下游章节产生哪些结论/定义
4) 写入 output/ARGUMENTSELFLOOPTODO.md
- - - Status: FAIL + 当任何章节失败时的具体编辑列表
- - Status: PASS 仅当所有必需章节连贯且前提稳定时
5) 重新运行直至通过
输出契约
output/ARGUMENTSELFLOOPTODO.md
必须存在并以以下内容开头:
推荐结构(保持简短且可调试):
- - ## Failures (blocking)
- ## Fix plan (actionable edits)(按文件)
- ## Premise drift watchlist (non-blocking)
output/SECTIONARGUMENTSUMMARIES.jsonl
JSONL(每个章节/子章节一条记录)。
每条记录的必填字段:
- - kind:h3 | frontmatter | discussion | conclusion(最小集)
- id:对于H3使用子章节ID(例如 3.2)
- title
- sectionid、sectiontitle(对于H3)
- sectionrole:该单元在论文中的作用(例如 mechanism、evaluationlens、risklens、synthesis)
- depends_on:它假设的前提/定义列表
- adds:它引入的前提/定义/结论列表
- paragraphs:对象列表,每个包含:
- i(从1开始的段落索引)
- moves(非空列表;从以下选择:claim、definition
setup、justification、contrast、boundaryfailure、local_conclusion)
- output(一句话:该段落产生的内容)
注意:
- - 这是中间账本:简短、结构化、无散文重述。
- 不要粘贴草稿中的长句。使用简短摘要。
output/ARGUMENT_SKELETON.md
紧凑的叙述/依赖映射(非论文复述)。
应包括:
- - 每个H2/H3的必要性(它填补什么空白)
- 显式依赖关系(消耗的前提、产生的输出)
- 全局一致性契约部分(单一事实来源),在编辑中不得漂移:
- 规范术语 + 同义词策略(同一事物的不同称呼)
- 任务/环境/威胁模型边界(什么算作范围内)
- 使数字可解释的评估协议字段(任务 + 指标 + 约束/预算/工具访问)
- 比较集命名策略(基线族;避免标签漂移)
最低格式要求:
- - output/ARGUMENT_SKELETON.md 必须包含标题行:## Consistency Contract
变更规则(回归触发):
- - 如果更改任何定义/协议假设/术语命名,先更新一致性契约,然后修订受影响的 sections/*.md 以匹配,并重新运行此自循环直至通过。
保持面向写作者:无读者指引,无在本节中我们…。
路由规则(避免围绕缺失实质内容进行润色)
- - 如果某章节无法在没有新证据的情况下产生有依据的主张:停止并路由到 evidence-selfloop。
- 如果某章节因模板语气/缺失引用/超出范围键而失败:先路由到 writer-selfloop / citation-*。
- 本技能针对论点连续性和前提卫生,而非添加新事实。
脚本(生成器 + 验证器)
本技能包含一个验证器脚本,使流水线能在缺失账本时阻塞。
它不撰写论文散文,但会从现有的 sections/*.md 文件生成所需的账本产物,然后验证覆盖范围/一致性。
快速开始
- - python scripts/run.py --workspace workspaces/
所有选项
- - --workspace
- --unit-id
- --inputs <分号分隔>
- --outputs <分号分隔>
- --checkpoint
示例
- python scripts/run.py --workspace workspaces/