deck — master-template renderer
Generate a brand-perfect .pptx by composing plans against a brand pack's master.pptx. The master supplies typography, colors, footers, slide-number chrome — the renderer only fills placeholders and clones bespoke shapes.
Quick Start
from pathlib import Path
from feinschliff import FillPlan, render
render(
Path("feinschliff/brands/feinschliff"),
[FillPlan(layout="Title Slide", fills={0: "Q3 update", 1: "Roadmap"})],
Path("out.pptx"),
)
Author the call in feinschliff/.debug/<topic>-<date>/build.py and run it with feinschliff build.py — the plugin's launcher execs the venv Python directly, no CLI in between.
Brand packs
Each pack ships under feinschliff/brands/<name>/ with a master.pptx (or .ref pointer) and catalog files. Built-in packs: feinschliff (default), annual-review, geometric, scientific, shapes, gs-ramspau. Corporate / private packs surface through sibling feinschliff-* plugin directories ($FEINSCHLIFF_BRAND_PATH). Run python -m feinschliff.master_template.catalog <brand_pack> to list layouts + snippets for any pack.
Mental model
A deck is a list of plans, in slide order:
FillPlan(layout, fills) — pick a layout by name (see <brand>/layouts.yaml), fill placeholders by idx. Values: str, list[str], PictureRef, or ChartSpec. Charts and pictures replace the OBJECT placeholder.
ClonePlan(source_idx, replacements) — XML-clone a bespoke source slide from <brand>/snippets.yaml. replacements is a queue per old-string; repeating ("Milestone", ...) consumes successive occurrences in document order.
render(..., theme=Path|dict) — optional. Patches the master's theme1.xml <a:clrScheme> from a small JSON. One master.pptx, N visual variations; the file on disk is never touched.
Flow
- Interview if the brief is thin. Topic + audience are the minimum; references/storyline.md maps audience to a default slide count.
- Draft the storyline per references/storyline.md — emit the brief block + numbered slides block, pick a frame, tag each row with
role and act, write claim-style titles.
- Pick layouts per references/layouts.md. For bespoke shapes (timelines, funnels, infographics) clone from
<brand>/snippets.yaml — see references/clones.md for the text-anchor recipe.
- Approval gate — show storyline + chosen layouts, ask "ok?". Don't render until approved.
- Render with the Quick Start snippet. Respect the verbosity tier when sizing fills. See references/gotchas.md for pitfalls.
- Verify and loop — convert to PDF and read the pages against the defect classes in references/verify.md. Fix and re-render until clean; the reference describes the
/loop-driven iteration.
1---2name: deck3description: Build a brand-perfect PowerPoint deck via the master-template renderer. Use when the user asks to create a deck or presentation.4---56# deck — master-template renderer78Generate a brand-perfect `.pptx` by composing **plans** against a brand pack's `master.pptx`. The master supplies typography, colors, footers, slide-number chrome — the renderer only fills placeholders and clones bespoke shapes.910## Quick Start1112```python13from pathlib import Path14from feinschliff import FillPlan, render1516render(17 Path("feinschliff/brands/feinschliff"),18 [FillPlan(layout="Title Slide", fills={0: "Q3 update", 1: "Roadmap"})],19 Path("out.pptx"),20)21```2223Author the call in `feinschliff/.debug/<topic>-<date>/build.py` and run it with `feinschliff build.py` — the plugin's launcher execs the venv Python directly, no CLI in between.2425## Brand packs2627Each pack ships under `feinschliff/brands/<name>/` with a `master.pptx` (or `.ref` pointer) and catalog files. Built-in packs: `feinschliff` (default), `annual-review`, `geometric`, `scientific`, `shapes`, `gs-ramspau`. Corporate / private packs surface through sibling `feinschliff-*` plugin directories (`$FEINSCHLIFF_BRAND_PATH`). Run `python -m feinschliff.master_template.catalog <brand_pack>` to list layouts + snippets for any pack.2829## Mental model3031A deck is a list of plans, in slide order:3233- **`FillPlan(layout, fills)`** — pick a layout by name (see `<brand>/layouts.yaml`), fill placeholders by `idx`. Values: `str`, `list[str]`, `PictureRef`, or `ChartSpec`. Charts and pictures replace the OBJECT placeholder.34- **`ClonePlan(source_idx, replacements)`** — XML-clone a bespoke source slide from `<brand>/snippets.yaml`. `replacements` is a queue per old-string; repeating `("Milestone", ...)` consumes successive occurrences in document order.35- **`render(..., theme=Path|dict)`** — optional. Patches the master's `theme1.xml` `<a:clrScheme>` from a small JSON. One `master.pptx`, N visual variations; the file on disk is never touched.3637## Flow38391. **Interview** if the brief is thin. Topic + audience are the minimum; [references/storyline.md](references/storyline.md) maps audience to a default slide count.402. **Draft the storyline** per [references/storyline.md](references/storyline.md) — emit the brief block + numbered slides block, pick a frame, tag each row with `role` and `act`, write claim-style titles.413. **Pick layouts** per [references/layouts.md](references/layouts.md). For bespoke shapes (timelines, funnels, infographics) clone from `<brand>/snippets.yaml` — see [references/clones.md](references/clones.md) for the text-anchor recipe.424. **Approval gate** — show storyline + chosen layouts, ask "ok?". Don't render until approved.435. **Render** with the Quick Start snippet. Respect the verbosity tier when sizing fills. See [references/gotchas.md](references/gotchas.md) for pitfalls.446. **Verify and loop** — convert to PDF and read the pages against the defect classes in [references/verify.md](references/verify.md). Fix and re-render until clean; the reference describes the `/loop`-driven iteration.