Implement quarto-reports phase 1: report_init + report_build MCP tools
Implement quarto-reports phase 1: report_init + report_build MCP tools.
Spec: docs/specs/quarto-reports.md (drafted 2026-04-18/19, all open questions resolved in §12).
Phase 1 scope:
1. New module src/projio/mcp/report.py exposing:
- report_init(name, template) — scaffold docs/deliverables/reports/quarto render report.qmd --to <format> inside project compute env, return build path + log.
2. Register both tools in src/projio/mcp/server.py alongside present_ tools.
3. Preflight validation per §5c: parse .qmd for {{< embed >}} shortcodes and image refs, verify notebook files exist + are executed + cell labels resolve, verify bibliography path resolves. Report actionable errors.
4. Add .projio/render/quarto.yml scaffold via projio sync (min_version field, CSL/bib inheritance from render.yml).
5. projio sync adds _freeze/ and _files/ under docs/deliverables/reports// to the managed gitignore block per §12c.
6. Runtime quarto --version check in report_build; error with install URL if below min_version per §12a.
Out of scope for phase 1: cross-project notebook imports (§12b deferred to phase 2), report_list / report_status / report_validate (sketch only in §6), report_refresh_import / report_freeze_import.
Related: spec's rejected options (in-report regeneration, dedicated report notebooks) are recorded in §5 and §10 — do not implement these even if they seem tempting during coding.
Testing: add a pixecog-style fixture in tests/ with a minimal executed .ipynb and a report that embeds one cell. Verify report_build produces valid HTML and that preflight catches missing labels.
Dependency: independent of the questio.py scanner fix issue (issue-arash-20260419-212250-953561). Can run in parallel.
Related Notes¶
- issue-arash-20260419-212250-953561.md — report_init fills frontmatter from questio_status; _scan_deliverables shares the deliverables/ boundary this feature writes to
- issue-arash-20260414-030010-945964.md — report_build uses the same pixi/conda runner resolution pattern as pipeio_run — env resolution bugs there are directly applicable
- issue-arash-20260411-173902-670919.md — report_build inherits CSL/bib from render.yml; cross-project biblio sharing affects what bibliography paths resolve in quarto renders
- issue-arash-20260410-000346-439918.md — reports embed notebooks via {{< embed >}} shortcodes — notebook move/path issues directly break report preflight validation
- issue-arash-20260411-173854-577193.md — report_init scaffolds docs/deliverables/reports/
/ — overlaps with study profile layout decisions in projio_init