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
docs(templates): align multi-kind project workspace contract
hugohe309597af59c19
diff --git a/docs/faq.md b/docs/faq.mdindex 86fdd0a3..42eb4f72 100644--- a/docs/faq.md+++ b/docs/faq.md@@ -394,13 +394,13 @@ Use an agent-capable AI tool (Claude Code, Codex, etc.) and ask it to use the **- Desired tone and color palette (e.g., "modern and restrained, dark blue primary")- Category preference (`brand` / `general` / `scenario` / `government` / `special`)- Canvas format, if not the default 16:9-- Output scope: indexed `library` (default) or one already initialized `project`; both use the same workspace routing and omit empty optional asset directories+- Output scope: indexed `library` (default) or one already initialized `project`; both share one spec schema and asset routing, while library uses a bare spec and project uses qualified specsYou don't need to supply every detail upfront — the AI agent will ask follow-up questions to fill in anything missing (output scope, template ID, theme mode, etc.).**Step 3 — Wait for the Result**-The AI agent will handle the rest — analyzing your references, writing the kind-specific specification, building structured layout definitions only for Layout/Deck, and validating the workspace. Brand/Style never create a preview PPTX; Layout/Deck generate `exports/<id>_template_preview.pptx` on request and require it for multiple Masters. Both scopes require `templates/`; Brand/Layout/Deck may use package-owned `images/` and `icons/`, while Style contains only `templates/design_spec.md`. Library scope writes `skills/ppt-master/templates/<kind>/<id>/` and registers it; project scope writes `projects/<name>/` and skips registration. Empty optional directories are omitted. Give that workspace root to Step 3; it never copies `exports/`, and library review exports are Git-ignored. A compatible legacy-flat Brand/Layout/Deck workspace remains readable only when it satisfies the current kind contract; Layout/Deck also require current structured SVGs. Style has no legacy-flat form, and semantic-legacy packages must be replaced through `create-template` rather than upgraded in place.+The AI agent will handle the rest — analyzing your references, writing the kind-specific specification, building structured layout definitions only for Layout/Deck, and validating the workspace. Brand/Style never create a preview PPTX; Layout/Deck generate `exports/<id>_template_preview.pptx` on request and require it for multiple Masters. Both scopes require `templates/`; Brand/Layout/Deck may use package-owned `images/` and `icons/`, while Style contributes only its Design Spec. Library scope writes a bare `templates/design_spec.md` under `skills/ppt-master/templates/<kind>/<id>/` and registers it; project scope writes `templates/design_spec.<kind>.<id>.md` under `projects/<name>/` and skips registration, allowing one contribution of every kind to coexist. Layout owns the active SVG roster when Layout and Deck are both present. Empty optional directories are omitted. Give that workspace root to Step 3; a project root contributes all of its specs atomically, and installation never copies `exports/`. A compatible legacy-flat Brand/Layout/Deck workspace remains readable only when it satisfies the current kind contract; Layout/Deck also require current structured SVGs. Style has no legacy-flat form, and semantic-legacy packages must be replaced through `create-template` rather than upgraded in place.> **Tip**: The more specific you are about the style and use case, the better the generated template will match your expectations.diff --git a/docs/getting-started.md b/docs/getting-started.mdindex 87e27ceb..e95a13dc 100644--- a/docs/getting-started.md+++ b/docs/getting-started.md@@ -35,7 +35,7 @@ For the first, give the AI your `.pptx` plus your material (or a topic) and askYou: Create a reusable Deck template from projects/brand/our_deck.pptx via /create-template```-Create Template analyzes the reference, confirms whether the result is a Brand, Style, Layout, or Deck, and then authors or materializes a new validated workspace. The importer supplies source evidence; the final workspace owns `templates/design_spec.md` plus any prototypes and assets required by its kind. Brand and Style are roster-free; Layout and Deck own structured SVG prototypes. If you want a PowerPoint review file for Layout or Deck, run the optional preview export; it creates `exports/<id>_template_preview.pptx` on demand. The workspace root is what you point to at generation time.+Create Template analyzes the reference, confirms whether the result is a Brand, Style, Layout, or Deck, and then authors or materializes a new validated workspace. The importer supplies source evidence; a library workspace owns `templates/design_spec.md`, while a shared project root owns `templates/design_spec.<kind>.<id>.md`, plus any prototypes and assets required by that kind. Brand and Style are roster-free; Layout and Deck own structured SVG prototypes. If you want a PowerPoint review file for Layout or Deck, run the optional preview export; it creates `exports/<id>_template_preview.pptx` on demand. The workspace root is what you point to at generation time.During the create-template brief, choose `library` (the existing default) or `project`. Both require `templates/` and use optional `images/`, `icons/`, and on-demand `exports/`; empty optional directories are omitted. Project scope requires an initialized target project; library scope alone adds global registration.@@ -44,9 +44,9 @@ A created template lives in one of two places:| Location | Path | Notes ||---|---|---|| **Registered in the skill library** | `skills/ppt-master/templates/<kind>/<id>/` | Portable workspace plus global registration, so it appears when you ask "what templates are available?" |-| **Under projects** | `projects/<name>/` | The same portable workspace without global registration |+| **Under projects** | `projects/<name>/` | A shared qualified-spec root without global registration; all four kinds may coexist, with Layout taking structural precedence over Deck |-Default Generate shows the template choice inside Stage 1, beside the communication contract. The initial communication recommendation is written without reading any template. Ordinary requests start with free design; explicit template intent or any exact root starts in template mode, and the user can always switch. To offer another result, supply its exact **workspace-root path** in chat: an unregistered root appears in the specified-root dropdown, while an exact registered match resolves back to its kind dropdown. Exactly one supplied root may be preselected; multiple supplied roots remain unselected candidates. One confirmation closes communication and template choice together. Only then are selected workspaces validated and installed; template-aware planning begins in final Stage 2. A bare template name never resolves to a workspace. The complete workspace can be copied or migrated between the library and `projects/` without restructuring it; only library registration changes.+Default Generate shows the template choice inside Stage 1, beside the communication contract. The initial communication recommendation is written without reading any template. Ordinary requests start with free design; explicit template intent or any exact root starts in template mode, and the user can always switch. To offer another result, supply its exact **workspace-root path** in chat: an unregistered root appears in the specified-root dropdown, while an exact registered match resolves back to its kind dropdown. Exactly one supplied root may be preselected; multiple supplied roots remain unselected candidates. Each kind may appear once; Layout and Deck may coexist, with Layout supplying structure. A multi-kind project root is selected atomically. One confirmation closes communication and template choice together. Only then are selected roots validated and installed; template-aware planning begins in final Stage 2. A bare template name never resolves to a workspace. A project root can be reused directly by another project; moving one contribution into the library changes its spec filename placement and adds registration.```You: Make a deck from sources/report.pdf with template skills/ppt-master/templates/layouts/presentation_core/diff --git a/docs/technical-design.md b/docs/technical-design.mdindex 2c0b3930..7e66631b 100644--- a/docs/technical-design.md+++ b/docs/technical-design.md@@ -421,8 +421,9 @@ Brand/Style/Layout/Deck entries only from their four `*_index.json` files;chat discovery reads the same indexes and returns exact roots. Explicit pathsremain valid, and an exact path matching a registered canonical root may bedisplayed as `library`; an unregistered root remains `explicit`. Current-workspaces resolve `templates/design_spec.md`; the server parses every explicit-root's real `kind`, while the source label remains provenance only. Compatible flat Brand/Layout/Deck+library workspaces resolve `templates/design_spec.md`, while project roots+resolve every `templates/design_spec.<kind>.<id>.md`; the server parses every+explicit root's real kinds, while the source label remains provenance only. Compatible flat Brand/Layout/Deckpackages may resolve direct `design_spec.md` only when they satisfy the currentkind contract, including current structured SVGs for Layout/Deck. Style has nolegacy-flat form. A free-form style brief remains ordinary Stage-2 input and@@ -434,15 +435,15 @@ All current Brand/Style/Layout/Deck packages use one workspace routing contract.```text<template_workspace>/-├── templates/ # design_spec.md; Create Layout / Create Deck also include SVG prototypes+├── templates/ # library bare spec or project qualified specs; Layout / Deck also include SVG prototypes├── images/ # optional; bitmap assets referenced as ../images/<name>├── icons/│ └── imported/ # optional; canonical imported vector assets└── exports/ # optional, on-demand review files; Git-ignored in the library```-Style narrows this routing shape to `templates/design_spec.md` only; it does-not carry asset or review payloads. Existing project scaffolding is not Style+Style contributes only its Design Spec; it does not carry asset or review+payloads. Existing project scaffolding and sibling kind files are not Styleinput.`<template_workspace>` is either `skills/ppt-master/templates/<kind>/<id>/` or@@ -451,9 +452,10 @@ candidate input without reading template content. Once Stage 1 selects it, theapply 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 planning-begins after Stage 1. The source workspace remains portable between-locations without reshaping; global index registration controls whether it-appears as a library choice.+begins after Stage 1. A project root remains directly reusable by another+project. Moving one contribution into the library preserves its spec schema and+assets but changes its qualified filename to the bare single-kind library path;+global index registration then controls whether it appears as a library choice.For Create Layout / Create Deck, `standard` and `fidelity` write new SVG documents and a new Master/Layout/slot system; source topology is visual evidence only and is neither preserved nor distilled. `mirror` materializes a new workspace from the source page order, Master/Layout identities and parentage, placeholder facts, and supported visuals that are actually present and validated, without semantic synthesis or gap filling. Layout mirror is legal only when that preserved source is already brand-neutral and application-neutral; otherwise author a new Layout or retain the facts as Deck. Because structural layers cannot be `<g>`, fixed-layer source group wrappers are mechanically expanded into direct atoms while preserving ownership, paint order, and appearance. Create Brand analyzes identity fragments only; Create Style extracts portable method/direction only. Neither enters structural replication strategies or produces an SVG roster.@@ -464,7 +466,7 @@ The four template kinds own different segments of the design contract:| `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 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 |+| `deck` | application + integrated identity/structure | recurring situations, audiences/outcomes, representative page roles, identity, and actual SVG roster | contributes descriptive context and identity; supplies prototypes when no Layout overrides structure |Theme, Slide Master, Slide Layout, and Placeholder are compiled PowerPointobjects, not additional template kinds. Layout owns topology, placement,@@ -474,7 +476,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, 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.+When several roots are selected, each distinct root is installed once and every contribution remains its own spec file. The complete set contains at most one contribution per kind; all four kinds may coexist, and a multi-kind project root is atomic. Ownership is resolved segment-level while reading, not field-level: Brand owns identity, Style owns direction/method defaults, Layout owns structure when present, and Deck otherwise owns structure while always retaining descriptive reusable-application context and any identity not overridden by Brand. Only the effective Layout-or-Deck structural roster is installed. 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, and its method/composition expectations must be compatible with the selected structure. A project-local Brand + Layout composition gets its application context from Stage 1 and is not automatically promoted into a reusable library Deck. Duplicate kinds are rejected before installation. This keeps template composition debuggable: the installed set is self-describing, since each file names its kind and id and retains its source body apart from provenance.**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.@@ -819,7 +821,7 @@ These direct routes share some analysis primitives with the main pipeline, but a**Why Create Layout / Create Deck have authored and preservation modes.** `pptx_template_import.py` emits layered Master/Layout/Slide references plus native structure facts. `standard` / `fidelity` use those assets and visuals as references, then author a new topology from the confirmed reusable behavior. Mirror instead materializes a new workspace from the validated source roster and topology one-to-one, allowing only mechanical normalization required by the explicit structured contract and never inventing absent facts. The original PPTX remains immutable analysis evidence, not a packaged export dependency. Create Brand has no structural replication strategy.-**Why create-template uses one workspace route in both scopes.** `create-template` keeps `library` as its default indexed output and may instead write under an initialized project. Both roots require `templates/`; `images/`, `icons/`, and on-demand `exports/` appear only when they contain real files, and existing SVG asset references follow the same rules. This makes the workspace migratable and reusable without a library-only package branch or a reduced project branch. The sole scope difference is global index registration. Both scopes share one portable workspace contract, but only Layout / Deck own a structured SVG contract; Brand remains identity-only.+**Why create-template uses one workspace route in both scopes.** `create-template` keeps `library` as its default indexed output and may instead write under an initialized project. Both roots require `templates/`; `images/`, `icons/`, and on-demand `exports/` appear only when they contain real files, and existing SVG asset references follow the same rules. Library uses one bare spec inside a single-kind directory; project uses qualified specs in one shared root. The schema and asset routes remain portable, while spec placement and global index registration are scope-specific. Only Layout / Deck own a structured SVG contract; Brand and Style remain roster-free.**Why each template SVG stays complete while still compiling to native structure.** A template SVG repeats the inherited Master/Layout visuals together with sample Slide content so it opens as a complete standalone page. During generation, `page_layouts` selects that prototype and the output SVG remains complete. Export removes repeated inherited atoms, emits real Master/Layout parts, and leaves actual slot carriers and Slide-local content on the Slide.diff --git a/docs/templates-architecture.md b/docs/templates-architecture.mdindex 22fae1fc..c0eb9304 100644--- a/docs/templates-architecture.md+++ b/docs/templates-architecture.md@@ -114,7 +114,7 @@ PPTX import uses a two-level metadata model. The temporary lossless SVG keeps naBoth scopes retain their selected `kind` in portable frontmatter. `output_scope` and `target_project` stay in the workflow brief and are not persisted into `design_spec.md`.-Before any final write, resolve the selected workspace root, require an empty `templates/` root, and check all planned image and icon destination filenames for conflicts. Check a preview-PPTX destination when review was requested or the confirmed roster contains multiple Masters. Project scope additionally requires an initialized target project. Fail before writing anything; never merge or overwrite.+Before any final write, resolve the Design Spec and every real destination. Library scope requires an empty `templates/` root. Project scope requires an initialized project and rejects a bare spec, a same-kind spec, or invalid qualified naming; distinct kinds may coexist. Adding Deck beside Layout preserves the Layout roster, while adding Layout beside Deck uses isolated validation and an atomic structural replacement. Both scopes reject unrelated asset and preview collisions before writing. Never leave partial output.### Segment partition@@ -401,9 +401,11 @@ prepended under its H1:```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.+`<project>/templates/design_spec.md` is the older single-kind shape: that+project is itself one workspace and is never consumed as an installed template.+Current project-scope Create Template writes the kind-qualified name instead, so+the two shapes never share one directory — mixing them is rejected rather than+silently resolved.`library` / `explicit` records discovery provenance only and never changesownership.@@ -417,7 +419,7 @@ reads every installed spec and resolves these segments in context:|---|---|| Identity | Brand, otherwise Deck, otherwise unresolved until final Stage 2; Style supplies fallback candidates only || Direction / method | Style, otherwise unresolved until final Stage 2; actual Deck prototypes and Signature facts inform compatibility only |-| Structure | Compatible Layout, otherwise Deck, otherwise unresolved/free design until final Stage 2 |+| Structure | Layout when present, otherwise Deck, otherwise unresolved/free design until final Stage 2 || Reusable application context | Deck only; retained for final Stage-2 comparison, never used as the current project's application contract |Current user instructions and final confirmation override every starting@@ -432,8 +434,6 @@ instruction carries the same authority as the value itself — a Style'swhitespace or composition tendency never demotes a Brand's declared dominantcolor into an incidental accent.-Before applying a Layout override to a Deck, compare the Deck's reusable-application roles against the Layout's page roles, slot types, and capacity.Before combining Style with Layout/Deck, verify that its communication methodand composition expectations can be realized by that reusable context andstructure. On mismatch, surface the conflicting template segments; do not@@ -452,36 +452,20 @@ stage path — the user says in chat "use the anthropic brand but change primaryto #FF0000", and Strategist adjusts fields e/g. Installation adds nofield-level syntax.-### Same-kind multiple paths+### Selection conflicts-Several roots of one kind install as separate files distinguished by their-`<id>`, exactly like different kinds:--```-<project>/templates/design_spec.brand.anthropic.md-<project>/templates/design_spec.brand.google.md-```--Rules:-- 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 x 2`, `layout x 2`, `deck x 2`, `brand x 2` behave the same way--The Default template page already narrows this space: Brand/Style/Layout/Deck each have-one registered single-select dropdown, and one additional specified-root-dropdown may contribute a second workspace of its parsed kind.+The complete selection contains at most one contribution per kind. Layout and+Deck may coexist; Layout owns structure. A specified multi-kind root is atomic+and may coexist only with registered roots of non-overlapping kinds. Default rejects conflicts in the+Stage-1 selector and server receipt; Quick requires a narrower exact-root set+in chat. Installation never averages same-kind specs or chooses by path order.### TraceabilityBecause 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.+carries kind and id, the provenance line carries the source root, and the+remaining body is unchanged. Tracing which segment came from where is a+directory listing, not a merge reconstruction.---@@ -494,9 +478,9 @@ free design with detailed controls collapsed; explicit template intent or anyexact root starts in template mode. Exactly one supplied root is preselected,while multiple roots remain unselected candidates. A bare template/brand nameor style phrase never resolves to or preselects a workspace. For every selected-workspace, the post-confirmation apply stage resolves-`<workspace>/templates/design_spec.md`; for directory-shape compatibility, it-also accepts a legacy-flat Brand/Layout/Deck root containing+root, the post-confirmation apply stage resolves either one library bare spec or+all project-qualified specs; for directory-shape compatibility, it also accepts+a legacy-flat Brand/Layout/Deck root containing`<workspace>/design_spec.md` when the package satisfies its current kindcontract. Layout/Deck additionally require current structured SVGs; Style hasno flat form. Packages using legacy semantics such as@@ -507,18 +491,18 @@ produce a new workspace before generation continues. The `kind` field decides| User path's `kind` | Step 3 action (per-kind branch) ||---|---|-| `kind: brand` | Map workspace `templates/` plus existing `images/` and `icons/` to the matching project peers; ignore `exports/` |-| `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 | 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 |+| `kind: brand` | Install the qualified identity spec and root-owned assets; structure remains free unless the set also contains Layout or Deck |+| `kind: style` | Install the qualified direction/method spec; require no Style-owned roster or assets and keep generated pages flat unless the set contains Layout or Deck |+| `kind: layout` | Install the qualified structure spec plus its root's SVG roster and assets; it takes structural precedence over Deck |+| `kind: deck` | Install the qualified application/identity/structure spec and assets; install its SVG roster only when no Layout is selected |+| Multi-kind root | Preserve every qualified spec and map shared assets once; keep exactly the effective Layout-or-Deck roster |+| Selection conflict | Reject duplicate kinds before installation |-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.+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, a project root is directly reusable by another project. Moving one contribution into the library keeps its spec body but changes placement from a qualified project filename to the bare spec inside a single-kind library workspace, followed by registration.### Strategist confirmation stage behavior per kind-Installing a template does not narrow away the communication question. Stage 1 confirms the same open communication contract together with, but independently from, the template choice. The communication recommendation uses only the current request, source facts, conversation constraints, and project initialization; even template canvas is excluded. Only after Stage 1 closes and any selection is installed does final Stage 2 inspect that state and confirm the complete solution and production plan. Brand supplies identity constraints while structure stays free; Style supplies method and visual-default seeds while remaining flat; Layout exposes structural capability; Deck contributes descriptive reusable application context for comparison, not the current project's contract. For Style-only use, Strategist does not look for prototypes and deterministically records `template_reuse_scope: style` with flat structure. For Layout/Deck, it inspects the actual prototypes and current content, then authors one page/prototype plan and records `mirror`, `layout`, or `style` only as internal exporter values. A mirror-authored workspace therefore enables literal reuse but never forces it. Confirm UI exposes Free design / Use templates and candidate selectors, but not internal reuse/adherence fields. Planning semantics live in `references/strategist.md` and `references/strategist-template.md`; `templates/schemas/spec_lock.schema.json` owns the machine structure.+Installing a template does not narrow away the communication question. Stage 1 confirms the same open communication contract together with, but independently from, the template choice. The communication recommendation uses only the current request, source facts, conversation constraints, and project initialization; even template canvas is excluded. Only after Stage 1 closes and any selection is installed does final Stage 2 inspect that state and confirm the complete solution and production plan. Brand supplies identity constraints while structure stays free; Style supplies method and visual-default seeds while remaining flat; Layout exposes structural capability; Deck contributes descriptive reusable application context for comparison, not the current project's contract. For Style-only use, Strategist does not look for prototypes and deterministically records `template_reuse_scope: style` with flat structure. It otherwise inspects the effective prototypes—Layout when present, otherwise Deck—and current content, then authors one page/prototype plan and records `mirror`, `layout`, or `style` only as internal exporter values. A mirror-authored workspace therefore enables literal reuse but never forces it. Confirm UI exposes Free design / Use templates and candidate selectors, but not internal reuse/adherence fields. Planning semantics live in `references/strategist.md` and `references/strategist-template.md`; `templates/schemas/spec_lock.schema.json` owns the machine structure.---@@ -532,14 +516,25 @@ Installing a template does not narrow away the communication question. Stage 1 c| `workflows/create-template/create-layout.md` | Brand-neutral structural Layout workspace with a structured SVG roster || `workflows/create-template/create-deck.md` | Recurring application contract with integrated identity/structure and a structured SVG roster; selected when the reusable artifact is branded or scenario-bearing, not merely because the source is a complete PPTX |-In library scope, the frontmatter `kind` field determines which workspace parent is used under `templates/brands/` / `templates/styles/` / `templates/layouts/` / `templates/decks/`. Project scope keeps the same kind semantics at the project workspace root. A complete workspace may move between scopes without reshaping; add or remove only the library index registration.+**One schema, two landing points.** Templates are a single contract that lands at two layers, and the only difference is what names the Design Spec:++| Layer | Container | Design Spec |+|---|---|---|+| Skill library | `templates/<kind_dir>/<template_id>/` already names the kind and id | `templates/design_spec.md` |+| Project | one flat `templates/` shared across kinds | `templates/design_spec.<kind>.<id>.md` |++The container disambiguates, and the filename carries only what the container cannot. A project root therefore holds at most one spec per kind while all four kinds may coexist, and each filename kind/id must match frontmatter `kind` and the matching `<kind>_id`; the bare and qualified shapes never mix in one directory. One `templates/` carries one active SVG roster: Layout when present, otherwise Deck. Deck's other segments remain installed when its structural roster is shadowed. Because the schema itself does not change with the layer, a project spec needs no field added to enter the library and none removed to leave it, and an installed spec is indistinguishable from one authored in place.++Selection follows the same principle: the unit is the workspace **root**, not the kind. A root contributes every kind it exposes, so pointing at a project that holds a Brand plus a Style applies both. Browsing the library by kind is only a way to find a root — `library` and `explicit` record how a root was discovered, never what it owns.++In library scope, the frontmatter `kind` field determines which workspace parent is used under `templates/brands/` / `templates/styles/` / `templates/layouts/` / `templates/decks/`. Project scope keeps the same kind semantics at the project workspace root. Project-to-project reuse preserves the complete root. Moving one contribution into or out of the single-kind library preserves its spec schema and assets but changes the spec filename placement and index registration.---## 7. Non-goals (rejection list paired with this framing)- **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 duplicate-kind selection** — narrow the chosen roots before installation; Layout plus Deck is resolved by structural precedence- **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-free- **No Theme kind** — Theme projects resolved identity from Brand, Deck, or the current project; Style fallback values are not identity truthdiff --git a/docs/templates-guide.md b/docs/templates-guide.mdindex 1d8276d7..c52bcbea 100644--- a/docs/templates-guide.md+++ b/docs/templates-guide.md@@ -61,19 +61,24 @@ Brand/Style/Layout/Deck plus supplied-root candidates. Exactly one supplied rootis preselected; multiple roots remain unselected candidates. The system doesnot infer a specific template from the topic.-> **Quick Generate exception:** Quick never opens that page. Up to one exact-> workspace root per kind supplied in the request is validated, installed, and-> used directly; no exact root means free design. Bare names still do not-> resolve. Quick remains a lockless flat export, so Layout/Deck prototypes are-> authoring inputs rather than reusable native Master/Layout output.+> **Quick Generate exception:** Quick never opens that page. Exact roots in the+> request are validated and used directly, with at most one contribution per+> kind. Layout and Deck may coexist, with Layout taking structural precedence;+> a multi-kind root contributes all of its specs.+> No exact root means free design. Bare names still do not resolve. Quick remains+> a lockless flat export, so Layout/Deck prototypes are authoring inputs rather+> than reusable native Master/Layout output.### How to use the selectorOn the Stage-1 page, choose Free design or Use templates. Only Use templatesreveals five compact dropdowns: one each for registered Brand, Style, Layout,and Deck workspaces, plus one for exact roots supplied for this run. Each is-single-select and includes `None`; the four registered kinds can be combined,-and the specified-root channel contributes at most one workspace. The lists+single-select and includes `None`; the complete selection may combine all four+distinct kinds but contains at most one of each kind. Layout supplies structure+when present; otherwise Deck does. The+specified-root channel contributes at most one workspace, atomically with every+kind it exposes. The listscome only from the four kind indexes; the workflow never scans the templatedirectories. Send an exact Brand/Style/Layout/Deck workspace root in chat whenyou want template mode opened and that sole path preselected. Anywhere in the@@ -83,7 +88,7 @@ sentence is fine; the path just has to be unambiguous:> "use last deck's template: `projects/last_deck/`" ✅> "make a product introduction with `/Users/me/Desktop/our_brand_v3/`" ✅-For every current template kind, an explicit path is the **template workspace root**. An exact root matching a registered index entry may be displayed as `library`; an unregistered root remains separately labelled `explicit`. The server parses the latter's actual frontmatter `kind`; `explicit` is provenance, not a fifth kind or a priority tier. Stage 1 validates the selected candidate roots; after confirmation, Brand/Layout/Deck install their package-owned `templates/` plus any real `images/` and `icons/`, while Style installs only its spec and ignores unrelated project scaffolding. It never copies `exports/`. Deck/Layout workspaces additionally validate the structured SVG contract; Brand/Style validate their roster-free specs. The path may point to a built-in library workspace under `skills/ppt-master/templates/<kind>/<id>/`, a project workspace under `projects/<name>/`, or another workspace with the same routing. A Create Template run may hand its exact validated workspace root directly to the next Stage-1 selector in the same conversation.+For every current template kind, an explicit path is the **template workspace root**. An exact root matching a registered index entry may be displayed as `library`; an unregistered root remains separately labelled `explicit`. The server parses the latter's actual qualified specs; `explicit` is provenance, not a fifth kind or a priority tier. Stage 1 validates each selected root atomically. After confirmation, installation maps every selected spec and asset root exactly once, installs only the effective structural roster (Layout when present, otherwise Deck), and never copies `exports/`. Deck/Layout roots additionally validate their structured SVG contracts before precedence is applied; Brand/Style validate their roster-free specs. The path may point to a built-in library workspace under `skills/ppt-master/templates/<kind>/<id>/`, a project workspace under `projects/<name>/`, or another workspace with the same routing. A Create Template run may hand its exact validated workspace root directly to the next Stage-1 selector in the same conversation.Template selection shares the Stage-1 screen and submit action but remains aseparate sidecar decision. The communication recommendation is authored only@@ -131,9 +136,9 @@ Make a deck from projects/annual-report/sources/report.md.Template workspace: projects/acme_template/```-For chat-based explicit root selection, path labels are optional but exact roots are mandatory. The page's library selection already carries exact roots. The page allows one registered selection per kind and one specified root. If the specified root has the same parsed kind as a registered selection, the workflow stops at the existing two-workspace conflict-resolution gate instead of choosing one silently.+For chat-based explicit root selection, path labels are optional but exact roots are mandatory. The page's library selection already carries exact roots. The page allows one registered selection per kind and one specified root, and rejects only duplicate kinds. Layout and Deck may be selected together; Layout then owns structure while Deck retains its other segments. A specified multi-kind root is all-or-nothing; its exposed kinds cannot be selected again from the library.-You do not need to choose a template-use mode. For Layout/Deck, Strategist reads the actual Master/Layout/prototype roster and current content, then decides which pages to select, repeat, skip, reorder, or reorganize. Brand instead supplies identity constraints, while Style supplies direction/method defaults; both leave pages freely composed unless another workspace supplies structure. If you care about a specific boundary, state it in ordinary language in the same request—for example, “keep the cover and closing page exactly, choose suitable middle pages yourself” or “use only the visual language”. That explicit sentence wins over AI judgment.+You do not need to choose a template-use mode. Strategist reads the effective structural roster—Layout when present, otherwise Deck—and current content, then decides which pages to select, repeat, skip, reorder, or reorganize. Brand instead supplies identity constraints, while Style supplies direction/method defaults; both leave pages freely composed unless another workspace supplies structure. If you care about a specific boundary, state it in ordinary language in the same request—for example, “keep the cover and closing page exactly, choose suitable middle pages yourself” or “use only the visual language”. That explicit sentence wins over AI judgment.### Template catalog@@ -212,7 +217,7 @@ Before generation, the workflow writes one concise natural-language proposal and| Field | Notes ||-------|-------|-| **Output scope** | `library` (default) or `project`; both use the same portable workspace routing, while only library scope registers it globally |+| **Output scope** | `library` (default) or `project`; both use the same spec schema, while the library uses a bare spec in a single-kind directory and a project uses a qualified spec in its shared root || **Target project** | Required only for `project`; give the exact initialized project path || **Selected child workflow** | Create Brand / Create Style / Create Layout / Create Deck, fixed by the entry dispatch || **Template ID** | Portable template identity; in library scope it is also the directory / index key. Prefer ASCII slug like `acme_consulting`; non-ASCII names work but must be filesystem-safe |@@ -226,7 +231,7 @@ Before generation, the workflow writes one concise natural-language proposal andAfter confirmation the workflow echoes the finalized brief and emits the marker `[TEMPLATE_BRIEF_CONFIRMED]`. Subsequent steps only run after that marker. **This is a hard gate — no brief, no generation.**-Before either scope writes final files, one hard preflight resolves the required `templates/` destination and any optional asset destinations, requires an empty `templates/` root, and rejects bitmap or imported-vector filename collisions in `images/` and `icons/imported/`. It checks `exports/` only when a review PPTX was requested. Project scope additionally requires an initialized target project. Existing empty scaffolding created by project initialization is allowed and left untouched; Create Template does not create optional directories merely to keep empty paths. A failed check stops before partial output; the workflow does not merge or overwrite.+Before either scope writes final files, one hard preflight resolves the Design Spec and all real asset destinations. Library scope requires an empty `templates/` root. Project scope requires an initialized project and rejects a bare spec, an existing spec of the new kind, or invalid qualified naming; distinct kinds may coexist. Adding Deck beside Layout preserves the Layout roster, while adding Layout beside Deck uses isolated validation and an atomic structural replacement. Both scopes reject bitmap, imported-vector, review-export, and unrelated destination collisions before writing. Existing empty project scaffolding is left untouched, and optional directories are not created merely to retain empty paths. A failed check stops before partial output; the workflow does not overwrite.> Why so strict? A template is a reusable ownership contract, whether it is global or project-scoped. Confirming the owned segment and destination first—and geometry only for Layout/Deck—avoids partial or misplaced output.@@ -251,15 +256,15 @@ For a PPTX-backed Type A mirror, that final step is one deterministic command:```bashpython3 skills/ppt-master/scripts/mirror_template_materialize.py \- "<import_workspace>" "<empty_template_workspace>"+ "<import_workspace>" "<template_workspace>"```It validates the IR manifest, immutable source hashes, complete native graph,visibility facts, and imported-vector closure before atomically publishing thesource-ordered SVG roster and its `icons/imported/` / `images/` assets. It neverrequires or uses the opt-in `svg-flat/` verification tree as the template source-and never generates `design_spec.md`;-the designer writes that brief against the published roster.+and never generates a Design Spec; the designer writes the resolved spec+against the published roster.**Mirror graph boundary**: mirror preserves the complete supported source Master/Layout graph. It emits one complete prototype per source slide and one definition-only `layout_<layout_key>.svg` prototype for every source Layout unused by those slides. The latter registers in PowerPoint through the independent Layout roster without becoming a published page; its parent Master is retained with it. Preflight stops only when required source facts or supported geometry are missing, never merely because a Layout is unused.@@ -274,7 +279,7 @@ After generation, both scopes run [`svg_quality_checker.py`](../skills/ppt-maste| `library` (default) | `skills/ppt-master/templates/<kind>/<id>/` | Create Brand/Create Style: N/A; Create Layout/Create Deck: optional for one Master, mandatory for multiple Masters | Register in the matching `brands_index.json`, `styles_index.json`, `layouts_index.json`, or `decks_index.json` after validation || `project` | `projects/<name>/` | Same kind-specific review behavior | Skip global index registration |-Library registration makes the template **selectable** in the Default Stage-1 template controls and discoverable in chat because both read the same index. For project scope or an exact handoff, supply the workspace root, for example `use this template: projects/<name>/`; this initializes template mode, exactly one supplied root is preselected, multiple supplied roots remain unselected candidates, and an unregistered root remains labelled `explicit`. A project workspace can also be migrated or reused elsewhere because its core shape is identical; register it only if it is placed in the library and should appear in the library catalog.+Library registration makes the template **selectable** in the Default Stage-1 template controls and discoverable in chat because both read the same index. For project scope or an exact handoff, supply the workspace root, for example `use this template: projects/<name>/`; this initializes template mode, exactly one supplied root is preselected, multiple supplied roots remain unselected candidates, and an unregistered root remains labelled `explicit`. A project root remains directly reusable by another project and contributes every qualified spec it exposes. Moving one contribution into the single-kind library requires placing its unchanged spec body at that library workspace's bare `templates/design_spec.md` path and registering it.When a Deck/Layout template is selected, Strategist automatically authors the page/prototype plan. It may use the whole roster or a subset, repeat or reorder prototypes, and reorganize content where needed. `strict` / `adaptive` remain internal exporter values and do not appear as confirmation options.@@ -298,7 +303,7 @@ Microsoft PowerPoint is the acceptance target for Master/Layout behavior. Keynot### What a derived template workspace looks like-Library and project scopes use the same core structure; substitute either `skills/ppt-master/templates/<kind>/<id>/` or `projects/<name>/` for `<template_workspace>`:+Library and project scopes use the same spec schema and asset routing; a library workspace uses a bare spec while a shared project root uses qualified specs. Substitute either `skills/ppt-master/templates/<kind>/<id>/` or `projects/<name>/` for `<template_workspace>`:Brand and Style stop at `templates/design_spec.md` (plus real Brand assets whenpresent); they do not create the SVG or `exports/` rows shown above.@@ -333,16 +338,17 @@ nor allowed.### Library registration vs project placement- **Library scope (`library`, default)** writes the workspace under `skills/ppt-master/templates/<kind>/<id>/` and registers it globally.-- **Project scope (`project`)** writes the same portable workspace at `projects/<name>/` and skips registration.+- **Project scope (`project`)** writes a qualified spec at `projects/<name>/templates/design_spec.<kind>.<id>.md` and skips registration, so one project root can accumulate one contribution of every kind over separate runs and hand the complete bundle to any project that points at that root. Layout owns the active roster when Layout and Deck coexist.The result is not a private or reduced project-only format. Supplying an exactworkspace root adds it to the Step-3 candidate input, defaults Stage 1 totemplate mode, and preselects that root only when it is the sole supplied root.-Brand/Layout/Deck migrate with `templates/` plus any real package-owned-`images/` and `icons/`; Style migrates only `templates/design_spec.md`, and-unrelated project scaffolding is ignored. If a workspace moves into the-library, run its kind-specific registration so discovery reflects the new-location.+Each distinct root migrates once with every qualified spec it exposes and any+real package-owned `images/` and `icons/`; only the effective Layout-or-Deck SVG+roster is installed;+unrelated project scaffolding and `exports/` are ignored. If one contribution+moves into the library, place it in a single-kind library workspace and run its+kind-specific registration so discovery reflects the new location.---diff --git a/docs/zh/faq.md b/docs/zh/faq.mdindex a05a274d..f87a8275 100644--- a/docs/zh/faq.md+++ b/docs/zh/faq.md@@ -350,13 +350,13 @@ python3 skills/ppt-master/scripts/pptx_template_import.py <deck.pptx> --manifest- 期望的风格基调和配色(如"现代克制、深蓝主色调")- 类别偏好(`brand` 品牌 / `general` 通用 / `scenario` 场景 / `government` 政务 / `special` 特殊)- 画布格式(默认 16:9,如需其他格式请注明)-- 输出范围:进入索引的 `library`(默认)或一个已经初始化的 `project`;两者使用相同路由并省略空的可选目录+- 输出范围:进入索引的 `library`(默认)或一个已经初始化的 `project`;两者共享同一 spec schema 和素材路由,library 使用裸 spec,project 使用限定名 spec不需要一次提供所有细节——AI 代理会通过对话追问补齐缺失信息(输出范围、模板 ID、主题模式等)。**第三步 — 等待完成**-AI 代理会自动完成后续工作——分析参考、写入 kind 专属规范,仅为 Layout/Deck 构建结构定义,并验证工作区。Brand/Style 不生成预览 PPTX;Layout/Deck 可按请求生成 `exports/<id>_template_preview.pptx`,多 Master 时必须生成。两种范围都要求 `templates/`;Brand/Layout/Deck 可使用包自有 `images/` 和 `icons/`,Style 则只包含 `templates/design_spec.md`。`library` 写入 `skills/ppt-master/templates/<kind>/<id>/` 并完成全局注册;`project` 写入 `projects/<name>/` 并跳过注册;空的可选目录直接省略。把这个工作区根目录交给 Step 3 即可,Step 3 不会复制 `exports/`,全局库的预览导出也由 Git 忽略。兼容的旧平铺 Brand/Layout/Deck 工作区只有在满足当前 kind 合同时才可读取,Layout/Deck 还必须满足当前 structured SVG 合同;Style 不存在旧平铺形态,语义旧包必须通过 `create-template` 替换,不能原地升级。+AI 代理会自动完成后续工作——分析参考、写入 kind 专属规范,仅为 Layout/Deck 构建结构定义,并验证工作区。Brand/Style 不生成预览 PPTX;Layout/Deck 可按请求生成 `exports/<id>_template_preview.pptx`,多 Master 时必须生成。两种范围都要求 `templates/`;Brand/Layout/Deck 可使用包自有 `images/` 和 `icons/`,Style 只贡献自己的 Design Spec。`library` 在 `skills/ppt-master/templates/<kind>/<id>/` 写入裸 `templates/design_spec.md` 并完成全局注册;`project` 在 `projects/<name>/` 写入 `templates/design_spec.<kind>.<id>.md` 并跳过注册,四种 kind 均可各自共存一份;Layout 与 Deck 同时存在时,Layout 拥有有效 SVG roster。空的可选目录直接省略。把这个工作区 root 交给 Step 3 时,项目 root 会原子贡献其中全部 spec,安装不会复制 `exports/`。兼容的旧平铺 Brand/Layout/Deck 工作区只有在满足当前 kind 合同时才可读取,Layout/Deck 还必须满足当前 structured SVG 合同;Style 不存在旧平铺形态,语义旧包必须通过 `create-template` 替换,不能原地升级。> **提示**:对风格和使用场景描述得越具体,生成的模板就越符合你的预期。diff --git a/docs/zh/getting-started.md b/docs/zh/getting-started.mdindex 24c16b5e..88f43ee8 100644--- a/docs/zh/getting-started.md+++ b/docs/zh/getting-started.md@@ -35,7 +35,7 @@你:用 /create-template 从 projects/brand/our_deck.pptx 创建一个可复用 Deck 模板```-Create Template 会分析参考材料,确认结果属于 Brand、Style、Layout 还是 Deck,再创作或物化一个经过验证的新工作区。导入器只提供来源证据;最终工作区拥有 `templates/design_spec.md`,以及该 kind 真正需要的原型和素材。Brand 与 Style 不含 roster;Layout 与 Deck 拥有 structured SVG 原型。如果需要 Layout 或 Deck 的 PowerPoint 评审文件,再显式运行可选预览导出;它会按需创建 `exports/<id>_template_preview.pptx`。生成时引用的是工作区根目录。+Create Template 会分析参考材料,确认结果属于 Brand、Style、Layout 还是 Deck,再创作或物化一个经过验证的新工作区。导入器只提供来源证据;library 工作区拥有 `templates/design_spec.md`,共享 project root 则拥有 `templates/design_spec.<kind>.<id>.md`,以及该 kind 真正需要的原型和素材。Brand 与 Style 不含 roster;Layout 与 Deck 拥有 structured SVG 原型。如果需要 Layout 或 Deck 的 PowerPoint 评审文件,再显式运行可选预览导出;它会按需创建 `exports/<id>_template_preview.pptx`。生成时引用的是工作区根目录。在 create-template 简报中选择 `library`(沿用原默认)或 `project`。两种范围都要求 `templates/`,并使用可选的 `images/`、`icons/` 和按需生成的 `exports/`;空的可选目录直接省略。项目范围要求给出已初始化的目标项目;只有全局库范围会执行注册。@@ -44,9 +44,9 @@ Create Template 会分析参考材料,确认结果属于 Brand、Style、Layou| 位置 | 路径 | 说明 ||---|---|---|| **注册进 skill 库** | `skills/ppt-master/templates/<kind>/<id>/` | 可移植工作区并执行全局注册;问“有哪些模板”时会被列出来 |-| **放在 projects 下** | `projects/<name>/` | 相同的可移植工作区,不执行全局注册 |+| **放在 projects 下** | `projects/<name>/` | 不执行全局注册的共享限定名 spec root;四种 kind 均可共存,结构由 Layout 优先于 Deck |-Default Generate 把模板选择放在 Stage 1,与沟通契约同屏确认;沟通推荐在此之前不会读取任何模板。普通请求默认自由设计;用户明确要求模板或提供任意精确 root 时,默认进入模板模式,但界面始终允许切换。未注册 root 会进入指定地址下拉框;与注册 canonical root 完全相同的路径会归回对应 kind 下拉框。只提供一个 root 时可预选它;提供多个 root 时都只作为候选、不预选。一次确认同时闭合沟通与模板选择,随后才校验、安装所选工作区;最终 Stage 2 才读取安装结果。裸模板名不会被解析为工作区。完整工作区可以在全局库与 `projects/` 之间复制或迁移,无需调整目录结构;只有全局库注册不同。+Default Generate 把模板选择放在 Stage 1,与沟通契约同屏确认;沟通推荐在此之前不会读取任何模板。普通请求默认自由设计;用户明确要求模板或提供任意精确 root 时,默认进入模板模式,但界面始终允许切换。未注册 root 会进入指定地址下拉框;与注册 canonical root 完全相同的路径会归回对应 kind 下拉框。只提供一个 root 时可预选它;提供多个 root 时都只作为候选、不预选。完整选择中每个 kind 最多一份;Layout 与 Deck 可以共存,结构由 Layout 提供。多 kind project root 必须原子选择。一次确认同时闭合沟通与模板选择,随后才校验、安装所选 root;最终 Stage 2 才读取安装结果。裸模板名不会被解析为工作区。Project root 可直接被其他项目复用;把其中一项迁入 library 时,需要改变 spec 文件名落点并完成注册。```你:用 sources/report.pdf 做 deck,模板用 skills/ppt-master/templates/layouts/presentation_core/diff --git a/docs/zh/technical-design.md b/docs/zh/technical-design.mdindex d6300b44..ac2eab4e 100644--- a/docs/zh/technical-design.md+++ b/docs/zh/technical-design.md@@ -363,28 +363,29 @@ PPT Master 不只服务 PPT——同一套 SVG → DrawingML 流水线还能产**为什么保留自由设计选项。** 模板是地板,但很容易变成天花板:它会把整个 deck 锁进模板自有的视觉惯用语,无视内容本身想要怎样被呈现。自由设计的布局从源内容的结构推导而来,而不是从一套固定语法套上去——视觉节奏跟着内容走,而不是跟内容打架。约束模式在窄场景里确实更好(品牌锁定的 deck、强类型场景如学术答辩或政府报告),最终选择仍由用户完成。-**精确选择,不做语义匹配。** 像 `presentation_core` 这样的裸名字、品牌提及,或“麦肯锡风格”这类风格短语,永远不会 fuzzy-match 到目录。默认页面只从四个 `*_index.json` 列出已注册 Brand/Style/Layout/Deck;聊天发现也读取同一组索引并返回精确 root。显式路径仍有效;若它与某个已注册 canonical root 精确相同,可显示为 `library`,未注册 root 仍是 `explicit`。服务端解析每个 explicit root 的真实 `kind`,来源标签本身不参与优先级。当前工作区均解析 `templates/design_spec.md`;自由文字风格说明仍只是 Stage 2 输入,不会启用 Style 工作区。旧平铺 Brand/Layout/Deck 目录只有在满足当前 kind 合同时,才兼容从根目录读取 `design_spec.md`;Layout/Deck 还必须满足当前 structured SVG 合同。Style 不存在旧平铺形态。目录形态从不授权结构迁移;带旧 Master/Layout/placeholder 语义的包必须先替换为新建的模板工作区。+**精确选择,不做语义匹配。** 像 `presentation_core` 这样的裸名字、品牌提及,或“麦肯锡风格”这类风格短语,永远不会 fuzzy-match 到目录。默认页面只从四个 `*_index.json` 列出已注册 Brand/Style/Layout/Deck;聊天发现也读取同一组索引并返回精确 root。显式路径仍有效;若它与某个已注册 canonical root 精确相同,可显示为 `library`,未注册 root 仍是 `explicit`。Library 工作区解析 `templates/design_spec.md`,project root 解析全部 `templates/design_spec.<kind>.<id>.md`;服务端解析每个 explicit root 的真实 kind 集合,来源标签本身不参与优先级。自由文字风格说明仍只是 Stage 2 输入,不会启用 Style 工作区。旧平铺 Brand/Layout/Deck 目录只有在满足当前 kind 合同时,才兼容从根目录读取 `design_spec.md`;Layout/Deck 还必须满足当前 structured SVG 合同。Style 不存在旧平铺形态。目录形态从不授权结构迁移;带旧 Master/Layout/placeholder 语义的包必须先替换为新建的模板工作区。当前 Brand/Style/Layout/Deck 都采用同一工作区路由合同;Brand 与 Style 不含 SVG roster,空的可选目录直接省略:```text<template_workspace>/-├── templates/ # design_spec.md;Create Layout / Create Deck 另含 SVG 原型+├── templates/ # library 裸 spec 或 project 限定名 spec;Layout / Deck 另含 SVG 原型├── images/ # 可选;位图素材,SVG 统一引用 ../images/<name>├── icons/│ └── imported/ # 可选;导入向量素材的唯一规范副本└── exports/ # 可选、按需生成的审阅文件;全局库下由 Git 忽略```-Style 将这一路由形态收窄为仅 `templates/design_spec.md`,不携带素材或-审阅 payload;项目中既有的脚手架也不属于 Style 输入。+Style 只贡献自己的 Design Spec,不携带素材或审阅 payload;项目中既有的+脚手架及其他 kind 文件都不属于 Style 输入。`<template_workspace>` 可以是 `skills/ppt-master/templates/<kind>/<id>/`,也可以是 `projects/<name>/` 等其他精确 root。Step 3 只把它记录为候选输入,不读取模板内容;Stage 1 选中后,apply 阶段才把它校验、合成并安装到当前项目的 `templates/`、`images/`、`icons/`,且不复制 `exports/`。模板感知的-Strategist 及后续角色只读该项目本地副本。源工作区可在不同位置间迁移而不-改形;全局索引注册决定它是否作为 library 选项出现。+Strategist 及后续角色只读该项目本地副本。Project root 可直接被其他项目+复用;把其中一项迁入 library 时保留 spec schema 与素材,但要把限定名改为+单 kind 库路径下的裸 spec,再由全局索引注册决定它是否作为 library 选项出现。对 Create Layout / Create Deck,`standard` 与 `fidelity` 会重新创作 SVG 和新的 Master/Layout/slot 系统;来源拓扑只作为视觉证据,不保留、也不蒸馏。`mirror` 把来源包内实际存在且已验证的页序、Master/Layout 身份与父子关系、placeholder 事实和受支持视觉物化到新工作区,不做语义归纳或缺口补造。只有被保留的来源本身已经品牌中立且应用中立时,Layout mirror 才合法;否则应重新创作 Layout,或把这些事实保留为 Deck。由于结构层不能是 `<g>`,固定结构层的来源 group wrapper 只允许机械展开成直接原子,同时保持归属、paint order 和视觉一致。Create Brand 只提取身份片段,Create Style 只提取可移植方法/方向;两者都不进入结构复制策略,也不生成 SVG roster。@@ -395,11 +396,11 @@ Strategist 及后续角色只读该项目本地副本。源工作区可在不同| `brand` | 身份片段 | 配色、字体、logo、语气、图标风格 | 锁定身份;结构保持自由 || `style` | 方向/方法片段 | 沟通方法、开放页面角色、证据/数据规则、视觉默认值、图片/图标方向、审阅关注点 | 作为 Stage 2 起点;Style-only 保持 flat,与 Layout/Deck 合成时沿用所选结构;不升级为身份真值,也不触发 visual review || `layout` | 品牌中立的结构片段 | 画布、页面结构、语义文字角色/空间行为、页面类型、SVG roster | 提供结构能力;身份与沟通应用仍由下游决定 |-| `deck` | 应用段 + 一体化身份/结构 | 重复场景、受众与结果、代表性页面角色、身份和真实 SVG roster | 提供描述性语境和原型;Strategist 将其与独立确认的 Stage-1 契约及当前内容对照,再推导应用计划 |+| `deck` | 应用段 + 一体化身份/结构 | 重复场景、受众与结果、代表性页面角色、身份和真实 SVG roster | 提供描述性语境和身份;没有 Layout 覆盖结构时才提供原型 |Theme、Slide Master、Slide Layout 与 Placeholder 是编译生成的 PowerPoint 原生对象,不是新的模板 kind。Layout 决定拓扑、位置、语义文字角色与空间行为,Brand 决定身份值与资产。`template_reuse_scope: layout` 会结合已确认的阅读模式和字号体系解析最终 placeholder 格式;`mirror` 则保留来源的字面格式与文字拓扑。两类规则都可编译进同一套原生 Master/Layout 图谱。-当用户选择多个工作区时,融合是**片段级**而不是字段级:Brand 拥有身份,Style 拥有方向/方法默认值,Layout 拥有兼容结构,Deck 保留描述性的可复用应用语境及未被覆盖的身份/结构;library/explicit 来源不改变这个顺序。当前项目应用契约只来自已确认的 Stage 1,Deck 语境只是 Stage 2 对照输入,不会覆盖它。用户最终确认最高。Style 的色彩/字体 fallback 不覆盖 Brand/Deck 身份,其方法与构图预期必须兼容所选 Deck 语境和 Layout/Deck 结构,否则显式提出冲突。项目内 Brand + Layout 组合的应用语境来自 Stage 1,不会自动升级成可注册的 Deck。同类冲突也会显式列出,而不是按输入顺序默默决定。这样融合后的 spec 能明确说明每个片段来自哪里,便于审计和复现。+当用户选择多个 root 时,每个不同 root 只安装一次,且每份贡献保持独立 spec。完整集合中每个 kind 最多一份,四种 kind 均可共存,多 kind project root 必须原子选择。随后按**片段级**而不是字段级解析所有权:Brand 拥有身份,Style 拥有方向/方法默认值;有 Layout 时由 Layout 拥有结构,否则由 Deck 拥有结构;Deck 始终保留描述性的可复用应用语境,以及未被 Brand 覆盖的身份。项目中只安装当前有效的 Layout 或 Deck 结构 roster。library/explicit 来源不改变这个顺序。当前项目应用契约只来自已确认的 Stage 1,Deck 语境只是 Stage 2 对照输入,不会覆盖它。用户最终确认最高。Style 的色彩/字体 fallback 不覆盖 Brand/Deck 身份,其方法与构图预期必须兼容所选结构。项目内 Brand + Layout 组合的应用语境来自 Stage 1,不会自动升级成可注册的 Deck。同 kind 重复会在安装前被拒绝。这样已装集合能明确说明每个片段来自哪里,便于审计和复现。**原生 PPTX 不能直接作为 Step 3 工作区。** 普通 Generate 可以把 PPTX 作为源材料使用,`beautify-pptx` 也可以在页数、页序和逐页措辞 1:1 的边界下重新设计;这两种情况都不会把原始 PPTX 当作 Step 3 模板。把原生 PPTX 作为模板或页面壳、再用新材料填充时,默认进入 Fill Native PPTX;若请求允许拆分、合并、删页、重排或叙事重构,则仍属于 Generate。只有当目标是创建可复用模板工作区、并在 SVG 路线的 Step 3 中重复使用其设计系统时,才先运行 Create Template,再传入生成的工作区根目录。@@ -703,7 +704,7 @@ SVG 与 DrawingML 的表达模型并不等价,因此主编译路径不把“**为什么 Create Layout / Create Deck 分为创作模式和保留模式。** `pptx_template_import.py` 输出分层 Master/Layout/Slide 参考和 native 结构事实。`standard` / `fidelity` 把这些素材和视觉当参考,再按照确认后的可复用行为创作新拓扑。Mirror 则把已验证的来源 roster 与拓扑一对一物化到新工作区,只允许显式 structured 合同要求的机械归一化,不补造缺失事实。原始 PPTX 保持为不可变分析证据,不成为最终模板依赖。Create Brand 没有结构复制策略。-**为什么 create-template 在两种范围都使用同一工作区路由。** `create-template` 仍以写入索引的 `library` 为默认,也可写入已初始化项目。两种根目录都要求 `templates/`;`images/`、`icons/` 和按需生成的 `exports/` 只有存在真实内容时才出现,已有 SVG 素材的引用规则也一致。因此工作区可直接迁移和复用,不需要全局库专用 package 分支或缩减的项目分支。唯一范围差异是全局索引注册;两种范围共享同一可迁移工作区合同,但只有 Layout / Deck 拥有 structured SVG 合同,Brand 仍是 identity-only。+**为什么 create-template 在两种范围都使用同一工作区路由。** `create-template` 仍以写入索引的 `library` 为默认,也可写入已初始化项目。两种根目录都要求 `templates/`;`images/`、`icons/` 和按需生成的 `exports/` 只有存在真实内容时才出现,已有 SVG 素材的引用规则也一致。Library 在单 kind 目录使用一份裸 spec,project 在共享 root 使用限定名 spec;schema 与素材路由保持一致,spec 落点及全局索引注册随范围变化。只有 Layout / Deck 拥有 structured SVG 合同,Brand 与 Style 保持 roster-free。**为什么模板 SVG 保持完整却仍能编译成原生结构。** 模板 SVG 会重复携带继承的 Master/Layout 视觉和示例 Slide 内容,因此可独立打开。生成时由 `page_layouts` 选择该原型,输出 SVG 仍保持视觉闭包。导出器移除重复继承原子、生成真实 Master/Layout part,并把槽位 carrier 与 Slide-local 内容留在 Slide。diff --git a/docs/zh/templates-architecture.md b/docs/zh/templates-architecture.mdindex 65f23b00..bdb31590 100644--- a/docs/zh/templates-architecture.md+++ b/docs/zh/templates-architecture.md@@ -23,7 +23,7 @@四者是**四种并列的可复用规则包**,不是 PowerPoint 包对象类型。在全局库范围内,物理目录与 frontmatter `kind` 字段双向对齐:-每份已装 spec 各自保留自己的 `kind` 与 id;不存在合并后的项目 spec,也没有组合出来的能力标签。路由结果在读取时推导:结构来自已装的 Layout 或 Deck,身份来自已装的 Brand 或 Deck,方向来自已装的 Style。项目内临时组合的 Brand + Layout 因此只是“两种能力都已安装”,不会被自动提升为可注册的 Deck,也不会凭空生成应用语境;当前项目的 Stage 1 沟通契约负责提供场景。Strategist 在内部生成模板应用计划,确认页不显示模板模式控件。+每份已装 spec 各自保留自己的 `kind` 与 id;不存在合并后的项目 spec,也没有组合出来的能力标签。路由结果在读取时推导:结构优先来自 Layout,没有 Layout 时才来自 Deck;身份来自 Brand 或 Deck,方向来自 Style。项目内临时组合的 Brand + Layout 因此只是“两种能力都已安装”,不会被自动提升为可注册的 Deck,也不会凭空生成应用语境;当前项目的 Stage 1 沟通契约负责提供场景。Strategist 在内部生成模板应用计划,确认页不显示模板模式控件。```yaml# templates/brands/anthropic/templates/design_spec.md@@ -101,7 +101,7 @@ native_structure_mode: structured两种范围都在可移植 frontmatter 中保留所选 `kind`。`output_scope` 与 `target_project` 只属于工作流简报,不写入 `design_spec.md`。-任何范围第一次写最终文件前,都必须解析工作区根目录、确认 `templates/` 为空,并检查全部计划写入的图片与图标文件名无冲突;用户要求预览或已确认 roster 含多个 Master 时检查预览 PPTX 目标。项目范围还必须确认目标项目已初始化。任一失败都在写入前停止,不合并、不覆盖。+任何范围第一次写最终文件前,都必须解析 Design Spec 和全部真实目标。Library 范围要求 `templates/` 为空。Project 范围要求目标项目已初始化,并拒绝裸名、同 kind spec 或无效的限定名集合;不同 kind 可以共存。Layout 与 Deck 同时存在时,Layout 拥有有效 roster:新增 Deck 不改变已有 Layout roster,新增 Layout 则先隔离校验,再原子替换已有 Deck 结构载荷。两种范围都会检查计划素材和预览目标冲突。任一失败都在写入前停止,不覆盖、不留下半套输出。### 四段的字段切分@@ -370,7 +370,7 @@ spec,并在上下文中解析下列片段:|---|---|| Identity | Brand,其次 Deck;都没有则留到最终 Stage 2;Style 只提供候选回退值 || 方向/方法 | Style;没有则留到最终 Stage 2;Deck 的实际原型与 Signature 事实只用于兼容性判断 |-| Structure | 兼容的 Layout,其次 Deck;都没有则留到最终 Stage 2 或自由设计 |+| Structure | 有 Layout 时由 Layout 提供,否则由 Deck 提供;都没有则留到最终 Stage 2 或自由设计 || 可复用应用语境 | 仅 Deck 拥有;保留供最终 Stage 2 比对,绝不作为当前项目的应用契约 |当前用户指令与最终确认覆盖任何起始所有者。Brand 身份对 Style 的色彩/字体回退值@@ -381,8 +381,7 @@ spec,并在上下文中解析下列片段:退居次要或保持稀有时,该指令与取值本身具有同等权威——Style 的留白或构图倾向绝不能把 Brand 声明的主导色降格为偶然点缀。-用 Layout 覆盖 Deck 结构前,先比对 Deck 的可复用应用角色与 Layout 的页面角色、-槽位类型与容量。把 Style 与 Layout/Deck 组合前,先确认其沟通方法与构图预期+把 Style 与 Layout/Deck 组合前,先确认其沟通方法与构图预期能够被该可复用语境与结构兑现。不兼容时显式报告模板片段冲突,不能静默混合字段或保留一份当前结构无法兑现的承诺。当前项目的适配只在 Stage 1 确认后的最终Stage 2 开始。@@ -396,30 +395,17 @@ Logo / Voice / Icon Style 五段从 brand 拿,**不做字段级混搭**(即字段级微调走策略师确认阶段这条已有路径——用户在 chat 里说"用 anthropic brand,但 primary 改成 #FF0000",由 Strategist 在 e/g 现场调整;安装层不加字段级语法。-### 同类多份+### 选择冲突-同一 kind 的多个 root 按 `<id>` 区分,各自安装为独立文件,与不同 kind 完全一致:--```-<project>/templates/design_spec.brand.anthropic.md-<project>/templates/design_spec.brand.google.md-```--- 无隐式顺序,也不按路径先后定优先级-- 消费方读取全部,优先遵循最新的明确用户指令-- 用户未给指令、且两份同类 spec 对同一片段做出实质冲突的主张时,在 chat 中显式- 提出冲突,而不是静默取中-- 不做字段级冲突解决——只到片段级-- `style × 2`、`layout × 2`、`deck × 2`、`brand × 2` 同处理--Default 模板页面已经把组合空间收窄:Brand/Style/Layout/Deck 各有一个已注册模板-单选下拉框,另有一个指定地址下拉框;指定地址按解析出的 kind,最多给该类-增加第二份。+完整选择中每个 kind 最多一份;Layout 与 Deck 可以同时存在,结构由 Layout+优先提供。指定的多 kind root 必须原子选择,只能与 kind 不重叠的已注册 root 共存。Default 在 Stage-1+选择器和服务端回执中拒绝冲突;Quick 要求先在 chat 中缩小精确 root 集合。+安装阶段不会平均同 kind spec,也不会按路径顺序替用户选择。### 可追溯性因为不做任何合并,已装集合本身即自描述:文件名带 kind 与 id,来源行带源 root,-正文与源 spec 逐字节一致。追溯哪一段来自哪里,看目录列表即可,不需要做 diff。+其余正文保持不变。追溯哪一段来自哪里,看目录列表即可,不需要重建合并过程。让 AI 和人类都能回溯每段来自哪。@@ -431,23 +417,23 @@ Default Generate 的 [Step 3](../../skills/ppt-master/workflows/generate-pptx.md只准备候选输入。Stage 1 把沟通契约与可切换的自由设计/使用模板选择同屏呈现。普通请求默认自由设计并收起详细控件;明确要求使用模板或提供任意精确 root 时默认展开模板模式。只提供一个 root 时会预选,多 root 仍只作为未选候选。裸-模板/品牌名称或风格词不会解析或预选工作区。对于每个已选工作区,确认后的-apply 阶段解析 `<workspace>/templates/design_spec.md`;为兼容目录形态,也接受根目录直接包含 `<workspace>/design_spec.md`、且满足当前 kind 合同的旧式平铺 Brand/Layout/Deck 工作区。Layout/Deck 还必须带有当前 structured SVG;Style 没有平铺形态。若包仍使用 `native_structure_mode: template`、缺 Master 身份、原子 placeholder 或蒸馏时代标记等旧语义,apply 阶段必须拒绝;先由 `create-template` 产出新工作区,再继续生成。`kind` 字段决定**AI 如何处理已选路径**:+模板/品牌名称或风格词不会解析或预选工作区。对于每个已选 root,确认后的+apply 阶段解析一份 library 裸 spec 或全部 project 限定名 spec;为兼容目录形态,也接受根目录直接包含 `<workspace>/design_spec.md`、且满足当前 kind 合同的旧式平铺 Brand/Layout/Deck 工作区。Layout/Deck 还必须带有当前 structured SVG;Style 没有平铺形态。若包仍使用 `native_structure_mode: template`、缺 Master 身份、原子 placeholder 或蒸馏时代标记等旧语义,apply 阶段必须拒绝;先由 `create-template` 产出新工作区,再继续生成。`kind` 字段决定**AI 如何处理已选路径**:| 用户路径指向 | Stage-1 确认后的 apply 行为(按 kind 分支)||---|---|-| `kind: brand` | 把工作区 `templates/` 及实际存在的 `images/`、`icons/` 映射到项目同名目录;忽略 `exports/` |-| `kind: style` | 安装仅含 spec 的方向/方法工作区;要求无 SVG roster,并保持生成页面为 flat |-| `kind: layout` | 把工作区 `templates/` 及实际存在的 `images/`、`icons/` 映射到项目同名目录;忽略 `exports/` |-| `kind: deck` | 把工作区 `templates/` 及实际存在的 `images/`、`icons/` 映射到项目同名目录;忽略 `exports/` |-| 多路径 | 每个选中工作区安装为一份 `design_spec.<kind>.<id>.md`,拒绝碰撞后再合并实际存在的可移植资产目录 |-| 同类多份 | 按 `<id>` 各自成文件,读取时按上节规则解析所有权 |+| `kind: brand` | 安装限定名身份 spec 与 root 自有素材;除非同时选择 Layout/Deck,否则结构自由 |+| `kind: style` | 安装限定名方向/方法 spec;Style 自身不得带 roster 或素材,无 Layout/Deck 时页面保持 flat |+| `kind: layout` | 安装限定名结构 spec、SVG roster 与素材;结构优先于 Deck |+| `kind: deck` | 安装限定名应用/身份/结构 spec 与素材;仅在没有 Layout 时安装其 SVG roster |+| 多 kind root | 保留全部限定名 spec,共享素材只映射一次,并只保留有效 Layout-or-Deck roster |+| 选择冲突 | 安装前拒绝同 kind 重复 |-位图统一进入工作区 `images/`,模板 SVG 通过 `../images/` 引用。如果显式输入根目录本来就是目标项目根目录,apply 阶段原地消费:不得复制到自身,也不得再次移动素材。除此之外,完整核心工作区是可移植的:可以从项目根复制到全局库根、从全局库复制到项目,或从另一个工作区直接复用,而不改变内部结构。注册是唯一与范围相关的步骤。+位图统一进入工作区 `images/`,模板 SVG 通过 `../images/` 引用。如果显式输入根目录本来就是目标项目根目录,apply 阶段原地消费:不得复制到自身,也不得再次移动素材。项目 root 可以被其他项目直接复用;把其中一项移入全局库时,spec 正文保持不变,但要从项目限定名路径放到单 kind 库工作区的裸 spec 路径,并完成注册。### 策略师确认阶段在不同 kind 下的行为-安装模板不会让沟通问题消失。Stage 1 把同一份开放式沟通契约与模板选择同时确认,但两者相互独立:沟通推荐只使用当前请求、源材料事实、对话约束和项目初始化状态,连模板画布也不能参与。Stage 1 完成且所选模板安装后,最终 Stage 2 才读取该状态,并确认完整方案与制作计划。Brand 提供身份约束、结构仍然自由;Style 提供方法和视觉默认值候选并保持 flat;Layout 提供结构能力;Deck 提供描述性的可复用应用语境供对照,但不充当当前项目契约。Style-only 时 Strategist 不读取原型,固定写入 `template_reuse_scope: style` 与 flat 结构;Layout/Deck 才读取真实原型和当前内容,生成页面/原型计划,并把 `mirror`、`layout` 或 `style` 记录为内部导出值。按 mirror 创建的工作区因此只提供原样复用能力,不会强制使用;Confirm UI 会显示自由设计/使用模板和候选控件,但不显示内部复用/遵循字段。规划语义由 `references/strategist.md` 与 `references/strategist-template.md` 负责,机器结构由 `templates/schemas/spec_lock.schema.json` 负责。+安装模板不会让沟通问题消失。Stage 1 把同一份开放式沟通契约与模板选择同时确认,但两者相互独立:沟通推荐只使用当前请求、源材料事实、对话约束和项目初始化状态,连模板画布也不能参与。Stage 1 完成且所选模板安装后,最终 Stage 2 才读取该状态,并确认完整方案与制作计划。Brand 提供身份约束、结构仍然自由;Style 提供方法和视觉默认值候选并保持 flat;Layout 提供结构能力;Deck 提供描述性的可复用应用语境供对照,但不充当当前项目契约。Style-only 时 Strategist 不读取原型,固定写入 `template_reuse_scope: style` 与 flat 结构;其他情况只读取有效原型(有 Layout 时用 Layout,否则用 Deck)和当前内容,生成页面/原型计划,并把 `mirror`、`layout` 或 `style` 记录为内部导出值。按 mirror 创建的工作区因此只提供原样复用能力,不会强制使用;Confirm UI 会显示自由设计/使用模板和候选控件,但不显示内部复用/遵循字段。规划语义由 `references/strategist.md` 与 `references/strategist-template.md` 负责,机器结构由 `templates/schemas/spec_lock.schema.json` 负责。---@@ -461,13 +447,25 @@ apply 阶段解析 `<workspace>/templates/design_spec.md`;为兼容目录形| `workflows/create-template/create-layout.md` | 品牌中立、带结构化 SVG roster 的 Layout 工作区 || `workflows/create-template/create-deck.md` | 应用契约与身份/结构一体化、带结构化 SVG roster 的 Deck 工作区;可复用成果带品牌身份或场景语义时选择,不能只因来源是一份完整 PPTX 就默认选择 |-在全局库范围,frontmatter `kind` 字段决定工作区父目录位于 `templates/brands/` / `templates/styles/` / `templates/layouts/` / `templates/decks/`。项目范围在项目工作区根目录保留同一 kind 语义。完整工作区可在两种范围之间移动而不改形,只需增加或移除全局索引注册。+**一套 schema,两个落点。** 模板是同一份合同落在两个层面,唯一的差别是 Design Spec 叫什么:++| 层 | 容器 | Design Spec |+|---|---|---|+| skill 库 | `templates/<kind_dir>/<template_id>/` 已经说明了 kind 和 id | `templates/design_spec.md` |+| 项目 | 一个平铺、多 kind 共用的 `templates/` | `templates/design_spec.<kind>.<id>.md` |++消歧责任归容器,容器给不了的才写进文件名。因此一个项目根同一 kind 至多一份 spec,四种 kind 可以共存,且文件名里的 kind/id 必须分别与 frontmatter 的 `kind` 及对应 `<kind>_id` 一致;裸名与限定名不得在同一目录混用。一个 `templates/` 只保留一份有效 SVG roster:有 Layout 时用 Layout,否则用 Deck;Deck 的其他片段不会因结构被覆盖而丢失。由于 schema 不随层面变化,项目里的 spec 进库不需要补字段、出库也不需要删字段,安装进来的与就地创作的在形态上不可区分。++选择遵循同一条原则:单位是工作区 **root**,不是 kind。一个 root 会贡献它暴露的全部 kind,所以指向一个同时装了 Brand 和 Style 的项目,两者都会生效。按 kind 浏览全局库只是找到 root 的一种方式——`library` 与 `explicit` 记录的是 root 如何被发现,而不是它拥有什么。++在全局库范围,frontmatter `kind` 字段决定工作区父目录位于 `templates/brands/` / `templates/styles/` / `templates/layouts/` / `templates/decks/`。项目范围在项目工作区根目录保留同一 kind 语义。项目到项目复用保持完整 root;单项进出全局库时保留 spec schema 与素材,但会改变 spec 文件名落点及索引注册。---## 七、不做(与本文 framing 配套的拒绝列表)- **不在安装层支持字段级覆盖语法** —— 字段级微调走 策略师确认阶段这条已有路径+- **不接受同 kind 重复** —— 安装前先缩小 root 集合;Layout + Deck 按结构优先级解析- **不引入双名映射表** —— 模板命名按其品牌/场景母语(中文模板用中文名,英文模板用 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/docs/zh/templates-guide.md b/docs/zh/templates-guide.mdindex 9066f105..b6b48f7f 100644--- a/docs/zh/templates-guide.md+++ b/docs/zh/templates-guide.md@@ -52,17 +52,21 @@ Default Generate 把模板选择放进 **Stage 1**,与不受模板影响的沟模板模式展示已注册 Brand/Style/Layout/Deck 与本次提供的 root;只提供一个root 时会预选,多 root 仍只作为未选候选。系统不会根据主题替用户推断具体模板。-> **快速模式例外:** Quick 不会打开这个页面。请求中每个 kind 最多一个精确-> 工作区 root,会被直接校验、安装并使用;没有精确 root 就直接自由设计。-> 裸模板名仍不会被解析。Quick 继续采用无锁 flat 导出,因此 Layout/Deck-> 原型是页面创作输入,不会变成可复用的原生 Master/Layout 输出。+> **快速模式例外:** Quick 不会打开这个页面。请求中的精确 root 会被直接+> 校验并使用,每个 kind 最多一份;Layout 与 Deck 可以共存,结构由 Layout+> 优先提供。多 kind root+> 会原子地贡献其全部 spec。没有精确 root 就直接自由设计,裸模板名仍不会+> 被解析。Quick 继续采用无锁 flat 导出,因此 Layout/Deck 原型是页面创作+> 输入,不会变成可复用的原生 Master/Layout 输出。### 怎么使用选择器Stage-1 页面先让用户选择自由设计或使用模板;只有选择使用模板,才展开五个紧凑下拉框:Brand、Style、Layout、Deck 各一个已注册工作区单选框,再加-一个本次运行指定地址单选框。每个下拉框都有“无”;四类已注册模板可跨类型-组合,指定地址最多选一个。已注册列表只来自四类索引,工作流不会扫描模板+一个本次运行指定地址单选框。每个下拉框都有“无”;完整选择可以跨类型组合,+四种 kind 均可参与,但每个 kind 最多一份。Layout 与 Deck 同时存在时由+Layout 提供结构。指定地址最多选一个,并原子携带+该 root 暴露的全部 kind。已注册列表只来自四类索引,工作流不会扫描模板目录。需要默认展开模板模式并预选某个 Brand/Style/Layout/Deck 工作区时,直接在对话里写出精确 root(位置不重要,只要明确即可):@@ -70,7 +74,7 @@ Stage-1 页面先让用户选择自由设计或使用模板;只有选择使用> "用上次那个模板:`projects/last_deck/`" ✅> "做一份产品介绍,模板用 `/Users/me/Desktop/our_brand_v3/`" ✅-对于当前所有模板类型,显式路径都是**模板工作区根目录**。若精确路径与索引中的注册 root 一致,页面可以把它显示为 `library`;未注册 root 则单独标为 `explicit`,并由服务端解析其 frontmatter 中的真实 `kind`。`explicit` 只是来源,不是第五种类型,也不提高优先级。Stage 1 会校验已选候选 root;确认后,Brand/Layout/Deck 安装其包自有 `templates/` 及真实存在的 `images/`、`icons/`,Style 只安装 spec,并忽略项目中无关的脚手架。如果工作区本来就是该项目根目录,则原地消费,并且始终不复制 `exports/`。Deck/Layout 还会校验 structured SVG 合同;Brand/Style 校验各自无 roster 的 spec。路径可以指向 `skills/ppt-master/templates/<kind>/<id>/` 下的内置库工作区、`projects/<name>/` 下的项目工作区,或其他保持同样路由的工作区。当前对话刚完成 Create Template 时,可把精确的已验证工作区根目录直接交给下一次 Stage-1 选择器。+对于当前所有模板类型,显式路径都是**模板工作区根目录**。若精确路径与索引中的注册 root 一致,页面可以把它显示为 `library`;未注册 root 则单独标为 `explicit`,并由服务端解析其中真实的限定名 spec。`explicit` 只是来源,不是第五种类型,也不提高优先级。Stage 1 会原子校验每个已选 root;确认后,每个不同 root 的 spec 和真实包自有 `images/`、`icons/` 只映射一次,并只安装有效结构 roster(有 Layout 时用 Layout,否则用 Deck),始终不复制 `exports/`。Deck/Layout root 会在应用优先级前各自校验 structured SVG 合同;Brand/Style 校验各自无 roster 的 spec。路径可以指向 `skills/ppt-master/templates/<kind>/<id>/` 下的内置库工作区、`projects/<name>/` 下的项目工作区,或其他保持同样路由的工作区。当前对话刚完成 Create Template 时,可把精确的已验证工作区根目录直接交给下一次 Stage-1 选择器。模板选择与 Stage 1 共用页面和提交动作,但仍作为独立 sidecar 决策保存。沟通推荐只使用当前请求、源材料事实、对话约束和项目初始化状态;候选元数据、@@ -114,9 +118,9 @@ Layout 工作区:skills/ppt-master/templates/layouts/presentation_core/模板工作区:projects/acme_template/```-在聊天中显式提供 root 时,“模板工作区”这些标签可以不写,但 root 必须精确;页面中的 library 选择已自带精确 root。页面中每个注册 kind 最多选一个,指定地址最多选一个;若指定地址解析出的 kind 与某个注册选择相同,工作流会进入既有的两份同类冲突解决门,不会静默替你选一个。+在聊天中显式提供 root 时,“模板工作区”这些标签可以不写,但 root 必须精确;页面中的 library 选择已自带精确 root。页面中每个注册 kind 最多选一个、指定地址最多选一个,并拒绝同 kind 重复。Layout 与 Deck 可以同时选择:Layout 拥有结构,Deck 保留其他片段。指定的多 kind root 必须整包选择,其已暴露的 kind 不能再从 library 重复选择。-你不需要选择模板使用模式。对 Layout/Deck,Strategist 会读取真实的 Master/Layout/原型集合和当前内容,决定选哪些页、哪些重复/跳过/重排,以及是否重组。Brand 只提供身份约束,Style 只提供方向/方法默认值;除非另一个工作区提供结构,否则两者都保持页面自由编排。如果你在意某个边界,直接在同一句请求里用普通语言说明即可,例如“封面和结束页原样保留,中间页由你选择”或“只参考视觉语言”;明确文字优先于 AI 判断。+你不需要选择模板使用模式。Strategist 会读取有效结构 roster(有 Layout 时用 Layout,否则用 Deck)和当前内容,决定选哪些页、哪些重复/跳过/重排,以及是否重组。Brand 只提供身份约束,Style 只提供方向/方法默认值;除非另一个工作区提供结构,否则两者都保持页面自由编排。如果你在意某个边界,直接在同一句请求里用普通语言说明即可,例如“封面和结束页原样保留,中间页由你选择”或“只参考视觉语言”;明确文字优先于 AI 判断。### 现有模板一览@@ -194,7 +198,7 @@ Strategist 会把方向拆成两个彼此独立的选择:| 字段 | 说明 ||------|------|-| **输出范围** | `library`(默认)或 `project`;两者使用相同的可移植工作区路由,只有 library 会进入全局索引 |+| **输出范围** | `library`(默认)或 `project`;两者使用相同 spec schema,但 library 在单 kind 目录使用裸 spec,project 在共享根使用限定名 spec || **目标项目** | 仅 `project` 必填;必须给出已初始化项目的精确路径 || **已选子工作流** | Create Brand / Create Style / Create Layout / Create Deck,由入口分派后固定 || **模板 ID** | 模板的可移植身份;在 `library` 下同时也是目录名 / 索引键。优先 ASCII slug,如 `acme_consulting`;中文品牌名也行,但要文件系统安全 |@@ -208,7 +212,7 @@ Strategist 会把方向拆成两个彼此独立的选择:确认后,工作流会回显一份完整简报并写入标记 `[TEMPLATE_BRIEF_CONFIRMED]`,从这一刻起后续步骤才会启动。**这是一个硬门——简报没确认,不会开始生成**。-无论选择哪种范围,第一次写最终文件前都会做一次完整预检:解析必需的 `templates/` 和实际需要的可选素材目录,要求 `templates/` 为空,并检查 `images/` 与 `icons/imported/` 中计划写入的位图和导入向量文件名没有冲突;只有明确要求审阅 PPTX 时才检查 `exports/`。项目范围还要求目标项目已经初始化。项目初始化时已存在的空脚手架目录可以保留且不会被算作模板产物;Create Template 不会为了保留空路径而新建可选目录。任一检查失败都会在写入前停止,不合并、不覆盖,也不会留下半套输出。+无论选择哪种范围,第一次写最终文件前都会做一次完整预检,解析 Design Spec 和全部真实素材目标。Library 范围要求 `templates/` 为空。Project 范围要求目标项目已初始化,并拒绝裸 spec、同 kind spec 或无效限定名集合;不同 kind 可以共存。新增 Deck 而项目已有 Layout 时,不改变 Layout roster;新增 Layout 而项目已有 Deck 时,先隔离校验,再原子替换 Deck 的结构载荷。两种范围都会在写入前拒绝位图、导入向量、审阅导出及其他计划目标冲突。已有空脚手架会原样保留,Create Template 不会只为保留空路径创建可选目录。任一检查失败都会在写入前停止且不覆盖。> 为什么这么严?无论模板进入全局库,还是只服务当前项目,它都是可复用的 ownership contract。先确认所拥有的片段和目标位置,并且只为 Layout/Deck 确认几何,可避免半成品或资产落错目录。@@ -230,13 +234,13 @@ Layout/Deck frontmatter 仍会记录 `replication_mode: standard|fidelity|mirror```bashpython3 skills/ppt-master/scripts/mirror_template_materialize.py \- "<import_workspace>" "<empty_template_workspace>"+ "<import_workspace>" "<template_workspace>"```它会先校验 IR manifest、不可变来源 hash、完整原生图谱、可见性事实和导入向量闭包,再原子发布按源顺序排列的 SVG roster 及`icons/imported/`、`images/` 素材。它不要求、也不会把按需生成的-`svg-flat/` 校验视图当成模板来源,并且不会生成 `design_spec.md`;设计角色必须针对物化后的 roster 编写该简报。+`svg-flat/` 校验视图当成模板来源,并且不会生成 Design Spec;设计角色必须针对物化后的 roster 写入已解析的 spec 路径。**Mirror 图谱边界**:mirror 保留完整且受支持的来源 Master/Layout 图谱。它为每张来源 Slide 输出一个完整原型,并为未被任何来源 Slide 使用的 Layout 额外输出一个定义专用的 `layout_<layout_key>.svg`。后者通过独立 Layout roster 注册进 PowerPoint,不会变成发布页面;其父 Master 也随之保留。预检只在必要来源事实或受支持几何缺失时停止,不会仅因 Layout 未使用而停止。@@ -251,7 +255,7 @@ python3 skills/ppt-master/scripts/mirror_template_materialize.py \| `library`(默认) | `skills/ppt-master/templates/<kind>/<id>/` | Create Brand/Create Style:不适用;Create Layout/Create Deck:单 Master 可选、多 Master 必须 | 校验后注册到对应 `brands_index.json`、`styles_index.json`、`layouts_index.json` 或 `decks_index.json` || `project` | `projects/<name>/` | 沿用同一套 kind-specific 审阅规则 | 跳过全局索引注册 |-全局注册会让模板出现在 Default Stage-1 模板控件中,也可在聊天中发现,因为两者都读取同一个索引。项目范围或精确交接则提供工作区 root,例如 `用这个模板:projects/<name>/`;这会默认展开模板模式,只提供一个 root 时页面会预选,多 root 保持未选候选,未注册 root 仍标记为 `explicit`。项目工作区也可以迁移或被其他工作区复用,因为核心结构完全一致;只有放进全局库并需要出现在 library 列表中时才执行注册。+全局注册会让模板出现在 Default Stage-1 模板控件中,也可在聊天中发现,因为两者都读取同一个索引。项目范围或精确交接则提供工作区 root,例如 `用这个模板:projects/<name>/`;这会默认展开模板模式,只提供一个 root 时页面会预选,多 root 保持未选候选,未注册 root 仍标记为 `explicit`。项目 root 可被其他项目直接复用,并原子贡献其中全部限定名 spec。要把其中一项移入单 kind 全局库,则保持 spec 内容不变,把它放到该库工作区的裸 `templates/design_spec.md` 路径后再注册。选择 Deck/Layout 模板后,Strategist 会自动生成页面/原型应用计划:可以使用全套或子集,重复或重排原型,并按内容需要重组。`strict` / `adaptive` 只作为内部导出值,不再出现在确认选项中。@@ -275,7 +279,7 @@ Master/Layout 行为以 Microsoft PowerPoint 为验收目标。Keynote、WPS 与### 派生后的模板工作区长什么样-全局库与项目范围使用相同的核心结构。把下面的 `<template_workspace>` 替换为 `skills/ppt-master/templates/<kind>/<id>/` 或 `projects/<name>/` 即可:+全局库与项目范围使用相同的 spec schema 和素材路由;库工作区用裸 spec,项目共享根则用限定名 spec。把下面的 `<template_workspace>` 替换为 `skills/ppt-master/templates/<kind>/<id>/` 或 `projects/<name>/` 即可:Brand 与 Style 只写 `templates/design_spec.md`(Brand 可带真实身份资产),不会生成下面的 SVG 或 `exports/` 行。@@ -307,13 +311,13 @@ Brand 与 Style 只写 `templates/design_spec.md`(Brand 可带真实身份资### 全局注册与项目放置- **全局库范围(`library`,默认)**把工作区写入 `skills/ppt-master/templates/<kind>/<id>/`,并完成全局注册。-- **项目范围(`project`)**把同一份可移植工作区写入 `projects/<name>/`,并跳过注册。+- **项目范围(`project`)**把限定名 spec 写入 `projects/<name>/templates/design_spec.<kind>.<id>.md` 并跳过注册,因此同一个项目根可以分多次积累四种 kind 各一份,并把整套 bundle 交给任何指向该 root 的项目。Layout 与 Deck 同时存在时,Layout 拥有有效 roster。项目范围不是私有或缩减格式。提供精确工作区根目录会把它加入 Step 3候选输入,并让 Stage 1 默认展开模板模式;只有该 root 是唯一输入时才会预选。-Brand/Layout/Deck 迁移 `templates/` 及真实的包自有 `images/`、`icons/`;-Style 只迁移 `templates/design_spec.md`,并忽略无关的项目脚手架。迁入全局库-后,再按对应 kind 执行注册,让发现索引反映新位置。+每个不同 root 只迁移一次:携带其暴露的全部限定名 spec 及真实包自有+`images/`、`icons/`,并只安装有效 Layout-or-Deck SVG roster;忽略无关项目脚手架和 `exports/`。+若把其中一项迁入全局库,应将其放入单 kind 库工作区并执行对应注册命令。---diff --git a/skills/ppt-master/references/artifact-ownership.md b/skills/ppt-master/references/artifact-ownership.mdindex 7728db83..de38385e 100644--- a/skills/ppt-master/references/artifact-ownership.md+++ b/skills/ppt-master/references/artifact-ownership.md@@ -43,7 +43,7 @@ history, or resumable planning state. Context loss restarts the Quick run.| `images/image_prompts.json`, `image_queries.json`, `image_sources.json` | Conditional resource contracts | AI/web 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 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/` | Project template reference | Stage-1-confirmed non-free selection or Quick direct-input installed specs, one file per selected workspace, the effective structural SVG roster (Layout when present, otherwise Deck), 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 the effective structural SVG roster; Brand and Style are intentionally roster-free, and Deck structure is shadowed when Layout is present. 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 |diff --git a/skills/ppt-master/references/strategist-template.md b/skills/ppt-master/references/strategist-template.mdindex 127971af..0d2d4360 100644--- a/skills/ppt-master/references/strategist-template.md+++ b/skills/ppt-master/references/strategist-template.md@@ -21,7 +21,7 @@ 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.<kind>.<id>.md`; for Layout/Deck only, also inspect the actual Page Roster and relevant SVG prototypes;+- every installed `design_spec.<kind>.<id>.md`; inspect the actual Page Roster and relevant SVG prototypes from Layout when present, otherwise from Deck;- 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.@@ -68,7 +68,7 @@ When the communication contract conflicts with the workspace, choose and state t> Internal note: `content_divergence` controls source reorganization; the AI-derived `template_reuse_scope` records the reused layer; `template_adherence` records whether a structured plan keeps or extends existing Layout identities.-**Template design precedence**: Explicit current user instructions and final confirmation win. Brand identity overrides Deck identity, Layout structure overrides Deck structure, and Deck retains only its non-overridden integrated segments plus reusable application context. Style owns Direction / method only: its color, typography, icon, and image values are candidate defaults and never override resolved Brand/Deck identity or become official facts. Preferred Mode / Visual Style values seed Stage 2; the Style overlay must resolve into the final single `mode` and `visual_style` lock rather than create a parallel narrative or aesthetic authority. Style takes this segment ahead of ordinary Stage-2 defaults; actual Deck prototypes and Signature facts remain compatibility constraints, not a second method owner. Library/explicit provenance never changes this order. Each of the three directions still carries six palette roles and complete fonts: repeat fixed Brand/Deck values with `typography.fixed: true`; adapt Style candidates to that identity and vary only open roles. Keep resolved icon and image constraints. Style Review Focus never activates [`visual-review`](../workflows/stages/visual-review.md); only an explicit user request does.+**Template design precedence**: Explicit current user instructions and final confirmation win. The installed set contains at most one contribution per kind, and all four kinds may coexist. Brand identity overrides Deck identity when both are present. Layout overrides only Deck structure; Deck still owns its reusable application context and any identity not overridden by Brand. Without Layout, Deck owns structure. Style owns Direction / method only: its color, typography, icon, and image values are candidate defaults and never override resolved Brand/Deck identity or become official facts. Preferred Mode / Visual Style values seed Stage 2; the Style overlay must resolve into the final single `mode` and `visual_style` lock rather than create a parallel narrative or aesthetic authority. Style takes this segment ahead of ordinary Stage-2 defaults; the active structural prototypes and Deck Signature facts remain compatibility constraints, not a second method owner. Library/explicit provenance never changes this order. Each of the three directions still carries six palette roles and complete fonts: repeat fixed Brand/Deck values with `typography.fixed: true`; adapt Style candidates to that identity and vary only open roles. Keep resolved icon and image constraints. Style Review Focus never activates [`visual-review`](../workflows/stages/visual-review.md); only an explicit user request does.---diff --git a/skills/ppt-master/references/template-designer.md b/skills/ppt-master/references/template-designer.mdindex 30807f2b..7daae93c 100644--- a/skills/ppt-master/references/template-designer.md+++ b/skills/ppt-master/references/template-designer.md@@ -4,20 +4,21 @@## Core Mission-Generate reusable structured page templates inside the workspace selected by Create Template's Create Layout or Create Deck child workflow, and write a concise `design_spec.md` that captures the source-derived rules that make the template reusable. For Deck, include descriptive recurring-application context; for Layout, keep structure brand-neutral and application-neutral.+Generate reusable structured page templates inside the workspace selected by Create Template's Create Layout or Create Deck child workflow, and write the resolved Design Spec that captures the source-derived rules that make the template reusable. For Deck, include descriptive recurring-application context; for Layout, keep structure brand-neutral and application-neutral.-> This is a standalone role: only triggered by the Create Layout or Create Deck child workflow under `/create-template`. Create Brand never invokes it. Library and project outputs use one workspace shape; this is not the template selection step in the main PPT generation pipeline.+> This is a standalone role: only triggered by the Create Layout or Create Deck child workflow under `/create-template`. Create Brand never invokes it. Library and project outputs share one spec schema and asset routing with scope-resolved spec filenames; this is not the template selection step in the main PPT generation pipeline.## Usage- **Trigger**: `/create-template` → Create Layout or Create Deck child workflow- **Workspace root**: `library` (default) → `skills/ppt-master/templates/<kind_dir>/<template_name>/`; `project` → the confirmed `<target_project>/`- **Template source**: `<template_workspace>/templates/` in both scopes+- **Design Spec**: use the parent-resolved `<design_spec_path>` — library `templates/design_spec.md`; project `templates/design_spec.<kind>.<id>.md`- **Input**: finalized template brief (output scope, target project when project-scoped, template ID, display name, kind, structural use cases or Deck application context, tone, theme mode, canvas format, optional reference assets, accepted basic template norms)-**Hard rule — scope is execution metadata**: Use `output_scope` and `target_project` to route files, but do not write either field into portable `design_spec.md` frontmatter. Do not create a new PPTX structure mode; deck/layout output declares `native_structure_mode: structured`.+**Hard rule — scope is execution metadata**: Use `output_scope` and `target_project` to route files, but do not write either field into `<design_spec_path>` frontmatter. Do not create a new PPTX structure mode; deck/layout output declares `native_structure_mode: structured`.-**Workspace precondition**: The workflow has already resolved the selected root, confirmed an empty `<template_workspace>/templates/`, and checked collision-free destination filenames in `images/` and `icons/imported/`. Check `exports/` when review was requested or the confirmed roster contains multiple Masters. Optional directories may be absent until their first real file is written. Project scope additionally requires an initialized target project. Do not begin final writes before that all-at-once preflight passes.+**Workspace precondition**: The workflow has already resolved `<design_spec_path>` and checked all destinations. Library `templates/` is empty. The active authoring root contains no bare spec, selected-kind spec, or SVG roster; unique qualified roster-free siblings may remain untouched. When the target project already has the other structural kind, the parent workflow supplies an isolated project-shaped authoring root and owns the later Layout-over-Deck atomic install. Check collision-free destinations in `images/`, `icons/imported/`, and `exports/` when applicable. Optional directories may be absent until their first real file is written. Project scope additionally requires an initialized target project. Do not begin final writes before that all-at-once preflight passes.When the workflow provides a PPTX reference source, the effective input package comes from the unified `pptx_template_import.py` preparation workspace and becomes:@@ -77,7 +78,7 @@ canonical `<g>` is one semantic atom after validation: it may remainSlide-local, serve as the one direct carrier of an `object` slot, or carryMaster/Layout fixed-layer ownership. This is the only `<g>` exception to thefixed-layer atomicity rule; ordinary groups remain forbidden there. Preset-paint comes from the confirmed brief and this template's `design_spec.md`+paint comes from the confirmed brief and `<design_spec_path>`color scheme. Do not copy an expanded import carrier/preview/fingerprintbundle into an authored template. `mirror` instead preserves the supportedexpanded lossless source representation. The exact syntax and validation@@ -100,7 +101,7 @@ Never silently drop or merge an identity, and never invent a carrier page.**Downstream boundary**: Stage 1 independently confirms the current communication contract. Strategist then inspects the installed prototypes, the Deck's descriptive application context, and the current content to author one application plan. It records `mirror`, `layout`, or `style` and, where applicable, `strict` or `adaptive` only as internal exporter values. Explicit user language overrides AI judgment, but the confirmation UI never asks the user to choose these implementation labels. Template_Designer does not preselect that project-level plan.-For `mirror`, `design_spec.md §V` must be followed by a `Source Preservation Map` that records each source slide's Master/Layout assignment and output file. The map is evidence of one-to-one preservation, not a design-decision log. `standard` and `fidelity` record only their newly authored output roster and structure; do not add a source-topology disposition table.+For `mirror`, `<design_spec_path> §V` must be followed by a `Source Preservation Map` that records each source slide's Master/Layout assignment and output file. The map is evidence of one-to-one preservation, not a design-decision log. `standard` and `fidelity` record only their newly authored output roster and structure; do not add a source-topology disposition table.---@@ -151,7 +152,7 @@ Extension page types beyond the canonical four (transition / appendix / disclaim- Choose variants from useful visual composition types such as two-column content, hero image, icon grid, data card, and quote- Keep only variants that add a genuinely useful authored composition; source Layout keys and repeated source chrome are not clustering inputs- Design each variant's Master/Layout/slot contract directly from its intended reusable behavior-- Record every emitted page in `design_spec.md §V Page Roster`; in library scope, `register_template.py` generates the corresponding index entry from `<template_workspace>/templates/*.svg`. Project scope skips registration+- Record every emitted page in `<design_spec_path> §V Page Roster`; in library scope, `register_template.py` generates the corresponding index entry from `<template_workspace>/templates/*.svg`. Project scope skips registration> Variants reuse the parent type's placeholder set — see §4 (Placeholder Reference) below.@@ -166,7 +167,7 @@ When the derived implementation writes `replication_mode: mirror`, materialize a- Required preservation: preserve source Master/Layout keys and picker names, Layout-to-Master parentage, slide assignments, placeholder type/index/bounds, supported native-object metadata, geometry, decoration, sprite-sheet wrappers, original example text, chart previews, fonts, effects, and paint order whenever the importer represents them.- Allowed normalization: add or normalize explicit root declarations and asset paths, and recursively expand fixed Master/Layout group wrappers into direct atoms. The mapping must remain one-to-one at the ownership level and must not change paint order or appearance.- Forbidden: commonality extraction, semantic synthesis, merging, splitting, promotion, demotion, renaming, re-parenting, decorative simplification, placeholder invention, or replacement of supported source-native metadata / SVG fallback with a model-authored approximation.-- `design_spec.md` §V Page Roster lists every emitted file and marks definition-only prototypes explicitly. `Source Preservation Map` records each source-slide assignment plus every unused Layout definition and its parent Master.+- `<design_spec_path>` §V Page Roster lists every emitted file and marks definition-only prototypes explicitly. `Source Preservation Map` records each source-slide assignment plus every unused Layout definition and its parent Master.**Mirror consumption boundary**: `replication_mode: mirror` describes source-to-workspace fidelity and only makes literal downstream reuse technically possible. Strategist independently derives the application plan from the current communication contract, content, actual prototype roster, and any explicit natural-language instruction. It may select, repeat, skip, reorder, or reorganize prototypes; no internal scope forces source page count, source order, or one output slide per source slide.@@ -333,7 +334,7 @@ treatment, or page roster); do not preserve a generic technical-rules heading.### 2. Inherit Design Specification-Templates must strictly follow the finalized template brief and the generated `design_spec.md`:+Templates must strictly follow the finalized template brief and the generated `<design_spec_path>`:- **Canvas dimensions**: `canvas_format` is not enough; root SVG `viewBox` matches `canvas_viewbox` in the design spec. Root `width` / `height` are optional compatibility attributes and are not PPT Master canvas authority.- **Source canvas**: when a PPTX/SVG reference is used, record `source_canvas_width`, `source_canvas_height`, and `source_viewbox`. If the output canvas differs from the source, normalize all geometry, typography, line heights, strokes, and image crop coordinates explicitly instead of relying on the shared aspect ratio.- **Color scheme**: Uses primary, secondary, and accent colors from the spec@@ -376,7 +377,7 @@ template.|---|---|---|| Lossless import SVG | Native-payload backing | Retain complete imported metadata, native object boundaries, hidden carriers, and source-scope identity. Keep it immutable and resolve it only through validated source refs. || Authoring IR bundle | Editable template-creation source | Omit opaque native payload and duplicate hidden carriers from model context; retain visible shape intent and stable document-local source refs. Models read `authoring_summary.json`; tools read `authoring_manifest.json` for source paths and initial hashes. |-| `standard` / `fidelity` output | Newly authored contract | Use editable basic primitives directly and `preset_shape_svg.py` compact canonical `<g>` output for exact preset matches. Keep faithful atoms independently composed when one contour is unnecessary; use `shape_boolean_svg.py` only where one compound closed contour must become an object, then allow a necessary freeform only if neither construction is faithful. Paint comes from the confirmed brief / `design_spec.md`. Reuse exported image/vector assets, not opaque source shape payload or source topology. |+| `standard` / `fidelity` output | Newly authored contract | Use editable basic primitives directly and `preset_shape_svg.py` compact canonical `<g>` output for exact preset matches. Keep faithful atoms independently composed when one contour is unnecessary; use `shape_boolean_svg.py` only where one compound closed contour must become an object, then allow a necessary freeform only if neither construction is faithful. Paint comes from the confirmed brief / `<design_spec_path>`. Reuse exported image/vector assets, not opaque source shape payload or source topology. || `mirror` output | Materialized preserved contract | Preserve currently supported imported metadata on unchanged Slide-local/slot refs, use the edited SVG fallback otherwise, and normalize fixed structural layers into semantic atoms. Strip IR-only source refs from final templates. |**Validation**: Mirror does not silently use stale metadata. Materialization@@ -456,7 +457,7 @@ Use clear placeholder markers for replaceable content:This is the **default vocabulary** used across template packages. Newly created templates SHOULD prefer these names so downstream projects find familiar slots; designers MAY substitute or extend them when a style genuinely needs different vocabulary (e.g. consulting decks lead with `{{KEY_MESSAGE}}` instead of `{{PAGE_TITLE}}`; a brand cover may need `{{BRAND_LOGO}}`).-`svg_quality_checker.py --template-mode` emits **advisory warnings** when a page lacks the conventional placeholder for its type. To silence those warnings — and document the template's actual contract — declare a `placeholders:` map in `design_spec.md` frontmatter:+`svg_quality_checker.py --template-mode` emits **advisory warnings** when a page lacks the conventional placeholder for its type. To silence those warnings — and document the template's actual contract — declare a `placeholders:` map in `<design_spec_path>` frontmatter:```yamlplaceholders:@@ -517,6 +518,7 @@ Standard mode (default):<template_workspace>/├── templates/│ ├── design_spec.md+│ │ # project scope uses design_spec.<kind>.<id>.md instead│ ├── 01_cover.svg│ ├── 02_toc.svg # Optional; without it: 02_chapter, 03_content, 04_ending│ ├── 03_chapter.svg@@ -535,7 +537,7 @@ Fidelity mode changes only the roster under `templates/`, e.g.:```<template_workspace>/templates/-├── design_spec.md+├── design_spec.md # project scope: design_spec.<kind>.<id>.md├── 01_cover.svg├── 02_toc.svg├── 03a_chapter_full.svg@@ -551,7 +553,7 @@ Mirror mode emits one SVG per source slide, named by source order:```<template_workspace>/templates/-├── design_spec.md+├── design_spec.md # project scope: design_spec.<kind>.<id>.md├── 001_cover.svg├── 002_toc.svg├── 003_content.svg@@ -565,7 +567,7 @@ Mirror mode emits one SVG per source slide, named by source order:Filenames preserve the source slide order via the 3-digit prefix; `<page_type>` is derived from `manifest.json` `pageTypeCandidates`. Literal source text and validated native structure facts are preserved when the authoring IR is materialized into the new workspace; IR-only refs and its manifest are not copied into the template output.-**Hard rule — common routing**: Keep `design_spec.md`, template SVGs, and non-bitmap template-source assets in `templates/`; place every bitmap in `images/`; place each imported vector exactly once in `icons/imported/` and reference it as `data-icon="imported/<name>"`. Never create `templates/icons/`. Write a review deck to `exports/` when explicitly requested and always for a multi-Master package gate. Create Template must not create optional directories or placeholder files solely to retain empty paths. An initialized project may already contain empty scaffolding; leave it untouched and omit it from completion unless real template files were written or adopted there. Do not branch asset placement by output scope.+**Hard rule — common routing**: Keep `<design_spec_path>`, template SVGs, and non-bitmap template-source assets in `templates/`; place every bitmap in `images/`; place each imported vector exactly once in `icons/imported/` and reference it as `data-icon="imported/<name>"`. Never create `templates/icons/`. Write a review deck to `exports/` when explicitly requested and always for a multi-Master package gate. Create Template must not create optional directories or placeholder files solely to retain empty paths. An initialized project may already contain empty scaffolding; leave it untouched and omit it from completion unless real template files were written or adopted there. Do not branch asset placement by output scope.### Template Preview@@ -617,7 +619,7 @@ templates/- [x] Read `references/template-designer.md`- [x] Output scope confirmed: `library` | `project`; the common workspace preflight passed before final writes- [x] Internal creation strategy derived from the confirmed natural-language intent: `standard` | `fidelity` | `mirror`; Layout mirror source is already brand-neutral and application-neutral-- [x] Every page listed in `design_spec.md §V Page Roster` saved to `<template_workspace>/templates/`+- [x] Every page listed in `<design_spec_path>` §V Page Roster saved to `<template_workspace>/templates/`- [x] Naming convention applied (standard / fidelity: letter-suffix variants; mirror: `<NNN>_<page_type>.svg`)- [x] Templates follow design spec (colors, fonts, layout)- [x] Deck Template Overview and factual Page Roster describe the recurring application and actual prototypes without mandatory use policy; Layout output contains no application or identity contract@@ -625,7 +627,7 @@ templates/- [x] Placeholder markers are clear and standardized for `standard` / `fidelity`; preview-only sample text remains readable without changing source markers, while mirror preserves literal source text plus source placeholder type/index/bounds- [x] Every SVG is a complete preview with explicit root Master/Layout identity and `native_structure_mode: structured`; authored modes use canonical fixed layers/slots, while mirror preserves source ownership and mechanically expands fixed-layer groups into direct atoms- [x] Authored `standard` / `fidelity` Layout keys are non-duplicative; mirror keeps distinct source Layout identities even when their current visible contracts are equivalent-- [x] Template creation used the authoring IR; lossless expanded imports remained immutable payload backing for mirror materialization, while `standard` / `fidelity` used helper-generated compact canonical preset groups and `design_spec.md` paint+- [x] Template creation used the authoring IR; lossless expanded imports remained immutable payload backing for mirror materialization, while `standard` / `fidelity` used helper-generated compact canonical preset groups and `<design_spec_path>` paint- [x] Both scopes route bitmaps to `images/` and keep one canonical copy of every imported vector under `icons/imported/`- [ ] **Next step**: Validate assets, export review evidence when requested or required for multiple Masters, then register only library scope```diff --git a/skills/ppt-master/scripts/README.md b/skills/ppt-master/scripts/README.mdindex 2329639d..baea843d 100644--- a/skills/ppt-master/scripts/README.md+++ b/skills/ppt-master/scripts/README.md@@ -114,7 +114,7 @@ python3 scripts/pptx_template_import.py <template.pptx> --inheritance-mode bothpython3 scripts/svg_authoring_view.py <imported-svg-or-dir> -o <output-dir> --projection-kind layeredpython3 scripts/svg_authoring_view.py <authoring-dir> --refresh-summarypython3 scripts/compact_svg_coordinates.py <template_workspace>/templates --inplace --keep-native-frames-python3 scripts/mirror_template_materialize.py <import_workspace> <empty_template_workspace>+python3 scripts/mirror_template_materialize.py <import_workspace> <template_workspace>python3 scripts/template_preview_pptx.py <template_workspace>python3 scripts/template_preview_pptx.py <legacy_template_workspace> --visual-only```@@ -167,7 +167,7 @@ go to `images/`; other referenced source assets go to `templates/assets/`.The destination must be empty, and the command does not write`templates/design_spec.md`; Template_Designer owns that authored brief.-`template_preview_pptx.py` reads a template workspace, exports every public `templates/*.svg` prototype as one structured review slide, and verifies the resulting Master/Layout package. Canonical definition-only `layout_<layout_key>.svg` prototypes are registered as reusable Layouts through internal carrier slides that are removed before publication; they never increase the review deck's visible slide count. This is an on-demand review action: its default output is `exports/<template_id>_template_preview.pptx`, and that directory need not exist before the command runs. It refuses an existing output unless an intentional re-export passes `--force`. `--visual-only` is an explicit migration aid for legacy SVG rosters: it creates a slide-local visual review deck without validating or claiming a reusable Master/Layout contract. This diagnostic path does not require a project `spec_lock.md`; it may retain generic theme/text defaults inside its clean one-Master/one-Layout shell. New structured templates use the default mode when a review deck is requested.+`template_preview_pptx.py` reads a template workspace, exports every public `templates/*.svg` prototype as one structured review slide, and verifies the resulting Master/Layout package. In a project root containing Layout and Deck specs, it previews the active Layout roster. Canonical definition-only `layout_<layout_key>.svg` prototypes are registered as reusable Layouts through internal carrier slides that are removed before publication; they never increase the review deck's visible slide count. This is an on-demand review action: its default output is `exports/<template_id>_template_preview.pptx`, and that directory need not exist before the command runs. It refuses an existing output unless an intentional re-export passes `--force`. `--visual-only` is an explicit migration aid for legacy SVG rosters: it creates a slide-local visual review deck without validating or claiming a reusable Master/Layout contract. This diagnostic path does not require a project `spec_lock.md`; it may retain generic theme/text defaults inside its clean one-Master/one-Layout shell. New structured templates use the default mode when a review deck is requested.Template fill (direct PPTX, no SVG conversion):@@ -275,7 +275,7 @@ python3 scripts/extract_svg_assets.py <layered_svg_dir> --icons-dir <icons_dir>python3 scripts/extract_svg_assets.py <flat_svg_dir> --icons-dir <icons_dir> --icon-namespace imported --reuse-inventory <layered_inventory.json> --inplace --id-prefix flatpython3 scripts/extract_svg_pictures.py "<svg_file>" --select "<group_id>" --resource-root "<workspace>" --images-dir "<picture_assets_dir>" --inplace # optional create-template normalization: one selected group -> one SVG picturepython3 scripts/compact_svg_coordinates.py <template_workspace>/templates --inplace --keep-native-frames-python3 scripts/mirror_template_materialize.py <import_workspace> <empty_template_workspace> # Type A mirror only+python3 scripts/mirror_template_materialize.py <import_workspace> <template_workspace> # Type A mirror only; destination owns no roster````extract_svg_assets.py` fingerprints each extracted subtree before generated-IDdiff --git a/skills/ppt-master/scripts/docs/confirm_ui.md b/skills/ppt-master/scripts/docs/confirm_ui.mdindex 9367f955..34c93001 100644--- a/skills/ppt-master/scripts/docs/confirm_ui.md+++ b/skills/ppt-master/scripts/docs/confirm_ui.md@@ -118,7 +118,7 @@ python3 scripts/confirm_ui/server.py <project_path> --shutdown # Step 4 clean- Confirm UI and live preview prefer the same memorable base port but keep separate processes and project-local locks (`.confirm_ui.lock` vs `live_preview/lock.json`). Normal Step 4 cleanup releases the confirm port before Step 6; concurrent projects may use different ports.- `--daemon` starts the Flask process in the background and returns after the health check. Every Default UI run launches directly into combined Stage 1 and keeps the same process live through final Stage 2. The wait budget defaults to **590 s** (`--wait-timeout`); on timeout the detached server remains live, and the caller re-checks both Stage-1 receipts before chat fallback.- `--wait-only` attaches to the page opened by `--daemon` and blocks until the requested receipt. If it is already persisted, the command returns before recovery, so a fast submit between launch, chat handoff, and wait is not lost. Otherwise, if the recorded server died, it restarts on the recorded/default port. Use `stage1` for the combined communication/template submission and the default/final wait for Stage 2.-- `--complete-template-selection` is agent-only. It validates the Stage-1 sidecar and writes the bound `template_handoff.json`; template mode additionally requires project-local `templates/design_spec.md`. Run it after installation/free-design closure and before writing Stage 2. `--reset-template-selection` removes exactly `template_options.json`, `template_selection.json`, and `template_handoff.json`; it does not alter Strategist files, installed template content, or `result.json`. The old `--*-template-phase` names are not aliases.+- `--complete-template-selection` is agent-only. It validates the Stage-1 sidecar and writes the bound `template_handoff.json`; template mode additionally requires at least one project-local `templates/design_spec.<kind>.<id>.md`. Run it after installation/free-design closure and before writing Stage 2. `--reset-template-selection` removes exactly `template_options.json`, `template_selection.json`, and `template_handoff.json`; it does not alter Strategist files, installed template content, or `result.json`. The old `--*-template-phase` names are not aliases.- `--shutdown` stops a confirm server left running for this project and exits — **idempotent** (a no-op when nothing is running). Tries a graceful `/api/shutdown`, falls back to killing the recorded pid, then clears the lock. Generate Step 4 runs this on every path so the selected port is released before live preview starts.- Every fresh UI run starts with `--reset-template-selection`, then writes valid `<project_path>/confirm_ui/template_options.json` and a newer `recommendations.stage1.json`; `explicit_workspace_roots` is an empty array when no exact root was supplied. Stage 1 writes the bound selection and communication result together. Stage 2 is exposed only when the matching handoff is newer than that selection and its recommendation is newer than the handoff. `--shutdown` needs neither input.- Per-project lock at `<project_path>/.confirm_ui.lock` — duplicate launches are refused; stale locks (dead pid) are overwritten.@@ -165,8 +165,10 @@ separate artifact from the Strategist contract. Its files live underOrdinary requests use `free_design`; explicit template intent or any suppliedexact root uses `templates`. It initializes the UI but never locks the user.- `explicit_workspace_roots` is required even when empty. Every item is a- unique absolute path resolving to an existing directory with- `templates/design_spec.md` or compatible legacy `design_spec.md`.+ unique absolute path resolving to an existing directory with a library+ `templates/design_spec.md`, one or more project-qualified+ `templates/design_spec.<kind>.<id>.md`, or compatible legacy+ `design_spec.md`.- The array supplies candidates for the one specified-root dropdown; it doesnot authorize selecting several explicit roots in one confirmation.- Do not write library entries into this file. The server reads only@@ -222,10 +224,11 @@ candidate controls: Brand, Style, Layout, and Deck each have one registeredsingle-select dropdown, and Specified has one explicit-root single-selectdropdown. Every dropdown includes `None`; template mode cannot submit until atleast one is non-empty. Free design clears all dropdowns. Registered kinds may-be combined, but each contributes at most one root and the specified channel at-most one. Because an explicit candidate carries its parsed kind, it may coexist-with one registered root of that kind and enter the two-workspace same-kind-conflict gate. Source provenance never grants priority.+be combined, and the complete selection contains at most one contribution per+kind. Layout and Deck may coexist; Layout takes structural precedence. The specified channel contributes at+most one root, selected atomically with every kind it exposes; it can coexist+only with registered roots of non-overlapping kinds. Source provenance never+grants priority.### Output — `template_selection.json` (written with Stage 1)@@ -258,23 +261,27 @@ conflict gate. Source provenance never grants priority.at least one selection. Roots are unique canonical absolute paths. A libraryselection contains exactly `source`, `kind`, `id`, and `workspace_root`; anexplicit selection contains exactly `source`, `kind`, and `workspace_root`.-There is at most one library selection per kind and at most one explicit-selection overall; cross-kind composition remains valid, and one explicit plus-one library selection may share a kind. The browser-cannot submit arbitrary paths because the server resolves posted keys against-the catalog it just built. `options_sha256` binds the receipt to the current-input, four index files, and resolved candidates. `selection_sha256` binds the-mode and canonical sorted selections to that option hash. Every receipt read-rebuilds the catalog and rejects option/index drift.+There is at most one explicit workspace **root** overall. The unit of choice is+the root, not the kind: the browser's specified-path control lists roots, and+selecting one emits a selection for every kind that root exposes. Across those+emitted selections and all library choices, each kind appears at most once.+Layout and Deck may coexist; downstream installation gives Layout structural+precedence. The browser cannot submit arbitrary paths+because the server resolves posted keys against the catalog it just built.+`options_sha256` binds the receipt to the current input, four index files, and+resolved candidates. `selection_sha256` binds the mode and canonical sorted+selections to that option hash. Every receipt read rebuilds the catalog and+rejects option/index drift or an incomplete explicit-root bundle.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 completeproject-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 never-reads the source roots.+handoff below. Installation validates and maps each distinct root once while+preserving its separate specs; Stage 2 resolves segment ownership and+current-project fit from the installed set. Strategist never reads the source+roots.### Agent handoff — `template_handoff.json`diff --git a/skills/ppt-master/scripts/docs/svg-pipeline.md b/skills/ppt-master/scripts/docs/svg-pipeline.mdindex 69ac2f9d..301fe117 100644--- a/skills/ppt-master/scripts/docs/svg-pipeline.md+++ b/skills/ppt-master/scripts/docs/svg-pipeline.md@@ -368,7 +368,7 @@ template after the layered authoring IR has been reviewed and edited:```bashpython3 scripts/mirror_template_materialize.py \- <import_workspace> <empty_template_workspace>+ <import_workspace> <template_workspace>```The command treats `<import_workspace>/authoring-svg/` as the sole editable@@ -376,8 +376,13 @@ source. It reads the tool-only layered authoring manifest internally andvalidates it against immutable lossless SVGhashes, source PPTX hash, complete Master/Layout/Slide graph, inheritancevisibility facts, source-ref closure, and extracted-vector inventory before it-writes anything. It refuses a non-empty destination and stages the whole result-before atomic publication, so a failed preflight cannot leave a partial+writes anything. It accepts an absent/empty destination or a project+`templates/` containing unique qualified Brand/Style specs plus, for a+Layout-over-Deck transition, one qualified Deck spec with no staged roster. A+bare spec, active structural roster, SVG, Layout spec, or other template payload blocks direct+materialization; Create Template uses its isolated transition workspace when a+new Layout or Deck must be composed with the other structural kind. It stages the whole+result before atomic publication, so a failed preflight cannot leave a partialtemplate.Materialization preserves source page order and emits one definition-onlydiff --git a/skills/ppt-master/scripts/prompt_audit_manifest.json b/skills/ppt-master/scripts/prompt_audit_manifest.jsonindex 21109074..a667df48 100644--- a/skills/ppt-master/scripts/prompt_audit_manifest.json+++ b/skills/ppt-master/scripts/prompt_audit_manifest.json@@ -1349,7 +1349,7 @@},{"kind": "exact",- "fingerprint": "99d8baf1be58",+ "fingerprint": "272bdc60fa52","paths": ["skills/ppt-master/workflows/create-template/create-brand.md","skills/ppt-master/workflows/create-template/create-style.md"diff --git a/skills/ppt-master/templates/README.md b/skills/ppt-master/templates/README.mdindex f39416f3..dfbb3dcc 100644--- a/skills/ppt-master/templates/README.md+++ b/skills/ppt-master/templates/README.md@@ -49,11 +49,13 @@ specified candidates. Ordinary requests default to free design; explicittemplate intent or any supplied root defaults to template mode. Exactly one rootmay be preselected, while multiple roots remain unselected candidates. The usercan always switch modes. The page accepts one registered choice per kind plus-one supplied-root choice. A registered exact root is `library`; any other exact-root is `explicit`. After that combined confirmation,+one supplied-root choice, but the complete selection contains at most one+contribution per kind. All four kinds may combine; Layout owns structure when+both Layout and Deck are present. A supplied multi-kind root is atomic. A registered exact root is `library`; any other exact root is+`explicit`. After that combined confirmation,[`apply-template-workspace`](../workflows/stages/apply-template-workspace.md)-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 from+validates and maps every distinct selected root once, preserving each+contribution as `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.@@ -79,28 +81,32 @@ initialized project:```text<template_workspace>/-├── templates/ # design_spec.md; optional Layout/Deck SVG prototypes and native_payloads.json.gz store+├── templates/ # the Design Spec (naming below); optional Layout/Deck SVGs and native_payloads.json.gz store├── images/ # optional bitmaps├── icons/│ └── imported/ # optional imported vectors, one canonical copy└── exports/ # optional review evidence; never a template input```+**Hard rule — the container disambiguates, the filename carries the rest**: one+schema serves both layers. A library root keeps `templates/design_spec.md`, since+`<kind_dir>/<template_id>/` already names its kind and id. A project root shares+one flat `templates/`, so it keeps one `design_spec.<kind>.<id>.md` per kind;+filename kind/id MUST equal frontmatter `kind`/`<kind>_id`. The shapes never+mix. One `templates/`+holds one active SVG roster: Layout when present, otherwise Deck. Both specs may+coexist because Layout overrides only Deck structure. Either shape is a+workspace root, and selecting it takes every kind it exposes.+Empty optional directories are omitted. Template SVGs reference bitmaps through`../images/<name>` and imported vectors through `data-icon="imported/<name>"`.-Style narrows this shared routing shape to `templates/design_spec.md` only and-does not carry asset or review payloads; initialized-project sibling scaffolding-may exist but is not Style input.-The conditional [`apply-template-workspace`](../workflows/stages/apply-template-workspace.md)-stage owns installation after a non-free Default Stage-1 selection or-on 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 kind-ignores `exports/`. Compatible legacy-flat Brand/Layout/Deck packages remain-readable; Style has no legacy-flat form, and directory shape alone does not-indicate legacy Master/Layout semantics. Default Strategist, Quick's current-agent, and all later consumers use the installed project-local files, never the-original library or explicit root.+Style contributes only its own Design Spec and no asset or review payload;+sibling scaffolding and other kinds' files are not Style input.+Every kind ignores `exports/`. The conditional+[`apply-template-workspace`](../workflows/stages/apply-template-workspace.md)+stage owns the rest: when installation runs, which roots each kind consumes,+legacy-flat readability, and the boundary that every later consumer reads the+installed project-local files rather than the original root.## Design specification referencesdiff --git a/skills/ppt-master/templates/brands/README.md b/skills/ppt-master/templates/brands/README.mdindex 924f9e91..00029d84 100644--- a/skills/ppt-master/templates/brands/README.md+++ b/skills/ppt-master/templates/brands/README.md@@ -19,7 +19,7 @@ specific 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, per-workspace spec naming,-same-kind conflict resolution, and provenance after Stage 1 and before Stage 2. Template-aware+selection-conflict rejection, 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 andotherwise uses free design.diff --git a/skills/ppt-master/templates/styles/README.md b/skills/ppt-master/templates/styles/README.mdindex 20d2a68e..fa6caef0 100644--- a/skills/ppt-master/templates/styles/README.md+++ b/skills/ppt-master/templates/styles/README.md@@ -35,7 +35,7 @@ installed copy before authoring flat pages.| Current project communication contract, mode, visual style, palette, typography, images, and icons | Latest explicit user instruction and confirmed project values || Exact identity values | Brand, then Deck identity; both override overlapping Style fallback values || Reusable communication method and evidence discipline | Style, applied only where compatible with the current project contract |-| Reusable structure | Compatible Layout, then Deck structure; Style never supplies structure |+| Reusable structure | Layout when present, otherwise Deck; Style never supplies structure || Recurring application context | Deck, subordinate to the current project's Stage-1 communication contract |Style fallback values seed the final Stage-2 solution when the corresponding decision remains open. They are not identity truth and do not bypass confirmation. If a Style method and a Deck application contract materially conflict, surface the mismatch; do not silently weaken either one.diff --git a/skills/ppt-master/workflows/create-template.md b/skills/ppt-master/workflows/create-template.mdindex 161bbcfc..0ad0a80f 100644--- a/skills/ppt-master/workflows/create-template.md+++ b/skills/ppt-master/workflows/create-template.md@@ -12,9 +12,9 @@ Create one reusable template workspace under either the **global template librar**Default — library scope**: Write `skills/ppt-master/templates/<kind_dir>/<template_id>/` and register it in the matching discovery index.-**Project scope**: Write the same portable workspace routing at `<project>/` and do not register any global index.+**Project scope**: Write the same portable workspace routing at `<project>/` and do not register any global index. That project root stays an ordinary referenceable workspace root, and its `templates/` may accumulate one Brand, Style, Layout, and Deck over separate runs. When Layout and Deck coexist, Layout owns the active SVG roster; Deck retains identity and reusable application context.-**Hard rule — one workspace routing contract**: Output scope changes only the workspace parent and index registration. Both scopes use required `templates/`, optional `images/` / `icons/`, and optional on-demand `exports/`, with the same relative asset references and validation command. Create Template must not create an optional directory or placeholder file solely to retain an empty path. An initialized project may already contain empty `images/`, `icons/`, or `exports/` scaffolding; leave it untouched, do not count it as template output, and omit the path from completion unless this workflow wrote or adopted a real file there. Do not maintain a library-only self-contained-flat package branch or a project-only thin-bundle branch.+**Hard rule — one workspace routing contract**: Output scope changes the workspace parent, Design Spec filename placement, and index registration—not the spec schema or asset routes. Both scopes use required `templates/`, optional `images/` / `icons/`, and optional on-demand `exports/`, with the same relative asset references and validation command. Create Template must not create an optional directory or placeholder file solely to retain an empty path. An initialized project may already contain empty `images/`, `icons/`, or `exports/` scaffolding; leave it untouched, do not count it as template output, and omit the path from completion unless this workflow wrote or adopted a real file there. Do not maintain a library-only self-contained-flat package branch or a project-only thin-bundle branch.> **Boundary against template-fill and in-place structure edits**: Create Template does not fill content into a PPTX, add Master/Layout structure to an existing PPTX/SVG, or directly output the user's final generated deck. It authors a separate reusable workspace; an optional PPTX is review evidence only. To generate a deck, return the workspace root as an exact candidate to [`generate-pptx`](./generate-pptx.md) Step 3, confirm it with Stage 1, then author new SVG pages from the installed state. A project-scoped workspace selected for its own project is consumed in place after that confirmation.@@ -45,36 +45,38 @@ workspace model. Downstream template application and installation remain owned bOutput scope is a shared Create Template execution choice, not a new template kind or PPTX structure mode. Surface it in the Step 2 brief; do not invent a CLI flag or persist `output_scope` / `target_project` into portable `design_spec.md` frontmatter.-| Scope | `<template_workspace>` | Template source | Registration |+| Scope | `<template_workspace>` | `<design_spec_path>` | Registration ||---|---|---|---|-| `library` (default) | `skills/ppt-master/templates/<kind_dir>/<template_id>/` | `<template_workspace>/templates/` | Run `register_template.py` against the matching global index |-| `project` | `<target_project>/` | `<template_workspace>/templates/` | Do not update any global index |+| `library` (default) | `skills/ppt-master/templates/<kind_dir>/<template_id>/` | `<template_workspace>/templates/design_spec.md` | Run `register_template.py` against the matching global index |+| `project` | `<target_project>/` | `<template_workspace>/templates/design_spec.<kind>.<id>.md` | Do not update any global index |++**Design Spec naming**: follow [`templates/README.md`](../templates/README.md): `library` writes `templates/design_spec.md`; `project` writes `templates/design_spec.<kind>.<id>.md`, whose kind/id MUST equal frontmatter `kind`/`<kind>_id`. One project root carries at most one spec per kind and later contributes every exposed kind.Both scopes write this contract:```text<template_workspace>/-├── templates/ # design_spec.md; Create Layout/Create Deck also write SVGs+├── templates/ # library: design_spec.md; project: one qualified spec per kind plus the effective Layout-or-Deck SVG roster├── images/ # optional; every bitmap; SVG href is ../images/<name>├── icons/│ └── imported/ # optional; one canonical copy of imported vector assets└── exports/ # conditional; required package evidence for multi-Master templates```-Create Style narrows the shared root to `templates/design_spec.md` only. It+Create Style narrows its contribution to the resolved `<design_spec_path>`. Itdoes not write or adopt images, icons, native payloads, or review exports;pre-existing empty project scaffolding remains untouched and is not Styleoutput.-The review PPTX is derived evidence, not a source template asset. Create `exports/` only when a review deck is requested or the template declares more than one Master; multi-Master templates require the package-level gate in Step 6. Brand/Layout/Deck application reads `templates/` plus any package-owned `images/` and `icons/`; Style reads only `templates/design_spec.md`. No kind copies or consumes `exports/`. Library `exports/` directories are Git-ignored.+The review PPTX is derived evidence, not a source template asset. Create `exports/` only when a review deck is requested or the template declares more than one Master; multi-Master templates require the package-level gate in Step 6. Brand/Layout/Deck application reads `templates/` plus any package-owned `images/` and `icons/`; Style reads only its resolved Design Spec. No kind copies or consumes `exports/`. Library `exports/` directories are Git-ignored.For `project`, `target_project` is required and must be an existing project initialized by `project_manager.py init`. Before the first final-output write, run one complete preflight. Apply the same collision checks to a library workspace; the only difference is that its root is under the global kind directory:1. Resolve `<template_workspace>` from the confirmed scope and confirm its required `templates/` destination plus any needed `images/` / `icons/` destinations.-2. Confirm `<template_workspace>/templates/` is empty.+2. For `library`, confirm `<template_workspace>/templates/` is empty. For `project`, reject a bare `design_spec.md`, any existing spec of the selected kind, or any invalid qualified-name set. All distinct kinds may coexist. Resolve active structure before writing: Layout when present, otherwise Deck. Adding Deck beside Layout leaves the Layout roster untouched; adding Layout beside Deck atomically replaces the active Deck structural payload only after the new Layout passes isolated validation.3. Resolve every final bitmap and extracted-vector filename, then confirm none would overwrite an existing file in `images/` or `icons/imported/`. Check the review-PPTX destination when preview export was requested or a multi-Master template was confirmed.-Any failed check aborts before writing `design_spec.md`, SVGs, images, icons, or the review PPTX. Do not merge into a non-empty template source and do not overwrite a name conflict. Temporary Step 1 analysis workspaces remain allowed because they are not final outputs.+Any failed check aborts before writing the Design Spec, SVGs, images, icons, or the review PPTX. A library source remains empty-before-write; a project source preserves every non-conflicting sibling kind and replaces only a lower-priority Deck structural payload when a validated Layout takes ownership. Never overwrite an unrelated name conflict. Temporary analysis and structural-transition workspaces remain allowed because they are not final outputs.## Process Overview@@ -122,7 +124,7 @@ below are Create Layout/Create Deck concerns.Type A is the canonical mirror path: `manifest.json`, `native_structure.json`, layered lossless `svg/`, and inheritance facts describe the native structure that still exists in the PPTX package. Optional `svg-flat/` files are complete-page verification views, never structure authority. In `standard` / `fidelity`, imported facts and visuals do not define output topology.-**Type B source normalization**: when the supplied root contains `templates/design_spec.md`, use `<input>/templates/` as the SVG/spec source and resolve its workspace assets from sibling `<input>/images/` and `<input>/icons/`. Otherwise, use the supplied directory itself as the legacy-flat/loose SVG source. Directory flatness is not a semantic-structure signal.+**Type B source normalization**: when the supplied root exposes any `templates/` Design Spec, use `<input>/templates/` as the SVG/spec source and resolve its workspace assets from sibling `<input>/images/` and `<input>/icons/`. Otherwise, use the supplied directory itself as the legacy-flat/loose SVG source. Directory flatness is not a semantic-structure signal.Type B is supported with caveats:@@ -189,7 +191,7 @@ After any other direct IR edit, refresh it before the next analysis pass:python3 skills/ppt-master/scripts/svg_authoring_view.py "<import_workspace>/authoring-svg" --refresh-summary```-`authoring-svg/` is the canonical editable IR for template creation. The lossless trees are read only by materialization when an unchanged referenced object needs supported native payload or fallback evidence. Do not edit or copy the lossless SVGs directly. The IR is not a finished template directory and must be materialized into validated `<template_workspace>/templates/*.svg` before preview or export.+`authoring-svg/` is the canonical editable IR for template creation. The lossless trees are read only by materialization when an unchanged referenced object needs supported native payload or fallback evidence. Do not edit or copy the lossless SVGs directly. The IR is not a finished template directory and must be materialized into the active authoring workspace's validated `templates/*.svg` before preview or export.For a Type A `mirror`, final materialization is owned by`mirror_template_materialize.py`; never assemble the structured output by@@ -404,7 +406,7 @@ Compose one concise natural-language proposal that states the template the AI in| Field | Must show ||---|---|-| Output scope | Recommended `library` (default) plus `project`; explain that both use the same portable workspace routing and only the parent path / global registration differ |+| Output scope | Recommended `library` (default) plus `project`; explain that both use the same spec schema and asset routing, while parent path, spec filename placement, and global registration differ || Target project | Required only for `project`; show the exact initialized project workspace path, not a project nickname || Selected child workflow | Echo the already-dispatched Create Brand, Create Style, Create Layout, or Create Deck workflow; do not reopen kind selection inside the brief || Method and direction | Create Style only. Summarize the portable communication method, evidence discipline, page-role vocabulary, information design, visual defaults, image/icon direction, and advisory review focus. Do not include a current audience/outcome, page order/count, canvas, or prototype plan. |@@ -420,7 +422,7 @@ Items to surface:| Item | Required | Provenance by evidence channel ||------|----------|--------------------------|-| Output scope | Yes | `[decision]` — `library` (default, globally reusable and indexed) or `project` (same portable workspace routing under one initialized project) |+| Output scope | Yes | `[decision]` — `library` (default, globally reusable and indexed) or `project` (qualified Design Spec under one initialized shared project root) || Target project | Yes for `project`; N/A for `library` | `[decision]` — explicit path to the initialized target workspace; validate it during the Step 4 preflight || New template ID | Yes | `[decision]` when supplied; otherwise propose a filesystem-safe ASCII slug as `[suggested]`. In library scope it also becomes the matching index key || Template display name | Yes | `[decision]` when supplied; otherwise `[suggested]`, often from `manifest.json.source.name` for type A |@@ -453,7 +455,7 @@ When the bundle includes Type A for Create Layout/Create Deck, also include in tThe user replies with corrections, additions, or "all good".-> **Persist the portable brief into `design_spec.md`**. In Step 4, declare a YAML frontmatter block with the child-specific ID key (`brand_id`, `style_id`, `deck_id`, or `layout_id`) and only fields owned by that child. Create Brand follows its identity schema. Create Style persists only `style_id`, `kind`, `summary`, and `keywords`; its method and direction live in the required body sections, and it writes no canvas, category, identity, application, replication, native-structure, page-count, or roster fields. Create Layout/Create Deck persist the confirmed portable fields (`kind`, `category`, `summary`, `keywords`, `primary_color` for deck, `page_types` for layout, `canvas_format`, `canvas_width`, `canvas_height`, `canvas_viewbox`, `source_viewbox`, `replication_mode`, `native_structure_mode`, etc.). `replication_mode` is the AI-derived implementation record, not a user selection. A Deck writes descriptive application context in Template Overview and factual prototype descriptions in Page Roster rather than duplicating that prose into frontmatter. Do not persist a generic `template_id` field: it is the parent workflow's cross-kind name, not a registrar schema key. Do not persist the execution-only `output_scope` or `target_project` fields. In library scope, `register_template.py` reads this frontmatter in Step 7 so the brief flows directly into the index without the AI re-deriving it from prose.+> **Persist the portable brief into `<design_spec_path>`**. In Step 4, declare a YAML frontmatter block with the child-specific ID key (`brand_id`, `style_id`, `deck_id`, or `layout_id`) and only fields owned by that child. Create Brand follows its identity schema. Create Style persists only `style_id`, `kind`, `summary`, and `keywords`; its method and direction live in the required body sections, and it writes no canvas, category, identity, application, replication, native-structure, page-count, or roster fields. Create Layout/Create Deck persist the confirmed portable fields (`kind`, `category`, `summary`, `keywords`, `primary_color` for deck, `page_types` for layout, `canvas_format`, `canvas_width`, `canvas_height`, `canvas_viewbox`, `source_viewbox`, `replication_mode`, `native_structure_mode`, etc.). `replication_mode` is the AI-derived implementation record, not a user selection. A Deck writes descriptive application context in Template Overview and factual prototype descriptions in Page Roster rather than duplicating that prose into frontmatter. Do not persist a generic `template_id` field: it is the parent workflow's cross-kind name, not a registrar schema key. Do not persist the execution-only `output_scope` or `target_project` fields. In library scope, `register_template.py` reads this frontmatter in Step 7 so the brief flows directly into the index without the AI re-deriving it from prose.---@@ -472,7 +474,7 @@ Skipping this gate — including silently inferring values from reference files,- [ ] The user saw one concise natural-language creation plan rather than a mode menu or content-policy checklist- [ ] User-facing language describes the intended result; internal enum IDs are absent or confined to an audit note- [ ] User has replied with corrections or explicit acceptance of the proposed result-- [ ] Output scope is confirmed; both scopes use the same workspace shape, while `project` includes an explicit initialized target-project path+- [ ] Output scope is confirmed; both scopes use the same spec schema and asset routing with their resolved Design Spec names, while `project` includes an explicit initialized target-project path- [ ] For Create Layout/Create Deck, the canvas format is fixed before SVG generation- [ ] For Create Layout/Create Deck, the AI-derived internal strategy is consistent with the bundle evidence (`fidelity` requires A/B page evidence; `mirror` requires A or structured B; C/D/E channels alone permit only `standard`); Create Layout mirror evidence is already brand-neutral and application-neutral- [ ] Every supplied visual, textual, documentary, web, and asset channel has been analyzed or explicitly excluded; mixed-input conflicts are surfaced rather than silently resolved@@ -506,18 +508,24 @@ template_workspace="<target_project>"mkdir -p "$template_workspace/templates"```+Normally `<authoring_workspace>` equals `<template_workspace>`. When the project+already has the other structural kind, use an isolated project-shaped root+through validation and preview. Its `<design_spec_path>` is temporary;+`<installed_design_spec_path>` is the final table path. Create its `templates/`+only after preflight.+| Scope | Workspace target | Required action before generation ||---|---|---|-| `library` | `skills/ppt-master/templates/<kind_dir>/<template_id>/` | Run the common workspace preflight; the directory name matches the final template ID used in the relevant index |-| `project` | `<target_project>/` | Run the same workspace preflight against the initialized project root |+| `library` | `skills/ppt-master/templates/<kind_dir>/<template_id>/` | Resolve `<design_spec_path>` to `templates/design_spec.md`; run the common workspace preflight; the directory name matches the final template ID used in the relevant index |+| `project` | `<target_project>/` | Resolve the final spec destination to `templates/design_spec.<kind>.<id>.md`; run the project coexistence preflight. Author directly unless Layout/Deck precedence requires isolated validation before atomic install |-The preflight is atomic at the Create Template parent level: discover and settle every output filename first, check all destinations together, then begin generation. Do not partially write a workspace and discover a later collision.+The preflight is atomic at the Create Template parent level: settle every output filename and check all destinations before generation. Pass the active `<design_spec_path>` to the selected child. For a project structural transition, validate in the isolated root, then install its spec at `<installed_design_spec_path>` and its assets atomically: Layout replaces the Deck roster; Deck beside Layout installs no structural payload. Delete staging only after the final project root passes.-**Create Brand branch**: continue in [`create-brand.md`](./create-template/create-brand.md) §3 with the confirmed identity brief and resolved `<template_workspace>`. Then return to the Create Brand branch in Step 5. Do not invoke Template_Designer, create SVGs, or apply the Create Layout/Create Deck-only material below.+**Create Brand branch**: continue in [`create-brand.md`](./create-template/create-brand.md) §3 with the confirmed identity brief and resolved `<template_workspace>` / `<design_spec_path>`. Then return to the Create Brand branch in Step 5. Do not invoke Template_Designer, create SVGs, or apply the Create Layout/Create Deck-only material below.-**Create Style branch**: continue in [`create-style.md`](./create-template/create-style.md) §3 with the confirmed method/direction brief and resolved `<template_workspace>`. Then return to the Create Style branch in Step 5. Do not invoke Template_Designer, create SVGs, retain source page topology, or apply the Create Layout/Create Deck-only material below.+**Create Style branch**: continue in [`create-style.md`](./create-template/create-style.md) §3 with the confirmed method/direction brief and resolved `<template_workspace>` / `<design_spec_path>`. Then return to the Create Style branch in Step 5. Do not invoke Template_Designer, create SVGs, retain source page topology, or apply the Create Layout/Create Deck-only material below.-**Create Layout/Create Deck branch**: continue in the selected child workflow, switch to the Template_Designer role, and generate per role definition. The role input is the finalized brief from Step 3 plus the analysis bundle from Step 1, including the accepted basic template norms.+**Create Layout/Create Deck branch**: continue in the selected child workflow, switch to the Template_Designer role, and generate per role definition. Bind the role's `<template_workspace>` to `<authoring_workspace>` and pass `<design_spec_path>`, the finalized brief from Step 3, and the Step-1 analysis bundle with accepted norms.When the bundle includes Type A, pass the following internal package to the role:@@ -544,19 +552,21 @@ The role interprets the package according to the AI-derived internal creation st| `standard` / `fidelity` | Newly authored SVGs based on the confirmed brief and visual references | Design an intentional new Master/Layout/slot system. Source topology is neither preserved nor distilled into the output. || `mirror` | Editable `authoring-svg/` IR plus native-structure facts and lossless payload backing | Materialize source pages, Master/Layout identities and parentage, placeholder identity/bounds, ownership, and supported native-object metadata one-to-one in the new workspace. Materialization resolves unchanged source refs; it does not copy the lossless tree as the editable source. |-For Type A `mirror`, materialize the reviewed layered IR into an empty template-workspace with the deterministic compiler:+For Type A `mirror`, materialize the reviewed layered IR into a workspace with+no existing roster, using the deterministic compiler:```bashpython3 skills/ppt-master/scripts/mirror_template_materialize.py \- "<import_workspace>" "<template_workspace>"+ "<import_workspace>" "<authoring_workspace>"```-The destination `templates/` directory must be absent or empty. Before-publication, the command verifies the layered manifest and source-ref closure,-lossless SVG and source-PPTX hashes, complete native/inheritance graph, and-extracted-vector inventory. It then stages and publishes the entire roster in-one operation. It emits source-ordered page SVGs, unused-Layout definition+Destination `templates/` may be absent/empty or hold unique qualified+Brand/Style specs; a Layout-over-Deck stage may also hold one qualified Deck+spec without its roster. A bare spec, Layout spec, active roster, or other+payload blocks materialization. Before atomic publication, the command verifies+the layered manifest/source refs, lossless SVG/source-PPTX hashes, complete+native/inheritance graph, and vector inventory. It emits source-ordered page+SVGs, unused-Layout definitionSVGs, `icons/imported/`, referenced `images/` / `templates/assets/`, and onededuplicated `templates/native_payloads.json.gz` store when supported nativepayload or repeated restoration metadata exists. It also writes@@ -573,16 +583,16 @@ topology checks. Template SVGs and importedvectors keep content-hash payload references plus short`data-pptx-native-ref` attribute-record ids. Structural Master/Layout,placeholder, layer, and editable-object fields remain inline. The command does-not create `design_spec.md`. Template_Designer writes that file from the-confirmed brief and the materialized roster before Step 5. A rerun targets a-new empty workspace rather than overwriting a partially reviewed template.+not create the Design Spec. Template_Designer writes `<design_spec_path>` from+the confirmed brief and the materialized roster before Step 5. A rerun targets+a workspace with no roster rather than overwriting a partially reviewed one.**Hard rule — mode-specific authorship**: `standard` and `fidelity` author newproject-canonical SVG documents. When one registered PowerPoint preset exactlyexpresses one complete object, they use the compact canonical`<g>` emitted by `preset_shape_svg.py`, following[`native-shape-authoring.md`](../references/native-shape-authoring.md); its-paint comes from the confirmed brief and template `design_spec.md`. After+paint comes from the confirmed brief and `<design_spec_path>`. Afterinserting the complete helper group, add only the registered structuralattributes required by its Master/Layout or object-slot role; geometry andpaint changes require a new helper render. When actual `standard` / `fidelity`@@ -608,7 +618,7 @@ SVG authors own the semantic roster, parentage, picker names, direct atoms, andDo not package `native_structure.json` or `source_template.pptx` as template inputs. In `standard` / `fidelity`, author Master/Layout direct semantic atoms and bounded slot groups deliberately from the intended reusable behavior. A validated compact canonical authored-preset `<g>` compiles to one native shape and therefore counts as one semantic atom; it may own a Master/Layout fixed layer or serve as the one direct carrier of an `object` slot. Ordinary groups are not structural atoms or single-object carriers. In `mirror`, edit the layered authoring IR and use inheritance/native facts to preserve source ownership; the lossless trees remain payload backing. Recursively expand fixed Master/Layout group wrappers only because the structured contract requires semantic atoms; preserve transforms, styles, paint order, and appearance, and never flatten or regroup by semantic judgment.-`design_spec.md §V` records the newly authored roster for `standard` / `fidelity`. For `mirror`, add the `Source Preservation Map` required by [template-designer.md](../references/template-designer.md), with one row per source slide and its preserved Master/Layout assignment. Do not add a synthesis-decision table.+`<design_spec_path> §V` records the newly authored roster for `standard` / `fidelity`. For `mirror`, add the `Source Preservation Map` required by [template-designer.md](../references/template-designer.md), with one row per source slide and its preserved Master/Layout assignment. Do not add a synthesis-decision table.**Native-shape metadata boundary**: The authoring IR removes opaque payloadfrom model context while retaining stable source refs. `standard` / `fidelity`@@ -630,7 +640,7 @@ Downstream, Strategist inspects the installed workspace and current content, the**Mirror materialization contract** (type A or B): when the derived implementation writes `replication_mode: mirror`, the Template_Designer role:-1. **Materializes one output SVG per source page** in `<template_workspace>/templates/`. Edit and normalize the matching `authoring-svg/` IR document, then run `mirror_template_materialize.py`; the compiler consumes the tool-only authoring manifest together with native structure facts and immutable payload backing. Do not hand-copy or independently rebuild its graph. Preserve the source Master/Layout keys and picker names, Layout parentage, slide assignment, placeholder type/index/bounds, inherited-shape visibility, ownership, paint order, and supported native metadata that are present and validated. Mechanical namespace, root-declaration, asset-path, and fixed-layer group normalization is allowed only when source ownership and appearance remain unchanged.+1. **Materializes one output SVG per source page** in `<authoring_workspace>/templates/`. Edit and normalize the matching `authoring-svg/` IR document, then run `mirror_template_materialize.py`; the compiler consumes the tool-only authoring manifest together with native structure facts and immutable payload backing. Do not hand-copy or independently rebuild its graph. Preserve the source Master/Layout keys and picker names, Layout parentage, slide assignment, placeholder type/index/bounds, inherited-shape visibility, ownership, paint order, and supported native metadata that are present and validated. Mechanical namespace, root-declaration, asset-path, and fixed-layer group normalization is allowed only when source ownership and appearance remain unchanged.- Type A model-facing source: `<import_workspace>/authoring-svg/authoring_summary.json` plus the editable SVGs; `<import_workspace>/svg/`, `svg/inheritance.json`, and `native_structure.json` provide payload and structural backing. The compiler alone reads `<import_workspace>/authoring-svg/authoring_manifest.json`. Optional `<import_workspace>/svg-flat/` is verification-only.- Type B model-facing source: `<svg_analysis_workspace>/authoring-svg/authoring_summary.json` plus its editable SVGs; the complete explicit source SVG contract is immutable backing- For every source Layout unused by all source slides, additionally materialize one definition-only SVG named `layout_<layout_key>.svg` from its layered authoring IR document and payload backing. It carries the exact root identity, fixed atoms, and placeholder contract but is not a generated page assignment. Use source placeholder prompts/carriers; do not invent business content. This definition SVG lets downstream export register the Layout and any otherwise-unused parent Master without retaining an internal carrier slide.@@ -640,17 +650,17 @@ Downstream, Strategist inspects the installed workspace and current content, the3. **Routes bundled assets through the common workspace contract** and rewrites every `<image href="...">` consistently. Keep stable source asset identity in mirror; do not rename, merge, or replace assets by semantic judgment.- Type A: assets come from `<import_workspace>/assets/`- Type B: resolve relative paths in source `<image href="...">` against the source SVG location and copy each unique asset; if the source already follows PPT Master conventions (assets co-located with SVGs in the same directory), copy the whole asset set and then rewrite paths- - Both scopes: write bitmaps to `<template_workspace>/images/`, point SVG references at `../images/<name>`, and keep non-bitmap template-source assets under `<template_workspace>/templates/`.-4. **Copies imported vector assets once** to `<template_workspace>/icons/imported/` and rewrites their placeholders to `<use data-icon="imported/<name>"/>`. Never place a second copy under `templates/icons/`. Other explicitly adopted icon-library references keep their existing library namespace. Do not inline these assets manually in the template working SVGs; template validation, preview, and final export all resolve icons from the workspace-root `icons/` directory.-5. Writes `design_spec.md` per [template-designer.md](../references/template-designer.md) §1. The §V Page Roster remains a factual prototype index; explicit SVG metadata is the native Master/Layout contract. `replication_mode: mirror` records how the workspace was created and only makes literal downstream reuse technically possible; it never selects that behavior or forces a 1:1 slide sequence.+ - Both scopes: write bitmaps to `<authoring_workspace>/images/`, point SVG references at `../images/<name>`, and keep non-bitmap template-source assets under `<authoring_workspace>/templates/`.+4. **Copies imported vector assets once** to `<authoring_workspace>/icons/imported/` and rewrites their placeholders to `<use data-icon="imported/<name>"/>`. Never place a second copy under `templates/icons/`. Other explicitly adopted icon-library references keep their existing library namespace. Do not inline these assets manually in the template working SVGs; template validation, preview, and final export all resolve icons from the workspace-root `icons/` directory.+5. Writes `<design_spec_path>` per [template-designer.md](../references/template-designer.md) §1. The §V Page Roster remains a factual prototype index; explicit SVG metadata is the native Master/Layout contract. `replication_mode: mirror` records how the workspace was created and only makes literal downstream reuse technically possible; it never selects that behavior or forces a 1:1 slide sequence.Mirror mode does not simplify the visual target or synthesize layer ownership. The sprite-sheet preservation rule applies because crop wrappers carry visible geometry; preserve those wrappers and their source scope faithfully.**Expected outputs from this step** (full spec → [template-designer.md](../references/template-designer.md)):-1. `design_spec.md` — **package-specific rules only**. A deck writes a descriptive Template Overview, Color Scheme, Signature Design Elements, and factual Page Roster; Typography / Assets / Placeholder Overrides are conditional. A layout writes only structure-owned Signature Design Elements and Page Roster; its frontmatter `summary` carries concise selection context, and it omits the deck-only Template Overview plus every identity section. The Page Roster must match the actual SVG files on disk and must not prescribe which pages or sample content a future project keeps. Declare portable brief frontmatter; `register_template.py` consumes it only in library scope. **Do not** restate generic SVG constraints, layout pattern libraries, font-size ratio bands, the canonical placeholder table, or content methodology — those are sourced from `shared-standards-core.md` / `pptx-structure-interface.md` / `strategist.md` and are already in the downstream reader's context. Full scope rule and skeleton: [template-designer.md §1](../references/template-designer.md#1-must-generate-design_specmd).+1. `<design_spec_path>` — **package-specific rules only**. A deck writes a descriptive Template Overview, Color Scheme, Signature Design Elements, and factual Page Roster; Typography / Assets / Placeholder Overrides are conditional. A layout writes only structure-owned Signature Design Elements and Page Roster; its frontmatter `summary` carries concise selection context, and it omits the deck-only Template Overview plus every identity section. The Page Roster must match the actual SVG files on disk and must not prescribe which pages or sample content a future project keeps. Declare portable brief frontmatter; `register_template.py` consumes it only in library scope. **Do not** restate generic SVG constraints, layout pattern libraries, font-size ratio bands, the canonical placeholder table, or content methodology — those are sourced from `shared-standards-core.md` / `pptx-structure-interface.md` / `strategist.md` and are already in the downstream reader's context. Full scope rule and skeleton: [template-designer.md §1](../references/template-designer.md#1-must-generate-design_specmd).2. Page roster — see [Page Roster](../references/template-designer.md#page-roster) for `standard` / `fidelity` / `mirror` mode rosters, variant naming, and TOC handling-3. Placeholder vocabulary — pages should adopt the conventional names (`{{TITLE}}`, `{{CONTENT_AREA}}`, ...) when they fit. Full reference: [Placeholder Reference](../references/template-designer.md#4-placeholder-reference-canonical-convention-overridable-per-template). When a template style legitimately needs different vocabulary (consulting → `{{KEY_MESSAGE}}`, branded cover → `{{BRAND_LOGO}}`), declare a `placeholders:` block in `design_spec.md` frontmatter so the registrar and quality checker treat it as the template's authoritative contract. **Avoid** one-off indexed families such as `{{CHAPTER_01_TITLE}}` — use the indexed TOC pattern instead.+3. Placeholder vocabulary — pages should adopt the conventional names (`{{TITLE}}`, `{{CONTENT_AREA}}`, ...) when they fit. Full reference: [Placeholder Reference](../references/template-designer.md#4-placeholder-reference-canonical-convention-overridable-per-template). When a template style legitimately needs different vocabulary (consulting → `{{KEY_MESSAGE}}`, branded cover → `{{BRAND_LOGO}}`), declare a `placeholders:` block in `<design_spec_path>` frontmatter so the registrar and quality checker treat it as the template's authoritative contract. **Avoid** one-off indexed families such as `{{CHAPTER_01_TITLE}}` — use the indexed TOC pattern instead.- `{{...}}` placeholders are the authoring vocabulary used to generate final slide content. Each emitted SVG also carries the native structure contract: root Master/Layout key/name, direct atomic Master/Layout elements, and direct slot `<g>` elements with explicit design-zone bounds plus exactly one compatible carrier. A validated compact canonical authored-preset `<g>` counts as one semantic atom or one `object` carrier; ordinary groups do not. Composite regions use only the explicit `object` + `proxy` downgrade. Minimal structural `data-pptx-role` hints are added only when specialized metadata cannot express required behavior. Both strict and adaptive downstream set `mode: structured` and require complete `page_layouts`, `page_pptx_layouts`, `pptx_masters`, and `pptx_layouts` from planning onward.4. Template assets (optional) — both scopes apply the same `templates/` / `images/` / root `icons/imported/` routing defined above@@ -663,7 +673,7 @@ becomes the prototype Slide placeholder, while|---|---|| Full editable frame | `data-pptx-bounds` describes the complete intended text, picture, chart, table, or object box. Never derive it from the sample text's glyph bounds or leave it as a one-line tight box. || Generic text entry | General `body` and text-carried `object` slots begin at the upper-left, use left paragraph alignment, and wrap inside the full frame. Title/subtitle alignment follows the authored composition. |-| Centered exceptions | Center alignment is reserved for semantically short focal content such as KPI values, short process nodes, hero statements, and compact takeaways. Record a template-wide exception in `design_spec.md §IV` when it is part of the layout grammar. |+| Centered exceptions | Center alignment is reserved for semantically short focal content such as KPI values, short process nodes, hero statements, and compact takeaways. Record a template-wide exception in `<design_spec_path> §IV` when it is part of the layout grammar. || Review Slide binding | `template_preview_pptx.py` sizes each authored Slide carrier to the same complete frame as its registered Layout placeholder. A review deck whose Slide carrier is only the prompt text's tight box fails Step 6. || Review prompt legibility | For `standard` / `fidelity`, the preview exporter substitutes concise sample text only in ephemeral review SVGs so long canonical markers such as `{{CHAPTER_NUM}}` or `{{PAGE_NUM}}` do not wrap. The source SVG markers, carrier font sizes, slot metadata, and Layout frames remain unchanged. || Mirror boundary | `mirror` preserves source Slide carrier geometry exactly in the tool-side native record referenced by its text carrier and keeps `data-pptx-bounds` as the reusable Layout default. Do not normalize one to the other when the source intentionally overrides that frame. |@@ -707,11 +717,11 @@ After Create Style validation passes, skip the Create Layout/Create Deck-onlyremainder of this step and all of Step 6; continue at Step 7. Review Focus isadvisory content only and never activates the Generate visual-review stage.-**Create Layout/Create Deck branch**: set `<template_source>` to `<template_workspace>/templates/` in both scopes.+**Create Layout/Create Deck branch**: set `<template_source>` to the active authoring root's `templates/`. This is `<template_workspace>/templates/` normally and the isolated project-shaped staging root during a structural precedence transition.```bash-ls -la "<template_workspace>/templates"-ls -la "<template_workspace>/images" "<template_workspace>/icons"+ls -la "<template_source>"+ls -la "<authoring_workspace>/images" "<authoring_workspace>/icons"```Compact safe page-space metadata and transform coordinates, then run SVG@@ -719,16 +729,16 @@ validation on the template directory. Keep canonical authored-preset and nativerecord frames unchanged:```bash-python3 skills/ppt-master/scripts/compact_svg_coordinates.py "<template_workspace>/templates" --inplace --keep-native-frames-python3 skills/ppt-master/scripts/svg_quality_checker.py "<template_workspace>/templates" --template-mode --format <canvas_format>+python3 skills/ppt-master/scripts/compact_svg_coordinates.py "<template_source>" --inplace --keep-native-frames+python3 skills/ppt-master/scripts/svg_quality_checker.py "<template_source>" --template-mode --format <canvas_format>````--template-mode` makes the checker:- glob `*.svg` in the template directory directly (templates do not live under `svg_output/`)- skip `spec_lock.md` drift checks (templates do not ship a spec_lock)-- enforce roster ↔ `design_spec.md` consistency as **errors** (orphan files / missing files break the template contract and, in library scope, the target kind's index)-- emit advisory **warnings** when a page lacks a conventional placeholder — these are hints, not failures. Declare a `placeholders:` block in `design_spec.md` frontmatter to silence them when your template intentionally uses a different vocabulary+- enforce roster ↔ resolved Design Spec consistency as **errors** (orphan files / missing files break the template contract and, in library scope, the target kind's index)+- emit advisory **warnings** when a page lacks a conventional placeholder — these are hints, not failures. Declare a `placeholders:` block in `<design_spec_path>` frontmatter to silence them when your template intentionally uses a different vocabulary- require every SVG root to declare one output Master and Layout; zero-slot Layouts are valid- reject ordinary Master/Layout `<g>` elements, nested structure markers, missing slot bounds, and carrier-bound slots without exactly one compatible carrier; a validated compact canonical authored-preset `<g>` is the sole fixed-layer group exception and may be one `object` carrier- validate cross-page Master equality plus same-key Layout atom/slot equality@@ -738,16 +748,16 @@ This checker validates the authoring contract, not the compiled OOXML package. T**Checklist**:-- [ ] `design_spec.md` follows the kind-specific package skeleton: deck = descriptive Overview / Color / Signature / Page Roster plus conditional sections; layout = structure-owned Signature / Page Roster with no Overview, application contract, or identity sections. Generic constraints (SVG rules, pattern libraries, ratio bands, canonical placeholder table) are NOT restated. The source-derived basic norms are present as template-specific layout / image / density / asset rules, not generic advice. Deck Overview identifies recurring situations, audiences/outcomes, delivery assumptions, and representative narrative/page roles; §V Page Roster factually describes every emitted prototype without required/optional/repeatable or fixed/replaceable/example-only policy-- [ ] Every page declared in `design_spec.md §V Page Roster` exists as an SVG file in the template directory (and vice versa — no orphan files)+- [ ] `<design_spec_path>` follows the kind-specific package skeleton: deck = descriptive Overview / Color / Signature / Page Roster plus conditional sections; layout = structure-owned Signature / Page Roster with no Overview, application contract, or identity sections. Generic constraints (SVG rules, pattern libraries, ratio bands, canonical placeholder table) are NOT restated. The source-derived basic norms are present as template-specific layout / image / density / asset rules, not generic advice. Deck Overview identifies recurring situations, audiences/outcomes, delivery assumptions, and representative narrative/page roles; §V Page Roster factually describes every emitted prototype without required/optional/repeatable or fixed/replaceable/example-only policy+- [ ] Every page declared in `<design_spec_path> §V Page Roster` exists as an SVG file in the template directory (and vice versa — no orphan files)- [ ] Variant filenames follow the letter-suffix convention (e.g. `03a_content_two_col.svg`); variants typically reuse the parent type's placeholder set unless the spec frontmatter declares otherwise- [ ] If TOC exists, placeholder pattern uses the canonical indexed form-- [ ] `design_spec.md` frontmatter declares `canvas_format`, `canvas_width`, `canvas_height`, and `canvas_viewbox`; PPTX/SVG-backed templates also declare `source_canvas_width`, `source_canvas_height`, and `source_viewbox`+- [ ] `<design_spec_path>` frontmatter declares `canvas_format`, `canvas_width`, `canvas_height`, and `canvas_viewbox`; PPTX/SVG-backed templates also declare `source_canvas_width`, `source_canvas_height`, and `source_viewbox`- [ ] SVG `viewBox` matches the declared canvas dimensions, not just the aspect ratio (for `ppt169`: `0 0 1280 720`; for `banner`: `0 0 1920 1080`); `width` / `height`, if written, equal it- [ ] Model-facing placeholder bounds and transform page coordinates use at most two decimals; normalized crop/viewBox ratios, path geometry, transform scale/rotation coefficients, authored-preset frames, and tool-side native frames retain their required precision- [ ] Placeholder names follow the canonical convention where applicable; templates with intentionally different vocabularies (e.g. `{{KEY_MESSAGE}}` instead of `{{PAGE_TITLE}}`) should declare a `placeholders:` frontmatter block to silence advisory warnings- [ ] Asset files referenced by SVGs exist at their resolved paths. In both scopes, bitmap references resolve through `../images/`; no bitmap remains accidentally stranded in `templates/`-- [ ] `design_spec.md` frontmatter declares `native_structure_mode: structured`; no `native_structure.json` or `source_template.pptx` is packaged+- [ ] `<design_spec_path>` frontmatter declares `native_structure_mode: structured`; no `native_structure.json` or `source_template.pptx` is packaged- [ ] Every SVG root declares Master/Layout key and picker names; Master/Layout visuals are direct semantic atoms and obey the explicit paint-order contract. Ordinary `<g>` elements remain forbidden there; a validated helper-generated compact canonical preset `<g>` is the sole group exception because it compiles to one native shape. Structural `data-pptx-role` is used only when specialized metadata cannot express required package/page-number/animation behavior- [ ] Every slot is a direct `<g id>` with explicit design-zone bounds and exactly one compatible direct carrier, or an explicit composite `object` proxy. A validated compact canonical preset `<g>` may be the one carrier of an `object` slot; an ordinary multi-object group may not. Zero-slot Layouts remain valid- [ ] For `standard` / `fidelity`, every placeholder bound is the complete editable box rather than the current marker text's tight bounds; general body/object carriers begin at the upper-left and only intentional short focal roles remain centered@@ -760,11 +770,11 @@ This checker validates the authoring contract, not the compiled OOXML package. T- [ ] Mirror preflight covered the complete source graph; each unused Layout has one `layout_<layout_key>.svg` definition prototype and each otherwise-unused Master is retained through at least one such Layout- [ ] For `standard` / `fidelity`, no duplicate-Layout-contract warning remains; mirror may keep equivalent source Layout identities when the preservation map explains them- [ ] All template-creation edits used the authoring IR; Type A mirror used `mirror_template_materialize.py`, validated its manifest/hash/graph/source-ref closure before atomic publication, reused only converter-supported payload for hash-matching Slide-local/slot refs, deduplicated supported opaque payload and repeated native restoration attributes into `templates/native_payloads.json.gz`, stripped IR-only source-ref metadata, and kept fixed Master/Layout visuals as direct atoms-- [ ] If any SVG references an extracted vector, it uses `data-icon="imported/<name>"` and the sole SVG asset exists at `<template_workspace>/icons/imported/<name>.svg`; `templates/icons/` does not exist and no separate illustration embedding script was added+- [ ] If any SVG references an extracted vector, it uses `data-icon="imported/<name>"` and the sole SVG asset exists at `<authoring_workspace>/icons/imported/<name>.svg`; `templates/icons/` does not exist and no separate illustration embedding script was added- [ ] For `fidelity` mode: every sprite-sheet asset retains its nested `<svg viewBox=...>` crop wrapper; no image whose file aspect differs from its on-page aspect was flattened to a bare `<image>`- [ ] For `mirror` mode: source-page SVG count equals source page count, while additional files are exactly the required `layout_<layout_key>.svg` definitions for unused source Layouts; source-page filenames follow the `<NNN>_<page_type>.svg` convention; **no new `{{...}}` authoring placeholders were inserted into materialized source-page SVGs**; §V Page Roster lists every emitted file and marks definition-only prototypes explicitly-This step is a **hard gate**. Do not generate a review PPTX, register, or hand the workspace to the main pipeline until validation passes. A one-Master template may skip Step 6 when no review was requested; a multi-Master template must continue to Step 6 and may not register or complete before that package gate passes.+This step is a **hard gate**. Do not generate a review PPTX, register, install a staged structural transition, or hand the workspace to the main pipeline until validation passes. After a staged project install, rerun the checker on the final `<target_project>/templates/`; it validates the effective Layout roster when Layout and Deck coexist. A one-Master template may skip Step 6 when no review was requested; a multi-Master template must continue to Step 6 and may not register or complete before that package gate passes.---@@ -775,20 +785,25 @@ This step is a **hard gate**. Do not generate a review PPTX, register, or hand tExport the complete SVG roster, one prototype per slide, from the workspace root:```bash-python3 skills/ppt-master/scripts/template_preview_pptx.py "<template_workspace>"+python3 skills/ppt-master/scripts/template_preview_pptx.py "<authoring_workspace>"```-The default output is `<template_workspace>/exports/<template_id>_template_preview.pptx`; the command creates `exports/` on demand. The script consumes `templates/*.svg` directly, compiles the declared structured Master/Layout contract, and reopens the result. For `standard` / `fidelity`, it uses ephemeral SVG copies with concise preview-only placeholder samples so long `{{...}}` markers stay readable; canonical source SVGs and placeholder semantics are not modified. It does not require a project `spec_lock.md`, does not create a persistent intermediate project, and does not infer or distill structure.+`<authoring_workspace>` is the final workspace normally and the isolated staging+root during a project structural transition. The default output is+`<authoring_workspace>/exports/<template_id>_template_preview.pptx`; the command+creates `exports/` on demand. Copy a requested/required successful review+artifact into the target project's `exports/` during the same atomic install.+The script consumes `templates/*.svg` directly, compiles the declared structured Master/Layout contract, and reopens the result. For `standard` / `fidelity`, it uses ephemeral SVG copies with concise preview-only placeholder samples so long `{{...}}` markers stay readable; canonical source SVGs and placeholder semantics are not modified. It does not require a project `spec_lock.md`, does not create a persistent intermediate project, and does not infer or distill structure.The first export refuses an existing output. After intentionally fixing the template and replacing its prior review deck, rerun with `--force`; never rely on a silent overwrite:```bash-python3 skills/ppt-master/scripts/template_preview_pptx.py "<template_workspace>" --force+python3 skills/ppt-master/scripts/template_preview_pptx.py "<authoring_workspace>" --force```**Validation**:-- [ ] Review PPTX exists under `<template_workspace>/exports/`+- [ ] Review PPTX exists under `<authoring_workspace>/exports/` and, after a staged project transition, was copied to the final project `exports/`- [ ] PPTX slide count equals the template SVG roster count- [ ] Package read-back reports the expected Master and Layout counts- [ ] The presentation registers the exact Master and Slide rosters; every Master registers exactly its owned Layouts; every Layout and Slide relationship resolves to its declared parent@@ -855,7 +870,7 @@ library catalog. If an explicit root exactly matches a registered canonicalroot, it may be displayed as `library`. Bare names and style phrases are neverresolved implicitly or used to preselect a template.-> **Recommended for new templates**: declare a YAML frontmatter block at the top of `design_spec.md`. The registrar prefers it over prose extraction:+> **Recommended for new templates**: declare a YAML frontmatter block at the top of `<design_spec_path>`. The registrar prefers it over prose extraction:>> ```yaml> # style example@@ -935,6 +950,7 @@ Produce one scope-aware, evidence-driven completion card for either location:**Output Scope**: library | project**Workspace Path**: `<template_workspace>/`**Template Source**: `<template_workspace>/templates/`+**Design Spec**: `<installed_design_spec_path>`**Bitmap Path**: `<template_workspace>/images/` ← omit when no bitmap was written or adopted**Imported Vector Path**: `<template_workspace>/icons/imported/` ← omit when no imported vector was written or adopted**Review PPTX**: `<template_workspace>/exports/<template_id>_template_preview.pptx` ← Create Layout/Create Deck only; omit for Create Brand/Create Style and when an optional one-Master review was not requested@@ -954,8 +970,8 @@ Produce one scope-aware, evidence-driven completion card for either location:```For Create Brand, replace the SVG/review rows with-`templates/design_spec.md` plus only real identity assets. For Create Style,-list only `templates/design_spec.md`. Both completion cards must explicitly+the Design Spec plus only real identity assets. For Create Style,+list only that spec. Both completion cards must explicitlystate `SVG roster: N/A` and `Native structure: N/A`; Style must also state`Visual review trigger: N/A (advisory focus only)`.@@ -963,10 +979,10 @@ The exact `<template_workspace>/` root in either scope is thecurrent-conversation handoff to Default Generate Step 3. It appears as thespecified candidate, defaults Stage 1 to template mode, and is preselected onlywhen it is the sole supplied root. After Stage 1 confirms it, the application-stage resolves `templates/design_spec.md` and always ignores `exports/`.+stage resolves the root's Design Spec(s) and always ignores `exports/`.Brand/Layout/Deck copy or consume package-owned `templates/` plus any existing-`images/` and `icons/`; Style consumes only `templates/design_spec.md` and-ignores sibling project scaffolding. It then authors new `svg_output/` pages+`images/` and `icons/`; Style consumes only its own spec and ignores sibling+project scaffolding. It then authors new `svg_output/` pagesunder the template contract and exports a new PPTX. Neither the referencePPTX/SVG nor the template prototypes are upgraded in place. A legacy-flatBrand/Layout/Deck package root remains readable only when it satisfies itsdiff --git a/skills/ppt-master/workflows/create-template/create-brand.md b/skills/ppt-master/workflows/create-template/create-brand.mdindex 608cb977..abbbee33 100644--- a/skills/ppt-master/workflows/create-template/create-brand.md+++ b/skills/ppt-master/workflows/create-template/create-brand.md@@ -20,7 +20,7 @@ Enter this child workflow only after [`Create Template`](../create-template.md)## Invocation Points1. Use §1–2 below for brand analysis and identity fields, then execute Create Template Steps 2–3 with those child-owned fields.-2. After Create Template Step 4 resolves and preflights `<template_workspace>`, use §3 to materialize the confirmed identity.+2. After Create Template Step 4 resolves and preflights `<template_workspace>` and `<design_spec_path>`, use §3 to materialize the confirmed identity.3. Run §4, then return its evidence to Create Template Steps 5, 7, and 8. Create Brand always skips shared Step 6.## 1. Brand Input Analysis@@ -63,17 +63,17 @@ When the user explicitly requests an empty skeleton, all identity values remain## 3. Materialize the Confirmed Brand-Create Template supplies an already resolved and collision-checked `<template_workspace>`. Write only:+Create Template supplies an already resolved and collision-checked `<template_workspace>` and `<design_spec_path>`. Write only:```text<template_workspace>/├── templates/-│ └── design_spec.md+│ └── design_spec.md # project scope: design_spec.brand.<brand_id>.md├── images/ # optional; logo/photos/illustrations only when adopted└── icons/ # optional; branded icon overrides only when adopted```-Do not create optional directories or `exports/` solely to retain empty paths. An initialized project may already contain empty scaffolding; leave it untouched and do not report it as Brand output. Bitmap references from `templates/design_spec.md` use `../images/<name>`; branded icon references use `../icons/<name>`.+Do not create optional directories or `exports/` solely to retain empty paths. An initialized project may already contain empty scaffolding; leave it untouched and do not report it as Brand output. Bitmap references from `<design_spec_path>` use `../images/<name>`; branded icon references use `../icons/<name>`.Write this personality-only schema:@@ -133,7 +133,7 @@ Preserve a supplied logo's extension. When multiple lockups exist, use descriptiReturn these facts to Create Template:-- `templates/design_spec.md` exists and contains `brand_id`, `kind: brand`, `summary`, and `primary_color`.+- The Design Spec exists and contains `brand_id`, `kind: brand`, `summary`, and `primary_color`.- `brand_id` matches the confirmed workspace ID in library scope.- Required sections I–VI exist; Page Roster and Signature Design Elements do not exist.- No `*.svg`, `native_structure_mode`, Master/Layout, placeholder, canvas, or page-count fields were written.diff --git a/skills/ppt-master/workflows/create-template/create-deck.md b/skills/ppt-master/workflows/create-template/create-deck.mdindex 236d347c..b2edd15e 100644--- a/skills/ppt-master/workflows/create-template/create-deck.md+++ b/skills/ppt-master/workflows/create-template/create-deck.md@@ -20,7 +20,7 @@ Enter this child workflow only after [`Create Template`](../create-template.md)## Invocation Points1. Use §1–2 below while executing Create Template Steps 1–3.-2. After Create Template Step 4 preflights `<template_workspace>`, use §3 to author or materialize the deck workspace under the shared structured contract.+2. After Create Template Step 4 preflights `<template_workspace>` and `<design_spec_path>`, use §3 to author or materialize the deck workspace under the shared structured contract.3. Apply §4 in addition to Create Template Step 5, then continue through shared Steps 6–8.## 1. Deck Input Interpretation@@ -100,7 +100,7 @@ The output is:```text<template_workspace>/-├── templates/ # design_spec.md + SVG prototypes+├── templates/ # design_spec.md (project scope: design_spec.deck.<deck_id>.md) + SVG prototypes├── images/ # optional adopted bitmaps├── icons/│ └── imported/ # optional imported vectors@@ -113,7 +113,7 @@ Every SVG is a complete preview and declares one root Master and Layout under thIn addition to Create Template Steps 5–6, verify:-- `templates/design_spec.md` contains `deck_id`, `kind: deck`, `summary`, `primary_color`, canvas fields, `replication_mode`, `native_structure_mode: structured`, and `page_count`; `summary` names the recurring presentation family/outcome rather than only visual tone.+- The Design Spec contains `deck_id`, `kind: deck`, `summary`, `primary_color`, canvas fields, `replication_mode`, `native_structure_mode: structured`, and `page_count`; `summary` names the recurring presentation family/outcome rather than only visual tone.- `deck_id` matches the confirmed workspace ID in library scope.- Template Overview, Color Scheme, Signature Design Elements, and Page Roster exist; Template Overview describes the recurring application context, every roster row factually describes its prototype and slots without future-use policy, and conditional sections match real choices/assets.- Every identity color is `#RRGGBB`; the primary table row matches frontmatter, and SVG paint follows the confirmed identity.diff --git a/skills/ppt-master/workflows/create-template/create-layout.md b/skills/ppt-master/workflows/create-template/create-layout.mdindex da619a4b..f914e750 100644--- a/skills/ppt-master/workflows/create-template/create-layout.md+++ b/skills/ppt-master/workflows/create-template/create-layout.md@@ -22,7 +22,7 @@ Neutral colors, safe fonts, and provisional sizes may appear in SVG prototypes s## Invocation Points1. Use §1–2 below while executing Create Template Steps 1–3.-2. After Create Template Step 4 preflights `<template_workspace>`, use §3 to author or materialize the layout workspace under the shared structured contract.+2. After Create Template Step 4 preflights `<template_workspace>` and `<design_spec_path>`, use §3 to author or materialize the layout workspace under the shared structured contract.3. Apply §4 in addition to Create Template Step 5, then continue through shared Steps 6–8.## 1. Layout Input Interpretation@@ -92,7 +92,7 @@ The output is:```text<template_workspace>/-├── templates/ # design_spec.md + SVG prototypes+├── templates/ # design_spec.md (project scope: design_spec.layout.<layout_id>.md) + SVG prototypes├── images/ # optional structural/example bitmaps├── icons/│ └── imported/ # optional imported vectors@@ -105,7 +105,7 @@ Every SVG is a complete preview and declares one root Master and Layout under thIn addition to Create Template Steps 5–6, verify:-- `templates/design_spec.md` contains `layout_id`, `kind: layout`, `summary`, canvas fields, `replication_mode`, `native_structure_mode: structured`, `page_count`, and `page_types`.+- The Design Spec contains `layout_id`, `kind: layout`, `summary`, canvas fields, `replication_mode`, `native_structure_mode: structured`, `page_count`, and `page_types`.- `layout_id` matches the confirmed workspace ID in library scope.- Signature Design Elements and Page Roster exist; Template Overview, application-contract language, and all identity sections do not.- `primary_color`, brand palette, brand typeface/weight claims, final project type-scale claims, logo, voice, and icon-identity claims are absent; structural text roles and capacity rules may remain.diff --git a/skills/ppt-master/workflows/create-template/create-style.md b/skills/ppt-master/workflows/create-template/create-style.mdindex b7fc16bd..863c89f7 100644--- a/skills/ppt-master/workflows/create-template/create-style.md+++ b/skills/ppt-master/workflows/create-template/create-style.md@@ -17,12 +17,12 @@ Enter this child workflow only after [`Create Template`](../create-template.md)**Hard rule — method and defaults only**: A Style owns a reusable way to argue, express evidence, and coordinate non-binding design defaults. It owns no current-project communication contract, reusable brand identity, page geometry, canvas, SVG prototype, Master/Layout graph, placeholder contract, application contract, visible asset inventory, carrier eligibility, image source, or local authoring-capability whitelist.-**Hard rule — no page prototypes**: A Style workspace contains only `templates/design_spec.md`. Do not create page SVGs, a review PPTX, or empty `images/`, `icons/`, or `exports/` directories.+**Hard rule — no page prototypes**: Style contributes only its own Design Spec. Do not create page SVGs, a review PPTX, or empty `images/`, `icons/`, or `exports/` directories. In a project workspace shared with another kind, files that kind owns are not Style output and are left untouched.## Invocation Points1. Use §1–2 below for Style analysis and brief fields, then execute Create Template Steps 2–3 with those child-owned fields.-2. After Create Template Step 4 resolves and preflights `<template_workspace>`, use §3 to materialize the confirmed Style.+2. After Create Template Step 4 resolves and preflights `<template_workspace>` and `<design_spec_path>`, use §3 to materialize the confirmed Style.3. Run §4, then return its evidence to Create Template Steps 5, 7, and 8. Create Style always skips the shared structured-preview step.## 1. Style Input Interpretation@@ -149,12 +149,12 @@ necessary freeform. Explicit current-project requirements remain upstream.## 3. Materialize the Confirmed Style-Create Template supplies an already resolved and collision-checked `<template_workspace>`. Write only:+Create Template supplies an already resolved and collision-checked `<template_workspace>` and `<design_spec_path>`. Write only:```text<template_workspace>/└── templates/- └── design_spec.md+ └── design_spec.md # project scope: design_spec.style.<style_id>.md```Do not create or adopt images, icons, SVGs, native payloads, or review exports. References remain textual provenance; they are not portable Style assets.@@ -163,7 +163,7 @@ Do not create or adopt images, icons, SVGs, native payloads, or review exports.Return these facts to Create Template:-- `templates/design_spec.md` contains non-empty `style_id`, `kind: style`, `summary`, and three-to-five `keywords`; no other frontmatter field exists.+- The Design Spec contains non-empty `style_id`, `kind: style`, `summary`, and three-to-five `keywords`; no other frontmatter field exists.- `style_id` matches the confirmed workspace ID in library scope.- Required sections I–VII exist; preset seeds resolve to real catalog IDs, while custom seeds include behavior prose and only real comma-separated catalog references.- No `*.svg`, optional asset directory, review export, or native payload was created.diff --git a/skills/ppt-master/workflows/routing.md b/skills/ppt-master/workflows/routing.mdindex 309cd5a5..652ca307 100644--- a/skills/ppt-master/workflows/routing.md+++ b/skills/ppt-master/workflows/routing.md@@ -70,8 +70,11 @@ stays inside Generate PPTX but owns an explicit SVG → PPTX short circuit. Pagecount alone never activates or blocks it. Conversion, bounded research, andproject-local resources remain available. Package capabilities may be requestedor agent-selected. Quick may consume exact Brand/Style/Layout/Deck workspaces as-flat authoring inputs; compiling reusable Master/Layout/placeholder structure-still requires the default lock-backed Generate pipeline. Once selected, Quick+flat authoring inputs, with at most one contribution per kind. All four kinds+may combine; Layout takes structural precedence over Deck. A multi-kind project+root contributes all of its specs atomically;+compiling reusable Master/Layout/placeholder structure still requires the+default lock-backed Generate pipeline. Once selected, Quickis the complete runtime procedure and never loads `generate-pptx.md`; Defaultnever loads `quick-generate.md`. Image to PPTX is the narrow profile-ownedQuick activation; Beautify may select either runtime, but never both.@@ -140,7 +143,7 @@ Object animation for generated SVG projects uses the animation stage. Native PPT| User input | Behavior ||---|---|| Default Generate | Step 3 prepares candidates only; Stage 1 confirms one communication contract plus either free design or template use in the same interaction |-| Explicit current workspace root containing `templates/design_spec.md` | Preserve it as a Stage-1 candidate and initialize template mode; preselect that specific candidate only when it is the sole supplied root. An exact registered-root match may be displayed as `library` |+| Explicit current workspace root exposing at least one `templates/` Design Spec | Preserve it as a Stage-1 candidate and initialize template mode; preselect that specific candidate only when it is the sole supplied root. An exact registered-root match may be displayed as `library` || No exact workspace root and no explicit template intent | Initialize Stage 1 to free design; the user may switch to template mode and select an indexed workspace || Explicit template intent or any exact workspace root | Initialize Stage 1 to template mode; exactly one root may be preselected, while multiple roots remain unselected candidates || Bare template/brand name or style label without an explicit template-use request | Do not resolve it to a local path or preselect a template; treat it as a style brief. An explicit request to use templates still initializes template mode, but leaves the specific candidate for the user to choose |diff --git a/skills/ppt-master/workflows/stages/apply-template-workspace.md b/skills/ppt-master/workflows/stages/apply-template-workspace.mdindex 3170cd07..dc58be51 100644--- a/skills/ppt-master/workflows/stages/apply-template-workspace.md+++ b/skills/ppt-master/workflows/stages/apply-template-workspace.md@@ -17,11 +17,11 @@ resolve to one of these current contracts:| Input shape | Spec and SVG source | Asset source ||---|---|---|-| Current workspace root | `<root>/templates/design_spec.md` and `<root>/templates/` | Existing `<root>/images/` and `<root>/icons/` |+| Current workspace root | `<root>/templates/design_spec.md`, or one `design_spec.<kind>.<id>.md` per kind, plus `<root>/templates/` | Existing `<root>/images/` and `<root>/icons/` || Compatible legacy-flat Brand/Layout/Deck root | `<root>/design_spec.md`; Layout/Deck also require current-contract SVGs under `<root>/` | Package-local files || Current Create Template handoff | Its exact validated library or project workspace root | Existing portable sibling `images/` and `icons/`; already installed only when the root is the target project |-The spec frontmatter MUST declare `kind: brand`, `kind: style`, `kind: layout`, or `kind: deck`. Do not accept only another project's inner `templates/` directory because that omits sibling assets.+Spec naming and kind declaration follow [`templates/README.md`](../../templates/README.md); a root exposing several kind-qualified specs contributes all of them. Do not accept only another project's inner `templates/` directory because that omits sibling assets.**Selection-source classification**:@@ -37,11 +37,15 @@ valid without index membership; exact equality with a registered root may bereported as `library`. The label changes discovery provenance only, never schemavalidation, 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.+**Selection cardinality**: Select at most one root per kind; all four kinds may+coexist. A multi-kind explicit root contributes all its specs atomically and+may combine only with non-overlapping kinds. Default permits one explicit root+beside registered choices; Quick applies the same kind constraint. Reject+duplicate kinds before validation.**Hard rule — raw source boundary**: A raw PPTX is not a template workspace. Raw PPTX plus new content uses [`template-fill-pptx`](../template-fill-pptx.md). When the user wants reusable SVG/template generation, run [`create-template`](../create-template.md) first; its validated workspace-root handoff becomes a Stage-1 candidate and is preselected only when it is the sole supplied root. Never add Master/Layout/placeholder structure directly to an existing PPTX or SVG project.-**Compatibility gate**: Reject semantic-legacy or incomplete structured packages, including old baseline/distillation metadata, incomplete Master identity, or legacy direct atomic placeholders. Create a new current workspace through Create Template; use the original PPTX when native topology must be preserved. A legacy-flat Brand/Layout/Deck directory is readable only when it satisfies its current kind contract; Layout/Deck also require a current structured SVG contract. Style has no legacy-flat form and always requires `<root>/templates/design_spec.md`.+**Compatibility gate**: Reject semantic-legacy or incomplete structured packages, including old baseline/distillation metadata, incomplete Master identity, or legacy direct atomic placeholders. Create a new current workspace through Create Template; use the original PPTX when native topology must be preserved. A legacy-flat Brand/Layout/Deck directory is readable only when it satisfies its current kind contract; Layout/Deck also require a current structured SVG contract. Style has no legacy-flat form.## 2. Read the Matching Schema@@ -58,8 +62,8 @@ A Layout created with `mirror` remains eligible only when its source contract isBefore mapping any current workspace, run its shared package validator from theworkspace root. This is the same schema authority used during creation and-library registration; Brand/Style pass without SVG, while Layout/Deck validate-their roster and structure:+registration: Brand/Style are roster-free, the active structure validates its+roster, and a shadowed Deck still validates its declared contract:```bashpython3 skills/ppt-master/scripts/svg_quality_checker.py "<workspace_root>/templates" --template-mode@@ -78,45 +82,66 @@ 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 Each Workspace Separately+## 4. Install Each Distinct Root Once-**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.+Validate each normalized root once. Resolve the effective structural owner as+Layout when selected, otherwise Deck; install only its SVG/non-bitmap+structural payload, but install every selected spec. A library or+compatible legacy-flat root contributes one bare `design_spec.md`; install it+as `design_spec.<kind>.<id>.md`, where `<id>` comes from the matching+frontmatter id field. A current project root may contribute several qualified+specs; preserve each validated qualified filename. Never merge spec bodies,+and never copy one multi-kind root's shared SVG or asset pool once per kind.| 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 |+| `templates/design_spec.<kind>.<id>.md` | A template contribution installed into or authored in this project |+| `templates/design_spec.md` | Library or compatible legacy-flat source shape only; never valid beside qualified project specs |-Prepend exactly one provenance line under each installed file's H1, then leave-the rest of the document untouched:+For every copied spec, prepend exactly one provenance line under its H1, then+leave the rest of the document untouched. An in-place root is not rewritten:```markdown> **Installed from**: `skills/ppt-master/templates/brands/mckinsey/` (library)```-| Kind | Install behavior |+**Root mapping**:++- Copy every selected spec from the root to its resolved qualified destination.+- If the root contributes the effective structural owner, copy its declared+ SVG roster and other non-bitmap structural files once. Do not copy a Deck+ roster when Layout is selected; its structure is shadowed by design.+- Copy the root's real package-owned `images/` and `icons/` files once. A+ Style-only root has none; reject a Style-only library package carrying asset+ or review payloads.+- Ignore `exports/`; it contains review artifacts, not portable inputs.++After that root-level copy, kinds have these downstream effects:++| Kind | Consumption behavior ||---|---|-| `brand` | Install `templates/` plus existing `images/` and `icons/`; ignore `exports/`. Identity is constrained; structure remains free. |-| `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. |+| `brand` | Identity is constrained; structure remains free unless the selected set also includes Layout or Deck. |+| `style` | 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` | Expose the actual reusable structure and take structural precedence over Deck; Default Strategist later inspects these prototypes, while Quick's current agent uses them for immediate flat authoring decisions in active context. |+| `deck` | Expose descriptive application context and identity. It also supplies structure and the actual prototype roster only when no Layout is selected. |For a compatible legacy-flat package, route SVG/spec/non-bitmaps to project `templates/`, bitmaps to project `images/`, and declared icons to project `icons/`. Do not infer legacy Master/Layout semantics from the flat directory shape.**Atomic install preflight**:1. Resolve every source and destination path.-2. Enumerate the complete mapping across `templates/`, `images/`, and `icons/`.-3. Reject every destination collision before writing.+2. Enumerate the union mapping across all distinct roots and across+ `templates/`, `images/`, and `icons/`; map a source file at most once.+3. Reject every destination collision and every duplicate-kind selection+ before writing. Resolve Layout-over-Deck structural precedence before+ constructing the destination map, so the shadowed Deck roster never enters+ that map.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 be combined with other installed roots. Ignore source `exports/`; it contains review artifacts, not portable template inputs. Empty optional roots remain absent.+Consume an input equal to the target project in place, mapping only other+roots. If a selected Layout supersedes its in-place Deck roster, stage the+accepted mapping and replace that roster atomically. Never mix rosters or write+piecemeal. Ignore `exports/`; empty optional roots remain absent.**Hard rule — project-local consumer boundary**: After installation,Default template-aware Strategist work in final Stage 2, Quick's current@@ -154,7 +179,7 @@ current user instructions and the consuming plan still govern project use:| Segment | Starting owner ||---|---|| Identity | Brand, otherwise Deck, otherwise unresolved until the consuming plan (Default final Stage 2 or Quick active context). Style color/type/icon/image values are direction candidates, never identity truth. |-| Structure | A compatible Layout, otherwise Deck, otherwise unresolved/free design until the consuming plan. Style owns no canvas, prototype, Master/Layout, slot, or page mapping. |+| Structure | Layout when present, otherwise Deck, otherwise unresolved/free design until the consuming plan. Style owns no canvas, prototype, Master/Layout, slot, or page mapping. || 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. |@@ -166,40 +191,38 @@ instruction carries the same authority as the value itself. A Style'scomposition or whitespace tendency never demotes a Brand's declared dominantcolor 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.+Before Style overlays Layout or Deck guidance, verify that its method fits the+selected structure and, for Deck, serves its reusable context. 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 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+### 5.2 Selection Conflicts-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.+Duplicate kinds are selection errors. Layout plus Deck is valid: Layout owns+structure; Deck keeps its other segments. Default returns duplicates to Stage+1; Quick asks for narrower roots. Never split a multi-kind root, average+same-kind specs, or choose by path order.### 5.3 Installed SetEach installed file keeps its own frontmatter `kind` and `<id>` from its sourceworkspace; nothing is relabelled. There is no combined capability label and nomerged 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+consequence is derived while reading — structure comes from Layout when+present, otherwise Deck; identity comes from Brand or Deck; direction comes+from Style. A project-local Brand + Layout pair does not become a reusable libraryDeck; 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>; installed_specs=<comma-separated design_spec.<kind>.<id>.md>`.+**Completion receipt**: Report `roots=<unique normalized roots>; sources=<library|explicit per root>; kinds=<all contributed kinds per root>; segments=identity:<owner>,structure:<owner>,application_context:<owner>,direction:<owner>; active_roster=<layout|deck|none>:<source root>; 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 destination collisions were rejected before one atomic install; no two source specs were merged into one file+- [x] Duplicate kinds and all destination collisions were rejected before one atomic install; Layout-over-Deck precedence selected exactly one active structural roster- [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) §2