## biblio: New biblio_compile tool — merge intermediates into compiled
New function in packages/biblio/src/biblio/bibtex.py:
def compile_bib(sources: list[Path], output: Path, *, dry_run: bool = False) -> tuple[int, int]:
"""Merge multiple .bib intermediates into a single compiled output.
Reuses pybtex merge logic. Duplicate keys across sources use last-wins.
Returns (n_sources, n_entries).
"""
Config in render.yml (read by projio):
bibliography: .projio/render/compiled.bib
bib_sources:
- .projio/biblio/merged.bib
- .projio/pipeio/modkey.bib
mcp_biblio_compile(root, sources=None, output=None)
- If sources not given, reads from render.yml
bib_sources
- If output not given, reads from render.yml
bibliography
- Skips missing source files gracefully (pipeio might not exist in all projects)
MCP registration in src/projio/mcp/biblio.py:
- Register
biblio_compile tool that wraps the biblio function
- Reads render.yml for default config
Workflow integration:
projio sync calls: biblio_merge → modkey_bib (if pipeio present) → biblio_compile
- Both pandoc (via pandoc-defaults.yaml) and mkdocs (via bib_file config) point to .projio/render/compiled.bib