Teach _scan_deliverables about deck.yml and .qmd¶
Goal¶
(promoted from note)
Context¶
(see source note)
Prompt¶
Fix the issue described below (source: /storage2/arash/projects/projio/docs/log/issue/issue-arash-20260419-212250-953561.md). Understand the problem, then implement the proposed fix.
_scan_deliverables in src/projio/mcp/questio.py:1018 doesn't know about presentio decks.
Current behavior: the scanner walks docs/deliverables/{reports,presentations,posters}/ and for presentation/poster subdirs looks for slides.md / poster.md / index.md as the "primary file." Presentio decks use deck.yml (YAML manifest, not markdown) as their primary artifact, with sections/*.md underneath. The scanner either skips presentio decks (no primary .md found) or picks an arbitrary section file's frontmatter via the md_files[0] fallback at line 1059 — either way the deliverables overview page will be wrong for presentio decks.
Fix: teach _scan_deliverables to recognize deck.yml in presentation subdirs. When deck.yml is present, parse it as YAML and construct the fm-like dict with title from spec.title, type="presentation", format from spec.format, date from spec (if present) or dir mtime. Fall back to the current primary-file logic if no deck.yml (keeps back-compat with the old slides.md convention).
Context: this is a latent bug introduced by the presentio path migration to docs/deliverables/presentations/ (2026-04-19). The projio-intro deck at docs/deliverables/presentations/projio-intro/ is the first real test case — it'll be missing or mis-indexed in the deliverables overview until this lands.
Related: docs/specs/quarto-reports.md §6 introduces report_build; that tool will have a similar concern for .qmd-based reports vs. the current .md-only report scanning. Worth fixing both in one pass.
Acceptance Criteria¶
- [ ]
Result¶
Completed in 179.1s (1 steps, model: opus)
Session: c31ab239-4c83-42ea-a021-15d185e2bc90
Result note: /storage2/arash/worklog/workflow/captures/20260420-025726-65f10a/note.md
Output¶
Fix landed in `src/projio/mcp/questio.py`: added `_parse_deck_yml` helper and taught `_scan_deliverables` to (1) prefer `deck.yml` in presentation/poster subdirs with fallback to the old primary-file convention, and (2) also pick up subdir-layout reports (`report.qmd` / `report.md` / `index.md`) alongside the legacy flat `*.md` pattern. Verified against the real `projio-intro` deck (title, format=revealjs, dir-mtime date) and a synthetic fixture covering all five code paths.
## Next Steps
1. Add a dedicated `tests/test_questio_deliverables.py` covering the five scanner branches (flat md report, subdir qmd report, deck.yml presentation, legacy slides.md, poster.md).
2. Run `questio_docs_collect()` on the live project and inspect the regenerated `docs/deliverables/index.md` + `presentations/index.md` to confirm the projio-intro deck renders correctly in the MkDocs nav.
3. Proceed to implement the `report_build` MCP tool from `docs/specs/quarto-reports.md §6`, now that the scanner layer already recognizes the `<name>/report.qmd` layout.