Raise citation diversity/density (NO NEW FACTS): generate an in-scope “citation budget” plan per H3 so drafts stop failing the global unique-citation gate and stop looking under-cited. Trigger:...
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.
output/DRAFT.md and estimate the “unique-key gap” (or use pipeline-auditor’s FAIL reason).outline/outline.yml to enumerate H3s in paper order.outline/writer_context_packs.jsonl.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.