Skip to content

AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He

refactor(prompts): tighten beautify, image-to-pptx, and edit-native-pptx

hugohe3230989683d87
diff --git a/skills/ppt-master/scripts/prompt_audit_manifest.json b/skills/ppt-master/scripts/prompt_audit_manifest.json
index 44eeb612..fb742d30 100644
--- a/skills/ppt-master/scripts/prompt_audit_manifest.json
+++ b/skills/ppt-master/scripts/prompt_audit_manifest.json
@@ -61,7 +61,10 @@
"skills/ppt-master/workflows/stages/web-image-review.md": 750,
"skills/ppt-master/references/visual-review.md": 3500,
"skills/ppt-master/workflows/stages/visual-review.md": 1750,
- "skills/ppt-master/workflows/stages/generate-audio.md": 4000
+ "skills/ppt-master/workflows/stages/generate-audio.md": 4000,
+ "skills/ppt-master/workflows/profiles/beautify-pptx.md": 5000,
+ "skills/ppt-master/workflows/profiles/image-to-pptx.md": 3250,
+ "skills/ppt-master/workflows/edit-native-pptx.md": 4250
},
"load_sets": {
"bootstrap.routing": {
@@ -2095,7 +2098,7 @@
{
"path": "skills/ppt-master/workflows/profiles/beautify-pptx.md",
"role": "producer",
- "fingerprint": "308c0a3ef9d9",
+ "fingerprint": "e1bd978fcc83",
"reason": "This producer projects the owner field into the planning contract."
}
]
diff --git a/skills/ppt-master/workflows/edit-native-pptx.md b/skills/ppt-master/workflows/edit-native-pptx.md
index f149705e..e1d32612 100644
--- a/skills/ppt-master/workflows/edit-native-pptx.md
+++ b/skills/ppt-master/workflows/edit-native-pptx.md
@@ -4,90 +4,62 @@ description: Edit Native PPTX route — import a finished PowerPoint deck into a
# Edit Native PPTX Route
-> Run when the user brings an existing `.pptx` whose design must survive — as a template to fill with new content, as a deck to partially rewrite or restructure, or as a finished deck that only needs notes, narration, timings, or transitions. This route never regenerates the deck from scratch and never runs the Generate SVG pipeline.
+> Run when the user brings an existing `.pptx` whose design must survive — a template to fill, a deck to partially rewrite or restructure, or a finished deck that only needs notes, narration, timings, or transitions. Never regenerates from scratch and never runs the Generate SVG pipeline.
-The source deck becomes a `pptx_to_svg.py --roundtrip` workspace. Every source slide is available as a compact editable SVG plus immutable native backing. Pages the plan leaves untouched are **referenced**: export restores their original slide XML byte-for-byte. Pages the plan edits are rebuilt only where they changed; every unchanged object on them restores its native form. Notes, narration audio, and motion are overlays on the preserved slide and never rewrite visible content.
-
-**Boundary against other routes**:
+The source deck becomes a `pptx_to_svg.py --roundtrip` workspace: every slide is a compact editable SVG plus immutable native backing. Untouched pages are **referenced** and restored byte-for-byte; edited pages rebuild only what changed while unchanged objects restore natively; notes, narration, and motion are overlays that never rewrite visible content.
| User wants | Route |
|---|---|
-| Fill a raw PPTX template with new content, keep its design | This route |
-| Keep a finished PPTX, add speaker notes / narration / auto-advance / transitions | This route |
-| Rewrite some pages of a finished PPTX, keep the rest exactly | This route |
-| Drop, reorder, or repeat pages of an existing PPTX without redesign | This route |
-| Regenerate every page with a new visual design (beautify, 1:1) | Generate PPTX, [`beautify-pptx`](./profiles/beautify-pptx.md) |
-| Split / merge / re-outline an existing PPTX into a new deck | Generate PPTX, PPTX as source material |
-| Create a reusable brand / style / layout / deck asset from the PPTX | [`create-template`](./create-template.md) |
+| Fill a raw PPTX template with new content, keep its design; add notes / narration / auto-advance / transitions; rewrite some pages and keep the rest; drop, reorder, or repeat pages without redesign | This route |
+| Regenerate every page with a new visual design (1:1) | Generate PPTX, [`beautify-pptx`](./profiles/beautify-pptx.md) |
+| Split / merge / re-outline into a new deck | Generate PPTX, PPTX as source material |
+| Create a reusable brand / style / layout / deck asset | [`create-template`](./create-template.md) |
-**Hard rule — no Generate pipeline**: Do not run `pptx_template_import.py`, `project_manager.py init`, `finalize_svg.py`, or create `svg_output/` for this route. The round-trip workspace is the project; `svg_to_pptx.py --roundtrip` is the only exporter that restores source slides.
+**Hard rule — no Generate pipeline**: never run `pptx_template_import.py`, `project_manager.py init`, or `finalize_svg.py`, and never create `svg_output/`; the round-trip workspace is the project and `svg_to_pptx.py --roundtrip` is the only exporter that restores source slides.
---
## 1. When to Run
-| Pattern | Example |
-|---|---|
-| Raw PPTX called a template + new material or topic | "Use this PowerPoint template to make a deck about X" |
-| Existing deck + selective reuse | "Only keep the pages that fit, in this order" |
-| Existing deck + copy replacement | "Keep the design, swap in this text" |
-| Existing deck + page-level rewrite | "Redo page 5 and 7, leave everything else" |
-| Existing deck + page combination | "Merge the two market pages into one, drop the old chart, add the new KPI" |
-| Existing deck as skeleton + a few new pages | "Keep the deck, add a summary page and a Q3 page in the same style" |
-| Finished deck + delivery add-ons, visible slides stable | "Add narration and auto-play", "add fade transitions", "write speaker notes" |
-
-**Deterministic routing**: Do not ask a route-choice question for these shapes. Ask one discriminator only when the request is ambiguous between preserving pages (this route) and redesigning them (Generate).
+Raw PPTX called a template + new material or topic; existing deck + selective reuse ("only keep the pages that fit, in this order"), copy replacement, page-level rewrite ("redo page 5 and 7"), page combination ("merge the two market pages"), or a few new pages in the same style; finished deck + delivery add-ons with visible slides stable. Never ask a route-choice question for these shapes; ask one discriminator only when preserving (this route) and redesigning (Generate) are genuinely ambiguous.
---
## 2. Inputs
-🚧 **GATE**: The user has provided:
-
-| Input | Required | Notes |
-|---|---:|---|
-| Source PPTX | Yes | Finished deck or template; the native design authority |
-| New material | Only when content changes | Text, Markdown, documents, or URLs converted with `source_to_md.py`. A bare topic without facts is not enough: ask for material, or gather it from user-approved URLs before planning |
-| Delivery intent | Optional | Audience, page count, must-keep / must-drop pages, notes, narration, transitions, auto-advance |
+🚧 **GATE**: source PPTX (required — the native design authority); new material only when content changes (text, Markdown, documents, or URLs converted with `source_to_md.py`; a bare topic without facts is not enough — ask for material or gather it from user-approved URLs); optional delivery intent (audience, page count, must-keep / must-drop pages, notes, narration, transitions, auto-advance).
-**Hard rule — facts**: Every substantive claim written into a page or a note comes from the user material; the §4.3 content mapping names the source for each page, and a page without one is dropped. Placeholder wording in the template is never carried into the output as content.
+**Hard rule — facts**: every substantive claim in a page or note comes from the user material; the §4.3 content mapping names the source for each page and a page without one is dropped; template placeholder wording never becomes output content.
---
## 3. Import the Round-trip Workspace
-Create the workspace directly under `projects/`; it is the project.
-
```bash
-python3 skills/ppt-master/scripts/pptx_to_svg.py "<source.pptx>" \
- -o "projects/<slug>_<YYYYMMDD>" --inheritance-mode both --roundtrip
+python3 skills/ppt-master/scripts/pptx_to_svg.py "<source.pptx>" -o "projects/<slug>_<YYYYMMDD>" --inheritance-mode both --roundtrip
```
| Path | Content | Reading rule |
|---|---|---|
-| `authoring-svg-flat/slide_NN.svg` | One compact editable SVG per source slide, in source order | Open only the pages you will edit or need to judge for reuse |
-| `authoring-svg-flat/authoring_summary.json` | Roster plus per-page canvas, text, image, vector, placeholder, source-ref, and source-proxy counts | Read first; plan from it before opening any SVG |
-| `images/`, `icons/imported/`, `audio/`, `video/`, `sounds/` | Source media and imported decorative vectors | Keep names. Export hashes materialized files; changed bytes rebuild every output page whose source Slide/Layout/Master/notes graph references that package part, and a format mismatch fails export |
-| `notes/slide_NN.md` | Source speaker notes when present | Edit, delete, or add per output page (§6) |
-| `native-payloads/`, `analysis/` | Immutable native backing and tool-owned contracts | Tool-owned; opening them costs context and changes nothing — do not read, edit, or quote |
-| `sources/source.pptx` | Exact source package | Read only through `ppt_to_md.py "<workspace>/sources/source.pptx" -o "<workspace>/validation/source_readback.md"` when you need page text without opening every SVG (notes on unchanged pages, content mapping) |
+| `authoring-svg-flat/slide_NN.svg` | One compact editable SVG per source slide, in order | Open only pages you will edit or must judge for reuse |
+| `authoring-svg-flat/authoring_summary.json` | Roster plus per-page canvas, text, image, vector, placeholder, source-ref, and proxy counts | Read first; plan from it before opening any SVG |
+| `images/`, `icons/imported/`, `audio/`, `video/`, `sounds/` | Source media and imported vectors | Keep names; changed bytes rebuild every output page whose source graph references that part, and a format mismatch fails export |
+| `notes/slide_NN.md` | Source speaker notes | Edit, delete, or add per output page (§6) |
+| `native-payloads/`, `analysis/` | Immutable native backing and tool-owned contracts | Do not read, edit, or quote |
+| `sources/source.pptx` | Exact source package | Read only through `ppt_to_md.py "<workspace>/sources/source.pptx" -o "<workspace>/validation/source_readback.md"` when you need page text without opening every SVG |
| `validation/`, `exports/` | Diagnostics and published decks | Tool-written |
-**Hard rule — source proxies are atomic**: An `<image data-pptx-source-proxy="native-restore">` element stands for an unsupported native object (SmartArt, complex effects, media frames). Leave it unchanged to restore the original object; a Slide-local proxy may be deleted; an inherited Master/Layout proxy stays. Editing a proxy or its preview asset fails export.
+**Hard rule — source proxies are atomic**: an `<image data-pptx-source-proxy="native-restore">` stands for an unsupported native object (SmartArt, complex effects, media frames). Leave it to restore the original; a Slide-local proxy may be deleted, an inherited Master/Layout proxy stays; editing a proxy or its preview asset fails export.
---
## 4. Plan the Output Deck
-**Default — layout-first selection (may override when the user fixes the page mapping)**: Treat the roster as a slide library, not an outline. A source page's layout already encodes a rhetorical shape — hero statement, lead-then-detail, comparison, stepwise progression, metric row, dense explanation. Match each target message to a page whose structure expresses that same logic; drop the content or the page rather than force a fit. Use fewer pages than the source when that reads better; repeat one good layout for several messages when they share its pattern.
-
-**Default — source order is not the outline (may override when the user asks to preserve it)**: The target story controls output order. Source slides may move, be omitted, or be reused several times.
-
-**Default — skeleton first (may override when the user asks for new pages)**: The source deck is the reference material and the skeleton of the output. Most output pages keep a source page's structure; sub-content may be recombined freely across pages, and new pages are added where the story needs them rather than as a rule.
+**Defaults (may override when the user fixes the mapping, asks to preserve order, or asks for new pages)**: treat the roster as a slide library, not an outline — a source page's layout already encodes a rhetorical shape (hero statement, lead-then-detail, comparison, progression, metric row, dense explanation), so match each target message to a page whose structure expresses the same logic and drop content or the page rather than force a fit; the target story controls order, so source slides may move, be omitted, or be reused; the source deck is the skeleton — most output pages keep a source structure, sub-content recombines freely, and new pages appear where the story needs them.
### 4.1 Page plan
-Write `page_plan.json` at the workspace root only when the output differs from the source roster (subset, reorder, repeat, or a copied page). Without the file, export is the identity round trip and every page is referenced or edited in place.
+Write `page_plan.json` at the workspace root only when the output differs from the source roster (subset, reorder, repeat, or a copied page); without it export is the identity round trip.
```json
{
@@ -96,117 +68,75 @@ Write `page_plan.json` at the workspace root only when the output differs from t
{"source_slide": 1},
{"source_slide": 4, "svg": "chapter_market.svg"},
{"source_slide": 7},
- {"source_slide": 7, "svg": "kpi_second_half.svg"},
- {"source_slide": 12}
+ {"source_slide": 7, "svg": "kpi_second_half.svg"}
]
}
```
-| Field | Rule |
-|---|---|
-| `pages` | Complete output order; non-empty |
-| `source_slide` | One-based source index of the page whose native slide backs this output page |
-| `svg` | Authoring filename inside `authoring-svg-flat/`; omit to use that source page's `slide_NN.svg`. To reuse one source page twice, copy its SVG to a new name (`cp slide_07.svg kpi_second_half.svg`) and list the copy — every output page needs a distinct file, and every extra file must appear in the plan |
-
-Only `schema` and `pages` at the root and `source_slide` / `svg` per page are accepted; the exporter rejects any other field.
-
-**Forbidden — plans the exporter refuses** (fail-closed, fix the plan instead of forcing):
-- A same-deck slide jump whose destination is omitted or repeated (include the target exactly once, or remove the link from the page)
-- Unknown, duplicated, or cross-owned `svg` filenames; `source_slide` out of range
+`pages` is the complete non-empty output order; `source_slide` is the one-based source index whose native slide backs the page; `svg` is the authoring filename inside `authoring-svg-flat/`, omitted to use that page's `slide_NN.svg` — to reuse a source page twice, copy its SVG under a new name and list the copy, since every output page needs a distinct file and every extra file must appear in the plan. Only these fields are accepted. **Forbidden — plans the exporter refuses**: a same-deck slide jump whose destination is omitted or repeated; unknown, duplicated, or cross-owned `svg` filenames; `source_slide` out of range. Omitting a slide drops the audio, video, or undecodable payloads only it owns (export prints a note). With a plan, presentation-level sections and custom shows are dropped and slide ids renumbered.
-Omitting a source slide deliberately drops the audio, video, or undecodable payloads only that slide owns; export prints a note listing them.
-
-**Combining pages**: One output page always has exactly one skeleton — its `source_slide`. To merge several source pages, pick the page whose layout carries the result as the skeleton, then copy the needed elements from the other pages' SVGs into it and delete what the merged page no longer needs. Bring an object across pages only through the adopt command below — never by pasting raw SVG, because source refs are page-local and a pasted object would be mistaken for one of the skeleton's own. The adopted object keeps its visual form by materializing effective inherited presentation attributes (including `font-family`, `fill`, `opacity`, and CSS-resolved values) and composing ancestor transforms onto the copy. It loses its native identity and is rebuilt from SVG, so the combined page counts as `rebuilt`. A source proxy (§3) cannot leave its own page; a merge that needs one keeps that page as the skeleton instead.
+**Combining pages**: one output page has exactly one skeleton (`source_slide`). To merge, pick the page whose layout carries the result, then bring objects from other pages only through the adopt command — never pasted raw SVG, because source refs are page-local. The adopted object materializes its effective inherited presentation attributes and ancestor transforms, loses native identity, and makes the page `rebuilt`; a source proxy cannot leave its page, so a merge that needs one keeps that page as the skeleton. The object lands at the end of the target page for normal editing.
```bash
-python3 skills/ppt-master/scripts/svg_authoring_view.py \
- "projects/<slug>_<YYYYMMDD>/authoring-svg-flat" \
- --adopt-object slide_05.svg:<element-id> --into chapter_market.svg
+python3 skills/ppt-master/scripts/svg_authoring_view.py "projects/<slug>_<YYYYMMDD>/authoring-svg-flat" --adopt-object slide_05.svg:<element-id> --into chapter_market.svg
```
-The object lands at the end of the target page; then edit its position and content like any authored element.
-
-**New pages**: A brand-new page also needs a skeleton so it inherits the deck's Master/Layout (background, logo, page number). Copy the closest source page under a new name, list it in the plan with that page's `source_slide`, delete its Slide-local content, and author the new content on the empty canvas; inherited proxies stay. The page counts as `rebuilt`.
-
-> Note: with a plan present, presentation-level sections and custom shows are dropped and slide ids are renumbered; visible slides are unaffected.
+**New pages** need a skeleton too: copy the closest source page under a new name, list it with that page's `source_slide`, delete its Slide-local content, and author on the empty canvas (inherited proxies stay); the page is `rebuilt`.
### 4.2 Enhancement modules
| Module | Default | Carrier |
|---|---|---|
-| Speaker notes | Source notes travel with every page; add or rewrite only where the plan says | `notes/<svg-stem>.md` |
+| Speaker notes | Source notes travel with every page; add or rewrite only where planned | `notes/<svg-stem>.md` |
| Narration audio | Off unless requested; implies notes on every output page | [`generate-audio`](./stages/generate-audio.md) → `audio/<stem>.*` |
| Auto-advance from narration | On when narration is requested | `svg_to_pptx.py --use-narration-timings` |
| Page transitions | Preserve source; replace only on request | `svg_to_pptx.py -t <effect>` or per-slide rows in `animations.json` |
-| Object animations | Preserve source; author only on explicit request | `animations.json`, see [`animations.md`](../references/animations.md) |
-| Native chart / table data | Source data unless the plan edits it | Inline JSON authority on the page; export needs `--native-charts-and-tables` (§7) |
+| Object animations | Preserve source; author only on explicit request | `animations.json`, [`animations.md`](../references/animations.md) |
+| Native chart / table data | Source data unless the plan edits it | Inline JSON authority; export needs `--native-charts-and-tables` (§7) |
### 4.3 Confirmation
-⛔ **BLOCKING**: Present one plan and wait for explicit confirmation before editing any SVG, writing notes, generating audio, or exporting:
-
-| Item | Show |
-|---|---|
-| Output roster | Ordered list: output page → source slide → referenced unchanged / edited / new copy, with a one-line reason for each edited or dropped page |
-| Content mapping | Which material goes to which page; anything dropped for lack of a fitting layout |
-| Enhancement modules | Each module on/off with its effect and duration where relevant |
-| Known refusals | Any §4.1 fail-closed case the plan must avoid |
-
-Chat confirmation is sufficient; write `page_plan.json` after confirmation.
+⛔ **BLOCKING**: present one plan and wait for explicit confirmation before editing any SVG, writing notes, generating audio, or exporting: the output roster (output page → source slide → referenced / edited / new copy, with a one-line reason per edited or dropped page), the content mapping (which material goes where, what is dropped for lack of a fitting layout), each enhancement module on/off with its effect and duration, and any §4.1 fail-closed case the plan must avoid. Chat confirmation suffices; write `page_plan.json` afterwards.
---
## 5. Edit Pages
-Load [`shared-standards-core.md`](../references/shared-standards-core.md) before the first edit. Load [`svg-effects.md`](../references/svg-effects.md) only when authoring new visual elements, and [`native-data-interface.md`](../references/native-data-interface.md) only when changing native chart or table data.
+Load [`shared-standards-core.md`](../references/shared-standards-core.md) before the first edit; [`svg-effects.md`](../references/svg-effects.md) only when authoring new visual elements; [`native-data-interface.md`](../references/native-data-interface.md) only when changing native chart or table data.
-**Hard rule — edit only planned pages**: A page marked referenced is not opened for writing. Export proves it: a referenced page appears under `passthrough` / `cloned_passthrough` (no overlay) or `patched` (notes or motion overlay only) in the receipt (§7) — never under `rebuilt`.
-
-**Hard rule — edit in place, keep identity**: Change text, paint, position, or content inside the existing page tree. Keep every `data-pptx-*` attribute on objects you did not intend to change; an object whose source attributes survive is restored natively, an object you rewrote is converted from your SVG. Do not paste a page from `svg_output/` conventions or another deck over a round-trip page.
+**Hard rule — edit only planned pages**: a referenced page is never opened for writing; export proves it by listing it under `passthrough` / `cloned_passthrough` or `patched`, never `rebuilt`. **Hard rule — edit in place, keep identity**: change text, paint, position, or content inside the existing tree and keep every `data-pptx-*` attribute on objects you did not intend to change — surviving attributes restore natively, rewritten objects convert from your SVG. Never paste a page from `svg_output/` conventions or another deck over a round-trip page.
| Edit | Rule |
|---|---|
-| Text replacement | Fit the slot's visual capacity from its geometry and font size, not the old placeholder length. Resolve overflow in this order: rewrite shorter → split across another selected page → choose a larger source layout; shrinking type is last and never deck-wide. §5's capacity gate rejects text that leaves its frame |
+| Text replacement | Fit the slot's visual capacity from its geometry and font size, not the old placeholder length; resolve overflow by rewriting shorter → splitting across another selected page → choosing a larger source layout; shrinking type is last and never deck-wide |
| Cover / chapter pages | Replace title, subtitle, author, section label only |
-| Dense content pages | Compress material to the slot count the page already has; move overflow to another selected page |
-| Native tables | Imported tables carry `data-pptx-native-authority="json"`; edit cell text in that inline `ppt-master.semantic-table.v2` JSON and keep row/column structure unless the design calls for a different table. Export with `--native-charts-and-tables` (§7) — without it the stale preview ships |
-| Native charts | Imported charts carry the same JSON authority; edit categories and series values there and leave chart type and formatting to the source. Same export flag |
-| Images | Replace by pointing the existing `<image>` at a new file under `images/`; keep the frame |
-| New elements | Author canonical compact SVG per shared standards; icons come from `icon_sync.py "<workspace>" <lib/name>`; AI images from `image_gen.py --manifest` when the user wants generated visuals |
-| Objects from another page | Use `--adopt-object` (§4.1); it strips source identity, inlines cross-page vector assets, and keeps chart/table JSON authority. Never paste raw SVG across pages; proxies cannot move |
+| Dense content pages | Compress to the slot count the page has; move overflow to another selected page |
+| Native tables / charts | Imported objects carry `data-pptx-native-authority="json"`: edit cell text or categories/series values in the inline JSON, keep structure and formatting from the source, and export with `--native-charts-and-tables` — without it the stale preview ships |
+| Images | Point the existing `<image>` at a new file under `images/`; keep the frame |
+| New elements | Canonical compact SVG per shared standards; icons via `icon_sync.py "<workspace>" <lib/name>`; AI images via `image_gen.py --manifest` when wanted |
+| Objects from another page | `--adopt-object` only (§4.1); proxies cannot move |
| Source proxies | Leave or delete; never edit (§3) |
-**Mandatory after editing** — refresh the summary (page-plan copies are accepted), then run the capacity gate:
+**Mandatory after editing** — refresh the summary, then run the capacity gate:
```bash
-python3 skills/ppt-master/scripts/svg_authoring_view.py \
- "projects/<slug>_<YYYYMMDD>/authoring-svg-flat" --refresh-summary
+python3 skills/ppt-master/scripts/svg_authoring_view.py "projects/<slug>_<YYYYMMDD>/authoring-svg-flat" --refresh-summary
python3 skills/ppt-master/scripts/svg_quality_checker.py "projects/<slug>_<YYYYMMDD>" --roundtrip
```
-🚧 **GATE**: The checker's `--roundtrip` mode estimates edited text against its frame and canvas. Errors block export until the text is rewritten, split, or moved to a larger layout; warnings are reviewed and either fixed or accepted with a stated reason. The exporter remains the final gate and fails closed on a page it cannot restore or convert.
+🚧 **GATE**: `--roundtrip` estimates edited text against its frame and canvas; errors block export until the text is rewritten, split, or moved to a larger layout, warnings are fixed or accepted with a stated reason. The exporter remains the final gate and fails closed on a page it cannot restore or convert.
---
## 6. Notes, Narration, and Motion
-Skip this section when no module in §4.2 is enabled beyond preserving source notes.
-
-**Notes** — keyed by output SVG stem:
-
-| Case | Behavior |
-|---|---|
-| `notes/<stem>.md` exists for a canonical page | Replaces source notes; delete the file to remove source notes |
-| `notes/<stem>.md` exists for a copied page | Notes for that output page only |
-| No file for a copied page | Inherits the source page's notes |
-
-**Hard rule — spoken prose only**: `svg_to_pptx.py` embeds each note verbatim and `notes_to_audio.py` reads it aloud verbatim, so a heading, bullet, `[tag]`, or duration line is spoken and shown. Write 2–5 natural sentences per content page, one or two for cover / chapter / ending, transitions as prose, one language per deck. Source the content from the page's SVG text or the §3 read-back plus the user material; a note never adds a claim the page or material does not carry.
+Skip when no §4.2 module beyond preserving source notes is enabled.
-**Narration audio**: Run [`generate-audio`](./stages/generate-audio.md) Steps 1–4 with the workspace path after notes are complete (`notes_to_audio.py "<workspace>" --provider <p> --voice <v> --rate <r>`); the source deck's own media in `audio/` (imported files not named after a page) is left alone. `notes_to_audio.py` resolves the roster from `page_plan.json` (copies inherit source notes) and refuses an incomplete roster, listing the missing stems. Audio lands at `audio/<stem>.*` per output page. Stop after audio generation; §7 integrates it.
+**Notes** are keyed by output SVG stem: `notes/<stem>.md` for a canonical page replaces source notes (delete the file to remove them); for a copied page it applies to that output page only, and without a file the copy inherits the source notes. **Hard rule — spoken prose only**: `svg_to_pptx.py` embeds and `notes_to_audio.py` reads each note verbatim, so a heading, bullet, `[tag]`, or duration line is spoken and shown. Write 2–5 natural sentences per content page, one or two for cover / chapter / ending, transitions as prose, one language per deck, sourced from the page's SVG text or the §3 read-back plus user material — a note never adds a claim the page or material does not carry.
-**Motion**: Load [`animations.md`](../references/animations.md) when transitions or object animations are requested. `animations.json` rows are keyed by output SVG stem; a copied page inherits its source row unless it has its own.
+**Narration audio**: run [`generate-audio`](./stages/generate-audio.md) Steps 1–4 with the workspace path after notes are complete; the source deck's own media in `audio/` is left alone; `notes_to_audio.py` resolves the roster from `page_plan.json` (copies inherit) and refuses an incomplete roster. Stop after audio; §7 integrates it.
-**Hard rule — rebuilt animation targets**: Rebuilding an object that a source animation targets (for example a chart whose data you edited) leaves that animation without a target, and export stops with `Edited slide removed source animation target(s)`. Give that page its own row so its motion becomes explicit — `"<stem>": {"animation": {"effect": "none"}}` drops the source build, or author the page's animation in the row — then export again.
+**Motion**: load [`animations.md`](../references/animations.md) when transitions or object animations are requested; `animations.json` rows are keyed by output stem and a copied page inherits its source row unless it has its own. **Hard rule — rebuilt animation targets**: rebuilding an object a source animation targets leaves that animation without a target and export stops with `Edited slide removed source animation target(s)`; give the page its own row — `"<stem>": {"animation": {"effect": "none"}}` drops the source build, or author the page's motion — then export again.
---
@@ -216,67 +146,26 @@ Skip this section when no module in §4.2 is enabled beyond preserving source no
python3 skills/ppt-master/scripts/svg_to_pptx.py "projects/<slug>_<YYYYMMDD>" --roundtrip
```
-| Request | Add |
-|---|---|
-| Replace transitions deck-wide | `-t <effect> [--transition-duration <s>]` |
-| Narration with auto-advance | `--recorded-narration audio --use-narration-timings` (round-trip export reads the workspace `animations.json` by default) |
-| Per-slide motion | `--animation-config animations.json` |
-| Object animation policy | `-a <preset>` (default `none`) |
-| Strip all notes | `--no-notes` |
-| Native chart / table data edited | `--native-charts-and-tables` |
-
-Export writes into `exports/` and prints the exact output path (a `_narrated` or `_native_charts_tables` suffix may apply — use the printed path in every later command) plus one receipt:
+Add `-t <effect> [--transition-duration <s>]` to replace transitions deck-wide; `--recorded-narration audio --use-narration-timings` for narration with auto-advance (round-trip export reads the workspace `animations.json` by default); `--animation-config animations.json` for per-slide motion; `-a <preset>` (default `none`) for object animation policy; `--no-notes` to strip notes; `--native-charts-and-tables` when chart/table data was edited. Export writes into `exports/`, prints the exact output path (a `_narrated` or `_native_charts_tables` suffix may apply — use the printed path afterwards), and one receipt:
```text
Round-trip export summary: output_pages=N passthrough=P cloned_passthrough=C patched=M rebuilt=R
```
-| Bucket | Meaning | Assert |
-|---|---|---|
-| `passthrough` | Identity page, original XML and relationships | Referenced pages without a plan and without any notes/motion overlay |
-| `cloned_passthrough` | Planned page, original XML on a cloned part | Referenced pages with a plan and without any overlay |
-| `patched` | Source shape XML is kept while shape order, notes, transitions, animation, or narration timing may change | Pages with z-order-only edits or package overlays that do not rebuild a source shape |
-| `rebuilt` | Visible authoring or a referenced materialized resource changed | Exactly the pages marked edited in §4.3 plus every output page that references a changed resource — a delivery-only job must show `rebuilt=0` |
+`passthrough` = identity page with original XML (referenced, no plan, no overlay); `cloned_passthrough` = planned referenced page on a cloned part; `patched` = source shape XML kept while order, notes, transitions, animation, or narration timing changed; `rebuilt` = visible authoring or a referenced materialized resource changed — exactly the pages marked edited in §4.3 plus pages referencing a changed resource, and a delivery-only job must show `rebuilt=0`.
-**Validation**:
-
-```bash
-python3 skills/ppt-master/scripts/pptx_delivery_check.py "<printed_output.pptx>" \
- > "projects/<slug>_<YYYYMMDD>/validation/<output_stem>.delivery.json"
-python3 skills/ppt-master/scripts/source_to_md/ppt_to_md.py \
- "<printed_output.pptx>" -o "projects/<slug>_<YYYYMMDD>/validation/readback.md"
-```
-
-| Check | Expected |
-|---|---|
-| Delivery check | No structural errors; review advisories |
-| Slide count | Equals plan length, or source count without a plan |
-| Key titles and replaced text | Present in the read-back |
-| Notes count | Matches planned notes |
-| Receipt buckets | Match the confirmed roster |
+**Validation**: `pptx_delivery_check.py "<printed_output.pptx>" > ".../validation/<output_stem>.delivery.json"` (no structural errors; review advisories) and `ppt_to_md.py "<printed_output.pptx>" -o ".../validation/readback.md"` — slide count equals the plan length (or source count), key titles and replaced text present, notes count matches, receipt buckets match the confirmed roster.
```markdown
## ✅ Edit Native PPTX Complete
-
-- [x] Round-trip workspace imported at `projects/<slug>_<YYYYMMDD>/`
-- [x] Plan confirmed by the user; `page_plan.json` written when the roster differs from the source
+- [x] Round-trip workspace imported at `projects/<slug>_<YYYYMMDD>/`; plan confirmed; `page_plan.json` written when the roster differs
- [x] Only planned pages edited; `authoring_summary.json` refreshed; `svg_quality_checker.py --roundtrip` reports no errors
-- [x] Notes / audio / motion prepared as confirmed
-- [x] `svg_to_pptx.py --roundtrip` receipt matches the confirmed roster
-- [x] Delivery JSON and read-back written under `validation/`
-- [x] Final deck at the exporter's printed `exports/` path
+- [x] Notes / audio / motion prepared as confirmed; `--roundtrip` receipt matches the confirmed roster
+- [x] Delivery JSON and read-back written under `validation/`; final deck at the printed `exports/` path
```
---
## 8. Current Boundary
-| Capability | Status |
-|---|---|
-| Reference unchanged pages byte-for-byte; select / reorder / repeat / omit pages | Supported |
-| Edit text, paint, images, native table cells, native chart data on selected pages | Supported; unchanged objects restore natively; chart/table data edits export only with `--native-charts-and-tables` |
-| Author new elements on an edited page | Supported through canonical compact SVG |
-| Preserve SmartArt, complex effects, embedded media | Supported as atomic source proxies; not editable |
-| Notes, narration audio, auto-advance, transitions, object animations | Supported as overlays keyed by output page |
-| Delete inherited source notes on a copied page | Not supported; give the copy its own `notes/<stem>.md` |
-| Edit a source proxy, change slide size, add Master/Layout structure | Not supported; use Create Template → Generate for a new structure |
+Supported: referencing unchanged pages byte-for-byte with select / reorder / repeat / omit; editing text, paint, images, native table cells, and native chart data on selected pages (chart/table edits export only with `--native-charts-and-tables`); authoring new elements as canonical compact SVG; preserving SmartArt, complex effects, and embedded media as atomic proxies; notes, narration, auto-advance, transitions, and object animations as overlays keyed by output page. Not supported: deleting inherited source notes on a copied page (give the copy its own file); editing a source proxy; changing slide size; adding Master/Layout structure (use Create Template → Generate).
diff --git a/skills/ppt-master/workflows/profiles/beautify-pptx.md b/skills/ppt-master/workflows/profiles/beautify-pptx.md
index f1c60304..effba4b0 100644
--- a/skills/ppt-master/workflows/profiles/beautify-pptx.md
+++ b/skills/ppt-master/workflows/profiles/beautify-pptx.md
@@ -4,172 +4,75 @@ description: Generate profile for 1:1, content-faithful re-layout of an existing
# Beautify PPTX (Re-layout) Profile
-> Generate profile, not a top-level route. [`edit-native-pptx.md`](../edit-native-pptx.md) keeps a deck's native design and edits selected pages; this profile keeps a deck's content and redoes its layout.
+> Generate profile, not a top-level route. [`edit-native-pptx.md`](../edit-native-pptx.md) keeps a deck's native design and edits selected pages; this profile keeps a deck's content and redoes its layout: text verbatim, source palette/fonts as the preselected recommendation (only explicit user requirements or final confirmation override them), layout, hierarchy, whitespace, and visual treatment rebuilt into a new native deck through the SVG pipeline — not a patch over the original.
-Re-lays-out an existing `.pptx`: text is preserved **verbatim** and source
-palette / fonts are the preselected recommendation. Only explicit user
-requirements or final confirmation may override them; never deviate silently.
-It rebuilds layout, hierarchy, whitespace, and effective visual treatment into
-a new native deck through the SVG pipeline — not a patch over the original.
+**Trigger**: the user supplies a `.pptx` and asks to beautify / re-layout / 重新排版 / 美化 while keeping the content — explicit intent plus a provided file, never inferred.
-**Trigger**: the user supplies a `.pptx` and asks to beautify / re-layout / 重新排版 / 美化 while keeping the content. Explicit intent + a provided file only; never auto-infer.
-
-**Hard rule — select one runtime before continuing**: when the same request
-also meets [`quick-generate.md`](./quick-generate.md)'s explicit trigger, load
-that runtime and do not load `generate-pptx.md`. Otherwise load
-[`generate-pptx.md`](../generate-pptx.md) and do not load Quick. The 1:1
-Beautify constraints in this file apply in either runtime.
+**Hard rule — select one runtime before continuing**: when the request also meets [`quick-generate.md`](./quick-generate.md)'s explicit trigger, load that runtime and not `generate-pptx.md`; otherwise load [`generate-pptx.md`](../generate-pptx.md) and not Quick. The 1:1 constraints below apply in either runtime.
---
## 1. When to Run
-| Pattern | Example |
-|---|---|
-| Existing `.pptx` + beautify intent | "把这份 PPT 美化一下" / "make this deck look better" |
-| Existing `.pptx` + re-layout intent | "重新排版这份 PPT,内容别动" / "re-layout this, keep the wording" |
-| Existing `.pptx` + paste-back intent | "重排后我要把元素贴回原来的模板" |
-
-**Hard rule — content is frozen**: every text string from the source is preserved exactly (no add / remove / reword / reorder). Beautification freedom lives only in layout, hierarchy, spacing, and visual rhythm.
-
-**Hard rule — not a patch, not a fill**: this regenerates a native deck through the selected Default or Quick SVG → PPTX runtime. It does **not** edit the source file in place, and it is **not** [`edit-native-pptx`](../edit-native-pptx.md) (which restores unchanged source slides and edits only planned pages). It also does not parse an arbitrary third-party template for text-only substitution (the rejected #53 direction) — it builds every page from scratch.
+Existing `.pptx` + beautify intent ("把这份 PPT 美化一下" / "make this deck look better"), re-layout intent ("重新排版这份 PPT,内容别动"), or paste-back intent ("重排后我要把元素贴回原来的模板").
-**Distinct from mirror templates**: `replication_mode: mirror` ([`executor-structured.md`](../../references/executor-structured.md) §1.1) keeps layout + visuals verbatim and edits text. Beautify is the inverse — content verbatim, layout redone, source identity recommended unless the user overrides it.
+**Hard rule — content is frozen**: every source text string is preserved exactly (no add / remove / reword / reorder); freedom lives only in layout, hierarchy, spacing, and rhythm.
-**Distinct from page-image reconstruction**: when the authoritative input is
-an ordered raster page roster and the user wants its visible layout preserved,
-activate the Codex-supported, Quick-only
-[`image-to-pptx.md`](./image-to-pptx.md) instead.
-Beautify requires a semantic source PPTX and deliberately redesigns layout; the
-two fidelity profiles never compose.
+**Hard rule — not a patch, not a fill**: this regenerates a native deck through the selected runtime; it never edits the source in place, is not Edit Native PPTX, and never parses a third-party template for text-only substitution (the rejected #53 direction). It is the inverse of a `replication_mode: mirror` template ([`executor-structured.md`](../../references/executor-structured.md) §1.1), which keeps layout and edits text. When the authoritative input is a raster page roster whose visible layout must be preserved, activate the Quick-only [`image-to-pptx.md`](./image-to-pptx.md) instead; the two fidelity profiles never compose.
-**When this profile is wrong — re-architecture belongs to ordinary Generate**: this profile preserves the source's page count and page order 1:1. It is for "keep this deck, just lay it out better". When the user instead wants the original page breakdown reconsidered — merge / split / reorder pages, re-outline the structure, build a *better deck* from the same content rather than a prettier version of the same pages — do not activate this profile. This includes re-pagination for fit: "keep every word but split a crowded page so it reads better" changes page count. Convert the deck with [`ppt_to_md`](../../scripts/source_to_md/ppt_to_md.py) and use ordinary Quick when Quick was explicit, otherwise the Default main pipeline. The deciding question: is the source's page split information to preserve, or just the previous author's structure to improve? Preserve → activate this profile; improve → ordinary Generate in the selected runtime.
+**When this profile is wrong**: it preserves page count and order 1:1 — "keep this deck, lay it out better". Merging, splitting, reordering, re-outlining, or re-paginating for fit ("keep every word but split a crowded page") changes the page breakdown: convert with [`ppt_to_md`](../../scripts/source_to_md/ppt_to_md.py) and use ordinary Quick or Default instead. The deciding question: is the source's page split information to preserve, or the previous author's structure to improve?
---
## 2. Inputs
-🚧 **GATE**: the user has provided:
-
-| Input | Required | Notes |
-|---|---:|---|
-| Source PPTX | Yes | The deck to re-lay-out |
-| Beautify scope | Optional | Density / emphasis preference — never content rewrites, and never page drops (v1 is strict 1:1) |
+🚧 **GATE**: the source PPTX (required) and an optional beautify scope — density / emphasis preference, never content rewrites or page drops.
---
## 3. Create the Project Workspace
-Match the canvas to the source so 1:1 pages and paste-back align. Determine the source aspect first — before the project exists, run `beautify_identity.py <source.pptx>` to **stdout** and read `canvas.aspect` (the formal standard intake bundle is written in Step 4, after `init`) — then select the source-faithful canvas, passing `--format` only for an exact registered match:
-
-| Source aspect | Canvas |
-|---|---|
-| ≈1.778 (16:9) | `ppt169` |
-| ≈1.333 (4:3) | `ppt43` |
-| other | the exact source `width_px`x`height_px`; omit `--format` |
+Match the canvas to the source so 1:1 pages and paste-back align: before the project exists, run `beautify_identity.py <source.pptx>` to stdout, read `canvas.aspect`, and pick `ppt169` (≈1.778), `ppt43` (≈1.333), or the exact source `width_px`x`height_px` without `--format`.
```bash
-# Default runtime:
-python3 ${SKILL_DIR}/scripts/project_manager.py init <project_name> [--format <format>]
-
-# Quick runtime instead:
-python3 ${SKILL_DIR}/scripts/project_manager.py init <project_name> [--format <format>] --quick-generate
-
-# Both runtimes then import once:
+python3 ${SKILL_DIR}/scripts/project_manager.py init <project_name> [--format <format>] # Default
+python3 ${SKILL_DIR}/scripts/project_manager.py init <project_name> [--format <format>] --quick-generate # Quick — run exactly one init
python3 ${SKILL_DIR}/scripts/project_manager.py import-sources <project_path> <source.pptx>
```
-Run exactly one `init` command: the Quick form only when Quick was selected.
-
---
## 4. Extract Identity and Data; Assemble Inventory
-Use the standard PPTX intake bundle from Step 3. `project_manager.py import-sources` already writes it under `analysis/` for PPTX-family inputs. If the bundle is missing because the project predates this workflow, generate it once:
-
-```bash
-python3 ${SKILL_DIR}/scripts/pptx_intake.py <project_path>/sources/<source.pptx> -o <project_path>/analysis
-```
-
-**Content + images — already produced by Step 3.** `import-sources` ran `ppt_to_md` on the deck, so the **frozen content contract** is `sources/<stem>.md` (one source slide per block, in order). If the source deck contains pictures, they are already propagated to `images/` with per-slide binding in `images/image_manifest.json` (`occurrences[].slide_index`). Do **not** re-run `ppt_to_md` — it would duplicate the conversion and write images to `analysis/<stem>_files/` instead of `images/`.
-
-**Visual identity (theme + observed sample + canvas)**: read `<project_path>/analysis/<stem>.identity.json` (intake prefixes per-deck artifacts by source-file stem).
-
-| Field | Use |
-|---|---|
-| `theme.palette.background` / `text` / `primary` / `accent1..6` | the deck's *declared* colors |
-| `theme.fonts.title` / `body` (`latin` / `ea` / `cs`; `scripts` maps `Hans` / `Hant` / `Jpan` / `Hang` supplemental faces) | the deck's *declared* fonts; use the matching script when `ea` is empty |
-| `theme.sizes.title` / `body` (pt) | the deck's *declared* placeholder sizes (master `txStyles`) — the size a run inherits when it sets no explicit `sz`; `body` is the **level-1** default (coarsest, commonly over-reads) |
-| `theme.sizes.body_levels` (pt list) | the full master `bodyStyle` ramp (lvl1..lvl9, e.g. `[32, 28, 24, 20, …]`) — **reference context** so you can read a deeper level than the over-reading level-1, not an auto-seed |
-| `observed.colors` / `observed.fonts` (`latin` / `ea`, frequency-ranked) | a usage **sample / frequency hint** — run-level fonts + explicit `srgbClr` fills across slides |
-| `observed.sizes_pt` (pt, frequency-ranked) | a usage **sample** of run-level explicit point sizes — the **size the deck actually renders at** when it overrides the placeholder default; the source for the Step 5 `body_size` recommendation |
-| `layout_sizes_pt` (pt, frequency-ranked) | **reference fact only**, NOT an auto-seed — the level-1 sizes that the in-use slide layouts' body placeholders declare. Usually empty (decks rely on runs / master) and ambiguous when present; use it as a hint when judging the body size, never as the authoritative seed |
-| `canvas.aspect` | drives the Step 3 format choice |
+`import-sources` already wrote the standard PPTX intake bundle under `analysis/` (for an older project, `pptx_intake.py <project_path>/sources/<source.pptx> -o <project_path>/analysis` once) and ran `ppt_to_md`, so the **frozen content contract** is `sources/<stem>.md` (one source slide per block, in order) and extracted pictures are in `images/` with per-slide binding in `images/image_manifest.json`; never re-run `ppt_to_md`.
-> Note: `theme` is what the deck declares; `observed` is a frequency sample of run-level overrides (not a complete style resolution — it misses `schemeClr` and master/layout inheritance, and counts chart/gradient fills). A hand-edited deck can diverge from `theme` — Step 5 resolves which to use.
+**Visual identity** — read `analysis/<stem>.identity.json`: `theme.palette` and `theme.fonts` (`latin` / `ea` / `cs`, with `scripts` mapping supplemental faces) are what the deck declares; `theme.sizes.title` / `body` (pt) are the master placeholder defaults, `body` being the coarse level-1 value that commonly over-reads, with `theme.sizes.body_levels` as the full ramp for reference; `observed.colors` / `observed.fonts` / `observed.sizes_pt` are frequency-ranked samples of run-level overrides (not a complete style resolution — they miss `schemeClr` and inheritance and count chart/gradient fills); `layout_sizes_pt` is a reference fact only; `canvas.aspect` drove Step 3. A hand-edited deck can diverge from `theme`; Step 5 resolves which to use.
-**Hard rule — regenerate visuals, do not carry them over**: charts / tables / images are rebuilt from their data in the effective style, never spliced in byte-for-byte. This keeps the deck style-consistent and natively editable. **Data values are frozen** (categories / series / cell text / numbers unchanged); only their rendering is the deck's own. Pictures (`ppt_to_md`-extracted files) are reused but re-laid-out — position / crop / size follow the new layout, not the source slot. A user who wants an original element verbatim copies it across themselves.
+**Hard rule — regenerate visuals, do not carry them over**: charts / tables / images are rebuilt from their data in the effective style, never spliced byte-for-byte; data values are frozen, only rendering is the deck's own; pictures are reused but re-laid-out. A user who wants an original element verbatim copies it across themselves.
-**Optional source-SVG visual reference**: when the source deck has complex vector decoration, distinctive page chrome, or a visual language that cannot be captured by `<stem>.identity.json` colors/fonts alone, create a read-only SVG reference package under `analysis/`. This is for understanding style only; it is not a carry-over asset path.
+**Optional source-SVG visual reference**: when the deck has complex vector decoration or a visual language colors/fonts cannot capture, build a read-only reference package for understanding style, not a carry-over path:
```bash
python3 ${SKILL_DIR}/scripts/pptx_to_svg.py <project_path>/sources/<source.pptx> -o <project_path>/analysis/source_svg_import
-python3 ${SKILL_DIR}/scripts/extract_svg_assets.py <project_path>/analysis/source_svg_import/svg-flat \
- --icons-dir <project_path>/analysis/source_svg_import/icons \
- --icon-namespace imported \
- --inplace --id-prefix source_flat --min-decoration-bytes 3000 --clean-stale
+python3 ${SKILL_DIR}/scripts/extract_svg_assets.py <project_path>/analysis/source_svg_import/svg-flat --icons-dir <project_path>/analysis/source_svg_import/icons --icon-namespace imported --inplace --id-prefix source_flat --min-decoration-bytes 3000 --clean-stale
```
-Use the cleaned `analysis/source_svg_import/svg-flat/slide_*.svg` files plus `analysis/source_svg_import/svg-flat_vector_asset_inventory.json` in Step 5/Strategist. Extraction is required for inspection when complex vectors exist: it creates a candidate pool the AI can index, compare, and judge for possible reuse without reading every heavy vector body. Read an individual `analysis/source_svg_import/icons/imported/*.svg` only when the cleaned page and inventory indicate that candidate may be promoted or materially affects the style decision. These candidates are analysis artifacts first, not automatic output assets.
+Use the cleaned `svg-flat/slide_*.svg` pages and `svg-flat_vector_asset_inventory.json` in Step 5; open an individual `icons/imported/*.svg` only when a candidate may be promoted or materially affects the style decision. By default do not copy candidates into `icons/`, list them as output assets, or preserve decorations byte-for-byte. **Optional reuse gate**: a non-text brand/logo/motif/decorative candidate may be promoted to `<project_path>/icons/imported/` and referenced with `<use data-icon="imported/<name>"/>` — Default lists it in Step 5 and waits for confirmation, Quick decides directly and stops only when frozen facts lack a lossless path; never promote text-bearing groups, charts/tables, page layouts, or dense composites.
-Default: do **not** copy these candidates into the project `icons/`, do **not** list them as reusable output assets, and do **not** preserve original vector decorations byte-for-byte in the beautified deck. The Executor still regenerates fresh native shapes from the confirmed plan.
-
-**Optional reuse gate**: retain source slide, filename, use, and dependencies
-for a non-text brand/logo/motif/decorative candidate. Default lists it in Step 5
-and waits; only confirmed candidates are promoted. Quick's current main agent
-decides directly and stops only when frozen facts lack a lossless preservation
-path. Promote to `<project_path>/icons/imported/` and reference with
-`<use data-icon="imported/<name>"/>`; Quick never runs `finalize_svg.py`. Never
-promote text-bearing groups, charts/tables, page layouts, or dense composites.
-
-**Assemble the inventory** — the deterministic join into one per-slide ledger, `analysis/beautify_inventory.json`, the contract Step 5 resolves and Step 7 verifies against:
+**Assemble the inventory** — the deterministic per-slide ledger Step 5 resolves and Step 7 verifies against:
```bash
-python3 ${SKILL_DIR}/scripts/beautify_inventory.py <project_path>/analysis/<stem>.slide_library.json \
- --images <project_path>/images/image_manifest.json -o <project_path>/analysis/beautify_inventory.json
+python3 ${SKILL_DIR}/scripts/beautify_inventory.py <project_path>/analysis/<stem>.slide_library.json --images <project_path>/images/image_manifest.json -o <project_path>/analysis/beautify_inventory.json
```
-If `images/image_manifest.json` does not exist because the source deck has no extracted pictures, omit `--images`. The script joins per slide: `text_blocks` (slot text + geometry), `tables` (cell grid), `charts` (categories + series values), `diagrams` (SmartArt nodes + hierarchy/connections + source layout), and `images` (bound via `image_manifest` `occurrences[].slide_index`, with geometry / `usage_count`). The **frozen source values are inlined**, so the inventory is a self-contained contract, not a pointer back to `slide_library.json`. It emits `ignored` and `needs_confirmation` as **empty arrays** — fill them with judgment before Step 5:
+Omit `--images` when no pictures were extracted. It joins `text_blocks`, `tables`, `charts`, `diagrams` (SmartArt nodes + hierarchy + source layout), and `images` per slide with frozen values inlined, and emits empty `ignored` and `needs_confirmation` arrays to fill with judgment: `ignored` — hidden slides/shapes, master-only text, image crop/opacity/rotation/mask; `needs_confirmation` — unreadable SmartArt, combo / dual-axis / waterfall charts, merged-cell or multi-header tables, density outliers (overcrowded or near-empty). SmartArt keeps its wording and relationships and is redrawn as ordinary editable shapes, never regenerated natively.
-| Field | Fill with |
-|---|---|
-| `ignored` | hidden slides / shapes, master-only text, image crop / opacity / rotation / mask (not captured upstream) |
-| `needs_confirmation` | unreadable SmartArt data; combo / dual-axis / waterfall charts; merged-cell or multi-header tables; density-outlier pages — **either** overcrowded **or** near-empty / title-only |
-
-**Mandatory — bounded inventory reads**: the complete inventory is the Step 7
-validation ledger, not the default authoring prompt. Read its compact roster,
-then the current page; add geometry only for structural ambiguity:
-
-```bash
-python3 ${SKILL_DIR}/scripts/beautify_inventory.py \
- <project_path>/analysis/beautify_inventory.json --summary
-python3 ${SKILL_DIR}/scripts/beautify_inventory.py \
- <project_path>/analysis/beautify_inventory.json --page <N>
-python3 ${SKILL_DIR}/scripts/beautify_inventory.py \
- <project_path>/analysis/beautify_inventory.json --page <N> --with-geometry
-```
-
-During authoring, do not bulk-read either complete file.
-
-**SmartArt output boundary**: Preserve its extracted wording and semantic relationships, then redraw it through SVG as ordinary editable PowerPoint shapes. Do not attempt to regenerate a native SmartArt object or reuse persisted-drawing text as a second content source.
+**Mandatory — bounded inventory reads**: the complete inventory is the validation ledger, not the authoring prompt. Read `beautify_inventory.py <inventory> --summary`, then `--page <N>`, adding `--with-geometry` only for structural ambiguity; never bulk-read either complete file during authoring.
```markdown
## ✅ Extraction Complete
-
-- [x] `sources/<stem>.md` (from Step 3) holds every source slide's text, in order; extracted pictures, if any, are in `images/` + `images/image_manifest.json`
-- [x] `analysis/<stem>.identity.json` has theme + observed identity + canvas aspect
-- [x] `analysis/<stem>.slide_library.json` holds chart + table data and SmartArt semantic structure for regeneration
-- [x] `analysis/source_profile.json` (multi-deck index) summarizes the source facts in its `decks[]` entry
+- [x] `sources/<stem>.md` holds every slide's text in order; pictures in `images/` + `image_manifest.json`
+- [x] `analysis/<stem>.identity.json`, `<stem>.slide_library.json`, `source_profile.json` present
- [x] `analysis/beautify_inventory.json` ledgers per-slide text / images / data + ignored + needs-confirmation
- [ ] **Next**: Step 5 — resolve Beautify decisions in the selected runtime
```
@@ -180,184 +83,75 @@ During authoring, do not bulk-read either complete file.
### Quick branch
-When Quick was selected, do not run the Default confirmation flow below. Apply
-the same inventory interpretation, source-identity judgment, and body-size
-method documented in this section, but make the decisions directly in the
-active context. Explicit user requirements remain authoritative; otherwise use
-the source identity as the default. Resolve `ignored` and `needs_confirmation`
-without creating a confirmation payload, Design Spec, lock, or substitute
-plan. If a flagged complex object cannot be regenerated without losing frozen
-facts, stop as a hard prerequisite instead of simplifying it.
-
-**Mandatory — close the transient Quick state before authoring**: before
-entering §6 and [`quick-generate.md`](./quick-generate.md) §3, resolve every
-row below in the active context:
-
-| Transient state | Required closure |
-|---|---|
-| Roster and message | Exact source-order roster and one core message per page |
-| Identity and type | Source identity, palette, fonts, body size, and type-role anchors |
-| Page geometry | Per-page density, body frame, primary zone, and composition direction |
-| Meaning and rhythm | Frozen relationships, reading path, neighbor/section rhythm, and ending |
-| Resources and capabilities | Required local resources are usable; triggered notes, motion, audio, image, icon, formula, Chart/Table, and verification outcomes are decided |
-
-Keep it transient: create no page/resource plan, Design Spec, lock,
-confirmation payload, or substitute artifact. Then continue to §6 Quick.
+Do not run the Default confirmation flow. Apply the same inventory interpretation, identity judgment, and body-size method directly in active context: explicit user requirements are authoritative, otherwise the source identity is the default; resolve `ignored` and `needs_confirmation` without a payload, Design Spec, lock, or substitute plan; if a flagged complex object cannot be regenerated without losing frozen facts, stop as a hard prerequisite instead of simplifying. **Mandatory — close the transient state before §6**: exact source-order roster and one core message per page; identity, palette, fonts, body size, and type-role anchors; per-page density, body frame, primary zone, and composition direction; frozen relationships, reading path, neighbor/section rhythm, and ending; usable local resources and decided notes / motion / audio / image / icon / formula / Chart-Table / verification outcomes. Keep it transient, then continue to §6 Quick.
### Default branch — Recommend & Confirm
-⛔ **BLOCKING**: the scope is not hard-coded — same spirit as the Strategist confirmation stage. Recommend each item below from what the deck actually contains (the Step 4 inventory), present the plan, and **wait for the user to confirm or adjust** before writing any spec. Use Generate Step 4's selected surface for the full visual confirmation; keep the structural-scope decisions in chat. Values confirmed through either channel are honored identically.
-
-This step has two halves:
-- **Visual re-confirm via the selected confirmation surface** — the **full** Step 4 field set (below), seeded from the source so every targeted-confirmation field (canvas, mode, visual style, palette, icons, typography incl. body baseline, image strategy, generation mode) is **pre-filled with the inherited / source-derived default and left editable**. Beautify *recommends* keeping the source's identity, but never removes the user's place to override any field — you may choose not to change a value, but you must not deny the place to change it. This is also where the deck's text size is confirmed: `<stem>.identity.json` now carries size hints — `observed.sizes_pt` (the point sizes the deck actually renders at) and `theme.sizes` (the declared placeholder defaults) — so the `body_size` recommendation **follows the source's own font size** rather than a blind canvas default; the user still confirms or overrides it here.
-- **Structural scope** — the inventory-driven list decisions below (ignored, reuse, needs-confirmation, verification level) stay in **chat**; they have no confirm-UI widget.
+⛔ **BLOCKING**: recommend each item from what the deck actually contains, present the plan, and wait for the user to confirm or adjust before writing any spec. The **visual re-confirm** goes through Generate Step 4's selected surface with the full field set seeded from the source — every field pre-filled with the inherited default and left editable (recommend keeping identity, never remove the place to override). The **structural scope** stays in chat:
| Plan item | Recommend from | Default lean |
|---|---|---|
-| Identity source | `<stem>.identity.json` `theme` vs `observed` | present **both as color / typography candidates in the selected confirmation surface** so the user picks the one that looks right (theme first when the deck is theme-driven; observed first when slides override heavily) — recommend a default ordering and say why |
-| Preserve scope | inventory `text_blocks` / `images` / `charts` / `tables` / `diagrams` | all text verbatim; data values and SmartArt relationships frozen; pictures reused |
-| Ignored | inventory `ignored` | name them so the user sees what drops (hidden / master-only text / image crop / rotation) |
-| Needs confirmation | inventory `needs_confirmation` | flag complex charts + overcrowded pages explicitly; ask how to handle |
-| Verification level | deck size / risk | recommend the Step 7 per-page checks; user sets strictness |
-
-**Hard rule — content is frozen, not the scope decisions**: text strings and chart/table/table-cell data values are non-negotiable (verbatim). *Which* identity to inherit, what to ignore, and how to treat flagged items are recommend-then-confirm, never silently decided.
-
-**Recommend honestly — name the v1 ceiling**:
-
-| Item | What v1 delivers |
-|---|---|
-| Overcrowded source page | layout / hierarchy / whitespace improve **within the page as-is** — v1 does **not** relieve information overload (that needs re-pagination / rewrite, deferred). Flag such pages; the user may accept or note them for manual split |
-| Paste-back into the original | regenerated elements retain confirmed palette + font declarations; v1 does **not** guarantee coordinate alignment or font availability in the original deck |
-| Complex charts / merged-cell tables | best-effort from the captured data; combo / dual-axis / waterfall lose the un-captured plots — flagged for the user |
-
-**Visual re-confirm — full confirmation seeded from the source**:
-
-Apply [`generate-pptx`](../generate-pptx.md) Step 4's surface decision first. In
-the default UI branch, use
-`<project_path>/confirm_ui/recommendations.stage1.json` and
-`recommendations.stage2.json` at the same two handoffs and launch the same
-confirm server. In the chat branch, present the same two stages and fields without launching the server or requiring
-`result.json`. The active, unconfirmed UI stage may be overwritten for a
-requested regeneration; normal progression leaves confirmed earlier stages
-intact. Do **not** hide fields: seed **every** targeted-confirmation field with
-the inherited / source-derived default so the user sees the recommendation and
-keeps the place to change it. Schema →
-[`scripts/docs/confirm_ui.md`](../../scripts/docs/confirm_ui.md).
-
-Rows are abbreviated; follow Confirm UI's four-locale contract and omit `english` for English sources.
+| Identity source | `theme` vs `observed` | Present both as color / typography candidates; theme first when the deck is theme-driven, observed first when slides override heavily; say why |
+| Preserve scope | inventory `text_blocks` / `images` / `charts` / `tables` / `diagrams` | All text verbatim; data values and SmartArt relationships frozen; pictures reused |
+| Ignored | inventory `ignored` | Name them so the user sees what drops |
+| Needs confirmation | inventory `needs_confirmation` | Flag complex charts and overcrowded pages; ask how to handle |
+| Verification level | deck size / risk | Recommend the Step 7 per-page checks; user sets strictness |
+
+**Hard rule — content is frozen, not the scope decisions**: text and chart/table/cell values are non-negotiable; which identity to inherit, what to ignore, and how to treat flagged items are recommend-then-confirm, never silently decided. **Name the v1 ceiling honestly**: an overcrowded page improves within the page as-is (no information-overload relief — flag it for manual split); paste-back keeps confirmed palette + font declarations but guarantees neither coordinate alignment nor font availability; combo / dual-axis / waterfall charts and merged-cell tables are best-effort from captured data and flagged.
+
+**Visual re-confirm**: apply Step 4's surface decision; in the UI branch use `confirm_ui/recommendations.stage1.json` / `.stage2.json` at the same two handoffs and the same server, in the chat branch present the same stages without a server or `result.json`. Rows abbreviated; follow the four-locale contract ([`confirm-surface.md`](../../references/confirm-surface.md)) and omit `english` for English sources:
```json
{
"primary_language": "<source main language>",
- "recommend": {
- "canvas": "<step3-canvas-id>",
- "mode": "custom",
- "visual_style": "custom",
- "image_strategy": "custom",
- "icons": "<sensible default icon library>",
- "image_usage": ["provided"]
- },
- "page_count": { "value": "<source-slide-count>" },
- "audience": { "value": "<carry over from the deck's apparent audience, or state a concrete provisional audience>" },
- "communication_intent": { "value": "<open prose inferred from the deck; preserve multiple purposes and their relationship>" },
- "audience_outcome": { "value": "<what the audience should know, understand, decide, or do>" },
- "core_message": { "value": "<the deck-wide claim / ask / action already present in the source>" },
- "delivery_context": { "value": "<primary presenter-led / reader-led / hybrid / recorded; hybrid names its lead and secondary use; occasion if inferable>" },
- "artifact_afterlife": { "value": "<review / approval / archive / hand-off / reuse / none planned>" },
- "content_divergence": { "value": "keep source wording and page structure verbatim", "locked": true },
- "design_directions": { "selected": 0, "candidates": [
- {
- "id": "source-replica", "name_en": "Source replica (recommended)",
- "mode": "custom", "mode_behavior_zh": "briefing 基底;逐页结构、顺序与文字 1:1 逐字不变。",
- "visual_style": "custom", "visual_style_behavior_zh": "复刻源 PPT 视觉身份与版式。", "icons": "…",
- "color": { "palette": { "background": "#...", "secondary_bg": "#...", "primary": "#...", "accent": "#...", "secondary_accent": "#...", "body_text": "#..." } },
- "typography": { "heading": { "primary": "…" }, "body": { "primary": "…" }, "body_size": <dominant observed.sizes_pt × 4/3, as px> },
- "image_strategy": { "rendering": "custom", "behavior_zh": "…" }
- },
- {
- "id": "alternative-a",
- "mode": "custom", "mode_behavior_zh": "briefing 基底;逐页结构与文字 1:1 逐字不变。",
- "visual_style": "custom", "visual_style_behavior_zh": "…", "icons": "…",
- "color": { "palette": { "background": "#...", "secondary_bg": "#...", "primary": "#...", "accent": "#...", "secondary_accent": "#...", "body_text": "#..." } },
- "typography": { "heading": { "primary": "…" }, "body": { "primary": "…" }, "body_size": <canvas-appropriate baseline> },
- "image_strategy": { "rendering": "custom", "behavior_zh": "…" }
- },
- {
- "id": "alternative-b",
- "mode": "custom", "mode_behavior_zh": "briefing 基底;逐页结构与文字 1:1 逐字不变。",
- "visual_style": "custom", "visual_style_behavior_zh": "…", "icons": "…",
- "color": { "palette": { "background": "#...", "secondary_bg": "#...", "primary": "#...", "accent": "#...", "secondary_accent": "#...", "body_text": "#..." } },
- "typography": { "heading": { "primary": "…" }, "body": { "primary": "…" }, "body_size": <canvas-appropriate baseline> },
- "image_strategy": { "rendering": "custom", "behavior_zh": "…" }
- }
- ] }
+ "recommend": {"canvas": "<step3-canvas-id>", "mode": "custom", "visual_style": "custom", "image_strategy": "custom", "icons": "<sensible default icon library>", "image_usage": ["provided"]},
+ "page_count": {"value": "<source-slide-count>"},
+ "audience": {"value": "<deck's apparent audience, or a concrete provisional one>"},
+ "communication_intent": {"value": "<open prose inferred from the deck>"},
+ "audience_outcome": {"value": "<know / understand / decide / do>"},
+ "core_message": {"value": "<the deck-wide claim already present>"},
+ "delivery_context": {"value": "<presenter-led / reader-led / hybrid / recorded; occasion if inferable>"},
+ "artifact_afterlife": {"value": "<review / approval / archive / hand-off / reuse / none planned>"},
+ "content_divergence": {"value": "keep source wording and page structure verbatim", "locked": true},
+ "design_directions": {"selected": 0, "candidates": [
+ {"id": "source-replica", "name_en": "Source replica (recommended)", "mode": "custom", "mode_behavior_zh": "briefing 基底;逐页结构、顺序与文字 1:1 逐字不变。", "visual_style": "custom", "visual_style_behavior_zh": "复刻源 PPT 视觉身份与版式。", "icons": "…",
+ "color": {"palette": {"background": "#...", "secondary_bg": "#...", "primary": "#...", "accent": "#...", "secondary_accent": "#...", "body_text": "#..."}},
+ "typography": {"heading": {"primary": "…"}, "body": {"primary": "…"}, "body_size": "<dominant observed.sizes_pt × 4/3, as px>"},
+ "image_strategy": {"rendering": "custom", "behavior_zh": "…"}},
+ {"id": "alternative-a", "...": "same shape; body_size = canvas-appropriate baseline"},
+ {"id": "alternative-b", "...": "same shape"}
+ ]}
}
```
-- **Recommend keep, allow override**: pre-fill the open communication contract from the source's apparent audience and purpose, preserving composite purposes in prose; also pre-fill canvas / mode / visual style / icons / image strategy with the source-faithful default (canvas = Step 3 format, mode = `briefing`, image_usage = `provided`). The purpose examples are hints, never a `primary_job` selector. Beautify's only true non-choices are frozen text and strict 1:1 page count (changing either means routing to the main pipeline). Seed `content_divergence` to verbatim preservation with `locked: true`; the Confirm UI renders it read-only and the server restores the locked value on every staged submit. A request to reshape wording or page structure routes to the main pipeline instead of weakening this profile.
-- **Our recommendation is the pre-selected default = the source replica**: for color and typography, author **several candidates** like the from-scratch flow. The pre-selected default (`selected: 0`, the first card) is what beautify recommends — the candidate that **best replicates the source deck's style** (the truest reading of `theme` / `observed`). Replicate-by-default.
-- **Judge the other alternatives exactly as the from-scratch flow does — fonts as much as colors**: don't invent a beautify-specific rule. Author each non-replica candidate with the **same content-driven judgment the Strategist uses when generating from scratch** (color §e, typography §g), applied to the material this project provides — the source document's content and subject, the company's own theme colors, and any brand signal. Pick the palette **and** the font pairing by what fits *this* deck's content; fonts are chosen by content fit, not just defaulted to a safe face. Reach **≥3 meaningful candidates total**; reasonable font repetition is non-blocking, so never manufacture a different pairing just to satisfy a quota. `primary` always follows the source deck's main language; include `english` only when that language is not English.
-- **`body_size` is the load-bearing field, and the replica follows the source's own size**: seed the replica candidate's `body_size` from the source's actual body size — take the dominant `observed.sizes_pt` value (the most frequent run-level size, the **body proxy**) and **convert it to px (`× 4/3`)** before seeding, since the system is px-only and the source measures in pt: a source 20pt body becomes `26.67`px, so the replica renders at the source's true size (seeding the bare `20` as px would shrink it ~25% — the pt-as-px trap). Whichever source value you land on below (observed mode, or `theme.sizes.body`) gets the same `× 4/3` conversion. The confirm page writes that px to `result.json` (`body_size`); the chat branch retains the same px in its visible final summary. Neither path performs another conversion or adds `body_size_pt` provenance (pt never enters the contract). The "most frequent = body" read is a proxy, not a guarantee — `observed.sizes_pt` counts every explicit run size (titles, captions, footnotes, chart/label text included, no placeholder-type resolution), so a deck dense with small labels can let a caption size outrank true body; cross-check the proxy against the page's actual body blocks and the sanity range below before trusting it, and prefer the size the body paragraphs visibly render at over the raw mode when the two disagree. Fall back to `theme.sizes.body` (the declared placeholder size) when `observed.sizes_pt` is empty, and to a PPT consumption-mode baseline (`text` 20 / `balanced` 24 / `presentation` 32 px — one fixed value per mode) only when neither is present. Note `theme.sizes.body` is the master `bodyStyle` **level-1 declared default** — a coarse value that commonly **over-reads** the real body density (decks often render body at a deeper outline level or override it smaller), so when you land on this fallback treat it as an upper-ish guess and run it through the sanity check below, never as a precise body size. `theme.sizes.body_levels` and `layout_sizes_pt` are **reference context, not extra fallback tiers**: consult them to judge a saner body value when the deck is theme-driven (`observed` empty) — e.g. a deeper `body_levels` entry or a `layout_sizes_pt` hint may read truer than level-1 — but do not auto-seed from them; the seed chain stays `observed → theme.sizes.body → consumption-mode baseline`, and a theme-driven deck whose body size genuinely can't be pinned cleanly is exactly the case the sanity check is for. The canvas hint stays a **sanity range**, not the seed: if the source's own size lands far outside it (a dense source doc reads tiny on a projection canvas), surface that to the user rather than silently snapping — the replica recommendation is the source's size, the user confirms or overrides. Non-replica alternatives may use the consumption-mode baseline. This is what prevents the deck from exporting at an unintentionally small size while still honoring the source.
-
-Run Generate Step 4's confirmation orchestration unchanged, including its
-pre-launch surface decision and the UI branch's pre-wait Stage-1 chat handoff.
+- **Recommend keep, allow override**: pre-fill the communication contract from the source's apparent audience and purpose (composite purposes in prose; examples are hints, never a `primary_job` selector) and canvas / mode / visual style / icons / image strategy with the source-faithful default (mode `briefing`, `image_usage` `provided`). The only true non-choices are frozen text and strict 1:1 page count; `content_divergence` is seeded verbatim with `locked: true` (the UI renders it read-only and restores it on every submit). A request to reshape wording or structure routes to the main pipeline.
+- **The pre-selected default is the source replica** (`selected: 0`): the candidate that best replicates the source's `theme` / `observed` style. Author the other candidates with the same content-driven judgment the Strategist uses from scratch (color §e, typography §g) — palette and font pairing chosen for this deck's content, ≥3 meaningful candidates, no manufactured pairings to fill a quota; `primary` follows the source language, `english` only when that language is not English.
+- **`body_size` is load-bearing and the replica follows the source's own size**: seed it from the dominant `observed.sizes_pt` value converted to px (`× 4/3` — a 20pt body becomes `26.67`; seeding bare `20` shrinks it ~25%, the pt-as-px trap); the confirm page writes that px to `result.json` and the chat branch retains it, with no second conversion and no `body_size_pt`. The most-frequent-size proxy counts titles, captions, and chart labels too, so cross-check it against the page's actual body blocks and prefer the size body paragraphs visibly render at. Seed chain: `observed` → `theme.sizes.body` (a level-1 default that over-reads; treat as an upper-ish guess) → the consumption-mode baseline (`text` 20 / `balanced` 24 / `presentation` 32 px); `body_levels` and `layout_sizes_pt` are reference context for judging a saner value, never auto-seeds. The canvas hint is a sanity range, not the seed — when the source size lands far outside it, surface that to the user rather than snapping. Alternatives may use the consumption-mode baseline.
-In the UI branch, after the final wait returns, read
-`<project_path>/confirm_ui/result.json` exactly once. In the chat or delegated
-branch, retain the visible final summary instead and require no UI result. After
-any launched UI path, run `--shutdown` before Step 6; do not assume `5050`.
+Run Step 4's confirmation orchestration unchanged. In the UI branch read `confirm_ui/result.json` exactly once after the final wait and run `--shutdown` before Step 6; in the chat branch retain the visible final summary. Then enter Step 4 as Strategist with the plan pre-resolved under the two invariants — the content-faithful clause ([`strategist.md`](../../references/strategist.md) §d Layer 1) and page count = source slide count — writing the confirmed state completely into `design_spec.md` (mode, canvas, visual style, color + typography incl. `body_size`; skip both recommendation flows). §VII holds only `Page | Family | Template | Usage` rows for selected `chart` / `table` references projected into `spec_lock.md page_visualizations`; qualitative relationships stay in §IX; §VIII holds source pictures for re-layout.
-On confirmation, enter [`generate-pptx`](../generate-pptx.md) Step 4 as Strategist with the plan pre-resolved. The two beautify invariants always hold: the content-faithful clause ([`strategist.md`](../../references/strategist.md) §d Layer 1) and page count = source slide count (strict 1:1). Write the retained final confirmation state completely into `design_spec.md` — `mode` (recommended `briefing`), canvas, `visual_style`, color (e) + typography (g) incl. `body_size` (the reviewed values; skip both recommendation flows) — honoring whatever the user kept or overrode. Do not reopen UI evidence afterward. §VII contains only `Page | Family | Template | Usage` rows for selected `chart` or `table` catalog references; project their family-qualified keys into `spec_lock.md` `page_visualizations`. Qualitative relationships and unmatched Chart/Table plans stay in §IX; Default/Quick makes the mandatory per-page Structure decision before geometry. §VIII contains source pictures for re-layout.
-
-**Hard rule — §IX is verbatim and 1:1**: each source slide becomes exactly one page, in source order, its text transcribed word-for-word from `sources/<stem>.md`. Do not merge, split, drop, or rewrite. Complete and audit `design_spec.md` first, then author `spec_lock.md` from that Design Spec plus the source/page/template context per `strategist.md` §6 before handing off to the Executor.
+**Hard rule — §IX is verbatim and 1:1**: each source slide becomes exactly one page, in order, its text transcribed word-for-word from `sources/<stem>.md`. Complete and audit `design_spec.md`, then author `spec_lock.md` per `strategist.md` §6 before handing off.
---
## 6. Author + Export
-**Quick**: follow [`quick-generate.md`](./quick-generate.md) §3–4. The
-Beautify inventory is the exact page roster and frozen-content contract; keep
-its source order, hand-author every page, run the lockless Quick final checker,
-and export with `--quick-generate`. Do not run Confirm UI, write a Design Spec
-or lock, run the Default first-page gate, or call `finalize_svg.py`.
-
-**Quick — lightweight long-deck review cadence (may adapt for a short deck or
-semantic boundary)**: after about five pages or at a section
-boundary, reread only the inventory summary/current-page views and cross-page
-anchors. Do not run a checker; this is neither a gate nor an approval stop. Send
-one `authored/total` status after each batch.
-
-**Default**: run the standard pipeline as follows.
-
-Run the standard pipeline ([`generate-pptx`](../generate-pptx.md) Steps 6–7). The Executor re-lays-out each page — hierarchy, spacing, alignment, page rhythm — using the semantic anchors in `spec_lock.md` plus current page/source/template context; valid page-local colors, gradients, effects, and export-safe display faces need not be added to the lock. It regenerates charts / tables as native SVG from the extracted data and re-lays-out the source pictures.
+**Quick**: follow [`quick-generate.md`](./quick-generate.md) §3–4 with the inventory as the exact roster and frozen-content contract; keep source order, hand-author every page, run the lockless final checker, export with `--quick-generate`; no Confirm UI, Design Spec, lock, first-page gate, or `finalize_svg.py`. **Long-deck review cadence (may adapt)**: after about five pages or at a section boundary, reread only the inventory summary/current-page views and cross-page anchors — no checker, no gate — and send one `authored/total` status per batch.
-Follow [`generate-pptx`](../generate-pptx.md) Step 7 for the canonical serial
-post-processing commands, gates, success criteria, and export artifacts.
+**Default**: run [`generate-pptx`](../generate-pptx.md) Steps 6–7. The Executor re-lays-out each page from the lock's semantic anchors plus page/source/template context (page-local colors, gradients, effects, and export-safe faces need no lock rows), regenerates charts/tables as native SVG from the extracted data, and re-lays-out the source pictures. Step 7 owns the serial post-processing commands, gates, and artifacts.
---
## 7. Validate Output
-```bash
-python3 ${SKILL_DIR}/scripts/source_to_md/ppt_to_md.py <project_path>/exports/<output.pptx>
-```
-
-| Check | Expected |
-|---|---|
-| Text fidelity | every source text string appears in the output, unaltered |
-| Data fidelity | chart categories / series / table cells match the source exactly |
-| Page count | output slide count equals the source slide count |
-| Regenerated visuals | charts / tables are native SVG re-themed to the effective palette |
-| Identity | text / shapes use effective colors + fonts, seeded from `<stem>.identity.json` |
-| Paste-back | copied elements retain effective palette + font declarations; alignment and font availability are not guaranteed |
+`python3 ${SKILL_DIR}/scripts/source_to_md/ppt_to_md.py <project_path>/exports/<output.pptx>` — every source text string appears unaltered; chart categories / series / table cells match exactly; slide count equals the source; charts/tables are native SVG in the effective palette; text and shapes use the effective colors and fonts; paste-back elements retain palette and font declarations (alignment and font availability not guaranteed).
```markdown
## ✅ Beautify Complete
-
-- [x] Content + data values verbatim (read-back Markdown matches the source)
+- [x] Content + data values verbatim (read-back matches the source)
- [x] 1:1 page count preserved
- [x] Effective colors + fonts applied consistently
-- [x] Charts / tables regenerated as native SVG in the effective style
+- [x] Charts / tables regenerated as native SVG
- [x] Native PPTX exported to `exports/`
```
@@ -365,14 +159,4 @@ python3 ${SKILL_DIR}/scripts/source_to_md/ppt_to_md.py <project_path>/exports/<o
## Current Boundary
-| Capability | Status |
-|---|---|
-| Re-layout with verbatim text | Supported |
-| Source palette / fonts as preselected recommendation, with user-approved overrides | Supported |
-| Strict 1:1 page mapping | Supported |
-| Regenerate charts / tables as native SVG from extracted data | Supported |
-| Re-lay-out source pictures | Supported |
-| Re-pagination (split dense / merge sparse) | Not in v1 |
-| Carry source charts / tables / images over byte-for-byte | Out of scope — user copies originals manually if wanted |
-| Silent visual-style / identity deviation | Out of scope |
-| Batch / multi-deck beautification | Not in v1 |
+Supported: re-layout with verbatim text; source palette/fonts as the preselected recommendation with user-approved overrides; strict 1:1 pages; charts/tables regenerated from extracted data; re-laid-out source pictures. Not in v1: re-pagination; batch / multi-deck beautification. Out of scope: carrying charts / tables / images over byte-for-byte (the user copies originals manually); silent visual-style or identity deviation.
diff --git a/skills/ppt-master/workflows/profiles/image-to-pptx.md b/skills/ppt-master/workflows/profiles/image-to-pptx.md
index 30588ceb..f19da0b9 100644
--- a/skills/ppt-master/workflows/profiles/image-to-pptx.md
+++ b/skills/ppt-master/workflows/profiles/image-to-pptx.md
@@ -4,41 +4,15 @@ description: Quick-only Generate profile for reconstructing one or more source i
# Image to PPTX Profile
-> Quick-only Generate profile, not a top-level route. Normalize one or more
-> supplied images into the represented page roster, then rebuild each page as
-> native text, identity-faithful source graphics, and independently placeable
-> image layers.
-
-Reconstructs approved mockups, rendered slide images, contact sheets, or
-flattened page visuals into a new PPTX. It does not redesign the deck and does
-not run Strategist or confirmation. The visible result is the reference truth,
-but the output is not a screenshot skin: image content is rebuilt into the
-smallest useful background / foreground / subject stack, visible text is
-restored as native text, and source graphics remain visually exact.
-
-**Trigger**: the user supplies one or more raster visuals and explicitly asks
-to restore the represented pages as a PPTX. Ordinary photos, illustrations, and
-moodboards used only as resources for a new story do not activate this profile.
-
-**Support boundary — Codex required**: this profile is currently documented
-and validated for Codex because it depends on Codex's native reference-image
-generation/editing capability and direct inspection of every derived layer.
-Other hosts are not adapted or supported by this workflow; they may happen to
-work, but the repository makes no compatibility claim and defines no alternate
-host or generic image-backend fallback for this profile.
-
-**Hard rule — Quick only**: this profile always loads
-[`quick-generate.md`](./quick-generate.md) and never
-[`generate-pptx.md`](../generate-pptx.md). The user does not need to say
-"Quick" separately. Skip Strategist, Confirm UI, template selection,
-`design_spec.md`, `spec_lock.md`, and the Default first-page gate. The current
-main agent decides the reconstruction directly, prepares all resources, hand-
-authors SVG pages, runs the lockless final checker, and exports.
-
-**Hard rule — source surface, not template application**: stay in Quick free
-design and do not install or apply a Brand/Style/Layout/Deck workspace for this
-profile. A template would compete with the canonical page geometry and visual
-identity. A reusable-system request routes to Create Template instead.
+> Quick-only Generate profile, not a top-level route. Normalize supplied images into the represented page roster, then rebuild each page as native text, identity-faithful source graphics, and independently placeable image layers. The visible result is the reference truth, but the output is not a screenshot skin: image content becomes the smallest useful background / foreground / subject stack, visible text is restored natively, and source graphics stay visually exact. No redesign, no Strategist, no confirmation.
+
+**Trigger**: the user supplies raster visuals (approved mockups, rendered slides, contact sheets, flattened pages) and explicitly asks to restore the represented pages as a PPTX. Photos, illustrations, or moodboards used as resources for a new story do not activate it.
+
+**Support boundary — Codex required**: documented and validated for Codex only, because it depends on Codex's native reference-image generation/editing and direct inspection of every derived layer. Other hosts may happen to work; the repository makes no compatibility claim and defines no alternate host or generic image-backend fallback.
+
+**Hard rule — Quick only**: always load [`quick-generate.md`](./quick-generate.md), never `generate-pptx.md`, without the user saying "Quick"; skip Strategist, Confirm UI, template selection, Design Spec, lock, and the Default first-page gate. The main agent decides the reconstruction, prepares all resources, hand-authors SVG, runs the lockless final checker, and exports.
+
+**Hard rule — source surface, not template application**: stay in Quick free design; never install or apply a Brand/Style/Layout/Deck workspace — it would compete with the canonical page geometry. A reusable-system request routes to Create Template.
---
@@ -46,52 +20,35 @@ identity. A reusable-system request routes to Create Template instead.
| Request shape | Behavior |
|---|---|
-| One or more image files represent pages that must become a final editable PPTX | Activate this profile and Quick Generate |
-| One file contains several clearly separated slide frames | Split it into the ordered page roster first, then reconstruct each frame |
-| Images are ordinary content assets or inspiration for a new deck | Use ordinary Generate |
-| Images should define a reusable Brand/Style/Layout/Deck workspace | Use [`create-template.md`](../create-template.md) |
-| A semantic source PPTX exists and only its layout should improve | Use [`beautify-pptx.md`](./beautify-pptx.md) |
-
-**Hard rule — mutually exclusive fidelity profiles**: Image to PPTX and
-Beautify never compose. Beautify preserves semantic PPTX content while
-redesigning layout; Image to PPTX preserves a rendered page surface while
-rebuilding its object and image-layer boundaries.
-
-**Hard rule — flat final deck**: output stays `pptx_structure.mode: flat`. Page
-pixels do not prove Master/Layout identity, placeholders, theme ancestry,
-hidden objects, notes, animations, chart data sources, or authoring history.
-Do not infer them. A reusable-system request routes to Create Template instead.
+| Image files represent pages that must become a final editable PPTX | This profile + Quick |
+| One file contains several clearly separated slide frames | Split into the ordered roster first, then reconstruct each frame |
+| Images are ordinary content assets or inspiration for a new deck | Ordinary Generate |
+| Images should define a reusable workspace | [`create-template.md`](../create-template.md) |
+| A semantic source PPTX exists and only its layout should improve | [`beautify-pptx.md`](./beautify-pptx.md) |
+
+**Hard rule — mutually exclusive fidelity profiles**: Image to PPTX and Beautify never compose — Beautify preserves semantic PPTX content while redesigning layout; this profile preserves a rendered surface while rebuilding object and image-layer boundaries.
+
+**Hard rule — flat final deck**: output stays `pptx_structure.mode: flat`. Pixels do not prove Master/Layout identity, placeholders, theme ancestry, hidden objects, notes, animations, chart data sources, or authoring history; never infer them.
---
## 2. Normalize Source Images into Pages
-🚧 **GATE**: an ordered canonical page-image roster exists before image-layer
-decisions or SVG authoring.
+🚧 **GATE**: an ordered canonical page-image roster exists before any layer decision or SVG authoring.
| Source form | Normalization |
|---|---|
-| One file containing one complete page | Keep it as one canonical page image |
-| Several files containing one page each | Preserve the explicit or filename-natural order |
-| One or more regular contact sheets | Split row-major with `slice_images.py --grid`, without alpha removal |
-| A file containing several non-grid page frames | Record each visibly bounded page bbox and crop it into a separate lossless canonical page image |
-| Boundaries or order are genuinely ambiguous | Mark the roster blocked instead of silently merging, dropping, or reordering pages |
-
-Archive original files under `sources/`; keep normalized page images under
-`images/source-pages/` or another project-local source-page folder. Never
-overwrite an original file.
-
-**Hard rule — one normalized frame, one slide**: frame count, not input-file
-count, owns slide count. Every normalized page frame maps to one output slide
-in the same order. Preserve the frame's aspect ratio. Mixed aspect ratios are
-blocked until the current agent resolves one explicit whole-deck treatment.
-
-**Mandatory — inspect every canonical page**: ordinary image-resource
-inspection limits do not apply to this page roster. Inspect each normalized
-page once to identify text, source graphics, scene-image regions, overlap,
-region-level source sufficiency, boundary completeness, occlusion, and the
-minimum useful layer stack. Reopen only the current page or a specifically
-unresolved region afterward.
+| One file, one complete page | One canonical page image |
+| Several files, one page each | Preserve explicit or filename-natural order |
+| Regular contact sheets | Split row-major with `slice_images.py --grid`, without alpha removal |
+| Several non-grid page frames in one file | Record each visibly bounded bbox and crop it into a separate lossless page image |
+| Ambiguous boundaries or order | Mark the roster blocked; never silently merge, drop, or reorder |
+
+Archive originals under `sources/`; keep normalized pages under `images/source-pages/` or another project-local folder; never overwrite an original.
+
+**Hard rule — one normalized frame, one slide**: frame count, not input-file count, owns slide count; every frame maps to one slide in order with its aspect ratio preserved; mixed aspect ratios block until one explicit whole-deck treatment is resolved.
+
+**Mandatory — inspect every canonical page** once (ordinary image-resource inspection limits do not apply) for text, source graphics, scene regions, overlap, region-level source sufficiency, boundary completeness, occlusion, and the minimum useful layer stack; reopen only the current page or an unresolved region afterward.
---
@@ -101,237 +58,70 @@ Classify visible regions by what they are, not by how easy they are to crop.
| Content family | Default realization | Non-negotiable boundary |
|---|---|---|
-| Editable text | `native_text` | Restore exact visible wording, line grouping, alignment, emphasis, and approximate font metrics; do not bake ordinary slide text into generated images |
-| Source graphic | `source_graphic` | Logos, icons, badges, vector-like ornaments, and decorative marks preserve visible identity. Use an exact vector, deterministic redraw, sufficient source pixels, or Codex reference reconstruction according to the quality ladder below; never substitute a merely similar graphic |
-| Data graphic | `native_chart`, `native_table`, or exact `source_graphic` | Preserve every visible value, label, relationship, and geometry. Rebuild natively only when the source is legible enough to verify; otherwise use an exact crop/vector or mark `manual_required`. Never ask a generative model to recreate chart/table/data content |
-| Simple exact geometry | `native_shape` | Use a native shape only when fill, stroke, geometry, and layering can be matched faithfully; otherwise prepare an identity-faithful source-graphic asset |
-| Scene image | `image_layer` | Photos, people, characters, products, environmental backgrounds, textures, and complex illustrations may be reference-edited or regenerated as registered layers |
-| Unreadable or unsafe region | `manual_required` | Block rather than invent wording, identity, values, or a visually different replacement |
-
-**Hard rule — separate layer need from realization**: source clarity never
-decides whether a required editable, movable, or overlapping object becomes a
-separate layer; it decides only how that layer is prepared.
-
-**Mandatory — assess source sufficiency per region**: judge each region at final
-display size without a page-wide score or threshold. Inspect detail,
-contamination/occlusion, and whether identity, geometry, lettering, or data
-remain verifiable.
-
-| Source evidence for a required independent image layer | Realization |
-|---|---|
-| Complete, cleanly separable, and sufficient at final display size | Prepare a source-derived crop or RGBA layer at the recorded geometry |
-| Contaminated, occluded, incomplete, or too low-resolution; identity and geometry remain verifiable | Reference-edit or reconstruct the layer and exposed background from that evidence |
-| Required identity, wording, values, or geometry cannot be verified | Mark `manual_required`; do not invent authoritative content |
-
-**Graphic identity is authoritative; source pixel bytes are not**: use an exact
-known vector when available. Deterministically redraw a simple, fully legible
-graphic as SVG/native geometry. Reuse source pixels only when they are complete
-and sufficient at final display size. When a complex logo, icon, badge,
-ornament, or wordmark is visibly identifiable but too low-resolution, use its
-source crop as the Codex reference and reconstruct a higher-resolution asset
-that preserves the same silhouette, proportions, colors, lettering, bbox, and
-z-order. Never merely interpolate low-resolution pixels, redesign the brand,
-replace it with a similar library icon, or invent unreadable identity. If those
-properties cannot be verified, mark the graphic `manual_required`.
-
-**Visible-surface authority**: preserve every legible string, number, label,
-relative position, crop, z-order, color relationship, and emphasis visible in
-the source. Do not improve the layout, rewrite copy, correct claims through
-research, reveal invented semantics, or silently replace branded graphics.
+| Editable text | `native_text` | Exact visible wording, line grouping, alignment, emphasis, approximate metrics; never bake slide text into generated images |
+| Source graphic | `source_graphic` | Logos, icons, badges, ornaments preserve identity via exact vector, deterministic redraw, sufficient source pixels, or Codex reference reconstruction; never a merely similar graphic |
+| Data graphic | `native_chart`, `native_table`, or exact `source_graphic` | Every value, label, relationship, and geometry preserved; native only when legible enough to verify, otherwise exact crop/vector or `manual_required`; never generatively recreated |
+| Simple exact geometry | `native_shape` | Only when fill, stroke, geometry, and layering match faithfully |
+| Scene image | `image_layer` | Photos, people, characters, products, environments, textures, complex illustrations may be reference-edited or regenerated as registered layers |
+| Unreadable or unsafe region | `manual_required` | Block rather than invent wording, identity, values, or a different replacement |
----
+**Hard rule — separate layer need from realization**: source clarity never decides whether a required editable, movable, or overlapping object becomes a separate layer, only how that layer is prepared. **Mandatory — assess source sufficiency per region** at final display size without a page-wide score: complete, cleanly separable, and sufficient → a source-derived crop or RGBA layer at the recorded geometry; contaminated, occluded, incomplete, or low-resolution with verifiable identity and geometry → reference-edit or reconstruct the layer and exposed background from that evidence; unverifiable identity, wording, values, or geometry → `manual_required`.
-## 4. Build the Minimum Useful Layer Stack
-
-For each page, decide the smallest stack that makes the intended objects
-independent. Do not split a page merely to maximize layer count.
-
-Typical bottom-to-top order:
-
-1. `base` — clean full-canvas background with all planned removable subjects,
- foreground objects, and editable text removed; hidden background pixels are
- reconstructed where necessary.
-2. `midground-*` — optional scene layers that must sit between the base and
- primary subject.
-3. `subject-*` — people, characters, products, props, or other independently
- movable cutouts.
-4. `foreground-*` — effects, foliage, particles, framing objects, or other
- scene elements that cross the subject or native slide objects.
-5. `source-graphic-*` — exact or identity-faithfully reconstructed logos,
- icons, badges, and ornamental marks, plus exact/native data graphics at
- their visible z-order.
-6. `native-text-*` and exact native shapes.
-
-**Registered-group rule**: every base/midground/subject/foreground layer in a
-group stays registered to the same canonical page or scene bbox. A
-source-derived member retains recorded geometry; every Codex-derived member
-starts from that canonical source. Preserve canvas, position, scale,
-pose, lighting, and style. Do not trim registered full-canvas layers;
-transparent pixels retain alignment.
-
-When one or more scene layers require reference editing or reconstruction, use
-[`image-generator.md`](../../references/image-generator.md) §4.4's registered
-reconstruction group as the primitive:
-
-- create one clean base by removing **all** scene subjects/foreground objects,
- source/data graphics, and editable text planned for separate realization,
- then reconstruct only the newly exposed background;
-- create at least one independent subject/foreground output from the same
- canonical source whenever the page contains scene content that must be
- independently editable; the base plus that output are the minimum two
- independently prepared image layers, while §3 decides whether each layer
- retains sufficient source pixels or requires reference reconstruction;
-- derive every additional layer independently from the canonical source, never
- from the base or another generated layer;
-- preserve the original pose, scale, and coordinates on RGBA transparency;
-- repeat only for additional layers that genuinely need independent movement,
- overlap, or animation.
-
-**Batch non-overlapping objects**: one object does not imply one generation.
-When several subjects, props, effects, or source-graphic reconstructions have
-pairwise-disjoint padded bboxes—including visible shadows and effects—and can
-share one isolation treatment, ask Codex for one `layer-plate` containing all
-of them with clear separation. Use either:
-
-- a full-canvas registered plate that keeps the source positions, then create
- one nested-SVG picture crop per recorded bbox; or
-- a regular isolated-cell sheet when source coordinates are unnecessary, then
- use `slice_images.py --grid ... --names ... --trim --alpha` and place the
- resulting assets at their recorded source bboxes.
-
-Both paths yield independent PPT picture objects from one generated output.
-If transparency is unavailable, use one exact flat key color for the whole
-plate and remove it once; never regenerate a separate green-background image
-for each object. Objects that overlap one another or require different z-order
-must use separate plates/layers.
-
-The reference-image CLI does not inherit source dimensions automatically. Pass
-an explicit matching aspect ratio/size, then verify that every member of one
-registration group has the same final pixel canvas. In SVG, place the base and
-all full-canvas layers at identical `x`, `y`, `width`, and `height` with
-`no-crop` behavior.
-
-**Reconstruct for final resolution**: apply the §3 source-sufficiency decision
-per region. Retaining complete source pixels is valid only when they remain
-sharp enough at final display size; a clear source may still require reference
-reconstruction when separation needs hidden or uncontaminated pixels. When
-detail is insufficient, use Codex reference reconstruction; interpolation alone
-does not recover detail.
-
-**Reference-edit, not reinterpretation**: reconstruction prompts name the
-canonical source page/region and ask to preserve the visible composition and
-style. They may inpaint hidden scene pixels or complete an occluded subject,
-but must not redesign the scene, change a character/person, introduce text,
-substitute or alter a logo, or invent extra decorative graphics.
-
-When Codex cannot return transparency, generate the isolated layer or shared
-plate on one exact flat key color and use `slice_images.py` as a `1x1` sheet
-with `--alpha` and **without** `--trim`, preserving full-canvas registration.
-Several plate members share this single keyed output.
+**Graphic identity is authoritative; source pixel bytes are not**: use an exact known vector when available; deterministically redraw a simple, fully legible graphic; reuse source pixels only when complete and sufficient at final size; when a complex logo, icon, badge, ornament, or wordmark is identifiable but too low-resolution, use its crop as the Codex reference and reconstruct a higher-resolution asset with the same silhouette, proportions, colors, lettering, bbox, and z-order — never mere interpolation, a brand redesign, a similar library icon, or invented identity. **Visible-surface authority**: preserve every legible string, number, label, relative position, crop, z-order, color relationship, and emphasis; never improve the layout, rewrite copy, correct claims through research, reveal invented semantics, or replace branded graphics.
---
-## 5. Source Evidence without a Quick Plan
+## 4. Build the Minimum Useful Layer Stack
-Before deciding layers, write source evidence to:
+Decide per page the smallest stack that makes the intended objects independent; never split merely to maximize layer count. Typical bottom-to-top order: `base` (clean full-canvas background with every planned removable subject, foreground object, and editable text removed, hidden pixels reconstructed where necessary) → `midground-*` → `subject-*` (independently movable cutouts) → `foreground-*` (effects, foliage, particles, framing that cross the subject or native objects) → `source-graphic-*` (exact or reconstructed marks plus exact/native data graphics at their z-order) → `native-text-*` and exact native shapes.
-```text
-<project_path>/analysis/reconstruction_inventory.json
-```
+**Registered-group rule**: every base/midground/subject/foreground layer in a group stays registered to the same canonical page or scene bbox; source-derived members keep recorded geometry, every Codex-derived member starts from that canonical source with canvas, position, scale, pose, lighting, and style preserved; never trim registered full-canvas layers. When scene layers need reference editing, use [`image-generator.md`](../../references/image-generator.md) §4.4's registered reconstruction group: one clean base with all separately realized subjects, graphics, and text removed and only the exposed background reconstructed; at least one independent subject/foreground output from the same canonical source whenever the page holds scene content that must be independently editable (base plus that output are the minimum two layers); every additional layer derived independently from the canonical source, never from the base or another generated layer; original pose, scale, and coordinates on RGBA transparency; further layers only for genuine independent movement, overlap, or animation.
-The inventory records what is visibly present, not a resumable implementation
-plan. Keep it limited to:
+**Batch non-overlapping objects**: when several subjects, props, effects, or graphic reconstructions have pairwise-disjoint padded bboxes (including shadows and effects) and share one isolation treatment, ask Codex for one `layer-plate` holding all of them with clear separation — either a full-canvas registered plate followed by one nested-SVG picture crop per recorded bbox, or a regular isolated-cell sheet sliced with `slice_images.py --grid ... --names ... --trim --alpha` and placed at the recorded bboxes. Without transparency, use one exact flat key color for the whole plate (`slice_images.py` as a `1x1` sheet with `--alpha` and without `--trim` for a registered plate) and remove it once; never a separate green-background image per object. Overlapping objects or different z-orders use separate plates.
-- original file and normalized page path;
-- page order, source-frame bbox, SHA-256, and pixel dimensions;
-- visible regions with stable ids, source bboxes, observed family
- (`text`, `graphic`, `image`, or `unknown`), verbatim text when applicable,
- and confidence;
-- observed source sufficiency, boundary completeness, occlusion/contamination,
- and identity/data verifiability at final placement;
-- overlap/z-order observations and unresolved evidence.
+The reference-image CLI does not inherit source dimensions: pass an explicit matching aspect ratio/size and verify every member of a registration group shares the same final pixel canvas; in SVG place the base and all full-canvas layers at identical `x`, `y`, `width`, `height` with `no-crop` behavior. **Reconstruct for final resolution**: retained source pixels must stay sharp at final size; interpolation recovers no detail. **Reference-edit, not reinterpretation**: prompts name the canonical source page/region and preserve the visible composition and style; they may inpaint hidden pixels or complete an occluded subject but never redesign the scene, change a person, introduce text, alter a logo, or add decoration.
-Do **not** put final layer choices, generation prompts, output filenames, or SVG
-bindings into this inventory. The current main agent keeps those decisions in
-active context and writes only required operational image manifests/evidence.
-Context loss restarts the Quick run; the inventory is not a resume artifact.
+---
+
+## 5. Source Evidence without a Quick Plan
-Low-confidence visible text, an uncertain page boundary, or an unidentified
-branded/data graphic is unresolved evidence and blocks successful delivery.
+Before deciding layers, write `<project_path>/analysis/reconstruction_inventory.json` recording only what is visibly present: original file and normalized page path; page order, source-frame bbox, SHA-256, pixel dimensions; visible regions with stable ids, bboxes, observed family (`text` / `graphic` / `image` / `unknown`), verbatim text where applicable, and confidence; observed sufficiency, boundary completeness, occlusion/contamination, and identity/data verifiability; overlap/z-order observations and unresolved evidence. No final layer choices, prompts, output filenames, or SVG bindings — those stay in active context plus required operational image evidence; context loss restarts the run. Low-confidence text, an uncertain boundary, or an unidentified branded/data graphic is unresolved evidence and blocks delivery.
---
## 6. Image Preparation
-When any `image_layer` or low-resolution `source_graphic` requires reference
-editing or generation, load
-[`image-base.md`](../../references/image-base.md) and
-[`image-generator.md`](../../references/image-generator.md). The current Codex
-main agent resolves the layer stack directly, uses Codex's native
-reference-image capability, and finishes every required layer before SVG
-authoring. Do not adapt `image_gen.py`, its generic manifest, or provider
-backends for this profile.
-
-- Use `text_policy: none` for scene reconstruction layers. Use `embedded` only
- when an exact visible wordmark/letterform is integral to a reconstructed
- source graphic; ordinary slide text always remains native.
-- Exhaust the available Codex image path automatically; block before export if a
- required layer remains `Needs-Manual`.
-- Preserve each prepared image layer's source page/region, source hash,
- realization method, operation, output path/hash, registration group, and
- z-order in the applicable operational evidence; include prompt and
- backend/model when the layer was reference-edited or reconstructed.
-- Re-run `analyze_images.py` after assets change.
-- A generated candidate is not usable until its expected file exists, it has
- been inspected once, and its registration group or plate has been checked
- against the canonical page.
-- Inspect the recomposed page once after all generated layers, plate crops,
- source graphics, native shapes, and native text are in place. This narrow
- readback is mandatory fidelity validation, not resource reselection.
+When any `image_layer` or low-resolution `source_graphic` needs reference editing, load [`image-base.md`](../../references/image-base.md) and [`image-generator.md`](../../references/image-generator.md); the Codex main agent resolves the stack directly with Codex's native reference-image capability and finishes every layer before SVG authoring — never adapt `image_gen.py`, its manifest, or provider backends for this profile. Use `text_policy: none` for scene layers and `embedded` only when an exact wordmark/letterform is integral to a reconstructed graphic. Exhaust the Codex image path automatically and block before export if a layer stays `Needs-Manual`. Record each layer's source page/region, source hash, realization method, operation, output path/hash, registration group, and z-order (plus prompt and backend/model when reconstructed) in the operational evidence; re-run `analyze_images.py` after assets change. A candidate is usable only when its file exists, it has been inspected once, and its group or plate has been checked against the canonical page. Inspect the recomposed page once after all layers, crops, graphics, shapes, and text are in place — mandatory fidelity validation, not resource reselection.
---
## 7. SVG Authoring and Release Gate
-Follow Quick Generate after source normalization and resource preparation.
-Hand-author pages serially from the prepared base, registered scene layers,
-identity-faithful source graphics, native shapes, and native text. Give independently
-movable layers stable direct-root group ids so later animation can target them.
+Follow Quick after normalization and preparation: hand-author pages serially from the base, registered layers, source graphics, native shapes, and native text, giving independently movable layers stable direct-root group ids for later animation.
-**Forbidden — screenshot skin**: do not use the complete source page as the
-sole full-slide picture and add token editable text above it. The source page
-is a comparison reference, not a hidden backing layer in the delivered slide.
-
-Verify each page against its canonical image:
+**Forbidden — screenshot skin**: never use the complete source page as the sole full-slide picture with token editable text above it; the source page is comparison evidence, not a hidden backing layer.
| Final check | Required evidence |
|---|---|
-| Page roster | Every normalized frame becomes one slide in the same order and canvas treatment |
-| Native text | Every legible string/number is present verbatim and remains editable |
-| Source graphics | Logos, icons, and decorative graphics preserve the original identity and geometry at adequate final resolution; no similar substitute or unverified redesign appears |
-| Data graphics | Every chart/table/data value and relationship is native-and-verified or retained from an exact source asset; none is generatively recreated |
-| Layer registration | Base, subject, foreground, and other generated layers share the expected canvas/placement and show no jumps, seams, halos, or independent-crop drift |
-| Visible image fidelity | The recomposed scene preserves the source's visible subject identity, pose, crop, lighting, color relationships, and z-order |
-| Honest reconstruction | AI-recovered hidden pixels are identified as reconstruction, not claimed as original source detail |
-| Independent objects | Every layer requested for editing or animation is a distinct SVG/PPT picture object; non-overlapping members may originate from one shared generated plate |
-| Reference exclusion | Canonical full-page source images remain comparison evidence and are not referenced or packaged as delivered slide media |
-| Package quality | Quick's lockless final SVG checker and PPTX postflight pass |
-
-If a generated layer drifts, retry from the canonical reference with a narrower
-edit instruction. Do not compensate by changing native text/graphics or by
-flattening the full page. If the Codex image path is exhausted,
-mark the affected layer `Needs-Manual` and block successful export.
+| Page roster | Every normalized frame is one slide in order with the same canvas treatment |
+| Native text | Every legible string/number present verbatim and editable |
+| Source graphics | Identity and geometry preserved at adequate resolution; no substitute or unverified redesign |
+| Data graphics | Every value and relationship native-and-verified or from an exact source asset; none generatively recreated |
+| Layer registration | Generated layers share canvas/placement with no jumps, seams, halos, or crop drift |
+| Visible fidelity | Subject identity, pose, crop, lighting, color relationships, and z-order preserved |
+| Honest reconstruction | AI-recovered hidden pixels identified as reconstruction |
+| Independent objects | Every layer requested for editing or animation is a distinct picture object (shared plates allowed for disjoint members) |
+| Reference exclusion | Canonical full-page source images are not referenced or packaged as slide media |
+| Package quality | Quick's lockless final checker and PPTX postflight pass |
+
+If a layer drifts, retry from the canonical reference with a narrower edit; never compensate by changing native text/graphics or flattening the page. If the Codex path is exhausted, mark the layer `Needs-Manual` and block export.
```markdown
## ✅ Image to PPTX Complete
-
-- [x] Source files were normalized into the complete ordered page roster
-- [x] Visible text is native and verbatim
-- [x] Source graphics preserve identity and are sharp enough at final size
-- [x] Required background / foreground / subject layers are independent and registered
-- [x] Shared plates were split/cropped into the required independent objects
-- [x] Recombined pages match the supplied visual references
-- [x] Canonical full-page source images are absent from delivered slide media
+- [x] Source files normalized into the complete ordered roster
+- [x] Visible text native and verbatim; source graphics identity-faithful and sharp
+- [x] Required background / foreground / subject layers independent and registered; shared plates split into independent objects
+- [x] Recombined pages match the references; canonical source images absent from slide media
- [x] Quick's SVG quality gate and PPTX postflight pass
- [ ] **Next**: Report the PPTX and identify native, exact-source, and AI-reconstructed objects
```