Skip to content

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//report.qmd with frontmatter preamble filled from questio_status + recent result notes + flow status. Templates: progress, update, milestone. - report_build(name, format="html") — validate preconditions, resolve quarto binary via .projio/config.yml code.runner (pixi/conda) per §8, invoke 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.