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(templates): install each workspace as its own spec instead of fusing
hugohe31cc01e05eb3f
diff --git a/docs/technical-design.md b/docs/technical-design.mdindex a096bcd1..ae42bab1 100644--- a/docs/technical-design.md+++ b/docs/technical-design.md@@ -71,7 +71,7 @@ User Input (PDF/DOCX/XLSX/PPTX/URL/Markdown/topic text)↓[Template Candidate Preparation (Step 3)] — internal only; no UI, wait, selection, template read, or installationPrepare indexed Brand/Style/Layout/Deck candidates and supplied exact roots- Stage 1 confirms communication plus free design/template use together; selected workspaces are then validated/fused before Stage 2+ Stage 1 confirms communication plus free design/template use together; selected workspaces are then validated and installed before Stage 2Raw PPTX template requests route to template-fill; reusable SVG templates are created by create-template first↓[Strategist] - Stage 1 communication confirmation + final Stage 2 solution/production confirmation → design_spec.md + spec_lock.md@@ -182,7 +182,7 @@ Use this table before reasoning about implementation details. Most failed runs s| Existing PPTX, preserve page count/order/wording 1:1, improve layout | Generate PPTX + `beautify-pptx` profile | content and pagination stay locked; explicit Quick intent uses Quick, otherwise Default || Finished PPTX, keep content/layout stable, add notes/audio/timings/transitions | Enhance Native PPTX (`native-enhance-pptx`) | direct OOXML patch; no design regeneration || User wants a reusable template workspace from one or more PPTX/SVG files, images/PDFs, documents/websites, brand assets, direct text, or a mixed reference bundle | Create Template (`create-template`) | the fixed entry reads every applicable evidence channel, dispatches one Create Brand, Create Style, Create Layout, or Create Deck child workflow, then returns a workspace root as a Generate Stage-1 candidate; structured children may export a review PPTX |-| Default Generate reaches planning; an exact current-contract workspace root or current Create Template handoff may already be present | Generate PPTX Stage 1 | Step 3 prepares candidates without interaction; Stage 1 confirms communication plus free design/template use together; ordinary requests default to free design, explicit template intent or any root defaults to template mode, and only one root is preselected; selected workspaces are validated/fused before Stage 2 |+| Default Generate reaches planning; an exact current-contract workspace root or current Create Template handoff may already be present | Generate PPTX Stage 1 | Step 3 prepares candidates without interaction; Stage 1 confirms communication plus free design/template use together; ordinary requests default to free design, explicit template intent or any root defaults to template mode, and only one root is preselected; selected workspaces are validated and installed before Stage 2 || User asks to tune object-level animation order/effect/timing | Generate PPTX + `customize-animations` stage | optional export policy via `animations.json` || User asks to preview, select, annotate, or re-export browser edits | Generate PPTX + `live-preview` stage | annotations apply only at defined handoff points |@@ -430,7 +430,7 @@ input.`<template_workspace>` is either `skills/ppt-master/templates/<kind>/<id>/` oranother exact workspace root such as `projects/<name>/`. Step 3 records it ascandidate input without reading template content. Once Stage 1 selects it, the-apply stage validates, fuses, and installs it into the current project's+apply stage validates and installs it into the current project's`templates/`, `images/`, and `icons/`; it never copies `exports/`. Strategistand later roles read only that project-local copy when template-aware planningbegins after Stage 1. The source workspace remains portable between@@ -444,7 +444,7 @@ The four template kinds own different segments of the design contract:| Kind | Owns | Typical contents | Effect on Strategist ||---|---|---|---|| `brand` | identity | colors, typography, logo, voice, icon style | locks identity; structure remains free |-| `style` | direction / method | communication method, open page roles, evidence/data rules, visual defaults, image/icon direction, advisory review focus | seeds Stage 2; Style-only stays flat, while fusion follows the selected Layout/Deck structure; never becomes identity truth or triggers visual review |+| `style` | direction / method | communication method, open page roles, evidence/data rules, visual defaults, image/icon direction, advisory review focus | seeds Stage 2; Style-only stays flat, while an installed Layout/Deck supplies the structure plan; never becomes identity truth or triggers visual review || `layout` | brand-neutral structure | canvas, page structure, semantic text roles/spatial behavior, page types, SVG roster | exposes structure; identity and communication application remain downstream decisions || `deck` | application + integrated identity/structure | recurring situations, audiences/outcomes, representative page roles, identity, and actual SVG roster | contributes descriptive context and prototypes that Strategist compares with the independently confirmed Stage-1 contract and current content before deriving the application plan |@@ -456,7 +456,7 @@ formatting from those rules plus the confirmed reading mode/type scale;`mirror` preserves literal source formatting and text topology. Export mayplace both rule sets into the same native Master/Layout graph.-When several workspaces are selected, fusion is segment-level, not field-level. Brand owns identity, Style owns direction/method defaults, Layout owns compatible structure, and Deck retains descriptive reusable-application context plus any identity/structure not overridden. Library/explicit provenance never changes that order. The current project's application contract comes only from confirmed Stage 1; Deck context is comparison input for Stage 2, not an override. User confirmation remains highest. Style palette/type defaults never override Brand/Deck identity; its method/composition expectations must be compatible with the selected Deck context and Layout/Deck structure or fusion surfaces a conflict. A project-local Brand + Layout composition gets its application context from Stage 1 and is not automatically promoted into a reusable library Deck. Same-kind conflicts are surfaced rather than resolved by implicit ordering. This keeps template composition debuggable: a fused spec can say exactly which bundle owns each segment.+When several workspaces are selected, each installs as its own spec file and ownership is resolved segment-level while reading, not field-level. Brand owns identity, Style owns direction/method defaults, Layout owns compatible structure, and Deck retains descriptive reusable-application context plus any identity/structure not overridden. Library/explicit provenance never changes that order. The current project's application contract comes only from confirmed Stage 1; Deck context is comparison input for Stage 2, not an override. User confirmation remains highest. Style palette/type defaults never override Brand/Deck identity; its method/composition expectations must be compatible with the selected Deck context and Layout/Deck structure, or the conflict is surfaced. A project-local Brand + Layout composition gets its application context from Stage 1 and is not automatically promoted into a reusable library Deck. Same-kind conflicts are surfaced rather than resolved by implicit ordering. This keeps template composition debuggable: the installed set is self-describing, since each file names its kind and id and keeps its source body unchanged.**Raw PPTX files cannot be Step 3 workspaces.** Normal Generate may use a PPTX as source material, and `beautify-pptx` may redesign it while preserving page count, order, and per-page wording 1:1; neither treats the source PPTX as a Step 3 template. When a raw PPTX is used as a template or native slide shell and filled with new material, the default route is Fill Native PPTX. If the request permits splitting, merging, dropping, reordering, or narrative restructuring, it remains Generate. Only a request to create a reusable template workspace and reuse that design system in SVG-route Step 3 first runs Create Template and then supplies the generated workspace root.diff --git a/docs/templates-architecture.md b/docs/templates-architecture.mdindex 60f1d6ab..fa208dff 100644--- a/docs/templates-architecture.md+++ b/docs/templates-architecture.md@@ -4,7 +4,7 @@----> This is the **architecture alignment document**. It defines the four template kinds at the data-model layer, the field sets of each `design_spec.md`, and the multi-path fusion + conflict resolution rules. Audience: contributors and AI workflows; answers "what should / shouldn't a template directory contain; how do they combine when multiple are supplied".+> This is the **architecture alignment document**. It defines the four template kinds at the data-model layer, the field sets of each `design_spec.md`, and the multi-path installation + segment-ownership rules. Audience: contributors and AI workflows; answers "what should / shouldn't a template directory contain; how do they combine when multiple are supplied".>> For user-facing usage (how to trigger, how to pick), see [`templates-guide.md`](./templates-guide.md); not repeated here.@@ -23,7 +23,7 @@ Every newly created Layout/Deck SVG is a complete preview with root Master/LayouThe four are **parallel reusable-rule bundles**, not PowerPoint package-object types. In library scope, the physical directory and the frontmatter `kind` field correspond one-to-one:-The fused project-level `design_spec.md` retains the existing capability label: `deck` when both identity and structure are present, `layout` when structure is present without identity, `brand` when identity is present without structure, and `style` only when direction/method is the sole reusable segment. Style combined with another kind does not change that kind label. For a project-local Brand + Layout composition, `kind: deck` means “both capabilities are installed”; it does not promote that composition into a reusable library Deck or invent application context. The current project's Stage-1 communication contract supplies that context. Strategist derives the template application plan internally; the confirmation page exposes no template mode controls.+Each installed spec keeps its own `kind` and id; there is no merged project spec and no combined capability label. The routing consequence is derived while reading: structure comes from an installed Layout or Deck, identity from an installed Brand or Deck, direction from an installed Style. A project-local Brand + Layout pair therefore has both capabilities installed without being promoted into a reusable library Deck or inventing application context. The current project's Stage-1 communication contract supplies that context. Strategist derives the template application plan internally; the confirmation page exposes no template mode controls.```yaml# templates/brands/anthropic/templates/design_spec.md@@ -118,7 +118,7 @@ Before any final write, resolve the selected workspace root, require an empty `t### Segment partition-To make multi-path fusion override cleanly, every field belongs to a named segment. **Default fusion granularity is whole-segment replacement**:+To make multi-path ownership resolve cleanly, every field belongs to a named segment. **A resolved segment is applied whole**:| Segment | Sections it contains | Override owner ||---|---|---|@@ -379,15 +379,39 @@ These indexes cover library scope only. A project-root workspace is intentionall----## 4. Multi-path fusion and conflict resolution+## 4. Multi-path installation and segment ownership-### Segment ownership (implicit dispatch)+### Installation copies; it never mergesWhen Stage 1 confirms registered and/or specified workspace roots, the-post-confirmation apply stage parses every root's real `kind`, resolves each-template segment independently, and writes one-`<project>/templates/design_spec.md`. `library` / `explicit` records discovery-provenance only and never changes ownership:+post-confirmation apply stage parses every root's real `kind` and installs each+selected workspace as **its own** project-local file:++```+<project>/templates/design_spec.brand.mckinsey.md+<project>/templates/design_spec.style.consulting-decision.md+<project>/templates/design_spec.layout.presentation_core.md+```++The body of each file is copied unchanged; only one provenance line is+prepended under its H1:++```markdown+> **Installed from**: `skills/ppt-master/templates/brands/mckinsey/` (library)+```++There is no merged project spec and no combined capability label. A bare+`<project>/templates/design_spec.md` means something different: the project is+itself a template workspace produced by project-scope Create Template, and it+is never consumed as an installed template.++`library` / `explicit` records discovery provenance only and never changes+ownership.++### Segment ownership is resolved while reading++The consuming role — Default final Stage 2, or Quick's agent before authoring —+reads every installed spec and resolves these segments in context:| Segment | Starting owner ||---|---|@@ -402,6 +426,12 @@ Style alone, or Style with Brand, uses flat page authoring. Style with a Layoutor Deck follows the selected structural source. A Style never upgrades ordowngrades structure by itself.+**An owned segment governs visual weight, not only values.** When a segment+owner declares that a value should dominate, recede, or stay rare, that+instruction carries the same authority as the value itself — a Style's+whitespace or composition tendency never demotes a Brand's declared dominant+color into an incidental accent.+Before applying a Layout override to a Deck, compare the Deck's reusableapplication roles against the Layout's page roles, slot types, and capacity.Before combining Style with Layout/Deck, verify that its communication method@@ -410,54 +440,48 @@ structure. On mismatch, surface the conflicting template segments; do notsilently mix fields or retain a promise that the selected structure cannotsatisfy. Current-project fit begins only in final Stage 2 after Stage 1 is confirmed.-### Whole-segment replacement (default granularity)+### Whole-segment application (default granularity)-Fusion defaults to **whole-segment integer replacement** — e.g. on deck + brand, the entire Color Scheme / Typography / Logo / Voice / Icon Style five sections come from brand. **No implicit field-level mixing** (you will never get "primary from brand, secondary from deck").+A resolved segment is applied **whole** — e.g. on deck + brand, the entire+Color Scheme / Typography / Logo / Voice / Icon Style set comes from brand.+**No implicit field-level mixing** (you will never get "primary from brand,+secondary from deck").-Field-level micro-adjustment goes through the existing Strategist confirmation stage path — the user says in chat "use the anthropic brand but change primary to #FF0000", and Strategist adjusts fields e/g. Step 3 fusion does not add field-level syntax.+Field-level micro-adjustment goes through the existing Strategist confirmation+stage path — the user says in chat "use the anthropic brand but change primary+to #FF0000", and Strategist adjusts fields e/g. Installation adds no+field-level syntax.-### Same-kind multiple paths = git-style conflict resolution+### Same-kind multiple paths-User supplies `brands/anthropic` + `brands/google` (or any same-kind permutation):+Several roots of one kind install as separate files distinguished by their+`<id>`, exactly like different kinds:```-AI: You supplied two brands. Detected segment-level conflicts:- - Color Scheme (Anthropic orange-red vs Google multi-color)- - Typography (Styrene/AnthropicSans vs GoogleSans/Roboto)- - Logo (Anthropic mark vs Google mark)- - Voice & Tone (restrained vs friendly)- - Icon Style (stroke vs filled)-- (a) all from Anthropic / (b) all from Google / (c) pick per segment?+<project>/templates/design_spec.brand.anthropic.md+<project>/templates/design_spec.brand.google.md```Rules:-- No implicit ordering — every cross-source segment difference is reported as a conflict-- Only when the user picks `(c)` does AI walk through each segment+- No implicit ordering, and no path-order priority+- The consuming role reads all of them and follows the latest explicit user+ instruction first+- Where the user gave no instruction and two same-kind specs make materially+ incompatible claims over the same segment, surface the conflict in chat+ rather than silently averaging them- Field-level conflict resolution is out of scope — segment-level only-- `style × 2`, `layout × 2`, `deck × 2`, `brand × 2` handled the same way-- Max two of any one kind (more than that — ask the user to converge in chat first)+- `style x 2`, `layout x 2`, `deck x 2`, `brand x 2` behave the same wayThe Default template page already narrows this space: Brand/Style/Layout/Deck each haveone registered single-select dropdown, and one additional specified-root-dropdown may contribute a second workspace of its parsed kind. The server-enforces those limits; chat-based composition retains the general maximum of-two per kind.+dropdown may contribute a second workspace of its parsed kind.-### Provenance--When fusion happens (any multi-path case), the resulting `<project>/templates/design_spec.md` carries a provenance block immediately under its H1:--```markdown-> **Fused from:**-> - deck: `templates/decks/中国电信/` (base)-> - brand: `templates/brands/anthropic/` (identity override)-> - style: `templates/styles/consulting_analytical/` (direction/method)-> - layout: `templates/layouts/presentation_core/` (structure override)-> - conflicts resolved: Color Scheme from anthropic (user picked a)-```+### Traceability-This lets both AI and humans trace which segment came from where.+Because nothing is merged, the installed set is self-describing: the file name+carries kind and id, the provenance line carries the source root, and the body+is byte-identical to the source spec. Tracing which segment came from where is+a directory listing, not a diff.---@@ -487,7 +511,7 @@ produce a new workspace before generation continues. The `kind` field decides| `kind: style` | Install the spec-only direction/method workspace; require no SVG roster and keep generated pages flat || `kind: layout` | Map workspace `templates/` plus existing `images/` and `icons/` to the matching project peers; ignore `exports/` || `kind: deck` | Map workspace `templates/` plus existing `images/` and `icons/` to the matching project peers; ignore `exports/` |-| Multi-path | Fuse one `design_spec.md` per the table above, then merge the existing portable roots after resolving collisions |+| Multi-path | Install one `design_spec.<kind>.<id>.md` per selected workspace, then merge the existing portable asset roots after rejecting collisions || Same-kind multiple | Run the "git-style conflict resolution" prompt above to determine the merge |Bitmaps share the workspace `images/` pool and template SVGs reference them through `../images/`. If the explicit input root is already the target project's root, the apply stage consumes the workspace in place: do not copy it onto itself and do not move its assets again. Otherwise, the complete core workspace is portable: it may be copied from a project root to a library root, from the library to a project, or reused from another workspace without changing its internal structure. Registration is the only scope-specific step.@@ -514,7 +538,7 @@ In library scope, the frontmatter `kind` field determines which workspace parent## 7. Non-goals (rejection list paired with this framing)-- **No field-level override syntax in the fusion layer** — field-level adjustment uses the existing Strategist confirmation stage path+- **No field-level override syntax in the installation layer** — field-level adjustment uses the existing Strategist confirmation stage path- **No batch conflict resolution for three or more of the same kind** — ask the user to narrow it down in chat first- **No bilingual name mapping table** — templates are named in their brand / scenario's native language (Chinese templates use Chinese names; English templates use snake_case); no forced unification- **No output-scope structure fork or CLI flag** — output scope is a `create-template` brief decision; both layout/deck scopes declare `native_structure_mode: structured`, while Brand/Style remain roster-freediff --git a/docs/templates-guide.md b/docs/templates-guide.mdindex 28014368..1d8276d7 100644--- a/docs/templates-guide.md+++ b/docs/templates-guide.md@@ -90,7 +90,7 @@ separate sidecar decision. The communication recommendation is authored onlyfrom the current request, source facts, conversation constraints, and projectinitialization; candidate metadata, selected roots, installed content, andtemplate canvas cannot influence it. After the combined confirmation, a-non-free choice runs the common apply stage and installs/fuses the selected+non-free choice runs the common apply stage and installs the selectedworkspaces into the project's `templates/`, `images/`, and `icons/`. FinalStage 2 then compares the confirmed communication contract with that installedstate; `template_application` describes **how** to use it and never chooses@@ -148,7 +148,7 @@ These four indexes are the complete registered-library source for the DefaultStage-1 template controls and chat discovery; directories are never scanned.Ask "what templates are available?" for a readable list with exact workspacepaths. The kind-specific READMEs define their contracts. Full data model +-fusion / conflict-resolution rules: [`templates-architecture.md`](./templates-architecture.md).+installation / segment-ownership rules: [`templates-architecture.md`](./templates-architecture.md).### Free design vs template@@ -351,7 +351,7 @@ location.Common misconceptions to avoid:- **A reusable template is an explicit workspace, not a packaged source PPTX.** Brand and Style workspaces are roster-free; Layout and Deck workspaces add the structured SVG contract. Authored modes create that contract, while mirror maps validated source ownership facts into it. Export compiles only declared structure-- **A template is not one undifferentiated "style skin".** Brand, Style, Layout, and Deck deliberately separate identity, direction/method, structure, and application so each segment can be reused or fused under an explicit ownership rule+- **A template is not one undifferentiated "style skin".** Brand, Style, Layout, and Deck deliberately separate identity, direction/method, structure, and application so each segment can be reused or combined under an explicit ownership rule- **A template does not make content decisions for you.** The Strategist still decides per-page which layout to use and whether to extend a variant. Templates offer candidates, not predetermined results- **`fidelity` mode is not pixel-perfect copying.** Even with `literal` fidelity, the AI still strips noise and unnecessary repetition — geometry stays, redundancy goes- **`mirror` targets literal supported appearance and source topology, not byte-identical OOXML.** It inherits source import limitations and permits only mechanical normalization such as fixed-layer group expansion. Unsupported native objects keep their available SVG fallback or are reported; mirror never synthesizes replacement ownership.diff --git a/docs/zh/templates-architecture.md b/docs/zh/templates-architecture.mdindex 48803364..a2f95b12 100644--- a/docs/zh/templates-architecture.md+++ b/docs/zh/templates-architecture.md@@ -4,7 +4,7 @@----> 本文是**架构对齐文档**,定义“模板”在数据模型层面的四种身份、各自的 `design_spec.md` 字段集、以及多路径合成与冲突解决规则。面向贡献者与 AI 工作流,回答“一个模板目录里应该写什么、不写什么;多个模板同时给时怎么合成”。+> 本文是**架构对齐文档**,定义“模板”在数据模型层面的四种身份、各自的 `design_spec.md` 字段集、以及多路径安装与片段所有权规则。面向贡献者与 AI 工作流,回答“一个模板目录里应该写什么、不写什么;多个模板同时给时怎么协同”。>> 用户视角的用法(怎么选、怎么提供精确路径)见 [`templates-guide.md`](./templates-guide.md);本文不重复。@@ -23,7 +23,7 @@四者是**四种并列的可复用规则包**,不是 PowerPoint 包对象类型。在全局库范围内,物理目录与 frontmatter `kind` 字段双向对齐:-多路径合成后的项目级 `design_spec.md` 沿用能力标签:同时具备身份段和结构段时为 `deck`,只有结构段时为 `layout`,只有身份段时为 `brand`,只有方向/方法段时才为 `style`。Style 与其他 kind 合成时不改变原有能力标签。对于项目内临时组合的 Brand + Layout,`kind: deck` 只表示“已安装两种能力”,不会把组合自动提升为可注册的 Deck,也不会凭空生成应用语境;当前项目的 Stage 1 沟通契约负责提供场景。Strategist 在内部生成模板应用计划,确认页不显示模板模式控件。+每份已装 spec 各自保留自己的 `kind` 与 id;不存在合并后的项目 spec,也没有组合出来的能力标签。路由结果在读取时推导:结构来自已装的 Layout 或 Deck,身份来自已装的 Brand 或 Deck,方向来自已装的 Style。项目内临时组合的 Brand + Layout 因此只是“两种能力都已安装”,不会被自动提升为可注册的 Deck,也不会凭空生成应用语境;当前项目的 Stage 1 沟通契约负责提供场景。Strategist 在内部生成模板应用计划,确认页不显示模板模式控件。```yaml# templates/brands/anthropic/templates/design_spec.md@@ -105,7 +105,7 @@ native_structure_mode: structured### 四段的字段切分-为了让多路径合成能干净覆盖,所有字段按段归属,**段级整段替换是默认粒度**:+为了让多路径所有权干净解析,所有字段按段归属,**片段整段应用是默认粒度**:| 段 | 包含的章节 | 归属(覆盖优先级)||---|---|---|@@ -336,73 +336,90 @@ Template Overview 写明可重复演示类型、目标受众与结果、交付/----## 四、多路径合成与冲突解决+## 四、多路径安装与片段所有权-### 片段所有权(隐式触发)+### 安装只复制,不合并-Step 3 确认已注册和/或指定工作区根目录后,会解析每个 root 的真实-`kind`,再分片段写入一份 `<project>/templates/design_spec.md`。-`library` / `explicit` 只记录发现来源,不改变所有权:+Step 3 确认已注册和/或指定工作区根目录后,会解析每个 root 的真实 `kind`,+并把每个选中的工作区安装为**各自独立**的一份项目内文件:++```+<project>/templates/design_spec.brand.mckinsey.md+<project>/templates/design_spec.style.consulting-decision.md+<project>/templates/design_spec.layout.presentation_core.md+```++正文原样复制,只在 H1 下补一行来源标注:++```markdown+> **Installed from**: `skills/ppt-master/templates/brands/mckinsey/` (library)+```++不存在合并后的项目 spec,也没有组合出来的能力标签。裸的+`<project>/templates/design_spec.md` 含义完全不同:那表示该项目**自身就是**+project scope 的 Create Template 产物,永远不会被当作已安装模板消费。++`library` / `explicit` 只记录发现来源,不改变所有权。++### 片段所有权在读取时解析++消费方——Default 的最终 Stage 2,或 Quick 在创作前的当前 agent——读取全部已装+spec,并在上下文中解析下列片段:| 片段 | 起始所有者 ||---|---|-| 身份 | Brand,其次 Deck,否则留到最终 Stage 2;Style 只提供 fallback 候选 |-| 方向/方法 | Style,否则留到最终 Stage 2;Deck 的真实原型与 Signature 事实只提供兼容性依据 |-| 结构 | 兼容 Layout,其次 Deck,否则留到最终 Stage 2 / 自由设计 |-| 可复用应用语境 | 仅 Deck;保留供最终 Stage 2 对照,绝不充当当前项目的应用契约 |+| Identity | Brand,其次 Deck;都没有则留到最终 Stage 2;Style 只提供候选回退值 |+| 方向/方法 | Style;没有则留到最终 Stage 2;Deck 的实际原型与 Signature 事实只用于兼容性判断 |+| Structure | 兼容的 Layout,其次 Deck;都没有则留到最终 Stage 2 或自由设计 |+| 可复用应用语境 | 仅 Deck 拥有;保留供最终 Stage 2 比对,绝不作为当前项目的应用契约 |++当前用户指令与最终确认覆盖任何起始所有者。Brand 身份对 Style 的色彩/字体回退值+始终具有权威性。Style 单独、或 Style 加 Brand,走扁平页面创作;Style 与 Layout+或 Deck 同装时follow所选结构来源。Style 自身不会升级或降级结构。-用户当前明确指令和最终确认高于所有起始所有者。Brand 身份高于 Style-的色彩/字体 fallback。Style-only 或 Style + Brand 使用 flat 创作;Style-与 Layout/Deck 合成时沿用所选结构源。Style 自身不升级或降级结构。+**被拥有的片段管的是视觉权重,不只是取值。** 当片段所有者声明某个值应当主导、+退居次要或保持稀有时,该指令与取值本身具有同等权威——Style 的留白或构图倾向+绝不能把 Brand 声明的主导色降格为偶然点缀。-Layout 覆盖 Deck 前,必须把 Deck 的可复用应用角色与 Layout 的页面角色、-槽位类型和容量对照;Style 与 Layout/Deck 合成前,也要确认其沟通方法和-构图预期能够被该可复用语境与结构兑现。不兼容时显式报告模板片段冲突,-不能静默混合字段或保留一份当前结构无法兑现的承诺。当前项目的适配只在-Stage 1 确认后的最终 Stage 2 开始。+用 Layout 覆盖 Deck 结构前,先比对 Deck 的可复用应用角色与 Layout 的页面角色、+槽位类型与容量。把 Style 与 Layout/Deck 组合前,先确认其沟通方法与构图预期+能够被该可复用语境与结构兑现。不兼容时显式报告模板片段冲突,不能静默混合字段+或保留一份当前结构无法兑现的承诺。当前项目的适配只在 Stage 1 确认后的最终+Stage 2 开始。-### 段级整段替换(默认粒度)+### 段级整段应用(默认粒度)-合成默认是**段级整段替换**——例如 deck + brand 时,整个 Color Scheme / Typography / Logo / Voice / Icon Style 五段从 brand 拿,**不做字段级混搭**(即不会发生"primary 从 brand 拿、secondary 从 deck 拿"这类隐式混合)。+解析出的片段**整段应用**——例如 deck + brand 时,整个 Color Scheme / Typography /+Logo / Voice / Icon Style 五段从 brand 拿,**不做字段级混搭**(即不会发生+"primary 从 brand 拿、secondary 从 deck 拿"这类隐式混合)。-字段级微调走 策略师确认阶段这条已有路径——用户在 chat 里说"用 anthropic brand,但 primary 改成 #FF0000",由 Strategist 在 e/g 现场调整,不在 Step 3 的 fusion 层加字段级语法。+字段级微调走策略师确认阶段这条已有路径——用户在 chat 里说"用 anthropic brand,+但 primary 改成 #FF0000",由 Strategist 在 e/g 现场调整;安装层不加字段级语法。-### 同类多份 = git 冲突解决+### 同类多份-用户给 `brands/anthropic` + `brands/google`(同类多份的任意排列组合):+同一 kind 的多个 root 按 `<id>` 区分,各自安装为独立文件,与不同 kind 完全一致:```-AI: 你给了两个 brand,检测到段级冲突:- - Color Scheme(Anthropic 橙红 vs Google 多色)- - Typography(Styrene/AnthropicSans vs GoogleSans/Roboto)- - Logo(Anthropic 标 vs Google 标)- - Voice & Tone(restrained vs friendly)- - Icon Style(stroke vs filled)-- 要 (a) 全部按 Anthropic / (b) 全部按 Google / (c) 逐段挑?+<project>/templates/design_spec.brand.anthropic.md+<project>/templates/design_spec.brand.google.md```-- 默认无隐式顺序,所有冲突都问-- 仅在用户选 (c) 才进入逐段问答;不做字段级冲突解决+- 无隐式顺序,也不按路径先后定优先级+- 消费方读取全部,优先遵循最新的明确用户指令+- 用户未给指令、且两份同类 spec 对同一片段做出实质冲突的主张时,在 chat 中显式+ 提出冲突,而不是静默取中+- 不做字段级冲突解决——只到片段级- `style × 2`、`layout × 2`、`deck × 2`、`brand × 2` 同处理-- 每类最多两份(再多让用户先在 chat 里收敛)Default 模板页面已经把组合空间收窄:Brand/Style/Layout/Deck 各有一个已注册模板单选下拉框,另有一个指定地址下拉框;指定地址按解析出的 kind,最多给该类-增加第二份。服务端强制同一限制;聊天组合仍保留每类最多两份的通用边界。+增加第二份。-### Provenance 记录+### 可追溯性-合成后的 `<project>/templates/design_spec.md` 顶部必须加:--```markdown-> **Fused from:**-> - deck: `templates/decks/中国电信/` (base)-> - brand: `templates/brands/anthropic/` (identity 段覆盖)-> - style: `templates/styles/consulting_analytical/` (方向/方法)-> - layout: `templates/layouts/presentation_core/` (structure 段覆盖)-> - conflicts resolved: Color Scheme from anthropic(用户选 a)-```+因为不做任何合并,已装集合本身即自描述:文件名带 kind 与 id,来源行带源 root,+正文与源 spec 逐字节一致。追溯哪一段来自哪里,看目录列表即可,不需要做 diff。让 AI 和人类都能回溯每段来自哪。@@ -423,8 +440,8 @@ apply 阶段解析 `<workspace>/templates/design_spec.md`;为兼容目录形| `kind: style` | 安装仅含 spec 的方向/方法工作区;要求无 SVG roster,并保持生成页面为 flat || `kind: layout` | 把工作区 `templates/` 及实际存在的 `images/`、`icons/` 映射到项目同名目录;忽略 `exports/` || `kind: deck` | 把工作区 `templates/` 及实际存在的 `images/`、`icons/` 映射到项目同名目录;忽略 `exports/` |-| 多路径 | 按上表合成单份 `design_spec.md`,解决冲突后再合并实际存在的可移植目录 |-| 同类多份 | 按上节"git 冲突解决"问答,得到合成结果 |+| 多路径 | 每个选中工作区安装为一份 `design_spec.<kind>.<id>.md`,拒绝碰撞后再合并实际存在的可移植资产目录 |+| 同类多份 | 按 `<id>` 各自成文件,读取时按上节规则解析所有权 |位图统一进入工作区 `images/`,模板 SVG 通过 `../images/` 引用。如果显式输入根目录本来就是目标项目根目录,apply 阶段原地消费:不得复制到自身,也不得再次移动素材。除此之外,完整核心工作区是可移植的:可以从项目根复制到全局库根、从全局库复制到项目,或从另一个工作区直接复用,而不改变内部结构。注册是唯一与范围相关的步骤。@@ -450,8 +467,7 @@ apply 阶段解析 `<workspace>/templates/design_spec.md`;为兼容目录形## 七、不做(与本文 framing 配套的拒绝列表)-- **不在 fusion 层支持字段级覆盖语法** —— 字段级微调走 策略师确认阶段这条已有路径-- **不为同类三份及以上设计批量冲突解决** —— 用户先在 chat 里收敛到两份+- **不在安装层支持字段级覆盖语法** —— 字段级微调走 策略师确认阶段这条已有路径- **不引入双名映射表** —— 模板命名按其品牌/场景母语(中文模板用中文名,英文模板用 snake_case),不强制统一- **不为输出范围新增结构分支或 CLI flag** —— 输出范围是 `create-template` 简报里的执行选择;两种范围的 Layout/Deck 都声明 `native_structure_mode: structured`,Brand/Style 均无 roster- **不增加 Theme kind** —— Theme 投影 Brand、Deck 或当前项目解析后的身份;Style fallback 不是身份真值diff --git a/skills/ppt-master/references/artifact-ownership.md b/skills/ppt-master/references/artifact-ownership.mdindex 5cb4e9ba..1ada2620 100644--- a/skills/ppt-master/references/artifact-ownership.md+++ b/skills/ppt-master/references/artifact-ownership.md@@ -39,7 +39,7 @@ history, or resumable planning state. Context loss restarts the Quick run.| `images/image_prompts.json`, `image_queries.json`, `image_sources.json`, `formula_manifest.json` | Conditional resource contracts | AI/web/formula execution status and provenance | Create only for a triggered path, including Quick. They guide preparation/attribution, never page design. || `icons/` | Prepared project icon pool | Bundled icons copied by `icon_sync.py` plus user-provided, template, imported, or custom icon SVGs | SVG authoring may choose any icon in this project-local pool per page; `spec_lock.icons.inventory` indexes the default plan's curated synced bundled pool rather than assigning page usage or defining an exhaustive whitelist. Exporter global fallback is legacy compatibility only. || `${SKILL_DIR}/templates/{brands,styles,layouts,decks}/*_index.json` | Library discovery indexes | The complete registered option source for Default Stage-1 template selection and chat listing | The UI server or chat branch reads these indexes only to populate the Stage-1 choice, after the communication recommendation is authored. Never scan kind directories to add options or use index summaries as Stage-1 planning evidence. Derive a library root from kind + entry id. Exact unregistered roots remain explicit inputs. Quick does not read the catalog. |-| `templates/` | Project template reference | Stage-1-confirmed non-free selection or Quick direct-input installed/fused specs, optional Layout/Deck SVG prototypes, and non-image assets | Default template-aware Strategist work from Stage 2 onward, Quick's current agent before direct authoring, and every later role read this project-local state only, never the library/external installation root. The active planner reads every installed template Design Spec and an actual SVG roster only for Layout/Deck; Brand and Style are intentionally roster-free. Continuous Executor reuses that context; fresh Executor reads the Design Spec once and each selected complete SVG, when any, only before first use or after its SHA changes. |+| `templates/` | Project template reference | Stage-1-confirmed non-free selection or Quick direct-input installed specs, one file per selected workspace, optional Layout/Deck SVG prototypes, and non-image assets | Default template-aware Strategist work from Stage 2 onward, Quick's current agent before direct authoring, and every later role read this project-local state only, never the library/external installation root. The active planner reads every installed template Design Spec and an actual SVG roster only for Layout/Deck; Brand and Style are intentionally roster-free. Continuous Executor reuses that context; fresh Executor reads the Design Spec once and each selected complete SVG, when any, 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 || `<import_workspace>/svg-flat/` | Optional complete-page verification backing | Self-contained visual composition generated only by explicit `--inheritance-mode both` | Keep immutable when requested; never use as authoring or materialization input |@@ -72,7 +72,7 @@ history, or resumable planning state. Context loss restarts the Quick run.| Sources read policy | In `sources/`, read content-type files (`.md` / `.markdown` / `.txt` / `.csv` / `.tsv` / `.json` / `.jsonl` / `.yaml` / `.yml`) and judge by content — a `.json` / `.csv` may be core content or just data. Exclude known sidecars: `*.conversion_profile.json` and `*_files/image_manifest.json`. `analysis/` facts (`source_profile.json`, `<stem>.slide_library.json`) are read per Step 4 / direct-PPTX workflow, not in the `sources/` content scan. || PPTX structure | `slide_library.json` owns native geometry, slot facts, and SmartArt layout/relationships for direct PPTX workflows. || Design contract | Final confirmation once → audited `design_spec.md` → optional same-file refinement/approval → context-authored lock. Never maintain a parallel draft/lock. Executor may apply `Template Application` prose but never replace identity. Repair divergence from the approved Design Spec/context unless it fails active-decision fidelity. |-| Flat packaging authority | Free-design, brand-only, Style-only, and every plan with `template_reuse_scope: style` declare `pptx_structure.mode: flat` and omit `pptx_masters`, `pptx_layouts`, `page_pptx_layouts`, and `page_layouts`. A Style fused with Layout/Deck changes only Direction / method and does not force the non-Style structure plan to flat. `svg_output/` owns the complete Slide-local visual design without root Master/Layout identity, fixed-layer ownership, or placeholder metadata. Export materializes one clean project-owned Master plus one Blank Layout, applies the locked theme defaults, removes stock content placeholders/Layout inventory, and retains only the standard date/footer/slide-number capability hooks. |+| Flat packaging authority | Free-design, brand-only, Style-only, and every plan with `template_reuse_scope: style` declare `pptx_structure.mode: flat` and omit `pptx_masters`, `pptx_layouts`, `page_pptx_layouts`, and `page_layouts`. A Style installed alongside Layout/Deck changes only Direction / method and does not force the non-Style structure plan to flat. `svg_output/` owns the complete Slide-local visual design without root Master/Layout identity, fixed-layer ownership, or placeholder metadata. Export materializes one clean project-owned Master plus one Blank Layout, applies the locked theme defaults, removes stock content placeholders/Layout inventory, and retains only the standard date/footer/slide-number capability hooks. || Template structure authority | `template_reuse_scope: mirror|layout` uses `page_layouts` for each page's authoring-input prototype. `pptx_masters` / `pptx_layouts` own the unique reusable output definitions, while `page_pptx_layouts` owns page assignment. Strict keeps the prototype contract; adaptive may use a current or new Layout already declared by Strategist. A construction-discovered structural change returns upstream for definition and assignment repair before authoring resumes. Mirror additionally preserves literal visuals/text topology; layout allows project-controlled reflow/re-skinning. Unused definitions may register without a published Slide. Templates validate provenance but never add missing visible page objects during export. || Fact classes | External facts resolve through `sources/*.facts.json`; invented demo KPIs/targets/internal ratios are labeled `scenario` in `design_spec.md §IX` and visibly in the page. Never promote scenario data into the external fact registry. || Imported-template authoring | Editable SVGs under `authoring-svg/` own create-template edits, `authoring_summary.json` owns model-facing orientation, and `authoring_manifest.json` owns tool-only source-object identity. Lossless `svg/` owns immutable native payload and fallback evidence; optional `svg-flat/` owns only complete-page verification. Materialized `templates/*.svg` own the validated deliverable contract and contain no IR-only source refs. |diff --git a/skills/ppt-master/references/executor-base.md b/skills/ppt-master/references/executor-base.mdindex ee1e89ec..c60fd7b3 100644--- a/skills/ppt-master/references/executor-base.md+++ b/skills/ppt-master/references/executor-base.md@@ -17,7 +17,7 @@ Always-loaded Executor authority for flat SVG page authoring and behavior shared**Hard rule — complete page SVG**: Every visible object intended for the exported slide MUST exist in the final page SVG or be explicitly referenced by it. Templates and `spec_lock.md` guide construction; they are not export-time overlays for missing visible content.-**Hard rule — flat PowerPoint structure**: Free-design, brand-only, Style-only, and every `template_reuse_scope: style` project use `pptx_structure.mode: flat`: write no root Master/Layout identity, `data-pptx-layer`, or `data-pptx-placeholder`; every visible object remains Slide-local, and the root declares exactly one canonical `data-pptx-page-role` (`cover` / `toc` / `section` / `content` / `ending`). A Style workspace supplies reusable communication/design direction, composition rhythm, and information-expression defaults without page prototypes. Its identity-adjacent color, typography, icon, and image defaults yield to the final Brand/Deck identity and confirmed project lock. When Style is fused with Layout/Deck, it changes only Direction / method and follows the resolved non-Style structure route. Export materializes one clean project-owned Master plus one Blank Layout from the current lock. Add `data-pptx-role` only to structural page-frame objects whose package, page-number, or animation behavior is not already expressed by specialized metadata; the marked element uses a stable unique `id`. See [`semantic-svg.md`](./semantic-svg.md).+**Hard rule — flat PowerPoint structure**: Free-design, brand-only, Style-only, and every `template_reuse_scope: style` project use `pptx_structure.mode: flat`: write no root Master/Layout identity, `data-pptx-layer`, or `data-pptx-placeholder`; every visible object remains Slide-local, and the root declares exactly one canonical `data-pptx-page-role` (`cover` / `toc` / `section` / `content` / `ending`). A Style workspace supplies reusable communication/design direction, composition rhythm, and information-expression defaults without page prototypes. Its identity-adjacent color, typography, icon, and image defaults yield to the final Brand/Deck identity and confirmed project lock. When a Style is installed alongside Layout/Deck, it changes only Direction / method and follows the resolved non-Style structure route. Export materializes one clean project-owned Master plus one Blank Layout from the current lock. Add `data-pptx-role` only to structural page-frame objects whose package, page-number, or animation behavior is not already expressed by specialized metadata; the marked element uses a stable unique `id`. See [`semantic-svg.md`](./semantic-svg.md).**Hard rule — supported PPTX route**: The only supported generated-PPTX path is `svg_output/` through the project SVG-to-DrawingML converter. Step 7.2 still generates `svg_final/` as a mandatory self-contained visual preview that may be inserted as an SVG picture. Do not treat PowerPoint's manual Convert-to-Shape operation as an authoring target or compatibility requirement.diff --git a/skills/ppt-master/references/strategist-template.md b/skills/ppt-master/references/strategist-template.mdindex 5cc9bbe4..91ad0e87 100644--- a/skills/ppt-master/references/strategist-template.md+++ b/skills/ppt-master/references/strategist-template.md@@ -10,7 +10,7 @@ Conditional extension for applying an installed Brand/Style/Layout/Deck workspac## 1. AI-Authored Template Application Plan-**Template vs preset**: A style mention and a Style workspace are different inputs. Bare names and style words remain interpretive input and never resolve to a local path; only a selected and installed workspace activates the rules below. Its fused `<project_path>/templates/design_spec.md` is the template-design source. Treat `kind: style` or a fused provenance entry for `style` as an active Direction / method segment. Whether a source root was labelled `library` or `explicit` is installation provenance only and never affects Stage-2 precedence.+**Template vs preset**: A style mention and a Style workspace are different inputs. Bare names and style words remain interpretive input and never resolve to a local path; only a selected and installed workspace activates the rules below. Every installed `<project_path>/templates/design_spec.<kind>.<id>.md` is a template-design source; read all of them. The presence of a `design_spec.style.*.md` file is what marks an active Direction / method segment. Whether a source root was labelled `library` or `explicit` is installation provenance only and never affects Stage-2 precedence.**Legacy template boundary**: A Layout/Deck template containing `native_structure.json`, `source_template.pptx`, missing root Master identity, direct atomic placeholders, or old `baseline` / `preserve` / distillation metadata is not a Generate Step 3 input. Create a current workspace through [`create-template`](../workflows/create-template.md), preferably from the original PPTX when native topology matters. Brand and Style are intentionally roster-free; never reject either for omitting SVG or Master identity. Do not mutate the input in place.@@ -21,8 +21,8 @@ Conditional extension for applying an installed Brand/Style/Layout/Deck workspacImmediately before authoring the Stage-2 solution, load each relevant templateresource once per path + SHA and inspect:-- every installed `design_spec.md`; for Layout/Deck only, also inspect the actual Page Roster and relevant SVG prototypes;-- the resolved Identity, Structure, Reusable Application Context, and Direction / method segment owners from the post-Stage-1 fusion receipt;+- every installed `design_spec.<kind>.<id>.md`; for Layout/Deck only, also inspect the actual Page Roster and relevant SVG prototypes;+- the Identity, Structure, Reusable Application Context, and Direction / method segment owners, resolved here from the installed set under [`apply-template-workspace`](../workflows/stages/apply-template-workspace.md) §5;- the confirmed current communication contract, source obligations, planned page count, and content shape of every planned page;- the user's natural-language instructions, including any page names/numbers or elements they explicitly require.@@ -74,7 +74,7 @@ When the communication contract conflicts with the workspace, choose and state t## 3. Structured Lock Planning-For Style-only or Style + Brand, write `pptx_structure.mode: flat` plus `template_reuse_scope: style`; omit `template_adherence` and every structured mapping section. When Style is fused with Layout or Deck, it changes only Direction / method and does not change the non-Style capability label or force flat/structured routing. Derive reuse scope from the selected Layout/Deck application plan; a literal `mirror` plan is compatible only when the Style segment requires no visual or topology change.+For Style-only or Style + Brand, write `pptx_structure.mode: flat` plus `template_reuse_scope: style`; omit `template_adherence` and every structured mapping section. When a Style is installed alongside Layout or Deck, it changes only Direction / method and does not force flat/structured routing. Derive reuse scope from the selected Layout/Deck application plan; a literal `mirror` plan is compatible only when the Style segment requires no visual or topology change.For `mirror` / `layout`, write `pptx_structure.mode: structured` plus `template_adherence: strict|adaptive`; mirror always writes `strict`. Do not write legacy `baseline`, `template`, `preserve`, `layout_strategy`, or Layout-kind rows.diff --git a/skills/ppt-master/references/template-designer.md b/skills/ppt-master/references/template-designer.mdindex 502654f6..bb64acc8 100644--- a/skills/ppt-master/references/template-designer.md+++ b/skills/ppt-master/references/template-designer.md@@ -309,8 +309,8 @@ rules; final font families, weights, colors, and absolute sizes do not.Do not prescribe communication objectives, audience outcomes, requirednarrative order, fixed boilerplate, or example-content retention. Thefrontmatter `summary` carries concise structural selection context; the-deck-only Template Overview remains the application segment used during-fusion.+deck-only Template Overview remains the application segment read during+template application.Sections to **omit** from template `design_spec.md` (sourced elsewhere — listing them here is noise):diff --git a/skills/ppt-master/references/visual-review.md b/skills/ppt-master/references/visual-review.mdindex e5ed21cc..26918393 100644--- a/skills/ppt-master/references/visual-review.md+++ b/skills/ppt-master/references/visual-review.md@@ -25,7 +25,7 @@ Each review subagent processes a **batch** of pages (see §6.1 for batch sizing)2. **Path to this rubric file**3. **`<project>/design_spec.md`** (read-only) — §IX outline is the source of truth for "what should this page deliver"4. **`<project>/spec_lock.md`** (read-only) — brand-locked values-5. **Style Review Focus excerpt** (conditional, read-only) — supplied by the orchestrator only when `<project>/templates/design_spec.md` contains an active Style segment; it retains the source path and exact §VII wording+5. **Style Review Focus excerpt** (conditional, read-only) — supplied by the orchestrator only when an installed `<project>/templates/design_spec.style.<id>.md` exists; it retains the source path and exact §VII wording6. **`<project>/.review/`** (writable) — where backups and findings JSON goThe subagent reads inputs 2–5 **once** at the start of its turn (input 5 may be absent), then iterates over the page batch sequentially (one page at a time): apply the rubric → apply any Style supplement → write `<project>/.review/<page>.json` → move on. This is the core token-saving move — fixed context is read N/K times instead of N times.diff --git a/skills/ppt-master/scripts/confirm_ui/server.py b/skills/ppt-master/scripts/confirm_ui/server.pyindex 3da87ea6..1824473d 100644--- a/skills/ppt-master/scripts/confirm_ui/server.py+++ b/skills/ppt-master/scripts/confirm_ui/server.py@@ -665,15 +665,30 @@ def _read_template_handoff(project_path: Path, handoff_file: Path) -> dict:f'{TEMPLATE_HANDOFF_NAME} selection_sha256 does not match selection')if data['mode'] == 'templates':- installed_spec = project_path / 'templates' / 'design_spec.md'- if not installed_spec.is_file():+ if not _installed_template_specs(project_path):raise ValueError(- f'{TEMPLATE_HANDOFF_NAME} requires installed template spec: '- f'{installed_spec}'+ f'{TEMPLATE_HANDOFF_NAME} requires at least one installed '+ f'template spec: {project_path / "templates"}/'+ 'design_spec.<kind>.<id>.md')return data+def _installed_template_specs(project_path: Path) -> list[Path]:+ """Return every template spec installed into the project by the apply stage.++ The apply stage installs one file per selected workspace, named+ ``design_spec.<kind>.<id>.md``. A bare ``design_spec.md`` under+ ``templates/`` means the project is itself a Create Template workspace and+ is deliberately excluded here.+ """+ return sorted(+ path+ for path in (project_path / 'templates').glob('design_spec.*.md')+ if path.is_file()+ )++def _complete_template_selection(project_path: Path) -> int:"""Write the agent-owned handoff after Stage 1 and template application."""confirm_dir = project_path / CONFIRM_DIR_NAME@@ -695,11 +710,11 @@ def _complete_template_selection(project_path: Path) -> int:)return 1if selection['mode'] == 'templates':- installed_spec = project_path / 'templates' / 'design_spec.md'- if not installed_spec.is_file():+ if not _installed_template_specs(project_path):logger.error(- 'cannot complete template selection before template apply writes %s',- installed_spec,+ 'cannot complete template selection before template apply '+ 'writes %s/design_spec.<kind>.<id>.md',+ project_path / 'templates',)return 1@@ -2786,7 +2801,8 @@ def build_parser() -> argparse.ArgumentParser:parser.add_argument('--complete-template-selection', action='store_true',help='Agent-only: after Stage 1, bind its template selection to a ready '- 'handoff. Template mode requires <project>/templates/design_spec.md.',+ 'handoff. Template mode requires at least one '+ '<project>/templates/design_spec.<kind>.<id>.md.',)parser.add_argument('--reset-template-selection', action='store_true',diff --git a/skills/ppt-master/scripts/docs/confirm_ui.md b/skills/ppt-master/scripts/docs/confirm_ui.mdindex 987d2c0c..94052888 100644--- a/skills/ppt-master/scripts/docs/confirm_ui.md+++ b/skills/ppt-master/scripts/docs/confirm_ui.md@@ -271,9 +271,9 @@ The Stage-1 submission writes this receipt and the Stage-1 `result.json`together. Generate reads both exactly once after `--wait-only --wait-stagestage1` returns. Free design skips installation. Template mode runs`apply-template-workspace` against all selected roots and waits for complete-project-local installation/fusion. Only then does the agent complete the-handoff below. Installation resolves template-to-template ownership; Stage 2-later evaluates current-project fit from the installed copy. Strategist never+project-local installation. Only then does the agent complete the+handoff below. Installation copies each selected spec separately; Stage 2+resolves segment ownership and current-project fit from the installed set. Strategist neverreads the source roots.### Agent handoff — `template_handoff.json`@@ -395,7 +395,7 @@ Stage 2: its recommendations must include `template_application.value`.### Input — `recommendations.stage1.json` (created beside template options)Author this file before reading candidate index summaries in chat and without-reading any template spec, prototype, asset, fused segment owner, or template+reading any template spec, prototype, asset, segment owner, or templatecanvas. `template_options.json` supplies display state only and never changesthe communication recommendation.diff --git a/skills/ppt-master/templates/README.md b/skills/ppt-master/templates/README.mdindex b1e130a2..944e6d87 100644--- a/skills/ppt-master/templates/README.md+++ b/skills/ppt-master/templates/README.md@@ -52,8 +52,8 @@ can always switch modes. The page accepts one registered choice per kind plusone supplied-root choice. A registered exact root is `library`; any other exactroot is `explicit`. After that combined confirmation,[`apply-template-workspace`](../workflows/stages/apply-template-workspace.md)-validates, fuses, and installs every selected workspace into the current-project before Stage 2 starts. Template-aware reading begins in final Stage 2 from+validates and installs every selected workspace into the current+project as its own `design_spec.<kind>.<id>.md` before Stage 2 starts. Template-aware reading begins in final Stage 2 fromthat project-local copy. Quick skips the page, applies supplied exact roots, andotherwise uses free design.@@ -65,7 +65,7 @@ otherwise uses free design.| Selection source | `library` / `explicit` | Step-3 discovery provenance only: exact index-derived root or exact unregistered root; it does not change template semantics || Internal creation strategy | `standard` / `fidelity` / `mirror` | AI-derived Create Layout/Create Deck implementation: newly author a compact or broad roster, or materialize validated source-package facts into a new workspace; persisted for tools, never presented as a required user choice || Internal application plan | `template_reuse_scope` plus optional `template_adherence` | Strategist derives literal, structural, or style-only use and any strict/adaptive exporter behavior after inspecting the installed template and current content |-| PPTX structure | `flat` / `structured` | Derived application plans that use template structure compile declared Masters and Layouts; Style-only, style-scope, brand-only, and free design remain Slide-local. Style fused with Layout/Deck does not change the non-Style structure plan. |+| PPTX structure | `flat` / `structured` | Derived application plans that use template structure compile declared Masters and Layouts; Style-only, style-scope, brand-only, and free design remain Slide-local. A Style installed alongside Layout/Deck does not change the non-Style structure plan. |These axes must not be used as synonyms or exposed as a user mode matrix. Inparticular, a mirror-created deck is still an ordinary reusable `deck` package@@ -92,7 +92,7 @@ Style narrows this shared routing shape to `templates/design_spec.md` only anddoes not carry asset or review payloads; initialized-project sibling scaffoldingmay exist but is not Style input.The conditional [`apply-template-workspace`](../workflows/stages/apply-template-workspace.md)-stage owns installation and fusion after a non-free Default Stage-1 selection or+stage owns installation after a non-free Default Stage-1 selection oron the Quick exact-root branch. Brand/Layout/Deck consume package-owned`templates/`, `images/`, and `icons/`; Style consumes only`templates/design_spec.md` and ignores sibling project scaffolding. Every kinddiff --git a/skills/ppt-master/templates/brands/README.md b/skills/ppt-master/templates/brands/README.mdindex d6c538a5..924f9e91 100644--- a/skills/ppt-master/templates/brands/README.md+++ b/skills/ppt-master/templates/brands/README.md@@ -18,7 +18,7 @@ the same selector, defaults Stage 1 to template mode, and preselects thatspecific candidate only when it is the sole supplied root.Registered exact roots are `library`; other exact roots remain `explicit`. The conditional[`apply-template-workspace`](../../workflows/stages/apply-template-workspace.md)-stage owns path normalization, portable-root installation, multi-kind fusion,+stage owns path normalization, portable-root installation, per-workspace spec naming,same-kind conflict resolution, and provenance after Stage 1 and before Stage 2. Template-awarereading begins in final Stage 2 from the installed project-local copy. This file ownsonly the Brand schema. Quick applies a supplied exact Brand root directly anddiff --git a/skills/ppt-master/templates/decks/README.md b/skills/ppt-master/templates/decks/README.mdindex cb53a27d..bd96498f 100644--- a/skills/ppt-master/templates/decks/README.md+++ b/skills/ppt-master/templates/decks/README.md@@ -29,7 +29,7 @@ Overview when application fit must be judged in detail.----## Selection and fusion+## Selection and installationSelection follows the parent README's Default Stage-1[`generate-pptx`](../../workflows/generate-pptx.md) template-choice contract.@@ -41,7 +41,7 @@ exact roots are `library`; other exact roots remain`explicit`. Choosing and confirming an entry runs the conditional[`apply-template-workspace`](../../workflows/stages/apply-template-workspace.md)stage, which owns path normalization, compatibility checks, installation, and-fusion after Stage 1 and before Stage 2. Template-aware reading begins in final Stage 2 from the+installation after Stage 1 and before Stage 2. Template-aware reading begins in final Stage 2 from theinstalled project-local copy.Quick applies a supplied exact Deck root directly and otherwise uses freedesign. It uses installed prototypes as flat authoring inputs; reusablediff --git a/skills/ppt-master/templates/layouts/README.md b/skills/ppt-master/templates/layouts/README.mdindex 0a08ceec..4bb5ec7d 100644--- a/skills/ppt-master/templates/layouts/README.md+++ b/skills/ppt-master/templates/layouts/README.md@@ -56,7 +56,7 @@ exact roots are `library`; other exact roots remain `explicit`.Choosing and confirming an entry runs the conditional[`apply-template-workspace`](../../workflows/stages/apply-template-workspace.md)stage, which owns path normalization, compatibility checks, installation, and-fusion after Stage 1 and before Stage 2. Template-aware reading begins in final Stage 2 from the+installation after Stage 1 and before Stage 2. Template-aware reading begins in final Stage 2 from theinstalled project-local copy.Quick applies a supplied exact Layout root directly and otherwise uses freedesign. It uses installed prototypes as flat authoring inputs; reusablediff --git a/skills/ppt-master/templates/styles/README.md b/skills/ppt-master/templates/styles/README.mdindex 06d92eba..20d2a68e 100644--- a/skills/ppt-master/templates/styles/README.md+++ b/skills/ppt-master/templates/styles/README.md@@ -13,9 +13,9 @@ Style is a fourth independent template kind alongside [`brands/`](../brands/), [| Final Stage-2 `visual_style` | The current deck's confirmed shape, composition, whitespace, typography-character, and texture lock || Internal `template_reuse_scope: style` | A flat current-project export plan that reuses no Master/Layout structure |-These names are separate contracts. Style-only and Style + Brand naturally produce a flat application plan, while Style fused with a Layout or Deck may use structured reuse. `kind: style` therefore never forces the internal reuse scope when another workspace supplies structure.+These names are separate contracts. Style-only and Style + Brand naturally produce a flat application plan, while a Style installed alongside a Layout or Deck may use structured reuse. `kind: style` therefore never forces the internal reuse scope when another workspace supplies structure.-## Selection, Precedence, and Fusion+## Selection, Precedence, and InstallationSelection follows the parent README's Default Stage-1[`generate-pptx`](../../workflows/generate-pptx.md) template-choice contract.@@ -25,7 +25,7 @@ the same selector, defaults Stage 1 to template mode, and preselects thatspecific candidate only when it is the sole supplied root. Aconsulting label or visual description remains a brief and does not activatethis workspace. A non-free confirmation runs the-common installation/fusion stage after Stage 1 and before Stage 2; template-aware reading begins+common installation stage after Stage 1 and before Stage 2; template-aware reading beginsin final Stage 2 from the project-local copy. Quick applies a supplied exactStyle root directly and otherwise uses free design; its current agent reads theinstalled copy before authoring flat pages.diff --git a/skills/ppt-master/workflows/create-template.md b/skills/ppt-master/workflows/create-template.mdindex 8f25dee6..a5376337 100644--- a/skills/ppt-master/workflows/create-template.md+++ b/skills/ppt-master/workflows/create-template.md@@ -32,7 +32,7 @@ Create Template is the fixed user-facing entry and common contract. It selects oSelect Create Brand only for identity-only intent. Select Create Style when the portable value is a communication method, evidence discipline, and visual direction but there is no official identity, page geometry, or prototype roster to retain. Select Create Layout only when identity remains downstream-selectable and the reusable artifact does not prescribe communication objectives, audience outcomes, a required narrative sequence, or scenario-specific starting content. Select Create Deck when structure carries brand identity or reusable application semantics. A complete source PPTX alone does not determine the kind: classify only the stable rules worth reusing. Ask one discriminator question only when the user's requested reusable artifact is genuinely ambiguous; once selected, enter that child workflow and do not repeat route selection inside its confirmation gate.See [`templates/README.md`](../templates/README.md) for the shared kind and-workspace model. Downstream template application and fusion remain owned by+workspace model. Downstream template application and installation remain owned by[`generate-pptx.md`](./generate-pptx.md) Step 3.## Output scope — library (default) vs projectdiff --git a/skills/ppt-master/workflows/generate-pptx.md b/skills/ppt-master/workflows/generate-pptx.mdindex 4e7eac56..2ea01748 100644--- a/skills/ppt-master/workflows/generate-pptx.md+++ b/skills/ppt-master/workflows/generate-pptx.md@@ -42,7 +42,7 @@ request does not explicitly select Quick.| Artifact ownership | [`artifact-ownership.md`](../references/artifact-ownership.md) | Owns fact channels, source/derived artifact boundaries, and regeneration rules || Failure recovery | [`failure-recovery.md`](./governance/failure-recovery.md) | Owns stop/continue policy and resume pointers || Confirm UI details | [`confirm_ui.md`](../scripts/docs/confirm_ui.md) | Owns the JSON schema, launcher behavior, staged-result contract, port strategy, and chat fallback details |-| Confirmed template application | [`apply-template-workspace.md`](./stages/apply-template-workspace.md) | Owns validation, installation, and fusion after Stage 1 confirms library or explicit workspace roots; skip for confirmed free design |+| Confirmed template application | [`apply-template-workspace.md`](./stages/apply-template-workspace.md) | Owns validation and installation after Stage 1 confirms library or explicit workspace roots; skip for confirmed free design |## Workflow@@ -183,7 +183,7 @@ Never scan kind directories, infer unregistered entries, or resolve a bare name,brand mention, or style phrase to a path. Preserve every exact root supplied forthis run. A registered-root equality match remains `library`; every other exactroot remains `explicit`. Candidate provenance never changes later validation,-fusion, or precedence.+installation, or precedence.Resolve the confirmation surface under[`confirm_ui.md`](../scripts/docs/confirm_ui.md). In the UI branch, run@@ -210,7 +210,7 @@ root. Never add Master/Layout/placeholder structure directly to an existingPPTX or SVG project.**✅ Checkpoint**: Candidate input is ready for the combined Stage-1-confirmation. No template has been selected, read, validated, fused, or+confirmation. No template has been selected, read, validated, orinstalled. Proceed to Step 4 without a user-visible stop.---@@ -318,8 +318,8 @@ or `templates` with at least one server-resolved root.1. For `templates`, load and run[`apply-template-workspace.md`](./stages/apply-template-workspace.md) against- every confirmed exact root. It validates/fuses them and installs one- project-local state under `templates/` plus any real `images/` and `icons/`.+ every confirmed exact root. It validates them and installs each as its own+ `templates/design_spec.<kind>.<id>.md` plus any real `images/` and `icons/`.For `free_design`, skip installation. Then bind the completed state:```bash@@ -581,7 +581,7 @@ group on both pages.`template_reuse_scope: mirror|layout` pages MUST start from the complete `page_layouts` SVG, keep inherited visible objects, and preserve root Master/Layout identity plus stable atoms/slots. Strict preserves that reusable contract; under `layout`, the once-loaded Design Spec's `Template Application` may still authorize carrier text/tspan reflow inside unchanged slot bounds. Adaptive uses the current or new Layout key/name already declared by Strategist. If construction proves that fixed atoms or slot topology/bounds must change, stop and return upstream for Strategist to repair the owning plan and lock, validate and read back the affected fragments, then resume; Executor never mutates `spec_lock.md`. `mirror` changes only visible text values while preserving text/tspan topology and attributes. `style` follows the flat paragraph below without structure metadata.-`template_reuse_scope: style`, Style-only, free-design, and brand-only pages use `pptx_structure.mode: flat`. A Style-only workspace always derives `template_reuse_scope: style`; Style never supplies prototype mappings. When fused with Layout/Deck, Style changes only Direction / method and follows the selected non-Style structure plan. On a flat page, draw the complete page directly: keep backgrounds, repeated chrome, headings, text, images, and decoration as ordinary Slide-local SVG content. Do not plan `pptx_masters` / `pptx_layouts` / `page_pptx_layouts`, do not add root Master/Layout identity, and do not add `data-pptx-layer` or `data-pptx-placeholder` metadata. Group logical content normally with top-level `<g id>` elements. Export materializes one clean project-owned Master plus one Blank Layout, applies the locked theme colors/fonts/title-body defaults, removes stock content placeholders and unused built-in Layouts, and retains only the standard date/footer/slide-number capability hooks. It does not promote or deduplicate page content.+`template_reuse_scope: style`, Style-only, free-design, and brand-only pages use `pptx_structure.mode: flat`. A Style-only workspace always derives `template_reuse_scope: style`; Style never supplies prototype mappings. When installed alongside Layout/Deck, Style changes only Direction / method and follows the selected non-Style structure plan. On a flat page, draw the complete page directly: keep backgrounds, repeated chrome, headings, text, images, and decoration as ordinary Slide-local SVG content. Do not plan `pptx_masters` / `pptx_layouts` / `page_pptx_layouts`, do not add root Master/Layout identity, and do not add `data-pptx-layer` or `data-pptx-placeholder` metadata. Group logical content normally with top-level `<g id>` elements. Export materializes one clean project-owned Master plus one Blank Layout, applies the locked theme colors/fonts/title-body defaults, removes stock content placeholders and unused built-in Layouts, and retains only the standard date/footer/slide-number capability hooks. It does not promote or deduplicate page content.Do not duplicate specialized identity with `data-pptx-role`. Add it only to structural page-frame objects whose package, page-number, or animation behavior is not already expressed by `data-pptx-layer`, `data-pptx-placeholder`, or `data-pptx-replace-with`; such an element needs a stable unique `id`. Do not add generic content roles to ordinary titles, body text, cards, KPIs, diagrams, charts, icons, or images. Full contract: [`references/semantic-svg.md`](../references/semantic-svg.md).diff --git a/skills/ppt-master/workflows/profiles/quick-generate.md b/skills/ppt-master/workflows/profiles/quick-generate.mdindex 38815cd7..43b603ef 100644--- a/skills/ppt-master/workflows/profiles/quick-generate.md+++ b/skills/ppt-master/workflows/profiles/quick-generate.md@@ -25,7 +25,7 @@ Page count alone never activates or blocks this profile.| Inputs | Any supported Generate input; convert/import sources and run bounded factual research when the input requires them || Templates | Directly validate and install at most one exact workspace root per kind supplied for this run; when none are supplied, use free design without catalog selection or Confirm UI || Resources | Prepare every project-local image, icon, formula, and required provenance/manifest artifact before the referencing SVG is authored |-| Planning artifacts | Do not author a root project `design_spec.md`, `spec_lock.md`, confirmation payloads, or any substitute planning artifact; an installed `templates/design_spec.md` remains template input |+| Planning artifacts | Do not author a root project `design_spec.md`, `spec_lock.md`, confirmation payloads, or any substitute planning artifact; installed `templates/design_spec.<kind>.<id>.md` files remain template input || Traceability | Operational resource manifests, checker reports, postflight, and bounded Python command/outcome audit entries may remain, but they do not record the AI's design reasoning or form a resumable generation history || Delivery | Hand-author the resolved SVG roster, run one lockless final checker, skip `finalize_svg.py`, and export the final native PPTX through `--quick-generate` |@@ -180,15 +180,20 @@ For the direct-template branch, continue with[`apply-template-workspace`](../stages/apply-template-workspace.md) afterinitialization against only the preflighted roots. The user's request is theselection authority; there is no template confirmation receipt or handoff. The-stage installs and fuses the workspaces into `<project_path>/templates/` plus+stage installs each workspace as its own spec file under `<project_path>/templates/` plusthe project-local asset pools. All later reads use that installed state, neverthe original roots.-Before writing P01, read the installed template spec once and, for Layout/Deck,-inspect the relevant SVG prototypes. Apply Brand identity, Style-direction/method, the selected structure owner's useful prototype geometry,-and Deck application context directly in the active context under the existing-segment precedence. Follow explicit instructions about literal or visual-only+Before writing P01, read every installed+`templates/design_spec.<kind>.<id>.md` once and, for Layout/Deck, inspect the+relevant SVG prototypes. Apply Brand identity, Style direction/method, the+selected structure owner's useful prototype geometry, and Deck application+context directly in the active context under the existing segment precedence+([`apply-template-workspace`](../stages/apply-template-workspace.md) §5). A+segment owner's instruction about how a value should dominate, recede, or stay+rare binds as strongly as the value itself; a Style composition or whitespace+tendency never demotes a Brand's declared dominant color to an incidental+accent. Follow explicit instructions about literal or visual-onlyuse; otherwise decide which prototypes to use, skip, repeat, reorder, or adaptwhile authoring. Persist no separate template-application artifact. If notemplate was installed, make the same design choices freely.@@ -377,6 +382,7 @@ or lock.- [x] One mode and visual style were resolved, and every catalog source actually used was read- [x] Every page considered the complete visual-carrier menu without a coverage quota- [x] Resolved SVG pages and their project-local references exist+- [x] Every role declared by an installed template spec is locatable in the finished pages, or its non-use is deliberate — checked per installed spec, not from memory- [x] Every triggered capability-specific preparation and pre-checker verification completed- [x] The lockless final SVG quality report passes and matches the current SVGs- [x] One native PPTX exists under `exports/` or the explicit output pathdiff --git a/skills/ppt-master/workflows/stages/apply-template-workspace.md b/skills/ppt-master/workflows/stages/apply-template-workspace.mdindex e36f3ae0..3170cd07 100644--- a/skills/ppt-master/workflows/stages/apply-template-workspace.md+++ b/skills/ppt-master/workflows/stages/apply-template-workspace.md@@ -1,5 +1,5 @@----description: Generate-PPTX runbook for validating, installing, or fusing selected Brand, Style, Layout, and Deck workspaces.+description: Generate-PPTX runbook for validating and installing selected Brand, Style, Layout, and Deck workspaces as separate project-local specs.---# Apply Template Workspace Stage@@ -35,7 +35,7 @@ Read library choices only from `brands_index.json`, `styles_index.json`,promote an unregistered directory into the UI catalog. An explicit root remainsvalid without index membership; exact equality with a registered root may bereported as `library`. The label changes discovery provenance only, never schema-validation, fusion precedence, or installation behavior.+validation, segment precedence, or installation behavior.**Selection cardinality**: Default Stage 1 permits one registered root per kind plus one explicit root; its explicit root may pair with a same-kind library root under §5.2. Quick has no page or catalog selection and accepts at most one supplied exact root per declared kind (four roots total). Kinds compose freely in both profiles. Reject larger default receipts server-side; require an oversized or duplicate-kind Quick input to converge in chat before installation, never through Confirm UI.@@ -78,12 +78,32 @@ Before copying a Deck or Layout workspace, inspect every SVG root and slot. Bran- A composite region uses an explicit `object` proxy; a zero-slot Layout is valid.- The complete SVG contract is current. Reject a legacy semantic contract instead of repairing it in the target project.-## 4. Install a Single Workspace+## 4. Install Each Workspace Separately++**Hard rule — one installed spec file per source workspace**: Never merge two+source specs into one file. Install each selected workspace's `design_spec.md`+as its own project-local file named `design_spec.<kind>.<id>.md`, where `<id>`+is that spec's frontmatter `brand_id` / `style_id` / `layout_id` / `deck_id`.+Copy its body unchanged. Several workspaces of the same kind therefore coexist+as separate files. Segment precedence is resolved by the consuming role while+reading (§5), never by rewriting spec content at install time.++| Installed file | Meaning |+|---|---|+| `templates/design_spec.<kind>.<id>.md` | A template workspace installed into this project |+| `templates/design_spec.md` | This project *is itself* a template workspace produced by project-scope Create Template; it is not an installed template and is never consumed as one |++Prepend exactly one provenance line under each installed file's H1, then leave+the rest of the document untouched:++```markdown+> **Installed from**: `skills/ppt-master/templates/brands/mckinsey/` (library)+```| Kind | Install behavior ||---|---|| `brand` | Install `templates/` plus existing `images/` and `icons/`; ignore `exports/`. Identity is constrained; structure remains free. |-| `style` | Install `templates/design_spec.md` only. Ignore sibling project scaffolding and reject a library Style carrying asset/review payloads. Expose reusable direction/method without identity truth, page prototypes, or native structure. Default Style-only and Style + Brand derive `template_reuse_scope: style` and stay flat; Style + Layout/Deck follows the selected structure plan. Quick always realizes the resolved combination as flat pages. A Style workspace never activates visual review. |+| `style` | Install its `design_spec.md` only. Ignore sibling project scaffolding and reject a library Style carrying asset/review payloads. Expose reusable direction/method without identity truth, page prototypes, or native structure. Default Style-only and Style + Brand derive `template_reuse_scope: style` and stay flat; Style + Layout/Deck follows the selected structure plan. Quick always realizes the resolved combination as flat pages. A Style workspace never activates visual review. || `layout` | Install the same portable roots. Expose the actual reusable structure; Default Strategist later inspects the prototypes, while Quick's current agent uses them for immediate flat authoring decisions in active context. || `deck` | Install the same portable roots. Expose descriptive application context, identity, structure, and the actual prototype roster; Default Strategist or Quick's current agent compares them with the current communication contract and content, then derives the applicable plan. |@@ -96,9 +116,9 @@ For a compatible legacy-flat package, route SVG/spec/non-bitmaps to project `tem3. Reject every destination collision before writing.4. Write the accepted mapping once; never use recursive copy as an implicit conflict policy.-If the normalized source root equals the target project root, consume it in place and copy nothing. An in-place workspace cannot participate in multi-path fusion. Ignore source `exports/`; it contains review artifacts, not portable template inputs. Empty optional roots remain absent.+If the normalized source root equals the target project root, consume it in place and copy nothing. An in-place workspace cannot be combined with other installed roots. Ignore source `exports/`; it contains review artifacts, not portable template inputs. Empty optional roots remain absent.-**Hard rule — project-local consumer boundary**: After installation/fusion,+**Hard rule — project-local consumer boundary**: After installation,Default template-aware Strategist work in final Stage 2, Quick's currentagent before direct authoring, and every later role read only`<project_path>/templates/` and the project-local `images/` / `icons/` pools. The original library or external root@@ -110,13 +130,26 @@ Quick instead realizes the selected prototypes into complete flat, Slide-localSVGs and never writes `page_layouts` or Master/Layout/placeholder metadata.-## 5. Fuse Multiple Workspace Paths+## 5. Segment Precedence Is Resolved While Reading-Fuse different kinds or, in Default only, at most two same-kind roots. Resolve template segment/asset conflicts before writing. Never reinterpret, predict, or revise the confirmed Stage-1 communication contract here. Default obtains any additional material conflict decision through the active chat channel after Stage 1; this conditional resolution does not reopen template selection. Quick follows explicit conflict instructions; an unresolved material compatibility conflict is a hard prerequisite handled in chat, never by launching Confirm UI or by using path order.+Installation copies specs; it never merges them. The consuming role — Default+final Stage 2 through [`strategist-template.md`](../../references/strategist-template.md),+or Quick's current agent before authoring — reads **every** installed+`design_spec.<kind>.<id>.md` and resolves the segments below in context. Asset+collisions are still rejected at install time (§4); segment conflicts are a+reading decision, not a write-time one.++Never reinterpret, predict, or revise the confirmed Stage-1 communication+contract here. Default obtains any additional material conflict decision+through the active chat channel after Stage 1; this does not reopen template+selection. Quick follows explicit conflict instructions; an unresolved material+compatibility conflict is a hard prerequisite handled in chat, never by+launching Confirm UI or by using path order.### 5.1 Different Kinds-Resolve four whole template segments. This table selects the installed starting owner; current user instructions and the caller's later consuming plan still govern project use:+Resolve four whole template segments. This table names the starting owner;+current user instructions and the consuming plan still govern project use:| Segment | Starting owner ||---|---|@@ -125,39 +158,48 @@ Resolve four whole template segments. This table selects the installed starting| Reusable application context | Deck only when present. Preserve it for the consuming comparison; it never becomes the current project's application contract. || Direction / method | Style when present, otherwise unresolved until the consuming plan. Actual Deck prototypes and Signature facts may inform compatibility, but Deck does not own the Style-only method segment. |-Replace each selected segment wholesale; do not mix its fields implicitly. Brand or Deck identity replaces any identity-adjacent defaults carried by Style. A Style direction may adapt to that resolved identity, but cannot relabel its candidates as official brand facts.+Apply each selected segment wholesale; do not mix its fields implicitly. Brand or Deck identity overrides any identity-adjacent defaults carried by Style. A Style direction may adapt to that resolved identity, but cannot relabel its candidates as official brand facts.++**Hard rule — an owned segment governs visual weight, not only values**: when a+segment owner declares how a value should dominate, recede, or stay rare, that+instruction carries the same authority as the value itself. A Style's+composition or whitespace tendency never demotes a Brand's declared dominant+color to an incidental accent.Before Layout overrides Deck structure, compare Deck's reusable roles with Layout roles, slots, and capacity. On mismatch, offer exactly three remedies: retain Deck structure, select another Layout, or omit Deck. Default resolves only this template-to-template conflict and must not reinterpret the confirmed Stage-1 communication contract; Quick compares against the current request/content and treats any unresolved material mismatch as a chat hard prerequisite.Before Style overlays Deck guidance, verify that its method serves Deck's reusable context and fits the selected structure. On mismatch, require omitting Style or choosing a compatible Style/structure; never silently weaken a segment. Default final Stage 2 separately checks the result against the confirmed project contract; Quick checks it against the current request/content before authoring.-Field-level micro-adjustments such as a primary-color override are not workspace fusion. Default carries them into the normal final Stage-2 confirmation fields; Quick treats explicit adjustments as direct active-context authoring constraints.+Field-level micro-adjustments such as a primary-color override are not a workspace selection. Default carries them into the normal final Stage-2 confirmation fields; Quick treats explicit adjustments as direct active-context authoring constraints.### 5.2 Same Kind-Default only: do not use path order as priority. Report every segment-level difference and ask the user to choose workspace A, workspace B, or select per segment. Only the per-segment choice opens a segment-by-segment resolution. Two Style workspaces conflict over the complete Direction / method segment. Do not resolve field-level conflicts here. Three or more same-kind paths require the user to converge to at most two. Quick accepts one root per kind and therefore never enters this subsection.--### 5.3 Fused Provenance+Several roots of one kind install as separate files distinguished by their+`<id>`, exactly like different kinds. Do not merge them and do not use path+order as priority. The consuming role reads all of them and decides which+governs each part of the owned segment, following the latest explicit user+instruction first; where the user gave none and two same-kind specs make+materially incompatible claims over the same segment, surface the conflict in+chat rather than silently averaging them. Two Style workspaces contend over the+complete Direction / method segment; two Brand workspaces contend over+Identity.-Write one final `<project>/templates/design_spec.md`. Immediately under its H1, record every source kind/path, base or override role, and resolved segment conflict with its explicit authority:--```markdown-> **Fused from:**-> - deck: `templates/decks/example/` (base)-> - brand: `templates/brands/example/` (identity override)-> - style: `templates/styles/example/` (direction/method override)-> - layout: `templates/layouts/example/` (structure override)-> - conflicts resolved: Color Scheme from brand (user selected A)-```+### 5.3 Installed Set-Single-path installs do not add provenance. Set fused frontmatter `kind` from the non-Style capability: `deck` when identity and structure are both present, `layout` for structure only, or `brand` for identity only. Use `kind: style` only for Style-only input. Adding Style to Brand, Layout, Deck, or Brand + Layout does not change that existing capability label; its Direction / method ownership stays explicit in the fused provenance and body. A project-local Brand + Layout fusion uses `kind: deck` for routing but is not automatically a reusable library Deck; its application remains current-project context.+Each installed file keeps its own frontmatter `kind` and `<id>` from its source+workspace; nothing is relabelled. There is no combined capability label and no+merged spec: the installed set is exactly what was selected, and the routing+consequence is derived while reading — structure comes from an installed Layout+or Deck, identity from an installed Brand or Deck, direction from an installed+Style. A project-local Brand + Layout pair does not become a reusable library+Deck; its application remains current-project context.-**Completion receipt**: Report `roots=<normalized roots>; sources=<library|explicit per root>; kinds=<kind per root>; segments=identity:<owner>,structure:<owner>,application_context:<owner>,direction:<owner>; install=<in-place|copied>; final_spec=<project_path>/templates/design_spec.md`.+**Completion receipt**: Report `roots=<normalized roots>; sources=<library|explicit per root>; kinds=<kind per root>; segments=identity:<owner>,structure:<owner>,application_context:<owner>,direction:<owner>; install=<in-place|copied>; installed_specs=<comma-separated design_spec.<kind>.<id>.md>`.## ✅ Template Workspace Applied- [x] Every selected input was an index-derived library root or an exact explicit/Create Template root satisfying a listed workspace contract- [x] Every kind schema passed preflight; structured SVG checks ran only for Layout/Deck inputs-- [x] All collisions and fusion conflicts were resolved before one atomic install+- [x] All destination collisions were rejected before one atomic install; no two source specs were merged into one file- [x] `<project_path>/templates/` and any portable sibling assets are complete and are the only downstream template source- [ ] **Next**: Default completes the template-selection handoff and continues [`generate-pptx.md`](../generate-pptx.md) Step 4 Stage 2; Quick returns to [`quick-generate`](../profiles/quick-generate.md) §2diff --git a/skills/ppt-master/workflows/stages/visual-review.md b/skills/ppt-master/workflows/stages/visual-review.mdindex cbd86d3e..f35d44c0 100644--- a/skills/ppt-master/workflows/stages/visual-review.md+++ b/skills/ppt-master/workflows/stages/visual-review.md@@ -6,7 +6,7 @@ description: Optional quality-gate stage for per-page rubric-based visual review> Optional Generate-PPTX quality stage. Goal: reduce human iteration by letting AI subagents visually self-check each rendered slide against a fixed rubric and apply atomic position/spacing fixes.>-> Reads `<project>/svg_output/<page>.svg` and a pre-rendered PNG of each slide, then either applies a fix or flags `needs_human`. When an installed/fused Style exists, it also reads that workspace's `Review Focus` as supplemental acceptance context. **Never touches** brand decisions, layout structure, or other files.+> Reads `<project>/svg_output/<page>.svg` and a pre-rendered PNG of each slide, then either applies a fix or flags `needs_human`. When an installed Style exists, it also reads that workspace's `Review Focus` as supplemental acceptance context. **Never touches** brand decisions, layout structure, or other files.>> This stage is **context-independent** — invokable in a fresh chat session with only `<project_path>` as input. No upstream conversation context required.@@ -75,7 +75,7 @@ If any page comes back with `"all_background": true` in the JSON summary, that pCreate a team and dispatch one orchestrator agent. The orchestrator partitions the N pages into batches of ≤ K pages (default **K = 5**) and spawns one subagent per batch **in parallel** (single message, `ceil(N/K)` parallel `Agent` calls). Each batch subagent reads the fixed inputs (rubric + `design_spec.md` + `spec_lock.md` + conditional Style Review Focus) **once**, then iterates over its assigned pages sequentially.-Before dispatch, inspect `<project>/templates/design_spec.md`. If it declares `kind: style` or its fused provenance contains an active Style segment, read only `## VII. Review Focus` once and include those checks in every batch prompt. Otherwise pass no Style supplement. This lookup never triggers visual review; it runs only after the user has already activated this stage. The supplement cannot weaken the fixed rubric or widen edit permissions.+Before dispatch, look for `<project>/templates/design_spec.style.*.md`. For each one found, read only its `## VII. Review Focus` once and include those checks in every batch prompt. Otherwise pass no Style supplement. This lookup never triggers visual review; it runs only after the user has already activated this stage. The supplement cannot weaken the fixed rubric or widen edit permissions.```textTeamCreate(team_name="visual-review-<project>", agent_type="orchestrator")@@ -96,7 +96,7 @@ The orchestrator prompt must be self-contained and is the **single** place where- Path to the rubric: `skills/ppt-master/references/visual-review.md`- Style Review Focus excerpt, only when the conditional lookup above found one; preserve its wording and source path- Dispatch contract reference: rubric [§6](../../references/visual-review.md#6-dispatch--messaging-contract) (batched parallel spawn, self-contained prompts, mandatory `SendMessage` on idle, anonymous-name tolerance)-- Subagent forbid list: do not edit any other page, `design_spec.md`, `spec_lock.md`, `templates/design_spec.md`, `animations.json`, `image_prompts.json`, or `images/`+- Subagent forbid list: do not edit any other page, `design_spec.md`, `spec_lock.md`, anything under `templates/`, `animations.json`, `image_prompts.json`, or `images/`**Host compatibility**: `TeamCreate` and `SendMessage` are Claude-Code-specific multi-agent primitives. On hosts without those primitives (Cursor, VS Code + Copilot, Codebuddy, etc.) the main agent processes batches sequentially — same partitioning, same per-batch prompts, no parallel dispatch. Token savings from shared fixed inputs still apply; wall-clock time grows roughly N/K-fold.