Citation Injector (deterministic baseline edits; budget-as-constraints)
Purpose: make the pipeline converge when the draft is:
- - locally citation-dense but globally under-cited (too few unique keys), or
- overly reusing the same citations across many subsections.
This skill is intentionally conservative and scriptable:
- - the script edits
output/DRAFT.md directly using the budget report as constraints - injections stay evidence-neutral (NO NEW FACTS) and use only in-scope keys already listed for each H3
Inputs
- - INLINECODE1
- INLINECODE2 (from
citation-diversifier) - INLINECODE4 (H3 id/title mapping)
- INLINECODE5 (must contain every injected key)
Outputs
- -
output/DRAFT.md (updated in place) - INLINECODE7 (PASS/FAIL + what you changed)
Non-negotiables (NO NEW FACTS)
- - Only inject keys listed for that H3 in the budget report.
- Do not introduce new numbers, new benchmarks, or superiority claims.
- Do not add narration templates (
This subsection ..., Next, we ...). - Do not produce cite dumps like
[@a; @b; @c] as the only citations in a paragraph.
Paper-voice injection patterns (safe sentence shapes)
Use these as sentence intentions (paraphrase; do not copy verbatim).
1) Axis-anchored exemplars (preferred)
2) Parenthetical grounding (short, low-risk)
3) Cluster pointer + contrast hint
4) Decision-lens pointer
5) Evaluation-lens pointer (still evidence-neutral)
6) Contrast without list voice
Anti-patterns (high-signal “budget dump” voice)
Avoid these stems (they read like automated injection):
- - INLINECODE17
- INLINECODE18
- INLINECODE19
If your draft contains these, rewrite them immediately using the patterns above (keep citation keys unchanged).
Placement guidance
- - Prefer inserting citations where the subsection already states a concrete contrast or decision lens.
- If you must add a new sentence/mini-paragraph, place it early (often after paragraph 1) so it reads as positioning, not as an afterthought.
- Keep injections subsection-specific: mention the subsection lens (H3 title /
contrast_hook) so the same sentence cannot be copy-pasted into every H3.
Workflow
1) Read the budget report (output/CITATION_BUDGET_REPORT.md)
- - Treat
Global target (policy; blocking) as the PASS line for the pipeline gate (derived from queries.md:citation_target; A150++ default: recommended). - If
Gap: 0, do nothing: write a short PASS report and move on. - Otherwise, for each H3 with suggested keys, pick enough keys to close the gap to target:
- small gaps: 3-6 keys / H3
- A150++ gaps: often 6-12 keys / H3
Prefer keys that are unused globally and avoid repeating the same new keys across many H3s.
2) Inject in the right subsection
- - Use
outline/outline.yml to confirm H3 ordering and ensure the injected sentence lands inside the correct ### subsection.
3) Inject with paper voice
- - Prefer one short, axis-anchored sentence over a long enumerator sentence.
- Keep injections evidence-neutral (NO NEW FACTS) and avoid new numbers.
- Before you commit an injected key, confirm it exists in
citations/ref.bib.
4) Write output/CITATION_INJECTION_REPORT.md
- - Record which H3s you touched and which keys were added.
- Mark
- Status: PASS only when the global target is met.
5) Verify
- - Rerun the validator script (below) to recheck the global target.
- Then run
draft-polisher to smooth any residual injection voice (citation keys must remain unchanged).
Done criteria
- -
output/CITATION_INJECTION_REPORT.md exists and is - Status: PASS. - INLINECODE34 no longer FAILs on “unique citations too low”.
Script (optional; deterministic injector + validator)
You usually do not run this manually; it exists so a pipeline runner can deterministically apply a baseline injection and validate the target.
Quick Start
All Options
- - INLINECODE36
- INLINECODE37 (optional; for logs)
- INLINECODE38 (rare override; prefer defaults)
- INLINECODE39 (rare override; default validates
output/CITATION_INJECTION_REPORT.md) - INLINECODE41 (optional)
Examples
- - After you generate the budget report and want the script to apply the baseline injection:
- INLINECODE42
引用注入器(确定性基线编辑;预算作为约束)
目的:当草稿出现以下情况时,使流程收敛:
- - 局部引用密集但全局引用不足(唯一键太少),或
- 在多个子节中过度重复使用相同的引用。
该技能有意设计为保守且可脚本化:
- - 脚本直接编辑 output/DRAFT.md,以预算报告作为约束
- 注入保持证据中立(无新事实),仅使用每个 H3 已列出的范围内键
输入
- - output/DRAFT.md
- output/CITATIONBUDGETREPORT.md(来自 citation-diversifier)
- outline/outline.yml(H3 id/标题映射)
- citations/ref.bib(必须包含每个注入的键)
输出
- - output/DRAFT.md(原地更新)
- output/CITATIONINJECTIONREPORT.md(PASS/FAIL + 修改内容)
不可协商原则(无新事实)
- - 仅注入预算报告中为该 H3 列出的键。
- 不引入新数字、新基准或优越性声明。
- 不添加叙述模板(本小节...、接下来,我们...)。
- 不产生类似 [@a; @b; @c] 的引用堆砌作为段落中唯一的引用。
论文风格注入模式(安全的句式)
使用这些作为句子意图(释义,不逐字复制)。
1) 轴锚定示例(首选)
- - 诸如 X [@a] 和 Y [@b] 的系统实例化了 <轴/设计点>,而 Z [@c] 则在不同协议下探索了对比点。
2) 括号内基础引用(简短,低风险)
- - ...(例如,X [@a]、Y [@b]、Z [@c])。
3) 聚类指向 + 对比提示
- - 代表性实现涵盖了 <聚类 A>(X [@a]、Y [@b])和 <聚类 B>(Z [@c]),表明权衡取决于 <视角>。
4) 决策视角指向
5) 评估视角指向(仍保持证据中立)
- - 在常用的智能体评估中,诸如 X [@a] 和 Y [@b] 的系统说明了 <视角> 如何被操作化,而 Z [@c] 则突出了不同的约束。
6) 无列举风格的对比
- - 虽然许多工作通过 <机制> 操作化 <主题>(X [@a];Y [@b]),但其他工作将其视为 <替代方案>(Z [@c]),这改变了后续讨论的失败模式。
反模式(高信号预算倾倒风格)
避免以下开头(读起来像自动注入):
- - 一些代表性参考文献包括...
- 值得注意的工作包括...
- 具体例子包括...
如果草稿中包含这些,立即使用上述模式重写(保持引用键不变)。
放置指南
- - 优先在子节已陈述具体对比或决策视角处插入引用。
- 如需添加新句子/小段落,将其放在靠前位置(通常在第一段之后),使其读起来像定位而非事后补充。
- 保持注入针对子节:提及子节视角(H3 标题 / contrast_hook),使同一句子无法复制粘贴到每个 H3。
工作流程
1) 读取预算报告(output/CITATIONBUDGETREPORT.md)
- - 将 Global target (policy; blocking) 视为流程门的 PASS 线(源自 queries.md:citation_target;A150++ 默认值:recommended)。
- 如果 Gap: 0,不做任何操作:编写简短的 PASS 报告并继续。
- 否则,对于每个有建议键的 H3,选取足够键以缩小与目标的差距:
- 小差距:每个 H3 3-6 个键
- A150++ 差距:通常每个 H3 6-12 个键
优先选择全局未使用的键,避免在多个 H3 中重复使用相同的新键。
2) 在正确的子节中注入
- - 使用 outline/outline.yml 确认 H3 顺序,确保注入的句子落在正确的 ### 子节内。
3) 以论文风格注入
- - 优先使用一个简短的轴锚定句子,而非冗长的枚举句子。
- 保持注入证据中立(无新事实),避免新数字。
- 在提交注入键之前,确认其存在于 citations/ref.bib 中。
4) 编写 output/CITATIONINJECTIONREPORT.md
- - 记录修改了哪些 H3 以及添加了哪些键。
- 仅在达到全局目标时标记 - Status: PASS。
5) 验证
- - 重新运行验证脚本(如下)以重新检查全局目标。
- 然后运行 draft-polisher 以平滑任何残留的注入风格(引用键必须保持不变)。
完成标准
- - output/CITATIONINJECTIONREPORT.md 存在且为 - Status: PASS。
- pipeline-auditor 不再因唯一引用太少而 FAIL。
脚本(可选;确定性注入器 + 验证器)
通常不手动运行此脚本;它存在以便流程运行器可以确定性地应用基线注入并验证目标。
快速开始
- - python scripts/run.py --workspace workspaces/
所有选项
- - --workspace
- --unit-id (可选;用于日志)
- --inputs <分号分隔>(很少覆盖;优先使用默认值)
- --outputs <分号分隔>(很少覆盖;默认验证 output/CITATIONINJECTIONREPORT.md)
- --checkpoint (可选)
示例
- python scripts/run.py --workspace workspaces/