willoscar/citation-diversifier
|
npx skills add https://github.com/WILLOSCAR/research-units-pipeline-skills --skill citation-diversifier
Purpose: fix a common survey failure mode:
This skill does not change prose by itself.
It produces a constraint sheet: output/CITATION_BUDGET_REPORT.md.
output/DRAFT.mdoutline/outline.yml (H3 ids/titles; used to allocate budgets per subsection)outline/writer_context_packs.jsonl (source of allowed_bibkeys_{selected,mapped,chapter,global} per H3)citations/ref.biboutput/CITATION_BUDGET_REPORT.mdcitations/ref.bib.The report should feel like a *constraint sheet*, not a random list:
recommended).course_paper: cap suggestions at 3-6 keys / H3 and target the profile's 24/32 global budgetCanonical (parseable) lines required (downstream validators depend on these):
queries.md:citation_target (recommended by default for A150++).- Global target (policy; blocking): >= <N> ...- Gap: <K> (gap-to-target; if 0, injection can be a no-op PASS)Optional (always reported; may be blocking depending on citation_target):
- Global recommended target: >= <N> ...- Gap to recommended: <K>Recommended prioritization (scope-safe):
allowed_bibkeys_selected → allowed_bibkeys_mapped → allowed_bibkeys_chapterallowed_bibkeys_global only for:After you generate the budget report:
citation-injector (LLM edits to output/DRAFT.md, NO NEW FACTS).draft-polisher to remove any “budget dump voice” while keeping citation keys unchanged.Important: citation-injector is LLM-first. Its script is validation-only.
1) Diagnose the global situation
output/DRAFT.md and estimate the “unique-key gap” (or use pipeline-auditor’s FAIL reason).2) Allocate budgets per H3 (scope-first)
outline/outline.yml to enumerate H3s in paper order.outline/writer_context_packs.jsonl.3) Write output/CITATION_BUDGET_REPORT.md
Required structure:
- Status: PASS|FAIL- Global target (policy; blocking): >= <N> ...- Gap: <K>## Summary (gap + strategy)## Per-subsection budgets (H3 id/title → suggested keys → placement hint)If you want a deterministic first-pass budget report, run the helper script. Treat it as a baseline and refine the plan as needed.
uv run python .codex/skills/citation-diversifier/scripts/run.py --helpuv run python .codex/skills/citation-diversifier/scripts/run.py --workspace <workspace>--workspace <dir>--unit-id <U###> (optional)--inputs <semicolon-separated> (rare override; prefer defaults)--outputs <semicolon-separated> (rare override; default writes output/CITATION_BUDGET_REPORT.md)--checkpoint <C#> (optional)uv run python .codex/skills/citation-diversifier/scripts/run.py --workspace <workspace>output/CITATION_BUDGET_REPORT.md exists and has actionable, in-scope budgets.citation-injector, pipeline-auditor no longer FAILs on global unique citations.Take willoscar/citation-diversifier 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.