Image to Editable PPTX
Reconstruct the reference instead of placing the source image on the slide. Preserve the visual hierarchy while making every logical element independently editable and the final PPTX portable as a single file.
Required companion workflow
Use the available presentation-creation skill and its required authoring library. When the Presentations skill is available, read and follow it before implementation. For every conversion or repair, read references/reconstruction-workflow.md completely before authoring.
Deliverable contract
- Create one slide per reference image unless the user requests another mapping.
- Use the requested aspect ratio; default to 16:9 only when no ratio is specified.
- Recreate visible text as native PowerPoint text boxes or table-cell text. The user must be able to select the text and change its font family and font size in PowerPoint; never bake text into a raster image, SVG, outlined path, or other artwork.
- Keep each logical text block in a practical editing unit. Do not fragment words into one shape per character or combine unrelated regions into one text box.
- Recreate panels, borders, arrows, dividers, and simple diagrams as native PowerPoint shapes/connectors. Represent every relationship between two objects with one attached connector created by
slide.shapes.connect(...); never stitch a route from separate line, rectangle, or arrowhead shapes. - Embed raster assets as PNG bytes and icons as SVG bytes. Never use external file or URI relationships.
- Keep each logical visual element independent. The user must be able to select, move, restyle, group, and ungroup it.
- Never use the complete reference image as a slide background, full-slide picture, tracing layer, or hidden dependency.
- Preserve the original reference and export a new PPTX.
Workflow
Inspect the reference at original resolution. Record dimensions, aspect ratio, regions, text, colors, typography, icons, connectors, z-order, and repeated spacing.
Decide the target-ratio strategy before authoring. If the ratios differ, preserve all content and reflow the layout without stretching glyphs or icons; do not crop unless the user explicitly permits it.
Build the slide with editable objects using
@oai/artifact-toolfrom a JavaScript ES module. Author visible text as native text runs with an explicit font family and font size. Create endpoint nodes before their connectors, use oneslide.shapes.connect(...)call per logical relationship, use byte-backed assets, and add speaker-note[Sources]blocks.Export a raw PPTX and render every slide. Fix clipping, wrapping, unintended overlap, broken connectors, and blurry assets.
Normalize the raw file to remove exporter-level grouping locks, normalize text-weight inheritance, and create real embedded PNG fallbacks for SVG assets:
python scripts/normalize_pptx.py raw.pptx final.pptxValidate the final package. Supply the actual requested ratio:
python scripts/validate_pptx.py final.pptx --expect-aspect 16:9Treat every reported failure as blocking. Do not deliver while a connector is missing either attached endpoint, a route is assembled from touching line segments, text-selection or text-editing locks, user-visible SVG text,
noGrplocks, external media, default-level bold, placeholder PNG fallbacks, a full-slide reference image, or an aspect mismatch remains. Use--allow-unattached-connectorsonly for intentional standalone lines with neither endpoint attached, use--allow-segmented-linesonly for intentional non-connector artwork, and disclose either exception. Use--allow-svg-textonly for intentional non-editable artwork such as a logo and disclose that exception.On a disposable copy of the final PPTX, move one endpoint node for each connector style used. Confirm that the complete route remains one selected object, stays attached at both ends, and reroutes without gaps. Restore or discard the disposable copy.
On a disposable copy of the final PPTX, select at least one title and one body/label text sample, change both the font family and font size in PowerPoint or LibreOffice, save, reopen, and confirm the changes persist. Discard the disposable copy; never alter the deliverable during these smoke tests.
Copy only the final PPTX to a fresh temporary directory and render it there. This transfer-only test must succeed without any sibling asset folder.
Deliver only the final PPTX and a concise summary of the ratio, connector attachment/editability, font-family/font-size editability, embedded-media status, and QA results.
Repair mode
For an existing image-derived deck, inspect before rebuilding. Normalize and validate first. If the only failures are package-level locks, duplicated bold inheritance, or incomplete SVG fallbacks, preserve the visible slide and repair the package. Rebuild a route when it consists of separate line pieces or either connector endpoint is missing. Rebuild other content when the slide contains flattened or outlined text, user-visible text inside images/SVGs, text-selection or text-editing locks that normalization cannot remove, a full-slide reference image, external media, or non-editable composite artwork.
Failure handling
- If LibreOffice is unavailable, do not claim grouping or SVG fallback compatibility. Report the missing dependency and keep the raw PPTX separate.
- If reference text cannot be read confidently, mark uncertain strings and ask only for the unresolved text; do not invent content.
- If exact fidelity conflicts with a different target ratio, preserve content and hierarchy first, then state the reflow decision.
- If a required font is unavailable, choose a metrically similar installed font and verify the rendered line breaks.
- If PowerPoint or LibreOffice is unavailable for the font-edit smoke test, report that application-level font editing was not verified; do not claim that the smoke test passed based only on rendering.
- If PowerPoint or LibreOffice is unavailable for the connector-move smoke test, report that application-level connector attachment was not verified; do not infer attachment from appearance alone.