PPTX Slide Specification
Use this skill when writing or repairing a coordinate-explicit JSON deck spec.
Author final coordinates directly in layout_tree; plugin scripts will not choose layouts, measure browser boxes, or shrink text to fit. Split dense material across slides rather than relying on tiny fonts.
Workflow
- Define slide messages, design context, and slide size.
- Create each slide with
id, title, and complete layout_tree.
- Place groups and objects with final inch bboxes, z-order, and styles.
- Add at least one style-derived
layout_design element on normal content slides.
- Audit collisions, density, font sizes, and default-theme failures.
Deck Shape
- Return a JSON object with top-level
slides; use stable readable IDs such as s01_overview.
- Use top-level
summary for audit metadata. Newly generated decks require summary.design_context unless a user-provided brand guide or reference PPTX is documented as the primary style source.
- Record design profile IDs, source URLs, and license IDs in
summary.design_context when using design references.
- Use
render_mode: "layout" or omit it for generated decks. OOXML mode is only for extracted specs with ooxml_elements.
- Every generated slide must include
layout_tree; do not rely on shorthand layout specs.
- Production decks must also include
summary.layout_policy and
summary.accessibility. They define the usable content region and document
language before the PPTX is built.
Production Metadata
Use this compact form for production decks. Values may change for a different
slide size or an approved design system, but all values must be explicit.
{
"summary": {
"layout_policy": {
"safe_margin": 0.5,
"content_bottom": 6.7,
"footer_top": 6.85,
"minimum_gap": 0.12
},
"accessibility": {
"language": "en-US",
"presentation_title": "Quarterly operating review"
}
}
}
content_bottom must be lower than footer_top. Content objects must end at
or above content_bottom. Footer objects may use the space from footer_top
to the slide edge. A footer never overlaps content.
Slide Fields
- Each generated slide must include
id, title, and layout_tree.
- Production slides must include
accessibility.reading_order, an ordered list
of meaningful object IDs. The order must follow the intended reading sequence.
- Use
hidden: true only for appendix/reference slides that should remain in the PPTX package but not appear during normal presentation.
- Do not use
pattern, layout_pattern, composition.pattern, layout, sections, bullets, objects, or theme as render-time shorthand. Decide all positions, sizes, z-order, colors, font sizes, and relationships in the JSON before rendering.
- Do not overfill a slide: prefer three to five major content groups.
- Do not ship default
python-pptx-looking slides: plain white background, Calibri-only text, default theme colors, and bullet-only layouts are design failures unless explicitly requested.
Layout Tree
- Required keys:
slide_size (width, height in inches), root_group_id, groups keyed by ID, and objects keyed by ID.
groups and objects are id-keyed maps; object_ids/group_ids are arrays. Add notes only when useful for audit or speaker context.
{
"id": "s01_overview",
"title": "Overview",
"layout_tree": {
"slide_size": { "width": 13.333, "height": 7.5 },
"root_group_id": "root",
"groups": { "root": { "id": "root", "role": "slide", "layout_mode": "absolute", "object_ids": ["title"], "group_ids": [], "bbox": { "x": 0, "y": 0, "width": 13.333, "height": 7.5 } } },
"objects": { "title": { "id": "title", "kind": "text", "role": "title", "classification": "content", "content": { "text": "Overview" }, "style": { "font_size": 30, "color": "#111827" }, "bbox": { "x": 0.75, "y": 0.55, "width": 8.5, "height": 0.65 }, "z_index": 2 } }
}
}
Layout Grid & Safe Margins
- Reserve a content-safe margin on every edge; default 0.5 in for 13.333×7.5 in slides. Only
layout_design full-bleed bands may cross an edge.
- Use a consistent column grid, e.g. 12 columns with 0.2–0.25 in gutters; align sibling cards to shared tops, widths, and heights.
- Keep a vertical rhythm: title band first, then content below the title rule, e.g. y ≤ 1.3 in.
- No
content object may extend past the slide bounds (0,0)–(width,height) or into the safe margin.
- A
footer object may enter the declared footer rail. It must stay on the
slide canvas and cannot overlap a content object.
Groups
- Each group must include
id, role, layout_mode, object_ids, group_ids, and bbox.
- Use
layout_mode: "absolute" for generated slides to make the coordinate contract explicit.
- Keep group IDs unique and stable for audit repairs.
- Keep every child inside its parent
bbox; siblings at the same level must not overlap unless one is layout_design behind the other.
- Use groups for semantic organization and audit readability; coordinates remain final object coordinates.
Objects
- Every object must include
id, kind, role, classification, content, style, bbox, and z_index.
- Supported
kind values: text, shape, image, line, table.
classification is layout_design for decorative/background objects, content for meaningful text, tables, lines, and media.
- Shape names:
rect, round_rect, oval, triangle, diamond, hexagon, parallelogram, chevron, pentagon, trapezoid, and arrow variants.
- Shape content must include
content.shape; text on a shape uses content.text. Image content uses content.path, content.blob_base64, and content.alt.
- Meaningful images require
content.alt. Decorative images must have
classification: "layout_design" and must not appear in the slide reading
order.
- A sourced metric, chart value, quotation, or factual claim requires
source_ref with source_id, locator, claim_type, and
verification_status. Use locator for a page, figure, table, section, or
spreadsheet range.
- Table content uses
content.rows; make column widths sum to bbox.width, size rows for wrapped text, and split long tables with repeated headers.
- Line content must include
content.x1, content.y1, content.x2, and content.y2.
- Connectors anchor to edge midpoints, leave a small node-border gap, and route around other nodes.
- Do not use
chart objects. Build charts from editable text, shapes, lines, and tables. A chart image may support the slide, but it cannot be the only presentation of editable chart values or labels.
Styling
- Every text-bearing object and table must include
style.font_size and style.color.
- Every line object must include
style.line and style.line_width.
- Every shape object must include
content.shape, style.fill, and style.line.
- Specify text color with
style.color; do not rely on inferred contrast or default text color.
- Use a consistent
z_index stack: background band (0) < card/panel (1) < rule (2) < image/diagram (3) < body text (4) < label/badge (5) < callout/number (6). Decorative overlaps are allowed only when the lower object is layout_design.
- When text sits on a shape or card, inset the text bbox by ≤0.1 in on each side from the shape bbox and size the text to that inner area, so on-card text never overflows the card.
- Every normal content slide must include at least one
layout_design object or style-derived visual structure such as an accent band, card shell, divider, signature shape, or image treatment.
- Do not use a raster or SVG as the full content of a slide. When a source visual contains essential text, labels, numbers, or a legend, recreate that information with editable native objects. Keep the original visual only as an optional supporting asset or hidden reference.
Type Scale
Recommended/minimum pt: title 24–32/20; H2 16–20/14; claim 13–15/12; body 11–12/10; evidence 10–11/10; label 9–10/9; footer/meta 8–9/8. Decorative layout_design text may go below the content floor; any content text must stay at 9 pt or above.
Build Contract (spec → PPTX)
No renderer is bundled. Author the JSON spec and a small python-pptx build script. To keep rendered output matching audited coordinates:
- Start each slide from blank layout
slide_layouts[6] so placeholders, theme text, and bullet styles do not leak in.
- Place every object from its
bbox with Inches(...) geometry; never rely on placeholder auto-position.
- For every text frame set
word_wrap = True and auto_size = MSO_AUTO_SIZE.NONE; disable shape autofit/auto-grow.
- Zero or shrink default text insets (
margin_left/right/top/bottom), or subtract them from capacity estimates.
- Set vertical anchor (
MSO_ANCHOR) and horizontal alignment (PP_ALIGN) explicitly.
- Map
style.font_size→Pt, colors→RGBColor, style.line_width→Pt/Emu, dash→MSO_LINE_DASH_STYLE.
- Preserve image aspect ratio (see
pptx-visual-assets); do not stretch to a mismatched bbox.
- Mark hidden slides with
show="0" and keep them last.
- Reject every zero or negative bbox before adding a shape, line, image, table,
or text box. A valid ZIP package can still contain geometry that PowerPoint
will not open.
- Write a small build manifest with the builder path, input spec path, output
PPTX path, slide count, and build warnings. Do not add a generic renderer only
to create this manifest.
A JSON-audit pass can still overflow if the build script skips these text-frame controls.
Repair Rules
- If content collides, edit bboxes, z-order, grouping, slide density, or split the slide.
- If text overflows, shorten copy, enlarge the bbox, or split content across slides. Lower
font_size only as a last resort, and never below the type scale minimum.
- For CJK or other full-width text, halve the Latin character-capacity estimate so dense Japanese/Chinese/Korean copy does not silently overflow.
- If an object sits outside the slide bounds or inside the safe margin, move or resize it back inside; only
layout_design full-bleed bands may cross an edge.
- If an object is misplaced, repair the final coordinates directly; do not add layout hints expecting a later tool to resolve them.
1---2name: pptx-slide-specification3description: Author or repair coordinate-explicit JSON specifications for editable PPTX decks.4---56# PPTX Slide Specification78Use this skill when writing or repairing a coordinate-explicit JSON deck spec.910Author final coordinates directly in `layout_tree`; plugin scripts will not choose layouts, measure browser boxes, or shrink text to fit. Split dense material across slides rather than relying on tiny fonts.1112## Workflow13141. Define slide messages, design context, and slide size.152. Create each slide with `id`, `title`, and complete `layout_tree`.163. Place groups and objects with final inch bboxes, z-order, and styles.174. Add at least one style-derived `layout_design` element on normal content slides.185. Audit collisions, density, font sizes, and default-theme failures.1920## Deck Shape2122- Return a JSON object with top-level `slides`; use stable readable IDs such as `s01_overview`.23- Use top-level `summary` for audit metadata. Newly generated decks require `summary.design_context` unless a user-provided brand guide or reference PPTX is documented as the primary style source.24- Record design profile IDs, source URLs, and license IDs in `summary.design_context` when using design references.25- Use `render_mode: "layout"` or omit it for generated decks. OOXML mode is only for extracted specs with `ooxml_elements`.26- Every generated slide must include `layout_tree`; do not rely on shorthand layout specs.27- Production decks must also include `summary.layout_policy` and28 `summary.accessibility`. They define the usable content region and document29 language before the PPTX is built.3031### Production Metadata3233Use this compact form for production decks. Values may change for a different34slide size or an approved design system, but all values must be explicit.3536```json37{38 "summary": {39 "layout_policy": {40 "safe_margin": 0.5,41 "content_bottom": 6.7,42 "footer_top": 6.85,43 "minimum_gap": 0.1244 },45 "accessibility": {46 "language": "en-US",47 "presentation_title": "Quarterly operating review"48 }49 }50}51```5253`content_bottom` must be lower than `footer_top`. Content objects must end at54or above `content_bottom`. Footer objects may use the space from `footer_top`55to the slide edge. A footer never overlaps content.5657## Slide Fields5859- Each generated slide must include `id`, `title`, and `layout_tree`.60- Production slides must include `accessibility.reading_order`, an ordered list61 of meaningful object IDs. The order must follow the intended reading sequence.62- Use `hidden: true` only for appendix/reference slides that should remain in the PPTX package but not appear during normal presentation.63- Do not use `pattern`, `layout_pattern`, `composition.pattern`, `layout`, `sections`, `bullets`, `objects`, or `theme` as render-time shorthand. Decide all positions, sizes, z-order, colors, font sizes, and relationships in the JSON before rendering.64- Do not overfill a slide: prefer three to five major content groups.65- Do not ship default `python-pptx`-looking slides: plain white background, Calibri-only text, default theme colors, and bullet-only layouts are design failures unless explicitly requested.6667## Layout Tree6869- Required keys: `slide_size` (`width`, `height` in inches), `root_group_id`, `groups` keyed by ID, and `objects` keyed by ID.70- `groups` and `objects` are id-keyed maps; `object_ids`/`group_ids` are arrays. Add `notes` only when useful for audit or speaker context.7172```json73{74 "id": "s01_overview",75 "title": "Overview",76 "layout_tree": {77 "slide_size": { "width": 13.333, "height": 7.5 },78 "root_group_id": "root",79 "groups": { "root": { "id": "root", "role": "slide", "layout_mode": "absolute", "object_ids": ["title"], "group_ids": [], "bbox": { "x": 0, "y": 0, "width": 13.333, "height": 7.5 } } },80 "objects": { "title": { "id": "title", "kind": "text", "role": "title", "classification": "content", "content": { "text": "Overview" }, "style": { "font_size": 30, "color": "#111827" }, "bbox": { "x": 0.75, "y": 0.55, "width": 8.5, "height": 0.65 }, "z_index": 2 } }81 }82}83```8485## Layout Grid & Safe Margins8687- Reserve a content-safe margin on every edge; default 0.5 in for 13.333×7.5 in slides. Only `layout_design` full-bleed bands may cross an edge.88- Use a consistent column grid, e.g. 12 columns with 0.2–0.25 in gutters; align sibling cards to shared tops, widths, and heights.89- Keep a vertical rhythm: title band first, then content below the title rule, e.g. y ≤ 1.3 in.90- No `content` object may extend past the slide bounds (0,0)–(width,height) or into the safe margin.91- A `footer` object may enter the declared footer rail. It must stay on the92 slide canvas and cannot overlap a content object.9394## Groups9596- Each group must include `id`, `role`, `layout_mode`, `object_ids`, `group_ids`, and `bbox`.97- Use `layout_mode: "absolute"` for generated slides to make the coordinate contract explicit.98- Keep group IDs unique and stable for audit repairs.99- Keep every child inside its parent `bbox`; siblings at the same level must not overlap unless one is `layout_design` behind the other.100- Use groups for semantic organization and audit readability; coordinates remain final object coordinates.101102## Objects103104- Every object must include `id`, `kind`, `role`, `classification`, `content`, `style`, `bbox`, and `z_index`.105- Supported `kind` values: `text`, `shape`, `image`, `line`, `table`.106- `classification` is `layout_design` for decorative/background objects, `content` for meaningful text, tables, lines, and media.107- Shape names: `rect`, `round_rect`, `oval`, `triangle`, `diamond`, `hexagon`, `parallelogram`, `chevron`, `pentagon`, `trapezoid`, and arrow variants.108- Shape content must include `content.shape`; text on a shape uses `content.text`. Image content uses `content.path`, `content.blob_base64`, and `content.alt`.109- Meaningful images require `content.alt`. Decorative images must have110 `classification: "layout_design"` and must not appear in the slide reading111 order.112- A sourced metric, chart value, quotation, or factual claim requires113 `source_ref` with `source_id`, `locator`, `claim_type`, and114 `verification_status`. Use `locator` for a page, figure, table, section, or115 spreadsheet range.116- Table content uses `content.rows`; make column widths sum to `bbox.width`, size rows for wrapped text, and split long tables with repeated headers.117- Line content must include `content.x1`, `content.y1`, `content.x2`, and `content.y2`.118- Connectors anchor to edge midpoints, leave a small node-border gap, and route around other nodes.119- Do not use `chart` objects. Build charts from editable text, shapes, lines, and tables. A chart image may support the slide, but it cannot be the only presentation of editable chart values or labels.120121## Styling122123- Every text-bearing object and table must include `style.font_size` and `style.color`.124- Every line object must include `style.line` and `style.line_width`.125- Every shape object must include `content.shape`, `style.fill`, and `style.line`.126- Specify text color with `style.color`; do not rely on inferred contrast or default text color.127- Use a consistent `z_index` stack: background band (0) < card/panel (1) < rule (2) < image/diagram (3) < body text (4) < label/badge (5) < callout/number (6). Decorative overlaps are allowed only when the lower object is `layout_design`.128- When text sits on a shape or card, inset the text bbox by ≤0.1 in on each side from the shape bbox and size the text to that inner area, so on-card text never overflows the card.129- Every normal content slide must include at least one `layout_design` object or style-derived visual structure such as an accent band, card shell, divider, signature shape, or image treatment.130- Do not use a raster or SVG as the full content of a slide. When a source visual contains essential text, labels, numbers, or a legend, recreate that information with editable native objects. Keep the original visual only as an optional supporting asset or hidden reference.131132### Type Scale133134Recommended/minimum pt: title 24–32/20; H2 16–20/14; claim 13–15/12; body 11–12/10; evidence 10–11/10; label 9–10/9; footer/meta 8–9/8. Decorative `layout_design` text may go below the content floor; any `content` text must stay at 9 pt or above.135136## Build Contract (spec → PPTX)137138No renderer is bundled. Author the JSON spec **and** a small `python-pptx` build script. To keep rendered output matching audited coordinates:139140- Start each slide from blank layout `slide_layouts[6]` so placeholders, theme text, and bullet styles do not leak in.141- Place every object from its `bbox` with `Inches(...)` geometry; never rely on placeholder auto-position.142- For every text frame set `word_wrap = True` and `auto_size = MSO_AUTO_SIZE.NONE`; disable shape autofit/auto-grow.143- Zero or shrink default text insets (`margin_left/right/top/bottom`), or subtract them from capacity estimates.144- Set vertical anchor (`MSO_ANCHOR`) and horizontal alignment (`PP_ALIGN`) explicitly.145- Map `style.font_size`→`Pt`, colors→`RGBColor`, `style.line_width`→`Pt`/`Emu`, dash→`MSO_LINE_DASH_STYLE`.146- Preserve image aspect ratio (see `pptx-visual-assets`); do not stretch to a mismatched bbox.147- Mark hidden slides with `show="0"` and keep them last.148- Reject every zero or negative bbox before adding a shape, line, image, table,149 or text box. A valid ZIP package can still contain geometry that PowerPoint150 will not open.151- Write a small build manifest with the builder path, input spec path, output152 PPTX path, slide count, and build warnings. Do not add a generic renderer only153 to create this manifest.154155A JSON-audit pass can still overflow if the build script skips these text-frame controls.156157## Repair Rules158159- If content collides, edit bboxes, z-order, grouping, slide density, or split the slide.160- If text overflows, shorten copy, enlarge the bbox, or split content across slides. Lower `font_size` only as a last resort, and never below the type scale minimum.161- For CJK or other full-width text, halve the Latin character-capacity estimate so dense Japanese/Chinese/Korean copy does not silently overflow.162- If an object sits outside the slide bounds or inside the safe margin, move or resize it back inside; only `layout_design` full-bleed bands may cross an edge.163- If an object is misplaced, repair the final coordinates directly; do not add layout hints expecting a later tool to resolve them.