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
fix(icons): separate strategist selection from local execution
hugohe3206a205e7823
diff --git a/AGENTS.md b/AGENTS.mdindex 1b8d4f1a..21879108 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -27,7 +27,7 @@ PPT Master is an AI-driven presentation generation system. Multi-role collaborat## Required Conventions- **Repo-wide style rules** — when editing prompt files under [`skills/ppt-master/references/`](skills/ppt-master/references/), Python under [`skills/ppt-master/scripts/`](skills/ppt-master/scripts/), or any other code/prose in the repo, follow the matching style rule in [`docs/rules/`](docs/rules/).-- **Prompt decision ownership** — follow [`docs/rules/prompt-style.md`](docs/rules/prompt-style.md) §4.1: Strategist readies every selected resource; Executor uses only that inventory and owns realization. Never move acquisition or reselection downstream.+- **Prompt decision ownership** — follow [`docs/rules/prompt-style.md`](docs/rules/prompt-style.md) §4.1: Strategist readies project-local resources; Executor realizes the plan from that prepared pool. For icons, every SVG under `<project>/icons/` is prepared execution material, while `icons.inventory` records the Strategist's planned bundled selection rather than an execution whitelist. Never move acquisition or reselection downstream.- **Markdown language consistency** — Markdown files under `skills/ppt-master/workflows/`, `skills/ppt-master/references/`, and `docs/` are currently single-language per directory. New files mirror the language of their siblings; do not mix English scaffolding with Chinese paragraphs (or vice versa) inside one file. Chat replies are unaffected.## Compatibility Boundarydiff --git a/docs/rules/prompt-style.md b/docs/rules/prompt-style.mdindex d6604461..0cf8877a 100644--- a/docs/rules/prompt-style.md+++ b/docs/rules/prompt-style.md@@ -78,7 +78,7 @@ Begin substantive paragraphs with a bolded short label. Reuse this fixed vocabul`python3 skills/ppt-master/scripts/project_manager.py page-context <project_path> P<NN> --record-usage`.**Forbidden — unresolved asset references**:-- Icons MUST come from `icons.inventory`+- Icons MUST resolve to prepared project-local assets- Images MUST resolve to declared project assets```@@ -104,7 +104,7 @@ Constraint strength and decision ownership are independent. Preserve this chain|---|---|| User / initial materials | Supplied facts/assets, desired outcome, exclusions, and permission boundaries remain authoritative || Strategist / plan + preparation | Assess material sufficiency; trigger permitted fact research; decide the approved content, resources, keys, identity anchors, and exact page roster; materialize the planned project-local inventory or record an explicit `Needs-Manual` dependency before execution |-| Executor / realization | Use only the prepared inventory and realize the approved selections through geometry, composition, hierarchy, and treatment; sparse local font/color garnish is allowed only while non-structural and non-recurring |+| Executor / realization | Use only prepared project-local assets and realize the approved selections through geometry, composition, hierarchy, and treatment; for icons, the complete `<project>/icons/` pool is prepared material and `icons.inventory` is not a whitelist; sparse local font/color garnish is allowed only while non-structural and non-recurring |**Preparation timing**: Fact research required for planning may run before final confirmation. AI / web / slice acquisition runs only from the completed `design_spec.md §VIII` and `spec_lock.md`, after final confirmation and before Executor. Image_Generator, Image_Searcher, and icon-sync tooling execute Strategist-owned preparation; they are not independent decision owners.diff --git a/docs/technical-design.md b/docs/technical-design.mdindex c08b9639..5542f6fb 100644--- a/docs/technical-design.md+++ b/docs/technical-design.md@@ -401,11 +401,11 @@ The cooking analogy is the canonical ownership model for generation, not just ex|---|---|---|| Customer and initial ingredients | User confirmation and supplied sources/assets | Defines facts, intent, exclusions, acquisition permissions, and how specific the requested outcome is || Menu planner and preparation lead | Strategist, `design_spec.md`, `spec_lock.md`, and Strategist-owned acquisition stages | Assesses sufficiency; fills permitted factual gaps; selects the content, resources, page roster, chart/layout keys, fonts, palette anchors, icons, and crop boundaries; readies the complete project-local inventory before execution |-| Cook | Executor | Uses only the prepared inventory and realizes the plan through geometry, composition, hierarchy, spacing, and treatment without changing the selected “dish” or acquiring/substituting ingredients |+| Cook | Executor | Uses only prepared project-local assets and realizes the plan through geometry, composition, hierarchy, spacing, and treatment without changing the selected “dish” or acquiring/substituting ingredients |**Preparation has two clocks.** Topic Research supplies facts before final confirmation: it starts immediately for topic-only input, or after supplied material is converted/read when planning-critical factual gaps remain. It supplements only those gaps and acquires no images. AI / web / slice image acquisition runs only after final confirmation and the completed `design_spec.md §VIII` / `spec_lock.md`, then reaches a terminal status before Executor starts. Strategist also resolves, syncs, and validates the icon inventory while authoring the final plan. Image_Generator, Image_Searcher, and icon-sync tooling are preparation mechanisms under Strategist ownership, not independent decision owners.-**Prepared inventory is the boundary.** A resource is available to Executor only when Strategist has selected it, recorded it in the planning artifacts, and made its project path resolvable or explicitly `Needs-Manual`. Merely existing elsewhere on disk does not authorize its use. Missing material returns upstream; Executor never searches, generates, downloads, syncs, or substitutes it.+**Prepared project-local assets are the boundary.** Images and other declared resources remain available only when Strategist has selected them, recorded them in the planning artifacts, and made their project paths resolvable or explicitly `Needs-Manual`. Icons are prepared when their SVG files exist under `<project>/icons/`; `spec_lock.icons.inventory` records the Strategist's planned bundled selection but is not an exhaustive execution whitelist. Files elsewhere on disk are not authorized. Missing material returns upstream; Executor never searches, generates, downloads, syncs, or substitutes it.**Specificity controls freedom.** “Make Mapo tofu” fixes the result's identity: technique and presentation may vary, but tomato-and-eggs or tofu soup is a substitution. “Make a tofu dish” leaves an in-class choice. Strategist may resolve that choice; if the Design Spec deliberately leaves a dimension broad, Executor may realize it within that envelope. Once the Design Spec names a concrete choice, execution cannot reopen it.diff --git a/docs/zh/technical-design.md b/docs/zh/technical-design.mdindex a10ca463..ae322f42 100644--- a/docs/zh/technical-design.md+++ b/docs/zh/technical-design.md@@ -397,11 +397,11 @@ Strategist 阶段产出两份看起来冗余但服务不同对象的产物:|---|---|---|| 顾客与初始食材 | 用户确认与用户提供的原材料/素材 | 决定事实、意图、排除项、材料补充许可,以及要求具体到什么程度 || 菜单策划与备料负责人 | Strategist、`design_spec.md`、`spec_lock.md` 及其负责的材料获取阶段 | 判断材料是否充分;补齐获准补充的事实;选定内容、资源、页面清单、图表/版式 key、字体、色板锚点、图标和裁剪边界;在执行前备齐项目级材料清单 |-| 厨师 | Executor | 只使用已备材料,以几何、构图、层级、间距和视觉处理实现方案;不得改变所选“菜品”,也不得自行找料、换料 |+| 厨师 | Executor | 只使用项目中已备好的材料,以几何、构图、层级、间距和视觉处理实现方案;不得改变所选“菜品”,也不得自行找料、换料 |**备料有两个时点。** Topic Research 在最终确认前补充规划所需的事实:只有主题时立即运行;已有材料时先转换 / 阅读,仅在仍有关键事实缺口时补齐,而且不获取任何图片。AI / web / slice 图片只能在最终确认以及完整的 `design_spec.md §VIII` / `spec_lock.md` 之后获取,并在 Executor 开始前进入终态。Strategist 还会在编写最终方案时解析、同步并验证图标 inventory。Image_Generator、Image_Searcher 与图标同步工具只是 Strategist 负责的备料机制,不是独立决策者。-**已备材料清单就是边界。** 只有被 Strategist 选定、写入规划产物,并且项目路径可解析或已明确标为 `Needs-Manual` 的资源,才对 Executor 可用。文件仅仅存在于其他目录并不构成使用许可。缺料必须返回上游;Executor 不得搜索、生成、下载、同步或替换资源。+**项目中已备好的材料就是边界。** 图片和其他声明型资源,仍须由 Strategist 选定、写入规划产物,并保证项目路径可解析或明确标为 `Needs-Manual`。图标 SVG 只要已位于 `<project>/icons/` 就属于已备材料;`spec_lock.icons.inventory` 记录 Strategist 计划选用的内置图标,但不是穷尽式执行白名单。其他目录中的文件不构成使用许可。缺料必须返回上游;Executor 不得搜索、生成、下载、同步或替换资源。**具体程度决定自由度。** “做麻婆豆腐”锁定成品身份:火候、口感和摆盘可以发挥,但不能换成番茄炒蛋或豆腐汤。“做一道豆腐菜”则保留了品类内选择空间。Strategist 可以把这个开放要求收敛成具体方案;如果 Design Spec 有意保留某个维度的开放性,Executor 可以在该范围内实现。一旦 Design Spec 已经选定具体结果,执行阶段不得重新打开选择。diff --git a/skills/ppt-master/references/artifact-ownership.md b/skills/ppt-master/references/artifact-ownership.mdindex 3b17f90b..f33d61bf 100644--- a/skills/ppt-master/references/artifact-ownership.md+++ b/skills/ppt-master/references/artifact-ownership.md@@ -23,7 +23,7 @@ Global artifact ownership rules for PPT Master projects.| `project_manager.py page-context` stdout | Derived per-page context | Read-only model-facing anchor set + current-page delta + fingerprints for large references | Generate immediately before each page without `--bundle`; never edit or persist it as a replacement source of truth. `global` is the bounded repeated anchor set, not a whitelist of every valid page-local value. `reference_set` carries path/SHA/load policy for project/template Design Specs and selected prototype/chart SVGs, but never appends their payloads. The project Design Spec alone may carry `same_context_edit_policy` for verified targeted readback/rebind after the current main agent's own repair. || `analysis/page-context/P<NN>.usage.json` | Derived context telemetry | Actual compact page-context size plus hashes of owning inputs/references | `page-context --record-usage` deterministically replaces that page's snapshot; `page-context-report` summarizes current snapshots and unique references. Use token data to evaluate context cost, never as content or an execution contract. || `images/` | Runtime image pool | User, extracted, AI, web, formula, slice, EMF/WMF assets | Step 5 writes here; `analysis/image_analysis.csv` derives from current contents |-| `icons/` | Project icon inventory | Icons copied by `icon_sync.py` for this project | Executor uses locked project icons; exporter may fall back to global library only as documented |+| `icons/` | Prepared project icon pool | Bundled icons copied by `icon_sync.py` plus user-provided, template, imported, or custom icon SVGs | Executor may use any icon in this project-local pool; `spec_lock.icons.inventory` records planned bundled choices rather than an exhaustive whitelist. Exporter global fallback is legacy compatibility only. || `templates/` | Project template reference | Step 3 imported specs, template SVGs, and non-image assets | Strategist reads the template Design Spec and actual SVG roster during planning. Continuous Executor reuses that context; fresh Executor reads the Design Spec once and each selected complete SVG only before first use or after its SHA changes. || `templates/template_execution_manifest.json` (`v1`) + `templates/template_execution/*.text-slots.json` (`v2-min`) | Derived template index | Compact prototype/source-import summary plus per-prototype text-slot diagnostics; the sidecar integrity hash is tool-only | Materialization may publish these deterministic records, but page-context does not inject or require them and models do not read them during page authoring. The complete prototype SVG is the sole visual/template authority; never author from either JSON artifact. || `<import_workspace>/svg/` | Imported native-payload backing | Complete PPTX-derived metadata, hidden carriers, fallback evidence, and source structure | Keep immutable; create-template materialization may resolve a validated source ref against these files, but models do not edit or bulk-read them |diff --git a/skills/ppt-master/references/executor-base.md b/skills/ppt-master/references/executor-base.mdindex ec552de8..f27e27e5 100644--- a/skills/ppt-master/references/executor-base.md+++ b/skills/ppt-master/references/executor-base.md@@ -93,7 +93,7 @@ Use named lock roles literally when that role applies, and use optional `Templat**Execution anchors and contextual values**:-- Icons MUST come from `icons.inventory`; library MUST equal `icons.library`+- Icons may use any SVG already prepared under `<project_path>/icons/`. `icons.library` records the Strategist's primary bundled style choice and `icons.inventory` records its planned selection; neither is an execution whitelist over project-local assets.- Core color roles retain their meaning. Derive tints, shades, alpha, gradients, and effects; preserve natural asset colors; and use sparse page-local accents for differentiation/ornament. They must not become a competing or recurring palette.- Resolve structural families by role: exact `<role>_family` first, then `title_family` for title roles or `body_family` for other unoverridden roles, then legacy `font_family`. Never flatten declared role overrides. A sparse export-safe accent family may style short non-structural display/ornament only—never title/body/data/annotation. Recurrence requires upstream selection.- Font sizes use the named `typography` role values as deck-wide anchors. Map every structural or feature text item to a declared role before drawing; never inherit a template placeholder size. Start from the anchor, then use composition and content fit to adjust that occurrence by at most `±2`px. Keep same-page peers consistent and preserve the role hierarchy; bounded adjustment does not create a new role.@@ -103,7 +103,7 @@ Use named lock roles literally when that role applies, and use optional `Templat- Images MUST reference files listed under `images`; no invented filenames- Formula PNGs are images with `Acquire Via: formula`; place a `Rendered` file only from its listed path, use the normal placeholder for `Needs-Manual`, and never recreate the formula as text.-Return upstream before any derived/accent identity becomes recurring or structural, or before typography needs a new semantic role or an outside-band size, then regenerate context. Local garnish and same-role `±2`px adjustments need no lock row. Never expand the lock to silence a comparison. Icons, images, structural fonts, role anchors, and resources keep their inventory/role rules.+Return upstream before any derived/accent identity becomes recurring or structural, or before typography needs a new semantic role or an outside-band size, then regenerate context. Local garnish and same-role `±2`px adjustments need no lock row. Never expand the lock to silence a comparison. New icon acquisition, images, structural fonts, role anchors, and resources keep their preparation/role rules.**Per-page layout rhythm — `page_rhythm` section**:@@ -196,11 +196,11 @@ Examples: `01_封面.svg` / `02_目录.svg` / `03_核心优势.svg`; `01_cover.s## 4. Icon Usage-Strategist chooses the library and inventory; Executor only implements. Library details and one-library rule: [`../templates/icons/README.md`](../templates/icons/README.md). This section defines placeholder syntax.+Strategist chooses at most one primary bundled stylistic library and may select `simple-icons` alone or alongside it; Executor implements from the complete prepared project-local pool. Library details and selection rules: [`../templates/icons/README.md`](../templates/icons/README.md). This section defines placeholder syntax.-> **Resolution is project-first.** Strategist copied the chosen icons into `<project_path>/icons/<lib>/` (via `icon_sync.py`); `finalize_svg.py embed-icons` embeds from there, falling back to the global library per-icon. Custom SVGs must already exist in the prepared project inventory under `<project_path>/icons/<lib>/`. Reference only icons in `spec_lock.md icons.inventory`.+> **Prepared-project boundary.** Any SVG already under `<project_path>/icons/<lib>/` is valid execution material, whether selected from a bundled library or supplied by the user, a template, or an import workflow. New authoring must resolve there. The global fallback in `finalize_svg.py embed-icons` is legacy compatibility, not permission for Executor to discover or use an unprepared global icon.-> **Icon identifiers are case-sensitive filenames.** For bundled libraries, copy the verified lowercase basename exactly (`tabler-outline/award`, never `tabler-outline/Award`) into `spec_lock.md` and every `data-icon` value. Custom icon identifiers preserve the custom file's exact case; the pipeline never silently lowercases names.+> **Icon identifiers are case-sensitive filenames.** Every `data-icon` value must use the exact project-local relative basename (`tabler-outline/award`, never `tabler-outline/Award`). Strategist records its planned bundled choices in `spec_lock.md`; Executor need not add other already-prepared project-local icons to that inventory. Custom identifiers preserve the custom file's exact case; the pipeline never silently lowercases names.**Built-in icons — Placeholder method (recommended)**:@@ -233,14 +233,14 @@ Strategist chooses the library and inventory; Executor only implements. Library>> Icons are auto-embedded by `finalize_svg.py` — no need to run `embed_icons.py` manually.-**Locked-id verification only**: verify the exact project-local file already named in `icons.inventory`:+**Project-local verification**: verify the exact prepared file before use:```bashtest -f "<project_path>/icons/<lib>/<name>.svg"```-**Missing locked icon** → return to Strategist's inventory / `icon_sync.py` gate. Do not search the global library, select an alternative, copy a candidate, or edit the lock in Executor.+**Missing project-local icon** → return to Strategist's preparation / `icon_sync.py` gate. Do not search the global library, select an alternative, or copy a candidate in Executor.-**Hard rule — icon inventory**: use only the Design Spec's approved inventory. Mixing stylistic libraries within one deck is FORBIDDEN.+**Hard rule — prepared assets**: Executor may freely combine project-local icons, regardless of namespace or style. It may not acquire a new icon or treat a globally resolvable file as prepared material.---diff --git a/skills/ppt-master/references/strategist.md b/skills/ppt-master/references/strategist.mdindex 1c034be3..eb3a8f62 100644--- a/skills/ppt-master/references/strategist.md+++ b/skills/ppt-master/references/strategist.md@@ -182,13 +182,14 @@ See [`../templates/icons/README.md`](../templates/icons/README.md) for the curre>> **At the Strategist confirmation stage — decide the library and stroke only; resolve and sync filenames after approval.**>-> 1. **Pick exactly one stylistic library** — read the source material, then choose the library whose visual character best serves the deck:+> 1. **Pick at most one primary stylistic library from the four bundled choices** — when generic icons are needed, read the source material and choose the one whose visual character best serves the deck:> - **`chunk-filled`** — fill, straight-line geometry (M/L/H/V/Z only); sharp right angles; heavy, solid, architectural> - **`tabler-filled`** — fill, bezier curves and arcs (C/A); smooth, rounded, organic; medium weight, approachable> - **`tabler-outline`** — stroke (line art); airy, refined, lightweight; best for screen-only (thin strokes may be hard to read in print)> - **`phosphor-duotone`** — duotone; main shape + 20% opacity backplate; medium weight, layered, contemporary-> - ⚠️ **One presentation = one stylistic library** for generic icons (home, chart, users, etc.). Mixing `chunk-filled` / `tabler-filled` / `tabler-outline` / `phosphor-duotone` is FORBIDDEN. If the chosen library lacks an exact icon, find the closest alternative **within that same library**.-> - **Brand-logo exception**: `simple-icons` is NOT a stylistic library. Add it to the deck's icon inventory **only when** the deck genuinely contains real company / product / service brand marks (customer logos, tech-stack icons, social handles). Never substitute it for a missing generic icon.+> - During bundled-library selection, do not select generic icons from more than one of `chunk-filled` / `tabler-filled` / `tabler-outline` / `phosphor-duotone`. If the chosen library lacks an exact icon, find the closest alternative **within that same library**.+> - **`simple-icons` may be selected alone or alongside the primary library**: it is a brand-logo library, not one of the four stylistic choices. Add it only for real company / product / service marks (customer logos, tech-stack icons, social handles), never as a substitute for a missing generic icon.+> - This restriction governs Strategist selection from the bundled catalog, not the prepared project asset pool. User-provided, template-carried, imported, custom, and previously prepared files under `<project_path>/icons/` remain valid material regardless of namespace or visual style.> 2. **Stroke weight lock (stroke-style libraries only)** — for stroke-based libraries (currently `tabler-outline`), pick one deck-wide value from `{1.5, 2, 3}` (default `2`). For heavier presence, switch library instead of going above `3`.>> **After the Strategist confirmation stage is approved — when writing `design_spec.md` §VI / `spec_lock.md`**, then materialize the icon inventory:@@ -197,9 +198,9 @@ See [`../templates/icons/README.md`](../templates/icons/README.md) for the curre> 4. Put known basenames in the final batch. For an uncertain one, search the chosen style library — or `simple-icons` for a real brand mark — with `rg --files "skills/ppt-master/templates/icons/<library>" -g '*<keyword>*.svg'`; do not enumerate broad keyword families.> 5. **Copy and validate in one batch** — run `python3 skills/ppt-master/scripts/icon_sync.py <project_path> <lib/name> [<lib/name> …]`. This both validates and materializes `<project>/icons/<lib>/`; skip per-file prechecks.> 6. Keep each successful, case-sensitive `lib/name`: bundled basenames are lowercase (`tabler-outline/award`, never `tabler-outline/Award`); custom icons retain exact case.-> 7. Record the successful inventory, library, and stroke-library `stroke_width` in `design_spec.md` §VI and `spec_lock.md icons`. Executor may use only this list.+> 7. Record the successful bundled selection, its primary stylistic library, and any stroke-library `stroke_width` in `design_spec.md` §VI and `spec_lock.md icons`. Keep selected `simple-icons/*` ids in the same inventory without treating them as a second stylistic library. The inventory records the plan; it does not revoke other prepared project-local icons.>-> 🚧 **GATE — missing icon = re-pick now**: on non-zero exit, search only the missing concept in the chosen library, re-pick, and rerun the final batch until clean. Never carry a missing icon forward or switch stylistic libraries to fill the gap.+> 🚧 **GATE — missing icon = re-pick now**: on non-zero exit, search a missing generic concept only in the chosen stylistic library, or a missing real brand mark in `simple-icons`; re-pick and rerun the final batch until clean. Never carry a missing icon forward or switch among the four stylistic libraries to fill the gap.>> **Default — targeted lookup only**: do not load or rebuild a full index; search only unresolved concepts.diff --git a/skills/ppt-master/scripts/icon_sync.py b/skills/ppt-master/scripts/icon_sync.pyindex 34c5ca72..25d572f0 100644--- a/skills/ppt-master/scripts/icon_sync.py+++ b/skills/ppt-master/scripts/icon_sync.py@@ -6,8 +6,9 @@ Copy chosen library icons into `<project>/icons/<lib>/` when selected. Missingnames exit non-zero before export. Known basenames need no separate existencecheck; search the chosen library only for unresolved concepts.-Project-local custom icons count as satisfied. `simple-icons` may accompany one-stylistic library only for real brand marks.+Project-local custom icons count as satisfied. In one Strategist selection+batch, `simple-icons` may accompany one of the four stylistic libraries for+real brand marks.Usage:python3 scripts/icon_sync.py <project_path> <lib/name> [<lib/name> ...]@@ -104,7 +105,8 @@ def main(argv: Optional[list[str]] = None) -> int:file=sys.stderr,)print(- "Choose one stylistic library per deck; simple-icons may coexist for real brand marks.",+ "Choose one of the four stylistic libraries per selection batch; "+ "simple-icons may coexist for real brand marks.",file=sys.stderr,)return 1diff --git a/skills/ppt-master/scripts/project_specs.py b/skills/ppt-master/scripts/project_specs.pyindex bdd55991..5fa27f35 100644--- a/skills/ppt-master/scripts/project_specs.py+++ b/skills/ppt-master/scripts/project_specs.py@@ -72,6 +72,7 @@ _MARKDOWN_DATA_LINE_RE = re.compile(_IMAGE_PATH_SUFFIXES = frozenset({".bmp", ".gif", ".jpeg", ".jpg", ".png", ".svg", ".tif", ".tiff", ".webp"})+_LEGACY_SPEC_LOCK_FORBIDDEN = frozenset({"Mixing icon libraries"})_SCAFFOLD_TOKEN_RE = re.compile(r"\{\{[A-Z_]+\}\}")_SCHEMA_MARKER_RE = re.compile(r"^<!--[ \t]+ppt-master-schema:[ \t]*([a-z0-9-]+/v[1-9][0-9]*)[ \t]+-->$",@@ -265,11 +266,12 @@ def default_spec_lock_forbidden() -> frozenset[str]:)if section is None:raise ValueError("spec-lock scaffold has no forbidden section")- return frozenset(+ current = frozenset(re.sub(r"^-[ \t]+", "", line.strip())for line in str(section.get("body", "")).splitlines()if line.strip())+ return current | _LEGACY_SPEC_LOCK_FORBIDDENdef _load_markdown_schema(schema_path: Path) -> dict[str, object]:diff --git a/skills/ppt-master/scripts/prompt_audit_manifest.json b/skills/ppt-master/scripts/prompt_audit_manifest.jsonindex fe7bdd79..93fb3f4e 100644--- a/skills/ppt-master/scripts/prompt_audit_manifest.json+++ b/skills/ppt-master/scripts/prompt_audit_manifest.json@@ -15,9 +15,9 @@"max_tokens": 365000},"file_budgets": {- "AGENTS.md": 2300,+ "AGENTS.md": 2350,"skills/ppt-master/SKILL.md": 800,- "skills/ppt-master/references/executor-base.md": 7060,+ "skills/ppt-master/references/executor-base.md": 7150,"skills/ppt-master/references/executor-structured.md": 5300,"skills/ppt-master/references/executor-chart.md": 3100,"skills/ppt-master/references/executor-image.md": 900,@@ -28,11 +28,11 @@"skills/ppt-master/references/svg-effects.md": 11600,"skills/ppt-master/references/native-data-interface.md": 6200,"skills/ppt-master/references/pptx-structure-interface.md": 4300,- "skills/ppt-master/references/strategist.md": 13350,+ "skills/ppt-master/references/strategist.md": 13400,"skills/ppt-master/references/strategist-image.md": 2100,"skills/ppt-master/references/strategist-template.md": 2100,- "skills/ppt-master/templates/design_spec_reference.md": 2650,- "skills/ppt-master/templates/spec_lock_reference.md": 2100,+ "skills/ppt-master/templates/design_spec_reference.md": 2750,+ "skills/ppt-master/templates/spec_lock_reference.md": 2250,"skills/ppt-master/workflows/generate-pptx.md": 12450,"skills/ppt-master/workflows/stages/apply-template-workspace.md": 1800},@@ -95,7 +95,7 @@"skills/ppt-master/templates/README.md","skills/ppt-master/templates/layouts/README.md"],- "max_tokens": 57400+ "max_tokens": 57450},"route.enhance-native-pptx": {"description": "Finished-PPTX native enhancement route.",@@ -117,7 +117,7 @@"files": ["skills/ppt-master/workflows/template-fill-pptx.md"],- "max_tokens": 10800+ "max_tokens": 10850},"route.generate.planning": {"description": "Generate-PPTX planning through Strategist, including reference-first whole-document authoring and representative multi-source custom mode/style synthesis; schemas and optional scaffolds are tool-consumed.",@@ -306,7 +306,7 @@"stage.generate.executor.notes"],"files": [],- "max_tokens": 81250+ "max_tokens": 81800},"route.generate.flat-ai-two-types": {"description": "Generate-PPTX context with AI images, representative multi-source custom rendering, and two local types.",@@ -319,7 +319,7 @@"stage.generate.image.ai-two-types"],"files": [],- "max_tokens": 121450+ "max_tokens": 122000},"route.generate.flat-in-hand-image": {"description": "Generate-PPTX context with provided, placeholder, or formula images and no acquisition role.",@@ -331,7 +331,7 @@"stage.generate.executor.notes"],"files": [],- "max_tokens": 94750+ "max_tokens": 95300},"route.generate.flat-web-image": {"description": "Generate-PPTX context with web image acquisition.",@@ -344,7 +344,7 @@"stage.generate.image.web"],"files": [],- "max_tokens": 102000+ "max_tokens": 102500},"route.enhance-native-pptx.audio": {"description": "Enhance Native PPTX with the shared narration-audio stage.",@@ -364,7 +364,7 @@"profile.generate.beautify-pptx"],"files": [],- "max_tokens": 88110+ "max_tokens": 88600},"route.generate.flat-no-image-chart": {"description": "Default flat Generate-PPTX path with chart authoring, native-data replacement, and verification.",@@ -377,7 +377,7 @@"stage.generate.verify-charts"],"files": [],- "max_tokens": 105250+ "max_tokens": 105800},"route.generate.brand-flat-no-image": {"description": "Brand-preset flat Generate-PPTX path without image acquisition.",@@ -389,7 +389,7 @@"stage.generate.template.brand"],"files": [],- "max_tokens": 88300+ "max_tokens": 88800},"route.generate.deck-structured-no-image": {"description": "Deck-preset structured Generate-PPTX path without image acquisition.",@@ -401,7 +401,7 @@"stage.generate.template.deck"],"files": [],- "max_tokens": 98100+ "max_tokens": 98600},"route.generate.layout-structured-no-image": {"description": "Layout-preset structured Generate-PPTX path without image acquisition.",@@ -413,7 +413,7 @@"stage.generate.template.layout"],"files": [],- "max_tokens": 98550+ "max_tokens": 99100},"route.generate.topic-only-flat-no-image": {"description": "Topic research followed by the default flat no-image Generate-PPTX path.",@@ -423,7 +423,7 @@"route.generate.flat-no-image"],"files": [],- "max_tokens": 82650+ "max_tokens": 83200},"stage.generate.executor.flat": {"description": "Incremental flat Executor core with representative multi-source custom mode/style execution.",@@ -533,7 +533,7 @@"stage.generate.executor.image"],"files": [],- "max_tokens": 58350+ "max_tokens": 58500},"stage.generate.topic-research": {"description": "Gap-targeted factual intake stage.",@@ -661,7 +661,7 @@"stage.generate.strategist.template"],"files": [],- "max_tokens": 59200+ "max_tokens": 59700},"route.generate.planning-template-ai": {"description": "Explicit template workspace plus confirmed AI-image planning.",@@ -671,7 +671,7 @@"route.generate.planning-ai"],"files": [],- "max_tokens": 71400+ "max_tokens": 71800},"stage.generate.executor.chart": {"description": "Conditional chart/table page execution rules.",diff --git a/skills/ppt-master/scripts/svg_quality_checker.py b/skills/ppt-master/scripts/svg_quality_checker.pyindex 7ceaa631..e26eb4e3 100644--- a/skills/ppt-master/scripts/svg_quality_checker.py+++ b/skills/ppt-master/scripts/svg_quality_checker.py@@ -3703,6 +3703,12 @@ class SVGQualityChecker:returnicons_dir, fallback_dir = _icon_search_dirs_for_svg(svg_path)+ require_project_local = self._requires_project_local_icons(svg_path)+ project_icons_dir = (+ _project_root_for_svg_path(svg_path) / 'icons'+ if _project_root_for_svg_path is not None+ else None+ )seen = set()for elem in placeholders:icon_name = (elem.get('data-icon') or '').strip()@@ -3713,6 +3719,20 @@ class SVGQualityChecker:continueseen.add(icon_name)+ if require_project_local and project_icons_dir is not None:+ local_path, _ = _resolve_icon_path(+ icon_name,+ project_icons_dir,+ None,+ )+ if not local_path.exists():+ result['errors'].append(+ f"Icon is not prepared in the project: {icon_name} "+ f"(expected under {project_icons_dir}); return to "+ "Strategist preparation instead of using the global fallback"+ )+ continue+icon_path, _ = _resolve_icon_path(icon_name, icons_dir, fallback_dir)if not icon_path.exists():fallback_msg = f", then {fallback_dir}" if fallback_dir else ""@@ -3742,6 +3762,31 @@ class SVGQualityChecker:result['info'].get('native_icon_payload_refs', 0) + hydrated)+ @staticmethod+ def _requires_project_local_icons(svg_path: Path) -> bool:+ """Return whether a generated page belongs to a versioned project."""+ if svg_path.parent.name != 'svg_output' or _project_root_for_svg_path is None:+ return False+ lock_path = _project_root_for_svg_path(svg_path) / 'spec_lock.md'+ try:+ first_line = next(+ (+ line.strip()+ for line in lock_path.read_text(encoding='utf-8-sig').splitlines()+ if line.strip()+ ),+ '',+ )+ except OSError:+ return False+ return bool(+ re.fullmatch(+ r'<!--[ \t]+ppt-master-schema:[ \t]*spec-lock/v[1-9][0-9]*[ \t]+-->',+ first_line,+ re.IGNORECASE,+ )+ )+def _check_unsupported_visual_elements(self,root: ET.Element,diff --git a/skills/ppt-master/templates/design_spec_reference.md b/skills/ppt-master/templates/design_spec_reference.mdindex 2ff717dc..74cfdb9c 100644--- a/skills/ppt-master/templates/design_spec_reference.md+++ b/skills/ppt-master/templates/design_spec_reference.md@@ -126,13 +126,14 @@ Use these exact subsections and field shapes:## VI. Icon Usage Specification-- **Library**: <confirmed library, custom, or none>+- **Primary bundled library**: <one of chunk-filled / tabler-filled / tabler-outline / phosphor-duotone, or none>+- **Brand-logo library**: <simple-icons when selected for real brand marks; omit otherwise>| Purpose | Icon Path | Page || --- | --- | --- |```-Preserve the confirmed Title/Body system, then add every Strategist-established recurring family override justified by the completed page plan. Append the same semantic role to the Font Plan table and add `- **<Role> stack**: <complete ordered stack>`. Typical optional roles include `Annotation`, `Footer`, `Footnote`, `Data`, `Emphasis`, `Quote`, and `Code`; add only roles that recur and intentionally differ. `Role rationale` records the decision but does not itself become a lock field. Do not collapse distinct Title/Body stacks or discard a declared optional role. Treat every Font Size Hierarchy value as a role anchor: Executor may adjust one occurrence within anchor `±2px`, but a new semantic role or any planned feature outside that band needs its own row. Add every recurring palette role and typography-size anchor established by the plan; do not enumerate one-off paint or font-family garnish. For confirmed custom directions, add the applicable `Mode References`, `Mode Behavior`, `Visual Style References`, and `Visual Style Behavior` lines under Theme Style. Include `Stroke Width` under §VI only for a stroke library. Leave the §VI table empty when no icons are used.+Preserve the confirmed Title/Body system, then add every Strategist-established recurring family override justified by the completed page plan. Append the same semantic role to the Font Plan table and add `- **<Role> stack**: <complete ordered stack>`. Typical optional roles include `Annotation`, `Footer`, `Footnote`, `Data`, `Emphasis`, `Quote`, and `Code`; add only roles that recur and intentionally differ. `Role rationale` records the decision but does not itself become a lock field. Do not collapse distinct Title/Body stacks or discard a declared optional role. Treat every Font Size Hierarchy value as a role anchor: Executor may adjust one occurrence within anchor `±2px`, but a new semantic role or any planned feature outside that band needs its own row. Add every recurring palette role and typography-size anchor established by the plan; do not enumerate one-off paint or font-family garnish. For confirmed custom directions, add the applicable `Mode References`, `Mode Behavior`, `Visual Style References`, and `Visual Style Behavior` lines under Theme Style. Include `Stroke Width` under §VI only for a stroke library. `simple-icons` may accompany the one primary bundled library and is recorded only when real brand marks were selected. The icon table records planned usage, but user-provided, template-carried, imported, custom, and other prepared SVGs under the project `icons/` directory remain usable without being forced into that stylistic selection. Leave the §VI table empty when no icons are used.When §VIII contains any `Acquire Via: ai` row, add this subsection under §III and preserve the complete confirmed AI direction:diff --git a/skills/ppt-master/templates/icons/README.md b/skills/ppt-master/templates/icons/README.mdindex 753a1d13..1b6f40be 100644--- a/skills/ppt-master/templates/icons/README.md+++ b/skills/ppt-master/templates/icons/README.md@@ -1,6 +1,6 @@# SVG Icon Library-This directory provides **11,600+ high-quality SVG icons** across five libraries that can be directly embedded into SVG files generated by PPT Master. Four are stylistic libraries (pick **one** per deck); one is a brand-logo library (`simple-icons`) used as an inset alongside the chosen stylistic library.+This directory provides **11,600+ high-quality SVG icons** across five libraries that can be directly embedded into SVG files generated by PPT Master. When the Strategist selects bundled generic icons, it chooses at most one primary library from the four stylistic libraries; the brand-logo library (`simple-icons`) may be selected alone or alongside it.## Libraries@@ -22,7 +22,7 @@ This directory is the **global library**. At selection time the Strategist copiepython3 skills/ppt-master/scripts/icon_sync.py <project_path> tabler-outline/home tabler-outline/bulb simple-icons/github```-Missing names and batches that mix stylistic libraries exit non-zero; `simple-icons` may coexist for real brand marks. `finalize_svg.py embed-icons` embeds **project-first** from `<project>/icons/`, with per-icon global fallback.+Missing names and a single selection batch that mixes the four stylistic libraries exit non-zero; `simple-icons` may coexist for real brand marks. Once files are under `<project>/icons/`, they form the prepared project asset pool and may be combined freely with user-provided, custom, or imported icons. `finalize_svg.py embed-icons` embeds **project-first**; its per-icon global fallback exists for legacy compatibility, not new asset discovery.**Custom icons**: drop your own `.svg` into `<project>/icons/<lib>/` (any `<lib>`, e.g. `custom/`) and reference it as `data-icon="<lib>/<name>"` — it embeds like any library icon.@@ -49,7 +49,7 @@ Use placeholder syntax **during SVG generation**:<!-- phosphor-duotone (soft depth — single color renders the backplate at 20% opacity) --><use data-icon="phosphor-duotone/house" x="100" y="200" width="48" height="48" fill="#0076A8"/>-<!-- simple-icons (brand logo — used alongside the deck's primary library, not as a substitute) -->+<!-- simple-icons (brand logo — used alone or alongside the deck's primary stylistic library) --><use data-icon="simple-icons/github" x="100" y="200" width="48" height="48" fill="#181717"/>```@@ -97,9 +97,9 @@ Do not load a full index or enumerate broad keyword families. Re-pick from the n> 1. **Geometry**: straight lines (`chunk-filled`) vs. curves (`tabler-filled` / `phosphor-duotone`) vs. open strokes (`tabler-outline`)> 2. **Visual weight**: heavy solid (`chunk-filled`) → medium solid (`tabler-filled`) → medium layered (`phosphor-duotone`) → light stroke (`tabler-outline`)-**One presentation = one stylistic library.** Pick `chunk-filled` / `tabler-filled` / `tabler-outline` / `phosphor-duotone` at the start and use it exclusively throughout for generic icons (home, chart, users, etc.). If the chosen library doesn't have an exact icon, find the closest available alternative within that same library — never cross stylistic libraries to fill a gap.+**One primary bundled stylistic library per Strategist selection.** Pick one of `chunk-filled` / `tabler-filled` / `tabler-outline` / `phosphor-duotone` for generic icons (home, chart, users, etc.). If it lacks an exact icon, find the closest available alternative within that library instead of selecting from another bundled stylistic library. This is a catalog-selection rule, not a prohibition on combining assets that already exist in the project's `icons/` directory.-**Brand-logo exception (`simple-icons`).** `simple-icons` is **not a stylistic library** and does not participate in the "one library" rule. Its job is brand recognition — Slack's purple, GitHub's cat, AWS's color — which is intentionally heterogeneous. Use it **alongside** the chosen stylistic library, but **only** for actual company / product / service brand marks. Do **not** reach for it as a substitute when the chosen stylistic library lacks a generic icon.+**Brand-logo exception (`simple-icons`).** `simple-icons` is **not a stylistic library** and does not participate in the "one library" rule. Its job is brand recognition — Slack's purple, GitHub's cat, AWS's color — which is intentionally heterogeneous. Use it **alone or alongside** the chosen stylistic library, but **only** for actual company / product / service brand marks. Do **not** reach for it as a substitute when the chosen stylistic library lacks a generic icon.| Use `simple-icons` for | Do NOT use `simple-icons` for ||------------------------|-------------------------------|@@ -107,4 +107,4 @@ Do not load a full index or enumerate broad keyword families. Re-pick from the n| Tech stack icons on architecture / integration diagrams | Replacing a missing icon in `chunk-filled` / `tabler-*` / `phosphor-duotone` || Social media handles in a footer | Decorative / illustrative purposes |-⚠️ Do **not** mix icons from different **stylistic** libraries (`chunk-filled` / `tabler-filled` / `tabler-outline` / `phosphor-duotone`). `simple-icons` is the sole exception and may co-exist as a brand-logo inset — see the brand-logo exception above.+⚠️ During bundled selection, choose generic icons from only one of the four **stylistic** libraries. `simple-icons` may be selected at the same time for real brand marks. Project-local assets are already prepared material and are not subject to a runtime mixing ban.diff --git a/skills/ppt-master/templates/scaffolds/spec_lock.md b/skills/ppt-master/templates/scaffolds/spec_lock.mdindex 29bba2a5..f8706ee6 100644--- a/skills/ppt-master/templates/scaffolds/spec_lock.md+++ b/skills/ppt-master/templates/scaffolds/spec_lock.md@@ -41,6 +41,5 @@- mode: flat## forbidden-- Mixing icon libraries- `mask`, `<style>`, `class`, external CSS, `<foreignObject>`, `textPath`, `@font-face`, `<animate*>`, `<set>`, `<script>` / event attributes, `<iframe>`- HTML named entities in text; write typography as raw Unicode and escape XML reserved charactersdiff --git a/skills/ppt-master/templates/spec_lock_reference.md b/skills/ppt-master/templates/spec_lock_reference.mdindex 60e165a1..7cdb8019 100644--- a/skills/ppt-master/templates/spec_lock_reference.md+++ b/skills/ppt-master/templates/spec_lock_reference.md@@ -24,7 +24,7 @@ After Generate Step 4 Gate 1, read the completed Design Spec and current page/re| `visual_style` | `visual_style` | Preset or `custom` || `colors` | Stable semantic color roles | Core identity and recurring roles only; contextual SVG paints need no row; `image_rendering` appears only for AI images || `typography` | `font_family`, `body`, `title` | Core family/size anchors; new locks also write explicit `title_family` and `body_family`; size anchors are unitless px numbers |-| `icons` | `library`, `inventory` | `stroke_width` is conditional |+| `icons` | `library`, `inventory` | `library` is the Strategist's primary bundled style choice or `none`; `simple-icons/*` may be selected alone or accompany it; `inventory` records the planned bundled selection rather than all usable project-local icons; `stroke_width` is conditional || `page_rhythm` | One `P<NN>` row per page | Values: `anchor`, `dense`, `breathing` || `pptx_structure` | `mode` | Values: `flat`, `structured` || `forbidden` | Literal list items | General standards stay in their owning reference |@@ -35,7 +35,6 @@ The required universal block is:```markdown## forbidden-- Mixing icon libraries- `mask`, `<style>`, `class`, external CSS, `<foreignObject>`, `textPath`, `@font-face`, `<animate*>`, `<set>`, `<script>` / event attributes, `<iframe>`- HTML named entities in text; write typography as raw Unicode and escape XML reserved characters```@@ -90,6 +89,7 @@ New locks always write `title_family` and `body_family`, even when their values- `font_family`, `title_family`, `body_family`, and every optional `<role>_family` use one non-empty PPT-safe exported family stack. `font_family` is the body/default compatibility stack, not permission to erase role differences.- Every non-family `typography` value is a positive unitless px anchor. Intermediate values need no lock row when they stay within the mapped role's anchor `±2px`; a new semantic role or an outside-band size requires Design Spec repair and a new anchor.+- `icons.library` records the primary stylistic library selected from `chunk-filled`, `tabler-filled`, `tabler-outline`, or `phosphor-duotone`, or `none` when no generic bundled icons are selected. Selected `simple-icons/*` brand marks may appear alone or alongside it in `inventory` without becoming a stylistic library. The inventory records planned bundled choices, while every SVG already under `<project_path>/icons/` remains valid prepared execution material.- `objective` grammar: one concise sentence preserving the deck goal and audience success condition.- `image_rendering` grammar: one catalog id, or `custom` with `image_rendering_behavior`.- `images`: `- <key>: <path> | source=<via> | pattern=<layout> | crop=<adaptive|no-crop>`; e.g. `- p04: images/a.png | source=user | pattern=#2 Left image | crop=no-crop`. Omit unplaced sheets.