template-pitch-deck
Project-scoped skill for the in-repo exemplar at
projects/templates/template_pitch_deck/. Load this when working inside the project.
When to Use
- Working inside the
template_pitch_deckexemplar — running scripts, editing content, or regenerating outputs. - Forking this exemplar as the starting scaffold for a new pitch/grant-report/stakeholder-update deck.
- Adding a new format-agnostic slide renderer to
infrastructure/rendering/(e.g. this is the reference forDeckContent/Slide/DeckTheme). - Validating that the exemplar's contracts (thin-orchestrator, token honesty, cliché lint, diligence citation coverage, no-mocks testing) still hold after changes.
Quick Reference
# From the repository root
export PATH="$PWD/node_modules/.bin:$PATH"
uv run python projects/templates/template_pitch_deck/scripts/10_audit_deck_content.py
uv run python projects/templates/template_pitch_deck/scripts/15_generate_diagrams.py
uv run python projects/templates/template_pitch_deck/scripts/20_render_decks.py
uv run python projects/templates/template_pitch_deck/scripts/30_audit_diligence.py
uv run pytest projects/templates/template_pitch_deck/tests --cov=projects/templates/template_pitch_deck/src --cov-fail-under=90
uv run pytest tests/infra_tests/rendering/test_slide_deck.py tests/infra_tests/rendering/test_pptx_deck.py tests/infra_tests/rendering/test_mermaid_figure.py
PDF and PPTX are required project formats; the isolated project environment
installs python-pptx from this exemplar's own pyproject.toml. Mermaid
figures require the repository-pinned node_modules/.bin/mmdc on PATH.
Pitfalls
- Keep scripts thin. Content/validation logic belongs in this project's
src/; layout/drawing logic belongs ininfrastructure/rendering/{slide_deck,pptx_deck,mermaid_figure}.py— never inscripts/. - No mocks. All tests must use real YAML, real rendered files (read back with
pypdf/python-pptx), real repo introspection. - Every fact-bearing slide needs a
sourcecitation.src/diligence_audit.pyfails the build otherwise (title-kind slides are exempt). - Never hand-type a fact. All
PITCH_SUBJECT_*/EXEMPLAR_*token values come fromsrc/deck_tokens.py::build_deck_tokens, which reads them live from the repo — adding a new fact means adding a new live read, not a literal. - PDF/PPTX parity is load-bearing. The two renderers must always produce identical slide counts, text, fitted title sizes, and planned body line breaks for the same
DeckContent. The exact Helvetica fitter and content layout planner live inslide_deck.py;pptx_deck.pyconsumes their results rather than estimating again. A title below the legibility floor or body crossing the QR/footer protected band fails before either output is replaced. - Do not compress the public roster into other claims. Medium and long each dedicate one cited slide to all live exemplar names and a following, identically cited slide to the concrete-instance and uniform-contract claims. Tests bind each authored deck to its declared budget while proving the split, source, and exact live roster dynamically from
PUBLIC_PROJECT_NAMES. - Donut percentages require measured contrast. Keep outside labels theme-black on the white canvas, but choose theme-black or theme-white for each percentage from the real wedge artist's alpha-composited color. The project helper fails closed below 4.5:1, and tests inspect real Matplotlib artists rather than mocks.
- QR codes need a real
source_base_url.Slide.qr_url(drawn bottom-right, both renderers) is only populated whenmanuscript/config.yaml'sdeck.source_base_urlis non-empty —attach_qr_urlsis a no-op otherwise. New infra capabilities (QR generation reusesinfrastructure.steganography.barcode_generators.generate_qr_code) need their transitive dependency (qrcode[pil]) declared in THIS project's ownpyproject.toml, not just the root repo's — see the isolated-venv pitfall below. - Isolated-venv dependency check is not a one-time step. Every time new code imports a not-yet-used
infrastructure.*capability, re-runuv run python scripts/pipeline/stage_01_test.py --project templates/template_pitch_deck --project-only(not a bare root-venvpytest) — it is the only thing that catches a transitive dependency (reportlab/pypdf/Pillow/qrcode so far) missing from this project's ownpyproject.toml. - Outputs are disposable. Never hand-edit
output/; regenerate frommanuscript/+src/. This includesoutput/slides_standalone/*.md— generated per-slide pages, not hand-authored. - Run from the repo root. Commands assume the template monorepo root as working directory.