mdpr-ppt is a PowerPoint add-in bridge for MDPR. It inspects selected
PowerPoint objects, captures user-approved shape/style evidence, and creates
MDPR component transform candidates from inside PowerPoint.
It is not an agent layout tool. It does not ask an LLM to invent coordinates, colors, recipes, variants, z-order, or exact renderer objects.
| Repository | Responsibility |
|---|---|
| MDPR | Deterministic Markdown-to-editable-PPTX runtime, schema source of truth, final layout/style/render decisions |
| mdpr-skill | Optional hint, review, eval, design-analysis, and gate companion |
| mdpr-ppt | User-approved PowerPoint selection capture and JSON bridge |
| Rail | Coordinates and style values | Consumer |
|---|---|---|
mdpr-ppt-selection-v1 |
Allowed because the user selected the PowerPoint object | mdpr-ppt, MDPR pack or override import |
mdpr-selection-context-v1 |
Not allowed; contains only source/block/region context | mdpr-skill hint and review inputs |
mdpr-ppt-pack-candidate-v1 |
Allowed after user approval and provenance checks | MDPR pack validation/import |
mdpr-user-override-candidate-v1 |
Limited, approval-bound, semantic override preferred | MDPR override validation/apply |
schemas/ Synced MDPR source-of-truth bridge schema copies
packages/shared/ Shared TypeScript types, validation, mapping, and selection-context export
packages/cli/ Local validation and conversion commands
packages/addin/ Office Add-in boundary for selected shape capture
packages/ooxml-extractor/ Future fallback for grouped shapes and table internals
tests/ Runtime tests for rail boundaries and mapping helpers
MDPR owns the schema source of truth. This repository keeps synced copies for
the bridge contracts it emits or consumes: mdpr-ppt-selection,
mdpr-ppt-pack-candidate, mdpr-user-override-candidate,
mdpr-selection-context, and mdpr-pptx-object-map.
The repository now includes a sideloadable PowerPoint task pane UI at
packages/addin/taskpane/index.html and an Office add-in manifest at
packages/addin/manifest.xml. The manifest adds an MDPR PowerPoint ribbon
tab with an Inspect Selection button, so the bridge is opened from inside
PowerPoint instead of from an external JSON tool.
If the MDPR tab is not visible, use the direct PowerPoint sideload command first. This is the closest workflow to a normal in-PowerPoint add-in and runs without the Office debugging popup:
npm run start:pptThis creates and trusts a current-user localhost certificate, starts the HTTPS localhost asset server required by the Office manifest, registers the manifest for a sideloading session, and opens PowerPoint with the add-in loaded. When you are done testing, stop that session so Office clears the development registration and shuts down the local server:
npm run stop:pptOnly use the debug variant when you intentionally want Office WebView/runtime debugging messages:
npm run start:ppt:debugPrepare the local Windows add-in catalog and copy the manifest:
npm run install:addin:windowsFor the closest IguanaTex-like Windows setup, run PowerShell as an administrator and let the helper create a shared-folder catalog and register it under the current user's Office Trusted Add-in Catalogs registry key:
npm run install:addin:windows:registerThis runs the installer with -TryShare -RegisterTrustCatalog. If you want to
run the options manually:
npm run install:addin:windows -- -TryShare -RegisterTrustCatalogThe script writes install-next-steps.txt under
%LOCALAPPDATA%\mdpr-ppt\AddinCatalog. It contains the manifest path and, when
-TryShare succeeds, the UNC catalog path to add in PowerPoint. If you run
without -TryShare, share that folder manually or rerun the command from an
elevated PowerShell session with -TryShare. If -RegisterTrustCatalog
succeeds, the Office trusted catalog entry is created for the current Windows
user; otherwise add the catalog manually in PowerPoint Trust Center.
Office task pane manifests use HTTPS SourceLocation URLs. Start the task pane
asset server with your trusted development certificate and key:
npm run serve:addin -- --cert ./certs/localhost.crt --key ./certs/localhost.keyThen restart PowerPoint. If the MDPR tab is not visible yet, register or confirm the catalog in PowerPoint:
- Open PowerPoint.
- Go to
File > Options > Trust Center > Trust Center Settings. - Open
Trusted Add-in Catalogs. - Confirm the catalog URL from
install-next-steps.txtis listed. - Enable
Show in Menufor that catalog if it is not already enabled. - Restart PowerPoint.
- If needed, go to
Home > Add-ins > Advanced. - Choose
SHARED FOLDER. - Add
mdpr-pptonce.
In PowerPoint:
- Open an MDPR-generated PPTX.
- Select one or more MDPR-created shapes.
- Open the
MDPRtab and chooseInspect Selection. - Enter the MDPR source SHA-256 and PPTX SHA-256.
- Click
Capture Selected Shapes. - Click
Approve Selection. - Copy one of the approved rail outputs:
Copy Selection JSONCopy Object InfoCopy Selection ContextCopy Override CandidateCopy MDPR Transform Candidate
Copy Object Info is the fastest way to inspect the selected PowerPoint
object. It includes shape ids, names, types, bounds, style snapshots, and any
MDPR metadata inferred from shape names.
The task pane keeps raw PowerPoint bboxPt, fill, line, and text style data in
the approved mdpr-ppt-selection-v1 output. Copy Selection Context strips
geometry and style before producing weak mdpr-skill review context.
If a selected shape name follows MDPR renderer metadata such as
mdpr:slide-4:region-main:b12, the task pane automatically fills the MDPR
slide, region, and block mapping fields.
Copy MDPR Transform Candidate creates an approved
mdpr-ppt-pack-candidate-v1 component-pack proposal directly from the selected
PowerPoint object. This is separate from mdpr-skill: mdpr-ppt records the
user-selected object and requested target component, then MDPR can validate and
import the candidate through its own pack/override workflow.
Validate a captured selection:
mdpr-ppt validate-selection .mdpresent/ppt/selection.jsonRefresh a captured selection against an MDPR manifest or object-map export:
mdpr-ppt map-selection .mdpresent/ppt/selection.json \
--object-map .mdpresent/mdpresent-manifest.json \
--out .mdpresent/ppt/selection.mapped.jsonConvert the approved selection into a weak selection context for mdpr-skill:
mdpr-ppt selection-context .mdpresent/ppt/selection.mapped.json \
--out .mdpresent/review/selection-context.jsonExport a semantic override candidate from the approved selection:
mdpr-ppt override-candidate .mdpresent/ppt/selection.mapped.json \
--op pinBlock \
--out .mdpresent/proposals/override.candidate.jsonThe generated selection context intentionally removes raw PowerPoint geometry and style snapshots. Those values stay in the user-approved selection or pack rail, not in agent hints.
Check synced schema copies against a local MDPR checkout:
mdpr-ppt validate-schema-sync --mdpr-path ../mdpr-skill/.cache/mdprnpm install
npm run validateThe Office.js integration is split into a small adapter and a static task pane.
packages/addin/src/office/getSelectedShapes.ts captures the current
PowerPoint selection through an Office.js-like context and converts each shape
through the shared snapshot mapper. packages/addin/taskpane/taskpane.js
provides the user-facing capture, approval, copy, selection-context, and
override-candidate controls without weakening the no-agent deterministic
boundary.