willoscar/citation-injector
| Apply a `citation-diversifier` budget report by injecting *in-scope* citations into an existing draft (NO NEW FACTS), so the run passes the global unique-citation gate without citation dumps.
npx skills add https://github.com/WILLOSCAR/research-units-pipeline-skills --skill citation-injector
Purpose: make the pipeline converge when the draft is:
This skill is intentionally conservative and scriptable:
output/DRAFT.md directly using the budget report as constraintsoutput/DRAFT.mdoutput/CITATION_BUDGET_REPORT.md (from citation-diversifier)outline/outline.yml (H3 id/title mapping)citations/ref.bib (must contain every injected key)output/DRAFT.md (updated in place)output/CITATION_INJECTION_REPORT.md (PASS/FAIL + what you changed)This subsection discusses or Next, we examine.[@a; @b; @c] as the only citations in a paragraph.Use these as *sentence intentions* (paraphrase; do not copy verbatim).
1) Axis-anchored exemplars (preferred)
Systems such as X [@a] and Y [@b] instantiate <axis/design point>, whereas Z [@c] explores a contrasting point under a different protocol.2) Parenthetical grounding (short, low-risk)
The same design pressure appears in nearby systems (e.g., X [@a], Y [@b], Z [@c]).3) Cluster pointer + contrast hint
Representative implementations span both <cluster A> (X [@a], Y [@b]) and <cluster B> (Z [@c]), suggesting that the trade-off hinges on <lens>.4) Decision-lens pointer
For builders choosing between <A> and <B>, prior systems provide concrete instantiations on both sides (X [@a]; Y [@b]; Z [@c]).5) Evaluation-lens pointer (still evidence-neutral)
Across commonly used agent evaluations, systems such as X [@a] and Y [@b] illustrate how <lens> is operationalized, while Z [@c] highlights a different constraint.6) Contrast without list voice
While many works operationalize <topic> via <mechanism> (X [@a]; Y [@b]), others treat it as <alternative> (Z [@c]), which changes the failure modes discussed later.Avoid these stems (they read like automated injection):
A few representative references includeNotable lines of work includeConcrete examples includeIf your draft contains these, rewrite them immediately using the patterns above (keep citation keys unchanged).
contrast_hook) so the same sentence cannot be copy-pasted into every H3.1) Read the budget report (output/CITATION_BUDGET_REPORT.md)
Global target (policy; blocking) as the PASS line for the pipeline gate (derived from queries.md:citation_target; A150++ default: recommended).Gap: 0, do nothing: write a short PASS report and move on.Prefer keys that are unused globally and avoid repeating the same new keys across many H3s.
2) Inject in the right subsection
outline/outline.yml to confirm H3 ordering and ensure the injected sentence lands inside the correct ### subsection.3) Inject with paper voice
citations/ref.bib.4) Write output/CITATION_INJECTION_REPORT.md
- Status: PASS only when the global target is met.5) Verify
draft-polisher to smooth any residual injection voice (citation keys must remain unchanged).output/CITATION_INJECTION_REPORT.md exists and is - Status: PASS.pipeline-auditor no longer FAILs on “unique citations too low”.You usually do not run this manually; it exists so a pipeline runner can deterministically apply a baseline injection and validate the target.
uv run python .codex/skills/citation-injector/scripts/run.py --workspace <workspace>--workspace <dir>--unit-id <U###> (optional; for logs)--inputs <semicolon-separated> (rare override; prefer defaults)--outputs <semicolon-separated> (rare override; default validates output/CITATION_INJECTION_REPORT.md)--checkpoint <C#> (optional)uv run python .codex/skills/citation-injector/scripts/run.py --workspace <workspace>Take willoscar/citation-injector from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.